@grackle-ai/web 0.49.0 → 0.50.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.
@@ -1,98 +0,0 @@
1
- import{r as u_,a as S,j as h,v as d_,b as f_,t as Er,i as h_,f as p_,M as Nf,c as jf}from"./markdown-gcy1Jmzi.js";import{r as m_,d as Sv,H as xv,P as _v,i as g_,B as v_,a as y_,C as b_,M as S_}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 d of r)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function i(r){const d={};return r.integrity&&(d.integrity=r.integrity),r.referrerPolicy&&(d.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?d.credentials="include":r.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(r){if(r.ep)return;r.ep=!0;const d=i(r);fetch(r.href,d)}})();var Td={exports:{}},Rl={},Ed={exports:{}},Cd={};/**
2
- * @license React
3
- * scheduler.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Tv;function x_(){return Tv||(Tv=1,(function(n){function a(j,Q){var q=j.length;j.push(Q);e:for(;0<q;){var ue=q-1>>>1,K=j[ue];if(0<r(K,Q))j[ue]=Q,j[q]=K,q=ue;else break e}}function i(j){return j.length===0?null:j[0]}function o(j){if(j.length===0)return null;var Q=j[0],q=j.pop();if(q!==Q){j[0]=q;e:for(var ue=0,K=j.length,Ge=K>>>1;ue<Ge;){var we=2*(ue+1)-1,ge=j[we],Re=we+1,gt=j[Re];if(0>r(ge,q))Re<K&&0>r(gt,ge)?(j[ue]=gt,j[Re]=q,ue=Re):(j[ue]=ge,j[we]=q,ue=we);else if(Re<K&&0>r(gt,q))j[ue]=gt,j[Re]=q,ue=Re;else break e}}return Q}function r(j,Q){var q=j.sortIndex-Q.sortIndex;return q!==0?q:j.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var u=Date,p=u.now();n.unstable_now=function(){return u.now()-p}}var m=[],g=[],y=1,v=null,x=3,E=!1,C=!1,A=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function H(j){for(var Q=i(g);Q!==null;){if(Q.callback===null)o(g);else if(Q.startTime<=j)o(g),Q.sortIndex=Q.expirationTime,a(m,Q);else break;Q=i(g)}}function B(j){if(A=!1,H(j),!C)if(i(m)!==null)C=!0,F||(F=!0,ae());else{var Q=i(g);Q!==null&&oe(B,Q.startTime-j)}}var F=!1,R=-1,I=5,P=-1;function J(){return w?!0:!(n.unstable_now()-P<I)}function ee(){if(w=!1,F){var j=n.unstable_now();P=j;var Q=!0;try{e:{C=!1,A&&(A=!1,N(R),R=-1),E=!0;var q=x;try{t:{for(H(j),v=i(m);v!==null&&!(v.expirationTime>j&&J());){var ue=v.callback;if(typeof ue=="function"){v.callback=null,x=v.priorityLevel;var K=ue(v.expirationTime<=j);if(j=n.unstable_now(),typeof K=="function"){v.callback=K,H(j),Q=!0;break t}v===i(m)&&o(m),H(j)}else o(m);v=i(m)}if(v!==null)Q=!0;else{var Ge=i(g);Ge!==null&&oe(B,Ge.startTime-j),Q=!1}}break e}finally{v=null,x=q,E=!1}Q=void 0}}finally{Q?ae():F=!1}}}var ae;if(typeof D=="function")ae=function(){D(ee)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,pe=te.port2;te.port1.onmessage=ee,ae=function(){pe.postMessage(null)}}else ae=function(){_(ee,0)};function oe(j,Q){R=_(function(){j(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(j){j.callback=null},n.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_next=function(j){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var q=x;x=Q;try{return j()}finally{x=q}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(j,Q){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var q=x;x=j;try{return Q()}finally{x=q}},n.unstable_scheduleCallback=function(j,Q,q){var ue=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?ue+q:ue):q=ue,j){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=q+K,j={id:y++,callback:Q,priorityLevel:j,startTime:q,expirationTime:K,sortIndex:-1},q>ue?(j.sortIndex=q,a(g,j),i(m)===null&&j===i(g)&&(A?(N(R),R=-1):A=!0,oe(B,q-ue))):(j.sortIndex=K,a(m,j),C||E||(C=!0,F||(F=!0,ae()))),j},n.unstable_shouldYield=J,n.unstable_wrapCallback=function(j){var Q=x;return function(){var q=x;x=Q;try{return j.apply(this,arguments)}finally{x=q}}}})(Cd)),Cd}var Ev;function __(){return Ev||(Ev=1,Ed.exports=x_()),Ed.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 Cv;function T_(){if(Cv)return Rl;Cv=1;var n=__(),a=u_(),i=m_();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 d(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 u(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(d(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=d(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,T=c.child;T;){if(T===s){b=!0,s=c,l=f;break}if(T===l){b=!0,l=c,s=f;break}T=T.sibling}if(!b){for(T=f.child;T;){if(T===s){b=!0,s=f,l=c;break}if(T===l){b=!0,l=f,s=c;break}T=T.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 y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),D=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function pe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case B:return"Suspense";case F:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case D:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var oe=Array.isArray,j=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},ue=[],K=-1;function Ge(e){return{current:e}}function we(e){0>K||(e.current=ue[K],ue[K]=null,K--)}function ge(e,t){K++,ue[K]=e.current,e.current=t}var Re=Ge(null),gt=Ge(null),Rt=Ge(null),ne=Ge(null);function fe(e,t){switch(ge(Rt,t),ge(gt,e),ge(Re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pg(t),e=Fg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}we(Re),ge(Re,e)}function de(){we(Re),we(gt),we(Rt)}function Qe(e){e.memoizedState!==null&&ge(ne,e);var t=Re.current,s=Fg(t,e.type);t!==s&&(ge(gt,e),ge(Re,s))}function We(e){gt.current===e&&(we(Re),we(gt)),ne.current===e&&(we(ne),Nl._currentValue=q)}var It,Ct;function At(e){if(It===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);It=t&&t[1]||"",Ct=-1<s.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+It+e+Ct}var at=!1;function Oe(e,t){if(!e||at)return"";at=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(G){var V=G}Reflect.construct(e,[],X)}else{try{X.call()}catch(G){V=G}e.call(X.prototype)}}else{try{throw Error()}catch(G){V=G}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(G){if(G&&V&&typeof G.stack=="string")return[G.stack,V.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],T=f[1];if(b&&T){var k=b.split(`
20
- `),z=T.split(`
21
- `);for(c=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;c<z.length&&!z[c].includes("DetermineComponentFrameRoot");)c++;if(l===k.length||c===z.length)for(l=k.length-1,c=z.length-1;1<=l&&0<=c&&k[l]!==z[c];)c--;for(;1<=l&&0<=c;l--,c--)if(k[l]!==z[c]){if(l!==1||c!==1)do if(l--,c--,0>c||k[l]!==z[c]){var $=`
22
- `+k[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=c);break}}}finally{at=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?At(s):""}function Hn(e,t){switch(e.tag){case 26:case 27:case 5:return At(e.type);case 16:return At("Lazy");case 13:return e.child!==t&&t!==null?At("Suspense Fallback"):At("Suspense");case 19:return At("SuspenseList");case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return At("Activity");default:return""}}function ka(e){try{var t="",s=null;do t+=Hn(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
23
- Error generating stack: `+l.message+`
24
- `+l.stack}}var Gn=Object.prototype.hasOwnProperty,ea=n.unstable_scheduleCallback,Bn=n.unstable_cancelCallback,ta=n.unstable_shouldYield,Z=n.unstable_requestPaint,W=n.unstable_now,ie=n.unstable_getCurrentPriorityLevel,Se=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,Be=n.unstable_NormalPriority,Ce=n.unstable_LowPriority,ct=n.unstable_IdlePriority,ke=n.log,Pe=n.unstable_setDisableYieldValue,ut=null,Ue=null;function ht(e){if(typeof ke=="function"&&Pe(e),Ue&&typeof Ue.setStrictMode=="function")try{Ue.setStrictMode(ut,e)}catch{}}var Te=Math.clz32?Math.clz32:se,Ie=Math.log,dt=Math.LN2;function se(e){return e>>>=0,e===0?32:31-(Ie(e)/dt|0)|0}var kt=256,Ln=262144,co=4194304;function rs(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 uo(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 T=l&134217727;return T!==0?(l=T&~f,l!==0?c=rs(l):(b&=T,b!==0?c=rs(b):s||(s=T&~e,s!==0&&(c=rs(s))))):(T=l&~f,T!==0?c=rs(T):b!==0?c=rs(b):s||(s=l&~e,s!==0&&(c=rs(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 Gi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Q1(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 Eh(){var e=co;return co<<=1,(co&62914560)===0&&(co=4194304),e}function dc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Pi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function W1(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 T=e.entanglements,k=e.expirationTimes,z=e.hiddenUpdates;for(s=b&~s;0<s;){var $=31-Te(s),X=1<<$;T[$]=0,k[$]=-1;var V=z[$];if(V!==null)for(z[$]=null,$=0;$<V.length;$++){var G=V[$];G!==null&&(G.lane&=-536870913)}s&=~X}l!==0&&Ch(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function Ch(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Te(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Ah(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Te(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function kh(e,t){var s=t&-t;return s=(s&42)!==0?1:fc(s),(s&(e.suspendedLanes|t))!==0?0:s}function fc(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 hc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wh(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:hv(e.type))}function Nh(e,t){var s=Q.p;try{return Q.p=e,t()}finally{Q.p=s}}var wa=Math.random().toString(36).slice(2),Vt="__reactFiber$"+wa,Jt="__reactProps$"+wa,Is="__reactContainer$"+wa,pc="__reactEvents$"+wa,J1="__reactListeners$"+wa,eS="__reactHandles$"+wa,jh="__reactResources$"+wa,Fi="__reactMarker$"+wa;function mc(e){delete e[Vt],delete e[Jt],delete e[pc],delete e[J1],delete e[eS]}function Us(e){var t=e[Vt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Is]||s[Vt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Qg(e);e!==null;){if(s=e[Vt])return s;e=Qg(e)}return t}e=s,s=e.parentNode}return null}function zs(e){if(e=e[Vt]||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 $i(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 Ut(e){e[Fi]=!0}var Dh=new Set,Mh={};function cs(e,t){Hs(e,t),Hs(e+"Capture",t)}function Hs(e,t){for(Mh[e]=t,e=0;e<t.length;e++)Dh.add(t[e])}var tS=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]*$"),Rh={},Oh={};function nS(e){return Gn.call(Oh,e)?!0:Gn.call(Rh,e)?!1:tS.test(e)?Oh[e]=!0:(Rh[e]=!0,!1)}function fo(e,t,s){if(nS(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 ho(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 na(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 yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aS(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 gc(e){if(!e._valueTracker){var t=Bh(e)?"checked":"value";e._valueTracker=aS(e,t,""+e[t])}}function Lh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Bh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function po(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 sS=/[\n"\\]/g;function bn(e){return e.replace(sS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vc(e,t,s,l,c,f,b,T){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=""+yn(t)):e.value!==""+yn(t)&&(e.value=""+yn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?yc(e,b,yn(t)):s!=null?yc(e,b,yn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+yn(T):e.removeAttribute("name")}function Ih(e,t,s,l,c,f,b,T){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)){gc(e);return}s=s!=null?""+yn(s):"",t=t!=null?""+yn(t):s,T||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=T?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),gc(e)}function yc(e,t,s){t==="number"&&po(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Gs(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=""+yn(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 Uh(e,t,s){if(t!=null&&(t=""+yn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+yn(s):""}function zh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(oe(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=yn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),gc(e)}function Ps(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var iS=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 Vh(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||iS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Hh(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&&Vh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&Vh(e,f,t[f])}function bc(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 lS=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"]]),oS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mo(e){return oS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function aa(){}var Sc=null;function xc(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 Gh(e){var t=zs(e);if(t&&(e=t.stateNode)){var s=e[Jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(vc(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="'+bn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Jt]||null;if(!c)throw Error(o(90));vc(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&&Lh(l)}break e;case"textarea":Uh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Gs(e,!!s.multiple,t,!1)}}}var _c=!1;function Ph(e,t,s){if(_c)return e(t,s);_c=!0;try{var l=e(t);return l}finally{if(_c=!1,(Fs!==null||$s!==null)&&(nr(),Fs&&(t=Fs,e=$s,$s=Fs=null,Gh(t),e)))for(t=0;t<e.length;t++)Gh(e[t])}}function qi(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Jt]||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 sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tc=!1;if(sa)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){Tc=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{Tc=!1}var Na=null,Ec=null,go=null;function Fh(){if(go)return go;var e,t=Ec,s=t.length,l,c="value"in Na?Na.value:Na.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 go=c.slice(e,1<l?1-l:void 0)}function vo(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 yo(){return!0}function $h(){return!1}function en(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 T in e)e.hasOwnProperty(T)&&(s=e[T],this[T]=s?s(f):f[T]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?yo:$h,this.isPropagationStopped=$h,this}return v(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=yo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),t}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bo=en(us),Ki=v({},us,{view:0,detail:0}),rS=en(Ki),Cc,Ac,Zi,So=v({},Ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zi&&(Zi&&e.type==="mousemove"?(Cc=e.screenX-Zi.screenX,Ac=e.screenY-Zi.screenY):Ac=Cc=0,Zi=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),qh=en(So),cS=v({},So,{dataTransfer:0}),uS=en(cS),dS=v({},Ki,{relatedTarget:0}),kc=en(dS),fS=v({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),hS=en(fS),pS=v({},us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mS=en(pS),gS=v({},us,{data:0}),Yh=en(gS),vS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yS={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"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bS[e])?!!t[e]:!1}function wc(){return SS}var xS=v({},Ki,{key:function(e){if(e.key){var t=vS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wc,charCode:function(e){return e.type==="keypress"?vo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_S=en(xS),TS=v({},So,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kh=en(TS),ES=v({},Ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wc}),CS=en(ES),AS=v({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),kS=en(AS),wS=v({},So,{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}),NS=en(wS),jS=v({},us,{newState:0,oldState:0}),DS=en(jS),MS=[9,13,27,32],Nc=sa&&"CompositionEvent"in window,Xi=null;sa&&"documentMode"in document&&(Xi=document.documentMode);var RS=sa&&"TextEvent"in window&&!Xi,Zh=sa&&(!Nc||Xi&&8<Xi&&11>=Xi),Xh=" ",Qh=!1;function Wh(e,t){switch(e){case"keyup":return MS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qs=!1;function OS(e,t){switch(e){case"compositionend":return Jh(t);case"keypress":return t.which!==32?null:(Qh=!0,Xh);case"textInput":return e=t.data,e===Xh&&Qh?null:e;default:return null}}function BS(e,t){if(qs)return e==="compositionend"||!Nc&&Wh(e,t)?(e=Fh(),go=Ec=Na=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 Zh&&t.locale!=="ko"?null:t.data;default:return null}}var LS={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 ep(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!LS[e.type]:t==="textarea"}function tp(e,t,s,l){Fs?$s?$s.push(l):$s=[l]:Fs=l,t=cr(t,"onChange"),0<t.length&&(s=new bo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Qi=null,Wi=null;function IS(e){Ig(e,0)}function xo(e){var t=$i(e);if(Lh(t))return e}function np(e,t){if(e==="change")return t}var ap=!1;if(sa){var jc;if(sa){var Dc="oninput"in document;if(!Dc){var sp=document.createElement("div");sp.setAttribute("oninput","return;"),Dc=typeof sp.oninput=="function"}jc=Dc}else jc=!1;ap=jc&&(!document.documentMode||9<document.documentMode)}function ip(){Qi&&(Qi.detachEvent("onpropertychange",lp),Wi=Qi=null)}function lp(e){if(e.propertyName==="value"&&xo(Wi)){var t=[];tp(t,Wi,e,xc(e)),Ph(IS,t)}}function US(e,t,s){e==="focusin"?(ip(),Qi=t,Wi=s,Qi.attachEvent("onpropertychange",lp)):e==="focusout"&&ip()}function zS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xo(Wi)}function VS(e,t){if(e==="click")return xo(t)}function HS(e,t){if(e==="input"||e==="change")return xo(t)}function GS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:GS;function Ji(e,t){if(on(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(!Gn.call(t,c)||!on(e[c],t[c]))return!1}return!0}function op(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rp(e,t){var s=op(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=op(s)}}function cp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function up(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=po(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=po(e.document)}return t}function Mc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var PS=sa&&"documentMode"in document&&11>=document.documentMode,Ys=null,Rc=null,el=null,Oc=!1;function dp(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Oc||Ys==null||Ys!==po(l)||(l=Ys,"selectionStart"in l&&Mc(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}),el&&Ji(el,l)||(el=l,l=cr(Rc,"onSelect"),0<l.length&&(t=new bo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Ys)))}function ds(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Ks={animationend:ds("Animation","AnimationEnd"),animationiteration:ds("Animation","AnimationIteration"),animationstart:ds("Animation","AnimationStart"),transitionrun:ds("Transition","TransitionRun"),transitionstart:ds("Transition","TransitionStart"),transitioncancel:ds("Transition","TransitionCancel"),transitionend:ds("Transition","TransitionEnd")},Bc={},fp={};sa&&(fp=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 fs(e){if(Bc[e])return Bc[e];if(!Ks[e])return e;var t=Ks[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in fp)return Bc[e]=t[s];return e}var hp=fs("animationend"),pp=fs("animationiteration"),mp=fs("animationstart"),FS=fs("transitionrun"),$S=fs("transitionstart"),qS=fs("transitioncancel"),gp=fs("transitionend"),vp=new Map,Lc="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(" ");Lc.push("scrollEnd");function In(e,t){vp.set(e,t),cs(t,[e])}var _o=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)},Sn=[],Zs=0,Ic=0;function To(){for(var e=Zs,t=Ic=Zs=0;t<e;){var s=Sn[t];Sn[t++]=null;var l=Sn[t];Sn[t++]=null;var c=Sn[t];Sn[t++]=null;var f=Sn[t];if(Sn[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&&yp(s,c,f)}}function Eo(e,t,s,l){Sn[Zs++]=e,Sn[Zs++]=t,Sn[Zs++]=s,Sn[Zs++]=l,Ic|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Uc(e,t,s,l){return Eo(e,t,s,l),Co(e)}function hs(e,t){return Eo(e,null,null,t),Co(e)}function yp(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-Te(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function Co(e){if(50<_l)throw _l=0,Yu=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 YS(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 rn(e,t,s,l){return new YS(e,t,s,l)}function zc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ia(e,t){var s=e.alternate;return s===null?(s=rn(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 bp(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 Ao(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")zc(e)&&(b=1);else if(typeof e=="string")b=Wx(e,s,Re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=rn(31,s,t,c),e.elementType=P,e.lanes=f,e;case A:return ps(s.children,c,f,t);case w:b=8,c|=24;break;case _:return e=rn(12,s,t,c|2),e.elementType=_,e.lanes=f,e;case B:return e=rn(13,s,t,c),e.elementType=B,e.lanes=f,e;case F:return e=rn(19,s,t,c),e.elementType=F,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:b=10;break e;case N:b=9;break e;case H:b=11;break e;case R:b=14;break e;case I:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=rn(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function ps(e,t,s,l){return e=rn(7,e,l,t),e.lanes=s,e}function Vc(e,t,s){return e=rn(6,e,null,t),e.lanes=s,e}function Sp(e){var t=rn(18,null,null,0);return t.stateNode=e,t}function Hc(e,t,s){return t=rn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xp=new WeakMap;function xn(e,t){if(typeof e=="object"&&e!==null){var s=xp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ka(t)},xp.set(e,t),t)}return{value:e,source:t,stack:ka(t)}}var Qs=[],Ws=0,ko=null,tl=0,_n=[],Tn=0,ja=null,Pn=1,Fn="";function la(e,t){Qs[Ws++]=tl,Qs[Ws++]=ko,ko=e,tl=t}function _p(e,t,s){_n[Tn++]=Pn,_n[Tn++]=Fn,_n[Tn++]=ja,ja=e;var l=Pn;e=Fn;var c=32-Te(l)-1;l&=~(1<<c),s+=1;var f=32-Te(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Pn=1<<32-Te(t)+c|s<<c|l,Fn=f+e}else Pn=1<<f|s<<c|l,Fn=e}function Gc(e){e.return!==null&&(la(e,1),_p(e,1,0))}function Pc(e){for(;e===ko;)ko=Qs[--Ws],Qs[Ws]=null,tl=Qs[--Ws],Qs[Ws]=null;for(;e===ja;)ja=_n[--Tn],_n[Tn]=null,Fn=_n[--Tn],_n[Tn]=null,Pn=_n[--Tn],_n[Tn]=null}function Tp(e,t){_n[Tn++]=Pn,_n[Tn++]=Fn,_n[Tn++]=ja,Pn=t.id,Fn=t.overflow,ja=e}var Ht=null,it=null,Le=!1,Da=null,En=!1,Fc=Error(o(519));function Ma(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nl(xn(t,e)),Fc}function Ep(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[Vt]=e,t[Jt]=l,s){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(s=0;s<El.length;s++)je(El[s],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Ih(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),zh(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||Hg(t.textContent,s)?(l.popover!=null&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=aa),t=!0):t=!1,t||Ma(e,!0)}function Cp(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:En=!1;return;case 27:case 3:En=!0;return;default:Ht=Ht.return}}function Js(e){if(e!==Ht)return!1;if(!Le)return Cp(e),Le=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||rd(e.type,e.memoizedProps)),s=!s),s&&it&&Ma(e),Cp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=Xg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));it=Xg(e)}else t===27?(t=it,qa(e.type)?(e=hd,hd=null,it=e):it=t):it=Ht?An(e.stateNode.nextSibling):null;return!0}function ms(){it=Ht=null,Le=!1}function $c(){var e=Da;return e!==null&&(sn===null?sn=e:sn.push.apply(sn,e),Da=null),e}function nl(e){Da===null?Da=[e]:Da.push(e)}var qc=Ge(null),gs=null,oa=null;function Ra(e,t,s){ge(qc,t._currentValue),t._currentValue=s}function ra(e){e._currentValue=qc.current,we(qc)}function Yc(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 Kc(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 T=f;f=c;for(var k=0;k<t.length;k++)if(T.context===t[k]){f.lanes|=s,T=f.alternate,T!==null&&(T.lanes|=s),Yc(f.return,s,e),l||(b=null);break e}f=T.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),Yc(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 T=c.type;on(c.pendingProps.value,b.value)||(e!==null?e.push(T):e=[T])}}else if(c===ne.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Nl):e=[Nl])}c=c.return}e!==null&&Kc(t,e,s,l),t.flags|=262144}function wo(e){for(e=e.firstContext;e!==null;){if(!on(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function vs(e){gs=e,oa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Ap(gs,e)}function No(e,t){return gs===null&&vs(e),Ap(e,t)}function Ap(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},oa===null){if(e===null)throw Error(o(308));oa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oa=oa.next=t;return s}var KS=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()})}},ZS=n.unstable_scheduleCallback,XS=n.unstable_NormalPriority,wt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zc(){return{controller:new KS,data:new Map,refCount:0}}function al(e){e.refCount--,e.refCount===0&&ZS(XS,function(){e.controller.abort()})}var sl=null,Xc=0,ti=0,ni=null;function QS(e,t){if(sl===null){var s=sl=[];Xc=0,ti=Ju(),ni={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Xc++,t.then(kp,kp),t}function kp(){if(--Xc===0&&sl!==null){ni!==null&&(ni.status="fulfilled");var e=sl;sl=null,ti=0,ni=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function WS(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 wp=j.S;j.S=function(e,t){dg=W(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&QS(e,t),wp!==null&&wp(e,t)};var ys=Ge(null);function Qc(){var e=ys.current;return e!==null?e:nt.pooledCache}function jo(e,t){t===null?ge(ys,ys.current):ge(ys,t.pool)}function Np(){var e=Qc();return e===null?null:{parent:wt._currentValue,pool:e}}var ai=Error(o(460)),Wc=Error(o(474)),Do=Error(o(542)),Mo={then:function(){}};function jp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Dp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(aa,aa),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Rp(e),e;default:if(typeof t.status=="string")t.then(aa,aa);else{if(e=nt,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,Rp(e),e}throw Ss=t,ai}}function bs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ss=s,ai):s}}var Ss=null;function Mp(){if(Ss===null)throw Error(o(459));var e=Ss;return Ss=null,e}function Rp(e){if(e===ai||e===Do)throw Error(o(483))}var si=null,il=0;function Ro(e){var t=il;return il+=1,si===null&&(si=[]),Dp(si,e,t)}function ll(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Oo(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Op(e){function t(O,M){if(e){var U=O.deletions;U===null?(O.deletions=[M],O.flags|=16):U.push(M)}}function s(O,M){if(!e)return null;for(;M!==null;)t(O,M),M=M.sibling;return null}function l(O){for(var M=new Map;O!==null;)O.key!==null?M.set(O.key,O):M.set(O.index,O),O=O.sibling;return M}function c(O,M){return O=ia(O,M),O.index=0,O.sibling=null,O}function f(O,M,U){return O.index=U,e?(U=O.alternate,U!==null?(U=U.index,U<M?(O.flags|=67108866,M):U):(O.flags|=67108866,M)):(O.flags|=1048576,M)}function b(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function T(O,M,U,Y){return M===null||M.tag!==6?(M=Vc(U,O.mode,Y),M.return=O,M):(M=c(M,U),M.return=O,M)}function k(O,M,U,Y){var me=U.type;return me===A?$(O,M,U.props.children,Y,U.key):M!==null&&(M.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===I&&bs(me)===M.type)?(M=c(M,U.props),ll(M,U),M.return=O,M):(M=Ao(U.type,U.key,U.props,null,O.mode,Y),ll(M,U),M.return=O,M)}function z(O,M,U,Y){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=Hc(U,O.mode,Y),M.return=O,M):(M=c(M,U.children||[]),M.return=O,M)}function $(O,M,U,Y,me){return M===null||M.tag!==7?(M=ps(U,O.mode,Y,me),M.return=O,M):(M=c(M,U),M.return=O,M)}function X(O,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Vc(""+M,O.mode,U),M.return=O,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case E:return U=Ao(M.type,M.key,M.props,null,O.mode,U),ll(U,M),U.return=O,U;case C:return M=Hc(M,O.mode,U),M.return=O,M;case I:return M=bs(M),X(O,M,U)}if(oe(M)||ae(M))return M=ps(M,O.mode,U,null),M.return=O,M;if(typeof M.then=="function")return X(O,Ro(M),U);if(M.$$typeof===D)return X(O,No(O,M),U);Oo(O,M)}return null}function V(O,M,U,Y){var me=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return me!==null?null:T(O,M,""+U,Y);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case E:return U.key===me?k(O,M,U,Y):null;case C:return U.key===me?z(O,M,U,Y):null;case I:return U=bs(U),V(O,M,U,Y)}if(oe(U)||ae(U))return me!==null?null:$(O,M,U,Y,null);if(typeof U.then=="function")return V(O,M,Ro(U),Y);if(U.$$typeof===D)return V(O,M,No(O,U),Y);Oo(O,U)}return null}function G(O,M,U,Y,me){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return O=O.get(U)||null,T(M,O,""+Y,me);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case E:return O=O.get(Y.key===null?U:Y.key)||null,k(M,O,Y,me);case C:return O=O.get(Y.key===null?U:Y.key)||null,z(M,O,Y,me);case I:return Y=bs(Y),G(O,M,U,Y,me)}if(oe(Y)||ae(Y))return O=O.get(U)||null,$(M,O,Y,me,null);if(typeof Y.then=="function")return G(O,M,U,Ro(Y),me);if(Y.$$typeof===D)return G(O,M,U,No(M,Y),me);Oo(M,Y)}return null}function le(O,M,U,Y){for(var me=null,ze=null,he=M,Ae=M=0,Me=null;he!==null&&Ae<U.length;Ae++){he.index>Ae?(Me=he,he=null):Me=he.sibling;var Ve=V(O,he,U[Ae],Y);if(Ve===null){he===null&&(he=Me);break}e&&he&&Ve.alternate===null&&t(O,he),M=f(Ve,M,Ae),ze===null?me=Ve:ze.sibling=Ve,ze=Ve,he=Me}if(Ae===U.length)return s(O,he),Le&&la(O,Ae),me;if(he===null){for(;Ae<U.length;Ae++)he=X(O,U[Ae],Y),he!==null&&(M=f(he,M,Ae),ze===null?me=he:ze.sibling=he,ze=he);return Le&&la(O,Ae),me}for(he=l(he);Ae<U.length;Ae++)Me=G(he,O,Ae,U[Ae],Y),Me!==null&&(e&&Me.alternate!==null&&he.delete(Me.key===null?Ae:Me.key),M=f(Me,M,Ae),ze===null?me=Me:ze.sibling=Me,ze=Me);return e&&he.forEach(function(Qa){return t(O,Qa)}),Le&&la(O,Ae),me}function ve(O,M,U,Y){if(U==null)throw Error(o(151));for(var me=null,ze=null,he=M,Ae=M=0,Me=null,Ve=U.next();he!==null&&!Ve.done;Ae++,Ve=U.next()){he.index>Ae?(Me=he,he=null):Me=he.sibling;var Qa=V(O,he,Ve.value,Y);if(Qa===null){he===null&&(he=Me);break}e&&he&&Qa.alternate===null&&t(O,he),M=f(Qa,M,Ae),ze===null?me=Qa:ze.sibling=Qa,ze=Qa,he=Me}if(Ve.done)return s(O,he),Le&&la(O,Ae),me;if(he===null){for(;!Ve.done;Ae++,Ve=U.next())Ve=X(O,Ve.value,Y),Ve!==null&&(M=f(Ve,M,Ae),ze===null?me=Ve:ze.sibling=Ve,ze=Ve);return Le&&la(O,Ae),me}for(he=l(he);!Ve.done;Ae++,Ve=U.next())Ve=G(he,O,Ae,Ve.value,Y),Ve!==null&&(e&&Ve.alternate!==null&&he.delete(Ve.key===null?Ae:Ve.key),M=f(Ve,M,Ae),ze===null?me=Ve:ze.sibling=Ve,ze=Ve);return e&&he.forEach(function(c_){return t(O,c_)}),Le&&la(O,Ae),me}function tt(O,M,U,Y){if(typeof U=="object"&&U!==null&&U.type===A&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case E:e:{for(var me=U.key;M!==null;){if(M.key===me){if(me=U.type,me===A){if(M.tag===7){s(O,M.sibling),Y=c(M,U.props.children),Y.return=O,O=Y;break e}}else if(M.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===I&&bs(me)===M.type){s(O,M.sibling),Y=c(M,U.props),ll(Y,U),Y.return=O,O=Y;break e}s(O,M);break}else t(O,M);M=M.sibling}U.type===A?(Y=ps(U.props.children,O.mode,Y,U.key),Y.return=O,O=Y):(Y=Ao(U.type,U.key,U.props,null,O.mode,Y),ll(Y,U),Y.return=O,O=Y)}return b(O);case C:e:{for(me=U.key;M!==null;){if(M.key===me)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){s(O,M.sibling),Y=c(M,U.children||[]),Y.return=O,O=Y;break e}else{s(O,M);break}else t(O,M);M=M.sibling}Y=Hc(U,O.mode,Y),Y.return=O,O=Y}return b(O);case I:return U=bs(U),tt(O,M,U,Y)}if(oe(U))return le(O,M,U,Y);if(ae(U)){if(me=ae(U),typeof me!="function")throw Error(o(150));return U=me.call(U),ve(O,M,U,Y)}if(typeof U.then=="function")return tt(O,M,Ro(U),Y);if(U.$$typeof===D)return tt(O,M,No(O,U),Y);Oo(O,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(s(O,M.sibling),Y=c(M,U),Y.return=O,O=Y):(s(O,M),Y=Vc(U,O.mode,Y),Y.return=O,O=Y),b(O)):s(O,M)}return function(O,M,U,Y){try{il=0;var me=tt(O,M,U,Y);return si=null,me}catch(he){if(he===ai||he===Do)throw he;var ze=rn(29,he,null,O.mode);return ze.lanes=Y,ze.return=O,ze}finally{}}}var xs=Op(!0),Bp=Op(!1),Oa=!1;function Jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eu(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(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=Co(e),yp(e,null,s),t}return Eo(e,l,t,s),Co(e)}function ol(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,Ah(e,s)}}function tu(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 nu=!1;function rl(){if(nu){var e=ni;if(e!==null)throw e}}function cl(e,t,s,l){nu=!1;var c=e.updateQueue;Oa=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,T=c.shared.pending;if(T!==null){c.shared.pending=null;var k=T,z=k.next;k.next=null,b===null?f=z:b.next=z,b=k;var $=e.alternate;$!==null&&($=$.updateQueue,T=$.lastBaseUpdate,T!==b&&(T===null?$.firstBaseUpdate=z:T.next=z,$.lastBaseUpdate=k))}if(f!==null){var X=c.baseState;b=0,$=z=k=null,T=f;do{var V=T.lane&-536870913,G=V!==T.lane;if(G?(De&V)===V:(l&V)===V){V!==0&&V===ti&&(nu=!0),$!==null&&($=$.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var le=e,ve=T;V=t;var tt=s;switch(ve.tag){case 1:if(le=ve.payload,typeof le=="function"){X=le.call(tt,X,V);break e}X=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=ve.payload,V=typeof le=="function"?le.call(tt,X,V):le,V==null)break e;X=v({},X,V);break e;case 2:Oa=!0}}V=T.callback,V!==null&&(e.flags|=64,G&&(e.flags|=8192),G=c.callbacks,G===null?c.callbacks=[V]:G.push(V))}else G={lane:V,tag:T.tag,payload:T.payload,callback:T.callback,next:null},$===null?(z=$=G,k=X):$=$.next=G,b|=V;if(T=T.next,T===null){if(T=c.shared.pending,T===null)break;G=T,T=G.next,G.next=null,c.lastBaseUpdate=G,c.shared.pending=null}}while(!0);$===null&&(k=X),c.baseState=k,c.firstBaseUpdate=z,c.lastBaseUpdate=$,f===null&&(c.shared.lanes=0),Ha|=b,e.lanes=b,e.memoizedState=X}}function Lp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Ip(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Lp(s[e],t)}var ii=Ge(null),Bo=Ge(0);function Up(e,t){e=va,ge(Bo,e),ge(ii,t),va=e|t.baseLanes}function au(){ge(Bo,va),ge(ii,ii.current)}function su(){va=Bo.current,we(ii),we(Bo)}var cn=Ge(null),Cn=null;function Ia(e){var t=e.alternate;ge(_t,_t.current&1),ge(cn,e),Cn===null&&(t===null||ii.current!==null||t.memoizedState!==null)&&(Cn=e)}function iu(e){ge(_t,_t.current),ge(cn,e),Cn===null&&(Cn=e)}function zp(e){e.tag===22?(ge(_t,_t.current),ge(cn,e),Cn===null&&(Cn=e)):Ua()}function Ua(){ge(_t,_t.current),ge(cn,cn.current)}function un(e){we(cn),Cn===e&&(Cn=null),we(_t)}var _t=Ge(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||dd(s)||fd(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 ca=0,Ee=null,Je=null,Nt=null,Io=!1,li=!1,_s=!1,Uo=0,ul=0,oi=null,JS=0;function vt(){throw Error(o(321))}function lu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!on(e[s],t[s]))return!1;return!0}function ou(e,t,s,l,c,f){return ca=f,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?_m:_u,_s=!1,f=s(l,c),_s=!1,li&&(f=Hp(t,s,l,c)),Vp(e),f}function Vp(e){j.H=hl;var t=Je!==null&&Je.next!==null;if(ca=0,Nt=Je=Ee=null,Io=!1,ul=0,oi=null,t)throw Error(o(300));e===null||jt||(e=e.dependencies,e!==null&&wo(e)&&(jt=!0))}function Hp(e,t,s,l){Ee=e;var c=0;do{if(li&&(oi=null),ul=0,li=!1,25<=c)throw Error(o(301));if(c+=1,Nt=Je=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}j.H=Tm,f=t(s,l)}while(li);return f}function ex(){var e=j.H,t=e.useState()[0];return t=typeof t.then=="function"?dl(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Ee.flags|=1024),t}function ru(){var e=Uo!==0;return Uo=0,e}function cu(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function uu(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}ca=0,Nt=Je=Ee=null,li=!1,ul=Uo=0,oi=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nt===null?Ee.memoizedState=Nt=e:Nt=Nt.next=e,Nt}function Tt(){if(Je===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=Nt===null?Ee.memoizedState:Nt.next;if(t!==null)Nt=t,Je=e;else{if(e===null)throw Ee.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Nt===null?Ee.memoizedState=Nt=e:Nt=Nt.next=e}return Nt}function zo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dl(e){var t=ul;return ul+=1,oi===null&&(oi=[]),e=Dp(oi,e,t),t=Ee,(Nt===null?t.memoizedState:Nt.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?_m:_u),e}function Vo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dl(e);if(e.$$typeof===D)return Gt(e)}throw Error(o(438,String(e)))}function du(e){var t=null,s=Ee.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ee.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=zo(),Ee.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]=J;return t.index++,s}function ua(e,t){return typeof t=="function"?t(e):t}function Ho(e){var t=Tt();return fu(t,Je,e)}function fu(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 T=b=null,k=null,z=t,$=!1;do{var X=z.lane&-536870913;if(X!==z.lane?(De&X)===X:(ca&X)===X){var V=z.revertLane;if(V===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),X===ti&&($=!0);else if((ca&V)===V){z=z.next,V===ti&&($=!0);continue}else X={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(T=k=X,b=f):k=k.next=X,Ee.lanes|=V,Ha|=V;X=z.action,_s&&s(f,X),f=z.hasEagerState?z.eagerState:s(f,X)}else V={lane:X,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},k===null?(T=k=V,b=f):k=k.next=V,Ee.lanes|=X,Ha|=X;z=z.next}while(z!==null&&z!==t);if(k===null?b=f:k.next=T,!on(f,e.memoizedState)&&(jt=!0,$&&(s=ni,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=k,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hu(e){var t=Tt(),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);on(f,t.memoizedState)||(jt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Gp(e,t,s){var l=Ee,c=Tt(),f=Le;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!on((Je||c).memoizedState,s);if(b&&(c.memoizedState=s,jt=!0),c=c.queue,gu($p.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||Nt!==null&&Nt.memoizedState.tag&1){if(l.flags|=2048,ri(9,{destroy:void 0},Fp.bind(null,l,c,s,t),null),nt===null)throw Error(o(349));f||(ca&127)!==0||Pp(l,t,s)}return s}function Pp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ee.updateQueue,t===null?(t=zo(),Ee.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Fp(e,t,s,l){t.value=s,t.getSnapshot=l,qp(t)&&Yp(e)}function $p(e,t,s){return s(function(){qp(t)&&Yp(e)})}function qp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!on(e,s)}catch{return!0}}function Yp(e){var t=hs(e,2);t!==null&&ln(t,e,2)}function pu(e){var t=Zt();if(typeof e=="function"){var s=e;if(e=s(),_s){ht(!0);try{s()}finally{ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e},t}function Kp(e,t,s,l){return e.baseState=s,fu(e,Je,typeof l=="function"?l:ua)}function tx(e,t,s,l,c){if(Fo(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)}};j.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Zp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Zp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=j.T,b={};j.T=b;try{var T=s(c,l),k=j.S;k!==null&&k(b,T),Xp(e,t,T)}catch(z){mu(e,t,z)}finally{f!==null&&b.types!==null&&(f.types=b.types),j.T=f}}else try{f=s(c,l),Xp(e,t,f)}catch(z){mu(e,t,z)}}function Xp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Qp(e,t,l)},function(l){return mu(e,t,l)}):Qp(e,t,s)}function Qp(e,t,s){t.status="fulfilled",t.value=s,Wp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Zp(e,s)))}function mu(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,Wp(t),t=t.next;while(t!==l)}e.action=null}function Wp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jp(e,t){return t}function em(e,t){if(Le){var s=nt.formState;if(s!==null){e:{var l=Ee;if(Le){if(it){t:{for(var c=it,f=En;c.nodeType!==8;){if(!f){c=null;break t}if(c=An(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){it=An(c.nextSibling),l=c.data==="F!";break e}}Ma(l)}l=!1}l&&(t=s[0])}}return s=Zt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jp,lastRenderedState:t},s.queue=l,s=bm.bind(null,Ee,l),l.dispatch=s,l=pu(!1),f=xu.bind(null,Ee,!1,l.queue),l=Zt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=tx.bind(null,Ee,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function tm(e){var t=Tt();return nm(t,Je,e)}function nm(e,t,s){if(t=fu(e,t,Jp)[0],e=Ho(ua)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=dl(t)}catch(b){throw b===ai?Do:b}else l=t;t=Tt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ee.flags|=2048,ri(9,{destroy:void 0},nx.bind(null,c,s),null)),[l,f,e]}function nx(e,t){e.action=t}function am(e){var t=Tt(),s=Je;if(s!==null)return nm(t,s,e);Tt(),t=t.memoizedState,s=Tt();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=Ee.updateQueue,t===null&&(t=zo(),Ee.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 sm(){return Tt().memoizedState}function Go(e,t,s,l){var c=Zt();Ee.flags|=e,c.memoizedState=ri(1|t,{destroy:void 0},s,l===void 0?null:l)}function Po(e,t,s,l){var c=Tt();l=l===void 0?null:l;var f=c.memoizedState.inst;Je!==null&&l!==null&&lu(l,Je.memoizedState.deps)?c.memoizedState=ri(t,f,s,l):(Ee.flags|=e,c.memoizedState=ri(1|t,f,s,l))}function im(e,t){Go(8390656,8,e,t)}function gu(e,t){Po(2048,8,e,t)}function ax(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=zo(),Ee.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function lm(e){var t=Tt().memoizedState;return ax({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function om(e,t){return Po(4,2,e,t)}function rm(e,t){return Po(4,4,e,t)}function cm(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 um(e,t,s){s=s!=null?s.concat([e]):null,Po(4,4,cm.bind(null,t,e),s)}function vu(){}function dm(e,t){var s=Tt();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&lu(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function fm(e,t){var s=Tt();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&lu(t,l[1]))return l[0];if(l=e(),_s){ht(!0);try{e()}finally{ht(!1)}}return s.memoizedState=[l,t],l}function yu(e,t,s){return s===void 0||(ca&1073741824)!==0&&(De&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=hg(),Ee.lanes|=e,Ha|=e,s)}function hm(e,t,s,l){return on(s,t)?s:ii.current!==null?(e=yu(e,s,l),on(e,t)||(jt=!0),e):(ca&42)===0||(ca&1073741824)!==0&&(De&261930)===0?(jt=!0,e.memoizedState=s):(e=hg(),Ee.lanes|=e,Ha|=e,t)}function pm(e,t,s,l,c){var f=Q.p;Q.p=f!==0&&8>f?f:8;var b=j.T,T={};j.T=T,xu(e,!1,t,s);try{var k=c(),z=j.S;if(z!==null&&z(T,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var $=WS(k,l);fl(e,t,$,hn(e))}else fl(e,t,l,hn(e))}catch(X){fl(e,t,{then:function(){},status:"rejected",reason:X},hn())}finally{Q.p=f,b!==null&&T.types!==null&&(b.types=T.types),j.T=b}}function sx(){}function bu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=mm(e).queue;pm(e,c,t,q,s===null?sx:function(){return gm(e),s(l)})}function mm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:q},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gm(e){var t=mm(e);t.next===null&&(t=e.alternate.memoizedState),fl(e,t.next.queue,{},hn())}function Su(){return Gt(Nl)}function vm(){return Tt().memoizedState}function ym(){return Tt().memoizedState}function ix(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=hn();e=Ba(s);var l=La(t,e,s);l!==null&&(ln(l,t,s),ol(l,t,s)),t={cache:Zc()},e.payload=t;return}t=t.return}}function lx(e,t,s){var l=hn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Fo(e)?Sm(t,s):(s=Uc(e,t,s,l),s!==null&&(ln(s,e,l),xm(s,t,l)))}function bm(e,t,s){var l=hn();fl(e,t,s,l)}function fl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Fo(e))Sm(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,T=f(b,s);if(c.hasEagerState=!0,c.eagerState=T,on(T,b))return Eo(e,t,c,0),nt===null&&To(),!1}catch{}finally{}if(s=Uc(e,t,c,l),s!==null)return ln(s,e,l),xm(s,t,l),!0}return!1}function xu(e,t,s,l){if(l={lane:2,revertLane:Ju(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Fo(e)){if(t)throw Error(o(479))}else t=Uc(e,s,l,2),t!==null&&ln(t,e,2)}function Fo(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Sm(e,t){li=Io=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function xm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Ah(e,s)}}var hl={readContext:Gt,use:Vo,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useLayoutEffect:vt,useInsertionEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useSyncExternalStore:vt,useId:vt,useHostTransitionStatus:vt,useFormState:vt,useActionState:vt,useOptimistic:vt,useMemoCache:vt,useCacheRefresh:vt};hl.useEffectEvent=vt;var _m={readContext:Gt,use:Vo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:im,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Go(4194308,4,cm.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Go(4194308,4,e,t)},useInsertionEffect:function(e,t){Go(4,2,e,t)},useMemo:function(e,t){var s=Zt();t=t===void 0?null:t;var l=e();if(_s){ht(!0);try{e()}finally{ht(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Zt();if(s!==void 0){var c=s(t);if(_s){ht(!0);try{s(t)}finally{ht(!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=lx.bind(null,Ee,e),[l.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=pu(e);var t=e.queue,s=bm.bind(null,Ee,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:vu,useDeferredValue:function(e,t){var s=Zt();return yu(s,e,t)},useTransition:function(){var e=pu(!1);return e=pm.bind(null,Ee,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ee,c=Zt();if(Le){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),nt===null)throw Error(o(349));(De&127)!==0||Pp(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,im($p.bind(null,l,f,e),[e]),l.flags|=2048,ri(9,{destroy:void 0},Fp.bind(null,l,f,s,t),null),s},useId:function(){var e=Zt(),t=nt.identifierPrefix;if(Le){var s=Fn,l=Pn;s=(l&~(1<<32-Te(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Uo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=JS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Su,useFormState:em,useActionState:em,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=xu.bind(null,Ee,!0,s),s.dispatch=t,[e,t]},useMemoCache:du,useCacheRefresh:function(){return Zt().memoizedState=ix.bind(null,Ee)},useEffectEvent:function(e){var t=Zt(),s={impl:e};return t.memoizedState=s,function(){if((Fe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},_u={readContext:Gt,use:Vo,useCallback:dm,useContext:Gt,useEffect:gu,useImperativeHandle:um,useInsertionEffect:om,useLayoutEffect:rm,useMemo:fm,useReducer:Ho,useRef:sm,useState:function(){return Ho(ua)},useDebugValue:vu,useDeferredValue:function(e,t){var s=Tt();return hm(s,Je.memoizedState,e,t)},useTransition:function(){var e=Ho(ua)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:Gp,useId:vm,useHostTransitionStatus:Su,useFormState:tm,useActionState:tm,useOptimistic:function(e,t){var s=Tt();return Kp(s,Je,e,t)},useMemoCache:du,useCacheRefresh:ym};_u.useEffectEvent=lm;var Tm={readContext:Gt,use:Vo,useCallback:dm,useContext:Gt,useEffect:gu,useImperativeHandle:um,useInsertionEffect:om,useLayoutEffect:rm,useMemo:fm,useReducer:hu,useRef:sm,useState:function(){return hu(ua)},useDebugValue:vu,useDeferredValue:function(e,t){var s=Tt();return Je===null?yu(s,e,t):hm(s,Je.memoizedState,e,t)},useTransition:function(){var e=hu(ua)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:Gp,useId:vm,useHostTransitionStatus:Su,useFormState:am,useActionState:am,useOptimistic:function(e,t){var s=Tt();return Je!==null?Kp(s,Je,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:du,useCacheRefresh:ym};Tm.useEffectEvent=lm;function Tu(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Eu={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=hn(),c=Ba(l);c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(ln(t,e,l),ol(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=hn(),c=Ba(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(ln(t,e,l),ol(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=hn(),l=Ba(s);l.tag=2,t!=null&&(l.callback=t),t=La(e,l,s),t!==null&&(ln(t,e,s),ol(t,e,s))}};function Em(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?!Ji(s,l)||!Ji(c,f):!0}function Cm(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&&Eu.enqueueReplaceState(t,t.state,null)}function Ts(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=v({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Am(e){_o(e)}function km(e){console.error(e)}function wm(e){_o(e)}function $o(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Nm(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 Cu(e,t,s){return s=Ba(s),s.tag=3,s.payload={element:null},s.callback=function(){$o(e,t)},s}function jm(e){return e=Ba(e),e.tag=3,e}function Dm(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(){Nm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Nm(t,s,l),typeof c!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var T=l.stack;this.componentDidCatch(l.value,{componentStack:T!==null?T:""})})}function ox(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=cn.current,s!==null){switch(s.tag){case 31:case 13:return Cn===null?ar():s.alternate===null&&yt===0&&(yt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===Mo?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Xu(e,l,c)),!1;case 22:return s.flags|=65536,l===Mo?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)),Xu(e,l,c)),!1}throw Error(o(435,s.tag))}return Xu(e,l,c),ar(),!1}if(Le)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Fc&&(e=Error(o(422),{cause:l}),nl(xn(e,s)))):(l!==Fc&&(t=Error(o(423),{cause:l}),nl(xn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=xn(l,s),c=Cu(e.stateNode,l,c),tu(e,c),yt!==4&&(yt=2)),!1;var f=Error(o(520),{cause:l});if(f=xn(f,s),xl===null?xl=[f]:xl.push(f),yt!==4&&(yt=2),t===null)return!0;l=xn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Cu(s.stateNode,l,e),tu(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"&&(Ga===null||!Ga.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=jm(c),Dm(c,e,s,l),tu(s,c),!1}s=s.return}while(s!==null);return!1}var Au=Error(o(461)),jt=!1;function Pt(e,t,s,l){t.child=e===null?Bp(t,null,s,l):xs(t,e.child,s,l)}function Mm(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var T in l)T!=="ref"&&(b[T]=l[T])}else b=l;return vs(t),l=ou(e,t,s,b,f,c),T=ru(),e!==null&&!jt?(cu(e,t,c),da(e,t,c)):(Le&&T&&Gc(t),t.flags|=1,Pt(e,t,l,c),t.child)}function Rm(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!zc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Om(e,t,f,l,c)):(e=Ao(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ou(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Ji,s(b,l)&&e.ref===t.ref)return da(e,t,c)}return t.flags|=1,e=ia(f,l),e.ref=t.ref,e.return=t,t.child=e}function Om(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Ji(f,l)&&e.ref===t.ref)if(jt=!1,t.pendingProps=l=f,Ou(e,c))(e.flags&131072)!==0&&(jt=!0);else return t.lanes=e.lanes,da(e,t,c)}return ku(e,t,s,l,c)}function Bm(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 Lm(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?Up(t,f):au(),zp(t);else return l=t.lanes=536870912,Lm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(jo(t,f.cachePool),Up(t,f),Ua(),t.memoizedState=null):(e!==null&&jo(t,null),au(),Ua());return Pt(e,t,c,s),t.child}function pl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lm(e,t,s,l,c){var f=Qc();return f=f===null?null:{parent:wt._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&jo(t,null),au(),zp(t),e!==null&&ei(e,t,l,!0),t.childLanes=c,null}function qo(e,t){return t=Ko({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Im(e,t,s){return xs(t,e.child,null,s),e=qo(t,t.pendingProps),e.flags|=2,un(t),t.memoizedState=null,e}function rx(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(l.mode==="hidden")return e=qo(t,l),t.lanes=536870912,pl(null,e);if(iu(t),(e=it)?(e=Zg(e,En),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=Sp(e),s.return=t,t.child=s,Ht=t,it=null)):e=null,e===null)throw Ma(t);return t.lanes=536870912,null}return qo(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(iu(t),c)if(t.flags&256)t.flags&=-257,t=Im(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=nt,l!==null&&(b=kh(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,hs(e,b),ln(l,e,b),Au;ar(),t=Im(e,t,s)}else e=f.treeContext,it=An(b.nextSibling),Ht=t,Le=!0,Da=null,En=!1,e!==null&&Tp(t,e),t=qo(t,l),t.flags|=4096;return t}return e=ia(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Yo(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 ku(e,t,s,l,c){return vs(t),s=ou(e,t,s,l,void 0,c),l=ru(),e!==null&&!jt?(cu(e,t,c),da(e,t,c)):(Le&&l&&Gc(t),t.flags|=1,Pt(e,t,s,c),t.child)}function Um(e,t,s,l,c,f){return vs(t),t.updateQueue=null,s=Hp(t,l,s,c),Vp(e),l=ru(),e!==null&&!jt?(cu(e,t,f),da(e,t,f)):(Le&&l&&Gc(t),t.flags|=1,Pt(e,t,s,f),t.child)}function zm(e,t,s,l,c){if(vs(t),t.stateNode===null){var f=Xs,b=s.contextType;typeof b=="object"&&b!==null&&(f=Gt(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Eu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Jc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?Gt(b):Xs,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Tu(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&&Eu.enqueueReplaceState(f,f.state,null),cl(t,l,f,c),rl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var T=t.memoizedProps,k=Ts(s,T);f.props=k;var z=f.context,$=s.contextType;b=Xs,typeof $=="object"&&$!==null&&(b=Gt($));var X=s.getDerivedStateFromProps;$=typeof X=="function"||typeof f.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(T||z!==b)&&Cm(t,f,l,b),Oa=!1;var V=t.memoizedState;f.state=V,cl(t,l,f,c),rl(),z=t.memoizedState,T||V!==z||Oa?(typeof X=="function"&&(Tu(t,s,X,l),z=t.memoizedState),(k=Oa||Em(t,s,k,l,V,z,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=z),f.props=l,f.state=z,f.context=b,l=k):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,eu(e,t),b=t.memoizedProps,$=Ts(s,b),f.props=$,X=t.pendingProps,V=f.context,z=s.contextType,k=Xs,typeof z=="object"&&z!==null&&(k=Gt(z)),T=s.getDerivedStateFromProps,(z=typeof T=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==X||V!==k)&&Cm(t,f,l,k),Oa=!1,V=t.memoizedState,f.state=V,cl(t,l,f,c),rl();var G=t.memoizedState;b!==X||V!==G||Oa||e!==null&&e.dependencies!==null&&wo(e.dependencies)?(typeof T=="function"&&(Tu(t,s,T,l),G=t.memoizedState),($=Oa||Em(t,s,$,l,V,G,k)||e!==null&&e.dependencies!==null&&wo(e.dependencies))?(z||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,G,k),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,G,k)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=G),f.props=l,f.state=G,f.context=k,l=$):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&V===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,Yo(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=xs(t,e.child,null,c),t.child=xs(t,null,s,c)):Pt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=da(e,t,c),e}function Vm(e,t,s,l){return ms(),t.flags|=256,Pt(e,t,s,l),t.child}var wu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nu(e){return{baseLanes:e,cachePool:Np()}}function ju(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=fn),e}function Hm(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:(_t.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?Ia(t):Ua(),(e=it)?(e=Zg(e,En),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Pn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=Sp(e),s.return=t,t.child=s,Ht=t,it=null)):e=null,e===null)throw Ma(t);return fd(e)?t.lanes=32:t.lanes=536870912,null}var T=l.children;return l=l.fallback,c?(Ua(),c=t.mode,T=Ko({mode:"hidden",children:T},c),l=ps(l,c,s,null),T.return=t,l.return=t,T.sibling=l,t.child=T,l=t.child,l.memoizedState=Nu(s),l.childLanes=ju(e,b,s),t.memoizedState=wu,pl(null,l)):(Ia(t),Du(t,T))}var k=e.memoizedState;if(k!==null&&(T=k.dehydrated,T!==null)){if(f)t.flags&256?(Ia(t),t.flags&=-257,t=Mu(e,t,s)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),T=l.fallback,c=t.mode,l=Ko({mode:"visible",children:l.children},c),T=ps(T,c,s,null),T.flags|=2,l.return=t,T.return=t,l.sibling=T,t.child=l,xs(t,e.child,null,s),l=t.child,l.memoizedState=Nu(s),l.childLanes=ju(e,b,s),t.memoizedState=wu,t=pl(null,l));else if(Ia(t),fd(T)){if(b=T.nextSibling&&T.nextSibling.dataset,b)var z=b.dgst;b=z,l=Error(o(419)),l.stack="",l.digest=b,nl({value:l,source:null,stack:null}),t=Mu(e,t,s)}else if(jt||ei(e,t,s,!1),b=(s&e.childLanes)!==0,jt||b){if(b=nt,b!==null&&(l=kh(b,s),l!==0&&l!==k.retryLane))throw k.retryLane=l,hs(e,l),ln(b,e,l),Au;dd(T)||ar(),t=Mu(e,t,s)}else dd(T)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,it=An(T.nextSibling),Ht=t,Le=!0,Da=null,En=!1,e!==null&&Tp(t,e),t=Du(t,l.children),t.flags|=4096);return t}return c?(Ua(),T=l.fallback,c=t.mode,k=e.child,z=k.sibling,l=ia(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,z!==null?T=ia(z,T):(T=ps(T,c,s,null),T.flags|=2),T.return=t,l.return=t,l.sibling=T,t.child=l,pl(null,l),l=t.child,T=e.child.memoizedState,T===null?T=Nu(s):(c=T.cachePool,c!==null?(k=wt._currentValue,c=c.parent!==k?{parent:k,pool:k}:c):c=Np(),T={baseLanes:T.baseLanes|s,cachePool:c}),l.memoizedState=T,l.childLanes=ju(e,b,s),t.memoizedState=wu,pl(e.child,l)):(Ia(t),s=e.child,e=s.sibling,s=ia(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 Du(e,t){return t=Ko({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ko(e,t){return e=rn(22,e,null,t),e.lanes=0,e}function Mu(e,t,s){return xs(t,e.child,null,s),e=Du(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Yc(e.return,t,s)}function Ru(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 Pm(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=_t.current,T=(b&2)!==0;if(T?(b=b&1|2,t.flags|=128):b&=1,ge(_t,b),Pt(e,t,l,s),l=Le?tl:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gm(e,s,t);else if(e.tag===19)Gm(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&&Lo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),Ru(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&&Lo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}Ru(t,!0,s,null,f,l);break;case"together":Ru(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function da(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Ha|=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=ia(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=ia(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Ou(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wo(e)))}function cx(e,t,s){switch(t.tag){case 3:fe(t,t.stateNode.containerInfo),Ra(t,wt,e.memoizedState.cache),ms();break;case 27:case 5:Qe(t);break;case 4:fe(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,iu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ia(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Hm(e,t,s):(Ia(t),e=da(e,t,s),e!==null?e.sibling:null);Ia(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 Pm(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ge(_t,_t.current),l)break;return null;case 22:return t.lanes=0,Bm(e,t,s,t.pendingProps);case 24:Ra(t,wt,e.memoizedState.cache)}return da(e,t,s)}function Fm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)jt=!0;else{if(!Ou(e,s)&&(t.flags&128)===0)return jt=!1,cx(e,t,s);jt=(e.flags&131072)!==0}else jt=!1,Le&&(t.flags&1048576)!==0&&_p(t,tl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=bs(t.elementType),t.type=e,typeof e=="function")zc(e)?(l=Ts(e,l),t.tag=1,t=zm(null,t,e,l,s)):(t.tag=0,t=ku(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===H){t.tag=11,t=Mm(null,t,e,l,s);break e}else if(c===R){t.tag=14,t=Rm(null,t,e,l,s);break e}}throw t=pe(e)||e,Error(o(306,t,""))}}return t;case 0:return ku(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=Ts(l,t.pendingProps),zm(e,t,l,c,s);case 3:e:{if(fe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,eu(e,t),cl(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Ra(t,wt,l),l!==f.cache&&Kc(t,[wt],s,!0),rl(),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=Vm(e,t,l,s);break e}else if(l!==c){c=xn(Error(o(424)),t),nl(c),t=Vm(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(it=An(e.firstChild),Ht=t,Le=!0,Da=null,En=!0,s=Bp(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ms(),l===c){t=da(e,t,s);break e}Pt(e,t,l,s)}t=t.child}return t;case 26:return Yo(e,t),e===null?(s=tv(t.type,null,t.pendingProps,null))?t.memoizedState=s:Le||(s=t.type,e=t.pendingProps,l=ur(Rt.current).createElement(s),l[Vt]=t,l[Jt]=e,Ft(l,s,e),Ut(l),t.stateNode=l):t.memoizedState=tv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Qe(t),e===null&&Le&&(l=t.stateNode=Wg(t.type,t.pendingProps,Rt.current),Ht=t,En=!0,c=it,qa(t.type)?(hd=c,it=An(l.firstChild)):it=c),Pt(e,t,t.pendingProps.children,s),Yo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=l=it)&&(l=zx(l,t.type,t.pendingProps,En),l!==null?(t.stateNode=l,Ht=t,it=An(l.firstChild),En=!1,c=!0):c=!1),c||Ma(t)),Qe(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,rd(c,f)?l=null:b!==null&&rd(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=ou(e,t,ex,null,null,s),Nl._currentValue=c),Yo(e,t),Pt(e,t,l,s),t.child;case 6:return e===null&&Le&&((e=s=it)&&(s=Vx(s,t.pendingProps,En),s!==null?(t.stateNode=s,Ht=t,it=null,e=!0):e=!1),e||Ma(t)),null;case 13:return Hm(e,t,s);case 4:return fe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=xs(t,null,l,s):Pt(e,t,l,s),t.child;case 11:return Mm(e,t,t.type,t.pendingProps,s);case 7:return Pt(e,t,t.pendingProps,s),t.child;case 8:return Pt(e,t,t.pendingProps.children,s),t.child;case 12:return Pt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ra(t,t.type,l.value),Pt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,vs(t),c=Gt(c),l=l(c),t.flags|=1,Pt(e,t,l,s),t.child;case 14:return Rm(e,t,t.type,t.pendingProps,s);case 15:return Om(e,t,t.type,t.pendingProps,s);case 19:return Pm(e,t,s);case 31:return rx(e,t,s);case 22:return Bm(e,t,s,t.pendingProps);case 24:return vs(t),l=Gt(wt),e===null?(c=Qc(),c===null&&(c=nt,f=Zc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Jc(t),Ra(t,wt,c)):((e.lanes&s)!==0&&(eu(e,t),cl(t,null,null,s),rl()),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),Ra(t,wt,l)):(l=f.cache,Ra(t,wt,l),l!==c.cache&&Kc(t,[wt],s,!0))),Pt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function fa(e){e.flags|=4}function Bu(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(vg())e.flags|=8192;else throw Ss=Mo,Wc}else e.flags&=-16777217}function $m(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lv(t))if(vg())e.flags|=8192;else throw Ss=Mo,Wc}function Zo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Eh():536870912,e.lanes|=t,fi|=t)}function ml(e,t){if(!Le)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 lt(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 ux(e,t,s){var l=t.pendingProps;switch(Pc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ra(wt),de(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Js(t)?fa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$c())),lt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(fa(t),f!==null?(lt(t),$m(t,f)):(lt(t),Bu(t,c,null,l,s))):f?f!==e.memoizedState?(fa(t),lt(t),$m(t,f)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&fa(t),lt(t),Bu(t,c,e,l,s)),null;case 27:if(We(t),s=Rt.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&fa(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return lt(t),null}e=Re.current,Js(t)?Ep(t):(e=Wg(c,l,s),t.stateNode=e,fa(t))}return lt(t),null;case 5:if(We(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&fa(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return lt(t),null}if(f=Re.current,Js(t))Ep(t);else{var b=ur(Rt.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[Vt]=t,f[Jt]=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(Ft(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&&fa(t)}}return lt(t),Bu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&fa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=Rt.current,Js(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Ht,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Vt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Hg(e.nodeValue,s)),e||Ma(t,!0)}else e=ur(e).createTextNode(l),e[Vt]=t,t.stateNode=e}return lt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=Js(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[Vt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else s=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(un(t),t):(un(t),null);if((t.flags&128)!==0)throw Error(o(558))}return lt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Js(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[Vt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),c=!1}else c=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(un(t),t):(un(t),null)}return un(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),Zo(t,t.updateQueue),lt(t),null);case 4:return de(),e===null&&ad(t.stateNode.containerInfo),lt(t),null;case 10:return ra(t.type),lt(t),null;case 19:if(we(_t),l=t.memoizedState,l===null)return lt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)ml(l,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Lo(e),f!==null){for(t.flags|=128,ml(l,!1),e=f.updateQueue,t.updateQueue=e,Zo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)bp(s,e),s=s.sibling;return ge(_t,_t.current&1|2),Le&&la(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&W()>er&&(t.flags|=128,c=!0,ml(l,!1),t.lanes=4194304)}else{if(!c)if(e=Lo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Zo(t,e),ml(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Le)return lt(t),null}else 2*W()-l.renderingStartTime>er&&s!==536870912&&(t.flags|=128,c=!0,ml(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=W(),e.sibling=null,s=_t.current,ge(_t,c?s&1|2:s&1),Le&&la(t,l.treeForkCount),e):(lt(t),null);case 22:case 23:return un(t),su(),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&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),s=t.updateQueue,s!==null&&Zo(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&&we(ys),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),ra(wt),lt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function dx(e,t){switch(Pc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ra(wt),de(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return We(t),null;case 31:if(t.memoizedState!==null){if(un(t),t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(_t),null;case 4:return de(),null;case 10:return ra(t.type),null;case 22:case 23:return un(t),su(),e!==null&&we(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ra(wt),null;case 25:return null;default:return null}}function qm(e,t){switch(Pc(t),t.tag){case 3:ra(wt),de();break;case 26:case 27:case 5:We(t);break;case 4:de();break;case 31:t.memoizedState!==null&&un(t);break;case 13:un(t);break;case 19:we(_t);break;case 10:ra(t.type);break;case 22:case 23:un(t),su(),e!==null&&we(ys);break;case 24:ra(wt)}}function gl(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(T){Ze(t,t.return,T)}}function za(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,T=b.destroy;if(T!==void 0){b.destroy=void 0,c=t;var k=s,z=T;try{z()}catch($){Ze(c,k,$)}}}l=l.next}while(l!==f)}}catch($){Ze(t,t.return,$)}}function Ym(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Ip(t,s)}catch(l){Ze(e,e.return,l)}}}function Km(e,t,s){s.props=Ts(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Ze(e,t,l)}}function vl(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 $n(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 Zm(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 Lu(e,t,s){try{var l=e.stateNode;Rx(l,e.type,s,t),l[Jt]=t}catch(c){Ze(e,e.return,c)}}function Xm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function Iu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xm(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&&qa(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 Uu(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=aa));else if(l!==4&&(l===27&&qa(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,s),e=e.sibling;e!==null;)Uu(e,t,s),e=e.sibling}function Xo(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&&qa(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Xo(e,t,s),e=e.sibling;e!==null;)Xo(e,t,s),e=e.sibling}function Qm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ft(t,l,s),t[Vt]=e,t[Jt]=s}catch(f){Ze(e,e.return,f)}}var ha=!1,Dt=!1,zu=!1,Wm=typeof WeakSet=="function"?WeakSet:Set,zt=null;function fx(e,t){if(e=e.containerInfo,ld=vr,e=up(e),Mc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var 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,T=-1,k=-1,z=0,$=0,X=e,V=null;t:for(;;){for(var G;X!==s||c!==0&&X.nodeType!==3||(T=b+c),X!==f||l!==0&&X.nodeType!==3||(k=b+l),X.nodeType===3&&(b+=X.nodeValue.length),(G=X.firstChild)!==null;)V=X,X=G;for(;;){if(X===e)break t;if(V===s&&++z===c&&(T=b),V===f&&++$===l&&(k=b),(G=X.nextSibling)!==null)break;X=V,V=X.parentNode}X=G}s=T===-1||k===-1?null:{start:T,end:k}}else s=null}s=s||{start:0,end:0}}else s=null;for(od={focusedElem:e,selectionRange:s},vr=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,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 le=Ts(s.type,c);e=l.getSnapshotBeforeUpdate(le,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(ve){Ze(s,s.return,ve)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)ud(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ud(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,zt=e;break}zt=t.return}}function Jm(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:ma(e,s),l&4&&gl(5,s);break;case 1:if(ma(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var c=Ts(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}l&64&&Ym(s),l&512&&vl(s,s.return);break;case 3:if(ma(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{Ip(e,t)}catch(b){Ze(s,s.return,b)}}break;case 27:t===null&&l&4&&Qm(s);case 26:case 5:ma(e,s),t===null&&l&4&&Zm(s),l&512&&vl(s,s.return);break;case 12:ma(e,s);break;case 31:ma(e,s),l&4&&ng(e,s);break;case 13:ma(e,s),l&4&&ag(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=xx.bind(null,s),Hx(e,s))));break;case 22:if(l=s.memoizedState!==null||ha,!l){t=t!==null&&t.memoizedState!==null||Dt,c=ha;var f=Dt;ha=l,(Dt=t)&&!f?ga(e,s,(s.subtreeFlags&8772)!==0):ma(e,s),ha=c,Dt=f}break;case 30:break;default:ma(e,s)}}function eg(e){var t=e.alternate;t!==null&&(e.alternate=null,eg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&mc(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 ft=null,tn=!1;function pa(e,t,s){for(s=s.child;s!==null;)tg(e,t,s),s=s.sibling}function tg(e,t,s){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(ut,s)}catch{}switch(s.tag){case 26:Dt||$n(s,t),pa(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Dt||$n(s,t);var l=ft,c=tn;qa(s.type)&&(ft=s.stateNode,tn=!1),pa(e,t,s),Al(s.stateNode),ft=l,tn=c;break;case 5:Dt||$n(s,t);case 6:if(l=ft,c=tn,ft=null,pa(e,t,s),ft=l,tn=c,ft!==null)if(tn)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(s.stateNode)}catch(f){Ze(s,t,f)}else try{ft.removeChild(s.stateNode)}catch(f){Ze(s,t,f)}break;case 18:ft!==null&&(tn?(e=ft,Yg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Si(e)):Yg(ft,s.stateNode));break;case 4:l=ft,c=tn,ft=s.stateNode.containerInfo,tn=!0,pa(e,t,s),ft=l,tn=c;break;case 0:case 11:case 14:case 15:za(2,s,t),Dt||za(4,s,t),pa(e,t,s);break;case 1:Dt||($n(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Km(s,t,l)),pa(e,t,s);break;case 21:pa(e,t,s);break;case 22:Dt=(l=Dt)||s.memoizedState!==null,pa(e,t,s),Dt=l;break;default:pa(e,t,s)}}function ng(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 ag(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 hx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wm),t;default:throw Error(o(435,e.tag))}}function Qo(e,t){var s=hx(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=_x.bind(null,e,l);l.then(c,c)}})}function nn(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,T=b;e:for(;T!==null;){switch(T.tag){case 27:if(qa(T.type)){ft=T.stateNode,tn=!1;break e}break;case 5:ft=T.stateNode,tn=!1;break e;case 3:case 4:ft=T.stateNode.containerInfo,tn=!0;break e}T=T.return}if(ft===null)throw Error(o(160));tg(f,b,c),ft=null,tn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sg(t,e),t=t.sibling}var Un=null;function sg(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),an(e),l&4&&(za(3,e,e.return),gl(3,e),za(5,e,e.return));break;case 1:nn(t,e),an(e),l&512&&(Dt||s===null||$n(s,s.return)),l&64&&ha&&(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=Un;if(nn(t,e),an(e),l&512&&(Dt||s===null||$n(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[Fi]||f[Vt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Ft(f,l,s),f[Vt]=e,Ut(f),l=f;break e;case"link":var b=sv("link","href",c).get(l+(s.href||""));if(b){for(var T=0;T<b.length;T++)if(f=b[T],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(T,1);break t}}f=c.createElement(l),Ft(f,l,s),c.head.appendChild(f);break;case"meta":if(b=sv("meta","content",c).get(l+(s.content||""))){for(T=0;T<b.length;T++)if(f=b[T],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(T,1);break t}}f=c.createElement(l),Ft(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[Vt]=e,Ut(f),l=f}e.stateNode=l}else iv(c,e.type,e.stateNode);else e.stateNode=av(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?iv(c,e.type,e.stateNode):av(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,s.memoizedProps)}break;case 27:nn(t,e),an(e),l&512&&(Dt||s===null||$n(s,s.return)),s!==null&&l&4&&Lu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(nn(t,e),an(e),l&512&&(Dt||s===null||$n(s,s.return)),e.flags&32){c=e.stateNode;try{Ps(c,"")}catch(le){Ze(e,e.return,le)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Lu(e,c,s!==null?s.memoizedProps:c)),l&1024&&(zu=!0);break;case 6:if(nn(t,e),an(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(le){Ze(e,e.return,le)}}break;case 3:if(hr=null,c=Un,Un=dr(t.containerInfo),nn(t,e),Un=c,an(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(le){Ze(e,e.return,le)}zu&&(zu=!1,ig(e));break;case 4:l=Un,Un=dr(e.stateNode.containerInfo),nn(t,e),an(e),Un=l;break;case 12:nn(t,e),an(e);break;case 31:nn(t,e),an(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 13:nn(t,e),an(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Jo=W()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 22:c=e.memoizedState!==null;var k=s!==null&&s.memoizedState!==null,z=ha,$=Dt;if(ha=z||c,Dt=$||k,nn(t,e),Dt=$,ha=z,an(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||k||ha||Dt||Es(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){k=s=t;try{if(f=k.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{T=k.stateNode;var X=k.memoizedProps.style,V=X!=null&&X.hasOwnProperty("display")?X.display:null;T.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(le){Ze(k,k.return,le)}}}else if(t.tag===6){if(s===null){k=t;try{k.stateNode.nodeValue=c?"":k.memoizedProps}catch(le){Ze(k,k.return,le)}}}else if(t.tag===18){if(s===null){k=t;try{var G=k.stateNode;c?Kg(G,!0):Kg(k.stateNode,!1)}catch(le){Ze(k,k.return,le)}}}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,Qo(e,s))));break;case 19:nn(t,e),an(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Qo(e,l)));break;case 30:break;case 21:break;default:nn(t,e),an(e)}}function an(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Xm(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Iu(e);Xo(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Ps(b,""),s.flags&=-33);var T=Iu(e);Xo(e,T,b);break;case 3:case 4:var k=s.stateNode.containerInfo,z=Iu(e);Uu(e,z,k);break;default:throw Error(o(161))}}catch($){Ze(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ig(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ig(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ma(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jm(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Es(t);break;case 1:$n(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Km(t,t.return,s),Es(t);break;case 27:Al(t.stateNode);case 26:case 5:$n(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function ga(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:ga(c,f,s),gl(4,f);break;case 1:if(ga(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(z){Ze(l,l.return,z)}if(l=f,c=l.updateQueue,c!==null){var T=l.stateNode;try{var k=c.shared.hiddenCallbacks;if(k!==null)for(c.shared.hiddenCallbacks=null,c=0;c<k.length;c++)Lp(k[c],T)}catch(z){Ze(l,l.return,z)}}s&&b&64&&Ym(f),vl(f,f.return);break;case 27:Qm(f);case 26:case 5:ga(c,f,s),s&&l===null&&b&4&&Zm(f),vl(f,f.return);break;case 12:ga(c,f,s);break;case 31:ga(c,f,s),s&&b&4&&ng(c,f);break;case 13:ga(c,f,s),s&&b&4&&ag(c,f);break;case 22:f.memoizedState===null&&ga(c,f,s),vl(f,f.return);break;case 30:break;default:ga(c,f,s)}t=t.sibling}}function Vu(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&&al(s))}function Hu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e))}function zn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lg(e,t,s,l),t=t.sibling}function lg(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:zn(e,t,s,l),c&2048&&gl(9,t);break;case 1:zn(e,t,s,l);break;case 3:zn(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&&al(e)));break;case 12:if(c&2048){zn(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,T=f.onPostCommit;typeof T=="function"&&T(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){Ze(t,t.return,k)}}else zn(e,t,s,l);break;case 31:zn(e,t,s,l);break;case 13:zn(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?zn(e,t,s,l):yl(e,t):f._visibility&2?zn(e,t,s,l):(f._visibility|=2,ci(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Vu(b,t);break;case 24:zn(e,t,s,l),c&2048&&Hu(t.alternate,t);break;default:zn(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,T=s,k=l,z=b.flags;switch(b.tag){case 0:case 11:case 15:ci(f,b,T,k,c),gl(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?ci(f,b,T,k,c):yl(f,b):($._visibility|=2,ci(f,b,T,k,c)),c&&z&2048&&Vu(b.alternate,b);break;case 24:ci(f,b,T,k,c),c&&z&2048&&Hu(b.alternate,b);break;default:ci(f,b,T,k,c)}t=t.sibling}}function yl(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:yl(s,l),c&2048&&Vu(l.alternate,l);break;case 24:yl(s,l),c&2048&&Hu(l.alternate,l);break;default:yl(s,l)}t=t.sibling}}var bl=8192;function ui(e,t,s){if(e.subtreeFlags&bl)for(e=e.child;e!==null;)og(e,t,s),e=e.sibling}function og(e,t,s){switch(e.tag){case 26:ui(e,t,s),e.flags&bl&&e.memoizedState!==null&&Jx(s,Un,e.memoizedState,e.memoizedProps);break;case 5:ui(e,t,s);break;case 3:case 4:var l=Un;Un=dr(e.stateNode.containerInfo),ui(e,t,s),Un=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=bl,bl=16777216,ui(e,t,s),bl=l):ui(e,t,s));break;default:ui(e,t,s)}}function rg(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 Sl(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];zt=l,ug(l,e)}rg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cg(e),e=e.sibling}function cg(e){switch(e.tag){case 0:case 11:case 15:Sl(e),e.flags&2048&&za(9,e,e.return);break;case 3:Sl(e);break;case 12:Sl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wo(e)):Sl(e);break;default:Sl(e)}}function Wo(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];zt=l,ug(l,e)}rg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),Wo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Wo(t));break;default:Wo(t)}e=e.sibling}}function ug(e,t){for(;zt!==null;){var s=zt;switch(s.tag){case 0:case 11:case 15:za(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:al(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,zt=l;else e:for(s=e;zt!==null;){l=zt;var c=l.sibling,f=l.return;if(eg(l),l===s){zt=null;break e}if(c!==null){c.return=f,zt=c;break e}zt=f}}}var px={getCacheForType:function(e){var t=Gt(wt),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Gt(wt).controller.signal}},mx=typeof WeakMap=="function"?WeakMap:Map,Fe=0,nt=null,Ne=null,De=0,Ke=0,dn=null,Va=!1,di=!1,Gu=!1,va=0,yt=0,Ha=0,Cs=0,Pu=0,fn=0,fi=0,xl=null,sn=null,Fu=!1,Jo=0,dg=0,er=1/0,tr=null,Ga=null,Ot=0,Pa=null,hi=null,ya=0,$u=0,qu=null,fg=null,_l=0,Yu=null;function hn(){return(Fe&2)!==0&&De!==0?De&-De:j.T!==null?Ju():wh()}function hg(){if(fn===0)if((De&536870912)===0||Le){var e=Ln;Ln<<=1,(Ln&3932160)===0&&(Ln=262144),fn=e}else fn=536870912;return e=cn.current,e!==null&&(e.flags|=32),fn}function ln(e,t,s){(e===nt&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(pi(e,0),Fa(e,De,fn,!1)),Pi(e,s),((Fe&2)===0||e!==nt)&&(e===nt&&((Fe&2)===0&&(Cs|=s),yt===4&&Fa(e,De,fn,!1)),qn(e))}function pg(e,t,s){if((Fe&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||Gi(e,t),c=l?yx(e,t):Zu(e,t,!0),f=l;do{if(c===0){di&&!l&&Fa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!gx(s)){c=Zu(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 T=e;c=xl;var k=T.current.memoizedState.isDehydrated;if(k&&(pi(T,b).flags|=256),b=Zu(T,b,!1),b!==2){if(Gu&&!k){T.errorRecoveryDisabledLanes|=f,Cs|=f,c=4;break e}f=sn,sn=c,f!==null&&(sn===null?sn=f:sn.push.apply(sn,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){pi(e,0),Fa(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:Fa(l,t,fn,!Va);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Jo+300-W(),10<c)){if(Fa(l,t,fn,!Va),uo(l,0,!0)!==0)break e;ya=t,l.timeoutHandle=$g(mg.bind(null,l,s,sn,tr,Fu,t,fn,Cs,fi,Va,f,"Throttled",-0,0),c);break e}mg(l,s,sn,tr,Fu,t,fn,Cs,fi,Va,f,null,-0,0)}}break}while(!0);qn(e)}function mg(e,t,s,l,c,f,b,T,k,z,$,X,V,G){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:aa},og(t,f,X);var le=(f&62914560)===f?Jo-W():(f&4194048)===f?dg-W():0;if(le=e_(X,le),le!==null){ya=f,e.cancelPendingCommit=le(Tg.bind(null,e,t,f,s,l,c,b,T,k,$,X,null,V,G)),Fa(e,f,b,!z);return}}Tg(e,t,f,s,l,c,b,T,k)}function gx(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(!on(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 Fa(e,t,s,l){t&=~Pu,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-Te(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&Ch(e,s,t)}function nr(){return(Fe&6)===0?(Tl(0),!1):!0}function Ku(){if(Ne!==null){if(Ke===0)var e=Ne.return;else e=Ne,oa=gs=null,uu(e),si=null,il=0,e=Ne;for(;e!==null;)qm(e.alternate,e),e=e.return;Ne=null}}function pi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,Lx(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ya=0,Ku(),nt=e,Ne=s=ia(e.current,null),De=t,Ke=0,dn=null,Va=!1,di=Gi(e,t),Gu=!1,fi=fn=Pu=Cs=Ha=yt=0,sn=xl=null,Fu=!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-Te(l),f=1<<c;t|=e[c],l&=~f}return va=t,To(),s}function gg(e,t){Ee=null,j.H=hl,t===ai||t===Do?(t=Mp(),Ke=3):t===Wc?(t=Mp(),Ke=4):Ke=t===Au?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Ne===null&&(yt=1,$o(e,xn(t,e.current)))}function vg(){var e=cn.current;return e===null?!0:(De&4194048)===De?Cn===null:(De&62914560)===De||(De&536870912)!==0?e===Cn:!1}function yg(){var e=j.H;return j.H=hl,e===null?hl:e}function bg(){var e=j.A;return j.A=px,e}function ar(){yt=4,Va||(De&4194048)!==De&&cn.current!==null||(di=!0),(Ha&134217727)===0&&(Cs&134217727)===0||nt===null||Fa(nt,De,fn,!1)}function Zu(e,t,s){var l=Fe;Fe|=2;var c=yg(),f=bg();(nt!==e||De!==t)&&(tr=null,pi(e,t)),t=!1;var b=yt;e:do try{if(Ke!==0&&Ne!==null){var T=Ne,k=dn;switch(Ke){case 8:Ku(),b=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var z=Ke;if(Ke=0,dn=null,mi(e,T,k,z),s&&di){b=0;break e}break;default:z=Ke,Ke=0,dn=null,mi(e,T,k,z)}}vx(),b=yt;break}catch($){gg(e,$)}while(!0);return t&&e.shellSuspendCounter++,oa=gs=null,Fe=l,j.H=c,j.A=f,Ne===null&&(nt=null,De=0,To()),b}function vx(){for(;Ne!==null;)Sg(Ne)}function yx(e,t){var s=Fe;Fe|=2;var l=yg(),c=bg();nt!==e||De!==t?(tr=null,er=W()+500,pi(e,t)):di=Gi(e,t);e:do try{if(Ke!==0&&Ne!==null){t=Ne;var f=dn;t:switch(Ke){case 1:Ke=0,dn=null,mi(e,t,f,1);break;case 2:case 9:if(jp(f)){Ke=0,dn=null,xg(t);break}t=function(){Ke!==2&&Ke!==9||nt!==e||(Ke=7),qn(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,dn=null,xg(t)):(Ke=0,dn=null,mi(e,t,f,7));break;case 5:var b=null;switch(Ne.tag){case 26:b=Ne.memoizedState;case 5:case 27:var T=Ne;if(b?lv(b):T.stateNode.complete){Ke=0,dn=null;var k=T.sibling;if(k!==null)Ne=k;else{var z=T.return;z!==null?(Ne=z,sr(z)):Ne=null}break t}}Ke=0,dn=null,mi(e,t,f,5);break;case 6:Ke=0,dn=null,mi(e,t,f,6);break;case 8:Ku(),yt=6;break e;default:throw Error(o(462))}}bx();break}catch($){gg(e,$)}while(!0);return oa=gs=null,j.H=l,j.A=c,Fe=s,Ne!==null?0:(nt=null,De=0,To(),yt)}function bx(){for(;Ne!==null&&!ta();)Sg(Ne)}function Sg(e){var t=Fm(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?sr(e):Ne=t}function xg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Um(s,t,t.pendingProps,t.type,void 0,De);break;case 11:t=Um(s,t,t.pendingProps,t.type.render,t.ref,De);break;case 5:uu(t);default:qm(s,t),t=Ne=bp(t,va),t=Fm(s,t,va)}e.memoizedProps=e.pendingProps,t===null?sr(e):Ne=t}function mi(e,t,s,l){oa=gs=null,uu(t),si=null,il=0;var c=t.return;try{if(ox(e,c,t,s,De)){yt=1,$o(e,xn(s,e.current)),Ne=null;return}}catch(f){if(c!==null)throw Ne=c,f;yt=1,$o(e,xn(s,e.current)),Ne=null;return}t.flags&32768?(Le||l===1?e=!0:di||(De&536870912)!==0?e=!1:(Va=e=!0,(l===2||l===9||l===3||l===6)&&(l=cn.current,l!==null&&l.tag===13&&(l.flags|=16384))),_g(t,e)):sr(t)}function sr(e){var t=e;do{if((t.flags&32768)!==0){_g(t,Va);return}e=t.return;var s=ux(t.alternate,t,va);if(s!==null){Ne=s;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);yt===0&&(yt=5)}function _g(e,t){do{var s=dx(e.alternate,e);if(s!==null){s.flags&=32767,Ne=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=s}while(e!==null);yt=6,Ne=null}function Tg(e,t,s,l,c,f,b,T,k){e.cancelPendingCommit=null;do ir();while(Ot!==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|=Ic,W1(e,s,f,b,T,k),e===nt&&(Ne=nt=null,De=0),hi=t,Pa=e,ya=s,$u=f,qu=c,fg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tx(Be,function(){return wg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=j.T,j.T=null,c=Q.p,Q.p=2,b=Fe,Fe|=4;try{fx(e,t,s)}finally{Fe=b,Q.p=c,j.T=l}}Ot=1,Eg(),Cg(),Ag()}}function Eg(){if(Ot===1){Ot=0;var e=Pa,t=hi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=j.T,j.T=null;var l=Q.p;Q.p=2;var c=Fe;Fe|=4;try{sg(t,e);var f=od,b=up(e.containerInfo),T=f.focusedElem,k=f.selectionRange;if(b!==T&&T&&T.ownerDocument&&cp(T.ownerDocument.documentElement,T)){if(k!==null&&Mc(T)){var z=k.start,$=k.end;if($===void 0&&($=z),"selectionStart"in T)T.selectionStart=z,T.selectionEnd=Math.min($,T.value.length);else{var X=T.ownerDocument||document,V=X&&X.defaultView||window;if(V.getSelection){var G=V.getSelection(),le=T.textContent.length,ve=Math.min(k.start,le),tt=k.end===void 0?ve:Math.min(k.end,le);!G.extend&&ve>tt&&(b=tt,tt=ve,ve=b);var O=rp(T,ve),M=rp(T,tt);if(O&&M&&(G.rangeCount!==1||G.anchorNode!==O.node||G.anchorOffset!==O.offset||G.focusNode!==M.node||G.focusOffset!==M.offset)){var U=X.createRange();U.setStart(O.node,O.offset),G.removeAllRanges(),ve>tt?(G.addRange(U),G.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),G.addRange(U))}}}}for(X=[],G=T;G=G.parentNode;)G.nodeType===1&&X.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<X.length;T++){var Y=X[T];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}vr=!!ld,od=ld=null}finally{Fe=c,Q.p=l,j.T=s}}e.current=t,Ot=2}}function Cg(){if(Ot===2){Ot=0;var e=Pa,t=hi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=j.T,j.T=null;var l=Q.p;Q.p=2;var c=Fe;Fe|=4;try{Jm(e,t.alternate,t)}finally{Fe=c,Q.p=l,j.T=s}}Ot=3}}function Ag(){if(Ot===4||Ot===3){Ot=0,Z();var e=Pa,t=hi,s=ya,l=fg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,hi=Pa=null,kg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ga=null),hc(s),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot=="function")try{Ue.onCommitFiberRoot(ut,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=j.T,c=Q.p,Q.p=2,j.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var T=l[b];f(T.value,{componentStack:T.stack})}}finally{j.T=t,Q.p=c}}(ya&3)!==0&&ir(),qn(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===Yu?_l++:(_l=0,Yu=e):_l=0,Tl(0)}}function kg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,al(t)))}function ir(){return Eg(),Cg(),Ag(),wg()}function wg(){if(Ot!==5)return!1;var e=Pa,t=$u;$u=0;var s=hc(ya),l=j.T,c=Q.p;try{Q.p=32>s?32:s,j.T=null,s=qu,qu=null;var f=Pa,b=ya;if(Ot=0,hi=Pa=null,ya=0,(Fe&6)!==0)throw Error(o(331));var T=Fe;if(Fe|=4,cg(f.current),lg(f,f.current,b,s),Fe=T,Tl(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot=="function")try{Ue.onPostCommitFiberRoot(ut,f)}catch{}return!0}finally{Q.p=c,j.T=l,kg(e,t)}}function Ng(e,t,s){t=xn(s,t),t=Cu(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Pi(e,2),qn(e))}function Ze(e,t,s){if(e.tag===3)Ng(e,e,s);else for(;t!==null;){if(t.tag===3){Ng(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ga===null||!Ga.has(l))){e=xn(s,e),s=jm(2),l=La(t,s,2),l!==null&&(Dm(s,l,t,e),Pi(l,2),qn(l));break}}t=t.return}}function Xu(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new mx;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)||(Gu=!0,c.add(s),e=Sx.bind(null,e,t,s),t.then(e,e))}function Sx(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,nt===e&&(De&s)===s&&(yt===4||yt===3&&(De&62914560)===De&&300>W()-Jo?(Fe&2)===0&&pi(e,0):Pu|=s,fi===De&&(fi=0)),qn(e)}function jg(e,t){t===0&&(t=Eh()),e=hs(e,t),e!==null&&(Pi(e,t),qn(e))}function xx(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),jg(e,s)}function _x(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 Tx(e,t){return ea(e,t)}var lr=null,gi=null,Qu=!1,or=!1,Wu=!1,$a=0;function qn(e){e!==gi&&e.next===null&&(gi===null?lr=gi=e:gi=gi.next=e),or=!0,Qu||(Qu=!0,Cx())}function Tl(e,t){if(!Wu&&or){Wu=!0;do for(var s=!1,l=lr;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,T=l.pingedLanes;f=(1<<31-Te(42|e)+1)-1,f&=c&~(b&~T),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Og(l,f))}else f=De,f=uo(l,l===nt?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Gi(l,f)||(s=!0,Og(l,f));l=l.next}while(s);Wu=!1}}function Ex(){Dg()}function Dg(){or=Qu=!1;var e=0;$a!==0&&Bx()&&(e=$a);for(var t=W(),s=null,l=lr;l!==null;){var c=l.next,f=Mg(l,t);f===0?(l.next=null,s===null?lr=c:s.next=c,c===null&&(gi=s)):(s=l,(e!==0||(f&3)!==0)&&(or=!0)),l=c}Ot!==0&&Ot!==5||Tl(e),$a!==0&&($a=0)}function Mg(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-Te(f),T=1<<b,k=c[b];k===-1?((T&s)===0||(T&l)!==0)&&(c[b]=Q1(T,t)):k<=t&&(e.expiredLanes|=T),f&=~T}if(t=nt,s=De,s=uo(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&&Bn(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Gi(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&Bn(l),hc(s)){case 2:case 8:s=ye;break;case 32:s=Be;break;case 268435456:s=ct;break;default:s=Be}return l=Rg.bind(null,e),s=ea(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&Bn(l),e.callbackPriority=2,e.callbackNode=null,2}function Rg(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(ir()&&e.callbackNode!==s)return null;var l=De;return l=uo(e,e===nt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(pg(e,l,t),Mg(e,W()),e.callbackNode!=null&&e.callbackNode===s?Rg.bind(null,e):null)}function Og(e,t){if(ir())return null;pg(e,t,!0)}function Cx(){Ix(function(){(Fe&6)!==0?ea(Se,Ex):Dg()})}function Ju(){if($a===0){var e=ti;e===0&&(e=kt,kt<<=1,(kt&261888)===0&&(kt=256)),$a=e}return $a}function Bg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function Lg(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 Ax(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Bg((c[Jt]||null).action),b=l.submitter;b&&(t=(t=b[Jt]||null)?Bg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var T=new bo("action","action",null,l,c);e.push({event:T,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($a!==0){var k=b?Lg(c,b):new FormData(c);bu(s,{pending:!0,data:k,method:c.method,action:f},null,k)}}else typeof f=="function"&&(T.preventDefault(),k=b?Lg(c,b):new FormData(c),bu(s,{pending:!0,data:k,method:c.method,action:f},f,k))},currentTarget:c}]})}}for(var ed=0;ed<Lc.length;ed++){var td=Lc[ed],kx=td.toLowerCase(),wx=td[0].toUpperCase()+td.slice(1);In(kx,"on"+wx)}In(hp,"onAnimationEnd"),In(pp,"onAnimationIteration"),In(mp,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(FS,"onTransitionRun"),In($S,"onTransitionStart"),In(qS,"onTransitionCancel"),In(gp,"onTransitionEnd"),Hs("onMouseEnter",["mouseout","mouseover"]),Hs("onMouseLeave",["mouseout","mouseover"]),Hs("onPointerEnter",["pointerout","pointerover"]),Hs("onPointerLeave",["pointerout","pointerover"]),cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="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(" "),Nx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function Ig(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 T=l[b],k=T.instance,z=T.currentTarget;if(T=T.listener,k!==f&&c.isPropagationStopped())break e;f=T,c.currentTarget=z;try{f(c)}catch($){_o($)}c.currentTarget=null,f=k}else for(b=0;b<l.length;b++){if(T=l[b],k=T.instance,z=T.currentTarget,T=T.listener,k!==f&&c.isPropagationStopped())break e;f=T,c.currentTarget=z;try{f(c)}catch($){_o($)}c.currentTarget=null,f=k}}}}function je(e,t){var s=t[pc];s===void 0&&(s=t[pc]=new Set);var l=e+"__bubble";s.has(l)||(Ug(t,e,2,!1),s.add(l))}function nd(e,t,s){var l=0;t&&(l|=4),Ug(s,e,l,t)}var rr="_reactListening"+Math.random().toString(36).slice(2);function ad(e){if(!e[rr]){e[rr]=!0,Dh.forEach(function(s){s!=="selectionchange"&&(Nx.has(s)||nd(s,!1,e),nd(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rr]||(t[rr]=!0,nd("selectionchange",!1,t))}}function Ug(e,t,s,l){switch(hv(t)){case 2:var c=a_;break;case 8:c=s_;break;default:c=yd}s=c.bind(null,t,s,e),c=void 0,!Tc||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 sd(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 T=l.stateNode.containerInfo;if(T===c)break;if(b===4)for(b=l.return;b!==null;){var k=b.tag;if((k===3||k===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;T!==null;){if(b=Us(T),b===null)return;if(k=b.tag,k===5||k===6||k===26||k===27){l=f=b;continue e}T=T.parentNode}}l=l.return}Ph(function(){var z=f,$=xc(s),X=[];e:{var V=vp.get(e);if(V!==void 0){var G=bo,le=e;switch(e){case"keypress":if(vo(s)===0)break e;case"keydown":case"keyup":G=_S;break;case"focusin":le="focus",G=kc;break;case"focusout":le="blur",G=kc;break;case"beforeblur":case"afterblur":G=kc;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":G=qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=uS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=CS;break;case hp:case pp:case mp:G=hS;break;case gp:G=kS;break;case"scroll":case"scrollend":G=rS;break;case"wheel":G=NS;break;case"copy":case"cut":case"paste":G=mS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Kh;break;case"toggle":case"beforetoggle":G=DS}var ve=(t&4)!==0,tt=!ve&&(e==="scroll"||e==="scrollend"),O=ve?V!==null?V+"Capture":null:V;ve=[];for(var M=z,U;M!==null;){var Y=M;if(U=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||U===null||O===null||(Y=qi(M,O),Y!=null&&ve.push(Cl(M,Y,U))),tt)break;M=M.return}0<ve.length&&(V=new G(V,le,null,s,$),X.push({event:V,listeners:ve}))}}if((t&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",V&&s!==Sc&&(le=s.relatedTarget||s.fromElement)&&(Us(le)||le[Is]))break e;if((G||V)&&(V=$.window===$?$:(V=$.ownerDocument)?V.defaultView||V.parentWindow:window,G?(le=s.relatedTarget||s.toElement,G=z,le=le?Us(le):null,le!==null&&(tt=d(le),ve=le.tag,le!==tt||ve!==5&&ve!==27&&ve!==6)&&(le=null)):(G=null,le=z),G!==le)){if(ve=qh,Y="onMouseLeave",O="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(ve=Kh,Y="onPointerLeave",O="onPointerEnter",M="pointer"),tt=G==null?V:$i(G),U=le==null?V:$i(le),V=new ve(Y,M+"leave",G,s,$),V.target=tt,V.relatedTarget=U,Y=null,Us($)===z&&(ve=new ve(O,M+"enter",le,s,$),ve.target=U,ve.relatedTarget=tt,Y=ve),tt=Y,G&&le)t:{for(ve=jx,O=G,M=le,U=0,Y=O;Y;Y=ve(Y))U++;Y=0;for(var me=M;me;me=ve(me))Y++;for(;0<U-Y;)O=ve(O),U--;for(;0<Y-U;)M=ve(M),Y--;for(;U--;){if(O===M||M!==null&&O===M.alternate){ve=O;break t}O=ve(O),M=ve(M)}ve=null}else ve=null;G!==null&&zg(X,V,G,ve,!1),le!==null&&tt!==null&&zg(X,tt,le,ve,!0)}}e:{if(V=z?$i(z):window,G=V.nodeName&&V.nodeName.toLowerCase(),G==="select"||G==="input"&&V.type==="file")var ze=np;else if(ep(V))if(ap)ze=HS;else{ze=zS;var he=US}else G=V.nodeName,!G||G.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?z&&bc(z.elementType)&&(ze=np):ze=VS;if(ze&&(ze=ze(e,z))){tp(X,ze,s,$);break e}he&&he(e,V,z),e==="focusout"&&z&&V.type==="number"&&z.memoizedProps.value!=null&&yc(V,"number",V.value)}switch(he=z?$i(z):window,e){case"focusin":(ep(he)||he.contentEditable==="true")&&(Ys=he,Rc=z,el=null);break;case"focusout":el=Rc=Ys=null;break;case"mousedown":Oc=!0;break;case"contextmenu":case"mouseup":case"dragend":Oc=!1,dp(X,s,$);break;case"selectionchange":if(PS)break;case"keydown":case"keyup":dp(X,s,$)}var Ae;if(Nc)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else qs?Wh(e,s)&&(Me="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Me="onCompositionStart");Me&&(Zh&&s.locale!=="ko"&&(qs||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&qs&&(Ae=Fh()):(Na=$,Ec="value"in Na?Na.value:Na.textContent,qs=!0)),he=cr(z,Me),0<he.length&&(Me=new Yh(Me,e,null,s,$),X.push({event:Me,listeners:he}),Ae?Me.data=Ae:(Ae=Jh(s),Ae!==null&&(Me.data=Ae)))),(Ae=RS?OS(e,s):BS(e,s))&&(Me=cr(z,"onBeforeInput"),0<Me.length&&(he=new Yh("onBeforeInput","beforeinput",null,s,$),X.push({event:he,listeners:Me}),he.data=Ae)),Ax(X,e,z,s,$)}Ig(X,t)})}function Cl(e,t,s){return{instance:e,listener:t,currentTarget:s}}function cr(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=qi(e,s),c!=null&&l.unshift(Cl(e,c,f)),c=qi(e,t),c!=null&&l.push(Cl(e,c,f))),e.tag===3)return l;e=e.return}return[]}function jx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function zg(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var T=s,k=T.alternate,z=T.stateNode;if(T=T.tag,k!==null&&k===l)break;T!==5&&T!==26&&T!==27||z===null||(k=z,c?(z=qi(s,f),z!=null&&b.unshift(Cl(s,z,k))):c||(z=qi(s,f),z!=null&&b.push(Cl(s,z,k)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var Dx=/\r\n?/g,Mx=/\u0000|\uFFFD/g;function Vg(e){return(typeof e=="string"?e:""+e).replace(Dx,`
25
- `).replace(Mx,"")}function Hg(e,t){return t=Vg(t),Vg(e)===t}function et(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ps(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ps(e,""+l);break;case"className":ho(e,"class",l);break;case"tabIndex":ho(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ho(e,s,l);break;case"style":Hh(e,l,f);break;case"data":if(t!=="object"){ho(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=mo(""+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"&&et(e,t,"name",c.name,c,null),et(e,t,"formEncType",c.formEncType,c,null),et(e,t,"formMethod",c.formMethod,c,null),et(e,t,"formTarget",c.formTarget,c,null)):(et(e,t,"encType",c.encType,c,null),et(e,t,"method",c.method,c,null),et(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=mo(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=aa);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("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=mo(""+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":je("beforetoggle",e),je("toggle",e),fo(e,"popover",l);break;case"xlinkActuate":na(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":na(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":na(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":na(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":na(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":na(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":na(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":fo(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=lS.get(s)||s,fo(e,s,l))}}function id(e,t,s,l,c,f){switch(s){case"style":Hh(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"?Ps(e,l):(typeof l=="number"||typeof l=="bigint")&&Ps(e,""+l);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=aa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mh.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[Jt]||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,""):fo(e,s,l)}}}function Ft(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("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:et(e,t,f,b,s,null)}}c&&et(e,t,"srcSet",s.srcSet,s,null),l&&et(e,t,"src",s.src,s,null);return;case"input":je("invalid",e);var T=f=b=c=null,k=null,z=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":k=$;break;case"defaultChecked":z=$;break;case"value":f=$;break;case"defaultValue":T=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:et(e,t,l,$,s,null)}}Ih(e,f,T,k,z,b,c,!1);return;case"select":je("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(T=s[c],T!=null))switch(c){case"value":f=T;break;case"defaultValue":b=T;break;case"multiple":l=T;default:et(e,t,c,T,s,null)}t=f,s=b,e.multiple=!!l,t!=null?Gs(e,!!l,t,!1):s!=null&&Gs(e,!!l,s,!0);return;case"textarea":je("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(T=s[b],T!=null))switch(b){case"value":l=T;break;case"defaultValue":c=T;break;case"children":f=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:et(e,t,b,T,s,null)}zh(e,l,c,f);return;case"option":for(k in s)if(s.hasOwnProperty(k)&&(l=s[k],l!=null))switch(k){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:et(e,t,k,l,s,null)}return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<El.length;l++)je(El[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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(z in s)if(s.hasOwnProperty(z)&&(l=s[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:et(e,t,z,l,s,null)}return;default:if(bc(t)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&id(e,t,$,l,s,void 0));return}}for(T in s)s.hasOwnProperty(T)&&(l=s[T],l!=null&&et(e,t,T,l,s,null))}function Rx(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,T=null,k=null,z=null,$=null;for(G in s){var X=s[G];if(s.hasOwnProperty(G)&&X!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":k=X;default:l.hasOwnProperty(G)||et(e,t,G,null,l,X)}}for(var V in l){var G=l[V];if(X=s[V],l.hasOwnProperty(V)&&(G!=null||X!=null))switch(V){case"type":f=G;break;case"name":c=G;break;case"checked":z=G;break;case"defaultChecked":$=G;break;case"value":b=G;break;case"defaultValue":T=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(o(137,t));break;default:G!==X&&et(e,t,V,G,l,X)}}vc(e,b,T,k,z,$,f,c);return;case"select":G=b=T=V=null;for(f in s)if(k=s[f],s.hasOwnProperty(f)&&k!=null)switch(f){case"value":break;case"multiple":G=k;default:l.hasOwnProperty(f)||et(e,t,f,null,l,k)}for(c in l)if(f=l[c],k=s[c],l.hasOwnProperty(c)&&(f!=null||k!=null))switch(c){case"value":V=f;break;case"defaultValue":T=f;break;case"multiple":b=f;default:f!==k&&et(e,t,c,f,l,k)}t=T,s=b,l=G,V!=null?Gs(e,!!s,V,!1):!!l!=!!s&&(t!=null?Gs(e,!!s,t,!0):Gs(e,!!s,s?[]:"",!1));return;case"textarea":G=V=null;for(T in s)if(c=s[T],s.hasOwnProperty(T)&&c!=null&&!l.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:et(e,t,T,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":V=c;break;case"defaultValue":G=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&et(e,t,b,c,l,f)}Uh(e,V,G);return;case"option":for(var le in s)if(V=s[le],s.hasOwnProperty(le)&&V!=null&&!l.hasOwnProperty(le))switch(le){case"selected":e.selected=!1;break;default:et(e,t,le,null,l,V)}for(k in l)if(V=l[k],G=s[k],l.hasOwnProperty(k)&&V!==G&&(V!=null||G!=null))switch(k){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:et(e,t,k,V,l,G)}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 ve in s)V=s[ve],s.hasOwnProperty(ve)&&V!=null&&!l.hasOwnProperty(ve)&&et(e,t,ve,null,l,V);for(z in l)if(V=l[z],G=s[z],l.hasOwnProperty(z)&&V!==G&&(V!=null||G!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:et(e,t,z,V,l,G)}return;default:if(bc(t)){for(var tt in s)V=s[tt],s.hasOwnProperty(tt)&&V!==void 0&&!l.hasOwnProperty(tt)&&id(e,t,tt,void 0,l,V);for($ in l)V=l[$],G=s[$],!l.hasOwnProperty($)||V===G||V===void 0&&G===void 0||id(e,t,$,V,l,G);return}}for(var O in s)V=s[O],s.hasOwnProperty(O)&&V!=null&&!l.hasOwnProperty(O)&&et(e,t,O,null,l,V);for(X in l)V=l[X],G=s[X],!l.hasOwnProperty(X)||V===G||V==null&&G==null||et(e,t,X,V,l,G)}function Gg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ox(){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,T=c.duration;if(f&&T&&Gg(b)){for(b=0,T=c.responseEnd,l+=1;l<s.length;l++){var k=s[l],z=k.startTime;if(z>T)break;var $=k.transferSize,X=k.initiatorType;$&&Gg(X)&&(k=k.responseEnd,b+=$*(k<T?1:(T-z)/(k-z)))}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 ld=null,od=null;function ur(e){return e.nodeType===9?e:e.ownerDocument}function Pg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Fg(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function rd(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 cd=null;function Bx(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var $g=typeof setTimeout=="function"?setTimeout:void 0,Lx=typeof clearTimeout=="function"?clearTimeout:void 0,qg=typeof Promise=="function"?Promise:void 0,Ix=typeof queueMicrotask=="function"?queueMicrotask:typeof qg<"u"?function(e){return qg.resolve(null).then(e).catch(Ux)}:$g;function Ux(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function Yg(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")Al(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Al(s);for(var f=s.firstChild;f;){var b=f.nextSibling,T=f.nodeName;f[Fi]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Al(e.ownerDocument.body);s=c}while(s);Si(t)}function Kg(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 ud(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":ud(s),mc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function zx(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[Fi])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=An(e.nextSibling),e===null)break}return null}function Vx(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=An(e.nextSibling),e===null))return null;return e}function Zg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=An(e.nextSibling),e===null))return null;return e}function dd(e){return e.data==="$?"||e.data==="$~"}function fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Hx(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 An(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 hd=null;function Xg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return An(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Qg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Wg(e,t,s){switch(t=ur(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 Al(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);mc(e)}var kn=new Map,Jg=new Set;function dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ba=Q.d;Q.d={f:Gx,r:Px,D:Fx,C:$x,L:qx,m:Yx,X:Zx,S:Kx,M:Xx};function Gx(){var e=ba.f(),t=nr();return e||t}function Px(e){var t=zs(e);t!==null&&t.tag===5&&t.type==="form"?gm(t):ba.r(e)}var vi=typeof document>"u"?null:document;function ev(e,t,s){var l=vi;if(l&&typeof t=="string"&&t){var c=bn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Jg.has(c)||(Jg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ft(t,"link",e),Ut(t),l.head.appendChild(t)))}}function Fx(e){ba.D(e),ev("dns-prefetch",e,null)}function $x(e,t){ba.C(e,t),ev("preconnect",e,t)}function qx(e,t,s){ba.L(e,t,s);var l=vi;if(l&&e&&t){var c='link[rel="preload"][as="'+bn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+bn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+bn(s.imageSizes)+'"]')):c+='[href="'+bn(e)+'"]';var f=c;switch(t){case"style":f=yi(e);break;case"script":f=bi(e)}kn.has(f)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),kn.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(kl(f))||t==="script"&&l.querySelector(wl(f))||(t=l.createElement("link"),Ft(t,"link",e),Ut(t),l.head.appendChild(t)))}}function Yx(e,t){ba.m(e,t);var s=vi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+bn(l)+'"][href="'+bn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=bi(e)}if(!kn.has(f)&&(e=v({rel:"modulepreload",href:e},t),kn.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(wl(f)))return}l=s.createElement("link"),Ft(l,"link",e),Ut(l),s.head.appendChild(l)}}}function Kx(e,t,s){ba.S(e,t,s);var l=vi;if(l&&e){var c=Vs(l).hoistableStyles,f=yi(e);t=t||"default";var b=c.get(f);if(!b){var T={loading:0,preload:null};if(b=l.querySelector(kl(f)))T.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=kn.get(f))&&pd(e,s);var k=b=l.createElement("link");Ut(k),Ft(k,"link",e),k._p=new Promise(function(z,$){k.onload=z,k.onerror=$}),k.addEventListener("load",function(){T.loading|=1}),k.addEventListener("error",function(){T.loading|=2}),T.loading|=4,fr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:T},c.set(f,b)}}}function Zx(e,t){ba.X(e,t);var s=vi;if(s&&e){var l=Vs(s).hoistableScripts,c=bi(e),f=l.get(c);f||(f=s.querySelector(wl(c)),f||(e=v({src:e,async:!0},t),(t=kn.get(c))&&md(e,t),f=s.createElement("script"),Ut(f),Ft(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Xx(e,t){ba.M(e,t);var s=vi;if(s&&e){var l=Vs(s).hoistableScripts,c=bi(e),f=l.get(c);f||(f=s.querySelector(wl(c)),f||(e=v({src:e,async:!0,type:"module"},t),(t=kn.get(c))&&md(e,t),f=s.createElement("script"),Ut(f),Ft(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function tv(e,t,s,l){var c=(c=Rt.current)?dr(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=yi(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=yi(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(kl(e)))&&!f._p&&(b.instance=f,b.state.loading=5),kn.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},kn.set(e,s),f||Qx(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 yi(e){return'href="'+bn(e)+'"'}function kl(e){return'link[rel="stylesheet"]['+e+"]"}function nv(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Qx(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}),Ft(t,"link",s),Ut(t),e.head.appendChild(t))}function bi(e){return'[src="'+bn(e)+'"]'}function wl(e){return"script[async]"+e}function av(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+bn(s.href)+'"]');if(l)return t.instance=l,Ut(l),l;var c=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ut(l),Ft(l,"style",c),fr(l,s.precedence,e),t.instance=l;case"stylesheet":c=yi(s.href);var f=e.querySelector(kl(c));if(f)return t.state.loading|=4,t.instance=f,Ut(f),f;l=nv(s),(c=kn.get(c))&&pd(l,c),f=(e.ownerDocument||e).createElement("link"),Ut(f);var b=f;return b._p=new Promise(function(T,k){b.onload=T,b.onerror=k}),Ft(f,"link",l),t.state.loading|=4,fr(f,s.precedence,e),t.instance=f;case"script":return f=bi(s.src),(c=e.querySelector(wl(f)))?(t.instance=c,Ut(c),c):(l=s,(c=kn.get(f))&&(l=v({},s),md(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ut(c),Ft(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,fr(l,s.precedence,e));return t.instance}function fr(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 T=l[b];if(T.dataset.precedence===t)f=T;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function pd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function md(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hr=null;function sv(e,t,s){if(hr===null){var l=new Map,c=hr=new Map;c.set(s,l)}else c=hr,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[Fi]||f[Vt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var T=l.get(b);T?T.push(f):l.set(b,[f])}}return l}function iv(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Wx(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 lv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Jx(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=yi(l.href),f=t.querySelector(kl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Ut(f);return}f=t.ownerDocument||t,l=nv(l),(c=kn.get(c))&&pd(l,c),f=f.createElement("link"),Ut(f);var b=f;b._p=new Promise(function(T,k){b.onload=T,b.onerror=k}),Ft(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=pr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var gd=0;function e_(e,t){return e.stylesheets&&e.count===0&&gr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&gd===0&&(gd=62500*Ox());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>gd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mr=null;function gr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mr=new Map,t.forEach(t_,e),mr=null,pr.call(e))}function t_(e,t){if(!(t.state.loading&4)){var s=mr.get(e);if(s)var l=s.get(null);else{s=new Map,mr.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=pr.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 Nl={$$typeof:D,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function n_(e,t,s,l,c,f,b,T,k){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=dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.hiddenUpdates=dc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function ov(e,t,s,l,c,f,b,T,k,z,$,X){return e=new n_(e,t,s,b,k,z,$,X,T),t=1,f===!0&&(t|=24),f=rn(3,null,null,t),e.current=f,f.stateNode=e,t=Zc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Jc(f),e}function rv(e){return e?(e=Xs,e):Xs}function cv(e,t,s,l,c,f){c=rv(c),l.context===null?l.context=c:l.pendingContext=c,l=Ba(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=La(e,l,t),s!==null&&(ln(s,e,t),ol(s,e,t))}function uv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function vd(e,t){uv(e,t),(e=e.alternate)&&uv(e,t)}function dv(e){if(e.tag===13||e.tag===31){var t=hs(e,67108864);t!==null&&ln(t,e,67108864),vd(e,67108864)}}function fv(e){if(e.tag===13||e.tag===31){var t=hn();t=fc(t);var s=hs(e,t);s!==null&&ln(s,e,t),vd(e,t)}}var vr=!0;function a_(e,t,s,l){var c=j.T;j.T=null;var f=Q.p;try{Q.p=2,yd(e,t,s,l)}finally{Q.p=f,j.T=c}}function s_(e,t,s,l){var c=j.T;j.T=null;var f=Q.p;try{Q.p=8,yd(e,t,s,l)}finally{Q.p=f,j.T=c}}function yd(e,t,s,l){if(vr){var c=bd(l);if(c===null)sd(e,t,l,yr,s),pv(e,l);else if(l_(c,e,t,s,l))l.stopPropagation();else if(pv(e,l),t&4&&-1<i_.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=rs(f.pendingLanes);if(b!==0){var T=f;for(T.pendingLanes|=2,T.entangledLanes|=2;b;){var k=1<<31-Te(b);T.entanglements[1]|=k,b&=~k}qn(f),(Fe&6)===0&&(er=W()+500,Tl(0))}}break;case 31:case 13:T=hs(f,2),T!==null&&ln(T,f,2),nr(),vd(f,2)}if(f=bd(l),f===null&&sd(e,t,l,yr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else sd(e,t,l,null,s)}}function bd(e){return e=xc(e),Sd(e)}var yr=null;function Sd(e){if(yr=null,e=Us(e),e!==null){var t=d(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=u(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 yr=e,null}function hv(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(ie()){case Se:return 2;case ye:return 8;case Be:case Ce:return 32;case ct:return 268435456;default:return 32}default:return 32}}var xd=!1,Ya=null,Ka=null,Za=null,jl=new Map,Dl=new Map,Xa=[],i_="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 pv(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Za=null;break;case"pointerover":case"pointerout":jl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(t.pointerId)}}function Ml(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&&dv(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function l_(e,t,s,l,c){switch(t){case"focusin":return Ya=Ml(Ya,e,t,s,l,c),!0;case"dragenter":return Ka=Ml(Ka,e,t,s,l,c),!0;case"mouseover":return Za=Ml(Za,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return jl.set(f,Ml(jl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Dl.set(f,Ml(Dl.get(f)||null,e,t,s,l,c)),!0}return!1}function mv(e){var t=Us(e.target);if(t!==null){var s=d(t);if(s!==null){if(t=s.tag,t===13){if(t=u(s),t!==null){e.blockedOn=t,Nh(e.priority,function(){fv(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,Nh(e.priority,function(){fv(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 br(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=bd(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);Sc=l,s.target.dispatchEvent(l),Sc=null}else return t=zs(s),t!==null&&dv(t),e.blockedOn=s,!1;t.shift()}return!0}function gv(e,t,s){br(e)&&s.delete(t)}function o_(){xd=!1,Ya!==null&&br(Ya)&&(Ya=null),Ka!==null&&br(Ka)&&(Ka=null),Za!==null&&br(Za)&&(Za=null),jl.forEach(gv),Dl.forEach(gv)}function Sr(e,t){e.blockedOn===t&&(e.blockedOn=null,xd||(xd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,o_)))}var xr=null;function vv(e){xr!==e&&(xr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){xr===e&&(xr=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(Sd(l||s)===null)continue;break}var f=zs(s);f!==null&&(e.splice(t,3),t-=3,bu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function Si(e){function t(k){return Sr(k,e)}Ya!==null&&Sr(Ya,e),Ka!==null&&Sr(Ka,e),Za!==null&&Sr(Za,e),jl.forEach(t),Dl.forEach(t);for(var s=0;s<Xa.length;s++){var l=Xa[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Xa.length&&(s=Xa[0],s.blockedOn===null);)mv(s),s.blockedOn===null&&Xa.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[Jt]||null;if(typeof f=="function")b||vv(s);else if(b){var T=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[Jt]||null)T=b.formAction;else if(Sd(c)!==null)continue}else T=b.action;typeof T=="function"?s[l+1]=T:(s.splice(l,3),l-=3),vv(s)}}}function yv(){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 _d(e){this._internalRoot=e}_r.prototype.render=_d.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=hn();cv(s,l,e,t,null,null)},_r.prototype.unmount=_d.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cv(e.current,2,null,e,null,null),nr(),t[Is]=null}};function _r(e){this._internalRoot=e}_r.prototype.unstable_scheduleHydration=function(e){if(e){var t=wh();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Xa.length&&t!==0&&t<Xa[s].priority;s++);Xa.splice(s,0,e),s===0&&mv(e)}};var bv=a.version;if(bv!=="19.2.4")throw Error(o(527,bv,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var r_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tr.isDisabled&&Tr.supportsFiber)try{ut=Tr.inject(r_),Ue=Tr}catch{}}return Rl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=Am,f=km,b=wm;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=ov(e,1,!1,null,null,s,l,null,c,f,b,yv),e[Is]=t.current,ad(e),new _d(t)},Rl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=Am,b=km,T=wm,k=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&&(T=s.onRecoverableError),s.formState!==void 0&&(k=s.formState)),t=ov(e,1,!0,t,s??null,l,c,k,f,b,T,yv),t.context=rv(null),s=t.current,l=hn(),l=fc(l),c=Ba(l),c.callback=null,La(s,c,l),s=l,t.current.lanes=s,Pi(t,s),qn(t),e[Is]=t.current,ad(e),new _r(t)},Rl.version="19.2.4",Rl}var Av;function E_(){if(Av)return Td.exports;Av=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(),Td.exports=T_(),Td.exports}var C_=E_();/**
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 kv="popstate";function wv(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function A_(n={}){function a(o,r){var g;let d=(g=r.state)==null?void 0:g.masked,{pathname:u,search:p,hash:m}=d||o.location;return Wd("",{pathname:u,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:Yl(r)}return w_(a,i,null,n)}function ot(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function jn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function k_(){return Math.random().toString(36).substring(2,10)}function Nv(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 Wd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Li(a):a,state:i,key:a&&a.key||o||k_(),unstable_mask:r}}function Yl({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 Li(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 w_(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:d=!1}=o,u=r.history,p="POP",m=null,g=y();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function y(){return(u.state||{idx:null}).idx}function v(){p="POP";let w=y(),_=w==null?null:w-g;g=w,m&&m({action:p,location:A.location,delta:_})}function x(w,_){p="PUSH";let N=wv(w)?w:Wd(A.location,w,_);g=y()+1;let D=Nv(N,g),H=A.createHref(N.unstable_mask||N);try{u.pushState(D,"",H)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;r.location.assign(H)}d&&m&&m({action:p,location:A.location,delta:1})}function E(w,_){p="REPLACE";let N=wv(w)?w:Wd(A.location,w,_);g=y();let D=Nv(N,g),H=A.createHref(N.unstable_mask||N);u.replaceState(D,"",H),d&&m&&m({action:p,location:A.location,delta:0})}function C(w){return N_(w)}let A={get action(){return p},get location(){return n(r,u)},listen(w){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(kv,v),m=w,()=>{r.removeEventListener(kv,v),m=null}},createHref(w){return a(r,w)},createURL:C,encodeLocation(w){let _=C(w);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:x,replace:E,go(w){return u.go(w)}};return A}function N_(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),ot(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Yl(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function C0(n,a,i="/"){return j_(n,a,i,!1)}function j_(n,a,i,o){let r=typeof a=="string"?Li(a):a,d=Ea(r.pathname||"/",i);if(d==null)return null;let u=A0(n);D_(u);let p=null;for(let m=0;p==null&&m<u.length;++m){let g=w0(d);p=V_(u[m],g,o)}return p}function A0(n,a=[],i=[],o="",r=!1){let d=(u,p,m=r,g)=>{let y={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:p,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&m)return;ot(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=Xn([o,y.relativePath]),x=i.concat(y);u.children&&u.children.length>0&&(ot(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),A0(u.children,a,x,v,m)),!(u.path==null&&!u.index)&&a.push({path:v,score:U_(v,u.index),routesMeta:x})};return n.forEach((u,p)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))d(u,p);else for(let g of k0(u.path))d(u,p,!0,g)}),a}function k0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return r?[d,""]:[d];let u=k0(o.join("/")),p=[];return p.push(...u.map(m=>m===""?d:[d,m].join("/"))),r&&p.push(...u),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function D_(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:z_(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var M_=/^:[\w-]+$/,R_=3,O_=2,B_=1,L_=10,I_=-2,jv=n=>n==="*";function U_(n,a){let i=n.split("/"),o=i.length;return i.some(jv)&&(o+=I_),a&&(o+=O_),i.filter(r=>!jv(r)).reduce((r,d)=>r+(M_.test(d)?R_:d===""?B_:L_),o)}function z_(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 V_(n,a,i=!1){let{routesMeta:o}=n,r={},d="/",u=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,y=d==="/"?a:a.slice(d.length)||"/",v=Kl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),x=m.route;if(!v&&g&&i&&!o[o.length-1].route.index&&(v=Kl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!v)return null;Object.assign(r,v.params),u.push({params:r,pathname:Xn([d,v.pathname]),pathnameBase:$_(Xn([d,v.pathnameBase])),route:x}),v.pathnameBase!=="/"&&(d=Xn([d,v.pathnameBase]))}return u}function Kl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=H_(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let d=r[0],u=d.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:v},x)=>{if(y==="*"){let C=p[x]||"";u=d.slice(0,d.length-C.length).replace(/(.)\/+$/,"$1")}const E=p[x];return v&&!E?g[y]=void 0:g[y]=(E||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:u,pattern:n}}function H_(n,a=!1,i=!0){jn(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,(u,p,m,g,y)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let v=y.charAt(g+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}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 w0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return jn(!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 Ea(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 G_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function P_(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Li(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=Dv(i.substring(1),"/"):d=Dv(i,a)):d=a,{pathname:d,search:q_(o),hash:Y_(r)}}function Dv(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 Ad(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 F_(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function Df(n){let a=F_(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Wr(n,a,i,o=!1){let r;typeof n=="string"?r=Li(n):(r={...n},ot(!r.pathname||!r.pathname.includes("?"),Ad("?","pathname","search",r)),ot(!r.pathname||!r.pathname.includes("#"),Ad("#","pathname","hash",r)),ot(!r.search||!r.search.includes("#"),Ad("#","search","hash",r)));let d=n===""||r.pathname==="",u=d?"/":r.pathname,p;if(u==null)p=i;else{let v=a.length-1;if(!o&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),v-=1;r.pathname=x.join("/")}p=v>=0?a[v]:"/"}let m=P_(r,p),g=u&&u!=="/"&&u.endsWith("/"),y=(d||u===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}var Xn=n=>n.join("/").replace(/\/\/+/g,"/"),$_=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),q_=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Y_=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,K_=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 Z_(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function X_(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var N0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function j0(n,a){let i=n;if(typeof i!="string"||!G_.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(N0)try{let d=new URL(window.location.href),u=i.startsWith("//")?new URL(d.protocol+i):new URL(i),p=Ea(u.pathname,a);u.origin===d.origin&&p!=null?i=p+u.search+u.hash:r=!0}catch{jn(!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 D0=["POST","PUT","PATCH","DELETE"];new Set(D0);var Q_=["GET",...D0];new Set(Q_);var Ii=S.createContext(null);Ii.displayName="DataRouter";var Jr=S.createContext(null);Jr.displayName="DataRouterState";var W_=S.createContext(!1),M0=S.createContext({isTransitioning:!1});M0.displayName="ViewTransition";var J_=S.createContext(new Map);J_.displayName="Fetchers";var eT=S.createContext(null);eT.displayName="Await";var vn=S.createContext(null);vn.displayName="Navigation";var no=S.createContext(null);no.displayName="Location";var Rn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Rn.displayName="Route";var Mf=S.createContext(null);Mf.displayName="RouteError";var R0="REACT_ROUTER_ERROR",tT="REDIRECT",nT="ROUTE_ERROR_RESPONSE";function aT(n){if(n.startsWith(`${R0}:${tT}:{`))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 sT(n){if(n.startsWith(`${R0}:${nT}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new K_(a.status,a.statusText,a.data)}catch{}}function iT(n,{relative:a}={}){ot(Bs(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(vn),{hash:r,pathname:d,search:u}=ao(n,{relative:a}),p=d;return i!=="/"&&(p=d==="/"?i:Xn([i,d])),o.createHref({pathname:p,search:u,hash:r})}function Bs(){return S.useContext(no)!=null}function Wt(){return ot(Bs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(no).location}function Xt(n){ot(Bs(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Wt();return S.useMemo(()=>Kl(n,w0(a)),[a,n])}var O0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function B0(n){S.useContext(vn).static||S.useLayoutEffect(n)}function ec(){let{isDataRoute:n}=S.useContext(Rn);return n?ST():lT()}function lT(){ot(Bs(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ii),{basename:a,navigator:i}=S.useContext(vn),{matches:o}=S.useContext(Rn),{pathname:r}=Wt(),d=JSON.stringify(Df(o)),u=S.useRef(!1);return B0(()=>{u.current=!0}),S.useCallback((m,g={})=>{if(jn(u.current,O0),!u.current)return;if(typeof m=="number"){i.go(m);return}let y=Wr(m,JSON.parse(d),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Xn([a,y.pathname])),(g.replace?i.replace:i.push)(y,g.state,g)},[a,i,d,r,n])}var oT=S.createContext(null);function rT(n){let a=S.useContext(Rn).outlet;return S.useMemo(()=>a&&S.createElement(oT.Provider,{value:n},a),[a,n])}function tc(){let{matches:n}=S.useContext(Rn),a=n[n.length-1];return a?a.params:{}}function ao(n,{relative:a}={}){let{matches:i}=S.useContext(Rn),{pathname:o}=Wt(),r=JSON.stringify(Df(i));return S.useMemo(()=>Wr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function cT(n,a){return L0(n,a)}function L0(n,a,i){var w;ot(Bs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(vn),{matches:r}=S.useContext(Rn),d=r[r.length-1],u=d?d.params:{},p=d?d.pathname:"/",m=d?d.pathnameBase:"/",g=d&&d.route;{let _=g&&g.path||"";U0(p,!g||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${_}">) 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="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let y=Wt(),v;if(a){let _=typeof a=="string"?Li(a):a;ot(m==="/"||((w=_.pathname)==null?void 0:w.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 "${_.pathname}" was given in the \`location\` prop.`),v=_}else v=y;let x=v.pathname||"/",E=x;if(m!=="/"){let _=m.replace(/^\//,"").split("/");E="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let C=C0(n,{pathname:E});jn(g||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),jn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let A=pT(C&&C.map(_=>Object.assign({},_,{params:Object.assign({},u,_.params),pathname:Xn([m,o.encodeLocation?o.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Xn([m,o.encodeLocation?o.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),r,i);return a&&A?S.createElement(no.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},A):A}function uT(){let n=bT(),a=Z_(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},d={padding:"2px 4px",backgroundColor:o},u=null;return console.error("Error handled by React Router default ErrorBoundary:",n),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,u)}var dT=S.createElement(uT,null),I0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,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=sT(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(Rn.Provider,{value:this.props.routeContext},S.createElement(Mf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(fT,{error:n},a):a}};I0.contextType=W_;var kd=new WeakMap;function fT({children:n,error:a}){let{basename:i}=S.useContext(vn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=aT(a.digest);if(o){let r=kd.get(a);if(r)throw r;let d=j0(o.location,i);if(N0&&!kd.get(a))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw kd.set(a,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function hT({routeContext:n,match:a,children:i}){let o=S.useContext(Ii);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Rn.Provider,{value:n},i)}function pT(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,d=o==null?void 0:o.errors;if(d!=null){let y=r.findIndex(v=>v.route.id&&(d==null?void 0:d[v.route.id])!==void 0);ot(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),r=r.slice(0,Math.min(r.length,y+1))}let u=!1,p=-1;if(i&&o){u=o.renderFallback;for(let y=0;y<r.length;y++){let v=r[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=y),v.route.id){let{loaderData:x,errors:E}=o,C=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!E||E[v.route.id]===void 0);if(v.route.lazy||C){i.isStatic&&(u=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(y,v)=>{var x,E;m(y,{location:o.location,params:((E=(x=o.matches)==null?void 0:x[0])==null?void 0:E.params)??{},unstable_pattern:X_(o.matches),errorInfo:v})}:void 0;return r.reduceRight((y,v,x)=>{let E,C=!1,A=null,w=null;o&&(E=d&&v.route.id?d[v.route.id]:void 0,A=v.route.errorElement||dT,u&&(p<0&&x===0?(U0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,w=null):p===x&&(C=!0,w=v.route.hydrateFallbackElement||null)));let _=a.concat(r.slice(0,x+1)),N=()=>{let D;return E?D=A:C?D=w:v.route.Component?D=S.createElement(v.route.Component,null):v.route.element?D=v.route.element:D=y,S.createElement(hT,{match:v,routeContext:{outlet:y,matches:_,isDataRoute:o!=null},children:D})};return o&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?S.createElement(I0,{location:o.location,revalidation:o.revalidation,component:A,error:E,children:N(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:g}):N()},null)}function Rf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function mT(n){let a=S.useContext(Ii);return ot(a,Rf(n)),a}function gT(n){let a=S.useContext(Jr);return ot(a,Rf(n)),a}function vT(n){let a=S.useContext(Rn);return ot(a,Rf(n)),a}function Of(n){let a=vT(n),i=a.matches[a.matches.length-1];return ot(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function yT(){return Of("useRouteId")}function bT(){var o;let n=S.useContext(Mf),a=gT("useRouteError"),i=Of("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function ST(){let{router:n}=mT("useNavigate"),a=Of("useNavigate"),i=S.useRef(!1);return B0(()=>{i.current=!0}),S.useCallback(async(r,d={})=>{jn(i.current,O0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...d}))},[n,a])}var Mv={};function U0(n,a,i){!a&&!Mv[n]&&(Mv[n]=!0,jn(!1,i))}S.memo(xT);function xT({routes:n,future:a,state:i,isStatic:o,onError:r}){return L0(n,void 0,{state:i,isStatic:o,onError:r})}function ji({to:n,replace:a,state:i,relative:o}){ot(Bs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(vn);jn(!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:d}=S.useContext(Rn),{pathname:u}=Wt(),p=ec(),m=Wr(n,Df(d),u,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 z0(n){return rT(n.context)}function bt(n){ot(!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 _T({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:d=!1,unstable_useTransitions:u}){ot(!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:d,unstable_useTransitions:u,future:{}}),[p,r,d,u]);typeof i=="string"&&(i=Li(i));let{pathname:g="/",search:y="",hash:v="",state:x=null,key:E="default",unstable_mask:C}=i,A=S.useMemo(()=>{let w=Ea(g,p);return w==null?null:{location:{pathname:w,search:y,hash:v,state:x,key:E,unstable_mask:C},navigationType:o}},[p,g,y,v,x,E,o,C]);return jn(A!=null,`<Router basename="${p}"> is not able to match the URL "${g}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:S.createElement(vn.Provider,{value:m},S.createElement(no.Provider,{children:a,value:A}))}function TT({children:n,location:a}){return cT(Jd(n),a)}function Jd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let d=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Jd(o.props.children,d));return}ot(o.type===bt,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ot(!o.props.index||!o.props.children,"An index route cannot have child routes.");let u={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(u.children=Jd(o.props.children,d)),i.push(u)}),i}var Rr="get",Or="application/x-www-form-urlencoded";function nc(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function ET(n){return nc(n)&&n.tagName.toLowerCase()==="button"}function CT(n){return nc(n)&&n.tagName.toLowerCase()==="form"}function AT(n){return nc(n)&&n.tagName.toLowerCase()==="input"}function kT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function wT(n,a){return n.button===0&&(!a||a==="_self")&&!kT(n)}function ef(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 NT(n,a){let i=ef(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(d=>{i.append(r,d)})}),i}var Cr=null;function jT(){if(Cr===null)try{new FormData(document.createElement("form"),0),Cr=!1}catch{Cr=!0}return Cr}var DT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wd(n){return n!=null&&!DT.has(n)?(jn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Or}"`),null):n}function MT(n,a){let i,o,r,d,u;if(CT(n)){let p=n.getAttribute("action");o=p?Ea(p,a):null,i=n.getAttribute("method")||Rr,r=wd(n.getAttribute("enctype"))||Or,d=new FormData(n)}else if(ET(n)||AT(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?Ea(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Rr,r=wd(n.getAttribute("formenctype"))||wd(p.getAttribute("enctype"))||Or,d=new FormData(p,n),!jT()){let{name:g,type:y,value:v}=n;if(y==="image"){let x=g?`${g}.`:"";d.append(`${x}x`,"0"),d.append(`${x}y`,"0")}else g&&d.append(g,v)}}else{if(nc(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Rr,o=null,r=Or,u=n}return d&&r==="text/plain"&&(u=d,d=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:d,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Bf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function RT(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&&Ea(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function OT(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 BT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function LT(n,a,i){let o=await Promise.all(n.map(async r=>{let d=a.routes[r.route.id];if(d){let u=await OT(d,i);return u.links?u.links():[]}return[]}));return VT(o.flat(1).filter(BT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Rv(n,a,i,o,r,d){let u=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var y;return i[g].pathname!==m.pathname||((y=i[g].route.path)==null?void 0:y.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return d==="assets"?a.filter((m,g)=>u(m,g)||p(m,g)):d==="data"?a.filter((m,g)=>{var v;let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(u(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let x=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function IT(n,a,{includeHydrateFallback:i}={}){return UT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let d=[r.module];return r.clientActionModule&&(d=d.concat(r.clientActionModule)),r.clientLoaderModule&&(d=d.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(d=d.concat(r.hydrateFallbackModule)),r.imports&&(d=d.concat(r.imports)),d}).flat(1))}function UT(n){return[...new Set(n)]}function zT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function VT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let d=JSON.stringify(zT(r));return i.has(d)||(i.add(d),o.push({key:d,link:r})),o},[])}function V0(){let n=S.useContext(Ii);return Bf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function HT(){let n=S.useContext(Jr);return Bf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Lf=S.createContext(void 0);Lf.displayName="FrameworkContext";function H0(){let n=S.useContext(Lf);return Bf(n,"You must render this element inside a <HydratedRouter> element"),n}function GT(n,a){let i=S.useContext(Lf),[o,r]=S.useState(!1),[d,u]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:y,onTouchStart:v}=a,x=S.useRef(null);S.useEffect(()=>{if(n==="render"&&u(!0),n==="viewport"){let A=_=>{_.forEach(N=>{u(N.isIntersecting)})},w=new IntersectionObserver(A,{threshold:.5});return x.current&&w.observe(x.current),()=>{w.disconnect()}}},[n]),S.useEffect(()=>{if(o){let A=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(A)}}},[o]);let E=()=>{r(!0)},C=()=>{r(!1),u(!1)};return i?n!=="intent"?[d,x,{}]:[d,x,{onFocus:Ol(p,E),onBlur:Ol(m,C),onMouseEnter:Ol(g,E),onMouseLeave:Ol(y,C),onTouchStart:Ol(v,E)}]:[!1,x,{}]}function Ol(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function PT({page:n,...a}){let{router:i}=V0(),o=S.useMemo(()=>C0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement($T,{page:n,matches:o,...a}):null}function FT(n){let{manifest:a,routeModules:i}=H0(),[o,r]=S.useState([]);return S.useEffect(()=>{let d=!1;return LT(n,a,i).then(u=>{d||r(u)}),()=>{d=!0}},[n,a,i]),o}function $T({page:n,matches:a,...i}){let o=Wt(),{future:r,manifest:d,routeModules:u}=H0(),{basename:p}=V0(),{loaderData:m,matches:g}=HT(),y=S.useMemo(()=>Rv(n,a,g,d,o,"data"),[n,a,g,d,o]),v=S.useMemo(()=>Rv(n,a,g,d,o,"assets"),[n,a,g,d,o]),x=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let A=new Set,w=!1;if(a.forEach(N=>{var H;let D=d.routes[N.route.id];!D||!D.hasLoader||(!y.some(B=>B.route.id===N.route.id)&&N.route.id in m&&((H=u[N.route.id])!=null&&H.shouldRevalidate)||D.hasClientLoader?w=!0:A.add(N.route.id))}),A.size===0)return[];let _=RT(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return w&&A.size>0&&_.searchParams.set("_routes",a.filter(N=>A.has(N.route.id)).map(N=>N.route.id).join(",")),[_.pathname+_.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,d,y,a,n,u]),E=S.useMemo(()=>IT(v,d),[v,d]),C=FT(v);return S.createElement(S.Fragment,null,x.map(A=>S.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...i})),E.map(A=>S.createElement("link",{key:A,rel:"modulepreload",href:A,...i})),C.map(({key:A,link:w})=>S.createElement("link",{key:A,nonce:i.nonce,...w,crossOrigin:w.crossOrigin??i.crossOrigin})))}function qT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var YT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{YT&&(window.__reactRouterVersion="7.13.1")}catch{}function KT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=A_({window:o,v5Compat:!0}));let d=r.current,[u,p]=S.useState({action:d.action,location:d.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>d.listen(m),[d,m]),S.createElement(_T,{basename:n,children:a,location:u.location,navigationType:u.action,navigator:d,unstable_useTransitions:i})}var G0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,If=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:d,replace:u,unstable_mask:p,state:m,target:g,to:y,preventScrollReset:v,viewTransition:x,unstable_defaultShouldRevalidate:E,...C},A){let{basename:w,navigator:_,unstable_useTransitions:N}=S.useContext(vn),D=typeof y=="string"&&G0.test(y),H=j0(y,w);y=H.to;let B=iT(y,{relative:r}),F=Wt(),R=null;if(p){let oe=Wr(p,[],F.unstable_mask?F.unstable_mask.pathname:"/",!0);w!=="/"&&(oe.pathname=oe.pathname==="/"?w:Xn([w,oe.pathname])),R=_.createHref(oe)}let[I,P,J]=GT(o,C),ee=WT(y,{replace:u,unstable_mask:p,state:m,target:g,preventScrollReset:v,relative:r,viewTransition:x,unstable_defaultShouldRevalidate:E,unstable_useTransitions:N});function ae(oe){a&&a(oe),oe.defaultPrevented||ee(oe)}let te=!(H.isExternal||d),pe=S.createElement("a",{...C,...J,href:(te?R:void 0)||H.absoluteURL||B,onClick:te?ae:a,ref:qT(A,P),target:g,"data-discover":!D&&i==="render"?"true":void 0});return I&&!D?S.createElement(S.Fragment,null,pe,S.createElement(PT,{page:B})):pe});If.displayName="Link";var ZT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:d,to:u,viewTransition:p,children:m,...g},y){let v=ao(u,{relative:g.relative}),x=Wt(),E=S.useContext(Jr),{navigator:C,basename:A}=S.useContext(vn),w=E!=null&&aE(v)&&p===!0,_=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,N=x.pathname,D=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;i||(N=N.toLowerCase(),D=D?D.toLowerCase():null,_=_.toLowerCase()),D&&A&&(D=Ea(D,A)||D);const H=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=N===_||!r&&N.startsWith(_)&&N.charAt(H)==="/",F=D!=null&&(D===_||!r&&D.startsWith(_)&&D.charAt(_.length)==="/"),R={isActive:B,isPending:F,isTransitioning:w},I=B?a:void 0,P;typeof o=="function"?P=o(R):P=[o,B?"active":null,F?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let J=typeof d=="function"?d(R):d;return S.createElement(If,{...g,"aria-current":I,className:P,ref:y,style:J,to:u,viewTransition:p},typeof m=="function"?m(R):m)});ZT.displayName="NavLink";var XT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:d,method:u=Rr,action:p,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:x,...E},C)=>{let{unstable_useTransitions:A}=S.useContext(vn),w=tE(),_=nE(p,{relative:g}),N=u.toLowerCase()==="get"?"get":"post",D=typeof p=="string"&&G0.test(p),H=B=>{if(m&&m(B),B.defaultPrevented)return;B.preventDefault();let F=B.nativeEvent.submitter,R=(F==null?void 0:F.getAttribute("formmethod"))||u,I=()=>w(F||B.currentTarget,{fetcherKey:a,method:R,navigate:i,replace:r,state:d,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:x});A&&i!==!1?S.startTransition(()=>I()):I()};return S.createElement("form",{ref:C,method:N,action:_,onSubmit:o?m:H,...E,"data-discover":!D&&n==="render"?"true":void 0})});XT.displayName="Form";function QT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function P0(n){let a=S.useContext(Ii);return ot(a,QT(n)),a}function WT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let y=ec(),v=Wt(),x=ao(n,{relative:u});return S.useCallback(E=>{if(wT(E,a)){E.preventDefault();let C=i!==void 0?i:Yl(v)===Yl(x),A=()=>y(n,{replace:C,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>A()):A()}},[v,y,x,i,o,r,a,n,d,u,p,m,g])}function Uf(n){jn(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(ef(n)),i=S.useRef(!1),o=Wt(),r=S.useMemo(()=>NT(o.search,i.current?null:a.current),[o.search]),d=ec(),u=S.useCallback((p,m)=>{const g=ef(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,d("?"+g,m)},[d,r]);return[r,u]}var JT=0,eE=()=>`__${String(++JT)}__`;function tE(){let{router:n}=P0("useSubmit"),{basename:a}=S.useContext(vn),i=yT(),o=n.fetch,r=n.navigate;return S.useCallback(async(d,u={})=>{let{action:p,method:m,encType:g,formData:y,body:v}=MT(d,a);if(u.navigate===!1){let x=u.fetcherKey||eE();await o(x,i,u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||m,formEncType:u.encType||g,flushSync:u.flushSync})}else await r(u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||m,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[o,r,a,i])}function nE(n,{relative:a}={}){let{basename:i}=S.useContext(vn),o=S.useContext(Rn);ot(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),d={...ao(n||".",{relative:a})},u=Wt();if(n==null){d.search=u.search;let p=new URLSearchParams(d.search),m=p.getAll("index");if(m.some(y=>y==="")){p.delete("index"),m.filter(v=>v).forEach(v=>p.append("index",v));let y=p.toString();d.search=y?`?${y}`:""}}return(!n||n===".")&&r.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Xn([i,d.pathname])),Yl(d)}function aE(n,{relative:a}={}){let i=S.useContext(M0);ot(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=P0("useViewTransitionState"),r=ao(n,{relative:a});if(!i.isTransitioning)return!1;let d=Ea(i.currentLocation.pathname,o)||i.currentLocation.pathname,u=Ea(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Kl(r.pathname,u)!=null||Kl(r.pathname,d)!=null}function On(){const n=ec();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function F0(n){return`/sessions/${encodeURIComponent(n)}`}function Zl(n){return`/workspaces/${encodeURIComponent(n)}`}function ns(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function sE(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Os(n,a){const i=new URLSearchParams;n&&i.set("workspace",n),a&&i.set("parent",a);const o=i.toString();return o?`/tasks/new?${o}`:"/tasks/new"}function $0(n){return`/sessions/new?${new URLSearchParams({env:n}).toString()}`}const Ov="/environments/new",Di="/settings",iE="/pair";function Dn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Xl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function lE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Bv(n){return Dn(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 Lv(n){return Dn(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 oE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.environmentId=="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 rE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.workspaceId=="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 cE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.workspaceId=="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 uE(n){return Dn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const dE=new Set(["off","subscription","api_key"]),Nd=new Set(["off","on"]);function Iv(n){return Dn(n)&&dE.has(n.claude)&&Nd.has(n.github)&&Nd.has(n.copilot)&&Nd.has(n.codex)}function fE(n){return Dn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function hE(n){return Dn(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"&&typeof n.type=="string"&&typeof n.script=="string"}function Qn(n,a,i,o){return Array.isArray(n)?n.filter((r,d)=>a(r)?!0:(Xl(i,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Xl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function pE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Dn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}const i={type:a.type,payload:Dn(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 mE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const gE=3e3,xi=5e3,vE=4001;function yE(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,d]=S.useState(!1),u=S.useRef(a.onMessage);u.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(y=>{var v;((v=o.current)==null?void 0:v.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(y))},[]);return S.useEffect(()=>{let y,v;function x(){y=new WebSocket(i),o.current=y,y.onopen=()=>{d(!0),p.current(g)},y.onmessage=E=>{if(typeof E.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const C=pE(E.data);C&&u.current(C)},y.onclose=E=>{var C;if(d(!1),o.current=void 0,(C=m.current)==null||C.call(m),clearTimeout(v),E.code===vE){window.location.href=iE;return}v=setTimeout(x,gE)},y.onerror=()=>{y.close()}}return x(),()=>{clearTimeout(v),y==null||y.close()}},[i,g]),{connected:r,send:g}}const bE=5e3;function SE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),d=S.useCallback(v=>{switch(v.type){case"environment.added":return!0;case"environment.removed":{const x=v.payload.environmentId;return x&&(i(E=>E.filter(C=>C.id!==x)),r(E=>{const C={...E};return delete C[x],C})),n({type:"list_sessions"}),!0}case"environment.changed":return n({type:"list_environments"}),!0;case"environment.provision_progress":{const x=v.payload;if(typeof x.environmentId!="string"||typeof x.stage!="string"||typeof x.message!="string"||typeof x.progress!="number")return Xl("environment.provision_progress","invalid payload"),!0;if(r(E=>({...E,[x.environmentId]:{stage:x.stage,message:x.message,progress:x.progress}})),x.stage==="ready"){const E=x.environmentId;setTimeout(()=>{r(C=>{const A={...C};return delete A[E],A})},bE)}return!0}default:return!1}},[n]),u=S.useCallback(v=>{var x;switch(v.type){case"environments":return i(Qn((x=v.payload)==null?void 0:x.environments,lE,"environments","environments")),!0;default:return!1}},[]),p=S.useCallback((v,x,E)=>{n({type:"add_environment",payload:{displayName:v,adapterType:x,adapterConfig:E||{}}})},[n]),m=S.useCallback(v=>{n({type:"provision_environment",payload:{environmentId:v}})},[n]),g=S.useCallback(v=>{n({type:"stop_environment",payload:{environmentId:v}})},[n]),y=S.useCallback(v=>{n({type:"remove_environment",payload:{environmentId:v}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:p,provisionEnvironment:m,stopEnvironment:g,removeEnvironment:y,handleMessage:u,handleEvent:d}}const jd=new Set(["pending","running","idle"]),xE=new Set(["completed","failed","interrupted"]),Uv=["pending","running","idle"];function _E(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[d,u]=S.useState(0),[p,m]=S.useState(void 0),[g,y]=S.useState({}),v=S.useCallback(N=>{var D,H,B,F,R;switch(N.type){case"sessions":return i(I=>{var ee;const P=Qn((ee=N.payload)==null?void 0:ee.sessions,Bv,"sessions","sessions"),J=new Map(I.map(ae=>[ae.id,ae.status]));return P.map(ae=>{const te=J.get(ae.id);return!te||te===ae.status?ae:xE.has(te)&&jd.has(ae.status)?{...ae,status:te}:jd.has(te)&&jd.has(ae.status)&&Uv.indexOf(te)>Uv.indexOf(ae.status)?{...ae,status:te}:ae})}),!0;case"session_event":{if(!Lv(N.payload))return Xl("session_event","payload is not a valid SessionEvent"),!0;const I=N.payload;let P=0;if(r(J=>{const ee=[...J,I];return ee.length>xi?(P=ee.length-xi,ee.slice(-xi)):ee}),P>0&&u(J=>J+P),I.eventType==="status"){const J=mE(I.content);i(ee=>ee.some(te=>te.id===I.sessionId)?ee.map(te=>te.id===I.sessionId?{...te,status:J}:te):[...ee,{id:I.sessionId,environmentId:"",runtime:"",status:J,prompt:"",startedAt:I.timestamp}])}return!0}case"session_events":{const I=Qn((D=N.payload)==null?void 0:D.events,Lv,"session_events","events"),P=(H=N.payload)==null?void 0:H.sessionId;if(typeof P!="string")return Xl("session_events","missing or non-string sessionId"),!0;if(I.length>0){let J=0;r(ee=>{const ae=new Set;for(const oe of ee)oe.sessionId===P&&ae.add(`${oe.timestamp}|${oe.eventType}`);const te=I.filter(oe=>!ae.has(`${oe.timestamp}|${oe.eventType}`)),pe=[...ee,...te].sort((oe,j)=>oe.sessionId!==j.sessionId?0:oe.timestamp.localeCompare(j.timestamp));return pe.length>xi?(J=pe.length-xi,pe.slice(-xi)):pe}),J>0&&u(ee=>ee+J)}return!0}case"spawned":{const I=(B=N.payload)==null?void 0:B.sessionId;return typeof I=="string"&&I&&m(I),n({type:"list_sessions"}),!0}case"task_sessions":{const I=(F=N.payload)==null?void 0:F.taskId;if(typeof I!="string"||!I)return!0;const P=Qn((R=N.payload)==null?void 0:R.sessions,Bv,"task_sessions","sessions");return y(J=>({...J,[I]:P})),!0}default:return!1}},[n]),x=S.useCallback((N,D,H,B)=>{n({type:"spawn",payload:{environmentId:N,prompt:D,personaId:H||"",worktreeBasePath:B||""}})},[n]),E=S.useCallback((N,D)=>{n({type:"send_input",payload:{sessionId:N,text:D}})},[n]),C=S.useCallback(N=>{n({type:"kill",payload:{sessionId:N}})},[n]),A=S.useCallback(N=>{n({type:"get_session_events",payload:{sessionId:N}})},[n]),w=S.useCallback(()=>{r([]),u(0)},[]),_=S.useCallback(N=>{n({type:"get_task_sessions",payload:{taskId:N}})},[n]);return{sessions:a,events:o,eventsDropped:d,lastSpawnedId:p,taskSessions:g,spawn:x,sendInput:E,kill:C,loadSessionEvents:A,clearEvents:w,loadTaskSessions:_,handleMessage:v}}function TE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),d=S.useCallback(v=>{switch(v.type){case"workspace.created":return r(!1),n({type:"list_workspaces"}),!0;case"workspace.archived":case"workspace.updated":return n({type:"list_workspaces"}),!0;default:return!1}},[n]),u=S.useCallback(v=>{var x;switch(v.type){case"workspaces":return i(Qn((x=v.payload)==null?void 0:x.workspaces,oE,"workspaces","workspaces")),!0;default:return!1}},[]),p=S.useCallback(()=>{r(!1)},[]),m=S.useCallback((v,x,E,C,A)=>{r(!0),n({type:"create_workspace",payload:{name:v,description:x||"",repoUrl:E||"",environmentId:C||"",defaultPersonaId:A||""}})},[n]),g=S.useCallback(v=>{n({type:"archive_workspace",payload:{workspaceId:v}})},[n]),y=S.useCallback((v,x)=>{n({type:"update_workspace",payload:{workspaceId:v,...x}})},[n]);return{workspaces:a,workspaceCreating:o,createWorkspace:m,archiveWorkspace:g,updateWorkspace:y,handleMessage:u,handleEvent:d,onDisconnect:p}}const EE=15e3;function CE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),d=S.useRef(new Map),u=S.useCallback(_=>{const N=_.payload;switch(_.type){case"task.created":{const D=typeof N.requestId=="string"?N.requestId:"";if(D){const B=d.current.get(D);B&&(clearTimeout(B.timer),d.current.delete(D),B.onSuccess())}const H=typeof N.workspaceId=="string"?N.workspaceId:"";return H&&n({type:"list_tasks",payload:{workspaceId:H}}),!0}case"task.started":{const D=typeof N.taskId=="string"?N.taskId:"",H=typeof N.sessionId=="string"?N.sessionId:"",B=typeof N.workspaceId=="string"?N.workspaceId:"";return r(F=>D&&F===D?void 0:F),H&&(n({type:"list_sessions"}),D&&i(F=>F.map(R=>R.id===D?{...R,latestSessionId:H}:R))),B?n({type:"list_tasks",payload:{workspaceId:B}}):D&&i(F=>{const R=F.find(I=>I.id===D);return R&&n({type:"list_tasks",payload:{workspaceId:R.workspaceId}}),F}),!0}case"task.completed":case"task.deleted":case"task.updated":{const D=typeof N.workspaceId=="string"?N.workspaceId:"",H=typeof N.taskId=="string"?N.taskId:"";return D?n({type:"list_tasks",payload:{workspaceId:D}}):H&&i(B=>{const F=B.find(R=>R.id===H);return F&&n({type:"list_tasks",payload:{workspaceId:F.workspaceId}}),B}),!0}default:return!1}},[n]),p=S.useCallback(_=>{var N,D,H,B;switch(_.type){case"tasks":{const F=Qn((N=_.payload)==null?void 0:N.tasks,rE,"tasks","tasks"),R=(typeof((D=_.payload)==null?void 0:D.workspaceId)=="string"?_.payload.workspaceId:"")||(F.length>0?F[0].workspaceId:"");return R?(i(I=>[...I.filter(P=>P.workspaceId!==R),...F]),!0):(i(F),!0)}case"create_task_error":{const F=typeof((H=_.payload)==null?void 0:H.requestId)=="string"?_.payload.requestId:"",R=typeof((B=_.payload)==null?void 0:B.message)=="string"?_.payload.message:"Failed to create task";if(F){const I=d.current.get(F);I?(clearTimeout(I.timer),d.current.delete(F),I.onError(R)):console.error("[useTasks] create_task_error with unknown requestId:",R)}else console.error("[useTasks] create_task_error:",R);return!0}default:return!1}},[]),m=S.useCallback(()=>{r(void 0);for(const[,_]of d.current)clearTimeout(_.timer),_.onError("Disconnected");d.current.clear()},[]),g=S.useCallback(_=>{n({type:"list_tasks",payload:{workspaceId:_}})},[n]),y=S.useCallback((_,N,D,H,B,F,R,I,P)=>{const J={workspaceId:_,title:N,description:D||"",dependsOn:H||[],parentTaskId:B||"",defaultPersonaId:F||"",canDecompose:R||!1};if(I||P){const ee=crypto.randomUUID();J.requestId=ee;const ae=P??(()=>{}),te=setTimeout(()=>{d.current.delete(ee)&&ae("Request timed out")},EE);d.current.set(ee,{onSuccess:I??(()=>{}),onError:ae,timer:te})}n({type:"create_task",payload:J})},[n]),v=S.useCallback((_,N,D,H)=>{r(_),n({type:"start_task",payload:{taskId:_,personaId:N||"",environmentId:D||"",notes:H||""}})},[n]),x=S.useCallback(_=>{n({type:"stop_task",payload:{taskId:_}})},[n]),E=S.useCallback(_=>{n({type:"complete_task",payload:{taskId:_}})},[n]),C=S.useCallback(_=>{n({type:"resume_task",payload:{taskId:_}})},[n]),A=S.useCallback((_,N,D,H,B)=>{const F={taskId:_,title:N,description:D,dependsOn:H};B!==void 0&&(F.defaultPersonaId=B),n({type:"update_task",payload:F})},[n]),w=S.useCallback(_=>{n({type:"delete_task",payload:{taskId:_}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:g,createTask:y,startTask:v,stopTask:x,completeTask:E,resumeTask:C,updateTask:A,deleteTask:w,handleMessage:p,handleEvent:u,onDisconnect:m}}function AE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{if(p.type==="finding.posted"){const m=typeof p.payload.workspaceId=="string"?p.payload.workspaceId:"";return m&&n({type:"list_findings",payload:{workspaceId:m}}),!0}return!1},[n]),r=S.useCallback(p=>{var m;switch(p.type){case"findings":return i(Qn((m=p.payload)==null?void 0:m.findings,cE,"findings","findings")),!0;default:return!1}},[]),d=S.useCallback(p=>{n({type:"list_findings",payload:{workspaceId:p}})},[n]),u=S.useCallback((p,m,g,y,v)=>{n({type:"post_finding",payload:{workspaceId:p,title:m,content:g,category:y||"general",tags:v||[]}})},[n]);return{findings:a,loadFindings:d,postFinding:u,handleMessage:r,handleEvent:o}}function kE(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(Qn((g=m.payload)==null?void 0:g.tokens,uE,"tokens","tokens")),!0;default:return!1}},[]),d=S.useCallback(()=>{n({type:"list_tokens"})},[n]),u=S.useCallback((m,g,y,v,x)=>{n({type:"set_token",payload:{name:m,value:g,tokenType:y,envVar:v,filePath:x}})},[n]),p=S.useCallback(m=>{n({type:"delete_token",payload:{name:m}})},[n]);return{tokens:a,loadTokens:d,setToken:u,deleteToken:p,handleMessage:r,handleEvent:o}}function wE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(u=>u.type==="credential.providers_changed"?(Iv(u.payload)&&i(u.payload),!0):!1,[]),r=S.useCallback(u=>{switch(u.type){case"credential_providers":return Iv(u.payload)&&i(u.payload),!0;default:return!1}},[]),d=S.useCallback(u=>{n({type:"set_credential_providers",payload:u})},[n]);return{credentialProviders:a,updateCredentialProviders:d,handleMessage:r,handleEvent:o}}function NE(n,a){const[i,o]=S.useState([]),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState(!1),y=S.useCallback(E=>{var C,A,w;switch(E.type){case"codespaces_list":{const _=Qn((C=E.payload)==null?void 0:C.codespaces,fE,"codespaces_list","codespaces"),N=typeof((A=E.payload)==null?void 0:A.error)=="string"?E.payload.error:"";return o(_),p(N),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const _=typeof((w=E.payload)==null?void 0:w.message)=="string"?E.payload.message:"Failed to create codespace";return d(_),!0}default:return!1}},[n]),v=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),x=S.useCallback((E,C)=>{if(!a){d("Not connected to server. Please try again once the connection is restored.");return}g(!0),d("");const A={repo:E};C&&(A.machine=C),n({type:"create_codespace",payload:A})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:u,codespaceCreating:m,listCodespaces:v,createCodespace:x,handleMessage:y}}function jE(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 y=Qn((g=m.payload)==null?void 0:g.personas,hE,"personas","personas");return i(y),!0}default:return!1}},[]),d=S.useCallback((m,g,y,v,x,E,C,A)=>{n({type:"create_persona",payload:{name:m,description:g,systemPrompt:y,runtime:v||"",model:x||"",maxTurns:E||0,type:C||"agent",script:A||""}})},[n]),u=S.useCallback((m,g,y,v,x,E,C,A,w)=>{const _={personaId:m};g!==void 0&&(_.name=g),y!==void 0&&(_.description=y),v!==void 0&&(_.systemPrompt=v),x!==void 0&&(_.runtime=x),E!==void 0&&(_.model=E),C!==void 0&&(_.maxTurns=C),A!==void 0&&(_.type=A),w!==void 0&&(_.script=w),n({type:"update_persona",payload:_})},[n]),p=S.useCallback(m=>{n({type:"delete_persona",payload:{personaId:m}})},[n]);return{personas:a,createPersona:d,updatePersona:u,deletePersona:p,handleMessage:r,handleEvent:o}}function DE(n){const[a,i]=S.useState(""),[o,r]=S.useState(void 0),{connected:d,send:u}=yE(n,{onMessage:B,onConnect:F,onDisconnect:R}),p=SE(u),m=_E(u),g=TE(u),y=CE(u),v=AE(u),x=kE(u),E=wE(u),C=NE(u,d),A=jE(u),w="default_persona_id",_="onboarding_completed",N=S.useCallback(P=>{i(P),u({type:"set_setting",payload:{key:w,value:P}})},[u]),D=S.useCallback(()=>{r(!0),u({type:"set_setting",payload:{key:_,value:"true"}})},[u]);function H(P){const J=P.payload.key,ee=P.payload.value;if(P.type==="setting.changed"){J===w&&i(ee??""),J===_&&r(ee==="true");return}p.handleEvent(P)||g.handleEvent(P)||y.handleEvent(P)||v.handleEvent(P)||x.handleEvent(P)||E.handleEvent(P)||A.handleEvent(P)}function B(P){var J,ee,ae;if(typeof P.type=="string"&&P.type.includes(".")){const te=P,pe={id:te.id??"",type:P.type,timestamp:te.timestamp??"",payload:P.payload??{}};H(pe);return}if(P.type==="setting"){const te=(J=P.payload)==null?void 0:J.key,pe=(ee=P.payload)==null?void 0:ee.value;te===w&&i(pe??""),te===_&&r(pe==="true");return}if(!p.handleMessage(P)&&!m.handleMessage(P)&&!g.handleMessage(P)&&!y.handleMessage(P)&&!v.handleMessage(P)&&!x.handleMessage(P)&&!E.handleMessage(P)&&!C.handleMessage(P)&&!A.handleMessage(P)&&P.type==="error"){console.error("[ws]",(ae=P.payload)==null?void 0:ae.message);return}}function F(P){P({type:"list_environments"}),P({type:"list_sessions"}),P({type:"list_workspaces"}),P({type:"list_tokens"}),P({type:"get_credential_providers"}),P({type:"list_personas"}),P({type:"get_setting",payload:{key:w}}),P({type:"get_setting",payload:{key:_}}),P({type:"subscribe_all"})}function R(){g.onDisconnect(),y.onDisconnect()}const I=S.useCallback(()=>{u({type:"list_environments"}),u({type:"list_sessions"}),u({type:"list_workspaces"}),u({type:"list_tokens"})},[u]);return{connected:d,environments:p.environments,sessions:m.sessions,events:m.events,eventsDropped:m.eventsDropped,lastSpawnedId:m.lastSpawnedId,workspaces:g.workspaces,tasks:y.tasks,findings:v.findings,tokens:x.tokens,spawn:m.spawn,sendInput:m.sendInput,kill:m.kill,refresh:I,loadSessionEvents:m.loadSessionEvents,clearEvents:m.clearEvents,createWorkspace:g.createWorkspace,archiveWorkspace:g.archiveWorkspace,updateWorkspace:g.updateWorkspace,loadTasks:y.loadTasks,createTask:y.createTask,startTask:y.startTask,stopTask:y.stopTask,completeTask:y.completeTask,resumeTask:y.resumeTask,updateTask:y.updateTask,deleteTask:y.deleteTask,loadFindings:v.loadFindings,postFinding:v.postFinding,addEnvironment:p.addEnvironment,loadTokens:x.loadTokens,setToken:x.setToken,deleteToken:x.deleteToken,credentialProviders:E.credentialProviders,updateCredentialProviders:E.updateCredentialProviders,provisionStatus:p.provisionStatus,provisionEnvironment:p.provisionEnvironment,stopEnvironment:p.stopEnvironment,removeEnvironment:p.removeEnvironment,codespaces:C.codespaces,codespaceError:C.codespaceError,codespaceListError:C.codespaceListError,codespaceCreating:C.codespaceCreating,listCodespaces:C.listCodespaces,createCodespace:C.createCodespace,workspaceCreating:g.workspaceCreating,taskStartingId:y.taskStartingId,personas:A.personas,createPersona:A.createPersona,updatePersona:A.updatePersona,deletePersona:A.deletePersona,taskSessions:m.taskSessions,loadTaskSessions:m.loadTaskSessions,appDefaultPersonaId:a,setAppDefaultPersonaId:N,onboardingCompleted:o,completeOnboarding:D}}const zf=S.createContext(void 0);function ME({children:n}){const a=DE();return h.jsx(zf.Provider,{value:a,children:n})}function Lt(){const n=S.useContext(zf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const RE=[{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}],OE=[{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"}],BE=[{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"}],LE=[{id:"proj-alpha",name:"Workspace Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",environmentId:"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",environmentId:"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:"",environmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],IE=[{id:"task-001",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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:""}],zv=[{id:"find-001",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"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",workspaceId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],UE=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],zE=[{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",type:"agent",script:""},{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",type:"agent",script:""},{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",type:"agent",script:""},{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",type:"agent",script:""}],VE={"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 Bt(n){return new Date(Date.now()+n).toISOString()}const Vv=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Bt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Bt(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:Bt(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:Bt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Bt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Bt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Bt(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:Bt(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:Bt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Bt(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:Bt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Bt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Bt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Bt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Bt(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:Bt(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:Bt(3500),content:"failed"}}]}],Hv=400;function HE({children:n}){const[a,i]=S.useState(OE),[o,r]=S.useState(BE),[d,u]=S.useState(void 0),[p,m]=S.useState(LE),[g,y]=S.useState(IE),[v,x]=S.useState(zv),[E,C]=S.useState(UE),[A,w]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[_,N]=S.useState(zE),[D]=S.useState(VE),[H,B]=S.useState(""),F=S.useRef(0),R=S.useRef(0),I=S.useRef(new Set),P=S.useRef(new Map),J=S.useRef(g);J.current=g;const ee=S.useRef(new Map),ae=S.useRef(new Map),te=S.useCallback(Z=>(F.current+=1,`mock-${Z}-${String(F.current).padStart(3,"0")}`),[]),pe=S.useCallback(()=>{const Z=Vv[R.current%Vv.length];return R.current+=1,Z},[]),oe=S.useCallback((Z,W,ie)=>{const Se=setTimeout(()=>{var ye;I.current.delete(Se),ie&&((ye=P.current.get(ie))==null||ye.delete(Se)),Z()},W);I.current.add(Se),ie&&(P.current.has(ie)||P.current.set(ie,new Set),P.current.get(ie).add(Se))},[]),j=S.useCallback(Z=>{const W=P.current.get(Z);W&&(W.forEach(ie=>{clearTimeout(ie),I.current.delete(ie)}),P.current.delete(Z))},[]),Q=S.useCallback((Z,W)=>{i(ie=>ie.map(Se=>Se.id===Z?{...Se,status:W}:Se))},[]),q=S.useCallback(Z=>{r(W=>[...W,Z])},[]),ue=S.useCallback((Z,W,ie)=>{W.forEach((Se,ye)=>{oe(()=>{const Be={sessionId:Z,...Se.event,timestamp:new Date().toISOString()};q(Be),Se.event.eventType==="status"&&Q(Z,Se.event.content),ye===W.length-1&&ie&&ie()},Se.delayMs,Z)})},[oe,q,Q]),K=S.useCallback((Z,W,ie,Se)=>{console.log("[MockGrackle] spawn",{environmentId:Z,prompt:W,runtime:Se});const ye=te("sess"),Be={id:ye,environmentId:Z,runtime:Se||"claude-code",status:"running",prompt:W,startedAt:new Date().toISOString()};i(ct=>[...ct,Be]),u(ye);const Ce=pe();if(console.log(`[MockGrackle] Playing scenario: ${Ce.label}`),Ce.pauseForInput){const ct=Ce.pauseAfterStep??Ce.steps.length-1,ke=Ce.steps.slice(0,ct+1),Pe=ke.length>0?ke[ke.length-1].delayMs:0;ue(ye,ke),oe(()=>{Q(ye,"idle"),q({sessionId:ye,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Pe+Hv,ye),Ce.resumeSteps&&ee.current.set(ye,Ce.resumeSteps)}else ue(ye,Ce.steps)},[te,pe,ue,oe,Q,q]),Ge=S.useCallback(Z=>{console.log("[MockGrackle] kill",Z),j(Z),ee.current.delete(Z),Q(Z,"interrupted"),q({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(W=>W.map(ie=>ie.latestSessionId===Z&&ie.status==="working"?{...ie,status:"not_started"}:ie))},[j,Q,q]),we=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),ge=S.useCallback(Z=>{console.log("[MockGrackle] loadSessionEvents",Z)},[]),Re=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),gt=S.useCallback((Z,W,ie,Se,ye)=>{console.log("[MockGrackle] createWorkspace",{name:Z,description:W});const Be={id:te("proj"),name:Z,description:W||"",repoUrl:ie||"",environmentId:Se||"",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:ye||"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(Ce=>[...Ce,Be])},[te]),Rt=S.useCallback(Z=>{console.log("[MockGrackle] archiveWorkspace",Z),m(W=>W.map(ie=>ie.id===Z?{...ie,status:"archived"}:ie))},[]),ne=S.useCallback(Z=>{console.log("[MockGrackle] loadTasks",Z)},[]),fe=S.useCallback((Z,W,ie,Se,ye,Be,Ce,ct,ke)=>{console.log("[MockGrackle] createTask",{workspaceId:Z,title:W,parentTaskId:ye}),y(Pe=>{const Ue=Pe.filter(dt=>dt.workspaceId===Z).reduce((dt,se)=>Math.max(dt,se.sortOrder),0),ht=ye?Pe.find(dt=>dt.id===ye):void 0;if(ye&&!ht)return console.warn("[MockGrackle] Parent task not found:",ye),Pe;if(ht&&!ht.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",ye),Pe;const Te=ht?ht.depth+1:0,Ie={id:te("task"),workspaceId:Z,title:W,description:ie||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:Se||[],reviewNotes:void 0,sortOrder:Ue+1,createdAt:new Date().toISOString(),parentTaskId:ye||"",depth:Te,childTaskIds:[],canDecompose:Ce??!ye,defaultPersonaId:Be||""};return[...Pe,Ie]}),ct&&ct()},[te]),de=S.useCallback((Z,W,ie,Se)=>{var Pe;console.log("[MockGrackle] startTask",{taskId:Z});const ye=J.current.find(ut=>ut.id===Z),Be=(ye==null?void 0:ye.title)??"",Ce=te("sess"),ct={id:Ce,environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:Be||Z,startedAt:new Date().toISOString()};i(ut=>[...ut,ct]),y(ut=>ut.map(Ue=>Ue.id===Z?{...Ue,status:"working",latestSessionId:Ce,branch:`mock/${Z.slice(0,8)}`}:Ue));const ke=pe();if(console.log(`[MockGrackle] Playing task scenario: ${ke.label}`),ke.pauseForInput){const ut=ke.pauseAfterStep??ke.steps.length-1,Ue=ke.steps.slice(0,ut+1),ht=Ue.length>0?Ue[Ue.length-1].delayMs:0;if(ue(Ce,Ue),oe(()=>{Q(Ce,"idle"),q({sessionId:Ce,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},ht+Hv,Ce),ke.resumeSteps){const Te=[...ke.resumeSteps];ee.current.set(Ce,Te);const Ie=Te.reduce((dt,se)=>Math.max(dt,se.delayMs),0);ae.current.set(Ce,{taskId:Z,delayAfterResume:Ie+200})}}else{const ut=ke.steps.length>0?ke.steps[ke.steps.length-1].delayMs:0;ue(Ce,ke.steps);const Ue=(Pe=ke.steps[ke.steps.length-1])==null?void 0:Pe.event.content;oe(()=>{Ue==="completed"?y(ht=>ht.map(Te=>Te.id===Z&&Te.status==="working"?{...Te,status:"paused"}:Te)):Ue==="failed"&&y(ht=>ht.map(Te=>Te.id===Z&&Te.status==="working"?{...Te,status:"failed"}:Te))},ut+100,Ce)}},[te,pe,ue,oe,Q,q]),Qe=S.useCallback((Z,W)=>{console.log("[MockGrackle] sendInput",{sessionId:Z,text:W}),q({sessionId:Z,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${W}`}),Q(Z,"running"),q({sessionId:Z,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const ie=ee.current.get(Z);if(ie)ee.current.delete(Z),ue(Z,ie);else{const ye=[{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"}}];ue(Z,ye)}const Se=ae.current.get(Z);Se&&(ae.current.delete(Z),oe(()=>{y(ye=>ye.map(Be=>Be.id===Se.taskId&&Be.status==="working"?{...Be,status:"paused"}:Be))},Se.delayAfterResume,Z))},[q,Q,ue,oe]),We=S.useCallback(Z=>{console.log("[MockGrackle] completeTask",Z),y(W=>W.map(ie=>ie.id===Z?{...ie,status:"complete"}:ie))},[]),It=S.useCallback(Z=>{console.log("[MockGrackle] resumeTask",Z)},[]),Ct=S.useCallback((Z,W,ie,Se,ye)=>{console.log("[MockGrackle] updateTask",{taskId:Z,title:W}),y(Be=>Be.map(Ce=>Ce.id===Z?{...Ce,title:W.trim()||Ce.title,description:ie,dependsOn:Se,...ye!==void 0?{defaultPersonaId:ye}:{}}:Ce))},[]),At=S.useCallback(Z=>{console.log("[MockGrackle] deleteTask",Z),y(W=>W.filter(ie=>ie.id!==Z))},[]),at=S.useCallback(Z=>{console.log("[MockGrackle] loadFindings",Z),x(zv.filter(W=>W.workspaceId===Z))},[]),Oe=S.useCallback((Z,W,ie,Se,ye)=>{console.log("[MockGrackle] postFinding",{workspaceId:Z,title:W});const Be={id:te("find"),workspaceId:Z,taskId:"",sessionId:"",category:Se||"general",title:W,content:ie,tags:ye||[],createdAt:new Date().toISOString()};x(Ce=>[...Ce,Be])},[te]),Hn=S.useCallback((Z,W,ie)=>{console.log("[MockGrackle] addEnvironment",{displayName:Z,adapterType:W,adapterConfig:ie})},[]),ka=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Gn=S.useCallback((Z,W,ie,Se,ye)=>{console.log("[MockGrackle] setToken",{name:Z,tokenType:ie}),C(Be=>[...Be.filter(ct=>ct.name!==Z),{name:Z,tokenType:ie,envVar:Se,filePath:ye,expiresAt:""}])},[]),ea=S.useCallback(Z=>{console.log("[MockGrackle] deleteToken",Z),C(W=>W.filter(ie=>ie.name!==Z))},[]),Bn=S.useCallback(Z=>{console.log("[MockGrackle] updateCredentialProviders",Z),w(Z)},[]);S.useEffect(()=>()=>{I.current.forEach(clearTimeout),I.current.clear()},[]);const ta=S.useMemo(()=>({connected:!0,environments:RE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:d,workspaces:p,tasks:g,findings:v,tokens:E,credentialProviders:A,spawn:K,sendInput:Qe,kill:Ge,refresh:we,loadSessionEvents:ge,clearEvents:Re,createWorkspace:gt,archiveWorkspace:Rt,updateWorkspace:(Z,W)=>{console.log("[MockGrackle] updateWorkspace",{workspaceId:Z,...W}),m(ie=>ie.map(Se=>Se.id!==Z?Se:{...Se,...W.name!==void 0?{name:W.name}:{},...W.description!==void 0?{description:W.description}:{},...W.repoUrl!==void 0?{repoUrl:W.repoUrl}:{},...W.environmentId!==void 0?{environmentId:W.environmentId}:{},...W.worktreeBasePath!==void 0?{worktreeBasePath:W.worktreeBasePath}:{},...W.useWorktrees!==void 0?{useWorktrees:W.useWorktrees}:{},...W.defaultPersonaId!==void 0?{defaultPersonaId:W.defaultPersonaId}:{},updatedAt:new Date().toISOString()}))},loadTasks:ne,createTask:fe,startTask:de,stopTask:Z=>{console.log("[MockGrackle] stopTask",{taskId:Z}),We(Z)},completeTask:We,resumeTask:It,updateTask:Ct,deleteTask:At,loadFindings:at,postFinding:Oe,addEnvironment:Hn,loadTokens:ka,setToken:Gn,deleteToken:ea,updateCredentialProviders:Bn,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},workspaceCreating:!1,taskStartingId:void 0,personas:_,createPersona:(Z,W,ie,Se,ye,Be,Ce,ct)=>{console.log("[MockGrackle] createPersona",{name:Z});const ke={id:`mock-persona-${Date.now()}`,name:Z,description:W,systemPrompt:ie,toolConfig:"{}",runtime:Se??"claude-code",model:ye||"",maxTurns:Be||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),type:Ce||"agent",script:ct||""};N(Pe=>[...Pe,ke])},updatePersona:(Z,W,ie,Se,ye,Be,Ce,ct,ke)=>{console.log("[MockGrackle] updatePersona",{personaId:Z,name:W}),N(Pe=>Pe.map(ut=>ut.id!==Z?ut:{...ut,...W!==void 0?{name:W}:{},...ie!==void 0?{description:ie}:{},...Se!==void 0?{systemPrompt:Se}:{},...ye!==void 0?{runtime:ye}:{},...Be!==void 0?{model:Be}:{},...Ce!==void 0?{maxTurns:Ce}:{},...ct!==void 0?{type:ct}:{},...ke!==void 0?{script:ke}:{},updatedAt:new Date().toISOString()}))},deletePersona:Z=>{console.log("[MockGrackle] deletePersona",Z),N(W=>W.filter(ie=>ie.id!==Z))},taskSessions:D,loadTaskSessions:Z=>{console.log("[MockGrackle] loadTaskSessions",Z)},appDefaultPersonaId:H,setAppDefaultPersonaId:Z=>{console.log("[MockGrackle] setAppDefaultPersonaId",Z),B(Z)},onboardingCompleted:!0,completeOnboarding:()=>{console.log("[MockGrackle] completeOnboarding")}}),[a,o,d,p,g,v,E,A,_,D,H,K,Qe,Ge,we,ge,Re,gt,Rt,ne,fe,de,We,It,Ct,At,at,Oe,Hn,ka,Gn,ea,Bn]);return h.jsx(zf.Provider,{value:ta,children:n})}const q0=S.createContext(void 0),GE=4e3;function PE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(u=>{i(p=>p.filter(m=>m.id!==u))},[]),d=S.useCallback((u,p="info",m=GE)=>{const g=`toast-${++o.current}`;i(y=>[...y,{id:g,message:u,variant:p,duration:m}])},[]);return h.jsx(q0.Provider,{value:{toasts:a,showToast:d,dismissToast:r},children:n})}function so(){const n=S.useContext(q0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const ac=[{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"]}],Y0=new Set(ac.map(n=>n.id)),Gv="grackle";function tf(n){return ac.find(a=>a.id===n)}const nf="grackle-theme",K0="grackle-prefer-system",Z0="(prefers-color-scheme: dark)";let Ul=[],Br;function Dd(){Br=void 0;for(const n of Ul)n()}function af(){return typeof window>"u"?!1:window.matchMedia(Z0).matches}function Gl(){if(typeof localStorage>"u")return Gv;try{const n=localStorage.getItem(nf);if(n!==null&&Y0.has(n))return n}catch{}return Gv}function zr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(K0)==="true"}catch{return!1}}function sf(n){return ac.find(a=>a.variantLightId===n||a.variantDarkId===n)}function X0(n,a){const i=tf(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?af()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=sf(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return af()?o.variantDarkId:o.variantLightId}return n}function Ti(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=X0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ti(Gl(),zr());function FE(){return Br===void 0&&(Br={themeId:Gl(),systemDark:af(),preferSystem:zr()}),Br}function $E(n){return Ul=[...Ul,n],()=>{Ul=Ul.filter(a=>a!==n)}}function qE(){const n=S.useSyncExternalStore($E,FE),{themeId:a,preferSystem:i}=n,o=X0(a,i),r=S.useCallback(u=>{if(Y0.has(u)){try{localStorage.setItem(nf,u)}catch{}Ti(u,zr(),!0),Dd()}},[]),d=S.useCallback(u=>{try{localStorage.setItem(K0,u?"true":"false")}catch{}if(u){const p=Gl(),m=tf(p);if(m!=null&&m.hidden){const g=sf(p);if(g)try{localStorage.setItem(nf,g.id)}catch{}}}Ti(Gl(),u,!0),Dd()},[]);return S.useEffect(()=>{Ti(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia(Z0),p=()=>{const m=Gl(),g=zr();if(g){const y=tf(m);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ti(m,g),y!=null&&y.hidden){const v=sf(m);v!=null&&v.variantDarkId&&v.variantLightId&&Ti(m,g)}}Dd()};return u.addEventListener("change",p),()=>{u.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:d}}const Q0=S.createContext(void 0);function YE({children:n}){const a=qE();return h.jsx(Q0.Provider,{value:a,children:n})}function W0(){const n=S.useContext(Q0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const KE="_container_eix8p_1",ZE="_hamburger_eix8p_33",XE="_brand_eix8p_49",QE="_info_eix8p_65",WE="_connectionLabel_eix8p_80",JE="_connectionDot_eix8p_93",eC="_connected_eix8p_96",tC="_disconnected_eix8p_100",nC="_settingsButton_eix8p_104",Sa={container:KE,hamburger:ZE,brand:XE,info:QE,connectionLabel:WE,connectionDot:JE,connected:eC,disconnected:tC,settingsButton:nC};function aC({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=Lt(),d=On(),u=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:Sa.container,children:[n&&h.jsx("button",{type:"button",className:Sa.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:Sa.brand,onClick:()=>d("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Sa.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${Sa.connectionDot} ${i?Sa.connected:Sa.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:Sa.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",u," env",u!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:Sa.settingsButton,onClick:()=>d(Di),title:"Settings",children:"⚙"})]})]})}const Vf=S.createContext({});function Hf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const sc=S.createContext(null),Gf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class sC 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 iC({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(Gf);return S.useInsertionEffect(()=>{const{width:u,height:p,top:m,left:g}=r.current;if(a||!o.current||!u||!p)return;o.current.dataset.motionPopId=i;const y=document.createElement("style");return d&&(y.nonce=d),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
79
- [data-motion-pop-id="${i}"] {
80
- position: absolute !important;
81
- width: ${u}px !important;
82
- height: ${p}px !important;
83
- top: ${m}px !important;
84
- left: ${g}px !important;
85
- }
86
- `),()=>{document.head.removeChild(y)}},[a]),h.jsx(sC,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const lC=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:d,mode:u})=>{const p=Hf(oC),m=S.useId(),g=S.useCallback(v=>{p.set(v,!0);for(const x of p.values())if(!x)return;o&&o()},[p,o]),y=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:v=>(p.set(v,!1),()=>p.delete(v))}),d?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((v,x)=>p.set(x,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),u==="popLayout"&&(n=h.jsx(iC,{isPresent:i,children:n})),h.jsx(sc.Provider,{value:y,children:n})};function oC(){return new Map}function J0(n=!0){const a=S.useContext(sc);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,d=S.useId();S.useEffect(()=>{n&&r(d)},[n]);const u=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!i&&o?[!1,u]:[!0]}const Ar=n=>n.key||"";function Pv(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Pf=typeof window<"u",eb=Pf?S.useLayoutEffect:S.useEffect,Mn=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:d="sync",propagate:u=!1})=>{const[p,m]=J0(u),g=S.useMemo(()=>Pv(n),[n]),y=u&&!p?[]:g.map(Ar),v=S.useRef(!0),x=S.useRef(g),E=Hf(()=>new Map),[C,A]=S.useState(g),[w,_]=S.useState(g);eb(()=>{v.current=!1,x.current=g;for(let H=0;H<w.length;H++){const B=Ar(w[H]);y.includes(B)?E.delete(B):E.get(B)!==!0&&E.set(B,!1)}},[w,y.length,y.join("-")]);const N=[];if(g!==C){let H=[...g];for(let B=0;B<w.length;B++){const F=w[B],R=Ar(F);y.includes(R)||(H.splice(B,0,F),N.push(F))}d==="wait"&&N.length&&(H=N),_(Pv(H)),A(g);return}const{forceRender:D}=S.useContext(Vf);return h.jsx(h.Fragment,{children:w.map(H=>{const B=Ar(H),F=u&&!p?!1:g===w||y.includes(B),R=()=>{if(E.has(B))E.set(B,!0);else return;let I=!0;E.forEach(P=>{P||(I=!1)}),I&&(D==null||D(),_(x.current),u&&(m==null||m()),o&&o())};return h.jsx(lC,{isPresent:F,initial:!v.current||i?void 0:!1,custom:F?void 0:a,presenceAffectsLayout:r,mode:d,onExitComplete:F?void 0:R,children:H},B)})})},mn=n=>n;let tb=mn;const rC={useManualTiming:!1};function cC(n){let a=new Set,i=new Set,o=!1,r=!1;const d=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function p(g){d.has(g)&&(m.schedule(g),n()),g(u)}const m={schedule:(g,y=!1,v=!1)=>{const E=v&&o?a:i;return y&&d.add(g),E.has(g)||E.add(g),g},cancel:g=>{i.delete(g),d.delete(g)},process:g=>{if(u=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 kr=["read","resolveKeyframes","update","preRender","render","postRender"],uC=40;function nb(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},d=()=>i=!0,u=kr.reduce((_,N)=>(_[N]=cC(d),_),{}),{read:p,resolveKeyframes:m,update:g,preRender:y,render:v,postRender:x}=u,E=()=>{const _=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(_-r.timestamp,uC),1),r.timestamp=_,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),y.process(r),v.process(r),x.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(E))},C=()=>{i=!0,o=!0,r.isProcessing||n(E)};return{schedule:kr.reduce((_,N)=>{const D=u[N];return _[N]=(H,B=!1,F=!1)=>(i||C(),D.schedule(H,B,F)),_},{}),cancel:_=>{for(let N=0;N<kr.length;N++)u[kr[N]].cancel(_)},state:r,steps:u}}const{schedule:rt,cancel:as,state:$t,steps:Md}=nb(typeof requestAnimationFrame<"u"?requestAnimationFrame:mn,!0),ab=S.createContext({strict:!1}),Fv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Mi={};for(const n in Fv)Mi[n]={isEnabled:a=>Fv[n].some(i=>!!a[i])};function dC(n){for(const a in n)Mi[a]={...Mi[a],...n[a]}}const fC=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 Vr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||fC.has(n)}let sb=n=>!Vr(n);function hC(n){n&&(sb=a=>a.startsWith("on")?!Vr(a):n(a))}try{hC(require("@emotion/is-prop-valid").default)}catch{}function pC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(sb(r)||i===!0&&Vr(r)||!a&&!Vr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function mC(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 ic=S.createContext({});function Ql(n){return typeof n=="string"||Array.isArray(n)}function lc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Ff=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$f=["initial",...Ff];function oc(n){return lc(n.animate)||$f.some(a=>Ql(n[a]))}function ib(n){return!!(oc(n)||n.variants)}function gC(n,a){if(oc(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Ql(i)?i:void 0,animate:Ql(o)?o:void 0}}return n.inherit!==!1?a:{}}function vC(n){const{initial:a,animate:i}=gC(n,S.useContext(ic));return S.useMemo(()=>({initial:a,animate:i}),[$v(a),$v(i)])}function $v(n){return Array.isArray(n)?n.join(" "):n}const yC=Symbol.for("motionComponentSymbol");function Ei(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function bC(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 qf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),SC="framerAppearId",lb="data-"+qf(SC),{schedule:Yf}=nb(queueMicrotask,!1),ob=S.createContext({});function xC(n,a,i,o,r){var d,u;const{visualElement:p}=S.useContext(ic),m=S.useContext(ab),g=S.useContext(sc),y=S.useContext(Gf).reducedMotion,v=S.useRef(null);o=o||m.renderer,!v.current&&o&&(v.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y}));const x=v.current,E=S.useContext(ob);x&&!x.projection&&r&&(x.type==="html"||x.type==="svg")&&_C(v.current,i,r,E);const C=S.useRef(!1);S.useInsertionEffect(()=>{x&&C.current&&x.update(i,g)});const A=i[lb],w=S.useRef(!!A&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,A))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,A)));return eb(()=>{x&&(C.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),Yf.render(x.render),w.current&&x.animationState&&x.animationState.animateChanges())}),S.useEffect(()=>{x&&(!w.current&&x.animationState&&x.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)===null||_===void 0||_.call(window,A)}),w.current=!1))}),x}function _C(n,a,i,o){const{layoutId:r,layout:d,drag:u,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:rb(n.parent)),n.projection.setOptions({layoutId:r,layout:d,alwaysMeasureLayout:!!u||p&&Ei(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function rb(n){if(n)return n.options.allowProjection!==!1?n.projection:rb(n.parent)}function TC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var d,u;n&&dC(n);function p(g,y){let v;const x={...S.useContext(Gf),...g,layoutId:EC(g)},{isStatic:E}=x,C=vC(g),A=o(g,E);if(!E&&Pf){CC();const w=AC(x);v=w.MeasureLayout,C.visualElement=xC(r,A,x,a,w.ProjectionNode)}return h.jsxs(ic.Provider,{value:C,children:[v&&C.visualElement?h.jsx(v,{visualElement:C.visualElement,...x}):null,i(r,g,bC(A,C.visualElement,y),A,E,C.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(u=(d=r.displayName)!==null&&d!==void 0?d:r.name)!==null&&u!==void 0?u:""})`}`;const m=S.forwardRef(p);return m[yC]=r,m}function EC({layoutId:n}){const a=S.useContext(Vf).id;return a&&n!==void 0?a+"-"+n:n}function CC(n,a){S.useContext(ab).strict}function AC(n){const{drag:a,layout:i}=Mi;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 kC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Kf(n){return typeof n!="string"||n.includes("-")?!1:!!(kC.indexOf(n)>-1||/[A-Z]/u.test(n))}function qv(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function Zf(n,a,i,o){if(typeof a=="function"){const[r,d]=qv(o);a=a(i!==void 0?i:n.custom,r,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,d]=qv(o);a=a(i!==void 0?i:n.custom,r,d)}return a}const lf=n=>Array.isArray(n),wC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),NC=n=>lf(n)?n[n.length-1]||0:n,Kt=n=>!!(n&&n.getVelocity);function Lr(n){const a=Kt(n)?n.get():n;return wC(a)?a.toValue():a}function jC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,d){const u={latestValues:DC(o,r,d,n),renderState:a()};return i&&(u.onMount=p=>i({props:o,current:p,...u}),u.onUpdate=p=>i(p)),u}const cb=n=>(a,i)=>{const o=S.useContext(ic),r=S.useContext(sc),d=()=>jC(n,a,o,r);return i?d():Hf(d)};function DC(n,a,i,o){const r={},d=o(n,{});for(const x in d)r[x]=Lr(d[x]);let{initial:u,animate:p}=n;const m=oc(n),g=ib(n);a&&g&&!m&&n.inherit!==!1&&(u===void 0&&(u=a.initial),p===void 0&&(p=a.animate));let y=i?i.initial===!1:!1;y=y||u===!1;const v=y?p:u;if(v&&typeof v!="boolean"&&!lc(v)){const x=Array.isArray(v)?v:[v];for(let E=0;E<x.length;E++){const C=Zf(n,x[E]);if(C){const{transitionEnd:A,transition:w,..._}=C;for(const N in _){let D=_[N];if(Array.isArray(D)){const H=y?D.length-1:0;D=D[H]}D!==null&&(r[N]=D)}for(const N in A)r[N]=A[N]}}}return r}const Ui=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ls=new Set(Ui),ub=n=>a=>typeof a=="string"&&a.startsWith(n),db=ub("--"),MC=ub("var(--"),Xf=n=>MC(n)?RC.test(n.split("/*")[0].trim()):!1,RC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fb=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Ca=(n,a,i)=>i>a?a:i<n?n:i,zi={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Wl={...zi,transform:n=>Ca(0,1,n)},wr={...zi,default:1},io=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Wa=io("deg"),Wn=io("%"),be=io("px"),OC=io("vh"),BC=io("vw"),Yv={...Wn,parse:n=>Wn.parse(n)/100,transform:n=>Wn.transform(n*100)},LC={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,radius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,backgroundPositionX:be,backgroundPositionY:be},IC={rotate:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:wr,scaleX:wr,scaleY:wr,scaleZ:wr,skew:Wa,skewX:Wa,skewY:Wa,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:Wl,originX:Yv,originY:Yv,originZ:be},Kv={...zi,transform:Math.round},Qf={...LC,...IC,zIndex:Kv,size:be,fillOpacity:Wl,strokeOpacity:Wl,numOctaves:Kv},UC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zC=Ui.length;function VC(n,a,i){let o="",r=!0;for(let d=0;d<zC;d++){const u=Ui[d],p=n[u];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(u.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=fb(p,Qf[u]);if(!m){r=!1;const y=UC[u]||u;o+=`${y}(${g}) `}i&&(a[u]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function Wf(n,a,i){const{style:o,vars:r,transformOrigin:d}=n;let u=!1,p=!1;for(const m in a){const g=a[m];if(Ls.has(m)){u=!0;continue}else if(db(m)){r[m]=g;continue}else{const y=fb(g,Qf[m]);m.startsWith("origin")?(p=!0,d[m]=y):o[m]=y}}if(a.transform||(u||i?o.transform=VC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:y=0}=d;o.transformOrigin=`${m} ${g} ${y}`}}const HC={offset:"stroke-dashoffset",array:"stroke-dasharray"},GC={offset:"strokeDashoffset",array:"strokeDasharray"};function PC(n,a,i=1,o=0,r=!0){n.pathLength=1;const d=r?HC:GC;n[d.offset]=be.transform(-o);const u=be.transform(a),p=be.transform(i);n[d.array]=`${u} ${p}`}function Zv(n,a,i){return typeof n=="string"?n:be.transform(a+i*n)}function FC(n,a,i){const o=Zv(a,n.x,n.width),r=Zv(i,n.y,n.height);return`${o} ${r}`}function Jf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:d,pathLength:u,pathSpacing:p=1,pathOffset:m=0,...g},y,v){if(Wf(n,g,v),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:x,style:E,dimensions:C}=n;x.transform&&(C&&(E.transform=x.transform),delete x.transform),C&&(r!==void 0||d!==void 0||E.transform)&&(E.transformOrigin=FC(C,r!==void 0?r:.5,d!==void 0?d:.5)),a!==void 0&&(x.x=a),i!==void 0&&(x.y=i),o!==void 0&&(x.scale=o),u!==void 0&&PC(x,u,p,m,!1)}const eh=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),hb=()=>({...eh(),attrs:{}}),th=n=>typeof n=="string"&&n.toLowerCase()==="svg";function pb(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const d in i)n.style.setProperty(d,i[d])}const mb=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 gb(n,a,i,o){pb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(mb.has(r)?r:qf(r),a.attrs[r])}const Hr={};function $C(n){Object.assign(Hr,n)}function vb(n,{layout:a,layoutId:i}){return Ls.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Hr[n]||n==="opacity")}function nh(n,a,i){var o;const{style:r}=n,d={};for(const u in r)(Kt(r[u])||a.style&&Kt(a.style[u])||vb(u,n)||((o=i==null?void 0:i.getValue(u))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[u]=r[u]);return d}function yb(n,a,i){const o=nh(n,a,i);for(const r in n)if(Kt(n[r])||Kt(a[r])){const d=Ui.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[d]=n[r]}return o}function qC(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 Xv=["x","y","width","height","cx","cy","r"],YC={useVisualState:cb({scrapeMotionValuesFromProps:yb,createRenderState:hb,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let d=!!n.drag;if(!d){for(const p in r)if(Ls.has(p)){d=!0;break}}if(!d)return;let u=!a;if(a)for(let p=0;p<Xv.length;p++){const m=Xv[p];n[m]!==a[m]&&(u=!0)}u&&rt.read(()=>{qC(i,o),rt.render(()=>{Jf(o,r,th(i.tagName),n.transformTemplate),gb(i,o)})})}})},KC={useVisualState:cb({scrapeMotionValuesFromProps:nh,createRenderState:eh})};function bb(n,a,i){for(const o in a)!Kt(a[o])&&!vb(o,i)&&(n[o]=a[o])}function ZC({transformTemplate:n},a){return S.useMemo(()=>{const i=eh();return Wf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function XC(n,a){const i=n.style||{},o={};return bb(o,i,n),Object.assign(o,ZC(n,a)),o}function QC(n,a){const i={},o=XC(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 WC(n,a,i,o){const r=S.useMemo(()=>{const d=hb();return Jf(d,a,th(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};bb(d,n.style,n),r.style={...d,...r.style}}return r}function JC(n=!1){return(i,o,r,{latestValues:d},u)=>{const m=(Kf(i)?WC:QC)(o,d,u,i),g=pC(o,typeof i=="string",n),y=i!==S.Fragment?{...g,...m,ref:r}:{},{children:v}=o,x=S.useMemo(()=>Kt(v)?v.get():v,[v]);return S.createElement(i,{...y,children:x})}}function eA(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const u={...Kf(o)?YC:KC,preloadedFeatures:n,useRender:JC(r),createVisualElement:a,Component:o};return TC(u)}}function Sb(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 rc(n,a,i){const o=n.getProps();return Zf(o,a,i!==void 0?i:o.custom,n)}function ah(n,a){return n?n[a]||n.default||n:void 0}const xb=new Set(["width","height","top","left","right","bottom",...Ui]);let Ir;function tA(){Ir=void 0}const Jn={now:()=>(Ir===void 0&&Jn.set($t.isProcessing||rC.useManualTiming?$t.timestamp:performance.now()),Ir),set:n=>{Ir=n,queueMicrotask(tA)}};function sh(n,a){n.indexOf(a)===-1&&n.push(a)}function ih(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class lh{constructor(){this.subscriptions=[]}add(a){return sh(this.subscriptions,a),()=>ih(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 d=0;d<r;d++){const u=this.subscriptions[d];u&&u(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _b(n,a){return a?n*(1e3/a):0}const Qv=30,nA=n=>!isNaN(parseFloat(n));class aA{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const d=Jn.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),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=Jn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=nA(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 lh);const o=this.events[a].add(i);return a==="change"?()=>{o(),rt.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=Jn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Qv)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Qv);return _b(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 Jl(n,a){return new aA(n,a)}function sA(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Jl(i))}function iA(n,a){const i=rc(n,a);let{transitionEnd:o={},transition:r={},...d}=i||{};d={...d,...o};for(const u in d){const p=NC(d[u]);sA(n,u,p)}}function lA(n){return!!(Kt(n)&&n.add)}function of(n,a){const i=n.getValue("willChange");if(lA(i))return i.add(a)}function Tb(n){return n.props[lb]}function oh(n){let a;return()=>(a===void 0&&(a=n()),a)}const oA=oh(()=>window.ScrollTimeline!==void 0);class rA{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(oA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,d)=>{r&&r(),this.animations[d].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 cA extends rA{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const _a=n=>n*1e3,Ta=n=>n/1e3;function rh(n){return typeof n=="function"}function Wv(n,a){n.timeline=a,n.onfinish=null}const ch=n=>Array.isArray(n)&&typeof n[0]=="number",uA={linearEasing:void 0};function dA(n,a){const i=oh(n);return()=>{var o;return(o=uA[a])!==null&&o!==void 0?o:i()}}const Gr=dA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},Eb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let d=0;d<r;d++)o+=n(Ri(0,r-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function Cb(n){return!!(typeof n=="function"&&Gr()||!n||typeof n=="string"&&(n in rf||Gr())||ch(n)||Array.isArray(n)&&n.every(Cb))}const zl=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,rf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zl([0,.65,.55,1]),circOut:zl([.55,0,1,.45]),backIn:zl([.31,.01,.66,-.59]),backOut:zl([.33,1.53,.69,.99])};function Ab(n,a){if(n)return typeof n=="function"&&Gr()?Eb(n,a):ch(n)?zl(n):Array.isArray(n)?n.map(i=>Ab(i,a)||rf.easeOut):rf[n]}const kb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,fA=1e-7,hA=12;function pA(n,a,i,o,r){let d,u,p=0;do u=a+(i-a)/2,d=kb(u,o,r)-n,d>0?i=u:a=u;while(Math.abs(d)>fA&&++p<hA);return u}function lo(n,a,i,o){if(n===a&&i===o)return mn;const r=d=>pA(d,0,1,n,i);return d=>d===0||d===1?d:kb(r(d),a,o)}const wb=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,Nb=n=>a=>1-n(1-a),jb=lo(.33,1.53,.69,.99),uh=Nb(jb),Db=wb(uh),Mb=n=>(n*=2)<1?.5*uh(n):.5*(2-Math.pow(2,-10*(n-1))),dh=n=>1-Math.sin(Math.acos(n)),Rb=Nb(dh),Ob=wb(dh),Bb=n=>/^0[^.\s]+$/u.test(n);function mA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Bb(n):!0}const Pl=n=>Math.round(n*1e5)/1e5,fh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function gA(n){return n==null}const vA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hh=(n,a)=>i=>!!(typeof i=="string"&&vA.test(i)&&i.startsWith(n)||a&&!gA(i)&&Object.prototype.hasOwnProperty.call(i,a)),Lb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,d,u,p]=o.match(fh);return{[n]:parseFloat(r),[a]:parseFloat(d),[i]:parseFloat(u),alpha:p!==void 0?parseFloat(p):1}},yA=n=>Ca(0,255,n),Rd={...zi,transform:n=>Math.round(yA(n))},Ms={test:hh("rgb","red"),parse:Lb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+Rd.transform(n)+", "+Rd.transform(a)+", "+Rd.transform(i)+", "+Pl(Wl.transform(o))+")"};function bA(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 cf={test:hh("#"),parse:bA,transform:Ms.transform},Ci={test:hh("hsl","hue"),parse:Lb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Wn.transform(Pl(a))+", "+Wn.transform(Pl(i))+", "+Pl(Wl.transform(o))+")"},Yt={test:n=>Ms.test(n)||cf.test(n)||Ci.test(n),parse:n=>Ms.test(n)?Ms.parse(n):Ci.test(n)?Ci.parse(n):cf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ms.transform(n):Ci.transform(n)},SA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(fh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(SA))===null||i===void 0?void 0:i.length)||0)>0}const Ib="number",Ub="color",_A="var",TA="var(",Jv="${}",EA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eo(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let d=0;const p=a.replace(EA,m=>(Yt.test(m)?(o.color.push(d),r.push(Ub),i.push(Yt.parse(m))):m.startsWith(TA)?(o.var.push(d),r.push(_A),i.push(m)):(o.number.push(d),r.push(Ib),i.push(parseFloat(m))),++d,Jv)).split(Jv);return{values:i,split:p,indexes:o,types:r}}function zb(n){return eo(n).values}function Vb(n){const{split:a,types:i}=eo(n),o=a.length;return r=>{let d="";for(let u=0;u<o;u++)if(d+=a[u],r[u]!==void 0){const p=i[u];p===Ib?d+=Pl(r[u]):p===Ub?d+=Yt.transform(r[u]):d+=r[u]}return d}}const CA=n=>typeof n=="number"?0:n;function AA(n){const a=zb(n);return Vb(n)(a.map(CA))}const ss={test:xA,parse:zb,createTransformer:Vb,getAnimatableNone:AA},kA=new Set(["brightness","contrast","saturate","opacity"]);function wA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(fh)||[];if(!o)return n;const r=i.replace(o,"");let d=kA.has(a)?1:0;return o!==i&&(d*=100),a+"("+d+r+")"}const NA=/\b([a-z-]*)\(.*?\)/gu,uf={...ss,getAnimatableNone:n=>{const a=n.match(NA);return a?a.map(wA).join(" "):n}},jA={...Qf,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:uf,WebkitFilter:uf},ph=n=>jA[n];function Hb(n,a){let i=ph(n);return i!==uf&&(i=ss),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const DA=new Set(["auto","none","0"]);function MA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const d=n[o];typeof d=="string"&&!DA.has(d)&&eo(d).values.length&&(r=n[o]),o++}if(r&&i)for(const d of a)n[d]=Hb(i,r)}const ey=n=>n===zi||n===be,ty=(n,a)=>parseFloat(n.split(", ")[a]),ny=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return ty(r[1],a);{const d=o.match(/^matrix\((.+)\)$/u);return d?ty(d[1],n):0}},RA=new Set(["x","y","z"]),OA=Ui.filter(n=>!RA.has(n));function BA(n){const a=[];return OA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Oi={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:ny(4,13),y:ny(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Rs=new Set;let df=!1,ff=!1;function Gb(){if(ff){const n=Array.from(Rs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=BA(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(([d,u])=>{var p;(p=o.getValue(d))===null||p===void 0||p.set(u)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}ff=!1,df=!1,Rs.forEach(n=>n.complete()),Rs.clear()}function Pb(){Rs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(ff=!0)})}function LA(){Pb(),Gb()}class mh{constructor(a,i,o,r,d,u=!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=d,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rs.add(this),df||(df=!0,rt.read(Pb),rt.resolveKeyframes(Gb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let d=0;d<a.length;d++)if(a[d]===null)if(d===0){const u=r==null?void 0:r.get(),p=a[a.length-1];if(u!==void 0)a[0]=u;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&u===void 0&&r.set(a[0])}else a[d]=a[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Rs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Rs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Fb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),IA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function UA(n){const a=IA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function $b(n,a,i=1){const[o,r]=UA(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const u=d.trim();return Fb(u)?parseFloat(u):u}return Xf(r)?$b(r,a,i+1):r}const qb=n=>a=>a.test(n),zA={test:n=>n==="auto",parse:n=>n},Yb=[zi,be,Wn,Wa,BC,OC,zA],ay=n=>Yb.find(qb(n));class Kb extends mh{constructor(a,i,o,r,d){super(a,i,o,r,d,!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(),Xf(g))){const y=$b(g,i.current);y!==void 0&&(a[m]=y),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!xb.has(o)||a.length!==2)return;const[r,d]=a,u=ay(r),p=ay(d);if(u!==p)if(ey(u)&&ey(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++)mA(a[r])&&o.push(r);o.length&&MA(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=Oi[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 d=i.getValue(o);d&&d.jump(this.measuredOrigin,!1);const u=r.length-1,p=r[u];r[u]=Oi[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 sy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ss.test(n)||n==="0")&&!n.startsWith("url("));function VA(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 HA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],u=sy(r,a),p=sy(d,a);return!u||!p?!1:VA(n)||(i==="spring"||rh(i))&&o}const GA=n=>n!==null;function cc(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(GA),d=a&&i!=="loop"&&a%2===1?0:r.length-1;return!d||o===void 0?r[d]:o}const PA=40;class Zb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:d=0,repeatType:u="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Jn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:d,repeatType:u,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>PA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&LA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Jn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:d,delay:u,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!HA(a,o,r,d))if(u)this.options.duration=0;else{m&&m(cc(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const y=this.initPlayback(a,i);y!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...y},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 hf=2e4;function Xb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<hf;)a+=i,o=n.next(a);return a>=hf?1/0:a}const mt=(n,a,i)=>n+(a-n)*i;function Od(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 FA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,d=0,u=0;if(!a)r=d=u=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Od(m,p,n+1/3),d=Od(m,p,n),u=Od(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(d*255),blue:Math.round(u*255),alpha:o}}function Pr(n,a){return i=>i>0?a:n}const Bd=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},$A=[cf,Ms,Ci],qA=n=>$A.find(a=>a.test(n));function iy(n){const a=qA(n);if(!a)return!1;let i=a.parse(n);return a===Ci&&(i=FA(i)),i}const ly=(n,a)=>{const i=iy(n),o=iy(a);if(!i||!o)return Pr(n,a);const r={...i};return d=>(r.red=Bd(i.red,o.red,d),r.green=Bd(i.green,o.green,d),r.blue=Bd(i.blue,o.blue,d),r.alpha=mt(i.alpha,o.alpha,d),Ms.transform(r))},YA=(n,a)=>i=>a(n(i)),oo=(...n)=>n.reduce(YA),pf=new Set(["none","hidden"]);function KA(n,a){return pf.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function ZA(n,a){return i=>mt(n,a,i)}function gh(n){return typeof n=="number"?ZA:typeof n=="string"?Xf(n)?Pr:Yt.test(n)?ly:WA:Array.isArray(n)?Qb:typeof n=="object"?Yt.test(n)?ly:XA:Pr}function Qb(n,a){const i=[...n],o=i.length,r=n.map((d,u)=>gh(d)(d,a[u]));return d=>{for(let u=0;u<o;u++)i[u]=r[u](d);return i}}function XA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=gh(n[r])(n[r],a[r]));return r=>{for(const d in o)i[d]=o[d](r);return i}}function QA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let d=0;d<a.values.length;d++){const u=a.types[d],p=n.indexes[u][r[u]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[d]=m,r[u]++}return o}const WA=(n,a)=>{const i=ss.createTransformer(a),o=eo(n),r=eo(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?pf.has(n)&&!r.values.length||pf.has(a)&&!o.values.length?KA(n,a):oo(Qb(QA(o,r),r.values),i):Pr(n,a)};function Wb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?mt(n,a,i):gh(n)(n,a)}const JA=5;function Jb(n,a,i){const o=Math.max(a-JA,0);return _b(i-n(o),a-o)}const St={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ld=.001;function ek({duration:n=St.duration,bounce:a=St.bounce,velocity:i=St.velocity,mass:o=St.mass}){let r,d,u=1-a;u=Ca(St.minDamping,St.maxDamping,u),n=Ca(St.minDuration,St.maxDuration,Ta(n)),u<1?(r=g=>{const y=g*u,v=y*n,x=y-i,E=mf(g,u),C=Math.exp(-v);return Ld-x/E*C},d=g=>{const v=g*u*n,x=v*i+i,E=Math.pow(u,2)*Math.pow(g,2)*n,C=Math.exp(-v),A=mf(Math.pow(g,2),u);return(-r(g)+Ld>0?-1:1)*((x-E)*C)/A}):(r=g=>{const y=Math.exp(-g*n),v=(g-i)*n+1;return-Ld+y*v},d=g=>{const y=Math.exp(-g*n),v=(i-g)*(n*n);return y*v});const p=5/n,m=nk(r,d,p);if(n=_a(n),isNaN(m))return{stiffness:St.stiffness,damping:St.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:u*2*Math.sqrt(o*g),duration:n}}}const tk=12;function nk(n,a,i){let o=i;for(let r=1;r<tk;r++)o=o-n(o)/a(o);return o}function mf(n,a){return n*Math.sqrt(1-a*a)}const ak=["duration","bounce"],sk=["stiffness","damping","mass"];function oy(n,a){return a.some(i=>n[i]!==void 0)}function ik(n){let a={velocity:St.velocity,stiffness:St.stiffness,damping:St.damping,mass:St.mass,isResolvedFromDuration:!1,...n};if(!oy(n,sk)&&oy(n,ak))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,d=2*Ca(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:St.mass,stiffness:r,damping:d}}else{const i=ek(n);a={...a,...i,mass:St.mass},a.isResolvedFromDuration=!0}return a}function e1(n=St.visualDuration,a=St.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const d=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:y,duration:v,velocity:x,isResolvedFromDuration:E}=ik({...i,velocity:-Ta(i.velocity||0)}),C=x||0,A=g/(2*Math.sqrt(m*y)),w=u-d,_=Ta(Math.sqrt(m/y)),N=Math.abs(w)<5;o||(o=N?St.restSpeed.granular:St.restSpeed.default),r||(r=N?St.restDelta.granular:St.restDelta.default);let D;if(A<1){const B=mf(_,A);D=F=>{const R=Math.exp(-A*_*F);return u-R*((C+A*_*w)/B*Math.sin(B*F)+w*Math.cos(B*F))}}else if(A===1)D=B=>u-Math.exp(-_*B)*(w+(C+_*w)*B);else{const B=_*Math.sqrt(A*A-1);D=F=>{const R=Math.exp(-A*_*F),I=Math.min(B*F,300);return u-R*((C+A*_*w)*Math.sinh(I)+B*w*Math.cosh(I))/B}}const H={calculatedDuration:E&&v||null,next:B=>{const F=D(B);if(E)p.done=B>=v;else{let R=0;A<1&&(R=B===0?_a(C):Jb(D,B,F));const I=Math.abs(R)<=o,P=Math.abs(u-F)<=r;p.done=I&&P}return p.value=p.done?u:F,p},toString:()=>{const B=Math.min(Xb(H),hf),F=Eb(R=>H.next(B*R).value,B,30);return B+"ms "+F}};return H}function ry({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:d=500,modifyTarget:u,min:p,max:m,restDelta:g=.5,restSpeed:y}){const v=n[0],x={done:!1,value:v},E=I=>p!==void 0&&I<p||m!==void 0&&I>m,C=I=>p===void 0?m:m===void 0||Math.abs(p-I)<Math.abs(m-I)?p:m;let A=i*a;const w=v+A,_=u===void 0?w:u(w);_!==w&&(A=_-v);const N=I=>-A*Math.exp(-I/o),D=I=>_+N(I),H=I=>{const P=N(I),J=D(I);x.done=Math.abs(P)<=g,x.value=x.done?_:J};let B,F;const R=I=>{E(x.value)&&(B=I,F=e1({keyframes:[x.value,C(x.value)],velocity:Jb(D,I,x.value),damping:r,stiffness:d,restDelta:g,restSpeed:y}))};return R(0),{calculatedDuration:null,next:I=>{let P=!1;return!F&&B===void 0&&(P=!0,H(I),R(I)),B!==void 0&&I>=B?F.next(I-B):(!P&&H(I),x)}}}const lk=lo(.42,0,1,1),ok=lo(0,0,.58,1),t1=lo(.42,0,.58,1),rk=n=>Array.isArray(n)&&typeof n[0]!="number",ck={linear:mn,easeIn:lk,easeInOut:t1,easeOut:ok,circIn:dh,circInOut:Ob,circOut:Rb,backIn:uh,backInOut:Db,backOut:jb,anticipate:Mb},cy=n=>{if(ch(n)){tb(n.length===4);const[a,i,o,r]=n;return lo(a,i,o,r)}else if(typeof n=="string")return ck[n];return n};function uk(n,a,i){const o=[],r=i||Wb,d=n.length-1;for(let u=0;u<d;u++){let p=r(n[u],n[u+1]);if(a){const m=Array.isArray(a)?a[u]||mn:a;p=oo(m,p)}o.push(p)}return o}function dk(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const d=n.length;if(tb(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const u=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=uk(a,o,r),m=p.length,g=y=>{if(u&&y<n[0])return a[0];let v=0;if(m>1)for(;v<n.length-2&&!(y<n[v+1]);v++);const x=Ri(n[v],n[v+1],y);return p[v](x)};return i?y=>g(Ca(n[0],n[d-1],y)):g}function fk(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Ri(0,a,o);n.push(mt(i,1,r))}}function hk(n){const a=[0];return fk(a,n.length-1),a}function pk(n,a){return n.map(i=>i*a)}function mk(n,a){return n.map(()=>a||t1).splice(0,n.length-1)}function Fr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=rk(o)?o.map(cy):cy(o),d={done:!1,value:a[0]},u=pk(i&&i.length===a.length?i:hk(a),n),p=dk(u,a,{ease:Array.isArray(r)?r:mk(a,r)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const gk=n=>{const a=({timestamp:i})=>n(i);return{start:()=>rt.update(a,!0),stop:()=>as(a),now:()=>$t.isProcessing?$t.timestamp:Jn.now()}},vk={decay:ry,inertia:ry,tween:Fr,keyframes:Fr,spring:e1},yk=n=>n/100;class vh extends Zb{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:d}=this.options,u=(r==null?void 0:r.KeyframeResolver)||mh,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new u(d,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:d,velocity:u=0}=this.options,p=rh(i)?i:vk[i]||Fr;let m,g;p!==Fr&&typeof a[0]!="number"&&(m=oo(yk,Wb(a[0],a[1])),a=[0,100]);const y=p({...this.options,keyframes:a});d==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-u})),y.calculatedDuration===null&&(y.calculatedDuration=Xb(y));const{calculatedDuration:v}=y,x=v+r,E=x*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:v,resolvedDuration:x,totalDuration:E}}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:I}=this.options;return{done:!0,value:I[I.length-1]}}const{finalKeyframe:r,generator:d,mirroredGenerator:u,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:y,resolvedDuration:v}=o;if(this.startTime===null)return d.next(0);const{delay:x,repeat:E,repeatType:C,repeatDelay:A,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-y/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const _=this.currentTime-x*(this.speed>=0?1:-1),N=this.speed>=0?_<0:_>y;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let D=this.currentTime,H=d;if(E){const I=Math.min(this.currentTime,y)/v;let P=Math.floor(I),J=I%1;!J&&I>=1&&(J=1),J===1&&P--,P=Math.min(P,E+1),!!(P%2)&&(C==="reverse"?(J=1-J,A&&(J-=A/v)):C==="mirror"&&(H=u)),D=Ca(0,1,J)*v}const B=N?{done:!1,value:m[0]}:H.next(D);p&&(B.value=p(B.value));let{done:F}=B;!N&&g!==null&&(F=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&F);return R&&r!==void 0&&(B.value=cc(m,this.options,r)),w&&w(B.value),R&&this.finish(),B}get duration(){const{resolved:a}=this;return a?Ta(a.calculatedDuration):0}get time(){return Ta(this.currentTime)}set time(a){a=_a(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=Ta(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=gk,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(d=>this.tick(d))),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 bk=new Set(["opacity","clipPath","filter","transform"]);function Sk(n,a,i,{delay:o=0,duration:r=300,repeat:d=0,repeatType:u="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const y=Ab(p,r);return Array.isArray(y)&&(g.easing=y),n.animate(g,{delay:o,duration:r,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:d+1,direction:u==="reverse"?"alternate":"normal"})}const xk=oh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$r=10,_k=2e4;function Tk(n){return rh(n.type)||n.type==="spring"||!Cb(n.ease)}function Ek(n,a){const i=new vh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let d=0;for(;!o.done&&d<_k;)o=i.sample(d),r.push(o.value),d+=$r;return{times:void 0,keyframes:r,duration:d-$r,ease:"linear"}}const n1={anticipate:Mb,backInOut:Db,circInOut:Ob};function Ck(n){return n in n1}class uy extends Zb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:d}=this.options;this.resolver=new Kb(d,(u,p)=>this.onKeyframesResolved(u,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:d,type:u,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof d=="string"&&Gr()&&Ck(d)&&(d=n1[d]),Tk(this.options)){const{onComplete:v,onUpdate:x,motionValue:E,element:C,...A}=this.options,w=Ek(a,A);a=w.keyframes,a.length===1&&(a[1]=a[0]),o=w.duration,r=w.times,d=w.ease,u="keyframes"}const y=Sk(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:d});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(Wv(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:v}=this.options;p.set(cc(a,this.options,i)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:r,type:u,ease:d,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return Ta(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return Ta(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=_a(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 mn;const{animation:o}=i;Wv(o,a)}return mn}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:d,ease:u,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:y,onComplete:v,element:x,...E}=this.options,C=new vh({...E,keyframes:o,duration:r,type:d,ease:u,times:p,isGenerator:!0}),A=_a(this.time);g.setWithVelocity(C.sample(A-$r).value,C.sample(A).value,$r)}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:d,damping:u,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return xk()&&o&&bk.has(o)&&!m&&!g&&!r&&d!=="mirror"&&u!==0&&p!=="inertia"}}const Ak={type:"spring",stiffness:500,damping:25,restSpeed:10},kk=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),wk={type:"keyframes",duration:.8},Nk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jk=(n,{keyframes:a})=>a.length>2?wk:Ls.has(n)?n.startsWith("scale")?kk(a[1]):Ak:Nk;function Dk({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:d,repeatType:u,repeatDelay:p,from:m,elapsed:g,...y}){return!!Object.keys(y).length}const yh=(n,a,i,o={},r,d)=>u=>{const p=ah(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-_a(m);let y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:x=>{a.set(x),p.onUpdate&&p.onUpdate(x)},onComplete:()=>{u(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:r};Dk(p)||(y={...y,...jk(n,y)}),y.duration&&(y.duration=_a(y.duration)),y.repeatDelay&&(y.repeatDelay=_a(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(v=!0)),v&&!d&&a.get()!==void 0){const x=cc(y.keyframes,p);if(x!==void 0)return rt.update(()=>{y.onUpdate(x),y.onComplete()}),new cA([])}return!d&&uy.supports(y)?new uy(y):new vh(y)};function Mk({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function a1(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var d;let{transition:u=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(u=o);const g=[],y=r&&n.animationState&&n.animationState.getState()[r];for(const v in m){const x=n.getValue(v,(d=n.latestValues[v])!==null&&d!==void 0?d:null),E=m[v];if(E===void 0||y&&Mk(y,v))continue;const C={delay:i,...ah(u||{},v)};let A=!1;if(window.MotionHandoffAnimation){const _=Tb(n);if(_){const N=window.MotionHandoffAnimation(_,v,rt);N!==null&&(C.startTime=N,A=!0)}}of(n,v),x.start(yh(v,x,E,n.shouldReduceMotion&&xb.has(v)?{type:!1}:C,n,A));const w=x.animation;w&&g.push(w)}return p&&Promise.all(g).then(()=>{rt.update(()=>{p&&iA(n,p)})}),g}function gf(n,a,i={}){var o;const r=rc(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:d=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(d=i.transitionOverride);const u=r?()=>Promise.all(a1(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:x}=d;return Rk(n,a,y+g,v,x,i)}:()=>Promise.resolve(),{when:m}=d;if(m){const[g,y]=m==="beforeChildren"?[u,p]:[p,u];return g().then(()=>y())}else return Promise.all([u(),p(i.delay)])}function Rk(n,a,i=0,o=0,r=1,d){const u=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(Ok).forEach((g,y)=>{g.notify("AnimationStart",a),u.push(gf(g,a,{...d,delay:i+m(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(u)}function Ok(n,a){return n.sortNodePosition(a)}function Bk(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(d=>gf(n,d,i));o=Promise.all(r)}else if(typeof a=="string")o=gf(n,a,i);else{const r=typeof a=="function"?rc(n,a,i.custom):a;o=Promise.all(a1(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Lk=$f.length;function s1(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?s1(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<Lk;i++){const o=$f[i],r=n.props[o];(Ql(r)||r===!1)&&(a[o]=r)}return a}const Ik=[...Ff].reverse(),Uk=Ff.length;function zk(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Bk(n,i,o)))}function Vk(n){let a=zk(n),i=dy(),o=!0;const r=m=>(g,y)=>{var v;const x=rc(n,y,m==="exit"?(v=n.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(x){const{transition:E,transitionEnd:C,...A}=x;g={...g,...A,...C}}return g};function d(m){a=m(n)}function u(m){const{props:g}=n,y=s1(n.parent)||{},v=[],x=new Set;let E={},C=1/0;for(let w=0;w<Uk;w++){const _=Ik[w],N=i[_],D=g[_]!==void 0?g[_]:y[_],H=Ql(D),B=_===m?N.isActive:null;B===!1&&(C=w);let F=D===y[_]&&D!==g[_]&&H;if(F&&o&&n.manuallyAnimateOnMount&&(F=!1),N.protectedKeys={...E},!N.isActive&&B===null||!D&&!N.prevProp||lc(D)||typeof D=="boolean")continue;const R=Hk(N.prevProp,D);let I=R||_===m&&N.isActive&&!F&&H||w>C&&H,P=!1;const J=Array.isArray(D)?D:[D];let ee=J.reduce(r(_),{});B===!1&&(ee={});const{prevResolvedValues:ae={}}=N,te={...ae,...ee},pe=Q=>{I=!0,x.has(Q)&&(P=!0,x.delete(Q)),N.needsAnimating[Q]=!0;const q=n.getValue(Q);q&&(q.liveStyle=!1)};for(const Q in te){const q=ee[Q],ue=ae[Q];if(E.hasOwnProperty(Q))continue;let K=!1;lf(q)&&lf(ue)?K=!Sb(q,ue):K=q!==ue,K?q!=null?pe(Q):x.add(Q):q!==void 0&&x.has(Q)?pe(Q):N.protectedKeys[Q]=!0}N.prevProp=D,N.prevResolvedValues=ee,N.isActive&&(E={...E,...ee}),o&&n.blockInitialAnimation&&(I=!1),I&&(!(F&&R)||P)&&v.push(...J.map(Q=>({animation:Q,options:{type:_}})))}if(x.size){const w={};x.forEach(_=>{const N=n.getBaseTarget(_),D=n.getValue(_);D&&(D.liveStyle=!0),w[_]=N??null}),v.push({animation:w})}let A=!!v.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(A=!1),o=!1,A?a(v):Promise.resolve()}function p(m,g){var y;if(i[m].isActive===g)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(x=>{var E;return(E=x.animationState)===null||E===void 0?void 0:E.setActive(m,g)}),i[m].isActive=g;const v=u(m);for(const x in i)i[x].protectedKeys={};return v}return{animateChanges:u,setActive:p,setAnimateFunction:d,getState:()=>i,reset:()=>{i=dy(),o=!0}}}function Hk(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!Sb(a,n):!1}function As(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dy(){return{animate:As(!0),whileInView:As(),whileHover:As(),whileTap:As(),whileDrag:As(),whileFocus:As(),exit:As()}}class ls{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Gk extends ls{constructor(a){super(a),a.animationState||(a.animationState=Vk(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();lc(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 Pk=0;class Fk extends ls{constructor(){super(...arguments),this.id=Pk++}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 $k={animation:{Feature:Gk},exit:{Feature:Fk}},Vn={x:!1,y:!1};function i1(){return Vn.x||Vn.y}function qk(n){return n==="x"||n==="y"?Vn[n]?null:(Vn[n]=!0,()=>{Vn[n]=!1}):Vn.x||Vn.y?null:(Vn.x=Vn.y=!0,()=>{Vn.x=Vn.y=!1})}const bh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function to(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function ro(n){return{point:{x:n.pageX,y:n.pageY}}}const Yk=n=>a=>bh(a)&&n(a,ro(a));function Fl(n,a,i,o){return to(n,a,Yk(i),o)}const fy=(n,a)=>Math.abs(n-a);function Kk(n,a){const i=fy(n.x,a.x),o=fy(n.y,a.y);return Math.sqrt(i**2+o**2)}class l1{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:d=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ud(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,E=Kk(v.offset,{x:0,y:0})>=3;if(!x&&!E)return;const{point:C}=v,{timestamp:A}=$t;this.history.push({...C,timestamp:A});const{onStart:w,onMove:_}=this.handlers;x||(w&&w(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,v)},this.handlePointerMove=(v,x)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Id(x,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(v,x)=>{this.end();const{onEnd:E,onSessionEnd:C,resumeAnimation:A}=this.handlers;if(this.dragSnapToOrigin&&A&&A(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=Ud(v.type==="pointercancel"?this.lastMoveEventInfo:Id(x,this.transformPagePoint),this.history);this.startEvent&&E&&E(v,w),C&&C(v,w)},!bh(a))return;this.dragSnapToOrigin=d,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const u=ro(a),p=Id(u,this.transformPagePoint),{point:m}=p,{timestamp:g}=$t;this.history=[{...m,timestamp:g}];const{onSessionStart:y}=i;y&&y(a,Ud(p,this.history)),this.removeListeners=oo(Fl(this.contextWindow,"pointermove",this.handlePointerMove),Fl(this.contextWindow,"pointerup",this.handlePointerUp),Fl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),as(this.updatePoint)}}function Id(n,a){return a?{point:a(n.point)}:n}function hy(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Ud({point:n},a){return{point:n,delta:hy(n,o1(a)),offset:hy(n,Zk(a)),velocity:Xk(a,.1)}}function Zk(n){return n[0]}function o1(n){return n[n.length-1]}function Xk(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=o1(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>_a(a)));)i--;if(!o)return{x:0,y:0};const d=Ta(r.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const u={x:(r.x-o.x)/d,y:(r.y-o.y)/d};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const r1=1e-4,Qk=1-r1,Wk=1+r1,c1=.01,Jk=0-c1,ew=0+c1;function gn(n){return n.max-n.min}function tw(n,a,i){return Math.abs(n-a)<=i}function py(n,a,i,o=.5){n.origin=o,n.originPoint=mt(a.min,a.max,n.origin),n.scale=gn(i)/gn(a),n.translate=mt(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Qk&&n.scale<=Wk||isNaN(n.scale))&&(n.scale=1),(n.translate>=Jk&&n.translate<=ew||isNaN(n.translate))&&(n.translate=0)}function $l(n,a,i,o){py(n.x,a.x,i.x,o?o.originX:void 0),py(n.y,a.y,i.y,o?o.originY:void 0)}function my(n,a,i){n.min=i.min+a.min,n.max=n.min+gn(a)}function nw(n,a,i){my(n.x,a.x,i.x),my(n.y,a.y,i.y)}function gy(n,a,i){n.min=a.min-i.min,n.max=n.min+gn(a)}function ql(n,a,i){gy(n.x,a.x,i.x),gy(n.y,a.y,i.y)}function aw(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?mt(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?mt(i,n,o.max):Math.min(n,i)),n}function vy(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 sw(n,{top:a,left:i,bottom:o,right:r}){return{x:vy(n.x,i,r),y:vy(n.y,a,o)}}function yy(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 iw(n,a){return{x:yy(n.x,a.x),y:yy(n.y,a.y)}}function lw(n,a){let i=.5;const o=gn(n),r=gn(a);return r>o?i=Ri(a.min,a.max-o,n.min):o>r&&(i=Ri(n.min,n.max-r,a.min)),Ca(0,1,i)}function ow(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 vf=.35;function rw(n=vf){return n===!1?n=0:n===!0&&(n=vf),{x:by(n,"left","right"),y:by(n,"top","bottom")}}function by(n,a,i){return{min:Sy(n,a),max:Sy(n,i)}}function Sy(n,a){return typeof n=="number"?n:n[a]||0}const xy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:xy(),y:xy()}),_y=()=>({min:0,max:0}),Et=()=>({x:_y(),y:_y()});function Nn(n){return[n("x"),n("y")]}function u1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function cw({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function uw(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 zd(n){return n===void 0||n===1}function yf({scale:n,scaleX:a,scaleY:i}){return!zd(n)||!zd(a)||!zd(i)}function Ns(n){return yf(n)||d1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function d1(n){return Ty(n.x)||Ty(n.y)}function Ty(n){return n&&n!=="0%"}function qr(n,a,i){const o=n-i,r=a*o;return i+r}function Ey(n,a,i,o,r){return r!==void 0&&(n=qr(n,r,o)),qr(n,i,o)+a}function bf(n,a=0,i=1,o,r){n.min=Ey(n.min,a,i,o,r),n.max=Ey(n.max,a,i,o,r)}function f1(n,{x:a,y:i}){bf(n.x,a.translate,a.scale,a.originPoint),bf(n.y,i.translate,i.scale,i.originPoint)}const Cy=.999999999999,Ay=1.0000000000001;function dw(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let d,u;for(let p=0;p<r;p++){d=i[p],u=d.projectionDelta;const{visualElement:m}=d.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&wi(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),u&&(a.x*=u.x.scale,a.y*=u.y.scale,f1(n,u)),o&&Ns(d.latestValues)&&wi(n,d.latestValues))}a.x<Ay&&a.x>Cy&&(a.x=1),a.y<Ay&&a.y>Cy&&(a.y=1)}function ki(n,a){n.min=n.min+a,n.max=n.max+a}function ky(n,a,i,o,r=.5){const d=mt(n.min,n.max,r);bf(n,a,i,d,o)}function wi(n,a){ky(n.x,a.x,a.scaleX,a.scale,a.originX),ky(n.y,a.y,a.scaleY,a.scale,a.originY)}function h1(n,a){return u1(uw(n.getBoundingClientRect(),a))}function fw(n,a,i){const o=h1(n,i),{scroll:r}=a;return r&&(ki(o.x,r.offset.x),ki(o.y,r.offset.y)),o}const p1=({current:n})=>n?n.ownerDocument.defaultView:null,hw=new WeakMap;class pw{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=Et(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(ro(y).point)},d=(y,v)=>{const{drag:x,dragPropagation:E,onDragStart:C}=this.getProps();if(x&&!E&&(this.openDragLock&&this.openDragLock(),this.openDragLock=qk(x),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nn(w=>{let _=this.getAxisMotionValue(w).get()||0;if(Wn.test(_)){const{projection:N}=this.visualElement;if(N&&N.layout){const D=N.layout.layoutBox[w];D&&(_=gn(D)*(parseFloat(_)/100))}}this.originPoint[w]=_}),C&&rt.postRender(()=>C(y,v)),of(this.visualElement,"transform");const{animationState:A}=this.visualElement;A&&A.setActive("whileDrag",!0)},u=(y,v)=>{const{dragPropagation:x,dragDirectionLock:E,onDirectionLock:C,onDrag:A}=this.getProps();if(!x&&!this.openDragLock)return;const{offset:w}=v;if(E&&this.currentDirection===null){this.currentDirection=mw(w),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,w),this.updateAxis("y",v.point,w),this.visualElement.render(),A&&A(y,v)},p=(y,v)=>this.stop(y,v),m=()=>Nn(y=>{var v;return this.getAnimationState(y)==="paused"&&((v=this.getAxisMotionValue(y).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new l1(a,{onSessionStart:r,onStart:d,onMove:u,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:p1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:d}=this.getProps();d&&rt.postRender(()=>d(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||!Nr(a,r,this.currentDirection))return;const d=this.getAxisMotionValue(a);let u=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(u=aw(u,this.constraints[a],this.elastic[a])),d.set(u)}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,d=this.constraints;i&&Ei(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=sw(r.layoutBox,i):this.constraints=!1,this.elastic=rw(o),d!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=ow(r.layoutBox[u],this.constraints[u]))})}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 d=fw(o,r.root,this.visualElement.getTransformPagePoint());let u=iw(r.layout.layoutBox,d);if(i){const p=i(cw(u));this.hasMutatedConstraints=!!p,p&&(u=u1(p))}return u}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:d,dragSnapToOrigin:u,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=Nn(y=>{if(!Nr(y,i,this.currentDirection))return;let v=m&&m[y]||{};u&&(v={min:0,max:0});const x=r?200:1e6,E=r?40:1e7,C={type:"inertia",velocity:o?a[y]:0,bounceStiffness:x,bounceDamping:E,timeConstant:750,restDelta:1,restSpeed:10,...d,...v};return this.startAxisValueAnimation(y,C)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return of(this.visualElement,a),o.start(yh(a,o,0,i,this.visualElement,!1))}stopAnimation(){Nn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Nn(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){Nn(i=>{const{drag:o}=this.getProps();if(!Nr(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,d=this.getAxisMotionValue(i);if(r&&r.layout){const{min:u,max:p}=r.layout.layoutBox[i];d.set(a[i]-mt(u,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};Nn(u=>{const p=this.getAxisMotionValue(u);if(p&&this.constraints!==!1){const m=p.get();r[u]=lw({min:m,max:m},this.constraints[u])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Nn(u=>{if(!Nr(u,a,null))return;const p=this.getAxisMotionValue(u),{min:m,max:g}=this.constraints[u];p.set(mt(m,g,r[u]))})}addListeners(){if(!this.visualElement.current)return;hw.set(this.visualElement,this);const a=this.visualElement.current,i=Fl(a,"pointerdown",m=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ei(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,d=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),rt.read(o);const u=to(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Nn(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=m[y].translate,v.set(v.get()+m[y].translate))}),this.visualElement.render())}));return()=>{u(),i(),d(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:d=!1,dragElastic:u=vf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:d,dragElastic:u,dragMomentum:p}}}function Nr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function mw(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class gw extends ls{constructor(a){super(a),this.removeGroupControls=mn,this.removeListeners=mn,this.controls=new pw(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mn}unmount(){this.removeGroupControls(),this.removeListeners()}}const wy=n=>(a,i)=>{n&&rt.postRender(()=>n(a,i))};class vw extends ls{constructor(){super(...arguments),this.removePointerDownListener=mn}onPointerDown(a){this.session=new l1(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:p1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:wy(a),onStart:wy(i),onMove:o,onEnd:(d,u)=>{delete this.session,r&&rt.postRender(()=>r(d,u))}}}mount(){this.removePointerDownListener=Fl(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 Ur={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ny(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Bl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(be.test(n))n=parseFloat(n);else return n;const i=Ny(n,a.target.x),o=Ny(n,a.target.y);return`${i}% ${o}%`}},yw={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=ss.parse(n);if(r.length>5)return o;const d=ss.createTransformer(n),u=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+u]/=p,r[1+u]/=m;const g=mt(p,m,.5);return typeof r[2+u]=="number"&&(r[2+u]/=g),typeof r[3+u]=="number"&&(r[3+u]/=g),d(r)}};class bw extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:d}=a;$C(Sw),d&&(i.group&&i.group.add(d),o&&o.register&&r&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),Ur.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:d}=this.props,u=o.projection;return u&&(u.isPresent=d,r||a.layoutDependency!==i||i===void 0?u.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?u.promote():u.relegate()||rt.postRender(()=>{const p=u.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Yf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup: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 m1(n){const[a,i]=J0(),o=S.useContext(Vf);return h.jsx(bw,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(ob),isPresent:a,safeToRemove:i})}const Sw={borderRadius:{...Bl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bl,borderTopRightRadius:Bl,borderBottomLeftRadius:Bl,borderBottomRightRadius:Bl,boxShadow:yw};function xw(n,a,i){const o=Kt(n)?n:Jl(n);return o.start(yh("",o,a,i)),o.animation}function _w(n){return n instanceof SVGElement&&n.tagName!=="svg"}const Tw=(n,a)=>n.depth-a.depth;class Ew{constructor(){this.children=[],this.isDirty=!1}add(a){sh(this.children,a),this.isDirty=!0}remove(a){ih(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(Tw),this.isDirty=!1,this.children.forEach(a)}}function Cw(n,a){const i=Jn.now(),o=({timestamp:r})=>{const d=r-i;d>=a&&(as(o),n(d-a))};return rt.read(o,!0),()=>as(o)}const g1=["TopLeft","TopRight","BottomLeft","BottomRight"],Aw=g1.length,jy=n=>typeof n=="string"?parseFloat(n):n,Dy=n=>typeof n=="number"||be.test(n);function kw(n,a,i,o,r,d){r?(n.opacity=mt(0,i.opacity!==void 0?i.opacity:1,ww(o)),n.opacityExit=mt(a.opacity!==void 0?a.opacity:1,0,Nw(o))):d&&(n.opacity=mt(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let u=0;u<Aw;u++){const p=`border${g1[u]}Radius`;let m=My(a,p),g=My(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||Dy(m)===Dy(g)?(n[p]=Math.max(mt(jy(m),jy(g),o),0),(Wn.test(g)||Wn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=mt(a.rotate||0,i.rotate||0,o))}function My(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const ww=v1(0,.5,Rb),Nw=v1(.5,.95,mn);function v1(n,a,i){return o=>o<n?0:o>a?1:i(Ri(n,a,o))}function Ry(n,a){n.min=a.min,n.max=a.max}function wn(n,a){Ry(n.x,a.x),Ry(n.y,a.y)}function Oy(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function By(n,a,i,o,r){return n-=a,n=qr(n,1/i,o),r!==void 0&&(n=qr(n,1/r,o)),n}function jw(n,a=0,i=1,o=.5,r,d=n,u=n){if(Wn.test(a)&&(a=parseFloat(a),a=mt(u.min,u.max,a/100)-u.min),typeof a!="number")return;let p=mt(d.min,d.max,o);n===d&&(p-=a),n.min=By(n.min,a,i,p,r),n.max=By(n.max,a,i,p,r)}function Ly(n,a,[i,o,r],d,u){jw(n,a[i],a[o],a[r],a.scale,d,u)}const Dw=["x","scaleX","originX"],Mw=["y","scaleY","originY"];function Iy(n,a,i,o){Ly(n.x,a,Dw,i?i.x:void 0,o?o.x:void 0),Ly(n.y,a,Mw,i?i.y:void 0,o?o.y:void 0)}function Uy(n){return n.translate===0&&n.scale===1}function y1(n){return Uy(n.x)&&Uy(n.y)}function zy(n,a){return n.min===a.min&&n.max===a.max}function Rw(n,a){return zy(n.x,a.x)&&zy(n.y,a.y)}function Vy(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function b1(n,a){return Vy(n.x,a.x)&&Vy(n.y,a.y)}function Hy(n){return gn(n.x)/gn(n.y)}function Gy(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class Ow{constructor(){this.members=[]}add(a){sh(this.members,a),a.scheduleRender()}remove(a){if(ih(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const 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 d=this.members[r];if(d.isPresent!==!1){o=d;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 Bw(n,a,i){let o="";const r=n.x.translate/a.x,d=n.y.translate/a.y,u=(i==null?void 0:i.z)||0;if((r||d||u)&&(o=`translate3d(${r}px, ${d}px, ${u}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:y,rotateX:v,rotateY:x,skewX:E,skewY:C}=i;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),v&&(o+=`rotateX(${v}deg) `),x&&(o+=`rotateY(${x}deg) `),E&&(o+=`skewX(${E}deg) `),C&&(o+=`skewY(${C}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 js={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Vl=typeof window<"u"&&window.MotionDebug!==void 0,Vd=["","X","Y","Z"],Lw={visibility:"hidden"},Py=1e3;let Iw=0;function Hd(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function S1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=Tb(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",rt,!(r||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&S1(o)}function x1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(u={},p=a==null?void 0:a()){this.id=Iw++,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,Vl&&(js.totalNodes=js.resolvedTargetDeltas=js.recalculatedProjection=0),this.nodes.forEach(Vw),this.nodes.forEach($w),this.nodes.forEach(qw),this.nodes.forEach(Hw),Vl&&window.MotionDebug.record(js)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,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 Ew)}addEventListener(u,p){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new lh),this.eventHandlers.get(u).add(p)}notifyListeners(u,...p){const m=this.eventHandlers.get(u);m&&m.notify(...p)}hasListeners(u){return this.eventHandlers.has(u)}mount(u,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_w(u),this.instance=u;const{layoutId:m,layout:g,visualElement:y}=this.options;if(y&&!y.current&&y.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let v;const x=()=>this.root.updateBlockedByResize=!1;n(u,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=Cw(x,250),Ur.hasAnimatedSinceResize&&(Ur.hasAnimatedSinceResize=!1,this.nodes.forEach($y))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&y&&(m||g)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:x,hasRelativeTargetChanged:E,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const A=this.options.transition||y.getDefaultTransition()||Qw,{onLayoutAnimationStart:w,onLayoutAnimationComplete:_}=y.getProps(),N=!this.targetLayout||!b1(this.targetLayout,C)||E,D=!x&&E;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||D||x&&(N||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,D);const H={...ah(A,"layout"),onPlay:w,onComplete:_};(y.shouldReduceMotion||this.options.layoutRoot)&&(H.delay=0,H.type=!1),this.startAnimation(H)}else x||$y(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,as(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(Yw),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.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(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fy);return}this.isUpdating||this.nodes.forEach(Pw),this.isUpdating=!1,this.nodes.forEach(Fw),this.nodes.forEach(Uw),this.nodes.forEach(zw),this.clearAllSnapshots();const p=Jn.now();$t.delta=Ca(0,1e3/60,p-$t.timestamp),$t.timestamp=p,$t.isProcessing=!0,Md.update.process($t),Md.preRender.process($t),Md.render.process($t),$t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Yf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Gw),this.sharedNodes.forEach(Kw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.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 u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Et(),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,u?u.layoutBox:void 0)}updateScroll(u="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(p=!1),p){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!y1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;u&&(p||Ns(this.latestValues)||y)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return u&&(m=this.removeTransform(m)),Ww(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:p}=this.options;if(!p)return Et();const m=p.measureViewportBox();if(!(((u=this.scroll)===null||u===void 0?void 0:u.wasRoot)||this.path.some(Jw))){const{scroll:y}=this.root;y&&(ki(m.x,y.offset.x),ki(m.y,y.offset.y))}return m}removeElementScroll(u){var p;const m=Et();if(wn(m,u),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:v,options:x}=y;y!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&wn(m,u),ki(m.x,v.offset.x),ki(m.y,v.offset.y))}return m}applyTransform(u,p=!1){const m=Et();wn(m,u);for(let g=0;g<this.path.length;g++){const y=this.path[g];!p&&y.options.layoutScroll&&y.scroll&&y!==y.root&&wi(m,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),Ns(y.latestValues)&&wi(m,y.latestValues)}return Ns(this.latestValues)&&wi(m,this.latestValues),m}removeTransform(u){const p=Et();wn(p,u);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!Ns(g.latestValues))continue;yf(g.latestValues)&&g.updateSnapshot();const y=Et(),v=g.measurePageBox();wn(y,v),Iy(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return Ns(this.latestValues)&&Iy(p,this.latestValues),p}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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!==$t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!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(!(u||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:x}=this.options;if(!(!this.layout||!(v||x))){if(this.resolvedRelativeTargetAt=$t.timestamp,!this.targetDelta&&!this.relativeTarget){const E=this.getClosestProjectingParent();E&&E.layout&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ql(this.relativeTargetOrigin,this.layout.layoutBox,E.layout.layoutBox),wn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Et(),this.targetWithTransforms=Et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),nw(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wn(this.target,this.layout.layoutBox),f1(this.target,this.targetDelta)):wn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const E=this.getClosestProjectingParent();E&&!!E.resumingFrom==!!this.resumingFrom&&!E.options.layoutScroll&&E.target&&this.animationProgress!==1?(this.relativeParent=E,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Et(),this.relativeTargetOrigin=Et(),ql(this.relativeTargetOrigin,this.target,E.target),wn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vl&&js.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||yf(this.parent.latestValues)||d1(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 u;const p=this.getLead(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===$t.timestamp&&(g=!1),g)return;const{layout:y,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||v))return;wn(this.layoutCorrected,this.layout.layoutBox);const x=this.treeScale.x,E=this.treeScale.y;dw(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=Et());const{target:C}=p;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Oy(this.prevProjectionDelta.x,this.projectionDelta.x),Oy(this.prevProjectionDelta.y,this.projectionDelta.y)),$l(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==x||this.treeScale.y!==E||!Gy(this.projectionDelta.x,this.prevProjectionDelta.x)||!Gy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C)),Vl&&js.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),u){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(u,p=!1){const m=this.snapshot,g=m?m.latestValues:{},y={...this.latestValues},v=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const x=Et(),E=m?m.source:void 0,C=this.layout?this.layout.source:void 0,A=E!==C,w=this.getStack(),_=!w||w.members.length<=1,N=!!(A&&!_&&this.options.crossfade===!0&&!this.path.some(Xw));this.animationProgress=0;let D;this.mixTargetDelta=H=>{const B=H/1e3;qy(v.x,u.x,B),qy(v.y,u.y,B),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ql(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zw(this.relativeTarget,this.relativeTargetOrigin,x,B),D&&Rw(this.relativeTarget,D)&&(this.isProjectionDirty=!1),D||(D=Et()),wn(D,this.relativeTarget)),A&&(this.animationValues=y,kw(y,g,this.latestValues,B,N,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(as(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Ur.hasAnimatedSinceResize=!0,this.currentAnimation=xw(0,Py,{...u,onUpdate:p=>{this.mixTargetDelta(p),u.onUpdate&&u.onUpdate(p)},onComplete:()=>{u.onComplete&&u.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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Py),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:y}=u;if(!(!p||!m||!g)){if(this!==u&&this.layout&&g&&_1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||Et();const v=gn(this.layout.layoutBox.x);m.x.min=u.target.x.min,m.x.max=m.x.min+v;const x=gn(this.layout.layoutBox.y);m.y.min=u.target.y.min,m.y.max=m.y.min+x}wn(p,m),wi(p,y),$l(this.projectionDeltaWithTransform,this.layoutCorrected,p,y)}}registerSharedNode(u,p){this.sharedNodes.has(u)||this.sharedNodes.set(u,new Ow),this.sharedNodes.get(u).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 u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:p}=this.options;return p?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:p}=this.options;return p?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let p=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Hd("z",u,g,this.animationValues);for(let y=0;y<Vd.length;y++)Hd(`rotate${Vd[y]}`,u,g,this.animationValues),Hd(`skew${Vd[y]}`,u,g,this.animationValues);u.render();for(const y in g)u.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);u.scheduleRender()}getProjectionStyles(u){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Lw;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Lr(u==null?void 0:u.pointerEvents)||"",g.transform=y?y(this.latestValues,""):"none",g;const v=this.getLead();if(!this.projectionDelta||!this.layout||!v.target){const A={};return this.options.layoutId&&(A.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,A.pointerEvents=Lr(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!Ns(this.latestValues)&&(A.transform=y?y({},""):"none",this.hasProjected=!1),A}const x=v.animationValues||v.latestValues;this.applyTransformsToTarget(),g.transform=Bw(this.projectionDeltaWithTransform,this.treeScale,x),y&&(g.transform=y(x,g.transform));const{x:E,y:C}=this.projectionDelta;g.transformOrigin=`${E.origin*100}% ${C.origin*100}% 0`,v.animationValues?g.opacity=v===this?(m=(p=x.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:g.opacity=v===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const A in Hr){if(x[A]===void 0)continue;const{correct:w,applyTo:_}=Hr[A],N=g.transform==="none"?x[A]:w(x[A],v);if(_){const D=_.length;for(let H=0;H<D;H++)g[_[H]]=N}else g[A]=N}return this.options.layoutId&&(g.pointerEvents=v===this?Lr(u==null?void 0:u.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var p;return(p=u.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Fy),this.root.sharedNodes.clear()}}}function Uw(n){n.updateLayout()}function zw(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:d}=n.options,u=i.source!==n.layout.source;d==="size"?Nn(v=>{const x=u?i.measuredBox[v]:i.layoutBox[v],E=gn(x);x.min=o[v].min,x.max=x.min+E}):_1(d,i.layoutBox,o)&&Nn(v=>{const x=u?i.measuredBox[v]:i.layoutBox[v],E=gn(o[v]);x.max=x.min+E,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[v].max=n.relativeTarget[v].min+E)});const p=Ai();$l(p,o,i.layoutBox);const m=Ai();u?$l(m,n.applyTransform(r,!0),i.measuredBox):$l(m,o,i.layoutBox);const g=!y1(p);let y=!1;if(!n.resumeFrom){const v=n.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:E}=v;if(x&&E){const C=Et();ql(C,i.layoutBox,x.layoutBox);const A=Et();ql(A,o,E.layoutBox),b1(C,A)||(y=!0),v.options.layoutRoot&&(n.relativeTarget=A,n.relativeTargetOrigin=C,n.relativeParent=v)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function Vw(n){Vl&&js.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 Hw(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function Gw(n){n.clearSnapshot()}function Fy(n){n.clearMeasurements()}function Pw(n){n.isLayoutDirty=!1}function Fw(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function $y(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function $w(n){n.resolveTargetDelta()}function qw(n){n.calcProjection()}function Yw(n){n.resetSkewAndRotation()}function Kw(n){n.removeLeadSnapshot()}function qy(n,a,i){n.translate=mt(a.translate,0,i),n.scale=mt(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function Yy(n,a,i,o){n.min=mt(a.min,i.min,o),n.max=mt(a.max,i.max,o)}function Zw(n,a,i,o){Yy(n.x,a.x,i.x,o),Yy(n.y,a.y,i.y,o)}function Xw(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Qw={duration:.45,ease:[.4,0,.1,1]},Ky=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Zy=Ky("applewebkit/")&&!Ky("chrome/")?Math.round:mn;function Xy(n){n.min=Zy(n.min),n.max=Zy(n.max)}function Ww(n){Xy(n.x),Xy(n.y)}function _1(n,a,i){return n==="position"||n==="preserve-aspect"&&!tw(Hy(a),Hy(i),.2)}function Jw(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const e2=x1({attachResizeListener:(n,a)=>to(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gd={current:void 0},T1=x1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Gd.current){const n=new e2({});n.mount(window),n.setOptions({layoutScroll:!0}),Gd.current=n}return Gd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),t2={pan:{Feature:vw},drag:{Feature:gw,ProjectionNode:T1,MeasureLayout:m1}};function n2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const d=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function E1(n,a){const i=n2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Qy(n){return a=>{a.pointerType==="touch"||i1()||n(a)}}function a2(n,a,i={}){const[o,r,d]=E1(n,i),u=Qy(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const y=Qy(v=>{g(v),m.removeEventListener("pointerleave",y)});m.addEventListener("pointerleave",y,r)});return o.forEach(p=>{p.addEventListener("pointerenter",u,r)}),d}function Wy(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,d=o[r];d&&rt.postRender(()=>d(a,ro(a)))}class s2 extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=a2(a,i=>(Wy(this.node,i,"Start"),o=>Wy(this.node,o,"End"))))}unmount(){}}class i2 extends ls{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=oo(to(this.node.current,"focus",()=>this.onFocus()),to(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const C1=(n,a)=>a?n===a?!0:C1(n,a.parentElement):!1,l2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function o2(n){return l2.has(n.tagName)||n.tabIndex!==-1}const Hl=new WeakSet;function Jy(n){return a=>{a.key==="Enter"&&n(a)}}function Pd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const r2=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=Jy(()=>{if(Hl.has(i))return;Pd(i,"down");const r=Jy(()=>{Pd(i,"up")}),d=()=>Pd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",d,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function e0(n){return bh(n)&&!i1()}function c2(n,a,i={}){const[o,r,d]=E1(n,i),u=p=>{const m=p.currentTarget;if(!e0(p)||Hl.has(m))return;Hl.add(m);const g=a(p),y=(E,C)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",x),!(!e0(E)||!Hl.has(m))&&(Hl.delete(m),typeof g=="function"&&g(E,{success:C}))},v=E=>{y(E,i.useGlobalTarget||C1(m,E.target))},x=E=>{y(E,!1)};window.addEventListener("pointerup",v,r),window.addEventListener("pointercancel",x,r)};return o.forEach(p=>{!o2(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",u,r),p.addEventListener("focus",g=>r2(g,r),r)}),d}function t0(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),d=o[r];d&&rt.postRender(()=>d(a,ro(a)))}class u2 extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=c2(a,i=>(t0(this.node,i,"Start"),(o,{success:r})=>t0(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Sf=new WeakMap,Fd=new WeakMap,d2=n=>{const a=Sf.get(n.target);a&&a(n)},f2=n=>{n.forEach(d2)};function h2({root:n,...a}){const i=n||document;Fd.has(i)||Fd.set(i,{});const o=Fd.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(f2,{root:n,...a})),o[r]}function p2(n,a,i){const o=h2(a);return Sf.set(n,i),o.observe(n),()=>{Sf.delete(n),o.unobserve(n)}}const m2={some:0,all:1};class g2 extends ls{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:d}=a,u={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:m2[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,d&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),x=g?y:v;x&&x(m)};return p2(this.node.current,u,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(v2(a,i))&&this.startObserver()}unmount(){}}function v2({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const y2={inView:{Feature:g2},tap:{Feature:u2},focus:{Feature:i2},hover:{Feature:s2}},b2={layout:{ProjectionNode:T1,MeasureLayout:m1}},Yr={current:null},Sh={current:!1};function A1(){if(Sh.current=!0,!!Pf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>Yr.current=n.matches;n.addListener(a),a()}else Yr.current=!1}const S2=[...Yb,Yt,ss],x2=n=>S2.find(qb(n)),n0=new WeakMap;function _2(n,a,i){for(const o in a){const r=a[o],d=i[o];if(Kt(r))n.addValue(o,r);else if(Kt(d))n.addValue(o,Jl(r,{owner:n}));else if(d!==r)if(n.hasValue(o)){const u=n.getValue(o);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=n.getStaticValue(o);n.addValue(o,Jl(u!==void 0?u:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const a0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class T2{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:d,visualState:u},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=mh,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 E=Jn.now();this.renderScheduledAt<E&&(this.renderScheduledAt=E,rt.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:y}=u;this.onUpdate=y,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=!!d,this.isControllingVariants=oc(i),this.isVariantNode=ib(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(i,{},this);for(const E in x){const C=x[E];m[E]!==void 0&&Kt(C)&&C.set(m[E],!1)}}mount(a){this.current=a,n0.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)),Sh.current||A1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Yr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){n0.delete(this.current),this.projection&&this.projection.unmount(),as(this.notifyUpdate),as(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&&rt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=i.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),d(),u&&u(),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 Mi){const i=Mi[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 d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Et()}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<a0.length;o++){const r=a0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const d="on"+r,u=a[d];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=_2(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=Jl(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"&&(Fb(r)||Bb(r))?r=parseFloat(r):!x2(r)&&ss.test(i)&&(r=Hb(a,i)),this.setBaseTarget(a,Kt(r)?r.get():r)),Kt(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 u=Zf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);u&&(r=u[a])}if(o&&r!==void 0)return r;const d=this.getBaseTargetFromProps(this.props,a);return d!==void 0&&!Kt(d)?d:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new lh),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class k1 extends T2{constructor(){super(...arguments),this.KeyframeResolver=Kb}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;Kt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function E2(n){return window.getComputedStyle(n)}class C2 extends k1{constructor(){super(...arguments),this.type="html",this.renderInstance=pb}readValueFromInstance(a,i){if(Ls.has(i)){const o=ph(i);return o&&o.default||0}else{const o=E2(a),r=(db(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return h1(a,i)}build(a,i,o){Wf(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return nh(a,i,o)}}class A2 extends k1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Et}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Ls.has(i)){const o=ph(i);return o&&o.default||0}return i=mb.has(i)?i:qf(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return yb(a,i,o)}build(a,i,o){Jf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){gb(a,i,o,r)}mount(a){this.isSVGTag=th(a.tagName),super.mount(a)}}const k2=(n,a)=>Kf(n)?new A2(a):new C2(a,{allowProjection:n!==S.Fragment}),w2=eA({...$k,...y2,...t2,...b2},k2),qt=mC(w2);function N2(){!Sh.current&&A1();const[n]=S.useState(Yr.current);return n}var xt;(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"})(xt||(xt={}));var Mt;(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"})(Mt||(Mt={}));var Ja;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(Ja||(Ja={}));var es;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(es||(es={}));var Kn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Kn||(Kn={}));var ts;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(ts||(ts={}));const j2=8;Object.assign(Object.create(null),{"":xt.UNSPECIFIED,text:xt.TEXT,tool_use:xt.TOOL_USE,tool_result:xt.TOOL_RESULT,error:xt.ERROR,status:xt.STATUS,system:xt.SYSTEM,finding:xt.FINDING,subtask_create:xt.SUBTASK_CREATE,user_input:xt.USER_INPUT});xt.UNSPECIFIED+"",xt.TEXT+"",xt.TOOL_USE+"",xt.TOOL_RESULT+"",xt.ERROR+"",xt.STATUS+"",xt.SYSTEM+"",xt.FINDING+"",xt.SUBTASK_CREATE+"",xt.USER_INPUT+"";Object.assign(Object.create(null),{"":Mt.UNSPECIFIED,not_started:Mt.NOT_STARTED,working:Mt.WORKING,paused:Mt.PAUSED,complete:Mt.COMPLETE,failed:Mt.FAILED,pending:Mt.NOT_STARTED,assigned:Mt.NOT_STARTED,in_progress:Mt.WORKING,waiting_input:Mt.PAUSED,review:Mt.PAUSED,done:Mt.COMPLETE});Mt.UNSPECIFIED+"",Mt.NOT_STARTED+"",Mt.WORKING+"",Mt.PAUSED+"",Mt.COMPLETE+"",Mt.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),{"":es.UNSPECIFIED,open:es.OPEN,closed:es.CLOSED});es.UNSPECIFIED+"",es.OPEN+"",es.CLOSED+"";Object.assign(Object.create(null),{"":Kn.UNSPECIFIED,off:Kn.OFF,subscription:Kn.SUBSCRIPTION,api_key:Kn.API_KEY});Kn.UNSPECIFIED+"",Kn.OFF+"",Kn.SUBSCRIPTION+"",Kn.API_KEY+"";Object.assign(Object.create(null),{"":ts.UNSPECIFIED,off:ts.OFF,on:ts.ON});ts.UNSPECIFIED+"",ts.OFF+"",ts.ON+"";function Aa(n){return Array.isArray?Array.isArray(n):j1(n)==="[object Array]"}function D2(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function M2(n){return n==null?"":D2(n)}function Zn(n){return typeof n=="string"}function w1(n){return typeof n=="number"}function R2(n){return n===!0||n===!1||O2(n)&&j1(n)=="[object Boolean]"}function N1(n){return typeof n=="object"}function O2(n){return N1(n)&&n!==null}function pn(n){return n!=null}function $d(n){return!n.trim().length}function j1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const B2="Incorrect 'index' type",L2=n=>`Invalid value for key ${n}`,I2=n=>`Pattern length exceeds max of ${n}.`,U2=n=>`Missing ${n} property in key`,z2=n=>`Property 'weight' in key '${n}' must be a positive integer`,s0=Object.prototype.hasOwnProperty;class V2{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=D1(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 D1(n){let a=null,i=null,o=null,r=1,d=null;if(Zn(n)||Aa(n))o=n,a=i0(n),i=xf(n);else{if(!s0.call(n,"name"))throw new Error(U2("name"));const u=n.name;if(o=u,s0.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(z2(u));a=i0(u),i=xf(u),d=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:d}}function i0(n){return Aa(n)?n:n.split(".")}function xf(n){return Aa(n)?n.join("."):n}function H2(n,a){let i=[],o=!1;const r=(d,u,p)=>{if(pn(d))if(!u[p])i.push(d);else{let m=u[p];const g=d[m];if(!pn(g))return;if(p===u.length-1&&(Zn(g)||w1(g)||R2(g)))i.push(M2(g));else if(Aa(g)){o=!0;for(let y=0,v=g.length;y<v;y+=1)r(g[y],u,p+1)}else u.length&&r(g,u,p+1)}};return r(n,Zn(a)?a.split("."):a,0),o?i:i[0]}const G2={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},P2={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},F2={location:0,threshold:.6,distance:100},$2={useExtendedSearch:!1,getFn:H2,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var xe={...P2,...G2,...F2,...$2};const q2=/[^ ]+/g;function Y2(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const d=r.match(q2).length;if(i.has(d))return i.get(d);const u=1/Math.pow(d,.5*n),p=parseFloat(Math.round(u*o)/o);return i.set(d,p),p},clear(){i.clear()}}}class xh{constructor({getFn:a=xe.getFn,fieldNormWeight:i=xe.fieldNormWeight}={}){this.norm=Y2(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,Zn(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();Zn(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(!pn(a)||$d(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,d)=>{let u=r.getFn?r.getFn(a):this.getFn(a,r.path);if(pn(u)){if(Aa(u)){let p=[];const m=[{nestedArrIndex:-1,value:u}];for(;m.length;){const{nestedArrIndex:g,value:y}=m.pop();if(pn(y))if(Zn(y)&&!$d(y)){let v={v:y,i:g,n:this.norm.get(y)};p.push(v)}else Aa(y)&&y.forEach((v,x)=>{m.push({nestedArrIndex:x,value:v})})}o.$[d]=p}else if(Zn(u)&&!$d(u)){let p={v:u,n:this.norm.get(u)};o.$[d]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function M1(n,a,{getFn:i=xe.getFn,fieldNormWeight:o=xe.fieldNormWeight}={}){const r=new xh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(D1)),r.setSources(a),r.create(),r}function K2(n,{getFn:a=xe.getFn,fieldNormWeight:i=xe.fieldNormWeight}={}){const{keys:o,records:r}=n,d=new xh({getFn:a,fieldNormWeight:i});return d.setKeys(o),d.setIndexRecords(r),d}function jr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=xe.distance,ignoreLocation:d=xe.ignoreLocation}={}){const u=a/n.length;if(d)return u;const p=Math.abs(o-i);return r?u+p/r:p?1:u}function Z2(n=[],a=xe.minMatchCharLength){let i=[],o=-1,r=-1,d=0;for(let u=n.length;d<u;d+=1){let p=n[d];p&&o===-1?o=d:!p&&o!==-1&&(r=d-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[d-1]&&d-o>=a&&i.push([o,d-1]),i}const Ds=32;function X2(n,a,i,{location:o=xe.location,distance:r=xe.distance,threshold:d=xe.threshold,findAllMatches:u=xe.findAllMatches,minMatchCharLength:p=xe.minMatchCharLength,includeMatches:m=xe.includeMatches,ignoreLocation:g=xe.ignoreLocation}={}){if(a.length>Ds)throw new Error(I2(Ds));const y=a.length,v=n.length,x=Math.max(0,Math.min(o,v));let E=d,C=x;const A=p>1||m,w=A?Array(v):[];let _;for(;(_=n.indexOf(a,C))>-1;){let R=jr(a,{currentLocation:_,expectedLocation:x,distance:r,ignoreLocation:g});if(E=Math.min(R,E),C=_+y,A){let I=0;for(;I<y;)w[_+I]=1,I+=1}}C=-1;let N=[],D=1,H=y+v;const B=1<<y-1;for(let R=0;R<y;R+=1){let I=0,P=H;for(;I<P;)jr(a,{errors:R,currentLocation:x+P,expectedLocation:x,distance:r,ignoreLocation:g})<=E?I=P:H=P,P=Math.floor((H-I)/2+I);H=P;let J=Math.max(1,x-P+1),ee=u?v:Math.min(x+P,v)+y,ae=Array(ee+2);ae[ee+1]=(1<<R)-1;for(let pe=ee;pe>=J;pe-=1){let oe=pe-1,j=i[n.charAt(oe)];if(A&&(w[oe]=+!!j),ae[pe]=(ae[pe+1]<<1|1)&j,R&&(ae[pe]|=(N[pe+1]|N[pe])<<1|1|N[pe+1]),ae[pe]&B&&(D=jr(a,{errors:R,currentLocation:oe,expectedLocation:x,distance:r,ignoreLocation:g}),D<=E)){if(E=D,C=oe,C<=x)break;J=Math.max(1,2*x-C)}}if(jr(a,{errors:R+1,currentLocation:x,expectedLocation:x,distance:r,ignoreLocation:g})>E)break;N=ae}const F={isMatch:C>=0,score:Math.max(.001,D)};if(A){const R=Z2(w,p);R.length?m&&(F.indices=R):F.isMatch=!1}return F}function Q2(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 Kr=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 R1{constructor(a,{location:i=xe.location,threshold:o=xe.threshold,distance:r=xe.distance,includeMatches:d=xe.includeMatches,findAllMatches:u=xe.findAllMatches,minMatchCharLength:p=xe.minMatchCharLength,isCaseSensitive:m=xe.isCaseSensitive,ignoreDiacritics:g=xe.ignoreDiacritics,ignoreLocation:y=xe.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y},a=m?a:a.toLowerCase(),a=g?Kr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const v=(E,C)=>{this.chunks.push({pattern:E,alphabet:Q2(E),startIndex:C})},x=this.pattern.length;if(x>Ds){let E=0;const C=x%Ds,A=x-C;for(;E<A;)v(this.pattern.substr(E,Ds),E),E+=Ds;if(C){const w=x-Ds;v(this.pattern.substr(w),w)}}else v(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?Kr(a):a,this.pattern===a){let A={isMatch:!0,score:0};return r&&(A.indices=[[0,a.length-1]]),A}const{location:d,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:y}=this.options;let v=[],x=0,E=!1;this.chunks.forEach(({pattern:A,alphabet:w,startIndex:_})=>{const{isMatch:N,score:D,indices:H}=X2(a,A,w,{location:d+_,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});N&&(E=!0),x+=D,N&&H&&(v=[...v,...H])});let C={isMatch:E,score:E?x/this.chunks.length:1};return E&&r&&(C.indices=v),C}}class os{constructor(a){this.pattern=a}static isMultiMatch(a){return l0(a,this.multiRegex)}static isSingleMatch(a){return l0(a,this.singleRegex)}search(){}}function l0(n,a){const i=n.match(a);return i?i[1]:null}class W2 extends os{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 J2 extends os{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 eN extends os{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 tN extends os{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 nN extends os{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 aN extends os{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 O1 extends os{constructor(a,{location:i=xe.location,threshold:o=xe.threshold,distance:r=xe.distance,includeMatches:d=xe.includeMatches,findAllMatches:u=xe.findAllMatches,minMatchCharLength:p=xe.minMatchCharLength,isCaseSensitive:m=xe.isCaseSensitive,ignoreDiacritics:g=xe.ignoreDiacritics,ignoreLocation:y=xe.ignoreLocation}={}){super(a),this._bitapSearch=new R1(a,{location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class B1 extends os{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=[],d=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+d,r.push([o,i-1]);const u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}const _f=[W2,B1,eN,tN,aN,nN,J2,O1],o0=_f.length,sN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,iN="|";function lN(n,a={}){return n.split(iN).map(i=>{let o=i.trim().split(sN).filter(d=>d&&!!d.trim()),r=[];for(let d=0,u=o.length;d<u;d+=1){const p=o[d];let m=!1,g=-1;for(;!m&&++g<o0;){const y=_f[g];let v=y.isMultiMatch(p);v&&(r.push(new y(v,a)),m=!0)}if(!m)for(g=-1;++g<o0;){const y=_f[g];let v=y.isSingleMatch(p);if(v){r.push(new y(v,a));break}}}return r})}const oN=new Set([O1.type,B1.type]);class rN{constructor(a,{isCaseSensitive:i=xe.isCaseSensitive,ignoreDiacritics:o=xe.ignoreDiacritics,includeMatches:r=xe.includeMatches,minMatchCharLength:d=xe.minMatchCharLength,ignoreLocation:u=xe.ignoreLocation,findAllMatches:p=xe.findAllMatches,location:m=xe.location,threshold:g=xe.threshold,distance:y=xe.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:d,findAllMatches:p,ignoreLocation:u,location:m,threshold:g,distance:y},a=i?a:a.toLowerCase(),a=o?Kr(a):a,this.pattern=a,this.query=lN(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:d}=this.options;a=r?a:a.toLowerCase(),a=d?Kr(a):a;let u=0,p=[],m=0;for(let g=0,y=i.length;g<y;g+=1){const v=i[g];p.length=0,u=0;for(let x=0,E=v.length;x<E;x+=1){const C=v[x],{isMatch:A,indices:w,score:_}=C.search(a);if(A){if(u+=1,m+=_,o){const N=C.constructor.type;oN.has(N)?p=[...p,...w]:p.push(w)}}else{m=0,u=0,p.length=0;break}}if(u){let x={isMatch:!0,score:m/u};return o&&(x.indices=p),x}}return{isMatch:!1,score:1}}}const Tf=[];function cN(...n){Tf.push(...n)}function Ef(n,a){for(let i=0,o=Tf.length;i<o;i+=1){let r=Tf[i];if(r.condition(n,a))return new r(n,a)}return new R1(n,a)}const Zr={AND:"$and",OR:"$or"},Cf={PATH:"$path",PATTERN:"$val"},Af=n=>!!(n[Zr.AND]||n[Zr.OR]),uN=n=>!!n[Cf.PATH],dN=n=>!Aa(n)&&N1(n)&&!Af(n),r0=n=>({[Zr.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function L1(n,a,{auto:i=!0}={}){const o=r=>{let d=Object.keys(r);const u=uN(r);if(!u&&d.length>1&&!Af(r))return o(r0(r));if(dN(r)){const m=u?r[Cf.PATH]:d[0],g=u?r[Cf.PATTERN]:r[m];if(!Zn(g))throw new Error(L2(m));const y={keyId:xf(m),pattern:g};return i&&(y.searcher=Ef(g,a)),y}let p={children:[],operator:d[0]};return d.forEach(m=>{const g=r[m];Aa(g)&&g.forEach(y=>{p.children.push(o(y))})}),p};return Af(n)||(n=r0(n)),o(n)}function fN(n,{ignoreFieldNorm:a=xe.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:d,score:u})=>{const p=r?r.weight:null;o*=Math.pow(u===0&&p?Number.EPSILON:u,(p||1)*(a?1:d))}),i.score=o})}function hN(n,a){const i=n.matches;a.matches=[],pn(i)&&i.forEach(o=>{if(!pn(o.indices)||!o.indices.length)return;const{indices:r,value:d}=o;let u={indices:r,value:d};o.key&&(u.key=o.key.src),o.idx>-1&&(u.refIndex=o.idx),a.matches.push(u)})}function pN(n,a){a.score=n.score}function mN(n,a,{includeMatches:i=xe.includeMatches,includeScore:o=xe.includeScore}={}){const r=[];return i&&r.push(hN),o&&r.push(pN),n.map(d=>{const{idx:u}=d,p={item:a[u],refIndex:u};return r.length&&r.forEach(m=>{m(d,p)}),p})}class Vi{constructor(a,i={},o){this.options={...xe,...i},this.options.useExtendedSearch,this._keyStore=new V2(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof xh))throw new Error(B2);this._myIndex=i||M1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){pn(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 d=this._docs[o];a(d,o)&&(this.removeAt(o),o-=1,r-=1,i.push(d))}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:d,sortFn:u,ignoreFieldNorm:p}=this.options;let m=Zn(a)?Zn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return fN(m,{ignoreFieldNorm:p}),d&&m.sort(u),w1(i)&&i>-1&&(m=m.slice(0,i)),mN(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=Ef(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:d,i:u,n:p})=>{if(!pn(d))return;const{isMatch:m,score:g,indices:y}=i.searchIn(d);m&&r.push({item:d,idx:u,matches:[{score:g,value:d,norm:p,indices:y}]})}),r}_searchLogical(a){const i=L1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:v,searcher:x}=p,E=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(m,v),searcher:x});return E&&E.length?[{idx:g,item:m,matches:E}]:[]}const y=[];for(let v=0,x=p.children.length;v<x;v+=1){const E=p.children[v],C=o(E,m,g);if(C.length)y.push(...C);else if(p.operator===Zr.AND)return[]}return y},r=this._myIndex.records,d={},u=[];return r.forEach(({$:p,i:m})=>{if(pn(p)){let g=o(i,p,m);g.length&&(d[m]||(d[m]={idx:m,item:p,matches:[]},u.push(d[m])),g.forEach(({matches:y})=>{d[m].matches.push(...y)}))}}),u}_searchObjectList(a){const i=Ef(a,this.options),{keys:o,records:r}=this._myIndex,d=[];return r.forEach(({$:u,i:p})=>{if(!pn(u))return;let m=[];o.forEach((g,y)=>{m.push(...this._findMatches({key:g,value:u[y],searcher:i}))}),m.length&&d.push({idx:p,item:u,matches:m})}),d}_findMatches({key:a,value:i,searcher:o}){if(!pn(i))return[];let r=[];if(Aa(i))i.forEach(({v:d,i:u,n:p})=>{if(!pn(d))return;const{isMatch:m,score:g,indices:y}=o.searchIn(d);m&&r.push({score:g,key:a,value:d,idx:u,norm:p,indices:y})});else{const{v:d,n:u}=i,{isMatch:p,score:m,indices:g}=o.searchIn(d);p&&r.push({score:m,key:a,value:d,norm:u,indices:g})}return r}}Vi.version="7.1.0";Vi.createIndex=M1;Vi.parseIndex=K2;Vi.config=xe;Vi.parseQuery=L1;cN(rN);function c0(n,a,i,o){if(!a.trim())return[];const r=.3;return new Vi(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 gN="_breadcrumbs_17or2_1",vN="_list_17or2_11",yN="_item_17or2_21",bN="_separator_17or2_28",SN="_link_17or2_34",xN="_current_17or2_57",_i={breadcrumbs:gN,list:vN,item:yN,separator:bN,link:SN,current:xN},_N="›";function Hi({segments:n}){return h.jsx("nav",{className:_i.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:_i.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:_i.item,children:[i>0&&h.jsx("span",{className:_i.separator,"aria-hidden":"true",children:_N}),a.url&&!o?h.jsx(If,{className:_i.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:_i.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function kf(){kf=function(r,d){return new i(r,void 0,d)};var n=RegExp.prototype,a=new WeakMap;function i(r,d,u){var p=new RegExp(r,d);return a.set(p,u||a.get(r)),Xr(p,i.prototype)}function o(r,d){var u=a.get(d);return Object.keys(u).reduce(function(p,m){var g=u[m];if(typeof g=="number")p[m]=r[g];else{for(var y=0;r[g[y]]===void 0&&y+1<g.length;)y++;p[m]=r[g[y]]}return p},Object.create(null))}return(function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Xr(r,d)})(i,RegExp),i.prototype.exec=function(r){var d=n.exec.call(this,r);if(d){d.groups=o(d,this);var u=d.indices;u&&(u.groups=o(u,this))}return d},i.prototype[Symbol.replace]=function(r,d){if(typeof d=="string"){var u=a.get(this);return n[Symbol.replace].call(this,r,d.replace(/\$<([^>]+)>/g,function(m,g){var y=u[g];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof d=="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)),d.apply(this,m)})}return n[Symbol.replace].call(this,r,d)},kf.apply(this,arguments)}function Xr(n,a){return Xr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Xr(n,a)}function u0(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 qd(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,d){if(r){if(typeof r=="string")return u0(r,d);var u=Object.prototype.toString.call(r).slice(8,-1);return u==="Object"&&r.constructor&&(u=r.constructor.name),u==="Map"||u==="Set"?Array.from(r):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?u0(r,d):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 TN=(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){d_(o,"element",i)};function i(o,r,d){var u,p;if(d&&d.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(u=o.data)==null?void 0:u.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,y,v=(function(B){for(var F,R=qd(B.properties.className);!(F=R()).done;){var I=F.value;if(I.slice(0,9)==="language-")return I.slice(9).toLowerCase()}return null})(o);if(!v&&a.defaultLanguage&&o.properties.className.push("language-"+(v=a.defaultLanguage)),o.properties.className.push("code-highlight"),v)try{var x,E;E=(x=v)!=null&&x.includes("diff-")?v.split("-")[1]:v,g=n.highlight(Er(o),E),d.properties.className=(d.properties.className||[]).concat("language-"+E)}catch(B){if(!a.ignoreMissing||!/Unknown language/.test(B.message))throw B;g=o}else g=o;g.children=(y=1,function B(F){return F.reduce(function(R,I){if(I.type==="text"){var P=I.value,J=(P.match(/\n/g)||"").length;if(J===0)I.position={start:{line:y,column:1},end:{line:y,column:1}},R.push(I);else for(var ee,ae=P.split(`
88
- `),te=qd(ae.entries());!(ee=te()).done;){var pe=ee.value,oe=pe[0],j=pe[1];R.push({type:"text",value:oe===ae.length-1?j:j+`
89
- `,position:{start:{line:y+oe,column:1},end:{line:y+oe,column:1}}})}return y+=J,R}if(Object.prototype.hasOwnProperty.call(I,"children")){var Q=y;return I.children=B(I.children),R.push(I),I.position={start:{line:Q,column:1},end:{line:y,column:1}},R}return R.push(I),R},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var C,A=(function(B){var F=/{([\d,-]+)}/,R=B.split(",").map(function(J){return J.trim()}).join();if(F.test(R)){var I=F.exec(R)[1],P=h_(I);return function(J){return P.includes(J+1)}}return function(){return!1}})(m),w=(function(B){var F=kf(/showLineNumbers=(\d+)/i,{lines:1});if(F.test(B)){var R=F.exec(B);return Number(R.groups.lines)}return 1})(m),_=(function(B){for(var F=new Array(B),R=0;R<B;R++)F[R]={type:"element",tagName:"span",properties:{className:[]},children:[]};return F})(g.position.end.line),N=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],D=function(){var B,F,R=C.value,I=R[0],P=R[1];P.properties.className=["code-line"];var J=p_(g,function(ee){return ee.position.start.line<=I+1&&ee.position.end.line>=I+1});P.children=J.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(v))&&!N.some(function(ee){return m.toLowerCase().includes(ee)})&&(P.properties.line=[(I+w).toString()],P.properties.className.push("line-number")),A(I)&&P.properties.className.push("highlight-line"),(v==="diff"||(B=v)!=null&&B.includes("diff-"))&&Er(P).substring(0,1)==="-"?P.properties.className.push("deleted"):(v==="diff"||(F=v)!=null&&F.includes("diff-"))&&Er(P).substring(0,1)==="+"&&P.properties.className.push("inserted")},H=qd(_.entries());!(C=H()).done;)D();_.length>0&&Er(_[_.length-1]).trim()===""&&_.pop(),o.children=_}}}})(f_);const EN="_systemEvent_463jy_1",CN="_systemTimestamp_463jy_8",AN="_textEvent_463jy_12",kN="_toolUseEvent_463jy_98",wN="_toolUseHeader_463jy_118",NN="_toolUsePrefix_463jy_125",jN="_toolUseName_463jy_130",DN="_toolUseArgs_463jy_135",MN="_toolResultEvent_463jy_146",RN="_toolResultHeader_463jy_151",ON="_toolResultIndicatorOk_463jy_175",BN="_toolResultIndicatorError_463jy_182",LN="_toolResultLabel_463jy_189",IN="_toolResultToggle_463jy_193",UN="_toolResultCommand_463jy_199",zN="_toolResultEllipsis_463jy_209",VN="_toolResultPre_463jy_213",HN="_errorEvent_463jy_234",GN="_statusEvent_463jy_242",PN="_userInputEvent_463jy_251",FN="_userInputContent_463jy_257",$N="_defaultEvent_463jy_274",pt={systemEvent:EN,systemTimestamp:CN,textEvent:AN,toolUseEvent:kN,toolUseHeader:wN,toolUsePrefix:NN,toolUseName:jN,toolUseArgs:DN,toolResultEvent:MN,toolResultHeader:RN,toolResultIndicatorOk:ON,toolResultIndicatorError:BN,toolResultLabel:LN,toolResultToggle:IN,toolResultCommand:UN,toolResultEllipsis:zN,toolResultPre:VN,errorEvent:HN,statusEvent:GN,userInputEvent:PN,userInputContent:FN,defaultEvent:$N};function qN({time:n,content:a}){return h.jsxs("div",{className:pt.systemEvent,children:[h.jsxs("span",{className:pt.systemTimestamp,children:["[",n,"]"]})," ",a]})}function YN({content:n}){return h.jsx("div",{className:pt.textEvent,children:h.jsx(Nf,{remarkPlugins:[jf],rehypePlugins:[TN],children:n})})}function KN({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:pt.toolUseEvent,children:[h.jsxs("div",{className:pt.toolUseHeader,children:[h.jsx("span",{className:pt.toolUsePrefix,children:">"}),a?h.jsx("span",{className:pt.toolUseName,children:a}):null]}),h.jsx("pre",{className:pt.toolUseArgs,children:i})]})}const d0=5;function ZN(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 XN({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let d=!1;if(a)try{d=JSON.parse(a).is_error===!0}catch{}const u=n.split(`
90
- `),p=u.length>d0,m=o?n:u.slice(0,d0).join(`
91
- `),y=((i==null?void 0:i.tool)??"")||(d?"Tool error":"Tool output"),v=i?ZN(i.tool,i.args):"",x=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?pt.toolResultIndicatorError:pt.toolResultIndicatorOk,"aria-label":d?"error":"success","data-testid":d?"tool-result-indicator-error":"tool-result-indicator-ok",children:d?"✗":"✓"}),h.jsx("span",{className:pt.toolResultLabel,"data-testid":"tool-result-label",children:y}),p&&h.jsx("span",{className:pt.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:pt.toolResultEvent,"data-testid":"tool-result",children:[p?h.jsx("button",{className:pt.toolResultHeader,"data-testid":"tool-result-header",onClick:()=>{r(E=>!E)},"aria-expanded":o,children:x}):h.jsx("div",{className:pt.toolResultHeader,"data-testid":"tool-result-header",children:x}),v&&h.jsx("div",{className:pt.toolResultCommand,children:v}),h.jsxs("pre",{className:pt.toolResultPre,"data-testid":"tool-result-content",children:[m,!o&&p&&h.jsx("span",{className:pt.toolResultEllipsis,children:"…"})]})]})}function QN({content:n}){return h.jsxs("div",{className:pt.errorEvent,children:["Error: ",n]})}function WN({content:n}){return h.jsxs("div",{className:pt.statusEvent,children:["--- ",n," ---"]})}function JN({content:n}){return h.jsx("div",{className:pt.userInputEvent,children:h.jsx("span",{className:pt.userInputContent,children:n})})}function ej({content:n}){return h.jsx("div",{className:pt.defaultEvent,children:n})}function tj({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(qN,{time:i,content:n.content});case"text":case"output":return h.jsx(YN,{content:n.content});case"tool_use":return h.jsx(KN,{content:n.content});case"tool_result":return h.jsx(XN,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(QN,{content:n.content});case"status":return h.jsx(WN,{content:n.content});case"user_input":return h.jsx(JN,{content:n.content});default:return h.jsx(ej,{content:n.content})}}const nj="_overlay_cmicx_1",aj="_dialog_cmicx_11",sj="_title_cmicx_30",ij="_description_cmicx_38",lj="_actions_cmicx_45",oj="_cancelButton_cmicx_52",rj="_confirmButton_cmicx_79",ks={overlay:nj,dialog:aj,title:sj,description:ij,actions:lj,cancelButton:oj,confirmButton:rj};function uc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:d}){const u=S.useId(),p=S.useId();return h.jsx(Mn,{children:n&&h.jsx(qt.div,{className:ks.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:m=>{m.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-describedby":i?p:void 0,children:h.jsxs(qt.div,{className:ks.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:u,className:ks.title,children:a}),i&&h.jsx("p",{id:p,className:ks.description,children:i}),h.jsxs("div",{className:ks.actions,children:[h.jsx("button",{type:"button",className:ks.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:ks.confirmButton,onClick:r,children:o})]})]})})})}const cj="_spinner_1uyt1_1",uj="_spin_1uyt1_1",dj="_sm_1uyt1_14",fj="_md_1uyt1_20",hj="_lg_1uyt1_26",pj="_xl_1uyt1_32",f0={spinner:cj,spin:uj,sm:dj,md:fj,lg:hj,xl:pj};function Qr({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${f0.spinner} ${f0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const mj="_splash_1bn1g_1",gj="_logo_1bn1g_11",h0={splash:mj,logo:gj};function vj(){return h.jsxs("div",{className:h0.splash,"data-testid":"splash-screen",children:[h.jsx("img",{src:"/grackle-logo.png",alt:"Grackle",className:h0.logo}),h.jsx(Qr,{size:"xl",label:"Loading Grackle",liveRegion:!0})]})}const wf={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 is(n){return n==="blocked"?wf.blocked:wf[_h(n)]}const yj={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function bj(n){return yj[_h(n)]??"statusPending"}const Sj=["working","paused","failed","not_started","blocked","complete"],p0=["not_started","working","paused","complete","failed"],xj={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function _h(n){return n in wf&&n!=="blocked"?n:xj[n]??"not_started"}const _j={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"},Tj="_container_1jba1_1",Ej="_header_1jba1_5",Cj="_searchInput_1jba1_17",Aj="_searchHighlight_1jba1_50",kj="_addButton_1jba1_56",wj="_createForm_1jba1_83",Nj="_createInput_1jba1_89",jj="_createButton_1jba1_120",Dj="_creatingHint_1jba1_161",Mj="_workspaceRow_1jba1_170",Rj="_selected_1jba1_188",Oj="_expandArrow_1jba1_193",Bj="_expanded_1jba1_200",Lj="_workspaceName_1jba1_204",Ij="_taskCount_1jba1_208",Uj="_newTaskButton_1jba1_214",zj="_taskRow_1jba1_241",Vj="_taskStatusIcon_1jba1_271",Hj="_taskTitle_1jba1_275",Gj="_dependencyBadge_1jba1_282",Pj="_blockedBadge_1jba1_294",Fj="_leafSpacer_1jba1_299",$j="_childCountBadge_1jba1_304",qj="_addChildButton_1jba1_317",Yj="_emptyCta_1jba1_366",Kj="_ctaDescription_1jba1_379",Zj="_ctaButton_1jba1_385",Xj="_emptyTaskCta_1jba1_420",Qj="_headerActions_1jba1_425",Wj="_groupToggle_1jba1_431",Jj="_groupToggleActive_1jba1_458",eD="_statusGroupHeader_1jba1_462",tD="_statusGroupIcon_1jba1_481",nD="_statusGroupLabel_1jba1_485",aD="_statusGroupCount_1jba1_490",sD="_createTaskLink_1jba1_503",_e={container:Tj,header:Ej,searchInput:Cj,searchHighlight:Aj,addButton:kj,createForm:wj,createInput:Nj,createButton:jj,creatingHint:Dj,workspaceRow:Mj,selected:Rj,expandArrow:Oj,expanded:Bj,workspaceName:Lj,taskCount:Ij,newTaskButton:Uj,taskRow:zj,taskStatusIcon:Vj,taskTitle:Hj,dependencyBadge:Gj,blockedBadge:Pj,leafSpacer:Fj,childCountBadge:$j,addChildButton:qj,emptyCta:Yj,ctaDescription:Kj,ctaButton:Zj,emptyTaskCta:Xj,headerActions:Qj,groupToggle:Wj,groupToggleActive:Jj,statusGroupHeader:eD,statusGroupIcon:tD,statusGroupLabel:nD,statusGroupCount:aD,createTaskLink:sD};function iD(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],[d,u]=a[o];d<=r[1]+1?r[1]=Math.max(r[1],u):i.push([d,u])}return i}function I1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=iD(a),o=[];let r=0;for(const[d,u]of i)d>r&&o.push(h.jsx("span",{children:n.slice(r,d)},`p${r}`)),o.push(h.jsx("mark",{className:_e.searchHighlight,children:n.slice(d,u+1)},`m${d}`)),r=u+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const lD=[{name:"name",weight:2},{name:"description",weight:1}],oD=[{name:"title",weight:2},{name:"description",weight:1}],U1=34,rD=16,z1="grackle-group-by-status";function m0(){try{return localStorage.getItem(z1)==="true"}catch{return!1}}function cD(n){try{localStorage.setItem(z1,String(n))}catch{}}function uD(n,a){const i=new Map;for(const d of n){const p=d.dependsOn.length>0&&d.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":d.status,m=i.get(p);m?m.push(d):i.set(p,[d])}const o=[],r=new Set;for(const d of Sj){r.add(d);const u=i.get(d);if(u&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}}for(const[d,u]of i)if(!r.has(d)&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}return o}function dD({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:d}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:_e.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),i())},children:[h.jsx("span",{className:`${_e.expandArrow} ${a?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:_e.statusGroupLabel,children:n.label}),h.jsx("span",{className:_e.statusGroupCount,children:n.tasks.length})]}),h.jsx(Mn,{children:a&&h.jsx(qt.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(u=>{const p=is(u.status),m=o===u.id;return h.jsxs("div",{onClick:()=>r(ns(u.id)),className:`${_e.taskRow} ${m?_e.selected:""}`,style:{"--task-indent":`${U1}px`},"data-task-id":u.id,children:[h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:_e.taskTitle,title:u.title,children:h.jsx(I1,{text:u.title,indices:d.get(u.id)})})]},u.id)})})})]})}function fD(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,d)=>r.sortOrder-d.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function V1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,workspaceId:u,taskStatusById:p,titleHighlights:m}){const g=is(n.status),y=n.dependsOn.length>0&&n.dependsOn.some(A=>p.get(A)!=="complete"),v=i.has(n.id),x=n.children.length>0,E=r===n.id,C=U1+a*rD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(ns(n.id)),className:`${_e.taskRow} ${E?_e.selected:""}`,style:{"--task-indent":`${C}px`},"data-task-id":n.id,children:[x&&h.jsx("span",{className:`${_e.expandArrow} ${v?_e.expanded:""}`,role:"button",tabIndex:0,"aria-label":v?"Collapse task":"Expand task",onClick:A=>{A.stopPropagation(),o(n.id)},onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),A.stopPropagation(),o(n.id))},children:"▸"}),!x&&h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:_e.taskTitle,title:n.title,children:h.jsx(I1,{text:n.title,indices:m.get(n.id)})}),x&&h.jsxs("span",{className:_e.childCountBadge,children:[n.children.filter(A=>A.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${_e.dependencyBadge} ${y?_e.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:y?"blocked":"dep"}),a<j2&&h.jsx("button",{onClick:A=>{A.stopPropagation(),d(Os(u,n.id))},title:"Add child task","aria-label":"Add child task",className:_e.addChildButton,children:"+"})]}),h.jsx(Mn,{children:x&&v&&h.jsx(qt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(A=>h.jsx(V1,{node:A,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,workspaceId:u,taskStatusById:p,titleHighlights:m},A.id))})})]})}function hD(){const{workspaces:n,tasks:a,environments:i,loadTasks:o,createWorkspace:r,workspaceCreating:d}=Lt(),u=On(),[p,m]=S.useState(new Set),[g,y]=S.useState(new Set),[v,x]=S.useState(new Set),[E,C]=S.useState(!1),[A,w]=S.useState(""),[_,N]=S.useState(m0),[D,H]=S.useState(m0),[B,F]=S.useState(new Map),R=()=>{const ne=!_;cD(ne),N(ne),ne&&(H(!0),F(new Map))},I=(ne,fe)=>{const de=`${ne}:${fe}`;F(Qe=>{const We=new Map(Qe),It=We.has(de)?We.get(de):D;return We.set(de,!It),We})},P=(ne,fe)=>{const de=`${ne}:${fe}`;return B.has(de)?B.get(de):D},J=Xt("/tasks/:taskId/*"),ee=Xt("/workspaces/:workspaceId"),ae=(J==null?void 0:J.params.taskId)!=="new"?J==null?void 0:J.params.taskId:void 0,te=ee==null?void 0:ee.params.workspaceId,pe=S.useRef(p);pe.current=p;const oe=S.useMemo(()=>new Map(a.map(ne=>[ne.id,ne.status])),[a]),j=ne=>{m(fe=>{const de=new Set(fe);return de.has(ne)?de.delete(ne):(de.add(ne),o(ne)),de})},Q=ne=>{y(fe=>{const de=new Set(fe);return de.has(ne)?(de.delete(ne),x(Qe=>new Set(Qe).add(ne))):(de.add(ne),x(Qe=>{const We=new Set(Qe);return We.delete(ne),We})),de})};S.useEffect(()=>{const ne=new Set(a.filter(fe=>fe.parentTaskId).map(fe=>fe.parentTaskId));ne.size>0&&y(fe=>{const de=new Set(fe);for(const Qe of ne)v.has(Qe)||de.add(Qe);return de})},[a,v]),S.useEffect(()=>{te&&!pe.current.has(te)&&(m(ne=>new Set(ne).add(te)),o(te))},[te,o]);const q=()=>{!A.trim()||d||i.length===0||(r(A.trim(),void 0,void 0,i[0].id),w(""),C(!1))},[ue,K]=S.useState(""),{directMatchTaskIds:Ge,treeMatchTaskIds:we,visibleWorkspaceIds:ge,matchedWorkspaceIds:Re,titleHighlights:gt}=S.useMemo(()=>{if(!ue.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleWorkspaceIds:null,matchedWorkspaceIds:null,titleHighlights:new Map};const ne=c0(n,ue,lD),fe=c0(a,ue,oD),de=new Set(ne.map(at=>at.item.id)),Qe=new Set(fe.map(at=>at.item.id)),We=new Map;for(const at of fe){const Oe=at.matches.find(Hn=>Hn.key==="title");Oe&&We.set(at.item.id,Oe.indices)}const It=new Set(de);for(const at of fe)It.add(at.item.workspaceId);const Ct=new Set(Qe),At=new Map(a.map(at=>[at.id,at]));for(const at of[...Qe]){let Oe=At.get(at);for(;Oe!=null&&Oe.parentTaskId;)Ct.add(Oe.parentTaskId),Oe=At.get(Oe.parentTaskId)}return{directMatchTaskIds:Qe,treeMatchTaskIds:Ct,visibleWorkspaceIds:It,matchedWorkspaceIds:de,titleHighlights:We}},[ue,n,a]),Rt=S.useRef(new Set);return S.useEffect(()=>{if(ue.trim())for(const ne of n)!p.has(ne.id)&&!Rt.current.has(ne.id)&&(Rt.current.add(ne.id),o(ne.id))},[ue,n,p,o]),h.jsxs("div",{className:_e.container,children:[h.jsxs("div",{className:_e.header,children:[h.jsx("span",{children:"Workspaces"}),h.jsxs("div",{className:_e.headerActions,children:[h.jsx("button",{className:`${_e.groupToggle} ${_?_e.groupToggleActive:""}`,onClick:R,"aria-label":_?"Switch to tree view":"Group tasks by status","aria-pressed":_,title:_?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:_e.addButton,onClick:()=>C(!E),"aria-label":"Create workspace",title:"Create workspace",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:ue,onChange:ne=>K(ne.target.value),placeholder:"Filter...","aria-label":"Filter workspaces and tasks",className:_e.searchInput,"data-testid":"sidebar-search"}),E&&h.jsxs("div",{className:_e.createForm,children:[h.jsx("input",{type:"text",value:A,onChange:ne=>w(ne.target.value),onKeyDown:ne=>ne.key==="Enter"&&q(),placeholder:"Workspace name...",autoFocus:!0,disabled:d,className:_e.createInput}),h.jsx("button",{onClick:q,className:_e.createButton,disabled:d,children:d?h.jsx(Qr,{size:"sm",label:"Creating workspace"}):"OK"})]}),d&&h.jsxs("div",{className:_e.creatingHint,children:[h.jsx(Qr,{size:"sm",label:"Creating workspace"}),"Creating workspace…"]}),n.length===0&&!E&&h.jsxs("div",{className:_e.emptyCta,children:[h.jsx("button",{className:_e.ctaButton,onClick:()=>C(!0),children:"Create Workspace"}),h.jsx("div",{className:_e.ctaDescription,children:"Organize your work into workspaces"})]}),n.map(ne=>{if(ge&&!ge.has(ne.id))return null;const fe=Ge!==null,de=p.has(ne.id)||fe,Qe=a.filter(Oe=>Oe.workspaceId===ne.id),We=(Re==null?void 0:Re.has(ne.id))??!1,It=fe&&!We?_?Ge:we:null,Ct=It?Qe.filter(Oe=>It.has(Oe.id)):Qe,At=te===ne.id,at=de&&!_?fD(Ct):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{At?j(ne.id):(de||j(ne.id),u(Zl(ne.id)))},className:`${_e.workspaceRow} ${At?_e.selected:""}`,children:[h.jsx("span",{className:`${_e.expandArrow} ${de?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.workspaceName,title:ne.name,children:ne.name}),h.jsx("span",{className:_e.taskCount,children:Qe.length>0&&`${Qe.filter(Oe=>Oe.status==="complete").length}/${Qe.length}`}),h.jsx("button",{onClick:Oe=>{Oe.stopPropagation(),u(Os(ne.id))},title:"New task",className:_e.newTaskButton,children:"+"})]}),h.jsx(Mn,{children:de&&h.jsxs(qt.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:[_?uD(Ct,oe).map(Oe=>h.jsx(dD,{group:Oe,isExpanded:P(ne.id,Oe.status),onToggle:()=>I(ne.id,Oe.status),selectedTaskId:ae,navigate:u,titleHighlights:gt},Oe.status)):at.map(Oe=>h.jsx(V1,{node:Oe,depth:0,expandedTasks:g,toggleTask:Q,selectedTaskId:ae,navigate:u,workspaceId:ne.id,taskStatusById:oe,titleHighlights:gt},Oe.id)),Ct.length===0&&h.jsx("div",{className:_e.emptyTaskCta,children:h.jsx("button",{className:_e.createTaskLink,onClick:()=>u(Os(ne.id)),children:"+ Create Task"})})]})})]},ne.id)})]})}const pD="_container_lovia_1",mD="_content_lovia_40",g0={container:pD,content:mD},gD=320,H1=220,G1=600,P1="grackle-sidebar-width";function vD(){try{const n=localStorage.getItem(P1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=H1&&a<=G1)return a}}catch{}return gD}function yD(n){try{localStorage.setItem(P1,String(n))}catch{}}function bD(){const[n]=S.useState(vD),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const d of r){const u=d.borderBoxSize[0];if(u){const p=Math.round(u.inlineSize);p>=H1&&p<=G1&&yD(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:g0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:g0.content,children:h.jsx(hD,{})})})}const SD="_bar_8ghh5_1",xD="_barColumn_8ghh5_32",_D="_barRow_8ghh5_63",TD="_input_8ghh5_74",ED="_inputSmall_8ghh5_109",CD="_select_8ghh5_178",AD="_btnPrimary_8ghh5_214",kD="_btnDanger_8ghh5_245",wD="_btnGhost_8ghh5_284",ND="_badge_8ghh5_312",jD="_statusText_8ghh5_322",DD="_statusCompleted_8ghh5_327",MD="_statusFailed_8ghh5_331",RD="_statusBlocked_8ghh5_335",OD="_hintText_8ghh5_340",BD="_creatingHint_8ghh5_345",LD="_errorHint_8ghh5_353",ID="_disconnectHint_8ghh5_359",ce={bar:SD,barColumn:xD,barRow:_D,input:TD,inputSmall:ED,select:CD,btnPrimary:AD,btnDanger:kD,btnGhost:wD,badge:ND,statusText:jD,statusCompleted:DD,statusFailed:MD,statusBlocked:RD,hintText:OD,creatingHint:BD,errorHint:LD,disconnectHint:ID};function v0(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 y0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:ce.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function UD(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:d,personas:u,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:y,codespaceListError:v,codespaceCreating:x,listCodespaces:E,createCodespace:C}=Lt(),{showToast:A}=so(),w=On(),[_]=Uf(),N=Xt("/sessions/:sessionId"),D=Xt("/tasks/:taskId"),H=Xt("/tasks/:taskId/stream"),B=Xt("/tasks/:taskId/findings"),F=Xt("/tasks/:taskId/edit"),R=Xt("/sessions/new"),I=Xt("/environments/new"),P=Xt("/workspaces/:workspaceId"),J=Xt("/tasks/new"),ee=Xt("/"),ae=Xt("/settings/*"),te=N==null?void 0:N.params.sessionId,pe=(D==null?void 0:D.params.taskId)??(H==null?void 0:H.params.taskId)??(B==null?void 0:B.params.taskId),oe=!!R,j=!!I,Q=!!P,q=!!J,ue=!!F,K=!!ee&&!oe&&!j&&!Q&&!q,Ge=!!ae,we=oe?_.get("env")??"":"",[ge,Re]=S.useState(""),[gt,Rt]=S.useState(""),[ne,fe]=S.useState(""),[de,Qe]=S.useState("local"),[We,It]=S.useState(""),[Ct,At]=S.useState(""),[at,Oe]=S.useState(""),[Hn,ka]=S.useState(""),[Gn,ea]=S.useState(""),[Bn,ta]=S.useState(""),[Z,W]=S.useState(""),[ie,Se]=S.useState(""),[ye,Be]=S.useState(""),[Ce,ct]=S.useState("pick"),ke=te?o.find(Te=>Te.id===te):void 0,Pe=pe?r.find(Te=>Te.id===pe):void 0,ut=(Pe==null?void 0:Pe.latestSessionId)||void 0,Ue=ut?o.find(Te=>Te.id===ut):void 0,ht=Pe?Pe.dependsOn.some(Te=>{const Ie=r.find(dt=>dt.id===Te);return Ie&&Ie.status!=="complete"}):!1;if(K||Ge)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a session or click + to start"})});if(ue||q)return h.jsx(h.Fragment,{});if(j){const Te=se=>{if(!se.trim())return!0;const kt=Number(se);return Number.isInteger(kt)&&kt>=1&&kt<=65535},Ie=()=>!(!ne.trim()||de==="ssh"&&!We.trim()||de==="codespace"&&!Bn.trim()||(de==="local"||de==="ssh")&&!Te(Ct)),dt=()=>{if(!Ie())return;const se={};if(de==="local"){if(We.trim()&&(se.host=We.trim()),Ct.trim()){const kt=Number(Ct);Number.isInteger(kt)&&(se.port=kt)}}else if(de==="ssh"){if(se.host=We.trim(),at.trim()&&(se.user=at.trim()),Ct.trim()){const kt=Number(Ct);Number.isInteger(kt)&&(se.sshPort=kt)}Z.trim()&&(se.identityFile=Z.trim())}else de==="docker"?(Hn.trim()&&(se.image=Hn.trim()),Gn.trim()&&(se.repo=Gn.trim())):de==="codespace"&&(se.codespaceName=Bn.trim());p(ne.trim(),de,se),A("Environment added successfully","success"),fe(""),Qe("local"),It(""),At(""),Oe(""),ka(""),ea(""),ta(""),W(""),Se(""),Be(""),ct("pick"),w(Di,{replace:!0})};return h.jsxs("div",{className:ce.barColumn,children:[h.jsxs("div",{className:ce.barRow,children:[h.jsx("span",{className:ce.badge,children:"new env"}),h.jsx("input",{type:"text",value:ne,onChange:se=>fe(se.target.value),placeholder:"Environment name...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:de,onChange:se=>{Qe(se.target.value),se.target.value==="codespace"&&(E(),ct("pick"),ta(""))},className:ce.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx("button",{onClick:dt,disabled:!Ie(),className:ce.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:ce.barRow,children:[de==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:We,onChange:se=>It(se.target.value),placeholder:"Host (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Ct,onChange:se=>At(se.target.value),placeholder:"Port (optional)...",className:ce.inputSmall})]}),de==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:We,onChange:se=>It(se.target.value),placeholder:"Host (required)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:at,onChange:se=>Oe(se.target.value),placeholder:"User (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:Ct,onChange:se=>At(se.target.value),placeholder:"SSH port (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Z,onChange:se=>W(se.target.value),placeholder:"Identity file (optional)...",className:ce.inputSmall})]}),de==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Hn,onChange:se=>ka(se.target.value),placeholder:"Image (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Gn,onChange:se=>ea(se.target.value),placeholder:"Repo (optional)...",className:ce.inputSmall})]}),de==="codespace"&&Ce==="pick"&&h.jsxs(h.Fragment,{children:[!v&&h.jsxs("select",{value:Bn,onChange:se=>{se.target.value==="__create__"?(ct("create"),ta("")):(ta(se.target.value),se.target.value&&!ne.trim()&&fe(se.target.value))},disabled:x,className:ce.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(se=>h.jsxs("option",{value:se.name,children:[se.name," (",se.repository,") — ",se.state]},se.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),x&&h.jsx("span",{className:ce.creatingHint,children:"Creating codespace..."}),v&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.errorHint,children:v}),h.jsx("input",{type:"text",value:Bn,onChange:se=>ta(se.target.value),placeholder:"Or enter codespace name manually...",className:ce.inputSmall})]}),y&&!v&&h.jsx("span",{className:ce.errorHint,children:y})]}),de==="codespace"&&Ce==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ie,onChange:se=>Se(se.target.value),placeholder:"owner/repo",className:ce.inputSmall}),h.jsx("input",{type:"text",value:ye,onChange:se=>Be(se.target.value),placeholder:"Machine type (optional)...",className:ce.inputSmall}),h.jsx("button",{onClick:()=>{ie.trim()&&(C(ie.trim(),ye.trim()||void 0),ct("pick"),Se(""),Be(""))},disabled:!ie.trim(),className:ce.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{ct("pick"),Se(""),Be("")},className:ce.btnGhost,children:"Cancel"})]})]})]})}if(Q)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a task or click + to create one"})});if(pe&&Pe){if(Pe.status==="not_started"){const Te=ht?Pe.dependsOn.map(Ie=>r.find(dt=>dt.id===Ie)).filter(Ie=>Ie&&Ie.status!=="complete").map(Ie=>Ie.title):[];return h.jsx("div",{className:ce.bar,children:ht?h.jsxs("span",{className:ce.statusBlocked,children:["Blocked by: ",Te.join(", ")]}):h.jsx("span",{className:ce.hintText,children:"Use the buttons above to start or manage this task"})})}if(Pe.status==="working"||Pe.status==="paused"){if((Ue==null?void 0:Ue.status)==="idle"){const Ie=Ue.environmentId,dt=v0(Ie,d),se=kt=>{kt.preventDefault();const Ln=Pe.latestSessionId||ut;!ge.trim()||!Ln||dt||(a(Ln,ge),Re(""))};return h.jsxs("form",{onSubmit:se,className:ce.bar,children:[dt&&Ie&&h.jsx(y0,{environmentId:Ie,onReconnect:m}),h.jsx("input",{type:"text",value:ge,onChange:kt=>Re(kt.target.value),placeholder:"Type a message...",autoFocus:!dt,disabled:dt,className:ce.input}),h.jsx("span",{title:dt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!ge.trim()||dt,className:ce.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input})})}if(Pe.status==="complete")return h.jsxs("div",{className:ce.bar,children:[h.jsx("span",{className:`${ce.statusText} ${ce.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>w(Os(Pe.workspaceId)),className:ce.btnPrimary,children:"+ New Task"})]});if(Pe.status==="failed")return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:`${ce.statusText} ${ce.statusFailed}`,children:"Task failed"})})}if(oe){const Te=Ie=>{Ie.preventDefault(),!(!ge.trim()||!we)&&(n(we,ge,gt),A("Session started","success"),Re(""),Rt(""))};return h.jsxs("form",{onSubmit:Te,className:ce.bar,children:[h.jsx("span",{className:ce.badge,children:"new chat"}),h.jsx("input",{type:"text",value:ge,onChange:Ie=>Re(Ie.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:gt,onChange:Ie=>Rt(Ie.target.value),className:ce.select,children:[h.jsx("option",{value:"",children:"(Default)"}),u.map(Ie=>h.jsx("option",{value:Ie.id,children:Ie.name},Ie.id))]}),h.jsx("button",{type:"submit",disabled:!ge.trim()||!we,className:ce.btnPrimary,children:"Go"})]})}if(te){const Te=(ke==null?void 0:ke.status)==="running",Ie=(ke==null?void 0:ke.status)==="idle",dt=ke!==void 0&&["completed","failed","interrupted"].includes(ke.status);if(Te)return h.jsxs("div",{className:ce.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input}),h.jsx("button",{onClick:()=>i(te),className:ce.btnDanger,title:"Stop session",children:"Stop"})]});if(Ie){const se=v0(ke.environmentId,d),kt=Ln=>{Ln.preventDefault(),!(!ge.trim()||se)&&(a(te,ge),Re(""))};return h.jsxs("form",{onSubmit:kt,className:ce.bar,children:[se&&ke.environmentId&&h.jsx(y0,{environmentId:ke.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:ge,onChange:Ln=>Re(Ln.target.value),placeholder:"Type a message...",autoFocus:!se,disabled:se,className:ce.input}),h.jsx("span",{title:se?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!ge.trim()||se,className:ce.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(te),className:ce.btnDanger,title:"Stop session",children:"Stop"})]})}if(dt)return h.jsxs("div",{className:ce.bar,children:[h.jsxs("span",{className:`${ce.statusText} ${ce.hintText}`,children:["Session ",ke.status]}),h.jsx("button",{onClick:()=>w($0(ke.environmentId)),className:ce.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Loading..."})})}const zD="_toast_da8ll_1",VD="_success_da8ll_18",HD="_icon_da8ll_22",GD="_error_da8ll_25",PD="_warning_da8ll_32",FD="_info_da8ll_38",$D="_message_da8ll_53",qD="_close_da8ll_60",Ll={toast:zD,success:VD,icon:HD,error:GD,warning:PD,info:FD,message:$D,close:qD},YD={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function KD({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(qt.div,{className:`${Ll.toast} ${Ll[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:Ll.icon,"aria-hidden":"true",children:YD[n.variant]}),h.jsx("span",{className:Ll.message,children:n.message}),h.jsx("button",{type:"button",className:Ll.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const ZD="_container_qqse2_1",XD={container:ZD};function QD(){const{toasts:n,dismissToast:a}=so();return h.jsx("div",{className:XD.container,"data-testid":"toast-container",children:h.jsx(Mn,{children:n.map(i=>h.jsx(KD,{toast:i,onDismiss:a},i.id))})})}function WD(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 u of o)r.set(u.id,u);const d=new Set;for(const u of n){d.add(u.id);const p=r.get(u.id);if(p&&p.status!==u.status&&u.status!=="sleeping"){if(u.status==="connecting"){a("Provisioning environment…","info");continue}u.status==="connected"?a("Environment connected","success"):u.status==="error"?a("Environment provision failed","error"):u.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const u of o)d.has(u.id)||a("Environment removed","info")},[n,a])}const JD="_panelContainer_aei9x_1",eM="_emptyState_aei9x_8",tM="_fadeIn_aei9x_1",nM="_workspaceSummary_aei9x_17",aM="_workspaceSummaryTitle_aei9x_28",sM="_workspaceSummarySubtitle_aei9x_32",iM="_header_aei9x_36",lM="_headerInfo_aei9x_69",oM="_killButton_aei9x_75",rM="_headerTitle_aei9x_104",cM="_headerActions_aei9x_119",uM="_taskStatusBadge_aei9x_126",dM="_taskBranch_aei9x_135",fM="_taskBlockedBadge_aei9x_141",hM="_btnPrimary_aei9x_149",pM="_btnDanger_aei9x_180",mM="_btnGhost_aei9x_219",gM="_rejectInput_aei9x_245",vM="_tabBar_aei9x_275",yM="_tab_aei9x_275",bM="_active_aei9x_301",SM="_eventScroll_aei9x_306",xM="_tabContent_aei9x_312",_M="_noContext_aei9x_317",TM="_overviewContent_aei9x_323",EM="_overviewDashboard_aei9x_332",CM="_overviewHero_aei9x_338",AM="_statusBadge_aei9x_345",kM="_statusPending_aei9x_357",wM="_statusAssigned_aei9x_362",NM="_statusInProgress_aei9x_367",jM="_statusReview_aei9x_372",DM="_statusDone_aei9x_377",MM="_statusFailed_aei9x_382",RM="_statusWaitingInput_aei9x_387",OM="_overviewBranchPill_aei9x_392",BM="_branchLink_aei9x_407",LM="_overviewSection_aei9x_418",IM="_overviewLabel_aei9x_424",UM="_overviewValue_aei9x_431",zM="_overviewMuted_aei9x_436",VM="_overviewMarkdown_aei9x_442",HM="_envRow_aei9x_511",GM="_envDot_aei9x_517",PM="_envDotGreen_aei9x_524",FM="_envDotYellow_aei9x_528",$M="_envDotRed_aei9x_532",qM="_envDotGray_aei9x_536",YM="_depList_aei9x_540",KM="_depItem_aei9x_546",ZM="_depBlocked_aei9x_553",XM="_depDone_aei9x_557",QM="_timeline_aei9x_561",WM="_timelineRow_aei9x_567",JM="_timelineKey_aei9x_574",eR="_timelineValue_aei9x_580",tR="_timelineDelta_aei9x_584",nR="_reviewNotes_aei9x_595",aR="_overviewDescription_aei9x_606",sR="_waitingMessage_aei9x_612",iR="_errorMessage_aei9x_616",lR="_eventOverflowWarning_aei9x_620",oR="_attemptSelector_aei9x_634",rR="_attemptLabel_aei9x_650",cR="_attemptButton_aei9x_654",uR="_attemptActive_aei9x_671",dR="_attemptStatus_aei9x_677",fR="_emptyCta_aei9x_683",hR="_ctaTitle_aei9x_695",pR="_ctaDescription_aei9x_701",mR="_ctaButton_aei9x_708",gR="_ctaCreateForm_aei9x_743",vR="_ctaCreateInput_aei9x_749",yR="_ctaCreateOk_aei9x_780",bR="_ctaLink_aei9x_815",SR="_workspaceHeader_aei9x_829",xR="_workspaceName_aei9x_854",_R="_workspaceMeta_aei9x_867",TR="_metaRow_aei9x_875",ER="_metaLabel_aei9x_888",CR="_metaValue_aei9x_903",AR="_archiveButton_aei9x_913",kR="_repoLink_aei9x_943",wR="_metaToggle_aei9x_953",NR="_metaToggleArrow_aei9x_974",jR="_metaToggleArrowOpen_aei9x_979",DR="_progressBarContainer_aei9x_983",MR="_progressBar_aei9x_983",RR="_progressFill_aei9x_999",OR="_progressLabel_aei9x_1006",BR="_metaTimestamps_aei9x_1013",LR="_metaTimestamp_aei9x_1013",L={panelContainer:JD,emptyState:eM,fadeIn:tM,workspaceSummary:nM,workspaceSummaryTitle:aM,workspaceSummarySubtitle:sM,header:iM,headerInfo:lM,killButton:oM,headerTitle:rM,headerActions:cM,taskStatusBadge:uM,taskBranch:dM,taskBlockedBadge:fM,btnPrimary:hM,btnDanger:pM,btnGhost:mM,rejectInput:gM,tabBar:vM,tab:yM,active:bM,eventScroll:SM,tabContent:xM,noContext:_M,overviewContent:TM,overviewDashboard:EM,overviewHero:CM,statusBadge:AM,statusPending:kM,statusAssigned:wM,statusInProgress:NM,statusReview:jM,statusDone:DM,statusFailed:MM,statusWaitingInput:RM,overviewBranchPill:OM,branchLink:BM,overviewSection:LM,overviewLabel:IM,overviewValue:UM,overviewMuted:zM,overviewMarkdown:VM,envRow:HM,envDot:GM,envDotGreen:PM,envDotYellow:FM,envDotRed:$M,envDotGray:qM,depList:YM,depItem:KM,depBlocked:ZM,depDone:XM,timeline:QM,timelineRow:WM,timelineKey:JM,timelineValue:eR,timelineDelta:tR,reviewNotes:nR,overviewDescription:aR,waitingMessage:sR,errorMessage:iR,eventOverflowWarning:lR,attemptSelector:oR,attemptLabel:rR,attemptButton:cR,attemptActive:uR,attemptStatus:dR,emptyCta:fR,ctaTitle:hR,ctaDescription:pR,ctaButton:mR,ctaCreateForm:gR,ctaCreateInput:vR,ctaCreateOk:yR,ctaLink:bR,workspaceHeader:SR,workspaceName:xR,workspaceMeta:_R,metaRow:TR,metaLabel:ER,metaValue:CR,archiveButton:AR,repoLink:kR,metaToggle:wR,metaToggleArrow:NR,metaToggleArrowOpen:jR,progressBarContainer:DR,progressBar:MR,progressFill:RR,progressLabel:OR,metaTimestamps:BR,metaTimestamp:LR};function IR(){const{workspaces:n,environments:a,createWorkspace:i,workspaceCreating:o}=Lt(),[r,d]=S.useState(!1),[u,p]=S.useState(""),m=a.length>0,g=()=>{!u.trim()||o||!m||i(u.trim(),void 0,void 0,a[0].id)};return n.length===0?h.jsxs("div",{className:L.emptyCta,"data-testid":"welcome-cta",children:[h.jsx("div",{className:L.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:L.ctaDescription,children:"Organize your work into workspaces and let agents tackle the tasks."}),r?h.jsxs("div",{className:L.ctaCreateForm,children:[h.jsx("input",{type:"text",value:u,onChange:y=>p(y.target.value),onKeyDown:y=>{y.key==="Enter"?g():y.key==="Escape"&&(d(!1),p(""))},placeholder:"Workspace name...","aria-label":"Workspace name",autoFocus:!0,disabled:o,className:L.ctaCreateInput,"data-testid":"welcome-create-input"}),h.jsx("button",{onClick:g,className:L.ctaCreateOk,disabled:o,"aria-label":o?"Creating workspace":void 0,"data-testid":"welcome-create-ok",children:o?h.jsx(Qr,{size:"sm",label:"Creating workspace"}):"OK"})]}):h.jsx("button",{className:L.ctaButton,onClick:()=>d(!0),disabled:o||!m,"data-testid":"welcome-create-button",children:"Create Your First Workspace"}),!m&&h.jsx("div",{className:L.ctaDescription,children:"Add an environment first via Settings before creating a workspace."})]}):h.jsx("div",{className:L.emptyState,children:"Select a workspace or task to get started"})}function UR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const d=a.get(o);i.unshift(d),o=d.parentTaskId||void 0}return i}const Bi={label:"Home",url:"/"};function zR(n){return n?[Bi,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Bi,{label:"Settings",url:void 0}]}function VR(){return[Bi,{label:"New Environment",url:void 0}]}function HR(){return[Bi,{label:"New Chat",url:void 0}]}function GR(n){return[Bi,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function PR(n,a,i){const o=UR(n,i),r=i.get(n),d=r==null?void 0:r.workspaceId,u=d?a.find(g=>g.id===d):void 0,p=[Bi];u&&p.push({label:u.name,url:Zl(u.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:ns(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 FR(){const n=HR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Enter a prompt below to start a new session"})]})}const F1=50;function $R(n,a,i,o,r=F1){return o?n<r:a-n-i<r}function qR(n,a){const i=a-n;return i>0?i:0}function YR({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),d=S.useRef(0),u=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let y=!0;const v=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const x=$R(g.scrollTop,g.scrollHeight,g.clientHeight,i,F1);x!==y&&(y=x,r(x))}))};return g.addEventListener("scroll",v,{passive:!0}),()=>{g.removeEventListener("scroll",v),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||u.current||(u.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 y=qR(d.current,g.scrollHeight);y>0&&(g.scrollTop+=y)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),d.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const y=i?0:g.scrollHeight;g.scrollTo({top:y,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const KR="_wrapper_p24zt_1",ZR="_scrollContainer_p24zt_9",XR="_toolbar_p24zt_15",QR="_directionToggle_p24zt_22",WR="_scrollToAnchor_p24zt_60",JR="_scrollToAnchorBottom_p24zt_84",e3="_scrollToAnchorTop_p24zt_88",ws={wrapper:KR,scrollContainer:ZR,toolbar:XR,directionToggle:QR,scrollToAnchor:WR,scrollToAnchorBottom:JR,scrollToAnchorTop:e3},$1="grackle-stream-direction";function t3(){try{return localStorage.getItem($1)==="reversed"}catch{return!1}}function n3({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 q1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,d]=S.useState(t3),u=N2(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=YR({scrollRef:o,contentLength:n.length,isReversed:r}),y=()=>{const E=!r;d(E);try{localStorage.setItem($1,E?"reversed":"default")}catch{}},v=u?0:.2,x=r?-8:8;return h.jsxs("div",{className:ws.wrapper,children:[h.jsx("div",{className:ws.toolbar,children:h.jsx("button",{className:ws.directionToggle,onClick:y,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:ws.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(n3,{eventsDropped:a}),h.jsx(Mn,{initial:!1,children:p.map((E,C)=>{const A=r?n.length-1-C:C;return h.jsx(qt.div,{initial:{opacity:0,y:x},animate:{opacity:1,y:0},transition:{duration:v,ease:"easeOut"},children:h.jsx(tj,{event:E,toolUseCtx:E.toolUseCtx})},`${E.sessionId}-${E.timestamp}-${A}`)})})]}),h.jsx(Mn,{children:!m&&h.jsxs(qt.button,{className:`${ws.scrollToAnchor} ${r?ws.scrollToAnchorTop:ws.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 Y1(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 K1(n){const a=new Map;for(const d of n)if(d.raw)try{a.set(d,JSON.parse(d.raw))}catch{}const i=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const u=a.get(d);if(!(!u||typeof u.id!="string"))try{const p=JSON.parse(d.content);i.set(u.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const u=a.get(d);if(!u||typeof u.tool_use_id!="string")return d;const p=i.get(u.tool_use_id);return p?(o.add(u.tool_use_id),{...d,toolUseCtx:p}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const u=a.get(d);return u&&typeof u.id=="string"?!o.has(u.id):!0})}function a3({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 s3({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 i3(){const{sessionId:n}=tc(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:d}=Lt(),u=S.useRef(void 0),p=GR(n),m=o.find(v=>v.id===n)??void 0,g=S.useMemo(()=>{const v=n?a.filter(x=>x.sessionId===n):[];return K1(Y1(v))},[a,n]);if(S.useEffect(()=>{n&&n!==u.current&&(u.current=n,d(n))},[n,d]),!n)return h.jsx("div",{className:L.emptyState,children:"No session selected"});const y=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Hi,{segments:p}),h.jsx(a3,{sessionId:n,session:m,isActive:y,onKill:r}),h.jsx(q1,{events:g,eventsDropped:i,emptyState:h.jsx(s3,{session:m})})]})}const b0=220,S0=70,l3=40,o3=60,r3="hierarchy",c3="dependency";function u3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new Sv.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:l3,ranksep:o3});const i=new Map(n.map(u=>[u.id,u])),o=new Map;for(const u of n)if(u.parentTaskId&&i.has(u.parentTaskId)){const p=o.get(u.parentTaskId)||[];p.push(u),o.set(u.parentTaskId,p)}for(const u of n)a.setNode(u.id,{width:b0,height:S0});const r=[];for(const u of n){if(u.parentTaskId&&i.has(u.parentTaskId)){const p=`hierarchy-${u.parentTaskId}-${u.id}`;a.setEdge(u.parentTaskId,u.id,{},p),r.push({id:p,source:u.parentTaskId,target:u.id,type:"smoothstep",data:{edgeType:r3},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of u.dependsOn)if(i.has(p)){const m=`dependency-${p}-${u.id}`;a.setEdge(p,u.id,{},m),r.push({id:m,source:p,target:u.id,type:"smoothstep",data:{edgeType:c3},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return Sv.layout(a),{nodes:n.map(u=>{const p=a.node(u.id),m=o.get(u.id)||[];return{id:u.id,type:"task",position:{x:p.x-b0/2,y:p.y-S0/2},data:{task:u,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:u.dependsOn.length>0}}}),edges:r}},[n])}const d3="_dagContainer_js4w6_1",f3="_taskNode_js4w6_26",h3="_taskNodeBorder_js4w6_54",p3="_taskNodeContent_js4w6_60",m3="_taskNodeHeader_js4w6_70",g3="_taskNodeIcon_js4w6_77",v3="_taskNodeTitle_js4w6_82",y3="_taskNodeBadges_js4w6_90",b3="_childBadge_js4w6_95",S3="_depBadge_js4w6_107",x3="_handle_js4w6_119",_3="_emptyCta_js4w6_126",T3="_ctaDescription_js4w6_137",E3="_ctaButton_js4w6_144",Qt={dagContainer:d3,taskNode:f3,taskNodeBorder:h3,taskNodeContent:p3,taskNodeHeader:m3,taskNodeIcon:g3,taskNodeTitle:v3,taskNodeBadges:y3,childBadge:b3,depBadge:S3,handle:x3,emptyCta:_3,ctaDescription:T3,ctaButton:E3};function C3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,d=is(a.status);return h.jsxs("div",{className:Qt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(xv,{type:"target",position:_v.Top,className:Qt.handle}),h.jsx("div",{className:Qt.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:Qt.taskNodeContent,children:[h.jsxs("div",{className:Qt.taskNodeHeader,children:[h.jsx("span",{className:Qt.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:Qt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Qt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Qt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Qt.depBadge,children:"dep"})]})]}),h.jsx(xv,{type:"source",position:_v.Bottom,className:Qt.handle})]})}const A3=_j,k3={task:C3};function w3({workspaceId:n}){const{tasks:a}=Lt(),i=On(),{resolvedThemeId:o}=W0(),r=S.useMemo(()=>a.filter(y=>y.workspaceId===n),[a,n]),{nodes:d,edges:u}=u3(r),p=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),v={};for(const[x,E]of Object.entries(A3))v[x]=y.getPropertyValue(E).trim()||"#6b7a8d";return v},[o]),m=S.useCallback((y,v)=>{i(ns(v.id))},[i]),g=S.useCallback(y=>{const v=y.data;return p[v.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Qt.emptyCta,children:[h.jsx("button",{className:Qt.ctaButton,onClick:()=>i(Os(n)),children:"Create Task"}),h.jsx("div",{className:Qt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Qt.dagContainer,children:h.jsxs(g_,{nodes:d,edges:u,nodeTypes:k3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(v_,{variant:y_.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(b_,{showInteractive:!1}),h.jsx(S_,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function N3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const d of n)if(d.parentTaskId){const u=o.get(d.parentTaskId);u?u.push(d):o.set(d.parentTaskId,[d])}const r=new Map(p0.map(d=>[d,[]]));for(const d of n){const u=_h(d.status),p=d.dependsOn.length>0&&d.dependsOn.some(C=>a.get(C)!=="complete"),m=o.get(d.id)??[],g=m.length,y=m.filter(C=>C.status==="complete").length;let v;if(u==="paused"&&i){const C=i.get(d.id);C==="idle"?v="Needs input":C==="completed"&&(v="Ready to complete")}const x={task:d,isBlocked:p,childCount:g,doneChildCount:y,pausedSubBadge:v},E=r.get(u);E?E.push(x):r.get("not_started").push(x)}for(const d of r.values())d.sort((u,p)=>u.task.sortOrder-p.task.sortOrder);return p0.map(d=>{const u=is(d);return{status:d,label:u.label,style:u,tasks:r.get(d)??[]}})}const j3="_boardContainer_1c4y1_1",D3="_column_1c4y1_17",M3="_columnHeader_1c4y1_34",R3="_columnIcon_1c4y1_47",O3="_columnLabel_1c4y1_52",B3="_columnCount_1c4y1_57",L3="_cardList_1c4y1_67",I3="_emptyPlaceholder_1c4y1_76",U3="_card_1c4y1_67",z3="_cardHeader_1c4y1_107",V3="_cardStatusIcon_1c4y1_113",H3="_cardTitle_1c4y1_119",G3="_cardBadges_1c4y1_127",P3="_badge_1c4y1_134",F3="_blockedBadge_1c4y1_146",$3="_childBadge_1c4y1_151",q3="_depBadge_1c4y1_155",Y3="_parentBadge_1c4y1_159",K3="_pausedSubBadge_1c4y1_166",Z3="_personaBadge_1c4y1_170",X3="_envBadge_1c4y1_174",Q3="_emptyCta_1c4y1_178",W3="_ctaButton_1c4y1_188",J3="_ctaDescription_1c4y1_204",Ye={boardContainer:j3,column:D3,columnHeader:M3,columnIcon:R3,columnLabel:O3,columnCount:B3,cardList:L3,emptyPlaceholder:I3,card:U3,cardHeader:z3,cardStatusIcon:V3,cardTitle:H3,cardBadges:G3,badge:P3,blockedBadge:F3,childBadge:$3,depBadge:q3,parentBadge:Y3,pausedSubBadge:K3,personaBadge:Z3,envBadge:X3,emptyCta:Q3,ctaButton:W3,ctaDescription:J3};function eO({workspaceId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=Lt(),d=On(),u=S.useMemo(()=>a.filter(v=>v.workspaceId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(v=>[v.id,v.status])),[a]),m=S.useMemo(()=>new Map(u.map(v=>[v.id,v])),[u]),g=S.useMemo(()=>{const v=new Map(i.map(_=>[_.id,_])),x=new Map(o.map(_=>[_.id,_])),E=new Map(r.map(_=>[_.id,_])),C=new Map,A=new Map,w=new Map;for(const _ of u)if(_.latestSessionId){const N=v.get(_.latestSessionId);if(N){if(C.set(_.id,N.status),N.personaId){const D=x.get(N.personaId);D&&A.set(_.id,D.name)}if(N.environmentId){const D=E.get(N.environmentId);D&&w.set(_.id,D.displayName)}}}return{sessionStatusByTaskId:C,personaNameByTaskId:A,environmentNameByTaskId:w}},[u,i,o,r]),y=S.useMemo(()=>N3({tasks:u,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[u,p,g]);return u.length===0?h.jsxs("div",{className:Ye.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ye.ctaButton,onClick:()=>d(Os(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:y.map(v=>h.jsxs("section",{className:Ye.column,"data-testid":`board-column-${v.status}`,"aria-label":`${v.label}, ${v.tasks.length} ${v.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ye.columnHeader,children:[h.jsx("span",{className:Ye.columnIcon,style:{color:v.style.color},children:v.style.icon}),h.jsx("span",{className:Ye.columnLabel,children:v.label}),h.jsx("span",{className:Ye.columnCount,"data-testid":`board-count-${v.status}`,children:v.tasks.length})]}),h.jsx("div",{className:Ye.cardList,children:v.tasks.length===0?h.jsx("div",{className:Ye.emptyPlaceholder,children:"No tasks"}):h.jsx(Mn,{mode:"popLayout",children:v.tasks.map(x=>h.jsx(qt.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(tO,{boardTask:x,tasksById:m,personaName:g.personaNameByTaskId.get(x.task.id),envName:g.environmentNameByTaskId.get(x.task.id),onClick:()=>d(ns(x.task.id))})},x.task.id))})})]},v.status))})}function tO({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:d,isBlocked:u,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,y=is(d.status),v=d.parentTaskId?a.get(d.parentTaskId):void 0;return h.jsxs("div",{className:Ye.card,tabIndex:0,role:"button","data-testid":`board-card-${d.id}`,onClick:r,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),r())},children:[h.jsxs("div",{className:Ye.cardHeader,children:[h.jsx("span",{className:Ye.cardStatusIcon,style:{color:y.color},children:y.icon}),h.jsx("span",{className:Ye.cardTitle,children:d.title})]}),h.jsxs("div",{className:Ye.cardBadges,children:[v&&h.jsx("span",{className:`${Ye.badge} ${Ye.parentBadge}`,title:v.title,children:v.title}),p>0&&h.jsxs("span",{className:`${Ye.badge} ${Ye.childBadge}`,children:[m,"/",p]}),u&&h.jsx("span",{className:`${Ye.badge} ${Ye.blockedBadge}`,children:"blocked"}),d.dependsOn.length>0&&!u&&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 Th(n){const{value:a,onSave:i,validate:o,fieldId:r,activeFieldId:d,onActivate:u,enterToSave:p=!0,trimOnSave:m=!0}=n,[g,y]=S.useState(""),[v,x]=S.useState(""),E=S.useRef(!1),C=d===r,A=S.useCallback(R=>{y(R),x("")},[]),w=S.useCallback(()=>{x("")},[]),_=S.useCallback(()=>{E.current=!1,u==null||u(null),y(""),x("")},[u]),N=S.useCallback(()=>{const R=m?g.trim():g;if(o){const P=o(g);if(P){x(P);return}}const I=m?a.trim():a;if(R===I){_();return}i(R),_()},[g,a,m,o,i,_]),D=S.useCallback(()=>{E.current=!0,u==null||u(r),y(a),x("")},[r,a,u]),H=S.useCallback(R=>{if(E.current){E.current=!1;return}R.relatedTarget instanceof HTMLElement&&R.relatedTarget.dataset.editAction===r||N()},[r,N]),B=S.useCallback(R=>{R.key==="Escape"?_():R.key==="Enter"&&p&&N()},[_,p,N]),F=(()=>{if(!C)return!1;const R=m?a.trim():a;return(m?g.trim():g)!==R})();return S.useEffect(()=>{!C&&(g!==""||v!=="")&&(y(""),x(""))},[C,g,v]),{isEditing:C,draft:g,error:v,isDirty:F,startEdit:D,cancelEdit:_,save:N,setDraft:A,clearError:w,handleBlur:H,handleKeyDown:B,ignoreInitialBlurRef:E}}const nO="_editFieldWrapper_yuzty_1",aO="_editInput_yuzty_10",sO="_editTextarea_yuzty_42",iO="_editSelect_yuzty_78",lO="_editError_yuzty_111",oO="_editInputInvalid_yuzty_118",rO="_editHint_yuzty_123",cO="_unsavedDot_yuzty_132",uO="_metaValueClickable_yuzty_140",dO="_editButton_yuzty_159",fO="_metaPlaceholder_yuzty_175",hO="_worktreeToggle_yuzty_180",He={editFieldWrapper:nO,editInput:aO,editTextarea:sO,editSelect:iO,editError:lO,editInputInvalid:oO,editHint:rO,unsavedDot:cO,metaValueClickable:uO,editButton:dO,metaPlaceholder:fO,worktreeToggle:hO};function Yd(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="text",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:y,maxLength:v,ariaLabel:x,"data-testid":E}=n,C=S.useRef(null),A=Th({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!0,trimOnSave:!0});if(S.useEffect(()=>{if(A.isEditing){const _=window.setTimeout(()=>{var N;(N=C.current)==null||N.focus()},0);return()=>window.clearTimeout(_)}},[A.isEditing]),r==="create"){const _=D=>{m==null||m(D.target.value)},N=o==null?void 0:o(a);return h.jsxs("div",{className:He.editFieldWrapper,children:[h.jsx("input",{className:`${He.editInput} ${N?He.editInputInvalid:""}`,value:a,onChange:_,maxLength:v,placeholder:y,"aria-label":x,"data-testid":E?`${E}-input`:void 0}),N&&h.jsx("span",{className:He.editError,"data-testid":"edit-error",children:N})]})}if(A.isEditing)return h.jsxs("div",{className:He.editFieldWrapper,children:[h.jsx("input",{ref:C,className:`${He.editInput} ${A.error?He.editInputInvalid:""}`,value:A.draft,onChange:_=>A.setDraft(_.target.value),onBlur:A.handleBlur,onKeyDown:A.handleKeyDown,maxLength:v,placeholder:y,"aria-label":x,"data-testid":E?`${E}-input`:void 0}),A.isDirty&&h.jsx("span",{className:He.unsavedDot,title:"Unsaved changes"}),A.error&&h.jsx("span",{className:He.editError,"data-testid":"edit-error",children:A.error}),h.jsx("span",{className:He.editHint,children:"Enter to save · Esc to cancel"})]});const w=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:He.metaValueClickable,onClick:()=>A.startEdit(),onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),A.startEdit())},title:"Click to edit","aria-label":x,"data-testid":E?`${E}-button`:void 0,children:[w!==void 0?w:a?h.jsx("span",{children:a}):h.jsx("span",{className:He.metaPlaceholder,children:y||"None"}),h.jsx("span",{className:He.editButton,"aria-hidden":"true",children:"✏️"})]})}function pO(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="textarea",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:y,ariaLabel:v,"data-testid":x}=n,E=S.useRef(null),C=Th({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});if(S.useEffect(()=>{if(C.isEditing){const w=window.setTimeout(()=>{var _;(_=E.current)==null||_.focus()},0);return()=>window.clearTimeout(w)}},[C.isEditing]),r==="create"){const w=N=>{m==null||m(N.target.value)},_=o==null?void 0:o(a);return h.jsxs("div",{className:He.editFieldWrapper,children:[h.jsx("textarea",{className:`${He.editTextarea} ${_?He.editInputInvalid:""}`,value:a,onChange:w,placeholder:y,"aria-label":v,"data-testid":x?`${x}-input`:void 0}),_&&h.jsx("span",{className:He.editError,"data-testid":"edit-error",children:_})]})}if(C.isEditing)return h.jsxs("div",{className:He.editFieldWrapper,children:[h.jsx("textarea",{ref:E,className:`${He.editTextarea} ${C.error?He.editInputInvalid:""}`,value:C.draft,onChange:w=>C.setDraft(w.target.value),onBlur:C.handleBlur,onKeyDown:C.handleKeyDown,title:v,"aria-label":v,"data-testid":x?`${x}-input`:void 0}),C.isDirty&&h.jsx("span",{className:He.unsavedDot,title:"Unsaved changes"}),C.error&&h.jsx("span",{className:He.editError,"data-testid":"edit-error",children:C.error}),h.jsx("span",{className:He.editHint,children:"Tab to save · Esc to cancel"})]});const A=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:He.metaValueClickable,onClick:()=>C.startEdit(),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),C.startEdit())},title:"Click to edit","aria-label":v,"data-testid":x?`${x}-button`:void 0,children:[A!==void 0?A:a?h.jsx("span",{children:a}):h.jsx("span",{className:He.metaPlaceholder,children:y||"None"}),h.jsx("span",{className:He.editButton,"aria-hidden":"true",children:"✏️"})]})}function Z1(n){var D;const{value:a,onSave:i,mode:o="edit",options:r,fieldId:d="select",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:y,ariaLabel:v,"data-testid":x}=n,E=S.useRef(null),C=Th({value:a,onSave:i,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});S.useEffect(()=>{if(C.isEditing){const H=window.setTimeout(()=>{var B;(B=E.current)==null||B.focus()},0);return()=>window.clearTimeout(H)}},[C.isEditing]);const A=S.useCallback(H=>{const B=H.target.value;C.ignoreInitialBlurRef.current=!1,B!==a&&i(B),C.cancelEdit()},[a,i,C]),w=S.useCallback(H=>{if(C.ignoreInitialBlurRef.current){C.ignoreInitialBlurRef.current=!1;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction===d||C.cancelEdit()},[d,C]);if(o==="create")return h.jsx("select",{className:He.editSelect,value:a,onChange:H=>m==null?void 0:m(H.target.value),"aria-label":v,"data-testid":x?`${x}-select`:void 0,children:r.map(H=>h.jsx("option",{value:H.value,children:H.label},H.value))});if(C.isEditing)return h.jsx("select",{ref:E,className:He.editSelect,value:C.draft,onChange:A,onBlur:w,title:v,"aria-label":v,"data-testid":x?`${x}-select`:void 0,children:r.map(H=>h.jsx("option",{value:H.value,children:H.label},H.value))});const _=g==null?void 0:g(a),N=(D=r.find(H=>H.value===a))==null?void 0:D.label;return h.jsxs("button",{type:"button",className:He.metaValueClickable,onClick:()=>C.startEdit(),title:"Click to change","aria-label":v,"data-testid":x?`${x}-button`:void 0,children:[_!==void 0?_:N?h.jsx("span",{children:N}):h.jsx("span",{className:He.metaPlaceholder,children:y||"None"}),h.jsx("span",{className:He.editButton,"aria-hidden":"true",children:"✏️"})]})}function mO(n){const{checked:a,onChange:i,label:o,ariaLabel:r,"data-testid":d}=n;return h.jsxs("label",{className:He.worktreeToggle,"data-testid":d,children:[h.jsx("input",{type:"checkbox",checked:a,onChange:u=>i(u.target.checked),"aria-label":r}),h.jsx("span",{children:o})]})}const gO="_envRow_1e1r5_1",vO="_envDot_1e1r5_7",yO="_envDotGreen_1e1r5_14",bO="_envDotYellow_1e1r5_18",SO="_envDotRed_1e1r5_22",xO="_envDotGray_1e1r5_26",Ni={envRow:gO,envDot:vO,envDotGreen:yO,envDotYellow:bO,envDotRed:SO,envDotGray:xO};function _O(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?Ni.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?Ni.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?Ni.envDotRed:Ni.envDotGray}function TO(n){const{value:a,onSave:i,environments:o,allowNone:r=!1,fieldId:d="environment",activeFieldId:u,onActivate:p,placeholder:m="No environment",ariaLabel:g="Environment","data-testid":y}=n,v=o.find(C=>C.id===a),x=[...r?[{value:"",label:"None"}]:[],...o.map(C=>({value:C.id,label:C.displayName}))],E=()=>{if(v)return h.jsxs("span",{className:Ni.envRow,children:[h.jsx("span",{className:`${Ni.envDot} ${_O(v.status)}`}),v.displayName]})};return h.jsx(Z1,{value:a,onSave:i,options:x,fieldId:d,activeFieldId:u,onActivate:p,renderDisplay:E,placeholder:m,ariaLabel:g,"data-testid":y})}function x0(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 d=Math.floor(r/60);if(d<24)return`${d}h ago`;const u=Math.floor(d/24);return u<30?`${u}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}const Kd=100;function EO(){const{workspaceId:n}=tc(),a=On(),{tasks:i,environments:o,workspaces:r,personas:d,archiveWorkspace:u,updateWorkspace:p}=Lt(),[m,g]=S.useState("tasks"),[y,v]=S.useState(!1),[x,E]=S.useState(null),[C,A]=S.useState(!1),w=S.useRef(void 0),_=r.find(R=>R.id===n),N=[{label:"Home",url:"/"},{label:(_==null?void 0:_.name)??"Workspace",url:void 0}];S.useEffect(()=>{const R=w.current;w.current=n,!(R===void 0||R===n)&&x!==null&&E(null)},[n,x]);const D=i.filter(R=>R.workspaceId===n),H=D.filter(R=>R.status==="complete").length,B=D.length,F=B>0?Math.round(H/B*100):0;return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Hi,{segments:N}),h.jsxs("div",{className:L.workspaceHeader,children:[h.jsx("span",{className:L.workspaceName,"data-testid":"workspace-name",children:h.jsx(Yd,{value:(_==null?void 0:_.name)||"",onSave:R=>{_&&p(_.id,{name:R})},validate:R=>{const I=R.trim();if(!I)return"Name is required";if(I.length>Kd)return`Max ${Kd} characters`},maxLength:Kd,fieldId:"name",activeFieldId:x,onActivate:E,ariaLabel:"Workspace name",renderDisplay:R=>R||n||void 0,"data-testid":"edit-name"})}),h.jsx("button",{className:L.archiveButton,onClick:()=>v(!0),title:"Archive workspace","data-testid":"archive-workspace-button",children:"Archive"})]}),h.jsxs("button",{className:L.metaToggle,onClick:()=>A(!C),"aria-expanded":!C,"aria-controls":"workspace-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${L.metaToggleArrow} ${C?"":L.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!C&&h.jsxs("div",{className:L.workspaceMeta,"data-testid":"workspace-meta",id:"workspace-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(pO,{value:(_==null?void 0:_.description)||"",onSave:R=>{_&&p(_.id,{description:R})},fieldId:"description",activeFieldId:x,onActivate:E,renderDisplay:R=>R?h.jsx("span",{className:L.overviewMarkdown,children:h.jsx(Nf,{remarkPlugins:[jf],children:R})}):void 0,placeholder:"No description",ariaLabel:"Workspace 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(Yd,{value:(_==null?void 0:_.repoUrl)||"",onSave:R=>{_&&p(_.id,{repoUrl:R})},validate:R=>{const I=R.trim();if(I&&!/^https?:\/\/.+/.test(I))return"Must be a valid http(s) URL"},fieldId:"repoUrl",activeFieldId:x,onActivate:E,renderDisplay:R=>R&&/^https?:\/\//i.test(R)?h.jsx("a",{className:L.repoLink,href:R,target:"_blank",rel:"noopener noreferrer",onClick:I=>I.stopPropagation(),children:R}):R?h.jsx("span",{children:R}):void 0,placeholder:"No repository",ariaLabel:"Workspace 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(TO,{value:(_==null?void 0:_.environmentId)||"",onSave:R=>{_&&R&&p(_.id,{environmentId:R})},environments:o,fieldId:"environmentId",activeFieldId:x,onActivate:E,placeholder:"Select environment",ariaLabel:"Workspace 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(Z1,{value:(_==null?void 0:_.defaultPersonaId)||"",onSave:R=>{_&&p(_.id,{defaultPersonaId:R})},options:[{value:"",label:"(Inherit)"},...d.map(R=>({value:R.id,label:R.name}))],fieldId:"defaultPersonaId",activeFieldId:x,onActivate:E,renderDisplay:R=>{const I=d.find(P=>P.id===R);if(I)return h.jsx("span",{children:I.name})},placeholder:(_==null?void 0:_.defaultPersonaId)||"(Inherit)",ariaLabel:"Workspace 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(mO,{checked:(_==null?void 0:_.useWorktrees)??!0,onChange:R=>{_&&p(_.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(Yd,{value:(_==null?void 0:_.worktreeBasePath)||"",onSave:R=>{_&&p(_.id,{worktreeBasePath:R})},fieldId:"worktreeBasePath",activeFieldId:x,onActivate:E,placeholder:"Default (server default)",ariaLabel:"Working directory","data-testid":"edit-worktree-base-path"})})]}),_&&h.jsxs("div",{className:L.metaTimestamps,children:[h.jsxs("span",{className:L.metaTimestamp,children:["Created ",x0(_.createdAt)]}),_.updatedAt&&_.updatedAt!==_.createdAt&&h.jsxs("span",{className:L.metaTimestamp,children:["· Updated ",x0(_.updatedAt)]})]})]}),B>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:`${F}%`}})}),h.jsxs("span",{className:L.progressLabel,children:[H,"/",B]})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Workspace 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"&&B>0&&h.jsxs("div",{className:L.workspaceSummary,children:[h.jsx("span",{className:L.workspaceSummaryTitle,children:`${H}/${B} tasks complete`}),h.jsx("span",{className:L.workspaceSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&B===0&&h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>a(Os(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(eO,{workspaceId:n}),m==="graph"&&h.jsx(w3,{workspaceId:n}),h.jsx(uc,{isOpen:y,title:"Archive Workspace?",description:"This will hide the workspace from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{_&&(u(_.id),a("/",{replace:!0})),v(!1)},onCancel:()=>v(!1)})]})}const CO="_container_cddyd_1",AO="_header_cddyd_8",kO="_headerTitle_cddyd_35",wO="_badge_cddyd_44",NO="_headerActions_cddyd_54",jO="_body_cddyd_61",DO="_formContent_cddyd_73",MO="_section_cddyd_85",RO="_label_cddyd_91",OO="_titleInput_cddyd_98",BO="_descriptionTextarea_cddyd_131",LO="_parentContext_cddyd_167",IO="_parentLabel_cddyd_175",UO="_parentName_cddyd_182",zO="_personaSelect_cddyd_186",VO="_depList_cddyd_220",HO="_depItem_cddyd_226",GO="_depItemSelected_cddyd_248",PO="_noDeps_cddyd_252",FO="_btnPrimary_cddyd_258",$O="_btnGhost_cddyd_289",Xe={container:CO,header:AO,headerTitle:kO,badge:wO,headerActions:NO,body:jO,formContent:DO,section:MO,label:RO,titleInput:OO,descriptionTextarea:BO,parentContext:LO,parentLabel:IO,parentName:UO,personaSelect:zO,depList:VO,depItem:HO,depItemSelected:GO,noDeps:PO,btnPrimary:FO,btnGhost:$O};function X1({mode:n,taskId:a,workspaceId:i,parentTaskId:o}){const{tasks:r,personas:d,createTask:u,updateTask:p}=Lt(),{showToast:m}=so(),g=On(),y=n==="edit",v=y&&a?r.find(q=>q.id===a):void 0,x=y?(v==null?void 0:v.workspaceId)??"":i??"",E=y?(v==null?void 0:v.parentTaskId)??"":o??"",C=E?r.find(q=>q.id===E):void 0,[A,w]=S.useState((v==null?void 0:v.title)??""),[_,N]=S.useState((v==null?void 0:v.description)??""),[D,H]=S.useState((v==null?void 0:v.dependsOn)??[]),[B,F]=S.useState((v==null?void 0:v.defaultPersonaId)??""),[R,I]=S.useState((v==null?void 0:v.canDecompose)??!1),[P,J]=S.useState(!1),ee=S.useRef(!1);S.useEffect(()=>{y&&v&&!ee.current&&(ee.current=!0,w(v.title),N(v.description),H(v.dependsOn),F(v.defaultPersonaId),I(v.canDecompose))},[y,v]);const ae=r.filter(q=>q.workspaceId===x&&(!y||q.id!==a)&&q.id!==E),te=A.trim().length>0&&(!y||v!==void 0)&&(y||x.length>0),pe=q=>{H(ue=>ue.includes(q)?ue.filter(K=>K!==q):[...ue,q])},oe=()=>{!te||P||y&&v===void 0||(y&&a?(p(a,A.trim(),_,D,B),m("Task updated","success"),g(ns(a),{replace:!0})):(J(!0),u(x,A.trim(),_,D.length>0?D:void 0,E||void 0,B,R,()=>{m("Task created","success"),g(x?Zl(x):"/",{replace:!0})},q=>{m(q,"error"),J(!1)})))},j=()=>{g(y&&a?ns(a):x?Zl(x):"/")},Q=y?"edit task":E?"child task":"new task";return h.jsxs("div",{className:Xe.container,children:[h.jsxs("div",{className:Xe.header,children:[h.jsxs("div",{className:Xe.headerTitle,children:[h.jsx("span",{className:Xe.badge,children:Q}),C&&h.jsxs("span",{className:Xe.parentContext,children:[h.jsx("span",{className:Xe.parentLabel,children:"Child of"}),h.jsx("span",{className:Xe.parentName,children:C.title})]})]}),h.jsxs("div",{className:Xe.headerActions,children:[h.jsx("button",{onClick:oe,disabled:!te||P,className:Xe.btnPrimary,"data-testid":"task-edit-save",children:P?"Creating…":y?"Save Changes":"Create"}),h.jsx("button",{onClick:j,className:Xe.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:Xe.body,children:h.jsxs("div",{className:Xe.formContent,children:[h.jsxs("div",{className:Xe.section,children:[h.jsx("label",{className:Xe.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:A,onChange:q=>w(q.target.value),placeholder:"Task title...",autoFocus:!0,className:Xe.titleInput,"data-testid":"task-edit-title",onKeyDown:q=>{q.key==="Enter"&&te&&oe()}})]}),h.jsxs("div",{className:Xe.section,children:[h.jsx("label",{className:Xe.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:_,onChange:q=>N(q.target.value),placeholder:"Describe the task... (markdown supported)",className:Xe.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:Xe.section,children:[h.jsx("label",{className:Xe.label,htmlFor:"task-edit-persona",children:"Default Persona"}),h.jsxs("select",{id:"task-edit-persona",value:B,onChange:q=>F(q.target.value),className:Xe.personaSelect,"data-testid":"task-edit-persona",children:[h.jsx("option",{value:"",children:"(Inherit)"}),d.map(q=>h.jsx("option",{value:q.id,children:q.name},q.id))]})]}),!y&&h.jsx("div",{className:Xe.section,children:h.jsxs("label",{className:Xe.depItem,"data-testid":"task-edit-can-decompose",children:[h.jsx("input",{type:"checkbox",checked:R,onChange:q=>I(q.target.checked)}),"Can spawn subtasks"]})}),h.jsxs("div",{className:Xe.section,children:[h.jsx("div",{className:Xe.label,children:"Dependencies"}),ae.length===0?h.jsx("div",{className:Xe.noDeps,children:"No other tasks in this workspace"}):h.jsx("div",{className:Xe.depList,children:ae.map(q=>{const ue=D.includes(q.id);return h.jsxs("label",{className:`${Xe.depItem} ${ue?Xe.depItemSelected:""}`,"data-testid":`dep-option-${q.id}`,children:[h.jsx("input",{type:"checkbox",checked:ue,onChange:()=>pe(q.id)}),q.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",q.status,")"]})]},q.id)})})]})]})})]})}function qO(){const[n]=Uf(),a=n.get("workspace")??"",i=n.get("parent")??void 0;return a?h.jsx(X1,{mode:"new",workspaceId:a,parentTaskId:i}):h.jsx(ji,{to:"/",replace:!0})}function YO(){const{taskId:n}=tc();return h.jsx(X1,{mode:"edit",taskId:n})}const KO="_container_1pqxm_1",ZO="_emptyState_1pqxm_8",XO="_card_1pqxm_14",QO="_cardHeader_1pqxm_34",WO="_categoryBadge_1pqxm_46",JO="_findingTitle_1pqxm_54",eB="_findingDate_1pqxm_60",tB="_findingContent_1pqxm_72",nB="_tags_1pqxm_78",aB="_tag_1pqxm_78",Yn={container:KO,emptyState:ZO,card:XO,cardHeader:QO,categoryBadge:WO,findingTitle:JO,findingDate:eB,findingContent:tB,tags:nB,tag:aB};function sB(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),d=Math.floor(r/60),u=Math.floor(d/60),p=Math.floor(u/24);if(r<60)return"just now";if(d<60)return`${d}m ago`;if(u<24)return`${u}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"}),y=a.getDate();return m?`${g} ${y}`:`${g} ${y} ${a.getFullYear()}`}const _0={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 iB({workspaceId:n}){const{findings:a}=Lt(),i=a.filter(o=>o.workspaceId===n);return i.length===0?h.jsx("div",{className:Yn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:Yn.container,children:i.map((o,r)=>{const d=_0[o.category]||_0.general;return h.jsxs(qt.div,{className:Yn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:Yn.cardHeader,children:[h.jsx("span",{className:Yn.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:Yn.findingTitle,children:o.title}),h.jsx("span",{className:Yn.findingDate,title:o.createdAt,children:sB(o.createdAt)})]}),h.jsx("div",{className:Yn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:Yn.tags,children:o.tags.map(u=>h.jsx("span",{className:Yn.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:u},u))})]},o.id)})})}function Dr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Zd(n,a){if(!n||!a)return;const 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 d=Math.floor(o/60),u=o%60;return d===0?`${o}m ${r}s`:`${d}h ${u}m`}function T0(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 lB({status:n}){const a=is(n),i=bj(n);return h.jsx("span",{className:`${L.statusBadge} ${L[i]??L.statusPending}`,children:a.label})}function oB({task:n,tasksById:a,environments:i,workspaces:o,taskSessions:r,selectedEnvId:d}){const u=r.length>0?r[r.length-1]:void 0,p=(u==null?void 0:u.environmentId)??"",m=p?i.find(x=>x.id===p):void 0,g=o.find(x=>x.id===n.workspaceId),y=i.find(x=>x.id===d),v=n.branch&&(g!=null&&g.repoUrl)?`${g.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(lB,{status:n.status}),n.branch&&h.jsx("span",{className:L.overviewBranchPill,children:v?h.jsxs("a",{href:v,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(Nf,{remarkPlugins:[jf],children:n.description})})]}),h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Environment"}),p&&m?h.jsxs("div",{className:L.envRow,children:[h.jsx("span",{className:`${L.envDot} ${T0(m.status)}`,title:m.status,"aria-label":`Status: ${m.status}`,role:"img"}),h.jsx("span",{className:L.overviewValue,children:m.displayName})]}):y?h.jsxs("div",{className:L.envRow,children:[h.jsx("span",{className:`${L.envDot} ${T0(y.status)}`,title:y.status,"aria-label":`Status: ${y.status}`,role:"img"}),h.jsx("span",{className:L.overviewValue,children:y.displayName}),h.jsx("span",{className:L.overviewMuted,children:"(workspace default)"})]}):h.jsx("div",{className:L.overviewMuted,children:"Set in workspace settings"})]}),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(x=>{const E=a.get(x),C=(E==null?void 0:E.status)==="complete";return h.jsxs("div",{className:`${L.depItem} ${C?L.depDone:L.depBlocked}`,children:[h.jsx("span",{children:C?"✓":"○"}),h.jsx("span",{children:(E==null?void 0:E.title)??x})]},x)})})]}),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:Dr(n.createdAt)})]}),n.assignedAt&&(()=>{const x=Zd(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:Dr(n.assignedAt)}),x!==void 0&&h.jsx("span",{className:L.timelineDelta,children:x})]})})(),n.startedAt&&(()=>{const x=Zd(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:Dr(n.startedAt)}),x!==void 0&&h.jsx("span",{className:L.timelineDelta,children:x})]})})(),n.completedAt&&(()=>{const x=Zd(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:Dr(n.completedAt)}),x!==void 0&&h.jsx("span",{className:L.timelineDelta,children:x})]})})(),!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 rB({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:d,onPause:u,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.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:d,className:L.btnDanger,children:"Stop"}),h.jsx("button",{onClick:u,disabled:!a,className:L.btnGhost,children:"Pause"})]});if(n.status==="paused")return h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:d,className:L.btnPrimary,children:"Stop"}),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 cB({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 d=o.id===a,u=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${L.attemptButton} ${d?L.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${r+1}`,children:["#",r+1,u&&h.jsx("span",{className:L.attemptStatus,children:u})]},o.id)})]})}function Xd(){const{taskId:n}=tc(),a=Wt(),i=On(),{events:o,eventsDropped:r,tasks:d,environments:u,loadSessionEvents:p,loadFindings:m,kill:g,startTask:y,stopTask:v,resumeTask:x,deleteTask:E,workspaces:C,taskSessions:A,loadTaskSessions:w}=Lt(),_=S.useRef(void 0),N=S.useRef(void 0),D=S.useRef(void 0),H=S.useRef(void 0),B=S.useRef(void 0),F=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[R,I]=S.useState(F),[P,J]=S.useState(!1),[ee,ae]=S.useState(void 0),[te,pe]=S.useState(""),oe=S.useRef(F);F!==oe.current&&(oe.current=F,F!==R&&I(F));const j=d.find(fe=>fe.id===n),Q=(j==null?void 0:j.workspaceId)||void 0,q=C.find(fe=>fe.id===Q);S.useEffect(()=>{if(te===""){if(q!=null&&q.environmentId)pe(q.environmentId);else if(u.length>0){const fe=u.find(de=>de.status==="connected");pe((fe==null?void 0:fe.id)??u[0].id)}}},[te,q==null?void 0:q.environmentId,u]);const ue=j?A[j.id]??[]:[];let K;ee&&ue.some(fe=>fe.id===ee)?K=ee:K=(j==null?void 0:j.latestSessionId)||void 0;const Ge=()=>{J(!0)},we=()=>{j&&(E(j.id),J(!1),i(j.workspaceId?Zl(j.workspaceId):"/",{replace:!0}))};if((j==null?void 0:j.id)!==N.current&&(N.current=j==null?void 0:j.id,ee!==void 0&&ae(void 0),te!==""&&pe("")),S.useEffect(()=>{if(!(j!=null&&j.id))return;const fe=j.id!==H.current,de=j.latestSessionId!==B.current;(fe||de)&&(H.current=j.id,B.current=j.latestSessionId,w(j.id))},[j==null?void 0:j.id,j==null?void 0:j.latestSessionId,w]),(j==null?void 0:j.status)!==D.current){D.current=j==null?void 0:j.status;const fe=(j==null?void 0:j.status)==="not_started"?"overview":(j==null?void 0:j.status)==="working"||(j==null?void 0:j.status)==="paused"?"stream":(j==null?void 0:j.status)==="complete"?"findings":void 0;fe&&fe!==R&&I(fe)}const ge=S.useMemo(()=>new Map(d.map(fe=>[fe.id,fe])),[d]),Re=S.useMemo(()=>{const fe=K?o.filter(de=>de.sessionId===K):[];return K1(Y1(fe))},[o,K]),gt=j?j.dependsOn.some(fe=>{const de=ge.get(fe);return de!==void 0&&de.status!=="complete"}):!1,Rt=S.useMemo(()=>PR(n,C,ge),[n,C,ge]);S.useEffect(()=>{K&&K!==_.current&&(_.current=K,p(K))},[K,p]),S.useEffect(()=>{R==="findings"&&Q&&m(Q)},[R,Q,m]);const ne=fe=>{I(fe),i(ns(n,fe==="overview"?void 0:fe))};return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Hi,{segments:Rt}),h.jsxs("div",{className:L.header,children:[h.jsxs("span",{className:L.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(j==null?void 0:j.title)||n}),j&&h.jsx("span",{className:L.taskStatusBadge,"data-testid":"task-status",children:j.status}),(j==null?void 0:j.branch)&&h.jsx("span",{className:L.taskBranch,children:j.branch}),gt&&h.jsx("span",{className:L.taskBlockedBadge,children:"blocked"})]}),j&&h.jsx(rB,{task:j,sessionId:K,isBlocked:gt,onStart:()=>y(j.id,void 0,te),onResume:()=>x(j.id),onStop:()=>v(j.id),onPause:()=>K&&g(K),onDelete:Ge,onEdit:()=>i(sE(j.id))})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":R==="overview",className:`${L.tab} ${R==="overview"?L.active:""}`,onClick:()=>ne("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":R==="stream",className:`${L.tab} ${R==="stream"?L.active:""}`,onClick:()=>ne("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":R==="findings",className:`${L.tab} ${R==="findings"?L.active:""}`,onClick:()=>ne("findings"),children:"Findings"})]}),h.jsxs(Mn,{mode:"wait",children:[R==="overview"&&h.jsx(qt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:L.overviewContent,children:j?h.jsx(oB,{task:j,tasksById:ge,environments:u,workspaces:C,taskSessions:ue,selectedEnvId:te}):h.jsx("div",{className:L.waitingMessage,children:"No additional details"})},"overview"),R==="stream"&&h.jsxs(qt.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(cB,{taskSessions:ue,selectedSessionId:K,onSelect:fe=>ae(fe)}),h.jsx(q1,{events:Re,eventsDropped:r,emptyState:!K&&j?h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>y(j.id,void 0,te),children:"Start Task"}),h.jsx("div",{className:L.ctaDescription,children:"Click to begin agent execution"})]}):K&&Re.length===0?h.jsx("div",{className:L.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),R==="findings"&&h.jsx(qt.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(iB,{workspaceId:Q}):h.jsx("div",{className:L.noContext,children:"Navigate to a task within a workspace to view findings"})},"findings")]}),j&&h.jsx(uc,{isOpen:P,title:"Delete Task?",description:`"${j.title}" will be permanently removed.`,onConfirm:we,onCancel:()=>J(!1)})]})}function uB(){const n=VR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Configure the new environment below"})]})}const dB="_layout_11u79_1",fB="_content_11u79_8",hB="_tabPanel_11u79_14",Qd={layout:dB,content:fB,tabPanel:hB},pB={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function mB(){const a=Wt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=pB[a],o=zR(i);return h.jsxs("div",{className:Qd.layout,children:[h.jsx(Hi,{segments:o}),h.jsx("div",{className:Qd.content,children:h.jsx("div",{className:Qd.tabPanel,children:h.jsx(z0,{})},a)})]})}const gB="_nav_13n0b_1",vB="_tab_13n0b_44",yB="_tabIcon_13n0b_82",bB="_tabActive_13n0b_88",Mr={nav:gB,tab:vB,tabIcon:yB,tabActive:bB},xa=[{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 u;const n=Wt(),a=On(),i=S.useRef(null),o=((u=xa.find(p=>n.pathname===`${Di}/${p.path}`))==null?void 0:u.path)??xa[0].path,r=S.useCallback(p=>{a(`${Di}/${p}`)},[a]),d=S.useCallback(p=>{var E,C;const m=(E=i.current)==null?void 0:E.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(A=>A===document.activeElement),y=g>=0?g:xa.findIndex(A=>A.path===o);let v=y;if(p.key==="ArrowDown")p.preventDefault(),v=(y+1)%xa.length;else if(p.key==="ArrowUp")p.preventDefault(),v=(y-1+xa.length)%xa.length;else if(p.key==="Home")p.preventDefault(),v=0;else if(p.key==="End")p.preventDefault(),v=xa.length-1;else return;const x=xa[v].path;a(`${Di}/${x}`),(C=m[v])==null||C.focus()},[o,a]);return h.jsx("nav",{className:Mr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:xa.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${Mr.tab} ${m?Mr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:Mr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const xB="_container_1nk8c_1",_B="_header_1nk8c_5",TB="_headerLabel_1nk8c_12",EB="_addButton_1nk8c_20",CB="_envRow_1nk8c_55",AB="_targeted_1nk8c_69",kB="_expanded_1nk8c_72",wB="_statusDot_1nk8c_76",NB="_pulse_1nk8c_79",jB="_envName_1nk8c_83",DB="_envActions_1nk8c_87",MB="_idleLabel_1nk8c_94",RB="_newChatButton_1nk8c_99",OB="_envActionsRow_1nk8c_126",BB="_connectButton_1nk8c_134",LB="_stopButton_1nk8c_160",IB="_deleteButton_1nk8c_186",UB="_provisionMessage_1nk8c_213",zB="_errorMessage_1nk8c_220",VB="_sessionRow_1nk8c_227",HB="_selected_1nk8c_243",GB="_sessionDot_1nk8c_248",PB="_sessionSummaryRow_1nk8c_252",FB="_sessionExpandArrow_1nk8c_272",$B="_sessionSummaryText_1nk8c_283",qB="_sessionCountBadge_1nk8c_290",YB="_emptyCta_1nk8c_313",KB="_ctaDescription_1nk8c_326",ZB="_ctaButton_1nk8c_332",qe={container:xB,header:_B,headerLabel:TB,addButton:EB,envRow:CB,targeted:AB,expanded:kB,statusDot:wB,pulse:NB,envName:jB,envActions:DB,idleLabel:MB,newChatButton:RB,envActionsRow:OB,connectButton:BB,stopButton:LB,deleteButton:IB,provisionMessage:UB,errorMessage:zB,sessionRow:VB,selected:HB,sessionDot:GB,sessionSummaryRow:PB,sessionExpandArrow:FB,sessionSummaryText:$B,sessionCountBadge:qB,emptyCta:YB,ctaDescription:KB,ctaButton:ZB},XB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},QB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},E0=["running","idle","failed","interrupted","completed"],WB=.2;function JB(n){const a={};for(const d of n)a[d.status]=(a[d.status]||0)+1;const i=E0.filter(d=>a[d]>0).map(d=>`${a[d]} ${QB[d]||d}`),o=new Set(E0),r=Object.keys(a).filter(d=>!o.has(d)).sort().map(d=>`${a[d]} ${d}`);return[...i,...r].join(", ")}function e4({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 t4({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:d,sessionsExpanded:u,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:y,onRemove:v,navigate:x}){const[E,C]=S.useState(!1),A=XB[n.status]||"var(--text-tertiary)",w=n.status==="connected",_=n.status==="connecting",N=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(uc,{isOpen:E,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{v(n.id),C(!1)},onCancel:()=>C(!1)}),h.jsxs("div",{className:`${qe.envRow} ${o?qe.targeted:""} ${r?qe.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${qe.statusDot} ${w?qe.pulse:""}`,style:{color:A},children:"●"}),h.jsx("span",{className:qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:qe.idleLabel,children:"(idle)"}),w&&h.jsx("button",{onClick:D=>{D.stopPropagation(),x($0(n.id))},title:"New chat",className:qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:qe.envActionsRow,children:[_&&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}),N&&h.jsx("button",{onClick:D=>{D.stopPropagation(),g(n.id)},className:qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),w&&h.jsx("button",{onClick:D=>{D.stopPropagation(),y(n.id)},className:qe.stopButton,children:"Stop"}),!_&&h.jsx("button",{onClick:D=>{D.stopPropagation(),C(!0)},className:qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":u,"aria-label":u?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&(D.preventDefault(),p())},children:[h.jsx("span",{className:`${qe.sessionExpandArrow} ${u?qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:qe.sessionSummaryText,children:JB(a)}),h.jsx("span",{className:qe.sessionCountBadge,children:a.length})]}),h.jsx(Mn,{children:u&&h.jsx(qt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:WB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(D=>h.jsxs("div",{onClick:H=>{H.stopPropagation(),x(F0(D.id))},className:`${qe.sessionRow} ${i===D.id?qe.selected:""}`,title:D.prompt,"data-testid":"session-row",children:[h.jsx(e4,{status:D.status})," ",D.prompt.length>24?D.prompt.slice(0,24)+"...":D.prompt]},D.id))})})]})]})}function n4(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:d}=Lt(),u=On(),[p,m]=S.useState(null),[g,y]=S.useState(new Set),v=Xt("/sessions/:sessionId"),x=Xt("/sessions/new"),E=(v==null?void 0:v.params.sessionId)!=="new"?v==null?void 0:v.params.sessionId:void 0,[C]=Uf(),A=x?C.get("env")??void 0:void 0;return h.jsxs("div",{className:qe.container,children:[h.jsxs("div",{className:qe.header,children:[h.jsx("span",{className:qe.headerLabel,children:"Environments"}),h.jsx("button",{className:qe.addButton,onClick:()=>u(Ov),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:qe.emptyCta,children:[h.jsx("button",{className:qe.ctaButton,onClick:()=>u(Ov),children:"Add Environment"}),h.jsx("div",{className:qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(w=>{const _=a.filter(N=>N.environmentId===w.id);return h.jsx(t4,{env:w,envSessions:_,selectedSessionId:E,isNewChatTarget:A===w.id,expanded:p===w.id,onToggleExpand:()=>m(p===w.id?null:w.id),sessionsExpanded:g.has(w.id),onToggleSessionsExpand:()=>{y(N=>{const D=new Set(N);return D.has(w.id)?D.delete(w.id):D.add(w.id),D})},provisionProgress:i[w.id],onProvision:o,onStop:r,onRemove:d,navigate:u},w.id)})]})}function a4(){return h.jsx(n4,{})}const s4="_section_1ingb_14",i4="_sectionTitle_1ingb_26",l4="_sectionDescription_1ingb_35",o4="_tokenList_1ingb_48",r4="_tokenRow_1ingb_55",c4="_tokenBadge_1ingb_68",u4="_tokenName_1ingb_83",d4="_tokenTarget_1ingb_90",f4="_deleteButton_1ingb_99",h4="_addForm_1ingb_113",p4="_formRow_1ingb_119",m4="_input_1ingb_125",g4="_select_1ingb_155",v4="_addButton_1ingb_187",y4="_emptyStateInfo_1ingb_221",b4="_themeOptions_1ingb_229",S4="_themeOption_1ingb_229",x4="_themeOptionSelected_1ingb_254",_4="_themeOptionHeader_1ingb_259",T4="_themeOptionLabel_1ingb_266",E4="_themeOptionDesc_1ingb_273",C4="_variantToggle_1ingb_279",A4="_variantButton_1ingb_286",k4="_variantActive_1ingb_305",w4="_themeSwatches_1ingb_311",N4="_themeSwatch_1ingb_311",j4="_systemToggle_1ingb_325",D4="_systemToggleHint_1ingb_341",M4="_themeActive_1ingb_348",R4="_aboutGrid_1ingb_354",O4="_aboutItem_1ingb_360",B4="_aboutLabel_1ingb_373",L4="_aboutValue_1ingb_379",I4="_aboutDot_1ingb_387",U4="_aboutDotConnected_1ingb_394",z4="_aboutDotDisconnected_1ingb_398",re={section:s4,sectionTitle:i4,sectionDescription:l4,tokenList:o4,tokenRow:r4,tokenBadge:c4,tokenName:u4,tokenTarget:d4,deleteButton:f4,addForm:h4,formRow:p4,input:m4,select:g4,addButton:v4,emptyStateInfo:y4,themeOptions:b4,themeOption:S4,themeOptionSelected:x4,themeOptionHeader:_4,themeOptionLabel:T4,themeOptionDesc:E4,variantToggle:C4,variantButton:A4,variantActive:k4,themeSwatches:w4,themeSwatch:N4,systemToggle:j4,systemToggleHint:D4,themeActive:M4,aboutGrid:R4,aboutItem:O4,aboutLabel:B4,aboutValue:L4,aboutDot:I4,aboutDotConnected:U4,aboutDotDisconnected:z4},V4=[{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 H4(){const{credentialProviders:n,updateCredentialProviders:a}=Lt(),i=(o,r)=>{const d={...n};o==="claude"?d.claude=r:d[o]=r,a(d)};return h.jsxs("section",{className:re.section,children:[h.jsx("h3",{className:re.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:re.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:re.tokenList,children:V4.map(o=>h.jsxs("div",{className:re.tokenRow,children:[h.jsx("span",{className:re.tokenName,children:o.label}),h.jsx("span",{className:re.tokenTarget,children:o.description}),h.jsx("select",{className:re.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 G4=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function P4(){const{tokens:n,setToken:a,deleteToken:i}=Lt(),{showToast:o}=so(),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState("env_var"),[y,v]=S.useState(""),[x,E]=S.useState(null),C=_=>{if(_.preventDefault(),!r||!u)return;const N=m==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,u,m,N,m==="file"?y:""),o("Token saved successfully","success"),d(""),p(""),v("")},A=_=>{E(_)},w=()=>{x&&(i(x),o("Token deleted","info")),E(null)};return h.jsxs(h.Fragment,{children:[h.jsx(uc,{isOpen:x!==null,title:"Delete Token?",description:x?`"${x}" will be permanently removed.`:void 0,onConfirm:w,onCancel:()=>E(null)}),h.jsxs("section",{className:re.section,children:[h.jsx("h3",{className:re.sectionTitle,children:"Tokens"}),h.jsx("p",{className:re.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:re.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:re.tokenList,children:n.map(_=>h.jsxs("div",{className:re.tokenRow,children:[h.jsx("span",{className:re.tokenBadge,children:_.tokenType}),h.jsx("span",{className:re.tokenName,children:_.name}),h.jsx("span",{className:re.tokenTarget,children:_.tokenType==="env_var"?_.envVar:_.filePath}),h.jsx("button",{className:re.deleteButton,onClick:()=>A(_.name),title:`Delete ${_.name}`,children:"×"})]},_.name))}),h.jsxs("form",{className:re.addForm,onSubmit:C,children:[h.jsxs("div",{className:re.formRow,children:[h.jsx("input",{className:re.input,type:"text",placeholder:"Token name",value:r,onChange:_=>d(_.target.value)}),h.jsx("input",{className:re.input,type:"password",placeholder:"Value",value:u,onChange:_=>p(_.target.value)})]}),h.jsxs("div",{className:re.formRow,children:[h.jsx("select",{className:re.select,value:m,onChange:_=>g(_.target.value),children:G4.map(_=>h.jsx("option",{value:_.value,children:_.label},_.value))}),h.jsx("input",{className:re.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:_=>v(_.target.value)}),h.jsx("button",{className:re.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function F4(){return h.jsxs(h.Fragment,{children:[h.jsx(H4,{}),h.jsx(P4,{})]})}const $4="_container_xb7ms_1",q4="_header_xb7ms_7",Y4="_form_xb7ms_19",K4="_formActions_xb7ms_87",Z4="_list_xb7ms_93",X4="_card_xb7ms_99",Q4="_active_xb7ms_109",W4="_cardHeader_xb7ms_113",J4="_cardTitle_xb7ms_123",e6="_defaultBadge_xb7ms_129",t6="_cardActions_xb7ms_143",n6="_description_xb7ms_148",a6="_meta_xb7ms_154",s6="_promptDetails_xb7ms_171",i6="_promptText_xb7ms_183",l6="_empty_xb7ms_200",o6="_btnPrimary_xb7ms_206",r6="_btnSecondary_xb7ms_240",c6="_btnSmall_xb7ms_267",u6="_btnDanger_xb7ms_293",d6="_typeToggle_xb7ms_336",f6="_typeBadge_xb7ms_350",h6="_scriptEditor_xb7ms_364",p6="_optional_xb7ms_371",$e={container:$4,header:q4,form:Y4,formActions:K4,list:Z4,card:X4,active:Q4,cardHeader:W4,cardTitle:J4,defaultBadge:e6,cardActions:t6,description:n6,meta:a6,promptDetails:s6,promptText:i6,empty:l6,btnPrimary:o6,btnSecondary:r6,btnSmall:c6,btnDanger:u6,typeToggle:d6,typeBadge:f6,scriptEditor:h6,optional:p6};function m6(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o,appDefaultPersonaId:r,setAppDefaultPersonaId:d}=Lt(),[u,p]=S.useState(null),[m,g]=S.useState(!1),[y,v]=S.useState(null),[x,E]=S.useState(""),[C,A]=S.useState(""),[w,_]=S.useState(""),[N,D]=S.useState("claude-code"),[H,B]=S.useState("sonnet"),[F,R]=S.useState(0),[I,P]=S.useState("agent"),[J,ee]=S.useState(""),ae=()=>{E(""),A(""),_(""),D("claude-code"),B("sonnet"),R(0),P("agent"),ee("")},te=()=>{ae(),p(null),g(!0)},pe=K=>{E(K.name),A(K.description),_(K.systemPrompt);const Ge=K.type==="script"?"script":"agent";D(Ge==="script"?K.runtime||"genaiscript":K.runtime),B(K.model),R(K.maxTurns),P(Ge),ee(K.script||""),p(K),g(!1)},oe=K=>{P(K),K==="script"?D("genaiscript"):N==="genaiscript"&&D("claude-code")},j=K=>{if(K.preventDefault(),!!x.trim()){if(I==="script"){if(!J.trim())return}else if(!w.trim()||!N||!H)return;u?(i(u.id,x,C,w,N,H,F,I,J),p(null)):(a(x,C,w,N,H,F,I,J),g(!1)),ae()}},Q=K=>{o(K),v(null),(u==null?void 0:u.id)===K&&(p(null),ae())},q=()=>{p(null),g(!1),ae()},ue=()=>h.jsxs("form",{onSubmit:j,className:$e.form,children:[h.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),h.jsxs("div",{className:$e.typeToggle,"data-testid":"persona-type-toggle",children:[h.jsxs("label",{children:[h.jsx("input",{type:"radio",name:"personaType",value:"agent",checked:I==="agent",onChange:()=>oe("agent")}),"Agent"]}),h.jsxs("label",{children:[h.jsx("input",{type:"radio",name:"personaType",value:"script",checked:I==="script",onChange:()=>oe("script")}),"Script"]})]}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:x,onChange:K=>E(K.target.value),placeholder:I==="script"?"e.g. Nightly Report":"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:C,onChange:K=>A(K.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsx("select",{value:N,onChange:K=>D(K.target.value),"data-testid":"persona-runtime-select",children:I==="script"?h.jsx("option",{value:"genaiscript",children:"genaiscript"}):h.jsxs(h.Fragment,{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)"})]})})]}),I==="agent"&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:H,onChange:K=>B(K.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:F,onChange:K=>R(parseInt(K.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:w,onChange:K=>_(K.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]})]}),I==="script"&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{children:["Model ",h.jsx("span",{className:$e.optional,children:"(optional)"}),h.jsx("input",{type:"text",value:H,onChange:K=>B(K.target.value),placeholder:"e.g. sonnet (leave empty for script-only)"})]}),h.jsxs("label",{children:["System Prompt ",h.jsx("span",{className:$e.optional,children:"(optional)"}),h.jsx("textarea",{value:w,onChange:K=>_(K.target.value),placeholder:"Optional context for the script...",rows:4})]}),h.jsxs("label",{children:["Script",h.jsx("textarea",{value:J,onChange:K=>ee(K.target.value),placeholder:`script({ model: "openai:gpt-4o" });
92
-
93
- const grackle = await host.mcpServer({
94
- id: "grackle",
95
- url: env.vars.GRACKLE_MCP_URL,
96
- });
97
-
98
- $\`Summarize the current tasks.\`;`,rows:20,className:$e.scriptEditor,required:!0,"data-testid":"persona-script-editor"})]})]}),h.jsxs("div",{className:$e.formActions,children:[h.jsx("button",{type:"submit",className:$e.btnPrimary,children:u?"Save":"Create"}),h.jsx("button",{type:"button",onClick:q,className:$e.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:$e.container,children:[h.jsxs("div",{className:$e.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:te,className:$e.btnPrimary,children:"+ New Persona"})]}),(m||u)&&ue(),n.length===0&&!m?h.jsx("p",{className:$e.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:$e.list,children:n.map(K=>{const Ge=r===K.id,we=K.type==="script";return h.jsxs("div",{className:`${$e.card} ${(u==null?void 0:u.id)===K.id?$e.active:""}`,"data-testid":`persona-card-${K.id}`,children:[h.jsxs("div",{className:$e.cardHeader,children:[h.jsxs("span",{className:$e.cardTitle,children:[h.jsx("strong",{children:K.name}),h.jsx("span",{className:$e.typeBadge,"data-testid":`persona-type-badge-${K.id}`,children:we?"Script":"Agent"}),Ge&&h.jsx("span",{className:$e.defaultBadge,"data-testid":`persona-default-badge-${K.id}`,children:"App Default"})]}),h.jsxs("div",{className:$e.cardActions,children:[!Ge&&h.jsx("button",{onClick:()=>d(K.id),className:$e.btnSmall,"data-testid":`persona-set-default-${K.id}`,title:"Set as app default persona",children:"Set Default"}),h.jsx("button",{onClick:()=>pe(K),className:$e.btnSmall,children:"Edit"}),y===K.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>Q(K.id),className:$e.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>v(null),className:$e.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>v(K.id),className:$e.btnSmall,children:"Delete"})]})]}),K.description&&h.jsx("p",{className:$e.description,children:K.description}),h.jsxs("div",{className:$e.meta,children:[K.runtime&&h.jsxs("span",{children:["Runtime: ",K.runtime]}),K.model&&h.jsxs("span",{children:["Model: ",K.model]}),K.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",K.maxTurns]})]}),we?h.jsxs("details",{className:$e.promptDetails,children:[h.jsx("summary",{children:"Script"}),h.jsx("pre",{className:$e.promptText,children:K.script})]}):h.jsxs("details",{className:$e.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:$e.promptText,children:K.systemPrompt})]})]},K.id)})})]})}function g6(){return h.jsx(m6,{})}function v6(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=W0();return h.jsxs("section",{className:re.section,children:[h.jsx("h3",{className:re.sectionTitle,children:"Appearance"}),h.jsx("p",{className:re.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:re.themeOptions,children:ac.filter(d=>!d.hidden).map(d=>{const u=!!(d.variantLightId&&d.variantDarkId),p=u?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,m=u&&a===d.variantLightId;return h.jsxs("button",{type:"button",className:`${re.themeOption} ${p?re.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(d.id),children:[h.jsxs("span",{className:re.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:re.themeOptionLabel,children:d.label}),h.jsx("span",{className:re.themeOptionDesc,children:d.description})]}),u&&h.jsxs("span",{className:re.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${re.variantButton} ${p&&m?re.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${re.variantButton} ${p&&!m?re.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:re.themeSwatches,children:d.swatches.map((g,y)=>h.jsx("span",{className:re.themeSwatch,style:{background:g}},y))})]},d.id)})}),h.jsxs("label",{className:re.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>r(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:re.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:re.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function y6(){return h.jsx(v6,{})}function b6(){const{connected:n,environments:a,sessions:i}=Lt(),o=a.filter(u=>u.status==="connected").length,r=a.length,d=i.filter(u=>["running","idle"].includes(u.status)).length;return h.jsxs("section",{className:re.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:re.sectionTitle,children:"About"}),h.jsx("p",{className:re.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:re.aboutGrid,children:[h.jsxs("div",{className:re.aboutItem,children:[h.jsx("span",{className:re.aboutLabel,children:"Connection"}),h.jsxs("span",{className:re.aboutValue,children:[h.jsx("span",{className:`${re.aboutDot} ${n?re.aboutDotConnected:re.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:re.aboutItem,children:[h.jsx("span",{className:re.aboutLabel,children:"Environments"}),h.jsxs("span",{className:re.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:re.aboutItem,children:[h.jsx("span",{className:re.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:re.aboutValue,children:d})]}),h.jsxs("div",{className:re.aboutItem,children:[h.jsx("span",{className:re.aboutLabel,children:"Version"}),h.jsx("span",{className:re.aboutValue,children:"0.48.0"})]})]})]})}function S6(){return h.jsx(b6,{})}const x6="_wizard_1260s_1",_6="_container_1260s_10",T6="_stepContent_1260s_19",E6="_logoArea_1260s_28",C6="_logoImage_1260s_32",A6="_heading_1260s_41",k6="_tagline_1260s_49",w6="_subtitle_1260s_56",N6="_featureList_1260s_64",j6="_runtimeGrid_1260s_89",D6="_runtimeCard_1260s_101",M6="_runtimeName_1260s_133",R6="_runtimeDescription_1260s_139",O6="_buttonRow_1260s_144",B6="_primaryButton_1260s_151",L6="_ghostButton_1260s_185",I6="_dots_1260s_213",U6="_dot_1260s_213",st={wizard:x6,container:_6,stepContent:T6,logoArea:E6,logoImage:C6,heading:A6,tagline:k6,subtitle:w6,featureList:N6,runtimeGrid:j6,runtimeCard:D6,runtimeName:M6,runtimeDescription:R6,buttonRow:O6,primaryButton:B6,ghostButton:L6,dots:I6,dot:U6};function z6({onNext:n}){return h.jsxs("div",{className:st.stepContent,"data-testid":"setup-welcome",children:[h.jsx("div",{className:st.logoArea,children:h.jsx("img",{src:"/grackle-logo.png",alt:"Grackle",className:st.logoImage})}),h.jsx("h1",{className:st.heading,children:"Welcome to Grackle"}),h.jsx("p",{className:st.tagline,children:"Multi-agent orchestration for software teams"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:n,"data-testid":"setup-get-started",children:"Get Started"})]})}function V6({onNext:n,onBack:a}){return h.jsxs("div",{className:st.stepContent,"data-testid":"setup-about",children:[h.jsx("h2",{className:st.heading,children:"What is Grackle?"}),h.jsxs("ul",{className:st.featureList,children:[h.jsx("li",{children:"Run Claude, Copilot, and Codex agents side by side"}),h.jsx("li",{children:"Provision and control dev environments — SSH, Codespaces, or local"}),h.jsx("li",{children:"Organize work into workspaces with agent-executable tasks"}),h.jsx("li",{children:"Customize agent behavior with personas, tools, and MCP servers"}),h.jsx("li",{children:"Live-stream agent sessions with full terminal replay"})]}),h.jsxs("div",{className:st.buttonRow,children:[h.jsx("button",{type:"button",className:st.ghostButton,onClick:a,children:"Back"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:n,"data-testid":"setup-about-next",children:"Next"})]})]})}const H6=[{id:"claude-code",name:"Claude Code",description:"Anthropic's agentic coding tool"},{id:"copilot",name:"Copilot Coding Agent",description:"GitHub's AI pair programmer"},{id:"codex",name:"Codex CLI",description:"OpenAI's coding agent"}];function G6({currentRuntime:n,onFinish:a,onBack:i,finishDisabled:o}){const[r,d]=S.useState(n||"claude-code");return S.useEffect(()=>{n&&d(n)},[n]),h.jsxs("div",{className:st.stepContent,"data-testid":"setup-runtime",children:[h.jsx("h2",{className:st.heading,children:"Choose Your Runtime"}),h.jsx("p",{className:st.subtitle,children:"Select the primary agent runtime for your workspace. You can change this later."}),h.jsx("div",{className:st.runtimeGrid,children:H6.map(u=>h.jsxs("button",{type:"button",className:st.runtimeCard,"data-selected":r===u.id,"aria-pressed":r===u.id,"data-testid":`runtime-card-${u.id}`,onClick:()=>d(u.id),children:[h.jsx("span",{className:st.runtimeName,children:u.name}),h.jsx("span",{className:st.runtimeDescription,children:u.description})]},u.id))}),h.jsxs("div",{className:st.buttonRow,children:[h.jsx("button",{type:"button",className:st.ghostButton,onClick:i,children:"Back"}),h.jsx("button",{type:"button",className:st.primaryButton,onClick:()=>a(r),disabled:o,"data-testid":"setup-finish",children:"Finish"})]})]})}const P6=3,F6={"claude-code":"sonnet",copilot:"gpt-4o",codex:"o3"};function $6(){const{personas:n,updatePersona:a,completeOnboarding:i,onboardingCompleted:o}=Lt(),r=On(),[d,u]=S.useState(0),p=n.find(g=>g.id==="claude-code"),m=S.useCallback(g=>{if(p&&g!==p.runtime){const y=F6[g]??"sonnet";a(p.id,void 0,void 0,void 0,g,y)}i(),r("/",{replace:!0})},[p,a,i,r]);return o===!0?h.jsx(ji,{to:"/",replace:!0}):h.jsx("div",{className:st.wizard,"data-testid":"setup-wizard",children:h.jsxs("div",{className:st.container,children:[h.jsx(Mn,{mode:"wait",children:h.jsxs(qt.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.2,ease:"easeInOut"},children:[d===0&&h.jsx(z6,{onNext:()=>u(1)}),d===1&&h.jsx(V6,{onNext:()=>u(2),onBack:()=>u(0)}),d===2&&h.jsx(G6,{currentRuntime:(p==null?void 0:p.runtime)??"claude-code",onFinish:m,onBack:()=>u(1),finishDisabled:!p})]},d)}),h.jsx("div",{className:st.dots,children:Array.from({length:P6},(g,y)=>h.jsx("span",{className:st.dot,"data-active":y===d},y))})]})})}const q6="_root_h353j_1",Y6="_body_h353j_7",K6="_main_h353j_19",Z6="_sidebarWrapper_h353j_26",X6="_overlay_h353j_56",Il={root:q6,body:Y6,main:K6,sidebarWrapper:Z6,overlay:X6},Q6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function W6(){const{lastSpawnedId:n,environments:a,connected:i,onboardingCompleted:o}=Lt(),{showToast:r}=so();WD(a,r);const d=On(),u=Wt(),p=u.pathname.startsWith(Di),[m,g]=S.useState(!1),y=S.useCallback(()=>g(v=>!v),[]);return S.useEffect(()=>{g(!1)},[u.pathname]),S.useEffect(()=>{if(!m)return;const v=x=>{x.key==="Escape"&&g(!1)};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v)}},[m]),S.useEffect(()=>{n&&!u.pathname.startsWith("/tasks/")&&d(F0(n),{replace:!0})},[n,d,u.pathname]),i&&o===!1?h.jsx(ji,{to:"/setup",replace:!0}):h.jsxs("div",{className:Il.root,children:[h.jsx(aC,{onToggleSidebar:p?void 0:y,sidebarOpen:m}),h.jsxs("div",{className:Il.body,children:[h.jsx("div",{className:Il.sidebarWrapper,"data-sidebar-open":m,"data-settings":p,children:p?h.jsx(SB,{}):h.jsx(bD,{})}),m&&!p&&h.jsx("div",{className:Il.overlay,"data-testid":"drawer-overlay",onClick:()=>g(!1)}),h.jsxs("div",{className:Il.main,children:[h.jsx(z0,{}),h.jsx(UD,{})]})]}),h.jsx(QD,{})]})}function J6(){return h.jsxs(TT,{children:[h.jsx(bt,{path:"setup",element:h.jsx($6,{})}),h.jsxs(bt,{element:h.jsx(W6,{}),children:[h.jsx(bt,{index:!0,element:h.jsx(IR,{})}),h.jsx(bt,{path:"sessions/new",element:h.jsx(FR,{})}),h.jsx(bt,{path:"sessions/:sessionId",element:h.jsx(i3,{})}),h.jsx(bt,{path:"workspaces/:workspaceId",element:h.jsx(EO,{})}),h.jsx(bt,{path:"tasks/new",element:h.jsx(qO,{})}),h.jsx(bt,{path:"tasks/:taskId",element:h.jsx(Xd,{})}),h.jsx(bt,{path:"tasks/:taskId/stream",element:h.jsx(Xd,{})}),h.jsx(bt,{path:"tasks/:taskId/findings",element:h.jsx(Xd,{})}),h.jsx(bt,{path:"tasks/:taskId/edit",element:h.jsx(YO,{})}),h.jsx(bt,{path:"environments/new",element:h.jsx(uB,{})}),h.jsxs(bt,{path:"settings",element:h.jsx(mB,{}),children:[h.jsx(bt,{index:!0,element:h.jsx(ji,{to:"environments",replace:!0})}),h.jsx(bt,{path:"environments",element:h.jsx(a4,{})}),h.jsx(bt,{path:"credentials",element:h.jsx(F4,{})}),h.jsx(bt,{path:"tokens",element:h.jsx(ji,{to:"../credentials",replace:!0})}),h.jsx(bt,{path:"personas",element:h.jsx(g6,{})}),h.jsx(bt,{path:"appearance",element:h.jsx(y6,{})}),h.jsx(bt,{path:"about",element:h.jsx(S6,{})})]}),h.jsx(bt,{path:"*",element:h.jsx(ji,{to:"/",replace:!0})})]})]})}const e5=1e4;function t5(){const{onboardingCompleted:n}=Lt(),[a,i]=S.useState(!1);S.useEffect(()=>{if(n!==void 0)return;const r=setTimeout(()=>i(!0),e5);return()=>clearTimeout(r)},[n]);const o=n===void 0&&!a;return h.jsx(Mn,{mode:"wait",children:o?h.jsx(qt.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.25},children:h.jsx(vj,{})},"splash"):h.jsx(qt.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.25},style:{minHeight:"100vh"},children:h.jsx(KT,{children:h.jsx(J6,{})})},"app")})}function n5(){const n=Q6?HE:ME;return h.jsx(YE,{children:h.jsx(PE,{children:h.jsx(n,{children:h.jsx(t5,{})})})})}C_.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(n5,{})}));