@jaato/web-coder-ui 0.1.3 → 0.1.10
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.
- package/README.md +85 -3
- package/bin/jaato-web-coder-ui.d.ts +2 -0
- package/dist/assets/barlow-condensed-latin-500-normal-BgYH2mbd.woff2 +0 -0
- package/dist/assets/barlow-condensed-latin-500-normal-HIEiP5Ov.woff +0 -0
- package/dist/assets/barlow-condensed-latin-600-normal-BFJEwTuo.woff +0 -0
- package/dist/assets/barlow-condensed-latin-600-normal-DepVgxBB.woff2 +0 -0
- package/dist/assets/barlow-condensed-latin-ext-500-normal-B1RE8WP7.woff +0 -0
- package/dist/assets/barlow-condensed-latin-ext-500-normal-yA5ONLQ9.woff2 +0 -0
- package/dist/assets/barlow-condensed-latin-ext-600-normal-18ESti3H.woff2 +0 -0
- package/dist/assets/barlow-condensed-latin-ext-600-normal-Clv9cIcR.woff +0 -0
- package/dist/assets/barlow-condensed-vietnamese-500-normal-CsrJDWc5.woff +0 -0
- package/dist/assets/barlow-condensed-vietnamese-500-normal-DjeaNLFD.woff2 +0 -0
- package/dist/assets/barlow-condensed-vietnamese-600-normal-A5AYRdjN.woff2 +0 -0
- package/dist/assets/barlow-condensed-vietnamese-600-normal-CNlPk46_.woff +0 -0
- package/dist/assets/barlow-latin-400-normal-fsAxiSwU.woff +0 -0
- package/dist/assets/barlow-latin-400-normal-qiz4-Cze.woff2 +0 -0
- package/dist/assets/barlow-latin-500-normal-BPAOfeC8.woff2 +0 -0
- package/dist/assets/barlow-latin-500-normal-C1h8hMer.woff +0 -0
- package/dist/assets/barlow-latin-600-normal-CNwfPWQD.woff +0 -0
- package/dist/assets/barlow-latin-600-normal-DILqtrty.woff2 +0 -0
- package/dist/assets/barlow-latin-ext-400-normal-CvBsJvxq.woff +0 -0
- package/dist/assets/barlow-latin-ext-400-normal-HxX4XjxC.woff2 +0 -0
- package/dist/assets/barlow-latin-ext-500-normal-CJPcKP2Q.woff +0 -0
- package/dist/assets/barlow-latin-ext-500-normal-DOaysfXq.woff2 +0 -0
- package/dist/assets/barlow-latin-ext-600-normal-B8NK_A3D.woff2 +0 -0
- package/dist/assets/barlow-latin-ext-600-normal-DMVRjfRT.woff +0 -0
- package/dist/assets/barlow-vietnamese-400-normal-BFeobeCK.woff +0 -0
- package/dist/assets/barlow-vietnamese-400-normal-Dpl4UHAZ.woff2 +0 -0
- package/dist/assets/barlow-vietnamese-500-normal-GNfB7rCE.woff +0 -0
- package/dist/assets/barlow-vietnamese-500-normal-zTViEIzf.woff2 +0 -0
- package/dist/assets/barlow-vietnamese-600-normal-CA_GiK2e.woff +0 -0
- package/dist/assets/barlow-vietnamese-600-normal-DcjprdFV.woff2 +0 -0
- package/dist/assets/index-D6cHhK7P.css +1 -0
- package/dist/assets/index-OELmzDkd.js +30 -0
- package/dist/build-info.json +3 -3
- package/dist/index.html +2 -2
- package/package.json +3 -1
- package/dist/assets/index-BP-An1YV.css +0 -1
- package/dist/assets/index-CtAym22p.js +0 -26
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))s(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const p of f.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function l(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(u){if(u.ep)return;u.ep=!0;const f=l(u);fetch(u.href,f)}})();function d_(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Go={exports:{}},Yl={};var ym;function m_(){if(ym)return Yl;ym=1;var i=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function l(s,u,f){var p=null;if(f!==void 0&&(p=""+f),u.key!==void 0&&(p=""+u.key),"key"in u){f={};for(var h in u)h!=="key"&&(f[h]=u[h])}else f=u;return u=f.ref,{$$typeof:i,type:s,key:p,ref:u!==void 0?u:null,props:f}}return Yl.Fragment=o,Yl.jsx=l,Yl.jsxs=l,Yl}var bm;function p_(){return bm||(bm=1,Go.exports=m_()),Go.exports}var d=p_(),Yo={exports:{}},oe={};var xm;function h_(){if(xm)return oe;xm=1;var i=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),T=Symbol.iterator;function R(S){return S===null||typeof S!="object"?null:(S=T&&S[T]||S["@@iterator"],typeof S=="function"?S:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,V={};function K(S,z,$){this.props=S,this.context=z,this.refs=V,this.updater=$||B}K.prototype.isReactComponent={},K.prototype.setState=function(S,z){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,z,"setState")},K.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ee(){}ee.prototype=K.prototype;function ne(S,z,$){this.props=S,this.context=z,this.refs=V,this.updater=$||B}var I=ne.prototype=new ee;I.constructor=ne,M(I,K.prototype),I.isPureReactComponent=!0;var W=Array.isArray;function de(){}var Z={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function G(S,z,$){var F=$.ref;return{$$typeof:i,type:S,key:z,ref:F!==void 0?F:null,props:$}}function re(S,z){return G(S.type,z,S.props)}function te(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function Q(S){var z={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function($){return z[$]})}var we=/\/+/g;function ze(S,z){return typeof S=="object"&&S!==null&&S.key!=null?Q(""+S.key):z.toString(36)}function Ce(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(de,de):(S.status="pending",S.then(function(z){S.status==="pending"&&(S.status="fulfilled",S.value=z)},function(z){S.status==="pending"&&(S.status="rejected",S.reason=z)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function C(S,z,$,F,ce){var me=typeof S;(me==="undefined"||me==="boolean")&&(S=null);var Ee=!1;if(S===null)Ee=!0;else switch(me){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(S.$$typeof){case i:case o:Ee=!0;break;case b:return Ee=S._init,C(Ee(S._payload),z,$,F,ce)}}if(Ee)return ce=ce(S),Ee=F===""?"."+ze(S,0):F,W(ce)?($="",Ee!=null&&($=Ee.replace(we,"$&/")+"/"),C(ce,z,$,"",function(Za){return Za})):ce!=null&&(te(ce)&&(ce=re(ce,$+(ce.key==null||S&&S.key===ce.key?"":(""+ce.key).replace(we,"$&/")+"/")+Ee)),z.push(ce)),1;Ee=0;var lt=F===""?".":F+":";if(W(S))for(var Be=0;Be<S.length;Be++)F=S[Be],me=lt+ze(F,Be),Ee+=C(F,z,$,me,ce);else if(Be=R(S),typeof Be=="function")for(S=Be.call(S),Be=0;!(F=S.next()).done;)F=F.value,me=lt+ze(F,Be++),Ee+=C(F,z,$,me,ce);else if(me==="object"){if(typeof S.then=="function")return C(Ce(S),z,$,F,ce);throw z=String(S),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function X(S,z,$){if(S==null)return S;var F=[],ce=0;return C(S,F,"","",function(me){return z.call($,me,ce++)}),F}function ie(S){if(S._status===-1){var z=S._result;z=z(),z.then(function($){(S._status===0||S._status===-1)&&(S._status=1,S._result=$)},function($){(S._status===0||S._status===-1)&&(S._status=2,S._result=$)}),S._status===-1&&(S._status=0,S._result=z)}if(S._status===1)return S._result.default;throw S._result}var Se=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},H={map:X,forEach:function(S,z,$){X(S,function(){z.apply(this,arguments)},$)},count:function(S){var z=0;return X(S,function(){z++}),z},toArray:function(S){return X(S,function(z){return z})||[]},only:function(S){if(!te(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return oe.Activity=v,oe.Children=H,oe.Component=K,oe.Fragment=l,oe.Profiler=u,oe.PureComponent=ne,oe.StrictMode=s,oe.Suspense=y,oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,oe.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Z.H.useMemoCache(S)}},oe.cache=function(S){return function(){return S.apply(null,arguments)}},oe.cacheSignal=function(){return null},oe.cloneElement=function(S,z,$){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var F=M({},S.props),ce=S.key;if(z!=null)for(me in z.key!==void 0&&(ce=""+z.key),z)!le.call(z,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&z.ref===void 0||(F[me]=z[me]);var me=arguments.length-2;if(me===1)F.children=$;else if(1<me){for(var Ee=Array(me),lt=0;lt<me;lt++)Ee[lt]=arguments[lt+2];F.children=Ee}return G(S.type,ce,F)},oe.createContext=function(S){return S={$$typeof:p,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:f,_context:S},S},oe.createElement=function(S,z,$){var F,ce={},me=null;if(z!=null)for(F in z.key!==void 0&&(me=""+z.key),z)le.call(z,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(ce[F]=z[F]);var Ee=arguments.length-2;if(Ee===1)ce.children=$;else if(1<Ee){for(var lt=Array(Ee),Be=0;Be<Ee;Be++)lt[Be]=arguments[Be+2];ce.children=lt}if(S&&S.defaultProps)for(F in Ee=S.defaultProps,Ee)ce[F]===void 0&&(ce[F]=Ee[F]);return G(S,me,ce)},oe.createRef=function(){return{current:null}},oe.forwardRef=function(S){return{$$typeof:h,render:S}},oe.isValidElement=te,oe.lazy=function(S){return{$$typeof:b,_payload:{_status:-1,_result:S},_init:ie}},oe.memo=function(S,z){return{$$typeof:_,type:S,compare:z===void 0?null:z}},oe.startTransition=function(S){var z=Z.T,$={};Z.T=$;try{var F=S(),ce=Z.S;ce!==null&&ce($,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(de,Se)}catch(me){Se(me)}finally{z!==null&&$.types!==null&&(z.types=$.types),Z.T=z}},oe.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},oe.use=function(S){return Z.H.use(S)},oe.useActionState=function(S,z,$){return Z.H.useActionState(S,z,$)},oe.useCallback=function(S,z){return Z.H.useCallback(S,z)},oe.useContext=function(S){return Z.H.useContext(S)},oe.useDebugValue=function(){},oe.useDeferredValue=function(S,z){return Z.H.useDeferredValue(S,z)},oe.useEffect=function(S,z){return Z.H.useEffect(S,z)},oe.useEffectEvent=function(S){return Z.H.useEffectEvent(S)},oe.useId=function(){return Z.H.useId()},oe.useImperativeHandle=function(S,z,$){return Z.H.useImperativeHandle(S,z,$)},oe.useInsertionEffect=function(S,z){return Z.H.useInsertionEffect(S,z)},oe.useLayoutEffect=function(S,z){return Z.H.useLayoutEffect(S,z)},oe.useMemo=function(S,z){return Z.H.useMemo(S,z)},oe.useOptimistic=function(S,z){return Z.H.useOptimistic(S,z)},oe.useReducer=function(S,z,$){return Z.H.useReducer(S,z,$)},oe.useRef=function(S){return Z.H.useRef(S)},oe.useState=function(S){return Z.H.useState(S)},oe.useSyncExternalStore=function(S,z,$){return Z.H.useSyncExternalStore(S,z,$)},oe.useTransition=function(){return Z.H.useTransition()},oe.version="19.2.8",oe}var vm;function dc(){return vm||(vm=1,Yo.exports=h_()),Yo.exports}var Y=dc();const pi=d_(Y);var Qo={exports:{}},Ql={},Vo={exports:{}},Xo={};var Sm;function g_(){return Sm||(Sm=1,(function(i){function o(C,X){var ie=C.length;C.push(X);e:for(;0<ie;){var Se=ie-1>>>1,H=C[Se];if(0<u(H,X))C[Se]=X,C[ie]=H,ie=Se;else break e}}function l(C){return C.length===0?null:C[0]}function s(C){if(C.length===0)return null;var X=C[0],ie=C.pop();if(ie!==X){C[0]=ie;e:for(var Se=0,H=C.length,S=H>>>1;Se<S;){var z=2*(Se+1)-1,$=C[z],F=z+1,ce=C[F];if(0>u($,ie))F<H&&0>u(ce,$)?(C[Se]=ce,C[F]=ie,Se=F):(C[Se]=$,C[z]=ie,Se=z);else if(F<H&&0>u(ce,ie))C[Se]=ce,C[F]=ie,Se=F;else break e}}return X}function u(C,X){var ie=C.sortIndex-X.sortIndex;return ie!==0?ie:C.id-X.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var p=Date,h=p.now();i.unstable_now=function(){return p.now()-h}}var y=[],_=[],b=1,v=null,T=3,R=!1,B=!1,M=!1,V=!1,K=typeof setTimeout=="function"?setTimeout:null,ee=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function I(C){for(var X=l(_);X!==null;){if(X.callback===null)s(_);else if(X.startTime<=C)s(_),X.sortIndex=X.expirationTime,o(y,X);else break;X=l(_)}}function W(C){if(M=!1,I(C),!B)if(l(y)!==null)B=!0,de||(de=!0,Q());else{var X=l(_);X!==null&&Ce(W,X.startTime-C)}}var de=!1,Z=-1,le=5,G=-1;function re(){return V?!0:!(i.unstable_now()-G<le)}function te(){if(V=!1,de){var C=i.unstable_now();G=C;var X=!0;try{e:{B=!1,M&&(M=!1,ee(Z),Z=-1),R=!0;var ie=T;try{t:{for(I(C),v=l(y);v!==null&&!(v.expirationTime>C&&re());){var Se=v.callback;if(typeof Se=="function"){v.callback=null,T=v.priorityLevel;var H=Se(v.expirationTime<=C);if(C=i.unstable_now(),typeof H=="function"){v.callback=H,I(C),X=!0;break t}v===l(y)&&s(y),I(C)}else s(y);v=l(y)}if(v!==null)X=!0;else{var S=l(_);S!==null&&Ce(W,S.startTime-C),X=!1}}break e}finally{v=null,T=ie,R=!1}X=void 0}}finally{X?Q():de=!1}}}var Q;if(typeof ne=="function")Q=function(){ne(te)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,ze=we.port2;we.port1.onmessage=te,Q=function(){ze.postMessage(null)}}else Q=function(){K(te,0)};function Ce(C,X){Z=K(function(){C(i.unstable_now())},X)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(C){C.callback=null},i.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<C?Math.floor(1e3/C):5},i.unstable_getCurrentPriorityLevel=function(){return T},i.unstable_next=function(C){switch(T){case 1:case 2:case 3:var X=3;break;default:X=T}var ie=T;T=X;try{return C()}finally{T=ie}},i.unstable_requestPaint=function(){V=!0},i.unstable_runWithPriority=function(C,X){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var ie=T;T=C;try{return X()}finally{T=ie}},i.unstable_scheduleCallback=function(C,X,ie){var Se=i.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?Se+ie:Se):ie=Se,C){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=ie+H,C={id:b++,callback:X,priorityLevel:C,startTime:ie,expirationTime:H,sortIndex:-1},ie>Se?(C.sortIndex=ie,o(_,C),l(y)===null&&C===l(_)&&(M?(ee(Z),Z=-1):M=!0,Ce(W,ie-Se))):(C.sortIndex=H,o(y,C),B||R||(B=!0,de||(de=!0,Q()))),C},i.unstable_shouldYield=re,i.unstable_wrapCallback=function(C){var X=T;return function(){var ie=T;T=X;try{return C.apply(this,arguments)}finally{T=ie}}}})(Xo)),Xo}var Em;function __(){return Em||(Em=1,Vo.exports=g_()),Vo.exports}var Ko={exports:{}},at={};var Tm;function y_(){if(Tm)return at;Tm=1;var i=dc();function o(y){var _="https://react.dev/errors/"+y;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)_+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var s={d:{f:l,r:function(){throw Error(o(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(y,_,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:y,containerInfo:_,implementation:b}}var p=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(y,_){if(y==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,at.createPortal=function(y,_){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(o(299));return f(y,_,null,b)},at.flushSync=function(y){var _=p.T,b=s.p;try{if(p.T=null,s.p=2,y)return y()}finally{p.T=_,s.p=b,s.d.f()}},at.preconnect=function(y,_){typeof y=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,s.d.C(y,_))},at.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},at.preinit=function(y,_){if(typeof y=="string"&&_&&typeof _.as=="string"){var b=_.as,v=h(b,_.crossOrigin),T=typeof _.integrity=="string"?_.integrity:void 0,R=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;b==="style"?s.d.S(y,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:v,integrity:T,fetchPriority:R}):b==="script"&&s.d.X(y,{crossOrigin:v,integrity:T,fetchPriority:R,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},at.preinitModule=function(y,_){if(typeof y=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var b=h(_.as,_.crossOrigin);s.d.M(y,{crossOrigin:b,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&s.d.M(y)},at.preload=function(y,_){if(typeof y=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var b=_.as,v=h(b,_.crossOrigin);s.d.L(y,b,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},at.preloadModule=function(y,_){if(typeof y=="string")if(_){var b=h(_.as,_.crossOrigin);s.d.m(y,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:b,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else s.d.m(y)},at.requestFormReset=function(y){s.d.r(y)},at.unstable_batchedUpdates=function(y,_){return y(_)},at.useFormState=function(y,_,b){return p.H.useFormState(y,_,b)},at.useFormStatus=function(){return p.H.useHostTransitionStatus()},at.version="19.2.8",at}var Nm;function fp(){if(Nm)return Ko.exports;Nm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(o){console.error(o)}}return i(),Ko.exports=y_(),Ko.exports}var wm;function b_(){if(wm)return Ql;wm=1;var i=__(),o=dc(),l=fp();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function p(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 h(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 y(e){if(f(e)!==e)throw Error(s(188))}function _(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var c=r.alternate;if(c===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===n)return y(r),e;if(c===a)return y(r),t;c=c.sibling}throw Error(s(188))}if(n.return!==a.return)n=r,a=c;else{for(var m=!1,g=r.child;g;){if(g===n){m=!0,n=r,a=c;break}if(g===a){m=!0,a=r,n=c;break}g=g.sibling}if(!m){for(g=c.child;g;){if(g===n){m=!0,n=c,a=r;break}if(g===a){m=!0,a=c,n=r;break}g=g.sibling}if(!m)throw Error(s(189))}}if(n.alternate!==a)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,T=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var we=Symbol.for("react.client.reference");function ze(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===we?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case K:return"Profiler";case V:return"StrictMode";case W:return"Suspense";case de:return"SuspenseList";case G:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case ne:return e.displayName||"Context";case ee:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:ze(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return ze(e(t))}catch{}}return null}var Ce=Array.isArray,C=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},Se=[],H=-1;function S(e){return{current:e}}function z(e){0>H||(e.current=Se[H],Se[H]=null,H--)}function $(e,t){H++,Se[H]=e.current,e.current=t}var F=S(null),ce=S(null),me=S(null),Ee=S(null);function lt(e,t){switch($(me,t),$(ce,e),$(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Yd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(F),$(F,e)}function Be(){z(F),z(ce),z(me)}function Za(e){e.memoizedState!==null&&$(Ee,e);var t=F.current,n=Yd(t,e.type);t!==n&&($(ce,e),$(F,n))}function Jl(e){ce.current===e&&(z(F),z(ce)),Ee.current===e&&(z(Ee),ql._currentValue=ie)}var Si,gc;function Un(e){if(Si===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Si=t&&t[1]||"",gc=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Si+e+gc}var Ei=!1;function Ti(e,t){if(!e||Ei)return"";Ei=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(j){var A=j}Reflect.construct(e,[],U)}else{try{U.call()}catch(j){A=j}e.call(U.prototype)}}else{try{throw Error()}catch(j){A=j}(U=e())&&typeof U.catch=="function"&&U.catch(function(){})}}catch(j){if(j&&A&&typeof j.stack=="string")return[j.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),m=c[0],g=c[1];if(m&&g){var x=m.split(`
|
|
4
|
+
`),k=g.split(`
|
|
5
|
+
`);for(r=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;r<k.length&&!k[r].includes("DetermineComponentFrameRoot");)r++;if(a===x.length||r===k.length)for(a=x.length-1,r=k.length-1;1<=a&&0<=r&&x[a]!==k[r];)r--;for(;1<=a&&0<=r;a--,r--)if(x[a]!==k[r]){if(a!==1||r!==1)do if(a--,r--,0>r||x[a]!==k[r]){var O=`
|
|
6
|
+
`+x[a].replace(" at new "," at ");return e.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",e.displayName)),O}while(1<=a&&0<=r);break}}}finally{Ei=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Un(n):""}function Qp(e,t){switch(e.tag){case 26:case 27:case 5:return Un(e.type);case 16:return Un("Lazy");case 13:return e.child!==t&&t!==null?Un("Suspense Fallback"):Un("Suspense");case 19:return Un("SuspenseList");case 0:case 15:return Ti(e.type,!1);case 11:return Ti(e.type.render,!1);case 1:return Ti(e.type,!0);case 31:return Un("Activity");default:return""}}function _c(e){try{var t="",n=null;do t+=Qp(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}}var Ni=Object.prototype.hasOwnProperty,wi=i.unstable_scheduleCallback,ki=i.unstable_cancelCallback,Vp=i.unstable_shouldYield,Xp=i.unstable_requestPaint,pt=i.unstable_now,Kp=i.unstable_getCurrentPriorityLevel,yc=i.unstable_ImmediatePriority,bc=i.unstable_UserBlockingPriority,Wl=i.unstable_NormalPriority,Ip=i.unstable_LowPriority,xc=i.unstable_IdlePriority,$p=i.log,Zp=i.unstable_setDisableYieldValue,Ja=null,ht=null;function fn(e){if(typeof $p=="function"&&Zp(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ja,e)}catch{}}var gt=Math.clz32?Math.clz32:Fp,Jp=Math.log,Wp=Math.LN2;function Fp(e){return e>>>=0,e===0?32:31-(Jp(e)/Wp|0)|0}var Fl=256,Pl=262144,es=4194304;function Ln(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 ts(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,c=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var g=a&134217727;return g!==0?(a=g&~c,a!==0?r=Ln(a):(m&=g,m!==0?r=Ln(m):n||(n=g&~e,n!==0&&(r=Ln(n))))):(g=a&~c,g!==0?r=Ln(g):m!==0?r=Ln(m):n||(n=a&~e,n!==0&&(r=Ln(n)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:r}function Wa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pp(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 vc(){var e=es;return es<<=1,(es&62914560)===0&&(es=4194304),e}function Ai(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eh(e,t,n,a,r,c){var m=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var g=e.entanglements,x=e.expirationTimes,k=e.hiddenUpdates;for(n=m&~n;0<n;){var O=31-gt(n),U=1<<O;g[O]=0,x[O]=-1;var A=k[O];if(A!==null)for(k[O]=null,O=0;O<A.length;O++){var j=A[O];j!==null&&(j.lane&=-536870913)}n&=~U}a!==0&&Sc(e,a,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(m&~t))}function Sc(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-gt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function Ec(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-gt(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function Tc(e,t){var n=t&-t;return n=(n&42)!==0?1:ji(n),(n&(e.suspendedLanes|t))!==0?0:n}function ji(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 Oi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Nc(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:fm(e.type))}function wc(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var dn=Math.random().toString(36).slice(2),Fe="__reactFiber$"+dn,rt="__reactProps$"+dn,ia="__reactContainer$"+dn,Ci="__reactEvents$"+dn,th="__reactListeners$"+dn,nh="__reactHandles$"+dn,kc="__reactResources$"+dn,Pa="__reactMarker$"+dn;function Ri(e){delete e[Fe],delete e[rt],delete e[Ci],delete e[th],delete e[nh]}function ra(e){var t=e[Fe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ia]||n[Fe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zd(e);e!==null;){if(n=e[Fe])return n;e=Zd(e)}return t}e=n,n=e.parentNode}return null}function oa(e){if(e=e[Fe]||e[ia]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function el(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ca(e){var t=e[kc];return t||(t=e[kc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ze(e){e[Pa]=!0}var Ac=new Set,jc={};function qn(e,t){ua(e,t),ua(e+"Capture",t)}function ua(e,t){for(jc[e]=t,e=0;e<t.length;e++)Ac.add(t[e])}var ah=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]*$"),Oc={},Cc={};function lh(e){return Ni.call(Cc,e)?!0:Ni.call(Oc,e)?!1:ah.test(e)?Cc[e]=!0:(Oc[e]=!0,!1)}function ns(e,t,n){if(lh(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function as(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Xt(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sh(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){n=""+m,c.call(this,m)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(m){n=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mi(e){if(!e._valueTracker){var t=Rc(e)?"checked":"value";e._valueTracker=sh(e,t,""+e[t])}}function Mc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Rc(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ls(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 ih=/[\n"\\]/g;function kt(e){return e.replace(ih,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Di(e,t,n,a,r,c,m,g){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?zi(e,m,wt(t)):n!=null?zi(e,m,wt(n)):a!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+wt(g):e.removeAttribute("name")}function Dc(e,t,n,a,r,c,m,g){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Mi(e);return}n=n!=null?""+wt(n):"",t=t!=null?""+wt(t):n,g||t===e.value||(e.value=t),e.defaultValue=t}a=a??r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=g?e.checked:!!a,e.defaultChecked=!!a,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Mi(e)}function zi(e,t,n){t==="number"&&ls(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fa(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+wt(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function zc(e,t,n){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+wt(n):""}function Uc(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(s(92));if(Ce(a)){if(1<a.length)throw Error(s(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=wt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Mi(e)}function da(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rh=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 Lc(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||rh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function qc(e,t,n){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&Lc(e,r,a)}else for(var c in t)t.hasOwnProperty(c)&&Lc(e,c,t[c])}function Ui(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 oh=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"]]),ch=/^[\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 ss(e){return ch.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kt(){}var Li=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,pa=null;function Hc(e){var t=oa(e);if(t&&(e=t.stateNode)){var n=e[rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Di(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[rt]||null;if(!r)throw Error(s(90));Di(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Mc(a)}break e;case"textarea":zc(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fa(e,!!n.multiple,t,!1)}}}var Hi=!1;function Bc(e,t,n){if(Hi)return e(t,n);Hi=!0;try{var a=e(t);return a}finally{if(Hi=!1,(ma!==null||pa!==null)&&(Ks(),ma&&(t=ma,e=pa,pa=ma=null,Hc(t),e)))for(t=0;t<e.length;t++)Hc(e[t])}}function tl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[rt]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(s(231,t,typeof n));return n}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Bi=!1;if(It)try{var nl={};Object.defineProperty(nl,"passive",{get:function(){Bi=!0}}),window.addEventListener("test",nl,nl),window.removeEventListener("test",nl,nl)}catch{Bi=!1}var mn=null,Gi=null,is=null;function Gc(){if(is)return is;var e,t=Gi,n=t.length,a,r="value"in mn?mn.value:mn.textContent,c=r.length;for(e=0;e<n&&t[e]===r[e];e++);var m=n-e;for(a=1;a<=m&&t[n-a]===r[c-a];a++);return is=r.slice(e,1<a?1-a:void 0)}function rs(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 os(){return!0}function Yc(){return!1}function ot(e){function t(n,a,r,c,m){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=c,this.target=m,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(n=e[g],this[g]=n?n(c):c[g]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?os:Yc,this.isPropagationStopped=Yc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=os)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=ot(Hn),al=v({},Hn,{view:0,detail:0}),uh=ot(al),Yi,Qi,ll,us=v({},al,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xi,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!==ll&&(ll&&e.type==="mousemove"?(Yi=e.screenX-ll.screenX,Qi=e.screenY-ll.screenY):Qi=Yi=0,ll=e),Yi)},movementY:function(e){return"movementY"in e?e.movementY:Qi}}),Qc=ot(us),fh=v({},us,{dataTransfer:0}),dh=ot(fh),mh=v({},al,{relatedTarget:0}),Vi=ot(mh),ph=v({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0}),hh=ot(ph),gh=v({},Hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_h=ot(gh),yh=v({},Hn,{data:0}),Vc=ot(yh),bh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xh={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"},vh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vh[e])?!!t[e]:!1}function Xi(){return Sh}var Eh=v({},al,{key:function(e){if(e.key){var t=bh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xi,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Th=ot(Eh),Nh=v({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xc=ot(Nh),wh=v({},al,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xi}),kh=ot(wh),Ah=v({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),jh=ot(Ah),Oh=v({},us,{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}),Ch=ot(Oh),Rh=v({},Hn,{newState:0,oldState:0}),Mh=ot(Rh),Dh=[9,13,27,32],Ki=It&&"CompositionEvent"in window,sl=null;It&&"documentMode"in document&&(sl=document.documentMode);var zh=It&&"TextEvent"in window&&!sl,Kc=It&&(!Ki||sl&&8<sl&&11>=sl),Ic=" ",$c=!1;function Zc(e,t){switch(e){case"keyup":return Dh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ha=!1;function Uh(e,t){switch(e){case"compositionend":return Jc(t);case"keypress":return t.which!==32?null:($c=!0,Ic);case"textInput":return e=t.data,e===Ic&&$c?null:e;default:return null}}function Lh(e,t){if(ha)return e==="compositionend"||!Ki&&Zc(e,t)?(e=Gc(),is=Gi=mn=null,ha=!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 Kc&&t.locale!=="ko"?null:t.data;default:return null}}var qh={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 Wc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qh[e.type]:t==="textarea"}function Fc(e,t,n,a){ma?pa?pa.push(a):pa=[a]:ma=a,t=Ps(t,"onChange"),0<t.length&&(n=new cs("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var il=null,rl=null;function Hh(e){zd(e,0)}function fs(e){var t=el(e);if(Mc(t))return e}function Pc(e,t){if(e==="change")return t}var eu=!1;if(It){var Ii;if(It){var $i="oninput"in document;if(!$i){var tu=document.createElement("div");tu.setAttribute("oninput","return;"),$i=typeof tu.oninput=="function"}Ii=$i}else Ii=!1;eu=Ii&&(!document.documentMode||9<document.documentMode)}function nu(){il&&(il.detachEvent("onpropertychange",au),rl=il=null)}function au(e){if(e.propertyName==="value"&&fs(rl)){var t=[];Fc(t,rl,e,qi(e)),Bc(Hh,t)}}function Bh(e,t,n){e==="focusin"?(nu(),il=t,rl=n,il.attachEvent("onpropertychange",au)):e==="focusout"&&nu()}function Gh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fs(rl)}function Yh(e,t){if(e==="click")return fs(t)}function Qh(e,t){if(e==="input"||e==="change")return fs(t)}function Vh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:Vh;function ol(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!Ni.call(t,r)||!_t(e[r],t[r]))return!1}return!0}function lu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function su(e,t){var n=lu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=lu(n)}}function iu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ru(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ls(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ls(e.document)}return t}function Zi(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 Xh=It&&"documentMode"in document&&11>=document.documentMode,ga=null,Ji=null,cl=null,Wi=!1;function ou(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wi||ga==null||ga!==ls(a)||(a=ga,"selectionStart"in a&&Zi(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),cl&&ol(cl,a)||(cl=a,a=Ps(Ji,"onSelect"),0<a.length&&(t=new cs("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ga)))}function Bn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _a={animationend:Bn("Animation","AnimationEnd"),animationiteration:Bn("Animation","AnimationIteration"),animationstart:Bn("Animation","AnimationStart"),transitionrun:Bn("Transition","TransitionRun"),transitionstart:Bn("Transition","TransitionStart"),transitioncancel:Bn("Transition","TransitionCancel"),transitionend:Bn("Transition","TransitionEnd")},Fi={},cu={};It&&(cu=document.createElement("div").style,"AnimationEvent"in window||(delete _a.animationend.animation,delete _a.animationiteration.animation,delete _a.animationstart.animation),"TransitionEvent"in window||delete _a.transitionend.transition);function Gn(e){if(Fi[e])return Fi[e];if(!_a[e])return e;var t=_a[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cu)return Fi[e]=t[n];return e}var uu=Gn("animationend"),fu=Gn("animationiteration"),du=Gn("animationstart"),Kh=Gn("transitionrun"),Ih=Gn("transitionstart"),$h=Gn("transitioncancel"),mu=Gn("transitionend"),pu=new Map,Pi="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(" ");Pi.push("scrollEnd");function Ut(e,t){pu.set(e,t),qn(t,[e])}var ds=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)},At=[],ya=0,er=0;function ms(){for(var e=ya,t=er=ya=0;t<e;){var n=At[t];At[t++]=null;var a=At[t];At[t++]=null;var r=At[t];At[t++]=null;var c=At[t];if(At[t++]=null,a!==null&&r!==null){var m=a.pending;m===null?r.next=r:(r.next=m.next,m.next=r),a.pending=r}c!==0&&hu(n,r,c)}}function ps(e,t,n,a){At[ya++]=e,At[ya++]=t,At[ya++]=n,At[ya++]=a,er|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function tr(e,t,n,a){return ps(e,t,n,a),hs(e)}function Yn(e,t){return ps(e,null,null,t),hs(e)}function hu(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,c=e.return;c!==null;)c.childLanes|=n,a=c.alternate,a!==null&&(a.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-gt(n),e=c.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),c):null}function hs(e){if(50<Cl)throw Cl=0,uo=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ba={};function Zh(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,n,a){return new Zh(e,t,n,a)}function nr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function gu(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gs(e,t,n,a,r,c){var m=0;if(a=e,typeof e=="function")nr(e)&&(m=1);else if(typeof e=="string")m=e_(e,n,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case G:return e=yt(31,n,t,r),e.elementType=G,e.lanes=c,e;case M:return Qn(n.children,r,c,t);case V:m=8,r|=24;break;case K:return e=yt(12,n,t,r|2),e.elementType=K,e.lanes=c,e;case W:return e=yt(13,n,t,r),e.elementType=W,e.lanes=c,e;case de:return e=yt(19,n,t,r),e.elementType=de,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:m=10;break e;case ee:m=9;break e;case I:m=11;break e;case Z:m=14;break e;case le:m=16,a=null;break e}m=29,n=Error(s(130,e===null?"null":typeof e,"")),a=null}return t=yt(m,n,t,r),t.elementType=e,t.type=a,t.lanes=c,t}function Qn(e,t,n,a){return e=yt(7,e,a,t),e.lanes=n,e}function ar(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function _u(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function lr(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yu=new WeakMap;function jt(e,t){if(typeof e=="object"&&e!==null){var n=yu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:_c(t)},yu.set(e,t),t)}return{value:e,source:t,stack:_c(t)}}var xa=[],va=0,_s=null,ul=0,Ot=[],Ct=0,pn=null,Ht=1,Bt="";function Zt(e,t){xa[va++]=ul,xa[va++]=_s,_s=e,ul=t}function bu(e,t,n){Ot[Ct++]=Ht,Ot[Ct++]=Bt,Ot[Ct++]=pn,pn=e;var a=Ht;e=Bt;var r=32-gt(a)-1;a&=~(1<<r),n+=1;var c=32-gt(t)+r;if(30<c){var m=r-r%5;c=(a&(1<<m)-1).toString(32),a>>=m,r-=m,Ht=1<<32-gt(t)+r|n<<r|a,Bt=c+e}else Ht=1<<c|n<<r|a,Bt=e}function sr(e){e.return!==null&&(Zt(e,1),bu(e,1,0))}function ir(e){for(;e===_s;)_s=xa[--va],xa[va]=null,ul=xa[--va],xa[va]=null;for(;e===pn;)pn=Ot[--Ct],Ot[Ct]=null,Bt=Ot[--Ct],Ot[Ct]=null,Ht=Ot[--Ct],Ot[Ct]=null}function xu(e,t){Ot[Ct++]=Ht,Ot[Ct++]=Bt,Ot[Ct++]=pn,Ht=t.id,Bt=t.overflow,pn=e}var Pe=null,Me=null,ye=!1,hn=null,Rt=!1,rr=Error(s(519));function gn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fl(jt(t,e)),rr}function vu(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Fe]=e,t[rt]=a,n){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(n=0;n<Ml.length;n++)he(Ml[n],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),Dc(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),Uc(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Hd(t.textContent,n)?(a.popover!=null&&(he("beforetoggle",t),he("toggle",t)),a.onScroll!=null&&he("scroll",t),a.onScrollEnd!=null&&he("scrollend",t),a.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||gn(e,!0)}function Su(e){for(Pe=e.return;Pe;)switch(Pe.tag){case 5:case 31:case 13:Rt=!1;return;case 27:case 3:Rt=!0;return;default:Pe=Pe.return}}function Sa(e){if(e!==Pe)return!1;if(!ye)return Su(e),ye=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||wo(e.type,e.memoizedProps)),n=!n),n&&Me&&gn(e),Su(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Me=$d(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Me=$d(e)}else t===27?(t=Me,On(e.type)?(e=Co,Co=null,Me=e):Me=t):Me=Pe?Dt(e.stateNode.nextSibling):null;return!0}function Vn(){Me=Pe=null,ye=!1}function or(){var e=hn;return e!==null&&(dt===null?dt=e:dt.push.apply(dt,e),hn=null),e}function fl(e){hn===null?hn=[e]:hn.push(e)}var cr=S(null),Xn=null,Jt=null;function _n(e,t,n){$(cr,t._currentValue),t._currentValue=n}function Wt(e){e._currentValue=cr.current,z(cr)}function ur(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function fr(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var m=r.child;c=c.firstContext;e:for(;c!==null;){var g=c;c=r;for(var x=0;x<t.length;x++)if(g.context===t[x]){c.lanes|=n,g=c.alternate,g!==null&&(g.lanes|=n),ur(c.return,n,e),a||(m=null);break e}c=g.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(s(341));m.lanes|=n,c=m.alternate,c!==null&&(c.lanes|=n),ur(m,n,e),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Ea(e,t,n,a){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(s(387));if(m=m.memoizedProps,m!==null){var g=r.type;_t(r.pendingProps.value,m.value)||(e!==null?e.push(g):e=[g])}}else if(r===Ee.current){if(m=r.alternate,m===null)throw Error(s(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(ql):e=[ql])}r=r.return}e!==null&&fr(t,e,n,a),t.flags|=262144}function ys(e){for(e=e.firstContext;e!==null;){if(!_t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Kn(e){Xn=e,Jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function et(e){return Eu(Xn,e)}function bs(e,t){return Xn===null&&Kn(e),Eu(e,t)}function Eu(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Jt===null){if(e===null)throw Error(s(308));Jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jt=Jt.next=t;return n}var Jh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Wh=i.unstable_scheduleCallback,Fh=i.unstable_NormalPriority,Ve={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dr(){return{controller:new Jh,data:new Map,refCount:0}}function dl(e){e.refCount--,e.refCount===0&&Wh(Fh,function(){e.controller.abort()})}var ml=null,mr=0,Ta=0,Na=null;function Ph(e,t){if(ml===null){var n=ml=[];mr=0,Ta=_o(),Na={status:"pending",value:void 0,then:function(a){n.push(a)}}}return mr++,t.then(Tu,Tu),t}function Tu(){if(--mr===0&&ml!==null){Na!==null&&(Na.status="fulfilled");var e=ml;ml=null,Ta=0,Na=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eg(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var Nu=C.S;C.S=function(e,t){cd=pt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ph(e,t),Nu!==null&&Nu(e,t)};var In=S(null);function pr(){var e=In.current;return e!==null?e:Oe.pooledCache}function xs(e,t){t===null?$(In,In.current):$(In,t.pool)}function wu(){var e=pr();return e===null?null:{parent:Ve._currentValue,pool:e}}var wa=Error(s(460)),hr=Error(s(474)),vs=Error(s(542)),Ss={then:function(){}};function ku(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Au(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ou(e),e;default:if(typeof t.status=="string")t.then(Kt,Kt);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ou(e),e}throw Zn=t,wa}}function $n(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Zn=n,wa):n}}var Zn=null;function ju(){if(Zn===null)throw Error(s(459));var e=Zn;return Zn=null,e}function Ou(e){if(e===wa||e===vs)throw Error(s(483))}var ka=null,pl=0;function Es(e){var t=pl;return pl+=1,ka===null&&(ka=[]),Au(ka,e,t)}function hl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ts(e,t){throw t.$$typeof===T?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Cu(e){function t(N,E){if(e){var w=N.deletions;w===null?(N.deletions=[E],N.flags|=16):w.push(E)}}function n(N,E){if(!e)return null;for(;E!==null;)t(N,E),E=E.sibling;return null}function a(N){for(var E=new Map;N!==null;)N.key!==null?E.set(N.key,N):E.set(N.index,N),N=N.sibling;return E}function r(N,E){return N=$t(N,E),N.index=0,N.sibling=null,N}function c(N,E,w){return N.index=w,e?(w=N.alternate,w!==null?(w=w.index,w<E?(N.flags|=67108866,E):w):(N.flags|=67108866,E)):(N.flags|=1048576,E)}function m(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function g(N,E,w,D){return E===null||E.tag!==6?(E=ar(w,N.mode,D),E.return=N,E):(E=r(E,w),E.return=N,E)}function x(N,E,w,D){var ae=w.type;return ae===M?O(N,E,w.props.children,D,w.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===le&&$n(ae)===E.type)?(E=r(E,w.props),hl(E,w),E.return=N,E):(E=gs(w.type,w.key,w.props,null,N.mode,D),hl(E,w),E.return=N,E)}function k(N,E,w,D){return E===null||E.tag!==4||E.stateNode.containerInfo!==w.containerInfo||E.stateNode.implementation!==w.implementation?(E=lr(w,N.mode,D),E.return=N,E):(E=r(E,w.children||[]),E.return=N,E)}function O(N,E,w,D,ae){return E===null||E.tag!==7?(E=Qn(w,N.mode,D,ae),E.return=N,E):(E=r(E,w),E.return=N,E)}function U(N,E,w){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ar(""+E,N.mode,w),E.return=N,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case R:return w=gs(E.type,E.key,E.props,null,N.mode,w),hl(w,E),w.return=N,w;case B:return E=lr(E,N.mode,w),E.return=N,E;case le:return E=$n(E),U(N,E,w)}if(Ce(E)||Q(E))return E=Qn(E,N.mode,w,null),E.return=N,E;if(typeof E.then=="function")return U(N,Es(E),w);if(E.$$typeof===ne)return U(N,bs(N,E),w);Ts(N,E)}return null}function A(N,E,w,D){var ae=E!==null?E.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return ae!==null?null:g(N,E,""+w,D);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case R:return w.key===ae?x(N,E,w,D):null;case B:return w.key===ae?k(N,E,w,D):null;case le:return w=$n(w),A(N,E,w,D)}if(Ce(w)||Q(w))return ae!==null?null:O(N,E,w,D,null);if(typeof w.then=="function")return A(N,E,Es(w),D);if(w.$$typeof===ne)return A(N,E,bs(N,w),D);Ts(N,w)}return null}function j(N,E,w,D,ae){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return N=N.get(w)||null,g(E,N,""+D,ae);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case R:return N=N.get(D.key===null?w:D.key)||null,x(E,N,D,ae);case B:return N=N.get(D.key===null?w:D.key)||null,k(E,N,D,ae);case le:return D=$n(D),j(N,E,w,D,ae)}if(Ce(D)||Q(D))return N=N.get(w)||null,O(E,N,D,ae,null);if(typeof D.then=="function")return j(N,E,w,Es(D),ae);if(D.$$typeof===ne)return j(N,E,w,bs(E,D),ae);Ts(E,D)}return null}function J(N,E,w,D){for(var ae=null,be=null,P=E,fe=E=0,_e=null;P!==null&&fe<w.length;fe++){P.index>fe?(_e=P,P=null):_e=P.sibling;var xe=A(N,P,w[fe],D);if(xe===null){P===null&&(P=_e);break}e&&P&&xe.alternate===null&&t(N,P),E=c(xe,E,fe),be===null?ae=xe:be.sibling=xe,be=xe,P=_e}if(fe===w.length)return n(N,P),ye&&Zt(N,fe),ae;if(P===null){for(;fe<w.length;fe++)P=U(N,w[fe],D),P!==null&&(E=c(P,E,fe),be===null?ae=P:be.sibling=P,be=P);return ye&&Zt(N,fe),ae}for(P=a(P);fe<w.length;fe++)_e=j(P,N,fe,w[fe],D),_e!==null&&(e&&_e.alternate!==null&&P.delete(_e.key===null?fe:_e.key),E=c(_e,E,fe),be===null?ae=_e:be.sibling=_e,be=_e);return e&&P.forEach(function(zn){return t(N,zn)}),ye&&Zt(N,fe),ae}function se(N,E,w,D){if(w==null)throw Error(s(151));for(var ae=null,be=null,P=E,fe=E=0,_e=null,xe=w.next();P!==null&&!xe.done;fe++,xe=w.next()){P.index>fe?(_e=P,P=null):_e=P.sibling;var zn=A(N,P,xe.value,D);if(zn===null){P===null&&(P=_e);break}e&&P&&zn.alternate===null&&t(N,P),E=c(zn,E,fe),be===null?ae=zn:be.sibling=zn,be=zn,P=_e}if(xe.done)return n(N,P),ye&&Zt(N,fe),ae;if(P===null){for(;!xe.done;fe++,xe=w.next())xe=U(N,xe.value,D),xe!==null&&(E=c(xe,E,fe),be===null?ae=xe:be.sibling=xe,be=xe);return ye&&Zt(N,fe),ae}for(P=a(P);!xe.done;fe++,xe=w.next())xe=j(P,N,fe,xe.value,D),xe!==null&&(e&&xe.alternate!==null&&P.delete(xe.key===null?fe:xe.key),E=c(xe,E,fe),be===null?ae=xe:be.sibling=xe,be=xe);return e&&P.forEach(function(f_){return t(N,f_)}),ye&&Zt(N,fe),ae}function je(N,E,w,D){if(typeof w=="object"&&w!==null&&w.type===M&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case R:e:{for(var ae=w.key;E!==null;){if(E.key===ae){if(ae=w.type,ae===M){if(E.tag===7){n(N,E.sibling),D=r(E,w.props.children),D.return=N,N=D;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===le&&$n(ae)===E.type){n(N,E.sibling),D=r(E,w.props),hl(D,w),D.return=N,N=D;break e}n(N,E);break}else t(N,E);E=E.sibling}w.type===M?(D=Qn(w.props.children,N.mode,D,w.key),D.return=N,N=D):(D=gs(w.type,w.key,w.props,null,N.mode,D),hl(D,w),D.return=N,N=D)}return m(N);case B:e:{for(ae=w.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===w.containerInfo&&E.stateNode.implementation===w.implementation){n(N,E.sibling),D=r(E,w.children||[]),D.return=N,N=D;break e}else{n(N,E);break}else t(N,E);E=E.sibling}D=lr(w,N.mode,D),D.return=N,N=D}return m(N);case le:return w=$n(w),je(N,E,w,D)}if(Ce(w))return J(N,E,w,D);if(Q(w)){if(ae=Q(w),typeof ae!="function")throw Error(s(150));return w=ae.call(w),se(N,E,w,D)}if(typeof w.then=="function")return je(N,E,Es(w),D);if(w.$$typeof===ne)return je(N,E,bs(N,w),D);Ts(N,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,E!==null&&E.tag===6?(n(N,E.sibling),D=r(E,w),D.return=N,N=D):(n(N,E),D=ar(w,N.mode,D),D.return=N,N=D),m(N)):n(N,E)}return function(N,E,w,D){try{pl=0;var ae=je(N,E,w,D);return ka=null,ae}catch(P){if(P===wa||P===vs)throw P;var be=yt(29,P,null,N.mode);return be.lanes=D,be.return=N,be}}}var Jn=Cu(!0),Ru=Cu(!1),yn=!1;function gr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _r(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 bn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ve&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=hs(e),hu(e,null,n),t}return ps(e,a,t,n),hs(e)}function gl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Ec(e,n)}}function yr(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var m={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?r=c=m:c=c.next=m,n=n.next}while(n!==null);c===null?r=c=t:c=c.next=t}else r=c=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var br=!1;function _l(){if(br){var e=Na;if(e!==null)throw e}}function yl(e,t,n,a){br=!1;var r=e.updateQueue;yn=!1;var c=r.firstBaseUpdate,m=r.lastBaseUpdate,g=r.shared.pending;if(g!==null){r.shared.pending=null;var x=g,k=x.next;x.next=null,m===null?c=k:m.next=k,m=x;var O=e.alternate;O!==null&&(O=O.updateQueue,g=O.lastBaseUpdate,g!==m&&(g===null?O.firstBaseUpdate=k:g.next=k,O.lastBaseUpdate=x))}if(c!==null){var U=r.baseState;m=0,O=k=x=null,g=c;do{var A=g.lane&-536870913,j=A!==g.lane;if(j?(ge&A)===A:(a&A)===A){A!==0&&A===Ta&&(br=!0),O!==null&&(O=O.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var J=e,se=g;A=t;var je=n;switch(se.tag){case 1:if(J=se.payload,typeof J=="function"){U=J.call(je,U,A);break e}U=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=se.payload,A=typeof J=="function"?J.call(je,U,A):J,A==null)break e;U=v({},U,A);break e;case 2:yn=!0}}A=g.callback,A!==null&&(e.flags|=64,j&&(e.flags|=8192),j=r.callbacks,j===null?r.callbacks=[A]:j.push(A))}else j={lane:A,tag:g.tag,payload:g.payload,callback:g.callback,next:null},O===null?(k=O=j,x=U):O=O.next=j,m|=A;if(g=g.next,g===null){if(g=r.shared.pending,g===null)break;j=g,g=j.next,j.next=null,r.lastBaseUpdate=j,r.shared.pending=null}}while(!0);O===null&&(x=U),r.baseState=x,r.firstBaseUpdate=k,r.lastBaseUpdate=O,c===null&&(r.shared.lanes=0),Nn|=m,e.lanes=m,e.memoizedState=U}}function Mu(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Du(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Mu(n[e],t)}var Aa=S(null),Ns=S(0);function zu(e,t){e=rn,$(Ns,e),$(Aa,t),rn=e|t.baseLanes}function xr(){$(Ns,rn),$(Aa,Aa.current)}function vr(){rn=Ns.current,z(Aa),z(Ns)}var bt=S(null),Mt=null;function vn(e){var t=e.alternate;$(Ge,Ge.current&1),$(bt,e),Mt===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(Mt=e)}function Sr(e){$(Ge,Ge.current),$(bt,e),Mt===null&&(Mt=e)}function Uu(e){e.tag===22?($(Ge,Ge.current),$(bt,e),Mt===null&&(Mt=e)):Sn()}function Sn(){$(Ge,Ge.current),$(bt,bt.current)}function xt(e){z(bt),Mt===e&&(Mt=null),z(Ge)}var Ge=S(0);function ws(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||jo(n)||Oo(n)))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 Ft=0,ue=null,ke=null,Xe=null,ks=!1,ja=!1,Wn=!1,As=0,bl=0,Oa=null,tg=0;function Le(){throw Error(s(321))}function Er(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_t(e[n],t[n]))return!1;return!0}function Tr(e,t,n,a,r,c){return Ft=c,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,C.H=e===null||e.memoizedState===null?xf:Hr,Wn=!1,c=n(a,r),Wn=!1,ja&&(c=qu(t,n,a,r)),Lu(e),c}function Lu(e){C.H=Sl;var t=ke!==null&&ke.next!==null;if(Ft=0,Xe=ke=ue=null,ks=!1,bl=0,Oa=null,t)throw Error(s(300));e===null||Ke||(e=e.dependencies,e!==null&&ys(e)&&(Ke=!0))}function qu(e,t,n,a){ue=e;var r=0;do{if(ja&&(Oa=null),bl=0,ja=!1,25<=r)throw Error(s(301));if(r+=1,Xe=ke=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}C.H=vf,c=t(n,a)}while(ja);return c}function ng(){var e=C.H,t=e.useState()[0];return t=typeof t.then=="function"?xl(t):t,e=e.useState()[0],(ke!==null?ke.memoizedState:null)!==e&&(ue.flags|=1024),t}function Nr(){var e=As!==0;return As=0,e}function wr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function kr(e){if(ks){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ks=!1}Ft=0,Xe=ke=ue=null,ja=!1,bl=As=0,Oa=null}function st(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xe===null?ue.memoizedState=Xe=e:Xe=Xe.next=e,Xe}function Ye(){if(ke===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=Xe===null?ue.memoizedState:Xe.next;if(t!==null)Xe=t,ke=e;else{if(e===null)throw ue.alternate===null?Error(s(467)):Error(s(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},Xe===null?ue.memoizedState=Xe=e:Xe=Xe.next=e}return Xe}function js(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(e){var t=bl;return bl+=1,Oa===null&&(Oa=[]),e=Au(Oa,e,t),t=ue,(Xe===null?t.memoizedState:Xe.next)===null&&(t=t.alternate,C.H=t===null||t.memoizedState===null?xf:Hr),e}function Os(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xl(e);if(e.$$typeof===ne)return et(e)}throw Error(s(438,String(e)))}function Ar(e){var t=null,n=ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ue.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=js(),ue.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=re;return t.index++,n}function Pt(e,t){return typeof t=="function"?t(e):t}function Cs(e){var t=Ye();return jr(t,ke,e)}function jr(e,t,n){var a=e.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var r=e.baseQueue,c=a.pending;if(c!==null){if(r!==null){var m=r.next;r.next=c.next,c.next=m}t.baseQueue=r=c,a.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var g=m=null,x=null,k=t,O=!1;do{var U=k.lane&-536870913;if(U!==k.lane?(ge&U)===U:(Ft&U)===U){var A=k.revertLane;if(A===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),U===Ta&&(O=!0);else if((Ft&A)===A){k=k.next,A===Ta&&(O=!0);continue}else U={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},x===null?(g=x=U,m=c):x=x.next=U,ue.lanes|=A,Nn|=A;U=k.action,Wn&&n(c,U),c=k.hasEagerState?k.eagerState:n(c,U)}else A={lane:U,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},x===null?(g=x=A,m=c):x=x.next=A,ue.lanes|=U,Nn|=U;k=k.next}while(k!==null&&k!==t);if(x===null?m=c:x.next=g,!_t(c,e.memoizedState)&&(Ke=!0,O&&(n=Na,n!==null)))throw n;e.memoizedState=c,e.baseState=m,e.baseQueue=x,a.lastRenderedState=c}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Or(e){var t=Ye(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,c=t.memoizedState;if(r!==null){n.pending=null;var m=r=r.next;do c=e(c,m.action),m=m.next;while(m!==r);_t(c,t.memoizedState)||(Ke=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,a]}function Hu(e,t,n){var a=ue,r=Ye(),c=ye;if(c){if(n===void 0)throw Error(s(407));n=n()}else n=t();var m=!_t((ke||r).memoizedState,n);if(m&&(r.memoizedState=n,Ke=!0),r=r.queue,Mr(Yu.bind(null,a,r,e),[e]),r.getSnapshot!==t||m||Xe!==null&&Xe.memoizedState.tag&1){if(a.flags|=2048,Ca(9,{destroy:void 0},Gu.bind(null,a,r,n,t),null),Oe===null)throw Error(s(349));c||(Ft&127)!==0||Bu(a,t,n)}return n}function Bu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t=js(),ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Gu(e,t,n,a){t.value=n,t.getSnapshot=a,Qu(t)&&Vu(e)}function Yu(e,t,n){return n(function(){Qu(t)&&Vu(e)})}function Qu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_t(e,n)}catch{return!0}}function Vu(e){var t=Yn(e,2);t!==null&&mt(t,e,2)}function Cr(e){var t=st();if(typeof e=="function"){var n=e;if(e=n(),Wn){fn(!0);try{n()}finally{fn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:e},t}function Xu(e,t,n,a){return e.baseState=n,jr(e,ke,typeof a=="function"?a:Pt)}function ag(e,t,n,a,r){if(Ds(e))throw Error(s(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){c.listeners.push(m)}};C.T!==null?n(!0):c.isTransition=!1,a(c),n=t.pending,n===null?(c.next=t.pending=c,Ku(t,c)):(c.next=n.next,t.pending=n.next=c)}}function Ku(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var c=C.T,m={};C.T=m;try{var g=n(r,a),x=C.S;x!==null&&x(m,g),Iu(e,t,g)}catch(k){Rr(e,t,k)}finally{c!==null&&m.types!==null&&(c.types=m.types),C.T=c}}else try{c=n(r,a),Iu(e,t,c)}catch(k){Rr(e,t,k)}}function Iu(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){$u(e,t,a)},function(a){return Rr(e,t,a)}):$u(e,t,n)}function $u(e,t,n){t.status="fulfilled",t.value=n,Zu(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ku(e,n)))}function Rr(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Zu(t),t=t.next;while(t!==a)}e.action=null}function Zu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ju(e,t){return t}function Wu(e,t){if(ye){var n=Oe.formState;if(n!==null){e:{var a=ue;if(ye){if(Me){t:{for(var r=Me,c=Rt;r.nodeType!==8;){if(!c){r=null;break t}if(r=Dt(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){Me=Dt(r.nextSibling),a=r.data==="F!";break e}}gn(a)}a=!1}a&&(t=n[0])}}return n=st(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ju,lastRenderedState:t},n.queue=a,n=_f.bind(null,ue,a),a.dispatch=n,a=Cr(!1),c=qr.bind(null,ue,!1,a.queue),a=st(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=ag.bind(null,ue,r,c,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function Fu(e){var t=Ye();return Pu(t,ke,e)}function Pu(e,t,n){if(t=jr(e,t,Ju)[0],e=Cs(Pt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=xl(t)}catch(m){throw m===wa?vs:m}else a=t;t=Ye();var r=t.queue,c=r.dispatch;return n!==t.memoizedState&&(ue.flags|=2048,Ca(9,{destroy:void 0},lg.bind(null,r,n),null)),[a,c,e]}function lg(e,t){e.action=t}function ef(e){var t=Ye(),n=ke;if(n!==null)return Pu(t,n,e);Ye(),t=t.memoizedState,n=Ye();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ca(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ue.updateQueue,t===null&&(t=js(),ue.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function tf(){return Ye().memoizedState}function Rs(e,t,n,a){var r=st();ue.flags|=e,r.memoizedState=Ca(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ms(e,t,n,a){var r=Ye();a=a===void 0?null:a;var c=r.memoizedState.inst;ke!==null&&a!==null&&Er(a,ke.memoizedState.deps)?r.memoizedState=Ca(t,c,n,a):(ue.flags|=e,r.memoizedState=Ca(1|t,c,n,a))}function nf(e,t){Rs(8390656,8,e,t)}function Mr(e,t){Ms(2048,8,e,t)}function sg(e){ue.flags|=4;var t=ue.updateQueue;if(t===null)t=js(),ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function af(e){var t=Ye().memoizedState;return sg({ref:t,nextImpl:e}),function(){if((ve&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function lf(e,t){return Ms(4,2,e,t)}function sf(e,t){return Ms(4,4,e,t)}function rf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function of(e,t,n){n=n!=null?n.concat([e]):null,Ms(4,4,rf.bind(null,t,e),n)}function Dr(){}function cf(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Er(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function uf(e,t){var n=Ye();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Er(t,a[1]))return a[0];if(a=e(),Wn){fn(!0);try{e()}finally{fn(!1)}}return n.memoizedState=[a,t],a}function zr(e,t,n){return n===void 0||(Ft&1073741824)!==0&&(ge&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=fd(),ue.lanes|=e,Nn|=e,n)}function ff(e,t,n,a){return _t(n,t)?n:Aa.current!==null?(e=zr(e,n,a),_t(e,t)||(Ke=!0),e):(Ft&42)===0||(Ft&1073741824)!==0&&(ge&261930)===0?(Ke=!0,e.memoizedState=n):(e=fd(),ue.lanes|=e,Nn|=e,t)}function df(e,t,n,a,r){var c=X.p;X.p=c!==0&&8>c?c:8;var m=C.T,g={};C.T=g,qr(e,!1,t,n);try{var x=r(),k=C.S;if(k!==null&&k(g,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var O=eg(x,a);vl(e,t,O,Et(e))}else vl(e,t,a,Et(e))}catch(U){vl(e,t,{then:function(){},status:"rejected",reason:U},Et())}finally{X.p=c,m!==null&&g.types!==null&&(m.types=g.types),C.T=m}}function ig(){}function Ur(e,t,n,a){if(e.tag!==5)throw Error(s(476));var r=mf(e).queue;df(e,r,t,ie,n===null?ig:function(){return pf(e),n(a)})}function mf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pf(e){var t=mf(e);t.next===null&&(t=e.alternate.memoizedState),vl(e,t.next.queue,{},Et())}function Lr(){return et(ql)}function hf(){return Ye().memoizedState}function gf(){return Ye().memoizedState}function rg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Et();e=bn(n);var a=xn(t,e,n);a!==null&&(mt(a,t,n),gl(a,t,n)),t={cache:dr()},e.payload=t;return}t=t.return}}function og(e,t,n){var a=Et();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ds(e)?yf(t,n):(n=tr(e,t,n,a),n!==null&&(mt(n,e,a),bf(n,t,a)))}function _f(e,t,n){var a=Et();vl(e,t,n,a)}function vl(e,t,n,a){var r={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))yf(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var m=t.lastRenderedState,g=c(m,n);if(r.hasEagerState=!0,r.eagerState=g,_t(g,m))return ps(e,t,r,0),Oe===null&&ms(),!1}catch{}if(n=tr(e,t,r,a),n!==null)return mt(n,e,a),bf(n,t,a),!0}return!1}function qr(e,t,n,a){if(a={lane:2,revertLane:_o(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(t)throw Error(s(479))}else t=tr(e,n,a,2),t!==null&&mt(t,e,2)}function Ds(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function yf(e,t){ja=ks=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Ec(e,n)}}var Sl={readContext:et,use:Os,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};Sl.useEffectEvent=Le;var xf={readContext:et,use:Os,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:nf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Rs(4194308,4,rf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){Rs(4,2,e,t)},useMemo:function(e,t){var n=st();t=t===void 0?null:t;var a=e();if(Wn){fn(!0);try{e()}finally{fn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=st();if(n!==void 0){var r=n(t);if(Wn){fn(!0);try{n(t)}finally{fn(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=og.bind(null,ue,e),[a.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:function(e){e=Cr(e);var t=e.queue,n=_f.bind(null,ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Dr,useDeferredValue:function(e,t){var n=st();return zr(n,e,t)},useTransition:function(){var e=Cr(!1);return e=df.bind(null,ue,e.queue,!0,!1),st().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ue,r=st();if(ye){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Oe===null)throw Error(s(349));(ge&127)!==0||Bu(a,t,n)}r.memoizedState=n;var c={value:n,getSnapshot:t};return r.queue=c,nf(Yu.bind(null,a,c,e),[e]),a.flags|=2048,Ca(9,{destroy:void 0},Gu.bind(null,a,c,n,t),null),n},useId:function(){var e=st(),t=Oe.identifierPrefix;if(ye){var n=Bt,a=Ht;n=(a&~(1<<32-gt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=As++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=tg++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Lr,useFormState:Wu,useActionState:Wu,useOptimistic:function(e){var t=st();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=qr.bind(null,ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ar,useCacheRefresh:function(){return st().memoizedState=rg.bind(null,ue)},useEffectEvent:function(e){var t=st(),n={impl:e};return t.memoizedState=n,function(){if((ve&2)!==0)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Hr={readContext:et,use:Os,useCallback:cf,useContext:et,useEffect:Mr,useImperativeHandle:of,useInsertionEffect:lf,useLayoutEffect:sf,useMemo:uf,useReducer:Cs,useRef:tf,useState:function(){return Cs(Pt)},useDebugValue:Dr,useDeferredValue:function(e,t){var n=Ye();return ff(n,ke.memoizedState,e,t)},useTransition:function(){var e=Cs(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Hu,useId:hf,useHostTransitionStatus:Lr,useFormState:Fu,useActionState:Fu,useOptimistic:function(e,t){var n=Ye();return Xu(n,ke,e,t)},useMemoCache:Ar,useCacheRefresh:gf};Hr.useEffectEvent=af;var vf={readContext:et,use:Os,useCallback:cf,useContext:et,useEffect:Mr,useImperativeHandle:of,useInsertionEffect:lf,useLayoutEffect:sf,useMemo:uf,useReducer:Or,useRef:tf,useState:function(){return Or(Pt)},useDebugValue:Dr,useDeferredValue:function(e,t){var n=Ye();return ke===null?zr(n,e,t):ff(n,ke.memoizedState,e,t)},useTransition:function(){var e=Or(Pt)[0],t=Ye().memoizedState;return[typeof e=="boolean"?e:xl(e),t]},useSyncExternalStore:Hu,useId:hf,useHostTransitionStatus:Lr,useFormState:ef,useActionState:ef,useOptimistic:function(e,t){var n=Ye();return ke!==null?Xu(n,ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ar,useCacheRefresh:gf};vf.useEffectEvent=af;function Br(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gr={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Et(),r=bn(a);r.payload=t,n!=null&&(r.callback=n),t=xn(e,r,a),t!==null&&(mt(t,e,a),gl(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Et(),r=bn(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=xn(e,r,a),t!==null&&(mt(t,e,a),gl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),a=bn(n);a.tag=2,t!=null&&(a.callback=t),t=xn(e,a,n),t!==null&&(mt(t,e,n),gl(t,e,n))}};function Sf(e,t,n,a,r,c,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,m):t.prototype&&t.prototype.isPureReactComponent?!ol(n,a)||!ol(r,c):!0}function Ef(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Gr.enqueueReplaceState(t,t.state,null)}function Fn(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function Tf(e){ds(e)}function Nf(e){console.error(e)}function wf(e){ds(e)}function zs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function kf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Yr(e,t,n){return n=bn(n),n.tag=3,n.payload={element:null},n.callback=function(){zs(e,t)},n}function Af(e){return e=bn(e),e.tag=3,e}function jf(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var c=a.value;e.payload=function(){return r(c)},e.callback=function(){kf(t,n,a)}}var m=n.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){kf(t,n,a),typeof r!="function"&&(wn===null?wn=new Set([this]):wn.add(this));var g=a.stack;this.componentDidCatch(a.value,{componentStack:g!==null?g:""})})}function cg(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ea(t,n,r,!0),n=bt.current,n!==null){switch(n.tag){case 31:case 13:return Mt===null?Is():n.alternate===null&&qe===0&&(qe=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Ss?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),po(e,a,r)),!1;case 22:return n.flags|=65536,a===Ss?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),po(e,a,r)),!1}throw Error(s(435,n.tag))}return po(e,a,r),Is(),!1}if(ye)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==rr&&(e=Error(s(422),{cause:a}),fl(jt(e,n)))):(a!==rr&&(t=Error(s(423),{cause:a}),fl(jt(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=jt(a,n),r=Yr(e.stateNode,a,r),yr(e,r),qe!==4&&(qe=2)),!1;var c=Error(s(520),{cause:a});if(c=jt(c,n),Ol===null?Ol=[c]:Ol.push(c),qe!==4&&(qe=2),t===null)return!0;a=jt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Yr(n.stateNode,a,e),yr(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(wn===null||!wn.has(c))))return n.flags|=65536,r&=-r,n.lanes|=r,r=Af(r),jf(r,e,n,a),yr(n,r),!1}n=n.return}while(n!==null);return!1}var Qr=Error(s(461)),Ke=!1;function tt(e,t,n,a){t.child=e===null?Ru(t,null,n,a):Jn(t,e.child,n,a)}function Of(e,t,n,a,r){n=n.render;var c=t.ref;if("ref"in a){var m={};for(var g in a)g!=="ref"&&(m[g]=a[g])}else m=a;return Kn(t),a=Tr(e,t,n,m,c,r),g=Nr(),e!==null&&!Ke?(wr(e,t,r),en(e,t,r)):(ye&&g&&sr(t),t.flags|=1,tt(e,t,a,r),t.child)}function Cf(e,t,n,a,r){if(e===null){var c=n.type;return typeof c=="function"&&!nr(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,Rf(e,t,c,a,r)):(e=gs(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Wr(e,r)){var m=c.memoizedProps;if(n=n.compare,n=n!==null?n:ol,n(m,a)&&e.ref===t.ref)return en(e,t,r)}return t.flags|=1,e=$t(c,a),e.ref=t.ref,e.return=t,t.child=e}function Rf(e,t,n,a,r){if(e!==null){var c=e.memoizedProps;if(ol(c,a)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=a=c,Wr(e,r))(e.flags&131072)!==0&&(Ke=!0);else return t.lanes=e.lanes,en(e,t,r)}return Vr(e,t,n,a,r)}function Mf(e,t,n,a){var r=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(a=t.child=e.child,r=0;a!==null;)r=r|a.lanes|a.childLanes,a=a.sibling;a=r&~c}else a=0,t.child=null;return Df(e,t,c,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xs(t,c!==null?c.cachePool:null),c!==null?zu(t,c):xr(),Uu(t);else return a=t.lanes=536870912,Df(e,t,c!==null?c.baseLanes|n:n,n,a)}else c!==null?(xs(t,c.cachePool),zu(t,c),Sn(),t.memoizedState=null):(e!==null&&xs(t,null),xr(),Sn());return tt(e,t,r,n),t.child}function El(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Df(e,t,n,a,r){var c=pr();return c=c===null?null:{parent:Ve._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&xs(t,null),xr(),Uu(t),e!==null&&Ea(e,t,a,!0),t.childLanes=r,null}function Us(e,t){return t=qs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function zf(e,t,n){return Jn(t,e.child,null,n),e=Us(t,t.pendingProps),e.flags|=2,xt(t),t.memoizedState=null,e}function ug(e,t,n){var a=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(a.mode==="hidden")return e=Us(t,a),t.lanes=536870912,El(null,e);if(Sr(t),(e=Me)?(e=Id(e,Rt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},n=_u(e),n.return=t,t.child=n,Pe=t,Me=null)):e=null,e===null)throw gn(t);return t.lanes=536870912,null}return Us(t,a)}var c=e.memoizedState;if(c!==null){var m=c.dehydrated;if(Sr(t),r)if(t.flags&256)t.flags&=-257,t=zf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Ke||Ea(e,t,n,!1),r=(n&e.childLanes)!==0,Ke||r){if(a=Oe,a!==null&&(m=Tc(a,n),m!==0&&m!==c.retryLane))throw c.retryLane=m,Yn(e,m),mt(a,e,m),Qr;Is(),t=zf(e,t,n)}else e=c.treeContext,Me=Dt(m.nextSibling),Pe=t,ye=!0,hn=null,Rt=!1,e!==null&&xu(t,e),t=Us(t,a),t.flags|=4096;return t}return e=$t(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ls(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Vr(e,t,n,a,r){return Kn(t),n=Tr(e,t,n,a,void 0,r),a=Nr(),e!==null&&!Ke?(wr(e,t,r),en(e,t,r)):(ye&&a&&sr(t),t.flags|=1,tt(e,t,n,r),t.child)}function Uf(e,t,n,a,r,c){return Kn(t),t.updateQueue=null,n=qu(t,a,n,r),Lu(e),a=Nr(),e!==null&&!Ke?(wr(e,t,c),en(e,t,c)):(ye&&a&&sr(t),t.flags|=1,tt(e,t,n,c),t.child)}function Lf(e,t,n,a,r){if(Kn(t),t.stateNode===null){var c=ba,m=n.contextType;typeof m=="object"&&m!==null&&(c=et(m)),c=new n(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Gr,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},gr(t),m=n.contextType,c.context=typeof m=="object"&&m!==null?et(m):ba,c.state=t.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(Br(t,n,m,a),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(m=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),m!==c.state&&Gr.enqueueReplaceState(c,c.state,null),yl(t,a,c,r),_l(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var g=t.memoizedProps,x=Fn(n,g);c.props=x;var k=c.context,O=n.contextType;m=ba,typeof O=="object"&&O!==null&&(m=et(O));var U=n.getDerivedStateFromProps;O=typeof U=="function"||typeof c.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,O||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(g||k!==m)&&Ef(t,c,a,m),yn=!1;var A=t.memoizedState;c.state=A,yl(t,a,c,r),_l(),k=t.memoizedState,g||A!==k||yn?(typeof U=="function"&&(Br(t,n,U,a),k=t.memoizedState),(x=yn||Sf(t,n,x,a,A,k,m))?(O||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=k),c.props=a,c.state=k,c.context=m,a=x):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,_r(e,t),m=t.memoizedProps,O=Fn(n,m),c.props=O,U=t.pendingProps,A=c.context,k=n.contextType,x=ba,typeof k=="object"&&k!==null&&(x=et(k)),g=n.getDerivedStateFromProps,(k=typeof g=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m!==U||A!==x)&&Ef(t,c,a,x),yn=!1,A=t.memoizedState,c.state=A,yl(t,a,c,r),_l();var j=t.memoizedState;m!==U||A!==j||yn||e!==null&&e.dependencies!==null&&ys(e.dependencies)?(typeof g=="function"&&(Br(t,n,g,a),j=t.memoizedState),(O=yn||Sf(t,n,O,a,A,j,x)||e!==null&&e.dependencies!==null&&ys(e.dependencies))?(k||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,j,x),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,j,x)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=j),c.props=a,c.state=j,c.context=x,a=O):(typeof c.componentDidUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,Ls(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=Jn(t,e.child,null,r),t.child=Jn(t,null,n,r)):tt(e,t,n,r),t.memoizedState=c.state,e=t.child):e=en(e,t,r),e}function qf(e,t,n,a){return Vn(),t.flags|=256,tt(e,t,n,a),t.child}var Xr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kr(e){return{baseLanes:e,cachePool:wu()}}function Ir(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=St),e}function Hf(e,t,n){var a=t.pendingProps,r=!1,c=(t.flags&128)!==0,m;if((m=c)||(m=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(r?vn(t):Sn(),(e=Me)?(e=Id(e,Rt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:Ht,overflow:Bt}:null,retryLane:536870912,hydrationErrors:null},n=_u(e),n.return=t,t.child=n,Pe=t,Me=null)):e=null,e===null)throw gn(t);return Oo(e)?t.lanes=32:t.lanes=536870912,null}var g=a.children;return a=a.fallback,r?(Sn(),r=t.mode,g=qs({mode:"hidden",children:g},r),a=Qn(a,r,n,null),g.return=t,a.return=t,g.sibling=a,t.child=g,a=t.child,a.memoizedState=Kr(n),a.childLanes=Ir(e,m,n),t.memoizedState=Xr,El(null,a)):(vn(t),$r(t,g))}var x=e.memoizedState;if(x!==null&&(g=x.dehydrated,g!==null)){if(c)t.flags&256?(vn(t),t.flags&=-257,t=Zr(e,t,n)):t.memoizedState!==null?(Sn(),t.child=e.child,t.flags|=128,t=null):(Sn(),g=a.fallback,r=t.mode,a=qs({mode:"visible",children:a.children},r),g=Qn(g,r,n,null),g.flags|=2,a.return=t,g.return=t,a.sibling=g,t.child=a,Jn(t,e.child,null,n),a=t.child,a.memoizedState=Kr(n),a.childLanes=Ir(e,m,n),t.memoizedState=Xr,t=El(null,a));else if(vn(t),Oo(g)){if(m=g.nextSibling&&g.nextSibling.dataset,m)var k=m.dgst;m=k,a=Error(s(419)),a.stack="",a.digest=m,fl({value:a,source:null,stack:null}),t=Zr(e,t,n)}else if(Ke||Ea(e,t,n,!1),m=(n&e.childLanes)!==0,Ke||m){if(m=Oe,m!==null&&(a=Tc(m,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,Yn(e,a),mt(m,e,a),Qr;jo(g)||Is(),t=Zr(e,t,n)}else jo(g)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Me=Dt(g.nextSibling),Pe=t,ye=!0,hn=null,Rt=!1,e!==null&&xu(t,e),t=$r(t,a.children),t.flags|=4096);return t}return r?(Sn(),g=a.fallback,r=t.mode,x=e.child,k=x.sibling,a=$t(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,k!==null?g=$t(k,g):(g=Qn(g,r,n,null),g.flags|=2),g.return=t,a.return=t,a.sibling=g,t.child=a,El(null,a),a=t.child,g=e.child.memoizedState,g===null?g=Kr(n):(r=g.cachePool,r!==null?(x=Ve._currentValue,r=r.parent!==x?{parent:x,pool:x}:r):r=wu(),g={baseLanes:g.baseLanes|n,cachePool:r}),a.memoizedState=g,a.childLanes=Ir(e,m,n),t.memoizedState=Xr,El(e.child,a)):(vn(t),n=e.child,e=n.sibling,n=$t(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=n,t.memoizedState=null,n)}function $r(e,t){return t=qs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function qs(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Zr(e,t,n){return Jn(t,e.child,null,n),e=$r(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ur(e.return,t,n)}function Jr(e,t,n,a,r,c){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r,treeForkCount:c}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=a,m.tail=n,m.tailMode=r,m.treeForkCount=c)}function Gf(e,t,n){var a=t.pendingProps,r=a.revealOrder,c=a.tail;a=a.children;var m=Ge.current,g=(m&2)!==0;if(g?(m=m&1|2,t.flags|=128):m&=1,$(Ge,m),tt(e,t,a,n),a=ye?ul:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bf(e,n,t);else if(e.tag===19)Bf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&ws(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Jr(t,!1,r,n,c,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ws(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Jr(t,!0,n,null,c,a);break;case"together":Jr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function en(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Nn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=$t(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=$t(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Wr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ys(e)))}function fg(e,t,n){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),_n(t,Ve,e.memoizedState.cache),Vn();break;case 27:case 5:Za(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:_n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sr(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(vn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Hf(e,t,n):(vn(t),e=en(e,t,n),e!==null?e.sibling:null);vn(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ea(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return Gf(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),$(Ge,Ge.current),a)break;return null;case 22:return t.lanes=0,Mf(e,t,n,t.pendingProps);case 24:_n(t,Ve,e.memoizedState.cache)}return en(e,t,n)}function Yf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ke=!0;else{if(!Wr(e,n)&&(t.flags&128)===0)return Ke=!1,fg(e,t,n);Ke=(e.flags&131072)!==0}else Ke=!1,ye&&(t.flags&1048576)!==0&&bu(t,ul,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=$n(t.elementType),t.type=e,typeof e=="function")nr(e)?(a=Fn(e,a),t.tag=1,t=Lf(null,t,e,a,n)):(t.tag=0,t=Vr(null,t,e,a,n));else{if(e!=null){var r=e.$$typeof;if(r===I){t.tag=11,t=Of(null,t,e,a,n);break e}else if(r===Z){t.tag=14,t=Cf(null,t,e,a,n);break e}}throw t=ze(e)||e,Error(s(306,t,""))}}return t;case 0:return Vr(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Fn(a,t.pendingProps),Lf(e,t,a,r,n);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(s(387));a=t.pendingProps;var c=t.memoizedState;r=c.element,_r(e,t),yl(t,a,null,n);var m=t.memoizedState;if(a=m.cache,_n(t,Ve,a),a!==c.cache&&fr(t,[Ve],n,!0),_l(),a=m.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=qf(e,t,a,n);break e}else if(a!==r){r=jt(Error(s(424)),t),fl(r),t=qf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Me=Dt(e.firstChild),Pe=t,ye=!0,hn=null,Rt=!0,n=Ru(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),a===r){t=en(e,t,n);break e}tt(e,t,a,n)}t=t.child}return t;case 26:return Ls(e,t),e===null?(n=Pd(t.type,null,t.pendingProps,null))?t.memoizedState=n:ye||(n=t.type,e=t.pendingProps,a=ei(me.current).createElement(n),a[Fe]=t,a[rt]=e,nt(a,n,e),Ze(a),t.stateNode=a):t.memoizedState=Pd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Za(t),e===null&&ye&&(a=t.stateNode=Jd(t.type,t.pendingProps,me.current),Pe=t,Rt=!0,r=Me,On(t.type)?(Co=r,Me=Dt(a.firstChild)):Me=r),tt(e,t,t.pendingProps.children,n),Ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((r=a=Me)&&(a=Gg(a,t.type,t.pendingProps,Rt),a!==null?(t.stateNode=a,Pe=t,Me=Dt(a.firstChild),Rt=!1,r=!0):r=!1),r||gn(t)),Za(t),r=t.type,c=t.pendingProps,m=e!==null?e.memoizedProps:null,a=c.children,wo(r,c)?a=null:m!==null&&wo(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=Tr(e,t,ng,null,null,n),ql._currentValue=r),Ls(e,t),tt(e,t,a,n),t.child;case 6:return e===null&&ye&&((e=n=Me)&&(n=Yg(n,t.pendingProps,Rt),n!==null?(t.stateNode=n,Pe=t,Me=null,e=!0):e=!1),e||gn(t)),null;case 13:return Hf(e,t,n);case 4:return lt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Jn(t,null,a,n):tt(e,t,a,n),t.child;case 11:return Of(e,t,t.type,t.pendingProps,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,_n(t,t.type,a.value),tt(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,Kn(t),r=et(r),a=a(r),t.flags|=1,tt(e,t,a,n),t.child;case 14:return Cf(e,t,t.type,t.pendingProps,n);case 15:return Rf(e,t,t.type,t.pendingProps,n);case 19:return Gf(e,t,n);case 31:return ug(e,t,n);case 22:return Mf(e,t,n,t.pendingProps);case 24:return Kn(t),a=et(Ve),e===null?(r=pr(),r===null&&(r=Oe,c=dr(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=n),r=c),t.memoizedState={parent:a,cache:r},gr(t),_n(t,Ve,r)):((e.lanes&n)!==0&&(_r(e,t),yl(t,null,null,n),_l()),r=e.memoizedState,c=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),_n(t,Ve,a)):(a=c.cache,_n(t,Ve,a),a!==r.cache&&fr(t,[Ve],n,!0))),tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function tn(e){e.flags|=4}function Fr(e,t,n,a,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(hd())e.flags|=8192;else throw Zn=Ss,hr}else e.flags&=-16777217}function Qf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!lm(t))if(hd())e.flags|=8192;else throw Zn=Ss,hr}function Hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vc():536870912,e.lanes|=t,za|=t)}function Tl(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function De(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function dg(e,t,n){var a=t.pendingProps;switch(ir(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return De(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wt(Ve),Be(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sa(t)?tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,or())),De(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(tn(t),c!==null?(De(t),Qf(t,c)):(De(t),Fr(t,r,null,a,n))):c?c!==e.memoizedState?(tn(t),De(t),Qf(t,c)):(De(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&tn(t),De(t),Fr(t,r,e,a,n)),null;case 27:if(Jl(t),n=me.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return De(t),null}e=F.current,Sa(t)?vu(t):(e=Jd(r,a,n),t.stateNode=e,tn(t))}return De(t),null;case 5:if(Jl(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return De(t),null}if(c=F.current,Sa(t))vu(t);else{var m=ei(me.current);switch(c){case 1:c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=m.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?m.createElement("select",{is:a.is}):m.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?m.createElement(r,{is:a.is}):m.createElement(r)}}c[Fe]=t,c[rt]=a;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)c.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=c;e:switch(nt(c,r,a),r){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&tn(t)}}return De(t),Fr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&tn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(e=me.current,Sa(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Pe,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Hd(e.nodeValue,n)),e||gn(t,!0)}else e=ei(e).createTextNode(a),e[Fe]=t,t.stateNode=e}return De(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Sa(t),n!==null){if(e===null){if(!a)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Fe]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),e=!1}else n=or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(xt(t),t):(xt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return De(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Sa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(s(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(s(317));r[Fe]=t}else Vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;De(t),r=!1}else r=or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(xt(t),t):(xt(t),null)}return xt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hs(t,t.updateQueue),De(t),null);case 4:return Be(),e===null&&vo(t.stateNode.containerInfo),De(t),null;case 10:return Wt(t.type),De(t),null;case 19:if(z(Ge),a=t.memoizedState,a===null)return De(t),null;if(r=(t.flags&128)!==0,c=a.rendering,c===null)if(r)Tl(a,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=ws(e),c!==null){for(t.flags|=128,Tl(a,!1),e=c.updateQueue,t.updateQueue=e,Hs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)gu(n,e),n=n.sibling;return $(Ge,Ge.current&1|2),ye&&Zt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&pt()>Vs&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304)}else{if(!r)if(e=ws(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Hs(t,e),Tl(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!ye)return De(t),null}else 2*pt()-a.renderingStartTime>Vs&&n!==536870912&&(t.flags|=128,r=!0,Tl(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=pt(),e.sibling=null,n=Ge.current,$(Ge,r?n&1|2:n&1),ye&&Zt(t,a.treeForkCount),e):(De(t),null);case 22:case 23:return xt(t),vr(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),n=t.updateQueue,n!==null&&Hs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&z(In),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wt(Ve),De(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function mg(e,t){switch(ir(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wt(Ve),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jl(t),null;case 31:if(t.memoizedState!==null){if(xt(t),t.alternate===null)throw Error(s(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(Ge),null;case 4:return Be(),null;case 10:return Wt(t.type),null;case 22:case 23:return xt(t),vr(),e!==null&&z(In),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wt(Ve),null;case 25:return null;default:return null}}function Vf(e,t){switch(ir(t),t.tag){case 3:Wt(Ve),Be();break;case 26:case 27:case 5:Jl(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&xt(t);break;case 13:xt(t);break;case 19:z(Ge);break;case 10:Wt(t.type);break;case 22:case 23:xt(t),vr(),e!==null&&z(In);break;case 24:Wt(Ve)}}function Nl(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var c=n.create,m=n.inst;a=c(),m.destroy=a}n=n.next}while(n!==r)}}catch(g){Ne(t,t.return,g)}}function En(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var c=r.next;a=c;do{if((a.tag&e)===e){var m=a.inst,g=m.destroy;if(g!==void 0){m.destroy=void 0,r=t;var x=n,k=g;try{k()}catch(O){Ne(r,x,O)}}}a=a.next}while(a!==c)}}catch(O){Ne(t,t.return,O)}}function Xf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Du(t,n)}catch(a){Ne(e,e.return,a)}}}function Kf(e,t,n){n.props=Fn(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ne(e,t,a)}}function wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){Ne(e,t,r)}}function Gt(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){Ne(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function If(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){Ne(e,e.return,r)}}function Pr(e,t,n){try{var a=e.stateNode;zg(a,e.type,n,t),a[rt]=t}catch(r){Ne(e,e.return,r)}}function $f(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&On(e.type)||e.tag===4}function eo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$f(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&&On(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 to(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(a!==4&&(a===27&&On(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(to(e,t,n),e=e.sibling;e!==null;)to(e,t,n),e=e.sibling}function Bs(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&On(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bs(e,t,n),e=e.sibling;e!==null;)Bs(e,t,n),e=e.sibling}function Zf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);nt(t,a,n),t[Fe]=e,t[rt]=n}catch(c){Ne(e,e.return,c)}}var nn=!1,Ie=!1,no=!1,Jf=typeof WeakSet=="function"?WeakSet:Set,Je=null;function pg(e,t){if(e=e.containerInfo,To=ri,e=ru(e),Zi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var m=0,g=-1,x=-1,k=0,O=0,U=e,A=null;t:for(;;){for(var j;U!==n||r!==0&&U.nodeType!==3||(g=m+r),U!==c||a!==0&&U.nodeType!==3||(x=m+a),U.nodeType===3&&(m+=U.nodeValue.length),(j=U.firstChild)!==null;)A=U,U=j;for(;;){if(U===e)break t;if(A===n&&++k===r&&(g=m),A===c&&++O===a&&(x=m),(j=U.nextSibling)!==null)break;U=A,A=U.parentNode}U=j}n=g===-1||x===-1?null:{start:g,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(No={focusedElem:e,selectionRange:n},ri=!1,Je=t;Je!==null;)if(t=Je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Je=e;else for(;Je!==null;){switch(t=Je,c=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(n=0;n<e.length;n++)r=e[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,r=c.memoizedProps,c=c.memoizedState,a=n.stateNode;try{var J=Fn(n.type,r);e=a.getSnapshotBeforeUpdate(J,c),a.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ne(n,n.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Ao(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ao(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Je=e;break}Je=t.return}}function Wf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ln(e,n),a&4&&Nl(5,n);break;case 1:if(ln(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(m){Ne(n,n.return,m)}else{var r=Fn(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){Ne(n,n.return,m)}}a&64&&Xf(n),a&512&&wl(n,n.return);break;case 3:if(ln(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Du(e,t)}catch(m){Ne(n,n.return,m)}}break;case 27:t===null&&a&4&&Zf(n);case 26:case 5:ln(e,n),t===null&&a&4&&If(n),a&512&&wl(n,n.return);break;case 12:ln(e,n);break;case 31:ln(e,n),a&4&&ed(e,n);break;case 13:ln(e,n),a&4&&td(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Eg.bind(null,n),Qg(e,n))));break;case 22:if(a=n.memoizedState!==null||nn,!a){t=t!==null&&t.memoizedState!==null||Ie,r=nn;var c=Ie;nn=a,(Ie=t)&&!c?sn(e,n,(n.subtreeFlags&8772)!==0):ln(e,n),nn=r,Ie=c}break;case 30:break;default:ln(e,n)}}function Ff(e){var t=e.alternate;t!==null&&(e.alternate=null,Ff(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ri(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 Ue=null,ct=!1;function an(e,t,n){for(n=n.child;n!==null;)Pf(e,t,n),n=n.sibling}function Pf(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ja,n)}catch{}switch(n.tag){case 26:Ie||Gt(n,t),an(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ie||Gt(n,t);var a=Ue,r=ct;On(n.type)&&(Ue=n.stateNode,ct=!1),an(e,t,n),zl(n.stateNode),Ue=a,ct=r;break;case 5:Ie||Gt(n,t);case 6:if(a=Ue,r=ct,Ue=null,an(e,t,n),Ue=a,ct=r,Ue!==null)if(ct)try{(Ue.nodeType===9?Ue.body:Ue.nodeName==="HTML"?Ue.ownerDocument.body:Ue).removeChild(n.stateNode)}catch(c){Ne(n,t,c)}else try{Ue.removeChild(n.stateNode)}catch(c){Ne(n,t,c)}break;case 18:Ue!==null&&(ct?(e=Ue,Xd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Qa(e)):Xd(Ue,n.stateNode));break;case 4:a=Ue,r=ct,Ue=n.stateNode.containerInfo,ct=!0,an(e,t,n),Ue=a,ct=r;break;case 0:case 11:case 14:case 15:En(2,n,t),Ie||En(4,n,t),an(e,t,n);break;case 1:Ie||(Gt(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Kf(n,t,a)),an(e,t,n);break;case 21:an(e,t,n);break;case 22:Ie=(a=Ie)||n.memoizedState!==null,an(e,t,n),Ie=a;break;default:an(e,t,n)}}function ed(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qa(e)}catch(n){Ne(t,t.return,n)}}}function td(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qa(e)}catch(n){Ne(t,t.return,n)}}function hg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jf),t;default:throw Error(s(435,e.tag))}}function Gs(e,t){var n=hg(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var r=Tg.bind(null,e,a);a.then(r,r)}})}function ut(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],c=e,m=t,g=m;e:for(;g!==null;){switch(g.tag){case 27:if(On(g.type)){Ue=g.stateNode,ct=!1;break e}break;case 5:Ue=g.stateNode,ct=!1;break e;case 3:case 4:Ue=g.stateNode.containerInfo,ct=!0;break e}g=g.return}if(Ue===null)throw Error(s(160));Pf(c,m,r),Ue=null,ct=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)nd(t,e),t=t.sibling}var Lt=null;function nd(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ut(t,e),ft(e),a&4&&(En(3,e,e.return),Nl(3,e),En(5,e,e.return));break;case 1:ut(t,e),ft(e),a&512&&(Ie||n===null||Gt(n,n.return)),a&64&&nn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=Lt;if(ut(t,e),ft(e),a&512&&(Ie||n===null||Gt(n,n.return)),a&4){var c=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":c=r.getElementsByTagName("title")[0],(!c||c[Pa]||c[Fe]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(a),r.head.insertBefore(c,r.querySelector("head > title"))),nt(c,a,n),c[Fe]=e,Ze(c),a=c;break e;case"link":var m=nm("link","href",r).get(a+(n.href||""));if(m){for(var g=0;g<m.length;g++)if(c=m[g],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){m.splice(g,1);break t}}c=r.createElement(a),nt(c,a,n),r.head.appendChild(c);break;case"meta":if(m=nm("meta","content",r).get(a+(n.content||""))){for(g=0;g<m.length;g++)if(c=m[g],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){m.splice(g,1);break t}}c=r.createElement(a),nt(c,a,n),r.head.appendChild(c);break;default:throw Error(s(468,a))}c[Fe]=e,Ze(c),a=c}e.stateNode=a}else am(r,e.type,e.stateNode);else e.stateNode=tm(r,a,e.memoizedProps);else c!==a?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,a===null?am(r,e.type,e.stateNode):tm(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Pr(e,e.memoizedProps,n.memoizedProps)}break;case 27:ut(t,e),ft(e),a&512&&(Ie||n===null||Gt(n,n.return)),n!==null&&a&4&&Pr(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ut(t,e),ft(e),a&512&&(Ie||n===null||Gt(n,n.return)),e.flags&32){r=e.stateNode;try{da(r,"")}catch(J){Ne(e,e.return,J)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Pr(e,r,n!==null?n.memoizedProps:r)),a&1024&&(no=!0);break;case 6:if(ut(t,e),ft(e),a&4){if(e.stateNode===null)throw Error(s(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(J){Ne(e,e.return,J)}}break;case 3:if(ai=null,r=Lt,Lt=ti(t.containerInfo),ut(t,e),Lt=r,ft(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Qa(t.containerInfo)}catch(J){Ne(e,e.return,J)}no&&(no=!1,ad(e));break;case 4:a=Lt,Lt=ti(e.stateNode.containerInfo),ut(t,e),ft(e),Lt=a;break;case 12:ut(t,e),ft(e);break;case 31:ut(t,e),ft(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Gs(e,a)));break;case 13:ut(t,e),ft(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Qs=pt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Gs(e,a)));break;case 22:r=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,k=nn,O=Ie;if(nn=k||r,Ie=O||x,ut(t,e),Ie=O,nn=k,ft(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||x||nn||Ie||Pn(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(c=x.stateNode,r)m=c.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{g=x.stateNode;var U=x.memoizedProps.style,A=U!=null&&U.hasOwnProperty("display")?U.display:null;g.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(J){Ne(x,x.return,J)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=r?"":x.memoizedProps}catch(J){Ne(x,x.return,J)}}}else if(t.tag===18){if(n===null){x=t;try{var j=x.stateNode;r?Kd(j,!0):Kd(x.stateNode,!1)}catch(J){Ne(x,x.return,J)}}}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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Gs(e,n))));break;case 19:ut(t,e),ft(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Gs(e,a)));break;case 30:break;case 21:break;default:ut(t,e),ft(e)}}function ft(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if($f(a)){n=a;break}a=a.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var r=n.stateNode,c=eo(e);Bs(e,c,r);break;case 5:var m=n.stateNode;n.flags&32&&(da(m,""),n.flags&=-33);var g=eo(e);Bs(e,g,m);break;case 3:case 4:var x=n.stateNode.containerInfo,k=eo(e);to(e,k,x);break;default:throw Error(s(161))}}catch(O){Ne(e,e.return,O)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ad(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ad(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wf(e,t.alternate,t),t=t.sibling}function Pn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:En(4,t,t.return),Pn(t);break;case 1:Gt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Kf(t,t.return,n),Pn(t);break;case 27:zl(t.stateNode);case 26:case 5:Gt(t,t.return),Pn(t);break;case 22:t.memoizedState===null&&Pn(t);break;case 30:Pn(t);break;default:Pn(t)}e=e.sibling}}function sn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,c=t,m=c.flags;switch(c.tag){case 0:case 11:case 15:sn(r,c,n),Nl(4,c);break;case 1:if(sn(r,c,n),a=c,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(k){Ne(a,a.return,k)}if(a=c,r=a.updateQueue,r!==null){var g=a.stateNode;try{var x=r.shared.hiddenCallbacks;if(x!==null)for(r.shared.hiddenCallbacks=null,r=0;r<x.length;r++)Mu(x[r],g)}catch(k){Ne(a,a.return,k)}}n&&m&64&&Xf(c),wl(c,c.return);break;case 27:Zf(c);case 26:case 5:sn(r,c,n),n&&a===null&&m&4&&If(c),wl(c,c.return);break;case 12:sn(r,c,n);break;case 31:sn(r,c,n),n&&m&4&&ed(r,c);break;case 13:sn(r,c,n),n&&m&4&&td(r,c);break;case 22:c.memoizedState===null&&sn(r,c,n),wl(c,c.return);break;case 30:break;default:sn(r,c,n)}t=t.sibling}}function ao(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&dl(n))}function lo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e))}function qt(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ld(e,t,n,a),t=t.sibling}function ld(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:qt(e,t,n,a),r&2048&&Nl(9,t);break;case 1:qt(e,t,n,a);break;case 3:qt(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&dl(e)));break;case 12:if(r&2048){qt(e,t,n,a),e=t.stateNode;try{var c=t.memoizedProps,m=c.id,g=c.onPostCommit;typeof g=="function"&&g(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ne(t,t.return,x)}}else qt(e,t,n,a);break;case 31:qt(e,t,n,a);break;case 13:qt(e,t,n,a);break;case 23:break;case 22:c=t.stateNode,m=t.alternate,t.memoizedState!==null?c._visibility&2?qt(e,t,n,a):kl(e,t):c._visibility&2?qt(e,t,n,a):(c._visibility|=2,Ra(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),r&2048&&ao(m,t);break;case 24:qt(e,t,n,a),r&2048&&lo(t.alternate,t);break;default:qt(e,t,n,a)}}function Ra(e,t,n,a,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,m=t,g=n,x=a,k=m.flags;switch(m.tag){case 0:case 11:case 15:Ra(c,m,g,x,r),Nl(8,m);break;case 23:break;case 22:var O=m.stateNode;m.memoizedState!==null?O._visibility&2?Ra(c,m,g,x,r):kl(c,m):(O._visibility|=2,Ra(c,m,g,x,r)),r&&k&2048&&ao(m.alternate,m);break;case 24:Ra(c,m,g,x,r),r&&k&2048&&lo(m.alternate,m);break;default:Ra(c,m,g,x,r)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:kl(n,a),r&2048&&ao(a.alternate,a);break;case 24:kl(n,a),r&2048&&lo(a.alternate,a);break;default:kl(n,a)}t=t.sibling}}var Al=8192;function Ma(e,t,n){if(e.subtreeFlags&Al)for(e=e.child;e!==null;)sd(e,t,n),e=e.sibling}function sd(e,t,n){switch(e.tag){case 26:Ma(e,t,n),e.flags&Al&&e.memoizedState!==null&&t_(n,Lt,e.memoizedState,e.memoizedProps);break;case 5:Ma(e,t,n);break;case 3:case 4:var a=Lt;Lt=ti(e.stateNode.containerInfo),Ma(e,t,n),Lt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Al,Al=16777216,Ma(e,t,n),Al=a):Ma(e,t,n));break;default:Ma(e,t,n)}}function id(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 jl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Je=a,od(a,e)}id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)rd(e),e=e.sibling}function rd(e){switch(e.tag){case 0:case 11:case 15:jl(e),e.flags&2048&&En(9,e,e.return);break;case 3:jl(e);break;case 12:jl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ys(e)):jl(e);break;default:jl(e)}}function Ys(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Je=a,od(a,e)}id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:En(8,t,t.return),Ys(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ys(t));break;default:Ys(t)}e=e.sibling}}function od(e,t){for(;Je!==null;){var n=Je;switch(n.tag){case 0:case 11:case 15:En(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:dl(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Je=a;else e:for(n=e;Je!==null;){a=Je;var r=a.sibling,c=a.return;if(Ff(a),a===n){Je=null;break e}if(r!==null){r.return=c,Je=r;break e}Je=c}}}var gg={getCacheForType:function(e){var t=et(Ve),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return et(Ve).controller.signal}},_g=typeof WeakMap=="function"?WeakMap:Map,ve=0,Oe=null,pe=null,ge=0,Te=0,vt=null,Tn=!1,Da=!1,so=!1,rn=0,qe=0,Nn=0,ea=0,io=0,St=0,za=0,Ol=null,dt=null,ro=!1,Qs=0,cd=0,Vs=1/0,Xs=null,wn=null,$e=0,kn=null,Ua=null,on=0,oo=0,co=null,ud=null,Cl=0,uo=null;function Et(){return(ve&2)!==0&&ge!==0?ge&-ge:C.T!==null?_o():Nc()}function fd(){if(St===0)if((ge&536870912)===0||ye){var e=Pl;Pl<<=1,(Pl&3932160)===0&&(Pl=262144),St=e}else St=536870912;return e=bt.current,e!==null&&(e.flags|=32),St}function mt(e,t,n){(e===Oe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(La(e,0),An(e,ge,St,!1)),Fa(e,n),((ve&2)===0||e!==Oe)&&(e===Oe&&((ve&2)===0&&(ea|=n),qe===4&&An(e,ge,St,!1)),Yt(e))}function dd(e,t,n){if((ve&6)!==0)throw Error(s(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Wa(e,t),r=a?xg(e,t):mo(e,t,!0),c=a;do{if(r===0){Da&&!a&&An(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!yg(n)){r=mo(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var g=e;r=Ol;var x=g.current.memoizedState.isDehydrated;if(x&&(La(g,m).flags|=256),m=mo(g,m,!1),m!==2){if(so&&!x){g.errorRecoveryDisabledLanes|=c,ea|=c,r=4;break e}c=dt,dt=r,c!==null&&(dt===null?dt=c:dt.push.apply(dt,c))}r=m}if(c=!1,r!==2)continue}}if(r===1){La(e,0),An(e,t,0,!0);break}e:{switch(a=e,c=r,c){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:An(a,t,St,!Tn);break e;case 2:dt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(r=Qs+300-pt(),10<r)){if(An(a,t,St,!Tn),ts(a,0,!0)!==0)break e;on=t,a.timeoutHandle=Qd(md.bind(null,a,n,dt,Xs,ro,t,St,ea,za,Tn,c,"Throttled",-0,0),r);break e}md(a,n,dt,Xs,ro,t,St,ea,za,Tn,c,null,-0,0)}}break}while(!0);Yt(e)}function md(e,t,n,a,r,c,m,g,x,k,O,U,A,j){if(e.timeoutHandle=-1,U=t.subtreeFlags,U&8192||(U&16785408)===16785408){U={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},sd(t,c,U);var J=(c&62914560)===c?Qs-pt():(c&4194048)===c?cd-pt():0;if(J=n_(U,J),J!==null){on=c,e.cancelPendingCommit=J(vd.bind(null,e,t,c,n,a,r,m,g,x,O,U,null,A,j)),An(e,c,m,!k);return}}vd(e,t,c,n,a,r,m,g,x)}function yg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var r=n[a],c=r.getSnapshot;r=r.value;try{if(!_t(c(),r))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 An(e,t,n,a){t&=~io,t&=~ea,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var c=31-gt(r),m=1<<c;a[c]=-1,r&=~m}n!==0&&Sc(e,n,t)}function Ks(){return(ve&6)===0?(Rl(0),!1):!0}function fo(){if(pe!==null){if(Te===0)var e=pe.return;else e=pe,Jt=Xn=null,kr(e),ka=null,pl=0,e=pe;for(;e!==null;)Vf(e.alternate,e),e=e.return;pe=null}}function La(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qg(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),on=0,fo(),Oe=e,pe=n=$t(e.current,null),ge=t,Te=0,vt=null,Tn=!1,Da=Wa(e,t),so=!1,za=St=io=ea=Nn=qe=0,dt=Ol=null,ro=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-gt(a),c=1<<r;t|=e[r],a&=~c}return rn=t,ms(),n}function pd(e,t){ue=null,C.H=Sl,t===wa||t===vs?(t=ju(),Te=3):t===hr?(t=ju(),Te=4):Te=t===Qr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vt=t,pe===null&&(qe=1,zs(e,jt(t,e.current)))}function hd(){var e=bt.current;return e===null?!0:(ge&4194048)===ge?Mt===null:(ge&62914560)===ge||(ge&536870912)!==0?e===Mt:!1}function gd(){var e=C.H;return C.H=Sl,e===null?Sl:e}function _d(){var e=C.A;return C.A=gg,e}function Is(){qe=4,Tn||(ge&4194048)!==ge&&bt.current!==null||(Da=!0),(Nn&134217727)===0&&(ea&134217727)===0||Oe===null||An(Oe,ge,St,!1)}function mo(e,t,n){var a=ve;ve|=2;var r=gd(),c=_d();(Oe!==e||ge!==t)&&(Xs=null,La(e,t)),t=!1;var m=qe;e:do try{if(Te!==0&&pe!==null){var g=pe,x=vt;switch(Te){case 8:fo(),m=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var k=Te;if(Te=0,vt=null,qa(e,g,x,k),n&&Da){m=0;break e}break;default:k=Te,Te=0,vt=null,qa(e,g,x,k)}}bg(),m=qe;break}catch(O){pd(e,O)}while(!0);return t&&e.shellSuspendCounter++,Jt=Xn=null,ve=a,C.H=r,C.A=c,pe===null&&(Oe=null,ge=0,ms()),m}function bg(){for(;pe!==null;)yd(pe)}function xg(e,t){var n=ve;ve|=2;var a=gd(),r=_d();Oe!==e||ge!==t?(Xs=null,Vs=pt()+500,La(e,t)):Da=Wa(e,t);e:do try{if(Te!==0&&pe!==null){t=pe;var c=vt;t:switch(Te){case 1:Te=0,vt=null,qa(e,t,c,1);break;case 2:case 9:if(ku(c)){Te=0,vt=null,bd(t);break}t=function(){Te!==2&&Te!==9||Oe!==e||(Te=7),Yt(e)},c.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:ku(c)?(Te=0,vt=null,bd(t)):(Te=0,vt=null,qa(e,t,c,7));break;case 5:var m=null;switch(pe.tag){case 26:m=pe.memoizedState;case 5:case 27:var g=pe;if(m?lm(m):g.stateNode.complete){Te=0,vt=null;var x=g.sibling;if(x!==null)pe=x;else{var k=g.return;k!==null?(pe=k,$s(k)):pe=null}break t}}Te=0,vt=null,qa(e,t,c,5);break;case 6:Te=0,vt=null,qa(e,t,c,6);break;case 8:fo(),qe=6;break e;default:throw Error(s(462))}}vg();break}catch(O){pd(e,O)}while(!0);return Jt=Xn=null,C.H=a,C.A=r,ve=n,pe!==null?0:(Oe=null,ge=0,ms(),qe)}function vg(){for(;pe!==null&&!Vp();)yd(pe)}function yd(e){var t=Yf(e.alternate,e,rn);e.memoizedProps=e.pendingProps,t===null?$s(e):pe=t}function bd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uf(n,t,t.pendingProps,t.type,void 0,ge);break;case 11:t=Uf(n,t,t.pendingProps,t.type.render,t.ref,ge);break;case 5:kr(t);default:Vf(n,t),t=pe=gu(t,rn),t=Yf(n,t,rn)}e.memoizedProps=e.pendingProps,t===null?$s(e):pe=t}function qa(e,t,n,a){Jt=Xn=null,kr(t),ka=null,pl=0;var r=t.return;try{if(cg(e,r,t,n,ge)){qe=1,zs(e,jt(n,e.current)),pe=null;return}}catch(c){if(r!==null)throw pe=r,c;qe=1,zs(e,jt(n,e.current)),pe=null;return}t.flags&32768?(ye||a===1?e=!0:Da||(ge&536870912)!==0?e=!1:(Tn=e=!0,(a===2||a===9||a===3||a===6)&&(a=bt.current,a!==null&&a.tag===13&&(a.flags|=16384))),xd(t,e)):$s(t)}function $s(e){var t=e;do{if((t.flags&32768)!==0){xd(t,Tn);return}e=t.return;var n=dg(t.alternate,t,rn);if(n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);qe===0&&(qe=5)}function xd(e,t){do{var n=mg(e.alternate,e);if(n!==null){n.flags&=32767,pe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=n}while(e!==null);qe=6,pe=null}function vd(e,t,n,a,r,c,m,g,x){e.cancelPendingCommit=null;do Zs();while($e!==0);if((ve&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(c=t.lanes|t.childLanes,c|=er,eh(e,n,c,m,g,x),e===Oe&&(pe=Oe=null,ge=0),Ua=t,kn=e,on=n,oo=c,co=r,ud=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ng(Wl,function(){return wd(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=C.T,C.T=null,r=X.p,X.p=2,m=ve,ve|=4;try{pg(e,t,n)}finally{ve=m,X.p=r,C.T=a}}$e=1,Sd(),Ed(),Td()}}function Sd(){if($e===1){$e=0;var e=kn,t=Ua,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=C.T,C.T=null;var a=X.p;X.p=2;var r=ve;ve|=4;try{nd(t,e);var c=No,m=ru(e.containerInfo),g=c.focusedElem,x=c.selectionRange;if(m!==g&&g&&g.ownerDocument&&iu(g.ownerDocument.documentElement,g)){if(x!==null&&Zi(g)){var k=x.start,O=x.end;if(O===void 0&&(O=k),"selectionStart"in g)g.selectionStart=k,g.selectionEnd=Math.min(O,g.value.length);else{var U=g.ownerDocument||document,A=U&&U.defaultView||window;if(A.getSelection){var j=A.getSelection(),J=g.textContent.length,se=Math.min(x.start,J),je=x.end===void 0?se:Math.min(x.end,J);!j.extend&&se>je&&(m=je,je=se,se=m);var N=su(g,se),E=su(g,je);if(N&&E&&(j.rangeCount!==1||j.anchorNode!==N.node||j.anchorOffset!==N.offset||j.focusNode!==E.node||j.focusOffset!==E.offset)){var w=U.createRange();w.setStart(N.node,N.offset),j.removeAllRanges(),se>je?(j.addRange(w),j.extend(E.node,E.offset)):(w.setEnd(E.node,E.offset),j.addRange(w))}}}}for(U=[],j=g;j=j.parentNode;)j.nodeType===1&&U.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<U.length;g++){var D=U[g];D.element.scrollLeft=D.left,D.element.scrollTop=D.top}}ri=!!To,No=To=null}finally{ve=r,X.p=a,C.T=n}}e.current=t,$e=2}}function Ed(){if($e===2){$e=0;var e=kn,t=Ua,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=C.T,C.T=null;var a=X.p;X.p=2;var r=ve;ve|=4;try{Wf(e,t.alternate,t)}finally{ve=r,X.p=a,C.T=n}}$e=3}}function Td(){if($e===4||$e===3){$e=0,Xp();var e=kn,t=Ua,n=on,a=ud;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$e=5:($e=0,Ua=kn=null,Nd(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(wn=null),Oi(n),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ja,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=C.T,r=X.p,X.p=2,C.T=null;try{for(var c=e.onRecoverableError,m=0;m<a.length;m++){var g=a[m];c(g.value,{componentStack:g.stack})}}finally{C.T=t,X.p=r}}(on&3)!==0&&Zs(),Yt(e),r=e.pendingLanes,(n&261930)!==0&&(r&42)!==0?e===uo?Cl++:(Cl=0,uo=e):Cl=0,Rl(0)}}function Nd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,dl(t)))}function Zs(){return Sd(),Ed(),Td(),wd()}function wd(){if($e!==5)return!1;var e=kn,t=oo;oo=0;var n=Oi(on),a=C.T,r=X.p;try{X.p=32>n?32:n,C.T=null,n=co,co=null;var c=kn,m=on;if($e=0,Ua=kn=null,on=0,(ve&6)!==0)throw Error(s(331));var g=ve;if(ve|=4,rd(c.current),ld(c,c.current,m,n),ve=g,Rl(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ja,c)}catch{}return!0}finally{X.p=r,C.T=a,Nd(e,t)}}function kd(e,t,n){t=jt(n,t),t=Yr(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Fa(e,2),Yt(e))}function Ne(e,t,n){if(e.tag===3)kd(e,e,n);else for(;t!==null;){if(t.tag===3){kd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(wn===null||!wn.has(a))){e=jt(n,e),n=Af(2),a=xn(t,n,2),a!==null&&(jf(n,a,t,e),Fa(a,2),Yt(a));break}}t=t.return}}function po(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new _g;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(so=!0,r.add(n),e=Sg.bind(null,e,t,n),t.then(e,e))}function Sg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Oe===e&&(ge&n)===n&&(qe===4||qe===3&&(ge&62914560)===ge&&300>pt()-Qs?(ve&2)===0&&La(e,0):io|=n,za===ge&&(za=0)),Yt(e)}function Ad(e,t){t===0&&(t=vc()),e=Yn(e,t),e!==null&&(Fa(e,t),Yt(e))}function Eg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ad(e,n)}function Tg(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(s(314))}a!==null&&a.delete(t),Ad(e,n)}function Ng(e,t){return wi(e,t)}var Js=null,Ha=null,ho=!1,Ws=!1,go=!1,jn=0;function Yt(e){e!==Ha&&e.next===null&&(Ha===null?Js=Ha=e:Ha=Ha.next=e),Ws=!0,ho||(ho=!0,kg())}function Rl(e,t){if(!go&&Ws){go=!0;do for(var n=!1,a=Js;a!==null;){if(e!==0){var r=a.pendingLanes;if(r===0)var c=0;else{var m=a.suspendedLanes,g=a.pingedLanes;c=(1<<31-gt(42|e)+1)-1,c&=r&~(m&~g),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,Rd(a,c))}else c=ge,c=ts(a,a===Oe?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||Wa(a,c)||(n=!0,Rd(a,c));a=a.next}while(n);go=!1}}function wg(){jd()}function jd(){Ws=ho=!1;var e=0;jn!==0&&Lg()&&(e=jn);for(var t=pt(),n=null,a=Js;a!==null;){var r=a.next,c=Od(a,t);c===0?(a.next=null,n===null?Js=r:n.next=r,r===null&&(Ha=n)):(n=a,(e!==0||(c&3)!==0)&&(Ws=!0)),a=r}$e!==0&&$e!==5||Rl(e),jn!==0&&(jn=0)}function Od(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var m=31-gt(c),g=1<<m,x=r[m];x===-1?((g&n)===0||(g&a)!==0)&&(r[m]=Pp(g,t)):x<=t&&(e.expiredLanes|=g),c&=~g}if(t=Oe,n=ge,n=ts(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ki(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Wa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&ki(a),Oi(n)){case 2:case 8:n=bc;break;case 32:n=Wl;break;case 268435456:n=xc;break;default:n=Wl}return a=Cd.bind(null,e),n=wi(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&ki(a),e.callbackPriority=2,e.callbackNode=null,2}function Cd(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zs()&&e.callbackNode!==n)return null;var a=ge;return a=ts(e,e===Oe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(dd(e,a,t),Od(e,pt()),e.callbackNode!=null&&e.callbackNode===n?Cd.bind(null,e):null)}function Rd(e,t){if(Zs())return null;dd(e,t,!0)}function kg(){Hg(function(){(ve&6)!==0?wi(yc,wg):jd()})}function _o(){if(jn===0){var e=Ta;e===0&&(e=Fl,Fl<<=1,(Fl&261888)===0&&(Fl=256)),jn=e}return jn}function Md(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ss(""+e)}function Dd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ag(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var c=Md((r[rt]||null).action),m=a.submitter;m&&(t=(t=m[rt]||null)?Md(t.formAction):m.getAttribute("formAction"),t!==null&&(c=t,m=null));var g=new cs("action","action",null,a,r);e.push({event:g,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(jn!==0){var x=m?Dd(r,m):new FormData(r);Ur(n,{pending:!0,data:x,method:r.method,action:c},null,x)}}else typeof c=="function"&&(g.preventDefault(),x=m?Dd(r,m):new FormData(r),Ur(n,{pending:!0,data:x,method:r.method,action:c},c,x))},currentTarget:r}]})}}for(var yo=0;yo<Pi.length;yo++){var bo=Pi[yo],jg=bo.toLowerCase(),Og=bo[0].toUpperCase()+bo.slice(1);Ut(jg,"on"+Og)}Ut(uu,"onAnimationEnd"),Ut(fu,"onAnimationIteration"),Ut(du,"onAnimationStart"),Ut("dblclick","onDoubleClick"),Ut("focusin","onFocus"),Ut("focusout","onBlur"),Ut(Kh,"onTransitionRun"),Ut(Ih,"onTransitionStart"),Ut($h,"onTransitionCancel"),Ut(mu,"onTransitionEnd"),ua("onMouseEnter",["mouseout","mouseover"]),ua("onMouseLeave",["mouseout","mouseover"]),ua("onPointerEnter",["pointerout","pointerover"]),ua("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="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(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function zd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var m=a.length-1;0<=m;m--){var g=a[m],x=g.instance,k=g.currentTarget;if(g=g.listener,x!==c&&r.isPropagationStopped())break e;c=g,r.currentTarget=k;try{c(r)}catch(O){ds(O)}r.currentTarget=null,c=x}else for(m=0;m<a.length;m++){if(g=a[m],x=g.instance,k=g.currentTarget,g=g.listener,x!==c&&r.isPropagationStopped())break e;c=g,r.currentTarget=k;try{c(r)}catch(O){ds(O)}r.currentTarget=null,c=x}}}}function he(e,t){var n=t[Ci];n===void 0&&(n=t[Ci]=new Set);var a=e+"__bubble";n.has(a)||(Ud(t,e,2,!1),n.add(a))}function xo(e,t,n){var a=0;t&&(a|=4),Ud(n,e,a,t)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function vo(e){if(!e[Fs]){e[Fs]=!0,Ac.forEach(function(n){n!=="selectionchange"&&(Cg.has(n)||xo(n,!1,e),xo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fs]||(t[Fs]=!0,xo("selectionchange",!1,t))}}function Ud(e,t,n,a){switch(fm(t)){case 2:var r=s_;break;case 8:r=i_;break;default:r=Uo}n=r.bind(null,t,n,e),r=void 0,!Bi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function So(e,t,n,a,r){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var m=a.tag;if(m===3||m===4){var g=a.stateNode.containerInfo;if(g===r)break;if(m===4)for(m=a.return;m!==null;){var x=m.tag;if((x===3||x===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;g!==null;){if(m=ra(g),m===null)return;if(x=m.tag,x===5||x===6||x===26||x===27){a=c=m;continue e}g=g.parentNode}}a=a.return}Bc(function(){var k=c,O=qi(n),U=[];e:{var A=pu.get(e);if(A!==void 0){var j=cs,J=e;switch(e){case"keypress":if(rs(n)===0)break e;case"keydown":case"keyup":j=Th;break;case"focusin":J="focus",j=Vi;break;case"focusout":J="blur",j=Vi;break;case"beforeblur":case"afterblur":j=Vi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":j=Qc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":j=dh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":j=kh;break;case uu:case fu:case du:j=hh;break;case mu:j=jh;break;case"scroll":case"scrollend":j=uh;break;case"wheel":j=Ch;break;case"copy":case"cut":case"paste":j=_h;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":j=Xc;break;case"toggle":case"beforetoggle":j=Mh}var se=(t&4)!==0,je=!se&&(e==="scroll"||e==="scrollend"),N=se?A!==null?A+"Capture":null:A;se=[];for(var E=k,w;E!==null;){var D=E;if(w=D.stateNode,D=D.tag,D!==5&&D!==26&&D!==27||w===null||N===null||(D=tl(E,N),D!=null&&se.push(Dl(E,D,w))),je)break;E=E.return}0<se.length&&(A=new j(A,J,null,n,O),U.push({event:A,listeners:se}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",A&&n!==Li&&(J=n.relatedTarget||n.fromElement)&&(ra(J)||J[ia]))break e;if((j||A)&&(A=O.window===O?O:(A=O.ownerDocument)?A.defaultView||A.parentWindow:window,j?(J=n.relatedTarget||n.toElement,j=k,J=J?ra(J):null,J!==null&&(je=f(J),se=J.tag,J!==je||se!==5&&se!==27&&se!==6)&&(J=null)):(j=null,J=k),j!==J)){if(se=Qc,D="onMouseLeave",N="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(se=Xc,D="onPointerLeave",N="onPointerEnter",E="pointer"),je=j==null?A:el(j),w=J==null?A:el(J),A=new se(D,E+"leave",j,n,O),A.target=je,A.relatedTarget=w,D=null,ra(O)===k&&(se=new se(N,E+"enter",J,n,O),se.target=w,se.relatedTarget=je,D=se),je=D,j&&J)t:{for(se=Rg,N=j,E=J,w=0,D=N;D;D=se(D))w++;D=0;for(var ae=E;ae;ae=se(ae))D++;for(;0<w-D;)N=se(N),w--;for(;0<D-w;)E=se(E),D--;for(;w--;){if(N===E||E!==null&&N===E.alternate){se=N;break t}N=se(N),E=se(E)}se=null}else se=null;j!==null&&Ld(U,A,j,se,!1),J!==null&&je!==null&&Ld(U,je,J,se,!0)}}e:{if(A=k?el(k):window,j=A.nodeName&&A.nodeName.toLowerCase(),j==="select"||j==="input"&&A.type==="file")var be=Pc;else if(Wc(A))if(eu)be=Qh;else{be=Gh;var P=Bh}else j=A.nodeName,!j||j.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?k&&Ui(k.elementType)&&(be=Pc):be=Yh;if(be&&(be=be(e,k))){Fc(U,be,n,O);break e}P&&P(e,A,k),e==="focusout"&&k&&A.type==="number"&&k.memoizedProps.value!=null&&zi(A,"number",A.value)}switch(P=k?el(k):window,e){case"focusin":(Wc(P)||P.contentEditable==="true")&&(ga=P,Ji=k,cl=null);break;case"focusout":cl=Ji=ga=null;break;case"mousedown":Wi=!0;break;case"contextmenu":case"mouseup":case"dragend":Wi=!1,ou(U,n,O);break;case"selectionchange":if(Xh)break;case"keydown":case"keyup":ou(U,n,O)}var fe;if(Ki)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else ha?Zc(e,n)&&(_e="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(_e="onCompositionStart");_e&&(Kc&&n.locale!=="ko"&&(ha||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&ha&&(fe=Gc()):(mn=O,Gi="value"in mn?mn.value:mn.textContent,ha=!0)),P=Ps(k,_e),0<P.length&&(_e=new Vc(_e,e,null,n,O),U.push({event:_e,listeners:P}),fe?_e.data=fe:(fe=Jc(n),fe!==null&&(_e.data=fe)))),(fe=zh?Uh(e,n):Lh(e,n))&&(_e=Ps(k,"onBeforeInput"),0<_e.length&&(P=new Vc("onBeforeInput","beforeinput",null,n,O),U.push({event:P,listeners:_e}),P.data=fe)),Ag(U,e,k,n,O)}zd(U,t)})}function Dl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ps(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=tl(e,n),r!=null&&a.unshift(Dl(e,r,c)),r=tl(e,t),r!=null&&a.push(Dl(e,r,c))),e.tag===3)return a;e=e.return}return[]}function Rg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,a,r){for(var c=t._reactName,m=[];n!==null&&n!==a;){var g=n,x=g.alternate,k=g.stateNode;if(g=g.tag,x!==null&&x===a)break;g!==5&&g!==26&&g!==27||k===null||(x=k,r?(k=tl(n,c),k!=null&&m.unshift(Dl(n,k,x))):r||(k=tl(n,c),k!=null&&m.push(Dl(n,k,x)))),n=n.return}m.length!==0&&e.push({event:t,listeners:m})}var Mg=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function qd(e){return(typeof e=="string"?e:""+e).replace(Mg,`
|
|
9
|
+
`).replace(Dg,"")}function Hd(e,t){return t=qd(t),qd(e)===t}function Ae(e,t,n,a,r,c){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||da(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&da(e,""+a);break;case"className":as(e,"class",a);break;case"tabIndex":as(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":as(e,n,a);break;case"style":qc(e,a,c);break;case"data":if(t!=="object"){as(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ss(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&Ae(e,t,"name",r.name,r,null),Ae(e,t,"formEncType",r.formEncType,r,null),Ae(e,t,"formMethod",r.formMethod,r,null),Ae(e,t,"formTarget",r.formTarget,r,null)):(Ae(e,t,"encType",r.encType,r,null),Ae(e,t,"method",r.method,r,null),Ae(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=ss(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=ss(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":he("beforetoggle",e),he("toggle",e),ns(e,"popover",a);break;case"xlinkActuate":Xt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Xt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Xt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Xt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Xt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Xt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Xt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ns(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=oh.get(n)||n,ns(e,n,a))}}function Eo(e,t,n,a,r,c){switch(n){case"style":qc(e,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(s(60));e.innerHTML=n}}break;case"children":typeof a=="string"?da(e,a):(typeof a=="number"||typeof a=="bigint")&&da(e,""+a);break;case"onScroll":a!=null&&he("scroll",e);break;case"onScrollEnd":a!=null&&he("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jc.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),c=e[rt]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof a=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):ns(e,n,a)}}}function nt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var a=!1,r=!1,c;for(c in n)if(n.hasOwnProperty(c)){var m=n[c];if(m!=null)switch(c){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ae(e,t,c,m,n,null)}}r&&Ae(e,t,"srcSet",n.srcSet,n,null),a&&Ae(e,t,"src",n.src,n,null);return;case"input":he("invalid",e);var g=c=m=r=null,x=null,k=null;for(a in n)if(n.hasOwnProperty(a)){var O=n[a];if(O!=null)switch(a){case"name":r=O;break;case"type":m=O;break;case"checked":x=O;break;case"defaultChecked":k=O;break;case"value":c=O;break;case"defaultValue":g=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(s(137,t));break;default:Ae(e,t,a,O,n,null)}}Dc(e,c,g,x,k,m,r,!1);return;case"select":he("invalid",e),a=m=c=null;for(r in n)if(n.hasOwnProperty(r)&&(g=n[r],g!=null))switch(r){case"value":c=g;break;case"defaultValue":m=g;break;case"multiple":a=g;default:Ae(e,t,r,g,n,null)}t=c,n=m,e.multiple=!!a,t!=null?fa(e,!!a,t,!1):n!=null&&fa(e,!!a,n,!0);return;case"textarea":he("invalid",e),c=r=a=null;for(m in n)if(n.hasOwnProperty(m)&&(g=n[m],g!=null))switch(m){case"value":a=g;break;case"defaultValue":r=g;break;case"children":c=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(s(91));break;default:Ae(e,t,m,g,n,null)}Uc(e,a,r,c);return;case"option":for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null)&&(x==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ae(e,t,x,a,n,null));return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(a=0;a<Ml.length;a++)he(Ml[a],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("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(k in n)if(n.hasOwnProperty(k)&&(a=n[k],a!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ae(e,t,k,a,n,null)}return;default:if(Ui(t)){for(O in n)n.hasOwnProperty(O)&&(a=n[O],a!==void 0&&Eo(e,t,O,a,n,void 0));return}}for(g in n)n.hasOwnProperty(g)&&(a=n[g],a!=null&&Ae(e,t,g,a,n,null))}function zg(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,m=null,g=null,x=null,k=null,O=null;for(j in n){var U=n[j];if(n.hasOwnProperty(j)&&U!=null)switch(j){case"checked":break;case"value":break;case"defaultValue":x=U;default:a.hasOwnProperty(j)||Ae(e,t,j,null,a,U)}}for(var A in a){var j=a[A];if(U=n[A],a.hasOwnProperty(A)&&(j!=null||U!=null))switch(A){case"type":c=j;break;case"name":r=j;break;case"checked":k=j;break;case"defaultChecked":O=j;break;case"value":m=j;break;case"defaultValue":g=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(s(137,t));break;default:j!==U&&Ae(e,t,A,j,a,U)}}Di(e,m,g,x,k,O,c,r);return;case"select":j=m=g=A=null;for(c in n)if(x=n[c],n.hasOwnProperty(c)&&x!=null)switch(c){case"value":break;case"multiple":j=x;default:a.hasOwnProperty(c)||Ae(e,t,c,null,a,x)}for(r in a)if(c=a[r],x=n[r],a.hasOwnProperty(r)&&(c!=null||x!=null))switch(r){case"value":A=c;break;case"defaultValue":g=c;break;case"multiple":m=c;default:c!==x&&Ae(e,t,r,c,a,x)}t=g,n=m,a=j,A!=null?fa(e,!!n,A,!1):!!a!=!!n&&(t!=null?fa(e,!!n,t,!0):fa(e,!!n,n?[]:"",!1));return;case"textarea":j=A=null;for(g in n)if(r=n[g],n.hasOwnProperty(g)&&r!=null&&!a.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:Ae(e,t,g,null,a,r)}for(m in a)if(r=a[m],c=n[m],a.hasOwnProperty(m)&&(r!=null||c!=null))switch(m){case"value":A=r;break;case"defaultValue":j=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(s(91));break;default:r!==c&&Ae(e,t,m,r,a,c)}zc(e,A,j);return;case"option":for(var J in n)A=n[J],n.hasOwnProperty(J)&&A!=null&&!a.hasOwnProperty(J)&&(J==="selected"?e.selected=!1:Ae(e,t,J,null,a,A));for(x in a)A=a[x],j=n[x],a.hasOwnProperty(x)&&A!==j&&(A!=null||j!=null)&&(x==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":Ae(e,t,x,A,a,j));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in n)A=n[se],n.hasOwnProperty(se)&&A!=null&&!a.hasOwnProperty(se)&&Ae(e,t,se,null,a,A);for(k in a)if(A=a[k],j=n[k],a.hasOwnProperty(k)&&A!==j&&(A!=null||j!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(137,t));break;default:Ae(e,t,k,A,a,j)}return;default:if(Ui(t)){for(var je in n)A=n[je],n.hasOwnProperty(je)&&A!==void 0&&!a.hasOwnProperty(je)&&Eo(e,t,je,void 0,a,A);for(O in a)A=a[O],j=n[O],!a.hasOwnProperty(O)||A===j||A===void 0&&j===void 0||Eo(e,t,O,A,a,j);return}}for(var N in n)A=n[N],n.hasOwnProperty(N)&&A!=null&&!a.hasOwnProperty(N)&&Ae(e,t,N,null,a,A);for(U in a)A=a[U],j=n[U],!a.hasOwnProperty(U)||A===j||A==null&&j==null||Ae(e,t,U,A,a,j)}function Bd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ug(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var r=n[a],c=r.transferSize,m=r.initiatorType,g=r.duration;if(c&&g&&Bd(m)){for(m=0,g=r.responseEnd,a+=1;a<n.length;a++){var x=n[a],k=x.startTime;if(k>g)break;var O=x.transferSize,U=x.initiatorType;O&&Bd(U)&&(x=x.responseEnd,m+=O*(x<g?1:(g-k)/(x-k)))}if(--a,t+=8*(c+m)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var To=null,No=null;function ei(e){return e.nodeType===9?e:e.ownerDocument}function Gd(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 Yd(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 wo(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 ko=null;function Lg(){var e=window.event;return e&&e.type==="popstate"?e===ko?!1:(ko=e,!0):(ko=null,!1)}var Qd=typeof setTimeout=="function"?setTimeout:void 0,qg=typeof clearTimeout=="function"?clearTimeout:void 0,Vd=typeof Promise=="function"?Promise:void 0,Hg=typeof queueMicrotask=="function"?queueMicrotask:typeof Vd<"u"?function(e){return Vd.resolve(null).then(e).catch(Bg)}:Qd;function Bg(e){setTimeout(function(){throw e})}function On(e){return e==="head"}function Xd(e,t){var n=t,a=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(r),Qa(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")zl(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,zl(n);for(var c=n.firstChild;c;){var m=c.nextSibling,g=c.nodeName;c[Pa]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=m}}else n==="body"&&zl(e.ownerDocument.body);n=r}while(n);Qa(t)}function Kd(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Ao(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ao(n),Ri(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Gg(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Pa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Dt(e.nextSibling),e===null)break}return null}function Yg(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dt(e.nextSibling),e===null))return null;return e}function Id(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dt(e.nextSibling),e===null))return null;return e}function jo(e){return e.data==="$?"||e.data==="$~"}function Oo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Qg(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Dt(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 Co=null;function $d(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Dt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Zd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Jd(e,t,n){switch(t=ei(n),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function zl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ri(e)}var zt=new Map,Wd=new Set;function ti(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=X.d;X.d={f:Vg,r:Xg,D:Kg,C:Ig,L:$g,m:Zg,X:Wg,S:Jg,M:Fg};function Vg(){var e=cn.f(),t=Ks();return e||t}function Xg(e){var t=oa(e);t!==null&&t.tag===5&&t.type==="form"?pf(t):cn.r(e)}var Ba=typeof document>"u"?null:document;function Fd(e,t,n){var a=Ba;if(a&&typeof t=="string"&&t){var r=kt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),Wd.has(r)||(Wd.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),nt(t,"link",e),Ze(t),a.head.appendChild(t)))}}function Kg(e){cn.D(e),Fd("dns-prefetch",e,null)}function Ig(e,t){cn.C(e,t),Fd("preconnect",e,t)}function $g(e,t,n){cn.L(e,t,n);var a=Ba;if(a&&e&&t){var r='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+kt(n.imageSizes)+'"]')):r+='[href="'+kt(e)+'"]';var c=r;switch(t){case"style":c=Ga(e);break;case"script":c=Ya(e)}zt.has(c)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zt.set(c,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(Ul(c))||t==="script"&&a.querySelector(Ll(c))||(t=a.createElement("link"),nt(t,"link",e),Ze(t),a.head.appendChild(t)))}}function Zg(e,t){cn.m(e,t);var n=Ba;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+kt(a)+'"][href="'+kt(e)+'"]',c=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ya(e)}if(!zt.has(c)&&(e=v({rel:"modulepreload",href:e},t),zt.set(c,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ll(c)))return}a=n.createElement("link"),nt(a,"link",e),Ze(a),n.head.appendChild(a)}}}function Jg(e,t,n){cn.S(e,t,n);var a=Ba;if(a&&e){var r=ca(a).hoistableStyles,c=Ga(e);t=t||"default";var m=r.get(c);if(!m){var g={loading:0,preload:null};if(m=a.querySelector(Ul(c)))g.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zt.get(c))&&Ro(e,n);var x=m=a.createElement("link");Ze(x),nt(x,"link",e),x._p=new Promise(function(k,O){x.onload=k,x.onerror=O}),x.addEventListener("load",function(){g.loading|=1}),x.addEventListener("error",function(){g.loading|=2}),g.loading|=4,ni(m,t,a)}m={type:"stylesheet",instance:m,count:1,state:g},r.set(c,m)}}}function Wg(e,t){cn.X(e,t);var n=Ba;if(n&&e){var a=ca(n).hoistableScripts,r=Ya(e),c=a.get(r);c||(c=n.querySelector(Ll(r)),c||(e=v({src:e,async:!0},t),(t=zt.get(r))&&Mo(e,t),c=n.createElement("script"),Ze(c),nt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(r,c))}}function Fg(e,t){cn.M(e,t);var n=Ba;if(n&&e){var a=ca(n).hoistableScripts,r=Ya(e),c=a.get(r);c||(c=n.querySelector(Ll(r)),c||(e=v({src:e,async:!0,type:"module"},t),(t=zt.get(r))&&Mo(e,t),c=n.createElement("script"),Ze(c),nt(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(r,c))}}function Pd(e,t,n,a){var r=(r=me.current)?ti(r):null;if(!r)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ga(n.href),n=ca(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ga(n.href);var c=ca(r).hoistableStyles,m=c.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,m),(c=r.querySelector(Ul(e)))&&!c._p&&(m.instance=c,m.state.loading=5),zt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},zt.set(e,n),c||Pg(r,e,n,m.state))),t&&a===null)throw Error(s(528,""));return m}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(n),n=ca(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Ga(e){return'href="'+kt(e)+'"'}function Ul(e){return'link[rel="stylesheet"]['+e+"]"}function em(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Pg(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),nt(t,"link",n),Ze(t),e.head.appendChild(t))}function Ya(e){return'[src="'+kt(e)+'"]'}function Ll(e){return"script[async]"+e}function tm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kt(n.href)+'"]');if(a)return t.instance=a,Ze(a),a;var r=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ze(a),nt(a,"style",r),ni(a,n.precedence,e),t.instance=a;case"stylesheet":r=Ga(n.href);var c=e.querySelector(Ul(r));if(c)return t.state.loading|=4,t.instance=c,Ze(c),c;a=em(n),(r=zt.get(r))&&Ro(a,r),c=(e.ownerDocument||e).createElement("link"),Ze(c);var m=c;return m._p=new Promise(function(g,x){m.onload=g,m.onerror=x}),nt(c,"link",a),t.state.loading|=4,ni(c,n.precedence,e),t.instance=c;case"script":return c=Ya(n.src),(r=e.querySelector(Ll(c)))?(t.instance=r,Ze(r),r):(a=n,(r=zt.get(c))&&(a=v({},n),Mo(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),Ze(r),nt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,ni(a,n.precedence,e));return t.instance}function ni(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,c=r,m=0;m<a.length;m++){var g=a[m];if(g.dataset.precedence===t)c=g;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ro(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ai=null;function nm(e,t,n){if(ai===null){var a=new Map,r=ai=new Map;r.set(n,a)}else r=ai,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var c=n[r];if(!(c[Pa]||c[Fe]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var m=c.getAttribute(t)||"";m=e+m;var g=a.get(m);g?g.push(c):a.set(m,[c])}}return a}function am(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function e_(e,t,n){if(n===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function t_(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var r=Ga(a.href),c=t.querySelector(Ul(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=li.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Ze(c);return}c=t.ownerDocument||t,a=em(a),(r=zt.get(r))&&Ro(a,r),c=c.createElement("link"),Ze(c);var m=c;m._p=new Promise(function(g,x){m.onload=g,m.onerror=x}),nt(c,"link",a),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=li.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Do=0;function n_(e,t){return e.stylesheets&&e.count===0&&ii(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&ii(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Do===0&&(Do=62500*Ug());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ii(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Do?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(r)}}:null}function li(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ii(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var si=null;function ii(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,si=new Map,t.forEach(a_,e),si=null,li.call(e))}function a_(e,t){if(!(t.state.loading&4)){var n=si.get(e);if(n)var a=n.get(null);else{n=new Map,si.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var m=r[c];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(n.set(m.dataset.precedence,m),a=m)}a&&n.set(null,a)}r=t.instance,m=r.getAttribute("data-precedence"),c=n.get(m)||a,c===a&&n.set(null,r),n.set(m,r),this.count++,a=li.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var ql={$$typeof:ne,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function l_(e,t,n,a,r,c,m,g,x){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=Ai(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.hiddenUpdates=Ai(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function sm(e,t,n,a,r,c,m,g,x,k,O,U){return e=new l_(e,t,n,m,x,k,O,U,g),t=1,c===!0&&(t|=24),c=yt(3,null,null,t),e.current=c,c.stateNode=e,t=dr(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:n,cache:t},gr(c),e}function im(e){return e?(e=ba,e):ba}function rm(e,t,n,a,r,c){r=im(r),a.context===null?a.context=r:a.pendingContext=r,a=bn(t),a.payload={element:n},c=c===void 0?null:c,c!==null&&(a.callback=c),n=xn(e,a,t),n!==null&&(mt(n,e,t),gl(n,e,t))}function om(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zo(e,t){om(e,t),(e=e.alternate)&&om(e,t)}function cm(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&mt(t,e,67108864),zo(e,67108864)}}function um(e){if(e.tag===13||e.tag===31){var t=Et();t=ji(t);var n=Yn(e,t);n!==null&&mt(n,e,t),zo(e,t)}}var ri=!0;function s_(e,t,n,a){var r=C.T;C.T=null;var c=X.p;try{X.p=2,Uo(e,t,n,a)}finally{X.p=c,C.T=r}}function i_(e,t,n,a){var r=C.T;C.T=null;var c=X.p;try{X.p=8,Uo(e,t,n,a)}finally{X.p=c,C.T=r}}function Uo(e,t,n,a){if(ri){var r=Lo(a);if(r===null)So(e,t,a,oi,n),dm(e,a);else if(o_(r,e,t,n,a))a.stopPropagation();else if(dm(e,a),t&4&&-1<r_.indexOf(e)){for(;r!==null;){var c=oa(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var m=Ln(c.pendingLanes);if(m!==0){var g=c;for(g.pendingLanes|=2,g.entangledLanes|=2;m;){var x=1<<31-gt(m);g.entanglements[1]|=x,m&=~x}Yt(c),(ve&6)===0&&(Vs=pt()+500,Rl(0))}}break;case 31:case 13:g=Yn(c,2),g!==null&&mt(g,c,2),Ks(),zo(c,2)}if(c=Lo(a),c===null&&So(e,t,a,oi,n),c===r)break;r=c}r!==null&&a.stopPropagation()}else So(e,t,a,null,n)}}function Lo(e){return e=qi(e),qo(e)}var oi=null;function qo(e){if(oi=null,e=ra(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=h(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return oi=e,null}function fm(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(Kp()){case yc:return 2;case bc:return 8;case Wl:case Ip:return 32;case xc:return 268435456;default:return 32}default:return 32}}var Ho=!1,Cn=null,Rn=null,Mn=null,Hl=new Map,Bl=new Map,Dn=[],r_="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 dm(e,t){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":Mn=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function Gl(e,t,n,a,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:c,targetContainers:[r]},t!==null&&(t=oa(t),t!==null&&cm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function o_(e,t,n,a,r){switch(t){case"focusin":return Cn=Gl(Cn,e,t,n,a,r),!0;case"dragenter":return Rn=Gl(Rn,e,t,n,a,r),!0;case"mouseover":return Mn=Gl(Mn,e,t,n,a,r),!0;case"pointerover":var c=r.pointerId;return Hl.set(c,Gl(Hl.get(c)||null,e,t,n,a,r)),!0;case"gotpointercapture":return c=r.pointerId,Bl.set(c,Gl(Bl.get(c)||null,e,t,n,a,r)),!0}return!1}function mm(e){var t=ra(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,wc(e.priority,function(){um(n)});return}}else if(t===31){if(t=h(n),t!==null){e.blockedOn=t,wc(e.priority,function(){um(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lo(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Li=a,n.target.dispatchEvent(a),Li=null}else return t=oa(n),t!==null&&cm(t),e.blockedOn=n,!1;t.shift()}return!0}function pm(e,t,n){ci(e)&&n.delete(t)}function c_(){Ho=!1,Cn!==null&&ci(Cn)&&(Cn=null),Rn!==null&&ci(Rn)&&(Rn=null),Mn!==null&&ci(Mn)&&(Mn=null),Hl.forEach(pm),Bl.forEach(pm)}function ui(e,t){e.blockedOn===t&&(e.blockedOn=null,Ho||(Ho=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,c_)))}var fi=null;function hm(e){fi!==e&&(fi=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){fi===e&&(fi=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(qo(a||n)===null)continue;break}var c=oa(n);c!==null&&(e.splice(t,3),t-=3,Ur(c,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function Qa(e){function t(x){return ui(x,e)}Cn!==null&&ui(Cn,e),Rn!==null&&ui(Rn,e),Mn!==null&&ui(Mn,e),Hl.forEach(t),Bl.forEach(t);for(var n=0;n<Dn.length;n++){var a=Dn[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Dn.length&&(n=Dn[0],n.blockedOn===null);)mm(n),n.blockedOn===null&&Dn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],c=n[a+1],m=r[rt]||null;if(typeof c=="function")m||hm(n);else if(m){var g=null;if(c&&c.hasAttribute("formAction")){if(r=c,m=c[rt]||null)g=m.formAction;else if(qo(r)!==null)continue}else g=m.action;typeof g=="function"?n[a+1]=g:(n.splice(a,3),a-=3),hm(n)}}}function gm(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Bo(e){this._internalRoot=e}di.prototype.render=Bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current,a=Et();rm(n,a,e,t,null,null)},di.prototype.unmount=Bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;rm(e.current,2,null,e,null,null),Ks(),t[ia]=null}};function di(e){this._internalRoot=e}di.prototype.unstable_scheduleHydration=function(e){if(e){var t=Nc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dn.length&&t!==0&&t<Dn[n].priority;n++);Dn.splice(n,0,e),n===0&&mm(e)}};var _m=o.version;if(_m!=="19.2.8")throw Error(s(527,_m,"19.2.8"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=_(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var u_={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mi.isDisabled&&mi.supportsFiber)try{Ja=mi.inject(u_),ht=mi}catch{}}return Ql.createRoot=function(e,t){if(!u(e))throw Error(s(299));var n=!1,a="",r=Tf,c=Nf,m=wf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=sm(e,1,!1,null,null,n,a,null,r,c,m,gm),e[ia]=t.current,vo(e),new Bo(t)},Ql.hydrateRoot=function(e,t,n){if(!u(e))throw Error(s(299));var a=!1,r="",c=Tf,m=Nf,g=wf,x=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(m=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=sm(e,1,!0,t,n??null,a,r,x,c,m,g,gm),t.context=im(null),n=t.current,a=Et(),a=ji(a),r=bn(a),r.callback=null,xn(n,r,a),n=a,t.current.lanes=n,Fa(t,n),Yt(t),e[ia]=t.current,vo(e),new di(t)},Ql.version="19.2.8",Ql}var km;function x_(){if(km)return Qo.exports;km=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(o){console.error(o)}}return i(),Qo.exports=b_(),Qo.exports}var v_=x_();const Am=i=>{let o;const l=new Set,s=(_,b)=>{const v=typeof _=="function"?_(o):_;if(!Object.is(v,o)){const T=o;o=b??(typeof v!="object"||v===null)?v:Object.assign({},o,v),l.forEach(R=>R(o,T))}},u=()=>o,h={setState:s,getState:u,getInitialState:()=>y,subscribe:_=>(l.add(_),()=>l.delete(_))},y=o=i(s,u,h);return h},S_=(i=>i?Am(i):Am),E_=i=>i;function T_(i,o=E_){const l=pi.useSyncExternalStore(i.subscribe,pi.useCallback(()=>o(i.getState()),[i,o]),pi.useCallback(()=>o(i.getInitialState()),[i,o]));return pi.useDebugValue(l),l}const N_=i=>{const o=S_(i),l=s=>T_(o,s);return Object.assign(l,o),l},w_=(i=>N_),q={CONNECTED:"connected",DISCONNECTED:"disconnected",AGENT_CREATED:"agent.created",AGENT_OUTPUT:"agent.output",AGENT_STATUS_CHANGED:"agent.status_changed",AGENT_COMPLETED:"agent.completed",AGENT_ERROR:"agent.error",SESSION_TERMINATED:"session.terminated",TOOL_CALL_START:"tool.call_start",TOOL_CALL_END:"tool.call_end",TOOL_OUTPUT:"tool.output",PERMISSION_REQUESTED:"permission.requested",PERMISSION_INPUT_MODE:"permission.input_mode",PERMISSION_RESOLVED:"permission.resolved",PERMISSION_RESPONSE:"permission.response",PERMISSION_STATUS:"permission.status",CLARIFICATION_INPUT_MODE:"clarification.input_mode",CLARIFICATION_QUESTION:"clarification.question",CLARIFICATION_RESOLVED:"clarification.resolved",CLARIFICATION_RESPONSE:"clarification.response",CLARIFICATION_BATCH:"clarification.batch",CLARIFICATION_BATCH_RESPONSE:"clarification.batch_response",REFERENCE_SELECTION_REQUESTED:"reference_selection.requested",REFERENCE_SELECTION_RESOLVED:"reference_selection.resolved",REFERENCE_SELECTION_RESPONSE:"reference_selection.response",PLAN_UPDATED:"plan.updated",PLAN_STEP_UPDATED:"plan.step_updated",PLAN_CLEARED:"plan.cleared",CONTEXT_UPDATED:"context.updated",TURN_COMPLETED:"turn.completed",SYSTEM_MESSAGE:"system.message",HELP_TEXT:"help.text",ERROR:"error",INIT_PROGRESS:"init.progress",RETRY:"retry",SESSION_LIST:"session.list",SESSION_INFO:"session.info",SEND_MESSAGE:"message.send",STOP:"session.stop",COMMAND:"command.execute",COMMAND_LIST_REQUEST:"command.list_request",COMMAND_LIST:"command.list",COMMAND_LIST_REFRESH:"command.list_refresh",TOOL_DISABLE_REQUEST:"tools.disable",TOOLS_REGISTER_CLIENT:"tools.register_client",TOOL_EXECUTE_REQUEST:"tool.execute_request",TOOL_EXECUTE_RESULT:"tool.execute_result",HISTORY_REQUEST:"history.request",HISTORY:"history",CLIENT_CONFIG:"client.config",POST_AUTH_SETUP:"auth.setup",POST_AUTH_SETUP_RESPONSE:"auth.setup_response",WORKSPACE_LIST_REQUEST:"workspace.list",WORKSPACE_LIST:"workspace.list_response",WORKSPACE_CREATE_REQUEST:"workspace.create",WORKSPACE_CREATED:"workspace.created",WORKSPACE_SELECT_REQUEST:"workspace.select",WORKSPACE_DELETE_REQUEST:"workspace.delete",WORKSPACE_DELETED:"workspace.deleted",CONFIG_STATUS:"config.status",CONFIG_UPDATE_REQUEST:"config.update",CONFIG_UPDATED:"config.updated",WORKSPACE_FILES_STAGE_REQUEST:"workspace.files.stage_request",WORKSPACE_FILES_STAGED:"workspace.files.staged",SESSION_PROFILES:"session.profiles",WORKSPACE_FILES_CHANGED:"workspace.files_changed",WORKSPACE_FILES_SNAPSHOT:"workspace.files_snapshot",WORKSPACE_IGNORE_RESULT:"workspace.ignore.result",INJECT_PROMPT_REQUEST:"inject_prompt.request",REPLAY_MESSAGES_REQUEST:"replay_messages.request",RESOLVE_FORK_POINT_REQUEST:"resolve_fork_point.request",PERMISSION_ADD_WHITELIST_REQUEST:"permission.add_whitelist",PERMISSION_ADD_BLACKLIST_REQUEST:"permission.add_blacklist",PERMISSION_REMOVE_REQUEST:"permission.remove",PERMISSION_CLEAR_REQUEST:"permission.clear",PERMISSION_SET_DEFAULT_REQUEST:"permission.set_default",PERMISSION_POLICY_SNAPSHOT_REQUEST:"permission.policy_snapshot.request"};class Tt extends Error{constructor(o){super(o),this.name="ConnectionError"}}class Io extends Error{constructor(o="Client is reconnecting"){super(o),this.name="ReconnectingError"}}class hi extends Error{constructor(o="Connection is closed"){super(o),this.name="ConnectionClosedError"}}class jm extends Error{serverProtocol;minProtocol;serverVersion;constructor(o,l,s){const u=s??"unknown",f=o.split(".").map(y=>parseInt(y,10)),p=l.split(".").map(y=>parseInt(y,10));let h="version mismatch";!Number.isNaN(f[0])&&!Number.isNaN(p[0])&&f[0]!==p[0]?h=`major-version mismatch (server speaks ${f[0]}.x, client needs ${p[0]}.x) — wire shapes are incompatible`:!Number.isNaN(f[1])&&!Number.isNaN(p[1])&&f[1]<p[1]&&(h=`server minor ${f[1]} is below client's required minor ${p[1]} — daemon is missing fields the client depends on`),super(`Server protocol ${o} is not supported by this client (requires >= ${l}): ${h}. Daemon package: ${u}.`),this.name="IncompatibleServerError",this.serverProtocol=o,this.minProtocol=l,this.serverVersion=u}get minVersion(){return this.minProtocol}}class k_ extends Error{errorType;errorSummary;constructor(o,l){super(`${o??"AgentError"}: ${l??""}`.replace(/: $/,"")),this.name="AgentError",this.errorType=o,this.errorSummary=l}}class A_ extends Error{toolName;constructor(o){super(`tool ${JSON.stringify(o)} requested permission but no onPermission callback was set — pass onPermission to session(...) or use the low-level subscribe(PERMISSION_REQUESTED) API via s.client`),this.name="PermissionUnhandled",this.toolName=o}}class j_ extends Error{field;value;constructor(o,l){super(`${o}=${JSON.stringify(l)} is a relative path and cannot cross the daemon boundary: its meaning depends on the cwd of whichever process reads it, and the two sides do not share one. Resolve it to an absolute path in the process whose cwd it is relative to.`),this.name="RelativePathAcrossBoundaryError",this.field=o,this.value=l}}var He=(i=>(i.DISCONNECTED="disconnected",i.CONNECTED="connected",i.RECONNECTING="reconnecting",i.CLOSED="closed",i))(He||{});const O_={autoReconnect:!0,maxReconnectAttempts:null,initialBackoffSeconds:1,maxBackoffSeconds:30,jitterFactor:.1,autoReattachSessionId:!1};function C_(i){if(i.headers||i.token==null)return i.url;const o=new URL(i.url);return o.searchParams.set("token",i.token),o.toString()}function R_(i){const o=i.openTimeoutMs??5e3,l=C_(i),s=globalThis.WebSocket;if(s==null)return Promise.reject(new Tt("No WebSocket implementation available. Ensure Node 21+ or a browser environment."));let u;try{i.headers?u=new s(l,{headers:i.headers}):u=new s(l)}catch(v){return Promise.reject(new Tt(`WebSocket constructor failed: ${v.message}`))}u.binaryType="arraybuffer";const f=[],p=[];let h=!1,y=null;const _=[],b=()=>{for(h=!0;p.length;)p.shift()(null)};return new Promise((v,T)=>{let R=setTimeout(()=>{try{u.close()}catch{}T(new Tt(`WebSocket open timed out after ${o}ms`))},o);u.onopen=()=>{R&&(clearTimeout(R),R=null),v({sendEvent(V){if(h)throw new Tt("Transport is closed");u.send(JSON.stringify(V))},sendRawEvent(V){if(h)throw new Tt("Transport is closed");u.send(JSON.stringify(V))},sendBinary(V){if(h)throw new Tt("Transport is closed");u.send(V)},async*events(){for(;;){if(f.length>0){yield f.shift();continue}if(h)return;const V=await new Promise(K=>{p.push(K)});if(V==null)return;yield V}},close(V,K){try{u.close(V??1e3,K??"")}catch{}},onClose(V){y?V(y):_.push(V)},get isOpen(){return!h}})},u.onerror=()=>{R&&(clearTimeout(R),R=null,T(new Tt("WebSocket error during open")))},u.onmessage=M=>{let V;if(typeof M.data=="string")V=M.data;else if(M.data instanceof ArrayBuffer)V=new TextDecoder().decode(M.data);else if(M.data?.text){M.data.text().then(K=>{B(K)});return}else{try{u.close(1003,"unsupported frame type")}catch{}return}B(V)},u.onclose=M=>{if(R){clearTimeout(R),R=null,T(new Tt(`WebSocket closed before open (code=${M.code}, reason=${M.reason||"<empty>"})`));return}y={code:M.code,reason:M.reason||""},b();for(const V of _)try{V(y)}catch{}};function B(M){let V;try{V=JSON.parse(M)}catch{try{u.close(1003,"invalid JSON frame")}catch{}return}p.length>0?p.shift()(V):f.push(V)}})}Symbol.asyncDispose??=Symbol.for("Symbol.asyncDispose");const Om=["model"];class M_{#e;#n;#t=null;#s;constructor(o,l,s){this.#e=o,this.#n=l,o.subscribe(q.PERMISSION_REQUESTED,u=>{this.#i(u)}),s&&s.size>0&&(this.#s=s,o.subscribe(q.TOOL_EXECUTE_REQUEST,u=>{this.#r(u)}))}get client(){return this.#e}get sessionId(){return this.#e.sessionId}async#i(o){const l=o,s=l?.request_id??"";if(this.#n){const u=await this.#n(o);await this.#e.respondToPermission(s,u||"n")}else this.#t=l?.tool_name??"?",await this.#e.respondToPermission(s,"n")}async#r(o){const l=o,s=l?.call_id??"",u=l?.tool_name?this.#s?.get(l.tool_name):void 0;if(!u){await this.#e.respondToToolExecution(s,"",`no handler for host tool ${JSON.stringify(l?.tool_name)}`);return}try{const f=await u(l?.tool_args??{}),p=typeof f=="string"?f:JSON.stringify(f);await this.#e.respondToToolExecution(s,p)}catch(f){await this.#e.respondToToolExecution(s,"",f instanceof Error?f.message:String(f))}}#a(o){if(this.#t!==null){const l=this.#t;throw this.#t=null,new A_(l)}if(o.reason==="error")throw new k_(o.errorType,o.errorSummary)}#l(o,l){const s=l;o.reason??=s?.reason??"natural",s?.error_type&&(o.errorType=s.error_type),s?.error_summary&&(o.errorSummary=s.error_summary)}async ask(o,l={}){const s=l.sources===void 0?Om:l.sources,u=[],f={};let p;const h=new Promise(R=>{p=R}),y=R=>{const B=R;(s===null||B?.source!=null&&s.includes(B.source))&&B?.text&&u.push(B.text)},_=R=>{this.#l(f,R),p()},b=this.#e.subscribe(q.AGENT_OUTPUT,y),v=this.#e.subscribeOnce(q.SESSION_TERMINATED,_),T=this.#e.subscribeOnce(q.TURN_COMPLETED,_);try{await this.#e.sendMessage(o,l.attachments,l.parallelTools),await h}finally{b(),v(),T()}return this.#a(f),u.join("")}async complete(o,l={}){const s={};let u=null,f;const p=new Promise(T=>{f=T}),h=T=>{u=T?.payload??null},y=T=>{this.#l(s,T),f()},_=this.#e.subscribeOnce(q.AGENT_COMPLETED,h),b=this.#e.subscribeOnce(q.SESSION_TERMINATED,y),v=this.#e.subscribeOnce(q.TURN_COMPLETED,y);try{await this.#e.sendMessage(o,l.attachments,l.parallelTools),await p}finally{_(),b(),v()}return this.#a(s),u}async*stream(o,l={}){const s=l.sources===void 0?Om:l.sources,u=[],f={};let p=!1,h=null;const y=()=>{if(h){const B=h;h=null,B()}},_=B=>{const M=B;(s===null||M?.source!=null&&s.includes(M.source))&&M?.text&&(u.push(M.text),y())},b=B=>{this.#l(f,B),p=!0,y()},v=this.#e.subscribe(q.AGENT_OUTPUT,_),T=this.#e.subscribeOnce(q.SESSION_TERMINATED,b),R=this.#e.subscribeOnce(q.TURN_COMPLETED,b);try{for(await this.#e.sendMessage(o,l.attachments,l.parallelTools);;){if(u.length>0){yield u.shift();continue}if(p)break;await new Promise(B=>{h=B})}}finally{v(),T(),R()}this.#a(f)}async close(){await this.#e.close()}async[Symbol.asyncDispose](){await this.close()}}function D_(i,o){return i.sessionId?Promise.resolve(i.sessionId):new Promise(l=>{let s;const u=i.subscribe(q.SESSION_INFO,()=>{clearTimeout(s),u(),l(i.sessionId)});s=setTimeout(()=>{u(),l(null)},o)})}function z_(i){return i.startsWith("/")||i.startsWith("\\\\")||/^[A-Za-z]:[\\/]/.test(i)}function Cm(i,o){if(o!==void 0&&o!==""&&!z_(o))throw new j_(i,o)}async function U_(i){const o={...i.presentation??{},client_type:i.clientType??"api"};Cm("workspacePath",i.workspacePath),Cm("configRoot",i.configRoot);const l={presentation:o};i.workspacePath!==void 0&&(l.working_dir=i.workspacePath),i.envFile!==void 0&&(l.env_file=i.envFile),i.configRoot!==void 0&&(l.config_root=i.configRoot),i.apparmor!==void 0&&(l.apparmor=i.apparmor);const s={url:i.url,token:i.token,headers:i.headers,minProtocolVersion:i.minProtocolVersion,recovery:i.recovery,openTimeoutMs:i.openTimeoutMs,clientConfig:l},u=new dp(s);i.onStatusChange&&u.onStatus(i.onStatusChange),await u.connect();const f=new Map;if(i.clientTools&&i.clientTools.length>0){const _=i.clientTools.map(b=>{const{handler:v,...T}=b;return v&&typeof b.name=="string"&&f.set(b.name,v),T});await u.registerClientTools(_)}const p=i.sessionTimeoutMs??6e4,h=D_(u,p);if(await u.createSession({profile:i.profile,agent:i.agent,agentParams:i.agentParams,cascadeDriverId:i.cascadeDriverId}),!await h)throw await u.close(),new Error(`session.new did not produce a session id within ${p}ms — check provider auth / the daemon log`);return new M_(u,i.onPermission,f)}const L_="1.0",Rm="1.5",Mm="1.6",Dm="1.11",zm="1.12";function Um(i){const o=i.split(".");if(o.length<2)return null;const l=parseInt(o[0],10),s=parseInt(o[1],10);return Number.isNaN(l)||Number.isNaN(s)?null:[l,s]}function Vl(i,o){const l=Um(i),s=Um(o);return l==null||s==null||l[0]!==s[0]?!1:l[1]>=s[1]}class dp{_options;_recovery;_transport=null;_state=He.DISCONNECTED;_serverVersion=null;_serverProtocolVersion=null;_clientId=null;_sessionId=null;_statusHandlers=[];_typedHandlers=new Map;_catchallHandlers=[];_handlerIdCounter=0;_bufferedEvents=[];_eventLoopActive=!1;_reconnectAttempts=0;_reconnectTimer=null;_explicitClose=!1;constructor(o){if(this._options=o,this._recovery={...O_,...o.recovery??{}},this._recovery.autoReattachSessionId){let l=!1;this.onStatus(s=>{if(s.state===He.RECONNECTING){l=!0;return}s.state===He.CONNECTED&&l&&this._sessionId&&(l=!1,this.attachSession(this._sessionId))})}}get state(){return this._state}get isConnected(){return this._state===He.CONNECTED}get serverVersion(){return this._serverVersion}get serverProtocolVersion(){return this._serverProtocolVersion}get clientId(){return this._clientId}get sessionId(){return this._sessionId}onStatus(o){return this._statusHandlers.push(o),()=>{const l=this._statusHandlers.indexOf(o);l>=0&&this._statusHandlers.splice(l,1)}}async connect(){if(this._state!==He.CONNECTED){if(this._state===He.CLOSED)throw new hi("Client was closed; construct a new instance");this._explicitClose=!1,await this._openOnce(),this._startEventLoop()}}async close(){this._explicitClose=!0,this._reconnectTimer&&(clearTimeout(this._reconnectTimer),this._reconnectTimer=null),this._transport&&(this._transport.close(1e3,"client close"),this._transport=null),this._transition(He.CLOSED)}subscribe(o,l){return this._addTypedHandler(o,l,!1)}subscribeOnce(o,l){return this._addTypedHandler(o,l,!0)}subscribeAll(o){return this._addCatchallHandler(o,!1)}subscribeMany(o){const l=[];for(const s of Object.keys(o)){const u=o[s];u&&l.push(this._addTypedHandler(s,u,!1))}return()=>{for(const s of l)s()}}_addTypedHandler(o,l,s){const u=++this._handlerIdCounter,f={handler:l,once:s,id:u};let p=this._typedHandlers.get(o);return p||(p=[],this._typedHandlers.set(o,p)),p.push(f),()=>this._removeTypedHandlerId(o,u)}_addCatchallHandler(o,l){const s=++this._handlerIdCounter,u={handler:o,once:l,id:s};return this._catchallHandlers.push(u),()=>this._removeCatchallHandlerId(s)}_removeTypedHandlerId(o,l){const s=this._typedHandlers.get(o);if(!s)return;const u=s.findIndex(f=>f.id===l);u>=0&&s.splice(u,1)}_removeCatchallHandlerId(o){const l=this._catchallHandlers.findIndex(s=>s.id===o);l>=0&&this._catchallHandlers.splice(l,1)}async sendMessage(o,l,s){await this._sendEvent({type:q.SEND_MESSAGE,text:o,attachments:l??[],parallel_tools:s??null})}async stop(o){await this._sendEvent({type:q.STOP,agent_id:o??null})}async respondToPermission(o,l,s){await this._sendEvent({type:q.PERMISSION_RESPONSE,request_id:o,response:l,edited_arguments:s??null})}async respondToPostAuthSetup(o,l){await this._sendEvent({type:q.POST_AUTH_SETUP_RESPONSE,request_id:o,connect:l.connect,model_name:l.modelName??"",persist_env:l.persistEnv??!1})}async respondToClarification(o,l,s=0){await this._sendEvent({type:q.CLARIFICATION_RESPONSE,request_id:o,question_index:s,response:l})}async respondToClarificationBatch(o,l,s=!1,u){const f=!s&&u!==void 0&&Object.keys(u).length>0;f&&this._requireClarificationAttachmentProtocol(),await this._sendEvent({type:q.CLARIFICATION_BATCH_RESPONSE,request_id:o,answers:l,cancelled:s,answer_attachments:f?u:{}})}_requireClarificationAttachmentProtocol(){if(!(this._serverProtocolVersion!==null&&Vl(this._serverProtocolVersion,Mm)))throw new Error(`respondToClarificationBatch: this daemon speaks protocol ${this._serverProtocolVersion??"unknown"} and would DROP the answer attachments (needs >= ${Mm}). Answer the clarification in text, or upgrade the daemon.`)}async respondToReferenceSelection(o,l){await this._sendEvent({type:q.REFERENCE_SELECTION_RESPONSE,request_id:o,response:l})}async respondToToolExecution(o,l="",s=""){await this._sendEvent({type:q.TOOL_EXECUTE_RESULT,call_id:o,result:l,error:s})}async createSession(o={}){const l=o.name?[o.name]:[];let s;if(typeof o.profile=="string")l.push("--profile",o.profile);else if(o.profile!==void 0&&o.profile!==null&&typeof o.profile=="object")s={spec:o.profile};else if(o.profile!==void 0&&o.profile!==null)throw new TypeError(`createSession: 'profile' must be string (name) or object (inline spec), got ${typeof o.profile}`);if(o.agent&&l.push("--agent",o.agent),o.agentParams)for(const[u,f]of Object.entries(o.agentParams))l.push(`${u}=${f}`);o.cascadeDriverId&&l.push("--cascade-driver-id",o.cascadeDriverId),await this._sendEvent({type:q.COMMAND,command:"session.new",args:l,payload:s})}static session(o){return U_(o)}async attachSession(o){await this._sendEvent({type:q.COMMAND,command:"session.attach",args:[o]}),this._sessionId=o}async getDefaultSession(){await this._sendEvent({type:q.COMMAND,command:"session.default",args:[]})}async listSessions(){await this._sendEvent({type:q.COMMAND,command:"session.list",args:[]})}async listProfiles(){await this._sendEvent({type:q.COMMAND,command:"session.profiles",args:[]})}async endSession(){await this._sendEvent({type:q.COMMAND,command:"session.end",args:[]})}async reloadSessionEnv(o){if(this._serverProtocolVersion===null||!Vl(this._serverProtocolVersion,Dm))throw new Error(`reloadSessionEnv: this daemon speaks protocol ${this._serverProtocolVersion??"unknown"} and does not serve session.reload_env (needs >= ${Dm}). It would ignore the command silently. Upgrade the daemon, or start a new session to pick up the credential.`);await this._sendEvent({type:q.COMMAND,command:"session.reload_env",args:o?[o]:[]})}async toggleWorkspaceIgnore(o){if(this._serverProtocolVersion===null||!Vl(this._serverProtocolVersion,zm))throw new Error(`toggleWorkspaceIgnore: this daemon speaks protocol ${this._serverProtocolVersion??"unknown"} and does not serve workspace.ignore (needs >= ${zm}). It would ignore the command silently. Upgrade the daemon, or edit the workspace's .gitignore directly.`);await this._sendEvent({type:q.COMMAND,command:"workspace.ignore",args:[o]})}async deleteSession(o){await this._sendEvent({type:q.COMMAND,command:"session.delete",args:[o]})}async executeCommand(o,l,s){await this._sendEvent({type:q.COMMAND,command:o,args:l??[],payload:s??null})}async sendRawEvent(o){if(this._state===He.RECONNECTING)throw new Io;if(this._state===He.CLOSED)throw new hi;if(this._transport==null)throw new Tt("No active transport — call connect() first");this._transport.sendRawEvent(o)}async disableTool(o){await this._sendEvent({type:q.TOOL_DISABLE_REQUEST,tool_name:o})}async requestCommandList(){await this._sendEvent({type:q.COMMAND_LIST_REQUEST})}async requestHistory(o="main"){await this._sendEvent({type:q.HISTORY_REQUEST,agent_id:o})}async registerClientTools(o,l){await this._sendEvent({type:q.TOOLS_REGISTER_CLIENT,tools:o,categories:l??{}})}async injectPrompt(o,l="user",s,u){u&&u.length>0&&this._requireAttachmentResumeProtocol("injectPrompt"),await this._sendEvent({type:q.INJECT_PROMPT_REQUEST,text:o,source_type:l,source_id:s??null,attachments:u??[]})}async wakeSession(o,l="",s){const u=s?.attachments??[];if(!l&&u.length===0)throw new Error("wakeSession requires text or attachments — a wake with no content drives a turn the model has nothing to answer");const f={session_id:o,text:l,source:s?.source??"user"};s?.eventId!==void 0&&(f.event_id=s.eventId),u.length>0&&(this._requireAttachmentResumeProtocol("wakeSession"),f.attachments=u),await this.executeCommand("session.wake",[],f)}_requireAttachmentResumeProtocol(o){if(!(this._serverProtocolVersion!==null&&Vl(this._serverProtocolVersion,Rm)))throw new Error(`${o}: this daemon speaks protocol ${this._serverProtocolVersion??"unknown"} and would DROP the attachments (needs >= ${Rm}). Send the content through sendMessage() on a live session, or upgrade the daemon.`)}async replayMessages(o,l,s=120){await this._sendEvent({type:q.REPLAY_MESSAGES_REQUEST,request_id:o,messages:l??null,timeout_seconds:s})}async resolveForkPoint(o,l={}){await this._sendEvent({type:q.RESOLVE_FORK_POINT_REQUEST,request_id:o,after_message:l.afterMessage??null,after_tool_call:l.afterToolCall??null,after_timestamp:l.afterTimestamp??null})}async addWhitelistTools(o,l){await this._sendEvent({type:q.PERMISSION_ADD_WHITELIST_REQUEST,tools:o??[],patterns:l??[]})}async addBlacklistTools(o,l){await this._sendEvent({type:q.PERMISSION_ADD_BLACKLIST_REQUEST,tools:o??[],patterns:l??[]})}async removePermissionRules(o,l,s){await this._sendEvent({type:q.PERMISSION_REMOVE_REQUEST,target:o,tools:l??[],patterns:s??[]})}async clearPermissionRules(o="all"){await this._sendEvent({type:q.PERMISSION_CLEAR_REQUEST,target:o})}async setDefaultPolicy(o){await this._sendEvent({type:q.PERMISSION_SET_DEFAULT_REQUEST,policy:o})}async requestPolicySnapshot(o=""){await this._sendEvent({type:q.PERMISSION_POLICY_SNAPSHOT_REQUEST,request_id:o})}async stageFiles(o,l){if(this._state!==He.CONNECTED)throw this._state===He.RECONNECTING?new Io:new hi;if(this._transport==null)throw new Tt("No active transport — call connect() first");const s=this._transport,u=l.map(p=>({name:p.name,size:(p.data instanceof ArrayBuffer,p.data.byteLength),content_type:p.contentType??null,mode:p.mode??null})),f=this._waitForNextEvent(p=>p.type===q.WORKSPACE_FILES_STAGED);s.sendEvent({type:q.WORKSPACE_FILES_STAGE_REQUEST,workspace_id:o,files:u});for(const p of l)s.sendBinary(p.data);return f}_waitForNextEvent(o){return new Promise(l=>{const s=this.subscribeAll(u=>{o(u)&&(s(),l(u))})})}async _sendEvent(o){if(this._state===He.RECONNECTING)throw new Io;if(this._state===He.CLOSED)throw new hi;if(this._transport==null)throw new Tt("No active transport — call connect() first");this._transport.sendEvent(o)}async _resolveToken(){const o=this._options.token;return typeof o=="function"?await o():o}async _openOnce(){const o=await this._resolveToken(),l=await R_({url:this._options.url,token:o,headers:this._options.headers,openTimeoutMs:this._options.openTimeoutMs});this._transport=l,l.onClose(_=>this._handleClose(_));const s=l.events(),u=await s.next();if(u.done)throw this._transport=null,new Tt("Server closed connection before sending ConnectedEvent");const f=u.value;if(f.type!==q.CONNECTED)throw this._transport=null,l.close(),new Tt(`Expected ConnectedEvent from server, got ${f.type}`);const p=f,h=p.server_info??{};this._serverVersion=h.server_version??null,this._clientId=h.client_id??null,this._serverProtocolVersion=p.protocol_version??null;const y=this._options.minProtocolVersion??L_;if(this._serverProtocolVersion==null||!Vl(this._serverProtocolVersion,y))throw this._transport=null,l.close(1002,"incompatible protocol version"),new jm(this._serverProtocolVersion??"unknown",y,this._serverVersion??void 0);if(this._options.clientConfig){const _={type:q.CLIENT_CONFIG,timestamp:new Date().toISOString(),...this._options.clientConfig};l.sendEvent(_)}this._reconnectAttempts=0,this._transition(He.CONNECTED,{serverVersion:this._serverVersion??void 0,clientId:this._clientId??void 0}),this._dispatchEvent(p),this._pumpFromIterator(s)}async _pumpFromIterator(o){try{for(;;){const l=await o.next();if(l.done)return;this._dispatchEvent(l.value)}}catch{}}_startEventLoop(){if(!this._eventLoopActive)for(this._eventLoopActive=!0;this._bufferedEvents.length>0;){const o=this._bufferedEvents.shift();this._dispatchEvent(o)}}_dispatchEvent(o){const l=o.session_id;l&&o.type===q.SESSION_INFO&&(this._sessionId=l);const s=this._typedHandlers.get(o.type),u=s?s.slice():[],f=this._catchallHandlers.slice();for(const p of u)p.once&&this._removeTypedHandlerId(o.type,p.id),this._invokeHandler(p.handler,o);for(const p of f)p.once&&this._removeCatchallHandlerId(p.id),this._invokeHandler(p.handler,o)}_invokeHandler(o,l){let s;try{s=o(l)}catch(u){console.error("[JaatoClient] subscriber threw:",u);return}s&&typeof s.then=="function"&&s.catch(u=>{console.error("[JaatoClient] async subscriber rejected:",u)})}_handleClose(o){if(this._transport=null,this._explicitClose||this._state===He.CLOSED){this._transition(He.CLOSED,{reason:o.reason||`code ${o.code}`});return}if(!this._recovery.autoReconnect){this._transition(He.CLOSED,{reason:`connection lost (code ${o.code})`});return}this._scheduleReconnect()}_scheduleReconnect(){if(this._reconnectAttempts+=1,this._recovery.maxReconnectAttempts!=null&&this._reconnectAttempts>this._recovery.maxReconnectAttempts){this._transition(He.CLOSED,{reason:`max reconnect attempts (${this._recovery.maxReconnectAttempts}) exceeded`});return}const o=Math.min(this._recovery.initialBackoffSeconds*Math.pow(2,this._reconnectAttempts-1),this._recovery.maxBackoffSeconds),l=o*this._recovery.jitterFactor*(Math.random()*2-1),s=Math.max(0,o+l);this._transition(He.RECONNECTING,{reconnectAttempt:this._reconnectAttempts,reconnectDelaySeconds:s}),this._reconnectTimer=setTimeout(()=>{this._reconnectTimer=null,this._attemptReconnect().catch(()=>{})},s*1e3)}async _attemptReconnect(){try{await this._openOnce()}catch(o){if(o instanceof jm){this._transition(He.CLOSED,{reason:o.message});return}this._scheduleReconnect()}}_transition(o,l={}){if(o===this._state&&o!==He.RECONNECTING)return;this._state=o;const s={state:o,...l};for(const u of this._statusHandlers)try{u(s)}catch(f){console.error("[JaatoClient] status handler threw:",f)}}}const mp=[{name:"help",description:"Show available commands"},{name:"history",description:"Show conversation history"},{name:"exit",description:"Detach from the session"},{name:"quit",description:"Detach from the session"},{name:"stop",description:"Stop current model generation"},{name:"clear",description:"Clear output display"},{name:"context",description:"Show context window usage"},{name:"reset",description:"Clear conversation history"},{name:"theme",description:"Switch the UI theme (theme <name>)"}],q_=new Set(mp.map(i=>i.name)),H_=new Set(["tools","session","permissions","model","mcp","save","resume","memory","lsp","todo","waypoint","background","prompt-library","clarification","multimodal","notebook","references","sandbox","workspace","reliability"]),B_=[{name:"tools",description:"Manage tools available to the model"},{name:"tools list",description:"List all tools with enabled/disabled status"},{name:"tools enable",description:"Enable a tool (tools enable <name>|all)"},{name:"tools disable",description:"Disable a tool (tools disable <name>|all)"},{name:"model",description:"Switch to a different model"},{name:"session",description:"Manage sessions"},{name:"session list",description:"List sessions"},{name:"session new",description:"Create a new session"},{name:"session attach",description:"Attach to an existing session"},{name:"permissions",description:"Manage tool permissions"},{name:"permissions status",description:"Show permission status"},{name:"permissions whitelist",description:"Whitelist tools or patterns"},{name:"permissions blacklist",description:"Blacklist tools or patterns"},{name:"save",description:"Save current session"},{name:"resume",description:"Resume a saved session"},{name:"sessions",description:"List saved sessions"},{name:"plan",description:"Show current plan status"}];function pp(i,o={}){const l=i.trim();if(!l)return{action:"message",text:""};if(o.verbatim)return{action:"message",text:l};const s=l.toLowerCase(),u=l.split(/\s+/),f=(u[0]??"").toLowerCase(),p=u.slice(1);if(s==="exit"||s==="quit"||s==="q")return{action:"exit"};if(s==="stop")return{action:"stop"};if(s==="clear")return{action:"clear"};if(s==="help")return{action:"help"};if(s==="context")return{action:"context"};if(s==="history")return{action:"history"};if(f==="reset")return{action:"server",command:"reset",args:p};if(f==="tools"||f==="session"){const h=p[0]??"list";return{action:"server",command:`${f}.${h}`,args:p.slice(1)}}if(H_.has(f))return{action:"server",command:f,args:p};if(f==="theme")return{action:"server",command:"theme",args:p};for(const h of o.serverCommands??[]){const y=h.name.trim().toLowerCase().split(/\s+/)[0];if(!(!y||q_.has(y))&&(s===y||s.startsWith(y+" ")))return{action:"server",command:y,args:p}}return{action:"message",text:l}}function Lm(i,o){const l=pp(i,{serverCommands:o});return l.action==="message"?null:l.action==="server"?l.command??"":l.action}function G_(i,o){const l=i.replace(/^\s+/,"");if(l.includes("@")||l.startsWith("/")||l.startsWith("%"))return[];if(l.includes(`
|
|
10
|
+
`))return[];const s=/\s$/.test(l),u=l.trim()===""?[]:l.trim().split(/\s+/),f=new Set,p=[],h=(b,v,T)=>{const R=b.toLowerCase();f.has(R)||(f.add(R),p.push({insert:b,label:v,description:T}))};if(u.length===0){for(const b of o){const v=b.name.split(/\s+/)[0];v===b.name?h(v,b.name,b.description):h(v,v,void 0)}return p}const y=u[0].toLowerCase();if(u.length===1&&!s){for(const b of o){const v=b.name.split(/\s+/)[0];v.toLowerCase().startsWith(y)&&(v===b.name?h(v,b.name,b.description):h(v,v,void 0))}return p}const _=u.length===1?"":(u[1]??"").toLowerCase();if(u.length>2||u.length===2&&s)return[];for(const b of o){const v=b.name.split(/\s+/);if(v.length<2||v[0].toLowerCase()!==y)continue;const T=v[1];T.toLowerCase().startsWith(_)&&h(`${v[0]} ${T}`,`${v[0]} ${T}`,b.description)}return p}function hp(i){const o=new Map;for(const l of[...mp,...B_])o.set(l.name,l);for(const l of i)l.name&&o.set(l.name,l);return[...o.values()]}function Il(i){return typeof i=="string"&&i?i:void 0}function Y_(i,o){return typeof i=="string"?i:i&&typeof i=="object"?Il(i.text)??Il(i.label)??`choice ${o}`:`choice ${o}`}function qm(i){const o=i&&typeof i=="object"?i:{},l=Array.isArray(o.choices)?o.choices:Array.isArray(o.options)?o.options:[],s=l.map((y,_)=>Y_(y,_+1));let u=null;const f=l.findIndex(y=>!!y&&typeof y=="object"&&y.default===!0);f>=0?u=f+1:typeof o.default_choice=="number"?u=o.default_choice:(typeof o.default=="number"||typeof o.default=="string"&&o.default)&&(u=o.default);const p=l.map(y=>!!y&&typeof y=="object"&&y.expects_attachment===!0),h=o.required===!1||o.optional===!0;return{...o,question_text:Il(o.question_text)??Il(o.text),question_type:Il(o.question_type),options:s,default:u,optional:h,expects_attachment:p.some(Boolean)?p:void 0}}function Q_(i){return i.question_type==="multiple_choice"}function V_(i){if(i==null)return null;if(typeof i=="number")return Number.isFinite(i)?{count:i,byName:[]}:null;if(!Array.isArray(i))return null;const o=new Map;for(const l of i){const s=l&&typeof l=="object"&&typeof l.name=="string"?l.name:typeof l=="string"?l:"?";o.set(s,(o.get(s)??0)+1)}return{count:i.length,byName:[...o.entries()]}}function X_(i){if(i.count===0)return"no tool calls";const o=`${i.count} tool call${i.count===1?"":"s"}`;if(i.byName.length===0)return o;const l=i.byName.map(([s,u])=>u>1?`${s} ×${u}`:s).join(", ");return`${o} (${l})`}function K_(i){if(!i||typeof i!="object")return null;const o=i,l=String(o.id??o.session_id??"");return l?{id:l,name:String(o.name??""),description:String(o.description??""),provider:String(o.model_provider??""),model:String(o.model_name??""),isLoaded:o.is_loaded===!0,isCurrent:o.is_current===!0,clientCount:Number(o.client_count??0)||0,turnCount:Number(o.turn_count??0)||0,workspacePath:String(o.workspace_path??""),createdBy:o.created_by?String(o.created_by):void 0}:null}function Hm(i){return Array.isArray(i)?i.map(K_).filter(o=>o!==null):[]}function I_(i){if(i.length===0)return`No sessions available.
|
|
11
|
+
Use 'session new' to create one.`;const o=["Sessions:"," Use 'session attach <id>' to switch sessions",""];for(const l of i){const s=l.isCurrent?"▶":l.isLoaded?"●":"○",u=l.description||l.name,f=[` ${s} ${l.id}${u&&u!==l.id?` - ${u}`:""}`,l.provider?` [${l.provider}/${l.model}]`:"",l.clientCount?`, ${l.clientCount} client(s)`:"",l.turnCount?`, ${l.turnCount} turns`:""];o.push(f.join("")),l.workspacePath&&o.push(` ${l.workspacePath}`)}return o.push(""," ▶ current ● loaded ○ on disk"),o.join(`
|
|
12
|
+
`)}const gp=["session attach","session delete","resume"];function $_(i,o){const l=i.replace(/^\s+/,""),s=l.toLowerCase();for(const u of gp){if(!s.startsWith(u+" "))continue;const f=l.slice(u.length+1);if(/\s/.test(f.trim()))return null;const p=f.trim().toLowerCase();return o.filter(h=>h.id.toLowerCase().startsWith(p)).map(h=>({insert:`${u} ${h.id}`,label:h.id,description:[h.isCurrent?"current":h.isLoaded?"loaded":"on disk",h.description||h.name,h.provider?`${h.provider}/${h.model}`:"",h.workspacePath].filter(Boolean).join(" · ")}))}return null}function Z_(i){const o=i.replace(/^\s+/,"").toLowerCase();return gp.some(l=>o.startsWith(l+" "))}function J_(i,o){return o?i.filter(l=>l.workspacePath?o.path&&l.workspacePath.replace(/\/+$/,"")===o.path.replace(/\/+$/,"")?!0:l.workspacePath.replace(/\/+$/,"").split("/").pop()===o.name:!1):[]}function _p(i){return typeof i.text=="string"?i.text:""}function W_(i){const o=i.result??i.response;if(o==null)return"";if(typeof o=="string")return o;try{return JSON.stringify(o,null,2)}catch{return String(o)}}function F_(i,o,l,s){const u=[],f=new Map,p=Array.isArray(i)?i:[];for(const h of p){const y=String(h.role??"");let _="";for(const b of h.parts??[]){const v=String(b.type??"");if(v==="text")_+=_p(b);else if(v==="function_call"){_.trim()&&(u.push(y==="user"?{id:l(),kind:"user",agentId:o,text:_}:{id:l(),kind:"text",agentId:o,source:"model",text:_}),_="");const T=String(b.id??b.call_id??l()),R={id:l(),kind:"tool",agentId:o,callId:T,toolName:String(b.name??"tool"),args:b.args??{},status:"success",startedAt:0,output:"",media:[],expanded:s};f.set(T,R),u.push(R)}else if(v==="function_response"){const T=String(b.call_id??b.id??""),R=f.get(T)??[...f.values()].reverse().find(B=>B.toolName===String(b.name??"")&&!B.output);R&&(R.output=W_(b),b.is_error===!0&&(R.status="error"),f.delete(R.callId))}}_.trim()&&u.push(y==="user"?{id:l(),kind:"user",agentId:o,text:_}:{id:l(),kind:"text",agentId:o,source:"model",text:_})}return u}function P_(i,o){const l=Array.isArray(i)?i:[];if(l.length===0)return"No conversation history.";const s=Array.isArray(o)?o:[],u=[`Conversation History (${l.length} messages, ${s.length} turns):`,""];let f=0;return l.forEach((p,h)=>{const y=String(p.role??"unknown");u.push(y==="user"?"[User]":y==="model"?"[Model]":`[${y}]`);for(const v of p.parts??[]){const T=String(v.type??"");if(T==="text"){const R=_p(v);u.push(` ${R.length>500?R.slice(0,500)+"...":R}`)}else T==="function_call"?u.push(` [Function Call: ${String(v.name??"unknown")}]`):T==="function_response"&&u.push(` [Function Response: ${String(v.name??"unknown")}]`)}const _=h===l.length-1,b=!_&&String(l[h+1]?.role)==="user";if(y==="model"&&(_||b)){const v=s[f];if(v){const T=Number(v.prompt??0),R=Number(v.output??0),B=Number(v.total??T+R);u.push(` --- Turn ${f+1}: ${B.toLocaleString()} tokens (in: ${T.toLocaleString()}, out: ${R.toLocaleString()}) ---`)}f+=1}}),u.join(`
|
|
13
|
+
`)}const lc=300,sc=220,ic=720,yp="jaato.railWidth";function bp(i){return Number.isFinite(i)?Math.min(ic,Math.max(sc,Math.round(i))):lc}function ey(){try{const i=localStorage.getItem(yp);return i==null?lc:bp(Number(i))}catch{return lc}}function ty(i){try{localStorage.setItem(yp,String(i))}catch{}}const Vt="main";let ny=0;const We=()=>`b${++ny}`,Bm=()=>({sessionId:null,session:{},initProgress:null,agents:{[Vt]:{id:Vt,name:"main",type:"main",status:"idle"}},agentOrder:[Vt],selectedAgentId:Vt,blocks:{[Vt]:[]},toolOwner:{},permissions:[],clarifications:[],referenceSelections:[],postAuth:null,plan:{},context:{},workspaceFiles:{},workspaceHidden:[],workspaceShowHidden:!1,workspaceIgnored:{},workspaceNotice:null,permissionStatus:null,processing:{},exitChoice:null});function Qe(i){const o=i.agent_id;return typeof o=="string"&&o?o:Vt}function Qt(i,o){i.agents[o]||(i.agents={...i.agents,[o]:{id:o,name:o,type:"subagent",status:"idle"}},i.agentOrder=[...i.agentOrder,o]),i.blocks[o]||(i.blocks={...i.blocks,[o]:[]})}function it(i,o,l){i.blocks={...i.blocks,[o]:l}}function xp(i,o,l){if(!o)return null;const s=i.toolOwner[o]??l,u=i.blocks[s]??[];for(let f=u.length-1;f>=0;f--){const p=u[f];if(p&&p.kind==="tool"&&p.callId===o)return{agentId:s,index:f}}return null}function Gm(i,o,l,s){const u=xp(i,o,l);if(!u)return!1;const f=[...i.blocks[u.agentId]??[]];return f[u.index]=s(f[u.index]),it(i,u.agentId,f),!0}function Ym(i,o,l){const s=String(o.request_id??"");if(!s)return;const u=i.permissions.find(y=>y.requestId===s),f=Array.isArray(o.response_options)&&o.response_options.length?o.response_options:u?.options??[],p={requestId:s,agentId:Qe(o),toolName:String(o.tool_name??u?.toolName??""),callId:o.call_id??u?.callId??null,toolArgs:o.tool_args??u?.toolArgs??{},options:f,promptLines:o.prompt_lines??u?.promptLines??[],formatHint:o.format_hint??u?.formatHint??null,warnings:o.warnings??u?.warnings??null,warningLevel:o.warning_level??u?.warningLevel??null,editableMetadata:o.editable_metadata??u?.editableMetadata??null,focus:u?.focus??0,inputMode:l||(u?.inputMode??!1)};i.permissions=u?i.permissions.map(y=>y.requestId===s?p:y):[...i.permissions,p];const h=i.agents[p.agentId];h&&(i.agents={...i.agents,[p.agentId]:{...h,status:"awaiting_permission"}})}function ay(i,o){const l=o;switch(l.type){case q.CONNECTED:{const s=l.server_info??{};i.connection={...i.connection,phase:"connected",serverVersion:s.server_version??i.connection.serverVersion??null,protocolVersion:l.protocol_version??i.connection.protocolVersion??null};break}case q.AGENT_CREATED:{const s=Qe(l),u={id:s,name:String(l.agent_name??s),type:String(l.agent_type??(s===Vt?"main":"subagent")),parentId:l.parent_agent_id??null,profile:l.profile_name??null,status:i.agents[s]?.status??"idle"};i.agents={...i.agents,[s]:u},i.agentOrder.includes(s)||(i.agentOrder=[...i.agentOrder,s]),i.blocks[s]||(i.blocks={...i.blocks,[s]:[]});break}case q.AGENT_OUTPUT:{const s=Qe(l);Qt(i,s);const u=String(l.text??""),f=String(l.source??"model"),p=[...i.blocks[s]??[]],h=p[p.length-1];if(f==="user"||f==="parent"){if(l.mode==="append"&&h&&h.kind==="user"&&h.echoed)p[p.length-1]={...h,text:h.text+u};else{let y=p.length-1;for(;y>=0&&p[y].kind!=="user";)y-=1;const _=y>=0?p[y]:void 0;_&&!_.echoed&&_.text===u?p[y]={..._,echoed:!0}:p.push({id:We(),kind:"user",agentId:s,text:u,echoed:!0})}it(i,s,p);break}l.mode==="append"&&h&&h.kind==="text"&&h.source===f?p[p.length-1]={...h,text:h.text+u}:p.push({id:We(),kind:"text",agentId:s,source:f,text:u}),it(i,s,p);break}case q.AGENT_STATUS_CHANGED:{const s=Qe(l);Qt(i,s);const u=i.agents[s],f=String(l.status??u.status);i.agents={...i.agents,[s]:{...u,status:f,error:l.error??null}},i.processing={...i.processing,[s]:f==="processing"||f==="running"};break}case q.AGENT_COMPLETED:case q.AGENT_ERROR:{const s=Qe(l);Qt(i,s);const u=i.agents[s],f=l.type===q.AGENT_ERROR;if(i.agents={...i.agents,[s]:{...u,status:f?"error":"finished",error:f?String(l.error??""):null}},i.processing={...i.processing,[s]:!1},f){const p=[...i.blocks[s]??[]];p.push({id:We(),kind:"system",agentId:s,text:String(l.error??"agent error"),style:"error"}),it(i,s,p)}break}case q.TOOL_CALL_START:{const s=Qe(l);Qt(i,s);const u=String(l.call_id??We()),f={id:We(),kind:"tool",agentId:s,callId:u,toolName:String(l.tool_name??"tool"),args:l.tool_args??{},status:"running",startedAt:Date.now(),output:"",media:[],expanded:i.ui.showTools};it(i,s,[...i.blocks[s]??[],f]),i.toolOwner={...i.toolOwner,[u]:s};break}case q.TOOL_CALL_END:{const s=Qe(l),u=l.success!==!1&&l.is_error_result!==!0;if(!Gm(i,l.call_id,s,p=>({...p,status:u?"success":"error",durationSeconds:l.duration_seconds??null,errorMessage:l.error_message??null,resultStatus:l.result_status??null,isErrorResult:l.is_error_result===!0,backgrounded:l.backgrounded===!0,continuationId:l.continuation_id??null,showOutput:l.show_output===!0,showPopup:l.show_popup===!0,expanded:p.expanded||l.show_output===!0||!u}))){Qt(i,s);const p=String(l.call_id??We());it(i,s,[...i.blocks[s]??[],{id:We(),kind:"tool",agentId:s,callId:p,toolName:String(l.tool_name??"tool"),args:{},status:u?"success":"error",startedAt:Date.now(),output:"",media:[],expanded:!u,errorMessage:l.error_message??null}])}i.ui.popupCallId&&i.ui.popupCallId===l.call_id&&!l.continuation_id&&(i.ui={...i.ui,popupCallId:null});break}case q.TOOL_OUTPUT:{const s=Qe(l),u=l.call_id,f=l.mime_type,p=l.data_b64,h=String(l.chunk??""),y=f&&p?{mimeType:f,dataB64:p,streamId:l.stream_id,sequence:l.sequence,final:l.final===!0}:null;if(u==="model-output"){Qt(i,s);const b=[...i.blocks[s]??[]],v=b[b.length-1],T=l.final===!0?"success":"running";v&&v.kind==="tool"&&v.callId==="model-output"&&v.status==="running"?b[b.length-1]={...v,output:h?v.output+h:v.output,media:y?[...v.media,y]:v.media,status:T}:(y||h)&&b.push({id:We(),kind:"tool",agentId:s,callId:"model-output",toolName:"model output",args:{},status:T,startedAt:Date.now(),output:h,media:y?[y]:[],expanded:!0}),it(i,s,b);break}if(Gm(i,u,s,b=>({...b,output:h?b.output+h:b.output,media:y?[...b.media,y]:b.media}))&&h&&i.ui.popupCallId==null){const b=xp(i,u,s),v=b?i.blocks[b.agentId]?.[b.index]:void 0;v&&v.status==="running"&&(i.ui={...i.ui,popupCallId:v.callId})}break}case q.PERMISSION_REQUESTED:Ym(i,l,!1);break;case q.PERMISSION_INPUT_MODE:Ym(i,l,!0);break;case q.PERMISSION_RESOLVED:{const s=String(l.request_id??"");i.permissions=i.permissions.filter(p=>p.requestId!==s);const u=Qe(l),f=i.agents[u];f&&f.status==="awaiting_permission"&&(i.agents={...i.agents,[u]:{...f,status:"processing"}});break}case q.PERMISSION_STATUS:i.permissionStatus={effectiveDefault:String(l.effective_default??"ask"),suspensionScope:l.suspension_scope??null};break;case q.SESSION_LIST:{const s=Hm(l.sessions);if(i.sessions=s,i.sessionListSilent>0){i.sessionListSilent-=1;break}const u=i.selectedAgentId;it(i,u,[...i.blocks[u]??[],{id:We(),kind:"system",agentId:u,text:I_(s),style:"help"}]);break}case q.HISTORY:{const s=String(l.agent_id??i.selectedAgentId);Qt(i,s),i.historyMode==="replay"?(i.historyMode="listing",it(i,s,[...i.blocks[s]??[],...F_(l.history,s,We,i.ui.showTools)])):it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:P_(l.history,l.turn_accounting),style:"help"}]);break}case q.CLARIFICATION_BATCH:{const s=String(l.request_id??"");if(!s)break;const u=i.clarifications.find(p=>p.requestId===s),f={requestId:s,agentId:Qe(l),toolName:String(l.tool_name??""),context:l.context??null,questions:(Array.isArray(l.questions)?l.questions:[]).map(qm),index:u?.index??0,answers:u?.answers??[],batchOnly:l.batch_only===!0,inputMode:u?.inputMode??l.batch_only===!0};i.clarifications=u?i.clarifications.map(p=>p.requestId===s?f:p):[...i.clarifications,f];break}case q.CLARIFICATION_QUESTION:{const s=String(l.request_id??"");if(!s)break;const u=Number(l.question_index??0),f=qm({question_text:l.question_text,question_type:l.question_type,options:l.options??[]}),p=i.clarifications.find(h=>h.requestId===s);if(p){const h=[...p.questions];h[u]={...h[u]??{},...f},i.clarifications=i.clarifications.map(y=>y.requestId===s?{...y,questions:h,index:u}:y)}else{const h=[];h[u]=f,i.clarifications=[...i.clarifications,{requestId:s,agentId:Qe(l),toolName:String(l.tool_name??""),questions:h,index:u,answers:[],batchOnly:!1,inputMode:!1}]}break}case q.CLARIFICATION_INPUT_MODE:{const s=String(l.request_id??""),u=Number(l.question_index??0);i.clarifications.find(p=>p.requestId===s)?i.clarifications=i.clarifications.map(p=>p.requestId===s?{...p,index:u,inputMode:!0}:p):i.clarifications=[...i.clarifications,{requestId:s,agentId:Qe(l),toolName:String(l.tool_name??""),questions:[],index:u,answers:[],batchOnly:!1,inputMode:!0}];break}case q.CLARIFICATION_RESOLVED:{const s=String(l.request_id??"");i.clarifications=i.clarifications.filter(u=>u.requestId!==s);break}case q.REFERENCE_SELECTION_REQUESTED:{const s=String(l.request_id??"");if(!s)break;i.referenceSelections=[...i.referenceSelections.filter(u=>u.requestId!==s),{requestId:s,agentId:Qe(l),prompt:String(l.prompt??l.message??"Select a reference"),options:l.options??[]}];break}case q.REFERENCE_SELECTION_RESOLVED:i.referenceSelections=i.referenceSelections.filter(s=>s.requestId!==String(l.request_id??""));break;case q.POST_AUTH_SETUP:{const s=(l.available_models??[]).filter(u=>u&&u.name).map(u=>({name:String(u.name),description:u.description?String(u.description):void 0}));i.postAuth={requestId:String(l.request_id??""),providerName:String(l.provider_name??""),providerDisplayName:String(l.provider_display_name??l.provider_name??""),models:s,hasActiveSession:l.has_active_session===!0,currentProvider:l.current_provider||void 0,currentModel:l.current_model||void 0,workspacePath:l.workspace_path||void 0};break}case q.PLAN_UPDATED:{const s=Qe(l);i.plan={...i.plan,[s]:{name:String(l.plan_name??"Plan"),steps:l.steps??[]}};break}case q.PLAN_STEP_UPDATED:{const s=Qe(l),u=i.plan[s]??{name:"Plan",steps:[]},f=l.step_id,p={step_id:f,sequence:l.sequence,content:l.content,status:l.status,result:l.result,error:l.error,blocked_by:l.blocked_by,depends_on:l.depends_on},h=u.steps.findIndex(_=>_.step_id===f),y=[...u.steps];h>=0?y[h]={...y[h],...p}:y.push(p),i.plan={...i.plan,[s]:{...u,steps:y}};break}case q.PLAN_CLEARED:{const s=Qe(l),{[s]:u,...f}=i.plan;i.plan=f;break}case q.CONTEXT_UPDATED:{const s=Qe(l),u=i.context[s];i.context={...i.context,[s]:{...u??{usage:{}},usage:l.usage??u?.usage??{},contextLimit:l.context_limit??u?.contextLimit??null,percentUsed:l.percent_used??u?.percentUsed??null,tokensRemaining:l.tokens_remaining??u?.tokensRemaining??null,turns:l.turns??u?.turns??null}};break}case q.TURN_COMPLETED:{const s=Qe(l),u=i.context[s]??{usage:{}};i.context={...i.context,[s]:{...u,lastTurn:{turnNumber:l.turn_number,durationSeconds:l.duration_seconds,toolCalls:V_(l.function_calls),finishReason:l.finish_reason,usage:l.usage}}},i.processing={...i.processing,[s]:!1};const f=i.agents[s];f&&f.status==="processing"&&(i.agents={...i.agents,[s]:{...f,status:"idle"}});break}case q.SYSTEM_MESSAGE:{const s=Qe(l);Qt(i,s),it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:String(l.message??""),style:String(l.style??"info")}]);break}case q.HELP_TEXT:{const s=i.selectedAgentId,f=(l.lines??[]).map(p=>Array.isArray(p)?String(p[0]??""):String(p)).join(`
|
|
14
|
+
`)||String(l.text??"");it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:f,style:"help"}]);break}case q.ERROR:{if(String(l.error??"").toLowerCase().includes("workspace mode not enabled")){i.workspace={...i.workspace,mode:"disabled"};break}const s=Qe(l);Qt(i,s),it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:`${l.error_type?`[${String(l.error_type)}] `:""}${String(l.error??"error")}`,style:"error"}]);break}case q.RETRY:{const s=Qe(l);Qt(i,s),it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:`Retrying (${String(l.attempt??"?")}/${String(l.max_attempts??"?")}): ${String(l.reason??l.error??"")}`,style:"warning"}]);break}case q.INIT_PROGRESS:i.initProgress={step:l.step,status:l.status,message:l.message,stepNumber:l.step_number,totalSteps:l.total_steps},(l.status==="complete"||l.status==="done"||l.status==="ready")&&(i.initProgress=null);break;case q.SESSION_INFO:{const s=l.session_id;s&&(i.sessionId=s),Array.isArray(l.sessions)&&(i.sessions=Hm(l.sessions)),i.session={...i.session,name:l.session_name??i.session.name??null,provider:l.model_provider??i.session.provider??null,model:l.model_name??i.session.model??null,profile:l.profile_name??i.session.profile??null,models:l.models??i.session.models};break}case q.SESSION_PROFILES:i.profiles=(l.profiles??[]).map(s=>({...s,name:String(s.name??"")}));break;case q.SESSION_TERMINATED:case q.DISCONNECTED:{const s=i.selectedAgentId;it(i,s,[...i.blocks[s]??[],{id:We(),kind:"system",agentId:s,text:l.type===q.SESSION_TERMINATED?`Session ended${l.reason?`: ${String(l.reason)}`:""}`:"Disconnected",style:"warning"}]);break}case q.COMMAND_LIST:i.commands=hp((l.commands??[]).map(s=>({name:String(s.name??""),description:s.description})));break;case q.WORKSPACE_LIST:i.workspace={...i.workspace,mode:"enabled",root:l.root,list:(l.workspaces??[]).map(s=>({...s,name:String(s.name??""),configured:s.configured===!0}))};break;case q.WORKSPACE_CREATED:{const s=l.workspace??{},u=String(s.name??l.name??"");if(!u)break;const f={...s,name:u,path:s.path??l.path??null,configured:s.configured===!0};i.workspace={...i.workspace,list:[...i.workspace.list.filter(p=>p.name!==u),f]};break}case q.WORKSPACE_DELETED:{const s=String(l.name??"");if(l.ok===!1){i.workspace={...i.workspace,notice:{text:String(l.error||`Could not delete workspace ${s}`),error:!0}};break}i.workspace={...i.workspace,list:i.workspace.list.filter(u=>u.name!==s),selected:i.workspace.selected===s?void 0:i.workspace.selected,config:i.workspace.config?.workspace===s?void 0:i.workspace.config,notice:{text:`Workspace ${s} deleted`}};break}case q.CONFIG_UPDATED:{const s=String(l.workspace??i.workspace.selected??"");if(l.success===!1){i.workspace={...i.workspace,notice:{text:String(l.error||`Could not save the configuration of ${s}`),error:!0}};break}const u=l.provider||null,f=l.model||null,p=i.workspace.config,h={workspace:s,configured:u!==null,provider:u,model:f,availableProviders:p?.availableProviders??[],missingFields:[...u?[]:["provider"],...f?[]:["model"]]};i.workspace={...i.workspace,config:h,selected:s||i.workspace.selected,list:i.workspace.list.map(y=>y.name===s?{...y,configured:h.configured,provider:u,model:f}:y)};break}case q.CONFIG_STATUS:{const s={workspace:String(l.workspace??i.workspace.selected??""),configured:l.configured===!0,provider:l.provider??null,model:l.model??null,availableProviders:l.available_providers??[],missingFields:l.missing_fields??[]};i.workspace={...i.workspace,config:s,selected:s.workspace||i.workspace.selected};break}case q.WORKSPACE_FILES_CHANGED:{const s={...i.workspaceFiles};for(const u of l.changes??[]){const f=u.path??u.file;if(!f)continue;const p=u.status??u.change??u.type??"modified";p==="deleted"?delete s[f]:s[f]=p}i.workspaceFiles=s;break}case q.WORKSPACE_FILES_SNAPSHOT:{const s={};for(const u of l.files??[])if(typeof u=="string")s[u]="modified";else if(u&&typeof u=="object"){const f=u,p=f.path??f.file,h=f.status??f.change??f.type??"modified";p&&h!=="deleted"&&(s[p]=h)}i.workspaceFiles=s;break}case q.WORKSPACE_IGNORE_RESULT:{const s=String(l.path??"");if(l.ok===!1){i.workspaceNotice={text:String(l.error||`Could not update .gitignore for ${s}`),error:!0};break}const u=l.ignored===!0;i.workspaceIgnored={...i.workspaceIgnored,[s]:u},i.workspaceNotice={text:`${s} ${u?"added to":"removed from"} .gitignore`};break}}return i}const L=w_()((i,o)=>({connection:{phase:"disconnected"},url:"",screen:"connect",credentialsUrl:null,backend:null,workspace:{mode:"unknown",list:[]},profiles:[],sessions:[],sessionListSilent:0,historyMode:"listing",commands:hp([]),uploads:[],...Bm(),ui:{showPlan:!1,showBudget:!1,showWorkspace:!1,showTools:!1,theme:"light",popupCallId:null,railWidth:ey()},dispatch:l=>i(s=>{const u={...s};for(const f of l)ay(u,f);return u}),setConnection:l=>i(s=>({connection:{...s.connection,...l}})),setUrl:l=>i({url:l}),setScreen:l=>i({screen:l}),setCredentialsUrl:l=>i({credentialsUrl:l}),setBackend:l=>i({backend:l}),setWorkspaceMode:l=>i(s=>({workspace:{...s.workspace,mode:l}})),selectWorkspace:l=>i(s=>({workspace:{...s.workspace,selected:l}})),selectAgent:l=>i({selectedAgentId:l}),addUserBlock:(l,s)=>i(u=>({blocks:{...u.blocks,[l]:[...u.blocks[l]??[],{id:We(),kind:"user",agentId:l,text:s}]}})),addSystemBlock:(l,s,u="info")=>i(f=>({blocks:{...f.blocks,[l]:[...f.blocks[l]??[],{id:We(),kind:"system",agentId:l,text:s,style:u}]}})),clearOutput:l=>i(s=>({blocks:{...s.blocks,[l]:[]}})),toggleTool:(l,s)=>i(u=>({blocks:{...u.blocks,[l]:(u.blocks[l]??[]).map(f=>f.id===s&&f.kind==="tool"?{...f,expanded:!f.expanded}:f)}})),setAllToolsExpanded:(l,s)=>i(u=>({blocks:{...u.blocks,[l]:(u.blocks[l]??[]).map(f=>f.kind==="tool"?{...f,expanded:s}:f)}})),resolvePermission:l=>i(s=>({permissions:s.permissions.filter(u=>u.requestId!==l)})),openExitChoice:(l,s)=>i({exitChoice:{running:l,options:s,focus:0}}),closeExitChoice:()=>i({exitChoice:null}),focusExitChoice:l=>i(s=>s.exitChoice?{exitChoice:{...s.exitChoice,focus:l}}:{}),focusPermission:(l,s)=>i(u=>({permissions:u.permissions.map(f=>f.requestId===l?{...f,focus:s}:f)})),answerClarification:(l,s)=>{const u=o().clarifications.find(h=>h.requestId===l);if(!u)return;const f=[...u.answers];f[u.index]=s;const p={...u,answers:f,index:u.index+1,inputMode:u.batchOnly};return i(h=>({clarifications:h.clarifications.map(y=>y.requestId===l?p:y)})),p},dismissClarification:l=>i(s=>({clarifications:s.clarifications.filter(u=>u.requestId!==l)})),dismissReferenceSelection:l=>i(s=>({referenceSelections:s.referenceSelections.filter(u=>u.requestId!==l)})),dismissPostAuth:()=>i({postAuth:null}),toggleUi:l=>i(s=>({ui:{...s.ui,[l]:!s.ui[l]}})),setToolsExpanded:l=>i(s=>({ui:{...s.ui,showTools:l},blocks:Object.fromEntries(Object.entries(s.blocks).map(([u,f])=>[u,f.map(p=>p.kind==="tool"?{...p,expanded:l}:p)]))})),setSessionListSilent:l=>i(s=>({sessionListSilent:Math.max(0,s.sessionListSilent+l)})),setHistoryMode:l=>i({historyMode:l}),toggleWorkspaceHidden:l=>i(s=>({workspaceHidden:s.workspaceHidden.includes(l)?s.workspaceHidden.filter(u=>u!==l):[...s.workspaceHidden,l]})),toggleWorkspaceShowHidden:()=>i(l=>({workspaceShowHidden:!l.workspaceShowHidden})),setWorkspaceNotice:l=>i(()=>({workspaceNotice:l})),setWorkspaceListNotice:l=>i(s=>({workspace:{...s.workspace,notice:l}})),setTheme:l=>i(s=>({ui:{...s.ui,theme:l}})),setPopup:l=>i(s=>({ui:{...s.ui,popupCallId:l}})),setRailWidth:l=>i(s=>{const u=bp(l);return ty(u),{ui:{...s.ui,railWidth:u}}}),addUploads:l=>i(s=>({uploads:[...s.uploads,...l]})),updateUpload:(l,s)=>i(u=>({uploads:u.uploads.map(f=>f.id===l?{...f,...s}:f)})),removeUpload:l=>i(s=>({uploads:s.uploads.filter(u=>u.id!==l)})),takeUploads:()=>{const l=o().uploads.filter(s=>s.status==="staged").map(s=>s.path);return i(s=>({uploads:s.uploads.filter(u=>u.status==="queued"||u.status==="staging")})),l},resetSessionState:()=>i(()=>({...Bm()}))})),ly=i=>o=>o.blocks[i]??sy,sy=[],iy="dark",ry="Default dark theme",oy="1.0",cy={primary:"#5fd7ff",secondary:"#87d787",accent:"#d7af87",success:"#5fd75f",warning:"#ffff5f",error:"#ff5f5f",muted:"#808080",background:"#1a1a1a",surface:"#333333",text:"#ffffff",text_muted:"#aaaaaa"},uy={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#404040"},agent_tab_hint:{fg:"#606060",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#5f87ff"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#404040"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#555555",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#5f87ff",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"muted",dim:!0,italic:!0},plan_popup_empty_border:{fg:"muted",dim:!0},plan_popup_scroll_indicator:{fg:"muted",dim:!0,italic:!0},plan_popup_hint:{fg:"muted",dim:!0},plan_popup_step_number:{fg:"muted",dim:!0},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"muted",dim:!0},plan_popup_error_prefix:{fg:"muted",dim:!0},plan_popup_separator:{fg:"muted",dim:!0},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"muted",dim:!0},plan_blocked:{fg:"#af87ff",bg:"surface"},plan_dependency:{fg:"#af87ff",dim:!0},plan_received_output:{fg:"#5fafaf",dim:!0},user_header:{fg:"success",bold:!0},user_header_separator:{fg:"success",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"primary",dim:!0},thinking_header_separator:{dim:!0},thinking_border:{fg:"primary",dim:!0},thinking_content:{dim:!0,italic:!0},thinking_footer:{fg:"primary",dim:!0},thinking_footer_separator:{dim:!0},tool_output:{fg:"#87D7D7",italic:!0},tool_source_label:{fg:"#808080",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"primary",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#5fafaf"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"muted",dim:!0},tool_output_popup_hint:{fg:"muted",dim:!0,italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"success",bold:!0},notebook_output_label:{fg:"primary",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#87d7d7",bg:"#2d2d3d"},markdown_link:{fg:"#5f87ff",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"muted",dim:!0},pane_separator:{fg:"#808080"},pane_separator_focused:{fg:"#5f87ff",bold:!0},hint:{fg:"muted",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"success",fg:"text"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#5f87ff"},budget_gc_ephemeral:{dim:!0}},fy={name:iy,description:ry,version:oy,colors:cy,semantic:uy},dy="light",my="Light theme for bright terminals",py="1.0",hy={primary:"#0077cc",secondary:"#006600",accent:"#996600",success:"#006600",warning:"#996600",error:"#cc0000",muted:"#666666",background:"#f5f5f5",surface:"#ffffff",text:"#000000",text_muted:"#666666"},gy={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#aaaaaa"},agent_tab_hint:{fg:"#888888",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#0055cc"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#aaaaaa"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#bbbbbb",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#0055cc",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"#666666",italic:!0},plan_popup_empty_border:{fg:"#888888"},plan_popup_scroll_indicator:{fg:"#666666",italic:!0},plan_popup_hint:{fg:"#666666"},plan_popup_step_number:{fg:"#555555"},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"#555555"},plan_popup_error_prefix:{fg:"#555555"},plan_popup_separator:{fg:"#888888"},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"#555555"},plan_blocked:{fg:"#7744aa",bg:"surface"},plan_dependency:{fg:"#7744aa"},plan_received_output:{fg:"#227788"},user_header:{fg:"success",bold:!0},user_header_separator:{fg:"success",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"#555555"},thinking_header_separator:{fg:"#888888"},thinking_border:{fg:"#888888"},thinking_content:{fg:"#555555",italic:!0},thinking_footer:{fg:"#555555"},thinking_footer_separator:{fg:"#888888"},tool_output:{fg:"#006688",italic:!0},tool_source_label:{fg:"#555555",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"#0055cc",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#006688"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"#666666"},tool_output_popup_hint:{fg:"#666666",italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"success",bold:!0},notebook_output_label:{fg:"primary",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#0055aa",bg:"#e8e8f0"},markdown_link:{fg:"#0055aa",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"muted",dim:!0},pane_separator:{fg:"#aaaaaa"},pane_separator_focused:{fg:"#0055cc",bold:!0},hint:{fg:"muted",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"success",fg:"text"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#0055cc"},budget_gc_ephemeral:{fg:"#888888"}},_y={name:dy,description:my,version:py,colors:hy,semantic:gy},yy="high-contrast",by="High contrast theme for accessibility",xy="1.0",vy={primary:"#00ffff",secondary:"#00ff00",accent:"#ffaa00",success:"#00ff00",warning:"#ffff00",error:"#ff0000",muted:"#aaaaaa",background:"#000000",surface:"#1a1a1a",text:"#ffffff",text_muted:"#cccccc"},Sy={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#404040"},agent_tab_hint:{fg:"#606060",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#5f87ff"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#404040"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#555555",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#5f87ff",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"#aaaaaa",italic:!0},plan_popup_empty_border:{fg:"#aaaaaa"},plan_popup_scroll_indicator:{fg:"#cccccc",italic:!0},plan_popup_hint:{fg:"#cccccc"},plan_popup_step_number:{fg:"#aaaaaa"},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"#aaaaaa"},plan_popup_error_prefix:{fg:"#aaaaaa"},plan_popup_separator:{fg:"#aaaaaa"},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"#cccccc"},plan_blocked:{fg:"#cc88ff",bg:"surface"},plan_dependency:{fg:"#cc88ff"},plan_received_output:{fg:"#66dddd"},user_header:{fg:"success",bold:!0},user_header_separator:{fg:"success",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"#cccccc"},thinking_header_separator:{fg:"#aaaaaa"},thinking_border:{fg:"#cccccc"},thinking_content:{fg:"#cccccc",italic:!0},thinking_footer:{fg:"#cccccc"},thinking_footer_separator:{fg:"#aaaaaa"},tool_output:{fg:"#87D7D7",italic:!0},tool_source_label:{fg:"#808080",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"primary",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#66dddd"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"#cccccc"},tool_output_popup_hint:{fg:"#cccccc",italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"success",bold:!0},notebook_output_label:{fg:"primary",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#00ffff",bg:"#1a1a2e"},markdown_link:{fg:"#66ccff",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"#aaaaaa"},pane_separator:{fg:"#aaaaaa"},pane_separator_focused:{fg:"#00ffff",bold:!0},hint:{fg:"#cccccc",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"success",fg:"text"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#5f87ff"},budget_gc_ephemeral:{fg:"#aaaaaa"}},Ey={name:yy,description:by,version:xy,colors:vy,semantic:Sy},Ty="dracula",Ny="Dracula-inspired theme with pink accents and purple-tinted dark background",wy="1.0",ky={primary:"#ff79c6",secondary:"#50fa7b",accent:"#ffb86c",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",muted:"#6272a4",background:"#282a36",surface:"#44475a",text:"#f8f8f2",text_muted:"#6272a4"},Ay={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#44475a"},agent_tab_hint:{fg:"#6272a4",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#bd93f9"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#44475a"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#6272a4",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#bd93f9",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"muted",dim:!0,italic:!0},plan_popup_empty_border:{fg:"muted",dim:!0},plan_popup_scroll_indicator:{fg:"muted",dim:!0,italic:!0},plan_popup_hint:{fg:"muted",dim:!0},plan_popup_step_number:{fg:"muted",dim:!0},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"muted",dim:!0},plan_popup_error_prefix:{fg:"muted",dim:!0},plan_popup_separator:{fg:"muted",dim:!0},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"muted",dim:!0},plan_blocked:{fg:"#bd93f9",bg:"surface"},plan_dependency:{fg:"#bd93f9",dim:!0},plan_received_output:{fg:"#8be9fd",dim:!0},user_header:{fg:"secondary",bold:!0},user_header_separator:{fg:"secondary",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"#bd93f9",dim:!0},thinking_header_separator:{fg:"#bd93f9",dim:!0},thinking_border:{fg:"#bd93f9",dim:!0},thinking_content:{fg:"#6272a4",dim:!0,italic:!0},thinking_footer:{fg:"#bd93f9",dim:!0},thinking_footer_separator:{fg:"#bd93f9",dim:!0},tool_output:{fg:"#8be9fd",italic:!0},tool_source_label:{fg:"#6272a4",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"primary",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#8be9fd"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"muted",dim:!0},tool_output_popup_hint:{fg:"muted",dim:!0,italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"secondary",bold:!0},notebook_output_label:{fg:"#8be9fd",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#8be9fd",bg:"#383a59"},markdown_link:{fg:"#bd93f9",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"muted",dim:!0},pane_separator:{fg:"#6272a4"},pane_separator_focused:{fg:"#8be9fd",bold:!0},hint:{fg:"muted",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"#bd93f9",fg:"text"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#bd93f9"},budget_gc_ephemeral:{fg:"#6272a4"}},jy={name:Ty,description:Ny,version:wy,colors:ky,semantic:Ay},Oy="latte",Cy="Light cream theme with orange accents",Ry="1.0",My={primary:"#e07040",secondary:"#40a040",accent:"#d08030",success:"#40a040",warning:"#c09020",error:"#c04040",muted:"#908070",background:"#f8f4f0",surface:"#ffffff",text:"#3d3530",text_muted:"#807060"},Dy={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#d0c8c0"},agent_tab_hint:{fg:"#a09080",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#4080c0"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#d0c8c0"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#c0b8b0",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#4080c0",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"muted",dim:!0,italic:!0},plan_popup_empty_border:{fg:"muted",dim:!0},plan_popup_scroll_indicator:{fg:"muted",dim:!0,italic:!0},plan_popup_hint:{fg:"muted",dim:!0},plan_popup_step_number:{fg:"muted",dim:!0},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"muted",dim:!0},plan_popup_error_prefix:{fg:"muted",dim:!0},plan_popup_separator:{fg:"muted",dim:!0},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"muted",dim:!0},plan_blocked:{fg:"#8839ef",bg:"surface"},plan_dependency:{fg:"#8839ef"},plan_received_output:{fg:"#179299"},user_header:{fg:"secondary",bold:!0},user_header_separator:{fg:"secondary",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"#a08060",dim:!0},thinking_header_separator:{fg:"#a08060",dim:!0},thinking_border:{fg:"#a08060",dim:!0},thinking_content:{fg:"#807060",dim:!0,italic:!0},thinking_footer:{fg:"#a08060",dim:!0},thinking_footer_separator:{fg:"#a08060",dim:!0},tool_output:{fg:"#408080",italic:!0},tool_source_label:{fg:"#908070",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"primary",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#179299"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"muted",dim:!0},tool_output_popup_hint:{fg:"muted",dim:!0,italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"secondary",bold:!0},notebook_output_label:{fg:"primary",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#1e66f5",bg:"#f0ece8"},markdown_link:{fg:"#1e66f5",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"muted",dim:!0},pane_separator:{fg:"#aaaaaa"},pane_separator_focused:{fg:"#0055cc",bold:!0},hint:{fg:"muted",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"primary",fg:"#ffffff"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#4080c0"},budget_gc_ephemeral:{fg:"#a09080"}},zy={name:Oy,description:Cy,version:Ry,colors:My,semantic:Dy},Uy="mocha",Ly="Warm brownish theme with teal accents",qy="1.0",Hy={primary:"#5fd7d7",secondary:"#87d787",accent:"#d7875f",success:"#87d787",warning:"#d7d75f",error:"#d75f5f",muted:"#8a7a6a",background:"#3d2b2b",surface:"#4a3838",text:"#e8e0d8",text_muted:"#a89888"},By={agent_tab_selected:{fg:"primary",bold:!0,underline:!0},agent_tab_dim:{fg:"muted"},agent_tab_separator:{fg:"#5a4a4a"},agent_tab_hint:{fg:"#7a6a5a",italic:!0},agent_tab_scroll:{fg:"primary",bold:!0},agent_processing:{fg:"#87afff"},agent_awaiting:{fg:"primary"},agent_finished:{fg:"muted"},agent_error:{fg:"error"},agent_permission:{fg:"warning"},agent_popup_border:{fg:"primary"},agent_popup_icon:{fg:"primary"},agent_popup_name:{fg:"text",bold:!0},session_bar_bg:{bg:"background"},session_bar_label:{fg:"muted"},session_bar_id:{fg:"primary"},session_bar_separator:{fg:"#5a4a4a"},session_bar_description:{fg:"secondary"},session_bar_workspace:{fg:"accent"},status_bar_bg:{bg:"surface"},status_bar_label:{fg:"muted",bg:"surface"},status_bar_value:{fg:"text",bg:"surface",bold:!0},status_bar_separator:{fg:"#6a5a5a",bg:"surface"},status_bar_warning:{fg:"warning"},output_panel_bg:{bg:"background"},plan_pending:{fg:"muted",bg:"surface"},plan_in_progress:{fg:"#87afff",bg:"surface"},plan_completed:{fg:"success",bg:"surface"},plan_failed:{fg:"error",bg:"surface"},plan_skipped:{fg:"warning",bg:"surface"},plan_active:{fg:"primary",bg:"surface"},plan_cancelled:{fg:"warning",bg:"surface",dim:!0},plan_popup_border:{fg:"primary"},plan_popup_background:{bg:"background"},plan_result:{fg:"success",dim:!0},plan_error_text:{fg:"error",dim:!0},plan_popup_empty:{fg:"muted",dim:!0,italic:!0},plan_popup_empty_border:{fg:"muted",dim:!0},plan_popup_scroll_indicator:{fg:"muted",dim:!0,italic:!0},plan_popup_hint:{fg:"muted",dim:!0},plan_popup_step_number:{fg:"muted",dim:!0},plan_popup_step_description:{fg:"text"},plan_popup_step_active:{fg:"text",bold:!0},plan_popup_result_prefix:{fg:"muted",dim:!0},plan_popup_error_prefix:{fg:"muted",dim:!0},plan_popup_separator:{fg:"muted",dim:!0},plan_popup_progress:{fg:"text",bold:!0},plan_popup_progress_detail:{fg:"muted",dim:!0},plan_blocked:{fg:"#cba6f7",bg:"surface"},plan_dependency:{fg:"#cba6f7",dim:!0},plan_received_output:{fg:"#94e2d5",dim:!0},user_header:{fg:"secondary",bold:!0},user_header_separator:{fg:"secondary",dim:!0},model_header:{fg:"primary",bold:!0},model_header_separator:{fg:"primary",dim:!0},thinking_header:{fg:"accent",dim:!0},thinking_header_separator:{fg:"accent",dim:!0},thinking_border:{fg:"accent",dim:!0},thinking_content:{fg:"#a89888",dim:!0,italic:!0},thinking_footer:{fg:"accent",dim:!0},thinking_footer_separator:{fg:"accent",dim:!0},tool_output:{fg:"#87d7d7",italic:!0},tool_source_label:{fg:"#8a7a6a",dim:!0},tool_name:{fg:"primary"},tool_border:{dim:!0},tool_success:{fg:"success"},tool_error:{fg:"error",dim:!0},tool_pending:{fg:"warning",bold:!0},tool_duration:{dim:!0},tool_selected:{fg:"text"},tool_unselected:{dim:!0},tool_indicator:{fg:"primary",dim:!0},workspace_popup_border:{fg:"primary"},workspace_popup_background:{bg:"background"},tool_output_popup_border:{fg:"#94e2d5"},tool_output_popup_background:{fg:"text",bg:"background"},tool_output_popup_header:{fg:"text",bold:!0},tool_output_popup_scroll:{fg:"muted",dim:!0},tool_output_popup_hint:{fg:"muted",dim:!0,italic:!0},file_output_header:{fg:"primary",bold:!0},notebook_input_label:{fg:"secondary",bold:!0},notebook_output_label:{fg:"primary",bold:!0},notebook_error_label:{fg:"error",bold:!0},inline_code:{fg:"#94e2d5",bg:"#453838"},markdown_link:{fg:"#89b4fa",underline:!0},line:{fg:"text"},permission_prompt:{fg:"warning",bold:!0},permission_text:{fg:"primary"},permission_denied:{fg:"error",dim:!0},clarification_label:{fg:"primary"},clarification_icon:{fg:"primary"},clarification_required:{fg:"warning"},clarification_answer:{fg:"success",dim:!0},clarification_question:{dim:!0},clarification_resolved:{fg:"success",bold:!0},security_error_header:{fg:"error",bold:!0},security_error_text:{fg:"error"},security_warning_header:{fg:"warning",bold:!0},security_warning_text:{fg:"warning"},security_info_header:{fg:"primary",bold:!0},security_info_text:{fg:"primary"},system_info:{dim:!0},system_highlight:{fg:"primary"},system_error:{fg:"error"},system_error_bold:{fg:"error",bold:!0},system_warning:{fg:"warning"},system_success:{fg:"success"},system_emphasis:{bold:!0},system_version:{fg:"primary",bold:!0},system_progress:{dim:!0,italic:!0},system_init_error:{fg:"error",dim:!0},pager_nav:{fg:"primary",bold:!0},spinner:{fg:"primary"},separator:{fg:"muted",dim:!0},pane_separator:{fg:"#808080"},pane_separator_focused:{fg:"#5f87ff",bold:!0},hint:{fg:"muted",italic:!0},scroll_indicator:{fg:"muted",dim:!0,italic:!0},scroll_arrow:{fg:"primary",dim:!0},muted:{dim:!0},emphasis:{bold:!0},warning_icon:{fg:"warning"},panel_border:{fg:"primary"},tree_connector:{dim:!0},truncation:{fg:"primary",dim:!0,italic:!0},debug_line_number:{fg:"muted",dim:!0},completion_bg:{bg:"surface",fg:"text"},completion_selected:{bg:"primary",fg:"#3d2b2b"},completion_meta:{bg:"surface",fg:"muted"},pending_prompt:{fg:"primary"},pending_prompt_overflow:{fg:"muted",italic:!0},input_text:{fg:"text"},input_prompt:{fg:"primary",bold:!0},search_prompt:{fg:"warning",bold:!0},search_match:{bg:"warning",fg:"background",bold:!0},search_match_current:{bg:"primary",fg:"background",bold:!0},budget_panel_border:{fg:"primary"},budget_popup_background:{bg:"background"},budget_header:{bold:!0},budget_gc_locked:{fg:"error"},budget_gc_preservable:{fg:"warning"},budget_gc_partial:{fg:"#87afff"},budget_gc_ephemeral:{fg:"#8a7a6a"}},Gy={name:Uy,description:Ly,version:qy,colors:Hy,semantic:By},Yy=[fy,_y,Ey,jy,zy,Gy],la=Object.fromEntries(Yy.map(i=>[i.name,i])),Qm=Object.keys(la),Vm={light:"#5980a6",dark:"#94bce3"},Qy={light:{background:"#f2f2f3",surface:"#ffffff",text:"#1d1f20",text_muted:"#5d5d60",muted:"#7a7a7d"},dark:{surface:"#202223"}};function Vy(i){const o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(i);if(!o)return 0;const[l,s,u]=[o[1],o[2],o[3]].map(f=>parseInt(f,16)/255);return .2126*l+.7152*s+.0722*u}function vp(i){const o=la[i];return o?Vy(o.colors.background)<.5:!0}function Xy(i){const o=la[i]??la.light;return{...{...o.colors,...Qy[o.name]??{}},steel:vp(o.name)?Vm.dark:Vm.light}}function Sp(i){const o=la[i]??la.light,l=document.documentElement,s=Xy(o.name),u={"--c-primary":s.primary,"--c-secondary":s.secondary,"--c-accent":s.accent??s.secondary,"--c-success":s.success,"--c-warning":s.warning,"--c-error":s.error,"--c-muted":s.muted,"--c-bg":s.background,"--c-surface":s.surface,"--c-text":s.text,"--c-text-muted":s.text_muted,"--c-steel":s.steel};for(const[f,p]of Object.entries(u))l.style.setProperty(f,p);l.dataset.theme=o.name,l.style.colorScheme=vp(o.name)?"dark":"light"}const Ep="jaato.theme",Ky="light";function Iy(){try{const i=localStorage.getItem(Ep);if(i&&la[i])return i}catch{}return Ky}function $y(i){try{localStorage.setItem(Ep,i)}catch{}}let sa=null,_i=[],rc=!1;function Xm(){if(rc=!1,!_i.length)return;const i=_i;_i=[],L.getState().dispatch(i)}function Zy(i){_i.push(i),!rc&&(rc=!0,typeof requestAnimationFrame=="function"?requestAnimationFrame(Xm):setTimeout(Xm,16))}let yi=!1;function Jy(i){const o={DISCONNECTED:"disconnected",CONNECTING:"connecting",CONNECTED:"connected",RECONNECTING:"reconnecting",CLOSED:"closed"},l=String(i.state),s=o[l]??o[l.toUpperCase()]??"disconnected";L.getState().setConnection({phase:s,detail:i.reason,attempt:i.attempt,serverVersion:i.serverVersion??void 0}),s==="reconnecting"?yi=!0:s==="connected"&&yi&&(yi=!1,Tp())}function Wy(){return{client_type:"web",content_width:typeof window<"u"?Math.max(40,Math.floor(window.innerWidth*.7/8)):120,content_height:null,supports_markdown:!0,supports_tables:!0,supports_code_blocks:!0,supports_images:!0,supports_rich_text:!0,supports_unicode:!0,supports_mermaid:!1,supports_expandable_content:!0,renderable_media:["image/*","audio/*"]}}async function Fy(i){await mc();const o=L.getState();o.setUrl(i.url),o.setConnection({phase:"connecting",detail:void 0});const l=new dp({url:i.url,token:i.token,clientConfig:{presentation:Wy()}});yi=!1,l.onStatus(Jy),l.subscribeAll(s=>Zy(s)),sa=l;try{await l.connect()}catch(s){throw sa=null,L.getState().setConnection({phase:"disconnected",detail:s instanceof Error?s.message:String(s)}),s}return l}async function mc(){const i=sa;sa=null,L.getState().resetSessionState(),i&&await i.close().catch(()=>{})}function Re(){if(!sa)throw new Error("Not connected");return sa}function Zl(){return sa!==null}async function Tp(){const i=L.getState(),o=i.workspace.selected,l=i.sessionId;if(!(!o&&!l))try{o&&await oc(o),l&&await Re().attachSession(l)}catch(s){const u=L.getState();u.addSystemBlock(u.selectedAgentId,`Reconnected, but this connection could not be restored: ${s instanceof Error?s.message:String(s)}`,"error")}}async function Np(){await Re().sendRawEvent({type:q.WORKSPACE_LIST_REQUEST})}async function oc(i){await Re().sendRawEvent({type:q.WORKSPACE_SELECT_REQUEST,name:i})}async function Py(i){await Re().sendRawEvent({type:q.WORKSPACE_CREATE_REQUEST,name:i})}async function eb(i){await Re().sendRawEvent({type:q.WORKSPACE_DELETE_REQUEST,name:i})}async function tb(i){await Re().sendRawEvent({type:q.CONFIG_UPDATE_REQUEST,...i})}function nb(i=4e3){const o=Re();return new Promise(l=>{let s=!1;const u=y=>{s||(s=!0,f(),p(),clearTimeout(h),L.getState().setWorkspaceMode(y),l(y))},f=o.subscribe(q.WORKSPACE_LIST,()=>u("enabled")),p=o.subscribe(q.ERROR,y=>{String(y.error??"").toLowerCase().includes("workspace mode")&&u("disabled")}),h=setTimeout(()=>u("unknown"),i);Np().catch(()=>u("unknown"))})}const cc="jaato.exited";function wp(i=kp()){try{i?.setItem(cc,"1")}catch{}}function ab(i=kp()){try{return!i||i.getItem(cc)!=="1"?!1:(i.removeItem(cc),!0)}catch{return!1}}function kp(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function lb(i){if(!i||typeof i!="object")return{};const o=i,l={};return typeof o.daemon=="string"&&o.daemon&&(l.daemon=o.daemon),typeof o.token=="string"&&o.token&&(l.token=o.token),typeof o.ticketUrl=="string"&&o.ticketUrl&&(l.ticketUrl=o.ticketUrl),typeof o.loginUrl=="string"&&o.loginUrl&&(l.loginUrl=o.loginUrl),typeof o.sessionUrl=="string"&&o.sessionUrl&&(l.sessionUrl=o.sessionUrl),typeof o.logoutUrl=="string"&&o.logoutUrl&&(l.logoutUrl=o.logoutUrl),typeof o.credentialsUrl=="string"&&o.credentialsUrl&&(l.credentialsUrl=o.credentialsUrl),typeof o.autoConnect=="boolean"&&(l.autoConnect=o.autoConnect),l}async function sb(i=fetch){try{const o=await i("./config.json",{cache:"no-store"});return o.ok?(o.headers.get("content-type")??"").includes("application/json")?lb(await o.json()):{}:{}}catch{return{}}}class pc extends Error{constructor(o){super("Sign in required"),this.loginUrl=o,this.name="SignInRequiredError"}loginUrl}function ib(i){const o=i.fetchImpl??fetch;return async()=>{const l=await o(i.ticketUrl,{method:"POST",credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}});if(l.status===401)throw new pc(i.loginUrl);if(l.status===503)throw new Error("The sign-in backend cannot issue a ticket right now (daemon at capacity or unreachable); retrying.");if(!l.ok)throw new Error(`Ticket request failed: HTTP ${l.status}`);const s=await l.json();if(typeof s.ticket!="string"||!s.ticket)throw new Error("Ticket response carried no ticket");return s.ticket}}function Km(i,o){const[l]=i.split(/[?#]/,1),s=(l??"").lastIndexOf("/");return s<0?o:`${(l??"").slice(0,s+1)}${o}`}async function rb(i,o=fetch){try{const l=await o(i,{credentials:"same-origin",cache:"no-store",headers:{Accept:"application/json"}});if(!l.ok||!(l.headers.get("content-type")??"").includes("application/json"))return null;const s=await l.json();return typeof s.user=="string"&&s.user?{user:s.user}:null}catch{return null}}var Im={ui:"0.1.10",sdk:"0.7.3",protocolMin:"1.0",commit:"2a74f32",builtAt:"2026-09-17T11:52:14.325Z"};const ob={ui:"unknown",sdk:"unknown",protocolMin:"unknown",commit:"unknown",builtAt:""},Ka=typeof Im<"u"?Im:ob;function Ap(i=Ka){return`jaato-web-coder-ui ${i.ui} · @jaato/sdk ${i.sdk} · protocol ≥ ${i.protocolMin} · ${i.commit}`}const cb={hairline:"",steel:"plate-steel",warning:"plate-warning",error:"plate-error"};function Nt({as:i,edge:o="hairline",ground:l=!1,corners:s="all",className:u="",children:f,...p}){const h=i??"div";return d.jsxs(h,{className:`plate ${cb[o]} ${l?"plate-ground":""} ${u}`,...p,children:[s!=="none"&&d.jsx("i",{className:"corner tl","aria-hidden":"true"}),s==="all"&&d.jsx("i",{className:"corner tr","aria-hidden":"true"}),s==="all"&&d.jsx("i",{className:"corner bl","aria-hidden":"true"}),s!=="none"&&d.jsx("i",{className:"corner br","aria-hidden":"true"}),f]})}function ub(){try{const o=localStorage.getItem("jaato.url");if(o)return o}catch{}return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}/ws`}function fb(i){if(!i.ticketUrl)return null;const o=i.loginUrl??"./auth/login";return{provider:ib({ticketUrl:i.ticketUrl,loginUrl:o}),loginUrl:o,sessionUrl:i.sessionUrl??Km(i.ticketUrl,"session"),logoutUrl:i.logoutUrl??Km(i.ticketUrl,"logout")}}const $m=[["Sessions","Start from a profile, or pick up a session where you left it."],["Tools you approve","Shell, files and the web — each call asks before it runs."],["Plans and subagents","Watch the plan unfold; every subagent gets its own tab."]];function db(){const[i,o]=Y.useState(ub),[l,s]=Y.useState(()=>{try{return sessionStorage.getItem("jaato.token")??""}catch{return""}}),[u,f]=Y.useState(!1),[p,h]=Y.useState(null),[y,_]=Y.useState(null),[b,v]=Y.useState(null),[T,R]=Y.useState(null),[B,M]=Y.useState(null),V=L(Z=>Z.connection),K=L(Z=>Z.setScreen),ee=Y.useRef(!1),ne=async(Z,le)=>{Z?.preventDefault();const G=le?.url??i,re=le?.token??b?.provider??l;f(!0),h(null),M(null);try{try{localStorage.setItem("jaato.url",G),typeof re=="string"&&sessionStorage.setItem("jaato.token",re)}catch{}await Fy({url:G,token:re||void 0});const te=await nb();K(te==="enabled"?"workspaces":"session")}catch(te){te instanceof pc?M(te.loginUrl):h(te instanceof Error?te.message:String(te))}finally{f(!1)}};Y.useEffect(()=>{let Z=!1;return sb().then(le=>{if(Z||ee.current||(ee.current=!0,_(le),L.getState().setCredentialsUrl(le.credentialsUrl??null),!le.daemon&&!le.token&&!le.ticketUrl))return;const G=le.daemon??i;o(G);let re=le.token??l;const te=fb(le);te?(v(te),re=te.provider,L.getState().setBackend({logoutUrl:te.logoutUrl,user:null}),rb(te.sessionUrl).then(Q=>{Z||!Q||(R(Q.user),L.getState().setBackend({logoutUrl:te.logoutUrl,user:Q.user}))})):le.token&&s(le.token),le.autoConnect&&G&&!ab()&&ne(void 0,{url:G,token:re})}),()=>{Z=!0}},[]);const I=!!y&&!!(y.daemon||y.token||y.ticketUrl),W=!1,de=y===null?"Preparing":B?"Sign in to continue":b?T?"Welcome back":"Your environment":I?"Your environment":"Where is your daemon?";return d.jsx("div",{className:"h-full overflow-auto flex items-center justify-center p-6 sm:p-12",children:d.jsxs(Nt,{className:"w-full max-w-[860px] grid grid-cols-1 md:grid-cols-[1fr_1px_1fr]",children:[d.jsxs("div",{className:"p-7 flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-baseline gap-2.5",children:[d.jsx("span",{className:"display text-[40px] leading-none",children:"jaato"}),d.jsx("span",{className:"kicker tracking-[0.18em]",children:"web coding environment"})]}),d.jsx("h1",{className:"display text-[26px] leading-[1.15] m-0",children:"Your coding agent, in the browser."}),d.jsx("p",{className:"m-0 text-sm text-text-muted max-w-[34ch]",children:"Everything the terminal client does — sessions, tools, plans, permissions — from a tab, on any machine."}),d.jsx("ol",{className:"mt-auto pt-4 border-t hairline list-none m-0 p-0",children:$m.map(([Z,le],G)=>d.jsxs("li",{className:`flex gap-3 py-2 ${G<$m.length-1?"border-b hairline":""}`,children:[d.jsx("span",{className:"font-mono text-[11px] text-steel w-[22px] shrink-0 pt-0.5",children:String(G+1).padStart(2,"0")}),d.jsxs("div",{children:[d.jsx("div",{className:"chrome text-[13px] font-medium",children:Z}),d.jsx("div",{className:"text-[13px] text-text-muted",children:le})]})]},Z))})]}),d.jsx("div",{className:"hidden md:block bg-divider","aria-hidden":"true"}),d.jsxs("form",{onSubmit:ne,className:"p-7 flex flex-col gap-4 border-t md:border-t-0 hairline",children:[d.jsx("div",{className:"kicker tracking-[0.16em]",children:de}),y===null?d.jsx("div",{className:"text-sm text-text-muted",children:"Preparing your environment…"}):B?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"text-sm text-text-muted max-w-[36ch]",children:"Sign in to open your coding environment. Sign in with your usual account; nothing to copy or paste."}),d.jsx(Nt,{edge:"steel",className:"p-0",style:{"--corner-color":"color-mix(in srgb, var(--c-bg) 60%, transparent)"},children:d.jsx("a",{href:B,className:"btn btn-primary w-full text-[16px] py-2.5 no-underline border-0",children:"Sign in"})}),d.jsx("div",{className:"text-xs text-text-muted",children:"Your sign-in backend issues a per-user ticket for each connection."})]}):T||u||I&&!p?d.jsxs("div",{className:"space-y-1",children:[T&&d.jsxs("div",{className:"text-base",children:["Welcome back, ",d.jsx("span",{className:"font-semibold",children:T}),"."]}),u?d.jsx("div",{className:"text-sm text-text-muted",children:V.detail??"Opening your coding environment…"}):I&&!p?d.jsx("div",{className:"text-sm text-text-muted",children:"Ready when you are."}):null]}):null,p&&d.jsx("div",{className:"border border-error/40 p-3 text-sm text-error whitespace-pre-wrap",role:"alert",children:p}),y!==null&&!B&&d.jsx("button",{type:"submit",disabled:u||!i,className:"btn btn-primary text-[16px] py-2.5",children:u?"Connecting…":p?"Try again":I?"Open my environment":"Connect"}),y!==null&&!B&&d.jsxs("details",{open:!I,className:"group border-t hairline pt-3 text-sm",children:[d.jsxs("summary",{className:"cursor-pointer select-none list-none flex items-baseline gap-2.5 [&::-webkit-details-marker]:hidden",children:[d.jsx("span",{className:"text-text-muted transition-transform group-open:rotate-90",children:"▸"}),d.jsxs("span",{children:[d.jsx("span",{className:"kicker kicker-muted tracking-[0.12em] text-[12px] block",children:"Daemon settings"}),d.jsx("span",{className:"text-[13px] text-text-muted",children:I?"WebSocket URL and bearer token — only if the served target is wrong.":"Point the page at a jaato daemon started with --web-socket."})]})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("label",{className:"block",children:[d.jsx("span",{className:"field-label",children:"WebSocket URL"}),d.jsx("input",{value:i,onChange:Z=>o(Z.target.value),className:"input input-mono",placeholder:"ws://host:8080",autoFocus:!I})]}),!b&&d.jsxs("label",{className:"block",children:[d.jsxs("span",{className:"field-label",children:["Bearer token ",d.jsxs("span",{className:"opacity-70",children:["(from ",d.jsx("code",{className:"font-mono",children:"~/.jaato/ws.token"}),"; leave empty for ",d.jsx("code",{className:"font-mono",children:"--ws-unsafe-no-auth"}),")"]})]}),d.jsx("input",{value:l,onChange:Z=>s(Z.target.value),type:"password",autoComplete:"off",className:"input input-mono"})]}),W]})]}),b&&T&&d.jsxs("div",{className:"text-xs text-text-muted",children:["Not ",T,"? ",d.jsx("a",{href:b.logoutUrl,className:"link",children:"Sign out"})]}),d.jsxs("dl",{className:"kv mt-auto pt-3 border-t hairline text-[11px] m-0","data-testid":"build-info",title:Ap(),children:[d.jsx("dt",{children:"ui"}),d.jsx("dd",{className:"text-text m-0",children:Ka.ui}),d.jsx("dt",{children:"sdk"}),d.jsxs("dd",{className:"text-text m-0",children:["@jaato/sdk ",Ka.sdk]}),d.jsx("dt",{children:"protocol"}),d.jsxs("dd",{className:"text-text m-0",children:["≥ ",Ka.protocolMin]}),d.jsx("dt",{children:"commit"}),d.jsx("dd",{className:"text-text m-0",children:Ka.commit})]})]})]})})}const Zm=10*1024*1024,Jm=50*1024*1024;function mb(i){return i.trim().replace(/\\/g,"/").split("/").filter(o=>o&&o!==".").join("/")}function pb(i,o,l){const s=(o||i).replace(/\\/g,"/"),u=s.split("/").filter(h=>h&&h!=="."),f=mb(l);if(!u.length)return null;const p=[...f?f.split("/"):[],...u];return p.some(h=>h==="..")||s.startsWith("/")||/^[a-zA-Z]:/.test(s)?null:p.join("/")}function hb(i){return i>=1024*1024?`${(i/(1024*1024)).toFixed(1)} MB`:i>=1024?`${Math.round(i/1024)} kB`:`${i} B`}function gb(i){const o=i.reduce((l,s)=>l+Math.max(s,0),0);if(o>Jm){const l=`declared total ${o} bytes exceeds cap ${Jm}`;return i.map(()=>({reason:l}))}return i.map(l=>({reason:l>Zm?`declared size ${l} bytes exceeds per-file cap ${Zm}`:null}))}function _b(i){return i.length?`
|
|
15
|
+
|
|
16
|
+
Attached files, staged in the workspace: ${i.map(l=>/\s/.test(l)?`"${l}"`:l).join(", ")}`:""}function Wm(i,o,l=""){const[s,u=""]=i.split(/\?(.*)/s,2);return`${s}/${encodeURIComponent(o)}${l}${u?`?${u}`:""}`}function yb(i,o){return`${i.includes("?")?`${i}&`:`${i}?`}provider=${encodeURIComponent(o)}`}async function gi(i,o){if(i.status===401)return new pc("./auth/login");let l="";try{l=String((await i.json()).error??"")}catch{}return new Error(`${o}: HTTP ${i.status}${l?` (${l})`:""}`)}function hc(i,o=fetch){const l={credentials:"same-origin",cache:"no-store"},s={Accept:"application/json","Content-Type":"application/json"};return{async list(u){const f=await o(yb(i,u),{...l,headers:{Accept:"application/json"}});if(!f.ok)throw await gi(f,"Listing stored keys failed");const p=await f.json();return Array.isArray(p.entries)?p.entries.filter(h=>h&&typeof h.id=="string"):[]},async add(u,f,p){const h=await o(i,{...l,method:"POST",headers:s,body:JSON.stringify({provider:u,secret:f,label:p||void 0})});if(!h.ok)throw await gi(h,"Storing the key failed");const y=await h.json();if(!y.entry||typeof y.entry.id!="string")throw new Error("Storing the key failed: no entry in the answer");return y.entry},async reveal(u){const f=await o(Wm(i,u,"/reveal"),{...l,method:"POST",headers:{Accept:"application/json"}});if(!f.ok)throw await gi(f,"Reading the stored key failed");const p=await f.json();if(typeof p.secret!="string"||!p.secret)throw new Error("Reading the stored key failed: no secret in the answer");return p.secret},async remove(u){const f=await o(Wm(i,u),{...l,method:"DELETE"});if(!f.ok&&f.status!==404)throw await gi(f,"Deleting the stored key failed")}}}function bb(i){return!i.hint||i.label.endsWith(i.hint)?i.label:`${i.label} (…${i.hint})`}const xb=/^[a-z0-9_-]+-auth$/i,vb=12e4;let uc=null;function Sb(i,o,l=Date.now()){if(!i||!xb.test(i)||(o?.[0]??"").toLowerCase()!=="key")return;const s=o?.[1];s&&(uc={secret:s,at:l},Nb())}function Eb(i=Date.now()){const o=uc;return uc=null,o&&i-o.at<=vb?o.secret:null}async function Tb(i,o,l=Date.now()){if(!i||!i.providerName)return null;const s=Eb(l);if(!s||!o)return null;try{return await o.add(i.providerName,s),{provider:i.providerName}}catch{return null}}let Fm=!1;function Nb(){if(Fm)return;Fm=!0;let i=L.getState().postAuth;L.subscribe(o=>{o.postAuth!==i&&(i=o.postAuth,Tb(o.postAuth,o.credentialsUrl?hc(o.credentialsUrl):null))})}const wb=4e3;function kb(i){const o=i?{key:"d",label:"Detach",description:"The task continues in the background; reconnect later"}:{key:"d",label:"Detach",description:"Keep the session on the daemon; reconnect later"},l=i?{key:"e",label:"End session",description:"Cancel the task and delete the session"}:{key:"e",label:"End session",description:"Delete the session from the daemon"},s={key:"r",label:"Return",description:"Return to the session"};return i?[{key:"c",label:"Cancel task and exit",description:"Stop the turn, keep the session on the daemon"},o,l,s]:[o,l,s]}function Ab(i){return i==="enabled"?"workspaces":"connect"}async function jp(){const i=L.getState();if(!i.sessionId)return $l();const o=Object.values(i.processing).some(Boolean);i.openExitChoice(o,kb(o))}async function Op(i){const o=L.getState(),l=o.exitChoice;if(!l)return;const s=i.trim().toLowerCase()||l.options[l.focus]?.key||"r";if(o.closeExitChoice(),!l.options.some(f=>f.key===s)||s==="r"){o.addSystemBlock(o.selectedAgentId,"Returning to session.","dim");return}if(s==="c"){try{await Re().stop()}catch{}return $l()}return s==="d"?$l():jb(l.running)}async function $l(){wp(),await mc(),L.getState().setScreen("connect")}async function jb(i){const l=L.getState().sessionId;if(!l||!Zl())return $l();const s=Re();if(i)try{await s.stop()}catch{}const u=Ob(l);await s.deleteSession(l);const f=await u,p=L.getState();if(f.kind==="missing"&&p.addSystemBlock(p.selectedAgentId,f.text,"warning"),p.resetSessionState(),Ab(p.workspace.mode)==="connect")return $l();p.setScreen("workspaces")}function Ob(i){return new Promise(o=>{const l=Re();let s=!1;const u=h=>{s||(s=!0,f(),clearTimeout(p),o(h))},f=l.subscribe(q.SYSTEM_MESSAGE,h=>{const y=String(h.message??"");y.includes(`'${i}' not found`)?u({kind:"missing",text:y}):(y.includes(`'${i}' deleted`)||y.startsWith("Session deleted:"))&&u({kind:"deleted",text:y})}),p=setTimeout(()=>u({kind:"silent",text:""}),wb)})}const Xa=[];function Cb(i){i.trim()&&Xa[Xa.length-1]!==i&&(Xa.push(i),Xa.length>200&&Xa.shift())}async function Cp(i,o){L.getState().resolvePermission(i),await Re().respondToPermission(i,o)}async function Rp(i,o){const l=L.getState(),s=l.answerClarification(i.requestId,o);if(s){if(!i.batchOnly){await Re().respondToClarification(i.requestId,o,i.index),l.dismissClarification(i.requestId);return}s.index>=s.questions.length&&(await Re().respondToClarificationBatch(i.requestId,s.answers),l.dismissClarification(i.requestId))}}async function Mp(i){L.getState().dismissClarification(i.requestId),i.batchOnly?await Re().respondToClarificationBatch(i.requestId,[],!0):await Re().respondToClarification(i.requestId,"cancel",i.index)}async function Pm(i,o){L.getState().dismissPostAuth(),await Re().respondToPostAuthSetup(i,o)}async function Rb(i){const o=L.getState();try{await Re().toggleWorkspaceIgnore(i)}catch(l){o.setWorkspaceNotice({text:String(l instanceof Error?l.message:l),error:!0})}}async function Dp(i,o){L.getState().dismissReferenceSelection(i),await Re().respondToReferenceSelection(i,o)}function Mb(){return["Commands are typed as plain words (no / prefix). The composer proposes matches as you type;","press Esc on the proposal to send the word verbatim instead.","",...L.getState().commands.map(l=>` ${l.name.padEnd(28)} ${l.description??""}`.trimEnd()),"","References: @path (file) @@path (sandbox) %name (prompt library) /name (.jaato/commands)","Keys: Ctrl+P plan · Ctrl+B budget · Alt+W files · Ctrl+T tools · Ctrl+A next agent · Ctrl+O next running tool"].join(`
|
|
17
|
+
`)}function Db(i){const o=L.getState().context[i];if(!o)return"No usage reported yet.";const l=o.usage;return[`Context usage for ${i}`,` prompt tokens: ${l.prompt_tokens??"–"}`,` output tokens: ${l.output_tokens??"–"}`,` total tokens: ${l.total_tokens??"–"}`,` limit: ${o.contextLimit??"–"}`,` percent used: ${o.percentUsed!=null?o.percentUsed.toFixed(1)+"%":"–"}`,` turns: ${o.turns??"–"}`].join(`
|
|
18
|
+
`)}async function zp(){const i=L.getState();if(Zl()){i.setSessionListSilent(1);try{await Re().listSessions()}catch{i.setSessionListSilent(-1)}}}async function zb(i){L.getState().resetSessionState(),await Re().createSession(i?{profile:i}:{})}async function Up(i){const o=L.getState();o.resetSessionState(),o.setHistoryMode("replay");const l=Re();try{await l.attachSession(i),await l.requestHistory(Vt)}catch(s){throw L.getState().setHistoryMode("listing"),s}}async function Ub(){wp(),await mc(),L.getState().setScreen("connect")}async function ep(i,o){const l=L.getState(),s=l.selectedAgentId||Vt,u=i.trim();if(l.exitChoice){await Op(u);return}const f=l.permissions.find(b=>b.agentId===s)??l.permissions[0];if(f){const b=u||(f.options[f.focus]?.key??"");if(!b)return;await Cp(f.requestId,b);return}const p=l.clarifications.find(b=>b.agentId===s&&b.inputMode)??l.clarifications.find(b=>b.inputMode);if(p){if(u.toLowerCase()==="cancel")return Mp(p);const b=p.questions[p.index],v=u||(b?.default!=null?String(b.default):"");await Rp(p,v);return}const h=l.referenceSelections.find(b=>b.agentId===s)??l.referenceSelections[0];if(h&&u){await Dp(h.requestId,u);return}if(!u)return;Cb(i);const y=pp(i,{serverCommands:l.commands,verbatim:o}),_=Re();switch(y.action){case"exit":await jp();return;case"stop":await _.stop();return;case"clear":l.clearOutput(s);return;case"help":l.addSystemBlock(s,Mb(),"help");return;case"context":l.addSystemBlock(s,Db(s),"help");return;case"history":l.setHistoryMode("listing"),await _.requestHistory(s);return;case"server":{if(y.command==="theme"){const b=y.args?.[0];b&&Qm.includes(b)?(Sp(b),$y(b),l.setTheme(b),l.addSystemBlock(s,`Theme: ${b}`,"info")):l.addSystemBlock(s,`Themes: ${Qm.join(", ")}`,"info");return}if(y.command==="session.attach"&&y.args?.[0]){await Up(y.args[0]);return}Sb(y.command,y.args),l.addUserBlock(s,i),await _.executeCommand(y.command??"",y.args??[]);return}case"message":{const b=(y.text??i)+_b(l.takeUploads());l.addUserBlock(s,b),l.dispatch([{type:q.AGENT_STATUS_CHANGED,agent_id:s,status:"processing"}]),await _.sendMessage(b);return}}}const $o="__new__",Zo="";function Lb({credentialsUrl:i,provider:o,value:l,onChange:s,onError:u,reloadKey:f=0}){const[p,h]=Y.useState([]),[y,_]=Y.useState(null),[b,v]=Y.useState(!1),T=i?hc(i):null;Y.useEffect(()=>{if(!T||!o){h([]),_(null);return}let I=!1;return T.list(o).then(W=>{I||(h(W),_(o),l.kind==="none"&&W.length>0&&s({kind:"stored",id:W[W.length-1].id}),l.kind==="stored"&&!W.some(de=>de.id===l.id)&&s({kind:"none"}))}).catch(W=>{I||u(W instanceof Error?W.message:String(W))}),()=>{I=!0}},[i,o,f]);const R=async I=>{if(T){v(!0);try{await T.remove(I),h(W=>W.filter(de=>de.id!==I)),l.kind==="stored"&&l.id===I&&s({kind:"none"})}catch(W){u(W instanceof Error?W.message:String(W))}finally{v(!1)}}},B=l.kind==="new"?l.secret:"",M=l.kind==="new"?l.label:"",V=I=>s({kind:"new",secret:I.secret??B,label:I.label??M}),K="input input-mono mt-1";if(!T)return d.jsxs("label",{className:"block",children:[d.jsx("span",{className:"field-label",children:"API key"}),d.jsx("input",{"aria-label":"API key",value:B,onChange:I=>V({secret:I.target.value}),type:"password",autoComplete:"off",className:K})]});const ee=l.kind==="stored"?l.id:l.kind==="new"?$o:Zo,ne=l.kind==="stored"?p.find(I=>I.id===l.id):void 0;return d.jsxs("div",{className:"block","data-testid":"credential-picker",children:[d.jsxs("label",{className:"block",children:[d.jsx("span",{className:"field-label",children:"API key"}),d.jsxs("select",{"aria-label":"API key",value:ee,disabled:!o,onChange:I=>{const W=I.target.value;s(W===$o?{kind:"new",secret:"",label:""}:W===Zo?{kind:"none"}:{kind:"stored",id:W})},className:"input",children:[d.jsx("option",{value:Zo,children:y===o&&p.length===0?"— no stored key —":"—"}),p.map(I=>d.jsx("option",{value:I.id,children:bb(I)},I.id)),d.jsx("option",{value:$o,children:"New key…"})]})]}),ne&&d.jsxs("div",{className:"mt-1 flex items-center justify-between text-[11px] text-text-muted",children:[d.jsxs("span",{children:["stored ",new Date(ne.createdAt).toLocaleDateString()]}),d.jsx("button",{type:"button",disabled:b,onClick:()=>R(ne.id),className:"link hover:text-error","aria-label":`Forget stored key ${ne.label}`,children:"forget"})]}),l.kind==="new"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{"aria-label":"New API key",value:B,onChange:I=>V({secret:I.target.value}),type:"password",autoComplete:"off",placeholder:"paste the key",className:K}),d.jsx("input",{"aria-label":"Key label",value:M,onChange:I=>V({label:I.target.value}),placeholder:"label (optional) — e.g. work account",className:`${K} text-xs`})]})]})}const Xl="px-3.5 py-2 text-left font-medium border-b hairline kicker kicker-muted",tp="px-3.5 py-2.5 border-b hairline align-middle";function qb(i){if(!i)return"—";const o=new Date(i);if(Number.isNaN(o.getTime()))return i;const l=new Date,s=o.toDateString()===l.toDateString(),u=o.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});return s?`${u} today`:`${o.toLocaleDateString(void 0,{day:"numeric",month:"short"})} ${u}`}function Hb(){const i=L(Q=>Q.workspace),o=L(Q=>Q.setScreen),l=L(Q=>Q.setWorkspaceListNotice),s=L(Q=>Q.credentialsUrl),u=L(Q=>Q.backend),[f,p]=Y.useState(""),[h,y]=Y.useState(""),[_,b]=Y.useState(""),[v,T]=Y.useState({kind:"none"}),[R,B]=Y.useState(0),[M,V]=Y.useState(!1),[K,ee]=Y.useState(null),[ne,I]=Y.useState(null);Y.useEffect(()=>{Np().catch(()=>{})},[]),Y.useEffect(()=>{i.config&&(y(i.config.provider??""),b(i.config.model??""))},[i.config]);const W=async Q=>{V(!0);try{await oc(Q),o("session")}finally{V(!1)}},de=async Q=>{V(!0);try{await oc(Q),ee(Q)}finally{V(!1)}},Z=async Q=>{V(!0);try{await eb(Q)}finally{V(!1),I(null)}},le=async Q=>{Q.preventDefault(),f.trim()&&(await Py(f.trim()),p(""))},G=async()=>{const Q=s?hc(s):null;if(v.kind==="stored")return{apiKey:Q?await Q.reveal(v.id):void 0};if(v.kind==="new"&&v.secret.trim()){const we=v.secret.trim();let ze;if(Q&&h)try{ze=(await Q.add(h,we,v.label.trim()||void 0)).id}catch(Ce){l({text:`Key applied, but not stored for later: ${Ce instanceof Error?Ce.message:String(Ce)}`,error:!0})}return{apiKey:we,storedId:ze}}return{}},re=async Q=>{Q.preventDefault(),V(!0);try{const{apiKey:we,storedId:ze}=await G();await tb({provider:h||void 0,model:_||void 0,api_key:we}),v.kind==="new"&&(T(ze?{kind:"stored",id:ze}:{kind:"none"}),B(Ce=>Ce+1))}catch(we){l({text:we instanceof Error?we.message:String(we),error:!0})}finally{V(!1)}},te=i.config;return d.jsx("div",{className:"h-full overflow-auto p-6 sm:p-10 flex justify-center",children:d.jsxs("div",{className:"w-full max-w-[880px] flex flex-col gap-5",children:[d.jsxs("header",{className:"flex items-end justify-between gap-4 border-b hairline pb-2.5",children:[d.jsxs("div",{children:[d.jsx("div",{className:"kicker tracking-[0.16em]",children:i.root?"Workspace root":"Pick a workspace"}),d.jsx("h1",{className:"display text-[30px] m-0",children:"Workspaces"})]}),d.jsxs("div",{className:"text-right space-y-0.5",children:[d.jsxs("div",{className:"font-mono text-xs text-text-muted",children:[i.root??"workspace mode"," · ",i.list.length," ",i.list.length===1?"entry":"entries"]}),d.jsxs("div",{className:"text-xs text-text-muted",children:[u?.user&&d.jsxs(d.Fragment,{children:["Signed in as ",d.jsx("span",{className:"font-semibold text-text",children:u.user})," · "]}),u?d.jsx("a",{href:u.logoutUrl,className:"link",children:"Sign out"}):d.jsx("button",{type:"button",onClick:()=>{Ub().catch(()=>{})},className:"link",children:"Disconnect"})]})]})]}),i.notice&&d.jsx("div",{role:"status",className:`text-xs ${i.notice.error?"text-error":"text-text-muted"}`,children:i.notice.text}),d.jsx(Nt,{className:"overflow-x-auto",children:d.jsxs("table",{className:"w-full border-collapse text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{children:[d.jsx("th",{className:Xl,children:"Workspace"}),d.jsx("th",{className:Xl,children:"Provider · model"}),d.jsx("th",{className:Xl,children:"Owner"}),d.jsx("th",{className:Xl,children:"Last opened"}),d.jsx("th",{className:`${Xl} text-right`,children:"Actions"})]})}),d.jsxs("tbody",{className:"font-mono text-[13px]",children:[i.list.length===0&&d.jsx("tr",{children:d.jsx("td",{colSpan:5,className:"px-3.5 py-3 font-sans text-sm text-text-muted italic",children:"No workspaces yet — create one below."})}),i.list.map((Q,we)=>{const Ce=we===i.list.length-1?tp.replace("border-b hairline",""):tp;return d.jsxs("tr",{className:i.selected===Q.name?"tint":"hover:bg-tint/60",children:[d.jsx("td",{className:`${Ce} whitespace-nowrap`,children:d.jsxs("button",{type:"button",disabled:M,onClick:()=>W(Q.name),className:"text-left hover:text-steel",children:[d.jsx("span",{className:`mr-2 ${Q.configured?"text-success":"text-warning"}`,children:Q.configured?"●":"○"}),Q.name]})}),d.jsx("td",{className:`${Ce} ${Q.configured?"":"text-text-muted"}`,children:Q.configured?[Q.provider,Q.model].filter(Boolean).join(" / "):d.jsxs(d.Fragment,{children:["no provider in ",d.jsx("span",{className:"text-text",children:".env"})," — sign in from the prompt, or configure"]})}),d.jsx("td",{className:`${Ce} text-text-muted`,children:Q.owner?d.jsx("span",{title:`Owned by ${Q.owner}`,children:Q.owner}):"—"}),d.jsx("td",{className:`${Ce} text-text-muted whitespace-nowrap`,children:qb(Q.last_accessed)}),d.jsx("td",{className:`${Ce} text-right whitespace-nowrap`,children:ne===Q.name?d.jsxs("span",{className:"inline-flex items-center gap-2 font-sans text-xs",role:"group","aria-label":`Confirm deleting workspace ${Q.name}`,children:[d.jsxs("span",{className:"text-warning",children:["delete ",Q.name," and its sessions?"]}),d.jsx("button",{type:"button",disabled:M,onClick:()=>Z(Q.name),className:"btn btn-sm btn-danger","aria-label":`Confirm delete workspace ${Q.name}`,children:"Delete"}),d.jsx("button",{type:"button",onClick:()=>I(null),className:"btn btn-sm","aria-label":"Cancel delete",children:"Cancel"})]}):d.jsxs("span",{className:"inline-flex items-center gap-2",children:[d.jsx("button",{type:"button",disabled:M,onClick:()=>W(Q.name),className:`btn btn-sm ${i.selected===Q.name?"btn-steel":"text-steel"}`,"aria-label":`Open workspace ${Q.name}`,children:"Open"}),d.jsx("button",{type:"button",disabled:M,onClick:()=>de(Q.name),className:"btn btn-sm btn-quiet border-transparent","aria-label":`Configure workspace ${Q.name}`,children:"Configure"}),d.jsx("button",{type:"button",disabled:M,onClick:()=>I(Q.name),className:"btn btn-sm btn-quiet border-transparent hover:text-error","aria-label":`Delete workspace ${Q.name}`,children:"Delete"})]})})]},Q.name)})]})]})}),d.jsxs("form",{onSubmit:le,className:"flex items-center gap-3",children:[d.jsx("input",{value:f,onChange:Q=>p(Q.target.value),placeholder:"new-workspace-name",className:"input input-mono flex-1","aria-label":"New workspace name"}),d.jsx("button",{type:"submit",className:"btn",children:"Create"}),d.jsx("span",{className:"flex-1"}),d.jsx("button",{type:"button",className:"link text-[13px]",onClick:()=>o("session"),title:"The daemon provisions a fresh workspace for the session under its workspace root",children:"Open a session in a server-provisioned workspace"})]}),te&&K===te.workspace&&d.jsxs(Nt,{role:"group","aria-label":"Manual provider configuration",className:"flex flex-col",children:[d.jsxs("div",{className:"flex items-baseline gap-3 px-5 py-3.5 border-b hairline",children:[d.jsx("span",{className:"kicker tracking-[0.16em]",children:"Configure"}),d.jsx("span",{className:"font-mono text-[16px]",children:te.workspace}),d.jsx("span",{className:"flex-1"}),d.jsx("span",{className:"font-mono text-xs text-text-muted",children:te.configured?"configured":`missing: ${te.missingFields.join(", ")||"provider"}`})]}),d.jsxs("form",{onSubmit:re,className:"p-5 flex flex-col gap-4",children:[d.jsxs("div",{className:"text-xs text-text-muted",children:["Writes ",d.jsx("span",{className:"font-mono",children:"JAATO_PROVIDER"})," / ",d.jsx("span",{className:"font-mono",children:"MODEL_NAME"})," (and the key) to this workspace's ",d.jsx("span",{className:"font-mono",children:".env"}),". Optional: an auth command from the prompt does the same after signing you in."]}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",children:[d.jsxs("label",{className:"block",children:[d.jsx("span",{className:"field-label",children:"Provider"}),d.jsxs("select",{value:h,onChange:Q=>y(Q.target.value),className:"input",children:[d.jsx("option",{value:"",children:"—"}),te.availableProviders.map(Q=>d.jsx("option",{value:Q,children:Q},Q))]})]}),d.jsxs("label",{className:"block",children:[d.jsx("span",{className:"field-label",children:"Model"}),d.jsx("input",{value:_,onChange:Q=>b(Q.target.value),className:"input input-mono"})]}),d.jsx(Lb,{credentialsUrl:s,provider:h,value:v,onChange:T,reloadKey:R,onError:Q=>l({text:Q,error:!0})})]}),d.jsxs("div",{className:"flex items-center gap-2 border-t hairline pt-4",children:[d.jsx("button",{type:"submit",disabled:M,className:"btn btn-steel",children:"Save configuration"}),d.jsx("button",{type:"button",onClick:()=>ee(null),className:"btn btn-quiet",children:"Close"}),d.jsx("span",{className:"flex-1"}),d.jsx("button",{type:"button",onClick:()=>o("session"),className:"btn btn-primary",children:"Open session →"})]})]})]})]})})}var Bb=fp();function Gb(i,o,l){const s=new Array(i);return new Proxy(s,{get(u,f,p){if(typeof f=="string"){const h=f.charCodeAt(0);if(h>=48&&h<=57){const y=+f;if(Number.isInteger(y)&&y>=0&&y<i){let _=u[y];if(!_){const b=o[y*2];_=u[y]={index:y,key:l(y),start:b,size:o[y*2+1],end:b+o[y*2+1],lane:0}}return _}}if(f==="length")return i}return Reflect.get(u,f,p)}})}function Va(i,o,l){let s=l.initialDeps??[],u,f=!0;function p(){const h=i();return(h.length!==s.length||h.some((_,b)=>s[b]!==_))&&(s=h,u=o(...h),l?.onChange&&!(f&&l.skipInitialOnChange)&&l.onChange(u),f=!1),u}return p.updateDeps=h=>{s=h},p}function np(i,o){if(i===void 0)throw new Error("Unexpected undefined");return i}const Yb=(i,o)=>Math.abs(i-o)<1.01,Qb=(i,o,l)=>{let s;return Object.assign(function(...u){i.clearTimeout(s),s=i.setTimeout(()=>o.apply(this,u),l)},{cancel:()=>{i.clearTimeout(s)}})};let Kl;const Jo=()=>{if(Kl!==void 0)return Kl;if(typeof navigator>"u")return Kl=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Kl=!0;const i=navigator.maxTouchPoints;return Kl=navigator.platform==="MacIntel"&&i!==void 0&&i>0},ap=i=>{const{offsetWidth:o,offsetHeight:l}=i;return{width:o,height:l}},Vb=i=>i,Xb=i=>{const o=Math.max(i.startIndex-i.overscan,0),s=Math.min(i.endIndex+i.overscan,i.count-1)-o+1,u=new Array(s);for(let f=0;f<s;f++)u[f]=o+f;return u},Kb=(i,o)=>{const l=i.scrollElement;if(!l)return;const s=i.targetWindow;if(!s)return;const u=p=>{const{width:h,height:y}=p;o({width:Math.round(h),height:Math.round(y)})};if(u(ap(l)),!s.ResizeObserver)return()=>{};const f=new s.ResizeObserver(p=>{const h=()=>{const y=p[0];if(y?.borderBoxSize){const _=y.borderBoxSize[0];if(_){u({width:_.inlineSize,height:_.blockSize});return}}u(ap(l))};i.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(h):h()});return f.observe(l,{box:"border-box"}),()=>{f.unobserve(l)}},bi={passive:!0},Ib=typeof window>"u"?!0:"onscrollend"in window,$b=(i,o,l)=>{const s=i.scrollElement;if(!s)return;const u=i.targetWindow;if(!u)return;const f=i.options.useScrollendEvent&&Ib;let p=0;const h=f?null:Qb(u,()=>o(p,!1),i.options.isScrollingResetDelay),y=v=>()=>{p=l(s),h?.(),o(p,v)},_=y(!0),b=y(!1);return s.addEventListener("scroll",_,bi),f&&s.addEventListener("scrollend",b,bi),()=>{s.removeEventListener("scroll",_),f&&s.removeEventListener("scrollend",b),h?.cancel()}},Zb=(i,o)=>$b(i,o,l=>{const{horizontal:s,isRtl:u}=i.options;return s?l.scrollLeft*(u&&-1||1):l.scrollTop}),Jb=(i,o,l)=>{if(l.options.useCachedMeasurements){const s=l.indexFromElement(i),u=l.options.getItemKey(s);return l.itemSizeCache.get(u)??l.options.estimateSize(s)}if(o?.borderBoxSize){const s=o.borderBoxSize[0];if(s)return Math.round(s[l.options.horizontal?"inlineSize":"blockSize"])}if(!o){const s=l.indexFromElement(i),u=l.options.getItemKey(s),f=l.itemSizeCache.get(u);if(f!==void 0)return f}return i[l.options.horizontal?"offsetWidth":"offsetHeight"]},Wb=(i,{adjustments:o=0,behavior:l},s)=>{var u,f;(f=(u=s.scrollElement)==null?void 0:u.scrollTo)==null||f.call(u,{[s.options.horizontal?"left":"top"]:i+o,behavior:l})},Fb=Wb;class Pb{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var l,s,u;return((u=(s=(l=this.targetWindow)==null?void 0:l.performance)==null?void 0:s.now)==null?void 0:u.call(s))??Date.now()},this.observer=(()=>{let l=null;const s=()=>l||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:l=new this.targetWindow.ResizeObserver(u=>{u.forEach(f=>{const p=()=>{const h=f.target,y=this.indexFromElement(h);if(!h.isConnected){this.observer.unobserve(h);for(const[_,b]of this.elementsCache)if(b===h){this.elementsCache.delete(_);break}return}this.isIndexInRange(y)&&this.shouldMeasureDuringScroll(y)&&this.resizeItem(y,this.options.measureElement(h,f,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(p):p()})}));return{disconnect:()=>{var u;(u=s())==null||u.disconnect(),l=null},observe:u=>{var f;return(f=s())==null?void 0:f.observe(u,{box:"border-box"})},unobserve:u=>{var f;return(f=s())==null?void 0:f.unobserve(u)}}})(),this.range=null,this.setOptions=l=>{var s,u;const f={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Vb,rangeExtractor:Xb,onChange:()=>{},measureElement:Jb,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const T in l){const R=l[T];R!==void 0&&(f[T]=R)}const p=this.options;let h=null,y=null,_=!1;if(p!==void 0&&p.enabled&&f.enabled&&f.anchorTo==="end"&&this.scrollElement!==null){const T=p.count,R=f.count,B=this.getMeasurements(),M=T>0?((s=B[0])==null?void 0:s.key)??p.getItemKey(0):null,V=T>0?((u=B[T-1])==null?void 0:u.key)??p.getItemKey(T-1):null;if(R!==T||T>0&&R>0&&(f.getItemKey(0)!==M||f.getItemKey(R-1)!==V)){_=!0;const ne=T>0?this.getVirtualItemForOffset(this.getScrollOffset())??B[0]:null;ne&&(h=[ne.key,this.getScrollOffset()-ne.start]);const I=f.followOnAppend===!0?"auto":f.followOnAppend||null;I&&R>T&&this.isAtEnd(p.scrollEndThreshold)&&(T===0||f.getItemKey(R-1)!==V)&&(y=I)}}this.options=f,_&&(this.pendingMin=0,this.itemSizeCacheVersion++);let b=!1,v=0;if(h&&this.scrollOffset!==null){const[T,R]=h,B=this.getMeasurements(),{count:M,getItemKey:V}=this.options;let K=0;for(;K<M&&V(K)!==T;)K++;if(K<M){const ee=B[K];if(ee){const ne=Math.max(0,ee.start+R);ne!==this.scrollOffset&&(v=ne-this.scrollOffset,this.scrollOffset=ne,b=!0)}}}(b||y)&&(this.pendingScrollAnchor=[b?h[0]:null,b?h[1]:0,y,v])},this.notify=l=>{var s,u;(u=(s=this.options).onChange)==null||u.call(s,this,l)},this.maybeNotify=Va(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),l=>{this.notify(l)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(l=>l()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var l;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}if(this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((l=this.scrollElement)==null?void 0:l.window)??null,this.elementsCache.forEach(f=>{this.observer.observe(f)}),this.unsubs.push(this.options.observeElementRect(this,f=>{this.scrollRect=f,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(f,p)=>{if(p&&this._intendedScrollOffset===null&&f===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(f-this._intendedScrollOffset)<1.5&&(f=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(f-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;const h=this.getScrollOffset();this.scrollDirection=p?h===f?this.scrollDirection:h<f?"forward":"backward":null,this.scrollOffset=f,this.isScrolling=p,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const f=this.scrollElement,p=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},h=()=>{this._iosTouching=!1,!(!Jo()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};f.addEventListener("touchstart",p,bi),f.addEventListener("touchend",h,bi),this.unsubs.push(()=>{f.removeEventListener("touchstart",p),f.removeEventListener("touchend",h),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const u=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,u&&this.scrollElement&&this.options.enabled){const[f,p,h,y]=u;f!==null&&!h&&(Jo()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?y!==0&&(this._iosDeferredAdjustment+=y):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),h&&this.scrollToEnd({behavior:h})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;const{target:l,maxAtWrite:s}=this._clampedAdjustment,u=this.getMaxScrollOffset();u>s+.5&&(this._clampedAdjustment=l>u+.5?{target:l,maxAtWrite:u}:null,this._scrollToOffset(l,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const l=this.getScrollOffset(),s=this.getMaxScrollOffset();if(l<0||l>s)return;if(this._iosDeferredAdjustment<0&&l>=s-1){this._iosDeferredAdjustment=0;return}const u=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(l,{adjustments:this.scrollAdjustments+=u,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=Va(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(l,s,u,f,p,h,y,_)=>(this.prevLanes!==void 0&&this.prevLanes!==h&&(this.lanesChangedFlag=!0),this.prevLanes=h,this.pendingMin=null,{count:l,paddingStart:s,scrollMargin:u,getItemKey:f,enabled:p,lanes:h,laneAssignmentMode:y,gap:_}),{key:!1}),this.isIndexInRange=l=>l>=0&&l<this.options.count,this.getMeasurements=Va(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:l,paddingStart:s,scrollMargin:u,getItemKey:f,enabled:p,lanes:h,laneAssignmentMode:y,gap:_},b)=>{const v=this.itemSizeCache;if(!p)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>l)for(const K of this.laneAssignments.keys())K>=l&&this.laneAssignments.delete(K);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(K=>{this.itemSizeCache.set(K.key,K.size)}));const T=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===l&&(this.lanesSettling=!1),h===1){const K=l*2;let ee=this._flatMeasurements;if(!ee||ee.length<K){const W=new Float64Array(K);ee&&T>0&&W.set(ee.subarray(0,T*2)),ee=W,this._flatMeasurements=ee}let ne;if(T===0)ne=s+u;else{const W=T-1;ne=ee[W*2]+ee[W*2+1]+_}for(let W=T;W<l;W++){const de=f(W),Z=v.get(de),le=typeof Z=="number"?Z:this.options.estimateSize(W);ee[W*2]=ne,ee[W*2+1]=le,ne+=le+_}const I=Gb(l,ee,f);return this.measurementsCache=I,I}const R=this.measurementsCache.slice(0,T),B=new Array(h).fill(void 0),M=new Float64Array(h);let V=0;for(let K=0;K<T;K++){const ee=R[K];ee&&(B[ee.lane]===void 0&&V++,B[ee.lane]=K,M[ee.lane]=ee.end)}for(let K=T;K<l;K++){const ee=f(K),ne=this.laneAssignments.get(K);let I,W;const de=y==="estimate"||v.has(ee);if(ne!==void 0&&this.options.lanes>1){I=ne;const re=B[I],te=re!==void 0?R[re]:void 0;W=te?te.end+_:s+u}else if(V===h){let re=0,te=M[0],Q=B[0];for(let we=1;we<h;we++){const ze=M[we];(ze<te||ze===te&&B[we]<Q)&&(re=we,te=ze,Q=B[we])}I=re,W=te+_,de&&this.laneAssignments.set(K,I)}else I=K%this.options.lanes,W=s+u,de&&this.laneAssignments.set(K,I);const Z=v.get(ee),le=typeof Z=="number"?Z:this.options.estimateSize(K),G=W+le;R[K]={index:K,start:W,size:le,end:G,key:ee,lane:I},B[I]===void 0&&V++,B[I]=K,M[I]=G}return this.measurementsCache=R,R},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Va(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(l,s,u,f)=>l.length===0||s===0?(this.range=null,null):(this.range=tx(l,s,u,f,f===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Va(()=>{let l=null,s=null;const u=this.calculateRange();return u&&(l=u.startIndex,s=u.endIndex),this.maybeNotify.updateDeps([this.isScrolling,l,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,l,s]},(l,s,u,f,p)=>f===null||p===null?[]:l({startIndex:f,endIndex:p,overscan:s,count:u}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=l=>{const s=this.options.indexAttribute,u=l.getAttribute(s);return u?parseInt(u,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=l=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const u=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(u!==void 0&&this.range){const f=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),p=Math.max(0,u-f),h=Math.min(this.options.count-1,u+f);return l>=p&&l<=h}return!0},this.measureElement=l=>{if(!l){this.elementsCache.forEach((p,h)=>{p.isConnected||(this.observer.unobserve(p),this.elementsCache.delete(h))});return}const s=this.indexFromElement(l);if(!this.isIndexInRange(s))return;const u=this.options.getItemKey(s),f=this.elementsCache.get(u);f!==l&&(f&&this.observer.unobserve(f),this.observer.observe(l),this.elementsCache.set(u,l)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(l,void 0,this))},this.resizeItem=(l,s)=>{var u,f;if(!this.isIndexInRange(l))return;let p,h,y;const _=this._flatMeasurements;if(this.options.lanes===1&&_!==null)y=this.options.getItemKey(l),h=_[l*2],p=_[l*2+1];else{const T=this.measurementsCache[l];if(!T)return;y=T.key,h=T.start,p=T.size}const b=this.itemSizeCache.get(y)??p,v=s-b;if(v!==0){const T=this.options.anchorTo==="end"&&((u=this.scrollState)==null?void 0:u.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,R=T?this.getTotalSize():0,B=this.getScrollOffset()+this.scrollAdjustments,V=!this.itemSizeCache.has(y)?h<B:h+b<=B&&this.scrollDirection!=="backward",K=((f=this.scrollState)==null?void 0:f.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[l]??{index:l,key:y,start:h,size:p,end:h+p,lane:0},v,this):V);(this.pendingMin===null||l<this.pendingMin)&&(this.pendingMin=l),this.itemSizeCache.set(y,s),this.itemSizeCacheVersion++;let ee=!1;T?ee=this.applyScrollAdjustment(this.getTotalSize()-R):K&&(ee=this.applyScrollAdjustment(v)),this.notify(ee),this._retryClampedAdjustment()}},this.getVirtualItems=Va(()=>[this.getVirtualIndexes(),this.getMeasurements()],(l,s)=>{const u=[];for(let f=0,p=l.length;f<p;f++){const h=l[f],y=s[h];u.push(y)}return u},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=l=>{const s=this.getMeasurements();if(s.length===0)return;const u=this._flatMeasurements,f=this.options.lanes===1&&u!=null,p=Lp(0,s.length-1,f?h=>u[h*2]:h=>np(s[h]).start,l);return np(s[p])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const l=this.scrollElement.document.documentElement;return this.options.horizontal?l.scrollWidth-this.scrollElement.innerWidth:l.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(l=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=l,this.getOffsetForAlignment=(l,s,u=0)=>{if(!this.scrollElement)return 0;const f=this.getSize(),p=this.getScrollOffset();s==="auto"&&(s=l>=p+f?"end":"start"),s==="center"?l+=(u-f)/2:s==="end"&&(l-=f);const h=this.getMaxScrollOffset();return Math.max(Math.min(h,l),0)},this.getOffsetForIndex=(l,s="auto")=>{l=Math.max(0,Math.min(l,this.options.count-1));const u=this.getSize(),f=this.getScrollOffset(),p=this.measurementsCache[l];if(!p)return;if(s==="auto")if(p.end>=f+u-this.options.scrollPaddingEnd)s="end";else if(p.start<=f+this.options.scrollPaddingStart)s="start";else return[f,s];if(s==="end"&&l===this.options.count-1)return[this.getMaxScrollOffset(),s];const h=s==="end"?p.end+this.options.scrollPaddingEnd:p.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(h,s,p.size),s]},this.scrollToOffset=(l,{align:s="start",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0;const f=this.getOffsetForAlignment(l,s),p=this.now();this.scrollState={index:null,align:s,behavior:u,startedAt:p,lastTargetOffset:f,stableFrames:0},this._scrollToOffset(f,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollToIndex=(l,{align:s="auto",behavior:u="auto"}={})=>{this._iosDeferredAdjustment=0,l=Math.max(0,Math.min(l,this.options.count-1));const f=this.getOffsetForIndex(l,s);if(!f)return;const[p,h]=f,y=this.now();this.scrollState={index:l,align:h,behavior:u,startedAt:y,lastTargetOffset:p,stableFrames:0},this._scrollToOffset(p,{adjustments:void 0,behavior:u}),this.scheduleScrollReconcile()},this.scrollBy=(l,{behavior:s="auto"}={})=>{const u=this.getScrollOffset()+l,f=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:f,lastTargetOffset:u,stableFrames:0},this._scrollToOffset(u,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:l="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:l});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:l})},this.getTotalSize=()=>{var l;const s=this.getMeasurements();let u;if(s.length===0)u=this.options.paddingStart;else if(this.options.lanes===1){const f=s.length-1,p=this._flatMeasurements;p!=null?u=p[f*2]+p[f*2+1]:u=((l=s[f])==null?void 0:l.end)??0}else{const f=Array(this.options.lanes).fill(null);let p=s.length-1;for(;p>=0&&f.some(h=>h===null);){const h=s[p];f[h.lane]===null&&(f[h.lane]=h.end),p--}u=Math.max(...f.filter(h=>h!==null))}return Math.max(u-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const l=[];if(this.itemSizeCache.size===0)return l;const s=this.getMeasurements();for(const u of s)u&&this.itemSizeCache.has(u.key)&&l.push({index:u.index,key:u.key,start:u.start,size:u.size,end:u.end,lane:u.lane});return l},this._scrollToOffset=(l,{adjustments:s,behavior:u})=>{this._intendedScrollOffset=l+(s??0),this.options.scrollToFn(l,{behavior:u,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(o)}applyScrollAdjustment(o,l){if(o===0)return!1;if(Jo()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=o,!1;{const s=this.getScrollOffset()+this.scrollAdjustments+o,u=this.scrollElement,f=u!==null&&("scrollHeight"in u||"document"in u)?this.getMaxScrollOffset():null;return this._clampedAdjustment=f!==null&&s>f+.5?{target:s,maxAtWrite:f}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:l}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,u=s?s[0]:this.scrollState.lastTargetOffset,f=1,p=u!==this.scrollState.lastTargetOffset;if(!p&&Yb(u,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=f){this.getScrollOffset()!==u&&this._scrollToOffset(u,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,p){const h=this.getSize()||600,y=Math.abs(u-this.getScrollOffset()),_=this.scrollState.behavior==="smooth"&&y>h;this.scrollState.lastTargetOffset=u,_||(this.scrollState.behavior="auto"),this._scrollToOffset(u,{adjustments:void 0,behavior:_?"smooth":"auto"})}this.scheduleScrollReconcile()}}const Lp=(i,o,l,s)=>{for(;i<=o;){const u=(i+o)/2|0,f=l(u);if(f<s)i=u+1;else if(f>s)o=u-1;else return u}return i>0?i-1:0};function ex(i,o,l){let s=0;for(;s<=o;){const u=(s+o)/2|0,f=i[u*2];if(f<l)s=u+1;else if(f>l)o=u-1;else return u}return s>0?s-1:0}function tx(i,o,l,s,u){const f=i.length-1;if(i.length<=s)return{startIndex:0,endIndex:f};if(s===1&&u!==null){const _=ex(u,f,l);let b=_;const v=l+o;for(;b<f&&u[b*2]+u[b*2+1]<v;)b++;return{startIndex:_,endIndex:b}}let h=Lp(0,f,_=>i[_].start,l),y=h;if(s===1)for(;y<f&&i[y].end<l+o;)y++;else if(s>1){const _=Array(s).fill(0);for(;y<f&&_.some(v=>v<l+o);){const v=i[y];_[v.lane]=v.end,y++}const b=Array(s).fill(l+o);for(;h>=0&&b.some(v=>v>=l);){const v=i[h];b[v.lane]=v.start,h--}h=Math.max(0,h-h%s),y=Math.min(f,y+(s-1-y%s))}return{startIndex:h,endIndex:y}}const Wo=typeof document<"u"?Y.useLayoutEffect:Y.useEffect;function nx({useFlushSync:i=!0,directDomUpdates:o=!1,directDomUpdatesMode:l="transform",...s}){const u=Y.useReducer(b=>b+1,0)[1],f=Y.useRef({enabled:o,mode:l,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});f.current.enabled=o,f.current.mode=l;const p=b=>{const v=f.current;if(!v.enabled||!v.container)return;const T=b.getTotalSize();if(T!==v.lastSize){v.lastSize=T;const R=b.options.horizontal?"width":"height";v.container.style[R]=`${T}px`}},h=b=>{const v=f.current;if(!v.enabled||!v.container)return;p(b);const T=!!b.options.horizontal,R=v.mode==="transform",B=T?"left":"top",M=b.options.scrollMargin,V=b.getVirtualItems();for(const K of V){const ee=K.start-M,ne=b.elementsCache.get(K.key);ne&&v.lastPositions.get(ne)!==ee&&(v.lastPositions.set(ne,ee),R?ne.style.transform=T?`translate3d(${ee}px, 0, 0)`:`translate3d(0, ${ee}px, 0)`:ne.style[B]=`${ee}px`)}},y={...s,onChange:(b,v)=>{var T;const R=f.current;let B=!0;if(R.enabled){h(b);const M=b.range,V=R.prevRange;B=!V||V.isScrolling!==b.isScrolling||V.startIndex!==M?.startIndex||V.endIndex!==M?.endIndex,B&&(R.prevRange=M?{startIndex:M.startIndex,endIndex:M.endIndex,isScrolling:b.isScrolling}:null)}B&&(i&&v?Bb.flushSync(u):u()),(T=s.onChange)==null||T.call(s,b,v)}},[_]=Y.useState(()=>{const b=new Pb(y);return Object.assign(b,{containerRef:v=>{const T=f.current;if(T.container=v,T.lastSize=null,v&&T.enabled){const R=b.getTotalSize();T.lastSize=R;const B=b.options.horizontal?"width":"height";v.style[B]=`${R}px`}}})});return _.setOptions(y),Wo(()=>_._didMount(),[]),Wo(()=>(p(_),_._willUpdate())),Wo(()=>{h(_)}),_}function ax(i){return nx({observeElementRect:Kb,observeElementOffset:Zb,scrollToFn:Fb,...i})}const lx='<j-code(?:\\s+language="([^"]*)")?>\\n?([\\s\\S]*?)<\\/j-code>\\n?|<j-table>\\n?([\\s\\S]*?)<\\/j-table>\\n?',sx='<j-line(?:\\s+n="(\\d+)")?>([\\s\\S]*?)<\\/j-line>',ix='<j-tok(?:\\s+t="([^"]*)")?>([\\s\\S]*?)<\\/j-tok>',lp="<j-tr>([\\s\\S]*?)<\\/j-tr>",rx="<j-t[hd]>([\\s\\S]*?)<\\/j-t[hd]>",ox=/<j-thead>\n?([\s\S]*?)<\/j-thead>/,$a=i=>new RegExp(i,"g");function Ia(i){return i.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function cx(i){const o=[],l=$a(ix);let s=0,u;for(;(u=l.exec(i))!==null;)u.index>s&&o.push({t:"",text:Ia(i.slice(s,u.index))}),o.push({t:u[1]??"",text:Ia(u[2]??"")}),s=u.index+u[0].length;return s<i.length&&o.push({t:"",text:Ia(i.slice(s))}),o}function ux(i){const o=[],l=$a(sx);let s,u=!1;for(;(s=l.exec(i))!==null;)u=!0,o.push({n:s[1]?Number(s[1]):null,tokens:cx(s[2]??"")});if(!u)for(const f of i.replace(/\n$/,"").split(`
|
|
19
|
+
`))o.push({n:null,tokens:[{t:"",text:Ia(f)}]});return o}function sp(i){const o=[],l=$a(rx);let s;for(;(s=l.exec(i))!==null;)o.push(Ia((s[1]??"").trim()));return o}function fx(i){let o=[],l=i;const s=ox.exec(i);if(s){const h=s[1]??"",y=$a(lp).exec(h);o=sp(y?y[1]??"":h),l=i.slice(s.index+s[0].length)}const u=[],f=$a(lp);let p;for(;(p=f.exec(l))!==null;)u.push(sp(p[1]??""));return{head:o,rows:u}}function dx(i){const o=[],l=$a(lx);let s=0,u;for(;(u=l.exec(i))!==null;)u.index>s&&o.push({kind:"text",text:i.slice(s,u.index)}),u[3]!==void 0?o.push({kind:"table",...fx(u[3])}):o.push({kind:"code",language:Ia(u[1]??""),lines:ux(u[2]??"")}),s=u.index+u[0].length;return s<i.length&&o.push({kind:"text",text:i.slice(s)}),o}const mx="(`+)([\\s\\S]*?[^`])\\1(?!`)|\\*\\*([^*]+)\\*\\*|(?<!\\w)__([^_]+)__(?!\\w)|\\*([^*\\s][^*]*?)\\*|(?<!\\w)_([^_\\s][^_]*?)_(?!\\w)|\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\s)]+)\\)";function na(i){const o=[],l=new RegExp(mx,"g");let s=0,u;for(;(u=l.exec(i))!==null;)u.index>s&&o.push({kind:"text",text:i.slice(s,u.index)}),u[2]!==void 0?o.push({kind:"code",text:u[2]}):u[3]!==void 0||u[4]!==void 0?o.push({kind:"strong",children:na(u[3]??u[4]??"")}):u[5]!==void 0||u[6]!==void 0?o.push({kind:"em",children:na(u[5]??u[6]??"")}):u[7]!==void 0&&u[8]!==void 0&&o.push({kind:"link",href:u[8],children:na(u[7])}),s=u.index+u[0].length;return s<i.length&&o.push({kind:"text",text:i.slice(s)}),o}function px(i){const o=[],l=i.replace(/\r\n?/g,`
|
|
20
|
+
`).split(`
|
|
21
|
+
`);let s=0;const u=[],f=()=>{u.length&&(o.push({kind:"paragraph",children:na(u.join(`
|
|
22
|
+
`))}),u.length=0)};for(;s<l.length;){const p=l[s];if(/^\s*$/.test(p)){f(),s++;continue}if(/^```/.test(p)){f();const _=[];for(s++;s<l.length&&!/^```/.test(l[s]);)_.push(l[s]),s++;s++,o.push({kind:"pre",text:_.join(`
|
|
23
|
+
`)});continue}const h=/^(#{1,6})\s+(.*)$/.exec(p);if(h){f(),o.push({kind:"heading",level:h[1].length,children:na(h[2])}),s++;continue}if(/^\s*([-*_])(\s*\1){2,}\s*$/.test(p)){f(),o.push({kind:"rule"}),s++;continue}if(/^\s*>\s?/.test(p)){f();const _=[];for(;s<l.length&&/^\s*>\s?/.test(l[s]);)_.push(l[s].replace(/^\s*>\s?/,"")),s++;o.push({kind:"quote",children:na(_.join(`
|
|
24
|
+
`))});continue}const y=/^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(p);if(y){f();const _=/\d/.test(y[1]),b=[];for(;s<l.length;){const v=/^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(l[s]);if(!v)break;let T=v[2];for(s++;s<l.length&&/^\s{2,}\S/.test(l[s])&&!/^\s*([-*+]|\d+[.)])\s+/.test(l[s]);)T+=`
|
|
25
|
+
`+l[s].trim(),s++;b.push(na(T))}o.push({kind:"list",ordered:_,items:b});continue}u.push(p),s++}return f(),o}const hx={nf:"function",fm:"function",nc:"class",nn:"class",ne:"class",nt:"tag",nb:"builtin",bp:"builtin",no:"builtin",kc:"keyword",kt:"class",nd:"decorator",na:"attribute",nv:"name",vc:"name",vg:"name",vi:"name",vm:"name",gd:"deleted",gi:"inserted",gh:"heading",gu:"heading",gp:"prompt",gr:"error",gt:"error",err:"error",w:"text","":"text"};function gx(i){const o=hx[i];if(o)return o;switch(i[0]){case"k":return"keyword";case"n":return"name";case"s":return"string";case"l":return"string";case"m":return"number";case"i":return"number";case"o":return"operator";case"p":return"punctuation";case"c":return"comment";case"g":return"text";default:return"text"}}function _x(i){return`tok tok-${gx(i)}`}function aa({nodes:i}){return d.jsx(d.Fragment,{children:i.map((o,l)=>{switch(o.kind){case"text":return d.jsx("span",{children:o.text},l);case"code":return d.jsx("code",{className:"inline",children:o.text},l);case"strong":return d.jsx("strong",{children:d.jsx(aa,{nodes:o.children})},l);case"em":return d.jsx("em",{children:d.jsx(aa,{nodes:o.children})},l);case"link":return d.jsx("a",{href:o.href,target:"_blank",rel:"noreferrer noopener",children:d.jsx(aa,{nodes:o.children})},l)}})})}function yx({blocks:i}){return d.jsx(d.Fragment,{children:i.map((o,l)=>{switch(o.kind){case"paragraph":return d.jsx("p",{className:"whitespace-pre-wrap break-words",children:d.jsx(aa,{nodes:o.children})},l);case"heading":{const s=`h${Math.min(4,o.level)}`;return d.jsx(s,{children:d.jsx(aa,{nodes:o.children})},l)}case"list":{const s=o.ordered?"ol":"ul";return d.jsx(s,{children:o.items.map((u,f)=>d.jsx("li",{className:"whitespace-pre-wrap",children:d.jsx(aa,{nodes:u})},f))},l)}case"quote":return d.jsx("blockquote",{className:"whitespace-pre-wrap",children:d.jsx(aa,{nodes:o.children})},l);case"rule":return d.jsx("hr",{},l);case"pre":return d.jsx("pre",{className:"code-block plate plate-ground p-2.5 my-1.5 overflow-x-auto whitespace-pre",children:o.text},l)}})})}function bx({lines:i}){const o=i.some(l=>l.n!==null);return d.jsx("pre",{className:"code-block overflow-x-auto whitespace-pre p-2",children:i.map((l,s)=>d.jsxs("div",{children:[o&&d.jsx("span",{className:"ln",children:l.n??""}),l.tokens.map((u,f)=>u.t?d.jsx("span",{className:_x(u.t),children:u.text},f):d.jsx("span",{children:u.text},f)),l.tokens.length===0&&" "]},s))})}function xx({language:i,lines:o}){const l=o.map(s=>s.tokens.map(u=>u.text).join("")).join(`
|
|
26
|
+
`);return d.jsxs(Nt,{ground:!0,corners:"two",className:"my-2",children:[d.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1 border-b hairline",children:[d.jsx("span",{className:"kicker kicker-muted",children:i||"text"}),d.jsx("button",{type:"button",className:"chrome-sm font-heading uppercase tracking-[0.1em] text-text-muted hover:text-steel",onClick:()=>navigator.clipboard?.writeText(l).catch(()=>{}),title:"Copy code",children:"copy"})]}),d.jsx(bx,{lines:o})]})}function vx({head:i,rows:o}){return d.jsx("div",{className:"overflow-x-auto",children:d.jsxs("table",{className:"j-table",children:[i.length>0&&d.jsx("thead",{children:d.jsx("tr",{children:i.map((l,s)=>d.jsx("th",{children:l},s))})}),d.jsx("tbody",{children:o.map((l,s)=>d.jsx("tr",{children:l.map((u,f)=>d.jsx("td",{children:u},f))},s))})]})})}function Sx({seg:i}){return i.kind==="code"?d.jsx(xx,{language:i.language,lines:i.lines}):i.kind==="table"?d.jsx(vx,{head:i.head,rows:i.rows}):d.jsx(yx,{blocks:px(i.text)})}const qp=Y.memo(function({text:o}){const l=Y.useMemo(()=>dx(o),[o]);return d.jsx("div",{className:"prose-j",children:l.map((s,u)=>d.jsx(Sx,{seg:s},u))})});function Ex({lines:i}){return d.jsx("pre",{className:"code-block whitespace-pre overflow-x-auto p-2",children:i.map((o,l)=>{let s="";return o.startsWith("+++")||o.startsWith("---")?s="diff-meta":o.startsWith("@@")?s="diff-hunk":o.startsWith("+")?s="diff-add":o.startsWith("-")&&(s="diff-del"),d.jsx("div",{className:s,children:o||" "},l)})})}function Tx(i){const[o,...l]=i.split(";").map(u=>u.trim());if(o!=="audio/pcm"&&o!=="audio/l16"&&o!=="audio/L16")return null;const s={};for(const u of l){const[f,p]=u.split("=");f&&p&&(s[f.toLowerCase()]=p)}return{rate:Number(s.rate??24e3),bits:Number(s.bits??16),channels:Number(s.channels??1)}}function Nx(i){const o=atob(i),l=new Uint8Array(o.length);for(let s=0;s<o.length;s++)l[s]=o.charCodeAt(s);return l}class wx{ctx=null;nextAt=0;played=0;feed(o,l,s){for(;this.played<o.length;this.played++){const u=o[this.played],f=Nx(u.dataB64),p=new Int16Array(f.buffer,f.byteOffset,Math.floor(f.byteLength/2));if(!p.length)continue;this.ctx??=new AudioContext({sampleRate:l});const h=Math.floor(p.length/s),y=this.ctx.createBuffer(s,h,l);for(let v=0;v<s;v++){const T=y.getChannelData(v);for(let R=0;R<h;R++)T[R]=p[R*s+v]/32768}const _=this.ctx.createBufferSource();_.buffer=y,_.connect(this.ctx.destination);const b=Math.max(this.ctx.currentTime+.02,this.nextAt);_.start(b),this.nextAt=b+y.duration}}close(){this.ctx?.close().catch(()=>{}),this.ctx=null}}function kx({items:i,mime:o}){const l=Y.useRef(null),s=Y.useMemo(()=>Tx(o),[o]);Y.useEffect(()=>{s&&(l.current??=new wx,l.current.feed(i,s.rate,s.channels))},[i,s]),Y.useEffect(()=>()=>l.current?.close(),[]);const u=s?i.reduce((f,p)=>f+p.dataB64.length*3/4,0)/(s.rate*2*s.channels):0;return d.jsxs("div",{className:"text-xs text-text-muted font-mono",children:["🔊 pcm ",s?.rate??"?"," Hz · ",u.toFixed(1),"s",i.at(-1)?.final?"":" · streaming"]})}function Ax({items:i}){if(!i.length)return null;const o=new Map;for(const l of i){const s=l.streamId??`${l.mimeType}#single`,u=o.get(s)??[];u.push(l),o.set(s,u)}return d.jsx("div",{className:"flex flex-col gap-2 p-2",children:[...o.entries()].map(([l,s])=>{const u=s[0].mimeType,f=u.split(";")[0].trim().toLowerCase();if(f.startsWith("image/")){const p=s.map(h=>h.dataB64).join("");return d.jsx("img",{alt:"tool output",className:"max-h-96 rounded-md border hairline",src:`data:${f};base64,${p}`},l)}if(f==="audio/pcm"||f==="audio/l16")return d.jsx(kx,{items:s,mime:u},l);if(f.startsWith("audio/")){const p=s.map(h=>h.dataB64).join("");return d.jsx("audio",{controls:!0,preload:"auto",src:`data:${f};base64,${p}`},l)}if(f==="application/pdf"){const p=s.map(h=>h.dataB64).join("");return d.jsx("a",{className:"text-primary underline text-xs",href:`data:${f};base64,${p}`,target:"_blank",rel:"noreferrer",children:"Open PDF attachment"},l)}return d.jsxs("div",{className:"text-xs text-text-muted",children:["[",u,": ",s.length," chunk(s), not renderable here]"]},l)})})}function jx(i,o=110){const l=[];for(const[u,f]of Object.entries(i)){let p;if(typeof f=="string")p=f;else{if(f==null)continue;p=JSON.stringify(f)}p=p.replace(/\s+/g," "),l.push(`${u}=${p.length>60?p.slice(0,57)+"…":p}`)}const s=l.join(" ");return s.length>o?s.slice(0,o-1)+"…":s}function Ox({status:i}){return i==="running"?d.jsx("span",{className:"text-primary pulse","aria-label":"running",children:"●"}):i==="success"?d.jsx("span",{className:"text-success","aria-label":"succeeded",children:"✓"}):d.jsx("span",{className:"text-error","aria-label":"failed",children:"✗"})}const Cx=Y.memo(function({block:o}){const l=L(p=>p.toggleTool),s=L(p=>p.setPopup),u=o.output.length>0||o.media.length>0||!!o.errorMessage,f=o.status==="running";return d.jsxs("div",{"data-testid":"tool-block",className:"border-t hairline",children:[d.jsxs("button",{type:"button",onClick:()=>l(o.agentId,o.id),className:`w-full flex items-center gap-3 py-1.5 pr-1 text-left ${f?"bg-steel/8":"hover:bg-tint/70"}`,"aria-expanded":o.expanded,children:[d.jsx("span",{className:"w-3 shrink-0 text-center",children:d.jsx(Ox,{status:o.status})}),d.jsx("span",{className:`chrome w-[120px] shrink-0 truncate ${o.status==="error"?"text-error":""}`,children:o.toolName}),d.jsx("span",{className:"font-mono text-xs text-text-muted truncate flex-1",children:jx(o.args)}),o.backgrounded&&d.jsx("span",{className:"kicker kicker-muted text-[10px]",children:"bg"}),f&&o.output?d.jsx("span",{role:"button",tabIndex:0,className:"chrome-sm font-heading font-medium uppercase tracking-[0.08em] text-steel w-[52px] text-right",onClick:p=>{p.stopPropagation(),s(o.callId)},onKeyDown:p=>{p.key==="Enter"&&(p.stopPropagation(),s(o.callId))},title:"Follow live output",children:"Follow"}):typeof o.durationSeconds=="number"?d.jsxs("span",{className:"font-mono text-[11px] text-text-muted w-[52px] text-right",children:[o.durationSeconds.toFixed(o.durationSeconds<10?2:1),"s"]}):d.jsx("span",{className:"w-[52px]"})]}),o.expanded&&u&&d.jsxs(Nt,{ground:!0,corners:"two",edge:o.status==="error"?"error":"hairline",className:"ml-6 mt-0.5 mb-2.5",children:[o.errorMessage&&d.jsx("div",{className:"px-3 py-1.5 text-error text-xs whitespace-pre-wrap",children:o.errorMessage}),o.output&&(o.output.includes("<j-")?d.jsx("div",{className:"px-3 py-1.5 text-[13px]",children:d.jsx(qp,{text:o.output})}):d.jsx("pre",{className:"code-block whitespace-pre-wrap break-words px-3 py-2 max-h-[60vh] overflow-auto",children:o.output})),d.jsx(Ax,{items:o.media})]})]})}),Rx=Y.memo(function({block:o}){const l=o.source==="model";return d.jsxs("div",{className:`py-1.5 ${l?"":"text-[13px]"}`,children:[!l&&o.source!=="system"&&d.jsx("div",{className:"kicker kicker-muted text-[10px]",children:o.source}),d.jsx("div",{className:l?"":"text-text-muted",children:d.jsx(qp,{text:o.text})})]})}),Mx=Y.memo(function({block:o,turn:l}){return d.jsxs("div",{className:"my-2.5 flex items-start gap-3",children:[d.jsx("span",{className:"font-mono text-[10px] text-steel w-9 shrink-0 pt-2.5 select-none","aria-hidden":"true",children:l?`T${l}`:""}),d.jsx("span",{className:"flex-1"}),d.jsx("div",{className:"max-w-[76%] tint border-l-2 border-steel px-3 py-2 whitespace-pre-wrap break-words text-[15px]",children:o.text})]})}),ip={error:"text-error",warning:"text-warning",success:"text-success",hint:"text-text-muted italic",help:"text-text-muted font-mono text-xs whitespace-pre",info:"text-text-muted"},Dx=Y.memo(function({block:o}){const l=ip[o.style]??ip[o.style.split("_")[0]??""]??"text-text-muted";return d.jsx("div",{className:`py-0.5 text-[13px] whitespace-pre-wrap ${l}`,children:o.text})});function zx({block:i,turn:o}){switch(i.kind){case"text":return d.jsx(Rx,{block:i});case"user":return d.jsx(Mx,{block:i,turn:o});case"system":return d.jsx(Dx,{block:i});case"tool":return d.jsx(Cx,{block:i})}}function Ux({agentId:i}){const o=L(ly(i)),l=Y.useRef(null),[s,u]=Y.useState(!0),f=Y.useMemo(()=>{const T=new Map;let R=0;for(const B of o)B.kind==="user"&&T.set(B.id,++R);return T},[o]),p=ax({count:o.length,getScrollElement:()=>l.current,estimateSize:()=>64,overscan:8,getItemKey:T=>o[T]?.id??T}),h=Y.useRef(0),y=Y.useRef(null),_=o[o.length-1],b=_?`${_.id}:${_.kind==="text"?_.text.length:_.kind==="tool"?_.output.length+(_.expanded?1:0):0}`:null;Y.useLayoutEffect(()=>{if(s&&(o.length!==h.current||b!==y.current)){h.current=o.length,y.current=b;const T=l.current;T&&requestAnimationFrame(()=>{T.scrollTop=T.scrollHeight})}},[o.length,b,s]),Y.useEffect(()=>{const T=l.current;if(!T)return;const R=()=>{const B=T.scrollHeight-T.scrollTop-T.clientHeight<24;u(B)};return T.addEventListener("scroll",R,{passive:!0}),()=>T.removeEventListener("scroll",R)},[]),Y.useEffect(()=>{const T=R=>{const B=R.target,M=B&&(B.tagName==="TEXTAREA"||B.tagName==="INPUT");if(M&&R.key!=="End"&&R.key!=="Home")return;const V=l.current;V&&(R.key==="End"&&(R.ctrlKey||!M)&&(V.scrollTop=V.scrollHeight,u(!0)),R.key==="Home"&&(R.ctrlKey||!M)&&(V.scrollTop=0,u(!1)),!M&&R.key==="PageDown"&&(V.scrollTop+=V.clientHeight*.9),!M&&R.key==="PageUp"&&(V.scrollTop-=V.clientHeight*.9))};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[]);const v=p.getVirtualItems();return d.jsxs("div",{ref:l,className:"relative flex-1 overflow-y-auto px-5 py-3","data-testid":"output-pane",children:[o.length===0&&d.jsx("div",{className:"h-full flex items-center justify-center text-text-muted text-sm select-none",children:d.jsxs("div",{className:"text-center max-w-[52ch] space-y-2",children:[d.jsx("div",{className:"display text-[34px] text-text",children:"jaato"}),d.jsxs("div",{children:["Type a message, or a command such as ",d.jsx("kbd",{children:"help"}),", ",d.jsx("kbd",{children:"tools"}),", ",d.jsx("kbd",{children:"model"}),"."]}),d.jsxs("div",{children:["Commands are plain words — the composer proposes them as you type; ",d.jsx("kbd",{children:"Esc"})," dismisses the proposal to send the word verbatim."]})]})}),d.jsx("div",{style:{height:p.getTotalSize(),position:"relative",width:"100%"},children:v.map(T=>{const R=o[T.index];return d.jsx("div",{"data-index":T.index,ref:p.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${T.start}px)`},children:d.jsx(zx,{block:R,turn:f.get(R.id)})},T.key)})}),!s&&o.length>0&&d.jsx("button",{type:"button",className:"sticky bottom-3 left-1/2 -translate-x-1/2 btn btn-sm bg-surface text-text-muted shadow-md",onClick:()=>{const T=l.current;T&&(T.scrollTop=T.scrollHeight),u(!0)},children:"↓ follow output"})]})}function Lx({agentId:i}){const o=L(h=>h.blocks[i]),l=L(h=>h.ui.popupCallId),s=L(h=>h.setPopup),u=Y.useMemo(()=>(o??[]).filter(h=>h.kind==="tool"&&h.status==="running"&&h.output.length>0),[o]),f=u.find(h=>h.callId===l)??null,p=Y.useRef(null);return Y.useEffect(()=>{const h=p.current;h&&(h.scrollTop=h.scrollHeight)},[f?.output.length]),Y.useEffect(()=>{const h=y=>{if(y.ctrlKey&&y.key.toLowerCase()==="o"&&u.length){y.preventDefault();const _=u.findIndex(b=>b.callId===l);s(u[(_+1)%u.length].callId)}};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[u,l,s]),f?d.jsxs(Nt,{ground:!0,edge:"steel",className:"absolute right-5 bottom-[104px] w-[min(560px,70%)] max-h-[45vh] flex flex-col shadow-lg z-20",role:"dialog","aria-label":"Live tool output",children:[d.jsxs("div",{className:"flex items-center gap-2.5 px-2.5 py-1.5 border-b hairline",children:[u.map(h=>d.jsxs("button",{type:"button",onClick:()=>s(h.callId),className:`kicker tracking-[0.12em] text-[12px] ${h.callId===f.callId?"":"kicker-muted hover:text-text"}`,children:[h.callId===f.callId?"Live · ":"",h.toolName]},h.callId)),d.jsx("span",{className:"flex-1"}),d.jsx("span",{className:"font-mono text-[10px] text-text-muted hidden md:inline",children:"Ctrl+O next"}),d.jsx("button",{type:"button",className:"text-text-muted hover:text-text",onClick:()=>s(null),"aria-label":"Close",children:"✕"})]}),d.jsx("pre",{ref:p,className:"code-block whitespace-pre-wrap break-words px-3 py-2.5 overflow-auto flex-1",children:f.output})]}):null}const ta=new Map;let Fo=Promise.resolve(),qx=0;function Hx(){return Zl()&&fc(L.getState())}function fc(i){return!!(i.sessionId||i.workspace.selected)}L.subscribe((i,o)=>{fc(i)&&!fc(o)&&Zl()&&i.uploads.some(l=>l.status==="queued")&&vi().catch(()=>{})});function xi(i,o){if(!i.length)return;const l=L.getState(),s=gb(i.map(f=>f.size)),u=i.map((f,p)=>{const h=`up-${++qx}`,y=f.webkitRelativePath??"",_=pb(f.name,y,o),b=_===null?"name must be a non-empty workspace-relative path with no '..' components":s[p].reason;return b?{id:h,path:_??f.name,size:f.size,status:"failed",error:b}:(ta.set(h,f),{id:h,path:_,size:f.size,status:"queued"})});l.addUploads(u),Hx()&&vi().catch(()=>{})}function Bx(i){ta.delete(i),L.getState().removeUpload(i)}function vi(){return Fo=Fo.then(()=>Hp()).catch(()=>{}),Fo}async function Hp(i=!1){const o=L.getState(),l=o.uploads.filter(p=>p.status==="queued"&&ta.has(p.id));if(!l.length)return;for(const p of l)o.updateUpload(p.id,{status:"staging"});const s=o.selectedAgentId||Vt,u=[],f=[];for(const p of l){const h=ta.get(p.id);try{u.push({name:p.path,data:await h.arrayBuffer(),contentType:h.type||void 0}),f.push(p)}catch(y){ta.delete(p.id),o.updateUpload(p.id,{status:"failed",error:`could not read the file: ${y instanceof Error?y.message:String(y)}`})}}if(f.length)try{const p=await Re().stageFiles("",u);if(!i&&o.workspace.selected&&(p.failed??[]).some(v=>v.category==="workspace_not_found")){for(const v of f)o.updateUpload(v.id,{status:"queued"});return await Tp(),Hp(!0)}const h=new Set(p.staged??[]),y=new Map((p.failed??[]).map(v=>[v.name,v.error||v.category||"failed"])),_=[],b=[];for(const v of f)if(ta.delete(v.id),h.has(v.path))o.updateUpload(v.id,{status:"staged"}),_.push(v.path);else{const T=y.get(v.path)??"the daemon did not report this file";o.updateUpload(v.id,{status:"failed",error:T}),b.push(`${v.path}: ${T}`)}_.length&&o.addSystemBlock(s,`Staged into the workspace: ${_.join(", ")}`,"info"),b.length&&o.addSystemBlock(s,`Not staged:
|
|
27
|
+
${b.join(`
|
|
28
|
+
`)}`,"error")}catch(p){const h=p instanceof Error?p.message:String(p);for(const y of f)ta.delete(y.id),o.updateUpload(y.id,{status:"failed",error:h});o.addSystemBlock(s,`Staging failed: ${h}`,"error")}}function Gx(i=6e4){return new Promise(o=>{let l=()=>{};const s=setTimeout(()=>{l(),o(!1)},i);l=Re().subscribe(q.SESSION_INFO,()=>{clearTimeout(s),l(),o(!0)})})}async function rp(i){const o=L.getState();if(!o.uploads.some(u=>u.status==="queued"))return i();if(o.workspace.selected)return await vi(),i();const s=Gx();await i(),await s&&await vi()}const op={queued:{text:"○",cls:"text-text-muted"},staging:{text:"●",cls:"text-primary pulse"},staged:{text:"✓",cls:"text-success"},failed:{text:"✗",cls:"text-error"}};function Bp({hint:i,always:o}){const l=L(p=>p.uploads),[s,u]=Y.useState(""),f=Y.useRef(null);return!o&&l.length===0?d.jsx("input",{ref:f,type:"file",multiple:!0,className:"hidden","aria-label":"Attach files","data-attach-input":!0,onChange:p=>{xi(Array.from(p.target.files??[]),s),p.target.value=""}}):d.jsxs("div",{className:"plate plate-ground mb-2 text-[13px]",role:"group","aria-label":"Attached files",children:[d.jsx("input",{ref:f,type:"file",multiple:!0,className:"hidden","aria-label":"Attach files","data-attach-input":!0,onChange:p=>{xi(Array.from(p.target.files??[]),s),p.target.value=""}}),d.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1.5 px-3 py-2 border-b hairline",children:[d.jsx("button",{type:"button",onClick:()=>f.current?.click(),className:"btn btn-sm btn-steel",children:"Attach files"}),d.jsxs("label",{className:"flex items-center gap-2 text-text-muted",children:[d.jsx("span",{className:"kicker kicker-muted",children:"into"}),d.jsx("input",{value:s,onChange:p=>u(p.target.value),placeholder:"workspace root","aria-label":"Folder for the next files",className:"input input-mono text-[12px] py-0.5 w-40"})]}),d.jsx("span",{className:"text-[12px] text-text-muted",children:i})]}),l.length>0&&d.jsx("ul",{className:"flex flex-wrap gap-1.5 px-3 py-2","aria-label":"Attachments",children:l.map(p=>d.jsxs("li",{"data-status":p.status,title:p.error??p.path,className:`flex items-center gap-1.5 border hairline px-2 py-0.5 font-mono text-[12px] ${p.status==="failed"?"border-error":""}`,children:[d.jsx("span",{className:op[p.status].cls,"aria-label":p.status,children:op[p.status].text}),d.jsx("span",{className:"max-w-[18rem] truncate",children:p.path}),d.jsx("span",{className:"text-text-muted",children:hb(p.size)}),p.status==="failed"&&d.jsx("span",{className:"text-error truncate max-w-[16rem]",children:p.error}),d.jsx("button",{type:"button",onClick:()=>Bx(p.id),"aria-label":`Remove ${p.path}`,className:"text-text-muted hover:text-error px-0.5",children:"×"})]},p.id))})]})}function Po(i){if(!i)return[];const o=[];for(const l of Array.from(i.items??[])){if(l.kind!=="file")continue;const s=l.getAsFile();s&&o.push(s)}return!o.length&&i.files?.length&&o.push(...Array.from(i.files)),o}function ec(i){return(i.trimStart().split(/\s+/)[0]??"").toLowerCase()}function Yx({commands:i,disabled:o,captureMode:l,history:s,onSubmit:u,onEscapeEmpty:f}){const[p,h]=Y.useState(""),[y,_]=Y.useState(!1),[b,v]=Y.useState(!1),[T,R]=Y.useState(0),[B,M]=Y.useState(null),[V,K]=Y.useState(0),[ee,ne]=Y.useState(!1),I=Y.useRef(null),W=Y.useRef(""),de=p.slice(0,V),Z=L(H=>H.sessions),le=Y.useMemo(()=>{if(l||y||b)return[];if(!p.trim()&&!de.length)return[];const H=$_(de,Z);return H!==null?H.slice(0,12):G_(de,i).slice(0,12)},[de,p,i,Z,l,y,b]),G=Y.useRef(!1);Y.useEffect(()=>{if(!l){if(!Z_(de)){G.current=!1;return}G.current||(G.current=!0,zp().catch(()=>{}))}},[de,l]);const re=le.length>0;Y.useEffect(()=>{R(0)},[le.length,de]),Y.useEffect(()=>{const H=ec(p);if(!p.trim()){_(!1),v(!1),W.current="";return}(y||b)&&H!==W.current&&(_(!1),v(!1))},[p,y,b]);const te=!l&&!y?Lm(p,i):null,Q=!l&&y?Lm(p,i):null,we=Y.useCallback(()=>{const H=I.current;H&&(H.style.height="0px",H.style.height=Math.min(H.scrollHeight,240)+"px")},[]);Y.useEffect(we,[p,we]);const ze=Y.useRef(null);Y.useLayoutEffect(()=>{const H=ze.current;H!==null&&(ze.current=null,I.current?.setSelectionRange(H,H),K(H))},[p]);const Ce=H=>{const S=p.slice(V).replace(/^\S*/,""),z=H.insert+" "+S.replace(/^\s+/,"");ze.current=H.insert.length+1,h(z)},C=()=>{const H=p.replace(/\s+$/,"");!H&&!l||(u(H,y),h(""),_(!1),v(!1),M(null))},X=H=>{if(H.key==="Tab"&&!l){if(H.preventDefault(),re){H.shiftKey?R(S=>(S-1+le.length)%le.length):(le.length===1||T>=0)&&Ce(le[T]??le[0]);return}_(!1),v(!1),W.current="";return}if(re&&(H.key==="ArrowDown"||H.key==="ArrowUp")){H.preventDefault(),R(S=>H.key==="ArrowDown"?(S+1)%le.length:(S-1+le.length)%le.length);return}if(H.key==="Escape"){if(re){H.preventDefault(),_(!0),v(!0),W.current=ec(p);return}if(!p){f?.();return}if(te){H.preventDefault(),_(!0),v(!0),W.current=ec(p);return}return}if(H.key==="Enter"&&!H.shiftKey&&!H.altKey&&!H.ctrlKey&&!H.metaKey&&!H.nativeEvent.isComposing){H.preventDefault(),C();return}if(H.key==="ArrowUp"&&!re&&s.length&&(p===""||B!==null)&&ie()){H.preventDefault();const S=B===null?s.length-1:Math.max(0,B-1);M(S),h(s[S]??"");return}if(H.key==="ArrowDown"&&!re&&B!==null){H.preventDefault();const S=B+1;S>=s.length?(M(null),h("")):(M(S),h(s[S]??""))}},ie=()=>{const H=I.current;return H?!H.value.slice(0,H.selectionStart).includes(`
|
|
29
|
+
`):!0},Se=l?l.placeholder:"Message the agent — or type a command (help, tools, model …)";return d.jsxs("div",{className:"relative",children:[re&&d.jsxs("div",{role:"listbox","aria-label":"Command proposals",className:"plate plate-ground absolute bottom-full mb-1.5 left-0 w-[min(34rem,100%)] shadow-md text-[13px] z-30",children:[le.map((H,S)=>d.jsxs("div",{role:"option","aria-selected":S===T,onMouseDown:z=>{z.preventDefault(),Ce(H)},className:`flex items-baseline gap-3 px-2.5 py-1 cursor-pointer ${S===T?"bg-surface text-steel":"hover:bg-tint"}`,children:[d.jsx("span",{className:"font-mono",children:H.label}),H.description&&d.jsx("span",{className:"text-text-muted text-xs truncate",children:H.description})]},H.insert)),d.jsxs("div",{className:"px-2.5 py-1 text-[11px] text-text-muted border-t hairline flex gap-3",children:[d.jsxs("span",{children:[d.jsx("kbd",{children:"Tab"})," complete"]}),d.jsxs("span",{children:[d.jsx("kbd",{children:"Enter"})," run"]}),d.jsxs("span",{children:[d.jsx("kbd",{children:"Esc"})," not a command — send as text"]})]})]}),d.jsx(Bp,{hint:"Staged into the session's workspace now; the next message names them."}),d.jsxs("div",{className:`flex items-end gap-2.5 border px-3 py-2 bg-surface ${l?"border-warning":"border-steel"} ${ee?"bg-tint outline outline-1 outline-steel":""}`,onDragOver:H=>{(Po(H.dataTransfer).length||H.dataTransfer.types.includes("Files"))&&(H.preventDefault(),ne(!0))},onDragLeave:()=>ne(!1),onDrop:H=>{const S=Po(H.dataTransfer);ne(!1),S.length&&(H.preventDefault(),xi(S,""))},onPaste:H=>{const S=Po(H.clipboardData);S.length&&(H.preventDefault(),xi(S,""))},children:[d.jsx("span",{className:`font-mono select-none pb-[3px] ${l?"text-warning":"text-steel"}`,children:l?"?":"›"}),d.jsx("textarea",{ref:I,value:p,rows:1,disabled:o,placeholder:Se,"aria-label":"Prompt",spellCheck:!te,onChange:H=>{h(H.target.value),K(H.target.selectionStart??H.target.value.length)},onSelect:H=>K(H.target.selectionStart??0),onKeyDown:X,className:"flex-1 resize-none bg-transparent outline-none font-mono text-[13.5px] leading-5 placeholder:text-text-muted max-h-60"}),d.jsx("button",{type:"button",onClick:()=>document.querySelector("[data-attach-input]")?.click(),disabled:o,className:"chrome-sm font-heading font-medium uppercase tracking-[0.08em] pb-[3px] text-text-muted hover:text-steel disabled:opacity-40","aria-label":"Attach",title:"Attach files to the workspace (or drop / paste them here)",children:"Attach"}),d.jsxs("button",{type:"button",onClick:C,disabled:o||!p.trim()&&!l,className:`chrome-sm font-heading font-medium uppercase tracking-[0.08em] pb-[3px] disabled:opacity-40 ${l?"text-warning":"text-steel"}`,"aria-label":"Send",children:[l?"Answer":"Send"," ⏎"]})]}),d.jsx("div",{className:`mt-1.5 pl-2.5 border-l-2 text-[13px] text-text-muted flex items-center gap-3 min-h-5 ${l?"border-warning":"border-steel"}`,children:l&&l.suggestions?.length?d.jsxs("span",{children:["A key answers the prompt — ",l.suggestions.map(H=>d.jsx("kbd",{className:"mx-0.5",children:H},H))," · anything longer is sent to the agent as a reply"]}):l?d.jsx("span",{children:"Enter sends your answer"}):te?d.jsxs("span",{children:["Enter runs command ",d.jsx("span",{className:"font-mono text-steel",children:te})," · Esc to send as text instead"]}):Q?d.jsxs("span",{children:["Sending as text (not the ",d.jsx("span",{className:"font-mono",children:Q})," command) · Tab to make it a command"]}):d.jsx("span",{children:"Enter sends a message · a first word that names a command runs it · Esc sends it verbatim · Shift+Enter for a newline · drop or paste files to stage them"})})]})}function tc(i){return/\b(deny|denied|never|reject|no)\b/i.test(`${i.label??""} ${i.action??""}`)||i.key==="n"}function Qx({p:i,onRespond:o}){const l=L(_=>_.focusPermission);Y.useEffect(()=>{const _=b=>{const v=b.target,T=v&&(v.tagName==="TEXTAREA"||v.tagName==="INPUT");if(b.key==="Tab"&&!T){b.preventDefault();const R=i.options.length||1;l(i.requestId,(i.focus+(b.shiftKey?-1:1)+R)%R)}};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[i,l]);const s=Object.entries(i.toolArgs??{}),u=i.warningLevel??"warning",f=i.options.length?i.options:[{key:"y",label:"yes"},{key:"n",label:"no"}],p=f.map((_,b)=>[_,b]).filter(([_])=>!tc(_)),h=f.map((_,b)=>[_,b]).filter(([_])=>tc(_)),y=([_,b])=>d.jsxs("button",{type:"button",onClick:()=>o(_.key),title:_.description??_.action??void 0,className:`btn ${b===i.focus?"btn-primary":tc(_)?"btn-danger":""}`,"aria-current":b===i.focus?"true":void 0,children:[_.label??_.key," ",d.jsx("span",{className:"key",children:_.key})]},_.key+b);return d.jsxs(Nt,{edge:"warning",className:"my-3",role:"group","aria-label":`Permission request for ${i.toolName}`,children:[d.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-3 border-b hairline",children:[d.jsx("span",{className:"text-warning",children:"⚠"}),d.jsx("span",{className:"kicker text-warning",children:"Permission requested for"}),d.jsx("span",{className:"font-mono text-sm",children:i.toolName}),d.jsx("span",{className:"flex-1"}),d.jsxs("span",{className:"font-mono text-[11px] text-text-muted",children:["agent ",i.agentId]})]}),i.promptLines.length>0?i.formatHint==="diff"?d.jsx(Ex,{lines:i.promptLines}):d.jsx("pre",{className:"code-block whitespace-pre-wrap px-3.5 py-2.5 max-h-[40vh] overflow-auto",children:i.promptLines.join(`
|
|
30
|
+
`)}):s.length>0?d.jsx("dl",{className:"px-3.5 py-2.5 grid grid-cols-[max-content_1fr] gap-x-4 gap-y-1 text-[13px] font-mono max-h-[40vh] overflow-auto m-0",children:s.map(([_,b])=>d.jsxs("div",{className:"contents",children:[d.jsx("dt",{className:"text-text-muted",children:_}),d.jsx("dd",{className:"whitespace-pre-wrap break-words m-0",children:typeof b=="string"?b:JSON.stringify(b,null,2)})]},_))}):null,i.warnings&&d.jsx("div",{className:`px-3.5 py-2 text-[13px] whitespace-pre-wrap border-t hairline ${u==="error"?"text-error":u==="info"?"text-text-muted":"text-warning"}`,children:i.warnings}),d.jsxs("div",{className:"px-3.5 py-3 flex flex-wrap items-center gap-2.5 border-t hairline",children:[p.map(y),d.jsx("span",{className:"flex-1"}),h.map(y)]})]})}function Vx({x:i,onAnswer:o}){const l=L(f=>f.focusExitChoice);Y.useEffect(()=>{const f=p=>{const h=p.target,y=h&&(h.tagName==="TEXTAREA"||h.tagName==="INPUT");if(p.key==="Tab"&&!y){p.preventDefault();const _=i.options.length||1;l((i.focus+(p.shiftKey?-1:1)+_)%_)}else p.key==="Escape"&&(p.preventDefault(),o("r"))};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[i,l,o]);const s=(f,p)=>d.jsxs("button",{type:"button",onClick:()=>o(f.key),title:f.description,className:`btn ${p===i.focus?"btn-primary":f.key==="e"?"btn-danger":""}`,"aria-current":p===i.focus?"true":void 0,children:[f.label," ",d.jsx("span",{className:"key",children:f.key})]},f.key),u=i.options.findIndex(f=>f.key==="r");return d.jsxs(Nt,{edge:"warning",className:"my-3",role:"group","aria-label":"Exit options",children:[d.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-3 border-b hairline",children:[d.jsx("span",{className:"text-warning",children:"⚠"}),d.jsx("span",{className:"kicker text-warning",children:i.running?"Task in progress":"Exit options"}),d.jsx("span",{className:"text-[13px] text-text-muted",children:i.running?"What would you like to do?":"What should become of the session?"})]}),d.jsx("ul",{className:"px-3.5 py-2 m-0 list-none text-[13px] text-text-muted flex flex-col gap-0.5",children:i.options.map(f=>d.jsxs("li",{children:[d.jsxs("span",{className:"font-mono text-text",children:["[",f.key,"]"]})," ",f.label," ",d.jsxs("span",{children:["— ",f.description]})]},f.key))}),d.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-2 border-t hairline",children:[i.options.map((f,p)=>f.key==="r"?null:s(f,p)),d.jsx("span",{className:"flex-1"}),u>=0&&s(i.options[u],u)]})]})}function cp({p:i,onRespond:o,alreadyConfigured:l=!1}){const[s,u]=Y.useState(i.models[0]?.name??""),[f,p]=Y.useState(!!i.workspacePath&&!l),h=s.trim().length>0,y=i.hasActiveSession?`Signed in to ${i.providerDisplayName}. Switch this session to it? (currently ${[i.currentProvider,i.currentModel].filter(Boolean).join(" / ")})`:`Signed in to ${i.providerDisplayName}. Open a session with it?`;return d.jsxs(Nt,{edge:"steel",className:"my-3",role:"group","aria-label":"Post-auth setup",children:[d.jsxs("div",{className:"px-3.5 py-2.5 border-b hairline flex items-baseline gap-3",children:[d.jsx("span",{className:"kicker",children:"Signed in"}),d.jsx("span",{className:"text-[15px]",children:y})]}),d.jsxs("form",{className:"px-3.5 py-3 space-y-3 text-sm",onSubmit:_=>{_.preventDefault(),h&&o({connect:!0,modelName:s.trim(),persistEnv:f})},children:[d.jsxs("label",{className:"block max-w-md",children:[d.jsx("span",{className:"field-label",children:"Model"}),i.models.length>0?d.jsxs("select",{"aria-label":"Model",value:s,onChange:_=>u(_.target.value),className:"input input-mono",children:[i.models.map(_=>d.jsxs("option",{value:_.name,children:[_.name,_.description?` — ${_.description}`:""]},_.name)),d.jsx("option",{value:"",children:"other…"})]}):null,(i.models.length===0||s==="")&&d.jsx("input",{"aria-label":"Model name",value:s,onChange:_=>u(_.target.value),placeholder:"model name",className:"input input-mono mt-1"})]}),i.workspacePath&&!l&&d.jsxs("label",{className:"flex items-center gap-2 text-xs text-text-muted",children:[d.jsx("input",{type:"checkbox",checked:f,onChange:_=>p(_.target.checked)}),"Save provider and model to ",d.jsxs("span",{className:"font-mono",children:[i.workspacePath,"/.env"]})]}),d.jsxs("div",{className:"flex gap-2 pt-1",children:[d.jsx("button",{type:"submit",disabled:!h,className:"btn btn-primary",children:i.hasActiveSession?"Switch":"Open session"}),d.jsx("button",{type:"button",onClick:()=>o({connect:!1}),className:"btn btn-quiet",children:"Not now"})]})]})]})}function Xx({c:i,onAnswer:o,onCancel:l}){const s=i.questions[i.index],u=i.questions.length||i.index+1;return d.jsxs(Nt,{edge:"steel",className:"my-3",role:"group","aria-label":"Clarification",children:[d.jsxs("div",{className:"px-3.5 py-2.5 flex items-center gap-3 border-b hairline",children:[d.jsx("span",{className:"text-steel",children:"?"}),d.jsx("span",{className:"kicker",children:"The agent needs clarification"}),d.jsx("span",{className:"flex-1"}),d.jsxs("span",{className:"font-mono text-[11px] text-text-muted",children:[i.index+1,"/",u,i.toolName?` · ${i.toolName}`:""]})]}),i.context&&i.index===0&&d.jsx("div",{className:"px-3.5 pt-2.5 text-[13px] text-text-muted whitespace-pre-wrap",children:i.context}),d.jsx("div",{className:"px-3.5 py-2.5 text-[15px] whitespace-pre-wrap",children:s?.question_text??(i.inputMode?"Please answer in the box below.":"Waiting for the question…")}),s&&Q_(s)&&d.jsxs("div",{className:"px-3.5 pb-1.5 text-[12px] text-text-muted",children:["Pick one or more: click a choice, or type the numbers comma-separated (e.g. ",d.jsx("kbd",{children:"1,3"}),")."]}),s?.options&&s.options.length>0&&d.jsx("div",{className:"px-3.5 pb-3 flex flex-wrap gap-2",children:s.options.map((f,p)=>d.jsxs("button",{type:"button",onClick:()=>o(String(p+1)),className:`btn btn-md normal-case tracking-normal font-sans font-normal text-left ${s.default===p+1?"btn-steel":""}`,children:[d.jsx("span",{className:"font-mono text-[11px] text-steel",children:p+1}),f,s.default===p+1&&d.jsx("span",{className:"text-text-muted text-xs",children:"(default)"}),s.expects_attachment?.[p]&&d.jsx("span",{className:"text-text-muted",title:"This choice expects you to attach a file",children:"📎"})]},p))}),d.jsxs("div",{className:"px-3.5 py-2 border-t hairline text-[12px] text-text-muted flex gap-4",children:[s&&d.jsx("span",{children:s.optional?"optional (Enter on empty skips)":"required"}),s?.default!=null&&d.jsxs("span",{children:["default: ",d.jsx("kbd",{children:String(s.default)})," (Enter on empty)"]}),d.jsx("span",{className:"flex-1"}),d.jsx("button",{type:"button",className:"link",onClick:l,children:"cancel"})]})]})}function Kx({r:i,onRespond:o}){return d.jsxs(Nt,{edge:"steel",className:"my-3",role:"group","aria-label":"Reference selection",children:[d.jsxs("div",{className:"px-3.5 py-2.5 border-b hairline flex items-baseline gap-3",children:[d.jsx("span",{className:"kicker",children:"Reference"}),d.jsx("span",{className:"text-[15px]",children:i.prompt})]}),d.jsx("div",{className:"px-3.5 py-3 flex flex-wrap gap-2",children:i.options.map((l,s)=>d.jsx("button",{type:"button",onClick:()=>o(l),className:"btn btn-md normal-case tracking-normal font-mono font-normal",children:l},s))})]})}const up={pending:["○","text-text-muted"],in_progress:["◐","text-primary"],active:["◐","text-primary"],completed:["●","text-success"],done:["●","text-success"],failed:["✗","text-error"],skipped:["–","text-warning"],cancelled:["–","text-warning"],blocked:["⊘","text-warning"]};function Ix(i){if(!i)return null;const o=i.steps.length;return`${i.steps.filter(s=>s.status==="completed"||s.status==="done").length}/${o}`}function $x({agentId:i}){const o=L(u=>u.plan[i]);if(!o)return d.jsx("div",{className:"px-3.5 py-3 text-xs text-text-muted italic",children:"No plan yet."});const l=o.steps.length,s=o.steps.filter(u=>u.status==="completed"||u.status==="done").length;return d.jsxs("div",{className:"px-3.5 py-3 text-[13.5px]",children:[d.jsx("div",{className:"display text-[16px] mb-2",children:o.name}),d.jsx("div",{className:"bar mb-2.5",children:d.jsx("span",{className:"bg-success",style:{width:l?`${s/l*100}%`:0}})}),d.jsx("ol",{className:"space-y-1.5 list-none m-0 p-0",children:[...o.steps].sort((u,f)=>(u.sequence??0)-(f.sequence??0)).map((u,f)=>{const[p,h]=up[u.status??"pending"]??up.pending;return d.jsxs("li",{className:"flex gap-2.5",children:[d.jsx("span",{className:`${h} w-3 shrink-0`,children:p}),d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:u.status==="in_progress"||u.status==="active"?"font-medium":u.status==="completed"||u.status==="done"?"text-text-muted":"",children:u.content}),u.result&&d.jsxs("div",{className:"text-xs text-success/80 whitespace-pre-wrap",children:["↳ ",u.result]}),u.error&&d.jsxs("div",{className:"text-xs text-error/90 whitespace-pre-wrap",children:["↳ ",u.error]}),u.blocked_by&&u.blocked_by.length>0&&d.jsxs("div",{className:"text-xs text-warning",children:["blocked by ",u.blocked_by.join(", ")]})]})]},u.step_id??f)})})]})}function un(i){return i==null?"–":i>=1e6?(i/1e6).toFixed(2)+"M":i>=1e4?(i/1e3).toFixed(1)+"k":String(i)}function Zx({agentId:i}){const o=L(f=>f.context[i]);if(!o)return d.jsx("div",{className:"px-3.5 py-3 text-xs text-text-muted italic",children:"No usage reported yet."});const l=o.percentUsed??(o.contextLimit&&o.usage.total_tokens?o.usage.total_tokens/o.contextLimit*100:null),s=o.usage,u=[["prompt",un(s.prompt_tokens)],["output",un(s.output_tokens)],["cache read",un(s.cache_read_tokens)],["cache write",un(s.cache_creation_tokens)],["reasoning",un(s.reasoning_tokens??s.thinking_tokens)],["total / limit",`${un(s.total_tokens)} / ${un(o.contextLimit)}`],["remaining",un(o.tokensRemaining)],["turns",un(o.turns)]];return s.cost_usd!=null&&u.push(["cost",`$${Number(s.cost_usd).toFixed(4)}`]),d.jsxs("div",{className:"px-3.5 py-3 text-[13px]",children:[d.jsxs("div",{className:"flex items-baseline justify-between mb-1.5",children:[d.jsx("span",{className:"display text-[16px]",children:"Context"}),d.jsx("span",{className:"font-mono text-[11px] text-text-muted",children:l!=null?`${l.toFixed(1)}%`:""})]}),d.jsx("div",{className:"bar mb-3",children:d.jsx("span",{className:l!=null&&l>80?"bg-error":l!=null&&l>60?"bg-warning":"",style:{width:`${Math.min(100,l??0)}%`}})}),d.jsx("dl",{className:"kv m-0",children:u.map(([f,p])=>d.jsxs("div",{className:"contents",children:[d.jsx("dt",{children:f}),d.jsx("dd",{className:"m-0",children:p})]},f))}),o.lastTurn&&d.jsxs("div",{className:"mt-3 text-xs text-text-muted",children:["Last turn",o.lastTurn.turnNumber!=null?` #${o.lastTurn.turnNumber}`:"",": ",o.lastTurn.durationSeconds!=null?`${o.lastTurn.durationSeconds.toFixed(1)}s`:"",o.lastTurn.toolCalls?` · ${X_(o.lastTurn.toolCalls)}`:"",o.lastTurn.finishReason?` · ${o.lastTurn.finishReason}`:""]})]})}function Jx(i){const o={name:"",path:"",children:new Map};for(const[l,s]of Object.entries(i)){const u=l.split("/").filter(Boolean);let f=o;u.forEach((p,h)=>{let y=f.children.get(p);y||(y={name:p,path:u.slice(0,h+1).join("/"),children:new Map},f.children.set(p,y)),h===u.length-1&&(y.change=s),f=y})}return o}function Wx(i){return i.children.size?`${i.path}/`:i.path}function Gp(i,o){return o.some(l=>l===i||l.endsWith("/")&&i.startsWith(l))}function Fx(i,o){return Object.keys(i).filter(l=>Gp(l,o)).length}const Px={created:"text-success",added:"text-success",modified:"text-warning",deleted:"text-error"};function e0({id:i,hidden:o,ignored:l}){const s=L(f=>f.toggleWorkspaceHidden),u="font-heading uppercase tracking-[0.08em] text-[10px] px-1 text-text-muted hover:text-steel opacity-60 group-hover:opacity-100 focus:opacity-100";return d.jsxs("span",{className:"ml-auto shrink-0 flex gap-1",children:[d.jsx("button",{type:"button",className:u,onClick:()=>s(i),"aria-label":`${o?"Unhide":"Hide"} ${i}`,title:o?"Show this entry again":"Hide this entry from the panel (this session only)",children:o?"unhide":"hide"}),d.jsx("button",{type:"button",className:u,onClick:()=>{Rb(i).catch(()=>{})},"aria-label":`${l?"Remove":"Add"} ${i} ${l?"from":"to"} .gitignore`,title:l?"Remove this entry from the workspace .gitignore":"Add this entry to the workspace .gitignore",children:l?"unignore":"ignore"})]})}function Yp({node:i,depth:o,hidden:l,showHidden:s,ignored:u}){const f=[...i.children.values()].sort((p,h)=>(p.children.size?0:1)-(h.children.size?0:1)||p.name.localeCompare(h.name));return d.jsx("ul",{className:"list-none m-0 p-0",children:f.map(p=>{const h=Wx(p),y=p.children.size>0,_=Gp(h,l);if(_&&!s)return null;const b=y?d.jsxs("span",{className:"text-text-muted",children:["▾ ",p.name,"/"]}):d.jsxs("span",{className:Px[p.change??""]??"",title:p.change,children:[p.change==="deleted"?"−":p.change==="created"||p.change==="added"?"+":"~"," ",p.name]});return d.jsxs("li",{className:"font-mono text-[11.5px] leading-[1.8]",children:[d.jsxs("div",{className:`group flex items-center gap-1 pr-1 ${_?"opacity-50":""}`,style:{paddingLeft:o*12},"data-hidden":_||void 0,children:[_&&d.jsx("span",{className:"text-text-muted",title:"Hidden",children:"H"}),b,u[h]&&d.jsx("span",{className:"text-text-muted text-[10px]",title:"In .gitignore",children:"i"}),d.jsx(e0,{id:h,hidden:_,ignored:u[h]})]}),y&&d.jsx(Yp,{node:p,depth:o+1,hidden:l,showHidden:s,ignored:u})]},p.path)})})}function t0(){const i=L(_=>_.workspaceFiles),o=L(_=>_.workspaceHidden),l=L(_=>_.workspaceShowHidden),s=L(_=>_.toggleWorkspaceShowHidden),u=L(_=>_.workspaceIgnored),f=L(_=>_.workspaceNotice),p=Y.useMemo(()=>Jx(i),[i]),h=Object.keys(i).length,y=Y.useMemo(()=>Fx(i,o),[i,o]);return d.jsxs("div",{className:"px-3.5 py-3",children:[f&&d.jsx("div",{role:"status",className:`text-[11px] mb-2 ${f.error?"text-error":"text-text-muted"}`,children:f.text}),h===0?d.jsx("div",{className:"text-xs text-text-muted italic",children:"No files changed yet."}):d.jsx(Yp,{node:p,depth:0,hidden:o,showHidden:l,ignored:u}),y>0&&d.jsxs("div",{className:"mt-2 text-[11px] text-text-muted flex items-center gap-2",children:[d.jsxs("span",{children:[y," hidden"]}),d.jsx("button",{type:"button",className:"link",onClick:s,children:l?"hide hidden":"show hidden"})]}),h>0&&d.jsxs("div",{className:"mt-2.5 text-xs text-text-muted",children:[d.jsx("span",{className:"font-heading uppercase tracking-[0.08em] text-[10px]",children:"hide"})," drops an entry from the panel; ",d.jsx("span",{className:"font-heading uppercase tracking-[0.08em] text-[10px]",children:"ignore"})," adds it to ",d.jsx("span",{className:"font-mono",children:".gitignore"}),"."]})]})}const nc={processing:["●","text-primary pulse"],running:["●","text-primary pulse"],awaiting_permission:["⚠","text-warning"],awaiting_clarification:["?","text-steel"],finished:["✓","text-text-muted"],completed:["✓","text-text-muted"],error:["✗","text-error"],idle:["○","text-text-muted"]};function n0(){const i=L(f=>f.agents),o=L(f=>f.agentOrder),l=L(f=>f.selectedAgentId),s=L(f=>f.selectAgent),u=L(f=>f.permissions);return d.jsx("div",{role:"tablist",className:"flex items-stretch overflow-x-auto",title:"Ctrl+A selects the next agent",children:o.map(f=>{const p=i[f];if(!p)return null;const h=u.some(v=>v.agentId===f),[y,_]=h?nc.awaiting_permission:nc[p.status]??nc.idle,b=f===l;return d.jsxs("button",{role:"tab","aria-selected":b,onClick:()=>s(f),className:`flex items-center gap-2 px-3.5 border-r hairline whitespace-nowrap ${b?`bg-surface text-text shadow-[inset_0_-2px_0_var(--c-steel)] ${h?"shadow-[inset_0_-2px_0_var(--c-warning)]":""}`:"text-text-muted hover:text-text"}`,title:p.profile?`${p.type} · ${p.profile}`:p.type,children:[d.jsx("span",{className:_,children:y}),d.jsx("span",{className:`chrome ${b?"":"font-medium"}`,children:p.name})]},f)})})}function a0(){const i=L(_=>_.connection),o=L(_=>_.sessionId),l=L(_=>_.permissionStatus),s=L(_=>_.permissions.length),u=L(_=>_.toggleUi),f=L(_=>_.setToolsExpanded),p=L(_=>_.ui),h=i.phase==="connected"?"bg-success":i.phase==="reconnecting"||i.phase==="connecting"?"bg-warning pulse":"bg-error",y=_=>`chrome-sm font-heading font-medium uppercase tracking-[0.12em] ${_?"text-steel":"text-text-muted hover:text-steel"}`;return d.jsxs("div",{className:"flex items-center gap-4 px-4 h-[26px] text-[11px] bg-surface border-t hairline font-mono text-text-muted select-none shrink-0",children:[d.jsxs("span",{className:"flex items-center gap-1.5 text-text",children:[d.jsx("span",{className:`inline-block w-1.5 h-1.5 ${h}`}),i.phase,i.attempt?` #${i.attempt}`:""]}),d.jsxs("span",{title:Ap(),children:[i.serverVersion?`server ${i.serverVersion} · `:"","ui ",Ka.ui]}),o&&d.jsxs("span",{title:o,children:["session ",o.slice(0,8)]}),l&&d.jsxs("span",{title:"Permission default policy (permissions default allow|deny|ask)","data-testid":"permission-status",className:s?"text-warning":"",children:[d.jsx("span",{children:"permissions "}),l.suspensionScope?d.jsxs("span",{className:"text-success",children:["allow ",d.jsxs("span",{className:"text-text-muted",children:["(",l.suspensionScope,")"]})]}):d.jsx("span",{className:s?"":l.effectiveDefault==="deny"?"text-warning":l.effectiveDefault==="allow"?"text-success":"text-text",children:l.effectiveDefault}),s>0&&d.jsxs("span",{children:[" · ",s," waiting"]})]}),d.jsx("span",{className:"flex-1"}),d.jsx("button",{type:"button",onClick:()=>u("showPlan"),className:y(p.showPlan),title:"Toggle plan (Ctrl+P)","aria-label":"Toggle plan (Ctrl+P)",children:"Plan"}),d.jsx("button",{type:"button",onClick:()=>u("showBudget"),className:y(p.showBudget),title:"Toggle budget (Ctrl+B)","aria-label":"Toggle budget (Ctrl+B)",children:"Budget"}),d.jsx("button",{type:"button",onClick:()=>u("showWorkspace"),className:y(p.showWorkspace),title:"Toggle workspace changes (Alt+W)","aria-label":"Toggle workspace changes (Alt+W)",children:"Files"}),d.jsx("button",{type:"button",onClick:()=>f(!p.showTools),className:y(p.showTools),title:p.showTools?"Tool call boxes expanded — click to collapse them (Ctrl+T)":"Tool call boxes collapsed — click to expand them (Ctrl+T)","aria-label":"Toggle tool call boxes (Ctrl+T)",children:"Tools"}),d.jsx("button",{type:"button",onClick:()=>{jp().catch(()=>{})},className:`${y(!1)} hover:text-error`,title:"Leave: detach from the session, or end it (the exit command)","aria-label":"Exit (detach from or end the session)",children:"Exit"})]})}function l0(){const i=L(h=>h.ui.railWidth),o=L(h=>h.setRailWidth),l=Y.useRef(null),s=Y.useCallback(h=>{h.button!==0&&h.pointerType==="mouse"||(l.current={startX:h.clientX,startW:i},h.currentTarget.setPointerCapture(h.pointerId),h.preventDefault())},[i]),u=Y.useCallback(h=>{const y=l.current;y&&o(y.startW+(y.startX-h.clientX))},[o]),f=Y.useCallback(h=>{l.current=null;try{h.currentTarget.releasePointerCapture(h.pointerId)}catch{}},[]),p=Y.useCallback(h=>{const y=h.shiftKey?64:16;h.key==="ArrowLeft"?(o(i+y),h.preventDefault()):h.key==="ArrowRight"?(o(i-y),h.preventDefault()):h.key==="Home"?(o(ic),h.preventDefault()):h.key==="End"&&(o(sc),h.preventDefault())},[o,i]);return d.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize the session rail","aria-valuemin":sc,"aria-valuemax":ic,"aria-valuenow":i,tabIndex:0,title:"Drag to resize the rail",className:"hidden md:block shrink-0 w-[7px] -mr-[4px] -ml-[3px] z-10 cursor-col-resize select-none outline-none hover:bg-steel/40 focus-visible:bg-steel/60 active:bg-steel/60",style:{touchAction:"none"},onPointerDown:s,onPointerMove:u,onPointerUp:f,onPointerCancel:f,onKeyDown:p})}function s0(){Y.useEffect(()=>{const i=o=>{const l=o.key.toLowerCase(),s=o.ctrlKey||o.metaKey,u=L.getState();if(s&&l==="p")o.preventDefault(),u.toggleUi("showPlan");else if(s&&l==="b")o.preventDefault(),u.toggleUi("showBudget");else if((s||o.altKey)&&l==="w"&&(o.altKey||o.shiftKey))o.preventDefault(),u.toggleUi("showWorkspace");else if(s&&l==="t")o.preventDefault(),u.setToolsExpanded(!u.ui.showTools);else if(s&&l==="a"&&!o.target?.matches?.("textarea,input")){o.preventDefault();const f=u.agentOrder.indexOf(u.selectedAgentId);u.selectAgent(u.agentOrder[(f+1)%u.agentOrder.length]??u.selectedAgentId)}else s&&l==="c"&&!o.target?.matches?.("textarea,input")&&!window.getSelection()?.toString()&&Zl()&&u.processing[u.selectedAgentId]&&(o.preventDefault(),Re().stop().catch(()=>{}))};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[])}function i0(){const i=L(p=>p.session),o=L(p=>p.workspace.selected),l=L(p=>p.selectedAgentId),u=L(p=>p.context[l])?.percentUsed,f=[i.provider,i.model].filter(Boolean).join(" / ");return d.jsxs("header",{className:"flex items-stretch h-[46px] border-b hairline shrink-0",children:[d.jsx("div",{className:"flex items-center px-4 border-r hairline",children:d.jsx("span",{className:"display text-[18px] tracking-[0.02em]",children:"jaato"})}),d.jsx(n0,{}),d.jsx("span",{className:"flex-1"}),d.jsxs("div",{className:"hidden md:flex items-center gap-[18px] px-[18px] font-mono text-xs",children:[o&&d.jsxs("span",{children:[d.jsx("span",{className:"text-text-muted",children:"ws "}),o]}),f&&d.jsxs("span",{children:[d.jsx("span",{className:"text-text-muted",children:"model "}),f]}),i.profile&&d.jsxs("span",{children:[d.jsx("span",{className:"text-text-muted",children:"profile "}),i.profile]}),u!=null&&d.jsxs("span",{className:"flex items-center gap-2",title:"Context window used",children:[d.jsx("span",{className:"text-text-muted",children:"ctx"}),d.jsx("span",{className:"inline-block w-[84px] h-1.5 bg-[color-mix(in_srgb,var(--c-text)_16%,var(--c-bg))]",children:d.jsx("span",{className:`block h-full ${u>80?"bg-error":u>60?"bg-warning":"bg-steel"}`,style:{width:`${Math.min(100,u)}%`}})}),d.jsxs("span",{className:u>80?"text-error":u>60?"text-warning":"",children:[u.toFixed(0),"%"]})]})]})]})}function ac({title:i,value:o,open:l,onToggle:s,children:u}){return d.jsxs(d.Fragment,{children:[d.jsxs("button",{type:"button",onClick:s,className:"flex items-baseline justify-between px-3.5 py-2 border-b hairline w-full text-left hover:bg-tint/60","aria-expanded":l,"aria-label":`${l?"Close":"Open"} ${i}`,children:[d.jsx("span",{className:"kicker",children:i}),d.jsxs("span",{className:"font-mono text-[11px] text-text-muted",children:[o?`${o} `:"",l?"▾":"▸"]})]}),l&&d.jsx("section",{"aria-label":i,className:"border-b hairline overflow-auto min-h-0 shrink-0 max-h-[60%]",children:u})]})}function r0({agentId:i}){const o=L(h=>h.ui),l=L(h=>h.toggleUi),s=L(h=>h.plan[i]),u=L(h=>h.context[i]),f=L(h=>Object.keys(h.workspaceFiles).length),p=u?.usage.cost_usd!=null?`$${Number(u.usage.cost_usd).toFixed(4)}`:u?.percentUsed!=null?`${u.percentUsed.toFixed(0)}%`:null;return d.jsxs("aside",{className:"hidden md:flex shrink-0 border-l hairline bg-surface flex-col min-h-0 overflow-auto",style:{width:o.railWidth},"aria-label":"Session rail",children:[d.jsx(ac,{title:"Plan",value:Ix(s),open:o.showPlan,onToggle:()=>l("showPlan"),children:d.jsx($x,{agentId:i})}),d.jsx(ac,{title:"Budget",value:p,open:o.showBudget,onToggle:()=>l("showBudget"),children:d.jsx(Zx,{agentId:i})}),d.jsx(ac,{title:"Files",value:f?`${f} changed`:null,open:o.showWorkspace,onToggle:()=>l("showWorkspace"),children:d.jsx(t0,{})})]})}function o0(i){return i.filter(o=>/-auth$/.test(o.name)&&!o.name.includes(" "))}function c0({onPick:i,onAttach:o,onAuth:l,onSkip:s}){const u=L(M=>M.profiles),f=L(M=>M.commands),p=L(M=>M.workspace),h=L(M=>M.sessions);Y.useEffect(()=>{zp().catch(()=>{})},[]);const y=o0(f),_=p.selected?p.list.find(M=>M.name===p.selected)??{name:p.selected}:void 0,b=p.config&&p.config.workspace===p.selected?p.config:void 0,v=b?.configured===!0,T=[b?.provider,b?.model].filter(Boolean).join(" / "),R=_?J_(h,_):h,B="flex gap-3 py-2.5 border-t hairline w-full text-left hover:bg-tint/60";return d.jsx("div",{className:"h-full flex items-center justify-center p-6 sm:p-12 overflow-auto",children:d.jsxs(Nt,{className:"w-full max-w-[880px] flex flex-col","data-testid":"session-picker",children:[d.jsxs("div",{className:"flex items-baseline justify-between gap-4 px-5 py-4 border-b hairline",children:[d.jsx("div",{className:"flex items-baseline gap-3",children:_?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"kicker tracking-[0.16em]",children:"Workspace"}),d.jsx("span",{className:"font-mono text-[16px]",children:_.name})]}):d.jsx("span",{className:"display text-[20px]",children:"New session"})}),v&&d.jsxs("div",{className:"font-mono text-xs text-text-muted",children:[T," ",d.jsx("span",{className:"text-steel",children:"from .env"})]})]}),d.jsxs("div",{className:`grid grid-cols-1 ${R.length>0?"md:grid-cols-[1fr_1px_1fr]":""}`,children:[R.length>0&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"px-5 py-4 flex flex-col gap-2.5","aria-label":"Resume a session",children:[d.jsx("div",{className:"kicker kicker-muted text-[12px]",children:"Resume"}),d.jsx("div",{className:"flex flex-col max-h-72 overflow-auto",children:R.map(M=>d.jsxs("button",{type:"button",onClick:()=>o(M.id),"aria-label":`Resume session ${M.id}`,className:B,children:[d.jsx("span",{className:M.isLoaded?"text-success":"text-text-muted",children:M.isLoaded?"●":"○"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block font-mono text-[13px]",children:M.id}),d.jsx("span",{className:"block text-[13px] text-text-muted truncate",children:[M.description||M.name,M.provider?`${M.provider}/${M.model}`:"",M.turnCount?`${M.turnCount} turns`:""].filter(Boolean).join(" · ")})]}),d.jsx("span",{className:`btn btn-sm self-center ${M.isLoaded?"btn-steel":"btn-quiet"}`,children:"Attach"})]},M.id))})]}),d.jsx("div",{className:"hidden md:block bg-divider","aria-hidden":"true"})]}),d.jsxs("div",{className:"px-5 py-4 flex flex-col gap-2.5",children:[d.jsx("div",{className:"kicker kicker-muted text-[12px]",children:R.length>0?"Start new — agent profile":"Agent profile"}),d.jsxs("div",{className:"flex flex-col max-h-80 overflow-auto",children:[d.jsxs("button",{type:"button",onClick:()=>i(null),className:B,children:[d.jsx("span",{className:"font-mono text-[11px] text-steel w-[22px] shrink-0 pt-0.5",children:"01"}),d.jsxs("span",{className:"min-w-0",children:[d.jsx("span",{className:"block font-mono text-[13px]",children:"default"}),d.jsx("span",{className:"block text-[13px] text-text-muted",children:v?T:"the workspace .env provider and model"})]})]}),u.map((M,V)=>d.jsxs("button",{type:"button",onClick:()=>i(M.name),className:B,children:[d.jsx("span",{className:"font-mono text-[11px] text-steel w-[22px] shrink-0 pt-0.5",children:String(V+2).padStart(2,"0")}),d.jsxs("span",{className:"min-w-0",children:[d.jsx("span",{className:"block font-mono text-[13px]",children:M.name}),d.jsx("span",{className:"block text-[13px] text-text-muted",children:[M.description,[M.provider,M.model].filter(Boolean).join("/")].filter(Boolean).join(" · ")})]})]},M.name))]})]})]}),d.jsxs("div",{className:"px-5 pt-3 border-t hairline","aria-label":"Files for the session",children:[d.jsx("div",{className:"kicker kicker-muted text-[12px] mb-1.5",children:"Files for the session"}),d.jsx(Bp,{always:!0,hint:_?"Staged into this workspace before the session opens.":"Staged into the session's workspace as soon as it is provisioned."})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-5 py-3 border-t hairline",children:[y.length>0&&!v&&d.jsxs("div",{className:"flex flex-wrap items-center gap-3","aria-label":"Sign in to a provider",children:[d.jsx("span",{className:"kicker kicker-muted",children:"Sign in first"}),y.map(M=>d.jsxs("button",{type:"button",onClick:()=>l(`${M.name} login`),className:"font-mono text-xs border hairline px-2 py-1 hover:border-steel hover:text-steel",title:M.description,children:[M.name," login"]},M.name)),d.jsx("span",{className:"text-[12px] text-text-muted",children:"No provider configured yet? Sign in first; the daemon then offers to open the session for you."})]}),d.jsx("span",{className:"flex-1"}),d.jsx("button",{type:"button",onClick:s,className:"link text-[13px]",children:"Go to the prompt without a session"})]})]})})}function u0(){s0();const i=L(G=>G.sessionId),o=L(G=>G.selectedAgentId),l=L(G=>G.commands),s=L(G=>G.initProgress),u=L(G=>G.permissions),f=L(G=>G.exitChoice),p=L(G=>G.clarifications),h=L(G=>G.referenceSelections),y=L(G=>G.postAuth),_=L(G=>G.workspace.config),b=L(G=>G.processing[o]??!1),[v,T]=Y.useState(!0),[R,B]=Y.useState(!1),M=Y.useRef(!1);Y.useEffect(()=>{if(M.current)return;M.current=!0;const G=Re();return G.requestCommandList().catch(()=>{}),G.listProfiles().catch(()=>{}),G.subscribe(q.COMMAND_LIST_REFRESH,()=>{G.requestCommandList().catch(()=>{})})},[]);const V=async G=>{T(!1),B(!0);try{await rp(()=>zb(G))}finally{B(!1)}},K=u.filter(G=>G.agentId===o),ee=p.filter(G=>G.agentId===o),ne=h.filter(G=>G.agentId===o),I=Y.useMemo(()=>{if(f)return{kind:"exit",placeholder:`Exit: ${f.options.map(te=>te.key).join(" · ")}`,suggestions:f.options.map(te=>te.key)};const G=K[0];return G?{kind:"permission",placeholder:`Answer ${G.toolName} — ${G.options.map(te=>te.key).join(" · ")||"y · n"}, or type a reply`,suggestions:G.options.map(te=>te.key)}:ee.find(te=>te.inputMode)?{kind:"clarification",placeholder:"Type your answer (or a choice number) and press Enter"}:ne[0]?{kind:"reference",placeholder:"Type the reference to use"}:null},[f,K,ee,ne]),W=G=>{T(!1),ep(G,!1).catch(re=>L.getState().addSystemBlock(o,String(re),"error"))},de=G=>{T(!1),rp(()=>Up(G)).catch(re=>L.getState().addSystemBlock(o,String(re),"error"))},Z=!!(y&&_?.configured&&_.provider===y.providerName),le=y?d.jsx("div",{className:"px-5",children:d.jsx(cp,{p:y,alreadyConfigured:Z,onRespond:G=>{Pm(y.requestId,G).catch(re=>L.getState().addSystemBlock(o,String(re),"error"))}})}):null;return v&&!i?d.jsxs("div",{className:"h-full flex flex-col",children:[le,d.jsx("div",{className:"flex-1 min-h-0",children:d.jsx(c0,{onPick:V,onAttach:de,onAuth:W,onSkip:()=>T(!1)})})]}):d.jsxs("div",{className:"h-full flex flex-col",children:[d.jsx(i0,{}),d.jsxs("div",{className:"flex-1 flex min-h-0",children:[d.jsxs("main",{className:"flex-1 flex flex-col min-w-0 relative",children:[(R||s)&&d.jsxs("div",{className:"px-5 py-1 kicker kicker-muted border-b hairline flex items-center gap-2",children:[d.jsx("span",{className:"pulse text-primary",children:"●"}),s?`${s.message??s.step??"initialising"}${s.stepNumber!=null&&s.totalSteps?` (${s.stepNumber}/${s.totalSteps})`:""}`:"Creating session…"]}),d.jsx(Ux,{agentId:o}),d.jsxs("div",{className:"px-5",children:[f&&d.jsx(Vx,{x:f,onAnswer:G=>{Op(G).catch(re=>L.getState().addSystemBlock(o,String(re),"error"))}}),K.map(G=>d.jsx(Qx,{p:G,onRespond:re=>Cp(G.requestId,re)},G.requestId)),ee.map(G=>d.jsx(Xx,{c:G,onAnswer:re=>Rp(G,re),onCancel:()=>Mp(G)},G.requestId)),ne.map(G=>d.jsx(Kx,{r:G,onRespond:re=>Dp(G.requestId,re)},G.requestId)),y&&o==="main"&&d.jsx(cp,{p:y,alreadyConfigured:Z,onRespond:G=>{Pm(y.requestId,G).catch(re=>L.getState().addSystemBlock(o,String(re),"error"))}})]}),d.jsxs("div",{className:"px-5 pb-3 pt-2.5 border-t hairline",children:[b&&!I&&d.jsxs("div",{className:"kicker kicker-muted text-[12px] tracking-[0.1em] mb-1.5 flex items-center gap-2",children:[d.jsx("span",{className:"pulse text-primary",children:"●"})," Agent working — type to queue a follow-up · ",d.jsx("span",{className:"font-mono normal-case tracking-normal",children:"stop"})," or Ctrl+C to interrupt"]}),d.jsx(Yx,{commands:l,history:Xa,captureMode:I,onSubmit:(G,re)=>{ep(G,re).catch(te=>L.getState().addSystemBlock(o,String(te),"error"))}})]}),d.jsx(Lx,{agentId:o})]}),d.jsx(l0,{}),d.jsx(r0,{agentId:o})]}),d.jsx(a0,{})]})}function f0(){const i=L(s=>s.screen),o=L(s=>s.ui.theme),l=L(s=>s.setTheme);return Y.useEffect(()=>{l(Iy())},[l]),Y.useEffect(()=>{Sp(o)},[o]),i==="connect"?d.jsx(db,{}):i==="workspaces"?d.jsx(Hb,{}):d.jsx(u0,{})}v_.createRoot(document.getElementById("root")).render(d.jsx(Y.StrictMode,{children:d.jsx(f0,{})}));
|