@grackle-ai/web 0.41.0 → 0.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import{r as lx,a as S,j as h,v as ox,b as rx,t as _r,i as cx,f as ux,M as Af,c as jf}from"./markdown-gcy1Jmzi.js";import{r as dx,d as yy,H as vy,P as by,i as fx,B as hx,a as px,C as mx,M as gx}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=i(r);fetch(r.href,u)}})();var Sd={exports:{}},Dl={},_d={exports:{}},xd={};/**
|
|
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 Sy;function yx(){return Sy||(Sy=1,(function(n){function a(B,F){var W=B.length;B.push(F);e:for(;0<W;){var be=W-1>>>1,Te=B[be];if(0<r(Te,F))B[be]=F,B[W]=Te,W=be;else break e}}function i(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var F=B[0],W=B.pop();if(W!==F){B[0]=W;e:for(var be=0,Te=B.length,tt=Te>>>1;be<tt;){var Me=2*(be+1)-1,fe=B[Me],Ie=Me+1,Ee=B[Ie];if(0>r(fe,W))Ie<Te&&0>r(Ee,fe)?(B[be]=Ee,B[Ie]=W,be=Ie):(B[be]=fe,B[Me]=W,be=Me);else if(Ie<Te&&0>r(Ee,W))B[be]=Ee,B[Ie]=W,be=Ie;else break e}}return F}function r(B,F){var W=B.sortIndex-F.sortIndex;return W!==0?W:B.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var m=[],g=[],v=1,y=null,_=3,T=!1,E=!1,w=!1,j=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function V(B){for(var F=i(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=B)o(g),F.sortIndex=F.expirationTime,a(m,F);else break;F=i(g)}}function D(B){if(w=!1,V(B),!E)if(i(m)!==null)E=!0,G||(G=!0,ie());else{var F=i(g);F!==null&&Q(D,F.startTime-B)}}var G=!1,H=-1,R=5,X=-1;function te(){return j?!0:!(n.unstable_now()-X<R)}function ne(){if(j=!1,G){var B=n.unstable_now();X=B;var F=!0;try{e:{E=!1,w&&(w=!1,A(H),H=-1),T=!0;var W=_;try{t:{for(V(B),y=i(m);y!==null&&!(y.expirationTime>B&&te());){var be=y.callback;if(typeof be=="function"){y.callback=null,_=y.priorityLevel;var Te=be(y.expirationTime<=B);if(B=n.unstable_now(),typeof Te=="function"){y.callback=Te,V(B),F=!0;break t}y===i(m)&&o(m),V(B)}else o(m);y=i(m)}if(y!==null)F=!0;else{var tt=i(g);tt!==null&&Q(D,tt.startTime-B),F=!1}}break e}finally{y=null,_=W,T=!1}F=void 0}}finally{F?ie():G=!1}}}var ie;if(typeof M=="function")ie=function(){M(ne)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,q=ue.port2;ue.port1.onmessage=ne,ie=function(){q.postMessage(null)}}else ie=function(){C(ne,0)};function Q(B,F){H=C(function(){B(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(B){switch(_){case 1:case 2:case 3:var F=3;break;default:F=_}var W=_;_=F;try{return B()}finally{_=W}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=_;_=B;try{return F()}finally{_=W}},n.unstable_scheduleCallback=function(B,F,W){var be=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?be+W:be):W=be,B){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=W+Te,B={id:v++,callback:F,priorityLevel:B,startTime:W,expirationTime:Te,sortIndex:-1},W>be?(B.sortIndex=W,a(g,B),i(m)===null&&B===i(g)&&(w?(A(H),H=-1):w=!0,Q(D,W-be))):(B.sortIndex=Te,a(m,B),E||T||(E=!0,G||(G=!0,ie()))),B},n.unstable_shouldYield=te,n.unstable_wrapCallback=function(B){var F=_;return function(){var W=_;_=F;try{return B.apply(this,arguments)}finally{_=W}}}})(xd)),xd}var _y;function vx(){return _y||(_y=1,_d.exports=yx()),_d.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 xy;function bx(){if(xy)return Dl;xy=1;var n=vx(),a=lx(),i=dx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,x=c.child;x;){if(x===s){b=!0,s=c,l=f;break}if(x===l){b=!0,l=c,s=f;break}x=x.sibling}if(!b){for(x=f.child;x;){if(x===s){b=!0,s=f,l=c;break}if(x===l){b=!0,l=f,s=c;break}x=x.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),M=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),G=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case C:return"Profiler";case j:return"StrictMode";case D:return"Suspense";case G:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case M:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case V:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return t=e.displayName||null,t!==null?t:q(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return q(e(t))}catch{}}return null}var Q=Array.isArray,B=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},be=[],Te=-1;function tt(e){return{current:e}}function Me(e){0>Te||(e.current=be[Te],be[Te]=null,Te--)}function fe(e,t){Te++,be[Te]=e.current,e.current=t}var Ie=tt(null),Ee=tt(null),ee=tt(null),Ve=tt(null);function we(e,t){switch(fe(ee,t),fe(Ee,e),fe(Ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vg(t),e=Hg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Me(Ie),fe(Ie,e)}function _e(){Me(Ie),Me(Ee),Me(ee)}function ut(e){e.memoizedState!==null&&fe(Ve,e);var t=Ie.current,s=Hg(t,e.type);t!==s&&(fe(Ee,e),fe(Ie,s))}function dt(e){Ee.current===e&&(Me(Ie),Me(Ee)),Ve.current===e&&(Me(Ve),Al._currentValue=W)}var Lt,Dt;function $e(e){if(Lt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Lt=t&&t[1]||"",Dt=-1<s.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+Lt+e+Dt}var Re=!1;function kn(e,t){if(!e||Re)return"";Re=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(P){var z=P}Reflect.construct(e,[],K)}else{try{K.call()}catch(P){z=P}e.call(K.prototype)}}else{try{throw Error()}catch(P){z=P}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],x=f[1];if(b&&x){var N=b.split(`
|
|
20
|
+
`),U=x.split(`
|
|
21
|
+
`);for(c=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(l===N.length||c===U.length)for(l=N.length-1,c=U.length-1;1<=l&&0<=c&&N[l]!==U[c];)c--;for(;1<=l&&0<=c;l--,c--)if(N[l]!==U[c]){if(l!==1||c!==1)do if(l--,c--,0>c||N[l]!==U[c]){var $=`
|
|
22
|
+
`+N[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=c);break}}}finally{Re=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?$e(s):""}function Ca(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return kn(e.type,!1);case 11:return kn(e.type.render,!1);case 1:return kn(e.type,!0);case 31:return $e("Activity");default:return""}}function Aa(e){try{var t="",s=null;do t+=Ca(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
|
|
23
|
+
Error generating stack: `+l.message+`
|
|
24
|
+
`+l.stack}}var zn=Object.prototype.hasOwnProperty,Jn=n.unstable_scheduleCallback,Mn=n.unstable_cancelCallback,Wn=n.unstable_shouldYield,Z=n.unstable_requestPaint,J=n.unstable_now,ae=n.unstable_getCurrentPriorityLevel,ge=n.unstable_ImmediatePriority,pe=n.unstable_UserBlockingPriority,Ue=n.unstable_NormalPriority,Ce=n.unstable_LowPriority,yt=n.unstable_IdlePriority,xe=n.log,ft=n.unstable_setDisableYieldValue,vt=null,Oe=null;function kt(e){if(typeof xe=="function"&&ft(e),Oe&&typeof Oe.setStrictMode=="function")try{Oe.setStrictMode(vt,e)}catch{}}var Se=Math.clz32?Math.clz32:le,Ne=Math.log,Tt=Math.LN2;function le(e){return e>>>=0,e===0?32:31-(Ne(e)/Tt|0)|0}var Et=256,Rn=262144,lo=4194304;function os(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function oo(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~f,l!==0?c=os(l):(b&=x,b!==0?c=os(b):s||(s=x&~e,s!==0&&(c=os(s))))):(x=l&~f,x!==0?c=os(x):b!==0?c=os(b):s||(s=l&~e,s!==0&&(c=os(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function zi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Y1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _h(){var e=lo;return lo<<=1,(lo&62914560)===0&&(lo=4194304),e}function rc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Vi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function K1(e,t,s,l,c,f){var b=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,N=e.expirationTimes,U=e.hiddenUpdates;for(s=b&~s;0<s;){var $=31-Se(s),K=1<<$;x[$]=0,N[$]=-1;var z=U[$];if(z!==null)for(U[$]=null,$=0;$<z.length;$++){var P=z[$];P!==null&&(P.lane&=-536870913)}s&=~K}l!==0&&xh(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function xh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Se(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Th(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Se(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function Eh(e,t){var s=t&-t;return s=(s&42)!==0?1:cc(s),(s&(e.suspendedLanes|t))!==0?0:s}function cc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function uc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ch(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:uy(e.type))}function Ah(e,t){var s=F.p;try{return F.p=e,t()}finally{F.p=s}}var ja=Math.random().toString(36).slice(2),It="__reactFiber$"+ja,Xt="__reactProps$"+ja,Is="__reactContainer$"+ja,dc="__reactEvents$"+ja,Z1="__reactListeners$"+ja,X1="__reactHandles$"+ja,jh="__reactResources$"+ja,Hi="__reactMarker$"+ja;function fc(e){delete e[It],delete e[Xt],delete e[dc],delete e[Z1],delete e[X1]}function Us(e){var t=e[It];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Is]||s[It]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Kg(e);e!==null;){if(s=e[It])return s;e=Kg(e)}return t}e=s,s=e.parentNode}return null}function zs(e){if(e=e[It]||e[Is]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Pi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Vs(e){var t=e[jh];return t||(t=e[jh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Hi]=!0}var wh=new Set,Nh={};function rs(e,t){Hs(e,t),Hs(e+"Capture",t)}function Hs(e,t){for(Nh[e]=t,e=0;e<t.length;e++)wh.add(t[e])}var Q1=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]*$"),Dh={},kh={};function J1(e){return zn.call(kh,e)?!0:zn.call(Dh,e)?!1:Q1.test(e)?kh[e]=!0:(Dh[e]=!0,!1)}function ro(e,t,s){if(J1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function co(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function ea(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function gn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function W1(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){s=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hc(e){if(!e._valueTracker){var t=Mh(e)?"checked":"value";e._valueTracker=W1(e,t,""+e[t])}}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Mh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function uo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var eS=/[\n"\\]/g;function yn(e){return e.replace(eS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pc(e,t,s,l,c,f,b,x){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+gn(t)):e.value!==""+gn(t)&&(e.value=""+gn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?mc(e,b,gn(t)):s!=null?mc(e,b,gn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+gn(x):e.removeAttribute("name")}function Oh(e,t,s,l,c,f,b,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){hc(e);return}s=s!=null?""+gn(s):"",t=t!=null?""+gn(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),hc(e)}function mc(e,t,s){t==="number"&&uo(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Ps(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+gn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Bh(e,t,s){if(t!=null&&(t=""+gn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+gn(s):""}function Lh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(Q(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=gn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),hc(e)}function Gs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var tS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ih(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||tS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Uh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&Ih(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&Ih(e,f,t[f])}function gc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),aS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fo(e){return aS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ta(){}var yc=null;function vc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fs=null,$s=null;function zh(e){var t=zs(e);if(t&&(e=t.stateNode)){var s=e[Xt]||null;e:switch(e=t.stateNode,t.type){case"input":if(pc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+yn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Xt]||null;if(!c)throw Error(o(90));pc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&Rh(l)}break e;case"textarea":Bh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Ps(e,!!s.multiple,t,!1)}}}var bc=!1;function Vh(e,t,s){if(bc)return e(t,s);bc=!0;try{var l=e(t);return l}finally{if(bc=!1,(Fs!==null||$s!==null)&&(Wo(),Fs&&(t=Fs,e=$s,$s=Fs=null,zh(t),e)))for(t=0;t<e.length;t++)zh(e[t])}}function Gi(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Xt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var na=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sc=!1;if(na)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){Sc=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{Sc=!1}var wa=null,_c=null,ho=null;function Hh(){if(ho)return ho;var e,t=_c,s=t.length,l,c="value"in wa?wa.value:wa.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return ho=c.slice(e,1<l?1-l:void 0)}function po(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mo(){return!0}function Ph(){return!1}function Qt(e){function t(s,l,c,f,b){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?mo:Ph,this.isPropagationStopped=Ph,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=mo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),t}var cs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},go=Qt(cs),$i=y({},cs,{view:0,detail:0}),sS=Qt($i),xc,Tc,qi,yo=y({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qi&&(qi&&e.type==="mousemove"?(xc=e.screenX-qi.screenX,Tc=e.screenY-qi.screenY):Tc=xc=0,qi=e),xc)},movementY:function(e){return"movementY"in e?e.movementY:Tc}}),Gh=Qt(yo),iS=y({},yo,{dataTransfer:0}),lS=Qt(iS),oS=y({},$i,{relatedTarget:0}),Ec=Qt(oS),rS=y({},cs,{animationName:0,elapsedTime:0,pseudoElement:0}),cS=Qt(rS),uS=y({},cs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dS=Qt(uS),fS=y({},cs,{data:0}),Fh=Qt(fS),hS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pS={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"},mS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=mS[e])?!!t[e]:!1}function Cc(){return gS}var yS=y({},$i,{key:function(e){if(e.key){var t=hS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=po(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?pS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cc,charCode:function(e){return e.type==="keypress"?po(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?po(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vS=Qt(yS),bS=y({},yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$h=Qt(bS),SS=y({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cc}),_S=Qt(SS),xS=y({},cs,{propertyName:0,elapsedTime:0,pseudoElement:0}),TS=Qt(xS),ES=y({},yo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),CS=Qt(ES),AS=y({},cs,{newState:0,oldState:0}),jS=Qt(AS),wS=[9,13,27,32],Ac=na&&"CompositionEvent"in window,Yi=null;na&&"documentMode"in document&&(Yi=document.documentMode);var NS=na&&"TextEvent"in window&&!Yi,qh=na&&(!Ac||Yi&&8<Yi&&11>=Yi),Yh=" ",Kh=!1;function Zh(e,t){switch(e){case"keyup":return wS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qs=!1;function DS(e,t){switch(e){case"compositionend":return Xh(t);case"keypress":return t.which!==32?null:(Kh=!0,Yh);case"textInput":return e=t.data,e===Yh&&Kh?null:e;default:return null}}function kS(e,t){if(qs)return e==="compositionend"||!Ac&&Zh(e,t)?(e=Hh(),ho=_c=wa=null,qs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qh&&t.locale!=="ko"?null:t.data;default:return null}}var MS={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 Qh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!MS[e.type]:t==="textarea"}function Jh(e,t,s,l){Fs?$s?$s.push(l):$s=[l]:Fs=l,t=lr(t,"onChange"),0<t.length&&(s=new go("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Ki=null,Zi=null;function RS(e){Og(e,0)}function vo(e){var t=Pi(e);if(Rh(t))return e}function Wh(e,t){if(e==="change")return t}var ep=!1;if(na){var jc;if(na){var wc="oninput"in document;if(!wc){var tp=document.createElement("div");tp.setAttribute("oninput","return;"),wc=typeof tp.oninput=="function"}jc=wc}else jc=!1;ep=jc&&(!document.documentMode||9<document.documentMode)}function np(){Ki&&(Ki.detachEvent("onpropertychange",ap),Zi=Ki=null)}function ap(e){if(e.propertyName==="value"&&vo(Zi)){var t=[];Jh(t,Zi,e,vc(e)),Vh(RS,t)}}function OS(e,t,s){e==="focusin"?(np(),Ki=t,Zi=s,Ki.attachEvent("onpropertychange",ap)):e==="focusout"&&np()}function BS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vo(Zi)}function LS(e,t){if(e==="click")return vo(t)}function IS(e,t){if(e==="input"||e==="change")return vo(t)}function US(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:US;function Xi(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!zn.call(t,c)||!sn(e[c],t[c]))return!1}return!0}function sp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ip(e,t){var s=sp(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=sp(s)}}function lp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function op(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=uo(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=uo(e.document)}return t}function Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var zS=na&&"documentMode"in document&&11>=document.documentMode,Ys=null,Dc=null,Qi=null,kc=!1;function rp(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;kc||Ys==null||Ys!==uo(l)||(l=Ys,"selectionStart"in l&&Nc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Qi&&Xi(Qi,l)||(Qi=l,l=lr(Dc,"onSelect"),0<l.length&&(t=new go("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Ys)))}function us(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Ks={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},Mc={},cp={};na&&(cp=document.createElement("div").style,"AnimationEvent"in window||(delete Ks.animationend.animation,delete Ks.animationiteration.animation,delete Ks.animationstart.animation),"TransitionEvent"in window||delete Ks.transitionend.transition);function ds(e){if(Mc[e])return Mc[e];if(!Ks[e])return e;var t=Ks[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in cp)return Mc[e]=t[s];return e}var up=ds("animationend"),dp=ds("animationiteration"),fp=ds("animationstart"),VS=ds("transitionrun"),HS=ds("transitionstart"),PS=ds("transitioncancel"),hp=ds("transitionend"),pp=new Map,Rc="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(" ");Rc.push("scrollEnd");function On(e,t){pp.set(e,t),rs(t,[e])}var bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},vn=[],Zs=0,Oc=0;function So(){for(var e=Zs,t=Oc=Zs=0;t<e;){var s=vn[t];vn[t++]=null;var l=vn[t];vn[t++]=null;var c=vn[t];vn[t++]=null;var f=vn[t];if(vn[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&mp(s,c,f)}}function _o(e,t,s,l){vn[Zs++]=e,vn[Zs++]=t,vn[Zs++]=s,vn[Zs++]=l,Oc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Bc(e,t,s,l){return _o(e,t,s,l),xo(e)}function fs(e,t){return _o(e,null,null,t),xo(e)}function mp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Se(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function xo(e){if(50<bl)throw bl=0,Fu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xs={};function GS(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,s,l){return new GS(e,t,s,l)}function Lc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aa(e,t){var s=e.alternate;return s===null?(s=ln(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function gp(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function To(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Lc(e)&&(b=1);else if(typeof e=="string")b=K_(e,s,Ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=ln(31,s,t,c),e.elementType=X,e.lanes=f,e;case w:return hs(s.children,c,f,t);case j:b=8,c|=24;break;case C:return e=ln(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case D:return e=ln(13,s,t,c),e.elementType=D,e.lanes=f,e;case G:return e=ln(19,s,t,c),e.elementType=G,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:b=10;break e;case A:b=9;break e;case V:b=11;break e;case H:b=14;break e;case R:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=ln(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function hs(e,t,s,l){return e=ln(7,e,l,t),e.lanes=s,e}function Ic(e,t,s){return e=ln(6,e,null,t),e.lanes=s,e}function yp(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function Uc(e,t,s){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vp=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var s=vp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:Aa(t)},vp.set(e,t),t)}return{value:e,source:t,stack:Aa(t)}}var Qs=[],Js=0,Eo=null,Ji=0,Sn=[],_n=0,Na=null,Vn=1,Hn="";function sa(e,t){Qs[Js++]=Ji,Qs[Js++]=Eo,Eo=e,Ji=t}function bp(e,t,s){Sn[_n++]=Vn,Sn[_n++]=Hn,Sn[_n++]=Na,Na=e;var l=Vn;e=Hn;var c=32-Se(l)-1;l&=~(1<<c),s+=1;var f=32-Se(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Vn=1<<32-Se(t)+c|s<<c|l,Hn=f+e}else Vn=1<<f|s<<c|l,Hn=e}function zc(e){e.return!==null&&(sa(e,1),bp(e,1,0))}function Vc(e){for(;e===Eo;)Eo=Qs[--Js],Qs[Js]=null,Ji=Qs[--Js],Qs[Js]=null;for(;e===Na;)Na=Sn[--_n],Sn[_n]=null,Hn=Sn[--_n],Sn[_n]=null,Vn=Sn[--_n],Sn[_n]=null}function Sp(e,t){Sn[_n++]=Vn,Sn[_n++]=Hn,Sn[_n++]=Na,Vn=t.id,Hn=t.overflow,Na=e}var Ut=null,nt=null,ze=!1,Da=null,xn=!1,Hc=Error(o(519));function ka(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wi(bn(t,e)),Hc}function _p(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[It]=e,t[Xt]=l,s){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(s=0;s<_l.length;s++)ke(_l[s],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),Oh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),Lh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Ug(t.textContent,s)?(l.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),l.onScroll!=null&&ke("scroll",t),l.onScrollEnd!=null&&ke("scrollend",t),l.onClick!=null&&(t.onclick=ta),t=!0):t=!1,t||ka(e,!0)}function xp(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Ut=Ut.return}}function Ws(e){if(e!==Ut)return!1;if(!ze)return xp(e),ze=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||id(e.type,e.memoizedProps)),s=!s),s&&nt&&ka(e),xp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=Yg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));nt=Yg(e)}else t===27?(t=nt,$a(e.type)?(e=ud,ud=null,nt=e):nt=t):nt=Ut?En(e.stateNode.nextSibling):null;return!0}function ps(){nt=Ut=null,ze=!1}function Pc(){var e=Da;return e!==null&&(tn===null?tn=e:tn.push.apply(tn,e),Da=null),e}function Wi(e){Da===null?Da=[e]:Da.push(e)}var Gc=tt(null),ms=null,ia=null;function Ma(e,t,s){fe(Gc,t._currentValue),t._currentValue=s}function la(e){e._currentValue=Gc.current,Me(Gc)}function Fc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function $c(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=c;for(var N=0;N<t.length;N++)if(x.context===t[N]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),Fc(f.return,s,e),l||(b=null);break e}f=x.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(o(341));b.lanes|=s,f=b.alternate,f!==null&&(f.lanes|=s),Fc(b,s,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function ei(e,t,s,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var x=c.type;sn(c.pendingProps.value,b.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ve.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Al):e=[Al])}c=c.return}e!==null&&$c(t,e,s,l),t.flags|=262144}function Co(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){ms=e,ia=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return Tp(ms,e)}function Ao(e,t){return ms===null&&gs(e),Tp(e,t)}function Tp(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},ia===null){if(e===null)throw Error(o(308));ia=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ia=ia.next=t;return s}var FS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},$S=n.unstable_scheduleCallback,qS=n.unstable_NormalPriority,Ct={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qc(){return{controller:new FS,data:new Map,refCount:0}}function el(e){e.refCount--,e.refCount===0&&$S(qS,function(){e.controller.abort()})}var tl=null,Yc=0,ti=0,ni=null;function YS(e,t){if(tl===null){var s=tl=[];Yc=0,ti=Xu(),ni={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Yc++,t.then(Ep,Ep),t}function Ep(){if(--Yc===0&&tl!==null){ni!==null&&(ni.status="fulfilled");var e=tl;tl=null,ti=0,ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function KS(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var Cp=B.S;B.S=function(e,t){rg=J(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&YS(e,t),Cp!==null&&Cp(e,t)};var ys=tt(null);function Kc(){var e=ys.current;return e!==null?e:We.pooledCache}function jo(e,t){t===null?fe(ys,ys.current):fe(ys,t.pool)}function Ap(){var e=Kc();return e===null?null:{parent:Ct._currentValue,pool:e}}var ai=Error(o(460)),Zc=Error(o(474)),wo=Error(o(542)),No={then:function(){}};function jp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(ta,ta),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dp(e),e;default:if(typeof t.status=="string")t.then(ta,ta);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dp(e),e}throw bs=t,ai}}function vs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(bs=s,ai):s}}var bs=null;function Np(){if(bs===null)throw Error(o(459));var e=bs;return bs=null,e}function Dp(e){if(e===ai||e===wo)throw Error(o(483))}var si=null,nl=0;function Do(e){var t=nl;return nl+=1,si===null&&(si=[]),wp(si,e,t)}function al(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ko(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function kp(e){function t(O,k){if(e){var I=O.deletions;I===null?(O.deletions=[k],O.flags|=16):I.push(k)}}function s(O,k){if(!e)return null;for(;k!==null;)t(O,k),k=k.sibling;return null}function l(O){for(var k=new Map;O!==null;)O.key!==null?k.set(O.key,O):k.set(O.index,O),O=O.sibling;return k}function c(O,k){return O=aa(O,k),O.index=0,O.sibling=null,O}function f(O,k,I){return O.index=I,e?(I=O.alternate,I!==null?(I=I.index,I<k?(O.flags|=67108866,k):I):(O.flags|=67108866,k)):(O.flags|=1048576,k)}function b(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function x(O,k,I,Y){return k===null||k.tag!==6?(k=Ic(I,O.mode,Y),k.return=O,k):(k=c(k,I),k.return=O,k)}function N(O,k,I,Y){var de=I.type;return de===w?$(O,k,I.props.children,Y,I.key):k!==null&&(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===R&&vs(de)===k.type)?(k=c(k,I.props),al(k,I),k.return=O,k):(k=To(I.type,I.key,I.props,null,O.mode,Y),al(k,I),k.return=O,k)}function U(O,k,I,Y){return k===null||k.tag!==4||k.stateNode.containerInfo!==I.containerInfo||k.stateNode.implementation!==I.implementation?(k=Uc(I,O.mode,Y),k.return=O,k):(k=c(k,I.children||[]),k.return=O,k)}function $(O,k,I,Y,de){return k===null||k.tag!==7?(k=hs(I,O.mode,Y,de),k.return=O,k):(k=c(k,I),k.return=O,k)}function K(O,k,I){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ic(""+k,O.mode,I),k.return=O,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return I=To(k.type,k.key,k.props,null,O.mode,I),al(I,k),I.return=O,I;case E:return k=Uc(k,O.mode,I),k.return=O,k;case R:return k=vs(k),K(O,k,I)}if(Q(k)||ie(k))return k=hs(k,O.mode,I,null),k.return=O,k;if(typeof k.then=="function")return K(O,Do(k),I);if(k.$$typeof===M)return K(O,Ao(O,k),I);ko(O,k)}return null}function z(O,k,I,Y){var de=k!==null?k.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return de!==null?null:x(O,k,""+I,Y);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case T:return I.key===de?N(O,k,I,Y):null;case E:return I.key===de?U(O,k,I,Y):null;case R:return I=vs(I),z(O,k,I,Y)}if(Q(I)||ie(I))return de!==null?null:$(O,k,I,Y,null);if(typeof I.then=="function")return z(O,k,Do(I),Y);if(I.$$typeof===M)return z(O,k,Ao(O,I),Y);ko(O,I)}return null}function P(O,k,I,Y,de){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(I)||null,x(k,O,""+Y,de);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case T:return O=O.get(Y.key===null?I:Y.key)||null,N(k,O,Y,de);case E:return O=O.get(Y.key===null?I:Y.key)||null,U(k,O,Y,de);case R:return Y=vs(Y),P(O,k,I,Y,de)}if(Q(Y)||ie(Y))return O=O.get(I)||null,$(k,O,Y,de,null);if(typeof Y.then=="function")return P(O,k,I,Do(Y),de);if(Y.$$typeof===M)return P(O,k,I,Ao(k,Y),de);ko(k,Y)}return null}function se(O,k,I,Y){for(var de=null,He=null,ce=k,je=k=0,Le=null;ce!==null&&je<I.length;je++){ce.index>je?(Le=ce,ce=null):Le=ce.sibling;var Pe=z(O,ce,I[je],Y);if(Pe===null){ce===null&&(ce=Le);break}e&&ce&&Pe.alternate===null&&t(O,ce),k=f(Pe,k,je),He===null?de=Pe:He.sibling=Pe,He=Pe,ce=Le}if(je===I.length)return s(O,ce),ze&&sa(O,je),de;if(ce===null){for(;je<I.length;je++)ce=K(O,I[je],Y),ce!==null&&(k=f(ce,k,je),He===null?de=ce:He.sibling=ce,He=ce);return ze&&sa(O,je),de}for(ce=l(ce);je<I.length;je++)Le=P(ce,O,je,I[je],Y),Le!==null&&(e&&Le.alternate!==null&&ce.delete(Le.key===null?je:Le.key),k=f(Le,k,je),He===null?de=Le:He.sibling=Le,He=Le);return e&&ce.forEach(function(Xa){return t(O,Xa)}),ze&&sa(O,je),de}function he(O,k,I,Y){if(I==null)throw Error(o(151));for(var de=null,He=null,ce=k,je=k=0,Le=null,Pe=I.next();ce!==null&&!Pe.done;je++,Pe=I.next()){ce.index>je?(Le=ce,ce=null):Le=ce.sibling;var Xa=z(O,ce,Pe.value,Y);if(Xa===null){ce===null&&(ce=Le);break}e&&ce&&Xa.alternate===null&&t(O,ce),k=f(Xa,k,je),He===null?de=Xa:He.sibling=Xa,He=Xa,ce=Le}if(Pe.done)return s(O,ce),ze&&sa(O,je),de;if(ce===null){for(;!Pe.done;je++,Pe=I.next())Pe=K(O,Pe.value,Y),Pe!==null&&(k=f(Pe,k,je),He===null?de=Pe:He.sibling=Pe,He=Pe);return ze&&sa(O,je),de}for(ce=l(ce);!Pe.done;je++,Pe=I.next())Pe=P(ce,O,je,Pe.value,Y),Pe!==null&&(e&&Pe.alternate!==null&&ce.delete(Pe.key===null?je:Pe.key),k=f(Pe,k,je),He===null?de=Pe:He.sibling=Pe,He=Pe);return e&&ce.forEach(function(ix){return t(O,ix)}),ze&&sa(O,je),de}function Je(O,k,I,Y){if(typeof I=="object"&&I!==null&&I.type===w&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case T:e:{for(var de=I.key;k!==null;){if(k.key===de){if(de=I.type,de===w){if(k.tag===7){s(O,k.sibling),Y=c(k,I.props.children),Y.return=O,O=Y;break e}}else if(k.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===R&&vs(de)===k.type){s(O,k.sibling),Y=c(k,I.props),al(Y,I),Y.return=O,O=Y;break e}s(O,k);break}else t(O,k);k=k.sibling}I.type===w?(Y=hs(I.props.children,O.mode,Y,I.key),Y.return=O,O=Y):(Y=To(I.type,I.key,I.props,null,O.mode,Y),al(Y,I),Y.return=O,O=Y)}return b(O);case E:e:{for(de=I.key;k!==null;){if(k.key===de)if(k.tag===4&&k.stateNode.containerInfo===I.containerInfo&&k.stateNode.implementation===I.implementation){s(O,k.sibling),Y=c(k,I.children||[]),Y.return=O,O=Y;break e}else{s(O,k);break}else t(O,k);k=k.sibling}Y=Uc(I,O.mode,Y),Y.return=O,O=Y}return b(O);case R:return I=vs(I),Je(O,k,I,Y)}if(Q(I))return se(O,k,I,Y);if(ie(I)){if(de=ie(I),typeof de!="function")throw Error(o(150));return I=de.call(I),he(O,k,I,Y)}if(typeof I.then=="function")return Je(O,k,Do(I),Y);if(I.$$typeof===M)return Je(O,k,Ao(O,I),Y);ko(O,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,k!==null&&k.tag===6?(s(O,k.sibling),Y=c(k,I),Y.return=O,O=Y):(s(O,k),Y=Ic(I,O.mode,Y),Y.return=O,O=Y),b(O)):s(O,k)}return function(O,k,I,Y){try{nl=0;var de=Je(O,k,I,Y);return si=null,de}catch(ce){if(ce===ai||ce===wo)throw ce;var He=ln(29,ce,null,O.mode);return He.lanes=Y,He.return=O,He}finally{}}}var Ss=kp(!0),Mp=kp(!1),Ra=!1;function Xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=xo(e),mp(e,null,s),t}return _o(e,l,t,s),xo(e)}function sl(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Th(e,s)}}function Jc(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Wc=!1;function il(){if(Wc){var e=ni;if(e!==null)throw e}}function ll(e,t,s,l){Wc=!1;var c=e.updateQueue;Ra=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var N=x,U=N.next;N.next=null,b===null?f=U:b.next=U,b=N;var $=e.alternate;$!==null&&($=$.updateQueue,x=$.lastBaseUpdate,x!==b&&(x===null?$.firstBaseUpdate=U:x.next=U,$.lastBaseUpdate=N))}if(f!==null){var K=c.baseState;b=0,$=U=N=null,x=f;do{var z=x.lane&-536870913,P=z!==x.lane;if(P?(Be&z)===z:(l&z)===z){z!==0&&z===ti&&(Wc=!0),$!==null&&($=$.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var se=e,he=x;z=t;var Je=s;switch(he.tag){case 1:if(se=he.payload,typeof se=="function"){K=se.call(Je,K,z);break e}K=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=he.payload,z=typeof se=="function"?se.call(Je,K,z):se,z==null)break e;K=y({},K,z);break e;case 2:Ra=!0}}z=x.callback,z!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[z]:P.push(z))}else P={lane:z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},$===null?(U=$=P,N=K):$=$.next=P,b|=z;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;P=x,x=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);$===null&&(N=K),c.baseState=N,c.firstBaseUpdate=U,c.lastBaseUpdate=$,f===null&&(c.shared.lanes=0),Va|=b,e.lanes=b,e.memoizedState=K}}function Rp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Op(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Rp(s[e],t)}var ii=tt(null),Mo=tt(0);function Bp(e,t){e=ma,fe(Mo,e),fe(ii,t),ma=e|t.baseLanes}function eu(){fe(Mo,ma),fe(ii,ii.current)}function tu(){ma=Mo.current,Me(ii),Me(Mo)}var on=tt(null),Tn=null;function La(e){var t=e.alternate;fe(bt,bt.current&1),fe(on,e),Tn===null&&(t===null||ii.current!==null||t.memoizedState!==null)&&(Tn=e)}function nu(e){fe(bt,bt.current),fe(on,e),Tn===null&&(Tn=e)}function Lp(e){e.tag===22?(fe(bt,bt.current),fe(on,e),Tn===null&&(Tn=e)):Ia()}function Ia(){fe(bt,bt.current),fe(on,on.current)}function rn(e){Me(on),Tn===e&&(Tn=null),Me(bt)}var bt=tt(0);function Ro(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||rd(s)||cd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oa=0,Ae=null,Xe=null,At=null,Oo=!1,li=!1,_s=!1,Bo=0,ol=0,oi=null,ZS=0;function ht(){throw Error(o(321))}function au(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!sn(e[s],t[s]))return!1;return!0}function su(e,t,s,l,c,f){return oa=f,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?bm:bu,_s=!1,f=s(l,c),_s=!1,li&&(f=Up(t,s,l,c)),Ip(e),f}function Ip(e){B.H=ul;var t=Xe!==null&&Xe.next!==null;if(oa=0,At=Xe=Ae=null,Oo=!1,ol=0,oi=null,t)throw Error(o(300));e===null||jt||(e=e.dependencies,e!==null&&Co(e)&&(jt=!0))}function Up(e,t,s,l){Ae=e;var c=0;do{if(li&&(oi=null),ol=0,li=!1,25<=c)throw Error(o(301));if(c+=1,At=Xe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=Sm,f=t(s,l)}while(li);return f}function XS(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?rl(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Ae.flags|=1024),t}function iu(){var e=Bo!==0;return Bo=0,e}function lu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function ou(e){if(Oo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Oo=!1}oa=0,At=Xe=Ae=null,li=!1,ol=Bo=0,oi=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Ae.memoizedState=At=e:At=At.next=e,At}function St(){if(Xe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=At===null?Ae.memoizedState:At.next;if(t!==null)At=t,Xe=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},At===null?Ae.memoizedState=At=e:At=At.next=e}return At}function Lo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rl(e){var t=ol;return ol+=1,oi===null&&(oi=[]),e=wp(oi,e,t),t=Ae,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?bm:bu),e}function Io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rl(e);if(e.$$typeof===M)return zt(e)}throw Error(o(438,String(e)))}function ru(e){var t=null,s=Ae.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ae.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Lo(),Ae.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=te;return t.index++,s}function ra(e,t){return typeof t=="function"?t(e):t}function Uo(e){var t=St();return cu(t,Xe,e)}function cu(e,t,s){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var x=b=null,N=null,U=t,$=!1;do{var K=U.lane&-536870913;if(K!==U.lane?(Be&K)===K:(oa&K)===K){var z=U.revertLane;if(z===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),K===ti&&($=!0);else if((oa&z)===z){U=U.next,z===ti&&($=!0);continue}else K={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(x=N=K,b=f):N=N.next=K,Ae.lanes|=z,Va|=z;K=U.action,_s&&s(f,K),f=U.hasEagerState?U.eagerState:s(f,K)}else z={lane:K,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},N===null?(x=N=z,b=f):N=N.next=z,Ae.lanes|=K,Va|=K;U=U.next}while(U!==null&&U!==t);if(N===null?b=f:N.next=x,!sn(f,e.memoizedState)&&(jt=!0,$&&(s=ni,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=N,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function uu(e){var t=St(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);sn(f,t.memoizedState)||(jt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function zp(e,t,s){var l=Ae,c=St(),f=ze;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!sn((Xe||c).memoizedState,s);if(b&&(c.memoizedState=s,jt=!0),c=c.queue,hu(Pp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||At!==null&&At.memoizedState.tag&1){if(l.flags|=2048,ri(9,{destroy:void 0},Hp.bind(null,l,c,s,t),null),We===null)throw Error(o(349));f||(oa&127)!==0||Vp(l,t,s)}return s}function Vp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t=Lo(),Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Hp(e,t,s,l){t.value=s,t.getSnapshot=l,Gp(t)&&Fp(e)}function Pp(e,t,s){return s(function(){Gp(t)&&Fp(e)})}function Gp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!sn(e,s)}catch{return!0}}function Fp(e){var t=fs(e,2);t!==null&&nn(t,e,2)}function du(e){var t=qt();if(typeof e=="function"){var s=e;if(e=s(),_s){kt(!0);try{s()}finally{kt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function $p(e,t,s,l){return e.baseState=s,cu(e,Xe,typeof l=="function"?l:ra)}function QS(e,t,s,l,c){if(Ho(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};B.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,qp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function qp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=B.T,b={};B.T=b;try{var x=s(c,l),N=B.S;N!==null&&N(b,x),Yp(e,t,x)}catch(U){fu(e,t,U)}finally{f!==null&&b.types!==null&&(f.types=b.types),B.T=f}}else try{f=s(c,l),Yp(e,t,f)}catch(U){fu(e,t,U)}}function Yp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Kp(e,t,l)},function(l){return fu(e,t,l)}):Kp(e,t,s)}function Kp(e,t,s){t.status="fulfilled",t.value=s,Zp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,qp(e,s)))}function fu(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,Zp(t),t=t.next;while(t!==l)}e.action=null}function Zp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xp(e,t){return t}function Qp(e,t){if(ze){var s=We.formState;if(s!==null){e:{var l=Ae;if(ze){if(nt){t:{for(var c=nt,f=xn;c.nodeType!==8;){if(!f){c=null;break t}if(c=En(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){nt=En(c.nextSibling),l=c.data==="F!";break e}}ka(l)}l=!1}l&&(t=s[0])}}return s=qt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xp,lastRenderedState:t},s.queue=l,s=gm.bind(null,Ae,l),l.dispatch=s,l=du(!1),f=vu.bind(null,Ae,!1,l.queue),l=qt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=QS.bind(null,Ae,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function Jp(e){var t=St();return Wp(t,Xe,e)}function Wp(e,t,s){if(t=cu(e,t,Xp)[0],e=Uo(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=rl(t)}catch(b){throw b===ai?wo:b}else l=t;t=St();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ae.flags|=2048,ri(9,{destroy:void 0},JS.bind(null,c,s),null)),[l,f,e]}function JS(e,t){e.action=t}function em(e){var t=St(),s=Xe;if(s!==null)return Wp(t,s,e);St(),t=t.memoizedState,s=St();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function ri(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=Lo(),Ae.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function tm(){return St().memoizedState}function zo(e,t,s,l){var c=qt();Ae.flags|=e,c.memoizedState=ri(1|t,{destroy:void 0},s,l===void 0?null:l)}function Vo(e,t,s,l){var c=St();l=l===void 0?null:l;var f=c.memoizedState.inst;Xe!==null&&l!==null&&au(l,Xe.memoizedState.deps)?c.memoizedState=ri(t,f,s,l):(Ae.flags|=e,c.memoizedState=ri(1|t,f,s,l))}function nm(e,t){zo(8390656,8,e,t)}function hu(e,t){Vo(2048,8,e,t)}function WS(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=Lo(),Ae.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function am(e){var t=St().memoizedState;return WS({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function sm(e,t){return Vo(4,2,e,t)}function im(e,t){return Vo(4,4,e,t)}function lm(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function om(e,t,s){s=s!=null?s.concat([e]):null,Vo(4,4,lm.bind(null,t,e),s)}function pu(){}function rm(e,t){var s=St();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&au(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function cm(e,t){var s=St();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&au(t,l[1]))return l[0];if(l=e(),_s){kt(!0);try{e()}finally{kt(!1)}}return s.memoizedState=[l,t],l}function mu(e,t,s){return s===void 0||(oa&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=ug(),Ae.lanes|=e,Va|=e,s)}function um(e,t,s,l){return sn(s,t)?s:ii.current!==null?(e=mu(e,s,l),sn(e,t)||(jt=!0),e):(oa&42)===0||(oa&1073741824)!==0&&(Be&261930)===0?(jt=!0,e.memoizedState=s):(e=ug(),Ae.lanes|=e,Va|=e,t)}function dm(e,t,s,l,c){var f=F.p;F.p=f!==0&&8>f?f:8;var b=B.T,x={};B.T=x,vu(e,!1,t,s);try{var N=c(),U=B.S;if(U!==null&&U(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var $=KS(N,l);cl(e,t,$,dn(e))}else cl(e,t,l,dn(e))}catch(K){cl(e,t,{then:function(){},status:"rejected",reason:K},dn())}finally{F.p=f,b!==null&&x.types!==null&&(b.types=x.types),B.T=b}}function e_(){}function gu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=fm(e).queue;dm(e,c,t,W,s===null?e_:function(){return hm(e),s(l)})}function fm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:W},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hm(e){var t=fm(e);t.next===null&&(t=e.alternate.memoizedState),cl(e,t.next.queue,{},dn())}function yu(){return zt(Al)}function pm(){return St().memoizedState}function mm(){return St().memoizedState}function t_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=dn();e=Oa(s);var l=Ba(t,e,s);l!==null&&(nn(l,t,s),sl(l,t,s)),t={cache:qc()},e.payload=t;return}t=t.return}}function n_(e,t,s){var l=dn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ho(e)?ym(t,s):(s=Bc(e,t,s,l),s!==null&&(nn(s,e,l),vm(s,t,l)))}function gm(e,t,s){var l=dn();cl(e,t,s,l)}function cl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Ho(e))ym(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,x=f(b,s);if(c.hasEagerState=!0,c.eagerState=x,sn(x,b))return _o(e,t,c,0),We===null&&So(),!1}catch{}finally{}if(s=Bc(e,t,c,l),s!==null)return nn(s,e,l),vm(s,t,l),!0}return!1}function vu(e,t,s,l){if(l={lane:2,revertLane:Xu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ho(e)){if(t)throw Error(o(479))}else t=Bc(e,s,l,2),t!==null&&nn(t,e,2)}function Ho(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function ym(e,t){li=Oo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function vm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Th(e,s)}}var ul={readContext:zt,use:Io,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};ul.useEffectEvent=ht;var bm={readContext:zt,use:Io,useCallback:function(e,t){return qt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:nm,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,zo(4194308,4,lm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return zo(4194308,4,e,t)},useInsertionEffect:function(e,t){zo(4,2,e,t)},useMemo:function(e,t){var s=qt();t=t===void 0?null:t;var l=e();if(_s){kt(!0);try{e()}finally{kt(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=qt();if(s!==void 0){var c=s(t);if(_s){kt(!0);try{s(t)}finally{kt(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=n_.bind(null,Ae,e),[l.memoizedState,e]},useRef:function(e){var t=qt();return e={current:e},t.memoizedState=e},useState:function(e){e=du(e);var t=e.queue,s=gm.bind(null,Ae,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:pu,useDeferredValue:function(e,t){var s=qt();return mu(s,e,t)},useTransition:function(){var e=du(!1);return e=dm.bind(null,Ae,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ae,c=qt();if(ze){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),We===null)throw Error(o(349));(Be&127)!==0||Vp(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,nm(Pp.bind(null,l,f,e),[e]),l.flags|=2048,ri(9,{destroy:void 0},Hp.bind(null,l,f,s,t),null),s},useId:function(){var e=qt(),t=We.identifierPrefix;if(ze){var s=Hn,l=Vn;s=(l&~(1<<32-Se(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Bo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=ZS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yu,useFormState:Qp,useActionState:Qp,useOptimistic:function(e){var t=qt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=vu.bind(null,Ae,!0,s),s.dispatch=t,[e,t]},useMemoCache:ru,useCacheRefresh:function(){return qt().memoizedState=t_.bind(null,Ae)},useEffectEvent:function(e){var t=qt(),s={impl:e};return t.memoizedState=s,function(){if((Fe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},bu={readContext:zt,use:Io,useCallback:rm,useContext:zt,useEffect:hu,useImperativeHandle:om,useInsertionEffect:sm,useLayoutEffect:im,useMemo:cm,useReducer:Uo,useRef:tm,useState:function(){return Uo(ra)},useDebugValue:pu,useDeferredValue:function(e,t){var s=St();return um(s,Xe.memoizedState,e,t)},useTransition:function(){var e=Uo(ra)[0],t=St().memoizedState;return[typeof e=="boolean"?e:rl(e),t]},useSyncExternalStore:zp,useId:pm,useHostTransitionStatus:yu,useFormState:Jp,useActionState:Jp,useOptimistic:function(e,t){var s=St();return $p(s,Xe,e,t)},useMemoCache:ru,useCacheRefresh:mm};bu.useEffectEvent=am;var Sm={readContext:zt,use:Io,useCallback:rm,useContext:zt,useEffect:hu,useImperativeHandle:om,useInsertionEffect:sm,useLayoutEffect:im,useMemo:cm,useReducer:uu,useRef:tm,useState:function(){return uu(ra)},useDebugValue:pu,useDeferredValue:function(e,t){var s=St();return Xe===null?mu(s,e,t):um(s,Xe.memoizedState,e,t)},useTransition:function(){var e=uu(ra)[0],t=St().memoizedState;return[typeof e=="boolean"?e:rl(e),t]},useSyncExternalStore:zp,useId:pm,useHostTransitionStatus:yu,useFormState:em,useActionState:em,useOptimistic:function(e,t){var s=St();return Xe!==null?$p(s,Xe,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ru,useCacheRefresh:mm};Sm.useEffectEvent=am;function Su(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:y({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var _u={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=dn(),c=Oa(l);c.payload=t,s!=null&&(c.callback=s),t=Ba(e,c,l),t!==null&&(nn(t,e,l),sl(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=dn(),c=Oa(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=Ba(e,c,l),t!==null&&(nn(t,e,l),sl(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=dn(),l=Oa(s);l.tag=2,t!=null&&(l.callback=t),t=Ba(e,l,s),t!==null&&(nn(t,e,s),sl(t,e,s))}};function _m(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Xi(s,l)||!Xi(c,f):!0}function xm(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&_u.enqueueReplaceState(t,t.state,null)}function xs(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=y({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Tm(e){bo(e)}function Em(e){console.error(e)}function Cm(e){bo(e)}function Po(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Am(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function xu(e,t,s){return s=Oa(s),s.tag=3,s.payload={element:null},s.callback=function(){Po(e,t)},s}function jm(e){return e=Oa(e),e.tag=3,e}function wm(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Am(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Am(t,s,l),typeof c!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function a_(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&ei(t,s,c,!0),s=on.current,s!==null){switch(s.tag){case 31:case 13:return Tn===null?er():s.alternate===null&&pt===0&&(pt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===No?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Yu(e,l,c)),!1;case 22:return s.flags|=65536,l===No?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),Yu(e,l,c)),!1}throw Error(o(435,s.tag))}return Yu(e,l,c),er(),!1}if(ze)return t=on.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Hc&&(e=Error(o(422),{cause:l}),Wi(bn(e,s)))):(l!==Hc&&(t=Error(o(423),{cause:l}),Wi(bn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=bn(l,s),c=xu(e.stateNode,l,c),Jc(e,c),pt!==4&&(pt=2)),!1;var f=Error(o(520),{cause:l});if(f=bn(f,s),vl===null?vl=[f]:vl.push(f),pt!==4&&(pt=2),t===null)return!0;l=bn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=xu(s.stateNode,l,e),Jc(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ha===null||!Ha.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=jm(c),wm(c,e,s,l),Jc(s,c),!1}s=s.return}while(s!==null);return!1}var Tu=Error(o(461)),jt=!1;function Vt(e,t,s,l){t.child=e===null?Mp(t,null,s,l):Ss(t,e.child,s,l)}function Nm(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var x in l)x!=="ref"&&(b[x]=l[x])}else b=l;return gs(t),l=su(e,t,s,b,f,c),x=iu(),e!==null&&!jt?(lu(e,t,c),ca(e,t,c)):(ze&&x&&zc(t),t.flags|=1,Vt(e,t,l,c),t.child)}function Dm(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Lc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,km(e,t,f,l,c)):(e=To(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!ku(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Xi,s(b,l)&&e.ref===t.ref)return ca(e,t,c)}return t.flags|=1,e=aa(f,l),e.ref=t.ref,e.return=t,t.child=e}function km(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Xi(f,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=f,ku(e,c))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,ca(e,t,c)}return Eu(e,t,s,l,c)}function Mm(e,t,s,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return Rm(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&jo(t,f!==null?f.cachePool:null),f!==null?Bp(t,f):eu(),Lp(t);else return l=t.lanes=536870912,Rm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(jo(t,f.cachePool),Bp(t,f),Ia(),t.memoizedState=null):(e!==null&&jo(t,null),eu(),Ia());return Vt(e,t,c,s),t.child}function dl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rm(e,t,s,l,c){var f=Kc();return f=f===null?null:{parent:Ct._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&jo(t,null),eu(),Lp(t),e!==null&&ei(e,t,l,!0),t.childLanes=c,null}function Go(e,t){return t=$o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Om(e,t,s){return Ss(t,e.child,null,s),e=Go(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function s_(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(l.mode==="hidden")return e=Go(t,l),t.lanes=536870912,dl(null,e);if(nu(t),(e=nt)?(e=qg(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Vn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},s=yp(e),s.return=t,t.child=s,Ut=t,nt=null)):e=null,e===null)throw ka(t);return t.lanes=536870912,null}return Go(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(nu(t),c)if(t.flags&256)t.flags&=-257,t=Om(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(jt||ei(e,t,s,!1),c=(s&e.childLanes)!==0,jt||c){if(l=We,l!==null&&(b=Eh(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,fs(e,b),nn(l,e,b),Tu;er(),t=Om(e,t,s)}else e=f.treeContext,nt=En(b.nextSibling),Ut=t,ze=!0,Da=null,xn=!1,e!==null&&Sp(t,e),t=Go(t,l),t.flags|=4096;return t}return e=aa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Fo(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Eu(e,t,s,l,c){return gs(t),s=su(e,t,s,l,void 0,c),l=iu(),e!==null&&!jt?(lu(e,t,c),ca(e,t,c)):(ze&&l&&zc(t),t.flags|=1,Vt(e,t,s,c),t.child)}function Bm(e,t,s,l,c,f){return gs(t),t.updateQueue=null,s=Up(t,l,s,c),Ip(e),l=iu(),e!==null&&!jt?(lu(e,t,f),ca(e,t,f)):(ze&&l&&zc(t),t.flags|=1,Vt(e,t,s,f),t.child)}function Lm(e,t,s,l,c){if(gs(t),t.stateNode===null){var f=Xs,b=s.contextType;typeof b=="object"&&b!==null&&(f=zt(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=_u,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Xc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?zt(b):Xs,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Su(t,s,b,l),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&_u.enqueueReplaceState(f,f.state,null),ll(t,l,f,c),il(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,N=xs(s,x);f.props=N;var U=f.context,$=s.contextType;b=Xs,typeof $=="object"&&$!==null&&(b=zt($));var K=s.getDerivedStateFromProps;$=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||U!==b)&&xm(t,f,l,b),Ra=!1;var z=t.memoizedState;f.state=z,ll(t,l,f,c),il(),U=t.memoizedState,x||z!==U||Ra?(typeof K=="function"&&(Su(t,s,K,l),U=t.memoizedState),(N=Ra||_m(t,s,N,l,z,U,b))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=U),f.props=l,f.state=U,f.context=b,l=N):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Qc(e,t),b=t.memoizedProps,$=xs(s,b),f.props=$,K=t.pendingProps,z=f.context,U=s.contextType,N=Xs,typeof U=="object"&&U!==null&&(N=zt(U)),x=s.getDerivedStateFromProps,(U=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==K||z!==N)&&xm(t,f,l,N),Ra=!1,z=t.memoizedState,f.state=z,ll(t,l,f,c),il();var P=t.memoizedState;b!==K||z!==P||Ra||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof x=="function"&&(Su(t,s,x,l),P=t.memoizedState),($=Ra||_m(t,s,$,l,z,P,N)||e!==null&&e.dependencies!==null&&Co(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,N),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,N)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),f.props=l,f.state=P,f.context=N,l=$):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,Fo(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=Ss(t,e.child,null,c),t.child=Ss(t,null,s,c)):Vt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=ca(e,t,c),e}function Im(e,t,s,l){return ps(),t.flags|=256,Vt(e,t,s,l),t.child}var Cu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Au(e){return{baseLanes:e,cachePool:Ap()}}function ju(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=un),e}function Um(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(c?La(t):Ia(),(e=nt)?(e=qg(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Na!==null?{id:Vn,overflow:Hn}:null,retryLane:536870912,hydrationErrors:null},s=yp(e),s.return=t,t.child=s,Ut=t,nt=null)):e=null,e===null)throw ka(t);return cd(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,c?(Ia(),c=t.mode,x=$o({mode:"hidden",children:x},c),l=hs(l,c,s,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=Au(s),l.childLanes=ju(e,b,s),t.memoizedState=Cu,dl(null,l)):(La(t),wu(t,x))}var N=e.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(f)t.flags&256?(La(t),t.flags&=-257,t=Nu(e,t,s)):t.memoizedState!==null?(Ia(),t.child=e.child,t.flags|=128,t=null):(Ia(),x=l.fallback,c=t.mode,l=$o({mode:"visible",children:l.children},c),x=hs(x,c,s,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,Ss(t,e.child,null,s),l=t.child,l.memoizedState=Au(s),l.childLanes=ju(e,b,s),t.memoizedState=Cu,t=dl(null,l));else if(La(t),cd(x)){if(b=x.nextSibling&&x.nextSibling.dataset,b)var U=b.dgst;b=U,l=Error(o(419)),l.stack="",l.digest=b,Wi({value:l,source:null,stack:null}),t=Nu(e,t,s)}else if(jt||ei(e,t,s,!1),b=(s&e.childLanes)!==0,jt||b){if(b=We,b!==null&&(l=Eh(b,s),l!==0&&l!==N.retryLane))throw N.retryLane=l,fs(e,l),nn(b,e,l),Tu;rd(x)||er(),t=Nu(e,t,s)}else rd(x)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,nt=En(x.nextSibling),Ut=t,ze=!0,Da=null,xn=!1,e!==null&&Sp(t,e),t=wu(t,l.children),t.flags|=4096);return t}return c?(Ia(),x=l.fallback,c=t.mode,N=e.child,U=N.sibling,l=aa(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,U!==null?x=aa(U,x):(x=hs(x,c,s,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,dl(null,l),l=t.child,x=e.child.memoizedState,x===null?x=Au(s):(c=x.cachePool,c!==null?(N=Ct._currentValue,c=c.parent!==N?{parent:N,pool:N}:c):c=Ap(),x={baseLanes:x.baseLanes|s,cachePool:c}),l.memoizedState=x,l.childLanes=ju(e,b,s),t.memoizedState=Cu,dl(e.child,l)):(La(t),s=e.child,e=s.sibling,s=aa(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=s,t.memoizedState=null,s)}function wu(e,t){return t=$o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $o(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function Nu(e,t,s){return Ss(t,e.child,null,s),e=wu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Fc(e.return,t,s)}function Du(e,t,s,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=c,b.treeForkCount=f)}function Vm(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=bt.current,x=(b&2)!==0;if(x?(b=b&1|2,t.flags|=128):b&=1,fe(bt,b),Vt(e,t,l,s),l=ze?Ji:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zm(e,s,t);else if(e.tag===19)zm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Ro(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Du(t,!1,c,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ro(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Du(t,!0,s,null,f,l);break;case"together":Du(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function ca(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Va|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ei(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=aa(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=aa(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function ku(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function i_(e,t,s){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),Ma(t,Ct,e.memoizedState.cache),ps();break;case 27:case 5:ut(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(La(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Um(e,t,s):(La(t),e=ca(e,t,s),e!==null?e.sibling:null);La(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(ei(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Vm(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),fe(bt,bt.current),l)break;return null;case 22:return t.lanes=0,Mm(e,t,s,t.pendingProps);case 24:Ma(t,Ct,e.memoizedState.cache)}return ca(e,t,s)}function Hm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!ku(e,s)&&(t.flags&128)===0)return jt=!1,i_(e,t,s);jt=(e.flags&131072)!==0}else jt=!1,ze&&(t.flags&1048576)!==0&&bp(t,Ji,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=vs(t.elementType),t.type=e,typeof e=="function")Lc(e)?(l=xs(e,l),t.tag=1,t=Lm(null,t,e,l,s)):(t.tag=0,t=Eu(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===V){t.tag=11,t=Nm(null,t,e,l,s);break e}else if(c===H){t.tag=14,t=Dm(null,t,e,l,s);break e}}throw t=q(e)||e,Error(o(306,t,""))}}return t;case 0:return Eu(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=xs(l,t.pendingProps),Lm(e,t,l,c,s);case 3:e:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Qc(e,t),ll(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Ma(t,Ct,l),l!==f.cache&&$c(t,[Ct],s,!0),il(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Im(e,t,l,s);break e}else if(l!==c){c=bn(Error(o(424)),t),Wi(c),t=Im(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=En(e.firstChild),Ut=t,ze=!0,Da=null,xn=!0,s=Mp(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ps(),l===c){t=ca(e,t,s);break e}Vt(e,t,l,s)}t=t.child}return t;case 26:return Fo(e,t),e===null?(s=Jg(t.type,null,t.pendingProps,null))?t.memoizedState=s:ze||(s=t.type,e=t.pendingProps,l=or(ee.current).createElement(s),l[It]=t,l[Xt]=e,Ht(l,s,e),Ot(l),t.stateNode=l):t.memoizedState=Jg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ut(t),e===null&&ze&&(l=t.stateNode=Zg(t.type,t.pendingProps,ee.current),Ut=t,xn=!0,c=nt,$a(t.type)?(ud=c,nt=En(l.firstChild)):nt=c),Vt(e,t,t.pendingProps.children,s),Fo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((c=l=nt)&&(l=B_(l,t.type,t.pendingProps,xn),l!==null?(t.stateNode=l,Ut=t,nt=En(l.firstChild),xn=!1,c=!0):c=!1),c||ka(t)),ut(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,id(c,f)?l=null:b!==null&&id(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=su(e,t,XS,null,null,s),Al._currentValue=c),Fo(e,t),Vt(e,t,l,s),t.child;case 6:return e===null&&ze&&((e=s=nt)&&(s=L_(s,t.pendingProps,xn),s!==null?(t.stateNode=s,Ut=t,nt=null,e=!0):e=!1),e||ka(t)),null;case 13:return Um(e,t,s);case 4:return we(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ss(t,null,l,s):Vt(e,t,l,s),t.child;case 11:return Nm(e,t,t.type,t.pendingProps,s);case 7:return Vt(e,t,t.pendingProps,s),t.child;case 8:return Vt(e,t,t.pendingProps.children,s),t.child;case 12:return Vt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ma(t,t.type,l.value),Vt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,gs(t),c=zt(c),l=l(c),t.flags|=1,Vt(e,t,l,s),t.child;case 14:return Dm(e,t,t.type,t.pendingProps,s);case 15:return km(e,t,t.type,t.pendingProps,s);case 19:return Vm(e,t,s);case 31:return s_(e,t,s);case 22:return Mm(e,t,s,t.pendingProps);case 24:return gs(t),l=zt(Ct),e===null?(c=Kc(),c===null&&(c=We,f=qc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Xc(t),Ma(t,Ct,c)):((e.lanes&s)!==0&&(Qc(e,t),ll(t,null,null,s),il()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ma(t,Ct,l)):(l=f.cache,Ma(t,Ct,l),l!==c.cache&&$c(t,[Ct],s,!0))),Vt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ua(e){e.flags|=4}function Mu(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(pg())e.flags|=8192;else throw bs=No,Zc}else e.flags&=-16777217}function Pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ay(t))if(pg())e.flags|=8192;else throw bs=No,Zc}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_h():536870912,e.lanes|=t,fi|=t)}function fl(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function at(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function l_(e,t,s){var l=t.pendingProps;switch(Vc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return at(t),null;case 1:return at(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),la(Ct),_e(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?ua(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),at(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(ua(t),f!==null?(at(t),Pm(t,f)):(at(t),Mu(t,c,null,l,s))):f?f!==e.memoizedState?(ua(t),at(t),Pm(t,f)):(at(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ua(t),at(t),Mu(t,c,e,l,s)),null;case 27:if(dt(t),s=ee.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return at(t),null}e=Ie.current,Ws(t)?_p(t):(e=Zg(c,l,s),t.stateNode=e,ua(t))}return at(t),null;case 5:if(dt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return at(t),null}if(f=Ie.current,Ws(t))_p(t);else{var b=or(ee.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[It]=t,f[Xt]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Ht(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ua(t)}}return at(t),Mu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ua(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,Ws(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Ut,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[It]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Ug(e.nodeValue,s)),e||ka(t,!0)}else e=or(e).createTextNode(l),e[It]=t,t.stateNode=e}return at(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ws(t),s!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[It]=t}else ps(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),e=!1}else s=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return at(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ws(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[It]=t}else ps(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;at(t),c=!1}else c=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),qo(t,t.updateQueue),at(t),null);case 4:return _e(),e===null&&ed(t.stateNode.containerInfo),at(t),null;case 10:return la(t.type),at(t),null;case 19:if(Me(bt),l=t.memoizedState,l===null)return at(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)fl(l,!1);else{if(pt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ro(e),f!==null){for(t.flags|=128,fl(l,!1),e=f.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)gp(s,e),s=s.sibling;return fe(bt,bt.current&1|2),ze&&sa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&J()>Qo&&(t.flags|=128,c=!0,fl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Ro(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),fl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!ze)return at(t),null}else 2*J()-l.renderingStartTime>Qo&&s!==536870912&&(t.flags|=128,c=!0,fl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=J(),e.sibling=null,s=bt.current,fe(bt,c?s&1|2:s&1),ze&&sa(t,l.treeForkCount),e):(at(t),null);case 22:case 23:return rn(t),tu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(at(t),t.subtreeFlags&6&&(t.flags|=8192)):at(t),s=t.updateQueue,s!==null&&qo(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&Me(ys),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),la(Ct),at(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function o_(e,t){switch(Vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(Ct),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return dt(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(o(340));ps()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ps()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(bt),null;case 4:return _e(),null;case 10:return la(t.type),null;case 22:case 23:return rn(t),tu(),e!==null&&Me(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(Ct),null;case 25:return null;default:return null}}function Gm(e,t){switch(Vc(t),t.tag){case 3:la(Ct),_e();break;case 26:case 27:case 5:dt(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:Me(bt);break;case 10:la(t.type);break;case 22:case 23:rn(t),tu(),e!==null&&Me(ys);break;case 24:la(Ct)}}function hl(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(x){Ze(t,t.return,x)}}function Ua(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,c=t;var N=s,U=x;try{U()}catch($){Ze(c,N,$)}}}l=l.next}while(l!==f)}}catch($){Ze(t,t.return,$)}}function Fm(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Op(t,s)}catch(l){Ze(e,e.return,l)}}}function $m(e,t,s){s.props=xs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Ze(e,t,l)}}function pl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){Ze(e,t,c)}}function Pn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){Ze(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Ze(e,t,c)}else s.current=null}function qm(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){Ze(e,e.return,c)}}function Ru(e,t,s){try{var l=e.stateNode;N_(l,e.type,s,t),l[Xt]=t}catch(c){Ze(e,e.return,c)}}function Ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$a(e.type)||e.tag===4}function Ou(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ym(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$a(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bu(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=ta));else if(l!==4&&(l===27&&$a(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Bu(e,t,s),e=e.sibling;e!==null;)Bu(e,t,s),e=e.sibling}function Yo(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&$a(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Yo(e,t,s),e=e.sibling;e!==null;)Yo(e,t,s),e=e.sibling}function Km(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ht(t,l,s),t[It]=e,t[Xt]=s}catch(f){Ze(e,e.return,f)}}var da=!1,wt=!1,Lu=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,Bt=null;function r_(e,t){if(e=e.containerInfo,ad=pr,e=op(e),Nc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var b=0,x=-1,N=-1,U=0,$=0,K=e,z=null;t:for(;;){for(var P;K!==s||c!==0&&K.nodeType!==3||(x=b+c),K!==f||l!==0&&K.nodeType!==3||(N=b+l),K.nodeType===3&&(b+=K.nodeValue.length),(P=K.firstChild)!==null;)z=K,K=P;for(;;){if(K===e)break t;if(z===s&&++U===c&&(x=b),z===f&&++$===l&&(N=b),(P=K.nextSibling)!==null)break;K=z,z=K.parentNode}K=P}s=x===-1||N===-1?null:{start:x,end:N}}else s=null}s=s||{start:0,end:0}}else s=null;for(sd={focusedElem:e,selectionRange:s},pr=!1,Bt=t;Bt!==null;)if(t=Bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Bt=e;else for(;Bt!==null;){switch(t=Bt,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var se=xs(s.type,c);e=l.getSnapshotBeforeUpdate(se,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){Ze(s,s.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)od(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":od(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Bt=e;break}Bt=t.return}}function Xm(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:ha(e,s),l&4&&hl(5,s);break;case 1:if(ha(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var c=xs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}l&64&&Fm(s),l&512&&pl(s,s.return);break;case 3:if(ha(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{Op(e,t)}catch(b){Ze(s,s.return,b)}}break;case 27:t===null&&l&4&&Km(s);case 26:case 5:ha(e,s),t===null&&l&4&&qm(s),l&512&&pl(s,s.return);break;case 12:ha(e,s);break;case 31:ha(e,s),l&4&&Wm(e,s);break;case 13:ha(e,s),l&4&&eg(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=y_.bind(null,s),I_(e,s))));break;case 22:if(l=s.memoizedState!==null||da,!l){t=t!==null&&t.memoizedState!==null||wt,c=da;var f=wt;da=l,(wt=t)&&!f?pa(e,s,(s.subtreeFlags&8772)!==0):ha(e,s),da=c,wt=f}break;case 30:break;default:ha(e,s)}}function Qm(e){var t=e.alternate;t!==null&&(e.alternate=null,Qm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var lt=null,Jt=!1;function fa(e,t,s){for(s=s.child;s!==null;)Jm(e,t,s),s=s.sibling}function Jm(e,t,s){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount(vt,s)}catch{}switch(s.tag){case 26:wt||Pn(s,t),fa(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:wt||Pn(s,t);var l=lt,c=Jt;$a(s.type)&&(lt=s.stateNode,Jt=!1),fa(e,t,s),Tl(s.stateNode),lt=l,Jt=c;break;case 5:wt||Pn(s,t);case 6:if(l=lt,c=Jt,lt=null,fa(e,t,s),lt=l,Jt=c,lt!==null)if(Jt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(s.stateNode)}catch(f){Ze(s,t,f)}else try{lt.removeChild(s.stateNode)}catch(f){Ze(s,t,f)}break;case 18:lt!==null&&(Jt?(e=lt,Fg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Si(e)):Fg(lt,s.stateNode));break;case 4:l=lt,c=Jt,lt=s.stateNode.containerInfo,Jt=!0,fa(e,t,s),lt=l,Jt=c;break;case 0:case 11:case 14:case 15:Ua(2,s,t),wt||Ua(4,s,t),fa(e,t,s);break;case 1:wt||(Pn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&$m(s,t,l)),fa(e,t,s);break;case 21:fa(e,t,s);break;case 22:wt=(l=wt)||s.memoizedState!==null,fa(e,t,s),wt=l;break;default:fa(e,t,s)}}function Wm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Si(e)}catch(s){Ze(t,t.return,s)}}}function eg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Si(e)}catch(s){Ze(t,t.return,s)}}function c_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zm),t;default:throw Error(o(435,e.tag))}}function Ko(e,t){var s=c_(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=v_.bind(null,e,l);l.then(c,c)}})}function Wt(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],f=e,b=t,x=b;e:for(;x!==null;){switch(x.tag){case 27:if($a(x.type)){lt=x.stateNode,Jt=!1;break e}break;case 5:lt=x.stateNode,Jt=!1;break e;case 3:case 4:lt=x.stateNode.containerInfo,Jt=!0;break e}x=x.return}if(lt===null)throw Error(o(160));Jm(f,b,c),lt=null,Jt=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)tg(t,e),t=t.sibling}var Bn=null;function tg(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),en(e),l&4&&(Ua(3,e,e.return),hl(3,e),Ua(5,e,e.return));break;case 1:Wt(t,e),en(e),l&512&&(wt||s===null||Pn(s,s.return)),l&64&&da&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=Bn;if(Wt(t,e),en(e),l&512&&(wt||s===null||Pn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Hi]||f[It]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Ht(f,l,s),f[It]=e,Ot(f),l=f;break e;case"link":var b=ty("link","href",c).get(l+(s.href||""));if(b){for(var x=0;x<b.length;x++)if(f=b[x],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(x,1);break t}}f=c.createElement(l),Ht(f,l,s),c.head.appendChild(f);break;case"meta":if(b=ty("meta","content",c).get(l+(s.content||""))){for(x=0;x<b.length;x++)if(f=b[x],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(x,1);break t}}f=c.createElement(l),Ht(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[It]=e,Ot(f),l=f}e.stateNode=l}else ny(c,e.type,e.stateNode);else e.stateNode=ey(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?ny(c,e.type,e.stateNode):ey(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ru(e,e.memoizedProps,s.memoizedProps)}break;case 27:Wt(t,e),en(e),l&512&&(wt||s===null||Pn(s,s.return)),s!==null&&l&4&&Ru(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Wt(t,e),en(e),l&512&&(wt||s===null||Pn(s,s.return)),e.flags&32){c=e.stateNode;try{Gs(c,"")}catch(se){Ze(e,e.return,se)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Ru(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Lu=!0);break;case 6:if(Wt(t,e),en(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(se){Ze(e,e.return,se)}}break;case 3:if(ur=null,c=Bn,Bn=rr(t.containerInfo),Wt(t,e),Bn=c,en(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(se){Ze(e,e.return,se)}Lu&&(Lu=!1,ng(e));break;case 4:l=Bn,Bn=rr(e.stateNode.containerInfo),Wt(t,e),en(e),Bn=l;break;case 12:Wt(t,e),en(e);break;case 31:Wt(t,e),en(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 13:Wt(t,e),en(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Xo=J()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 22:c=e.memoizedState!==null;var N=s!==null&&s.memoizedState!==null,U=da,$=wt;if(da=U||c,wt=$||N,Wt(t,e),wt=$,da=U,en(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||N||da||wt||Ts(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){N=s=t;try{if(f=N.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{x=N.stateNode;var K=N.memoizedProps.style,z=K!=null&&K.hasOwnProperty("display")?K.display:null;x.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(se){Ze(N,N.return,se)}}}else if(t.tag===6){if(s===null){N=t;try{N.stateNode.nodeValue=c?"":N.memoizedProps}catch(se){Ze(N,N.return,se)}}}else if(t.tag===18){if(s===null){N=t;try{var P=N.stateNode;c?$g(P,!0):$g(N.stateNode,!1)}catch(se){Ze(N,N.return,se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Ko(e,s))));break;case 19:Wt(t,e),en(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Ko(e,l)));break;case 30:break;case 21:break;default:Wt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Ym(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Ou(e);Yo(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Gs(b,""),s.flags&=-33);var x=Ou(e);Yo(e,x,b);break;case 3:case 4:var N=s.stateNode.containerInfo,U=Ou(e);Bu(e,U,N);break;default:throw Error(o(161))}}catch($){Ze(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ng(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ng(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ha(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Xm(e,t.alternate,t),t=t.sibling}function Ts(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ua(4,t,t.return),Ts(t);break;case 1:Pn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&$m(t,t.return,s),Ts(t);break;case 27:Tl(t.stateNode);case 26:case 5:Pn(t,t.return),Ts(t);break;case 22:t.memoizedState===null&&Ts(t);break;case 30:Ts(t);break;default:Ts(t)}e=e.sibling}}function pa(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:pa(c,f,s),hl(4,f);break;case 1:if(pa(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Ze(l,l.return,U)}if(l=f,c=l.updateQueue,c!==null){var x=l.stateNode;try{var N=c.shared.hiddenCallbacks;if(N!==null)for(c.shared.hiddenCallbacks=null,c=0;c<N.length;c++)Rp(N[c],x)}catch(U){Ze(l,l.return,U)}}s&&b&64&&Fm(f),pl(f,f.return);break;case 27:Km(f);case 26:case 5:pa(c,f,s),s&&l===null&&b&4&&qm(f),pl(f,f.return);break;case 12:pa(c,f,s);break;case 31:pa(c,f,s),s&&b&4&&Wm(c,f);break;case 13:pa(c,f,s),s&&b&4&&eg(c,f);break;case 22:f.memoizedState===null&&pa(c,f,s),pl(f,f.return);break;case 30:break;default:pa(c,f,s)}t=t.sibling}}function Iu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&el(s))}function Uu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e))}function Ln(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ag(e,t,s,l),t=t.sibling}function ag(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Ln(e,t,s,l),c&2048&&hl(9,t);break;case 1:Ln(e,t,s,l);break;case 3:Ln(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&el(e)));break;case 12:if(c&2048){Ln(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,x=f.onPostCommit;typeof x=="function"&&x(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ze(t,t.return,N)}}else Ln(e,t,s,l);break;case 31:Ln(e,t,s,l);break;case 13:Ln(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Ln(e,t,s,l):ml(e,t):f._visibility&2?Ln(e,t,s,l):(f._visibility|=2,ci(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Iu(b,t);break;case 24:Ln(e,t,s,l),c&2048&&Uu(t.alternate,t);break;default:Ln(e,t,s,l)}}function ci(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,x=s,N=l,U=b.flags;switch(b.tag){case 0:case 11:case 15:ci(f,b,x,N,c),hl(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?ci(f,b,x,N,c):ml(f,b):($._visibility|=2,ci(f,b,x,N,c)),c&&U&2048&&Iu(b.alternate,b);break;case 24:ci(f,b,x,N,c),c&&U&2048&&Uu(b.alternate,b);break;default:ci(f,b,x,N,c)}t=t.sibling}}function ml(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:ml(s,l),c&2048&&Iu(l.alternate,l);break;case 24:ml(s,l),c&2048&&Uu(l.alternate,l);break;default:ml(s,l)}t=t.sibling}}var gl=8192;function ui(e,t,s){if(e.subtreeFlags&gl)for(e=e.child;e!==null;)sg(e,t,s),e=e.sibling}function sg(e,t,s){switch(e.tag){case 26:ui(e,t,s),e.flags&gl&&e.memoizedState!==null&&Z_(s,Bn,e.memoizedState,e.memoizedProps);break;case 5:ui(e,t,s);break;case 3:case 4:var l=Bn;Bn=rr(e.stateNode.containerInfo),ui(e,t,s),Bn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=gl,gl=16777216,ui(e,t,s),gl=l):ui(e,t,s));break;default:ui(e,t,s)}}function ig(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Bt=l,og(l,e)}ig(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lg(e),e=e.sibling}function lg(e){switch(e.tag){case 0:case 11:case 15:yl(e),e.flags&2048&&Ua(9,e,e.return);break;case 3:yl(e);break;case 12:yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zo(e)):yl(e);break;default:yl(e)}}function Zo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Bt=l,og(l,e)}ig(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ua(8,t,t.return),Zo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Zo(t));break;default:Zo(t)}e=e.sibling}}function og(e,t){for(;Bt!==null;){var s=Bt;switch(s.tag){case 0:case 11:case 15:Ua(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:el(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Bt=l;else e:for(s=e;Bt!==null;){l=Bt;var c=l.sibling,f=l.return;if(Qm(l),l===s){Bt=null;break e}if(c!==null){c.return=f,Bt=c;break e}Bt=f}}}var u_={getCacheForType:function(e){var t=zt(Ct),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return zt(Ct).controller.signal}},d_=typeof WeakMap=="function"?WeakMap:Map,Fe=0,We=null,De=null,Be=0,Ke=0,cn=null,za=!1,di=!1,zu=!1,ma=0,pt=0,Va=0,Es=0,Vu=0,un=0,fi=0,vl=null,tn=null,Hu=!1,Xo=0,rg=0,Qo=1/0,Jo=null,Ha=null,Mt=0,Pa=null,hi=null,ga=0,Pu=0,Gu=null,cg=null,bl=0,Fu=null;function dn(){return(Fe&2)!==0&&Be!==0?Be&-Be:B.T!==null?Xu():Ch()}function ug(){if(un===0)if((Be&536870912)===0||ze){var e=Rn;Rn<<=1,(Rn&3932160)===0&&(Rn=262144),un=e}else un=536870912;return e=on.current,e!==null&&(e.flags|=32),un}function nn(e,t,s){(e===We&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(pi(e,0),Ga(e,Be,un,!1)),Vi(e,s),((Fe&2)===0||e!==We)&&(e===We&&((Fe&2)===0&&(Es|=s),pt===4&&Ga(e,Be,un,!1)),Gn(e))}function dg(e,t,s){if((Fe&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||zi(e,t),c=l?p_(e,t):qu(e,t,!0),f=l;do{if(c===0){di&&!l&&Ga(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!f_(s)){c=qu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var x=e;c=vl;var N=x.current.memoizedState.isDehydrated;if(N&&(pi(x,b).flags|=256),b=qu(x,b,!1),b!==2){if(zu&&!N){x.errorRecoveryDisabledLanes|=f,Es|=f,c=4;break e}f=tn,tn=c,f!==null&&(tn===null?tn=f:tn.push.apply(tn,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){pi(e,0),Ga(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ga(l,t,un,!za);break e;case 2:tn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Xo+300-J(),10<c)){if(Ga(l,t,un,!za),oo(l,0,!0)!==0)break e;ga=t,l.timeoutHandle=Pg(fg.bind(null,l,s,tn,Jo,Hu,t,un,Es,fi,za,f,"Throttled",-0,0),c);break e}fg(l,s,tn,Jo,Hu,t,un,Es,fi,za,f,null,-0,0)}}break}while(!0);Gn(e)}function fg(e,t,s,l,c,f,b,x,N,U,$,K,z,P){if(e.timeoutHandle=-1,K=t.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},sg(t,f,K);var se=(f&62914560)===f?Xo-J():(f&4194048)===f?rg-J():0;if(se=X_(K,se),se!==null){ga=f,e.cancelPendingCommit=se(Sg.bind(null,e,t,f,s,l,c,b,x,N,$,K,null,z,P)),Ga(e,f,b,!U);return}}Sg(e,t,f,s,l,c,b,x,N)}function f_(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!sn(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ga(e,t,s,l){t&=~Vu,t&=~Es,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-Se(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&xh(e,s,t)}function Wo(){return(Fe&6)===0?(Sl(0),!1):!0}function $u(){if(De!==null){if(Ke===0)var e=De.return;else e=De,ia=ms=null,ou(e),si=null,nl=0,e=De;for(;e!==null;)Gm(e.alternate,e),e=e.return;De=null}}function pi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,M_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ga=0,$u(),We=e,De=s=aa(e.current,null),Be=t,Ke=0,cn=null,za=!1,di=zi(e,t),zu=!1,fi=un=Vu=Es=Va=pt=0,tn=vl=null,Hu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-Se(l),f=1<<c;t|=e[c],l&=~f}return ma=t,So(),s}function hg(e,t){Ae=null,B.H=ul,t===ai||t===wo?(t=Np(),Ke=3):t===Zc?(t=Np(),Ke=4):Ke=t===Tu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,De===null&&(pt=1,Po(e,bn(t,e.current)))}function pg(){var e=on.current;return e===null?!0:(Be&4194048)===Be?Tn===null:(Be&62914560)===Be||(Be&536870912)!==0?e===Tn:!1}function mg(){var e=B.H;return B.H=ul,e===null?ul:e}function gg(){var e=B.A;return B.A=u_,e}function er(){pt=4,za||(Be&4194048)!==Be&&on.current!==null||(di=!0),(Va&134217727)===0&&(Es&134217727)===0||We===null||Ga(We,Be,un,!1)}function qu(e,t,s){var l=Fe;Fe|=2;var c=mg(),f=gg();(We!==e||Be!==t)&&(Jo=null,pi(e,t)),t=!1;var b=pt;e:do try{if(Ke!==0&&De!==null){var x=De,N=cn;switch(Ke){case 8:$u(),b=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(t=!0);var U=Ke;if(Ke=0,cn=null,mi(e,x,N,U),s&&di){b=0;break e}break;default:U=Ke,Ke=0,cn=null,mi(e,x,N,U)}}h_(),b=pt;break}catch($){hg(e,$)}while(!0);return t&&e.shellSuspendCounter++,ia=ms=null,Fe=l,B.H=c,B.A=f,De===null&&(We=null,Be=0,So()),b}function h_(){for(;De!==null;)yg(De)}function p_(e,t){var s=Fe;Fe|=2;var l=mg(),c=gg();We!==e||Be!==t?(Jo=null,Qo=J()+500,pi(e,t)):di=zi(e,t);e:do try{if(Ke!==0&&De!==null){t=De;var f=cn;t:switch(Ke){case 1:Ke=0,cn=null,mi(e,t,f,1);break;case 2:case 9:if(jp(f)){Ke=0,cn=null,vg(t);break}t=function(){Ke!==2&&Ke!==9||We!==e||(Ke=7),Gn(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:jp(f)?(Ke=0,cn=null,vg(t)):(Ke=0,cn=null,mi(e,t,f,7));break;case 5:var b=null;switch(De.tag){case 26:b=De.memoizedState;case 5:case 27:var x=De;if(b?ay(b):x.stateNode.complete){Ke=0,cn=null;var N=x.sibling;if(N!==null)De=N;else{var U=x.return;U!==null?(De=U,tr(U)):De=null}break t}}Ke=0,cn=null,mi(e,t,f,5);break;case 6:Ke=0,cn=null,mi(e,t,f,6);break;case 8:$u(),pt=6;break e;default:throw Error(o(462))}}m_();break}catch($){hg(e,$)}while(!0);return ia=ms=null,B.H=l,B.A=c,Fe=s,De!==null?0:(We=null,Be=0,So(),pt)}function m_(){for(;De!==null&&!Wn();)yg(De)}function yg(e){var t=Hm(e.alternate,e,ma);e.memoizedProps=e.pendingProps,t===null?tr(e):De=t}function vg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Bm(s,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Bm(s,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:ou(t);default:Gm(s,t),t=De=gp(t,ma),t=Hm(s,t,ma)}e.memoizedProps=e.pendingProps,t===null?tr(e):De=t}function mi(e,t,s,l){ia=ms=null,ou(t),si=null,nl=0;var c=t.return;try{if(a_(e,c,t,s,Be)){pt=1,Po(e,bn(s,e.current)),De=null;return}}catch(f){if(c!==null)throw De=c,f;pt=1,Po(e,bn(s,e.current)),De=null;return}t.flags&32768?(ze||l===1?e=!0:di||(Be&536870912)!==0?e=!1:(za=e=!0,(l===2||l===9||l===3||l===6)&&(l=on.current,l!==null&&l.tag===13&&(l.flags|=16384))),bg(t,e)):tr(t)}function tr(e){var t=e;do{if((t.flags&32768)!==0){bg(t,za);return}e=t.return;var s=l_(t.alternate,t,ma);if(s!==null){De=s;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);pt===0&&(pt=5)}function bg(e,t){do{var s=o_(e.alternate,e);if(s!==null){s.flags&=32767,De=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=s}while(e!==null);pt=6,De=null}function Sg(e,t,s,l,c,f,b,x,N){e.cancelPendingCommit=null;do nr();while(Mt!==0);if((Fe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Oc,K1(e,s,f,b,x,N),e===We&&(De=We=null,Be=0),hi=t,Pa=e,ga=s,Pu=f,Gu=c,cg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,b_(Ue,function(){return Cg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=B.T,B.T=null,c=F.p,F.p=2,b=Fe,Fe|=4;try{r_(e,t,s)}finally{Fe=b,F.p=c,B.T=l}}Mt=1,_g(),xg(),Tg()}}function _g(){if(Mt===1){Mt=0;var e=Pa,t=hi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var l=F.p;F.p=2;var c=Fe;Fe|=4;try{tg(t,e);var f=sd,b=op(e.containerInfo),x=f.focusedElem,N=f.selectionRange;if(b!==x&&x&&x.ownerDocument&&lp(x.ownerDocument.documentElement,x)){if(N!==null&&Nc(x)){var U=N.start,$=N.end;if($===void 0&&($=U),"selectionStart"in x)x.selectionStart=U,x.selectionEnd=Math.min($,x.value.length);else{var K=x.ownerDocument||document,z=K&&K.defaultView||window;if(z.getSelection){var P=z.getSelection(),se=x.textContent.length,he=Math.min(N.start,se),Je=N.end===void 0?he:Math.min(N.end,se);!P.extend&&he>Je&&(b=Je,Je=he,he=b);var O=ip(x,he),k=ip(x,Je);if(O&&k&&(P.rangeCount!==1||P.anchorNode!==O.node||P.anchorOffset!==O.offset||P.focusNode!==k.node||P.focusOffset!==k.offset)){var I=K.createRange();I.setStart(O.node,O.offset),P.removeAllRanges(),he>Je?(P.addRange(I),P.extend(k.node,k.offset)):(I.setEnd(k.node,k.offset),P.addRange(I))}}}}for(K=[],P=x;P=P.parentNode;)P.nodeType===1&&K.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<K.length;x++){var Y=K[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}pr=!!ad,sd=ad=null}finally{Fe=c,F.p=l,B.T=s}}e.current=t,Mt=2}}function xg(){if(Mt===2){Mt=0;var e=Pa,t=hi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var l=F.p;F.p=2;var c=Fe;Fe|=4;try{Xm(e,t.alternate,t)}finally{Fe=c,F.p=l,B.T=s}}Mt=3}}function Tg(){if(Mt===4||Mt===3){Mt=0,Z();var e=Pa,t=hi,s=ga,l=cg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,hi=Pa=null,Eg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ha=null),uc(s),t=t.stateNode,Oe&&typeof Oe.onCommitFiberRoot=="function")try{Oe.onCommitFiberRoot(vt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=B.T,c=F.p,F.p=2,B.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var x=l[b];f(x.value,{componentStack:x.stack})}}finally{B.T=t,F.p=c}}(ga&3)!==0&&nr(),Gn(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Fu?bl++:(bl=0,Fu=e):bl=0,Sl(0)}}function Eg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,el(t)))}function nr(){return _g(),xg(),Tg(),Cg()}function Cg(){if(Mt!==5)return!1;var e=Pa,t=Pu;Pu=0;var s=uc(ga),l=B.T,c=F.p;try{F.p=32>s?32:s,B.T=null,s=Gu,Gu=null;var f=Pa,b=ga;if(Mt=0,hi=Pa=null,ga=0,(Fe&6)!==0)throw Error(o(331));var x=Fe;if(Fe|=4,lg(f.current),ag(f,f.current,b,s),Fe=x,Sl(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(vt,f)}catch{}return!0}finally{F.p=c,B.T=l,Eg(e,t)}}function Ag(e,t,s){t=bn(s,t),t=xu(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Vi(e,2),Gn(e))}function Ze(e,t,s){if(e.tag===3)Ag(e,e,s);else for(;t!==null;){if(t.tag===3){Ag(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ha===null||!Ha.has(l))){e=bn(s,e),s=jm(2),l=Ba(t,s,2),l!==null&&(wm(s,l,t,e),Vi(l,2),Gn(l));break}}t=t.return}}function Yu(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new d_;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(zu=!0,c.add(s),e=g_.bind(null,e,t,s),t.then(e,e))}function g_(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,We===e&&(Be&s)===s&&(pt===4||pt===3&&(Be&62914560)===Be&&300>J()-Xo?(Fe&2)===0&&pi(e,0):Vu|=s,fi===Be&&(fi=0)),Gn(e)}function jg(e,t){t===0&&(t=_h()),e=fs(e,t),e!==null&&(Vi(e,t),Gn(e))}function y_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),jg(e,s)}function v_(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),jg(e,s)}function b_(e,t){return Jn(e,t)}var ar=null,gi=null,Ku=!1,sr=!1,Zu=!1,Fa=0;function Gn(e){e!==gi&&e.next===null&&(gi===null?ar=gi=e:gi=gi.next=e),sr=!0,Ku||(Ku=!0,__())}function Sl(e,t){if(!Zu&&sr){Zu=!0;do for(var s=!1,l=ar;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,x=l.pingedLanes;f=(1<<31-Se(42|e)+1)-1,f&=c&~(b&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,kg(l,f))}else f=Be,f=oo(l,l===We?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||zi(l,f)||(s=!0,kg(l,f));l=l.next}while(s);Zu=!1}}function S_(){wg()}function wg(){sr=Ku=!1;var e=0;Fa!==0&&k_()&&(e=Fa);for(var t=J(),s=null,l=ar;l!==null;){var c=l.next,f=Ng(l,t);f===0?(l.next=null,s===null?ar=c:s.next=c,c===null&&(gi=s)):(s=l,(e!==0||(f&3)!==0)&&(sr=!0)),l=c}Mt!==0&&Mt!==5||Sl(e),Fa!==0&&(Fa=0)}function Ng(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-Se(f),x=1<<b,N=c[b];N===-1?((x&s)===0||(x&l)!==0)&&(c[b]=Y1(x,t)):N<=t&&(e.expiredLanes|=x),f&=~x}if(t=We,s=Be,s=oo(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Mn(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||zi(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&Mn(l),uc(s)){case 2:case 8:s=pe;break;case 32:s=Ue;break;case 268435456:s=yt;break;default:s=Ue}return l=Dg.bind(null,e),s=Jn(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&Mn(l),e.callbackPriority=2,e.callbackNode=null,2}function Dg(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(nr()&&e.callbackNode!==s)return null;var l=Be;return l=oo(e,e===We?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(dg(e,l,t),Ng(e,J()),e.callbackNode!=null&&e.callbackNode===s?Dg.bind(null,e):null)}function kg(e,t){if(nr())return null;dg(e,t,!0)}function __(){R_(function(){(Fe&6)!==0?Jn(ge,S_):wg()})}function Xu(){if(Fa===0){var e=ti;e===0&&(e=Et,Et<<=1,(Et&261888)===0&&(Et=256)),Fa=e}return Fa}function Mg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fo(""+e)}function Rg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function x_(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Mg((c[Xt]||null).action),b=l.submitter;b&&(t=(t=b[Xt]||null)?Mg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var x=new go("action","action",null,l,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fa!==0){var N=b?Rg(c,b):new FormData(c);gu(s,{pending:!0,data:N,method:c.method,action:f},null,N)}}else typeof f=="function"&&(x.preventDefault(),N=b?Rg(c,b):new FormData(c),gu(s,{pending:!0,data:N,method:c.method,action:f},f,N))},currentTarget:c}]})}}for(var Qu=0;Qu<Rc.length;Qu++){var Ju=Rc[Qu],T_=Ju.toLowerCase(),E_=Ju[0].toUpperCase()+Ju.slice(1);On(T_,"on"+E_)}On(up,"onAnimationEnd"),On(dp,"onAnimationIteration"),On(fp,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(VS,"onTransitionRun"),On(HS,"onTransitionStart"),On(PS,"onTransitionCancel"),On(hp,"onTransitionEnd"),Hs("onMouseEnter",["mouseout","mouseover"]),Hs("onMouseLeave",["mouseout","mouseover"]),Hs("onPointerEnter",["pointerout","pointerover"]),Hs("onPointerLeave",["pointerout","pointerover"]),rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rs("onBeforeInput",["compositionend","keypress","textInput","paste"]),rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _l="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(" "),C_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_l));function Og(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var x=l[b],N=x.instance,U=x.currentTarget;if(x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch($){bo($)}c.currentTarget=null,f=N}else for(b=0;b<l.length;b++){if(x=l[b],N=x.instance,U=x.currentTarget,x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch($){bo($)}c.currentTarget=null,f=N}}}}function ke(e,t){var s=t[dc];s===void 0&&(s=t[dc]=new Set);var l=e+"__bubble";s.has(l)||(Bg(t,e,2,!1),s.add(l))}function Wu(e,t,s){var l=0;t&&(l|=4),Bg(s,e,l,t)}var ir="_reactListening"+Math.random().toString(36).slice(2);function ed(e){if(!e[ir]){e[ir]=!0,wh.forEach(function(s){s!=="selectionchange"&&(C_.has(s)||Wu(s,!1,e),Wu(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ir]||(t[ir]=!0,Wu("selectionchange",!1,t))}}function Bg(e,t,s,l){switch(uy(t)){case 2:var c=W_;break;case 8:c=ex;break;default:c=md}s=c.bind(null,t,s,e),c=void 0,!Sc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function td(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var x=l.stateNode.containerInfo;if(x===c)break;if(b===4)for(b=l.return;b!==null;){var N=b.tag;if((N===3||N===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;x!==null;){if(b=Us(x),b===null)return;if(N=b.tag,N===5||N===6||N===26||N===27){l=f=b;continue e}x=x.parentNode}}l=l.return}Vh(function(){var U=f,$=vc(s),K=[];e:{var z=pp.get(e);if(z!==void 0){var P=go,se=e;switch(e){case"keypress":if(po(s)===0)break e;case"keydown":case"keyup":P=vS;break;case"focusin":se="focus",P=Ec;break;case"focusout":se="blur",P=Ec;break;case"beforeblur":case"afterblur":P=Ec;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Gh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=lS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=_S;break;case up:case dp:case fp:P=cS;break;case hp:P=TS;break;case"scroll":case"scrollend":P=sS;break;case"wheel":P=CS;break;case"copy":case"cut":case"paste":P=dS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=$h;break;case"toggle":case"beforetoggle":P=jS}var he=(t&4)!==0,Je=!he&&(e==="scroll"||e==="scrollend"),O=he?z!==null?z+"Capture":null:z;he=[];for(var k=U,I;k!==null;){var Y=k;if(I=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||I===null||O===null||(Y=Gi(k,O),Y!=null&&he.push(xl(k,Y,I))),Je)break;k=k.return}0<he.length&&(z=new P(z,se,null,s,$),K.push({event:z,listeners:he}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",z&&s!==yc&&(se=s.relatedTarget||s.fromElement)&&(Us(se)||se[Is]))break e;if((P||z)&&(z=$.window===$?$:(z=$.ownerDocument)?z.defaultView||z.parentWindow:window,P?(se=s.relatedTarget||s.toElement,P=U,se=se?Us(se):null,se!==null&&(Je=u(se),he=se.tag,se!==Je||he!==5&&he!==27&&he!==6)&&(se=null)):(P=null,se=U),P!==se)){if(he=Gh,Y="onMouseLeave",O="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(he=$h,Y="onPointerLeave",O="onPointerEnter",k="pointer"),Je=P==null?z:Pi(P),I=se==null?z:Pi(se),z=new he(Y,k+"leave",P,s,$),z.target=Je,z.relatedTarget=I,Y=null,Us($)===U&&(he=new he(O,k+"enter",se,s,$),he.target=I,he.relatedTarget=Je,Y=he),Je=Y,P&&se)t:{for(he=A_,O=P,k=se,I=0,Y=O;Y;Y=he(Y))I++;Y=0;for(var de=k;de;de=he(de))Y++;for(;0<I-Y;)O=he(O),I--;for(;0<Y-I;)k=he(k),Y--;for(;I--;){if(O===k||k!==null&&O===k.alternate){he=O;break t}O=he(O),k=he(k)}he=null}else he=null;P!==null&&Lg(K,z,P,he,!1),se!==null&&Je!==null&&Lg(K,Je,se,he,!0)}}e:{if(z=U?Pi(U):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var He=Wh;else if(Qh(z))if(ep)He=IS;else{He=BS;var ce=OS}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?U&&gc(U.elementType)&&(He=Wh):He=LS;if(He&&(He=He(e,U))){Jh(K,He,s,$);break e}ce&&ce(e,z,U),e==="focusout"&&U&&z.type==="number"&&U.memoizedProps.value!=null&&mc(z,"number",z.value)}switch(ce=U?Pi(U):window,e){case"focusin":(Qh(ce)||ce.contentEditable==="true")&&(Ys=ce,Dc=U,Qi=null);break;case"focusout":Qi=Dc=Ys=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,rp(K,s,$);break;case"selectionchange":if(zS)break;case"keydown":case"keyup":rp(K,s,$)}var je;if(Ac)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else qs?Zh(e,s)&&(Le="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(qh&&s.locale!=="ko"&&(qs||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&qs&&(je=Hh()):(wa=$,_c="value"in wa?wa.value:wa.textContent,qs=!0)),ce=lr(U,Le),0<ce.length&&(Le=new Fh(Le,e,null,s,$),K.push({event:Le,listeners:ce}),je?Le.data=je:(je=Xh(s),je!==null&&(Le.data=je)))),(je=NS?DS(e,s):kS(e,s))&&(Le=lr(U,"onBeforeInput"),0<Le.length&&(ce=new Fh("onBeforeInput","beforeinput",null,s,$),K.push({event:ce,listeners:Le}),ce.data=je)),x_(K,e,U,s,$)}Og(K,t)})}function xl(e,t,s){return{instance:e,listener:t,currentTarget:s}}function lr(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Gi(e,s),c!=null&&l.unshift(xl(e,c,f)),c=Gi(e,t),c!=null&&l.push(xl(e,c,f))),e.tag===3)return l;e=e.return}return[]}function A_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Lg(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var x=s,N=x.alternate,U=x.stateNode;if(x=x.tag,N!==null&&N===l)break;x!==5&&x!==26&&x!==27||U===null||(N=U,c?(U=Gi(s,f),U!=null&&b.unshift(xl(s,U,N))):c||(U=Gi(s,f),U!=null&&b.push(xl(s,U,N)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var j_=/\r\n?/g,w_=/\u0000|\uFFFD/g;function Ig(e){return(typeof e=="string"?e:""+e).replace(j_,`
|
|
25
|
+
`).replace(w_,"")}function Ug(e,t){return t=Ig(t),Ig(e)===t}function Qe(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Gs(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Gs(e,""+l);break;case"className":co(e,"class",l);break;case"tabIndex":co(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":co(e,s,l);break;case"style":Uh(e,l,f);break;case"data":if(t!=="object"){co(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=fo(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&Qe(e,t,"name",c.name,c,null),Qe(e,t,"formEncType",c.formEncType,c,null),Qe(e,t,"formMethod",c.formMethod,c,null),Qe(e,t,"formTarget",c.formTarget,c,null)):(Qe(e,t,"encType",c.encType,c,null),Qe(e,t,"method",c.method,c,null),Qe(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=fo(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=ta);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=fo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":ke("beforetoggle",e),ke("toggle",e),ro(e,"popover",l);break;case"xlinkActuate":ea(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ea(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ea(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ea(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ea(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ea(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ea(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ea(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ea(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ro(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=nS.get(s)||s,ro(e,s,l))}}function nd(e,t,s,l,c,f){switch(s){case"style":Uh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof l=="string"?Gs(e,l):(typeof l=="number"||typeof l=="bigint")&&Gs(e,""+l);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Nh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Xt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):ro(e,s,l)}}}function Ht(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,f,b,s,null)}}c&&Qe(e,t,"srcSet",s.srcSet,s,null),l&&Qe(e,t,"src",s.src,s,null);return;case"input":ke("invalid",e);var x=f=b=c=null,N=null,U=null;for(l in s)if(s.hasOwnProperty(l)){var $=s[l];if($!=null)switch(l){case"name":c=$;break;case"type":b=$;break;case"checked":N=$;break;case"defaultChecked":U=$;break;case"value":f=$;break;case"defaultValue":x=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:Qe(e,t,l,$,s,null)}}Oh(e,f,x,N,U,b,c,!1);return;case"select":ke("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":b=x;break;case"multiple":l=x;default:Qe(e,t,c,x,s,null)}t=f,s=b,e.multiple=!!l,t!=null?Ps(e,!!l,t,!1):s!=null&&Ps(e,!!l,s,!0);return;case"textarea":ke("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(x=s[b],x!=null))switch(b){case"value":l=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Qe(e,t,b,x,s,null)}Lh(e,l,c,f);return;case"option":for(N in s)if(s.hasOwnProperty(N)&&(l=s[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Qe(e,t,N,l,s,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(l=0;l<_l.length;l++)ke(_l[l],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in s)if(s.hasOwnProperty(U)&&(l=s[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,U,l,s,null)}return;default:if(gc(t)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&nd(e,t,$,l,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(l=s[x],l!=null&&Qe(e,t,x,l,s,null))}function N_(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,x=null,N=null,U=null,$=null;for(P in s){var K=s[P];if(s.hasOwnProperty(P)&&K!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=K;default:l.hasOwnProperty(P)||Qe(e,t,P,null,l,K)}}for(var z in l){var P=l[z];if(K=s[z],l.hasOwnProperty(z)&&(P!=null||K!=null))switch(z){case"type":f=P;break;case"name":c=P;break;case"checked":U=P;break;case"defaultChecked":$=P;break;case"value":b=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==K&&Qe(e,t,z,P,l,K)}}pc(e,b,x,N,U,$,f,c);return;case"select":P=b=x=z=null;for(f in s)if(N=s[f],s.hasOwnProperty(f)&&N!=null)switch(f){case"value":break;case"multiple":P=N;default:l.hasOwnProperty(f)||Qe(e,t,f,null,l,N)}for(c in l)if(f=l[c],N=s[c],l.hasOwnProperty(c)&&(f!=null||N!=null))switch(c){case"value":z=f;break;case"defaultValue":x=f;break;case"multiple":b=f;default:f!==N&&Qe(e,t,c,f,l,N)}t=x,s=b,l=P,z!=null?Ps(e,!!s,z,!1):!!l!=!!s&&(t!=null?Ps(e,!!s,t,!0):Ps(e,!!s,s?[]:"",!1));return;case"textarea":P=z=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(e,t,x,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":z=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Qe(e,t,b,c,l,f)}Bh(e,z,P);return;case"option":for(var se in s)if(z=s[se],s.hasOwnProperty(se)&&z!=null&&!l.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Qe(e,t,se,null,l,z)}for(N in l)if(z=l[N],P=s[N],l.hasOwnProperty(N)&&z!==P&&(z!=null||P!=null))switch(N){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Qe(e,t,N,z,l,P)}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 he in s)z=s[he],s.hasOwnProperty(he)&&z!=null&&!l.hasOwnProperty(he)&&Qe(e,t,he,null,l,z);for(U in l)if(z=l[U],P=s[U],l.hasOwnProperty(U)&&z!==P&&(z!=null||P!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:Qe(e,t,U,z,l,P)}return;default:if(gc(t)){for(var Je in s)z=s[Je],s.hasOwnProperty(Je)&&z!==void 0&&!l.hasOwnProperty(Je)&&nd(e,t,Je,void 0,l,z);for($ in l)z=l[$],P=s[$],!l.hasOwnProperty($)||z===P||z===void 0&&P===void 0||nd(e,t,$,z,l,P);return}}for(var O in s)z=s[O],s.hasOwnProperty(O)&&z!=null&&!l.hasOwnProperty(O)&&Qe(e,t,O,null,l,z);for(K in l)z=l[K],P=s[K],!l.hasOwnProperty(K)||z===P||z==null&&P==null||Qe(e,t,K,z,l,P)}function zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function D_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],f=c.transferSize,b=c.initiatorType,x=c.duration;if(f&&x&&zg(b)){for(b=0,x=c.responseEnd,l+=1;l<s.length;l++){var N=s[l],U=N.startTime;if(U>x)break;var $=N.transferSize,K=N.initiatorType;$&&zg(K)&&(N=N.responseEnd,b+=$*(N<x?1:(x-U)/(N-U)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ad=null,sd=null;function or(e){return e.nodeType===9?e:e.ownerDocument}function Vg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function id(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ld=null;function k_(){var e=window.event;return e&&e.type==="popstate"?e===ld?!1:(ld=e,!0):(ld=null,!1)}var Pg=typeof setTimeout=="function"?setTimeout:void 0,M_=typeof clearTimeout=="function"?clearTimeout:void 0,Gg=typeof Promise=="function"?Promise:void 0,R_=typeof queueMicrotask=="function"?queueMicrotask:typeof Gg<"u"?function(e){return Gg.resolve(null).then(e).catch(O_)}:Pg;function O_(e){setTimeout(function(){throw e})}function $a(e){return e==="head"}function Fg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),Si(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Tl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Tl(s);for(var f=s.firstChild;f;){var b=f.nextSibling,x=f.nodeName;f[Hi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Tl(e.ownerDocument.body);s=c}while(s);Si(t)}function $g(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function od(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":od(s),fc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function B_(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Hi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=En(e.nextSibling),e===null)break}return null}function L_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=En(e.nextSibling),e===null))return null;return e}function qg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=En(e.nextSibling),e===null))return null;return e}function rd(e){return e.data==="$?"||e.data==="$~"}function cd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function I_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function En(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ud=null;function Yg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return En(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Kg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Zg(e,t,s){switch(t=or(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Tl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fc(e)}var Cn=new Map,Xg=new Set;function rr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=F.d;F.d={f:U_,r:z_,D:V_,C:H_,L:P_,m:G_,X:$_,S:F_,M:q_};function U_(){var e=ya.f(),t=Wo();return e||t}function z_(e){var t=zs(e);t!==null&&t.tag===5&&t.type==="form"?hm(t):ya.r(e)}var yi=typeof document>"u"?null:document;function Qg(e,t,s){var l=yi;if(l&&typeof t=="string"&&t){var c=yn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Xg.has(c)||(Xg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ht(t,"link",e),Ot(t),l.head.appendChild(t)))}}function V_(e){ya.D(e),Qg("dns-prefetch",e,null)}function H_(e,t){ya.C(e,t),Qg("preconnect",e,t)}function P_(e,t,s){ya.L(e,t,s);var l=yi;if(l&&e&&t){var c='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+yn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+yn(s.imageSizes)+'"]')):c+='[href="'+yn(e)+'"]';var f=c;switch(t){case"style":f=vi(e);break;case"script":f=bi(e)}Cn.has(f)||(e=y({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Cn.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(El(f))||t==="script"&&l.querySelector(Cl(f))||(t=l.createElement("link"),Ht(t,"link",e),Ot(t),l.head.appendChild(t)))}}function G_(e,t){ya.m(e,t);var s=yi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+yn(l)+'"][href="'+yn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=bi(e)}if(!Cn.has(f)&&(e=y({rel:"modulepreload",href:e},t),Cn.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Cl(f)))return}l=s.createElement("link"),Ht(l,"link",e),Ot(l),s.head.appendChild(l)}}}function F_(e,t,s){ya.S(e,t,s);var l=yi;if(l&&e){var c=Vs(l).hoistableStyles,f=vi(e);t=t||"default";var b=c.get(f);if(!b){var x={loading:0,preload:null};if(b=l.querySelector(El(f)))x.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Cn.get(f))&&dd(e,s);var N=b=l.createElement("link");Ot(N),Ht(N,"link",e),N._p=new Promise(function(U,$){N.onload=U,N.onerror=$}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,cr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:x},c.set(f,b)}}}function $_(e,t){ya.X(e,t);var s=yi;if(s&&e){var l=Vs(s).hoistableScripts,c=bi(e),f=l.get(c);f||(f=s.querySelector(Cl(c)),f||(e=y({src:e,async:!0},t),(t=Cn.get(c))&&fd(e,t),f=s.createElement("script"),Ot(f),Ht(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function q_(e,t){ya.M(e,t);var s=yi;if(s&&e){var l=Vs(s).hoistableScripts,c=bi(e),f=l.get(c);f||(f=s.querySelector(Cl(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=Cn.get(c))&&fd(e,t),f=s.createElement("script"),Ot(f),Ht(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Jg(e,t,s,l){var c=(c=ee.current)?rr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=vi(s.href),s=Vs(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=vi(s.href);var f=Vs(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(El(e)))&&!f._p&&(b.instance=f,b.state.loading=5),Cn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cn.set(e,s),f||Y_(c,e,s,b.state))),t&&l===null)throw Error(o(528,""));return b}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=bi(s),s=Vs(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function vi(e){return'href="'+yn(e)+'"'}function El(e){return'link[rel="stylesheet"]['+e+"]"}function Wg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Y_(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ht(t,"link",s),Ot(t),e.head.appendChild(t))}function bi(e){return'[src="'+yn(e)+'"]'}function Cl(e){return"script[async]"+e}function ey(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+yn(s.href)+'"]');if(l)return t.instance=l,Ot(l),l;var c=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ot(l),Ht(l,"style",c),cr(l,s.precedence,e),t.instance=l;case"stylesheet":c=vi(s.href);var f=e.querySelector(El(c));if(f)return t.state.loading|=4,t.instance=f,Ot(f),f;l=Wg(s),(c=Cn.get(c))&&dd(l,c),f=(e.ownerDocument||e).createElement("link"),Ot(f);var b=f;return b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Ht(f,"link",l),t.state.loading|=4,cr(f,s.precedence,e),t.instance=f;case"script":return f=bi(s.src),(c=e.querySelector(Cl(f)))?(t.instance=c,Ot(c),c):(l=s,(c=Cn.get(f))&&(l=y({},s),fd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ot(c),Ht(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,cr(l,s.precedence,e));return t.instance}function cr(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var x=l[b];if(x.dataset.precedence===t)f=x;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function dd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ur=null;function ty(e,t,s){if(ur===null){var l=new Map,c=ur=new Map;c.set(s,l)}else c=ur,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Hi]||f[It]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var x=l.get(b);x?x.push(f):l.set(b,[f])}}return l}function ny(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function K_(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ay(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Z_(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=vi(l.href),f=t.querySelector(El(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=dr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Ot(f);return}f=t.ownerDocument||t,l=Wg(l),(c=Cn.get(c))&&dd(l,c),f=f.createElement("link"),Ot(f);var b=f;b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Ht(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=dr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var hd=0;function X_(e,t){return e.stylesheets&&e.count===0&&hr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&hr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&hd===0&&(hd=62500*D_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>hd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function dr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fr=null;function hr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fr=new Map,t.forEach(Q_,e),fr=null,dr.call(e))}function Q_(e,t){if(!(t.state.loading&4)){var s=fr.get(e);if(s)var l=s.get(null);else{s=new Map,fr.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=s.get(b)||l,f===l&&s.set(null,c),s.set(b,c),this.count++,l=dr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Al={$$typeof:M,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function J_(e,t,s,l,c,f,b,x,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rc(0),this.hiddenUpdates=rc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function sy(e,t,s,l,c,f,b,x,N,U,$,K){return e=new J_(e,t,s,b,N,U,$,K,x),t=1,f===!0&&(t|=24),f=ln(3,null,null,t),e.current=f,f.stateNode=e,t=qc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Xc(f),e}function iy(e){return e?(e=Xs,e):Xs}function ly(e,t,s,l,c,f){c=iy(c),l.context===null?l.context=c:l.pendingContext=c,l=Oa(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=Ba(e,l,t),s!==null&&(nn(s,e,t),sl(s,e,t))}function oy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function pd(e,t){oy(e,t),(e=e.alternate)&&oy(e,t)}function ry(e){if(e.tag===13||e.tag===31){var t=fs(e,67108864);t!==null&&nn(t,e,67108864),pd(e,67108864)}}function cy(e){if(e.tag===13||e.tag===31){var t=dn();t=cc(t);var s=fs(e,t);s!==null&&nn(s,e,t),pd(e,t)}}var pr=!0;function W_(e,t,s,l){var c=B.T;B.T=null;var f=F.p;try{F.p=2,md(e,t,s,l)}finally{F.p=f,B.T=c}}function ex(e,t,s,l){var c=B.T;B.T=null;var f=F.p;try{F.p=8,md(e,t,s,l)}finally{F.p=f,B.T=c}}function md(e,t,s,l){if(pr){var c=gd(l);if(c===null)td(e,t,l,mr,s),dy(e,l);else if(nx(c,e,t,s,l))l.stopPropagation();else if(dy(e,l),t&4&&-1<tx.indexOf(e)){for(;c!==null;){var f=zs(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=os(f.pendingLanes);if(b!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var N=1<<31-Se(b);x.entanglements[1]|=N,b&=~N}Gn(f),(Fe&6)===0&&(Qo=J()+500,Sl(0))}}break;case 31:case 13:x=fs(f,2),x!==null&&nn(x,f,2),Wo(),pd(f,2)}if(f=gd(l),f===null&&td(e,t,l,mr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else td(e,t,l,null,s)}}function gd(e){return e=vc(e),yd(e)}var mr=null;function yd(e){if(mr=null,e=Us(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return mr=e,null}function uy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ae()){case ge:return 2;case pe:return 8;case Ue:case Ce:return 32;case yt:return 268435456;default:return 32}default:return 32}}var vd=!1,qa=null,Ya=null,Ka=null,jl=new Map,wl=new Map,Za=[],tx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function dy(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ka=null;break;case"pointerover":case"pointerout":jl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wl.delete(t.pointerId)}}function Nl(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=zs(t),t!==null&&ry(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function nx(e,t,s,l,c){switch(t){case"focusin":return qa=Nl(qa,e,t,s,l,c),!0;case"dragenter":return Ya=Nl(Ya,e,t,s,l,c),!0;case"mouseover":return Ka=Nl(Ka,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return jl.set(f,Nl(jl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,wl.set(f,Nl(wl.get(f)||null,e,t,s,l,c)),!0}return!1}function fy(e){var t=Us(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,Ah(e.priority,function(){cy(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,Ah(e.priority,function(){cy(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=gd(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);yc=l,s.target.dispatchEvent(l),yc=null}else return t=zs(s),t!==null&&ry(t),e.blockedOn=s,!1;t.shift()}return!0}function hy(e,t,s){gr(e)&&s.delete(t)}function ax(){vd=!1,qa!==null&&gr(qa)&&(qa=null),Ya!==null&&gr(Ya)&&(Ya=null),Ka!==null&&gr(Ka)&&(Ka=null),jl.forEach(hy),wl.forEach(hy)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,vd||(vd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ax)))}var vr=null;function py(e){vr!==e&&(vr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){vr===e&&(vr=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(yd(l||s)===null)continue;break}var f=zs(s);f!==null&&(e.splice(t,3),t-=3,gu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function Si(e){function t(N){return yr(N,e)}qa!==null&&yr(qa,e),Ya!==null&&yr(Ya,e),Ka!==null&&yr(Ka,e),jl.forEach(t),wl.forEach(t);for(var s=0;s<Za.length;s++){var l=Za[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Za.length&&(s=Za[0],s.blockedOn===null);)fy(s),s.blockedOn===null&&Za.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[Xt]||null;if(typeof f=="function")b||py(s);else if(b){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[Xt]||null)x=b.formAction;else if(yd(c)!==null)continue}else x=b.action;typeof x=="function"?s[l+1]=x:(s.splice(l,3),l-=3),py(s)}}}function my(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function bd(e){this._internalRoot=e}br.prototype.render=bd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=dn();ly(s,l,e,t,null,null)},br.prototype.unmount=bd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ly(e.current,2,null,e,null,null),Wo(),t[Is]=null}};function br(e){this._internalRoot=e}br.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ch();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Za.length&&t!==0&&t<Za[s].priority;s++);Za.splice(s,0,e),s===0&&fy(e)}};var gy=a.version;if(gy!=="19.2.4")throw Error(o(527,gy,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var sx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sr.isDisabled&&Sr.supportsFiber)try{vt=Sr.inject(sx),Oe=Sr}catch{}}return Dl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=Tm,f=Em,b=Cm;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=sy(e,1,!1,null,null,s,l,null,c,f,b,my),e[Is]=t.current,ed(e),new bd(t)},Dl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=Tm,b=Em,x=Cm,N=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(N=s.formState)),t=sy(e,1,!0,t,s??null,l,c,N,f,b,x,my),t.context=iy(null),s=t.current,l=dn(),l=cc(l),c=Oa(l),c.callback=null,Ba(s,c,l),s=l,t.current.lanes=s,Vi(t,s),Gn(t),e[Is]=t.current,ed(e),new br(t)},Dl.version="19.2.4",Dl}var Ty;function Sx(){if(Ty)return Sd.exports;Ty=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),Sd.exports=bx(),Sd.exports}var _x=Sx();/**
|
|
26
|
+
* react-router v7.13.1
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Remix Software Inc.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
+
*
|
|
33
|
+
* @license MIT
|
|
34
|
+
*/var Ey="popstate";function Cy(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function xx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:p,hash:m}=u||o.location;return Zd("",{pathname:d,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:Fl(r)}return Ex(a,i,null,n)}function st(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function wn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Tx(){return Math.random().toString(36).substring(2,10)}function Ay(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Zd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Ri(a):a,state:i,key:a&&a.key||o||Tx(),unstable_mask:r}}function Fl({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Ri(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function Ex(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,p="POP",m=null,g=v();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function v(){return(d.state||{idx:null}).idx}function y(){p="POP";let j=v(),C=j==null?null:j-g;g=j,m&&m({action:p,location:w.location,delta:C})}function _(j,C){p="PUSH";let A=Cy(j)?j:Zd(w.location,j,C);g=v()+1;let M=Ay(A,g),V=w.createHref(A.unstable_mask||A);try{d.pushState(M,"",V)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;r.location.assign(V)}u&&m&&m({action:p,location:w.location,delta:1})}function T(j,C){p="REPLACE";let A=Cy(j)?j:Zd(w.location,j,C);g=v();let M=Ay(A,g),V=w.createHref(A.unstable_mask||A);d.replaceState(M,"",V),u&&m&&m({action:p,location:w.location,delta:0})}function E(j){return Cx(j)}let w={get action(){return p},get location(){return n(r,d)},listen(j){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(Ey,y),m=j,()=>{r.removeEventListener(Ey,y),m=null}},createHref(j){return a(r,j)},createURL:E,encodeLocation(j){let C=E(j);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(j){return d.go(j)}};return w}function Cx(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),st(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Fl(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function x0(n,a,i="/"){return Ax(n,a,i,!1)}function Ax(n,a,i,o){let r=typeof a=="string"?Ri(a):a,u=xa(r.pathname||"/",i);if(u==null)return null;let d=T0(n);jx(d);let p=null;for(let m=0;p==null&&m<d.length;++m){let g=C0(u);p=Lx(d[m],g,o)}return p}function T0(n,a=[],i=[],o="",r=!1){let u=(d,p,m=r,g)=>{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&m)return;st(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let y=Yn([o,v.relativePath]),_=i.concat(v);d.children&&d.children.length>0&&(st(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),T0(d.children,a,_,y,m)),!(d.path==null&&!d.index)&&a.push({path:y,score:Ox(y,d.index),routesMeta:_})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let g of E0(d.path))u(d,p,!0,g)}),a}function E0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=E0(o.join("/")),p=[];return p.push(...d.map(m=>m===""?u:[u,m].join("/"))),r&&p.push(...d),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function jx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Bx(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var wx=/^:[\w-]+$/,Nx=3,Dx=2,kx=1,Mx=10,Rx=-2,jy=n=>n==="*";function Ox(n,a){let i=n.split("/"),o=i.length;return i.some(jy)&&(o+=Rx),a&&(o+=Dx),i.filter(r=>!jy(r)).reduce((r,u)=>r+(wx.test(u)?Nx:u===""?kx:Mx),o)}function Bx(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function Lx(n,a,i=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,v=u==="/"?a:a.slice(u.length)||"/",y=$l({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},v),_=m.route;if(!y&&g&&i&&!o[o.length-1].route.index&&(y=$l({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!y)return null;Object.assign(r,y.params),d.push({params:r,pathname:Yn([u,y.pathname]),pathnameBase:Hx(Yn([u,y.pathnameBase])),route:_}),y.pathnameBase!=="/"&&(u=Yn([u,y.pathnameBase]))}return d}function $l(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Ix(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:y},_)=>{if(v==="*"){let E=p[_]||"";d=u.slice(0,u.length-E.length).replace(/(.)\/+$/,"$1")}const T=p[_];return y&&!T?g[v]=void 0:g[v]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Ix(n,a=!1,i=!0){wn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,m,g,v)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let y=v.charAt(g+d.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function C0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function xa(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}var Ux=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function zx(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Ri(n):n,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=wy(i.substring(1),"/"):u=wy(i,a)):u=a,{pathname:u,search:Px(o),hash:Gx(r)}}function wy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function Td(n,a,i,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Vx(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function wf(n){let a=Vx(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Zr(n,a,i,o=!1){let r;typeof n=="string"?r=Ri(n):(r={...n},st(!r.pathname||!r.pathname.includes("?"),Td("?","pathname","search",r)),st(!r.pathname||!r.pathname.includes("#"),Td("#","pathname","hash",r)),st(!r.search||!r.search.includes("#"),Td("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,p;if(d==null)p=i;else{let y=a.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),y-=1;r.pathname=_.join("/")}p=y>=0?a[y]:"/"}let m=zx(r,p),g=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var Yn=n=>n.join("/").replace(/\/\/+/g,"/"),Hx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Px=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Gx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Fx=class{constructor(n,a,i,o=!1){this.status=n,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function $x(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function qx(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var A0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function j0(n,a){let i=n;if(typeof i!="string"||!Ux.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(A0)try{let u=new URL(window.location.href),d=i.startsWith("//")?new URL(u.protocol+i):new URL(i),p=xa(d.pathname,a);d.origin===u.origin&&p!=null?i=p+d.search+d.hash:r=!0}catch{wn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var w0=["POST","PUT","PATCH","DELETE"];new Set(w0);var Yx=["GET",...w0];new Set(Yx);var Oi=S.createContext(null);Oi.displayName="DataRouter";var Xr=S.createContext(null);Xr.displayName="DataRouterState";var Kx=S.createContext(!1),N0=S.createContext({isTransitioning:!1});N0.displayName="ViewTransition";var Zx=S.createContext(new Map);Zx.displayName="Fetchers";var Xx=S.createContext(null);Xx.displayName="Await";var mn=S.createContext(null);mn.displayName="Navigation";var Wl=S.createContext(null);Wl.displayName="Location";var Dn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Dn.displayName="Route";var Nf=S.createContext(null);Nf.displayName="RouteError";var D0="REACT_ROUTER_ERROR",Qx="REDIRECT",Jx="ROUTE_ERROR_RESPONSE";function Wx(n){if(n.startsWith(`${D0}:${Qx}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function eT(n){if(n.startsWith(`${D0}:${Jx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new Fx(a.status,a.statusText,a.data)}catch{}}function tT(n,{relative:a}={}){st(Bs(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(mn),{hash:r,pathname:u,search:d}=eo(n,{relative:a}),p=u;return i!=="/"&&(p=u==="/"?i:Yn([i,u])),o.createHref({pathname:p,search:d,hash:r})}function Bs(){return S.useContext(Wl)!=null}function Zt(){return st(Bs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Wl).location}function Yt(n){st(Bs(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Zt();return S.useMemo(()=>$l(n,C0(a)),[a,n])}var k0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function M0(n){S.useContext(mn).static||S.useLayoutEffect(n)}function Qr(){let{isDataRoute:n}=S.useContext(Dn);return n?gT():nT()}function nT(){st(Bs(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Oi),{basename:a,navigator:i}=S.useContext(mn),{matches:o}=S.useContext(Dn),{pathname:r}=Zt(),u=JSON.stringify(wf(o)),d=S.useRef(!1);return M0(()=>{d.current=!0}),S.useCallback((m,g={})=>{if(wn(d.current,k0),!d.current)return;if(typeof m=="number"){i.go(m);return}let v=Zr(m,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Yn([a,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[a,i,u,r,n])}var aT=S.createContext(null);function sT(n){let a=S.useContext(Dn).outlet;return S.useMemo(()=>a&&S.createElement(aT.Provider,{value:n},a),[a,n])}function Jr(){let{matches:n}=S.useContext(Dn),a=n[n.length-1];return a?a.params:{}}function eo(n,{relative:a}={}){let{matches:i}=S.useContext(Dn),{pathname:o}=Zt(),r=JSON.stringify(wf(i));return S.useMemo(()=>Zr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function iT(n,a){return R0(n,a)}function R0(n,a,i){var j;st(Bs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(mn),{matches:r}=S.useContext(Dn),u=r[r.length-1],d=u?u.params:{},p=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let C=g&&g.path||"";B0(p,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
35
|
+
|
|
36
|
+
Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let v=Zt(),y;if(a){let C=typeof a=="string"?Ri(a):a;st(m==="/"||((j=C.pathname)==null?void 0:j.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${C.pathname}" was given in the \`location\` prop.`),y=C}else y=v;let _=y.pathname||"/",T=_;if(m!=="/"){let C=m.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let E=x0(n,{pathname:T});wn(g||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),wn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=uT(E&&E.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:Yn([m,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:Yn([m,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,i);return a&&w?S.createElement(Wl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},w):w}function lT(){let n=mT(),a=$x(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,d)}var oT=S.createElement(lT,null),O0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=eT(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(Dn.Provider,{value:this.props.routeContext},S.createElement(Nf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(rT,{error:n},a):a}};O0.contextType=Kx;var Ed=new WeakMap;function rT({children:n,error:a}){let{basename:i}=S.useContext(mn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=Wx(a.digest);if(o){let r=Ed.get(a);if(r)throw r;let u=j0(o.location,i);if(A0&&!Ed.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Ed.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function cT({routeContext:n,match:a,children:i}){let o=S.useContext(Oi);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Dn.Provider,{value:n},i)}function uT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let v=r.findIndex(y=>y.route.id&&(u==null?void 0:u[y.route.id])!==void 0);st(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,v+1))}let d=!1,p=-1;if(i&&o){d=o.renderFallback;for(let v=0;v<r.length;v++){let y=r[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=v),y.route.id){let{loaderData:_,errors:T}=o,E=y.route.loader&&!_.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||E){i.isStatic&&(d=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(v,y)=>{var _,T;m(v,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:qx(o.matches),errorInfo:y})}:void 0;return r.reduceRight((v,y,_)=>{let T,E=!1,w=null,j=null;o&&(T=u&&y.route.id?u[y.route.id]:void 0,w=y.route.errorElement||oT,d&&(p<0&&_===0?(B0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,j=null):p===_&&(E=!0,j=y.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),A=()=>{let M;return T?M=w:E?M=j:y.route.Component?M=S.createElement(y.route.Component,null):y.route.element?M=y.route.element:M=v,S.createElement(cT,{match:y,routeContext:{outlet:v,matches:C,isDataRoute:o!=null},children:M})};return o&&(y.route.ErrorBoundary||y.route.errorElement||_===0)?S.createElement(O0,{location:o.location,revalidation:o.revalidation,component:w,error:T,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):A()},null)}function Df(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dT(n){let a=S.useContext(Oi);return st(a,Df(n)),a}function fT(n){let a=S.useContext(Xr);return st(a,Df(n)),a}function hT(n){let a=S.useContext(Dn);return st(a,Df(n)),a}function kf(n){let a=hT(n),i=a.matches[a.matches.length-1];return st(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function pT(){return kf("useRouteId")}function mT(){var o;let n=S.useContext(Nf),a=fT("useRouteError"),i=kf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function gT(){let{router:n}=dT("useNavigate"),a=kf("useNavigate"),i=S.useRef(!1);return M0(()=>{i.current=!0}),S.useCallback(async(r,u={})=>{wn(i.current,k0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Ny={};function B0(n,a,i){!a&&!Ny[n]&&(Ny[n]=!0,wn(!1,i))}S.memo(yT);function yT({routes:n,future:a,state:i,isStatic:o,onError:r}){return R0(n,void 0,{state:i,isStatic:o,onError:r})}function Dr({to:n,replace:a,state:i,relative:o}){st(Bs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(mn);wn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(Dn),{pathname:d}=Zt(),p=Qr(),m=Zr(n,wf(u),d,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function L0(n){return sT(n.context)}function _t(n){st(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function vT({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){st(!Bs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[p,r,u,d]);typeof i=="string"&&(i=Ri(i));let{pathname:g="/",search:v="",hash:y="",state:_=null,key:T="default",unstable_mask:E}=i,w=S.useMemo(()=>{let j=xa(g,p);return j==null?null:{location:{pathname:j,search:v,hash:y,state:_,key:T,unstable_mask:E},navigationType:o}},[p,g,v,y,_,T,o,E]);return wn(w!=null,`<Router basename="${p}"> is not able to match the URL "${g}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:S.createElement(mn.Provider,{value:m},S.createElement(Wl.Provider,{children:a,value:w}))}function bT({children:n,location:a}){return iT(Xd(n),a)}function Xd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Xd(o.props.children,u));return}st(o.type===_t,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),st(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Xd(o.props.children,u)),i.push(d)}),i}var kr="get",Mr="application/x-www-form-urlencoded";function Wr(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ST(n){return Wr(n)&&n.tagName.toLowerCase()==="button"}function _T(n){return Wr(n)&&n.tagName.toLowerCase()==="form"}function xT(n){return Wr(n)&&n.tagName.toLowerCase()==="input"}function TT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function ET(n,a){return n.button===0&&(!a||a==="_self")&&!TT(n)}function Qd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(r=>[i,r]):[[i,o]])},[]))}function CT(n,a){let i=Qd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(u=>{i.append(r,u)})}),i}var xr=null;function AT(){if(xr===null)try{new FormData(document.createElement("form"),0),xr=!1}catch{xr=!0}return xr}var jT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Cd(n){return n!=null&&!jT.has(n)?(wn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mr}"`),null):n}function wT(n,a){let i,o,r,u,d;if(_T(n)){let p=n.getAttribute("action");o=p?xa(p,a):null,i=n.getAttribute("method")||kr,r=Cd(n.getAttribute("enctype"))||Mr,u=new FormData(n)}else if(ST(n)||xT(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||p.getAttribute("action");if(o=m?xa(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||kr,r=Cd(n.getAttribute("formenctype"))||Cd(p.getAttribute("enctype"))||Mr,u=new FormData(p,n),!AT()){let{name:g,type:v,value:y}=n;if(v==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,y)}}else{if(Wr(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=kr,o=null,r=Mr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function NT(n,a,i,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&xa(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function DT(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function kT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function MT(n,a,i){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await DT(u,i);return d.links?d.links():[]}return[]}));return LT(o.flat(1).filter(kT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Dy(n,a,i,o,r,u){let d=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var v;return i[g].pathname!==m.pathname||((v=i[g].route.path)==null?void 0:v.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return u==="assets"?a.filter((m,g)=>d(m,g)||p(m,g)):u==="data"?a.filter((m,g)=>{var y;let v=o.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(d(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((y=i[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function RT(n,a,{includeHydrateFallback:i}={}){return OT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function OT(n){return[...new Set(n)]}function BT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function LT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(BT(r));return i.has(u)||(i.add(u),o.push({key:u,link:r})),o},[])}function I0(){let n=S.useContext(Oi);return Mf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function IT(){let n=S.useContext(Xr);return Mf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Rf=S.createContext(void 0);Rf.displayName="FrameworkContext";function U0(){let n=S.useContext(Rf);return Mf(n,"You must render this element inside a <HydratedRouter> element"),n}function UT(n,a){let i=S.useContext(Rf),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:v,onTouchStart:y}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let w=C=>{C.forEach(A=>{d(A.isIntersecting)})},j=new IntersectionObserver(w,{threshold:.5});return _.current&&j.observe(_.current),()=>{j.disconnect()}}},[n]),S.useEffect(()=>{if(o){let w=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(w)}}},[o]);let T=()=>{r(!0)},E=()=>{r(!1),d(!1)};return i?n!=="intent"?[u,_,{}]:[u,_,{onFocus:kl(p,T),onBlur:kl(m,E),onMouseEnter:kl(g,T),onMouseLeave:kl(v,E),onTouchStart:kl(y,T)}]:[!1,_,{}]}function kl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function zT({page:n,...a}){let{router:i}=I0(),o=S.useMemo(()=>x0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(HT,{page:n,matches:o,...a}):null}function VT(n){let{manifest:a,routeModules:i}=U0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return MT(n,a,i).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,i]),o}function HT({page:n,matches:a,...i}){let o=Zt(),{future:r,manifest:u,routeModules:d}=U0(),{basename:p}=I0(),{loaderData:m,matches:g}=IT(),v=S.useMemo(()=>Dy(n,a,g,u,o,"data"),[n,a,g,u,o]),y=S.useMemo(()=>Dy(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let w=new Set,j=!1;if(a.forEach(A=>{var V;let M=u.routes[A.route.id];!M||!M.hasLoader||(!v.some(D=>D.route.id===A.route.id)&&A.route.id in m&&((V=d[A.route.id])!=null&&V.shouldRevalidate)||M.hasClientLoader?j=!0:w.add(A.route.id))}),w.size===0)return[];let C=NT(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return j&&w.size>0&&C.searchParams.set("_routes",a.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,u,v,a,n,d]),T=S.useMemo(()=>RT(y,u),[y,u]),E=VT(y);return S.createElement(S.Fragment,null,_.map(w=>S.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...i})),T.map(w=>S.createElement("link",{key:w,rel:"modulepreload",href:w,...i})),E.map(({key:w,link:j})=>S.createElement("link",{key:w,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function PT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var GT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{GT&&(window.__reactRouterVersion="7.13.1")}catch{}function FT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=xx({window:o,v5Compat:!0}));let u=r.current,[d,p]=S.useState({action:u.action,location:u.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>u.listen(m),[u,m]),S.createElement(vT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:i})}var z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Of=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:p,state:m,target:g,to:v,preventScrollReset:y,viewTransition:_,unstable_defaultShouldRevalidate:T,...E},w){let{basename:j,navigator:C,unstable_useTransitions:A}=S.useContext(mn),M=typeof v=="string"&&z0.test(v),V=j0(v,j);v=V.to;let D=tT(v,{relative:r}),G=Zt(),H=null;if(p){let Q=Zr(p,[],G.unstable_mask?G.unstable_mask.pathname:"/",!0);j!=="/"&&(Q.pathname=Q.pathname==="/"?j:Yn([j,Q.pathname])),H=C.createHref(Q)}let[R,X,te]=UT(o,E),ne=KT(v,{replace:d,unstable_mask:p,state:m,target:g,preventScrollReset:y,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:A});function ie(Q){a&&a(Q),Q.defaultPrevented||ne(Q)}let ue=!(V.isExternal||u),q=S.createElement("a",{...E,...te,href:(ue?H:void 0)||V.absoluteURL||D,onClick:ue?ie:a,ref:PT(w,X),target:g,"data-discover":!M&&i==="render"?"true":void 0});return R&&!M?S.createElement(S.Fragment,null,q,S.createElement(zT,{page:D})):q});Of.displayName="Link";var $T=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:p,children:m,...g},v){let y=eo(d,{relative:g.relative}),_=Zt(),T=S.useContext(Xr),{navigator:E,basename:w}=S.useContext(mn),j=T!=null&&WT(y)&&p===!0,C=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,A=_.pathname,M=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(A=A.toLowerCase(),M=M?M.toLowerCase():null,C=C.toLowerCase()),M&&w&&(M=xa(M,w)||M);const V=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let D=A===C||!r&&A.startsWith(C)&&A.charAt(V)==="/",G=M!=null&&(M===C||!r&&M.startsWith(C)&&M.charAt(C.length)==="/"),H={isActive:D,isPending:G,isTransitioning:j},R=D?a:void 0,X;typeof o=="function"?X=o(H):X=[o,D?"active":null,G?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let te=typeof u=="function"?u(H):u;return S.createElement(Of,{...g,"aria-current":R,className:X,ref:v,style:te,to:d,viewTransition:p},typeof m=="function"?m(H):m)});$T.displayName="NavLink";var qT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:u,method:d=kr,action:p,onSubmit:m,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_,...T},E)=>{let{unstable_useTransitions:w}=S.useContext(mn),j=QT(),C=JT(p,{relative:g}),A=d.toLowerCase()==="get"?"get":"post",M=typeof p=="string"&&z0.test(p),V=D=>{if(m&&m(D),D.defaultPrevented)return;D.preventDefault();let G=D.nativeEvent.submitter,H=(G==null?void 0:G.getAttribute("formmethod"))||d,R=()=>j(G||D.currentTarget,{fetcherKey:a,method:H,navigate:i,replace:r,state:u,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_});w&&i!==!1?S.startTransition(()=>R()):R()};return S.createElement("form",{ref:E,method:A,action:C,onSubmit:o?m:V,...T,"data-discover":!M&&n==="render"?"true":void 0})});qT.displayName="Form";function YT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function V0(n){let a=S.useContext(Oi);return st(a,YT(n)),a}function KT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let v=Qr(),y=Zt(),_=eo(n,{relative:d});return S.useCallback(T=>{if(ET(T,a)){T.preventDefault();let E=i!==void 0?i:Fl(y)===Fl(_),w=()=>v(n,{replace:E,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>w()):w()}},[y,v,_,i,o,r,a,n,u,d,p,m,g])}function Bf(n){wn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Qd(n)),i=S.useRef(!1),o=Zt(),r=S.useMemo(()=>CT(o.search,i.current?null:a.current),[o.search]),u=Qr(),d=S.useCallback((p,m)=>{const g=Qd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,u("?"+g,m)},[u,r]);return[r,d]}var ZT=0,XT=()=>`__${String(++ZT)}__`;function QT(){let{router:n}=V0("useSubmit"),{basename:a}=S.useContext(mn),i=pT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:p,method:m,encType:g,formData:v,body:y}=wT(u,a);if(d.navigate===!1){let _=d.fetcherKey||XT();await o(_,i,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:y,formMethod:d.method||m,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:v,body:y,formMethod:d.method||m,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,i])}function JT(n,{relative:a}={}){let{basename:i}=S.useContext(mn),o=S.useContext(Dn);st(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...eo(n||".",{relative:a})},d=Zt();if(n==null){u.search=d.search;let p=new URLSearchParams(u.search),m=p.getAll("index");if(m.some(v=>v==="")){p.delete("index"),m.filter(y=>y).forEach(y=>p.append("index",y));let v=p.toString();u.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Yn([i,u.pathname])),Fl(u)}function WT(n,{relative:a}={}){let i=S.useContext(N0);st(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=V0("useViewTransitionState"),r=eo(n,{relative:a});if(!i.isTransitioning)return!1;let u=xa(i.currentLocation.pathname,o)||i.currentLocation.pathname,d=xa(i.nextLocation.pathname,o)||i.nextLocation.pathname;return $l(r.pathname,d)!=null||$l(r.pathname,u)!=null}function Un(){const n=Qr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function H0(n){return`/sessions/${encodeURIComponent(n)}`}function ql(n){return`/projects/${encodeURIComponent(n)}`}function ts(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function eE(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Rs(n,a){const i=new URLSearchParams({project:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function P0(n){return`/sessions/new?${new URLSearchParams({env:n}).toString()}`}const ky="/environments/new",Ni="/settings",tE="/pair";function Nn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Yl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function nE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function My(n){return Nn(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function Ry(n){return Nn(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function aE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function sE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function iE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function lE(n){return Nn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const oE=new Set(["off","subscription","api_key"]),Ad=new Set(["off","on"]);function Oy(n){return Nn(n)&&oE.has(n.claude)&&Ad.has(n.github)&&Ad.has(n.copilot)&&Ad.has(n.codex)}function rE(n){return Nn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function cE(n){return Nn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Kn(n,a,i,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Yl(i,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Yl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function uE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Nn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}const i={type:a.type,payload:Nn(a.payload)?a.payload:void 0};return typeof a.id=="string"&&(i.id=a.id),typeof a.timestamp=="string"&&(i.timestamp=a.timestamp),i}function dE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const fE=3e3,_i=5e3,hE=4001;function pE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,u]=S.useState(!1),d=S.useRef(a.onMessage);d.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(v=>{var y;((y=o.current)==null?void 0:y.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(v))},[]);return S.useEffect(()=>{let v,y;function _(){v=new WebSocket(i),o.current=v,v.onopen=()=>{u(!0),p.current(g)},v.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const E=uE(T.data);E&&d.current(E)},v.onclose=T=>{var E;if(u(!1),o.current=void 0,(E=m.current)==null||E.call(m),clearTimeout(y),T.code===hE){window.location.href=tE;return}y=setTimeout(_,fE)},v.onerror=()=>{v.close()}}return _(),()=>{clearTimeout(y),v==null||v.close()}},[i,g]),{connected:r,send:g}}const mE=5e3;function gE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),u=S.useCallback(y=>{switch(y.type){case"environment.added":return!0;case"environment.removed":{const _=y.payload.environmentId;return _&&(i(T=>T.filter(E=>E.id!==_)),r(T=>{const E={...T};return delete E[_],E})),n({type:"list_sessions"}),!0}case"environment.changed":return n({type:"list_environments"}),!0;case"environment.provision_progress":{const _=y.payload;if(typeof _.environmentId!="string"||typeof _.stage!="string"||typeof _.message!="string"||typeof _.progress!="number")return Yl("environment.provision_progress","invalid payload"),!0;if(r(T=>({...T,[_.environmentId]:{stage:_.stage,message:_.message,progress:_.progress}})),_.stage==="ready"){const T=_.environmentId;setTimeout(()=>{r(E=>{const w={...E};return delete w[T],w})},mE)}return!0}default:return!1}},[n]),d=S.useCallback(y=>{var _;switch(y.type){case"environments":return i(Kn((_=y.payload)==null?void 0:_.environments,nE,"environments","environments")),!0;default:return!1}},[]),p=S.useCallback((y,_,T)=>{n({type:"add_environment",payload:{displayName:y,adapterType:_,adapterConfig:T||{}}})},[n]),m=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),v=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:p,provisionEnvironment:m,stopEnvironment:g,removeEnvironment:v,handleMessage:d,handleEvent:u}}const jd=new Set(["pending","running","idle"]),yE=new Set(["completed","failed","interrupted"]),By=["pending","running","idle"];function vE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[u,d]=S.useState(0),[p,m]=S.useState(void 0),[g,v]=S.useState({}),y=S.useCallback(A=>{var M,V,D,G,H;switch(A.type){case"sessions":return i(R=>{var ne;const X=Kn((ne=A.payload)==null?void 0:ne.sessions,My,"sessions","sessions"),te=new Map(R.map(ie=>[ie.id,ie.status]));return X.map(ie=>{const ue=te.get(ie.id);return!ue||ue===ie.status?ie:yE.has(ue)&&jd.has(ie.status)?{...ie,status:ue}:jd.has(ue)&&jd.has(ie.status)&&By.indexOf(ue)>By.indexOf(ie.status)?{...ie,status:ue}:ie})}),!0;case"session_event":{if(!Ry(A.payload))return Yl("session_event","payload is not a valid SessionEvent"),!0;const R=A.payload;let X=0;if(r(te=>{const ne=[...te,R];return ne.length>_i?(X=ne.length-_i,ne.slice(-_i)):ne}),X>0&&d(te=>te+X),R.eventType==="status"){const te=dE(R.content);i(ne=>ne.some(ue=>ue.id===R.sessionId)?ne.map(ue=>ue.id===R.sessionId?{...ue,status:te}:ue):[...ne,{id:R.sessionId,environmentId:"",runtime:"",status:te,prompt:"",startedAt:R.timestamp}])}return!0}case"session_events":{const R=Kn((M=A.payload)==null?void 0:M.events,Ry,"session_events","events"),X=(V=A.payload)==null?void 0:V.sessionId;if(typeof X!="string")return Yl("session_events","missing or non-string sessionId"),!0;if(R.length>0){let te=0;r(ne=>{const ie=new Set;for(const Q of ne)Q.sessionId===X&&ie.add(`${Q.timestamp}|${Q.eventType}`);const ue=R.filter(Q=>!ie.has(`${Q.timestamp}|${Q.eventType}`)),q=[...ne,...ue].sort((Q,B)=>Q.sessionId!==B.sessionId?0:Q.timestamp.localeCompare(B.timestamp));return q.length>_i?(te=q.length-_i,q.slice(-_i)):q}),te>0&&d(ne=>ne+te)}return!0}case"spawned":{const R=(D=A.payload)==null?void 0:D.sessionId;return typeof R=="string"&&R&&m(R),n({type:"list_sessions"}),!0}case"task_sessions":{const R=(G=A.payload)==null?void 0:G.taskId;if(typeof R!="string"||!R)return!0;const X=Kn((H=A.payload)==null?void 0:H.sessions,My,"task_sessions","sessions");return v(te=>({...te,[R]:X})),!0}default:return!1}},[n]),_=S.useCallback((A,M,V,D)=>{n({type:"spawn",payload:{environmentId:A,prompt:M,personaId:V||"",worktreeBasePath:D||""}})},[n]),T=S.useCallback((A,M)=>{n({type:"send_input",payload:{sessionId:A,text:M}})},[n]),E=S.useCallback(A=>{n({type:"kill",payload:{sessionId:A}})},[n]),w=S.useCallback(A=>{n({type:"get_session_events",payload:{sessionId:A}})},[n]),j=S.useCallback(()=>{r([]),d(0)},[]),C=S.useCallback(A=>{n({type:"get_task_sessions",payload:{taskId:A}})},[n]);return{sessions:a,events:o,eventsDropped:u,lastSpawnedId:p,taskSessions:g,spawn:_,sendInput:T,kill:E,loadSessionEvents:w,clearEvents:j,loadTaskSessions:C,handleMessage:y}}function bE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),u=S.useCallback(y=>{switch(y.type){case"project.created":return r(!1),n({type:"list_projects"}),!0;case"project.archived":case"project.updated":return n({type:"list_projects"}),!0;default:return!1}},[n]),d=S.useCallback(y=>{var _;switch(y.type){case"projects":return i(Kn((_=y.payload)==null?void 0:_.projects,aE,"projects","projects")),!0;default:return!1}},[]),p=S.useCallback(()=>{r(!1)},[]),m=S.useCallback((y,_,T,E,w)=>{r(!0),n({type:"create_project",payload:{name:y,description:_||"",repoUrl:T||"",defaultEnvironmentId:E||"",defaultPersonaId:w||""}})},[n]),g=S.useCallback(y=>{n({type:"archive_project",payload:{projectId:y}})},[n]),v=S.useCallback((y,_)=>{n({type:"update_project",payload:{projectId:y,..._}})},[n]);return{projects:a,projectCreating:o,createProject:m,archiveProject:g,updateProject:v,handleMessage:d,handleEvent:u,onDisconnect:p}}const SE=15e3;function _E(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),u=S.useRef(new Map),d=S.useCallback(j=>{const C=j.payload;switch(j.type){case"task.created":{const A=typeof C.requestId=="string"?C.requestId:"";if(A){const V=u.current.get(A);V&&(clearTimeout(V.timer),u.current.delete(A),V.onSuccess())}const M=typeof C.projectId=="string"?C.projectId:"";return M&&n({type:"list_tasks",payload:{projectId:M}}),!0}case"task.started":{const A=typeof C.taskId=="string"?C.taskId:"",M=typeof C.sessionId=="string"?C.sessionId:"",V=typeof C.projectId=="string"?C.projectId:"";return r(D=>A&&D===A?void 0:D),M&&(n({type:"list_sessions"}),A&&i(D=>D.map(G=>G.id===A?{...G,latestSessionId:M}:G))),V?n({type:"list_tasks",payload:{projectId:V}}):A&&i(D=>{const G=D.find(H=>H.id===A);return G&&n({type:"list_tasks",payload:{projectId:G.projectId}}),D}),!0}case"task.completed":case"task.deleted":case"task.updated":{const A=typeof C.projectId=="string"?C.projectId:"",M=typeof C.taskId=="string"?C.taskId:"";return A?n({type:"list_tasks",payload:{projectId:A}}):M&&i(V=>{const D=V.find(G=>G.id===M);return D&&n({type:"list_tasks",payload:{projectId:D.projectId}}),V}),!0}default:return!1}},[n]),p=S.useCallback(j=>{var C,A,M,V;switch(j.type){case"tasks":{const D=Kn((C=j.payload)==null?void 0:C.tasks,sE,"tasks","tasks"),G=(typeof((A=j.payload)==null?void 0:A.projectId)=="string"?j.payload.projectId:"")||(D.length>0?D[0].projectId:"");return G?(i(H=>[...H.filter(R=>R.projectId!==G),...D]),!0):(i(D),!0)}case"create_task_error":{const D=typeof((M=j.payload)==null?void 0:M.requestId)=="string"?j.payload.requestId:"",G=typeof((V=j.payload)==null?void 0:V.message)=="string"?j.payload.message:"Failed to create task";if(D){const H=u.current.get(D);H?(clearTimeout(H.timer),u.current.delete(D),H.onError(G)):console.error("[useTasks] create_task_error with unknown requestId:",G)}else console.error("[useTasks] create_task_error:",G);return!0}default:return!1}},[]),m=S.useCallback(()=>{r(void 0);for(const[,j]of u.current)clearTimeout(j.timer),j.onError("Disconnected");u.current.clear()},[]),g=S.useCallback(j=>{n({type:"list_tasks",payload:{projectId:j}})},[n]),v=S.useCallback((j,C,A,M,V,D,G,H)=>{const R={projectId:j,title:C,description:A||"",dependsOn:M||[],parentTaskId:V||"",defaultPersonaId:D||""};if(G||H){const X=crypto.randomUUID();R.requestId=X;const te=H??(()=>{}),ne=setTimeout(()=>{u.current.delete(X)&&te("Request timed out")},SE);u.current.set(X,{onSuccess:G??(()=>{}),onError:te,timer:ne})}n({type:"create_task",payload:R})},[n]),y=S.useCallback((j,C,A,M)=>{r(j),n({type:"start_task",payload:{taskId:j,personaId:C||"",environmentId:A||"",notes:M||""}})},[n]),_=S.useCallback(j=>{n({type:"complete_task",payload:{taskId:j}})},[n]),T=S.useCallback(j=>{n({type:"resume_task",payload:{taskId:j}})},[n]),E=S.useCallback((j,C,A,M,V)=>{const D={taskId:j,title:C,description:A,dependsOn:M};V!==void 0&&(D.defaultPersonaId=V),n({type:"update_task",payload:D})},[n]),w=S.useCallback(j=>{n({type:"delete_task",payload:{taskId:j}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:g,createTask:v,startTask:y,completeTask:_,resumeTask:T,updateTask:E,deleteTask:w,handleMessage:p,handleEvent:d,onDisconnect:m}}function xE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{if(p.type==="finding.posted"){const m=typeof p.payload.projectId=="string"?p.payload.projectId:"";return m&&n({type:"list_findings",payload:{projectId:m}}),!0}return!1},[n]),r=S.useCallback(p=>{var m;switch(p.type){case"findings":return i(Kn((m=p.payload)==null?void 0:m.findings,iE,"findings","findings")),!0;default:return!1}},[]),u=S.useCallback(p=>{n({type:"list_findings",payload:{projectId:p}})},[n]),d=S.useCallback((p,m,g,v,y)=>{n({type:"post_finding",payload:{projectId:p,title:m,content:g,category:v||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:u,postFinding:d,handleMessage:r,handleEvent:o}}function TE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>m.type==="token.changed"?(n({type:"list_tokens"}),!0):!1,[n]),r=S.useCallback(m=>{var g;switch(m.type){case"tokens":return i(Kn((g=m.payload)==null?void 0:g.tokens,lE,"tokens","tokens")),!0;default:return!1}},[]),u=S.useCallback(()=>{n({type:"list_tokens"})},[n]),d=S.useCallback((m,g,v,y,_)=>{n({type:"set_token",payload:{name:m,value:g,tokenType:v,envVar:y,filePath:_}})},[n]),p=S.useCallback(m=>{n({type:"delete_token",payload:{name:m}})},[n]);return{tokens:a,loadTokens:u,setToken:d,deleteToken:p,handleMessage:r,handleEvent:o}}function EE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(d=>d.type==="credential.providers_changed"?(Oy(d.payload)&&i(d.payload),!0):!1,[]),r=S.useCallback(d=>{switch(d.type){case"credential_providers":return Oy(d.payload)&&i(d.payload),!0;default:return!1}},[]),u=S.useCallback(d=>{n({type:"set_credential_providers",payload:d})},[n]);return{credentialProviders:a,updateCredentialProviders:u,handleMessage:r,handleEvent:o}}function CE(n,a){const[i,o]=S.useState([]),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState(!1),v=S.useCallback(T=>{var E,w,j;switch(T.type){case"codespaces_list":{const C=Kn((E=T.payload)==null?void 0:E.codespaces,rE,"codespaces_list","codespaces"),A=typeof((w=T.payload)==null?void 0:w.error)=="string"?T.payload.error:"";return o(C),p(A),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const C=typeof((j=T.payload)==null?void 0:j.message)=="string"?T.payload.message:"Failed to create codespace";return u(C),!0}default:return!1}},[n]),y=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),_=S.useCallback((T,E)=>{if(!a){u("Not connected to server. Please try again once the connection is restored.");return}g(!0),u("");const w={repo:T};E&&(w.machine=E),n({type:"create_codespace",payload:w})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:d,codespaceCreating:m,listCodespaces:y,createCodespace:_,handleMessage:v}}function AE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>{switch(m.type){case"persona.created":case"persona.updated":case"persona.deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback(m=>{var g;switch(m.type){case"personas":{const v=Kn((g=m.payload)==null?void 0:g.personas,cE,"personas","personas");return i(v),!0}default:return!1}},[]),u=S.useCallback((m,g,v,y,_,T)=>{n({type:"create_persona",payload:{name:m,description:g,systemPrompt:v,runtime:y||"",model:_||"",maxTurns:T||0}})},[n]),d=S.useCallback((m,g,v,y,_,T,E)=>{n({type:"update_persona",payload:{personaId:m,name:g||"",description:v||"",systemPrompt:y||"",runtime:_||"",model:T||"",maxTurns:E||0}})},[n]),p=S.useCallback(m=>{n({type:"delete_persona",payload:{personaId:m}})},[n]);return{personas:a,createPersona:u,updatePersona:d,deletePersona:p,handleMessage:r,handleEvent:o}}function jE(n){const[a,i]=S.useState(""),{connected:o,send:r}=pE(n,{onMessage:C,onConnect:A,onDisconnect:M}),u=gE(r),d=vE(r),p=bE(r),m=_E(r),g=xE(r),v=TE(r),y=EE(r),_=CE(r,o),T=AE(r),E="default_persona_id",w=S.useCallback(D=>{i(D),r({type:"set_setting",payload:{key:E,value:D}})},[r]);function j(D){const G=D.payload.key,H=D.payload.value;if(D.type==="setting.changed"){G===E&&i(H??"");return}u.handleEvent(D)||p.handleEvent(D)||m.handleEvent(D)||g.handleEvent(D)||v.handleEvent(D)||y.handleEvent(D)||T.handleEvent(D)}function C(D){var G,H,R;if(typeof D.type=="string"&&D.type.includes(".")){const X=D,te={id:X.id??"",type:D.type,timestamp:X.timestamp??"",payload:D.payload??{}};j(te);return}if(D.type==="setting"){const X=(G=D.payload)==null?void 0:G.key,te=(H=D.payload)==null?void 0:H.value;X===E&&i(te??"");return}if(!u.handleMessage(D)&&!d.handleMessage(D)&&!p.handleMessage(D)&&!m.handleMessage(D)&&!g.handleMessage(D)&&!v.handleMessage(D)&&!y.handleMessage(D)&&!_.handleMessage(D)&&!T.handleMessage(D)&&D.type==="error"){console.error("[ws]",(R=D.payload)==null?void 0:R.message);return}}function A(D){D({type:"list_environments"}),D({type:"list_sessions"}),D({type:"list_projects"}),D({type:"list_tokens"}),D({type:"get_credential_providers"}),D({type:"list_personas"}),D({type:"get_setting",payload:{key:E}}),D({type:"subscribe_all"})}function M(){p.onDisconnect(),m.onDisconnect()}const V=S.useCallback(()=>{r({type:"list_environments"}),r({type:"list_sessions"}),r({type:"list_projects"}),r({type:"list_tokens"})},[r]);return{connected:o,environments:u.environments,sessions:d.sessions,events:d.events,eventsDropped:d.eventsDropped,lastSpawnedId:d.lastSpawnedId,projects:p.projects,tasks:m.tasks,findings:g.findings,tokens:v.tokens,spawn:d.spawn,sendInput:d.sendInput,kill:d.kill,refresh:V,loadSessionEvents:d.loadSessionEvents,clearEvents:d.clearEvents,createProject:p.createProject,archiveProject:p.archiveProject,updateProject:p.updateProject,loadTasks:m.loadTasks,createTask:m.createTask,startTask:m.startTask,completeTask:m.completeTask,resumeTask:m.resumeTask,updateTask:m.updateTask,deleteTask:m.deleteTask,loadFindings:g.loadFindings,postFinding:g.postFinding,addEnvironment:u.addEnvironment,loadTokens:v.loadTokens,setToken:v.setToken,deleteToken:v.deleteToken,credentialProviders:y.credentialProviders,updateCredentialProviders:y.updateCredentialProviders,provisionStatus:u.provisionStatus,provisionEnvironment:u.provisionEnvironment,stopEnvironment:u.stopEnvironment,removeEnvironment:u.removeEnvironment,codespaces:_.codespaces,codespaceError:_.codespaceError,codespaceListError:_.codespaceListError,codespaceCreating:_.codespaceCreating,listCodespaces:_.listCodespaces,createCodespace:_.createCodespace,projectCreating:p.projectCreating,taskStartingId:m.taskStartingId,personas:T.personas,createPersona:T.createPersona,updatePersona:T.updatePersona,deletePersona:T.deletePersona,taskSessions:d.taskSessions,loadTaskSessions:d.loadTaskSessions,appDefaultPersonaId:a,setAppDefaultPersonaId:w}}const Lf=S.createContext(void 0);function wE({children:n}){const a=jE();return h.jsx(Lf.Provider,{value:a,children:n})}function Gt(){const n=S.useContext(Lf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const NE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",status:"disconnected",bootstrapped:!1}],DE=[{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"}],kE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
|
|
37
|
+
- src/middleware/auth.ts
|
|
38
|
+
- src/routes/login.ts
|
|
39
|
+
- src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
|
|
40
|
+
\`\`\`typescript
|
|
41
|
+
import jwt from "jsonwebtoken";
|
|
42
|
+
import type { Request, Response, NextFunction } from "express";
|
|
43
|
+
|
|
44
|
+
const JWT_SECRET = process.env.JWT_SECRET || "change-me";
|
|
45
|
+
|
|
46
|
+
export function verifyToken(req: Request, res: Response, next: NextFunction): void {
|
|
47
|
+
const header = req.headers.authorization;
|
|
48
|
+
if (!header?.startsWith("Bearer ")) {
|
|
49
|
+
res.status(401).json({ error: "Missing token" });
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
const decoded = jwt.verify(header.slice(7), JWT_SECRET);
|
|
54
|
+
req.user = decoded;
|
|
55
|
+
next();
|
|
56
|
+
} catch {
|
|
57
|
+
res.status(403).json({ error: "Invalid token" });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
\`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],ME=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],RE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,defaultPersonaId:""},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,defaultPersonaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,defaultPersonaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""}],Ly=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],OE=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],BE=[{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"}],LE={"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 Rt(n){return new Date(Date.now()+n).toISOString()}const Iy=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Rt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Rt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Rt(1600),content:`Found 5 endpoints that need refactoring:
|
|
61
|
+
- GET /api/users
|
|
62
|
+
- POST /api/users
|
|
63
|
+
- GET /api/users/:id
|
|
64
|
+
- PUT /api/users/:id
|
|
65
|
+
- DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:Rt(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:Rt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Rt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Rt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Rt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Rt(1400),content:`Found tables to modify:
|
|
66
|
+
- users (add column: last_login_at)
|
|
67
|
+
- sessions (add index on expires_at)
|
|
68
|
+
- audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:Rt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
|
|
69
|
+
The table has 50,000+ rows — this may lock the table briefly.
|
|
70
|
+
|
|
71
|
+
Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:Rt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Rt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
|
|
72
|
+
Migration 002_sessions_index.sql applied successfully.
|
|
73
|
+
Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:Rt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Rt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Rt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Rt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Rt(1800),content:`Writing test cases:
|
|
74
|
+
- should calculate monthly total
|
|
75
|
+
- should apply discount codes
|
|
76
|
+
- should handle currency conversion
|
|
77
|
+
- should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:Rt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
|
|
78
|
+
The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:Rt(3500),content:"failed"}}]}],Uy=400;function IE({children:n}){const[a,i]=S.useState(DE),[o,r]=S.useState(kE),[u,d]=S.useState(void 0),[p,m]=S.useState(ME),[g,v]=S.useState(RE),[y,_]=S.useState(Ly),[T,E]=S.useState(OE),[w,j]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,A]=S.useState(BE),[M]=S.useState(LE),[V,D]=S.useState(""),G=S.useRef(0),H=S.useRef(0),R=S.useRef(new Set),X=S.useRef(new Map),te=S.useRef(g);te.current=g;const ne=S.useRef(new Map),ie=S.useRef(new Map),ue=S.useCallback(Z=>(G.current+=1,`mock-${Z}-${String(G.current).padStart(3,"0")}`),[]),q=S.useCallback(()=>{const Z=Iy[H.current%Iy.length];return H.current+=1,Z},[]),Q=S.useCallback((Z,J,ae)=>{const ge=setTimeout(()=>{var pe;R.current.delete(ge),ae&&((pe=X.current.get(ae))==null||pe.delete(ge)),Z()},J);R.current.add(ge),ae&&(X.current.has(ae)||X.current.set(ae,new Set),X.current.get(ae).add(ge))},[]),B=S.useCallback(Z=>{const J=X.current.get(Z);J&&(J.forEach(ae=>{clearTimeout(ae),R.current.delete(ae)}),X.current.delete(Z))},[]),F=S.useCallback((Z,J)=>{i(ae=>ae.map(ge=>ge.id===Z?{...ge,status:J}:ge))},[]),W=S.useCallback(Z=>{r(J=>[...J,Z])},[]),be=S.useCallback((Z,J,ae)=>{J.forEach((ge,pe)=>{Q(()=>{const Ue={sessionId:Z,...ge.event,timestamp:new Date().toISOString()};W(Ue),ge.event.eventType==="status"&&F(Z,ge.event.content),pe===J.length-1&&ae&&ae()},ge.delayMs,Z)})},[Q,W,F]),Te=S.useCallback((Z,J,ae,ge)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:J,runtime:ge});const pe=ue("sess"),Ue={id:pe,environmentId:Z,runtime:ge||"claude-code",status:"running",prompt:J,startedAt:new Date().toISOString()};i(yt=>[...yt,Ue]),d(pe);const Ce=q();if(console.log(`[MockGrackle] Playing scenario: ${Ce.label}`),Ce.pauseForInput){const yt=Ce.pauseAfterStep??Ce.steps.length-1,xe=Ce.steps.slice(0,yt+1),ft=xe.length>0?xe[xe.length-1].delayMs:0;be(pe,xe),Q(()=>{F(pe,"idle"),W({sessionId:pe,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},ft+Uy,pe),Ce.resumeSteps&&ne.current.set(pe,Ce.resumeSteps)}else be(pe,Ce.steps)},[ue,q,be,Q,F,W]),tt=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),B(Z),ne.current.delete(Z),F(Z,"interrupted"),W({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),v(J=>J.map(ae=>ae.latestSessionId===Z&&ae.status==="working"?{...ae,status:"not_started"}:ae))},[B,F,W]),Me=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),fe=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),Ie=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),Ee=S.useCallback((Z,J,ae,ge,pe)=>{console.log("[MockGrackle] createProject",{name:Z,description:J});const Ue={id:ue("proj"),name:Z,description:J||"",repoUrl:ae||"",defaultEnvironmentId:ge||"",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:pe||"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(Ce=>[...Ce,Ue])},[ue]),ee=S.useCallback(Z=>{console.log("[MockGrackle] archiveProject",Z),m(J=>J.map(ae=>ae.id===Z?{...ae,status:"archived"}:ae))},[]),Ve=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),we=S.useCallback((Z,J,ae,ge,pe,Ue,Ce,yt)=>{console.log("[MockGrackle] createTask",{projectId:Z,title:J,parentTaskId:pe}),v(xe=>{const vt=xe.filter(Ne=>Ne.projectId===Z).reduce((Ne,Tt)=>Math.max(Ne,Tt.sortOrder),0),Oe=pe?xe.find(Ne=>Ne.id===pe):void 0;if(pe&&!Oe)return console.warn("[MockGrackle] Parent task not found:",pe),xe;if(Oe&&!Oe.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",pe),xe;const kt=Oe?Oe.depth+1:0,Se={id:ue("task"),projectId:Z,title:J,description:ae||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ge||[],reviewNotes:void 0,sortOrder:vt+1,createdAt:new Date().toISOString(),parentTaskId:pe||"",depth:kt,childTaskIds:[],canDecompose:!pe,defaultPersonaId:Ue||""};return[...xe,Se]}),Ce&&Ce()},[ue]),_e=S.useCallback((Z,J,ae,ge)=>{var ft;console.log("[MockGrackle] startTask",{taskId:Z});const pe=te.current.find(vt=>vt.id===Z),Ue=(pe==null?void 0:pe.title)??"",Ce=ue("sess"),yt={id:Ce,environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:Ue||Z,startedAt:new Date().toISOString()};i(vt=>[...vt,yt]),v(vt=>vt.map(Oe=>Oe.id===Z?{...Oe,status:"working",latestSessionId:Ce,branch:`mock/${Z.slice(0,8)}`}:Oe));const xe=q();if(console.log(`[MockGrackle] Playing task scenario: ${xe.label}`),xe.pauseForInput){const vt=xe.pauseAfterStep??xe.steps.length-1,Oe=xe.steps.slice(0,vt+1),kt=Oe.length>0?Oe[Oe.length-1].delayMs:0;if(be(Ce,Oe),Q(()=>{F(Ce,"idle"),W({sessionId:Ce,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},kt+Uy,Ce),xe.resumeSteps){const Se=[...xe.resumeSteps];ne.current.set(Ce,Se);const Ne=Se.reduce((Tt,le)=>Math.max(Tt,le.delayMs),0);ie.current.set(Ce,{taskId:Z,delayAfterResume:Ne+200})}}else{const vt=xe.steps.length>0?xe.steps[xe.steps.length-1].delayMs:0;be(Ce,xe.steps);const Oe=(ft=xe.steps[xe.steps.length-1])==null?void 0:ft.event.content;Q(()=>{Oe==="completed"?v(kt=>kt.map(Se=>Se.id===Z&&Se.status==="working"?{...Se,status:"paused"}:Se)):Oe==="failed"&&v(kt=>kt.map(Se=>Se.id===Z&&Se.status==="working"?{...Se,status:"failed"}:Se))},vt+100,Ce)}},[ue,q,be,Q,F,W]),ut=S.useCallback((Z,J)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:J}),W({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${J}`}),F(Z,"running"),W({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ae=ne.current.get(Z);if(ae)ne.current.delete(Z),be(Z,ae);else{const pe=[{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"}}];be(Z,pe)}const ge=ie.current.get(Z);ge&&(ie.current.delete(Z),Q(()=>{v(pe=>pe.map(Ue=>Ue.id===ge.taskId&&Ue.status==="working"?{...Ue,status:"paused"}:Ue))},ge.delayAfterResume,Z))},[W,F,be,Q]),dt=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),v(J=>J.map(ae=>ae.id===Z?{...ae,status:"complete"}:ae))},[]),Lt=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),Dt=S.useCallback((Z,J,ae,ge,pe)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:J}),v(Ue=>Ue.map(Ce=>Ce.id===Z?{...Ce,title:J.trim()||Ce.title,description:ae,dependsOn:ge,...pe!==void 0?{defaultPersonaId:pe}:{}}:Ce))},[]),$e=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),v(J=>J.filter(ae=>ae.id!==Z))},[]),Re=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),_(Ly.filter(J=>J.projectId===Z))},[]),kn=S.useCallback((Z,J,ae,ge,pe)=>{console.log("[MockGrackle] postFinding",{projectId:Z,title:J});const Ue={id:ue("find"),projectId:Z,taskId:"",sessionId:"",category:ge||"general",title:J,content:ae,tags:pe||[],createdAt:new Date().toISOString()};_(Ce=>[...Ce,Ue])},[ue]),Ca=S.useCallback((Z,J,ae)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:J,adapterConfig:ae})},[]),Aa=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),zn=S.useCallback((Z,J,ae,ge,pe)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:ae}),E(Ue=>[...Ue.filter(yt=>yt.name!==Z),{name:Z,tokenType:ae,envVar:ge,filePath:pe,expiresAt:""}])},[]),Jn=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),E(J=>J.filter(ae=>ae.name!==Z))},[]),Mn=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),j(Z)},[]);S.useEffect(()=>()=>{R.current.forEach(clearTimeout),R.current.clear()},[]);const Wn=S.useMemo(()=>({connected:!0,environments:NE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:p,tasks:g,findings:y,tokens:T,credentialProviders:w,spawn:Te,sendInput:ut,kill:tt,refresh:Me,loadSessionEvents:fe,clearEvents:Ie,createProject:Ee,archiveProject:ee,updateProject:(Z,J)=>{console.log("[MockGrackle] updateProject",{projectId:Z,...J}),m(ae=>ae.map(ge=>ge.id!==Z?ge:{...ge,...J.name!==void 0?{name:J.name}:{},...J.description!==void 0?{description:J.description}:{},...J.repoUrl!==void 0?{repoUrl:J.repoUrl}:{},...J.defaultEnvironmentId!==void 0?{defaultEnvironmentId:J.defaultEnvironmentId}:{},...J.worktreeBasePath!==void 0?{worktreeBasePath:J.worktreeBasePath}:{},...J.useWorktrees!==void 0?{useWorktrees:J.useWorktrees}:{},...J.defaultPersonaId!==void 0?{defaultPersonaId:J.defaultPersonaId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Ve,createTask:we,startTask:_e,completeTask:dt,resumeTask:Lt,updateTask:Dt,deleteTask:$e,loadFindings:Re,postFinding:kn,addEnvironment:Ca,loadTokens:Aa,setToken:zn,deleteToken:Jn,updateCredentialProviders:Mn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(Z,J,ae,ge,pe,Ue)=>{console.log("[MockGrackle] createPersona",{name:Z});const Ce={id:`mock-persona-${Date.now()}`,name:Z,description:J,systemPrompt:ae,toolConfig:"{}",runtime:ge??"claude-code",model:pe||"",maxTurns:Ue||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};A(yt=>[...yt,Ce])},updatePersona:(Z,J,ae,ge,pe,Ue,Ce)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:J}),A(yt=>yt.map(xe=>xe.id!==Z?xe:{...xe,...J!==void 0?{name:J}:{},...ae!==void 0?{description:ae}:{},...ge!==void 0?{systemPrompt:ge}:{},...pe!==void 0?{runtime:pe}:{},...Ue!==void 0?{model:Ue}:{},...Ce!==void 0?{maxTurns:Ce}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),A(J=>J.filter(ae=>ae.id!==Z))},taskSessions:M,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)},appDefaultPersonaId:V,setAppDefaultPersonaId:Z=>{console.log("[MockGrackle] setAppDefaultPersonaId",Z),D(Z)}}),[a,o,u,p,g,y,T,w,C,M,V,Te,ut,tt,Me,fe,Ie,Ee,ee,Ve,we,_e,dt,Lt,Dt,$e,Re,kn,Ca,Aa,zn,Jn,Mn]);return h.jsx(Lf.Provider,{value:Wn,children:n})}const G0=S.createContext(void 0),UE=4e3;function zE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{i(p=>p.filter(m=>m.id!==d))},[]),u=S.useCallback((d,p="info",m=UE)=>{const g=`toast-${++o.current}`;i(v=>[...v,{id:g,message:d,variant:p,duration:m}])},[]);return h.jsx(G0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function to(){const n=S.useContext(G0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const ec=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],F0=new Set(ec.map(n=>n.id)),zy="grackle";function Jd(n){return ec.find(a=>a.id===n)}const Wd="grackle-theme",$0="grackle-prefer-system",q0="(prefers-color-scheme: dark)";let Bl=[],Rr;function wd(){Rr=void 0;for(const n of Bl)n()}function ef(){return typeof window>"u"?!1:window.matchMedia(q0).matches}function zl(){if(typeof localStorage>"u")return zy;try{const n=localStorage.getItem(Wd);if(n!==null&&F0.has(n))return n}catch{}return zy}function Ir(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem($0)==="true"}catch{return!1}}function tf(n){return ec.find(a=>a.variantLightId===n||a.variantDarkId===n)}function Y0(n,a){const i=Jd(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?ef()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=tf(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return ef()?o.variantDarkId:o.variantLightId}return n}function Ti(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=Y0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ti(zl(),Ir());function VE(){return Rr===void 0&&(Rr={themeId:zl(),systemDark:ef(),preferSystem:Ir()}),Rr}function HE(n){return Bl=[...Bl,n],()=>{Bl=Bl.filter(a=>a!==n)}}function PE(){const n=S.useSyncExternalStore(HE,VE),{themeId:a,preferSystem:i}=n,o=Y0(a,i),r=S.useCallback(d=>{if(F0.has(d)){try{localStorage.setItem(Wd,d)}catch{}Ti(d,Ir(),!0),wd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem($0,d?"true":"false")}catch{}if(d){const p=zl(),m=Jd(p);if(m!=null&&m.hidden){const g=tf(p);if(g)try{localStorage.setItem(Wd,g.id)}catch{}}}Ti(zl(),d,!0),wd()},[]);return S.useEffect(()=>{Ti(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(q0),p=()=>{const m=zl(),g=Ir();if(g){const v=Jd(m);if(v!=null&&v.variantDarkId&&v.variantLightId&&Ti(m,g),v!=null&&v.hidden){const y=tf(m);y!=null&&y.variantDarkId&&y.variantLightId&&Ti(m,g)}}wd()};return d.addEventListener("change",p),()=>{d.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:u}}const K0=S.createContext(void 0);function GE({children:n}){const a=PE();return h.jsx(K0.Provider,{value:a,children:n})}function Z0(){const n=S.useContext(K0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const FE="_container_eix8p_1",$E="_hamburger_eix8p_33",qE="_brand_eix8p_49",YE="_info_eix8p_65",KE="_connectionLabel_eix8p_80",ZE="_connectionDot_eix8p_93",XE="_connected_eix8p_96",QE="_disconnected_eix8p_100",JE="_settingsButton_eix8p_104",va={container:FE,hamburger:$E,brand:qE,info:YE,connectionLabel:KE,connectionDot:ZE,connected:XE,disconnected:QE,settingsButton:JE};function WE({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=Gt(),u=Un(),d=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:va.container,children:[n&&h.jsx("button",{type:"button",className:va.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:va.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:va.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${va.connectionDot} ${i?va.connected:va.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:va.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:va.settingsButton,onClick:()=>u(Ni),title:"Settings",children:"⚙"})]})]})}const If=S.createContext({});function Uf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const tc=S.createContext(null),zf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class eC extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=i.offsetHeight||0,o.width=i.offsetWidth||0,o.top=i.offsetTop,o.left=i.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tC({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(zf);return S.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g}=r.current;if(a||!o.current||!d||!p)return;o.current.dataset.motionPopId=i;const v=document.createElement("style");return u&&(v.nonce=u),document.head.appendChild(v),v.sheet&&v.sheet.insertRule(`
|
|
79
|
+
[data-motion-pop-id="${i}"] {
|
|
80
|
+
position: absolute !important;
|
|
81
|
+
width: ${d}px !important;
|
|
82
|
+
height: ${p}px !important;
|
|
83
|
+
top: ${m}px !important;
|
|
84
|
+
left: ${g}px !important;
|
|
85
|
+
}
|
|
86
|
+
`),()=>{document.head.removeChild(v)}},[a]),h.jsx(eC,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const nC=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const p=Uf(aC),m=S.useId(),g=S.useCallback(y=>{p.set(y,!0);for(const _ of p.values())if(!_)return;o&&o()},[p,o]),v=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:y=>(p.set(y,!1),()=>p.delete(y))}),u?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((y,_)=>p.set(_,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),d==="popLayout"&&(n=h.jsx(tC,{isPresent:i,children:n})),h.jsx(tc.Provider,{value:v,children:n})};function aC(){return new Map}function X0(n=!0){const a=S.useContext(tc);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!i&&o?[!1,d]:[!0]}const Tr=n=>n.key||"";function Vy(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Vf=typeof window<"u",Q0=Vf?S.useLayoutEffect:S.useEffect,Qn=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[p,m]=X0(d),g=S.useMemo(()=>Vy(n),[n]),v=d&&!p?[]:g.map(Tr),y=S.useRef(!0),_=S.useRef(g),T=Uf(()=>new Map),[E,w]=S.useState(g),[j,C]=S.useState(g);Q0(()=>{y.current=!1,_.current=g;for(let V=0;V<j.length;V++){const D=Tr(j[V]);v.includes(D)?T.delete(D):T.get(D)!==!0&&T.set(D,!1)}},[j,v.length,v.join("-")]);const A=[];if(g!==E){let V=[...g];for(let D=0;D<j.length;D++){const G=j[D],H=Tr(G);v.includes(H)||(V.splice(D,0,G),A.push(G))}u==="wait"&&A.length&&(V=A),C(Vy(V)),w(g);return}const{forceRender:M}=S.useContext(If);return h.jsx(h.Fragment,{children:j.map(V=>{const D=Tr(V),G=d&&!p?!1:g===j||v.includes(D),H=()=>{if(T.has(D))T.set(D,!0);else return;let R=!0;T.forEach(X=>{X||(R=!1)}),R&&(M==null||M(),C(_.current),d&&(m==null||m()),o&&o())};return h.jsx(nC,{isPresent:G,initial:!y.current||i?void 0:!1,custom:G?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:G?void 0:H,children:V},D)})})},hn=n=>n;let J0=hn;const sC={useManualTiming:!1};function iC(n){let a=new Set,i=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(g){u.has(g)&&(m.schedule(g),n()),g(d)}const m={schedule:(g,v=!1,y=!1)=>{const T=y&&o?a:i;return v&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Er=["read","resolveKeyframes","update","preRender","render","postRender"],lC=40;function W0(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>i=!0,d=Er.reduce((C,A)=>(C[A]=iC(u),C),{}),{read:p,resolveKeyframes:m,update:g,preRender:v,render:y,postRender:_}=d,T=()=>{const C=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,lC),1),r.timestamp=C,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),v.process(r),y.process(r),_.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},E=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Er.reduce((C,A)=>{const M=d[A];return C[A]=(V,D=!1,G=!1)=>(i||E(),M.schedule(V,D,G)),C},{}),cancel:C=>{for(let A=0;A<Er.length;A++)d[Er[A]].cancel(C)},state:r,steps:d}}const{schedule:it,cancel:ns,state:Pt,steps:Nd}=W0(typeof requestAnimationFrame<"u"?requestAnimationFrame:hn,!0),eb=S.createContext({strict:!1}),Hy={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"]},Di={};for(const n in Hy)Di[n]={isEnabled:a=>Hy[n].some(i=>!!a[i])};function oC(n){for(const a in n)Di[a]={...Di[a],...n[a]}}const rC=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 Ur(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||rC.has(n)}let tb=n=>!Ur(n);function cC(n){n&&(tb=a=>a.startsWith("on")?!Ur(a):n(a))}try{cC(require("@emotion/is-prop-valid").default)}catch{}function uC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(tb(r)||i===!0&&Ur(r)||!a&&!Ur(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function dC(n){if(typeof Proxy>"u")return n;const a=new Map,i=(...o)=>n(...o);return new Proxy(i,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const nc=S.createContext({});function Kl(n){return typeof n=="string"||Array.isArray(n)}function ac(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Hf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pf=["initial",...Hf];function sc(n){return ac(n.animate)||Pf.some(a=>Kl(n[a]))}function nb(n){return!!(sc(n)||n.variants)}function fC(n,a){if(sc(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Kl(i)?i:void 0,animate:Kl(o)?o:void 0}}return n.inherit!==!1?a:{}}function hC(n){const{initial:a,animate:i}=fC(n,S.useContext(nc));return S.useMemo(()=>({initial:a,animate:i}),[Py(a),Py(i)])}function Py(n){return Array.isArray(n)?n.join(" "):n}const pC=Symbol.for("motionComponentSymbol");function Ei(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function mC(n,a,i){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),i&&(typeof i=="function"?i(o):Ei(i)&&(i.current=o))},[a])}const Gf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),gC="framerAppearId",ab="data-"+Gf(gC),{schedule:Ff}=W0(queueMicrotask,!1),sb=S.createContext({});function yC(n,a,i,o,r){var u,d;const{visualElement:p}=S.useContext(nc),m=S.useContext(eb),g=S.useContext(tc),v=S.useContext(zf).reducedMotion,y=S.useRef(null);o=o||m.renderer,!y.current&&o&&(y.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const _=y.current,T=S.useContext(sb);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&vC(y.current,i,r,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{_&&E.current&&_.update(i,g)});const w=i[ab],j=S.useRef(!!w&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,w))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,w)));return Q0(()=>{_&&(E.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Ff.render(_.render),j.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!j.current&&_.animationState&&_.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,w)}),j.current=!1))}),_}function vC(n,a,i,o){const{layoutId:r,layout:u,drag:d,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:ib(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||p&&Ei(p),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function ib(n){if(n)return n.options.allowProjection!==!1?n.projection:ib(n.parent)}function bC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var u,d;n&&oC(n);function p(g,v){let y;const _={...S.useContext(zf),...g,layoutId:SC(g)},{isStatic:T}=_,E=hC(g),w=o(g,T);if(!T&&Vf){_C();const j=xC(_);y=j.MeasureLayout,E.visualElement=yC(r,w,_,a,j.ProjectionNode)}return h.jsxs(nc.Provider,{value:E,children:[y&&E.visualElement?h.jsx(y,{visualElement:E.visualElement,..._}):null,i(r,g,mC(w,E.visualElement,v),w,T,E.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const m=S.forwardRef(p);return m[pC]=r,m}function SC({layoutId:n}){const a=S.useContext(If).id;return a&&n!==void 0?a+"-"+n:n}function _C(n,a){S.useContext(eb).strict}function xC(n){const{drag:a,layout:i}=Di;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const TC=["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 $f(n){return typeof n!="string"||n.includes("-")?!1:!!(TC.indexOf(n)>-1||/[A-Z]/u.test(n))}function Gy(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function qf(n,a,i,o){if(typeof a=="function"){const[r,u]=Gy(o);a=a(i!==void 0?i:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=Gy(o);a=a(i!==void 0?i:n.custom,r,u)}return a}const nf=n=>Array.isArray(n),EC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),CC=n=>nf(n)?n[n.length-1]||0:n,$t=n=>!!(n&&n.getVelocity);function Or(n){const a=$t(n)?n.get():n;return EC(a)?a.toValue():a}function AC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,u){const d={latestValues:jC(o,r,u,n),renderState:a()};return i&&(d.onMount=p=>i({props:o,current:p,...d}),d.onUpdate=p=>i(p)),d}const lb=n=>(a,i)=>{const o=S.useContext(nc),r=S.useContext(tc),u=()=>AC(n,a,o,r);return i?u():Uf(u)};function jC(n,a,i,o){const r={},u=o(n,{});for(const _ in u)r[_]=Or(u[_]);let{initial:d,animate:p}=n;const m=sc(n),g=nb(n);a&&g&&!m&&n.inherit!==!1&&(d===void 0&&(d=a.initial),p===void 0&&(p=a.animate));let v=i?i.initial===!1:!1;v=v||d===!1;const y=v?p:d;if(y&&typeof y!="boolean"&&!ac(y)){const _=Array.isArray(y)?y:[y];for(let T=0;T<_.length;T++){const E=qf(n,_[T]);if(E){const{transitionEnd:w,transition:j,...C}=E;for(const A in C){let M=C[A];if(Array.isArray(M)){const V=v?M.length-1:0;M=M[V]}M!==null&&(r[A]=M)}for(const A in w)r[A]=w[A]}}}return r}const Bi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ls=new Set(Bi),ob=n=>a=>typeof a=="string"&&a.startsWith(n),rb=ob("--"),wC=ob("var(--"),Yf=n=>wC(n)?NC.test(n.split("/*")[0].trim()):!1,NC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,cb=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Ta=(n,a,i)=>i>a?a:i<n?n:i,Li={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Zl={...Li,transform:n=>Ta(0,1,n)},Cr={...Li,default:1},no=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Qa=no("deg"),Zn=no("%"),me=no("px"),DC=no("vh"),kC=no("vw"),Fy={...Zn,parse:n=>Zn.parse(n)/100,transform:n=>Zn.transform(n*100)},MC={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},RC={rotate:Qa,rotateX:Qa,rotateY:Qa,rotateZ:Qa,scale:Cr,scaleX:Cr,scaleY:Cr,scaleZ:Cr,skew:Qa,skewX:Qa,skewY:Qa,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Zl,originX:Fy,originY:Fy,originZ:me},$y={...Li,transform:Math.round},Kf={...MC,...RC,zIndex:$y,size:me,fillOpacity:Zl,strokeOpacity:Zl,numOctaves:$y},OC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},BC=Bi.length;function LC(n,a,i){let o="",r=!0;for(let u=0;u<BC;u++){const d=Bi[u],p=n[d];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(d.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=cb(p,Kf[d]);if(!m){r=!1;const v=OC[d]||d;o+=`${v}(${g}) `}i&&(a[d]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function Zf(n,a,i){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,p=!1;for(const m in a){const g=a[m];if(Ls.has(m)){d=!0;continue}else if(rb(m)){r[m]=g;continue}else{const v=cb(g,Kf[m]);m.startsWith("origin")?(p=!0,u[m]=v):o[m]=v}}if(a.transform||(d||i?o.transform=LC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:v=0}=u;o.transformOrigin=`${m} ${g} ${v}`}}const IC={offset:"stroke-dashoffset",array:"stroke-dasharray"},UC={offset:"strokeDashoffset",array:"strokeDasharray"};function zC(n,a,i=1,o=0,r=!0){n.pathLength=1;const u=r?IC:UC;n[u.offset]=me.transform(-o);const d=me.transform(a),p=me.transform(i);n[u.array]=`${d} ${p}`}function qy(n,a,i){return typeof n=="string"?n:me.transform(a+i*n)}function VC(n,a,i){const o=qy(a,n.x,n.width),r=qy(i,n.y,n.height);return`${o} ${r}`}function Xf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},v,y){if(Zf(n,g,y),v){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:E}=n;_.transform&&(E&&(T.transform=_.transform),delete _.transform),E&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=VC(E,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),i!==void 0&&(_.y=i),o!==void 0&&(_.scale=o),d!==void 0&&zC(_,d,p,m,!1)}const Qf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),ub=()=>({...Qf(),attrs:{}}),Jf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function db(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in i)n.style.setProperty(u,i[u])}const fb=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 hb(n,a,i,o){db(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(fb.has(r)?r:Gf(r),a.attrs[r])}const zr={};function HC(n){Object.assign(zr,n)}function pb(n,{layout:a,layoutId:i}){return Ls.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!zr[n]||n==="opacity")}function Wf(n,a,i){var o;const{style:r}=n,u={};for(const d in r)($t(r[d])||a.style&&$t(a.style[d])||pb(d,n)||((o=i==null?void 0:i.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function mb(n,a,i){const o=Wf(n,a,i);for(const r in n)if($t(n[r])||$t(a[r])){const u=Bi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function PC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Yy=["x","y","width","height","cx","cy","r"],GC={useVisualState:lb({scrapeMotionValuesFromProps:mb,createRenderState:ub,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let u=!!n.drag;if(!u){for(const p in r)if(Ls.has(p)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let p=0;p<Yy.length;p++){const m=Yy[p];n[m]!==a[m]&&(d=!0)}d&&it.read(()=>{PC(i,o),it.render(()=>{Xf(o,r,Jf(i.tagName),n.transformTemplate),hb(i,o)})})}})},FC={useVisualState:lb({scrapeMotionValuesFromProps:Wf,createRenderState:Qf})};function gb(n,a,i){for(const o in a)!$t(a[o])&&!pb(o,i)&&(n[o]=a[o])}function $C({transformTemplate:n},a){return S.useMemo(()=>{const i=Qf();return Zf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function qC(n,a){const i=n.style||{},o={};return gb(o,i,n),Object.assign(o,$C(n,a)),o}function YC(n,a){const i={},o=qC(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=o,i}function KC(n,a,i,o){const r=S.useMemo(()=>{const u=ub();return Xf(u,a,Jf(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};gb(u,n.style,n),r.style={...u,...r.style}}return r}function ZC(n=!1){return(i,o,r,{latestValues:u},d)=>{const m=($f(i)?KC:YC)(o,u,d,i),g=uC(o,typeof i=="string",n),v=i!==S.Fragment?{...g,...m,ref:r}:{},{children:y}=o,_=S.useMemo(()=>$t(y)?y.get():y,[y]);return S.createElement(i,{...v,children:_})}}function XC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...$f(o)?GC:FC,preloadedFeatures:n,useRender:ZC(r),createVisualElement:a,Component:o};return bC(d)}}function yb(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let o=0;o<i;o++)if(a[o]!==n[o])return!1;return!0}function ic(n,a,i){const o=n.getProps();return qf(o,a,i!==void 0?i:o.custom,n)}function eh(n,a){return n?n[a]||n.default||n:void 0}const vb=new Set(["width","height","top","left","right","bottom",...Bi]);let Br;function QC(){Br=void 0}const Xn={now:()=>(Br===void 0&&Xn.set(Pt.isProcessing||sC.useManualTiming?Pt.timestamp:performance.now()),Br),set:n=>{Br=n,queueMicrotask(QC)}};function th(n,a){n.indexOf(a)===-1&&n.push(a)}function nh(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class ah{constructor(){this.subscriptions=[]}add(a){return th(this.subscriptions,a),()=>nh(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function bb(n,a){return a?n*(1e3/a):0}const Ky=30,JC=n=>!isNaN(parseFloat(n));class WC{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=Xn.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Xn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=JC(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new ah);const o=this.events[a].add(i);return a==="change"?()=>{o(),it.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Xn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Ky)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Ky);return bb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),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 Xl(n,a){return new WC(n,a)}function eA(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Xl(i))}function tA(n,a){const i=ic(n,a);let{transitionEnd:o={},transition:r={},...u}=i||{};u={...u,...o};for(const d in u){const p=CC(u[d]);eA(n,d,p)}}function nA(n){return!!($t(n)&&n.add)}function af(n,a){const i=n.getValue("willChange");if(nA(i))return i.add(a)}function Sb(n){return n.props[ab]}function sh(n){let a;return()=>(a===void 0&&(a=n()),a)}const aA=sh(()=>window.ScrollTimeline!==void 0);class sA{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,i){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=i}attachTimeline(a,i){const o=this.animations.map(r=>{if(aA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class iA extends sA{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const Sa=n=>n*1e3,_a=n=>n/1e3;function ih(n){return typeof n=="function"}function Zy(n,a){n.timeline=a,n.onfinish=null}const lh=n=>Array.isArray(n)&&typeof n[0]=="number",lA={linearEasing:void 0};function oA(n,a){const i=sh(n);return()=>{var o;return(o=lA[a])!==null&&o!==void 0?o:i()}}const Vr=oA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ki=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},_b=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let u=0;u<r;u++)o+=n(ki(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function xb(n){return!!(typeof n=="function"&&Vr()||!n||typeof n=="string"&&(n in sf||Vr())||lh(n)||Array.isArray(n)&&n.every(xb))}const Ll=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,sf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ll([0,.65,.55,1]),circOut:Ll([.55,0,1,.45]),backIn:Ll([.31,.01,.66,-.59]),backOut:Ll([.33,1.53,.69,.99])};function Tb(n,a){if(n)return typeof n=="function"&&Vr()?_b(n,a):lh(n)?Ll(n):Array.isArray(n)?n.map(i=>Tb(i,a)||sf.easeOut):sf[n]}const Eb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,rA=1e-7,cA=12;function uA(n,a,i,o,r){let u,d,p=0;do d=a+(i-a)/2,u=Eb(d,o,r)-n,u>0?i=d:a=d;while(Math.abs(u)>rA&&++p<cA);return d}function ao(n,a,i,o){if(n===a&&i===o)return hn;const r=u=>uA(u,0,1,n,i);return u=>u===0||u===1?u:Eb(r(u),a,o)}const Cb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,Ab=n=>a=>1-n(1-a),jb=ao(.33,1.53,.69,.99),oh=Ab(jb),wb=Cb(oh),Nb=n=>(n*=2)<1?.5*oh(n):.5*(2-Math.pow(2,-10*(n-1))),rh=n=>1-Math.sin(Math.acos(n)),Db=Ab(rh),kb=Cb(rh),Mb=n=>/^0[^.\s]+$/u.test(n);function dA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Mb(n):!0}const Vl=n=>Math.round(n*1e5)/1e5,ch=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fA(n){return n==null}const hA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,uh=(n,a)=>i=>!!(typeof i=="string"&&hA.test(i)&&i.startsWith(n)||a&&!fA(i)&&Object.prototype.hasOwnProperty.call(i,a)),Rb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,u,d,p]=o.match(ch);return{[n]:parseFloat(r),[a]:parseFloat(u),[i]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},pA=n=>Ta(0,255,n),Dd={...Li,transform:n=>Math.round(pA(n))},ks={test:uh("rgb","red"),parse:Rb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+Dd.transform(n)+", "+Dd.transform(a)+", "+Dd.transform(i)+", "+Vl(Zl.transform(o))+")"};function mA(n){let a="",i="",o="",r="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,i+=i,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const lf={test:uh("#"),parse:mA,transform:ks.transform},Ci={test:uh("hsl","hue"),parse:Rb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Zn.transform(Vl(a))+", "+Zn.transform(Vl(i))+", "+Vl(Zl.transform(o))+")"},Ft={test:n=>ks.test(n)||lf.test(n)||Ci.test(n),parse:n=>ks.test(n)?ks.parse(n):Ci.test(n)?Ci.parse(n):lf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?ks.transform(n):Ci.transform(n)},gA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(ch))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(gA))===null||i===void 0?void 0:i.length)||0)>0}const Ob="number",Bb="color",vA="var",bA="var(",Xy="${}",SA=/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 Ql(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let u=0;const p=a.replace(SA,m=>(Ft.test(m)?(o.color.push(u),r.push(Bb),i.push(Ft.parse(m))):m.startsWith(bA)?(o.var.push(u),r.push(vA),i.push(m)):(o.number.push(u),r.push(Ob),i.push(parseFloat(m))),++u,Xy)).split(Xy);return{values:i,split:p,indexes:o,types:r}}function Lb(n){return Ql(n).values}function Ib(n){const{split:a,types:i}=Ql(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const p=i[d];p===Ob?u+=Vl(r[d]):p===Bb?u+=Ft.transform(r[d]):u+=r[d]}return u}}const _A=n=>typeof n=="number"?0:n;function xA(n){const a=Lb(n);return Ib(n)(a.map(_A))}const as={test:yA,parse:Lb,createTransformer:Ib,getAnimatableNone:xA},TA=new Set(["brightness","contrast","saturate","opacity"]);function EA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(ch)||[];if(!o)return n;const r=i.replace(o,"");let u=TA.has(a)?1:0;return o!==i&&(u*=100),a+"("+u+r+")"}const CA=/\b([a-z-]*)\(.*?\)/gu,of={...as,getAnimatableNone:n=>{const a=n.match(CA);return a?a.map(EA).join(" "):n}},AA={...Kf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:of,WebkitFilter:of},dh=n=>AA[n];function Ub(n,a){let i=dh(n);return i!==of&&(i=as),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const jA=new Set(["auto","none","0"]);function wA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!jA.has(u)&&Ql(u).values.length&&(r=n[o]),o++}if(r&&i)for(const u of a)n[u]=Ub(i,r)}const Qy=n=>n===Li||n===me,Jy=(n,a)=>parseFloat(n.split(", ")[a]),Wy=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Jy(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?Jy(u[1],n):0}},NA=new Set(["x","y","z"]),DA=Bi.filter(n=>!NA.has(n));function kA(n){const a=[];return DA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Mi={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:Wy(4,13),y:Wy(5,14)};Mi.translateX=Mi.x;Mi.translateY=Mi.y;const Ms=new Set;let rf=!1,cf=!1;function zb(){if(cf){const n=Array.from(Ms).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=kA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([u,d])=>{var p;(p=o.getValue(u))===null||p===void 0||p.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}cf=!1,rf=!1,Ms.forEach(n=>n.complete()),Ms.clear()}function Vb(){Ms.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(cf=!0)})}function MA(){Vb(),zb()}class fh{constructor(a,i,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ms.add(this),rf||(rf=!0,it.read(Vb),it.resolveKeyframes(zb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),p=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Hb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),RA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OA(n){const a=RA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function Pb(n,a,i=1){const[o,r]=OA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Hb(d)?parseFloat(d):d}return Yf(r)?Pb(r,a,i+1):r}const Gb=n=>a=>a.test(n),BA={test:n=>n==="auto",parse:n=>n},Fb=[Li,me,Zn,Qa,kC,DC,BA],ev=n=>Fb.find(Gb(n));class $b extends fh{constructor(a,i,o,r,u){super(a,i,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),Yf(g))){const v=Pb(g,i.current);v!==void 0&&(a[m]=v),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!vb.has(o)||a.length!==2)return;const[r,u]=a,d=ev(r),p=ev(u);if(d!==p)if(Qy(d)&&Qy(p))for(let m=0;m<a.length;m++){const g=a[m];typeof g=="string"&&(a[m]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,o=[];for(let r=0;r<a.length;r++)dA(a[r])&&o.push(r);o.length&&wA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,p=r[d];r[d]=Mi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const tv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(as.test(n)||n==="0")&&!n.startsWith("url("));function LA(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function IA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=tv(r,a),p=tv(u,a);return!d||!p?!1:LA(n)||(i==="spring"||ih(i))&&o}const UA=n=>n!==null;function lc(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(UA),u=a&&i!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const zA=40;class qb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Xn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:u,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>zA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&MA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Xn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!IA(a,o,r,u))if(d)this.options.duration=0;else{m&&m(lc(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const v=this.initPlayback(a,i);v!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...v},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const uf=2e4;function Yb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<uf;)a+=i,o=n.next(a);return a>=uf?1/0:a}const ct=(n,a,i)=>n+(a-n)*i;function kd(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function VA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,u=0,d=0;if(!a)r=u=d=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=kd(m,p,n+1/3),u=kd(m,p,n),d=kd(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Hr(n,a){return i=>i>0?a:n}const Md=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},HA=[lf,ks,Ci],PA=n=>HA.find(a=>a.test(n));function nv(n){const a=PA(n);if(!a)return!1;let i=a.parse(n);return a===Ci&&(i=VA(i)),i}const av=(n,a)=>{const i=nv(n),o=nv(a);if(!i||!o)return Hr(n,a);const r={...i};return u=>(r.red=Md(i.red,o.red,u),r.green=Md(i.green,o.green,u),r.blue=Md(i.blue,o.blue,u),r.alpha=ct(i.alpha,o.alpha,u),ks.transform(r))},GA=(n,a)=>i=>a(n(i)),so=(...n)=>n.reduce(GA),df=new Set(["none","hidden"]);function FA(n,a){return df.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function $A(n,a){return i=>ct(n,a,i)}function hh(n){return typeof n=="number"?$A:typeof n=="string"?Yf(n)?Hr:Ft.test(n)?av:KA:Array.isArray(n)?Kb:typeof n=="object"?Ft.test(n)?av:qA:Hr}function Kb(n,a){const i=[...n],o=i.length,r=n.map((u,d)=>hh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)i[d]=r[d](u);return i}}function qA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=hh(n[r])(n[r],a[r]));return r=>{for(const u in o)i[u]=o[u](r);return i}}function YA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],p=n.indexes[d][r[d]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[u]=m,r[d]++}return o}const KA=(n,a)=>{const i=as.createTransformer(a),o=Ql(n),r=Ql(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?df.has(n)&&!r.values.length||df.has(a)&&!o.values.length?FA(n,a):so(Kb(YA(o,r),r.values),i):Hr(n,a)};function Zb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?ct(n,a,i):hh(n)(n,a)}const ZA=5;function Xb(n,a,i){const o=Math.max(a-ZA,0);return bb(i-n(o),a-o)}const mt={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},Rd=.001;function XA({duration:n=mt.duration,bounce:a=mt.bounce,velocity:i=mt.velocity,mass:o=mt.mass}){let r,u,d=1-a;d=Ta(mt.minDamping,mt.maxDamping,d),n=Ta(mt.minDuration,mt.maxDuration,_a(n)),d<1?(r=g=>{const v=g*d,y=v*n,_=v-i,T=ff(g,d),E=Math.exp(-y);return Rd-_/T*E},u=g=>{const y=g*d*n,_=y*i+i,T=Math.pow(d,2)*Math.pow(g,2)*n,E=Math.exp(-y),w=ff(Math.pow(g,2),d);return(-r(g)+Rd>0?-1:1)*((_-T)*E)/w}):(r=g=>{const v=Math.exp(-g*n),y=(g-i)*n+1;return-Rd+v*y},u=g=>{const v=Math.exp(-g*n),y=(i-g)*(n*n);return v*y});const p=5/n,m=JA(r,u,p);if(n=Sa(n),isNaN(m))return{stiffness:mt.stiffness,damping:mt.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const QA=12;function JA(n,a,i){let o=i;for(let r=1;r<QA;r++)o=o-n(o)/a(o);return o}function ff(n,a){return n*Math.sqrt(1-a*a)}const WA=["duration","bounce"],ej=["stiffness","damping","mass"];function sv(n,a){return a.some(i=>n[i]!==void 0)}function tj(n){let a={velocity:mt.velocity,stiffness:mt.stiffness,damping:mt.damping,mass:mt.mass,isResolvedFromDuration:!1,...n};if(!sv(n,ej)&&sv(n,WA))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,u=2*Ta(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:mt.mass,stiffness:r,damping:u}}else{const i=XA(n);a={...a,...i,mass:mt.mass},a.isResolvedFromDuration=!0}return a}function Qb(n=mt.visualDuration,a=mt.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const u=i.keyframes[0],d=i.keyframes[i.keyframes.length-1],p={done:!1,value:u},{stiffness:m,damping:g,mass:v,duration:y,velocity:_,isResolvedFromDuration:T}=tj({...i,velocity:-_a(i.velocity||0)}),E=_||0,w=g/(2*Math.sqrt(m*v)),j=d-u,C=_a(Math.sqrt(m/v)),A=Math.abs(j)<5;o||(o=A?mt.restSpeed.granular:mt.restSpeed.default),r||(r=A?mt.restDelta.granular:mt.restDelta.default);let M;if(w<1){const D=ff(C,w);M=G=>{const H=Math.exp(-w*C*G);return d-H*((E+w*C*j)/D*Math.sin(D*G)+j*Math.cos(D*G))}}else if(w===1)M=D=>d-Math.exp(-C*D)*(j+(E+C*j)*D);else{const D=C*Math.sqrt(w*w-1);M=G=>{const H=Math.exp(-w*C*G),R=Math.min(D*G,300);return d-H*((E+w*C*j)*Math.sinh(R)+D*j*Math.cosh(R))/D}}const V={calculatedDuration:T&&y||null,next:D=>{const G=M(D);if(T)p.done=D>=y;else{let H=0;w<1&&(H=D===0?Sa(E):Xb(M,D,G));const R=Math.abs(H)<=o,X=Math.abs(d-G)<=r;p.done=R&&X}return p.value=p.done?d:G,p},toString:()=>{const D=Math.min(Yb(V),uf),G=_b(H=>V.next(D*H).value,D,30);return D+"ms "+G}};return V}function iv({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:p,max:m,restDelta:g=.5,restSpeed:v}){const y=n[0],_={done:!1,value:y},T=R=>p!==void 0&&R<p||m!==void 0&&R>m,E=R=>p===void 0?m:m===void 0||Math.abs(p-R)<Math.abs(m-R)?p:m;let w=i*a;const j=y+w,C=d===void 0?j:d(j);C!==j&&(w=C-y);const A=R=>-w*Math.exp(-R/o),M=R=>C+A(R),V=R=>{const X=A(R),te=M(R);_.done=Math.abs(X)<=g,_.value=_.done?C:te};let D,G;const H=R=>{T(_.value)&&(D=R,G=Qb({keyframes:[_.value,E(_.value)],velocity:Xb(M,R,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:v}))};return H(0),{calculatedDuration:null,next:R=>{let X=!1;return!G&&D===void 0&&(X=!0,V(R),H(R)),D!==void 0&&R>=D?G.next(R-D):(!X&&V(R),_)}}}const nj=ao(.42,0,1,1),aj=ao(0,0,.58,1),Jb=ao(.42,0,.58,1),sj=n=>Array.isArray(n)&&typeof n[0]!="number",ij={linear:hn,easeIn:nj,easeInOut:Jb,easeOut:aj,circIn:rh,circInOut:kb,circOut:Db,backIn:oh,backInOut:wb,backOut:jb,anticipate:Nb},lv=n=>{if(lh(n)){J0(n.length===4);const[a,i,o,r]=n;return ao(a,i,o,r)}else if(typeof n=="string")return ij[n];return n};function lj(n,a,i){const o=[],r=i||Zb,u=n.length-1;for(let d=0;d<u;d++){let p=r(n[d],n[d+1]);if(a){const m=Array.isArray(a)?a[d]||hn:a;p=so(m,p)}o.push(p)}return o}function oj(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const u=n.length;if(J0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=lj(a,o,r),m=p.length,g=v=>{if(d&&v<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(v<n[y+1]);y++);const _=ki(n[y],n[y+1],v);return p[y](_)};return i?v=>g(Ta(n[0],n[u-1],v)):g}function rj(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=ki(0,a,o);n.push(ct(i,1,r))}}function cj(n){const a=[0];return rj(a,n.length-1),a}function uj(n,a){return n.map(i=>i*a)}function dj(n,a){return n.map(()=>a||Jb).splice(0,n.length-1)}function Pr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=sj(o)?o.map(lv):lv(o),u={done:!1,value:a[0]},d=uj(i&&i.length===a.length?i:cj(a),n),p=oj(d,a,{ease:Array.isArray(r)?r:dj(a,r)});return{calculatedDuration:n,next:m=>(u.value=p(m),u.done=m>=n,u)}}const fj=n=>{const a=({timestamp:i})=>n(i);return{start:()=>it.update(a,!0),stop:()=>ns(a),now:()=>Pt.isProcessing?Pt.timestamp:Xn.now()}},hj={decay:iv,inertia:iv,tween:Pr,keyframes:Pr,spring:Qb},pj=n=>n/100;class ph extends qb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||fh,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new d(u,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,p=ih(i)?i:hj[i]||Pr;let m,g;p!==Pr&&typeof a[0]!="number"&&(m=so(pj,Zb(a[0],a[1])),a=[0,100]);const v=p({...this.options,keyframes:a});u==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-d})),v.calculatedDuration===null&&(v.calculatedDuration=Yb(v));const{calculatedDuration:y}=v,_=y+r,T=_*(o+1)-r;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:y,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:v,resolvedDuration:y}=o;if(this.startTime===null)return u.next(0);const{delay:_,repeat:T,repeatType:E,repeatDelay:w,onUpdate:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-v/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),A=this.speed>=0?C<0:C>v;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let M=this.currentTime,V=u;if(T){const R=Math.min(this.currentTime,v)/y;let X=Math.floor(R),te=R%1;!te&&R>=1&&(te=1),te===1&&X--,X=Math.min(X,T+1),!!(X%2)&&(E==="reverse"?(te=1-te,w&&(te-=w/y)):E==="mirror"&&(V=d)),M=Ta(0,1,te)*y}const D=A?{done:!1,value:m[0]}:V.next(M);p&&(D.value=p(D.value));let{done:G}=D;!A&&g!==null&&(G=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&G);return H&&r!==void 0&&(D.value=lc(m,this.options,r)),j&&j(D.value),H&&this.finish(),D}get duration(){const{resolved:a}=this;return a?_a(a.calculatedDuration):0}get time(){return _a(this.currentTime)}set time(a){a=Sa(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=_a(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=fj,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const mj=new Set(["opacity","clipPath","filter","transform"]);function gj(n,a,i,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const v=Tb(p,r);return Array.isArray(v)&&(g.easing=v),n.animate(g,{delay:o,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const yj=sh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gr=10,vj=2e4;function bj(n){return ih(n.type)||n.type==="spring"||!xb(n.ease)}function Sj(n,a){const i=new ph({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<vj;)o=i.sample(u),r.push(o.value),u+=Gr;return{times:void 0,keyframes:r,duration:u-Gr,ease:"linear"}}const Wb={anticipate:Nb,backInOut:wb,circInOut:kb};function _j(n){return n in Wb}class ov extends qb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new $b(u,(d,p)=>this.onKeyframesResolved(d,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:u,type:d,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof u=="string"&&Vr()&&_j(u)&&(u=Wb[u]),bj(this.options)){const{onComplete:y,onUpdate:_,motionValue:T,element:E,...w}=this.options,j=Sj(a,w);a=j.keyframes,a.length===1&&(a[1]=a[0]),o=j.duration,r=j.times,u=j.ease,d="keyframes"}const v=gj(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:u});return v.startTime=g??this.calcStartTime(),this.pendingTimeline?(Zy(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:y}=this.options;p.set(lc(a,this.options,i)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return _a(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return _a(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=Sa(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return hn;const{animation:o}=i;Zy(o,a)}return hn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:u,ease:d,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:y,element:_,...T}=this.options,E=new ph({...T,keyframes:o,duration:r,type:u,ease:d,times:p,isGenerator:!0}),w=Sa(this.time);g.setWithVelocity(E.sample(w-Gr).value,E.sample(w).value,Gr)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:i,name:o,repeatDelay:r,repeatType:u,damping:d,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return yj()&&o&&mj.has(o)&&!m&&!g&&!r&&u!=="mirror"&&d!==0&&p!=="inertia"}}const xj={type:"spring",stiffness:500,damping:25,restSpeed:10},Tj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Ej={type:"keyframes",duration:.8},Cj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Aj=(n,{keyframes:a})=>a.length>2?Ej:Ls.has(n)?n.startsWith("scale")?Tj(a[1]):xj:Cj;function jj({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:p,from:m,elapsed:g,...v}){return!!Object.keys(v).length}const mh=(n,a,i,o={},r,u)=>d=>{const p=eh(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Sa(m);let v={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:_=>{a.set(_),p.onUpdate&&p.onUpdate(_)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:u?void 0:r};jj(p)||(v={...v,...Aj(n,v)}),v.duration&&(v.duration=Sa(v.duration)),v.repeatDelay&&(v.repeatDelay=Sa(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let y=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(y=!0)),y&&!u&&a.get()!==void 0){const _=lc(v.keyframes,p);if(_!==void 0)return it.update(()=>{v.onUpdate(_),v.onComplete()}),new iA([])}return!u&&ov.supports(v)?new ov(v):new ph(v)};function wj({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function e1(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(d=o);const g=[],v=r&&n.animationState&&n.animationState.getState()[r];for(const y in m){const _=n.getValue(y,(u=n.latestValues[y])!==null&&u!==void 0?u:null),T=m[y];if(T===void 0||v&&wj(v,y))continue;const E={delay:i,...eh(d||{},y)};let w=!1;if(window.MotionHandoffAnimation){const C=Sb(n);if(C){const A=window.MotionHandoffAnimation(C,y,it);A!==null&&(E.startTime=A,w=!0)}}af(n,y),_.start(mh(y,_,T,n.shouldReduceMotion&&vb.has(y)?{type:!1}:E,n,w));const j=_.animation;j&&g.push(j)}return p&&Promise.all(g).then(()=>{it.update(()=>{p&&tA(n,p)})}),g}function hf(n,a,i={}){var o;const r=ic(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(u=i.transitionOverride);const d=r?()=>Promise.all(e1(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:y,staggerDirection:_}=u;return Nj(n,a,v+g,y,_,i)}:()=>Promise.resolve(),{when:m}=u;if(m){const[g,v]=m==="beforeChildren"?[d,p]:[p,d];return g().then(()=>v())}else return Promise.all([d(),p(i.delay)])}function Nj(n,a,i=0,o=0,r=1,u){const d=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(Dj).forEach((g,v)=>{g.notify("AnimationStart",a),d.push(hf(g,a,{...u,delay:i+m(v)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function Dj(n,a){return n.sortNodePosition(a)}function kj(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>hf(n,u,i));o=Promise.all(r)}else if(typeof a=="string")o=hf(n,a,i);else{const r=typeof a=="function"?ic(n,a,i.custom):a;o=Promise.all(e1(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Mj=Pf.length;function t1(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?t1(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<Mj;i++){const o=Pf[i],r=n.props[o];(Kl(r)||r===!1)&&(a[o]=r)}return a}const Rj=[...Hf].reverse(),Oj=Hf.length;function Bj(n){return a=>Promise.all(a.map(({animation:i,options:o})=>kj(n,i,o)))}function Lj(n){let a=Bj(n),i=rv(),o=!0;const r=m=>(g,v)=>{var y;const _=ic(n,v,m==="exit"?(y=n.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(_){const{transition:T,transitionEnd:E,...w}=_;g={...g,...w,...E}}return g};function u(m){a=m(n)}function d(m){const{props:g}=n,v=t1(n.parent)||{},y=[],_=new Set;let T={},E=1/0;for(let j=0;j<Oj;j++){const C=Rj[j],A=i[C],M=g[C]!==void 0?g[C]:v[C],V=Kl(M),D=C===m?A.isActive:null;D===!1&&(E=j);let G=M===v[C]&&M!==g[C]&&V;if(G&&o&&n.manuallyAnimateOnMount&&(G=!1),A.protectedKeys={...T},!A.isActive&&D===null||!M&&!A.prevProp||ac(M)||typeof M=="boolean")continue;const H=Ij(A.prevProp,M);let R=H||C===m&&A.isActive&&!G&&V||j>E&&V,X=!1;const te=Array.isArray(M)?M:[M];let ne=te.reduce(r(C),{});D===!1&&(ne={});const{prevResolvedValues:ie={}}=A,ue={...ie,...ne},q=F=>{R=!0,_.has(F)&&(X=!0,_.delete(F)),A.needsAnimating[F]=!0;const W=n.getValue(F);W&&(W.liveStyle=!1)};for(const F in ue){const W=ne[F],be=ie[F];if(T.hasOwnProperty(F))continue;let Te=!1;nf(W)&&nf(be)?Te=!yb(W,be):Te=W!==be,Te?W!=null?q(F):_.add(F):W!==void 0&&_.has(F)?q(F):A.protectedKeys[F]=!0}A.prevProp=M,A.prevResolvedValues=ne,A.isActive&&(T={...T,...ne}),o&&n.blockInitialAnimation&&(R=!1),R&&(!(G&&H)||X)&&y.push(...te.map(F=>({animation:F,options:{type:C}})))}if(_.size){const j={};_.forEach(C=>{const A=n.getBaseTarget(C),M=n.getValue(C);M&&(M.liveStyle=!0),j[C]=A??null}),y.push({animation:j})}let w=!!y.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(w=!1),o=!1,w?a(y):Promise.resolve()}function p(m,g){var v;if(i[m].isActive===g)return Promise.resolve();(v=n.variantChildren)===null||v===void 0||v.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const y=d(m);for(const _ in i)i[_].protectedKeys={};return y}return{animateChanges:d,setActive:p,setAnimateFunction:u,getState:()=>i,reset:()=>{i=rv(),o=!0}}}function Ij(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!yb(a,n):!1}function Cs(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rv(){return{animate:Cs(!0),whileInView:Cs(),whileHover:Cs(),whileTap:Cs(),whileDrag:Cs(),whileFocus:Cs(),exit:Cs()}}class is{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Uj extends is{constructor(a){super(a),a.animationState||(a.animationState=Lj(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();ac(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let zj=0;class Vj extends is{constructor(){super(...arguments),this.id=zj++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);i&&!a&&r.then(()=>i(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const Hj={animation:{Feature:Uj},exit:{Feature:Vj}},In={x:!1,y:!1};function n1(){return In.x||In.y}function Pj(n){return n==="x"||n==="y"?In[n]?null:(In[n]=!0,()=>{In[n]=!1}):In.x||In.y?null:(In.x=In.y=!0,()=>{In.x=In.y=!1})}const gh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function Jl(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function io(n){return{point:{x:n.pageX,y:n.pageY}}}const Gj=n=>a=>gh(a)&&n(a,io(a));function Hl(n,a,i,o){return Jl(n,a,Gj(i),o)}const cv=(n,a)=>Math.abs(n-a);function Fj(n,a){const i=cv(n.x,a.x),o=cv(n.y,a.y);return Math.sqrt(i**2+o**2)}class a1{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Bd(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Fj(y.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:E}=y,{timestamp:w}=Pt;this.history.push({...E,timestamp:w});const{onStart:j,onMove:C}=this.handlers;_||(j&&j(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,y)},this.handlePointerMove=(y,_)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Od(_,this.transformPagePoint),it.update(this.updatePoint,!0)},this.handlePointerUp=(y,_)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=Bd(y.type==="pointercancel"?this.lastMoveEventInfo:Od(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(y,j),E&&E(y,j)},!gh(a))return;this.dragSnapToOrigin=u,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const d=io(a),p=Od(d,this.transformPagePoint),{point:m}=p,{timestamp:g}=Pt;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=i;v&&v(a,Bd(p,this.history)),this.removeListeners=so(Hl(this.contextWindow,"pointermove",this.handlePointerMove),Hl(this.contextWindow,"pointerup",this.handlePointerUp),Hl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),ns(this.updatePoint)}}function Od(n,a){return a?{point:a(n.point)}:n}function uv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Bd({point:n},a){return{point:n,delta:uv(n,s1(a)),offset:uv(n,$j(a)),velocity:qj(a,.1)}}function $j(n){return n[0]}function s1(n){return n[n.length-1]}function qj(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=s1(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>Sa(a)));)i--;if(!o)return{x:0,y:0};const u=_a(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const i1=1e-4,Yj=1-i1,Kj=1+i1,l1=.01,Zj=0-l1,Xj=0+l1;function pn(n){return n.max-n.min}function Qj(n,a,i){return Math.abs(n-a)<=i}function dv(n,a,i,o=.5){n.origin=o,n.originPoint=ct(a.min,a.max,n.origin),n.scale=pn(i)/pn(a),n.translate=ct(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Yj&&n.scale<=Kj||isNaN(n.scale))&&(n.scale=1),(n.translate>=Zj&&n.translate<=Xj||isNaN(n.translate))&&(n.translate=0)}function Pl(n,a,i,o){dv(n.x,a.x,i.x,o?o.originX:void 0),dv(n.y,a.y,i.y,o?o.originY:void 0)}function fv(n,a,i){n.min=i.min+a.min,n.max=n.min+pn(a)}function Jj(n,a,i){fv(n.x,a.x,i.x),fv(n.y,a.y,i.y)}function hv(n,a,i){n.min=a.min-i.min,n.max=n.min+pn(a)}function Gl(n,a,i){hv(n.x,a.x,i.x),hv(n.y,a.y,i.y)}function Wj(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?ct(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?ct(i,n,o.max):Math.min(n,i)),n}function pv(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function e2(n,{top:a,left:i,bottom:o,right:r}){return{x:pv(n.x,i,r),y:pv(n.y,a,o)}}function mv(n,a){let i=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,o]=[o,i]),{min:i,max:o}}function t2(n,a){return{x:mv(n.x,a.x),y:mv(n.y,a.y)}}function n2(n,a){let i=.5;const o=pn(n),r=pn(a);return r>o?i=ki(a.min,a.max-o,n.min):o>r&&(i=ki(n.min,n.max-r,a.min)),Ta(0,1,i)}function a2(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const pf=.35;function s2(n=pf){return n===!1?n=0:n===!0&&(n=pf),{x:gv(n,"left","right"),y:gv(n,"top","bottom")}}function gv(n,a,i){return{min:yv(n,a),max:yv(n,i)}}function yv(n,a){return typeof n=="number"?n:n[a]||0}const vv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:vv(),y:vv()}),bv=()=>({min:0,max:0}),xt=()=>({x:bv(),y:bv()});function jn(n){return[n("x"),n("y")]}function o1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function i2({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function l2(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:o.y,right:o.x}}function Ld(n){return n===void 0||n===1}function mf({scale:n,scaleX:a,scaleY:i}){return!Ld(n)||!Ld(a)||!Ld(i)}function ws(n){return mf(n)||r1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function r1(n){return Sv(n.x)||Sv(n.y)}function Sv(n){return n&&n!=="0%"}function Fr(n,a,i){const o=n-i,r=a*o;return i+r}function _v(n,a,i,o,r){return r!==void 0&&(n=Fr(n,r,o)),Fr(n,i,o)+a}function gf(n,a=0,i=1,o,r){n.min=_v(n.min,a,i,o,r),n.max=_v(n.max,a,i,o,r)}function c1(n,{x:a,y:i}){gf(n.x,a.translate,a.scale,a.originPoint),gf(n.y,i.translate,i.scale,i.originPoint)}const xv=.999999999999,Tv=1.0000000000001;function o2(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let u,d;for(let p=0;p<r;p++){u=i[p],d=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&wi(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,c1(n,d)),o&&ws(u.latestValues)&&wi(n,u.latestValues))}a.x<Tv&&a.x>xv&&(a.x=1),a.y<Tv&&a.y>xv&&(a.y=1)}function ji(n,a){n.min=n.min+a,n.max=n.max+a}function Ev(n,a,i,o,r=.5){const u=ct(n.min,n.max,r);gf(n,a,i,u,o)}function wi(n,a){Ev(n.x,a.x,a.scaleX,a.scale,a.originX),Ev(n.y,a.y,a.scaleY,a.scale,a.originY)}function u1(n,a){return o1(l2(n.getBoundingClientRect(),a))}function r2(n,a,i){const o=u1(n,i),{scroll:r}=a;return r&&(ji(o.x,r.offset.x),ji(o.y,r.offset.y)),o}const d1=({current:n})=>n?n.ownerDocument.defaultView:null,c2=new WeakMap;class u2{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xt(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=v=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(io(v).point)},u=(v,y)=>{const{drag:_,dragPropagation:T,onDragStart:E}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Pj(_),!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),jn(j=>{let C=this.getAxisMotionValue(j).get()||0;if(Zn.test(C)){const{projection:A}=this.visualElement;if(A&&A.layout){const M=A.layout.layoutBox[j];M&&(C=pn(M)*(parseFloat(C)/100))}}this.originPoint[j]=C}),E&&it.postRender(()=>E(v,y)),af(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},d=(v,y)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:E,onDrag:w}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:j}=y;if(T&&this.currentDirection===null){this.currentDirection=d2(j),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",y.point,j),this.updateAxis("y",y.point,j),this.visualElement.render(),w&&w(v,y)},p=(v,y)=>this.stop(v,y),m=()=>jn(v=>{var y;return this.getAnimationState(v)==="paused"&&((y=this.getAxisMotionValue(v).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new a1(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:d1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&it.postRender(()=>u(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!Ar(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=Wj(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;i&&Ei(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=e2(r.layoutBox,i):this.constraints=!1,this.elastic=s2(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&jn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=a2(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!Ei(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=r2(o,r.root,this.visualElement.getTransformPagePoint());let d=t2(r.layout.layoutBox,u);if(i){const p=i(i2(d));this.hasMutatedConstraints=!!p,p&&(d=o1(p))}return d}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=jn(v=>{if(!Ar(v,i,this.currentDirection))return;let y=m&&m[v]||{};d&&(y={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,E={type:"inertia",velocity:o?a[v]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(v,E)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return af(this.visualElement,a),o.start(mh(a,o,0,i,this.visualElement,!1))}stopAnimation(){jn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){jn(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){jn(i=>{const{drag:o}=this.getProps();if(!Ar(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(i);if(r&&r.layout){const{min:d,max:p}=r.layout.layoutBox[i];u.set(a[i]-ct(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!Ei(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};jn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const m=p.get();r[d]=n2({min:m,max:m},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),jn(d=>{if(!Ar(d,a,null))return;const p=this.getAxisMotionValue(d),{min:m,max:g}=this.constraints[d];p.set(ct(m,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;c2.set(this.visualElement,this);const a=this.visualElement.current,i=Hl(a,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ei(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),it.read(o);const d=Jl(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(jn(v=>{const y=this.getAxisMotionValue(v);y&&(this.originPoint[v]+=m[v].translate,y.set(y.get()+m[v].translate))}),this.visualElement.render())}));return()=>{d(),i(),u(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=pf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:p}}}function Ar(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function d2(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class f2 extends is{constructor(a){super(a),this.removeGroupControls=hn,this.removeListeners=hn,this.controls=new u2(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||hn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Cv=n=>(a,i)=>{n&&it.postRender(()=>n(a,i))};class h2 extends is{constructor(){super(...arguments),this.removePointerDownListener=hn}onPointerDown(a){this.session=new a1(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:d1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Cv(a),onStart:Cv(i),onMove:o,onEnd:(u,d)=>{delete this.session,r&&it.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Hl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Av(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ml={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(me.test(n))n=parseFloat(n);else return n;const i=Av(n,a.target.x),o=Av(n,a.target.y);return`${i}% ${o}%`}},p2={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=as.parse(n);if(r.length>5)return o;const u=as.createTransformer(n),d=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+d]/=p,r[1+d]/=m;const g=ct(p,m,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class m2 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;HC(g2),u&&(i.group&&i.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Lr.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==i||i===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||it.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Ff.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function f1(n){const[a,i]=X0(),o=S.useContext(If);return h.jsx(m2,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(sb),isPresent:a,safeToRemove:i})}const g2={borderRadius:{...Ml,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ml,borderTopRightRadius:Ml,borderBottomLeftRadius:Ml,borderBottomRightRadius:Ml,boxShadow:p2};function y2(n,a,i){const o=$t(n)?n:Xl(n);return o.start(mh("",o,a,i)),o.animation}function v2(n){return n instanceof SVGElement&&n.tagName!=="svg"}const b2=(n,a)=>n.depth-a.depth;class S2{constructor(){this.children=[],this.isDirty=!1}add(a){th(this.children,a),this.isDirty=!0}remove(a){nh(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(b2),this.isDirty=!1,this.children.forEach(a)}}function _2(n,a){const i=Xn.now(),o=({timestamp:r})=>{const u=r-i;u>=a&&(ns(o),n(u-a))};return it.read(o,!0),()=>ns(o)}const h1=["TopLeft","TopRight","BottomLeft","BottomRight"],x2=h1.length,jv=n=>typeof n=="string"?parseFloat(n):n,wv=n=>typeof n=="number"||me.test(n);function T2(n,a,i,o,r,u){r?(n.opacity=ct(0,i.opacity!==void 0?i.opacity:1,E2(o)),n.opacityExit=ct(a.opacity!==void 0?a.opacity:1,0,C2(o))):u&&(n.opacity=ct(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let d=0;d<x2;d++){const p=`border${h1[d]}Radius`;let m=Nv(a,p),g=Nv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||wv(m)===wv(g)?(n[p]=Math.max(ct(jv(m),jv(g),o),0),(Zn.test(g)||Zn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=ct(a.rotate||0,i.rotate||0,o))}function Nv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const E2=p1(0,.5,Db),C2=p1(.5,.95,hn);function p1(n,a,i){return o=>o<n?0:o>a?1:i(ki(n,a,o))}function Dv(n,a){n.min=a.min,n.max=a.max}function An(n,a){Dv(n.x,a.x),Dv(n.y,a.y)}function kv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Mv(n,a,i,o,r){return n-=a,n=Fr(n,1/i,o),r!==void 0&&(n=Fr(n,1/r,o)),n}function A2(n,a=0,i=1,o=.5,r,u=n,d=n){if(Zn.test(a)&&(a=parseFloat(a),a=ct(d.min,d.max,a/100)-d.min),typeof a!="number")return;let p=ct(u.min,u.max,o);n===u&&(p-=a),n.min=Mv(n.min,a,i,p,r),n.max=Mv(n.max,a,i,p,r)}function Rv(n,a,[i,o,r],u,d){A2(n,a[i],a[o],a[r],a.scale,u,d)}const j2=["x","scaleX","originX"],w2=["y","scaleY","originY"];function Ov(n,a,i,o){Rv(n.x,a,j2,i?i.x:void 0,o?o.x:void 0),Rv(n.y,a,w2,i?i.y:void 0,o?o.y:void 0)}function Bv(n){return n.translate===0&&n.scale===1}function m1(n){return Bv(n.x)&&Bv(n.y)}function Lv(n,a){return n.min===a.min&&n.max===a.max}function N2(n,a){return Lv(n.x,a.x)&&Lv(n.y,a.y)}function Iv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function g1(n,a){return Iv(n.x,a.x)&&Iv(n.y,a.y)}function Uv(n){return pn(n.x)/pn(n.y)}function zv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class D2{constructor(){this.members=[]}add(a){th(this.members,a),a.scheduleRender()}remove(a){if(nh(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function k2(n,a,i){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(i==null?void 0:i.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:v,rotateX:y,rotateY:_,skewX:T,skewY:E}=i;g&&(o=`perspective(${g}px) ${o}`),v&&(o+=`rotate(${v}deg) `),y&&(o+=`rotateX(${y}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),E&&(o+=`skewY(${E}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const Ns={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Il=typeof window<"u"&&window.MotionDebug!==void 0,Id=["","X","Y","Z"],M2={visibility:"hidden"},Vv=1e3;let R2=0;function Ud(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function y1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=Sb(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",it,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&y1(o)}function v1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},p=a==null?void 0:a()){this.id=R2++,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,Il&&(Ns.totalNodes=Ns.resolvedTargetDeltas=Ns.recalculatedProjection=0),this.nodes.forEach(L2),this.nodes.forEach(H2),this.nodes.forEach(P2),this.nodes.forEach(I2),Il&&window.MotionDebug.record(Ns)},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 m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new S2)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new ah),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const m=this.eventHandlers.get(d);m&&m.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=v2(d),this.instance=d;const{layoutId:m,layout:g,visualElement:v}=this.options;if(v&&!v.current&&v.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let y;const _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=_2(_,250),Lr.hasAnimatedSinceResize&&(Lr.hasAnimatedSinceResize=!1,this.nodes.forEach(Pv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&v&&(m||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||v.getDefaultTransition()||Y2,{onLayoutAnimationStart:j,onLayoutAnimationComplete:C}=v.getProps(),A=!this.targetLayout||!g1(this.targetLayout,E)||T,M=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||M||_&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,M);const V={...eh(w,"layout"),onPlay:j,onComplete:C};(v.shouldReduceMotion||this.options.layoutRoot)&&(V.delay=0,V.type=!1),this.startAnimation(V)}else _||Pv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}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,ns(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(G2),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&&y1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const y=this.path[v];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hv);return}this.isUpdating||this.nodes.forEach(z2),this.isUpdating=!1,this.nodes.forEach(V2),this.nodes.forEach(O2),this.nodes.forEach(B2),this.clearAllSnapshots();const p=Xn.now();Pt.delta=Ta(0,1e3/60,p-Pt.timestamp),Pt.timestamp=p,Pt.isProcessing=!0,Nd.update.process(Pt),Nd.preRender.process(Pt),Nd.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ff.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(U2),this.sharedNodes.forEach(F2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,it.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){it.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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xt(),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 m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!m1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;d&&(p||ws(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return d&&(m=this.removeTransform(m)),K2(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return xt();const m=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(Z2))){const{scroll:v}=this.root;v&&(ji(m.x,v.offset.x),ji(m.y,v.offset.y))}return m}removeElementScroll(d){var p;const m=xt();if(An(m,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const v=this.path[g],{scroll:y,options:_}=v;v!==this.root&&y&&_.layoutScroll&&(y.wasRoot&&An(m,d),ji(m.x,y.offset.x),ji(m.y,y.offset.y))}return m}applyTransform(d,p=!1){const m=xt();An(m,d);for(let g=0;g<this.path.length;g++){const v=this.path[g];!p&&v.options.layoutScroll&&v.scroll&&v!==v.root&&wi(m,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),ws(v.latestValues)&&wi(m,v.latestValues)}return ws(this.latestValues)&&wi(m,this.latestValues),m}removeTransform(d){const p=xt();An(p,d);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!ws(g.latestValues))continue;mf(g.latestValues)&&g.updateSnapshot();const v=xt(),y=g.measurePageBox();An(v,y),Ov(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return ws(this.latestValues)&&Ov(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!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:_}=this.options;if(!(!this.layout||!(y||_))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),Gl(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),An(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=xt(),this.targetWithTransforms=xt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):An(this.target,this.layout.layoutBox),c1(this.target,this.targetDelta)):An(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),Gl(this.relativeTargetOrigin,this.target,T.target),An(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Il&&Ns.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||mf(this.parent.latestValues)||r1(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(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(g=!1),g)return;const{layout:v,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||y))return;An(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;o2(this.layoutCorrected,this.treeScale,this.path,m),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=xt());const{target:E}=p;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(kv(this.prevProjectionDelta.x,this.projectionDelta.x),kv(this.prevProjectionDelta.y,this.projectionDelta.y)),Pl(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!zv(this.projectionDelta.x,this.prevProjectionDelta.x)||!zv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),Il&&Ns.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 m=this.getStack();m&&m.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 m=this.snapshot,g=m?m.latestValues:{},v={...this.latestValues},y=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const _=xt(),T=m?m.source:void 0,E=this.layout?this.layout.source:void 0,w=T!==E,j=this.getStack(),C=!j||j.members.length<=1,A=!!(w&&!C&&this.options.crossfade===!0&&!this.path.some(q2));this.animationProgress=0;let M;this.mixTargetDelta=V=>{const D=V/1e3;Gv(y.x,d.x,D),Gv(y.y,d.y,D),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gl(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$2(this.relativeTarget,this.relativeTargetOrigin,_,D),M&&N2(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=xt()),An(M,this.relativeTarget)),w&&(this.animationValues=v,T2(v,g,this.latestValues,D,A,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=D},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&&(ns(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=it.update(()=>{Lr.hasAnimatedSinceResize=!0,this.currentAnimation=y2(0,Vv,{...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(Vv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:v}=d;if(!(!p||!m||!g)){if(this!==d&&this.layout&&g&&b1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||xt();const y=pn(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+y;const _=pn(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+_}An(p,m),wi(p,v),Pl(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new D2),this.sharedNodes.get(d).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.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:m}={}){const g=this.getStack();g&&g.promote(this,m),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:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Ud("z",d,g,this.animationValues);for(let v=0;v<Id.length;v++)Ud(`rotate${Id[v]}`,d,g,this.animationValues),Ud(`skew${Id[v]}`,d,g,this.animationValues);d.render();for(const v in g)d.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);d.scheduleRender()}getProjectionStyles(d){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return M2;const g={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Or(d==null?void 0:d.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=Or(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ws(this.latestValues)&&(w.transform=v?v({},""):"none",this.hasProjected=!1),w}const _=y.animationValues||y.latestValues;this.applyTransformsToTarget(),g.transform=k2(this.projectionDeltaWithTransform,this.treeScale,_),v&&(g.transform=v(_,g.transform));const{x:T,y:E}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${E.origin*100}% 0`,y.animationValues?g.opacity=y===this?(m=(p=_.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=y===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const w in zr){if(_[w]===void 0)continue;const{correct:j,applyTo:C}=zr[w],A=g.transform==="none"?_[w]:j(_[w],y);if(C){const M=C.length;for(let V=0;V<M;V++)g[C[V]]=A}else g[w]=A}return this.options.layoutId&&(g.pointerEvents=y===this?Or(d==null?void 0:d.pointerEvents)||"":"none"),g}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(Hv),this.root.sharedNodes.clear()}}}function O2(n){n.updateLayout()}function B2(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=i.source!==n.layout.source;u==="size"?jn(y=>{const _=d?i.measuredBox[y]:i.layoutBox[y],T=pn(_);_.min=o[y].min,_.max=_.min+T}):b1(u,i.layoutBox,o)&&jn(y=>{const _=d?i.measuredBox[y]:i.layoutBox[y],T=pn(o[y]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+T)});const p=Ai();Pl(p,o,i.layoutBox);const m=Ai();d?Pl(m,n.applyTransform(r,!0),i.measuredBox):Pl(m,o,i.layoutBox);const g=!m1(p);let v=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:_,layout:T}=y;if(_&&T){const E=xt();Gl(E,i.layoutBox,_.layoutBox);const w=xt();Gl(w,o,T.layoutBox),g1(E,w)||(v=!0),y.options.layoutRoot&&(n.relativeTarget=w,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function L2(n){Il&&Ns.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function I2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function U2(n){n.clearSnapshot()}function Hv(n){n.clearMeasurements()}function z2(n){n.isLayoutDirty=!1}function V2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Pv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function H2(n){n.resolveTargetDelta()}function P2(n){n.calcProjection()}function G2(n){n.resetSkewAndRotation()}function F2(n){n.removeLeadSnapshot()}function Gv(n,a,i){n.translate=ct(a.translate,0,i),n.scale=ct(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function Fv(n,a,i,o){n.min=ct(a.min,i.min,o),n.max=ct(a.max,i.max,o)}function $2(n,a,i,o){Fv(n.x,a.x,i.x,o),Fv(n.y,a.y,i.y,o)}function q2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Y2={duration:.45,ease:[.4,0,.1,1]},$v=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),qv=$v("applewebkit/")&&!$v("chrome/")?Math.round:hn;function Yv(n){n.min=qv(n.min),n.max=qv(n.max)}function K2(n){Yv(n.x),Yv(n.y)}function b1(n,a,i){return n==="position"||n==="preserve-aspect"&&!Qj(Uv(a),Uv(i),.2)}function Z2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const X2=v1({attachResizeListener:(n,a)=>Jl(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zd={current:void 0},S1=v1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!zd.current){const n=new X2({});n.mount(window),n.setOptions({layoutScroll:!0}),zd.current=n}return zd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),Q2={pan:{Feature:h2},drag:{Feature:f2,ProjectionNode:S1,MeasureLayout:f1}};function J2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function _1(n,a){const i=J2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Kv(n){return a=>{a.pointerType==="touch"||n1()||n(a)}}function W2(n,a,i={}){const[o,r,u]=_1(n,i),d=Kv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const v=Kv(y=>{g(y),m.removeEventListener("pointerleave",v)});m.addEventListener("pointerleave",v,r)});return o.forEach(p=>{p.addEventListener("pointerenter",d,r)}),u}function Zv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,u=o[r];u&&it.postRender(()=>u(a,io(a)))}class ew extends is{mount(){const{current:a}=this.node;a&&(this.unmount=W2(a,i=>(Zv(this.node,i,"Start"),o=>Zv(this.node,o,"End"))))}unmount(){}}class tw extends is{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=so(Jl(this.node.current,"focus",()=>this.onFocus()),Jl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const x1=(n,a)=>a?n===a?!0:x1(n,a.parentElement):!1,nw=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function aw(n){return nw.has(n.tagName)||n.tabIndex!==-1}const Ul=new WeakSet;function Xv(n){return a=>{a.key==="Enter"&&n(a)}}function Vd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const sw=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=Xv(()=>{if(Ul.has(i))return;Vd(i,"down");const r=Xv(()=>{Vd(i,"up")}),u=()=>Vd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",u,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function Qv(n){return gh(n)&&!n1()}function iw(n,a,i={}){const[o,r,u]=_1(n,i),d=p=>{const m=p.currentTarget;if(!Qv(p)||Ul.has(m))return;Ul.add(m);const g=a(p),v=(T,E)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",_),!(!Qv(T)||!Ul.has(m))&&(Ul.delete(m),typeof g=="function"&&g(T,{success:E}))},y=T=>{v(T,i.useGlobalTarget||x1(m,T.target))},_=T=>{v(T,!1)};window.addEventListener("pointerup",y,r),window.addEventListener("pointercancel",_,r)};return o.forEach(p=>{!aw(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",d,r),p.addEventListener("focus",g=>sw(g,r),r)}),u}function Jv(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),u=o[r];u&&it.postRender(()=>u(a,io(a)))}class lw extends is{mount(){const{current:a}=this.node;a&&(this.unmount=iw(a,i=>(Jv(this.node,i,"Start"),(o,{success:r})=>Jv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const yf=new WeakMap,Hd=new WeakMap,ow=n=>{const a=yf.get(n.target);a&&a(n)},rw=n=>{n.forEach(ow)};function cw({root:n,...a}){const i=n||document;Hd.has(i)||Hd.set(i,{});const o=Hd.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(rw,{root:n,...a})),o[r]}function uw(n,a,i){const o=cw(a);return yf.set(n,i),o.observe(n),()=>{yf.delete(n),o.unobserve(n)}}const dw={some:0,all:1};class fw extends is{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:u}=a,d={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:dw[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:y}=this.node.getProps(),_=g?v:y;_&&_(m)};return uw(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(hw(a,i))&&this.startObserver()}unmount(){}}function hw({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const pw={inView:{Feature:fw},tap:{Feature:lw},focus:{Feature:tw},hover:{Feature:ew}},mw={layout:{ProjectionNode:S1,MeasureLayout:f1}},$r={current:null},yh={current:!1};function T1(){if(yh.current=!0,!!Vf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>$r.current=n.matches;n.addListener(a),a()}else $r.current=!1}const gw=[...Fb,Ft,as],yw=n=>gw.find(Gb(n)),Wv=new WeakMap;function vw(n,a,i){for(const o in a){const r=a[o],u=i[o];if($t(r))n.addValue(o,r);else if($t(u))n.addValue(o,Xl(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,Xl(d!==void 0?d:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const e0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bw{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,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=fh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=Xn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,it.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:v}=d;this.onUpdate=v,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!u,this.isControllingVariants=sc(i),this.isVariantNode=nb(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in _){const E=_[T];m[T]!==void 0&&$t(E)&&E.set(m[T],!1)}}mount(a){this.current=a,Wv.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),yh.current||T1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$r.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Wv.delete(this.current),this.projection&&this.projection.unmount(),ns(this.notifyUpdate),ns(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Ls.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&it.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=i.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Di){const i=Di[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let o=0;o<e0.length;o++){const r=e0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=vw(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Xl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Hb(r)||Mb(r))?r=parseFloat(r):!yw(r)&&as.test(i)&&(r=Ub(a,i)),this.setBaseTarget(a,$t(r)?r.get():r)),$t(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=qf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!$t(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new ah),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class E1 extends bw{constructor(){super(...arguments),this.KeyframeResolver=$b}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:o}){delete i[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;$t(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function Sw(n){return window.getComputedStyle(n)}class _w extends E1{constructor(){super(...arguments),this.type="html",this.renderInstance=db}readValueFromInstance(a,i){if(Ls.has(i)){const o=dh(i);return o&&o.default||0}else{const o=Sw(a),r=(rb(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return u1(a,i)}build(a,i,o){Zf(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return Wf(a,i,o)}}class xw extends E1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xt}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Ls.has(i)){const o=dh(i);return o&&o.default||0}return i=fb.has(i)?i:Gf(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return mb(a,i,o)}build(a,i,o){Xf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){hb(a,i,o,r)}mount(a){this.isSVGTag=Jf(a.tagName),super.mount(a)}}const Tw=(n,a)=>$f(n)?new xw(a):new _w(a,{allowProjection:n!==S.Fragment}),Ew=XC({...Hj,...pw,...Q2,...mw},Tw),an=dC(Ew);function Cw(){!yh.current&&T1();const[n]=S.useState($r.current);return n}var gt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(gt||(gt={}));var Nt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Nt||(Nt={}));var Ja;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(Ja||(Ja={}));var Wa;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(Wa||(Wa={}));var $n;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})($n||($n={}));var es;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(es||(es={}));const Aw=8;Object.assign(Object.create(null),{"":gt.UNSPECIFIED,text:gt.TEXT,tool_use:gt.TOOL_USE,tool_result:gt.TOOL_RESULT,error:gt.ERROR,status:gt.STATUS,system:gt.SYSTEM,finding:gt.FINDING,subtask_create:gt.SUBTASK_CREATE,user_input:gt.USER_INPUT});gt.UNSPECIFIED+"",gt.TEXT+"",gt.TOOL_USE+"",gt.TOOL_RESULT+"",gt.ERROR+"",gt.STATUS+"",gt.SYSTEM+"",gt.FINDING+"",gt.SUBTASK_CREATE+"",gt.USER_INPUT+"";Object.assign(Object.create(null),{"":Nt.UNSPECIFIED,not_started:Nt.NOT_STARTED,working:Nt.WORKING,paused:Nt.PAUSED,complete:Nt.COMPLETE,failed:Nt.FAILED,pending:Nt.NOT_STARTED,assigned:Nt.NOT_STARTED,in_progress:Nt.WORKING,waiting_input:Nt.PAUSED,review:Nt.PAUSED,done:Nt.COMPLETE});Nt.UNSPECIFIED+"",Nt.NOT_STARTED+"",Nt.WORKING+"",Nt.PAUSED+"",Nt.COMPLETE+"",Nt.FAILED+"";Object.assign(Object.create(null),{"":Ja.UNSPECIFIED,active:Ja.ACTIVE,archived:Ja.ARCHIVED});Ja.UNSPECIFIED+"",Ja.ACTIVE+"",Ja.ARCHIVED+"";Object.assign(Object.create(null),{"":Wa.UNSPECIFIED,open:Wa.OPEN,closed:Wa.CLOSED});Wa.UNSPECIFIED+"",Wa.OPEN+"",Wa.CLOSED+"";Object.assign(Object.create(null),{"":$n.UNSPECIFIED,off:$n.OFF,subscription:$n.SUBSCRIPTION,api_key:$n.API_KEY});$n.UNSPECIFIED+"",$n.OFF+"",$n.SUBSCRIPTION+"",$n.API_KEY+"";Object.assign(Object.create(null),{"":es.UNSPECIFIED,off:es.OFF,on:es.ON});es.UNSPECIFIED+"",es.OFF+"",es.ON+"";function Ea(n){return Array.isArray?Array.isArray(n):j1(n)==="[object Array]"}function jw(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function ww(n){return n==null?"":jw(n)}function qn(n){return typeof n=="string"}function C1(n){return typeof n=="number"}function Nw(n){return n===!0||n===!1||Dw(n)&&j1(n)=="[object Boolean]"}function A1(n){return typeof n=="object"}function Dw(n){return A1(n)&&n!==null}function fn(n){return n!=null}function Pd(n){return!n.trim().length}function j1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const kw="Incorrect 'index' type",Mw=n=>`Invalid value for key ${n}`,Rw=n=>`Pattern length exceeds max of ${n}.`,Ow=n=>`Missing ${n} property in key`,Bw=n=>`Property 'weight' in key '${n}' must be a positive integer`,t0=Object.prototype.hasOwnProperty;class Lw{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=w1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function w1(n){let a=null,i=null,o=null,r=1,u=null;if(qn(n)||Ea(n))o=n,a=n0(n),i=vf(n);else{if(!t0.call(n,"name"))throw new Error(Ow("name"));const d=n.name;if(o=d,t0.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(Bw(d));a=n0(d),i=vf(d),u=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:u}}function n0(n){return Ea(n)?n:n.split(".")}function vf(n){return Ea(n)?n.join("."):n}function Iw(n,a){let i=[],o=!1;const r=(u,d,p)=>{if(fn(u))if(!d[p])i.push(u);else{let m=d[p];const g=u[m];if(!fn(g))return;if(p===d.length-1&&(qn(g)||C1(g)||Nw(g)))i.push(ww(g));else if(Ea(g)){o=!0;for(let v=0,y=g.length;v<y;v+=1)r(g[v],d,p+1)}else d.length&&r(g,d,p+1)}};return r(n,qn(a)?a.split("."):a,0),o?i:i[0]}const Uw={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},zw={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},Vw={location:0,threshold:.6,distance:100},Hw={useExtendedSearch:!1,getFn:Iw,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ye={...zw,...Uw,...Vw,...Hw};const Pw=/[^ ]+/g;function Gw(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(Pw).length;if(i.has(u))return i.get(u);const d=1/Math.pow(u,.5*n),p=parseFloat(Math.round(d*o)/o);return i.set(u,p),p},clear(){i.clear()}}}class vh{constructor({getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){this.norm=Gw(i,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((i,o)=>{this._keysMap[i.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,qn(this.docs[0])?this.docs.forEach((a,i)=>{this._addString(a,i)}):this.docs.forEach((a,i)=>{this._addObject(a,i)}),this.norm.clear())}add(a){const i=this.size();qn(a)?this._addString(a,i):this._addObject(a,i)}removeAt(a){this.records.splice(a,1);for(let i=a,o=this.size();i<o;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(a,i){return a[this._keysMap[i]]}size(){return this.records.length}_addString(a,i){if(!fn(a)||Pd(a))return;let o={v:a,i,n:this.norm.get(a)};this.records.push(o)}_addObject(a,i){let o={i,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(fn(d)){if(Ea(d)){let p=[];const m=[{nestedArrIndex:-1,value:d}];for(;m.length;){const{nestedArrIndex:g,value:v}=m.pop();if(fn(v))if(qn(v)&&!Pd(v)){let y={v,i:g,n:this.norm.get(v)};p.push(y)}else Ea(v)&&v.forEach((y,_)=>{m.push({nestedArrIndex:_,value:y})})}o.$[u]=p}else if(qn(d)&&!Pd(d)){let p={v:d,n:this.norm.get(d)};o.$[u]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function N1(n,a,{getFn:i=ye.getFn,fieldNormWeight:o=ye.fieldNormWeight}={}){const r=new vh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(w1)),r.setSources(a),r.create(),r}function Fw(n,{getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new vh({getFn:a,fieldNormWeight:i});return u.setKeys(o),u.setIndexRecords(r),u}function jr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=ye.distance,ignoreLocation:u=ye.ignoreLocation}={}){const d=a/n.length;if(u)return d;const p=Math.abs(o-i);return r?d+p/r:p?1:d}function $w(n=[],a=ye.minMatchCharLength){let i=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let p=n[u];p&&o===-1?o=u:!p&&o!==-1&&(r=u-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&i.push([o,u-1]),i}const Ds=32;function qw(n,a,i,{location:o=ye.location,distance:r=ye.distance,threshold:u=ye.threshold,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,includeMatches:m=ye.includeMatches,ignoreLocation:g=ye.ignoreLocation}={}){if(a.length>Ds)throw new Error(Rw(Ds));const v=a.length,y=n.length,_=Math.max(0,Math.min(o,y));let T=u,E=_;const w=p>1||m,j=w?Array(y):[];let C;for(;(C=n.indexOf(a,E))>-1;){let H=jr(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(H,T),E=C+v,w){let R=0;for(;R<v;)j[C+R]=1,R+=1}}E=-1;let A=[],M=1,V=v+y;const D=1<<v-1;for(let H=0;H<v;H+=1){let R=0,X=V;for(;R<X;)jr(a,{errors:H,currentLocation:_+X,expectedLocation:_,distance:r,ignoreLocation:g})<=T?R=X:V=X,X=Math.floor((V-R)/2+R);V=X;let te=Math.max(1,_-X+1),ne=d?y:Math.min(_+X,y)+v,ie=Array(ne+2);ie[ne+1]=(1<<H)-1;for(let q=ne;q>=te;q-=1){let Q=q-1,B=i[n.charAt(Q)];if(w&&(j[Q]=+!!B),ie[q]=(ie[q+1]<<1|1)&B,H&&(ie[q]|=(A[q+1]|A[q])<<1|1|A[q+1]),ie[q]&D&&(M=jr(a,{errors:H,currentLocation:Q,expectedLocation:_,distance:r,ignoreLocation:g}),M<=T)){if(T=M,E=Q,E<=_)break;te=Math.max(1,2*_-E)}}if(jr(a,{errors:H+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;A=ie}const G={isMatch:E>=0,score:Math.max(.001,M)};if(w){const H=$w(j,p);H.length?m&&(G.indices=H):G.isMatch=!1}return G}function Yw(n){let a={};for(let i=0,o=n.length;i<o;i+=1){const r=n.charAt(i);a[r]=(a[r]||0)|1<<o-i-1}return a}const qr=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class D1{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:u=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v},a=m?a:a.toLowerCase(),a=g?qr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const y=(T,E)=>{this.chunks.push({pattern:T,alphabet:Yw(T),startIndex:E})},_=this.pattern.length;if(_>Ds){let T=0;const E=_%Ds,w=_-E;for(;T<w;)y(this.pattern.substr(T,Ds),T),T+=Ds;if(E){const j=_-Ds;y(this.pattern.substr(j),j)}}else y(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?qr(a):a,this.pattern===a){let w={isMatch:!0,score:0};return r&&(w.indices=[[0,a.length-1]]),w}const{location:u,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:v}=this.options;let y=[],_=0,T=!1;this.chunks.forEach(({pattern:w,alphabet:j,startIndex:C})=>{const{isMatch:A,score:M,indices:V}=qw(a,w,j,{location:u+C,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:v});A&&(T=!0),_+=M,A&&V&&(y=[...y,...V])});let E={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(E.indices=y),E}}class ls{constructor(a){this.pattern=a}static isMultiMatch(a){return a0(a,this.multiRegex)}static isSingleMatch(a){return a0(a,this.singleRegex)}search(){}}function a0(n,a){const i=n.match(a);return i?i[1]:null}class Kw extends ls{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Zw extends ls{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class Xw extends ls{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class Qw extends ls{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class Jw extends ls{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class Ww extends ls{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class k1 extends ls{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:u=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){super(a),this._bitapSearch=new D1(a,{location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class M1 extends ls{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+u,r.push([o,i-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const bf=[Kw,M1,Xw,Qw,Ww,Jw,Zw,k1],s0=bf.length,eN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,tN="|";function nN(n,a={}){return n.split(tN).map(i=>{let o=i.trim().split(eN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const p=o[u];let m=!1,g=-1;for(;!m&&++g<s0;){const v=bf[g];let y=v.isMultiMatch(p);y&&(r.push(new v(y,a)),m=!0)}if(!m)for(g=-1;++g<s0;){const v=bf[g];let y=v.isSingleMatch(p);if(y){r.push(new v(y,a));break}}}return r})}const aN=new Set([k1.type,M1.type]);class sN{constructor(a,{isCaseSensitive:i=ye.isCaseSensitive,ignoreDiacritics:o=ye.ignoreDiacritics,includeMatches:r=ye.includeMatches,minMatchCharLength:u=ye.minMatchCharLength,ignoreLocation:d=ye.ignoreLocation,findAllMatches:p=ye.findAllMatches,location:m=ye.location,threshold:g=ye.threshold,distance:v=ye.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:p,ignoreLocation:d,location:m,threshold:g,distance:v},a=i?a:a.toLowerCase(),a=o?qr(a):a,this.pattern=a,this.query=nN(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?qr(a):a;let d=0,p=[],m=0;for(let g=0,v=i.length;g<v;g+=1){const y=i[g];p.length=0,d=0;for(let _=0,T=y.length;_<T;_+=1){const E=y[_],{isMatch:w,indices:j,score:C}=E.search(a);if(w){if(d+=1,m+=C,o){const A=E.constructor.type;aN.has(A)?p=[...p,...j]:p.push(j)}}else{m=0,d=0,p.length=0;break}}if(d){let _={isMatch:!0,score:m/d};return o&&(_.indices=p),_}}return{isMatch:!1,score:1}}}const Sf=[];function iN(...n){Sf.push(...n)}function _f(n,a){for(let i=0,o=Sf.length;i<o;i+=1){let r=Sf[i];if(r.condition(n,a))return new r(n,a)}return new D1(n,a)}const Yr={AND:"$and",OR:"$or"},xf={PATH:"$path",PATTERN:"$val"},Tf=n=>!!(n[Yr.AND]||n[Yr.OR]),lN=n=>!!n[xf.PATH],oN=n=>!Ea(n)&&A1(n)&&!Tf(n),i0=n=>({[Yr.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function R1(n,a,{auto:i=!0}={}){const o=r=>{let u=Object.keys(r);const d=lN(r);if(!d&&u.length>1&&!Tf(r))return o(i0(r));if(oN(r)){const m=d?r[xf.PATH]:u[0],g=d?r[xf.PATTERN]:r[m];if(!qn(g))throw new Error(Mw(m));const v={keyId:vf(m),pattern:g};return i&&(v.searcher=_f(g,a)),v}let p={children:[],operator:u[0]};return u.forEach(m=>{const g=r[m];Ea(g)&&g.forEach(v=>{p.children.push(o(v))})}),p};return Tf(n)||(n=i0(n)),o(n)}function rN(n,{ignoreFieldNorm:a=ye.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:u,score:d})=>{const p=r?r.weight:null;o*=Math.pow(d===0&&p?Number.EPSILON:d,(p||1)*(a?1:u))}),i.score=o})}function cN(n,a){const i=n.matches;a.matches=[],fn(i)&&i.forEach(o=>{if(!fn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function uN(n,a){a.score=n.score}function dN(n,a,{includeMatches:i=ye.includeMatches,includeScore:o=ye.includeScore}={}){const r=[];return i&&r.push(cN),o&&r.push(uN),n.map(u=>{const{idx:d}=u,p={item:a[d],refIndex:d};return r.length&&r.forEach(m=>{m(u,p)}),p})}class Ii{constructor(a,i={},o){this.options={...ye,...i},this.options.useExtendedSearch,this._keyStore=new Lw(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof vh))throw new Error(kw);this._myIndex=i||N1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){fn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,i.push(u))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:p}=this.options;let m=qn(a)?qn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return rN(m,{ignoreFieldNorm:p}),u&&m.sort(d),C1(i)&&i>-1&&(m=m.slice(0,i)),dN(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=_f(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:p})=>{if(!fn(u))return;const{isMatch:m,score:g,indices:v}=i.searchIn(u);m&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:p,indices:v}]})}),r}_searchLogical(a){const i=R1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:y,searcher:_}=p,T=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(m,y),searcher:_});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const v=[];for(let y=0,_=p.children.length;y<_;y+=1){const T=p.children[y],E=o(T,m,g);if(E.length)v.push(...E);else if(p.operator===Yr.AND)return[]}return v},r=this._myIndex.records,u={},d=[];return r.forEach(({$:p,i:m})=>{if(fn(p)){let g=o(i,p,m);g.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},d.push(u[m])),g.forEach(({matches:v})=>{u[m].matches.push(...v)}))}}),d}_searchObjectList(a){const i=_f(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:p})=>{if(!fn(d))return;let m=[];o.forEach((g,v)=>{m.push(...this._findMatches({key:g,value:d[v],searcher:i}))}),m.length&&u.push({idx:p,item:d,matches:m})}),u}_findMatches({key:a,value:i,searcher:o}){if(!fn(i))return[];let r=[];if(Ea(i))i.forEach(({v:u,i:d,n:p})=>{if(!fn(u))return;const{isMatch:m,score:g,indices:v}=o.searchIn(u);m&&r.push({score:g,key:a,value:u,idx:d,norm:p,indices:v})});else{const{v:u,n:d}=i,{isMatch:p,score:m,indices:g}=o.searchIn(u);p&&r.push({score:m,key:a,value:u,norm:d,indices:g})}return r}}Ii.version="7.1.0";Ii.createIndex=N1;Ii.parseIndex=Fw;Ii.config=ye;Ii.parseQuery=R1;iN(sN);function l0(n,a,i,o){if(!a.trim())return[];const r=.3;return new Ii(n,{keys:i,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(m=>({item:m.item,score:m.score??1,matches:(m.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const fN="_breadcrumbs_17or2_1",hN="_list_17or2_11",pN="_item_17or2_21",mN="_separator_17or2_28",gN="_link_17or2_34",yN="_current_17or2_57",xi={breadcrumbs:fN,list:hN,item:pN,separator:mN,link:gN,current:yN},vN="›";function Ui({segments:n}){return h.jsx("nav",{className:xi.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:xi.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:xi.item,children:[i>0&&h.jsx("span",{className:xi.separator,"aria-hidden":"true",children:vN}),a.url&&!o?h.jsx(Of,{className:xi.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:xi.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function Ef(){Ef=function(r,u){return new i(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function i(r,u,d){var p=new RegExp(r,u);return a.set(p,d||a.get(r)),Kr(p,i.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(p,m){var g=d[m];if(typeof g=="number")p[m]=r[g];else{for(var v=0;r[g[v]]===void 0&&v+1<g.length;)v++;p[m]=r[g[v]]}return p},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&Kr(r,u)})(i,RegExp),i.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},i.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(m,g){var v=d[g];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof u=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),u.apply(this,m)})}return n[Symbol.replace].call(this,r,u)},Ef.apply(this,arguments)}function Kr(n,a){return Kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Kr(n,a)}function o0(n,a){(a==null||a>n.length)&&(a=n.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=n[i];return o}function Gd(n,a){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=(function(r,u){if(r){if(typeof r=="string")return o0(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?o0(r,u):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
87
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var bN=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){ox(o,"element",i)};function i(o,r,u){var d,p;if(u&&u.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,v,y=(function(D){for(var G,H=Gd(D.properties.className);!(G=H()).done;){var R=G.value;if(R.slice(0,9)==="language-")return R.slice(9).toLowerCase()}return null})(o);if(!y&&a.defaultLanguage&&o.properties.className.push("language-"+(y=a.defaultLanguage)),o.properties.className.push("code-highlight"),y)try{var _,T;T=(_=y)!=null&&_.includes("diff-")?y.split("-")[1]:y,g=n.highlight(_r(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(D){if(!a.ignoreMissing||!/Unknown language/.test(D.message))throw D;g=o}else g=o;g.children=(v=1,function D(G){return G.reduce(function(H,R){if(R.type==="text"){var X=R.value,te=(X.match(/\n/g)||"").length;if(te===0)R.position={start:{line:v,column:1},end:{line:v,column:1}},H.push(R);else for(var ne,ie=X.split(`
|
|
88
|
+
`),ue=Gd(ie.entries());!(ne=ue()).done;){var q=ne.value,Q=q[0],B=q[1];H.push({type:"text",value:Q===ie.length-1?B:B+`
|
|
89
|
+
`,position:{start:{line:v+Q,column:1},end:{line:v+Q,column:1}}})}return v+=te,H}if(Object.prototype.hasOwnProperty.call(R,"children")){var F=v;return R.children=D(R.children),H.push(R),R.position={start:{line:F,column:1},end:{line:v,column:1}},H}return H.push(R),H},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var E,w=(function(D){var G=/{([\d,-]+)}/,H=D.split(",").map(function(te){return te.trim()}).join();if(G.test(H)){var R=G.exec(H)[1],X=cx(R);return function(te){return X.includes(te+1)}}return function(){return!1}})(m),j=(function(D){var G=Ef(/showLineNumbers=(\d+)/i,{lines:1});if(G.test(D)){var H=G.exec(D);return Number(H.groups.lines)}return 1})(m),C=(function(D){for(var G=new Array(D),H=0;H<D;H++)G[H]={type:"element",tagName:"span",properties:{className:[]},children:[]};return G})(g.position.end.line),A=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],M=function(){var D,G,H=E.value,R=H[0],X=H[1];X.properties.className=["code-line"];var te=ux(g,function(ne){return ne.position.start.line<=R+1&&ne.position.end.line>=R+1});X.children=te.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(y))&&!A.some(function(ne){return m.toLowerCase().includes(ne)})&&(X.properties.line=[(R+j).toString()],X.properties.className.push("line-number")),w(R)&&X.properties.className.push("highlight-line"),(y==="diff"||(D=y)!=null&&D.includes("diff-"))&&_r(X).substring(0,1)==="-"?X.properties.className.push("deleted"):(y==="diff"||(G=y)!=null&&G.includes("diff-"))&&_r(X).substring(0,1)==="+"&&X.properties.className.push("inserted")},V=Gd(C.entries());!(E=V()).done;)M();C.length>0&&_r(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(rx);const SN="_systemEvent_463jy_1",_N="_systemTimestamp_463jy_8",xN="_textEvent_463jy_12",TN="_toolUseEvent_463jy_98",EN="_toolUseHeader_463jy_118",CN="_toolUsePrefix_463jy_125",AN="_toolUseName_463jy_130",jN="_toolUseArgs_463jy_135",wN="_toolResultEvent_463jy_146",NN="_toolResultHeader_463jy_151",DN="_toolResultIndicatorOk_463jy_175",kN="_toolResultIndicatorError_463jy_182",MN="_toolResultLabel_463jy_189",RN="_toolResultToggle_463jy_193",ON="_toolResultCommand_463jy_199",BN="_toolResultEllipsis_463jy_209",LN="_toolResultPre_463jy_213",IN="_errorEvent_463jy_234",UN="_statusEvent_463jy_242",zN="_userInputEvent_463jy_251",VN="_userInputContent_463jy_257",HN="_defaultEvent_463jy_274",rt={systemEvent:SN,systemTimestamp:_N,textEvent:xN,toolUseEvent:TN,toolUseHeader:EN,toolUsePrefix:CN,toolUseName:AN,toolUseArgs:jN,toolResultEvent:wN,toolResultHeader:NN,toolResultIndicatorOk:DN,toolResultIndicatorError:kN,toolResultLabel:MN,toolResultToggle:RN,toolResultCommand:ON,toolResultEllipsis:BN,toolResultPre:LN,errorEvent:IN,statusEvent:UN,userInputEvent:zN,userInputContent:VN,defaultEvent:HN};function PN({time:n,content:a}){return h.jsxs("div",{className:rt.systemEvent,children:[h.jsxs("span",{className:rt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function GN({content:n}){return h.jsx("div",{className:rt.textEvent,children:h.jsx(Af,{remarkPlugins:[jf],rehypePlugins:[bN],children:n})})}function FN({content:n}){let a="",i=n;try{const o=JSON.parse(n);a=o.tool||"",i=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:rt.toolUseEvent,children:[h.jsxs("div",{className:rt.toolUseHeader,children:[h.jsx("span",{className:rt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:rt.toolUseName,children:a}):null]}),h.jsx("pre",{className:rt.toolUseArgs,children:i})]})}const r0=5;function $N(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const i=a;if(typeof i.command=="string")return i.command;if(typeof i.file_path=="string")return i.file_path;if(typeof i.pattern=="string"){const o=typeof i.path=="string"?` in ${i.path}`:"";return`${i.pattern}${o}`}if(typeof i.path=="string")return i.path;if(typeof i.query=="string")return i.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function qN({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
|
|
90
|
+
`),p=d.length>r0,m=o?n:d.slice(0,r0).join(`
|
|
91
|
+
`),v=((i==null?void 0:i.tool)??"")||(u?"Tool error":"Tool output"),y=i?$N(i.tool,i.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?rt.toolResultIndicatorError:rt.toolResultIndicatorOk,"aria-label":u?"error":"success","data-testid":u?"tool-result-indicator-error":"tool-result-indicator-ok",children:u?"✗":"✓"}),h.jsx("span",{className:rt.toolResultLabel,"data-testid":"tool-result-label",children:v}),p&&h.jsx("span",{className:rt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:rt.toolResultEvent,"data-testid":"tool-result",children:[p?h.jsx("button",{className:rt.toolResultHeader,"data-testid":"tool-result-header",onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:rt.toolResultHeader,"data-testid":"tool-result-header",children:_}),y&&h.jsx("div",{className:rt.toolResultCommand,children:y}),h.jsxs("pre",{className:rt.toolResultPre,"data-testid":"tool-result-content",children:[m,!o&&p&&h.jsx("span",{className:rt.toolResultEllipsis,children:"…"})]})]})}function YN({content:n}){return h.jsxs("div",{className:rt.errorEvent,children:["Error: ",n]})}function KN({content:n}){return h.jsxs("div",{className:rt.statusEvent,children:["--- ",n," ---"]})}function ZN({content:n}){return h.jsx("div",{className:rt.userInputEvent,children:h.jsx("span",{className:rt.userInputContent,children:n})})}function XN({content:n}){return h.jsx("div",{className:rt.defaultEvent,children:n})}function QN({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(PN,{time:i,content:n.content});case"text":case"output":return h.jsx(GN,{content:n.content});case"tool_use":return h.jsx(FN,{content:n.content});case"tool_result":return h.jsx(qN,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(YN,{content:n.content});case"status":return h.jsx(KN,{content:n.content});case"user_input":return h.jsx(ZN,{content:n.content});default:return h.jsx(XN,{content:n.content})}}const JN="_overlay_cmicx_1",WN="_dialog_cmicx_11",eD="_title_cmicx_30",tD="_description_cmicx_38",nD="_actions_cmicx_45",aD="_cancelButton_cmicx_52",sD="_confirmButton_cmicx_79",As={overlay:JN,dialog:WN,title:eD,description:tD,actions:nD,cancelButton:aD,confirmButton:sD};function oc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),p=S.useId();return h.jsx(Qn,{children:n&&h.jsx(an.div,{className:As.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:m=>{m.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":i?p:void 0,children:h.jsxs(an.div,{className:As.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:m=>m.stopPropagation(),children:[h.jsx("h3",{id:d,className:As.title,children:a}),i&&h.jsx("p",{id:p,className:As.description,children:i}),h.jsxs("div",{className:As.actions,children:[h.jsx("button",{type:"button",className:As.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:As.confirmButton,onClick:r,children:o})]})]})})})}const iD="_spinner_13c8l_1",lD="_spin_13c8l_1",oD="_sm_13c8l_14",rD="_md_13c8l_20",cD="_lg_13c8l_26",c0={spinner:iD,spin:lD,sm:oD,md:rD,lg:cD};function u0({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${c0.spinner} ${c0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const Cf={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function ss(n){return n==="blocked"?Cf.blocked:Cf[bh(n)]}const uD={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function dD(n){return uD[bh(n)]??"statusPending"}const fD=["working","paused","failed","not_started","blocked","complete"],d0=["not_started","working","paused","complete","failed"],hD={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function bh(n){return n in Cf&&n!=="blocked"?n:hD[n]??"not_started"}const pD={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},mD="_container_15oob_1",gD="_header_15oob_5",yD="_searchInput_15oob_17",vD="_searchHighlight_15oob_50",bD="_addButton_15oob_56",SD="_createForm_15oob_83",_D="_createInput_15oob_89",xD="_createButton_15oob_120",TD="_creatingHint_15oob_161",ED="_projectRow_15oob_170",CD="_selected_15oob_188",AD="_expandArrow_15oob_193",jD="_expanded_15oob_200",wD="_projectName_15oob_204",ND="_taskCount_15oob_208",DD="_newTaskButton_15oob_214",kD="_taskRow_15oob_241",MD="_taskStatusIcon_15oob_271",RD="_taskTitle_15oob_275",OD="_dependencyBadge_15oob_282",BD="_blockedBadge_15oob_294",LD="_leafSpacer_15oob_299",ID="_childCountBadge_15oob_304",UD="_addChildButton_15oob_317",zD="_emptyCta_15oob_366",VD="_ctaDescription_15oob_379",HD="_ctaButton_15oob_385",PD="_emptyTaskCta_15oob_420",GD="_headerActions_15oob_425",FD="_groupToggle_15oob_431",$D="_groupToggleActive_15oob_458",qD="_statusGroupHeader_15oob_462",YD="_statusGroupIcon_15oob_481",KD="_statusGroupLabel_15oob_485",ZD="_statusGroupCount_15oob_490",XD="_createTaskLink_15oob_503",ve={container:mD,header:gD,searchInput:yD,searchHighlight:vD,addButton:bD,createForm:SD,createInput:_D,createButton:xD,creatingHint:TD,projectRow:ED,selected:CD,expandArrow:AD,expanded:jD,projectName:wD,taskCount:ND,newTaskButton:DD,taskRow:kD,taskStatusIcon:MD,taskTitle:RD,dependencyBadge:OD,blockedBadge:BD,leafSpacer:LD,childCountBadge:ID,addChildButton:UD,emptyCta:zD,ctaDescription:VD,ctaButton:HD,emptyTaskCta:PD,headerActions:GD,groupToggle:FD,groupToggleActive:$D,statusGroupHeader:qD,statusGroupIcon:YD,statusGroupLabel:KD,statusGroupCount:ZD,createTaskLink:XD};function QD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):i.push([u,d])}return i}function O1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=QD(a),o=[];let r=0;for(const[u,d]of i)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:ve.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const JD=[{name:"name",weight:2},{name:"description",weight:1}],WD=[{name:"title",weight:2},{name:"description",weight:1}],B1=34,ek=16,L1="grackle-group-by-status";function f0(){try{return localStorage.getItem(L1)==="true"}catch{return!1}}function tk(n){try{localStorage.setItem(L1,String(n))}catch{}}function nk(n,a){const i=new Map;for(const u of n){const p=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,m=i.get(p);m?m.push(u):i.set(p,[u])}const o=[],r=new Set;for(const u of fD){r.add(u);const d=i.get(u);if(d&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=ss(u);o.push({status:u,label:p.label,style:p,tasks:d})}}for(const[u,d]of i)if(!r.has(u)&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=ss(u);o.push({status:u,label:p.label,style:p,tasks:d})}return o}function ak({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:ve.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:[h.jsx("span",{className:`${ve.expandArrow} ${a?ve.expanded:""}`,children:"▸"}),h.jsx("span",{className:ve.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:ve.statusGroupLabel,children:n.label}),h.jsx("span",{className:ve.statusGroupCount,children:n.tasks.length})]}),h.jsx(Qn,{children:a&&h.jsx(an.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const p=ss(d.status),m=o===d.id;return h.jsxs("div",{onClick:()=>r(ts(d.id)),className:`${ve.taskRow} ${m?ve.selected:""}`,style:{"--task-indent":`${B1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:ve.leafSpacer}),h.jsx("span",{className:ve.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:ve.taskTitle,title:d.title,children:h.jsx(O1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function sk(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function I1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m}){const g=ss(n.status),v=n.dependsOn.length>0&&n.dependsOn.some(w=>p.get(w)!=="complete"),y=i.has(n.id),_=n.children.length>0,T=r===n.id,E=B1+a*ek;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(ts(n.id)),className:`${ve.taskRow} ${T?ve.selected:""}`,style:{"--task-indent":`${E}px`},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${ve.expandArrow} ${y?ve.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:w=>{w.stopPropagation(),o(n.id)},onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),w.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:ve.leafSpacer}),h.jsx("span",{className:ve.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:ve.taskTitle,title:n.title,children:h.jsx(O1,{text:n.title,indices:m.get(n.id)})}),_&&h.jsxs("span",{className:ve.childCountBadge,children:[n.children.filter(w=>w.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${ve.dependencyBadge} ${v?ve.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),a<Aw&&h.jsx("button",{onClick:w=>{w.stopPropagation(),u(Rs(d,n.id))},title:"Add child task","aria-label":"Add child task",className:ve.addChildButton,children:"+"})]}),h.jsx(Qn,{children:_&&y&&h.jsx(an.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(w=>h.jsx(I1,{node:w,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m},w.id))})})]})}function ik(){const{projects:n,tasks:a,loadTasks:i,createProject:o,projectCreating:r}=Gt(),u=Un(),[d,p]=S.useState(new Set),[m,g]=S.useState(new Set),[v,y]=S.useState(new Set),[_,T]=S.useState(!1),[E,w]=S.useState(""),[j,C]=S.useState(f0),[A,M]=S.useState(f0),[V,D]=S.useState(new Map),G=()=>{const ee=!j;tk(ee),C(ee),ee&&(M(!0),D(new Map))},H=(ee,Ve)=>{const we=`${ee}:${Ve}`;D(_e=>{const ut=new Map(_e),dt=ut.has(we)?ut.get(we):A;return ut.set(we,!dt),ut})},R=(ee,Ve)=>{const we=`${ee}:${Ve}`;return V.has(we)?V.get(we):A},X=Yt("/tasks/:taskId/*"),te=Yt("/projects/:projectId"),ne=(X==null?void 0:X.params.taskId)!=="new"?X==null?void 0:X.params.taskId:void 0,ie=te==null?void 0:te.params.projectId,ue=S.useRef(d);ue.current=d;const q=S.useMemo(()=>new Map(a.map(ee=>[ee.id,ee.status])),[a]),Q=ee=>{p(Ve=>{const we=new Set(Ve);return we.has(ee)?we.delete(ee):(we.add(ee),i(ee)),we})},B=ee=>{g(Ve=>{const we=new Set(Ve);return we.has(ee)?(we.delete(ee),y(_e=>new Set(_e).add(ee))):(we.add(ee),y(_e=>{const ut=new Set(_e);return ut.delete(ee),ut})),we})};S.useEffect(()=>{const ee=new Set(a.filter(Ve=>Ve.parentTaskId).map(Ve=>Ve.parentTaskId));ee.size>0&&g(Ve=>{const we=new Set(Ve);for(const _e of ee)v.has(_e)||we.add(_e);return we})},[a,v]),S.useEffect(()=>{ie&&!ue.current.has(ie)&&(p(ee=>new Set(ee).add(ie)),i(ie))},[ie,i]);const F=()=>{!E.trim()||r||(o(E.trim()),w(""),T(!1))},[W,be]=S.useState(""),{directMatchTaskIds:Te,treeMatchTaskIds:tt,visibleProjectIds:Me,matchedProjectIds:fe,titleHighlights:Ie}=S.useMemo(()=>{if(!W.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const ee=l0(n,W,JD),Ve=l0(a,W,WD),we=new Set(ee.map($e=>$e.item.id)),_e=new Set(Ve.map($e=>$e.item.id)),ut=new Map;for(const $e of Ve){const Re=$e.matches.find(kn=>kn.key==="title");Re&&ut.set($e.item.id,Re.indices)}const dt=new Set(we);for(const $e of Ve)dt.add($e.item.projectId);const Lt=new Set(_e),Dt=new Map(a.map($e=>[$e.id,$e]));for(const $e of[..._e]){let Re=Dt.get($e);for(;Re!=null&&Re.parentTaskId;)Lt.add(Re.parentTaskId),Re=Dt.get(Re.parentTaskId)}return{directMatchTaskIds:_e,treeMatchTaskIds:Lt,visibleProjectIds:dt,matchedProjectIds:we,titleHighlights:ut}},[W,n,a]),Ee=S.useRef(new Set);return S.useEffect(()=>{if(W.trim())for(const ee of n)!d.has(ee.id)&&!Ee.current.has(ee.id)&&(Ee.current.add(ee.id),i(ee.id))},[W,n,d,i]),h.jsxs("div",{className:ve.container,children:[h.jsxs("div",{className:ve.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:ve.headerActions,children:[h.jsx("button",{className:`${ve.groupToggle} ${j?ve.groupToggleActive:""}`,onClick:G,"aria-label":j?"Switch to tree view":"Group tasks by status","aria-pressed":j,title:j?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:ve.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:W,onChange:ee=>be(ee.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:ve.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:ve.createForm,children:[h.jsx("input",{type:"text",value:E,onChange:ee=>w(ee.target.value),onKeyDown:ee=>ee.key==="Enter"&&F(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:ve.createInput}),h.jsx("button",{onClick:F,className:ve.createButton,disabled:r,children:r?h.jsx(u0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:ve.creatingHint,children:[h.jsx(u0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:ve.emptyCta,children:[h.jsx("button",{className:ve.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:ve.ctaDescription,children:"Organize your work into projects"})]}),n.map(ee=>{if(Me&&!Me.has(ee.id))return null;const Ve=Te!==null,we=d.has(ee.id)||Ve,_e=a.filter(Re=>Re.projectId===ee.id),ut=(fe==null?void 0:fe.has(ee.id))??!1,dt=Ve&&!ut?j?Te:tt:null,Lt=dt?_e.filter(Re=>dt.has(Re.id)):_e,Dt=ie===ee.id,$e=we&&!j?sk(Lt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Dt?Q(ee.id):(we||Q(ee.id),u(ql(ee.id)))},className:`${ve.projectRow} ${Dt?ve.selected:""}`,children:[h.jsx("span",{className:`${ve.expandArrow} ${we?ve.expanded:""}`,children:"▸"}),h.jsx("span",{className:ve.projectName,title:ee.name,children:ee.name}),h.jsx("span",{className:ve.taskCount,children:_e.length>0&&`${_e.filter(Re=>Re.status==="complete").length}/${_e.length}`}),h.jsx("button",{onClick:Re=>{Re.stopPropagation(),u(Rs(ee.id))},title:"New task",className:ve.newTaskButton,children:"+"})]}),h.jsx(Qn,{children:we&&h.jsxs(an.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:[j?nk(Lt,q).map(Re=>h.jsx(ak,{group:Re,isExpanded:R(ee.id,Re.status),onToggle:()=>H(ee.id,Re.status),selectedTaskId:ne,navigate:u,titleHighlights:Ie},Re.status)):$e.map(Re=>h.jsx(I1,{node:Re,depth:0,expandedTasks:m,toggleTask:B,selectedTaskId:ne,navigate:u,projectId:ee.id,taskStatusById:q,titleHighlights:Ie},Re.id)),Lt.length===0&&h.jsx("div",{className:ve.emptyTaskCta,children:h.jsx("button",{className:ve.createTaskLink,onClick:()=>u(Rs(ee.id)),children:"+ Create Task"})})]})})]},ee.id)})]})}const lk="_container_lovia_1",ok="_content_lovia_40",h0={container:lk,content:ok},rk=320,U1=220,z1=600,V1="grackle-sidebar-width";function ck(){try{const n=localStorage.getItem(V1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=U1&&a<=z1)return a}}catch{}return rk}function uk(n){try{localStorage.setItem(V1,String(n))}catch{}}function dk(){const[n]=S.useState(ck),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const p=Math.round(d.inlineSize);p>=U1&&p<=z1&&uk(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:h0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:h0.content,children:h.jsx(ik,{})})})}const fk="_bar_8ghh5_1",hk="_barColumn_8ghh5_32",pk="_barRow_8ghh5_63",mk="_input_8ghh5_74",gk="_inputSmall_8ghh5_109",yk="_select_8ghh5_178",vk="_btnPrimary_8ghh5_214",bk="_btnDanger_8ghh5_245",Sk="_btnGhost_8ghh5_284",_k="_badge_8ghh5_312",xk="_statusText_8ghh5_322",Tk="_statusCompleted_8ghh5_327",Ek="_statusFailed_8ghh5_331",Ck="_statusBlocked_8ghh5_335",Ak="_hintText_8ghh5_340",jk="_creatingHint_8ghh5_345",wk="_errorHint_8ghh5_353",Nk="_disconnectHint_8ghh5_359",re={bar:fk,barColumn:hk,barRow:pk,input:mk,inputSmall:gk,select:yk,btnPrimary:vk,btnDanger:bk,btnGhost:Sk,badge:_k,statusText:xk,statusCompleted:Tk,statusFailed:Ek,statusBlocked:Ck,hintText:Ak,creatingHint:jk,errorHint:wk,disconnectHint:Nk};function p0(n,a){if(!n)return!1;const i=a.find(o=>o.id===n);return i!==void 0&&(i.status==="disconnected"||i.status==="error")}function m0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:re.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:re.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function Dk(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:v,codespaceListError:y,codespaceCreating:_,listCodespaces:T,createCodespace:E}=Gt(),{showToast:w}=to(),j=Un(),[C]=Bf(),A=Yt("/sessions/:sessionId"),M=Yt("/tasks/:taskId"),V=Yt("/tasks/:taskId/stream"),D=Yt("/tasks/:taskId/findings"),G=Yt("/tasks/:taskId/edit"),H=Yt("/sessions/new"),R=Yt("/environments/new"),X=Yt("/projects/:projectId"),te=Yt("/tasks/new"),ne=Yt("/"),ie=Yt("/settings/*"),ue=A==null?void 0:A.params.sessionId,q=(M==null?void 0:M.params.taskId)??(V==null?void 0:V.params.taskId)??(D==null?void 0:D.params.taskId),Q=!!H,B=!!R,F=!!X,W=!!te,be=!!G,Te=!!ne&&!Q&&!B&&!F&&!W,tt=!!ie,Me=Q?C.get("env")??"":"",[fe,Ie]=S.useState(""),[Ee,ee]=S.useState(""),[Ve,we]=S.useState(""),[_e,ut]=S.useState("local"),[dt,Lt]=S.useState(""),[Dt,$e]=S.useState(""),[Re,kn]=S.useState(""),[Ca,Aa]=S.useState(""),[zn,Jn]=S.useState(""),[Mn,Wn]=S.useState(""),[Z,J]=S.useState(""),[ae,ge]=S.useState(""),[pe,Ue]=S.useState(""),[Ce,yt]=S.useState("pick"),xe=ue?o.find(Se=>Se.id===ue):void 0,ft=q?r.find(Se=>Se.id===q):void 0,vt=(ft==null?void 0:ft.latestSessionId)||void 0,Oe=vt?o.find(Se=>Se.id===vt):void 0,kt=ft?ft.dependsOn.some(Se=>{const Ne=r.find(Tt=>Tt.id===Se);return Ne&&Ne.status!=="complete"}):!1;if(Te||tt)return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Select a session or click + to start"})});if(be||W)return h.jsx(h.Fragment,{});if(B){const Se=le=>{if(!le.trim())return!0;const Et=Number(le);return Number.isInteger(Et)&&Et>=1&&Et<=65535},Ne=()=>!(!Ve.trim()||_e==="ssh"&&!dt.trim()||_e==="codespace"&&!Mn.trim()||(_e==="local"||_e==="ssh")&&!Se(Dt)),Tt=()=>{if(!Ne())return;const le={};if(_e==="local"){if(dt.trim()&&(le.host=dt.trim()),Dt.trim()){const Et=Number(Dt);Number.isInteger(Et)&&(le.port=Et)}}else if(_e==="ssh"){if(le.host=dt.trim(),Re.trim()&&(le.user=Re.trim()),Dt.trim()){const Et=Number(Dt);Number.isInteger(Et)&&(le.sshPort=Et)}Z.trim()&&(le.identityFile=Z.trim())}else _e==="docker"?(Ca.trim()&&(le.image=Ca.trim()),zn.trim()&&(le.repo=zn.trim())):_e==="codespace"&&(le.codespaceName=Mn.trim());p(Ve.trim(),_e,le),w("Environment added successfully","success"),we(""),ut("local"),Lt(""),$e(""),kn(""),Aa(""),Jn(""),Wn(""),J(""),ge(""),Ue(""),yt("pick"),j(Ni,{replace:!0})};return h.jsxs("div",{className:re.barColumn,children:[h.jsxs("div",{className:re.barRow,children:[h.jsx("span",{className:re.badge,children:"new env"}),h.jsx("input",{type:"text",value:Ve,onChange:le=>we(le.target.value),placeholder:"Environment name...",autoFocus:!0,className:re.input}),h.jsxs("select",{value:_e,onChange:le=>{ut(le.target.value),le.target.value==="codespace"&&(T(),yt("pick"),Wn(""))},className:re.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx("button",{onClick:Tt,disabled:!Ne(),className:re.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:re.barRow,children:[_e==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:dt,onChange:le=>Lt(le.target.value),placeholder:"Host (optional)...",className:re.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Dt,onChange:le=>$e(le.target.value),placeholder:"Port (optional)...",className:re.inputSmall})]}),_e==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:dt,onChange:le=>Lt(le.target.value),placeholder:"Host (required)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:Re,onChange:le=>kn(le.target.value),placeholder:"User (optional)...",className:re.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Dt,onChange:le=>$e(le.target.value),placeholder:"SSH port (optional)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:le=>J(le.target.value),placeholder:"Identity file (optional)...",className:re.inputSmall})]}),_e==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Ca,onChange:le=>Aa(le.target.value),placeholder:"Image (optional)...",className:re.inputSmall}),h.jsx("input",{type:"text",value:zn,onChange:le=>Jn(le.target.value),placeholder:"Repo (optional)...",className:re.inputSmall})]}),_e==="codespace"&&Ce==="pick"&&h.jsxs(h.Fragment,{children:[!y&&h.jsxs("select",{value:Mn,onChange:le=>{le.target.value==="__create__"?(yt("create"),Wn("")):(Wn(le.target.value),le.target.value&&!Ve.trim()&&we(le.target.value))},disabled:_,className:re.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(le=>h.jsxs("option",{value:le.name,children:[le.name," (",le.repository,") — ",le.state]},le.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:re.creatingHint,children:"Creating codespace..."}),y&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:re.errorHint,children:y}),h.jsx("input",{type:"text",value:Mn,onChange:le=>Wn(le.target.value),placeholder:"Or enter codespace name manually...",className:re.inputSmall})]}),v&&!y&&h.jsx("span",{className:re.errorHint,children:v})]}),_e==="codespace"&&Ce==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ae,onChange:le=>ge(le.target.value),placeholder:"owner/repo",className:re.inputSmall}),h.jsx("input",{type:"text",value:pe,onChange:le=>Ue(le.target.value),placeholder:"Machine type (optional)...",className:re.inputSmall}),h.jsx("button",{onClick:()=>{ae.trim()&&(E(ae.trim(),pe.trim()||void 0),yt("pick"),ge(""),Ue(""))},disabled:!ae.trim(),className:re.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{yt("pick"),ge(""),Ue("")},className:re.btnGhost,children:"Cancel"})]})]})]})}if(F)return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Select a task or click + to create one"})});if(q&&ft){if(ft.status==="not_started"){const Se=kt?ft.dependsOn.map(Ne=>r.find(Tt=>Tt.id===Ne)).filter(Ne=>Ne&&Ne.status!=="complete").map(Ne=>Ne.title):[];return h.jsx("div",{className:re.bar,children:kt?h.jsxs("span",{className:re.statusBlocked,children:["Blocked by: ",Se.join(", ")]}):h.jsx("span",{className:re.hintText,children:"Use the buttons above to start or manage this task"})})}if(ft.status==="working"||ft.status==="paused"){if((Oe==null?void 0:Oe.status)==="idle"){const Ne=Oe.environmentId,Tt=p0(Ne,u),le=Et=>{Et.preventDefault();const Rn=ft.latestSessionId||vt;!fe.trim()||!Rn||Tt||(a(Rn,fe),Ie(""))};return h.jsxs("form",{onSubmit:le,className:re.bar,children:[Tt&&Ne&&h.jsx(m0,{environmentId:Ne,onReconnect:m}),h.jsx("input",{type:"text",value:fe,onChange:Et=>Ie(Et.target.value),placeholder:"Type a message...",autoFocus:!Tt,disabled:Tt,className:re.input}),h.jsx("span",{title:Tt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!fe.trim()||Tt,className:re.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:re.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:re.input})})}if(ft.status==="complete")return h.jsxs("div",{className:re.bar,children:[h.jsx("span",{className:`${re.statusText} ${re.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>j(Rs(ft.projectId)),className:re.btnPrimary,children:"+ New Task"})]});if(ft.status==="failed")return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:`${re.statusText} ${re.statusFailed}`,children:"Task failed"})})}if(Q){const Se=Ne=>{Ne.preventDefault(),!(!fe.trim()||!Me)&&(n(Me,fe,Ee),w("Session started","success"),Ie(""),ee(""))};return h.jsxs("form",{onSubmit:Se,className:re.bar,children:[h.jsx("span",{className:re.badge,children:"new chat"}),h.jsx("input",{type:"text",value:fe,onChange:Ne=>Ie(Ne.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:re.input}),h.jsxs("select",{value:Ee,onChange:Ne=>ee(Ne.target.value),className:re.select,children:[h.jsx("option",{value:"",children:"(Default)"}),d.map(Ne=>h.jsx("option",{value:Ne.id,children:Ne.name},Ne.id))]}),h.jsx("button",{type:"submit",disabled:!fe.trim()||!Me,className:re.btnPrimary,children:"Go"})]})}if(ue){const Se=(xe==null?void 0:xe.status)==="running",Ne=(xe==null?void 0:xe.status)==="idle",Tt=xe!==void 0&&["completed","failed","interrupted"].includes(xe.status);if(Se)return h.jsxs("div",{className:re.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:re.input}),h.jsx("button",{onClick:()=>i(ue),className:re.btnDanger,title:"Stop session",children:"Stop"})]});if(Ne){const le=p0(xe.environmentId,u),Et=Rn=>{Rn.preventDefault(),!(!fe.trim()||le)&&(a(ue,fe),Ie(""))};return h.jsxs("form",{onSubmit:Et,className:re.bar,children:[le&&xe.environmentId&&h.jsx(m0,{environmentId:xe.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:fe,onChange:Rn=>Ie(Rn.target.value),placeholder:"Type a message...",autoFocus:!le,disabled:le,className:re.input}),h.jsx("span",{title:le?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!fe.trim()||le,className:re.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(ue),className:re.btnDanger,title:"Stop session",children:"Stop"})]})}if(Tt)return h.jsxs("div",{className:re.bar,children:[h.jsxs("span",{className:`${re.statusText} ${re.hintText}`,children:["Session ",xe.status]}),h.jsx("button",{onClick:()=>j(P0(xe.environmentId)),className:re.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:re.bar,children:h.jsx("span",{className:re.hintText,children:"Loading..."})})}const kk="_toast_da8ll_1",Mk="_success_da8ll_18",Rk="_icon_da8ll_22",Ok="_error_da8ll_25",Bk="_warning_da8ll_32",Lk="_info_da8ll_38",Ik="_message_da8ll_53",Uk="_close_da8ll_60",Rl={toast:kk,success:Mk,icon:Rk,error:Ok,warning:Bk,info:Lk,message:Ik,close:Uk},zk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Vk({toast:n,onDismiss:a}){return S.useEffect(()=>{const i=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(i)},[n.id,n.duration,a]),h.jsxs(an.div,{className:`${Rl.toast} ${Rl[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Rl.icon,"aria-hidden":"true",children:zk[n.variant]}),h.jsx("span",{className:Rl.message,children:n.message}),h.jsx("button",{type:"button",className:Rl.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const Hk="_container_qqse2_1",Pk={container:Hk};function Gk(){const{toasts:n,dismissToast:a}=to();return h.jsx("div",{className:Pk.container,"data-testid":"toast-container",children:h.jsx(Qn,{children:n.map(i=>h.jsx(Vk,{toast:i,onDismiss:a},i.id))})})}function Fk(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const p=r.get(d.id);if(p&&p.status!==d.status&&d.status!=="sleeping"){if(d.status==="connecting"){a("Provisioning environment…","info");continue}d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const $k="_panelContainer_1ncbu_1",qk="_emptyState_1ncbu_8",Yk="_fadeIn_1ncbu_1",Kk="_projectSummary_1ncbu_17",Zk="_projectSummaryTitle_1ncbu_28",Xk="_projectSummarySubtitle_1ncbu_32",Qk="_header_1ncbu_36",Jk="_headerInfo_1ncbu_69",Wk="_killButton_1ncbu_75",eM="_headerTitle_1ncbu_104",tM="_headerActions_1ncbu_119",nM="_taskStatusBadge_1ncbu_126",aM="_taskBranch_1ncbu_135",sM="_taskBlockedBadge_1ncbu_141",iM="_btnPrimary_1ncbu_149",lM="_btnDanger_1ncbu_180",oM="_btnGhost_1ncbu_219",rM="_rejectInput_1ncbu_245",cM="_tabBar_1ncbu_275",uM="_tab_1ncbu_275",dM="_active_1ncbu_301",fM="_eventScroll_1ncbu_306",hM="_tabContent_1ncbu_312",pM="_noContext_1ncbu_317",mM="_overviewContent_1ncbu_323",gM="_overviewDashboard_1ncbu_332",yM="_overviewHero_1ncbu_338",vM="_statusBadge_1ncbu_345",bM="_statusPending_1ncbu_357",SM="_statusAssigned_1ncbu_362",_M="_statusInProgress_1ncbu_367",xM="_statusReview_1ncbu_372",TM="_statusDone_1ncbu_377",EM="_statusFailed_1ncbu_382",CM="_statusWaitingInput_1ncbu_387",AM="_overviewBranchPill_1ncbu_392",jM="_branchLink_1ncbu_407",wM="_overviewSection_1ncbu_418",NM="_overviewLabel_1ncbu_424",DM="_overviewValue_1ncbu_431",kM="_overviewMuted_1ncbu_436",MM="_overviewMarkdown_1ncbu_442",RM="_envRow_1ncbu_511",OM="_envDot_1ncbu_517",BM="_envDotGreen_1ncbu_524",LM="_envDotYellow_1ncbu_528",IM="_envDotRed_1ncbu_532",UM="_envDotGray_1ncbu_536",zM="_depList_1ncbu_540",VM="_depItem_1ncbu_546",HM="_depBlocked_1ncbu_553",PM="_depDone_1ncbu_557",GM="_timeline_1ncbu_561",FM="_timelineRow_1ncbu_567",$M="_timelineKey_1ncbu_574",qM="_timelineValue_1ncbu_580",YM="_timelineDelta_1ncbu_584",KM="_reviewNotes_1ncbu_595",ZM="_overviewDescription_1ncbu_606",XM="_waitingMessage_1ncbu_612",QM="_errorMessage_1ncbu_616",JM="_eventOverflowWarning_1ncbu_620",WM="_attemptSelector_1ncbu_634",eR="_attemptLabel_1ncbu_650",tR="_attemptButton_1ncbu_654",nR="_attemptActive_1ncbu_671",aR="_attemptStatus_1ncbu_677",sR="_emptyCta_1ncbu_683",iR="_ctaTitle_1ncbu_695",lR="_ctaDescription_1ncbu_701",oR="_ctaButton_1ncbu_708",rR="_ctaLink_1ncbu_743",cR="_projectHeader_1ncbu_757",uR="_projectName_1ncbu_782",dR="_projectMeta_1ncbu_795",fR="_metaRow_1ncbu_803",hR="_metaLabel_1ncbu_816",pR="_metaValue_1ncbu_831",mR="_archiveButton_1ncbu_841",gR="_repoLink_1ncbu_871",yR="_metaToggle_1ncbu_881",vR="_metaToggleArrow_1ncbu_902",bR="_metaToggleArrowOpen_1ncbu_907",SR="_progressBarContainer_1ncbu_911",_R="_progressBar_1ncbu_911",xR="_progressFill_1ncbu_927",TR="_progressLabel_1ncbu_934",ER="_metaTimestamps_1ncbu_941",CR="_metaTimestamp_1ncbu_941",L={panelContainer:$k,emptyState:qk,fadeIn:Yk,projectSummary:Kk,projectSummaryTitle:Zk,projectSummarySubtitle:Xk,header:Qk,headerInfo:Jk,killButton:Wk,headerTitle:eM,headerActions:tM,taskStatusBadge:nM,taskBranch:aM,taskBlockedBadge:sM,btnPrimary:iM,btnDanger:lM,btnGhost:oM,rejectInput:rM,tabBar:cM,tab:uM,active:dM,eventScroll:fM,tabContent:hM,noContext:pM,overviewContent:mM,overviewDashboard:gM,overviewHero:yM,statusBadge:vM,statusPending:bM,statusAssigned:SM,statusInProgress:_M,statusReview:xM,statusDone:TM,statusFailed:EM,statusWaitingInput:CM,overviewBranchPill:AM,branchLink:jM,overviewSection:wM,overviewLabel:NM,overviewValue:DM,overviewMuted:kM,overviewMarkdown:MM,envRow:RM,envDot:OM,envDotGreen:BM,envDotYellow:LM,envDotRed:IM,envDotGray:UM,depList:zM,depItem:VM,depBlocked:HM,depDone:PM,timeline:GM,timelineRow:FM,timelineKey:$M,timelineValue:qM,timelineDelta:YM,reviewNotes:KM,overviewDescription:ZM,waitingMessage:XM,errorMessage:QM,eventOverflowWarning:JM,attemptSelector:WM,attemptLabel:eR,attemptButton:tR,attemptActive:nR,attemptStatus:aR,emptyCta:sR,ctaTitle:iR,ctaDescription:lR,ctaButton:oR,ctaLink:rR,projectHeader:cR,projectName:uR,projectMeta:dR,metaRow:fR,metaLabel:hR,metaValue:pR,archiveButton:mR,repoLink:gR,metaToggle:yR,metaToggleArrow:vR,metaToggleArrowOpen:bR,progressBarContainer:SR,progressBar:_R,progressFill:xR,progressLabel:TR,metaTimestamps:ER,metaTimestamp:CR};function AR(){const{projects:n,createProject:a}=Gt();return n.length===0?h.jsxs("div",{className:L.emptyCta,children:[h.jsx("div",{className:L.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:L.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:L.ctaButton,onClick:()=>{const i=window.prompt("Project name:");i!=null&&i.trim()&&a(i.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:L.emptyState,children:"Select a project or task to get started"})}function jR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);i.unshift(u),o=u.parentTaskId||void 0}return i}const Os={label:"Home",url:"/"};function wR(n){return n?[Os,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Os,{label:"Settings",url:void 0}]}function NR(){return[Os,{label:"New Environment",url:void 0}]}function DR(){return[Os,{label:"New Chat",url:void 0}]}function kR(n){return[Os,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function MR(n,a){const i=a.find(o=>o.id===n);return[Os,{label:(i==null?void 0:i.name)??"Project",url:void 0}]}function RR(n,a,i){const o=jR(n,i),r=i.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,p=[Os];d&&p.push({label:d.name,url:ql(d.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:ts(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function OR(){const n=DR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Ui,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Enter a prompt below to start a new session"})]})}const H1=50;function BR(n,a,i,o,r=H1){return o?n<r:a-n-i<r}function LR(n,a){const i=a-n;return i>0?i:0}function IR({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),u=S.useRef(0),d=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let v=!0;const y=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const _=BR(g.scrollTop,g.scrollHeight,g.clientHeight,i,H1);_!==v&&(v=_,r(_))}))};return g.addEventListener("scroll",y,{passive:!0}),()=>{g.removeEventListener("scroll",y),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||d.current||(d.current=!0,i?g.scrollTop=0:g.scrollTop=g.scrollHeight,r(!0))},[n,i]),S.useLayoutEffect(()=>{const g=n.current;if(g){if(i&&!o){const v=LR(u.current,g.scrollHeight);v>0&&(g.scrollTop+=v)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),u.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const v=i?0:g.scrollHeight;g.scrollTo({top:v,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const UR="_wrapper_p24zt_1",zR="_scrollContainer_p24zt_9",VR="_toolbar_p24zt_15",HR="_directionToggle_p24zt_22",PR="_scrollToAnchor_p24zt_60",GR="_scrollToAnchorBottom_p24zt_84",FR="_scrollToAnchorTop_p24zt_88",js={wrapper:UR,scrollContainer:zR,toolbar:VR,directionToggle:HR,scrollToAnchor:PR,scrollToAnchorBottom:GR,scrollToAnchorTop:FR},P1="grackle-stream-direction";function $R(){try{return localStorage.getItem(P1)==="reversed"}catch{return!1}}function qR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:L.eventOverflowWarning,role:"alert",children:["⚠"," ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function G1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,u]=S.useState($R),d=Cw(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=IR({scrollRef:o,contentLength:n.length,isReversed:r}),v=()=>{const T=!r;u(T);try{localStorage.setItem(P1,T?"reversed":"default")}catch{}},y=d?0:.2,_=r?-8:8;return h.jsxs("div",{className:js.wrapper,children:[h.jsx("div",{className:js.toolbar,children:h.jsx("button",{className:js.directionToggle,onClick:v,title:r?"Showing newest first":"Showing oldest first","aria-label":r?"Switch to newest at bottom":"Switch to newest at top","data-testid":"direction-toggle",children:r?"↓":"↑"})}),h.jsxs("div",{ref:o,className:js.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(qR,{eventsDropped:a}),h.jsx(Qn,{initial:!1,children:p.map((T,E)=>{const w=r?n.length-1-E:E;return h.jsx(an.div,{initial:{opacity:0,y:_},animate:{opacity:1,y:0},transition:{duration:y,ease:"easeOut"},children:h.jsx(QN,{event:T,toolUseCtx:T.toolUseCtx})},`${T.sessionId}-${T.timestamp}-${w}`)})})]}),h.jsx(Qn,{children:!m&&h.jsxs(an.button,{className:`${js.scrollToAnchor} ${r?js.scrollToAnchorTop:js.scrollToAnchorBottom}`,onClick:g,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},"aria-label":"Scroll to latest","data-testid":"scroll-to-anchor",children:[r?"↑":"↓"," New events"]})})]})}function F1(n){const a=[];for(const i of n){const o=a[a.length-1];i.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+i.content}:a.push(i)}return a}function $1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const i=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const p=JSON.parse(u.content);i.set(d.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const p=i.get(d.tool_use_id);return p?(o.add(d.tool_use_id),{...u,toolUseCtx:p}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function YR({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:L.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:L.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:L.killButton,children:"×"})]})]})}function KR({session:n}){const a=n&&["completed","failed","interrupted"].includes(n.status),i=a?`Session ${n.status} with no events recorded.`:"Waiting for events...";return h.jsx("div",{className:a?L.errorMessage:L.waitingMessage,children:i})}function ZR(){const{sessionId:n}=Jr(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:u}=Gt(),d=S.useRef(void 0),p=kR(n),m=o.find(y=>y.id===n)??void 0,g=S.useMemo(()=>{const y=n?a.filter(_=>_.sessionId===n):[];return $1(F1(y))},[a,n]);if(S.useEffect(()=>{n&&n!==d.current&&(d.current=n,u(n))},[n,u]),!n)return h.jsx("div",{className:L.emptyState,children:"No session selected"});const v=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Ui,{segments:p}),h.jsx(YR,{sessionId:n,session:m,isActive:v,onKill:r}),h.jsx(G1,{events:g,eventsDropped:i,emptyState:h.jsx(KR,{session:m})})]})}const g0=220,y0=70,XR=40,QR=60,JR="hierarchy",WR="dependency";function e3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new yy.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:XR,ranksep:QR});const i=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&i.has(d.parentTaskId)){const p=o.get(d.parentTaskId)||[];p.push(d),o.set(d.parentTaskId,p)}for(const d of n)a.setNode(d.id,{width:g0,height:y0});const r=[];for(const d of n){if(d.parentTaskId&&i.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},p),r.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:JR},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(i.has(p)){const m=`dependency-${p}-${d.id}`;a.setEdge(p,d.id,{},m),r.push({id:m,source:p,target:d.id,type:"smoothstep",data:{edgeType:WR},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return yy.layout(a),{nodes:n.map(d=>{const p=a.node(d.id),m=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-g0/2,y:p.y-y0/2},data:{task:d,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const t3="_dagContainer_js4w6_1",n3="_taskNode_js4w6_26",a3="_taskNodeBorder_js4w6_54",s3="_taskNodeContent_js4w6_60",i3="_taskNodeHeader_js4w6_70",l3="_taskNodeIcon_js4w6_77",o3="_taskNodeTitle_js4w6_82",r3="_taskNodeBadges_js4w6_90",c3="_childBadge_js4w6_95",u3="_depBadge_js4w6_107",d3="_handle_js4w6_119",f3="_emptyCta_js4w6_126",h3="_ctaDescription_js4w6_137",p3="_ctaButton_js4w6_144",Kt={dagContainer:t3,taskNode:n3,taskNodeBorder:a3,taskNodeContent:s3,taskNodeHeader:i3,taskNodeIcon:l3,taskNodeTitle:o3,taskNodeBadges:r3,childBadge:c3,depBadge:u3,handle:d3,emptyCta:f3,ctaDescription:h3,ctaButton:p3};function m3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,u=ss(a.status);return h.jsxs("div",{className:Kt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(vy,{type:"target",position:by.Top,className:Kt.handle}),h.jsx("div",{className:Kt.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:Kt.taskNodeContent,children:[h.jsxs("div",{className:Kt.taskNodeHeader,children:[h.jsx("span",{className:Kt.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:Kt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Kt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Kt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Kt.depBadge,children:"dep"})]})]}),h.jsx(vy,{type:"source",position:by.Bottom,className:Kt.handle})]})}const g3=pD,y3={task:m3};function v3({projectId:n}){const{tasks:a}=Gt(),i=Un(),{resolvedThemeId:o}=Z0(),r=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),{nodes:u,edges:d}=e3(r),p=S.useMemo(()=>{const v=getComputedStyle(document.documentElement),y={};for(const[_,T]of Object.entries(g3))y[_]=v.getPropertyValue(T).trim()||"#6b7a8d";return y},[o]),m=S.useCallback((v,y)=>{i(ts(y.id))},[i]),g=S.useCallback(v=>{const y=v.data;return p[y.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Kt.emptyCta,children:[h.jsx("button",{className:Kt.ctaButton,onClick:()=>i(Rs(n)),children:"Create Task"}),h.jsx("div",{className:Kt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Kt.dagContainer,children:h.jsxs(fx,{nodes:u,edges:d,nodeTypes:y3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(hx,{variant:px.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(mx,{showInteractive:!1}),h.jsx(gx,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function b3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(d0.map(u=>[u,[]]));for(const u of n){const d=bh(u.status),p=u.dependsOn.length>0&&u.dependsOn.some(E=>a.get(E)!=="complete"),m=o.get(u.id)??[],g=m.length,v=m.filter(E=>E.status==="complete").length;let y;if(d==="paused"&&i){const E=i.get(u.id);E==="idle"?y="Needs input":E==="completed"&&(y="Ready to complete")}const _={task:u,isBlocked:p,childCount:g,doneChildCount:v,pausedSubBadge:y},T=r.get(d);T?T.push(_):r.get("not_started").push(_)}for(const u of r.values())u.sort((d,p)=>d.task.sortOrder-p.task.sortOrder);return d0.map(u=>{const d=ss(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const S3="_boardContainer_1c4y1_1",_3="_column_1c4y1_17",x3="_columnHeader_1c4y1_34",T3="_columnIcon_1c4y1_47",E3="_columnLabel_1c4y1_52",C3="_columnCount_1c4y1_57",A3="_cardList_1c4y1_67",j3="_emptyPlaceholder_1c4y1_76",w3="_card_1c4y1_67",N3="_cardHeader_1c4y1_107",D3="_cardStatusIcon_1c4y1_113",k3="_cardTitle_1c4y1_119",M3="_cardBadges_1c4y1_127",R3="_badge_1c4y1_134",O3="_blockedBadge_1c4y1_146",B3="_childBadge_1c4y1_151",L3="_depBadge_1c4y1_155",I3="_parentBadge_1c4y1_159",U3="_pausedSubBadge_1c4y1_166",z3="_personaBadge_1c4y1_170",V3="_envBadge_1c4y1_174",H3="_emptyCta_1c4y1_178",P3="_ctaButton_1c4y1_188",G3="_ctaDescription_1c4y1_204",Ye={boardContainer:S3,column:_3,columnHeader:x3,columnIcon:T3,columnLabel:E3,columnCount:C3,cardList:A3,emptyPlaceholder:j3,card:w3,cardHeader:N3,cardStatusIcon:D3,cardTitle:k3,cardBadges:M3,badge:R3,blockedBadge:O3,childBadge:B3,depBadge:L3,parentBadge:I3,pausedSubBadge:U3,personaBadge:z3,envBadge:V3,emptyCta:H3,ctaButton:P3,ctaDescription:G3};function F3({projectId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=Gt(),u=Un(),d=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(y=>[y.id,y.status])),[a]),m=S.useMemo(()=>new Map(d.map(y=>[y.id,y])),[d]),g=S.useMemo(()=>{const y=new Map(i.map(C=>[C.id,C])),_=new Map(o.map(C=>[C.id,C])),T=new Map(r.map(C=>[C.id,C])),E=new Map,w=new Map,j=new Map;for(const C of d)if(C.latestSessionId){const A=y.get(C.latestSessionId);if(A){if(E.set(C.id,A.status),A.personaId){const M=_.get(A.personaId);M&&w.set(C.id,M.name)}if(A.environmentId){const M=T.get(A.environmentId);M&&j.set(C.id,M.displayName)}}}return{sessionStatusByTaskId:E,personaNameByTaskId:w,environmentNameByTaskId:j}},[d,i,o,r]),v=S.useMemo(()=>b3({tasks:d,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,p,g]);return d.length===0?h.jsxs("div",{className:Ye.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ye.ctaButton,onClick:()=>u(Rs(n)),children:"Create Task"}),h.jsx("div",{className:Ye.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Ye.boardContainer,"data-testid":"board-container",children:v.map(y=>h.jsxs("section",{className:Ye.column,"data-testid":`board-column-${y.status}`,"aria-label":`${y.label}, ${y.tasks.length} ${y.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ye.columnHeader,children:[h.jsx("span",{className:Ye.columnIcon,style:{color:y.style.color},children:y.style.icon}),h.jsx("span",{className:Ye.columnLabel,children:y.label}),h.jsx("span",{className:Ye.columnCount,"data-testid":`board-count-${y.status}`,children:y.tasks.length})]}),h.jsx("div",{className:Ye.cardList,children:y.tasks.length===0?h.jsx("div",{className:Ye.emptyPlaceholder,children:"No tasks"}):h.jsx(Qn,{mode:"popLayout",children:y.tasks.map(_=>h.jsx(an.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx($3,{boardTask:_,tasksById:m,personaName:g.personaNameByTaskId.get(_.task.id),envName:g.environmentNameByTaskId.get(_.task.id),onClick:()=>u(ts(_.task.id))})},_.task.id))})})]},y.status))})}function $3({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,v=ss(u.status),y=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Ye.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),r())},children:[h.jsxs("div",{className:Ye.cardHeader,children:[h.jsx("span",{className:Ye.cardStatusIcon,style:{color:v.color},children:v.icon}),h.jsx("span",{className:Ye.cardTitle,children:u.title})]}),h.jsxs("div",{className:Ye.cardBadges,children:[y&&h.jsx("span",{className:`${Ye.badge} ${Ye.parentBadge}`,title:y.title,children:y.title}),p>0&&h.jsxs("span",{className:`${Ye.badge} ${Ye.childBadge}`,children:[m,"/",p]}),d&&h.jsx("span",{className:`${Ye.badge} ${Ye.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Ye.badge} ${Ye.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Ye.badge} ${Ye.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Ye.badge} ${Ye.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Ye.badge} ${Ye.envBadge}`,children:o})]})]})}function Sh(n){const{value:a,onSave:i,validate:o,fieldId:r,activeFieldId:u,onActivate:d,enterToSave:p=!0,trimOnSave:m=!0}=n,[g,v]=S.useState(""),[y,_]=S.useState(""),T=S.useRef(!1),E=u===r,w=S.useCallback(H=>{v(H),_("")},[]),j=S.useCallback(()=>{_("")},[]),C=S.useCallback(()=>{T.current=!1,d==null||d(null),v(""),_("")},[d]),A=S.useCallback(()=>{const H=m?g.trim():g;if(o){const X=o(g);if(X){_(X);return}}const R=m?a.trim():a;if(H===R){C();return}i(H),C()},[g,a,m,o,i,C]),M=S.useCallback(()=>{T.current=!0,d==null||d(r),v(a),_("")},[r,a,d]),V=S.useCallback(H=>{if(T.current){T.current=!1;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction===r||A()},[r,A]),D=S.useCallback(H=>{H.key==="Escape"?C():H.key==="Enter"&&p&&A()},[C,p,A]),G=(()=>{if(!E)return!1;const H=m?a.trim():a;return(m?g.trim():g)!==H})();return S.useEffect(()=>{!E&&(g!==""||y!=="")&&(v(""),_(""))},[E,g,y]),{isEditing:E,draft:g,error:y,isDirty:G,startEdit:M,cancelEdit:C,save:A,setDraft:w,clearError:j,handleBlur:V,handleKeyDown:D,ignoreInitialBlurRef:T}}const q3="_editFieldWrapper_yuzty_1",Y3="_editInput_yuzty_10",K3="_editTextarea_yuzty_42",Z3="_editSelect_yuzty_78",X3="_editError_yuzty_111",Q3="_editInputInvalid_yuzty_118",J3="_editHint_yuzty_123",W3="_unsavedDot_yuzty_132",eO="_metaValueClickable_yuzty_140",tO="_editButton_yuzty_159",nO="_metaPlaceholder_yuzty_175",aO="_worktreeToggle_yuzty_180",Ge={editFieldWrapper:q3,editInput:Y3,editTextarea:K3,editSelect:Z3,editError:X3,editInputInvalid:Q3,editHint:J3,unsavedDot:W3,metaValueClickable:eO,editButton:tO,metaPlaceholder:nO,worktreeToggle:aO};function Fd(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:u="text",activeFieldId:d,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,maxLength:y,ariaLabel:_,"data-testid":T}=n,E=S.useRef(null),w=Sh({value:a,onSave:i,validate:o,fieldId:u,activeFieldId:d,onActivate:p,enterToSave:!0,trimOnSave:!0});if(S.useEffect(()=>{if(w.isEditing){const C=window.setTimeout(()=>{var A;(A=E.current)==null||A.focus()},0);return()=>window.clearTimeout(C)}},[w.isEditing]),r==="create"){const C=M=>{m==null||m(M.target.value)},A=o==null?void 0:o(a);return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("input",{className:`${Ge.editInput} ${A?Ge.editInputInvalid:""}`,value:a,onChange:C,maxLength:y,placeholder:v,"aria-label":_,"data-testid":T?`${T}-input`:void 0}),A&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:A})]})}if(w.isEditing)return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("input",{ref:E,className:`${Ge.editInput} ${w.error?Ge.editInputInvalid:""}`,value:w.draft,onChange:C=>w.setDraft(C.target.value),onBlur:w.handleBlur,onKeyDown:w.handleKeyDown,maxLength:y,placeholder:v,"aria-label":_,"data-testid":T?`${T}-input`:void 0}),w.isDirty&&h.jsx("span",{className:Ge.unsavedDot,title:"Unsaved changes"}),w.error&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:w.error}),h.jsx("span",{className:Ge.editHint,children:"Enter to save · Esc to cancel"})]});const j=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Ge.metaValueClickable,onClick:()=>w.startEdit(),onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),w.startEdit())},title:"Click to edit","aria-label":_,"data-testid":T?`${T}-button`:void 0,children:[j!==void 0?j:a?h.jsx("span",{children:a}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function sO(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:u="textarea",activeFieldId:d,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":_}=n,T=S.useRef(null),E=Sh({value:a,onSave:i,validate:o,fieldId:u,activeFieldId:d,onActivate:p,enterToSave:!1,trimOnSave:!1});if(S.useEffect(()=>{if(E.isEditing){const j=window.setTimeout(()=>{var C;(C=T.current)==null||C.focus()},0);return()=>window.clearTimeout(j)}},[E.isEditing]),r==="create"){const j=A=>{m==null||m(A.target.value)},C=o==null?void 0:o(a);return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("textarea",{className:`${Ge.editTextarea} ${C?Ge.editInputInvalid:""}`,value:a,onChange:j,placeholder:v,"aria-label":y,"data-testid":_?`${_}-input`:void 0}),C&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:C})]})}if(E.isEditing)return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("textarea",{ref:T,className:`${Ge.editTextarea} ${E.error?Ge.editInputInvalid:""}`,value:E.draft,onChange:j=>E.setDraft(j.target.value),onBlur:E.handleBlur,onKeyDown:E.handleKeyDown,title:y,"aria-label":y,"data-testid":_?`${_}-input`:void 0}),E.isDirty&&h.jsx("span",{className:Ge.unsavedDot,title:"Unsaved changes"}),E.error&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:E.error}),h.jsx("span",{className:Ge.editHint,children:"Tab to save · Esc to cancel"})]});const w=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Ge.metaValueClickable,onClick:()=>E.startEdit(),onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),E.startEdit())},title:"Click to edit","aria-label":y,"data-testid":_?`${_}-button`:void 0,children:[w!==void 0?w:a?h.jsx("span",{children:a}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function v0(n){var M;const{value:a,onSave:i,mode:o="edit",options:r,fieldId:u="select",activeFieldId:d,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":_}=n,T=S.useRef(null),E=Sh({value:a,onSave:i,fieldId:u,activeFieldId:d,onActivate:p,enterToSave:!1,trimOnSave:!1});S.useEffect(()=>{if(E.isEditing){const V=window.setTimeout(()=>{var D;(D=T.current)==null||D.focus()},0);return()=>window.clearTimeout(V)}},[E.isEditing]);const w=S.useCallback(V=>{const D=V.target.value;E.ignoreInitialBlurRef.current=!1,D!==a&&i(D),E.cancelEdit()},[a,i,E]),j=S.useCallback(V=>{if(E.ignoreInitialBlurRef.current){E.ignoreInitialBlurRef.current=!1;return}V.relatedTarget instanceof HTMLElement&&V.relatedTarget.dataset.editAction===u||E.cancelEdit()},[u,E]);if(o==="create")return h.jsx("select",{className:Ge.editSelect,value:a,onChange:V=>m==null?void 0:m(V.target.value),"aria-label":y,"data-testid":_?`${_}-select`:void 0,children:r.map(V=>h.jsx("option",{value:V.value,children:V.label},V.value))});if(E.isEditing)return h.jsx("select",{ref:T,className:Ge.editSelect,value:E.draft,onChange:w,onBlur:j,title:y,"aria-label":y,"data-testid":_?`${_}-select`:void 0,children:r.map(V=>h.jsx("option",{value:V.value,children:V.label},V.value))});const C=g==null?void 0:g(a),A=(M=r.find(V=>V.value===a))==null?void 0:M.label;return h.jsxs("button",{type:"button",className:Ge.metaValueClickable,onClick:()=>E.startEdit(),title:"Click to change","aria-label":y,"data-testid":_?`${_}-button`:void 0,children:[C!==void 0?C:A?h.jsx("span",{children:A}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function iO(n){const{checked:a,onChange:i,label:o,ariaLabel:r,"data-testid":u}=n;return h.jsxs("label",{className:Ge.worktreeToggle,"data-testid":u,children:[h.jsx("input",{type:"checkbox",checked:a,onChange:d=>i(d.target.checked),"aria-label":r}),h.jsx("span",{children:o})]})}function lO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?L.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?L.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?L.envDotRed:L.envDotGray}function b0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}const $d=100;function oO(){const{projectId:n}=Jr(),a=Un(),{tasks:i,environments:o,projects:r,personas:u,archiveProject:d,updateProject:p}=Gt(),[m,g]=S.useState("tasks"),[v,y]=S.useState(!1),[_,T]=S.useState(null),[E,w]=S.useState(!1),j=S.useRef(void 0),C=MR(n,r);S.useEffect(()=>{const R=j.current;j.current=n,!(R===void 0||R===n)&&_!==null&&T(null)},[n,_]);const A=r.find(R=>R.id===n),M=i.filter(R=>R.projectId===n),V=M.filter(R=>R.status==="complete").length,D=M.length,G=D>0?Math.round(V/D*100):0,H=o.find(R=>R.id===(A==null?void 0:A.defaultEnvironmentId));return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Ui,{segments:C}),h.jsxs("div",{className:L.projectHeader,children:[h.jsx("span",{className:L.projectName,"data-testid":"project-name",children:h.jsx(Fd,{value:(A==null?void 0:A.name)||"",onSave:R=>{A&&p(A.id,{name:R})},validate:R=>{const X=R.trim();if(!X)return"Name is required";if(X.length>$d)return`Max ${$d} characters`},maxLength:$d,fieldId:"name",activeFieldId:_,onActivate:T,ariaLabel:"Project name",renderDisplay:R=>R||n||void 0,"data-testid":"edit-name"})}),h.jsx("button",{className:L.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:L.metaToggle,onClick:()=>w(!E),"aria-expanded":!E,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${L.metaToggleArrow} ${E?"":L.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!E&&h.jsxs("div",{className:L.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Description"}),h.jsx("div",{className:L.metaValue,children:h.jsx(sO,{value:(A==null?void 0:A.description)||"",onSave:R=>{A&&p(A.id,{description:R})},fieldId:"description",activeFieldId:_,onActivate:T,renderDisplay:R=>R?h.jsx("span",{className:L.overviewMarkdown,children:h.jsx(Af,{remarkPlugins:[jf],children:R})}):void 0,placeholder:"No description",ariaLabel:"Project description","data-testid":"edit-description"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Repository"}),h.jsx("div",{className:L.metaValue,children:h.jsx(Fd,{value:(A==null?void 0:A.repoUrl)||"",onSave:R=>{A&&p(A.id,{repoUrl:R})},validate:R=>{const X=R.trim();if(X&&!/^https?:\/\/.+/.test(X))return"Must be a valid http(s) URL"},fieldId:"repoUrl",activeFieldId:_,onActivate:T,renderDisplay:R=>R&&/^https?:\/\//i.test(R)?h.jsx("a",{className:L.repoLink,href:R,target:"_blank",rel:"noopener noreferrer",onClick:X=>X.stopPropagation(),children:R}):R?h.jsx("span",{children:R}):void 0,placeholder:"No repository",ariaLabel:"Project repository URL","data-testid":"edit-repo"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Environment"}),h.jsx("div",{className:L.metaValue,children:h.jsx(v0,{value:(A==null?void 0:A.defaultEnvironmentId)||"",onSave:R=>{A&&p(A.id,{defaultEnvironmentId:R})},options:[{value:"",label:"None"},...o.map(R=>({value:R.id,label:R.displayName}))],fieldId:"defaultEnvironmentId",activeFieldId:_,onActivate:T,renderDisplay:()=>{if(H)return h.jsxs("span",{className:L.envRow,children:[h.jsx("span",{className:`${L.envDot} ${lO(H.status)}`}),H.displayName]})},placeholder:(A==null?void 0:A.defaultEnvironmentId)||"No default environment",ariaLabel:"Project default environment","data-testid":"edit-env"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Persona"}),h.jsx("div",{className:L.metaValue,children:h.jsx(v0,{value:(A==null?void 0:A.defaultPersonaId)||"",onSave:R=>{A&&p(A.id,{defaultPersonaId:R})},options:[{value:"",label:"(Inherit)"},...u.map(R=>({value:R.id,label:R.name}))],fieldId:"defaultPersonaId",activeFieldId:_,onActivate:T,renderDisplay:R=>{const X=u.find(te=>te.id===R);if(X)return h.jsx("span",{children:X.name})},placeholder:(A==null?void 0:A.defaultPersonaId)||"(Inherit)",ariaLabel:"Project default persona","data-testid":"edit-persona"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Worktrees"}),h.jsx("div",{className:L.metaValue,children:h.jsx(iO,{checked:(A==null?void 0:A.useWorktrees)??!0,onChange:R=>{A&&p(A.id,{useWorktrees:R})},label:"Enable worktree isolation","data-testid":"worktree-toggle"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Working Dir"}),h.jsx("div",{className:L.metaValue,children:h.jsx(Fd,{value:(A==null?void 0:A.worktreeBasePath)||"",onSave:R=>{A&&p(A.id,{worktreeBasePath:R})},fieldId:"worktreeBasePath",activeFieldId:_,onActivate:T,placeholder:"Default (server default)",ariaLabel:"Working directory","data-testid":"edit-worktree-base-path"})})]}),A&&h.jsxs("div",{className:L.metaTimestamps,children:[h.jsxs("span",{className:L.metaTimestamp,children:["Created ",b0(A.createdAt)]}),A.updatedAt&&A.updatedAt!==A.createdAt&&h.jsxs("span",{className:L.metaTimestamp,children:["· Updated ",b0(A.updatedAt)]})]})]}),D>0&&h.jsxs("div",{className:L.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:L.progressBar,children:h.jsx("div",{className:L.progressFill,style:{width:`${G}%`}})}),h.jsxs("span",{className:L.progressLabel,children:[V,"/",D]})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${L.tab} ${m==="graph"?L.active:""}`,onClick:()=>g("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${L.tab} ${m==="board"?L.active:""}`,onClick:()=>g("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${L.tab} ${m==="tasks"?L.active:""}`,onClick:()=>g("tasks"),children:"Tasks"})]}),m==="tasks"&&D>0&&h.jsxs("div",{className:L.projectSummary,children:[h.jsx("span",{className:L.projectSummaryTitle,children:`${V}/${D} tasks complete`}),h.jsx("span",{className:L.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&D===0&&h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>a(Rs(n)),children:"Create Task"}),h.jsx("div",{className:L.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx(F3,{projectId:n}),m==="graph"&&h.jsx(v3,{projectId:n}),h.jsx(oc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{A&&(d(A.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const rO="_container_cddyd_1",cO="_header_cddyd_8",uO="_headerTitle_cddyd_35",dO="_badge_cddyd_44",fO="_headerActions_cddyd_54",hO="_body_cddyd_61",pO="_formContent_cddyd_73",mO="_section_cddyd_85",gO="_label_cddyd_91",yO="_titleInput_cddyd_98",vO="_descriptionTextarea_cddyd_131",bO="_parentContext_cddyd_167",SO="_parentLabel_cddyd_175",_O="_parentName_cddyd_182",xO="_personaSelect_cddyd_186",TO="_depList_cddyd_220",EO="_depItem_cddyd_226",CO="_depItemSelected_cddyd_248",AO="_noDeps_cddyd_252",jO="_btnPrimary_cddyd_258",wO="_btnGhost_cddyd_289",et={container:rO,header:cO,headerTitle:uO,badge:dO,headerActions:fO,body:hO,formContent:pO,section:mO,label:gO,titleInput:yO,descriptionTextarea:vO,parentContext:bO,parentLabel:SO,parentName:_O,personaSelect:xO,depList:TO,depItem:EO,depItemSelected:CO,noDeps:AO,btnPrimary:jO,btnGhost:wO};function q1({mode:n,taskId:a,projectId:i,parentTaskId:o}){const{tasks:r,personas:u,createTask:d,updateTask:p}=Gt(),{showToast:m}=to(),g=Un(),v=n==="edit",y=v&&a?r.find(B=>B.id===a):void 0,_=v?(y==null?void 0:y.projectId)??"":i??"",T=v?(y==null?void 0:y.parentTaskId)??"":o??"",E=T?r.find(B=>B.id===T):void 0,[w,j]=S.useState((y==null?void 0:y.title)??""),[C,A]=S.useState((y==null?void 0:y.description)??""),[M,V]=S.useState((y==null?void 0:y.dependsOn)??[]),[D,G]=S.useState((y==null?void 0:y.defaultPersonaId)??""),[H,R]=S.useState(!1),X=S.useRef(!1);S.useEffect(()=>{v&&y&&!X.current&&(X.current=!0,j(y.title),A(y.description),V(y.dependsOn),G(y.defaultPersonaId))},[v,y]);const te=r.filter(B=>B.projectId===_&&(!v||B.id!==a)&&B.id!==T),ne=w.trim().length>0&&(!v||y!==void 0)&&(v||_.length>0),ie=B=>{V(F=>F.includes(B)?F.filter(W=>W!==B):[...F,B])},ue=()=>{!ne||H||v&&y===void 0||(v&&a?(p(a,w.trim(),C,M,D),m("Task updated","success"),g(ts(a),{replace:!0})):(R(!0),d(_,w.trim(),C,M.length>0?M:void 0,T||void 0,D,()=>{m("Task created","success"),g(ql(_),{replace:!0})},B=>{m(B,"error"),R(!1)})))},q=()=>{g(v&&a?ts(a):ql(_))},Q=v?"edit task":T?"child task":"new task";return h.jsxs("div",{className:et.container,children:[h.jsxs("div",{className:et.header,children:[h.jsxs("div",{className:et.headerTitle,children:[h.jsx("span",{className:et.badge,children:Q}),E&&h.jsxs("span",{className:et.parentContext,children:[h.jsx("span",{className:et.parentLabel,children:"Child of"}),h.jsx("span",{className:et.parentName,children:E.title})]})]}),h.jsxs("div",{className:et.headerActions,children:[h.jsx("button",{onClick:ue,disabled:!ne||H,className:et.btnPrimary,"data-testid":"task-edit-save",children:H?"Creating…":v?"Save Changes":"Create"}),h.jsx("button",{onClick:q,className:et.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:et.body,children:h.jsxs("div",{className:et.formContent,children:[h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:w,onChange:B=>j(B.target.value),placeholder:"Task title...",autoFocus:!0,className:et.titleInput,"data-testid":"task-edit-title",onKeyDown:B=>{B.key==="Enter"&&ne&&ue()}})]}),h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:C,onChange:B=>A(B.target.value),placeholder:"Describe the task... (markdown supported)",className:et.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-persona",children:"Default Persona"}),h.jsxs("select",{id:"task-edit-persona",value:D,onChange:B=>G(B.target.value),className:et.personaSelect,"data-testid":"task-edit-persona",children:[h.jsx("option",{value:"",children:"(Inherit)"}),u.map(B=>h.jsx("option",{value:B.id,children:B.name},B.id))]})]}),h.jsxs("div",{className:et.section,children:[h.jsx("div",{className:et.label,children:"Dependencies"}),te.length===0?h.jsx("div",{className:et.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:et.depList,children:te.map(B=>{const F=M.includes(B.id);return h.jsxs("label",{className:`${et.depItem} ${F?et.depItemSelected:""}`,"data-testid":`dep-option-${B.id}`,children:[h.jsx("input",{type:"checkbox",checked:F,onChange:()=>ie(B.id)}),B.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",B.status,")"]})]},B.id)})})]})]})})]})}function NO(){const[n]=Bf(),a=n.get("project")??"",i=n.get("parent")??void 0;return a?h.jsx(q1,{mode:"new",projectId:a,parentTaskId:i}):h.jsx(Dr,{to:"/",replace:!0})}function DO(){const{taskId:n}=Jr();return h.jsx(q1,{mode:"edit",taskId:n})}const kO="_container_1pqxm_1",MO="_emptyState_1pqxm_8",RO="_card_1pqxm_14",OO="_cardHeader_1pqxm_34",BO="_categoryBadge_1pqxm_46",LO="_findingTitle_1pqxm_54",IO="_findingDate_1pqxm_60",UO="_findingContent_1pqxm_72",zO="_tags_1pqxm_78",VO="_tag_1pqxm_78",Fn={container:kO,emptyState:MO,card:RO,cardHeader:OO,categoryBadge:BO,findingTitle:LO,findingDate:IO,findingContent:UO,tags:zO,tag:VO};function HO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),p=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),v=a.getDate();return m?`${g} ${v}`:`${g} ${v} ${a.getFullYear()}`}const S0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function PO({projectId:n}){const{findings:a}=Gt(),i=a.filter(o=>o.projectId===n);return i.length===0?h.jsx("div",{className:Fn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:Fn.container,children:i.map((o,r)=>{const u=S0[o.category]||S0.general;return h.jsxs(an.div,{className:Fn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:Fn.cardHeader,children:[h.jsx("span",{className:Fn.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:Fn.findingTitle,children:o.title}),h.jsx("span",{className:Fn.findingDate,title:o.createdAt,children:HO(o.createdAt)})]}),h.jsx("div",{className:Fn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:Fn.tags,children:o.tags.map(d=>h.jsx("span",{className:Fn.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function wr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function qd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function GO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?L.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?L.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?L.envDotRed:L.envDotGray}function FO({status:n}){const a=ss(n),i=dD(n);return h.jsx("span",{className:`${L.statusBadge} ${L[i]??L.statusPending}`,children:a.label})}function $O({task:n,tasksById:a,environments:i,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",p=d?i.find(v=>v.id===d):void 0,m=o.find(v=>v.id===n.projectId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:L.overviewDashboard,children:[h.jsxs("div",{className:L.overviewHero,children:[h.jsx(FO,{status:n.status}),n.branch&&h.jsx("span",{className:L.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:L.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Description"}),h.jsx("div",{className:L.overviewMarkdown,children:h.jsx(Af,{remarkPlugins:[jf],children:n.description})})]}),d&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Environment"}),h.jsxs("div",{className:L.envRow,children:[p&&h.jsx("span",{className:`${L.envDot} ${GO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:L.overviewValue,children:(p==null?void 0:p.displayName)??d})]})]}),h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:L.overviewMuted,children:"None"}):h.jsx("div",{className:L.depList,children:n.dependsOn.map(v=>{const y=a.get(v),_=(y==null?void 0:y.status)==="complete";return h.jsxs("div",{className:`${L.depItem} ${_?L.depDone:L.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(y==null?void 0:y.title)??v})]},v)})})]}),h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:L.timeline,children:[n.createdAt&&h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Created"}),h.jsx("span",{className:L.timelineValue,children:wr(n.createdAt)})]}),n.assignedAt&&(()=>{const v=qd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Assigned"}),h.jsx("span",{className:L.timelineValue,children:wr(n.assignedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),n.startedAt&&(()=>{const v=qd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Started"}),h.jsx("span",{className:L.timelineValue,children:wr(n.startedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),n.completedAt&&(()=>{const v=qd(n.startedAt,n.completedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Completed"}),h.jsx("span",{className:L.timelineValue,children:wr(n.completedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:L.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:L.reviewNotes,children:n.reviewNotes})]})]})}function qO({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:m,className:L.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:o,className:L.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:L.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:L.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:L.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:d,className:L.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:L.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:L.headerActions,children:h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:o,className:L.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]})}function YO({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:L.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:L.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${L.attemptButton} ${u?L.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:L.attemptStatus,children:d})]},o.id)})]})}function Yd(){const{taskId:n}=Jr(),a=Zt(),i=Un(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:p,loadFindings:m,kill:g,startTask:v,resumeTask:y,completeTask:_,deleteTask:T,projects:E,taskSessions:w,loadTaskSessions:j}=Gt(),C=S.useRef(void 0),A=S.useRef(void 0),M=S.useRef(void 0),V=S.useRef(void 0),D=S.useRef(void 0),G=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[H,R]=S.useState(G),[X,te]=S.useState(!1),[ne,ie]=S.useState(void 0),ue=S.useRef(G);G!==ue.current&&(ue.current=G,G!==H&&R(G));const q=u.find(Ee=>Ee.id===n),Q=(q==null?void 0:q.projectId)||void 0,B=q?w[q.id]??[]:[];let F;ne&&B.some(Ee=>Ee.id===ne)?F=ne:F=(q==null?void 0:q.latestSessionId)||void 0;const W=()=>{te(!0)},be=()=>{q&&(T(q.id),te(!1),i(ql(q.projectId),{replace:!0}))};if((q==null?void 0:q.id)!==A.current&&(A.current=q==null?void 0:q.id,ne!==void 0&&ie(void 0)),S.useEffect(()=>{if(!(q!=null&&q.id))return;const Ee=q.id!==V.current,ee=q.latestSessionId!==D.current;(Ee||ee)&&(V.current=q.id,D.current=q.latestSessionId,j(q.id))},[q==null?void 0:q.id,q==null?void 0:q.latestSessionId,j]),(q==null?void 0:q.status)!==M.current){M.current=q==null?void 0:q.status;const Ee=(q==null?void 0:q.status)==="not_started"?"overview":(q==null?void 0:q.status)==="working"||(q==null?void 0:q.status)==="paused"?"stream":(q==null?void 0:q.status)==="complete"?"findings":void 0;Ee&&Ee!==H&&R(Ee)}const Te=S.useMemo(()=>new Map(u.map(Ee=>[Ee.id,Ee])),[u]),tt=S.useMemo(()=>{const Ee=F?o.filter(ee=>ee.sessionId===F):[];return $1(F1(Ee))},[o,F]),Me=q?q.dependsOn.some(Ee=>{const ee=Te.get(Ee);return ee!==void 0&&ee.status!=="complete"}):!1,fe=S.useMemo(()=>RR(n,E,Te),[n,E,Te]);S.useEffect(()=>{F&&F!==C.current&&(C.current=F,p(F))},[F,p]),S.useEffect(()=>{H==="findings"&&Q&&m(Q)},[H,Q,m]);const Ie=Ee=>{R(Ee),i(ts(n,Ee==="overview"?void 0:Ee))};return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Ui,{segments:fe}),h.jsxs("div",{className:L.header,children:[h.jsxs("span",{className:L.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(q==null?void 0:q.title)||n}),q&&h.jsx("span",{className:L.taskStatusBadge,"data-testid":"task-status",children:q.status}),(q==null?void 0:q.branch)&&h.jsx("span",{className:L.taskBranch,children:q.branch}),Me&&h.jsx("span",{className:L.taskBlockedBadge,children:"blocked"})]}),q&&h.jsx(qO,{task:q,sessionId:F,isBlocked:Me,onStart:()=>v(q.id),onResume:()=>y(q.id),onStop:()=>F&&g(F),onComplete:()=>_(q.id),onDelete:W,onEdit:()=>i(eE(q.id))})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":H==="overview",className:`${L.tab} ${H==="overview"?L.active:""}`,onClick:()=>Ie("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":H==="stream",className:`${L.tab} ${H==="stream"?L.active:""}`,onClick:()=>Ie("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":H==="findings",className:`${L.tab} ${H==="findings"?L.active:""}`,onClick:()=>Ie("findings"),children:"Findings"})]}),h.jsxs(Qn,{mode:"wait",children:[H==="overview"&&h.jsx(an.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:L.overviewContent,children:q?h.jsx($O,{task:q,tasksById:Te,environments:d,projects:E,taskSessions:B}):h.jsx("div",{className:L.waitingMessage,children:"No additional details"})},"overview"),H==="stream"&&h.jsxs(an.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(YO,{taskSessions:B,selectedSessionId:F,onSelect:Ee=>ie(Ee)}),h.jsx(G1,{events:tt,eventsDropped:r,emptyState:!F&&q?h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>v(q.id),children:"Start Task"}),h.jsx("div",{className:L.ctaDescription,children:"Click to begin agent execution"})]}):F&&tt.length===0?h.jsx("div",{className:L.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),H==="findings"&&h.jsx(an.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:L.tabContent,children:Q?h.jsx(PO,{projectId:Q}):h.jsx("div",{className:L.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),q&&h.jsx(oc,{isOpen:X,title:"Delete Task?",description:`"${q.title}" will be permanently removed.`,onConfirm:be,onCancel:()=>te(!1)})]})}function KO(){const n=NR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Ui,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Configure the new environment below"})]})}const ZO="_layout_11u79_1",XO="_content_11u79_8",QO="_tabPanel_11u79_14",Kd={layout:ZO,content:XO,tabPanel:QO},JO={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function WO(){const a=Zt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=JO[a],o=wR(i);return h.jsxs("div",{className:Kd.layout,children:[h.jsx(Ui,{segments:o}),h.jsx("div",{className:Kd.content,children:h.jsx("div",{className:Kd.tabPanel,children:h.jsx(L0,{})},a)})]})}const eB="_nav_13n0b_1",tB="_tab_13n0b_44",nB="_tabIcon_13n0b_82",aB="_tabActive_13n0b_88",Nr={nav:eB,tab:tB,tabIcon:nB,tabActive:aB},ba=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function sB(){var d;const n=Zt(),a=Un(),i=S.useRef(null),o=((d=ba.find(p=>n.pathname===`${Ni}/${p.path}`))==null?void 0:d.path)??ba[0].path,r=S.useCallback(p=>{a(`${Ni}/${p}`)},[a]),u=S.useCallback(p=>{var T,E;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(w=>w===document.activeElement),v=g>=0?g:ba.findIndex(w=>w.path===o);let y=v;if(p.key==="ArrowDown")p.preventDefault(),y=(v+1)%ba.length;else if(p.key==="ArrowUp")p.preventDefault(),y=(v-1+ba.length)%ba.length;else if(p.key==="Home")p.preventDefault(),y=0;else if(p.key==="End")p.preventDefault(),y=ba.length-1;else return;const _=ba[y].path;a(`${Ni}/${_}`),(E=m[y])==null||E.focus()},[o,a]);return h.jsx("nav",{className:Nr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:ba.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${Nr.tab} ${m?Nr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:Nr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const iB="_container_1nk8c_1",lB="_header_1nk8c_5",oB="_headerLabel_1nk8c_12",rB="_addButton_1nk8c_20",cB="_envRow_1nk8c_55",uB="_targeted_1nk8c_69",dB="_expanded_1nk8c_72",fB="_statusDot_1nk8c_76",hB="_pulse_1nk8c_79",pB="_envName_1nk8c_83",mB="_envActions_1nk8c_87",gB="_idleLabel_1nk8c_94",yB="_newChatButton_1nk8c_99",vB="_envActionsRow_1nk8c_126",bB="_connectButton_1nk8c_134",SB="_stopButton_1nk8c_160",_B="_deleteButton_1nk8c_186",xB="_provisionMessage_1nk8c_213",TB="_errorMessage_1nk8c_220",EB="_sessionRow_1nk8c_227",CB="_selected_1nk8c_243",AB="_sessionDot_1nk8c_248",jB="_sessionSummaryRow_1nk8c_252",wB="_sessionExpandArrow_1nk8c_272",NB="_sessionSummaryText_1nk8c_283",DB="_sessionCountBadge_1nk8c_290",kB="_emptyCta_1nk8c_313",MB="_ctaDescription_1nk8c_326",RB="_ctaButton_1nk8c_332",qe={container:iB,header:lB,headerLabel:oB,addButton:rB,envRow:cB,targeted:uB,expanded:dB,statusDot:fB,pulse:hB,envName:pB,envActions:mB,idleLabel:gB,newChatButton:yB,envActionsRow:vB,connectButton:bB,stopButton:SB,deleteButton:_B,provisionMessage:xB,errorMessage:TB,sessionRow:EB,selected:CB,sessionDot:AB,sessionSummaryRow:jB,sessionExpandArrow:wB,sessionSummaryText:NB,sessionCountBadge:DB,emptyCta:kB,ctaDescription:MB,ctaButton:RB},OB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},BB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},_0=["running","idle","failed","interrupted","completed"],LB=.2;function IB(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const i=_0.filter(u=>a[u]>0).map(u=>`${a[u]} ${BB[u]||u}`),o=new Set(_0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...i,...r].join(", ")}function UB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:qe.sessionDot,style:{color:a},children:"●"})}function zB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:v,onRemove:y,navigate:_}){const[T,E]=S.useState(!1),w=OB[n.status]||"var(--text-tertiary)",j=n.status==="connected",C=n.status==="connecting",A=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(oc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{y(n.id),E(!1)},onCancel:()=>E(!1)}),h.jsxs("div",{className:`${qe.envRow} ${o?qe.targeted:""} ${r?qe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${qe.statusDot} ${j?qe.pulse:""}`,style:{color:w},children:"●"}),h.jsx("span",{className:qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:qe.idleLabel,children:"(idle)"}),j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),_(P0(n.id))},title:"New chat",className:qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:qe.envActionsRow,children:[C&&m&&h.jsx("span",{className:qe.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:qe.errorMessage,children:m.message}),A&&h.jsx("button",{onClick:M=>{M.stopPropagation(),g(n.id)},className:qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),j&&h.jsx("button",{onClick:M=>{M.stopPropagation(),v(n.id)},className:qe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:M=>{M.stopPropagation(),E(!0)},className:qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),p())},children:[h.jsx("span",{className:`${qe.sessionExpandArrow} ${d?qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:qe.sessionSummaryText,children:IB(a)}),h.jsx("span",{className:qe.sessionCountBadge,children:a.length})]}),h.jsx(Qn,{children:d&&h.jsx(an.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:LB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(M=>h.jsxs("div",{onClick:V=>{V.stopPropagation(),_(H0(M.id))},className:`${qe.sessionRow} ${i===M.id?qe.selected:""}`,title:M.prompt,"data-testid":"session-row",children:[h.jsx(UB,{status:M.status})," ",M.prompt.length>24?M.prompt.slice(0,24)+"...":M.prompt]},M.id))})})]})]})}function VB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=Gt(),d=Un(),[p,m]=S.useState(null),[g,v]=S.useState(new Set),y=Yt("/sessions/:sessionId"),_=Yt("/sessions/new"),T=(y==null?void 0:y.params.sessionId)!=="new"?y==null?void 0:y.params.sessionId:void 0,[E]=Bf(),w=_?E.get("env")??void 0:void 0;return h.jsxs("div",{className:qe.container,children:[h.jsxs("div",{className:qe.header,children:[h.jsx("span",{className:qe.headerLabel,children:"Environments"}),h.jsx("button",{className:qe.addButton,onClick:()=>d(ky),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:qe.emptyCta,children:[h.jsx("button",{className:qe.ctaButton,onClick:()=>d(ky),children:"Add Environment"}),h.jsx("div",{className:qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(j=>{const C=a.filter(A=>A.environmentId===j.id);return h.jsx(zB,{env:j,envSessions:C,selectedSessionId:T,isNewChatTarget:w===j.id,expanded:p===j.id,onToggleExpand:()=>m(p===j.id?null:j.id),sessionsExpanded:g.has(j.id),onToggleSessionsExpand:()=>{v(A=>{const M=new Set(A);return M.has(j.id)?M.delete(j.id):M.add(j.id),M})},provisionProgress:i[j.id],onProvision:o,onStop:r,onRemove:u,navigate:d},j.id)})]})}function HB(){return h.jsx(VB,{})}const PB="_section_1ingb_14",GB="_sectionTitle_1ingb_26",FB="_sectionDescription_1ingb_35",$B="_tokenList_1ingb_48",qB="_tokenRow_1ingb_55",YB="_tokenBadge_1ingb_68",KB="_tokenName_1ingb_83",ZB="_tokenTarget_1ingb_90",XB="_deleteButton_1ingb_99",QB="_addForm_1ingb_113",JB="_formRow_1ingb_119",WB="_input_1ingb_125",e6="_select_1ingb_155",t6="_addButton_1ingb_187",n6="_emptyStateInfo_1ingb_221",a6="_themeOptions_1ingb_229",s6="_themeOption_1ingb_229",i6="_themeOptionSelected_1ingb_254",l6="_themeOptionHeader_1ingb_259",o6="_themeOptionLabel_1ingb_266",r6="_themeOptionDesc_1ingb_273",c6="_variantToggle_1ingb_279",u6="_variantButton_1ingb_286",d6="_variantActive_1ingb_305",f6="_themeSwatches_1ingb_311",h6="_themeSwatch_1ingb_311",p6="_systemToggle_1ingb_325",m6="_systemToggleHint_1ingb_341",g6="_themeActive_1ingb_348",y6="_aboutGrid_1ingb_354",v6="_aboutItem_1ingb_360",b6="_aboutLabel_1ingb_373",S6="_aboutValue_1ingb_379",_6="_aboutDot_1ingb_387",x6="_aboutDotConnected_1ingb_394",T6="_aboutDotDisconnected_1ingb_398",oe={section:PB,sectionTitle:GB,sectionDescription:FB,tokenList:$B,tokenRow:qB,tokenBadge:YB,tokenName:KB,tokenTarget:ZB,deleteButton:XB,addForm:QB,formRow:JB,input:WB,select:e6,addButton:t6,emptyStateInfo:n6,themeOptions:a6,themeOption:s6,themeOptionSelected:i6,themeOptionHeader:l6,themeOptionLabel:o6,themeOptionDesc:r6,variantToggle:c6,variantButton:u6,variantActive:d6,themeSwatches:f6,themeSwatch:h6,systemToggle:p6,systemToggleHint:m6,themeActive:g6,aboutGrid:y6,aboutItem:v6,aboutLabel:b6,aboutValue:S6,aboutDot:_6,aboutDotConnected:x6,aboutDotDisconnected:T6},E6=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function C6(){const{credentialProviders:n,updateCredentialProviders:a}=Gt(),i=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:oe.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:oe.tokenList,children:E6.map(o=>h.jsxs("div",{className:oe.tokenRow,children:[h.jsx("span",{className:oe.tokenName,children:o.label}),h.jsx("span",{className:oe.tokenTarget,children:o.description}),h.jsx("select",{className:oe.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const A6=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function j6(){const{tokens:n,setToken:a,deleteToken:i}=Gt(),{showToast:o}=to(),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState("env_var"),[v,y]=S.useState(""),[_,T]=S.useState(null),E=C=>{if(C.preventDefault(),!r||!d)return;const A=m==="env_var"?v||r.toUpperCase()+"_TOKEN":"";a(r,d,m,A,m==="file"?v:""),o("Token saved successfully","success"),u(""),p(""),y("")},w=C=>{T(C)},j=()=>{_&&(i(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(oc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:j,onCancel:()=>T(null)}),h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Tokens"}),h.jsx("p",{className:oe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:oe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:oe.tokenList,children:n.map(C=>h.jsxs("div",{className:oe.tokenRow,children:[h.jsx("span",{className:oe.tokenBadge,children:C.tokenType}),h.jsx("span",{className:oe.tokenName,children:C.name}),h.jsx("span",{className:oe.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:oe.deleteButton,onClick:()=>w(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:oe.addForm,onSubmit:E,children:[h.jsxs("div",{className:oe.formRow,children:[h.jsx("input",{className:oe.input,type:"text",placeholder:"Token name",value:r,onChange:C=>u(C.target.value)}),h.jsx("input",{className:oe.input,type:"password",placeholder:"Value",value:d,onChange:C=>p(C.target.value)})]}),h.jsxs("div",{className:oe.formRow,children:[h.jsx("select",{className:oe.select,value:m,onChange:C=>g(C.target.value),children:A6.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:oe.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:v,onChange:C=>y(C.target.value)}),h.jsx("button",{className:oe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function w6(){return h.jsxs(h.Fragment,{children:[h.jsx(C6,{}),h.jsx(j6,{})]})}const N6="_container_6b3ow_1",D6="_header_6b3ow_7",k6="_form_6b3ow_19",M6="_formActions_6b3ow_87",R6="_list_6b3ow_93",O6="_card_6b3ow_99",B6="_active_6b3ow_109",L6="_cardHeader_6b3ow_113",I6="_cardTitle_6b3ow_123",U6="_defaultBadge_6b3ow_129",z6="_cardActions_6b3ow_143",V6="_description_6b3ow_148",H6="_meta_6b3ow_154",P6="_promptDetails_6b3ow_171",G6="_promptText_6b3ow_183",F6="_empty_6b3ow_200",$6="_btnPrimary_6b3ow_206",q6="_btnSecondary_6b3ow_240",Y6="_btnSmall_6b3ow_267",K6="_btnDanger_6b3ow_293",ot={container:N6,header:D6,form:k6,formActions:M6,list:R6,card:O6,active:B6,cardHeader:L6,cardTitle:I6,defaultBadge:U6,cardActions:z6,description:V6,meta:H6,promptDetails:P6,promptText:G6,empty:F6,btnPrimary:$6,btnSecondary:q6,btnSmall:Y6,btnDanger:K6};function Z6(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o,appDefaultPersonaId:r,setAppDefaultPersonaId:u}=Gt(),[d,p]=S.useState(null),[m,g]=S.useState(!1),[v,y]=S.useState(null),[_,T]=S.useState(""),[E,w]=S.useState(""),[j,C]=S.useState(""),[A,M]=S.useState("claude-code"),[V,D]=S.useState("sonnet"),[G,H]=S.useState(0),R=()=>{T(""),w(""),C(""),M("claude-code"),D("sonnet"),H(0)},X=()=>{R(),p(null),g(!0)},te=Q=>{T(Q.name),w(Q.description),C(Q.systemPrompt),M(Q.runtime),D(Q.model),H(Q.maxTurns),p(Q),g(!1)},ne=Q=>{Q.preventDefault(),!(!_.trim()||!j.trim()||!A||!V)&&(d?(i(d.id,_,E,j,A,V,G),p(null)):(a(_,E,j,A,V,G),g(!1)),R())},ie=Q=>{o(Q),y(null),(d==null?void 0:d.id)===Q&&(p(null),R())},ue=()=>{p(null),g(!1),R()},q=()=>h.jsxs("form",{onSubmit:ne,className:ot.form,children:[h.jsx("h3",{children:d?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:_,onChange:Q=>T(Q.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:E,onChange:Q=>w(Q.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:A,onChange:Q=>M(Q.target.value),"data-testid":"persona-runtime-select",children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:V,onChange:Q=>D(Q.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:G,onChange:Q=>H(parseInt(Q.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:j,onChange:Q=>C(Q.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:ot.formActions,children:[h.jsx("button",{type:"submit",className:ot.btnPrimary,children:d?"Save":"Create"}),h.jsx("button",{type:"button",onClick:ue,className:ot.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:ot.container,children:[h.jsxs("div",{className:ot.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:X,className:ot.btnPrimary,children:"+ New Persona"})]}),(m||d)&&q(),n.length===0&&!m?h.jsx("p",{className:ot.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:ot.list,children:n.map(Q=>{const B=r===Q.id;return h.jsxs("div",{className:`${ot.card} ${(d==null?void 0:d.id)===Q.id?ot.active:""}`,"data-testid":`persona-card-${Q.id}`,children:[h.jsxs("div",{className:ot.cardHeader,children:[h.jsxs("span",{className:ot.cardTitle,children:[h.jsx("strong",{children:Q.name}),B&&h.jsx("span",{className:ot.defaultBadge,"data-testid":`persona-default-badge-${Q.id}`,children:"App Default"})]}),h.jsxs("div",{className:ot.cardActions,children:[!B&&h.jsx("button",{onClick:()=>u(Q.id),className:ot.btnSmall,"data-testid":`persona-set-default-${Q.id}`,title:"Set as app default persona",children:"Set Default"}),h.jsx("button",{onClick:()=>te(Q),className:ot.btnSmall,children:"Edit"}),v===Q.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ie(Q.id),className:ot.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>y(null),className:ot.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>y(Q.id),className:ot.btnSmall,children:"Delete"})]})]}),Q.description&&h.jsx("p",{className:ot.description,children:Q.description}),h.jsxs("div",{className:ot.meta,children:[Q.runtime&&h.jsxs("span",{children:["Runtime: ",Q.runtime]}),Q.model&&h.jsxs("span",{children:["Model: ",Q.model]}),Q.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",Q.maxTurns]})]}),h.jsxs("details",{className:ot.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:ot.promptText,children:Q.systemPrompt})]})]},Q.id)})})]})}function X6(){return h.jsx(Z6,{})}function Q6(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=Z0();return h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Appearance"}),h.jsx("p",{className:oe.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:oe.themeOptions,children:ec.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),p=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,m=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${oe.themeOption} ${p?oe.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(u.id),children:[h.jsxs("span",{className:oe.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:oe.themeOptionLabel,children:u.label}),h.jsx("span",{className:oe.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:oe.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${oe.variantButton} ${p&&m?oe.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${oe.variantButton} ${p&&!m?oe.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:oe.themeSwatches,children:u.swatches.map((g,v)=>h.jsx("span",{className:oe.themeSwatch,style:{background:g}},v))})]},u.id)})}),h.jsxs("label",{className:oe.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:oe.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:oe.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function J6(){return h.jsx(Q6,{})}function W6(){const{connected:n,environments:a,sessions:i}=Gt(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=i.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:oe.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:oe.sectionTitle,children:"About"}),h.jsx("p",{className:oe.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:oe.aboutGrid,children:[h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Connection"}),h.jsxs("span",{className:oe.aboutValue,children:[h.jsx("span",{className:`${oe.aboutDot} ${n?oe.aboutDotConnected:oe.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Environments"}),h.jsxs("span",{className:oe.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:oe.aboutValue,children:u})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Version"}),h.jsx("span",{className:oe.aboutValue,children:"0.41.0"})]})]})]})}function e4(){return h.jsx(W6,{})}const t4="_root_h353j_1",n4="_body_h353j_7",a4="_main_h353j_19",s4="_sidebarWrapper_h353j_26",i4="_overlay_h353j_56",Ol={root:t4,body:n4,main:a4,sidebarWrapper:s4,overlay:i4},l4=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function o4(){const{lastSpawnedId:n,environments:a}=Gt(),{showToast:i}=to();Fk(a,i);const o=Un(),r=Zt(),u=r.pathname.startsWith(Ni),[d,p]=S.useState(!1),m=S.useCallback(()=>p(g=>!g),[]);return S.useEffect(()=>{p(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=v=>{v.key==="Escape"&&p(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(H0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Ol.root,children:[h.jsx(WE,{onToggleSidebar:u?void 0:m,sidebarOpen:d}),h.jsxs("div",{className:Ol.body,children:[h.jsx("div",{className:Ol.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(sB,{}):h.jsx(dk,{})}),d&&!u&&h.jsx("div",{className:Ol.overlay,"data-testid":"drawer-overlay",onClick:()=>p(!1)}),h.jsxs("div",{className:Ol.main,children:[h.jsx(L0,{}),h.jsx(Dk,{})]})]}),h.jsx(Gk,{})]})}function r4(){return h.jsx(bT,{children:h.jsxs(_t,{element:h.jsx(o4,{}),children:[h.jsx(_t,{index:!0,element:h.jsx(AR,{})}),h.jsx(_t,{path:"sessions/new",element:h.jsx(OR,{})}),h.jsx(_t,{path:"sessions/:sessionId",element:h.jsx(ZR,{})}),h.jsx(_t,{path:"projects/:projectId",element:h.jsx(oO,{})}),h.jsx(_t,{path:"tasks/new",element:h.jsx(NO,{})}),h.jsx(_t,{path:"tasks/:taskId",element:h.jsx(Yd,{})}),h.jsx(_t,{path:"tasks/:taskId/stream",element:h.jsx(Yd,{})}),h.jsx(_t,{path:"tasks/:taskId/findings",element:h.jsx(Yd,{})}),h.jsx(_t,{path:"tasks/:taskId/edit",element:h.jsx(DO,{})}),h.jsx(_t,{path:"environments/new",element:h.jsx(KO,{})}),h.jsxs(_t,{path:"settings",element:h.jsx(WO,{}),children:[h.jsx(_t,{index:!0,element:h.jsx(Dr,{to:"environments",replace:!0})}),h.jsx(_t,{path:"environments",element:h.jsx(HB,{})}),h.jsx(_t,{path:"credentials",element:h.jsx(w6,{})}),h.jsx(_t,{path:"tokens",element:h.jsx(Dr,{to:"../credentials",replace:!0})}),h.jsx(_t,{path:"personas",element:h.jsx(X6,{})}),h.jsx(_t,{path:"appearance",element:h.jsx(J6,{})}),h.jsx(_t,{path:"about",element:h.jsx(e4,{})})]}),h.jsx(_t,{path:"*",element:h.jsx(Dr,{to:"/",replace:!0})})]})})}function c4(){const n=l4?IE:wE;return h.jsx(GE,{children:h.jsx(zE,{children:h.jsx(n,{children:h.jsx(FT,{children:h.jsx(r4,{})})})})})}_x.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(c4,{})}));
|