@grackle-ai/web 0.39.0 → 0.39.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,91 @@
1
+ import{r as tx,a as S,j as h,v as nx,b as ax,t as xr,i as sx,f as ix,M as Cf,c as Af}from"./markdown-gcy1Jmzi.js";import{r as lx,d as py,H as my,P as gy,i as ox,B as rx,a as cx,C as ux,M as dx}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function i(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(r){if(r.ep)return;r.ep=!0;const u=i(r);fetch(r.href,u)}})();var _d={exports:{}},Rl={},xd={exports:{}},Td={};/**
2
+ * @license React
3
+ * scheduler.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var yy;function fx(){return yy||(yy=1,(function(n){function a(z,q){var te=z.length;z.push(q);e:for(;0<te;){var we=te-1>>>1,ge=z[we];if(0<r(ge,q))z[we]=q,z[te]=ge,te=we;else break e}}function i(z){return z.length===0?null:z[0]}function o(z){if(z.length===0)return null;var q=z[0],te=z.pop();if(te!==q){z[0]=te;e:for(var we=0,ge=z.length,He=ge>>>1;we<He;){var Ee=2*(we+1)-1,ve=z[Ee],Se=Ee+1,Z=z[Se];if(0>r(ve,te))Se<ge&&0>r(Z,ve)?(z[we]=Z,z[Se]=te,we=Se):(z[we]=ve,z[Ee]=te,we=Ee);else if(Se<ge&&0>r(Z,te))z[we]=Z,z[Se]=te,we=Se;else break e}}return q}function r(z,q){var te=z.sortIndex-q.sortIndex;return te!==0?te:z.id-q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var m=[],g=[],y=1,v=null,_=3,T=!1,C=!1,E=!1,j=!1,A=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function Y(z){for(var q=i(g);q!==null;){if(q.callback===null)o(g);else if(q.startTime<=z)o(g),q.sortIndex=q.expirationTime,a(m,q);else break;q=i(g)}}function H(z){if(E=!1,Y(z),!C)if(i(m)!==null)C=!0,V||(V=!0,ie());else{var q=i(g);q!==null&&se(H,q.startTime-z)}}var V=!1,G=-1,L=5,W=-1;function ae(){return j?!0:!(n.unstable_now()-W<L)}function I(){if(j=!1,V){var z=n.unstable_now();W=z;var q=!0;try{e:{C=!1,E&&(E=!1,k(G),G=-1),T=!0;var te=_;try{t:{for(Y(z),v=i(m);v!==null&&!(v.expirationTime>z&&ae());){var we=v.callback;if(typeof we=="function"){v.callback=null,_=v.priorityLevel;var ge=we(v.expirationTime<=z);if(z=n.unstable_now(),typeof ge=="function"){v.callback=ge,Y(z),q=!0;break t}v===i(m)&&o(m),Y(z)}else o(m);v=i(m)}if(v!==null)q=!0;else{var He=i(g);He!==null&&se(H,He.startTime-z),q=!1}}break e}finally{v=null,_=te,T=!1}q=void 0}}finally{q?ie():V=!1}}}var ie;if(typeof R=="function")ie=function(){R(I)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,F=K.port2;K.port1.onmessage=I,ie=function(){F.postMessage(null)}}else ie=function(){A(I,0)};function se(z,q){G=A(function(){z(n.unstable_now())},q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(z){z.callback=null},n.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<z?Math.floor(1e3/z):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(z){switch(_){case 1:case 2:case 3:var q=3;break;default:q=_}var te=_;_=q;try{return z()}finally{_=te}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(z,q){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var te=_;_=z;try{return q()}finally{_=te}},n.unstable_scheduleCallback=function(z,q,te){var we=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?we+te:we):te=we,z){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=te+ge,z={id:y++,callback:q,priorityLevel:z,startTime:te,expirationTime:ge,sortIndex:-1},te>we?(z.sortIndex=te,a(g,z),i(m)===null&&z===i(g)&&(E?(k(G),G=-1):E=!0,se(H,te-we))):(z.sortIndex=ge,a(m,z),C||T||(C=!0,V||(V=!0,ie()))),z},n.unstable_shouldYield=ae,n.unstable_wrapCallback=function(z){var q=_;return function(){var te=_;_=q;try{return z.apply(this,arguments)}finally{_=te}}}})(Td)),Td}var vy;function hx(){return vy||(vy=1,xd.exports=fx()),xd.exports}/**
10
+ * @license React
11
+ * react-dom-client.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var by;function px(){if(by)return Rl;by=1;var n=hx(),a=tx(),i=lx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,x=c.child;x;){if(x===s){b=!0,s=c,l=f;break}if(x===l){b=!0,l=c,s=f;break}x=x.sibling}if(!b){for(x=f.child;x;){if(x===s){b=!0,s=f,l=c;break}if(x===l){b=!0,l=f,s=c;break}x=x.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),R=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ae=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var K=Symbol.for("react.client.reference");function F(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===K?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case j:return"StrictMode";case H:return"Suspense";case V:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case R:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:F(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var se=Array.isArray,z=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},we=[],ge=-1;function He(e){return{current:e}}function Ee(e){0>ge||(e.current=we[ge],we[ge]=null,ge--)}function ve(e,t){ge++,we[ge]=e.current,e.current=t}var Se=He(null),Z=He(null),ee=He(null),Ce=He(null);function Ae(e,t){switch(ve(ee,t),ve(Z,e),ve(Se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ug(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ug(t),e=zg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ee(Se),ve(Se,e)}function Ie(){Ee(Se),Ee(Z),Ee(ee)}function mt(e){e.memoizedState!==null&&ve(Ce,e);var t=Se.current,s=zg(t,e.type);t!==s&&(ve(Z,e),ve(Se,s))}function Tt(e){Z.current===e&&(Ee(Se),Ee(Z)),Ce.current===e&&(Ee(Ce),wl._currentValue=te)}var Bt,Xe;function Fe(e){if(Bt===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Bt=t&&t[1]||"",Xe=-1<s.stack.indexOf(`
18
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
+ `+Bt+e+Xe}var Be=!1;function Ln(e,t){if(!e||Be)return"";Be=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(P){var U=P}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(P){U=P}e.call(Q.prototype)}}else{try{throw Error()}catch(P){U=P}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(P){if(P&&U&&typeof P.stack=="string")return[P.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],x=f[1];if(b&&x){var N=b.split(`
20
+ `),B=x.split(`
21
+ `);for(c=l=0;l<N.length&&!N[l].includes("DetermineComponentFrameRoot");)l++;for(;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;if(l===N.length||c===B.length)for(l=N.length-1,c=B.length-1;1<=l&&0<=c&&N[l]!==B[c];)c--;for(;1<=l&&0<=c;l--,c--)if(N[l]!==B[c]){if(l!==1||c!==1)do if(l--,c--,0>c||N[l]!==B[c]){var $=`
22
+ `+N[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=c);break}}}finally{Be=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Fe(s):""}function Un(e,t){switch(e.tag){case 26:case 27:case 5:return Fe(e.type);case 16:return Fe("Lazy");case 13:return e.child!==t&&t!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Ln(e.type,!1);case 11:return Ln(e.type.render,!1);case 1:return Ln(e.type,!0);case 31:return Fe("Activity");default:return""}}function ta(e){try{var t="",s=null;do t+=Un(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
23
+ Error generating stack: `+l.message+`
24
+ `+l.stack}}var en=Object.prototype.hasOwnProperty,na=n.unstable_scheduleCallback,J=n.unstable_cancelCallback,ne=n.unstable_shouldYield,re=n.unstable_requestPaint,de=n.unstable_now,be=n.unstable_getCurrentPriorityLevel,xe=n.unstable_ImmediatePriority,Qe=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,Mt=n.unstable_LowPriority,wt=n.unstable_IdlePriority,it=n.log,tn=n.unstable_setDisableYieldValue,rt=null,We=null;function Zt(e){if(typeof it=="function"&&tn(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(rt,e)}catch{}}var gt=Math.clz32?Math.clz32:Pi,Ft=Math.log,qt=Math.LN2;function Pi(e){return e>>>=0,e===0?32:31-(Ft(e)/qt|0)|0}var aa=256,us=262144,et=4194304;function je(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 yt(e,t,s){var l=e.pendingLanes;if(l===0)return 0;var c=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~f,l!==0?c=je(l):(b&=x,b!==0?c=je(b):s||(s=x&~e,s!==0&&(c=je(s))))):(x=l&~f,x!==0?c=je(x):b!==0?c=je(b):s||(s=l&~e,s!==0&&(c=je(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function le(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lt(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 sa(){var e=et;return et<<=1,(et&62914560)===0&&(et=4194304),e}function cc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Gi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function G1(e,t,s,l,c,f){var b=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var x=e.entanglements,N=e.expirationTimes,B=e.hiddenUpdates;for(s=b&~s;0<s;){var $=31-gt(s),Q=1<<$;x[$]=0,N[$]=-1;var U=B[$];if(U!==null)for(B[$]=null,$=0;$<U.length;$++){var P=U[$];P!==null&&(P.lane&=-536870913)}s&=~Q}l!==0&&bh(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function bh(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-gt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Sh(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-gt(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function _h(e,t){var s=t&-t;return s=(s&42)!==0?1:uc(s),(s&(e.suspendedLanes|t))!==0?0:s}function uc(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 dc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function xh(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:oy(e.type))}function Th(e,t){var s=q.p;try{return q.p=e,t()}finally{q.p=s}}var Da=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Da,nn="__reactProps$"+Da,Vs="__reactContainer$"+Da,fc="__reactEvents$"+Da,F1="__reactListeners$"+Da,q1="__reactHandles$"+Da,Eh="__reactResources$"+Da,Fi="__reactMarker$"+Da;function hc(e){delete e[Ut],delete e[nn],delete e[fc],delete e[F1],delete e[q1]}function Hs(e){var t=e[Ut];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Vs]||s[Ut]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=qg(e);e!==null;){if(s=e[Ut])return s;e=qg(e)}return t}e=s,s=e.parentNode}return null}function Ps(e){if(e=e[Ut]||e[Vs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Gs(e){var t=e[Eh];return t||(t=e[Eh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Fi]=!0}var Ch=new Set,Ah={};function ds(e,t){Fs(e,t),Fs(e+"Capture",t)}function Fs(e,t){for(Ah[e]=t,e=0;e<t.length;e++)Ch.add(t[e])}var $1=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]*$"),jh={},Nh={};function Y1(e){return en.call(Nh,e)?!0:en.call(jh,e)?!1:$1.test(e)?Nh[e]=!0:(jh[e]=!0,!1)}function co(e,t,s){if(Y1(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function uo(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function ia(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function K1(e,t,s){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,f=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){s=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return s},setValue:function(b){s=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pc(e){if(!e._valueTracker){var t=wh(e)?"checked":"value";e._valueTracker=K1(e,t,""+e[t])}}function Dh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=wh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function fo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Z1=/[\n"\\]/g;function Tn(e){return e.replace(Z1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function mc(e,t,s,l,c,f,b,x){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xn(t)):e.value!==""+xn(t)&&(e.value=""+xn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?gc(e,b,xn(t)):s!=null?gc(e,b,xn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+xn(x):e.removeAttribute("name")}function kh(e,t,s,l,c,f,b,x){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||s!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){pc(e);return}s=s!=null?""+xn(s):"",t=t!=null?""+xn(t):s,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),pc(e)}function gc(e,t,s){t==="number"&&fo(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function qs(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+xn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Mh(e,t,s){if(t!=null&&(t=""+xn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+xn(s):""}function Rh(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(se(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=xn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),pc(e)}function $s(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var X1=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 Oh(e,t,s){var l=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,s):typeof s!="number"||s===0||X1.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function Bh(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var l in s)!s.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&s[c]!==l&&Oh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&Oh(e,f,t[f])}function yc(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 Q1=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"]]),J1=/^[\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 ho(e){return J1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function la(){}var vc=null;function bc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ys=null,Ks=null;function Lh(e){var t=Ps(e);if(t&&(e=t.stateNode)){var s=e[nn]||null;e:switch(e=t.stateNode,t.type){case"input":if(mc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Tn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[nn]||null;if(!c)throw Error(o(90));mc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<s.length;t++)l=s[t],l.form===e.form&&Dh(l)}break e;case"textarea":Mh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&qs(e,!!s.multiple,t,!1)}}}var Sc=!1;function Uh(e,t,s){if(Sc)return e(t,s);Sc=!0;try{var l=e(t);return l}finally{if(Sc=!1,(Ys!==null||Ks!==null)&&(er(),Ys&&(t=Ys,e=Ks,Ks=Ys=null,Lh(t),e)))for(t=0;t<e.length;t++)Lh(e[t])}}function $i(e,t){var s=e.stateNode;if(s===null)return null;var l=s[nn]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(oa)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){_c=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{_c=!1}var ka=null,xc=null,po=null;function zh(){if(po)return po;var e,t=xc,s=t.length,l,c="value"in ka?ka.value:ka.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return po=c.slice(e,1<l?1-l:void 0)}function mo(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 go(){return!0}function Ih(){return!1}function an(e){function t(s,l,c,f,b){this._reactName=s,this._targetInst=c,this.type=l,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(s=e[x],this[x]=s?s(f):f[x]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?go:Ih,this.isPropagationStopped=Ih,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=go)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=go)},persist:function(){},isPersistent:go}),t}var fs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yo=an(fs),Ki=v({},fs,{view:0,detail:0}),W1=an(Ki),Tc,Ec,Zi,vo=v({},Ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ac,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zi&&(Zi&&e.type==="mousemove"?(Tc=e.screenX-Zi.screenX,Ec=e.screenY-Zi.screenY):Ec=Tc=0,Zi=e),Tc)},movementY:function(e){return"movementY"in e?e.movementY:Ec}}),Vh=an(vo),eS=v({},vo,{dataTransfer:0}),tS=an(eS),nS=v({},Ki,{relatedTarget:0}),Cc=an(nS),aS=v({},fs,{animationName:0,elapsedTime:0,pseudoElement:0}),sS=an(aS),iS=v({},fs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lS=an(iS),oS=v({},fs,{data:0}),Hh=an(oS),rS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cS={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"},uS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=uS[e])?!!t[e]:!1}function Ac(){return dS}var fS=v({},Ki,{key:function(e){if(e.key){var t=rS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?cS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ac,charCode:function(e){return e.type==="keypress"?mo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hS=an(fS),pS=v({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=an(pS),mS=v({},Ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ac}),gS=an(mS),yS=v({},fs,{propertyName:0,elapsedTime:0,pseudoElement:0}),vS=an(yS),bS=v({},vo,{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}),SS=an(bS),_S=v({},fs,{newState:0,oldState:0}),xS=an(_S),TS=[9,13,27,32],jc=oa&&"CompositionEvent"in window,Xi=null;oa&&"documentMode"in document&&(Xi=document.documentMode);var ES=oa&&"TextEvent"in window&&!Xi,Gh=oa&&(!jc||Xi&&8<Xi&&11>=Xi),Fh=" ",qh=!1;function $h(e,t){switch(e){case"keyup":return TS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zs=!1;function CS(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:(qh=!0,Fh);case"textInput":return e=t.data,e===Fh&&qh?null:e;default:return null}}function AS(e,t){if(Zs)return e==="compositionend"||!jc&&$h(e,t)?(e=zh(),po=xc=ka=null,Zs=!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 Gh&&t.locale!=="ko"?null:t.data;default:return null}}var jS={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 Kh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jS[e.type]:t==="textarea"}function Zh(e,t,s,l){Ys?Ks?Ks.push(l):Ks=[l]:Ys=l,t=or(t,"onChange"),0<t.length&&(s=new yo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Qi=null,Ji=null;function NS(e){kg(e,0)}function bo(e){var t=qi(e);if(Dh(t))return e}function Xh(e,t){if(e==="change")return t}var Qh=!1;if(oa){var Nc;if(oa){var wc="oninput"in document;if(!wc){var Jh=document.createElement("div");Jh.setAttribute("oninput","return;"),wc=typeof Jh.oninput=="function"}Nc=wc}else Nc=!1;Qh=Nc&&(!document.documentMode||9<document.documentMode)}function Wh(){Qi&&(Qi.detachEvent("onpropertychange",ep),Ji=Qi=null)}function ep(e){if(e.propertyName==="value"&&bo(Ji)){var t=[];Zh(t,Ji,e,bc(e)),Uh(NS,t)}}function wS(e,t,s){e==="focusin"?(Wh(),Qi=t,Ji=s,Qi.attachEvent("onpropertychange",ep)):e==="focusout"&&Wh()}function DS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bo(Ji)}function kS(e,t){if(e==="click")return bo(t)}function MS(e,t){if(e==="input"||e==="change")return bo(t)}function RS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:RS;function Wi(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return!1;for(l=0;l<s.length;l++){var c=s[l];if(!en.call(t,c)||!dn(e[c],t[c]))return!1}return!0}function tp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function np(e,t){var s=tp(e);e=0;for(var l;s;){if(s.nodeType===3){if(l=e+s.textContent.length,e<=t&&l>=t)return{node:s,offset:t-e};e=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=tp(s)}}function ap(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ap(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fo(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=fo(e.document)}return t}function Dc(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 OS=oa&&"documentMode"in document&&11>=document.documentMode,Xs=null,kc=null,el=null,Mc=!1;function ip(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Mc||Xs==null||Xs!==fo(l)||(l=Xs,"selectionStart"in l&&Dc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),el&&Wi(el,l)||(el=l,l=or(kc,"onSelect"),0<l.length&&(t=new yo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Xs)))}function hs(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Qs={animationend:hs("Animation","AnimationEnd"),animationiteration:hs("Animation","AnimationIteration"),animationstart:hs("Animation","AnimationStart"),transitionrun:hs("Transition","TransitionRun"),transitionstart:hs("Transition","TransitionStart"),transitioncancel:hs("Transition","TransitionCancel"),transitionend:hs("Transition","TransitionEnd")},Rc={},lp={};oa&&(lp=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function ps(e){if(Rc[e])return Rc[e];if(!Qs[e])return e;var t=Qs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in lp)return Rc[e]=t[s];return e}var op=ps("animationend"),rp=ps("animationiteration"),cp=ps("animationstart"),BS=ps("transitionrun"),LS=ps("transitionstart"),US=ps("transitioncancel"),up=ps("transitionend"),dp=new Map,Oc="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(" ");Oc.push("scrollEnd");function zn(e,t){dp.set(e,t),ds(t,[e])}var So=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)},En=[],Js=0,Bc=0;function _o(){for(var e=Js,t=Bc=Js=0;t<e;){var s=En[t];En[t++]=null;var l=En[t];En[t++]=null;var c=En[t];En[t++]=null;var f=En[t];if(En[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}f!==0&&fp(s,c,f)}}function xo(e,t,s,l){En[Js++]=e,En[Js++]=t,En[Js++]=s,En[Js++]=l,Bc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Lc(e,t,s,l){return xo(e,t,s,l),To(e)}function ms(e,t){return xo(e,null,null,t),To(e)}function fp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-gt(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function To(e){if(50<xl)throw xl=0,qu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ws={};function zS(e,t,s,l){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,t,s,l){return new zS(e,t,s,l)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ra(e,t){var s=e.alternate;return s===null?(s=fn(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function hp(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Eo(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Uc(e)&&(b=1);else if(typeof e=="string")b=G_(e,s,Se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=fn(31,s,t,c),e.elementType=W,e.lanes=f,e;case E:return gs(s.children,c,f,t);case j:b=8,c|=24;break;case A:return e=fn(12,s,t,c|2),e.elementType=A,e.lanes=f,e;case H:return e=fn(13,s,t,c),e.elementType=H,e.lanes=f,e;case V:return e=fn(19,s,t,c),e.elementType=V,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:b=10;break e;case k:b=9;break e;case Y:b=11;break e;case G:b=14;break e;case L:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=fn(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function gs(e,t,s,l){return e=fn(7,e,l,t),e.lanes=s,e}function zc(e,t,s){return e=fn(6,e,null,t),e.lanes=s,e}function pp(e){var t=fn(18,null,null,0);return t.stateNode=e,t}function Ic(e,t,s){return t=fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mp=new WeakMap;function Cn(e,t){if(typeof e=="object"&&e!==null){var s=mp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ta(t)},mp.set(e,t),t)}return{value:e,source:t,stack:ta(t)}}var ei=[],ti=0,Co=null,tl=0,An=[],jn=0,Ma=null,Gn=1,Fn="";function ca(e,t){ei[ti++]=tl,ei[ti++]=Co,Co=e,tl=t}function gp(e,t,s){An[jn++]=Gn,An[jn++]=Fn,An[jn++]=Ma,Ma=e;var l=Gn;e=Fn;var c=32-gt(l)-1;l&=~(1<<c),s+=1;var f=32-gt(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Gn=1<<32-gt(t)+c|s<<c|l,Fn=f+e}else Gn=1<<f|s<<c|l,Fn=e}function Vc(e){e.return!==null&&(ca(e,1),gp(e,1,0))}function Hc(e){for(;e===Co;)Co=ei[--ti],ei[ti]=null,tl=ei[--ti],ei[ti]=null;for(;e===Ma;)Ma=An[--jn],An[jn]=null,Fn=An[--jn],An[jn]=null,Gn=An[--jn],An[jn]=null}function yp(e,t){An[jn++]=Gn,An[jn++]=Fn,An[jn++]=Ma,Gn=t.id,Fn=t.overflow,Ma=e}var zt=null,tt=null,Le=!1,Ra=null,Nn=!1,Pc=Error(o(519));function Oa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw nl(Cn(t,e)),Pc}function vp(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[Ut]=e,t[nn]=l,s){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(s=0;s<El.length;s++)Me(El[s],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),kh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),Rh(t,l.value,l.defaultValue,l.children)}s=l.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||l.suppressHydrationWarning===!0||Bg(t.textContent,s)?(l.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),l.onScroll!=null&&Me("scroll",t),l.onScrollEnd!=null&&Me("scrollend",t),l.onClick!=null&&(t.onclick=la),t=!0):t=!1,t||Oa(e,!0)}function bp(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:Nn=!1;return;case 27:case 3:Nn=!0;return;default:zt=zt.return}}function ni(e){if(e!==zt)return!1;if(!Le)return bp(e),Le=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||ld(e.type,e.memoizedProps)),s=!s),s&&tt&&Oa(e),bp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Fg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));tt=Fg(e)}else t===27?(t=tt,Ka(e.type)?(e=dd,dd=null,tt=e):tt=t):tt=zt?Dn(e.stateNode.nextSibling):null;return!0}function ys(){tt=zt=null,Le=!1}function Gc(){var e=Ra;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),Ra=null),e}function nl(e){Ra===null?Ra=[e]:Ra.push(e)}var Fc=He(null),vs=null,ua=null;function Ba(e,t,s){ve(Fc,t._currentValue),t._currentValue=s}function da(e){e._currentValue=Fc.current,Ee(Fc)}function qc(e,t,s){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===s)break;e=e.return}}function $c(e,t,s,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var b=c.child;f=f.firstContext;e:for(;f!==null;){var x=f;f=c;for(var N=0;N<t.length;N++)if(x.context===t[N]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),qc(f.return,s,e),l||(b=null);break e}f=x.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(o(341));b.lanes|=s,f=b.alternate,f!==null&&(f.lanes|=s),qc(b,s,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function ai(e,t,s,l){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(o(387));if(b=b.memoizedProps,b!==null){var x=c.type;dn(c.pendingProps.value,b.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ce.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(wl):e=[wl])}c=c.return}e!==null&&$c(t,e,s,l),t.flags|=262144}function Ao(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function bs(e){vs=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return Sp(vs,e)}function jo(e,t){return vs===null&&bs(e),Sp(e,t)}function Sp(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},ua===null){if(e===null)throw Error(o(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return s}var IS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},VS=n.unstable_scheduleCallback,HS=n.unstable_NormalPriority,Et={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yc(){return{controller:new IS,data:new Map,refCount:0}}function al(e){e.refCount--,e.refCount===0&&VS(HS,function(){e.controller.abort()})}var sl=null,Kc=0,si=0,ii=null;function PS(e,t){if(sl===null){var s=sl=[];Kc=0,si=Qu(),ii={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Kc++,t.then(_p,_p),t}function _p(){if(--Kc===0&&sl!==null){ii!==null&&(ii.status="fulfilled");var e=sl;sl=null,si=0,ii=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function GS(e,t){var s=[],l={status:"pending",value:null,reason:null,then:function(c){s.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<s.length;c++)(0,s[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<s.length;c++)(0,s[c])(void 0)}),l}var xp=z.S;z.S=function(e,t){ig=de(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&PS(e,t),xp!==null&&xp(e,t)};var Ss=He(null);function Zc(){var e=Ss.current;return e!==null?e:Je.pooledCache}function No(e,t){t===null?ve(Ss,Ss.current):ve(Ss,t.pool)}function Tp(){var e=Zc();return e===null?null:{parent:Et._currentValue,pool:e}}var li=Error(o(460)),Xc=Error(o(474)),wo=Error(o(542)),Do={then:function(){}};function Ep(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Cp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(la,la),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jp(e),e;default:if(typeof t.status=="string")t.then(la,la);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jp(e),e}throw xs=t,li}}function _s(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(xs=s,li):s}}var xs=null;function Ap(){if(xs===null)throw Error(o(459));var e=xs;return xs=null,e}function jp(e){if(e===li||e===wo)throw Error(o(483))}var oi=null,il=0;function ko(e){var t=il;return il+=1,oi===null&&(oi=[]),Cp(oi,e,t)}function ll(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Mo(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Np(e){function t(M,w){if(e){var O=M.deletions;O===null?(M.deletions=[w],M.flags|=16):O.push(w)}}function s(M,w){if(!e)return null;for(;w!==null;)t(M,w),w=w.sibling;return null}function l(M){for(var w=new Map;M!==null;)M.key!==null?w.set(M.key,M):w.set(M.index,M),M=M.sibling;return w}function c(M,w){return M=ra(M,w),M.index=0,M.sibling=null,M}function f(M,w,O){return M.index=O,e?(O=M.alternate,O!==null?(O=O.index,O<w?(M.flags|=67108866,w):O):(M.flags|=67108866,w)):(M.flags|=1048576,w)}function b(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function x(M,w,O,X){return w===null||w.tag!==6?(w=zc(O,M.mode,X),w.return=M,w):(w=c(w,O),w.return=M,w)}function N(M,w,O,X){var he=O.type;return he===E?$(M,w,O.props.children,X,O.key):w!==null&&(w.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===L&&_s(he)===w.type)?(w=c(w,O.props),ll(w,O),w.return=M,w):(w=Eo(O.type,O.key,O.props,null,M.mode,X),ll(w,O),w.return=M,w)}function B(M,w,O,X){return w===null||w.tag!==4||w.stateNode.containerInfo!==O.containerInfo||w.stateNode.implementation!==O.implementation?(w=Ic(O,M.mode,X),w.return=M,w):(w=c(w,O.children||[]),w.return=M,w)}function $(M,w,O,X,he){return w===null||w.tag!==7?(w=gs(O,M.mode,X,he),w.return=M,w):(w=c(w,O),w.return=M,w)}function Q(M,w,O){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=zc(""+w,M.mode,O),w.return=M,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case T:return O=Eo(w.type,w.key,w.props,null,M.mode,O),ll(O,w),O.return=M,O;case C:return w=Ic(w,M.mode,O),w.return=M,w;case L:return w=_s(w),Q(M,w,O)}if(se(w)||ie(w))return w=gs(w,M.mode,O,null),w.return=M,w;if(typeof w.then=="function")return Q(M,ko(w),O);if(w.$$typeof===R)return Q(M,jo(M,w),O);Mo(M,w)}return null}function U(M,w,O,X){var he=w!==null?w.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return he!==null?null:x(M,w,""+O,X);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return O.key===he?N(M,w,O,X):null;case C:return O.key===he?B(M,w,O,X):null;case L:return O=_s(O),U(M,w,O,X)}if(se(O)||ie(O))return he!==null?null:$(M,w,O,X,null);if(typeof O.then=="function")return U(M,w,ko(O),X);if(O.$$typeof===R)return U(M,w,jo(M,O),X);Mo(M,O)}return null}function P(M,w,O,X,he){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return M=M.get(O)||null,x(w,M,""+X,he);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case T:return M=M.get(X.key===null?O:X.key)||null,N(w,M,X,he);case C:return M=M.get(X.key===null?O:X.key)||null,B(w,M,X,he);case L:return X=_s(X),P(M,w,O,X,he)}if(se(X)||ie(X))return M=M.get(O)||null,$(w,M,X,he,null);if(typeof X.then=="function")return P(M,w,O,ko(X),he);if(X.$$typeof===R)return P(M,w,O,jo(w,X),he);Mo(w,X)}return null}function oe(M,w,O,X){for(var he=null,Ue=null,fe=w,Ne=w=0,Oe=null;fe!==null&&Ne<O.length;Ne++){fe.index>Ne?(Oe=fe,fe=null):Oe=fe.sibling;var ze=U(M,fe,O[Ne],X);if(ze===null){fe===null&&(fe=Oe);break}e&&fe&&ze.alternate===null&&t(M,fe),w=f(ze,w,Ne),Ue===null?he=ze:Ue.sibling=ze,Ue=ze,fe=Oe}if(Ne===O.length)return s(M,fe),Le&&ca(M,Ne),he;if(fe===null){for(;Ne<O.length;Ne++)fe=Q(M,O[Ne],X),fe!==null&&(w=f(fe,w,Ne),Ue===null?he=fe:Ue.sibling=fe,Ue=fe);return Le&&ca(M,Ne),he}for(fe=l(fe);Ne<O.length;Ne++)Oe=P(fe,M,Ne,O[Ne],X),Oe!==null&&(e&&Oe.alternate!==null&&fe.delete(Oe.key===null?Ne:Oe.key),w=f(Oe,w,Ne),Ue===null?he=Oe:Ue.sibling=Oe,Ue=Oe);return e&&fe.forEach(function(Wa){return t(M,Wa)}),Le&&ca(M,Ne),he}function pe(M,w,O,X){if(O==null)throw Error(o(151));for(var he=null,Ue=null,fe=w,Ne=w=0,Oe=null,ze=O.next();fe!==null&&!ze.done;Ne++,ze=O.next()){fe.index>Ne?(Oe=fe,fe=null):Oe=fe.sibling;var Wa=U(M,fe,ze.value,X);if(Wa===null){fe===null&&(fe=Oe);break}e&&fe&&Wa.alternate===null&&t(M,fe),w=f(Wa,w,Ne),Ue===null?he=Wa:Ue.sibling=Wa,Ue=Wa,fe=Oe}if(ze.done)return s(M,fe),Le&&ca(M,Ne),he;if(fe===null){for(;!ze.done;Ne++,ze=O.next())ze=Q(M,ze.value,X),ze!==null&&(w=f(ze,w,Ne),Ue===null?he=ze:Ue.sibling=ze,Ue=ze);return Le&&ca(M,Ne),he}for(fe=l(fe);!ze.done;Ne++,ze=O.next())ze=P(fe,M,Ne,ze.value,X),ze!==null&&(e&&ze.alternate!==null&&fe.delete(ze.key===null?Ne:ze.key),w=f(ze,w,Ne),Ue===null?he=ze:Ue.sibling=ze,Ue=ze);return e&&fe.forEach(function(ex){return t(M,ex)}),Le&&ca(M,Ne),he}function Ze(M,w,O,X){if(typeof O=="object"&&O!==null&&O.type===E&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case T:e:{for(var he=O.key;w!==null;){if(w.key===he){if(he=O.type,he===E){if(w.tag===7){s(M,w.sibling),X=c(w,O.props.children),X.return=M,M=X;break e}}else if(w.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===L&&_s(he)===w.type){s(M,w.sibling),X=c(w,O.props),ll(X,O),X.return=M,M=X;break e}s(M,w);break}else t(M,w);w=w.sibling}O.type===E?(X=gs(O.props.children,M.mode,X,O.key),X.return=M,M=X):(X=Eo(O.type,O.key,O.props,null,M.mode,X),ll(X,O),X.return=M,M=X)}return b(M);case C:e:{for(he=O.key;w!==null;){if(w.key===he)if(w.tag===4&&w.stateNode.containerInfo===O.containerInfo&&w.stateNode.implementation===O.implementation){s(M,w.sibling),X=c(w,O.children||[]),X.return=M,M=X;break e}else{s(M,w);break}else t(M,w);w=w.sibling}X=Ic(O,M.mode,X),X.return=M,M=X}return b(M);case L:return O=_s(O),Ze(M,w,O,X)}if(se(O))return oe(M,w,O,X);if(ie(O)){if(he=ie(O),typeof he!="function")throw Error(o(150));return O=he.call(O),pe(M,w,O,X)}if(typeof O.then=="function")return Ze(M,w,ko(O),X);if(O.$$typeof===R)return Ze(M,w,jo(M,O),X);Mo(M,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,w!==null&&w.tag===6?(s(M,w.sibling),X=c(w,O),X.return=M,M=X):(s(M,w),X=zc(O,M.mode,X),X.return=M,M=X),b(M)):s(M,w)}return function(M,w,O,X){try{il=0;var he=Ze(M,w,O,X);return oi=null,he}catch(fe){if(fe===li||fe===wo)throw fe;var Ue=fn(29,fe,null,M.mode);return Ue.lanes=X,Ue.return=M,Ue}finally{}}}var Ts=Np(!0),wp=Np(!1),La=!1;function Qc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jc(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 Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ve&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=To(e),fp(e,null,s),t}return xo(e,l,t,s),To(e)}function ol(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Sh(e,s)}}function Wc(e,t){var s=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var c=null,f=null;if(s=s.firstBaseUpdate,s!==null){do{var b={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};f===null?c=f=b:f=f.next=b,s=s.next}while(s!==null);f===null?c=f=t:f=f.next=t}else c=f=t;s={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var eu=!1;function rl(){if(eu){var e=ii;if(e!==null)throw e}}function cl(e,t,s,l){eu=!1;var c=e.updateQueue;La=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var N=x,B=N.next;N.next=null,b===null?f=B:b.next=B,b=N;var $=e.alternate;$!==null&&($=$.updateQueue,x=$.lastBaseUpdate,x!==b&&(x===null?$.firstBaseUpdate=B:x.next=B,$.lastBaseUpdate=N))}if(f!==null){var Q=c.baseState;b=0,$=B=N=null,x=f;do{var U=x.lane&-536870913,P=U!==x.lane;if(P?(Re&U)===U:(l&U)===U){U!==0&&U===si&&(eu=!0),$!==null&&($=$.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var oe=e,pe=x;U=t;var Ze=s;switch(pe.tag){case 1:if(oe=pe.payload,typeof oe=="function"){Q=oe.call(Ze,Q,U);break e}Q=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=pe.payload,U=typeof oe=="function"?oe.call(Ze,Q,U):oe,U==null)break e;Q=v({},Q,U);break e;case 2:La=!0}}U=x.callback,U!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[U]:P.push(U))}else P={lane:U,tag:x.tag,payload:x.payload,callback:x.callback,next:null},$===null?(B=$=P,N=Q):$=$.next=P,b|=U;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;P=x,x=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);$===null&&(N=Q),c.baseState=N,c.firstBaseUpdate=B,c.lastBaseUpdate=$,f===null&&(c.shared.lanes=0),Ga|=b,e.lanes=b,e.memoizedState=Q}}function Dp(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function kp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Dp(s[e],t)}var ri=He(null),Ro=He(0);function Mp(e,t){e=Sa,ve(Ro,e),ve(ri,t),Sa=e|t.baseLanes}function tu(){ve(Ro,Sa),ve(ri,ri.current)}function nu(){Sa=Ro.current,Ee(ri),Ee(Ro)}var hn=He(null),wn=null;function Ia(e){var t=e.alternate;ve(vt,vt.current&1),ve(hn,e),wn===null&&(t===null||ri.current!==null||t.memoizedState!==null)&&(wn=e)}function au(e){ve(vt,vt.current),ve(hn,e),wn===null&&(wn=e)}function Rp(e){e.tag===22?(ve(vt,vt.current),ve(hn,e),wn===null&&(wn=e)):Va()}function Va(){ve(vt,vt.current),ve(hn,hn.current)}function pn(e){Ee(hn),wn===e&&(wn=null),Ee(vt)}var vt=He(0);function Oo(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||cd(s)||ud(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var fa=0,Te=null,Ye=null,Ct=null,Bo=!1,ci=!1,Es=!1,Lo=0,ul=0,ui=null,FS=0;function dt(){throw Error(o(321))}function su(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!dn(e[s],t[s]))return!1;return!0}function iu(e,t,s,l,c,f){return fa=f,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?gm:Su,Es=!1,f=s(l,c),Es=!1,ci&&(f=Bp(t,s,l,c)),Op(e),f}function Op(e){z.H=hl;var t=Ye!==null&&Ye.next!==null;if(fa=0,Ct=Ye=Te=null,Bo=!1,ul=0,ui=null,t)throw Error(o(300));e===null||At||(e=e.dependencies,e!==null&&Ao(e)&&(At=!0))}function Bp(e,t,s,l){Te=e;var c=0;do{if(ci&&(ui=null),ul=0,ci=!1,25<=c)throw Error(o(301));if(c+=1,Ct=Ye=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=ym,f=t(s,l)}while(ci);return f}function qS(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?dl(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(Te.flags|=1024),t}function lu(){var e=Lo!==0;return Lo=0,e}function ou(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function ru(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}fa=0,Ct=Ye=Te=null,ci=!1,ul=Lo=0,ui=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Te.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function bt(){if(Ye===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=Ct===null?Te.memoizedState:Ct.next;if(t!==null)Ct=t,Ye=e;else{if(e===null)throw Te.alternate===null?Error(o(467)):Error(o(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},Ct===null?Te.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function dl(e){var t=ul;return ul+=1,ui===null&&(ui=[]),e=Cp(ui,e,t),t=Te,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?gm:Su),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return dl(e);if(e.$$typeof===R)return It(e)}throw Error(o(438,String(e)))}function cu(e){var t=null,s=Te.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Uo(),Te.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=ae;return t.index++,s}function ha(e,t){return typeof t=="function"?t(e):t}function Io(e){var t=bt();return uu(t,Ye,e)}function uu(e,t,s){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=s;var c=e.baseQueue,f=l.pending;if(f!==null){if(c!==null){var b=c.next;c.next=f.next,f.next=b}t.baseQueue=c=f,l.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var x=b=null,N=null,B=t,$=!1;do{var Q=B.lane&-536870913;if(Q!==B.lane?(Re&Q)===Q:(fa&Q)===Q){var U=B.revertLane;if(U===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Q===si&&($=!0);else if((fa&U)===U){B=B.next,U===si&&($=!0);continue}else Q={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},N===null?(x=N=Q,b=f):N=N.next=Q,Te.lanes|=U,Ga|=U;Q=B.action,Es&&s(f,Q),f=B.hasEagerState?B.eagerState:s(f,Q)}else U={lane:Q,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},N===null?(x=N=U,b=f):N=N.next=U,Te.lanes|=Q,Ga|=Q;B=B.next}while(B!==null&&B!==t);if(N===null?b=f:N.next=x,!dn(f,e.memoizedState)&&(At=!0,$&&(s=ii,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=N,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function du(e){var t=bt(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var l=s.dispatch,c=s.pending,f=t.memoizedState;if(c!==null){s.pending=null;var b=c=c.next;do f=e(f,b.action),b=b.next;while(b!==c);dn(f,t.memoizedState)||(At=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Lp(e,t,s){var l=Te,c=bt(),f=Le;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!dn((Ye||c).memoizedState,s);if(b&&(c.memoizedState=s,At=!0),c=c.queue,pu(Ip.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,di(9,{destroy:void 0},zp.bind(null,l,c,s,t),null),Je===null)throw Error(o(349));f||(fa&127)!==0||Up(l,t,s)}return s}function Up(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Te.updateQueue,t===null?(t=Uo(),Te.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function zp(e,t,s,l){t.value=s,t.getSnapshot=l,Vp(t)&&Hp(e)}function Ip(e,t,s){return s(function(){Vp(t)&&Hp(e)})}function Vp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!dn(e,s)}catch{return!0}}function Hp(e){var t=ms(e,2);t!==null&&cn(t,e,2)}function fu(e){var t=Xt();if(typeof e=="function"){var s=e;if(e=s(),Es){Zt(!0);try{s()}finally{Zt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function Pp(e,t,s,l){return e.baseState=s,uu(e,Ye,typeof l=="function"?l:ha)}function $S(e,t,s,l,c){if(Po(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};z.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Gp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Gp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=z.T,b={};z.T=b;try{var x=s(c,l),N=z.S;N!==null&&N(b,x),Fp(e,t,x)}catch(B){hu(e,t,B)}finally{f!==null&&b.types!==null&&(f.types=b.types),z.T=f}}else try{f=s(c,l),Fp(e,t,f)}catch(B){hu(e,t,B)}}function Fp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){qp(e,t,l)},function(l){return hu(e,t,l)}):qp(e,t,s)}function qp(e,t,s){t.status="fulfilled",t.value=s,$p(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Gp(e,s)))}function hu(e,t,s){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=s,$p(t),t=t.next;while(t!==l)}e.action=null}function $p(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Yp(e,t){return t}function Kp(e,t){if(Le){var s=Je.formState;if(s!==null){e:{var l=Te;if(Le){if(tt){t:{for(var c=tt,f=Nn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Dn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){tt=Dn(c.nextSibling),l=c.data==="F!";break e}}Oa(l)}l=!1}l&&(t=s[0])}}return s=Xt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yp,lastRenderedState:t},s.queue=l,s=hm.bind(null,Te,l),l.dispatch=s,l=fu(!1),f=bu.bind(null,Te,!1,l.queue),l=Xt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=$S.bind(null,Te,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function Zp(e){var t=bt();return Xp(t,Ye,e)}function Xp(e,t,s){if(t=uu(e,t,Yp)[0],e=Io(ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=dl(t)}catch(b){throw b===li?wo:b}else l=t;t=bt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Te.flags|=2048,di(9,{destroy:void 0},YS.bind(null,c,s),null)),[l,f,e]}function YS(e,t){e.action=t}function Qp(e){var t=bt(),s=Ye;if(s!==null)return Xp(t,s,e);bt(),t=t.memoizedState,s=bt();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function di(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Uo(),Te.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function Jp(){return bt().memoizedState}function Vo(e,t,s,l){var c=Xt();Te.flags|=e,c.memoizedState=di(1|t,{destroy:void 0},s,l===void 0?null:l)}function Ho(e,t,s,l){var c=bt();l=l===void 0?null:l;var f=c.memoizedState.inst;Ye!==null&&l!==null&&su(l,Ye.memoizedState.deps)?c.memoizedState=di(t,f,s,l):(Te.flags|=e,c.memoizedState=di(1|t,f,s,l))}function Wp(e,t){Vo(8390656,8,e,t)}function pu(e,t){Ho(2048,8,e,t)}function KS(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Uo(),Te.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function em(e){var t=bt().memoizedState;return KS({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function tm(e,t){return Ho(4,2,e,t)}function nm(e,t){return Ho(4,4,e,t)}function am(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sm(e,t,s){s=s!=null?s.concat([e]):null,Ho(4,4,am.bind(null,t,e),s)}function mu(){}function im(e,t){var s=bt();t=t===void 0?null:t;var l=s.memoizedState;return t!==null&&su(t,l[1])?l[0]:(s.memoizedState=[e,t],e)}function lm(e,t){var s=bt();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&su(t,l[1]))return l[0];if(l=e(),Es){Zt(!0);try{e()}finally{Zt(!1)}}return s.memoizedState=[l,t],l}function gu(e,t,s){return s===void 0||(fa&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=og(),Te.lanes|=e,Ga|=e,s)}function om(e,t,s,l){return dn(s,t)?s:ri.current!==null?(e=gu(e,s,l),dn(e,t)||(At=!0),e):(fa&42)===0||(fa&1073741824)!==0&&(Re&261930)===0?(At=!0,e.memoizedState=s):(e=og(),Te.lanes|=e,Ga|=e,t)}function rm(e,t,s,l,c){var f=q.p;q.p=f!==0&&8>f?f:8;var b=z.T,x={};z.T=x,bu(e,!1,t,s);try{var N=c(),B=z.S;if(B!==null&&B(x,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var $=GS(N,l);fl(e,t,$,yn(e))}else fl(e,t,l,yn(e))}catch(Q){fl(e,t,{then:function(){},status:"rejected",reason:Q},yn())}finally{q.p=f,b!==null&&x.types!==null&&(b.types=x.types),z.T=b}}function ZS(){}function yu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=cm(e).queue;rm(e,c,t,te,s===null?ZS:function(){return um(e),s(l)})}function cm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:te},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function um(e){var t=cm(e);t.next===null&&(t=e.alternate.memoizedState),fl(e,t.next.queue,{},yn())}function vu(){return It(wl)}function dm(){return bt().memoizedState}function fm(){return bt().memoizedState}function XS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=yn();e=Ua(s);var l=za(t,e,s);l!==null&&(cn(l,t,s),ol(l,t,s)),t={cache:Yc()},e.payload=t;return}t=t.return}}function QS(e,t,s){var l=yn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Po(e)?pm(t,s):(s=Lc(e,t,s,l),s!==null&&(cn(s,e,l),mm(s,t,l)))}function hm(e,t,s){var l=yn();fl(e,t,s,l)}function fl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Po(e))pm(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,x=f(b,s);if(c.hasEagerState=!0,c.eagerState=x,dn(x,b))return xo(e,t,c,0),Je===null&&_o(),!1}catch{}finally{}if(s=Lc(e,t,c,l),s!==null)return cn(s,e,l),mm(s,t,l),!0}return!1}function bu(e,t,s,l){if(l={lane:2,revertLane:Qu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Po(e)){if(t)throw Error(o(479))}else t=Lc(e,s,l,2),t!==null&&cn(t,e,2)}function Po(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function pm(e,t){ci=Bo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function mm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Sh(e,s)}}var hl={readContext:It,use:zo,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};hl.useEffectEvent=dt;var gm={readContext:It,use:zo,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Wp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Vo(4194308,4,am.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Vo(4194308,4,e,t)},useInsertionEffect:function(e,t){Vo(4,2,e,t)},useMemo:function(e,t){var s=Xt();t=t===void 0?null:t;var l=e();if(Es){Zt(!0);try{e()}finally{Zt(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Xt();if(s!==void 0){var c=s(t);if(Es){Zt(!0);try{s(t)}finally{Zt(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=QS.bind(null,Te,e),[l.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=fu(e);var t=e.queue,s=hm.bind(null,Te,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:mu,useDeferredValue:function(e,t){var s=Xt();return gu(s,e,t)},useTransition:function(){var e=fu(!1);return e=rm.bind(null,Te,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Te,c=Xt();if(Le){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),Je===null)throw Error(o(349));(Re&127)!==0||Up(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,Wp(Ip.bind(null,l,f,e),[e]),l.flags|=2048,di(9,{destroy:void 0},zp.bind(null,l,f,s,t),null),s},useId:function(){var e=Xt(),t=Je.identifierPrefix;if(Le){var s=Fn,l=Gn;s=(l&~(1<<32-gt(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Lo++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=FS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vu,useFormState:Kp,useActionState:Kp,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=bu.bind(null,Te,!0,s),s.dispatch=t,[e,t]},useMemoCache:cu,useCacheRefresh:function(){return Xt().memoizedState=XS.bind(null,Te)},useEffectEvent:function(e){var t=Xt(),s={impl:e};return t.memoizedState=s,function(){if((Ve&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Su={readContext:It,use:zo,useCallback:im,useContext:It,useEffect:pu,useImperativeHandle:sm,useInsertionEffect:tm,useLayoutEffect:nm,useMemo:lm,useReducer:Io,useRef:Jp,useState:function(){return Io(ha)},useDebugValue:mu,useDeferredValue:function(e,t){var s=bt();return om(s,Ye.memoizedState,e,t)},useTransition:function(){var e=Io(ha)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:Lp,useId:dm,useHostTransitionStatus:vu,useFormState:Zp,useActionState:Zp,useOptimistic:function(e,t){var s=bt();return Pp(s,Ye,e,t)},useMemoCache:cu,useCacheRefresh:fm};Su.useEffectEvent=em;var ym={readContext:It,use:zo,useCallback:im,useContext:It,useEffect:pu,useImperativeHandle:sm,useInsertionEffect:tm,useLayoutEffect:nm,useMemo:lm,useReducer:du,useRef:Jp,useState:function(){return du(ha)},useDebugValue:mu,useDeferredValue:function(e,t){var s=bt();return Ye===null?gu(s,e,t):om(s,Ye.memoizedState,e,t)},useTransition:function(){var e=du(ha)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:dl(e),t]},useSyncExternalStore:Lp,useId:dm,useHostTransitionStatus:vu,useFormState:Qp,useActionState:Qp,useOptimistic:function(e,t){var s=bt();return Ye!==null?Pp(s,Ye,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:cu,useCacheRefresh:fm};ym.useEffectEvent=em;function _u(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var xu={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=yn(),c=Ua(l);c.payload=t,s!=null&&(c.callback=s),t=za(e,c,l),t!==null&&(cn(t,e,l),ol(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=yn(),c=Ua(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=za(e,c,l),t!==null&&(cn(t,e,l),ol(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=yn(),l=Ua(s);l.tag=2,t!=null&&(l.callback=t),t=za(e,l,s),t!==null&&(cn(t,e,s),ol(t,e,s))}};function vm(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Wi(s,l)||!Wi(c,f):!0}function bm(e,t,s,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,l),t.state!==e&&xu.enqueueReplaceState(t,t.state,null)}function Cs(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=v({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Sm(e){So(e)}function _m(e){console.error(e)}function xm(e){So(e)}function Go(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Tm(e,t,s){try{var l=e.onCaughtError;l(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Tu(e,t,s){return s=Ua(s),s.tag=3,s.payload={element:null},s.callback=function(){Go(e,t)},s}function Em(e){return e=Ua(e),e.tag=3,e}function Cm(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){Tm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Tm(t,s,l),typeof c!="function"&&(Fa===null?Fa=new Set([this]):Fa.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function JS(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&ai(t,s,c,!0),s=hn.current,s!==null){switch(s.tag){case 31:case 13:return wn===null?tr():s.alternate===null&&ft===0&&(ft=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===Do?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([l]):t.add(l),Ku(e,l,c)),!1;case 22:return s.flags|=65536,l===Do?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([l]):s.add(l)),Ku(e,l,c)),!1}throw Error(o(435,s.tag))}return Ku(e,l,c),tr(),!1}if(Le)return t=hn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Pc&&(e=Error(o(422),{cause:l}),nl(Cn(e,s)))):(l!==Pc&&(t=Error(o(423),{cause:l}),nl(Cn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Cn(l,s),c=Tu(e.stateNode,l,c),Wc(e,c),ft!==4&&(ft=2)),!1;var f=Error(o(520),{cause:l});if(f=Cn(f,s),_l===null?_l=[f]:_l.push(f),ft!==4&&(ft=2),t===null)return!0;l=Cn(l,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=c&-c,s.lanes|=e,e=Tu(s.stateNode,l,e),Wc(s,e),!1;case 1:if(t=s.type,f=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Fa===null||!Fa.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Em(c),Cm(c,e,s,l),Wc(s,c),!1}s=s.return}while(s!==null);return!1}var Eu=Error(o(461)),At=!1;function Vt(e,t,s,l){t.child=e===null?wp(t,null,s,l):Ts(t,e.child,s,l)}function Am(e,t,s,l,c){s=s.render;var f=t.ref;if("ref"in l){var b={};for(var x in l)x!=="ref"&&(b[x]=l[x])}else b=l;return bs(t),l=iu(e,t,s,b,f,c),x=lu(),e!==null&&!At?(ou(e,t,c),pa(e,t,c)):(Le&&x&&Vc(t),t.flags|=1,Vt(e,t,l,c),t.child)}function jm(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Uc(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Nm(e,t,f,l,c)):(e=Eo(s.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Mu(e,c)){var b=f.memoizedProps;if(s=s.compare,s=s!==null?s:Wi,s(b,l)&&e.ref===t.ref)return pa(e,t,c)}return t.flags|=1,e=ra(f,l),e.ref=t.ref,e.return=t,t.child=e}function Nm(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Wi(f,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=f,Mu(e,c))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,pa(e,t,c)}return Cu(e,t,s,l,c)}function wm(e,t,s,l){var c=l.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|s:s,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~f}else l=0,t.child=null;return Dm(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&No(t,f!==null?f.cachePool:null),f!==null?Mp(t,f):tu(),Rp(t);else return l=t.lanes=536870912,Dm(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(No(t,f.cachePool),Mp(t,f),Va(),t.memoizedState=null):(e!==null&&No(t,null),tu(),Va());return Vt(e,t,c,s),t.child}function pl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Dm(e,t,s,l,c){var f=Zc();return f=f===null?null:{parent:Et._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&No(t,null),tu(),Rp(t),e!==null&&ai(e,t,l,!0),t.childLanes=c,null}function Fo(e,t){return t=$o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function km(e,t,s){return Ts(t,e.child,null,s),e=Fo(t,t.pendingProps),e.flags|=2,pn(t),t.memoizedState=null,e}function WS(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(l.mode==="hidden")return e=Fo(t,l),t.lanes=536870912,pl(null,e);if(au(t),(e=tt)?(e=Gg(e,Nn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Gn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=pp(e),s.return=t,t.child=s,zt=t,tt=null)):e=null,e===null)throw Oa(t);return t.lanes=536870912,null}return Fo(t,l)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(au(t),c)if(t.flags&256)t.flags&=-257,t=km(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(At||ai(e,t,s,!1),c=(s&e.childLanes)!==0,At||c){if(l=Je,l!==null&&(b=_h(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,ms(e,b),cn(l,e,b),Eu;tr(),t=km(e,t,s)}else e=f.treeContext,tt=Dn(b.nextSibling),zt=t,Le=!0,Ra=null,Nn=!1,e!==null&&yp(t,e),t=Fo(t,l),t.flags|=4096;return t}return e=ra(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qo(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Cu(e,t,s,l,c){return bs(t),s=iu(e,t,s,l,void 0,c),l=lu(),e!==null&&!At?(ou(e,t,c),pa(e,t,c)):(Le&&l&&Vc(t),t.flags|=1,Vt(e,t,s,c),t.child)}function Mm(e,t,s,l,c,f){return bs(t),t.updateQueue=null,s=Bp(t,l,s,c),Op(e),l=lu(),e!==null&&!At?(ou(e,t,f),pa(e,t,f)):(Le&&l&&Vc(t),t.flags|=1,Vt(e,t,s,f),t.child)}function Rm(e,t,s,l,c){if(bs(t),t.stateNode===null){var f=Ws,b=s.contextType;typeof b=="object"&&b!==null&&(f=It(b)),f=new s(l,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=xu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=l,f.state=t.memoizedState,f.refs={},Qc(t),b=s.contextType,f.context=typeof b=="object"&&b!==null?It(b):Ws,f.state=t.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(_u(t,s,b,l),f.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&xu.enqueueReplaceState(f,f.state,null),cl(t,l,f,c),rl(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,N=Cs(s,x);f.props=N;var B=f.context,$=s.contextType;b=Ws,typeof $=="object"&&$!==null&&(b=It($));var Q=s.getDerivedStateFromProps;$=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||B!==b)&&bm(t,f,l,b),La=!1;var U=t.memoizedState;f.state=U,cl(t,l,f,c),rl(),B=t.memoizedState,x||U!==B||La?(typeof Q=="function"&&(_u(t,s,Q,l),B=t.memoizedState),(N=La||vm(t,s,N,l,U,B,b))?($||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=B),f.props=l,f.state=B,f.context=b,l=N):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Jc(e,t),b=t.memoizedProps,$=Cs(s,b),f.props=$,Q=t.pendingProps,U=f.context,B=s.contextType,N=Ws,typeof B=="object"&&B!==null&&(N=It(B)),x=s.getDerivedStateFromProps,(B=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==Q||U!==N)&&bm(t,f,l,N),La=!1,U=t.memoizedState,f.state=U,cl(t,l,f,c),rl();var P=t.memoizedState;b!==Q||U!==P||La||e!==null&&e.dependencies!==null&&Ao(e.dependencies)?(typeof x=="function"&&(_u(t,s,x,l),P=t.memoizedState),($=La||vm(t,s,$,l,U,P,N)||e!==null&&e.dependencies!==null&&Ao(e.dependencies))?(B||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,N),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,N)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),f.props=l,f.state=P,f.context=N,l=$):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,qo(e,t),l=(t.flags&128)!==0,f||l?(f=t.stateNode,s=l&&typeof s.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&l?(t.child=Ts(t,e.child,null,c),t.child=Ts(t,null,s,c)):Vt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=pa(e,t,c),e}function Om(e,t,s,l){return ys(),t.flags|=256,Vt(e,t,s,l),t.child}var Au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ju(e){return{baseLanes:e,cachePool:Tp()}}function Nu(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=gn),e}function Bm(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(vt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(c?Ia(t):Va(),(e=tt)?(e=Gg(e,Nn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Gn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},s=pp(e),s.return=t,t.child=s,zt=t,tt=null)):e=null,e===null)throw Oa(t);return ud(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,c?(Va(),c=t.mode,x=$o({mode:"hidden",children:x},c),l=gs(l,c,s,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=ju(s),l.childLanes=Nu(e,b,s),t.memoizedState=Au,pl(null,l)):(Ia(t),wu(t,x))}var N=e.memoizedState;if(N!==null&&(x=N.dehydrated,x!==null)){if(f)t.flags&256?(Ia(t),t.flags&=-257,t=Du(e,t,s)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),x=l.fallback,c=t.mode,l=$o({mode:"visible",children:l.children},c),x=gs(x,c,s,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,Ts(t,e.child,null,s),l=t.child,l.memoizedState=ju(s),l.childLanes=Nu(e,b,s),t.memoizedState=Au,t=pl(null,l));else if(Ia(t),ud(x)){if(b=x.nextSibling&&x.nextSibling.dataset,b)var B=b.dgst;b=B,l=Error(o(419)),l.stack="",l.digest=b,nl({value:l,source:null,stack:null}),t=Du(e,t,s)}else if(At||ai(e,t,s,!1),b=(s&e.childLanes)!==0,At||b){if(b=Je,b!==null&&(l=_h(b,s),l!==0&&l!==N.retryLane))throw N.retryLane=l,ms(e,l),cn(b,e,l),Eu;cd(x)||tr(),t=Du(e,t,s)}else cd(x)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,tt=Dn(x.nextSibling),zt=t,Le=!0,Ra=null,Nn=!1,e!==null&&yp(t,e),t=wu(t,l.children),t.flags|=4096);return t}return c?(Va(),x=l.fallback,c=t.mode,N=e.child,B=N.sibling,l=ra(N,{mode:"hidden",children:l.children}),l.subtreeFlags=N.subtreeFlags&65011712,B!==null?x=ra(B,x):(x=gs(x,c,s,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,pl(null,l),l=t.child,x=e.child.memoizedState,x===null?x=ju(s):(c=x.cachePool,c!==null?(N=Et._currentValue,c=c.parent!==N?{parent:N,pool:N}:c):c=Tp(),x={baseLanes:x.baseLanes|s,cachePool:c}),l.memoizedState=x,l.childLanes=Nu(e,b,s),t.memoizedState=Au,pl(e.child,l)):(Ia(t),s=e.child,e=s.sibling,s=ra(s,{mode:"visible",children:l.children}),s.return=t,s.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=s,t.memoizedState=null,s)}function wu(e,t){return t=$o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function $o(e,t){return e=fn(22,e,null,t),e.lanes=0,e}function Du(e,t,s){return Ts(t,e.child,null,s),e=wu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),qc(e.return,t,s)}function ku(e,t,s,l,c,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:s,tailMode:c,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=s,b.tailMode=c,b.treeForkCount=f)}function Um(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=vt.current,x=(b&2)!==0;if(x?(b=b&1|2,t.flags|=128):b&=1,ve(vt,b),Vt(e,t,l,s),l=Le?tl:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lm(e,s,t);else if(e.tag===19)Lm(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(s=t.child,c=null;s!==null;)e=s.alternate,e!==null&&Oo(e)===null&&(c=s),s=s.sibling;s=c,s===null?(c=t.child,t.child=null):(c=s.sibling,s.sibling=null),ku(t,!1,c,s,f,l);break;case"backwards":case"unstable_legacy-backwards":for(s=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Oo(e)===null){t.child=c;break}e=c.sibling,c.sibling=s,s=c,c=e}ku(t,!0,s,null,f,l);break;case"together":ku(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function pa(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Ga|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ai(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=ra(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=ra(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ao(e)))}function e_(e,t,s){switch(t.tag){case 3:Ae(t,t.stateNode.containerInfo),Ba(t,Et,e.memoizedState.cache),ys();break;case 27:case 5:mt(t);break;case 4:Ae(t,t.stateNode.containerInfo);break;case 10:Ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,au(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ia(t),t.flags|=128,null):(s&t.child.childLanes)!==0?Bm(e,t,s):(Ia(t),e=pa(e,t,s),e!==null?e.sibling:null);Ia(t);break;case 19:var c=(e.flags&128)!==0;if(l=(s&t.childLanes)!==0,l||(ai(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Um(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ve(vt,vt.current),l)break;return null;case 22:return t.lanes=0,wm(e,t,s,t.pendingProps);case 24:Ba(t,Et,e.memoizedState.cache)}return pa(e,t,s)}function zm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!Mu(e,s)&&(t.flags&128)===0)return At=!1,e_(e,t,s);At=(e.flags&131072)!==0}else At=!1,Le&&(t.flags&1048576)!==0&&gp(t,tl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=_s(t.elementType),t.type=e,typeof e=="function")Uc(e)?(l=Cs(e,l),t.tag=1,t=Rm(null,t,e,l,s)):(t.tag=0,t=Cu(null,t,e,l,s));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=Am(null,t,e,l,s);break e}else if(c===G){t.tag=14,t=jm(null,t,e,l,s);break e}}throw t=F(e)||e,Error(o(306,t,""))}}return t;case 0:return Cu(e,t,t.type,t.pendingProps,s);case 1:return l=t.type,c=Cs(l,t.pendingProps),Rm(e,t,l,c,s);case 3:e:{if(Ae(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Jc(e,t),cl(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Ba(t,Et,l),l!==f.cache&&$c(t,[Et],s,!0),rl(),l=b.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Om(e,t,l,s);break e}else if(l!==c){c=Cn(Error(o(424)),t),nl(c),t=Om(e,t,l,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=Dn(e.firstChild),zt=t,Le=!0,Ra=null,Nn=!0,s=wp(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ys(),l===c){t=pa(e,t,s);break e}Vt(e,t,l,s)}t=t.child}return t;case 26:return qo(e,t),e===null?(s=Zg(t.type,null,t.pendingProps,null))?t.memoizedState=s:Le||(s=t.type,e=t.pendingProps,l=rr(ee.current).createElement(s),l[Ut]=t,l[nn]=e,Ht(l,s,e),Rt(l),t.stateNode=l):t.memoizedState=Zg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return mt(t),e===null&&Le&&(l=t.stateNode=$g(t.type,t.pendingProps,ee.current),zt=t,Nn=!0,c=tt,Ka(t.type)?(dd=c,tt=Dn(l.firstChild)):tt=c),Vt(e,t,t.pendingProps.children,s),qo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((c=l=tt)&&(l=D_(l,t.type,t.pendingProps,Nn),l!==null?(t.stateNode=l,zt=t,tt=Dn(l.firstChild),Nn=!1,c=!0):c=!1),c||Oa(t)),mt(t),c=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,l=f.children,ld(c,f)?l=null:b!==null&&ld(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=iu(e,t,qS,null,null,s),wl._currentValue=c),qo(e,t),Vt(e,t,l,s),t.child;case 6:return e===null&&Le&&((e=s=tt)&&(s=k_(s,t.pendingProps,Nn),s!==null?(t.stateNode=s,zt=t,tt=null,e=!0):e=!1),e||Oa(t)),null;case 13:return Bm(e,t,s);case 4:return Ae(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ts(t,null,l,s):Vt(e,t,l,s),t.child;case 11:return Am(e,t,t.type,t.pendingProps,s);case 7:return Vt(e,t,t.pendingProps,s),t.child;case 8:return Vt(e,t,t.pendingProps.children,s),t.child;case 12:return Vt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ba(t,t.type,l.value),Vt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,bs(t),c=It(c),l=l(c),t.flags|=1,Vt(e,t,l,s),t.child;case 14:return jm(e,t,t.type,t.pendingProps,s);case 15:return Nm(e,t,t.type,t.pendingProps,s);case 19:return Um(e,t,s);case 31:return WS(e,t,s);case 22:return wm(e,t,s,t.pendingProps);case 24:return bs(t),l=It(Et),e===null?(c=Zc(),c===null&&(c=Je,f=Yc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Qc(t),Ba(t,Et,c)):((e.lanes&s)!==0&&(Jc(e,t),cl(t,null,null,s),rl()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ba(t,Et,l)):(l=f.cache,Ba(t,Et,l),l!==c.cache&&$c(t,[Et],s,!0))),Vt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function ma(e){e.flags|=4}function Ru(e,t,s,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(dg())e.flags|=8192;else throw xs=Do,Xc}else e.flags&=-16777217}function Im(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ey(t))if(dg())e.flags|=8192;else throw xs=Do,Xc}function Yo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?sa():536870912,e.lanes|=t,mi|=t)}function ml(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,l=0;if(t)for(var c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)s|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=s,t}function t_(e,t,s){var l=t.pendingProps;switch(Hc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),da(Et),Ie(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ni(t)?ma(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gc())),nt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(ma(t),f!==null?(nt(t),Im(t,f)):(nt(t),Ru(t,c,null,l,s))):f?f!==e.memoizedState?(ma(t),nt(t),Im(t,f)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ma(t),nt(t),Ru(t,c,e,l,s)),null;case 27:if(Tt(t),s=ee.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ma(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return nt(t),null}e=Se.current,ni(t)?vp(t):(e=$g(c,l,s),t.stateNode=e,ma(t))}return nt(t),null;case 5:if(Tt(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ma(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return nt(t),null}if(f=Se.current,ni(t))vp(t);else{var b=rr(ee.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}f[Ut]=t,f[nn]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Ht(f,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ma(t)}}return nt(t),Ru(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ma(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,ni(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=zt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||Bg(e.nodeValue,s)),e||Oa(t,!0)}else e=rr(e).createTextNode(l),e[Ut]=t,t.stateNode=e}return nt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=ni(t),s!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ut]=t}else ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else s=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(pn(t),t):(pn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return nt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ni(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Ut]=t}else ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),c=!1}else c=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(pn(t),t):(pn(t),null)}return pn(t),(t.flags&128)!==0?(t.lanes=s,t):(s=l!==null,e=e!==null&&e.memoizedState!==null,s&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==c&&(l.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),Yo(t,t.updateQueue),nt(t),null);case 4:return Ie(),e===null&&td(t.stateNode.containerInfo),nt(t),null;case 10:return da(t.type),nt(t),null;case 19:if(Ee(vt),l=t.memoizedState,l===null)return nt(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)ml(l,!1);else{if(ft!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Oo(e),f!==null){for(t.flags|=128,ml(l,!1),e=f.updateQueue,t.updateQueue=e,Yo(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)hp(s,e),s=s.sibling;return ve(vt,vt.current&1|2),Le&&ca(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&de()>Jo&&(t.flags|=128,c=!0,ml(l,!1),t.lanes=4194304)}else{if(!c)if(e=Oo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Yo(t,e),ml(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Le)return nt(t),null}else 2*de()-l.renderingStartTime>Jo&&s!==536870912&&(t.flags|=128,c=!0,ml(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=de(),e.sibling=null,s=vt.current,ve(vt,c?s&1|2:s&1),Le&&ca(t,l.treeForkCount),e):(nt(t),null);case 22:case 23:return pn(t),nu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(s&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),s=t.updateQueue,s!==null&&Yo(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&Ee(Ss),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),da(Et),nt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function n_(e,t){switch(Hc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return da(Et),Ie(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Tt(t),null;case 31:if(t.memoizedState!==null){if(pn(t),t.alternate===null)throw Error(o(340));ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ee(vt),null;case 4:return Ie(),null;case 10:return da(t.type),null;case 22:case 23:return pn(t),nu(),e!==null&&Ee(Ss),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return da(Et),null;case 25:return null;default:return null}}function Vm(e,t){switch(Hc(t),t.tag){case 3:da(Et),Ie();break;case 26:case 27:case 5:Tt(t);break;case 4:Ie();break;case 31:t.memoizedState!==null&&pn(t);break;case 13:pn(t);break;case 19:Ee(vt);break;case 10:da(t.type);break;case 22:case 23:pn(t),nu(),e!==null&&Ee(Ss);break;case 24:da(Et)}}function gl(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(x){$e(t,t.return,x)}}function Ha(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,c=t;var N=s,B=x;try{B()}catch($){$e(c,N,$)}}}l=l.next}while(l!==f)}}catch($){$e(t,t.return,$)}}function Hm(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{kp(t,s)}catch(l){$e(e,e.return,l)}}}function Pm(e,t,s){s.props=Cs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){$e(e,t,l)}}function yl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){$e(e,t,c)}}function qn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){$e(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){$e(e,t,c)}else s.current=null}function Gm(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){$e(e,e.return,c)}}function Ou(e,t,s){try{var l=e.stateNode;E_(l,e.type,s,t),l[nn]=t}catch(c){$e(e,e.return,c)}}function Fm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ka(e.type)||e.tag===4}function Bu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fm(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&&Ka(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 Lu(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=la));else if(l!==4&&(l===27&&Ka(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Lu(e,t,s),e=e.sibling;e!==null;)Lu(e,t,s),e=e.sibling}function Ko(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&Ka(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ko(e,t,s),e=e.sibling;e!==null;)Ko(e,t,s),e=e.sibling}function qm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ht(t,l,s),t[Ut]=e,t[nn]=s}catch(f){$e(e,e.return,f)}}var ga=!1,jt=!1,Uu=!1,$m=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function a_(e,t){if(e=e.containerInfo,sd=mr,e=sp(e),Dc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{s.nodeType,f.nodeType}catch{s=null;break e}var b=0,x=-1,N=-1,B=0,$=0,Q=e,U=null;t:for(;;){for(var P;Q!==s||c!==0&&Q.nodeType!==3||(x=b+c),Q!==f||l!==0&&Q.nodeType!==3||(N=b+l),Q.nodeType===3&&(b+=Q.nodeValue.length),(P=Q.firstChild)!==null;)U=Q,Q=P;for(;;){if(Q===e)break t;if(U===s&&++B===c&&(x=b),U===f&&++$===l&&(N=b),(P=Q.nextSibling)!==null)break;Q=U,U=Q.parentNode}Q=P}s=x===-1||N===-1?null:{start:x,end:N}}else s=null}s=s||{start:0,end:0}}else s=null;for(id={focusedElem:e,selectionRange:s},mr=!1,Ot=t;Ot!==null;)if(t=Ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ot=e;else for(;Ot!==null;){switch(t=Ot,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)c=e[s],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,s=t,c=f.memoizedProps,f=f.memoizedState,l=s.stateNode;try{var oe=Cs(s.type,c);e=l.getSnapshotBeforeUpdate(oe,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){$e(s,s.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)rd(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":rd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ot=e;break}Ot=t.return}}function Ym(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:va(e,s),l&4&&gl(5,s);break;case 1:if(va(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){$e(s,s.return,b)}else{var c=Cs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){$e(s,s.return,b)}}l&64&&Hm(s),l&512&&yl(s,s.return);break;case 3:if(va(e,s),l&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{kp(e,t)}catch(b){$e(s,s.return,b)}}break;case 27:t===null&&l&4&&qm(s);case 26:case 5:va(e,s),t===null&&l&4&&Gm(s),l&512&&yl(s,s.return);break;case 12:va(e,s);break;case 31:va(e,s),l&4&&Xm(e,s);break;case 13:va(e,s),l&4&&Qm(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=f_.bind(null,s),M_(e,s))));break;case 22:if(l=s.memoizedState!==null||ga,!l){t=t!==null&&t.memoizedState!==null||jt,c=ga;var f=jt;ga=l,(jt=t)&&!f?ba(e,s,(s.subtreeFlags&8772)!==0):va(e,s),ga=c,jt=f}break;case 30:break;default:va(e,s)}}function Km(e){var t=e.alternate;t!==null&&(e.alternate=null,Km(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&hc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var lt=null,sn=!1;function ya(e,t,s){for(s=s.child;s!==null;)Zm(e,t,s),s=s.sibling}function Zm(e,t,s){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount(rt,s)}catch{}switch(s.tag){case 26:jt||qn(s,t),ya(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:jt||qn(s,t);var l=lt,c=sn;Ka(s.type)&&(lt=s.stateNode,sn=!1),ya(e,t,s),Al(s.stateNode),lt=l,sn=c;break;case 5:jt||qn(s,t);case 6:if(l=lt,c=sn,lt=null,ya(e,t,s),lt=l,sn=c,lt!==null)if(sn)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(s.stateNode)}catch(f){$e(s,t,f)}else try{lt.removeChild(s.stateNode)}catch(f){$e(s,t,f)}break;case 18:lt!==null&&(sn?(e=lt,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Ti(e)):Hg(lt,s.stateNode));break;case 4:l=lt,c=sn,lt=s.stateNode.containerInfo,sn=!0,ya(e,t,s),lt=l,sn=c;break;case 0:case 11:case 14:case 15:Ha(2,s,t),jt||Ha(4,s,t),ya(e,t,s);break;case 1:jt||(qn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&Pm(s,t,l)),ya(e,t,s);break;case 21:ya(e,t,s);break;case 22:jt=(l=jt)||s.memoizedState!==null,ya(e,t,s),jt=l;break;default:ya(e,t,s)}}function Xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ti(e)}catch(s){$e(t,t.return,s)}}}function Qm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ti(e)}catch(s){$e(t,t.return,s)}}function s_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $m),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $m),t;default:throw Error(o(435,e.tag))}}function Zo(e,t){var s=s_(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=h_.bind(null,e,l);l.then(c,c)}})}function ln(e,t){var s=t.deletions;if(s!==null)for(var l=0;l<s.length;l++){var c=s[l],f=e,b=t,x=b;e:for(;x!==null;){switch(x.tag){case 27:if(Ka(x.type)){lt=x.stateNode,sn=!1;break e}break;case 5:lt=x.stateNode,sn=!1;break e;case 3:case 4:lt=x.stateNode.containerInfo,sn=!0;break e}x=x.return}if(lt===null)throw Error(o(160));Zm(f,b,c),lt=null,sn=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Jm(t,e),t=t.sibling}var In=null;function Jm(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ln(t,e),on(e),l&4&&(Ha(3,e,e.return),gl(3,e),Ha(5,e,e.return));break;case 1:ln(t,e),on(e),l&512&&(jt||s===null||qn(s,s.return)),l&64&&ga&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?l:s.concat(l))));break;case 26:var c=In;if(ln(t,e),on(e),l&512&&(jt||s===null||qn(s,s.return)),l&4){var f=s!==null?s.memoizedState:null;if(l=e.memoizedState,s===null)if(l===null)if(e.stateNode===null){e:{l=e.type,s=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":f=c.getElementsByTagName("title")[0],(!f||f[Fi]||f[Ut]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Ht(f,l,s),f[Ut]=e,Rt(f),l=f;break e;case"link":var b=Jg("link","href",c).get(l+(s.href||""));if(b){for(var x=0;x<b.length;x++)if(f=b[x],f.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&f.getAttribute("rel")===(s.rel==null?null:s.rel)&&f.getAttribute("title")===(s.title==null?null:s.title)&&f.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){b.splice(x,1);break t}}f=c.createElement(l),Ht(f,l,s),c.head.appendChild(f);break;case"meta":if(b=Jg("meta","content",c).get(l+(s.content||""))){for(x=0;x<b.length;x++)if(f=b[x],f.getAttribute("content")===(s.content==null?null:""+s.content)&&f.getAttribute("name")===(s.name==null?null:s.name)&&f.getAttribute("property")===(s.property==null?null:s.property)&&f.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&f.getAttribute("charset")===(s.charSet==null?null:s.charSet)){b.splice(x,1);break t}}f=c.createElement(l),Ht(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[Ut]=e,Rt(f),l=f}e.stateNode=l}else Wg(c,e.type,e.stateNode);else e.stateNode=Qg(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?Wg(c,e.type,e.stateNode):Qg(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ou(e,e.memoizedProps,s.memoizedProps)}break;case 27:ln(t,e),on(e),l&512&&(jt||s===null||qn(s,s.return)),s!==null&&l&4&&Ou(e,e.memoizedProps,s.memoizedProps);break;case 5:if(ln(t,e),on(e),l&512&&(jt||s===null||qn(s,s.return)),e.flags&32){c=e.stateNode;try{$s(c,"")}catch(oe){$e(e,e.return,oe)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Ou(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Uu=!0);break;case 6:if(ln(t,e),on(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(oe){$e(e,e.return,oe)}}break;case 3:if(dr=null,c=In,In=cr(t.containerInfo),ln(t,e),In=c,on(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{Ti(t.containerInfo)}catch(oe){$e(e,e.return,oe)}Uu&&(Uu=!1,Wm(e));break;case 4:l=In,In=cr(e.stateNode.containerInfo),ln(t,e),on(e),In=l;break;case 12:ln(t,e),on(e);break;case 31:ln(t,e),on(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zo(e,l)));break;case 13:ln(t,e),on(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Qo=de()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zo(e,l)));break;case 22:c=e.memoizedState!==null;var N=s!==null&&s.memoizedState!==null,B=ga,$=jt;if(ga=B||c,jt=$||N,ln(t,e),jt=$,ga=B,on(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||N||ga||jt||As(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){N=s=t;try{if(f=N.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{x=N.stateNode;var Q=N.memoizedProps.style,U=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;x.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(oe){$e(N,N.return,oe)}}}else if(t.tag===6){if(s===null){N=t;try{N.stateNode.nodeValue=c?"":N.memoizedProps}catch(oe){$e(N,N.return,oe)}}}else if(t.tag===18){if(s===null){N=t;try{var P=N.stateNode;c?Pg(P,!0):Pg(N.stateNode,!1)}catch(oe){$e(N,N.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(s=l.retryQueue,s!==null&&(l.retryQueue=null,Zo(e,s))));break;case 19:ln(t,e),on(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Zo(e,l)));break;case 30:break;case 21:break;default:ln(t,e),on(e)}}function on(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Fm(l)){s=l;break}l=l.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var c=s.stateNode,f=Bu(e);Ko(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&($s(b,""),s.flags&=-33);var x=Bu(e);Ko(e,x,b);break;case 3:case 4:var N=s.stateNode.containerInfo,B=Bu(e);Lu(e,B,N);break;default:throw Error(o(161))}}catch($){$e(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Wm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ym(e,t.alternate,t),t=t.sibling}function As(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ha(4,t,t.return),As(t);break;case 1:qn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&Pm(t,t.return,s),As(t);break;case 27:Al(t.stateNode);case 26:case 5:qn(t,t.return),As(t);break;case 22:t.memoizedState===null&&As(t);break;case 30:As(t);break;default:As(t)}e=e.sibling}}function ba(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:ba(c,f,s),gl(4,f);break;case 1:if(ba(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){$e(l,l.return,B)}if(l=f,c=l.updateQueue,c!==null){var x=l.stateNode;try{var N=c.shared.hiddenCallbacks;if(N!==null)for(c.shared.hiddenCallbacks=null,c=0;c<N.length;c++)Dp(N[c],x)}catch(B){$e(l,l.return,B)}}s&&b&64&&Hm(f),yl(f,f.return);break;case 27:qm(f);case 26:case 5:ba(c,f,s),s&&l===null&&b&4&&Gm(f),yl(f,f.return);break;case 12:ba(c,f,s);break;case 31:ba(c,f,s),s&&b&4&&Xm(c,f);break;case 13:ba(c,f,s),s&&b&4&&Qm(c,f);break;case 22:f.memoizedState===null&&ba(c,f,s),yl(f,f.return);break;case 30:break;default:ba(c,f,s)}t=t.sibling}}function zu(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&al(s))}function Iu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e))}function Vn(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)eg(e,t,s,l),t=t.sibling}function eg(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Vn(e,t,s,l),c&2048&&gl(9,t);break;case 1:Vn(e,t,s,l);break;case 3:Vn(e,t,s,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&al(e)));break;case 12:if(c&2048){Vn(e,t,s,l),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,x=f.onPostCommit;typeof x=="function"&&x(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){$e(t,t.return,N)}}else Vn(e,t,s,l);break;case 31:Vn(e,t,s,l);break;case 13:Vn(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Vn(e,t,s,l):vl(e,t):f._visibility&2?Vn(e,t,s,l):(f._visibility|=2,fi(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&zu(b,t);break;case 24:Vn(e,t,s,l),c&2048&&Iu(t.alternate,t);break;default:Vn(e,t,s,l)}}function fi(e,t,s,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,x=s,N=l,B=b.flags;switch(b.tag){case 0:case 11:case 15:fi(f,b,x,N,c),gl(8,b);break;case 23:break;case 22:var $=b.stateNode;b.memoizedState!==null?$._visibility&2?fi(f,b,x,N,c):vl(f,b):($._visibility|=2,fi(f,b,x,N,c)),c&&B&2048&&zu(b.alternate,b);break;case 24:fi(f,b,x,N,c),c&&B&2048&&Iu(b.alternate,b);break;default:fi(f,b,x,N,c)}t=t.sibling}}function vl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:vl(s,l),c&2048&&zu(l.alternate,l);break;case 24:vl(s,l),c&2048&&Iu(l.alternate,l);break;default:vl(s,l)}t=t.sibling}}var bl=8192;function hi(e,t,s){if(e.subtreeFlags&bl)for(e=e.child;e!==null;)tg(e,t,s),e=e.sibling}function tg(e,t,s){switch(e.tag){case 26:hi(e,t,s),e.flags&bl&&e.memoizedState!==null&&F_(s,In,e.memoizedState,e.memoizedProps);break;case 5:hi(e,t,s);break;case 3:case 4:var l=In;In=cr(e.stateNode.containerInfo),hi(e,t,s),In=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=bl,bl=16777216,hi(e,t,s),bl=l):hi(e,t,s));break;default:hi(e,t,s)}}function ng(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Ot=l,sg(l,e)}ng(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ag(e),e=e.sibling}function ag(e){switch(e.tag){case 0:case 11:case 15:Sl(e),e.flags&2048&&Ha(9,e,e.return);break;case 3:Sl(e);break;case 12:Sl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xo(e)):Sl(e);break;default:Sl(e)}}function Xo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var l=t[s];Ot=l,sg(l,e)}ng(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ha(8,t,t.return),Xo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Xo(t));break;default:Xo(t)}e=e.sibling}}function sg(e,t){for(;Ot!==null;){var s=Ot;switch(s.tag){case 0:case 11:case 15:Ha(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:al(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Ot=l;else e:for(s=e;Ot!==null;){l=Ot;var c=l.sibling,f=l.return;if(Km(l),l===s){Ot=null;break e}if(c!==null){c.return=f,Ot=c;break e}Ot=f}}}var i_={getCacheForType:function(e){var t=It(Et),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return It(Et).controller.signal}},l_=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Je=null,ke=null,Re=0,qe=0,mn=null,Pa=!1,pi=!1,Vu=!1,Sa=0,ft=0,Ga=0,js=0,Hu=0,gn=0,mi=0,_l=null,rn=null,Pu=!1,Qo=0,ig=0,Jo=1/0,Wo=null,Fa=null,Dt=0,qa=null,gi=null,_a=0,Gu=0,Fu=null,lg=null,xl=0,qu=null;function yn(){return(Ve&2)!==0&&Re!==0?Re&-Re:z.T!==null?Qu():xh()}function og(){if(gn===0)if((Re&536870912)===0||Le){var e=us;us<<=1,(us&3932160)===0&&(us=262144),gn=e}else gn=536870912;return e=hn.current,e!==null&&(e.flags|=32),gn}function cn(e,t,s){(e===Je&&(qe===2||qe===9)||e.cancelPendingCommit!==null)&&(yi(e,0),$a(e,Re,gn,!1)),Gi(e,s),((Ve&2)===0||e!==Je)&&(e===Je&&((Ve&2)===0&&(js|=s),ft===4&&$a(e,Re,gn,!1)),$n(e))}function rg(e,t,s){if((Ve&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||le(e,t),c=l?c_(e,t):Yu(e,t,!0),f=l;do{if(c===0){pi&&!l&&$a(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!o_(s)){c=Yu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var x=e;c=_l;var N=x.current.memoizedState.isDehydrated;if(N&&(yi(x,b).flags|=256),b=Yu(x,b,!1),b!==2){if(Vu&&!N){x.errorRecoveryDisabledLanes|=f,js|=f,c=4;break e}f=rn,rn=c,f!==null&&(rn===null?rn=f:rn.push.apply(rn,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){yi(e,0),$a(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:$a(l,t,gn,!Pa);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Qo+300-de(),10<c)){if($a(l,t,gn,!Pa),yt(l,0,!0)!==0)break e;_a=t,l.timeoutHandle=Ig(cg.bind(null,l,s,rn,Wo,Pu,t,gn,js,mi,Pa,f,"Throttled",-0,0),c);break e}cg(l,s,rn,Wo,Pu,t,gn,js,mi,Pa,f,null,-0,0)}}break}while(!0);$n(e)}function cg(e,t,s,l,c,f,b,x,N,B,$,Q,U,P){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:la},tg(t,f,Q);var oe=(f&62914560)===f?Qo-de():(f&4194048)===f?ig-de():0;if(oe=q_(Q,oe),oe!==null){_a=f,e.cancelPendingCommit=oe(yg.bind(null,e,t,f,s,l,c,b,x,N,$,Q,null,U,P)),$a(e,f,b,!B);return}}yg(e,t,f,s,l,c,b,x,N)}function o_(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var l=0;l<s.length;l++){var c=s[l],f=c.getSnapshot;c=c.value;try{if(!dn(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function $a(e,t,s,l){t&=~Hu,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-gt(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&bh(e,s,t)}function er(){return(Ve&6)===0?(Tl(0),!1):!0}function $u(){if(ke!==null){if(qe===0)var e=ke.return;else e=ke,ua=vs=null,ru(e),oi=null,il=0,e=ke;for(;e!==null;)Vm(e.alternate,e),e=e.return;ke=null}}function yi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,j_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),_a=0,$u(),Je=e,ke=s=ra(e.current,null),Re=t,qe=0,mn=null,Pa=!1,pi=le(e,t),Vu=!1,mi=gn=Hu=js=Ga=ft=0,rn=_l=null,Pu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-gt(l),f=1<<c;t|=e[c],l&=~f}return Sa=t,_o(),s}function ug(e,t){Te=null,z.H=hl,t===li||t===wo?(t=Ap(),qe=3):t===Xc?(t=Ap(),qe=4):qe=t===Eu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,ke===null&&(ft=1,Go(e,Cn(t,e.current)))}function dg(){var e=hn.current;return e===null?!0:(Re&4194048)===Re?wn===null:(Re&62914560)===Re||(Re&536870912)!==0?e===wn:!1}function fg(){var e=z.H;return z.H=hl,e===null?hl:e}function hg(){var e=z.A;return z.A=i_,e}function tr(){ft=4,Pa||(Re&4194048)!==Re&&hn.current!==null||(pi=!0),(Ga&134217727)===0&&(js&134217727)===0||Je===null||$a(Je,Re,gn,!1)}function Yu(e,t,s){var l=Ve;Ve|=2;var c=fg(),f=hg();(Je!==e||Re!==t)&&(Wo=null,yi(e,t)),t=!1;var b=ft;e:do try{if(qe!==0&&ke!==null){var x=ke,N=mn;switch(qe){case 8:$u(),b=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var B=qe;if(qe=0,mn=null,vi(e,x,N,B),s&&pi){b=0;break e}break;default:B=qe,qe=0,mn=null,vi(e,x,N,B)}}r_(),b=ft;break}catch($){ug(e,$)}while(!0);return t&&e.shellSuspendCounter++,ua=vs=null,Ve=l,z.H=c,z.A=f,ke===null&&(Je=null,Re=0,_o()),b}function r_(){for(;ke!==null;)pg(ke)}function c_(e,t){var s=Ve;Ve|=2;var l=fg(),c=hg();Je!==e||Re!==t?(Wo=null,Jo=de()+500,yi(e,t)):pi=le(e,t);e:do try{if(qe!==0&&ke!==null){t=ke;var f=mn;t:switch(qe){case 1:qe=0,mn=null,vi(e,t,f,1);break;case 2:case 9:if(Ep(f)){qe=0,mn=null,mg(t);break}t=function(){qe!==2&&qe!==9||Je!==e||(qe=7),$n(e)},f.then(t,t);break e;case 3:qe=7;break e;case 4:qe=5;break e;case 7:Ep(f)?(qe=0,mn=null,mg(t)):(qe=0,mn=null,vi(e,t,f,7));break;case 5:var b=null;switch(ke.tag){case 26:b=ke.memoizedState;case 5:case 27:var x=ke;if(b?ey(b):x.stateNode.complete){qe=0,mn=null;var N=x.sibling;if(N!==null)ke=N;else{var B=x.return;B!==null?(ke=B,nr(B)):ke=null}break t}}qe=0,mn=null,vi(e,t,f,5);break;case 6:qe=0,mn=null,vi(e,t,f,6);break;case 8:$u(),ft=6;break e;default:throw Error(o(462))}}u_();break}catch($){ug(e,$)}while(!0);return ua=vs=null,z.H=l,z.A=c,Ve=s,ke!==null?0:(Je=null,Re=0,_o(),ft)}function u_(){for(;ke!==null&&!ne();)pg(ke)}function pg(e){var t=zm(e.alternate,e,Sa);e.memoizedProps=e.pendingProps,t===null?nr(e):ke=t}function mg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Mm(s,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=Mm(s,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:ru(t);default:Vm(s,t),t=ke=hp(t,Sa),t=zm(s,t,Sa)}e.memoizedProps=e.pendingProps,t===null?nr(e):ke=t}function vi(e,t,s,l){ua=vs=null,ru(t),oi=null,il=0;var c=t.return;try{if(JS(e,c,t,s,Re)){ft=1,Go(e,Cn(s,e.current)),ke=null;return}}catch(f){if(c!==null)throw ke=c,f;ft=1,Go(e,Cn(s,e.current)),ke=null;return}t.flags&32768?(Le||l===1?e=!0:pi||(Re&536870912)!==0?e=!1:(Pa=e=!0,(l===2||l===9||l===3||l===6)&&(l=hn.current,l!==null&&l.tag===13&&(l.flags|=16384))),gg(t,e)):nr(t)}function nr(e){var t=e;do{if((t.flags&32768)!==0){gg(t,Pa);return}e=t.return;var s=t_(t.alternate,t,Sa);if(s!==null){ke=s;return}if(t=t.sibling,t!==null){ke=t;return}ke=t=e}while(t!==null);ft===0&&(ft=5)}function gg(e,t){do{var s=n_(e.alternate,e);if(s!==null){s.flags&=32767,ke=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){ke=e;return}ke=e=s}while(e!==null);ft=6,ke=null}function yg(e,t,s,l,c,f,b,x,N){e.cancelPendingCommit=null;do ar();while(Dt!==0);if((Ve&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Bc,G1(e,s,f,b,x,N),e===Je&&(ke=Je=null,Re=0),gi=t,qa=e,_a=s,Gu=f,Fu=c,lg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p_(De,function(){return xg(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=z.T,z.T=null,c=q.p,q.p=2,b=Ve,Ve|=4;try{a_(e,t,s)}finally{Ve=b,q.p=c,z.T=l}}Dt=1,vg(),bg(),Sg()}}function vg(){if(Dt===1){Dt=0;var e=qa,t=gi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=z.T,z.T=null;var l=q.p;q.p=2;var c=Ve;Ve|=4;try{Jm(t,e);var f=id,b=sp(e.containerInfo),x=f.focusedElem,N=f.selectionRange;if(b!==x&&x&&x.ownerDocument&&ap(x.ownerDocument.documentElement,x)){if(N!==null&&Dc(x)){var B=N.start,$=N.end;if($===void 0&&($=B),"selectionStart"in x)x.selectionStart=B,x.selectionEnd=Math.min($,x.value.length);else{var Q=x.ownerDocument||document,U=Q&&Q.defaultView||window;if(U.getSelection){var P=U.getSelection(),oe=x.textContent.length,pe=Math.min(N.start,oe),Ze=N.end===void 0?pe:Math.min(N.end,oe);!P.extend&&pe>Ze&&(b=Ze,Ze=pe,pe=b);var M=np(x,pe),w=np(x,Ze);if(M&&w&&(P.rangeCount!==1||P.anchorNode!==M.node||P.anchorOffset!==M.offset||P.focusNode!==w.node||P.focusOffset!==w.offset)){var O=Q.createRange();O.setStart(M.node,M.offset),P.removeAllRanges(),pe>Ze?(P.addRange(O),P.extend(w.node,w.offset)):(O.setEnd(w.node,w.offset),P.addRange(O))}}}}for(Q=[],P=x;P=P.parentNode;)P.nodeType===1&&Q.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Q.length;x++){var X=Q[x];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}mr=!!sd,id=sd=null}finally{Ve=c,q.p=l,z.T=s}}e.current=t,Dt=2}}function bg(){if(Dt===2){Dt=0;var e=qa,t=gi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=z.T,z.T=null;var l=q.p;q.p=2;var c=Ve;Ve|=4;try{Ym(e,t.alternate,t)}finally{Ve=c,q.p=l,z.T=s}}Dt=3}}function Sg(){if(Dt===4||Dt===3){Dt=0,re();var e=qa,t=gi,s=_a,l=lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Dt=5:(Dt=0,gi=qa=null,_g(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Fa=null),dc(s),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot(rt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=z.T,c=q.p,q.p=2,z.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var x=l[b];f(x.value,{componentStack:x.stack})}}finally{z.T=t,q.p=c}}(_a&3)!==0&&ar(),$n(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===qu?xl++:(xl=0,qu=e):xl=0,Tl(0)}}function _g(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,al(t)))}function ar(){return vg(),bg(),Sg(),xg()}function xg(){if(Dt!==5)return!1;var e=qa,t=Gu;Gu=0;var s=dc(_a),l=z.T,c=q.p;try{q.p=32>s?32:s,z.T=null,s=Fu,Fu=null;var f=qa,b=_a;if(Dt=0,gi=qa=null,_a=0,(Ve&6)!==0)throw Error(o(331));var x=Ve;if(Ve|=4,ag(f.current),eg(f,f.current,b,s),Ve=x,Tl(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(rt,f)}catch{}return!0}finally{q.p=c,z.T=l,_g(e,t)}}function Tg(e,t,s){t=Cn(s,t),t=Tu(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Gi(e,2),$n(e))}function $e(e,t,s){if(e.tag===3)Tg(e,e,s);else for(;t!==null;){if(t.tag===3){Tg(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Fa===null||!Fa.has(l))){e=Cn(s,e),s=Em(2),l=za(t,s,2),l!==null&&(Cm(s,l,t,e),Gi(l,2),$n(l));break}}t=t.return}}function Ku(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new l_;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(s)||(Vu=!0,c.add(s),e=d_.bind(null,e,t,s),t.then(e,e))}function d_(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Je===e&&(Re&s)===s&&(ft===4||ft===3&&(Re&62914560)===Re&&300>de()-Qo?(Ve&2)===0&&yi(e,0):Hu|=s,mi===Re&&(mi=0)),$n(e)}function Eg(e,t){t===0&&(t=sa()),e=ms(e,t),e!==null&&(Gi(e,t),$n(e))}function f_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Eg(e,s)}function h_(e,t){var s=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(s=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Eg(e,s)}function p_(e,t){return na(e,t)}var sr=null,bi=null,Zu=!1,ir=!1,Xu=!1,Ya=0;function $n(e){e!==bi&&e.next===null&&(bi===null?sr=bi=e:bi=bi.next=e),ir=!0,Zu||(Zu=!0,g_())}function Tl(e,t){if(!Xu&&ir){Xu=!0;do for(var s=!1,l=sr;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,x=l.pingedLanes;f=(1<<31-gt(42|e)+1)-1,f&=c&~(b&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Ng(l,f))}else f=Re,f=yt(l,l===Je?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||le(l,f)||(s=!0,Ng(l,f));l=l.next}while(s);Xu=!1}}function m_(){Cg()}function Cg(){ir=Zu=!1;var e=0;Ya!==0&&A_()&&(e=Ya);for(var t=de(),s=null,l=sr;l!==null;){var c=l.next,f=Ag(l,t);f===0?(l.next=null,s===null?sr=c:s.next=c,c===null&&(bi=s)):(s=l,(e!==0||(f&3)!==0)&&(ir=!0)),l=c}Dt!==0&&Dt!==5||Tl(e),Ya!==0&&(Ya=0)}function Ag(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-gt(f),x=1<<b,N=c[b];N===-1?((x&s)===0||(x&l)!==0)&&(c[b]=Lt(x,t)):N<=t&&(e.expiredLanes|=x),f&=~x}if(t=Je,s=Re,s=yt(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(qe===2||qe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&J(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||le(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&J(l),dc(s)){case 2:case 8:s=Qe;break;case 32:s=De;break;case 268435456:s=wt;break;default:s=De}return l=jg.bind(null,e),s=na(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&J(l),e.callbackPriority=2,e.callbackNode=null,2}function jg(e,t){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(ar()&&e.callbackNode!==s)return null;var l=Re;return l=yt(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(rg(e,l,t),Ag(e,de()),e.callbackNode!=null&&e.callbackNode===s?jg.bind(null,e):null)}function Ng(e,t){if(ar())return null;rg(e,t,!0)}function g_(){N_(function(){(Ve&6)!==0?na(xe,m_):Cg()})}function Qu(){if(Ya===0){var e=si;e===0&&(e=aa,aa<<=1,(aa&261888)===0&&(aa=256)),Ya=e}return Ya}function wg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ho(""+e)}function Dg(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function y_(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=wg((c[nn]||null).action),b=l.submitter;b&&(t=(t=b[nn]||null)?wg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var x=new yo("action","action",null,l,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ya!==0){var N=b?Dg(c,b):new FormData(c);yu(s,{pending:!0,data:N,method:c.method,action:f},null,N)}}else typeof f=="function"&&(x.preventDefault(),N=b?Dg(c,b):new FormData(c),yu(s,{pending:!0,data:N,method:c.method,action:f},f,N))},currentTarget:c}]})}}for(var Ju=0;Ju<Oc.length;Ju++){var Wu=Oc[Ju],v_=Wu.toLowerCase(),b_=Wu[0].toUpperCase()+Wu.slice(1);zn(v_,"on"+b_)}zn(op,"onAnimationEnd"),zn(rp,"onAnimationIteration"),zn(cp,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(BS,"onTransitionRun"),zn(LS,"onTransitionStart"),zn(US,"onTransitionCancel"),zn(up,"onTransitionEnd"),Fs("onMouseEnter",["mouseout","mouseover"]),Fs("onMouseLeave",["mouseout","mouseover"]),Fs("onPointerEnter",["pointerout","pointerover"]),Fs("onPointerLeave",["pointerout","pointerover"]),ds("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ds("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ds("onBeforeInput",["compositionend","keypress","textInput","paste"]),ds("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ds("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var El="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),S_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(El));function kg(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var l=e[s],c=l.event;l=l.listeners;e:{var f=void 0;if(t)for(var b=l.length-1;0<=b;b--){var x=l[b],N=x.instance,B=x.currentTarget;if(x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=B;try{f(c)}catch($){So($)}c.currentTarget=null,f=N}else for(b=0;b<l.length;b++){if(x=l[b],N=x.instance,B=x.currentTarget,x=x.listener,N!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=B;try{f(c)}catch($){So($)}c.currentTarget=null,f=N}}}}function Me(e,t){var s=t[fc];s===void 0&&(s=t[fc]=new Set);var l=e+"__bubble";s.has(l)||(Mg(t,e,2,!1),s.add(l))}function ed(e,t,s){var l=0;t&&(l|=4),Mg(s,e,l,t)}var lr="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[lr]){e[lr]=!0,Ch.forEach(function(s){s!=="selectionchange"&&(S_.has(s)||ed(s,!1,e),ed(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lr]||(t[lr]=!0,ed("selectionchange",!1,t))}}function Mg(e,t,s,l){switch(oy(t)){case 2:var c=K_;break;case 8:c=Z_;break;default:c=gd}s=c.bind(null,t,s,e),c=void 0,!_c||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,s,{capture:!0,passive:c}):e.addEventListener(t,s,!0):c!==void 0?e.addEventListener(t,s,{passive:c}):e.addEventListener(t,s,!1)}function nd(e,t,s,l,c){var f=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var x=l.stateNode.containerInfo;if(x===c)break;if(b===4)for(b=l.return;b!==null;){var N=b.tag;if((N===3||N===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;x!==null;){if(b=Hs(x),b===null)return;if(N=b.tag,N===5||N===6||N===26||N===27){l=f=b;continue e}x=x.parentNode}}l=l.return}Uh(function(){var B=f,$=bc(s),Q=[];e:{var U=dp.get(e);if(U!==void 0){var P=yo,oe=e;switch(e){case"keypress":if(mo(s)===0)break e;case"keydown":case"keyup":P=hS;break;case"focusin":oe="focus",P=Cc;break;case"focusout":oe="blur",P=Cc;break;case"beforeblur":case"afterblur":P=Cc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Vh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=tS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=gS;break;case op:case rp:case cp:P=sS;break;case up:P=vS;break;case"scroll":case"scrollend":P=W1;break;case"wheel":P=SS;break;case"copy":case"cut":case"paste":P=lS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Ph;break;case"toggle":case"beforetoggle":P=xS}var pe=(t&4)!==0,Ze=!pe&&(e==="scroll"||e==="scrollend"),M=pe?U!==null?U+"Capture":null:U;pe=[];for(var w=B,O;w!==null;){var X=w;if(O=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||O===null||M===null||(X=$i(w,M),X!=null&&pe.push(Cl(w,X,O))),Ze)break;w=w.return}0<pe.length&&(U=new P(U,oe,null,s,$),Q.push({event:U,listeners:pe}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",U&&s!==vc&&(oe=s.relatedTarget||s.fromElement)&&(Hs(oe)||oe[Vs]))break e;if((P||U)&&(U=$.window===$?$:(U=$.ownerDocument)?U.defaultView||U.parentWindow:window,P?(oe=s.relatedTarget||s.toElement,P=B,oe=oe?Hs(oe):null,oe!==null&&(Ze=u(oe),pe=oe.tag,oe!==Ze||pe!==5&&pe!==27&&pe!==6)&&(oe=null)):(P=null,oe=B),P!==oe)){if(pe=Vh,X="onMouseLeave",M="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Ph,X="onPointerLeave",M="onPointerEnter",w="pointer"),Ze=P==null?U:qi(P),O=oe==null?U:qi(oe),U=new pe(X,w+"leave",P,s,$),U.target=Ze,U.relatedTarget=O,X=null,Hs($)===B&&(pe=new pe(M,w+"enter",oe,s,$),pe.target=O,pe.relatedTarget=Ze,X=pe),Ze=X,P&&oe)t:{for(pe=__,M=P,w=oe,O=0,X=M;X;X=pe(X))O++;X=0;for(var he=w;he;he=pe(he))X++;for(;0<O-X;)M=pe(M),O--;for(;0<X-O;)w=pe(w),X--;for(;O--;){if(M===w||w!==null&&M===w.alternate){pe=M;break t}M=pe(M),w=pe(w)}pe=null}else pe=null;P!==null&&Rg(Q,U,P,pe,!1),oe!==null&&Ze!==null&&Rg(Q,Ze,oe,pe,!0)}}e:{if(U=B?qi(B):window,P=U.nodeName&&U.nodeName.toLowerCase(),P==="select"||P==="input"&&U.type==="file")var Ue=Xh;else if(Kh(U))if(Qh)Ue=MS;else{Ue=DS;var fe=wS}else P=U.nodeName,!P||P.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&yc(B.elementType)&&(Ue=Xh):Ue=kS;if(Ue&&(Ue=Ue(e,B))){Zh(Q,Ue,s,$);break e}fe&&fe(e,U,B),e==="focusout"&&B&&U.type==="number"&&B.memoizedProps.value!=null&&gc(U,"number",U.value)}switch(fe=B?qi(B):window,e){case"focusin":(Kh(fe)||fe.contentEditable==="true")&&(Xs=fe,kc=B,el=null);break;case"focusout":el=kc=Xs=null;break;case"mousedown":Mc=!0;break;case"contextmenu":case"mouseup":case"dragend":Mc=!1,ip(Q,s,$);break;case"selectionchange":if(OS)break;case"keydown":case"keyup":ip(Q,s,$)}var Ne;if(jc)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else Zs?$h(e,s)&&(Oe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Oe="onCompositionStart");Oe&&(Gh&&s.locale!=="ko"&&(Zs||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&Zs&&(Ne=zh()):(ka=$,xc="value"in ka?ka.value:ka.textContent,Zs=!0)),fe=or(B,Oe),0<fe.length&&(Oe=new Hh(Oe,e,null,s,$),Q.push({event:Oe,listeners:fe}),Ne?Oe.data=Ne:(Ne=Yh(s),Ne!==null&&(Oe.data=Ne)))),(Ne=ES?CS(e,s):AS(e,s))&&(Oe=or(B,"onBeforeInput"),0<Oe.length&&(fe=new Hh("onBeforeInput","beforeinput",null,s,$),Q.push({event:fe,listeners:Oe}),fe.data=Ne)),y_(Q,e,B,s,$)}kg(Q,t)})}function Cl(e,t,s){return{instance:e,listener:t,currentTarget:s}}function or(e,t){for(var s=t+"Capture",l=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=$i(e,s),c!=null&&l.unshift(Cl(e,c,f)),c=$i(e,t),c!=null&&l.push(Cl(e,c,f))),e.tag===3)return l;e=e.return}return[]}function __(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var x=s,N=x.alternate,B=x.stateNode;if(x=x.tag,N!==null&&N===l)break;x!==5&&x!==26&&x!==27||B===null||(N=B,c?(B=$i(s,f),B!=null&&b.unshift(Cl(s,B,N))):c||(B=$i(s,f),B!=null&&b.push(Cl(s,B,N)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var x_=/\r\n?/g,T_=/\u0000|\uFFFD/g;function Og(e){return(typeof e=="string"?e:""+e).replace(x_,`
25
+ `).replace(T_,"")}function Bg(e,t){return t=Og(t),Og(e)===t}function Ke(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||$s(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&$s(e,""+l);break;case"className":uo(e,"class",l);break;case"tabIndex":uo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":uo(e,s,l);break;case"style":Bh(e,l,f);break;case"data":if(t!=="object"){uo(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=ho(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&Ke(e,t,"name",c.name,c,null),Ke(e,t,"formEncType",c.formEncType,c,null),Ke(e,t,"formMethod",c.formMethod,c,null),Ke(e,t,"formTarget",c.formTarget,c,null)):(Ke(e,t,"encType",c.encType,c,null),Ke(e,t,"method",c.method,c,null),Ke(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=ho(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=la);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=ho(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":Me("beforetoggle",e),Me("toggle",e),co(e,"popover",l);break;case"xlinkActuate":ia(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ia(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ia(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ia(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ia(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ia(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ia(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ia(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ia(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":co(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=Q1.get(s)||s,co(e,s,l))}}function ad(e,t,s,l,c,f){switch(s){case"style":Bh(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof l=="string"?$s(e,l):(typeof l=="number"||typeof l=="bigint")&&$s(e,""+l);break;case"onScroll":l!=null&&Me("scroll",e);break;case"onScrollEnd":l!=null&&Me("scrollend",e);break;case"onClick":l!=null&&(e.onclick=la);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ah.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[nn]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):co(e,s,l)}}}function Ht(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ke(e,t,f,b,s,null)}}c&&Ke(e,t,"srcSet",s.srcSet,s,null),l&&Ke(e,t,"src",s.src,s,null);return;case"input":Me("invalid",e);var x=f=b=c=null,N=null,B=null;for(l in s)if(s.hasOwnProperty(l)){var $=s[l];if($!=null)switch(l){case"name":c=$;break;case"type":b=$;break;case"checked":N=$;break;case"defaultChecked":B=$;break;case"value":f=$;break;case"defaultValue":x=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:Ke(e,t,l,$,s,null)}}kh(e,f,x,N,B,b,c,!1);return;case"select":Me("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":b=x;break;case"multiple":l=x;default:Ke(e,t,c,x,s,null)}t=f,s=b,e.multiple=!!l,t!=null?qs(e,!!l,t,!1):s!=null&&qs(e,!!l,s,!0);return;case"textarea":Me("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(x=s[b],x!=null))switch(b){case"value":l=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Ke(e,t,b,x,s,null)}Rh(e,l,c,f);return;case"option":for(N in s)if(s.hasOwnProperty(N)&&(l=s[N],l!=null))switch(N){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ke(e,t,N,l,s,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(l=0;l<El.length;l++)Me(El[l],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(B in s)if(s.hasOwnProperty(B)&&(l=s[B],l!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ke(e,t,B,l,s,null)}return;default:if(yc(t)){for($ in s)s.hasOwnProperty($)&&(l=s[$],l!==void 0&&ad(e,t,$,l,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(l=s[x],l!=null&&Ke(e,t,x,l,s,null))}function E_(e,t,s,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,b=null,x=null,N=null,B=null,$=null;for(P in s){var Q=s[P];if(s.hasOwnProperty(P)&&Q!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":N=Q;default:l.hasOwnProperty(P)||Ke(e,t,P,null,l,Q)}}for(var U in l){var P=l[U];if(Q=s[U],l.hasOwnProperty(U)&&(P!=null||Q!=null))switch(U){case"type":f=P;break;case"name":c=P;break;case"checked":B=P;break;case"defaultChecked":$=P;break;case"value":b=P;break;case"defaultValue":x=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==Q&&Ke(e,t,U,P,l,Q)}}mc(e,b,x,N,B,$,f,c);return;case"select":P=b=x=U=null;for(f in s)if(N=s[f],s.hasOwnProperty(f)&&N!=null)switch(f){case"value":break;case"multiple":P=N;default:l.hasOwnProperty(f)||Ke(e,t,f,null,l,N)}for(c in l)if(f=l[c],N=s[c],l.hasOwnProperty(c)&&(f!=null||N!=null))switch(c){case"value":U=f;break;case"defaultValue":x=f;break;case"multiple":b=f;default:f!==N&&Ke(e,t,c,f,l,N)}t=x,s=b,l=P,U!=null?qs(e,!!s,U,!1):!!l!=!!s&&(t!=null?qs(e,!!s,t,!0):qs(e,!!s,s?[]:"",!1));return;case"textarea":P=U=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ke(e,t,x,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":U=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Ke(e,t,b,c,l,f)}Mh(e,U,P);return;case"option":for(var oe in s)if(U=s[oe],s.hasOwnProperty(oe)&&U!=null&&!l.hasOwnProperty(oe))switch(oe){case"selected":e.selected=!1;break;default:Ke(e,t,oe,null,l,U)}for(N in l)if(U=l[N],P=s[N],l.hasOwnProperty(N)&&U!==P&&(U!=null||P!=null))switch(N){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ke(e,t,N,U,l,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in s)U=s[pe],s.hasOwnProperty(pe)&&U!=null&&!l.hasOwnProperty(pe)&&Ke(e,t,pe,null,l,U);for(B in l)if(U=l[B],P=s[B],l.hasOwnProperty(B)&&U!==P&&(U!=null||P!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:Ke(e,t,B,U,l,P)}return;default:if(yc(t)){for(var Ze in s)U=s[Ze],s.hasOwnProperty(Ze)&&U!==void 0&&!l.hasOwnProperty(Ze)&&ad(e,t,Ze,void 0,l,U);for($ in l)U=l[$],P=s[$],!l.hasOwnProperty($)||U===P||U===void 0&&P===void 0||ad(e,t,$,U,l,P);return}}for(var M in s)U=s[M],s.hasOwnProperty(M)&&U!=null&&!l.hasOwnProperty(M)&&Ke(e,t,M,null,l,U);for(Q in l)U=l[Q],P=s[Q],!l.hasOwnProperty(Q)||U===P||U==null&&P==null||Ke(e,t,Q,U,l,P)}function Lg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function C_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),l=0;l<s.length;l++){var c=s[l],f=c.transferSize,b=c.initiatorType,x=c.duration;if(f&&x&&Lg(b)){for(b=0,x=c.responseEnd,l+=1;l<s.length;l++){var N=s[l],B=N.startTime;if(B>x)break;var $=N.transferSize,Q=N.initiatorType;$&&Lg(Q)&&(N=N.responseEnd,b+=$*(N<x?1:(x-B)/(N-B)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var sd=null,id=null;function rr(e){return e.nodeType===9?e:e.ownerDocument}function Ug(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 zg(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 ld(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 od=null;function A_(){var e=window.event;return e&&e.type==="popstate"?e===od?!1:(od=e,!0):(od=null,!1)}var Ig=typeof setTimeout=="function"?setTimeout:void 0,j_=typeof clearTimeout=="function"?clearTimeout:void 0,Vg=typeof Promise=="function"?Promise:void 0,N_=typeof queueMicrotask=="function"?queueMicrotask:typeof Vg<"u"?function(e){return Vg.resolve(null).then(e).catch(w_)}:Ig;function w_(e){setTimeout(function(){throw e})}function Ka(e){return e==="head"}function Hg(e,t){var s=t,l=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"||s==="/&"){if(l===0){e.removeChild(c),Ti(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Al(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Al(s);for(var f=s.firstChild;f;){var b=f.nextSibling,x=f.nodeName;f[Fi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Al(e.ownerDocument.body);s=c}while(s);Ti(t)}function Pg(e,t){var s=e;e=0;do{var l=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),l&&l.nodeType===8)if(s=l.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=l}while(s)}function rd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":rd(s),hc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function D_(e,t,s,l){for(;e.nodeType===1;){var c=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Fi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Dn(e.nextSibling),e===null)break}return null}function k_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Dn(e.nextSibling),e===null))return null;return e}function Gg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dn(e.nextSibling),e===null))return null;return e}function cd(e){return e.data==="$?"||e.data==="$~"}function ud(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function M_(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var l=function(){t(),s.removeEventListener("DOMContentLoaded",l)};s.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Dn(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 dd=null;function Fg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Dn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function qg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function $g(e,t,s){switch(t=rr(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Al(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hc(e)}var kn=new Map,Yg=new Set;function cr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xa=q.d;q.d={f:R_,r:O_,D:B_,C:L_,L:U_,m:z_,X:V_,S:I_,M:H_};function R_(){var e=xa.f(),t=er();return e||t}function O_(e){var t=Ps(e);t!==null&&t.tag===5&&t.type==="form"?um(t):xa.r(e)}var Si=typeof document>"u"?null:document;function Kg(e,t,s){var l=Si;if(l&&typeof t=="string"&&t){var c=Tn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Yg.has(c)||(Yg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ht(t,"link",e),Rt(t),l.head.appendChild(t)))}}function B_(e){xa.D(e),Kg("dns-prefetch",e,null)}function L_(e,t){xa.C(e,t),Kg("preconnect",e,t)}function U_(e,t,s){xa.L(e,t,s);var l=Si;if(l&&e&&t){var c='link[rel="preload"][as="'+Tn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+Tn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+Tn(s.imageSizes)+'"]')):c+='[href="'+Tn(e)+'"]';var f=c;switch(t){case"style":f=_i(e);break;case"script":f=xi(e)}kn.has(f)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),kn.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(jl(f))||t==="script"&&l.querySelector(Nl(f))||(t=l.createElement("link"),Ht(t,"link",e),Rt(t),l.head.appendChild(t)))}}function z_(e,t){xa.m(e,t);var s=Si;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Tn(l)+'"][href="'+Tn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=xi(e)}if(!kn.has(f)&&(e=v({rel:"modulepreload",href:e},t),kn.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Nl(f)))return}l=s.createElement("link"),Ht(l,"link",e),Rt(l),s.head.appendChild(l)}}}function I_(e,t,s){xa.S(e,t,s);var l=Si;if(l&&e){var c=Gs(l).hoistableStyles,f=_i(e);t=t||"default";var b=c.get(f);if(!b){var x={loading:0,preload:null};if(b=l.querySelector(jl(f)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=kn.get(f))&&fd(e,s);var N=b=l.createElement("link");Rt(N),Ht(N,"link",e),N._p=new Promise(function(B,$){N.onload=B,N.onerror=$}),N.addEventListener("load",function(){x.loading|=1}),N.addEventListener("error",function(){x.loading|=2}),x.loading|=4,ur(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:x},c.set(f,b)}}}function V_(e,t){xa.X(e,t);var s=Si;if(s&&e){var l=Gs(s).hoistableScripts,c=xi(e),f=l.get(c);f||(f=s.querySelector(Nl(c)),f||(e=v({src:e,async:!0},t),(t=kn.get(c))&&hd(e,t),f=s.createElement("script"),Rt(f),Ht(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function H_(e,t){xa.M(e,t);var s=Si;if(s&&e){var l=Gs(s).hoistableScripts,c=xi(e),f=l.get(c);f||(f=s.querySelector(Nl(c)),f||(e=v({src:e,async:!0,type:"module"},t),(t=kn.get(c))&&hd(e,t),f=s.createElement("script"),Rt(f),Ht(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Zg(e,t,s,l){var c=(c=ee.current)?cr(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=_i(s.href),s=Gs(c).hoistableStyles,l=s.get(t),l||(l={type:"style",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=_i(s.href);var f=Gs(c).hoistableStyles,b=f.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=c.querySelector(jl(e)))&&!f._p&&(b.instance=f,b.state.loading=5),kn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},kn.set(e,s),f||P_(c,e,s,b.state))),t&&l===null)throw Error(o(528,""));return b}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=xi(s),s=Gs(c).hoistableScripts,l=s.get(t),l||(l={type:"script",instance:null,count:0,state:null},s.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function _i(e){return'href="'+Tn(e)+'"'}function jl(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function P_(e,t,s,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ht(t,"link",s),Rt(t),e.head.appendChild(t))}function xi(e){return'[src="'+Tn(e)+'"]'}function Nl(e){return"script[async]"+e}function Qg(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Tn(s.href)+'"]');if(l)return t.instance=l,Rt(l),l;var c=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Rt(l),Ht(l,"style",c),ur(l,s.precedence,e),t.instance=l;case"stylesheet":c=_i(s.href);var f=e.querySelector(jl(c));if(f)return t.state.loading|=4,t.instance=f,Rt(f),f;l=Xg(s),(c=kn.get(c))&&fd(l,c),f=(e.ownerDocument||e).createElement("link"),Rt(f);var b=f;return b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Ht(f,"link",l),t.state.loading|=4,ur(f,s.precedence,e),t.instance=f;case"script":return f=xi(s.src),(c=e.querySelector(Nl(f)))?(t.instance=c,Rt(c),c):(l=s,(c=kn.get(f))&&(l=v({},s),hd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Rt(c),Ht(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ur(l,s.precedence,e));return t.instance}function ur(e,t,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,f=c,b=0;b<l.length;b++){var x=l[b];if(x.dataset.precedence===t)f=x;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function fd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function hd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var dr=null;function Jg(e,t,s){if(dr===null){var l=new Map,c=dr=new Map;c.set(s,l)}else c=dr,l=c.get(s),l||(l=new Map,c.set(s,l));if(l.has(e))return l;for(l.set(e,null),s=s.getElementsByTagName(e),c=0;c<s.length;c++){var f=s[c];if(!(f[Fi]||f[Ut]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var x=l.get(b);x?x.push(f):l.set(b,[f])}}return l}function Wg(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function G_(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ey(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function F_(e,t,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var c=_i(l.href),f=t.querySelector(jl(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Rt(f);return}f=t.ownerDocument||t,l=Xg(l),(c=kn.get(c))&&fd(l,c),f=f.createElement("link"),Rt(f);var b=f;b._p=new Promise(function(x,N){b.onload=x,b.onerror=N}),Ht(f,"link",l),s.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=fr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var pd=0;function q_(e,t){return e.stylesheets&&e.count===0&&pr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&pr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&pd===0&&(pd=62500*C_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pr(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>pd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function fr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hr=null;function pr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hr=new Map,t.forEach($_,e),hr=null,fr.call(e))}function $_(e,t){if(!(t.state.loading&4)){var s=hr.get(e);if(s)var l=s.get(null);else{s=new Map,hr.set(e,s);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var b=c[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(s.set(b.dataset.precedence,b),l=b)}l&&s.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),f=s.get(b)||l,f===l&&s.set(null,c),s.set(b,c),this.count++,l=fr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var wl={$$typeof:R,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Y_(e,t,s,l,c,f,b,x,N){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=cc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cc(0),this.hiddenUpdates=cc(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function ty(e,t,s,l,c,f,b,x,N,B,$,Q){return e=new Y_(e,t,s,b,N,B,$,Q,x),t=1,f===!0&&(t|=24),f=fn(3,null,null,t),e.current=f,f.stateNode=e,t=Yc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:l,isDehydrated:s,cache:t},Qc(f),e}function ny(e){return e?(e=Ws,e):Ws}function ay(e,t,s,l,c,f){c=ny(c),l.context===null?l.context=c:l.pendingContext=c,l=Ua(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=za(e,l,t),s!==null&&(cn(s,e,t),ol(s,e,t))}function sy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function md(e,t){sy(e,t),(e=e.alternate)&&sy(e,t)}function iy(e){if(e.tag===13||e.tag===31){var t=ms(e,67108864);t!==null&&cn(t,e,67108864),md(e,67108864)}}function ly(e){if(e.tag===13||e.tag===31){var t=yn();t=uc(t);var s=ms(e,t);s!==null&&cn(s,e,t),md(e,t)}}var mr=!0;function K_(e,t,s,l){var c=z.T;z.T=null;var f=q.p;try{q.p=2,gd(e,t,s,l)}finally{q.p=f,z.T=c}}function Z_(e,t,s,l){var c=z.T;z.T=null;var f=q.p;try{q.p=8,gd(e,t,s,l)}finally{q.p=f,z.T=c}}function gd(e,t,s,l){if(mr){var c=yd(l);if(c===null)nd(e,t,l,gr,s),ry(e,l);else if(Q_(c,e,t,s,l))l.stopPropagation();else if(ry(e,l),t&4&&-1<X_.indexOf(e)){for(;c!==null;){var f=Ps(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=je(f.pendingLanes);if(b!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var N=1<<31-gt(b);x.entanglements[1]|=N,b&=~N}$n(f),(Ve&6)===0&&(Jo=de()+500,Tl(0))}}break;case 31:case 13:x=ms(f,2),x!==null&&cn(x,f,2),er(),md(f,2)}if(f=yd(l),f===null&&nd(e,t,l,gr,s),f===c)break;c=f}c!==null&&l.stopPropagation()}else nd(e,t,l,null,s)}}function yd(e){return e=bc(e),vd(e)}var gr=null;function vd(e){if(gr=null,e=Hs(e),e!==null){var t=u(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gr=e,null}function oy(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(be()){case xe:return 2;case Qe:return 8;case De:case Mt:return 32;case wt:return 268435456;default:return 32}default:return 32}}var bd=!1,Za=null,Xa=null,Qa=null,Dl=new Map,kl=new Map,Ja=[],X_="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 ry(e,t){switch(e){case"focusin":case"focusout":Za=null;break;case"dragenter":case"dragleave":Xa=null;break;case"mouseover":case"mouseout":Qa=null;break;case"pointerover":case"pointerout":Dl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Ml(e,t,s,l,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:s,eventSystemFlags:l,nativeEvent:f,targetContainers:[c]},t!==null&&(t=Ps(t),t!==null&&iy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Q_(e,t,s,l,c){switch(t){case"focusin":return Za=Ml(Za,e,t,s,l,c),!0;case"dragenter":return Xa=Ml(Xa,e,t,s,l,c),!0;case"mouseover":return Qa=Ml(Qa,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return Dl.set(f,Ml(Dl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,kl.set(f,Ml(kl.get(f)||null,e,t,s,l,c)),!0}return!1}function cy(e){var t=Hs(e.target);if(t!==null){var s=u(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,Th(e.priority,function(){ly(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,Th(e.priority,function(){ly(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=yd(e.nativeEvent);if(s===null){s=e.nativeEvent;var l=new s.constructor(s.type,s);vc=l,s.target.dispatchEvent(l),vc=null}else return t=Ps(s),t!==null&&iy(t),e.blockedOn=s,!1;t.shift()}return!0}function uy(e,t,s){yr(e)&&s.delete(t)}function J_(){bd=!1,Za!==null&&yr(Za)&&(Za=null),Xa!==null&&yr(Xa)&&(Xa=null),Qa!==null&&yr(Qa)&&(Qa=null),Dl.forEach(uy),kl.forEach(uy)}function vr(e,t){e.blockedOn===t&&(e.blockedOn=null,bd||(bd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,J_)))}var br=null;function dy(e){br!==e&&(br=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){br===e&&(br=null);for(var t=0;t<e.length;t+=3){var s=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(vd(l||s)===null)continue;break}var f=Ps(s);f!==null&&(e.splice(t,3),t-=3,yu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function Ti(e){function t(N){return vr(N,e)}Za!==null&&vr(Za,e),Xa!==null&&vr(Xa,e),Qa!==null&&vr(Qa,e),Dl.forEach(t),kl.forEach(t);for(var s=0;s<Ja.length;s++){var l=Ja[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ja.length&&(s=Ja[0],s.blockedOn===null);)cy(s),s.blockedOn===null&&Ja.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[nn]||null;if(typeof f=="function")b||dy(s);else if(b){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[nn]||null)x=b.formAction;else if(vd(c)!==null)continue}else x=b.action;typeof x=="function"?s[l+1]=x:(s.splice(l,3),l-=3),dy(s)}}}function fy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(s,20)}function s(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Sd(e){this._internalRoot=e}Sr.prototype.render=Sd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=yn();ay(s,l,e,t,null,null)},Sr.prototype.unmount=Sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ay(e.current,2,null,e,null,null),er(),t[Vs]=null}};function Sr(e){this._internalRoot=e}Sr.prototype.unstable_scheduleHydration=function(e){if(e){var t=xh();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Ja.length&&t!==0&&t<Ja[s].priority;s++);Ja.splice(s,0,e),s===0&&cy(e)}};var hy=a.version;if(hy!=="19.2.4")throw Error(o(527,hy,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var W_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _r=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_r.isDisabled&&_r.supportsFiber)try{rt=_r.inject(W_),We=_r}catch{}}return Rl.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=Sm,f=_m,b=xm;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=ty(e,1,!1,null,null,s,l,null,c,f,b,fy),e[Vs]=t.current,td(e),new Sd(t)},Rl.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=Sm,b=_m,x=xm,N=null;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(f=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(x=s.onRecoverableError),s.formState!==void 0&&(N=s.formState)),t=ty(e,1,!0,t,s??null,l,c,N,f,b,x,fy),t.context=ny(null),s=t.current,l=yn(),l=uc(l),c=Ua(l),c.callback=null,za(s,c,l),s=l,t.current.lanes=s,Gi(t,s),$n(t),e[Vs]=t.current,td(e),new Sr(t)},Rl.version="19.2.4",Rl}var Sy;function mx(){if(Sy)return _d.exports;Sy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),_d.exports=px(),_d.exports}var gx=mx();/**
26
+ * react-router v7.13.1
27
+ *
28
+ * Copyright (c) Remix Software Inc.
29
+ *
30
+ * This source code is licensed under the MIT license found in the
31
+ * LICENSE.md file in the root directory of this source tree.
32
+ *
33
+ * @license MIT
34
+ */var _y="popstate";function xy(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function yx(n={}){function a(o,r){var g;let u=(g=r.state)==null?void 0:g.masked,{pathname:d,search:p,hash:m}=u||o.location;return Kd("",{pathname:d,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",u?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:Yl(r)}return bx(a,i,null,n)}function at(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function On(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function vx(){return Math.random().toString(36).substring(2,10)}function Ty(n,a){return{usr:n.state,key:n.key,idx:a,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Kd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Li(a):a,state:i,key:a&&a.key||o||vx(),unstable_mask:r}}function Yl({pathname:n="/",search:a="",hash:i=""}){return a&&a!=="?"&&(n+=a.charAt(0)==="?"?a:"?"+a),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function Li(n){let a={};if(n){let i=n.indexOf("#");i>=0&&(a.hash=n.substring(i),n=n.substring(0,i));let o=n.indexOf("?");o>=0&&(a.search=n.substring(o),n=n.substring(0,o)),n&&(a.pathname=n)}return a}function bx(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:u=!1}=o,d=r.history,p="POP",m=null,g=y();g==null&&(g=0,d.replaceState({...d.state,idx:g},""));function y(){return(d.state||{idx:null}).idx}function v(){p="POP";let j=y(),A=j==null?null:j-g;g=j,m&&m({action:p,location:E.location,delta:A})}function _(j,A){p="PUSH";let k=xy(j)?j:Kd(E.location,j,A);g=y()+1;let R=Ty(k,g),Y=E.createHref(k.unstable_mask||k);try{d.pushState(R,"",Y)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;r.location.assign(Y)}u&&m&&m({action:p,location:E.location,delta:1})}function T(j,A){p="REPLACE";let k=xy(j)?j:Kd(E.location,j,A);g=y();let R=Ty(k,g),Y=E.createHref(k.unstable_mask||k);d.replaceState(R,"",Y),u&&m&&m({action:p,location:E.location,delta:0})}function C(j){return Sx(j)}let E={get action(){return p},get location(){return n(r,d)},listen(j){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(_y,v),m=j,()=>{r.removeEventListener(_y,v),m=null}},createHref(j){return a(r,j)},createURL:C,encodeLocation(j){let A=C(j);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:_,replace:T,go(j){return d.go(j)}};return E}function Sx(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),at(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Yl(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function v0(n,a,i="/"){return _x(n,a,i,!1)}function _x(n,a,i,o){let r=typeof a=="string"?Li(a):a,u=ja(r.pathname||"/",i);if(u==null)return null;let d=b0(n);xx(d);let p=null;for(let m=0;p==null&&m<d.length;++m){let g=_0(u);p=kx(d[m],g,o)}return p}function b0(n,a=[],i=[],o="",r=!1){let u=(d,p,m=r,g)=>{let y={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:p,route:d};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(o)&&m)return;at(y.relativePath.startsWith(o),`Absolute route path "${y.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(o.length)}let v=Xn([o,y.relativePath]),_=i.concat(y);d.children&&d.children.length>0&&(at(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),b0(d.children,a,_,v,m)),!(d.path==null&&!d.index)&&a.push({path:v,score:wx(v,d.index),routesMeta:_})};return n.forEach((d,p)=>{var m;if(d.path===""||!((m=d.path)!=null&&m.includes("?")))u(d,p);else for(let g of S0(d.path))u(d,p,!0,g)}),a}function S0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),u=i.replace(/\?$/,"");if(o.length===0)return r?[u,""]:[u];let d=S0(o.join("/")),p=[];return p.push(...d.map(m=>m===""?u:[u,m].join("/"))),r&&p.push(...d),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function xx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Dx(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var Tx=/^:[\w-]+$/,Ex=3,Cx=2,Ax=1,jx=10,Nx=-2,Ey=n=>n==="*";function wx(n,a){let i=n.split("/"),o=i.length;return i.some(Ey)&&(o+=Nx),a&&(o+=Cx),i.filter(r=>!Ey(r)).reduce((r,u)=>r+(Tx.test(u)?Ex:u===""?Ax:jx),o)}function Dx(n,a){return n.length===a.length&&n.slice(0,-1).every((o,r)=>o===a[r])?n[n.length-1]-a[a.length-1]:0}function kx(n,a,i=!1){let{routesMeta:o}=n,r={},u="/",d=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,y=u==="/"?a:a.slice(u.length)||"/",v=Kl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),_=m.route;if(!v&&g&&i&&!o[o.length-1].route.index&&(v=Kl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!v)return null;Object.assign(r,v.params),d.push({params:r,pathname:Xn([u,v.pathname]),pathnameBase:Lx(Xn([u,v.pathnameBase])),route:_}),v.pathnameBase!=="/"&&(u=Xn([u,v.pathnameBase]))}return d}function Kl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Mx(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let u=r[0],d=u.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:v},_)=>{if(y==="*"){let C=p[_]||"";d=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const T=p[_];return v&&!T?g[y]=void 0:g[y]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:u,pathnameBase:d,pattern:n}}function Mx(n,a=!1,i=!0){On(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,m,g,y)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let v=y.charAt(g+d.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function _0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return On(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function ja(n,a){if(a==="/")return n;if(!n.toLowerCase().startsWith(a.toLowerCase()))return null;let i=a.endsWith("/")?a.length-1:a.length,o=n.charAt(i);return o&&o!=="/"?null:n.slice(i)||"/"}var Rx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ox(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Li(n):n,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=Cy(i.substring(1),"/"):u=Cy(i,a)):u=a,{pathname:u,search:Ux(o),hash:zx(r)}}function Cy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function Ed(n,a,i,o){return`Cannot include a '${n}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Bx(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function jf(n){let a=Bx(n);return a.map((i,o)=>o===a.length-1?i.pathname:i.pathnameBase)}function Xr(n,a,i,o=!1){let r;typeof n=="string"?r=Li(n):(r={...n},at(!r.pathname||!r.pathname.includes("?"),Ed("?","pathname","search",r)),at(!r.pathname||!r.pathname.includes("#"),Ed("#","pathname","hash",r)),at(!r.search||!r.search.includes("#"),Ed("#","search","hash",r)));let u=n===""||r.pathname==="",d=u?"/":r.pathname,p;if(d==null)p=i;else{let v=a.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),v-=1;r.pathname=_.join("/")}p=v>=0?a[v]:"/"}let m=Ox(r,p),g=d&&d!=="/"&&d.endsWith("/"),y=(u||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}var Xn=n=>n.join("/").replace(/\/\/+/g,"/"),Lx=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Ux=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,zx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Ix=class{constructor(n,a,i,o=!1){this.status=n,this.statusText=a||"",this.internal=o,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Vx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Hx(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var x0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function T0(n,a){let i=n;if(typeof i!="string"||!Rx.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(x0)try{let u=new URL(window.location.href),d=i.startsWith("//")?new URL(u.protocol+i):new URL(i),p=ja(d.pathname,a);d.origin===u.origin&&p!=null?i=p+d.search+d.hash:r=!0}catch{On(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var E0=["POST","PUT","PATCH","DELETE"];new Set(E0);var Px=["GET",...E0];new Set(Px);var Ui=S.createContext(null);Ui.displayName="DataRouter";var Qr=S.createContext(null);Qr.displayName="DataRouterState";var Gx=S.createContext(!1),C0=S.createContext({isTransitioning:!1});C0.displayName="ViewTransition";var Fx=S.createContext(new Map);Fx.displayName="Fetchers";var qx=S.createContext(null);qx.displayName="Await";var _n=S.createContext(null);_n.displayName="Navigation";var no=S.createContext(null);no.displayName="Location";var Bn=S.createContext({outlet:null,matches:[],isDataRoute:!1});Bn.displayName="Route";var Nf=S.createContext(null);Nf.displayName="RouteError";var A0="REACT_ROUTER_ERROR",$x="REDIRECT",Yx="ROUTE_ERROR_RESPONSE";function Kx(n){if(n.startsWith(`${A0}:${$x}:{`))try{let a=JSON.parse(n.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function Zx(n){if(n.startsWith(`${A0}:${Yx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new Ix(a.status,a.statusText,a.data)}catch{}}function Xx(n,{relative:a}={}){at(zs(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(_n),{hash:r,pathname:u,search:d}=ao(n,{relative:a}),p=u;return i!=="/"&&(p=u==="/"?i:Xn([i,u])),o.createHref({pathname:p,search:d,hash:r})}function zs(){return S.useContext(no)!=null}function Wt(){return at(zs(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(no).location}function Qt(n){at(zs(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Wt();return S.useMemo(()=>Kl(n,_0(a)),[a,n])}var j0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function N0(n){S.useContext(_n).static||S.useLayoutEffect(n)}function Jr(){let{isDataRoute:n}=S.useContext(Bn);return n?dT():Qx()}function Qx(){at(zs(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Ui),{basename:a,navigator:i}=S.useContext(_n),{matches:o}=S.useContext(Bn),{pathname:r}=Wt(),u=JSON.stringify(jf(o)),d=S.useRef(!1);return N0(()=>{d.current=!0}),S.useCallback((m,g={})=>{if(On(d.current,j0),!d.current)return;if(typeof m=="number"){i.go(m);return}let y=Xr(m,JSON.parse(u),r,g.relative==="path");n==null&&a!=="/"&&(y.pathname=y.pathname==="/"?a:Xn([a,y.pathname])),(g.replace?i.replace:i.push)(y,g.state,g)},[a,i,u,r,n])}var Jx=S.createContext(null);function Wx(n){let a=S.useContext(Bn).outlet;return S.useMemo(()=>a&&S.createElement(Jx.Provider,{value:n},a),[a,n])}function Wr(){let{matches:n}=S.useContext(Bn),a=n[n.length-1];return a?a.params:{}}function ao(n,{relative:a}={}){let{matches:i}=S.useContext(Bn),{pathname:o}=Wt(),r=JSON.stringify(jf(i));return S.useMemo(()=>Xr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function eT(n,a){return w0(n,a)}function w0(n,a,i){var j;at(zs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(_n),{matches:r}=S.useContext(Bn),u=r[r.length-1],d=u?u.params:{},p=u?u.pathname:"/",m=u?u.pathnameBase:"/",g=u&&u.route;{let A=g&&g.path||"";k0(p,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
35
+
36
+ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let y=Wt(),v;if(a){let A=typeof a=="string"?Li(a):a;at(m==="/"||((j=A.pathname)==null?void 0:j.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=y;let _=v.pathname||"/",T=_;if(m!=="/"){let A=m.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=v0(n,{pathname:T});On(g||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),On(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=iT(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},d,A.params),pathname:Xn([m,o.encodeLocation?o.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?m:Xn([m,o.encodeLocation?o.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),r,i);return a&&E?S.createElement(no.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...v},navigationType:"POP"}},E):E}function tT(){let n=uT(),a=Vx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},u={padding:"2px 4px",backgroundColor:o},d=null;return console.error("Error handled by React Router default ErrorBoundary:",n),d=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,d)}var nT=S.createElement(tT,null),D0=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,a){return a.location!==n.location||a.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:a.error,location:a.location,revalidation:n.revalidation||a.revalidation}}componentDidCatch(n,a){this.props.onError?this.props.onError(n,a):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=Zx(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(Bn.Provider,{value:this.props.routeContext},S.createElement(Nf.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(aT,{error:n},a):a}};D0.contextType=Gx;var Cd=new WeakMap;function aT({children:n,error:a}){let{basename:i}=S.useContext(_n);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=Kx(a.digest);if(o){let r=Cd.get(a);if(r)throw r;let u=T0(o.location,i);if(x0&&!Cd.get(a))if(u.isExternal||o.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Cd.set(a,d),d}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function sT({routeContext:n,match:a,children:i}){let o=S.useContext(Ui);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(Bn.Provider,{value:n},i)}function iT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,u=o==null?void 0:o.errors;if(u!=null){let y=r.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);at(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),r=r.slice(0,Math.min(r.length,y+1))}let d=!1,p=-1;if(i&&o){d=o.renderFallback;for(let y=0;y<r.length;y++){let v=r[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(p=y),v.route.id){let{loaderData:_,errors:T}=o,C=v.route.loader&&!_.hasOwnProperty(v.route.id)&&(!T||T[v.route.id]===void 0);if(v.route.lazy||C){i.isStatic&&(d=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(y,v)=>{var _,T;m(y,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:Hx(o.matches),errorInfo:v})}:void 0;return r.reduceRight((y,v,_)=>{let T,C=!1,E=null,j=null;o&&(T=u&&v.route.id?u[v.route.id]:void 0,E=v.route.errorElement||nT,d&&(p<0&&_===0?(k0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,j=null):p===_&&(C=!0,j=v.route.hydrateFallbackElement||null)));let A=a.concat(r.slice(0,_+1)),k=()=>{let R;return T?R=E:C?R=j:v.route.Component?R=S.createElement(v.route.Component,null):v.route.element?R=v.route.element:R=y,S.createElement(sT,{match:v,routeContext:{outlet:y,matches:A,isDataRoute:o!=null},children:R})};return o&&(v.route.ErrorBoundary||v.route.errorElement||_===0)?S.createElement(D0,{location:o.location,revalidation:o.revalidation,component:E,error:T,children:k(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:g}):k()},null)}function wf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lT(n){let a=S.useContext(Ui);return at(a,wf(n)),a}function oT(n){let a=S.useContext(Qr);return at(a,wf(n)),a}function rT(n){let a=S.useContext(Bn);return at(a,wf(n)),a}function Df(n){let a=rT(n),i=a.matches[a.matches.length-1];return at(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function cT(){return Df("useRouteId")}function uT(){var o;let n=S.useContext(Nf),a=oT("useRouteError"),i=Df("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function dT(){let{router:n}=lT("useNavigate"),a=Df("useNavigate"),i=S.useRef(!1);return N0(()=>{i.current=!0}),S.useCallback(async(r,u={})=>{On(i.current,j0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...u}))},[n,a])}var Ay={};function k0(n,a,i){!a&&!Ay[n]&&(Ay[n]=!0,On(!1,i))}S.memo(fT);function fT({routes:n,future:a,state:i,isStatic:o,onError:r}){return w0(n,void 0,{state:i,isStatic:o,onError:r})}function kr({to:n,replace:a,state:i,relative:o}){at(zs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(_n);On(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(Bn),{pathname:d}=Wt(),p=Jr(),m=Xr(n,jf(u),d,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function M0(n){return Wx(n.context)}function _t(n){at(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hT({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:u=!1,unstable_useTransitions:d}){at(!zs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:u,unstable_useTransitions:d,future:{}}),[p,r,u,d]);typeof i=="string"&&(i=Li(i));let{pathname:g="/",search:y="",hash:v="",state:_=null,key:T="default",unstable_mask:C}=i,E=S.useMemo(()=>{let j=ja(g,p);return j==null?null:{location:{pathname:j,search:y,hash:v,state:_,key:T,unstable_mask:C},navigationType:o}},[p,g,y,v,_,T,o,C]);return On(E!=null,`<Router basename="${p}"> is not able to match the URL "${g}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:S.createElement(_n.Provider,{value:m},S.createElement(no.Provider,{children:a,value:E}))}function pT({children:n,location:a}){return eT(Zd(n),a)}function Zd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let u=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Zd(o.props.children,u));return}at(o.type===_t,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),at(!o.props.index||!o.props.children,"An index route cannot have child routes.");let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Zd(o.props.children,u)),i.push(d)}),i}var Mr="get",Rr="application/x-www-form-urlencoded";function ec(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function mT(n){return ec(n)&&n.tagName.toLowerCase()==="button"}function gT(n){return ec(n)&&n.tagName.toLowerCase()==="form"}function yT(n){return ec(n)&&n.tagName.toLowerCase()==="input"}function vT(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function bT(n,a){return n.button===0&&(!a||a==="_self")&&!vT(n)}function Xd(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((a,i)=>{let o=n[i];return a.concat(Array.isArray(o)?o.map(r=>[i,r]):[[i,o]])},[]))}function ST(n,a){let i=Xd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(u=>{i.append(r,u)})}),i}var Tr=null;function _T(){if(Tr===null)try{new FormData(document.createElement("form"),0),Tr=!1}catch{Tr=!0}return Tr}var xT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ad(n){return n!=null&&!xT.has(n)?(On(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rr}"`),null):n}function TT(n,a){let i,o,r,u,d;if(gT(n)){let p=n.getAttribute("action");o=p?ja(p,a):null,i=n.getAttribute("method")||Mr,r=Ad(n.getAttribute("enctype"))||Rr,u=new FormData(n)}else if(mT(n)||yT(n)&&(n.type==="submit"||n.type==="image")){let p=n.form;if(p==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=n.getAttribute("formaction")||p.getAttribute("action");if(o=m?ja(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Mr,r=Ad(n.getAttribute("formenctype"))||Ad(p.getAttribute("enctype"))||Rr,u=new FormData(p,n),!_T()){let{name:g,type:y,value:v}=n;if(y==="image"){let _=g?`${g}.`:"";u.append(`${_}x`,"0"),u.append(`${_}y`,"0")}else g&&u.append(g,v)}}else{if(ec(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Mr,o=null,r=Rr,d=n}return u&&r==="text/plain"&&(d=u,u=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:u,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function kf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function ET(n,a,i,o){let r=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return i?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${o}`:r.pathname=`${r.pathname}.${o}`:r.pathname==="/"?r.pathname=`_root.${o}`:a&&ja(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function CT(n,a){if(n.id in a)return a[n.id];try{let i=await import(n.module);return a[n.id]=i,i}catch(i){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function AT(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function jT(n,a,i){let o=await Promise.all(n.map(async r=>{let u=a.routes[r.route.id];if(u){let d=await CT(u,i);return d.links?d.links():[]}return[]}));return kT(o.flat(1).filter(AT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function jy(n,a,i,o,r,u){let d=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var y;return i[g].pathname!==m.pathname||((y=i[g].route.path)==null?void 0:y.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return u==="assets"?a.filter((m,g)=>d(m,g)||p(m,g)):u==="data"?a.filter((m,g)=>{var v;let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(d(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((v=i[0])==null?void 0:v.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function NT(n,a,{includeHydrateFallback:i}={}){return wT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let u=[r.module];return r.clientActionModule&&(u=u.concat(r.clientActionModule)),r.clientLoaderModule&&(u=u.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(u=u.concat(r.hydrateFallbackModule)),r.imports&&(u=u.concat(r.imports)),u}).flat(1))}function wT(n){return[...new Set(n)]}function DT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function kT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let u=JSON.stringify(DT(r));return i.has(u)||(i.add(u),o.push({key:u,link:r})),o},[])}function R0(){let n=S.useContext(Ui);return kf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function MT(){let n=S.useContext(Qr);return kf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Mf=S.createContext(void 0);Mf.displayName="FrameworkContext";function O0(){let n=S.useContext(Mf);return kf(n,"You must render this element inside a <HydratedRouter> element"),n}function RT(n,a){let i=S.useContext(Mf),[o,r]=S.useState(!1),[u,d]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:y,onTouchStart:v}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&d(!0),n==="viewport"){let E=A=>{A.forEach(k=>{d(k.isIntersecting)})},j=new IntersectionObserver(E,{threshold:.5});return _.current&&j.observe(_.current),()=>{j.disconnect()}}},[n]),S.useEffect(()=>{if(o){let E=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(E)}}},[o]);let T=()=>{r(!0)},C=()=>{r(!1),d(!1)};return i?n!=="intent"?[u,_,{}]:[u,_,{onFocus:Ol(p,T),onBlur:Ol(m,C),onMouseEnter:Ol(g,T),onMouseLeave:Ol(y,C),onTouchStart:Ol(v,T)}]:[!1,_,{}]}function Ol(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function OT({page:n,...a}){let{router:i}=R0(),o=S.useMemo(()=>v0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(LT,{page:n,matches:o,...a}):null}function BT(n){let{manifest:a,routeModules:i}=O0(),[o,r]=S.useState([]);return S.useEffect(()=>{let u=!1;return jT(n,a,i).then(d=>{u||r(d)}),()=>{u=!0}},[n,a,i]),o}function LT({page:n,matches:a,...i}){let o=Wt(),{future:r,manifest:u,routeModules:d}=O0(),{basename:p}=R0(),{loaderData:m,matches:g}=MT(),y=S.useMemo(()=>jy(n,a,g,u,o,"data"),[n,a,g,u,o]),v=S.useMemo(()=>jy(n,a,g,u,o,"assets"),[n,a,g,u,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let E=new Set,j=!1;if(a.forEach(k=>{var Y;let R=u.routes[k.route.id];!R||!R.hasLoader||(!y.some(H=>H.route.id===k.route.id)&&k.route.id in m&&((Y=d[k.route.id])!=null&&Y.shouldRevalidate)||R.hasClientLoader?j=!0:E.add(k.route.id))}),E.size===0)return[];let A=ET(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return j&&E.size>0&&A.searchParams.set("_routes",a.filter(k=>E.has(k.route.id)).map(k=>k.route.id).join(",")),[A.pathname+A.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,u,y,a,n,d]),T=S.useMemo(()=>NT(v,u),[v,u]),C=BT(v);return S.createElement(S.Fragment,null,_.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...i})),T.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...i})),C.map(({key:E,link:j})=>S.createElement("link",{key:E,nonce:i.nonce,...j,crossOrigin:j.crossOrigin??i.crossOrigin})))}function UT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var zT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{zT&&(window.__reactRouterVersion="7.13.1")}catch{}function IT({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=yx({window:o,v5Compat:!0}));let u=r.current,[d,p]=S.useState({action:u.action,location:u.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>u.listen(m),[u,m]),S.createElement(hT,{basename:n,children:a,location:d.location,navigationType:d.action,navigator:u,unstable_useTransitions:i})}var B0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rf=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:u,replace:d,unstable_mask:p,state:m,target:g,to:y,preventScrollReset:v,viewTransition:_,unstable_defaultShouldRevalidate:T,...C},E){let{basename:j,navigator:A,unstable_useTransitions:k}=S.useContext(_n),R=typeof y=="string"&&B0.test(y),Y=T0(y,j);y=Y.to;let H=Xx(y,{relative:r}),V=Wt(),G=null;if(p){let se=Xr(p,[],V.unstable_mask?V.unstable_mask.pathname:"/",!0);j!=="/"&&(se.pathname=se.pathname==="/"?j:Xn([j,se.pathname])),G=A.createHref(se)}let[L,W,ae]=RT(o,C),I=GT(y,{replace:d,unstable_mask:p,state:m,target:g,preventScrollReset:v,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:k});function ie(se){a&&a(se),se.defaultPrevented||I(se)}let K=!(Y.isExternal||u),F=S.createElement("a",{...C,...ae,href:(K?G:void 0)||Y.absoluteURL||H,onClick:K?ie:a,ref:UT(E,W),target:g,"data-discover":!R&&i==="render"?"true":void 0});return L&&!R?S.createElement(S.Fragment,null,F,S.createElement(OT,{page:H})):F});Rf.displayName="Link";var VT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:u,to:d,viewTransition:p,children:m,...g},y){let v=ao(d,{relative:g.relative}),_=Wt(),T=S.useContext(Qr),{navigator:C,basename:E}=S.useContext(_n),j=T!=null&&KT(v)&&p===!0,A=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,k=_.pathname,R=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(k=k.toLowerCase(),R=R?R.toLowerCase():null,A=A.toLowerCase()),R&&E&&(R=ja(R,E)||R);const Y=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let H=k===A||!r&&k.startsWith(A)&&k.charAt(Y)==="/",V=R!=null&&(R===A||!r&&R.startsWith(A)&&R.charAt(A.length)==="/"),G={isActive:H,isPending:V,isTransitioning:j},L=H?a:void 0,W;typeof o=="function"?W=o(G):W=[o,H?"active":null,V?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let ae=typeof u=="function"?u(G):u;return S.createElement(Rf,{...g,"aria-current":L,className:W,ref:y,style:ae,to:d,viewTransition:p},typeof m=="function"?m(G):m)});VT.displayName="NavLink";var HT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:u,method:d=Mr,action:p,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:_,...T},C)=>{let{unstable_useTransitions:E}=S.useContext(_n),j=$T(),A=YT(p,{relative:g}),k=d.toLowerCase()==="get"?"get":"post",R=typeof p=="string"&&B0.test(p),Y=H=>{if(m&&m(H),H.defaultPrevented)return;H.preventDefault();let V=H.nativeEvent.submitter,G=(V==null?void 0:V.getAttribute("formmethod"))||d,L=()=>j(V||H.currentTarget,{fetcherKey:a,method:G,navigate:i,replace:r,state:u,relative:g,preventScrollReset:y,viewTransition:v,unstable_defaultShouldRevalidate:_});E&&i!==!1?S.startTransition(()=>L()):L()};return S.createElement("form",{ref:C,method:k,action:A,onSubmit:o?m:Y,...T,"data-discover":!R&&n==="render"?"true":void 0})});HT.displayName="Form";function PT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L0(n){let a=S.useContext(Ui);return at(a,PT(n)),a}function GT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let y=Jr(),v=Wt(),_=ao(n,{relative:d});return S.useCallback(T=>{if(bT(T,a)){T.preventDefault();let C=i!==void 0?i:Yl(v)===Yl(_),E=()=>y(n,{replace:C,unstable_mask:o,state:r,preventScrollReset:u,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>E()):E()}},[v,y,_,i,o,r,a,n,u,d,p,m,g])}function Of(n){On(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Xd(n)),i=S.useRef(!1),o=Wt(),r=S.useMemo(()=>ST(o.search,i.current?null:a.current),[o.search]),u=Jr(),d=S.useCallback((p,m)=>{const g=Xd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,u("?"+g,m)},[u,r]);return[r,d]}var FT=0,qT=()=>`__${String(++FT)}__`;function $T(){let{router:n}=L0("useSubmit"),{basename:a}=S.useContext(_n),i=cT(),o=n.fetch,r=n.navigate;return S.useCallback(async(u,d={})=>{let{action:p,method:m,encType:g,formData:y,body:v}=TT(u,a);if(d.navigate===!1){let _=d.fetcherKey||qT();await o(_,i,d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||m,formEncType:d.encType||g,flushSync:d.flushSync})}else await r(d.action||p,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:y,body:v,formMethod:d.method||m,formEncType:d.encType||g,replace:d.replace,state:d.state,fromRouteId:i,flushSync:d.flushSync,viewTransition:d.viewTransition})},[o,r,a,i])}function YT(n,{relative:a}={}){let{basename:i}=S.useContext(_n),o=S.useContext(Bn);at(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),u={...ao(n||".",{relative:a})},d=Wt();if(n==null){u.search=d.search;let p=new URLSearchParams(u.search),m=p.getAll("index");if(m.some(y=>y==="")){p.delete("index"),m.filter(v=>v).forEach(v=>p.append("index",v));let y=p.toString();u.search=y?`?${y}`:""}}return(!n||n===".")&&r.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Xn([i,u.pathname])),Yl(u)}function KT(n,{relative:a}={}){let i=S.useContext(C0);at(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=L0("useViewTransitionState"),r=ao(n,{relative:a});if(!i.isTransitioning)return!1;let u=ja(i.currentLocation.pathname,o)||i.currentLocation.pathname,d=ja(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Kl(r.pathname,d)!=null||Kl(r.pathname,u)!=null}function Pn(){const n=Jr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function U0(n){return`/sessions/${encodeURIComponent(n)}`}function Zl(n){return`/projects/${encodeURIComponent(n)}`}function ss(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function ZT(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Ls(n,a){const i=new URLSearchParams({project:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function z0(n,a){return`/sessions/new?${new URLSearchParams({env:n,runtime:a}).toString()}`}const Ny="/environments/new",Mi="/settings",XT="/pair";function Kt(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Xl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function QT(n){return Kt(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.defaultRuntime=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function wy(n){return Kt(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function Dy(n){return Kt(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function JT(n){return Kt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function WT(n){return Kt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function eE(n){return Kt(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.taskId=="string"&&typeof n.sessionId=="string"&&typeof n.category=="string"&&typeof n.title=="string"&&typeof n.content=="string"&&Array.isArray(n.tags)&&typeof n.createdAt=="string"}function tE(n){return Kt(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const nE=new Set(["off","subscription","api_key"]),jd=new Set(["off","on"]);function aE(n){return Kt(n)&&nE.has(n.claude)&&jd.has(n.github)&&jd.has(n.copilot)&&jd.has(n.codex)}function sE(n){return Kt(n)&&typeof n.environmentId=="string"&&typeof n.stage=="string"&&typeof n.message=="string"&&typeof n.progress=="number"}function iE(n){return Kt(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function lE(n){return Kt(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Qn(n,a,i,o){return Array.isArray(n)?n.filter((r,u)=>a(r)?!0:(Xl(i,`item at index ${u} in "${o}" has unexpected shape`),!1)):(Xl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function oE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Kt(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}return{type:a.type,payload:Kt(a.payload)?a.payload:void 0}}function rE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const cE=3e3,Ei=5e3,uE=4001;function dE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,u]=S.useState(!1),d=S.useRef(a.onMessage);d.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(y=>{var v;((v=o.current)==null?void 0:v.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(y))},[]);return S.useEffect(()=>{let y,v;function _(){y=new WebSocket(i),o.current=y,y.onopen=()=>{u(!0),p.current(g)},y.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const C=oE(T.data);C&&d.current(C)},y.onclose=T=>{var C;if(u(!1),o.current=void 0,(C=m.current)==null||C.call(m),clearTimeout(v),T.code===uE){window.location.href=XT;return}v=setTimeout(_,cE)},y.onerror=()=>{y.close()}}return _(),()=>{clearTimeout(v),y==null||y.close()}},[i,g]),{connected:r,send:g}}const fE=5e3;function hE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),u=S.useCallback(y=>{var v,_;switch(y.type){case"environments":return i(Qn((v=y.payload)==null?void 0:v.environments,QT,"environments","environments")),!0;case"provision_progress":{if(!sE(y.payload))return Xl("provision_progress","payload is not a valid ProvisionStatus with environmentId"),!0;const T=y.payload;return r(C=>({...C,[T.environmentId]:{stage:T.stage,message:T.message,progress:T.progress}})),T.stage==="ready"&&setTimeout(()=>{r(C=>{const E={...C};return delete E[T.environmentId],E})},fE),!0}case"environment_added":return!0;case"environment_removed":if(typeof((_=y.payload)==null?void 0:_.environmentId)=="string"){const T=y.payload.environmentId;i(C=>C.filter(E=>E.id!==T)),r(C=>{const E={...C};return delete E[T],E})}return n({type:"list_sessions"}),!0;default:return!1}},[n]),d=S.useCallback((y,v,_,T)=>{const C={displayName:y,adapterType:v,adapterConfig:_||{}};T&&(C.defaultRuntime=T),n({type:"add_environment",payload:C})},[n]),p=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),m=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:d,provisionEnvironment:p,stopEnvironment:m,removeEnvironment:g,handleMessage:u}}const Nd=new Set(["pending","running","idle"]),pE=new Set(["completed","failed","interrupted"]),ky=["pending","running","idle"];function mE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[u,d]=S.useState(0),[p,m]=S.useState(void 0),[g,y]=S.useState({}),v=S.useCallback(k=>{var R,Y,H,V,G;switch(k.type){case"sessions":return i(L=>{var I;const W=Qn((I=k.payload)==null?void 0:I.sessions,wy,"sessions","sessions"),ae=new Map(L.map(ie=>[ie.id,ie.status]));return W.map(ie=>{const K=ae.get(ie.id);return!K||K===ie.status?ie:pE.has(K)&&Nd.has(ie.status)?{...ie,status:K}:Nd.has(K)&&Nd.has(ie.status)&&ky.indexOf(K)>ky.indexOf(ie.status)?{...ie,status:K}:ie})}),!0;case"session_event":{if(!Dy(k.payload))return Xl("session_event","payload is not a valid SessionEvent"),!0;const L=k.payload;let W=0;if(r(ae=>{const I=[...ae,L];return I.length>Ei?(W=I.length-Ei,I.slice(-Ei)):I}),W>0&&d(ae=>ae+W),L.eventType==="status"){const ae=rE(L.content);i(I=>I.some(K=>K.id===L.sessionId)?I.map(K=>K.id===L.sessionId?{...K,status:ae}:K):[...I,{id:L.sessionId,environmentId:"",runtime:"",status:ae,prompt:"",startedAt:L.timestamp}])}return!0}case"session_events":{const L=Qn((R=k.payload)==null?void 0:R.events,Dy,"session_events","events"),W=(Y=k.payload)==null?void 0:Y.sessionId;if(typeof W!="string")return Xl("session_events","missing or non-string sessionId"),!0;if(L.length>0){let ae=0;r(I=>{const ie=new Set;for(const se of I)se.sessionId===W&&ie.add(`${se.timestamp}|${se.eventType}`);const K=L.filter(se=>!ie.has(`${se.timestamp}|${se.eventType}`)),F=[...I,...K].sort((se,z)=>se.sessionId!==z.sessionId?0:se.timestamp.localeCompare(z.timestamp));return F.length>Ei?(ae=F.length-Ei,F.slice(-Ei)):F}),ae>0&&d(I=>I+ae)}return!0}case"spawned":{const L=(H=k.payload)==null?void 0:H.sessionId;return typeof L=="string"&&L&&m(L),n({type:"list_sessions"}),!0}case"task_sessions":{const L=(V=k.payload)==null?void 0:V.taskId;if(typeof L!="string"||!L)return!0;const W=Qn((G=k.payload)==null?void 0:G.sessions,wy,"task_sessions","sessions");return y(ae=>({...ae,[L]:W})),!0}default:return!1}},[n]),_=S.useCallback((k,R,Y,H,V,G)=>{n({type:"spawn",payload:{environmentId:k,prompt:R,model:Y||"",runtime:H||"",personaId:V||"",worktreeBasePath:G||""}})},[n]),T=S.useCallback((k,R)=>{n({type:"send_input",payload:{sessionId:k,text:R}})},[n]),C=S.useCallback(k=>{n({type:"kill",payload:{sessionId:k}})},[n]),E=S.useCallback(k=>{n({type:"get_session_events",payload:{sessionId:k}})},[n]),j=S.useCallback(()=>{r([]),d(0)},[]),A=S.useCallback(k=>{n({type:"get_task_sessions",payload:{taskId:k}})},[n]);return{sessions:a,events:o,eventsDropped:u,lastSpawnedId:p,taskSessions:g,spawn:_,sendInput:T,kill:C,loadSessionEvents:E,clearEvents:j,loadTaskSessions:A,handleMessage:v}}function gE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),u=S.useCallback(y=>{var v;switch(y.type){case"projects":return i(Qn((v=y.payload)==null?void 0:v.projects,JT,"projects","projects")),!0;case"project_created":return r(!1),n({type:"list_projects"}),!0;case"project_archived":return n({type:"list_projects"}),!0;case"project_updated":return n({type:"list_projects"}),!0;default:return!1}},[n]),d=S.useCallback(()=>{r(!1)},[]),p=S.useCallback((y,v,_,T)=>{r(!0),n({type:"create_project",payload:{name:y,description:v||"",repoUrl:_||"",defaultEnvironmentId:T||""}})},[n]),m=S.useCallback(y=>{n({type:"archive_project",payload:{projectId:y}})},[n]),g=S.useCallback((y,v)=>{n({type:"update_project",payload:{projectId:y,...v}})},[n]);return{projects:a,projectCreating:o,createProject:p,archiveProject:m,updateProject:g,handleMessage:u,onDisconnect:d}}const yE=15e3;function vE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),u=S.useRef(new Map),d=S.useCallback(E=>{var j,A,k,R,Y,H;switch(E.type){case"tasks":{const V=Qn((j=E.payload)==null?void 0:j.tasks,WT,"tasks","tasks"),G=(typeof((A=E.payload)==null?void 0:A.projectId)=="string"?E.payload.projectId:"")||(V.length>0?V[0].projectId:"");return G?(i(L=>[...L.filter(W=>W.projectId!==G),...V]),!0):(i(V),!0)}case"task_created":{const V=typeof((k=E.payload)==null?void 0:k.requestId)=="string"?E.payload.requestId:"";if(V){const L=u.current.get(V);L&&(clearTimeout(L.timer),u.current.delete(V),L.onSuccess())}const G=(R=E.payload)==null?void 0:R.task;if(Kt(G)){const L=typeof G.project_id=="string"?G.project_id:typeof G.projectId=="string"?G.projectId:"";L&&n({type:"list_tasks",payload:{projectId:L}})}return!0}case"create_task_error":{const V=typeof((Y=E.payload)==null?void 0:Y.requestId)=="string"?E.payload.requestId:"",G=typeof((H=E.payload)==null?void 0:H.message)=="string"?E.payload.message:"Failed to create task";if(V){const L=u.current.get(V);L?(clearTimeout(L.timer),u.current.delete(V),L.onError(G)):console.error("[useTasks] create_task_error with unknown requestId:",G)}else console.error("[useTasks] create_task_error:",G);return!0}case"task_started":{const V=E.payload;if(!Kt(V))return!0;r(L=>V.taskId&&L===V.taskId?void 0:L),V.sessionId&&(n({type:"list_sessions"}),typeof V.taskId=="string"&&typeof V.sessionId=="string"&&i(L=>L.map(W=>W.id===V.taskId?{...W,latestSessionId:V.sessionId}:W)));const G=typeof V.projectId=="string"?V.projectId:void 0;return G?n({type:"list_tasks",payload:{projectId:G}}):V.taskId&&i(L=>{const W=L.find(ae=>ae.id===V.taskId);return W&&n({type:"list_tasks",payload:{projectId:W.projectId}}),L}),!0}case"task_completed":case"task_deleted":case"task_updated":{const V=E.payload;if(!Kt(V))return!0;const G=typeof V.projectId=="string"?V.projectId:void 0;return G?n({type:"list_tasks",payload:{projectId:G}}):V.taskId&&i(L=>{const W=L.find(ae=>ae.id===V.taskId);return W&&n({type:"list_tasks",payload:{projectId:W.projectId}}),L}),!0}default:return!1}},[n]),p=S.useCallback(()=>{r(void 0);for(const[,E]of u.current)clearTimeout(E.timer),E.onError("Disconnected");u.current.clear()},[]),m=S.useCallback(E=>{n({type:"list_tasks",payload:{projectId:E}})},[n]),g=S.useCallback((E,j,A,k,R,Y,H)=>{const V={projectId:E,title:j,description:A||"",dependsOn:k||[],parentTaskId:R||""};if(Y||H){const G=crypto.randomUUID();V.requestId=G;const L=H??(()=>{}),W=setTimeout(()=>{u.current.delete(G)&&L("Request timed out")},yE);u.current.set(G,{onSuccess:Y??(()=>{}),onError:L,timer:W})}n({type:"create_task",payload:V})},[n]),y=S.useCallback((E,j,A,k,R,Y)=>{r(E),n({type:"start_task",payload:{taskId:E,runtime:j||"",model:A||"",personaId:k||"",environmentId:R||"",notes:Y||""}})},[n]),v=S.useCallback(E=>{n({type:"complete_task",payload:{taskId:E}})},[n]),_=S.useCallback(E=>{n({type:"resume_task",payload:{taskId:E}})},[n]),T=S.useCallback((E,j,A,k)=>{n({type:"update_task",payload:{taskId:E,title:j,description:A,dependsOn:k}})},[n]),C=S.useCallback(E=>{n({type:"delete_task",payload:{taskId:E}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:m,createTask:g,startTask:y,completeTask:v,resumeTask:_,updateTask:T,deleteTask:C,handleMessage:d,onDisconnect:p}}function bE(n){const[a,i]=S.useState([]),o=S.useCallback(d=>{var p,m;switch(d.type){case"findings":return i(Qn((p=d.payload)==null?void 0:p.findings,eE,"findings","findings")),!0;case"finding_posted":return typeof((m=d.payload)==null?void 0:m.projectId)=="string"&&n({type:"list_findings",payload:{projectId:d.payload.projectId}}),!0;default:return!1}},[n]),r=S.useCallback(d=>{n({type:"list_findings",payload:{projectId:d}})},[n]),u=S.useCallback((d,p,m,g,y)=>{n({type:"post_finding",payload:{projectId:d,title:p,content:m,category:g||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:r,postFinding:u,handleMessage:o}}function SE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{var m;switch(p.type){case"tokens":return i(Qn((m=p.payload)==null?void 0:m.tokens,tE,"tokens","tokens")),!0;case"token_changed":return n({type:"list_tokens"}),!0;default:return!1}},[n]),r=S.useCallback(()=>{n({type:"list_tokens"})},[n]),u=S.useCallback((p,m,g,y,v)=>{n({type:"set_token",payload:{name:p,value:m,tokenType:g,envVar:y,filePath:v}})},[n]),d=S.useCallback(p=>{n({type:"delete_token",payload:{name:p}})},[n]);return{tokens:a,loadTokens:r,setToken:u,deleteToken:d,handleMessage:o}}function _E(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(u=>{switch(u.type){case"credential_providers":return aE(u.payload)&&i(u.payload),!0;default:return!1}},[]),r=S.useCallback(u=>{n({type:"set_credential_providers",payload:u})},[n]);return{credentialProviders:a,updateCredentialProviders:r,handleMessage:o}}function xE(n,a){const[i,o]=S.useState([]),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState(!1),y=S.useCallback(T=>{var C,E,j;switch(T.type){case"codespaces_list":{const A=Qn((C=T.payload)==null?void 0:C.codespaces,iE,"codespaces_list","codespaces"),k=typeof((E=T.payload)==null?void 0:E.error)=="string"?T.payload.error:"";return o(A),p(k),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const A=typeof((j=T.payload)==null?void 0:j.message)=="string"?T.payload.message:"Failed to create codespace";return u(A),!0}default:return!1}},[n]),v=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),_=S.useCallback((T,C)=>{if(!a){u("Not connected to server. Please try again once the connection is restored.");return}g(!0),u("");const E={repo:T};C&&(E.machine=C),n({type:"create_codespace",payload:E})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:d,codespaceCreating:m,listCodespaces:v,createCodespace:_,handleMessage:y}}function TE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{var m;switch(p.type){case"personas":{const g=Qn((m=p.payload)==null?void 0:m.personas,lE,"personas","personas");return i(g),!0}case"persona_created":case"persona_updated":case"persona_deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback((p,m,g,y,v,_)=>{n({type:"create_persona",payload:{name:p,description:m,systemPrompt:g,runtime:y||"",model:v||"",maxTurns:_||0}})},[n]),u=S.useCallback((p,m,g,y,v,_,T)=>{n({type:"update_persona",payload:{personaId:p,name:m||"",description:g||"",systemPrompt:y||"",runtime:v||"",model:_||"",maxTurns:T||0}})},[n]),d=S.useCallback(p=>{n({type:"delete_persona",payload:{personaId:p}})},[n]);return{personas:a,createPersona:r,updatePersona:u,deletePersona:d,handleMessage:o}}function EE(n){const{connected:a,send:i}=dE(n,{onMessage:_,onConnect:T,onDisconnect:C}),o=hE(i),r=mE(i),u=gE(i),d=vE(i),p=bE(i),m=SE(i),g=_E(i),y=xE(i,a),v=TE(i);function _(j){var A;if(!o.handleMessage(j)&&!r.handleMessage(j)&&!u.handleMessage(j)&&!d.handleMessage(j)&&!p.handleMessage(j)&&!m.handleMessage(j)&&!g.handleMessage(j)&&!y.handleMessage(j)&&!v.handleMessage(j)&&j.type==="error"){console.error("[ws]",(A=j.payload)==null?void 0:A.message);return}}function T(j){j({type:"list_environments"}),j({type:"list_sessions"}),j({type:"list_projects"}),j({type:"list_tokens"}),j({type:"get_credential_providers"}),j({type:"list_personas"}),j({type:"subscribe_all"})}function C(){u.onDisconnect(),d.onDisconnect()}const E=S.useCallback(()=>{i({type:"list_environments"}),i({type:"list_sessions"}),i({type:"list_projects"}),i({type:"list_tokens"})},[i]);return{connected:a,environments:o.environments,sessions:r.sessions,events:r.events,eventsDropped:r.eventsDropped,lastSpawnedId:r.lastSpawnedId,projects:u.projects,tasks:d.tasks,findings:p.findings,tokens:m.tokens,spawn:r.spawn,sendInput:r.sendInput,kill:r.kill,refresh:E,loadSessionEvents:r.loadSessionEvents,clearEvents:r.clearEvents,createProject:u.createProject,archiveProject:u.archiveProject,updateProject:u.updateProject,loadTasks:d.loadTasks,createTask:d.createTask,startTask:d.startTask,completeTask:d.completeTask,resumeTask:d.resumeTask,updateTask:d.updateTask,deleteTask:d.deleteTask,loadFindings:p.loadFindings,postFinding:p.postFinding,addEnvironment:o.addEnvironment,loadTokens:m.loadTokens,setToken:m.setToken,deleteToken:m.deleteToken,credentialProviders:g.credentialProviders,updateCredentialProviders:g.updateCredentialProviders,provisionStatus:o.provisionStatus,provisionEnvironment:o.provisionEnvironment,stopEnvironment:o.stopEnvironment,removeEnvironment:o.removeEnvironment,codespaces:y.codespaces,codespaceError:y.codespaceError,codespaceListError:y.codespaceListError,codespaceCreating:y.codespaceCreating,listCodespaces:y.listCodespaces,createCodespace:y.createCodespace,projectCreating:u.projectCreating,taskStartingId:d.taskStartingId,personas:v.personas,createPersona:v.createPersona,updatePersona:v.updatePersona,deletePersona:v.deletePersona,taskSessions:r.taskSessions,loadTaskSessions:r.loadTaskSessions}}const Bf=S.createContext(void 0);function CE({children:n}){const a=EE();return h.jsx(Bf.Provider,{value:a,children:n})}function Gt(){const n=S.useContext(Bf);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const AE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",defaultRuntime:"claude-code",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",defaultRuntime:"claude-code",status:"disconnected",bootstrapped:!1}],jE=[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z",endedAt:"2026-02-26T15:12:00Z",error:"Context window exceeded before completing implementation"},{id:"sess-001",environmentId:"env-local-01",runtime:"node",status:"running",prompt:"Refactor the authentication middleware to use JWT tokens",startedAt:"2026-02-27T08:15:00Z"},{id:"sess-002",environmentId:"env-docker-01",runtime:"python",status:"completed",prompt:"Write unit tests for the user registration endpoint",startedAt:"2026-02-27T07:30:00Z"},{id:"sess-003",environmentId:"env-local-01",runtime:"node",status:"failed",prompt:"Migrate database schema to add audit_log table",startedAt:"2026-02-26T22:45:00Z"},{id:"sess-004",environmentId:"env-docker-01",runtime:"python",status:"running",prompt:"Implement rate limiting for the public API",startedAt:"2026-02-27T09:00:00Z"}],NE=[{sessionId:"sess-001-prev",eventType:"status",timestamp:"2026-02-26T14:00:01Z",content:"running"},{sessionId:"sess-001-prev",eventType:"output",timestamp:"2026-02-26T14:00:05Z",content:"Reading src/middleware/auth.ts to understand the current authentication flow..."},{sessionId:"sess-001-prev",eventType:"error",timestamp:"2026-02-26T15:12:00Z",content:"Context window exceeded before completing implementation"},{sessionId:"sess-001",eventType:"status",timestamp:"2026-02-27T08:15:01Z",content:"running"},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:02Z",content:"Analyzing current authentication middleware in src/middleware/auth.ts..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:04Z",content:`Found 3 files using session-based auth:
37
+ - src/middleware/auth.ts
38
+ - src/routes/login.ts
39
+ - src/routes/protected.ts`},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:07Z",content:"Installing jsonwebtoken and @types/jsonwebtoken..."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:12Z",content:`Rewriting auth middleware:
40
+ \`\`\`typescript
41
+ import jwt from "jsonwebtoken";
42
+ import type { Request, Response, NextFunction } from "express";
43
+
44
+ const JWT_SECRET = process.env.JWT_SECRET || "change-me";
45
+
46
+ export function verifyToken(req: Request, res: Response, next: NextFunction): void {
47
+ const header = req.headers.authorization;
48
+ if (!header?.startsWith("Bearer ")) {
49
+ res.status(401).json({ error: "Missing token" });
50
+ return;
51
+ }
52
+ try {
53
+ const decoded = jwt.verify(header.slice(7), JWT_SECRET);
54
+ req.user = decoded;
55
+ next();
56
+ } catch {
57
+ res.status(403).json({ error: "Invalid token" });
58
+ }
59
+ }
60
+ \`\`\``},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:18Z",content:"Updated login route to issue JWT tokens with 24h expiry."},{sessionId:"sess-001",eventType:"output",timestamp:"2026-02-27T08:15:22Z",content:"Running test suite... 14 tests passed, 2 updated, 0 failed."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:30:01Z",content:"running"},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:30:05Z",content:"Generating pytest tests for POST /api/register endpoint..."},{sessionId:"sess-002",eventType:"output",timestamp:"2026-02-27T07:32:00Z",content:"Created 8 test cases covering: valid registration, duplicate email, weak password, missing fields, SQL injection, XSS payload, rate limit, and CORS headers."},{sessionId:"sess-002",eventType:"status",timestamp:"2026-02-27T07:33:00Z",content:"completed"}],wE=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],DE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1}],My=[{id:"find-001",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"architecture",title:"Auth middleware is tightly coupled to Express",content:"The current auth middleware directly references Express Request/Response types. Consider extracting a framework-agnostic token verification layer so we can reuse it in the WebSocket auth path.",tags:["auth","decoupling","middleware"],createdAt:"2026-02-27T08:16:00Z"},{id:"find-002",projectId:"proj-alpha",taskId:"task-003",sessionId:"sess-002",category:"api",title:"Missing pagination on GET /api/users",content:"The users endpoint returns all rows without limit/offset. For datasets over 10k rows this will cause timeouts. Recommend cursor-based pagination with a default page size of 50.",tags:["api","pagination","performance"],createdAt:"2026-02-27T07:31:00Z"},{id:"find-003",projectId:"proj-alpha",taskId:"task-005",sessionId:"sess-003",category:"bug",title:"Race condition in session cleanup",content:"When two requests hit /api/logout concurrently, the second call throws a 500 because the session row has already been deleted. Needs an idempotent DELETE or a conditional check.",tags:["bug","concurrency","sessions"],createdAt:"2026-02-26T22:50:00Z"},{id:"find-004",projectId:"proj-alpha",taskId:"task-004",sessionId:"",category:"decision",title:"Chose pg-pool over knex connection pool",content:"pg-pool gives us direct control over idle timeout, max connections, and health check queries. Knex wraps pg-pool anyway and adds overhead we don't need since we write raw SQL.",tags:["database","decision","postgres"],createdAt:"2026-02-23T11:30:00Z"},{id:"find-005",projectId:"proj-alpha",taskId:"",sessionId:"",category:"dependency",title:"jsonwebtoken has 3 high-severity CVEs",content:"The jsonwebtoken package (v8.x) has known vulnerabilities. Consider migrating to jose which is maintained, supports ESM, and covers the same JWS/JWE surface area with zero dependencies.",tags:["security","dependency","jwt"],createdAt:"2026-02-27T08:20:00Z"},{id:"find-006",projectId:"proj-alpha",taskId:"task-001",sessionId:"sess-001",category:"pattern",title:"Consistent error response shape",content:"All error responses should follow the shape `{ error: string, code: string, details?: unknown }`. Currently some routes return `{ message: string }` and others return `{ error: string }`.",tags:["api","consistency","error-handling"],createdAt:"2026-02-27T08:17:00Z"},{id:"find-007",projectId:"proj-beta",taskId:"task-007",sessionId:"sess-004",category:"architecture",title:"Watermark storage should be pluggable",content:"The incremental load watermarks are currently stored in a local SQLite file. For production multi-worker scenarios, this needs to be backed by a shared store (Redis or Postgres).",tags:["architecture","pipeline","scalability"],createdAt:"2026-02-27T09:05:00Z"}],kE=[{name:"anthropic",tokenType:"env_var",envVar:"ANTHROPIC_API_KEY",filePath:"",expiresAt:""},{name:"github",tokenType:"env_var",envVar:"GITHUB_TOKEN",filePath:"",expiresAt:"2026-12-31T23:59:59Z"},{name:"gcp-service-account",tokenType:"file",envVar:"",filePath:"/home/user/.config/gcloud/credentials.json",expiresAt:""}],ME=[{id:"persona-arch",name:"Software Architect",description:"Designs system architecture, defines interfaces, and decomposes large features into implementable tasks.",systemPrompt:"You are a senior software architect. Focus on clean interfaces, separation of concerns, and scalable patterns. When decomposing work, create concrete subtasks with clear acceptance criteria.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:50,mcpServers:"[]",createdAt:"2026-02-20T10:00:00Z",updatedAt:"2026-02-20T10:00:00Z"},{id:"persona-fe",name:"Frontend Engineer",description:"React specialist — builds UI components, writes CSS, implements routing, and creates Playwright tests.",systemPrompt:"You are a frontend engineer specializing in React, TypeScript, and modern CSS. Follow component composition patterns, use semantic HTML, and write accessible markup.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:100,mcpServers:"[]",createdAt:"2026-02-20T10:05:00Z",updatedAt:"2026-02-20T10:05:00Z"},{id:"persona-reviewer",name:"Code Reviewer",description:"Reviews diffs for correctness, security, and style. Posts findings for issues discovered.",systemPrompt:"You are a meticulous code reviewer. Check for security vulnerabilities, performance issues, and style consistency. Post findings for anything noteworthy.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:30,mcpServers:"[]",createdAt:"2026-02-20T10:10:00Z",updatedAt:"2026-02-20T10:10:00Z"},{id:"persona-tester",name:"QA Engineer",description:"Writes comprehensive test suites — unit tests, integration tests, and E2E Playwright specs.",systemPrompt:"You are a QA engineer focused on test coverage. Write tests that cover happy paths, edge cases, error scenarios, and accessibility. Use Playwright for E2E tests.",toolConfig:JSON.stringify({allowedTools:["Read","Grep","Glob","Write","Edit","Bash"]}),runtime:"claude-code",model:"claude-sonnet-4-5-20250929",maxTurns:80,mcpServers:"[]",createdAt:"2026-02-20T10:15:00Z",updatedAt:"2026-02-20T10:15:00Z"}],RE={"task-001b":[{id:"sess-001-prev",environmentId:"env-local-01",runtime:"claude-code",status:"failed",prompt:"Implement auth middleware",startedAt:"2026-02-26T14:00:00Z"},{id:"sess-001",environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:"Implement auth middleware",startedAt:"2026-02-27T08:15:00Z"}],"task-006c":[{id:"sess-004",environmentId:"env-docker-01",runtime:"claude-code",status:"running",prompt:"Add compression options",startedAt:"2026-02-27T09:00:00Z"}]};function kt(n){return new Date(Date.now()+n).toISOString()}const Ry=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:kt(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:kt(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:kt(1600),content:`Found 5 endpoints that need refactoring:
61
+ - GET /api/users
62
+ - POST /api/users
63
+ - GET /api/users/:id
64
+ - PUT /api/users/:id
65
+ - DELETE /api/users/:id`}},{delayMs:2800,event:{eventType:"output",timestamp:kt(2800),content:"Refactoring to use Express Router with middleware chain...\n```typescript\nconst router = Router();\nrouter.use(authenticate);\nrouter.use(validateBody);\n```"}},{delayMs:4e3,event:{eventType:"output",timestamp:kt(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:kt(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:kt(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:kt(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:kt(1400),content:`Found tables to modify:
66
+ - users (add column: last_login_at)
67
+ - sessions (add index on expires_at)
68
+ - audit_log (new table)`}},{delayMs:2200,event:{eventType:"output",timestamp:kt(2200),content:`⚠ This migration will add a NOT NULL column to the users table.
69
+ The table has 50,000+ rows — this may lock the table briefly.
70
+
71
+ Please confirm to proceed.`}}],resumeSteps:[{delayMs:500,event:{eventType:"output",timestamp:kt(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:kt(1e3),content:`Migration 001_add_last_login.sql applied successfully.
72
+ Migration 002_sessions_index.sql applied successfully.
73
+ Migration 003_audit_log.sql applied successfully.`}},{delayMs:2500,event:{eventType:"output",timestamp:kt(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:kt(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:kt(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:kt(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:kt(1800),content:`Writing test cases:
74
+ - should calculate monthly total
75
+ - should apply discount codes
76
+ - should handle currency conversion
77
+ - should reject expired cards`}},{delayMs:2800,event:{eventType:"output",timestamp:kt(2800),content:`Error: Cannot resolve import 'src/services/stripe-client.ts' — module not found.
78
+ The billing service depends on a Stripe client that doesn't exist in this environment.`}},{delayMs:3500,event:{eventType:"status",timestamp:kt(3500),content:"failed"}}]}],Oy=400;function OE({children:n}){const[a,i]=S.useState(jE),[o,r]=S.useState(NE),[u,d]=S.useState(void 0),[p,m]=S.useState(wE),[g,y]=S.useState(DE),[v,_]=S.useState(My),[T,C]=S.useState(kE),[E,j]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[A,k]=S.useState(ME),[R]=S.useState(RE),Y=S.useRef(0),H=S.useRef(0),V=S.useRef(new Set),G=S.useRef(new Map),L=S.useRef(g);L.current=g;const W=S.useRef(new Map),ae=S.useRef(new Map),I=S.useCallback(J=>(Y.current+=1,`mock-${J}-${String(Y.current).padStart(3,"0")}`),[]),ie=S.useCallback(()=>{const J=Ry[H.current%Ry.length];return H.current+=1,J},[]),K=S.useCallback((J,ne,re)=>{const de=setTimeout(()=>{var be;V.current.delete(de),re&&((be=G.current.get(re))==null||be.delete(de)),J()},ne);V.current.add(de),re&&(G.current.has(re)||G.current.set(re,new Set),G.current.get(re).add(de))},[]),F=S.useCallback(J=>{const ne=G.current.get(J);ne&&(ne.forEach(re=>{clearTimeout(re),V.current.delete(re)}),G.current.delete(J))},[]),se=S.useCallback((J,ne)=>{i(re=>re.map(de=>de.id===J?{...de,status:ne}:de))},[]),z=S.useCallback(J=>{r(ne=>[...ne,J])},[]),q=S.useCallback((J,ne,re)=>{ne.forEach((de,be)=>{K(()=>{const xe={sessionId:J,...de.event,timestamp:new Date().toISOString()};z(xe),de.event.eventType==="status"&&se(J,de.event.content),be===ne.length-1&&re&&re()},de.delayMs,J)})},[K,z,se]),te=S.useCallback((J,ne,re,de)=>{console.log("[MockGrackle] spawn",{environmentId:J,prompt:ne,runtime:de});const be=I("sess"),xe={id:be,environmentId:J,runtime:de||"claude-code",status:"running",prompt:ne,startedAt:new Date().toISOString()};i(De=>[...De,xe]),d(be);const Qe=ie();if(console.log(`[MockGrackle] Playing scenario: ${Qe.label}`),Qe.pauseForInput){const De=Qe.pauseAfterStep??Qe.steps.length-1,Mt=Qe.steps.slice(0,De+1),wt=Mt.length>0?Mt[Mt.length-1].delayMs:0;q(be,Mt),K(()=>{se(be,"idle"),z({sessionId:be,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},wt+Oy,be),Qe.resumeSteps&&W.current.set(be,Qe.resumeSteps)}else q(be,Qe.steps)},[I,ie,q,K,se,z]),we=S.useCallback(J=>{console.log("[MockGrackle] kill",J),F(J),W.current.delete(J),se(J,"interrupted"),z({sessionId:J,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),y(ne=>ne.map(re=>re.latestSessionId===J&&re.status==="working"?{...re,status:"not_started"}:re))},[F,se,z]),ge=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),He=S.useCallback(J=>{console.log("[MockGrackle] loadSessionEvents",J)},[]),Ee=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),ve=S.useCallback((J,ne,re,de)=>{console.log("[MockGrackle] createProject",{name:J,description:ne});const be={id:I("proj"),name:J,description:ne||"",repoUrl:re||"",defaultEnvironmentId:de||"",status:"active",worktreeBasePath:"",useWorktrees:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(xe=>[...xe,be])},[I]),Se=S.useCallback(J=>{console.log("[MockGrackle] archiveProject",J),m(ne=>ne.map(re=>re.id===J?{...re,status:"archived"}:re))},[]),Z=S.useCallback(J=>{console.log("[MockGrackle] loadTasks",J)},[]),ee=S.useCallback((J,ne,re,de,be,xe,Qe)=>{console.log("[MockGrackle] createTask",{projectId:J,title:ne,parentTaskId:be}),y(De=>{const wt=De.filter(We=>We.projectId===J).reduce((We,Zt)=>Math.max(We,Zt.sortOrder),0),it=be?De.find(We=>We.id===be):void 0;if(be&&!it)return console.warn("[MockGrackle] Parent task not found:",be),De;if(it&&!it.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",be),De;const tn=it?it.depth+1:0,rt={id:I("task"),projectId:J,title:ne,description:re||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:de||[],reviewNotes:void 0,sortOrder:wt+1,createdAt:new Date().toISOString(),parentTaskId:be||"",depth:tn,childTaskIds:[],canDecompose:!be};return[...De,rt]}),xe&&xe()},[I]),Ce=S.useCallback((J,ne,re)=>{var Mt;console.log("[MockGrackle] startTask",{taskId:J,runtime:ne});const de=L.current.find(wt=>wt.id===J),be=(de==null?void 0:de.title)??"",xe=I("sess"),Qe={id:xe,environmentId:"env-local-01",runtime:ne||"claude-code",status:"running",prompt:be||J,startedAt:new Date().toISOString()};i(wt=>[...wt,Qe]),y(wt=>wt.map(it=>it.id===J?{...it,status:"working",latestSessionId:xe,branch:`mock/${J.slice(0,8)}`}:it));const De=ie();if(console.log(`[MockGrackle] Playing task scenario: ${De.label}`),De.pauseForInput){const wt=De.pauseAfterStep??De.steps.length-1,it=De.steps.slice(0,wt+1),tn=it.length>0?it[it.length-1].delayMs:0;if(q(xe,it),K(()=>{se(xe,"idle"),z({sessionId:xe,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},tn+Oy,xe),De.resumeSteps){const rt=[...De.resumeSteps];W.current.set(xe,rt);const We=rt.reduce((Zt,gt)=>Math.max(Zt,gt.delayMs),0);ae.current.set(xe,{taskId:J,delayAfterResume:We+200})}}else{const wt=De.steps.length>0?De.steps[De.steps.length-1].delayMs:0;q(xe,De.steps);const it=(Mt=De.steps[De.steps.length-1])==null?void 0:Mt.event.content;K(()=>{it==="completed"?y(tn=>tn.map(rt=>rt.id===J&&rt.status==="working"?{...rt,status:"paused"}:rt)):it==="failed"&&y(tn=>tn.map(rt=>rt.id===J&&rt.status==="working"?{...rt,status:"failed"}:rt))},wt+100,xe)}},[I,ie,q,K,se,z]),Ae=S.useCallback((J,ne)=>{console.log("[MockGrackle] sendInput",{sessionId:J,text:ne}),z({sessionId:J,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${ne}`}),se(J,"running"),z({sessionId:J,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const re=W.current.get(J);if(re)W.current.delete(J),q(J,re);else{const be=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];q(J,be)}const de=ae.current.get(J);de&&(ae.current.delete(J),K(()=>{y(be=>be.map(xe=>xe.id===de.taskId&&xe.status==="working"?{...xe,status:"paused"}:xe))},de.delayAfterResume,J))},[z,se,q,K]),Ie=S.useCallback(J=>{console.log("[MockGrackle] completeTask",J),y(ne=>ne.map(re=>re.id===J?{...re,status:"complete"}:re))},[]),mt=S.useCallback(J=>{console.log("[MockGrackle] resumeTask",J)},[]),Tt=S.useCallback((J,ne,re,de)=>{console.log("[MockGrackle] updateTask",{taskId:J,title:ne}),y(be=>be.map(xe=>xe.id===J?{...xe,title:ne.trim()||xe.title,description:re,dependsOn:de}:xe))},[]),Bt=S.useCallback(J=>{console.log("[MockGrackle] deleteTask",J),y(ne=>ne.filter(re=>re.id!==J))},[]),Xe=S.useCallback(J=>{console.log("[MockGrackle] loadFindings",J),_(My.filter(ne=>ne.projectId===J))},[]),Fe=S.useCallback((J,ne,re,de,be)=>{console.log("[MockGrackle] postFinding",{projectId:J,title:ne});const xe={id:I("find"),projectId:J,taskId:"",sessionId:"",category:de||"general",title:ne,content:re,tags:be||[],createdAt:new Date().toISOString()};_(Qe=>[...Qe,xe])},[I]),Be=S.useCallback((J,ne,re,de)=>{console.log("[MockGrackle] addEnvironment",{displayName:J,adapterType:ne,adapterConfig:re,defaultRuntime:de})},[]),Ln=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Un=S.useCallback((J,ne,re,de,be)=>{console.log("[MockGrackle] setToken",{name:J,tokenType:re}),C(xe=>[...xe.filter(De=>De.name!==J),{name:J,tokenType:re,envVar:de,filePath:be,expiresAt:""}])},[]),ta=S.useCallback(J=>{console.log("[MockGrackle] deleteToken",J),C(ne=>ne.filter(re=>re.name!==J))},[]),en=S.useCallback(J=>{console.log("[MockGrackle] updateCredentialProviders",J),j(J)},[]);S.useEffect(()=>()=>{V.current.forEach(clearTimeout),V.current.clear()},[]);const na=S.useMemo(()=>({connected:!0,environments:AE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:u,projects:p,tasks:g,findings:v,tokens:T,credentialProviders:E,spawn:te,sendInput:Ae,kill:we,refresh:ge,loadSessionEvents:He,clearEvents:Ee,createProject:ve,archiveProject:Se,updateProject:(J,ne)=>{console.log("[MockGrackle] updateProject",{projectId:J,...ne}),m(re=>re.map(de=>de.id!==J?de:{...de,...ne.name!==void 0?{name:ne.name}:{},...ne.description!==void 0?{description:ne.description}:{},...ne.repoUrl!==void 0?{repoUrl:ne.repoUrl}:{},...ne.defaultEnvironmentId!==void 0?{defaultEnvironmentId:ne.defaultEnvironmentId}:{},...ne.worktreeBasePath!==void 0?{worktreeBasePath:ne.worktreeBasePath}:{},...ne.useWorktrees!==void 0?{useWorktrees:ne.useWorktrees}:{},updatedAt:new Date().toISOString()}))},loadTasks:Z,createTask:ee,startTask:Ce,completeTask:Ie,resumeTask:mt,updateTask:Tt,deleteTask:Bt,loadFindings:Xe,postFinding:Fe,addEnvironment:Be,loadTokens:Ln,setToken:Un,deleteToken:ta,updateCredentialProviders:en,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:A,createPersona:(J,ne,re,de,be,xe)=>{console.log("[MockGrackle] createPersona",{name:J});const Qe={id:`mock-persona-${Date.now()}`,name:J,description:ne,systemPrompt:re,toolConfig:"{}",runtime:de??"claude-code",model:be||"",maxTurns:xe||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};k(De=>[...De,Qe])},updatePersona:(J,ne,re,de,be,xe,Qe)=>{console.log("[MockGrackle] updatePersona",{personaId:J,name:ne}),k(De=>De.map(Mt=>Mt.id!==J?Mt:{...Mt,...ne!==void 0?{name:ne}:{},...re!==void 0?{description:re}:{},...de!==void 0?{systemPrompt:de}:{},...be!==void 0?{runtime:be}:{},...xe!==void 0?{model:xe}:{},...Qe!==void 0?{maxTurns:Qe}:{},updatedAt:new Date().toISOString()}))},deletePersona:J=>{console.log("[MockGrackle] deletePersona",J),k(ne=>ne.filter(re=>re.id!==J))},taskSessions:R,loadTaskSessions:J=>{console.log("[MockGrackle] loadTaskSessions",J)}}),[a,o,u,p,g,v,T,E,A,R,te,Ae,we,ge,He,Ee,ve,Se,Z,ee,Ce,Ie,mt,Tt,Bt,Xe,Fe,Be,Ln,Un,ta,en]);return h.jsx(Bf.Provider,{value:na,children:n})}const I0=S.createContext(void 0),BE=4e3;function LE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(d=>{i(p=>p.filter(m=>m.id!==d))},[]),u=S.useCallback((d,p="info",m=BE)=>{const g=`toast-${++o.current}`;i(y=>[...y,{id:g,message:d,variant:p,duration:m}])},[]);return h.jsx(I0.Provider,{value:{toasts:a,showToast:u,dismissToast:r},children:n})}function so(){const n=S.useContext(I0);if(!n)throw new Error("useToast must be used within ToastProvider");return n}const tc=[{id:"grackle",label:"Grackle",description:"The default Grackle theme — iridescent purple on clean dark.",swatches:["#0e1218","#8b5cf6","#60a5fa","#e5e7eb","#34d399"],variantLightId:"grackle-light",variantDarkId:"grackle-dark"},{id:"grackle-light",label:"Grackle Light",description:"Light Grackle variant.",hidden:!0},{id:"grackle-dark",label:"Grackle Dark",description:"Dark Grackle variant.",hidden:!0},{id:"glass",label:"Glassmorphism",description:"Dark frosted-glass aesthetic with backdrop blur effects.",swatches:["#0a0c14","#4ecca3","#70a1ff","#e2e8f0","#a855f7"]},{id:"matrix",label:"Matrix",description:"Phosphor-green CRT terminal with scanlines and glow.",swatches:["#050505","#00ff41","#00bfff","#33ff77","#ffb000"]},{id:"brutalist",label:"Neubrutalism",description:"Thick borders, raw colors, bold type — ugly on purpose.",swatches:["#f5f0e8","#ff5757","#5ce1e6","#1a1a1a","#ffde59"],variantLightId:"brutalist-light",variantDarkId:"brutalist-dark"},{id:"brutalist-light",label:"Neubrutalism Light",description:"Light neubrutalism variant.",hidden:!0},{id:"brutalist-dark",label:"Neubrutalism Dark",description:"Dark neubrutalism variant.",hidden:!0},{id:"monokai",label:"Monokai",description:"Classic warm editor palette — pink, green, and purple.",swatches:["#272822","#f92672","#a6e22e","#f8f8f2","#ae81ff"],variantLightId:"monokai-light",variantDarkId:"monokai-dark"},{id:"monokai-dark",label:"Monokai Dark",description:"Dark Monokai variant.",hidden:!0},{id:"monokai-light",label:"Monokai Light",description:"Light Monokai variant.",hidden:!0},{id:"ubuntu",label:"Ubuntu",description:"Aubergine terminal with the GNOME Tango palette.",swatches:["#300a24","#8ae234","#ef2929","#eeeeec","#fce94f"]},{id:"sandstone",label:"Sandstone",description:"Warm terracotta accent on dark brown, in the style of Claude Code.",swatches:["#1a1815","#C15F3C","#6b8afd","#e8e6e3","#a78bfa"]},{id:"verdigris",label:"Verdigris",description:"Teal accent on charcoal, in the style of ChatGPT.",swatches:["#141414","#00a67e","#3b82f6","#ececec","#ab68ff"]},{id:"primer",label:"Primer",description:"Blue accent on ink-dark grey, in the style of GitHub.",swatches:["#0d1117","#58a6ff","#3fb950","#c9d1d9","#bc8cff"]}],V0=new Set(tc.map(n=>n.id)),By="grackle";function Qd(n){return tc.find(a=>a.id===n)}const Jd="grackle-theme",H0="grackle-prefer-system",P0="(prefers-color-scheme: dark)";let zl=[],Or;function wd(){Or=void 0;for(const n of zl)n()}function Wd(){return typeof window>"u"?!1:window.matchMedia(P0).matches}function Pl(){if(typeof localStorage>"u")return By;try{const n=localStorage.getItem(Jd);if(n!==null&&V0.has(n))return n}catch{}return By}function zr(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(H0)==="true"}catch{return!1}}function ef(n){return tc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function G0(n,a){const i=Qd(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?Wd()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=ef(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return Wd()?o.variantDarkId:o.variantLightId}return n}function Ai(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=G0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ai(Pl(),zr());function UE(){return Or===void 0&&(Or={themeId:Pl(),systemDark:Wd(),preferSystem:zr()}),Or}function zE(n){return zl=[...zl,n],()=>{zl=zl.filter(a=>a!==n)}}function IE(){const n=S.useSyncExternalStore(zE,UE),{themeId:a,preferSystem:i}=n,o=G0(a,i),r=S.useCallback(d=>{if(V0.has(d)){try{localStorage.setItem(Jd,d)}catch{}Ai(d,zr(),!0),wd()}},[]),u=S.useCallback(d=>{try{localStorage.setItem(H0,d?"true":"false")}catch{}if(d){const p=Pl(),m=Qd(p);if(m!=null&&m.hidden){const g=ef(p);if(g)try{localStorage.setItem(Jd,g.id)}catch{}}}Ai(Pl(),d,!0),wd()},[]);return S.useEffect(()=>{Ai(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const d=window.matchMedia(P0),p=()=>{const m=Pl(),g=zr();if(g){const y=Qd(m);if(y!=null&&y.variantDarkId&&y.variantLightId&&Ai(m,g),y!=null&&y.hidden){const v=ef(m);v!=null&&v.variantDarkId&&v.variantLightId&&Ai(m,g)}}wd()};return d.addEventListener("change",p),()=>{d.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:u}}const F0=S.createContext(void 0);function VE({children:n}){const a=IE();return h.jsx(F0.Provider,{value:a,children:n})}function q0(){const n=S.useContext(F0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const HE="_container_eix8p_1",PE="_hamburger_eix8p_33",GE="_brand_eix8p_49",FE="_info_eix8p_65",qE="_connectionLabel_eix8p_80",$E="_connectionDot_eix8p_93",YE="_connected_eix8p_96",KE="_disconnected_eix8p_100",ZE="_settingsButton_eix8p_104",Ta={container:HE,hamburger:PE,brand:GE,info:FE,connectionLabel:qE,connectionDot:$E,connected:YE,disconnected:KE,settingsButton:ZE};function XE({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=Gt(),u=Pn(),d=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:Ta.container,children:[n&&h.jsx("button",{type:"button",className:Ta.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:Ta.brand,onClick:()=>u("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:Ta.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${Ta.connectionDot} ${i?Ta.connected:Ta.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:Ta.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",d," env",d!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:Ta.settingsButton,onClick:()=>u(Mi),title:"Settings",children:"⚙"})]})]})}const Lf=S.createContext({});function Uf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const nc=S.createContext(null),zf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class QE extends S.Component{getSnapshotBeforeUpdate(a){const i=this.props.childRef.current;if(i&&a.isPresent&&!this.props.isPresent){const o=this.props.sizeRef.current;o.height=i.offsetHeight||0,o.width=i.offsetWidth||0,o.top=i.offsetTop,o.left=i.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function JE({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:u}=S.useContext(zf);return S.useInsertionEffect(()=>{const{width:d,height:p,top:m,left:g}=r.current;if(a||!o.current||!d||!p)return;o.current.dataset.motionPopId=i;const y=document.createElement("style");return u&&(y.nonce=u),document.head.appendChild(y),y.sheet&&y.sheet.insertRule(`
79
+ [data-motion-pop-id="${i}"] {
80
+ position: absolute !important;
81
+ width: ${d}px !important;
82
+ height: ${p}px !important;
83
+ top: ${m}px !important;
84
+ left: ${g}px !important;
85
+ }
86
+ `),()=>{document.head.removeChild(y)}},[a]),h.jsx(QE,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const WE=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:u,mode:d})=>{const p=Uf(eC),m=S.useId(),g=S.useCallback(v=>{p.set(v,!0);for(const _ of p.values())if(!_)return;o&&o()},[p,o]),y=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:v=>(p.set(v,!1),()=>p.delete(v))}),u?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((v,_)=>p.set(_,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),d==="popLayout"&&(n=h.jsx(JE,{isPresent:i,children:n})),h.jsx(nc.Provider,{value:y,children:n})};function eC(){return new Map}function $0(n=!0){const a=S.useContext(nc);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,u=S.useId();S.useEffect(()=>{n&&r(u)},[n]);const d=S.useCallback(()=>n&&o&&o(u),[u,o,n]);return!i&&o?[!1,d]:[!0]}const Er=n=>n.key||"";function Ly(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const If=typeof window<"u",Y0=If?S.useLayoutEffect:S.useEffect,ea=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:u="sync",propagate:d=!1})=>{const[p,m]=$0(d),g=S.useMemo(()=>Ly(n),[n]),y=d&&!p?[]:g.map(Er),v=S.useRef(!0),_=S.useRef(g),T=Uf(()=>new Map),[C,E]=S.useState(g),[j,A]=S.useState(g);Y0(()=>{v.current=!1,_.current=g;for(let Y=0;Y<j.length;Y++){const H=Er(j[Y]);y.includes(H)?T.delete(H):T.get(H)!==!0&&T.set(H,!1)}},[j,y.length,y.join("-")]);const k=[];if(g!==C){let Y=[...g];for(let H=0;H<j.length;H++){const V=j[H],G=Er(V);y.includes(G)||(Y.splice(H,0,V),k.push(V))}u==="wait"&&k.length&&(Y=k),A(Ly(Y)),E(g);return}const{forceRender:R}=S.useContext(Lf);return h.jsx(h.Fragment,{children:j.map(Y=>{const H=Er(Y),V=d&&!p?!1:g===j||y.includes(H),G=()=>{if(T.has(H))T.set(H,!0);else return;let L=!0;T.forEach(W=>{W||(L=!1)}),L&&(R==null||R(),A(_.current),d&&(m==null||m()),o&&o())};return h.jsx(WE,{isPresent:V,initial:!v.current||i?void 0:!1,custom:V?void 0:a,presenceAffectsLayout:r,mode:u,onExitComplete:V?void 0:G,children:Y},H)})})},bn=n=>n;let K0=bn;const tC={useManualTiming:!1};function nC(n){let a=new Set,i=new Set,o=!1,r=!1;const u=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function p(g){u.has(g)&&(m.schedule(g),n()),g(d)}const m={schedule:(g,y=!1,v=!1)=>{const T=v&&o?a:i;return y&&u.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),u.delete(g)},process:g=>{if(d=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Cr=["read","resolveKeyframes","update","preRender","render","postRender"],aC=40;function Z0(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},u=()=>i=!0,d=Cr.reduce((A,k)=>(A[k]=nC(u),A),{}),{read:p,resolveKeyframes:m,update:g,preRender:y,render:v,postRender:_}=d,T=()=>{const A=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(A-r.timestamp,aC),1),r.timestamp=A,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),y.process(r),v.process(r),_.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},C=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Cr.reduce((A,k)=>{const R=d[k];return A[k]=(Y,H=!1,V=!1)=>(i||C(),R.schedule(Y,H,V)),A},{}),cancel:A=>{for(let k=0;k<Cr.length;k++)d[Cr[k]].cancel(A)},state:r,steps:d}}const{schedule:st,cancel:is,state:Pt,steps:Dd}=Z0(typeof requestAnimationFrame<"u"?requestAnimationFrame:bn,!0),X0=S.createContext({strict:!1}),Uy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ri={};for(const n in Uy)Ri[n]={isEnabled:a=>Uy[n].some(i=>!!a[i])};function sC(n){for(const a in n)Ri[a]={...Ri[a],...n[a]}}const iC=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ir(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||iC.has(n)}let Q0=n=>!Ir(n);function lC(n){n&&(Q0=a=>a.startsWith("on")?!Ir(a):n(a))}try{lC(require("@emotion/is-prop-valid").default)}catch{}function oC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(Q0(r)||i===!0&&Ir(r)||!a&&!Ir(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function rC(n){if(typeof Proxy>"u")return n;const a=new Map,i=(...o)=>n(...o);return new Proxy(i,{get:(o,r)=>r==="create"?n:(a.has(r)||a.set(r,n(r)),a.get(r))})}const ac=S.createContext({});function Ql(n){return typeof n=="string"||Array.isArray(n)}function sc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Vf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hf=["initial",...Vf];function ic(n){return sc(n.animate)||Hf.some(a=>Ql(n[a]))}function J0(n){return!!(ic(n)||n.variants)}function cC(n,a){if(ic(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Ql(i)?i:void 0,animate:Ql(o)?o:void 0}}return n.inherit!==!1?a:{}}function uC(n){const{initial:a,animate:i}=cC(n,S.useContext(ac));return S.useMemo(()=>({initial:a,animate:i}),[zy(a),zy(i)])}function zy(n){return Array.isArray(n)?n.join(" "):n}const dC=Symbol.for("motionComponentSymbol");function ji(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function fC(n,a,i){return S.useCallback(o=>{o&&n.onMount&&n.onMount(o),a&&(o?a.mount(o):a.unmount()),i&&(typeof i=="function"?i(o):ji(i)&&(i.current=o))},[a])}const Pf=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hC="framerAppearId",W0="data-"+Pf(hC),{schedule:Gf}=Z0(queueMicrotask,!1),eb=S.createContext({});function pC(n,a,i,o,r){var u,d;const{visualElement:p}=S.useContext(ac),m=S.useContext(X0),g=S.useContext(nc),y=S.useContext(zf).reducedMotion,v=S.useRef(null);o=o||m.renderer,!v.current&&o&&(v.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:y}));const _=v.current,T=S.useContext(eb);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&mC(v.current,i,r,T);const C=S.useRef(!1);S.useInsertionEffect(()=>{_&&C.current&&_.update(i,g)});const E=i[W0],j=S.useRef(!!E&&!(!((u=window.MotionHandoffIsComplete)===null||u===void 0)&&u.call(window,E))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,E)));return Y0(()=>{_&&(C.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),Gf.render(_.render),j.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!j.current&&_.animationState&&_.animationState.animateChanges(),j.current&&(queueMicrotask(()=>{var A;(A=window.MotionHandoffMarkAsComplete)===null||A===void 0||A.call(window,E)}),j.current=!1))}),_}function mC(n,a,i,o){const{layoutId:r,layout:u,drag:d,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:tb(n.parent)),n.projection.setOptions({layoutId:r,layout:u,alwaysMeasureLayout:!!d||p&&ji(p),visualElement:n,animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function tb(n){if(n)return n.options.allowProjection!==!1?n.projection:tb(n.parent)}function gC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var u,d;n&&sC(n);function p(g,y){let v;const _={...S.useContext(zf),...g,layoutId:yC(g)},{isStatic:T}=_,C=uC(g),E=o(g,T);if(!T&&If){vC();const j=bC(_);v=j.MeasureLayout,C.visualElement=pC(r,E,_,a,j.ProjectionNode)}return h.jsxs(ac.Provider,{value:C,children:[v&&C.visualElement?h.jsx(v,{visualElement:C.visualElement,..._}):null,i(r,g,fC(E,C.visualElement,y),E,T,C.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(d=(u=r.displayName)!==null&&u!==void 0?u:r.name)!==null&&d!==void 0?d:""})`}`;const m=S.forwardRef(p);return m[dC]=r,m}function yC({layoutId:n}){const a=S.useContext(Lf).id;return a&&n!==void 0?a+"-"+n:n}function vC(n,a){S.useContext(X0).strict}function bC(n){const{drag:a,layout:i}=Ri;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const SC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ff(n){return typeof n!="string"||n.includes("-")?!1:!!(SC.indexOf(n)>-1||/[A-Z]/u.test(n))}function Iy(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function qf(n,a,i,o){if(typeof a=="function"){const[r,u]=Iy(o);a=a(i!==void 0?i:n.custom,r,u)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,u]=Iy(o);a=a(i!==void 0?i:n.custom,r,u)}return a}const tf=n=>Array.isArray(n),_C=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),xC=n=>tf(n)?n[n.length-1]||0:n,Yt=n=>!!(n&&n.getVelocity);function Br(n){const a=Yt(n)?n.get():n;return _C(a)?a.toValue():a}function TC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,u){const d={latestValues:EC(o,r,u,n),renderState:a()};return i&&(d.onMount=p=>i({props:o,current:p,...d}),d.onUpdate=p=>i(p)),d}const nb=n=>(a,i)=>{const o=S.useContext(ac),r=S.useContext(nc),u=()=>TC(n,a,o,r);return i?u():Uf(u)};function EC(n,a,i,o){const r={},u=o(n,{});for(const _ in u)r[_]=Br(u[_]);let{initial:d,animate:p}=n;const m=ic(n),g=J0(n);a&&g&&!m&&n.inherit!==!1&&(d===void 0&&(d=a.initial),p===void 0&&(p=a.animate));let y=i?i.initial===!1:!1;y=y||d===!1;const v=y?p:d;if(v&&typeof v!="boolean"&&!sc(v)){const _=Array.isArray(v)?v:[v];for(let T=0;T<_.length;T++){const C=qf(n,_[T]);if(C){const{transitionEnd:E,transition:j,...A}=C;for(const k in A){let R=A[k];if(Array.isArray(R)){const Y=y?R.length-1:0;R=R[Y]}R!==null&&(r[k]=R)}for(const k in E)r[k]=E[k]}}}return r}const zi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Is=new Set(zi),ab=n=>a=>typeof a=="string"&&a.startsWith(n),sb=ab("--"),CC=ab("var(--"),$f=n=>CC(n)?AC.test(n.split("/*")[0].trim()):!1,AC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ib=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Na=(n,a,i)=>i>a?a:i<n?n:i,Ii={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Jl={...Ii,transform:n=>Na(0,1,n)},Ar={...Ii,default:1},io=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),es=io("deg"),Jn=io("%"),me=io("px"),jC=io("vh"),NC=io("vw"),Vy={...Jn,parse:n=>Jn.parse(n)/100,transform:n=>Jn.transform(n*100)},wC={borderWidth:me,borderTopWidth:me,borderRightWidth:me,borderBottomWidth:me,borderLeftWidth:me,borderRadius:me,radius:me,borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomRightRadius:me,borderBottomLeftRadius:me,width:me,maxWidth:me,height:me,maxHeight:me,top:me,right:me,bottom:me,left:me,padding:me,paddingTop:me,paddingRight:me,paddingBottom:me,paddingLeft:me,margin:me,marginTop:me,marginRight:me,marginBottom:me,marginLeft:me,backgroundPositionX:me,backgroundPositionY:me},DC={rotate:es,rotateX:es,rotateY:es,rotateZ:es,scale:Ar,scaleX:Ar,scaleY:Ar,scaleZ:Ar,skew:es,skewX:es,skewY:es,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Jl,originX:Vy,originY:Vy,originZ:me},Hy={...Ii,transform:Math.round},Yf={...wC,...DC,zIndex:Hy,size:me,fillOpacity:Jl,strokeOpacity:Jl,numOctaves:Hy},kC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},MC=zi.length;function RC(n,a,i){let o="",r=!0;for(let u=0;u<MC;u++){const d=zi[u],p=n[d];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(d.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=ib(p,Yf[d]);if(!m){r=!1;const y=kC[d]||d;o+=`${y}(${g}) `}i&&(a[d]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function Kf(n,a,i){const{style:o,vars:r,transformOrigin:u}=n;let d=!1,p=!1;for(const m in a){const g=a[m];if(Is.has(m)){d=!0;continue}else if(sb(m)){r[m]=g;continue}else{const y=ib(g,Yf[m]);m.startsWith("origin")?(p=!0,u[m]=y):o[m]=y}}if(a.transform||(d||i?o.transform=RC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:y=0}=u;o.transformOrigin=`${m} ${g} ${y}`}}const OC={offset:"stroke-dashoffset",array:"stroke-dasharray"},BC={offset:"strokeDashoffset",array:"strokeDasharray"};function LC(n,a,i=1,o=0,r=!0){n.pathLength=1;const u=r?OC:BC;n[u.offset]=me.transform(-o);const d=me.transform(a),p=me.transform(i);n[u.array]=`${d} ${p}`}function Py(n,a,i){return typeof n=="string"?n:me.transform(a+i*n)}function UC(n,a,i){const o=Py(a,n.x,n.width),r=Py(i,n.y,n.height);return`${o} ${r}`}function Zf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:u,pathLength:d,pathSpacing:p=1,pathOffset:m=0,...g},y,v){if(Kf(n,g,v),y){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:C}=n;_.transform&&(C&&(T.transform=_.transform),delete _.transform),C&&(r!==void 0||u!==void 0||T.transform)&&(T.transformOrigin=UC(C,r!==void 0?r:.5,u!==void 0?u:.5)),a!==void 0&&(_.x=a),i!==void 0&&(_.y=i),o!==void 0&&(_.scale=o),d!==void 0&&LC(_,d,p,m,!1)}const Xf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),lb=()=>({...Xf(),attrs:{}}),Qf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function ob(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const u in i)n.style.setProperty(u,i[u])}const rb=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function cb(n,a,i,o){ob(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(rb.has(r)?r:Pf(r),a.attrs[r])}const Vr={};function zC(n){Object.assign(Vr,n)}function ub(n,{layout:a,layoutId:i}){return Is.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Vr[n]||n==="opacity")}function Jf(n,a,i){var o;const{style:r}=n,u={};for(const d in r)(Yt(r[d])||a.style&&Yt(a.style[d])||ub(d,n)||((o=i==null?void 0:i.getValue(d))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(u[d]=r[d]);return u}function db(n,a,i){const o=Jf(n,a,i);for(const r in n)if(Yt(n[r])||Yt(a[r])){const u=zi.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[u]=n[r]}return o}function IC(n,a){try{a.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{a.dimensions={x:0,y:0,width:0,height:0}}}const Gy=["x","y","width","height","cx","cy","r"],VC={useVisualState:nb({scrapeMotionValuesFromProps:db,createRenderState:lb,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let u=!!n.drag;if(!u){for(const p in r)if(Is.has(p)){u=!0;break}}if(!u)return;let d=!a;if(a)for(let p=0;p<Gy.length;p++){const m=Gy[p];n[m]!==a[m]&&(d=!0)}d&&st.read(()=>{IC(i,o),st.render(()=>{Zf(o,r,Qf(i.tagName),n.transformTemplate),cb(i,o)})})}})},HC={useVisualState:nb({scrapeMotionValuesFromProps:Jf,createRenderState:Xf})};function fb(n,a,i){for(const o in a)!Yt(a[o])&&!ub(o,i)&&(n[o]=a[o])}function PC({transformTemplate:n},a){return S.useMemo(()=>{const i=Xf();return Kf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function GC(n,a){const i=n.style||{},o={};return fb(o,i,n),Object.assign(o,PC(n,a)),o}function FC(n,a){const i={},o=GC(n,a);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=o,i}function qC(n,a,i,o){const r=S.useMemo(()=>{const u=lb();return Zf(u,a,Qf(o),n.transformTemplate),{...u.attrs,style:{...u.style}}},[a]);if(n.style){const u={};fb(u,n.style,n),r.style={...u,...r.style}}return r}function $C(n=!1){return(i,o,r,{latestValues:u},d)=>{const m=(Ff(i)?qC:FC)(o,u,d,i),g=oC(o,typeof i=="string",n),y=i!==S.Fragment?{...g,...m,ref:r}:{},{children:v}=o,_=S.useMemo(()=>Yt(v)?v.get():v,[v]);return S.createElement(i,{...y,children:_})}}function YC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const d={...Ff(o)?VC:HC,preloadedFeatures:n,useRender:$C(r),createVisualElement:a,Component:o};return gC(d)}}function hb(n,a){if(!Array.isArray(a))return!1;const i=a.length;if(i!==n.length)return!1;for(let o=0;o<i;o++)if(a[o]!==n[o])return!1;return!0}function lc(n,a,i){const o=n.getProps();return qf(o,a,i!==void 0?i:o.custom,n)}function Wf(n,a){return n?n[a]||n.default||n:void 0}const pb=new Set(["width","height","top","left","right","bottom",...zi]);let Lr;function KC(){Lr=void 0}const Wn={now:()=>(Lr===void 0&&Wn.set(Pt.isProcessing||tC.useManualTiming?Pt.timestamp:performance.now()),Lr),set:n=>{Lr=n,queueMicrotask(KC)}};function eh(n,a){n.indexOf(a)===-1&&n.push(a)}function th(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class nh{constructor(){this.subscriptions=[]}add(a){return eh(this.subscriptions,a),()=>th(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let u=0;u<r;u++){const d=this.subscriptions[u];d&&d(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function mb(n,a){return a?n*(1e3/a):0}const Fy=30,ZC=n=>!isNaN(parseFloat(n));class XC{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const u=Wn.now();this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Wn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=ZC(this.current))}setPrevFrameValue(a=this.current){this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt}onChange(a){return this.on("change",a)}on(a,i){this.events[a]||(this.events[a]=new nh);const o=this.events[a].add(i);return a==="change"?()=>{o(),st.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Wn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Fy)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Fy);return mb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wl(n,a){return new XC(n,a)}function QC(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Wl(i))}function JC(n,a){const i=lc(n,a);let{transitionEnd:o={},transition:r={},...u}=i||{};u={...u,...o};for(const d in u){const p=xC(u[d]);QC(n,d,p)}}function WC(n){return!!(Yt(n)&&n.add)}function nf(n,a){const i=n.getValue("willChange");if(WC(i))return i.add(a)}function gb(n){return n.props[W0]}function ah(n){let a;return()=>(a===void 0&&(a=n()),a)}const eA=ah(()=>window.ScrollTimeline!==void 0);class tA{constructor(a){this.stop=()=>this.runAll("stop"),this.animations=a.filter(Boolean)}get finished(){return Promise.all(this.animations.map(a=>"finished"in a?a.finished:a))}getAll(a){return this.animations[0][a]}setAll(a,i){for(let o=0;o<this.animations.length;o++)this.animations[o][a]=i}attachTimeline(a,i){const o=this.animations.map(r=>{if(eA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,u)=>{r&&r(),this.animations[u].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class nA extends tA{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const Ca=n=>n*1e3,Aa=n=>n/1e3;function sh(n){return typeof n=="function"}function qy(n,a){n.timeline=a,n.onfinish=null}const ih=n=>Array.isArray(n)&&typeof n[0]=="number",aA={linearEasing:void 0};function sA(n,a){const i=ah(n);return()=>{var o;return(o=aA[a])!==null&&o!==void 0?o:i()}}const Hr=sA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Oi=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},yb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let u=0;u<r;u++)o+=n(Oi(0,r-1,u))+", ";return`linear(${o.substring(0,o.length-2)})`};function vb(n){return!!(typeof n=="function"&&Hr()||!n||typeof n=="string"&&(n in af||Hr())||ih(n)||Array.isArray(n)&&n.every(vb))}const Il=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,af={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Il([0,.65,.55,1]),circOut:Il([.55,0,1,.45]),backIn:Il([.31,.01,.66,-.59]),backOut:Il([.33,1.53,.69,.99])};function bb(n,a){if(n)return typeof n=="function"&&Hr()?yb(n,a):ih(n)?Il(n):Array.isArray(n)?n.map(i=>bb(i,a)||af.easeOut):af[n]}const Sb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,iA=1e-7,lA=12;function oA(n,a,i,o,r){let u,d,p=0;do d=a+(i-a)/2,u=Sb(d,o,r)-n,u>0?i=d:a=d;while(Math.abs(u)>iA&&++p<lA);return d}function lo(n,a,i,o){if(n===a&&i===o)return bn;const r=u=>oA(u,0,1,n,i);return u=>u===0||u===1?u:Sb(r(u),a,o)}const _b=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,xb=n=>a=>1-n(1-a),Tb=lo(.33,1.53,.69,.99),lh=xb(Tb),Eb=_b(lh),Cb=n=>(n*=2)<1?.5*lh(n):.5*(2-Math.pow(2,-10*(n-1))),oh=n=>1-Math.sin(Math.acos(n)),Ab=xb(oh),jb=_b(oh),Nb=n=>/^0[^.\s]+$/u.test(n);function rA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Nb(n):!0}const Gl=n=>Math.round(n*1e5)/1e5,rh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function cA(n){return n==null}const uA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ch=(n,a)=>i=>!!(typeof i=="string"&&uA.test(i)&&i.startsWith(n)||a&&!cA(i)&&Object.prototype.hasOwnProperty.call(i,a)),wb=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,u,d,p]=o.match(rh);return{[n]:parseFloat(r),[a]:parseFloat(u),[i]:parseFloat(d),alpha:p!==void 0?parseFloat(p):1}},dA=n=>Na(0,255,n),kd={...Ii,transform:n=>Math.round(dA(n))},Os={test:ch("rgb","red"),parse:wb("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+kd.transform(n)+", "+kd.transform(a)+", "+kd.transform(i)+", "+Gl(Jl.transform(o))+")"};function fA(n){let a="",i="",o="",r="";return n.length>5?(a=n.substring(1,3),i=n.substring(3,5),o=n.substring(5,7),r=n.substring(7,9)):(a=n.substring(1,2),i=n.substring(2,3),o=n.substring(3,4),r=n.substring(4,5),a+=a,i+=i,o+=o,r+=r),{red:parseInt(a,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const sf={test:ch("#"),parse:fA,transform:Os.transform},Ni={test:ch("hsl","hue"),parse:wb("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Jn.transform(Gl(a))+", "+Jn.transform(Gl(i))+", "+Gl(Jl.transform(o))+")"},$t={test:n=>Os.test(n)||sf.test(n)||Ni.test(n),parse:n=>Os.test(n)?Os.parse(n):Ni.test(n)?Ni.parse(n):sf.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Os.transform(n):Ni.transform(n)},hA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(rh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(hA))===null||i===void 0?void 0:i.length)||0)>0}const Db="number",kb="color",mA="var",gA="var(",$y="${}",yA=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function eo(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let u=0;const p=a.replace(yA,m=>($t.test(m)?(o.color.push(u),r.push(kb),i.push($t.parse(m))):m.startsWith(gA)?(o.var.push(u),r.push(mA),i.push(m)):(o.number.push(u),r.push(Db),i.push(parseFloat(m))),++u,$y)).split($y);return{values:i,split:p,indexes:o,types:r}}function Mb(n){return eo(n).values}function Rb(n){const{split:a,types:i}=eo(n),o=a.length;return r=>{let u="";for(let d=0;d<o;d++)if(u+=a[d],r[d]!==void 0){const p=i[d];p===Db?u+=Gl(r[d]):p===kb?u+=$t.transform(r[d]):u+=r[d]}return u}}const vA=n=>typeof n=="number"?0:n;function bA(n){const a=Mb(n);return Rb(n)(a.map(vA))}const ls={test:pA,parse:Mb,createTransformer:Rb,getAnimatableNone:bA},SA=new Set(["brightness","contrast","saturate","opacity"]);function _A(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(rh)||[];if(!o)return n;const r=i.replace(o,"");let u=SA.has(a)?1:0;return o!==i&&(u*=100),a+"("+u+r+")"}const xA=/\b([a-z-]*)\(.*?\)/gu,lf={...ls,getAnimatableNone:n=>{const a=n.match(xA);return a?a.map(_A).join(" "):n}},TA={...Yf,color:$t,backgroundColor:$t,outlineColor:$t,fill:$t,stroke:$t,borderColor:$t,borderTopColor:$t,borderRightColor:$t,borderBottomColor:$t,borderLeftColor:$t,filter:lf,WebkitFilter:lf},uh=n=>TA[n];function Ob(n,a){let i=uh(n);return i!==lf&&(i=ls),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const EA=new Set(["auto","none","0"]);function CA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const u=n[o];typeof u=="string"&&!EA.has(u)&&eo(u).values.length&&(r=n[o]),o++}if(r&&i)for(const u of a)n[u]=Ob(i,r)}const Yy=n=>n===Ii||n===me,Ky=(n,a)=>parseFloat(n.split(", ")[a]),Zy=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Ky(r[1],a);{const u=o.match(/^matrix\((.+)\)$/u);return u?Ky(u[1],n):0}},AA=new Set(["x","y","z"]),jA=zi.filter(n=>!AA.has(n));function NA(n){const a=[];return jA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Bi={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:Zy(4,13),y:Zy(5,14)};Bi.translateX=Bi.x;Bi.translateY=Bi.y;const Bs=new Set;let of=!1,rf=!1;function Bb(){if(rf){const n=Array.from(Bs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=NA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([u,d])=>{var p;(p=o.getValue(u))===null||p===void 0||p.set(d)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}rf=!1,of=!1,Bs.forEach(n=>n.complete()),Bs.clear()}function Lb(){Bs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(rf=!0)})}function wA(){Lb(),Bb()}class dh{constructor(a,i,o,r,u,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=u,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Bs.add(this),of||(of=!0,st.read(Lb),st.resolveKeyframes(Bb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let u=0;u<a.length;u++)if(a[u]===null)if(u===0){const d=r==null?void 0:r.get(),p=a[a.length-1];if(d!==void 0)a[0]=d;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&d===void 0&&r.set(a[0])}else a[u]=a[u-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Bs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Bs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ub=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),DA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function kA(n){const a=DA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function zb(n,a,i=1){const[o,r]=kA(n);if(!o)return;const u=window.getComputedStyle(a).getPropertyValue(o);if(u){const d=u.trim();return Ub(d)?parseFloat(d):d}return $f(r)?zb(r,a,i+1):r}const Ib=n=>a=>a.test(n),MA={test:n=>n==="auto",parse:n=>n},Vb=[Ii,me,Jn,es,NC,jC,MA],Xy=n=>Vb.find(Ib(n));class Hb extends dh{constructor(a,i,o,r,u){super(a,i,o,r,u,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),$f(g))){const y=zb(g,i.current);y!==void 0&&(a[m]=y),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!pb.has(o)||a.length!==2)return;const[r,u]=a,d=Xy(r),p=Xy(u);if(d!==p)if(Yy(d)&&Yy(p))for(let m=0;m<a.length;m++){const g=a[m];typeof g=="string"&&(a[m]=parseFloat(g))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:a,name:i}=this,o=[];for(let r=0;r<a.length;r++)rA(a[r])&&o.push(r);o.length&&CA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Bi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const u=i.getValue(o);u&&u.jump(this.measuredOrigin,!1);const d=r.length-1,p=r[d];r[d]=Bi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const Qy=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ls.test(n)||n==="0")&&!n.startsWith("url("));function RA(n){const a=n[0];if(n.length===1)return!0;for(let i=0;i<n.length;i++)if(n[i]!==a)return!0}function OA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const u=n[n.length-1],d=Qy(r,a),p=Qy(u,a);return!d||!p?!1:RA(n)||(i==="spring"||sh(i))&&o}const BA=n=>n!==null;function oc(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(BA),u=a&&i!=="loop"&&a%2===1?0:r.length-1;return!u||o===void 0?r[u]:o}const LA=40;class Pb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:u=0,repeatType:d="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Wn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:u,repeatType:d,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>LA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&wA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Wn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:u,delay:d,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!OA(a,o,r,u))if(d)this.options.duration=0;else{m&&m(oc(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const y=this.initPlayback(a,i);y!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...y},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const cf=2e4;function Gb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<cf;)a+=i,o=n.next(a);return a>=cf?1/0:a}const ut=(n,a,i)=>n+(a-n)*i;function Md(n,a,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?n+(a-n)*6*i:i<1/2?a:i<2/3?n+(a-n)*(2/3-i)*6:n}function UA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,u=0,d=0;if(!a)r=u=d=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Md(m,p,n+1/3),u=Md(m,p,n),d=Md(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:o}}function Pr(n,a){return i=>i>0?a:n}const Rd=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},zA=[sf,Os,Ni],IA=n=>zA.find(a=>a.test(n));function Jy(n){const a=IA(n);if(!a)return!1;let i=a.parse(n);return a===Ni&&(i=UA(i)),i}const Wy=(n,a)=>{const i=Jy(n),o=Jy(a);if(!i||!o)return Pr(n,a);const r={...i};return u=>(r.red=Rd(i.red,o.red,u),r.green=Rd(i.green,o.green,u),r.blue=Rd(i.blue,o.blue,u),r.alpha=ut(i.alpha,o.alpha,u),Os.transform(r))},VA=(n,a)=>i=>a(n(i)),oo=(...n)=>n.reduce(VA),uf=new Set(["none","hidden"]);function HA(n,a){return uf.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function PA(n,a){return i=>ut(n,a,i)}function fh(n){return typeof n=="number"?PA:typeof n=="string"?$f(n)?Pr:$t.test(n)?Wy:qA:Array.isArray(n)?Fb:typeof n=="object"?$t.test(n)?Wy:GA:Pr}function Fb(n,a){const i=[...n],o=i.length,r=n.map((u,d)=>fh(u)(u,a[d]));return u=>{for(let d=0;d<o;d++)i[d]=r[d](u);return i}}function GA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=fh(n[r])(n[r],a[r]));return r=>{for(const u in o)i[u]=o[u](r);return i}}function FA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let u=0;u<a.values.length;u++){const d=a.types[u],p=n.indexes[d][r[d]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[u]=m,r[d]++}return o}const qA=(n,a)=>{const i=ls.createTransformer(a),o=eo(n),r=eo(a);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?uf.has(n)&&!r.values.length||uf.has(a)&&!o.values.length?HA(n,a):oo(Fb(FA(o,r),r.values),i):Pr(n,a)};function qb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?ut(n,a,i):fh(n)(n,a)}const $A=5;function $b(n,a,i){const o=Math.max(a-$A,0);return mb(i-n(o),a-o)}const ht={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Od=.001;function YA({duration:n=ht.duration,bounce:a=ht.bounce,velocity:i=ht.velocity,mass:o=ht.mass}){let r,u,d=1-a;d=Na(ht.minDamping,ht.maxDamping,d),n=Na(ht.minDuration,ht.maxDuration,Aa(n)),d<1?(r=g=>{const y=g*d,v=y*n,_=y-i,T=df(g,d),C=Math.exp(-v);return Od-_/T*C},u=g=>{const v=g*d*n,_=v*i+i,T=Math.pow(d,2)*Math.pow(g,2)*n,C=Math.exp(-v),E=df(Math.pow(g,2),d);return(-r(g)+Od>0?-1:1)*((_-T)*C)/E}):(r=g=>{const y=Math.exp(-g*n),v=(g-i)*n+1;return-Od+y*v},u=g=>{const y=Math.exp(-g*n),v=(i-g)*(n*n);return y*v});const p=5/n,m=ZA(r,u,p);if(n=Ca(n),isNaN(m))return{stiffness:ht.stiffness,damping:ht.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:d*2*Math.sqrt(o*g),duration:n}}}const KA=12;function ZA(n,a,i){let o=i;for(let r=1;r<KA;r++)o=o-n(o)/a(o);return o}function df(n,a){return n*Math.sqrt(1-a*a)}const XA=["duration","bounce"],QA=["stiffness","damping","mass"];function ev(n,a){return a.some(i=>n[i]!==void 0)}function JA(n){let a={velocity:ht.velocity,stiffness:ht.stiffness,damping:ht.damping,mass:ht.mass,isResolvedFromDuration:!1,...n};if(!ev(n,QA)&&ev(n,XA))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,u=2*Na(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:ht.mass,stiffness:r,damping:u}}else{const i=YA(n);a={...a,...i,mass:ht.mass},a.isResolvedFromDuration=!0}return a}function Yb(n=ht.visualDuration,a=ht.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const u=i.keyframes[0],d=i.keyframes[i.keyframes.length-1],p={done:!1,value:u},{stiffness:m,damping:g,mass:y,duration:v,velocity:_,isResolvedFromDuration:T}=JA({...i,velocity:-Aa(i.velocity||0)}),C=_||0,E=g/(2*Math.sqrt(m*y)),j=d-u,A=Aa(Math.sqrt(m/y)),k=Math.abs(j)<5;o||(o=k?ht.restSpeed.granular:ht.restSpeed.default),r||(r=k?ht.restDelta.granular:ht.restDelta.default);let R;if(E<1){const H=df(A,E);R=V=>{const G=Math.exp(-E*A*V);return d-G*((C+E*A*j)/H*Math.sin(H*V)+j*Math.cos(H*V))}}else if(E===1)R=H=>d-Math.exp(-A*H)*(j+(C+A*j)*H);else{const H=A*Math.sqrt(E*E-1);R=V=>{const G=Math.exp(-E*A*V),L=Math.min(H*V,300);return d-G*((C+E*A*j)*Math.sinh(L)+H*j*Math.cosh(L))/H}}const Y={calculatedDuration:T&&v||null,next:H=>{const V=R(H);if(T)p.done=H>=v;else{let G=0;E<1&&(G=H===0?Ca(C):$b(R,H,V));const L=Math.abs(G)<=o,W=Math.abs(d-V)<=r;p.done=L&&W}return p.value=p.done?d:V,p},toString:()=>{const H=Math.min(Gb(Y),cf),V=yb(G=>Y.next(H*G).value,H,30);return H+"ms "+V}};return Y}function tv({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:u=500,modifyTarget:d,min:p,max:m,restDelta:g=.5,restSpeed:y}){const v=n[0],_={done:!1,value:v},T=L=>p!==void 0&&L<p||m!==void 0&&L>m,C=L=>p===void 0?m:m===void 0||Math.abs(p-L)<Math.abs(m-L)?p:m;let E=i*a;const j=v+E,A=d===void 0?j:d(j);A!==j&&(E=A-v);const k=L=>-E*Math.exp(-L/o),R=L=>A+k(L),Y=L=>{const W=k(L),ae=R(L);_.done=Math.abs(W)<=g,_.value=_.done?A:ae};let H,V;const G=L=>{T(_.value)&&(H=L,V=Yb({keyframes:[_.value,C(_.value)],velocity:$b(R,L,_.value),damping:r,stiffness:u,restDelta:g,restSpeed:y}))};return G(0),{calculatedDuration:null,next:L=>{let W=!1;return!V&&H===void 0&&(W=!0,Y(L),G(L)),H!==void 0&&L>=H?V.next(L-H):(!W&&Y(L),_)}}}const WA=lo(.42,0,1,1),ej=lo(0,0,.58,1),Kb=lo(.42,0,.58,1),tj=n=>Array.isArray(n)&&typeof n[0]!="number",nj={linear:bn,easeIn:WA,easeInOut:Kb,easeOut:ej,circIn:oh,circInOut:jb,circOut:Ab,backIn:lh,backInOut:Eb,backOut:Tb,anticipate:Cb},nv=n=>{if(ih(n)){K0(n.length===4);const[a,i,o,r]=n;return lo(a,i,o,r)}else if(typeof n=="string")return nj[n];return n};function aj(n,a,i){const o=[],r=i||qb,u=n.length-1;for(let d=0;d<u;d++){let p=r(n[d],n[d+1]);if(a){const m=Array.isArray(a)?a[d]||bn:a;p=oo(m,p)}o.push(p)}return o}function sj(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const u=n.length;if(K0(u===a.length),u===1)return()=>a[0];if(u===2&&a[0]===a[1])return()=>a[1];const d=n[0]===n[1];n[0]>n[u-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=aj(a,o,r),m=p.length,g=y=>{if(d&&y<n[0])return a[0];let v=0;if(m>1)for(;v<n.length-2&&!(y<n[v+1]);v++);const _=Oi(n[v],n[v+1],y);return p[v](_)};return i?y=>g(Na(n[0],n[u-1],y)):g}function ij(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Oi(0,a,o);n.push(ut(i,1,r))}}function lj(n){const a=[0];return ij(a,n.length-1),a}function oj(n,a){return n.map(i=>i*a)}function rj(n,a){return n.map(()=>a||Kb).splice(0,n.length-1)}function Gr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=tj(o)?o.map(nv):nv(o),u={done:!1,value:a[0]},d=oj(i&&i.length===a.length?i:lj(a),n),p=sj(d,a,{ease:Array.isArray(r)?r:rj(a,r)});return{calculatedDuration:n,next:m=>(u.value=p(m),u.done=m>=n,u)}}const cj=n=>{const a=({timestamp:i})=>n(i);return{start:()=>st.update(a,!0),stop:()=>is(a),now:()=>Pt.isProcessing?Pt.timestamp:Wn.now()}},uj={decay:tv,inertia:tv,tween:Gr,keyframes:Gr,spring:Yb},dj=n=>n/100;class hh extends Pb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:u}=this.options,d=(r==null?void 0:r.KeyframeResolver)||dh,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new d(u,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:u,velocity:d=0}=this.options,p=sh(i)?i:uj[i]||Gr;let m,g;p!==Gr&&typeof a[0]!="number"&&(m=oo(dj,qb(a[0],a[1])),a=[0,100]);const y=p({...this.options,keyframes:a});u==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-d})),y.calculatedDuration===null&&(y.calculatedDuration=Gb(y));const{calculatedDuration:v}=y,_=v+r,T=_*(o+1)-r;return{generator:y,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:v,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:L}=this.options;return{done:!0,value:L[L.length-1]}}const{finalKeyframe:r,generator:u,mirroredGenerator:d,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:y,resolvedDuration:v}=o;if(this.startTime===null)return u.next(0);const{delay:_,repeat:T,repeatType:C,repeatDelay:E,onUpdate:j}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-y/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const A=this.currentTime-_*(this.speed>=0?1:-1),k=this.speed>=0?A<0:A>y;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=y);let R=this.currentTime,Y=u;if(T){const L=Math.min(this.currentTime,y)/v;let W=Math.floor(L),ae=L%1;!ae&&L>=1&&(ae=1),ae===1&&W--,W=Math.min(W,T+1),!!(W%2)&&(C==="reverse"?(ae=1-ae,E&&(ae-=E/v)):C==="mirror"&&(Y=d)),R=Na(0,1,ae)*v}const H=k?{done:!1,value:m[0]}:Y.next(R);p&&(H.value=p(H.value));let{done:V}=H;!k&&g!==null&&(V=this.speed>=0?this.currentTime>=y:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return G&&r!==void 0&&(H.value=oc(m,this.options,r)),j&&j(H.value),G&&this.finish(),H}get duration(){const{resolved:a}=this;return a?Aa(a.calculatedDuration):0}get time(){return Aa(this.currentTime)}set time(a){a=Ca(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=Aa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=cj,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(u=>this.tick(u))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const fj=new Set(["opacity","clipPath","filter","transform"]);function hj(n,a,i,{delay:o=0,duration:r=300,repeat:u=0,repeatType:d="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const y=bb(p,r);return Array.isArray(y)&&(g.easing=y),n.animate(g,{delay:o,duration:r,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"})}const pj=ah(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fr=10,mj=2e4;function gj(n){return sh(n.type)||n.type==="spring"||!vb(n.ease)}function yj(n,a){const i=new hh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let u=0;for(;!o.done&&u<mj;)o=i.sample(u),r.push(o.value),u+=Fr;return{times:void 0,keyframes:r,duration:u-Fr,ease:"linear"}}const Zb={anticipate:Cb,backInOut:Eb,circInOut:jb};function vj(n){return n in Zb}class av extends Pb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:u}=this.options;this.resolver=new Hb(u,(d,p)=>this.onKeyframesResolved(d,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:u,type:d,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof u=="string"&&Hr()&&vj(u)&&(u=Zb[u]),gj(this.options)){const{onComplete:v,onUpdate:_,motionValue:T,element:C,...E}=this.options,j=yj(a,E);a=j.keyframes,a.length===1&&(a[1]=a[0]),o=j.duration,r=j.times,u=j.ease,d="keyframes"}const y=hj(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:u});return y.startTime=g??this.calcStartTime(),this.pendingTimeline?(qy(y,this.pendingTimeline),this.pendingTimeline=void 0):y.onfinish=()=>{const{onComplete:v}=this.options;p.set(oc(a,this.options,i)),v&&v(),this.cancel(),this.resolveFinishedPromise()},{animation:y,duration:o,times:r,type:d,ease:u,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return Aa(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return Aa(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=Ca(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return bn;const{animation:o}=i;qy(o,a)}return bn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:u,ease:d,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:y,onComplete:v,element:_,...T}=this.options,C=new hh({...T,keyframes:o,duration:r,type:u,ease:d,times:p,isGenerator:!0}),E=Ca(this.time);g.setWithVelocity(C.sample(E-Fr).value,C.sample(E).value,Fr)}const{onStop:m}=this.options;m&&m(),this.cancel()}complete(){const{resolved:a}=this;a&&a.animation.finish()}cancel(){const{resolved:a}=this;a&&a.animation.cancel()}static supports(a){const{motionValue:i,name:o,repeatDelay:r,repeatType:u,damping:d,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return pj()&&o&&fj.has(o)&&!m&&!g&&!r&&u!=="mirror"&&d!==0&&p!=="inertia"}}const bj={type:"spring",stiffness:500,damping:25,restSpeed:10},Sj=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),_j={type:"keyframes",duration:.8},xj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Tj=(n,{keyframes:a})=>a.length>2?_j:Is.has(n)?n.startsWith("scale")?Sj(a[1]):bj:xj;function Ej({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:u,repeatType:d,repeatDelay:p,from:m,elapsed:g,...y}){return!!Object.keys(y).length}const ph=(n,a,i,o={},r,u)=>d=>{const p=Wf(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-Ca(m);let y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:_=>{a.set(_),p.onUpdate&&p.onUpdate(_)},onComplete:()=>{d(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:u?void 0:r};Ej(p)||(y={...y,...Tj(n,y)}),y.duration&&(y.duration=Ca(y.duration)),y.repeatDelay&&(y.repeatDelay=Ca(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(y.duration=0,y.delay===0&&(v=!0)),v&&!u&&a.get()!==void 0){const _=oc(y.keyframes,p);if(_!==void 0)return st.update(()=>{y.onUpdate(_),y.onComplete()}),new nA([])}return!u&&av.supports(y)?new av(y):new hh(y)};function Cj({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function Xb(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var u;let{transition:d=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(d=o);const g=[],y=r&&n.animationState&&n.animationState.getState()[r];for(const v in m){const _=n.getValue(v,(u=n.latestValues[v])!==null&&u!==void 0?u:null),T=m[v];if(T===void 0||y&&Cj(y,v))continue;const C={delay:i,...Wf(d||{},v)};let E=!1;if(window.MotionHandoffAnimation){const A=gb(n);if(A){const k=window.MotionHandoffAnimation(A,v,st);k!==null&&(C.startTime=k,E=!0)}}nf(n,v),_.start(ph(v,_,T,n.shouldReduceMotion&&pb.has(v)?{type:!1}:C,n,E));const j=_.animation;j&&g.push(j)}return p&&Promise.all(g).then(()=>{st.update(()=>{p&&JC(n,p)})}),g}function ff(n,a,i={}){var o;const r=lc(n,a,i.type==="exit"?(o=n.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:u=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(u=i.transitionOverride);const d=r?()=>Promise.all(Xb(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:y=0,staggerChildren:v,staggerDirection:_}=u;return Aj(n,a,y+g,v,_,i)}:()=>Promise.resolve(),{when:m}=u;if(m){const[g,y]=m==="beforeChildren"?[d,p]:[p,d];return g().then(()=>y())}else return Promise.all([d(),p(i.delay)])}function Aj(n,a,i=0,o=0,r=1,u){const d=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(jj).forEach((g,y)=>{g.notify("AnimationStart",a),d.push(ff(g,a,{...u,delay:i+m(y)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(d)}function jj(n,a){return n.sortNodePosition(a)}function Nj(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(u=>ff(n,u,i));o=Promise.all(r)}else if(typeof a=="string")o=ff(n,a,i);else{const r=typeof a=="function"?lc(n,a,i.custom):a;o=Promise.all(Xb(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const wj=Hf.length;function Qb(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?Qb(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<wj;i++){const o=Hf[i],r=n.props[o];(Ql(r)||r===!1)&&(a[o]=r)}return a}const Dj=[...Vf].reverse(),kj=Vf.length;function Mj(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Nj(n,i,o)))}function Rj(n){let a=Mj(n),i=sv(),o=!0;const r=m=>(g,y)=>{var v;const _=lc(n,y,m==="exit"?(v=n.presenceContext)===null||v===void 0?void 0:v.custom:void 0);if(_){const{transition:T,transitionEnd:C,...E}=_;g={...g,...E,...C}}return g};function u(m){a=m(n)}function d(m){const{props:g}=n,y=Qb(n.parent)||{},v=[],_=new Set;let T={},C=1/0;for(let j=0;j<kj;j++){const A=Dj[j],k=i[A],R=g[A]!==void 0?g[A]:y[A],Y=Ql(R),H=A===m?k.isActive:null;H===!1&&(C=j);let V=R===y[A]&&R!==g[A]&&Y;if(V&&o&&n.manuallyAnimateOnMount&&(V=!1),k.protectedKeys={...T},!k.isActive&&H===null||!R&&!k.prevProp||sc(R)||typeof R=="boolean")continue;const G=Oj(k.prevProp,R);let L=G||A===m&&k.isActive&&!V&&Y||j>C&&Y,W=!1;const ae=Array.isArray(R)?R:[R];let I=ae.reduce(r(A),{});H===!1&&(I={});const{prevResolvedValues:ie={}}=k,K={...ie,...I},F=q=>{L=!0,_.has(q)&&(W=!0,_.delete(q)),k.needsAnimating[q]=!0;const te=n.getValue(q);te&&(te.liveStyle=!1)};for(const q in K){const te=I[q],we=ie[q];if(T.hasOwnProperty(q))continue;let ge=!1;tf(te)&&tf(we)?ge=!hb(te,we):ge=te!==we,ge?te!=null?F(q):_.add(q):te!==void 0&&_.has(q)?F(q):k.protectedKeys[q]=!0}k.prevProp=R,k.prevResolvedValues=I,k.isActive&&(T={...T,...I}),o&&n.blockInitialAnimation&&(L=!1),L&&(!(V&&G)||W)&&v.push(...ae.map(q=>({animation:q,options:{type:A}})))}if(_.size){const j={};_.forEach(A=>{const k=n.getBaseTarget(A),R=n.getValue(A);R&&(R.liveStyle=!0),j[A]=k??null}),v.push({animation:j})}let E=!!v.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(E=!1),o=!1,E?a(v):Promise.resolve()}function p(m,g){var y;if(i[m].isActive===g)return Promise.resolve();(y=n.variantChildren)===null||y===void 0||y.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const v=d(m);for(const _ in i)i[_].protectedKeys={};return v}return{animateChanges:d,setActive:p,setAnimateFunction:u,getState:()=>i,reset:()=>{i=sv(),o=!0}}}function Oj(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!hb(a,n):!1}function Ns(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function sv(){return{animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()}}class rs{constructor(a){this.isMounted=!1,this.node=a}update(){}}class Bj extends rs{constructor(a){super(a),a.animationState||(a.animationState=Rj(a))}updateAnimationControlsSubscription(){const{animate:a}=this.node.getProps();sc(a)&&(this.unmountControls=a.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:a}=this.node.getProps(),{animate:i}=this.node.prevProps||{};a!==i&&this.updateAnimationControlsSubscription()}unmount(){var a;this.node.animationState.reset(),(a=this.unmountControls)===null||a===void 0||a.call(this)}}let Lj=0;class Uj extends rs{constructor(){super(...arguments),this.id=Lj++}update(){if(!this.node.presenceContext)return;const{isPresent:a,onExitComplete:i}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||a===o)return;const r=this.node.animationState.setActive("exit",!a);i&&!a&&r.then(()=>i(this.id))}mount(){const{register:a}=this.node.presenceContext||{};a&&(this.unmount=a(this.id))}unmount(){}}const zj={animation:{Feature:Bj},exit:{Feature:Uj}},Hn={x:!1,y:!1};function Jb(){return Hn.x||Hn.y}function Ij(n){return n==="x"||n==="y"?Hn[n]?null:(Hn[n]=!0,()=>{Hn[n]=!1}):Hn.x||Hn.y?null:(Hn.x=Hn.y=!0,()=>{Hn.x=Hn.y=!1})}const mh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function to(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function ro(n){return{point:{x:n.pageX,y:n.pageY}}}const Vj=n=>a=>mh(a)&&n(a,ro(a));function Fl(n,a,i,o){return to(n,a,Vj(i),o)}const iv=(n,a)=>Math.abs(n-a);function Hj(n,a){const i=iv(n.x,a.x),o=iv(n.y,a.y);return Math.sqrt(i**2+o**2)}class Wb{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:u=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Ld(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=Hj(v.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:C}=v,{timestamp:E}=Pt;this.history.push({...C,timestamp:E});const{onStart:j,onMove:A}=this.handlers;_||(j&&j(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,v)},this.handlePointerMove=(v,_)=>{this.lastMoveEvent=v,this.lastMoveEventInfo=Bd(_,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(v,_)=>{this.end();const{onEnd:T,onSessionEnd:C,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const j=Ld(v.type==="pointercancel"?this.lastMoveEventInfo:Bd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(v,j),C&&C(v,j)},!mh(a))return;this.dragSnapToOrigin=u,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const d=ro(a),p=Bd(d,this.transformPagePoint),{point:m}=p,{timestamp:g}=Pt;this.history=[{...m,timestamp:g}];const{onSessionStart:y}=i;y&&y(a,Ld(p,this.history)),this.removeListeners=oo(Fl(this.contextWindow,"pointermove",this.handlePointerMove),Fl(this.contextWindow,"pointerup",this.handlePointerUp),Fl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),is(this.updatePoint)}}function Bd(n,a){return a?{point:a(n.point)}:n}function lv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Ld({point:n},a){return{point:n,delta:lv(n,e1(a)),offset:lv(n,Pj(a)),velocity:Gj(a,.1)}}function Pj(n){return n[0]}function e1(n){return n[n.length-1]}function Gj(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=e1(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>Ca(a)));)i--;if(!o)return{x:0,y:0};const u=Aa(r.timestamp-o.timestamp);if(u===0)return{x:0,y:0};const d={x:(r.x-o.x)/u,y:(r.y-o.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const t1=1e-4,Fj=1-t1,qj=1+t1,n1=.01,$j=0-n1,Yj=0+n1;function Sn(n){return n.max-n.min}function Kj(n,a,i){return Math.abs(n-a)<=i}function ov(n,a,i,o=.5){n.origin=o,n.originPoint=ut(a.min,a.max,n.origin),n.scale=Sn(i)/Sn(a),n.translate=ut(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Fj&&n.scale<=qj||isNaN(n.scale))&&(n.scale=1),(n.translate>=$j&&n.translate<=Yj||isNaN(n.translate))&&(n.translate=0)}function ql(n,a,i,o){ov(n.x,a.x,i.x,o?o.originX:void 0),ov(n.y,a.y,i.y,o?o.originY:void 0)}function rv(n,a,i){n.min=i.min+a.min,n.max=n.min+Sn(a)}function Zj(n,a,i){rv(n.x,a.x,i.x),rv(n.y,a.y,i.y)}function cv(n,a,i){n.min=a.min-i.min,n.max=n.min+Sn(a)}function $l(n,a,i){cv(n.x,a.x,i.x),cv(n.y,a.y,i.y)}function Xj(n,{min:a,max:i},o){return a!==void 0&&n<a?n=o?ut(a,n,o.min):Math.max(n,a):i!==void 0&&n>i&&(n=o?ut(i,n,o.max):Math.min(n,i)),n}function uv(n,a,i){return{min:a!==void 0?n.min+a:void 0,max:i!==void 0?n.max+i-(n.max-n.min):void 0}}function Qj(n,{top:a,left:i,bottom:o,right:r}){return{x:uv(n.x,i,r),y:uv(n.y,a,o)}}function dv(n,a){let i=a.min-n.min,o=a.max-n.max;return a.max-a.min<n.max-n.min&&([i,o]=[o,i]),{min:i,max:o}}function Jj(n,a){return{x:dv(n.x,a.x),y:dv(n.y,a.y)}}function Wj(n,a){let i=.5;const o=Sn(n),r=Sn(a);return r>o?i=Oi(a.min,a.max-o,n.min):o>r&&(i=Oi(n.min,n.max-r,a.min)),Na(0,1,i)}function e2(n,a){const i={};return a.min!==void 0&&(i.min=a.min-n.min),a.max!==void 0&&(i.max=a.max-n.min),i}const hf=.35;function t2(n=hf){return n===!1?n=0:n===!0&&(n=hf),{x:fv(n,"left","right"),y:fv(n,"top","bottom")}}function fv(n,a,i){return{min:hv(n,a),max:hv(n,i)}}function hv(n,a){return typeof n=="number"?n:n[a]||0}const pv=()=>({translate:0,scale:1,origin:0,originPoint:0}),wi=()=>({x:pv(),y:pv()}),mv=()=>({min:0,max:0}),xt=()=>({x:mv(),y:mv()});function Rn(n){return[n("x"),n("y")]}function a1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function n2({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function a2(n,a){if(!a)return n;const i=a({x:n.left,y:n.top}),o=a({x:n.right,y:n.bottom});return{top:i.y,left:i.x,bottom:o.y,right:o.x}}function Ud(n){return n===void 0||n===1}function pf({scale:n,scaleX:a,scaleY:i}){return!Ud(n)||!Ud(a)||!Ud(i)}function ks(n){return pf(n)||s1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function s1(n){return gv(n.x)||gv(n.y)}function gv(n){return n&&n!=="0%"}function qr(n,a,i){const o=n-i,r=a*o;return i+r}function yv(n,a,i,o,r){return r!==void 0&&(n=qr(n,r,o)),qr(n,i,o)+a}function mf(n,a=0,i=1,o,r){n.min=yv(n.min,a,i,o,r),n.max=yv(n.max,a,i,o,r)}function i1(n,{x:a,y:i}){mf(n.x,a.translate,a.scale,a.originPoint),mf(n.y,i.translate,i.scale,i.originPoint)}const vv=.999999999999,bv=1.0000000000001;function s2(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let u,d;for(let p=0;p<r;p++){u=i[p],d=u.projectionDelta;const{visualElement:m}=u.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ki(n,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),d&&(a.x*=d.x.scale,a.y*=d.y.scale,i1(n,d)),o&&ks(u.latestValues)&&ki(n,u.latestValues))}a.x<bv&&a.x>vv&&(a.x=1),a.y<bv&&a.y>vv&&(a.y=1)}function Di(n,a){n.min=n.min+a,n.max=n.max+a}function Sv(n,a,i,o,r=.5){const u=ut(n.min,n.max,r);mf(n,a,i,u,o)}function ki(n,a){Sv(n.x,a.x,a.scaleX,a.scale,a.originX),Sv(n.y,a.y,a.scaleY,a.scale,a.originY)}function l1(n,a){return a1(a2(n.getBoundingClientRect(),a))}function i2(n,a,i){const o=l1(n,i),{scroll:r}=a;return r&&(Di(o.x,r.offset.x),Di(o.y,r.offset.y)),o}const o1=({current:n})=>n?n.ownerDocument.defaultView:null,l2=new WeakMap;class o2{constructor(a){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=xt(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=y=>{const{dragSnapToOrigin:v}=this.getProps();v?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(ro(y).point)},u=(y,v)=>{const{drag:_,dragPropagation:T,onDragStart:C}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ij(_),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Rn(j=>{let A=this.getAxisMotionValue(j).get()||0;if(Jn.test(A)){const{projection:k}=this.visualElement;if(k&&k.layout){const R=k.layout.layoutBox[j];R&&(A=Sn(R)*(parseFloat(A)/100))}}this.originPoint[j]=A}),C&&st.postRender(()=>C(y,v)),nf(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},d=(y,v)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:C,onDrag:E}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:j}=v;if(T&&this.currentDirection===null){this.currentDirection=r2(j),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",v.point,j),this.updateAxis("y",v.point,j),this.visualElement.render(),E&&E(y,v)},p=(y,v)=>this.stop(y,v),m=()=>Rn(y=>{var v;return this.getAnimationState(y)==="paused"&&((v=this.getAxisMotionValue(y).animation)===null||v===void 0?void 0:v.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new Wb(a,{onSessionStart:r,onStart:u,onMove:d,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:o1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:u}=this.getProps();u&&st.postRender(()=>u(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!jr(a,r,this.currentDirection))return;const u=this.getAxisMotionValue(a);let d=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(d=Xj(d,this.constraints[a],this.elastic[a])),u.set(d)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,u=this.constraints;i&&ji(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=Qj(r.layoutBox,i):this.constraints=!1,this.elastic=t2(o),u!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Rn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=e2(r.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!ji(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const u=i2(o,r.root,this.visualElement.getTransformPagePoint());let d=Jj(r.layout.layoutBox,u);if(i){const p=i(n2(d));this.hasMutatedConstraints=!!p,p&&(d=a1(p))}return d}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=Rn(y=>{if(!jr(y,i,this.currentDirection))return;let v=m&&m[y]||{};d&&(v={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,C={type:"inertia",velocity:o?a[y]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...u,...v};return this.startAxisValueAnimation(y,C)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return nf(this.visualElement,a),o.start(ph(a,o,0,i,this.visualElement,!1))}stopAnimation(){Rn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Rn(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){Rn(i=>{const{drag:o}=this.getProps();if(!jr(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,u=this.getAxisMotionValue(i);if(r&&r.layout){const{min:d,max:p}=r.layout.layoutBox[i];u.set(a[i]-ut(d,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!ji(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Rn(d=>{const p=this.getAxisMotionValue(d);if(p&&this.constraints!==!1){const m=p.get();r[d]=Wj({min:m,max:m},this.constraints[d])}});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Rn(d=>{if(!jr(d,a,null))return;const p=this.getAxisMotionValue(d),{min:m,max:g}=this.constraints[d];p.set(ut(m,g,r[d]))})}addListeners(){if(!this.visualElement.current)return;l2.set(this.visualElement,this);const a=this.visualElement.current,i=Fl(a,"pointerdown",m=>{const{drag:g,dragListener:y=!0}=this.getProps();g&&y&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();ji(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,u=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),st.read(o);const d=to(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Rn(y=>{const v=this.getAxisMotionValue(y);v&&(this.originPoint[y]+=m[y].translate,v.set(v.get()+m[y].translate))}),this.visualElement.render())}));return()=>{d(),i(),u(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:u=!1,dragElastic:d=hf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:u,dragElastic:d,dragMomentum:p}}}function jr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function r2(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class c2 extends rs{constructor(a){super(a),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new o2(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const _v=n=>(a,i)=>{n&&st.postRender(()=>n(a,i))};class u2 extends rs{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(a){this.session=new Wb(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:o1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:_v(a),onStart:_v(i),onMove:o,onEnd:(u,d)=>{delete this.session,r&&st.postRender(()=>r(u,d))}}}mount(){this.removePointerDownListener=Fl(this.node.current,"pointerdown",a=>this.onPointerDown(a))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ur={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function xv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Bl={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(me.test(n))n=parseFloat(n);else return n;const i=xv(n,a.target.x),o=xv(n,a.target.y);return`${i}% ${o}%`}},d2={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=ls.parse(n);if(r.length>5)return o;const u=ls.createTransformer(n),d=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+d]/=p,r[1+d]/=m;const g=ut(p,m,.5);return typeof r[2+d]=="number"&&(r[2+d]/=g),typeof r[3+d]=="number"&&(r[3+d]/=g),u(r)}};class f2 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:u}=a;zC(h2),u&&(i.group&&i.group.add(u),o&&o.register&&r&&o.register(u),u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,onExitComplete:()=>this.safeToRemove()})),Ur.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:u}=this.props,d=o.projection;return d&&(d.isPresent=u,r||a.layoutDependency!==i||i===void 0?d.willUpdate():this.safeToRemove(),a.isPresent!==u&&(u?d.promote():d.relegate()||st.postRender(()=>{const p=d.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),Gf.postRender(()=>{!a.currentAnimation&&a.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o}=this.props,{projection:r}=a;r&&(r.scheduleCheckAfterUnmount(),i&&i.group&&i.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:a}=this.props;a&&a()}render(){return null}}function r1(n){const[a,i]=$0(),o=S.useContext(Lf);return h.jsx(f2,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(eb),isPresent:a,safeToRemove:i})}const h2={borderRadius:{...Bl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Bl,borderTopRightRadius:Bl,borderBottomLeftRadius:Bl,borderBottomRightRadius:Bl,boxShadow:d2};function p2(n,a,i){const o=Yt(n)?n:Wl(n);return o.start(ph("",o,a,i)),o.animation}function m2(n){return n instanceof SVGElement&&n.tagName!=="svg"}const g2=(n,a)=>n.depth-a.depth;class y2{constructor(){this.children=[],this.isDirty=!1}add(a){eh(this.children,a),this.isDirty=!0}remove(a){th(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(g2),this.isDirty=!1,this.children.forEach(a)}}function v2(n,a){const i=Wn.now(),o=({timestamp:r})=>{const u=r-i;u>=a&&(is(o),n(u-a))};return st.read(o,!0),()=>is(o)}const c1=["TopLeft","TopRight","BottomLeft","BottomRight"],b2=c1.length,Tv=n=>typeof n=="string"?parseFloat(n):n,Ev=n=>typeof n=="number"||me.test(n);function S2(n,a,i,o,r,u){r?(n.opacity=ut(0,i.opacity!==void 0?i.opacity:1,_2(o)),n.opacityExit=ut(a.opacity!==void 0?a.opacity:1,0,x2(o))):u&&(n.opacity=ut(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let d=0;d<b2;d++){const p=`border${c1[d]}Radius`;let m=Cv(a,p),g=Cv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||Ev(m)===Ev(g)?(n[p]=Math.max(ut(Tv(m),Tv(g),o),0),(Jn.test(g)||Jn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=ut(a.rotate||0,i.rotate||0,o))}function Cv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const _2=u1(0,.5,Ab),x2=u1(.5,.95,bn);function u1(n,a,i){return o=>o<n?0:o>a?1:i(Oi(n,a,o))}function Av(n,a){n.min=a.min,n.max=a.max}function Mn(n,a){Av(n.x,a.x),Av(n.y,a.y)}function jv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Nv(n,a,i,o,r){return n-=a,n=qr(n,1/i,o),r!==void 0&&(n=qr(n,1/r,o)),n}function T2(n,a=0,i=1,o=.5,r,u=n,d=n){if(Jn.test(a)&&(a=parseFloat(a),a=ut(d.min,d.max,a/100)-d.min),typeof a!="number")return;let p=ut(u.min,u.max,o);n===u&&(p-=a),n.min=Nv(n.min,a,i,p,r),n.max=Nv(n.max,a,i,p,r)}function wv(n,a,[i,o,r],u,d){T2(n,a[i],a[o],a[r],a.scale,u,d)}const E2=["x","scaleX","originX"],C2=["y","scaleY","originY"];function Dv(n,a,i,o){wv(n.x,a,E2,i?i.x:void 0,o?o.x:void 0),wv(n.y,a,C2,i?i.y:void 0,o?o.y:void 0)}function kv(n){return n.translate===0&&n.scale===1}function d1(n){return kv(n.x)&&kv(n.y)}function Mv(n,a){return n.min===a.min&&n.max===a.max}function A2(n,a){return Mv(n.x,a.x)&&Mv(n.y,a.y)}function Rv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function f1(n,a){return Rv(n.x,a.x)&&Rv(n.y,a.y)}function Ov(n){return Sn(n.x)/Sn(n.y)}function Bv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class j2{constructor(){this.members=[]}add(a){eh(this.members,a),a.scheduleRender()}remove(a){if(th(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const u=this.members[r];if(u.isPresent!==!1){o=u;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function N2(n,a,i){let o="";const r=n.x.translate/a.x,u=n.y.translate/a.y,d=(i==null?void 0:i.z)||0;if((r||u||d)&&(o=`translate3d(${r}px, ${u}px, ${d}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:y,rotateX:v,rotateY:_,skewX:T,skewY:C}=i;g&&(o=`perspective(${g}px) ${o}`),y&&(o+=`rotate(${y}deg) `),v&&(o+=`rotateX(${v}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),C&&(o+=`skewY(${C}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const Ms={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Vl=typeof window<"u"&&window.MotionDebug!==void 0,zd=["","X","Y","Z"],w2={visibility:"hidden"},Lv=1e3;let D2=0;function Id(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function h1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=gb(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:u}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",st,!(r||u))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&h1(o)}function p1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(d={},p=a==null?void 0:a()){this.id=D2++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Vl&&(Ms.totalNodes=Ms.resolvedTargetDeltas=Ms.recalculatedProjection=0),this.nodes.forEach(R2),this.nodes.forEach(z2),this.nodes.forEach(I2),this.nodes.forEach(O2),Vl&&window.MotionDebug.record(Ms)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new y2)}addEventListener(d,p){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new nh),this.eventHandlers.get(d).add(p)}notifyListeners(d,...p){const m=this.eventHandlers.get(d);m&&m.notify(...p)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=m2(d),this.instance=d;const{layoutId:m,layout:g,visualElement:y}=this.options;if(y&&!y.current&&y.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let v;const _=()=>this.root.updateBlockedByResize=!1;n(d,()=>{this.root.updateBlockedByResize=!0,v&&v(),v=v2(_,250),Ur.hasAnimatedSinceResize&&(Ur.hasAnimatedSinceResize=!1,this.nodes.forEach(zv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&y&&(m||g)&&this.addEventListener("didUpdate",({delta:v,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=this.options.transition||y.getDefaultTransition()||F2,{onLayoutAnimationStart:j,onLayoutAnimationComplete:A}=y.getProps(),k=!this.targetLayout||!f1(this.targetLayout,C)||T,R=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||R||_&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(v,R);const Y={...Wf(E,"layout"),onPlay:j,onComplete:A};(y.shouldReduceMotion||this.options.layoutRoot)&&(Y.delay=0,Y.type=!1),this.startAnimation(Y)}else _||zv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,is(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(V2),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&h1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];v.shouldResetTransform=!0,v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Uv);return}this.isUpdating||this.nodes.forEach(L2),this.isUpdating=!1,this.nodes.forEach(U2),this.nodes.forEach(k2),this.nodes.forEach(M2),this.clearAllSnapshots();const p=Wn.now();Pt.delta=Na(0,1e3/60,p-Pt.timestamp),Pt.timestamp=p,Pt.isProcessing=!0,Dd.update.process(Pt),Dd.preRender.process(Pt),Dd.render.process(Pt),Pt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(B2),this.sharedNodes.forEach(H2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=xt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(p=!1),p){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!d1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;d&&(p||ks(this.latestValues)||y)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return d&&(m=this.removeTransform(m)),q2(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:p}=this.options;if(!p)return xt();const m=p.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some($2))){const{scroll:y}=this.root;y&&(Di(m.x,y.offset.x),Di(m.y,y.offset.y))}return m}removeElementScroll(d){var p;const m=xt();if(Mn(m,d),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:v,options:_}=y;y!==this.root&&v&&_.layoutScroll&&(v.wasRoot&&Mn(m,d),Di(m.x,v.offset.x),Di(m.y,v.offset.y))}return m}applyTransform(d,p=!1){const m=xt();Mn(m,d);for(let g=0;g<this.path.length;g++){const y=this.path[g];!p&&y.options.layoutScroll&&y.scroll&&y!==y.root&&ki(m,{x:-y.scroll.offset.x,y:-y.scroll.offset.y}),ks(y.latestValues)&&ki(m,y.latestValues)}return ks(this.latestValues)&&ki(m,this.latestValues),m}removeTransform(d){const p=xt();Mn(p,d);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!ks(g.latestValues))continue;pf(g.latestValues)&&g.updateSnapshot();const y=xt(),v=g.measurePageBox();Mn(y,v),Dv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,y)}return ks(this.latestValues)&&Dv(p,this.latestValues),p}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:v,layoutId:_}=this.options;if(!(!this.layout||!(v||_))){if(this.resolvedRelativeTargetAt=Pt.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),$l(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=xt(),this.targetWithTransforms=xt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Zj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Mn(this.target,this.layout.layoutBox),i1(this.target,this.targetDelta)):Mn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const T=this.getClosestProjectingParent();T&&!!T.resumingFrom==!!this.resumingFrom&&!T.options.layoutScroll&&T.target&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=xt(),this.relativeTargetOrigin=xt(),$l(this.relativeTargetOrigin,this.target,T.target),Mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vl&&Ms.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||pf(this.parent.latestValues)||s1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const p=this.getLead(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Pt.timestamp&&(g=!1),g)return;const{layout:y,layoutId:v}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||v))return;Mn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;s2(this.layoutCorrected,this.treeScale,this.path,m),p.layout&&!p.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(p.target=p.layout.layoutBox,p.targetWithTransforms=xt());const{target:C}=p;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(jv(this.prevProjectionDelta.x,this.projectionDelta.x),jv(this.prevProjectionDelta.y,this.projectionDelta.y)),ql(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Bv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Bv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C)),Vl&&Ms.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),d){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=wi(),this.projectionDelta=wi(),this.projectionDeltaWithTransform=wi()}setAnimationOrigin(d,p=!1){const m=this.snapshot,g=m?m.latestValues:{},y={...this.latestValues},v=wi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const _=xt(),T=m?m.source:void 0,C=this.layout?this.layout.source:void 0,E=T!==C,j=this.getStack(),A=!j||j.members.length<=1,k=!!(E&&!A&&this.options.crossfade===!0&&!this.path.some(G2));this.animationProgress=0;let R;this.mixTargetDelta=Y=>{const H=Y/1e3;Iv(v.x,d.x,H),Iv(v.y,d.y,H),this.setTargetDelta(v),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),P2(this.relativeTarget,this.relativeTargetOrigin,_,H),R&&A2(this.relativeTarget,R)&&(this.isProjectionDirty=!1),R||(R=xt()),Mn(R,this.relativeTarget)),E&&(this.animationValues=y,S2(y,g,this.latestValues,H,k,A)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=H},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(is(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{Ur.hasAnimatedSinceResize=!0,this.currentAnimation=p2(0,Lv,{...d,onUpdate:p=>{this.mixTargetDelta(p),d.onUpdate&&d.onUpdate(p)},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Lv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:y}=d;if(!(!p||!m||!g)){if(this!==d&&this.layout&&g&&m1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||xt();const v=Sn(this.layout.layoutBox.x);m.x.min=d.target.x.min,m.x.max=m.x.min+v;const _=Sn(this.layout.layoutBox.y);m.y.min=d.target.y.min,m.y.max=m.y.min+_}Mn(p,m),ki(p,y),ql(this.projectionDeltaWithTransform,this.layoutCorrected,p,y)}}registerSharedNode(d,p){this.sharedNodes.has(d)||this.sharedNodes.set(d,new j2),this.sharedNodes.get(d).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:p}=this.options;return p?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:p}=this.options;return p?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),d&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let p=!1;const{latestValues:m}=d;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&Id("z",d,g,this.animationValues);for(let y=0;y<zd.length;y++)Id(`rotate${zd[y]}`,d,g,this.animationValues),Id(`skew${zd[y]}`,d,g,this.animationValues);d.render();for(const y in g)d.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);d.scheduleRender()}getProjectionStyles(d){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return w2;const g={visibility:""},y=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Br(d==null?void 0:d.pointerEvents)||"",g.transform=y?y(this.latestValues,""):"none",g;const v=this.getLead();if(!this.projectionDelta||!this.layout||!v.target){const E={};return this.options.layoutId&&(E.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,E.pointerEvents=Br(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!ks(this.latestValues)&&(E.transform=y?y({},""):"none",this.hasProjected=!1),E}const _=v.animationValues||v.latestValues;this.applyTransformsToTarget(),g.transform=N2(this.projectionDeltaWithTransform,this.treeScale,_),y&&(g.transform=y(_,g.transform));const{x:T,y:C}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${C.origin*100}% 0`,v.animationValues?g.opacity=v===this?(m=(p=_.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=v===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const E in Vr){if(_[E]===void 0)continue;const{correct:j,applyTo:A}=Vr[E],k=g.transform==="none"?_[E]:j(_[E],v);if(A){const R=A.length;for(let Y=0;Y<R;Y++)g[A[Y]]=k}else g[E]=k}return this.options.layoutId&&(g.pointerEvents=v===this?Br(d==null?void 0:d.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var p;return(p=d.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Uv),this.root.sharedNodes.clear()}}}function k2(n){n.updateLayout()}function M2(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:u}=n.options,d=i.source!==n.layout.source;u==="size"?Rn(v=>{const _=d?i.measuredBox[v]:i.layoutBox[v],T=Sn(_);_.min=o[v].min,_.max=_.min+T}):m1(u,i.layoutBox,o)&&Rn(v=>{const _=d?i.measuredBox[v]:i.layoutBox[v],T=Sn(o[v]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[v].max=n.relativeTarget[v].min+T)});const p=wi();ql(p,o,i.layoutBox);const m=wi();d?ql(m,n.applyTransform(r,!0),i.measuredBox):ql(m,o,i.layoutBox);const g=!d1(p);let y=!1;if(!n.resumeFrom){const v=n.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:_,layout:T}=v;if(_&&T){const C=xt();$l(C,i.layoutBox,_.layoutBox);const E=xt();$l(E,o,T.layoutBox),f1(C,E)||(y=!0),v.options.layoutRoot&&(n.relativeTarget=E,n.relativeTargetOrigin=C,n.relativeParent=v)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:y})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function R2(n){Vl&&Ms.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function O2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function B2(n){n.clearSnapshot()}function Uv(n){n.clearMeasurements()}function L2(n){n.isLayoutDirty=!1}function U2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function zv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function z2(n){n.resolveTargetDelta()}function I2(n){n.calcProjection()}function V2(n){n.resetSkewAndRotation()}function H2(n){n.removeLeadSnapshot()}function Iv(n,a,i){n.translate=ut(a.translate,0,i),n.scale=ut(a.scale,1,i),n.origin=a.origin,n.originPoint=a.originPoint}function Vv(n,a,i,o){n.min=ut(a.min,i.min,o),n.max=ut(a.max,i.max,o)}function P2(n,a,i,o){Vv(n.x,a.x,i.x,o),Vv(n.y,a.y,i.y,o)}function G2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const F2={duration:.45,ease:[.4,0,.1,1]},Hv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Pv=Hv("applewebkit/")&&!Hv("chrome/")?Math.round:bn;function Gv(n){n.min=Pv(n.min),n.max=Pv(n.max)}function q2(n){Gv(n.x),Gv(n.y)}function m1(n,a,i){return n==="position"||n==="preserve-aspect"&&!Kj(Ov(a),Ov(i),.2)}function $2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const Y2=p1({attachResizeListener:(n,a)=>to(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vd={current:void 0},g1=p1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Vd.current){const n=new Y2({});n.mount(window),n.setOptions({layoutScroll:!0}),Vd.current=n}return Vd.current},resetTransform:(n,a)=>{n.style.transform=a!==void 0?a:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),K2={pan:{Feature:u2},drag:{Feature:c2,ProjectionNode:g1,MeasureLayout:r1}};function Z2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const u=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return u?Array.from(u):[]}return Array.from(n)}function y1(n,a){const i=Z2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Fv(n){return a=>{a.pointerType==="touch"||Jb()||n(a)}}function X2(n,a,i={}){const[o,r,u]=y1(n,i),d=Fv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const y=Fv(v=>{g(v),m.removeEventListener("pointerleave",y)});m.addEventListener("pointerleave",y,r)});return o.forEach(p=>{p.addEventListener("pointerenter",d,r)}),u}function qv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,u=o[r];u&&st.postRender(()=>u(a,ro(a)))}class Q2 extends rs{mount(){const{current:a}=this.node;a&&(this.unmount=X2(a,i=>(qv(this.node,i,"Start"),o=>qv(this.node,o,"End"))))}unmount(){}}class J2 extends rs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oo(to(this.node.current,"focus",()=>this.onFocus()),to(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const v1=(n,a)=>a?n===a?!0:v1(n,a.parentElement):!1,W2=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eN(n){return W2.has(n.tagName)||n.tabIndex!==-1}const Hl=new WeakSet;function $v(n){return a=>{a.key==="Enter"&&n(a)}}function Hd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const tN=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=$v(()=>{if(Hl.has(i))return;Hd(i,"down");const r=$v(()=>{Hd(i,"up")}),u=()=>Hd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",u,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function Yv(n){return mh(n)&&!Jb()}function nN(n,a,i={}){const[o,r,u]=y1(n,i),d=p=>{const m=p.currentTarget;if(!Yv(p)||Hl.has(m))return;Hl.add(m);const g=a(p),y=(T,C)=>{window.removeEventListener("pointerup",v),window.removeEventListener("pointercancel",_),!(!Yv(T)||!Hl.has(m))&&(Hl.delete(m),typeof g=="function"&&g(T,{success:C}))},v=T=>{y(T,i.useGlobalTarget||v1(m,T.target))},_=T=>{y(T,!1)};window.addEventListener("pointerup",v,r),window.addEventListener("pointercancel",_,r)};return o.forEach(p=>{!eN(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",d,r),p.addEventListener("focus",g=>tN(g,r),r)}),u}function Kv(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),u=o[r];u&&st.postRender(()=>u(a,ro(a)))}class aN extends rs{mount(){const{current:a}=this.node;a&&(this.unmount=nN(a,i=>(Kv(this.node,i,"Start"),(o,{success:r})=>Kv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const gf=new WeakMap,Pd=new WeakMap,sN=n=>{const a=gf.get(n.target);a&&a(n)},iN=n=>{n.forEach(sN)};function lN({root:n,...a}){const i=n||document;Pd.has(i)||Pd.set(i,{});const o=Pd.get(i),r=JSON.stringify(a);return o[r]||(o[r]=new IntersectionObserver(iN,{root:n,...a})),o[r]}function oN(n,a,i){const o=lN(a);return gf.set(n,i),o.observe(n),()=>{gf.delete(n),o.unobserve(n)}}const rN={some:0,all:1};class cN extends rs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:u}=a,d={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:rN[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),_=g?y:v;_&&_(m)};return oN(this.node.current,d,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(uN(a,i))&&this.startObserver()}unmount(){}}function uN({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const dN={inView:{Feature:cN},tap:{Feature:aN},focus:{Feature:J2},hover:{Feature:Q2}},fN={layout:{ProjectionNode:g1,MeasureLayout:r1}},$r={current:null},gh={current:!1};function b1(){if(gh.current=!0,!!If)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>$r.current=n.matches;n.addListener(a),a()}else $r.current=!1}const hN=[...Vb,$t,ls],pN=n=>hN.find(Ib(n)),Zv=new WeakMap;function mN(n,a,i){for(const o in a){const r=a[o],u=i[o];if(Yt(r))n.addValue(o,r);else if(Yt(u))n.addValue(o,Wl(r,{owner:n}));else if(u!==r)if(n.hasValue(o)){const d=n.getValue(o);d.liveStyle===!0?d.jump(r):d.hasAnimated||d.set(r)}else{const d=n.getStaticValue(o);n.addValue(o,Wl(d!==void 0?d:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class gN{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:u,visualState:d},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=dh,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const T=Wn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,st.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:y}=d;this.onUpdate=y,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!u,this.isControllingVariants=ic(i),this.isVariantNode=J0(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:v,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in _){const C=_[T];m[T]!==void 0&&Yt(C)&&C.set(m[T],!1)}}mount(a){this.current=a,Zv.set(a,this),this.projection&&!this.projection.instance&&this.projection.mount(a),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,o)=>this.bindToMotionValue(o,i)),gh.current||b1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$r.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Zv.delete(this.current),this.projection&&this.projection.unmount(),is(this.notifyUpdate),is(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Is.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&st.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),u=i.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),u(),d&&d(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Ri){const i=Ri[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const u=this.features[a];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):xt()}getStaticValue(a){return this.latestValues[a]}setStaticValue(a,i){this.latestValues[a]=i}update(a,i){(a.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=a,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let o=0;o<Xv.length;o++){const r=Xv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const u="on"+r,d=a[u];d&&(this.propEventSubscriptions[r]=this.on(r,d))}this.prevMotionValues=mN(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Wl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Ub(r)||Nb(r))?r=parseFloat(r):!pN(r)&&ls.test(i)&&(r=Ob(a,i)),this.setBaseTarget(a,Yt(r)?r.get():r)),Yt(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const d=qf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);d&&(r=d[a])}if(o&&r!==void 0)return r;const u=this.getBaseTargetFromProps(this.props,a);return u!==void 0&&!Yt(u)?u:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new nh),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class S1 extends gN{constructor(){super(...arguments),this.KeyframeResolver=Hb}sortInstanceNodePosition(a,i){return a.compareDocumentPosition(i)&2?1:-1}getBaseTargetFromProps(a,i){return a.style?a.style[i]:void 0}removeValueFromRenderState(a,{vars:i,style:o}){delete i[a],delete o[a]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:a}=this.props;Yt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function yN(n){return window.getComputedStyle(n)}class vN extends S1{constructor(){super(...arguments),this.type="html",this.renderInstance=ob}readValueFromInstance(a,i){if(Is.has(i)){const o=uh(i);return o&&o.default||0}else{const o=yN(a),r=(sb(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return l1(a,i)}build(a,i,o){Kf(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return Jf(a,i,o)}}class bN extends S1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xt}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Is.has(i)){const o=uh(i);return o&&o.default||0}return i=rb.has(i)?i:Pf(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return db(a,i,o)}build(a,i,o){Zf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){cb(a,i,o,r)}mount(a){this.isSVGTag=Qf(a.tagName),super.mount(a)}}const SN=(n,a)=>Ff(n)?new bN(a):new vN(a,{allowProjection:n!==S.Fragment}),_N=YC({...zj,...dN,...K2,...fN},SN),un=rC(_N);function xN(){!gh.current&&b1();const[n]=S.useState($r.current);return n}var pt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.TEXT=1]="TEXT",n[n.TOOL_USE=2]="TOOL_USE",n[n.TOOL_RESULT=3]="TOOL_RESULT",n[n.ERROR=4]="ERROR",n[n.STATUS=5]="STATUS",n[n.SYSTEM=6]="SYSTEM",n[n.FINDING=7]="FINDING",n[n.SUBTASK_CREATE=8]="SUBTASK_CREATE",n[n.USER_INPUT=9]="USER_INPUT"})(pt||(pt={}));var Nt;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NOT_STARTED=1]="NOT_STARTED",n[n.WORKING=3]="WORKING",n[n.PAUSED=4]="PAUSED",n[n.COMPLETE=5]="COMPLETE",n[n.FAILED=6]="FAILED"})(Nt||(Nt={}));var ts;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(ts||(ts={}));var ns;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(ns||(ns={}));var Kn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Kn||(Kn={}));var as;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(as||(as={}));const TN=8;Object.assign(Object.create(null),{"":pt.UNSPECIFIED,text:pt.TEXT,tool_use:pt.TOOL_USE,tool_result:pt.TOOL_RESULT,error:pt.ERROR,status:pt.STATUS,system:pt.SYSTEM,finding:pt.FINDING,subtask_create:pt.SUBTASK_CREATE,user_input:pt.USER_INPUT});pt.UNSPECIFIED+"",pt.TEXT+"",pt.TOOL_USE+"",pt.TOOL_RESULT+"",pt.ERROR+"",pt.STATUS+"",pt.SYSTEM+"",pt.FINDING+"",pt.SUBTASK_CREATE+"",pt.USER_INPUT+"";Object.assign(Object.create(null),{"":Nt.UNSPECIFIED,not_started:Nt.NOT_STARTED,working:Nt.WORKING,paused:Nt.PAUSED,complete:Nt.COMPLETE,failed:Nt.FAILED,pending:Nt.NOT_STARTED,assigned:Nt.NOT_STARTED,in_progress:Nt.WORKING,waiting_input:Nt.PAUSED,review:Nt.PAUSED,done:Nt.COMPLETE});Nt.UNSPECIFIED+"",Nt.NOT_STARTED+"",Nt.WORKING+"",Nt.PAUSED+"",Nt.COMPLETE+"",Nt.FAILED+"";Object.assign(Object.create(null),{"":ts.UNSPECIFIED,active:ts.ACTIVE,archived:ts.ARCHIVED});ts.UNSPECIFIED+"",ts.ACTIVE+"",ts.ARCHIVED+"";Object.assign(Object.create(null),{"":ns.UNSPECIFIED,open:ns.OPEN,closed:ns.CLOSED});ns.UNSPECIFIED+"",ns.OPEN+"",ns.CLOSED+"";Object.assign(Object.create(null),{"":Kn.UNSPECIFIED,off:Kn.OFF,subscription:Kn.SUBSCRIPTION,api_key:Kn.API_KEY});Kn.UNSPECIFIED+"",Kn.OFF+"",Kn.SUBSCRIPTION+"",Kn.API_KEY+"";Object.assign(Object.create(null),{"":as.UNSPECIFIED,off:as.OFF,on:as.ON});as.UNSPECIFIED+"",as.OFF+"",as.ON+"";function wa(n){return Array.isArray?Array.isArray(n):T1(n)==="[object Array]"}function EN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function CN(n){return n==null?"":EN(n)}function Zn(n){return typeof n=="string"}function _1(n){return typeof n=="number"}function AN(n){return n===!0||n===!1||jN(n)&&T1(n)=="[object Boolean]"}function x1(n){return typeof n=="object"}function jN(n){return x1(n)&&n!==null}function vn(n){return n!=null}function Gd(n){return!n.trim().length}function T1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const NN="Incorrect 'index' type",wN=n=>`Invalid value for key ${n}`,DN=n=>`Pattern length exceeds max of ${n}.`,kN=n=>`Missing ${n} property in key`,MN=n=>`Property 'weight' in key '${n}' must be a positive integer`,Qv=Object.prototype.hasOwnProperty;class RN{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=E1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function E1(n){let a=null,i=null,o=null,r=1,u=null;if(Zn(n)||wa(n))o=n,a=Jv(n),i=yf(n);else{if(!Qv.call(n,"name"))throw new Error(kN("name"));const d=n.name;if(o=d,Qv.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(MN(d));a=Jv(d),i=yf(d),u=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:u}}function Jv(n){return wa(n)?n:n.split(".")}function yf(n){return wa(n)?n.join("."):n}function ON(n,a){let i=[],o=!1;const r=(u,d,p)=>{if(vn(u))if(!d[p])i.push(u);else{let m=d[p];const g=u[m];if(!vn(g))return;if(p===d.length-1&&(Zn(g)||_1(g)||AN(g)))i.push(CN(g));else if(wa(g)){o=!0;for(let y=0,v=g.length;y<v;y+=1)r(g[y],d,p+1)}else d.length&&r(g,d,p+1)}};return r(n,Zn(a)?a.split("."):a,0),o?i:i[0]}const BN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},LN={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(n,a)=>n.score===a.score?n.idx<a.idx?-1:1:n.score<a.score?-1:1},UN={location:0,threshold:.6,distance:100},zN={useExtendedSearch:!1,getFn:ON,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ye={...LN,...BN,...UN,...zN};const IN=/[^ ]+/g;function VN(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const u=r.match(IN).length;if(i.has(u))return i.get(u);const d=1/Math.pow(u,.5*n),p=parseFloat(Math.round(d*o)/o);return i.set(u,p),p},clear(){i.clear()}}}class yh{constructor({getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){this.norm=VN(i,3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}setSources(a=[]){this.docs=a}setIndexRecords(a=[]){this.records=a}setKeys(a=[]){this.keys=a,this._keysMap={},a.forEach((i,o)=>{this._keysMap[i.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Zn(this.docs[0])?this.docs.forEach((a,i)=>{this._addString(a,i)}):this.docs.forEach((a,i)=>{this._addObject(a,i)}),this.norm.clear())}add(a){const i=this.size();Zn(a)?this._addString(a,i):this._addObject(a,i)}removeAt(a){this.records.splice(a,1);for(let i=a,o=this.size();i<o;i+=1)this.records[i].i-=1}getValueForItemAtKeyId(a,i){return a[this._keysMap[i]]}size(){return this.records.length}_addString(a,i){if(!vn(a)||Gd(a))return;let o={v:a,i,n:this.norm.get(a)};this.records.push(o)}_addObject(a,i){let o={i,$:{}};this.keys.forEach((r,u)=>{let d=r.getFn?r.getFn(a):this.getFn(a,r.path);if(vn(d)){if(wa(d)){let p=[];const m=[{nestedArrIndex:-1,value:d}];for(;m.length;){const{nestedArrIndex:g,value:y}=m.pop();if(vn(y))if(Zn(y)&&!Gd(y)){let v={v:y,i:g,n:this.norm.get(y)};p.push(v)}else wa(y)&&y.forEach((v,_)=>{m.push({nestedArrIndex:_,value:v})})}o.$[u]=p}else if(Zn(d)&&!Gd(d)){let p={v:d,n:this.norm.get(d)};o.$[u]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function C1(n,a,{getFn:i=ye.getFn,fieldNormWeight:o=ye.fieldNormWeight}={}){const r=new yh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(E1)),r.setSources(a),r.create(),r}function HN(n,{getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){const{keys:o,records:r}=n,u=new yh({getFn:a,fieldNormWeight:i});return u.setKeys(o),u.setIndexRecords(r),u}function Nr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=ye.distance,ignoreLocation:u=ye.ignoreLocation}={}){const d=a/n.length;if(u)return d;const p=Math.abs(o-i);return r?d+p/r:p?1:d}function PN(n=[],a=ye.minMatchCharLength){let i=[],o=-1,r=-1,u=0;for(let d=n.length;u<d;u+=1){let p=n[u];p&&o===-1?o=u:!p&&o!==-1&&(r=u-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[u-1]&&u-o>=a&&i.push([o,u-1]),i}const Rs=32;function GN(n,a,i,{location:o=ye.location,distance:r=ye.distance,threshold:u=ye.threshold,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,includeMatches:m=ye.includeMatches,ignoreLocation:g=ye.ignoreLocation}={}){if(a.length>Rs)throw new Error(DN(Rs));const y=a.length,v=n.length,_=Math.max(0,Math.min(o,v));let T=u,C=_;const E=p>1||m,j=E?Array(v):[];let A;for(;(A=n.indexOf(a,C))>-1;){let G=Nr(a,{currentLocation:A,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(G,T),C=A+y,E){let L=0;for(;L<y;)j[A+L]=1,L+=1}}C=-1;let k=[],R=1,Y=y+v;const H=1<<y-1;for(let G=0;G<y;G+=1){let L=0,W=Y;for(;L<W;)Nr(a,{errors:G,currentLocation:_+W,expectedLocation:_,distance:r,ignoreLocation:g})<=T?L=W:Y=W,W=Math.floor((Y-L)/2+L);Y=W;let ae=Math.max(1,_-W+1),I=d?v:Math.min(_+W,v)+y,ie=Array(I+2);ie[I+1]=(1<<G)-1;for(let F=I;F>=ae;F-=1){let se=F-1,z=i[n.charAt(se)];if(E&&(j[se]=+!!z),ie[F]=(ie[F+1]<<1|1)&z,G&&(ie[F]|=(k[F+1]|k[F])<<1|1|k[F+1]),ie[F]&H&&(R=Nr(a,{errors:G,currentLocation:se,expectedLocation:_,distance:r,ignoreLocation:g}),R<=T)){if(T=R,C=se,C<=_)break;ae=Math.max(1,2*_-C)}}if(Nr(a,{errors:G+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;k=ie}const V={isMatch:C>=0,score:Math.max(.001,R)};if(E){const G=PN(j,p);G.length?m&&(V.indices=G):V.isMatch=!1}return V}function FN(n){let a={};for(let i=0,o=n.length;i<o;i+=1){const r=n.charAt(i);a[r]=(a[r]||0)|1<<o-i-1}return a}const Yr=String.prototype.normalize?(n=>n.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(n=>n);class A1{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:u=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:y=ye.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y},a=m?a:a.toLowerCase(),a=g?Yr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const v=(T,C)=>{this.chunks.push({pattern:T,alphabet:FN(T),startIndex:C})},_=this.pattern.length;if(_>Rs){let T=0;const C=_%Rs,E=_-C;for(;T<E;)v(this.pattern.substr(T,Rs),T),T+=Rs;if(C){const j=_-Rs;v(this.pattern.substr(j),j)}}else v(this.pattern,0)}searchIn(a){const{isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r}=this.options;if(a=i?a:a.toLowerCase(),a=o?Yr(a):a,this.pattern===a){let E={isMatch:!0,score:0};return r&&(E.indices=[[0,a.length-1]]),E}const{location:u,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:y}=this.options;let v=[],_=0,T=!1;this.chunks.forEach(({pattern:E,alphabet:j,startIndex:A})=>{const{isMatch:k,score:R,indices:Y}=GN(a,E,j,{location:u+A,distance:d,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:y});k&&(T=!0),_+=R,k&&Y&&(v=[...v,...Y])});let C={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(C.indices=v),C}}class cs{constructor(a){this.pattern=a}static isMultiMatch(a){return Wv(a,this.multiRegex)}static isSingleMatch(a){return Wv(a,this.singleRegex)}search(){}}function Wv(n,a){const i=n.match(a);return i?i[1]:null}class qN extends cs{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class $N extends cs{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class YN extends cs{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class KN extends cs{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class ZN extends cs{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class XN extends cs{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class j1 extends cs{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:u=ye.includeMatches,findAllMatches:d=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:y=ye.ignoreLocation}={}){super(a),this._bitapSearch=new A1(a,{location:i,threshold:o,distance:r,includeMatches:u,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:y})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class N1 extends cs{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],u=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+u,r.push([o,i-1]);const d=!!r.length;return{isMatch:d,score:d?0:1,indices:r}}}const vf=[qN,N1,YN,KN,XN,ZN,$N,j1],e0=vf.length,QN=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,JN="|";function WN(n,a={}){return n.split(JN).map(i=>{let o=i.trim().split(QN).filter(u=>u&&!!u.trim()),r=[];for(let u=0,d=o.length;u<d;u+=1){const p=o[u];let m=!1,g=-1;for(;!m&&++g<e0;){const y=vf[g];let v=y.isMultiMatch(p);v&&(r.push(new y(v,a)),m=!0)}if(!m)for(g=-1;++g<e0;){const y=vf[g];let v=y.isSingleMatch(p);if(v){r.push(new y(v,a));break}}}return r})}const ew=new Set([j1.type,N1.type]);class tw{constructor(a,{isCaseSensitive:i=ye.isCaseSensitive,ignoreDiacritics:o=ye.ignoreDiacritics,includeMatches:r=ye.includeMatches,minMatchCharLength:u=ye.minMatchCharLength,ignoreLocation:d=ye.ignoreLocation,findAllMatches:p=ye.findAllMatches,location:m=ye.location,threshold:g=ye.threshold,distance:y=ye.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:u,findAllMatches:p,ignoreLocation:d,location:m,threshold:g,distance:y},a=i?a:a.toLowerCase(),a=o?Yr(a):a,this.pattern=a,this.query=WN(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:u}=this.options;a=r?a:a.toLowerCase(),a=u?Yr(a):a;let d=0,p=[],m=0;for(let g=0,y=i.length;g<y;g+=1){const v=i[g];p.length=0,d=0;for(let _=0,T=v.length;_<T;_+=1){const C=v[_],{isMatch:E,indices:j,score:A}=C.search(a);if(E){if(d+=1,m+=A,o){const k=C.constructor.type;ew.has(k)?p=[...p,...j]:p.push(j)}}else{m=0,d=0,p.length=0;break}}if(d){let _={isMatch:!0,score:m/d};return o&&(_.indices=p),_}}return{isMatch:!1,score:1}}}const bf=[];function nw(...n){bf.push(...n)}function Sf(n,a){for(let i=0,o=bf.length;i<o;i+=1){let r=bf[i];if(r.condition(n,a))return new r(n,a)}return new A1(n,a)}const Kr={AND:"$and",OR:"$or"},_f={PATH:"$path",PATTERN:"$val"},xf=n=>!!(n[Kr.AND]||n[Kr.OR]),aw=n=>!!n[_f.PATH],sw=n=>!wa(n)&&x1(n)&&!xf(n),t0=n=>({[Kr.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function w1(n,a,{auto:i=!0}={}){const o=r=>{let u=Object.keys(r);const d=aw(r);if(!d&&u.length>1&&!xf(r))return o(t0(r));if(sw(r)){const m=d?r[_f.PATH]:u[0],g=d?r[_f.PATTERN]:r[m];if(!Zn(g))throw new Error(wN(m));const y={keyId:yf(m),pattern:g};return i&&(y.searcher=Sf(g,a)),y}let p={children:[],operator:u[0]};return u.forEach(m=>{const g=r[m];wa(g)&&g.forEach(y=>{p.children.push(o(y))})}),p};return xf(n)||(n=t0(n)),o(n)}function iw(n,{ignoreFieldNorm:a=ye.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:u,score:d})=>{const p=r?r.weight:null;o*=Math.pow(d===0&&p?Number.EPSILON:d,(p||1)*(a?1:u))}),i.score=o})}function lw(n,a){const i=n.matches;a.matches=[],vn(i)&&i.forEach(o=>{if(!vn(o.indices)||!o.indices.length)return;const{indices:r,value:u}=o;let d={indices:r,value:u};o.key&&(d.key=o.key.src),o.idx>-1&&(d.refIndex=o.idx),a.matches.push(d)})}function ow(n,a){a.score=n.score}function rw(n,a,{includeMatches:i=ye.includeMatches,includeScore:o=ye.includeScore}={}){const r=[];return i&&r.push(lw),o&&r.push(ow),n.map(u=>{const{idx:d}=u,p={item:a[d],refIndex:d};return r.length&&r.forEach(m=>{m(u,p)}),p})}class Vi{constructor(a,i={},o){this.options={...ye,...i},this.options.useExtendedSearch,this._keyStore=new RN(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof yh))throw new Error(NN);this._myIndex=i||C1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){vn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const u=this._docs[o];a(u,o)&&(this.removeAt(o),o-=1,r-=1,i.push(u))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:u,sortFn:d,ignoreFieldNorm:p}=this.options;let m=Zn(a)?Zn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return iw(m,{ignoreFieldNorm:p}),u&&m.sort(d),_1(i)&&i>-1&&(m=m.slice(0,i)),rw(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=Sf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:u,i:d,n:p})=>{if(!vn(u))return;const{isMatch:m,score:g,indices:y}=i.searchIn(u);m&&r.push({item:u,idx:d,matches:[{score:g,value:u,norm:p,indices:y}]})}),r}_searchLogical(a){const i=w1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:v,searcher:_}=p,T=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(m,v),searcher:_});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const y=[];for(let v=0,_=p.children.length;v<_;v+=1){const T=p.children[v],C=o(T,m,g);if(C.length)y.push(...C);else if(p.operator===Kr.AND)return[]}return y},r=this._myIndex.records,u={},d=[];return r.forEach(({$:p,i:m})=>{if(vn(p)){let g=o(i,p,m);g.length&&(u[m]||(u[m]={idx:m,item:p,matches:[]},d.push(u[m])),g.forEach(({matches:y})=>{u[m].matches.push(...y)}))}}),d}_searchObjectList(a){const i=Sf(a,this.options),{keys:o,records:r}=this._myIndex,u=[];return r.forEach(({$:d,i:p})=>{if(!vn(d))return;let m=[];o.forEach((g,y)=>{m.push(...this._findMatches({key:g,value:d[y],searcher:i}))}),m.length&&u.push({idx:p,item:d,matches:m})}),u}_findMatches({key:a,value:i,searcher:o}){if(!vn(i))return[];let r=[];if(wa(i))i.forEach(({v:u,i:d,n:p})=>{if(!vn(u))return;const{isMatch:m,score:g,indices:y}=o.searchIn(u);m&&r.push({score:g,key:a,value:u,idx:d,norm:p,indices:y})});else{const{v:u,n:d}=i,{isMatch:p,score:m,indices:g}=o.searchIn(u);p&&r.push({score:m,key:a,value:u,norm:d,indices:g})}return r}}Vi.version="7.1.0";Vi.createIndex=C1;Vi.parseIndex=HN;Vi.config=ye;Vi.parseQuery=w1;nw(tw);function n0(n,a,i,o){if(!a.trim())return[];const r=.3;return new Vi(n,{keys:i,threshold:r,ignoreLocation:!0,includeScore:!0,includeMatches:!0,minMatchCharLength:2}).search(a).map(m=>({item:m.item,score:m.score??1,matches:(m.matches??[]).map(g=>({key:g.key??"",indices:g.indices}))}))}const cw="_breadcrumbs_17or2_1",uw="_list_17or2_11",dw="_item_17or2_21",fw="_separator_17or2_28",hw="_link_17or2_34",pw="_current_17or2_57",Ci={breadcrumbs:cw,list:uw,item:dw,separator:fw,link:hw,current:pw},mw="›";function Hi({segments:n}){return h.jsx("nav",{className:Ci.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ci.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:Ci.item,children:[i>0&&h.jsx("span",{className:Ci.separator,"aria-hidden":"true",children:mw}),a.url&&!o?h.jsx(Rf,{className:Ci.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Ci.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function Tf(){Tf=function(r,u){return new i(r,void 0,u)};var n=RegExp.prototype,a=new WeakMap;function i(r,u,d){var p=new RegExp(r,u);return a.set(p,d||a.get(r)),Zr(p,i.prototype)}function o(r,u){var d=a.get(u);return Object.keys(d).reduce(function(p,m){var g=d[m];if(typeof g=="number")p[m]=r[g];else{for(var y=0;r[g[y]]===void 0&&y+1<g.length;)y++;p[m]=r[g[y]]}return p},Object.create(null))}return(function(r,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(u&&u.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),u&&Zr(r,u)})(i,RegExp),i.prototype.exec=function(r){var u=n.exec.call(this,r);if(u){u.groups=o(u,this);var d=u.indices;d&&(d.groups=o(d,this))}return u},i.prototype[Symbol.replace]=function(r,u){if(typeof u=="string"){var d=a.get(this);return n[Symbol.replace].call(this,r,u.replace(/\$<([^>]+)>/g,function(m,g){var y=d[g];return"$"+(Array.isArray(y)?y.join("$"):y)}))}if(typeof u=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),u.apply(this,m)})}return n[Symbol.replace].call(this,r,u)},Tf.apply(this,arguments)}function Zr(n,a){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},Zr(n,a)}function a0(n,a){(a==null||a>n.length)&&(a=n.length);for(var i=0,o=new Array(a);i<a;i++)o[i]=n[i];return o}function Fd(n,a){var i=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=(function(r,u){if(r){if(typeof r=="string")return a0(r,u);var d=Object.prototype.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?a0(r,u):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var gw=(function(n){return function(a){return a===void 0&&(a={}),(function(o,r){if(r&&!o.registered(r))throw new Error('The default language "'+r+'" is not registered with refractor.')})(n,a.defaultLanguage),function(o){nx(o,"element",i)};function i(o,r,u){var d,p;if(u&&u.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(d=o.data)==null?void 0:d.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,y,v=(function(H){for(var V,G=Fd(H.properties.className);!(V=G()).done;){var L=V.value;if(L.slice(0,9)==="language-")return L.slice(9).toLowerCase()}return null})(o);if(!v&&a.defaultLanguage&&o.properties.className.push("language-"+(v=a.defaultLanguage)),o.properties.className.push("code-highlight"),v)try{var _,T;T=(_=v)!=null&&_.includes("diff-")?v.split("-")[1]:v,g=n.highlight(xr(o),T),u.properties.className=(u.properties.className||[]).concat("language-"+T)}catch(H){if(!a.ignoreMissing||!/Unknown language/.test(H.message))throw H;g=o}else g=o;g.children=(y=1,function H(V){return V.reduce(function(G,L){if(L.type==="text"){var W=L.value,ae=(W.match(/\n/g)||"").length;if(ae===0)L.position={start:{line:y,column:1},end:{line:y,column:1}},G.push(L);else for(var I,ie=W.split(`
88
+ `),K=Fd(ie.entries());!(I=K()).done;){var F=I.value,se=F[0],z=F[1];G.push({type:"text",value:se===ie.length-1?z:z+`
89
+ `,position:{start:{line:y+se,column:1},end:{line:y+se,column:1}}})}return y+=ae,G}if(Object.prototype.hasOwnProperty.call(L,"children")){var q=y;return L.children=H(L.children),G.push(L),L.position={start:{line:q,column:1},end:{line:y,column:1}},G}return G.push(L),G},[])})(g.children),g.position=g.children.length>0?{start:{line:g.children[0].position.start.line,column:0},end:{line:g.children[g.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var C,E=(function(H){var V=/{([\d,-]+)}/,G=H.split(",").map(function(ae){return ae.trim()}).join();if(V.test(G)){var L=V.exec(G)[1],W=sx(L);return function(ae){return W.includes(ae+1)}}return function(){return!1}})(m),j=(function(H){var V=Tf(/showLineNumbers=(\d+)/i,{lines:1});if(V.test(H)){var G=V.exec(H);return Number(G.groups.lines)}return 1})(m),A=(function(H){for(var V=new Array(H),G=0;G<H;G++)V[G]={type:"element",tagName:"span",properties:{className:[]},children:[]};return V})(g.position.end.line),k=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],R=function(){var H,V,G=C.value,L=G[0],W=G[1];W.properties.className=["code-line"];var ae=ix(g,function(I){return I.position.start.line<=L+1&&I.position.end.line>=L+1});W.children=ae.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(v))&&!k.some(function(I){return m.toLowerCase().includes(I)})&&(W.properties.line=[(L+j).toString()],W.properties.className.push("line-number")),E(L)&&W.properties.className.push("highlight-line"),(v==="diff"||(H=v)!=null&&H.includes("diff-"))&&xr(W).substring(0,1)==="-"?W.properties.className.push("deleted"):(v==="diff"||(V=v)!=null&&V.includes("diff-"))&&xr(W).substring(0,1)==="+"&&W.properties.className.push("inserted")},Y=Fd(A.entries());!(C=Y()).done;)R();A.length>0&&xr(A[A.length-1]).trim()===""&&A.pop(),o.children=A}}}})(ax);const yw="_systemEvent_463jy_1",vw="_systemTimestamp_463jy_8",bw="_textEvent_463jy_12",Sw="_toolUseEvent_463jy_98",_w="_toolUseHeader_463jy_118",xw="_toolUsePrefix_463jy_125",Tw="_toolUseName_463jy_130",Ew="_toolUseArgs_463jy_135",Cw="_toolResultEvent_463jy_146",Aw="_toolResultHeader_463jy_151",jw="_toolResultIndicatorOk_463jy_175",Nw="_toolResultIndicatorError_463jy_182",ww="_toolResultLabel_463jy_189",Dw="_toolResultToggle_463jy_193",kw="_toolResultCommand_463jy_199",Mw="_toolResultEllipsis_463jy_209",Rw="_toolResultPre_463jy_213",Ow="_errorEvent_463jy_234",Bw="_statusEvent_463jy_242",Lw="_userInputEvent_463jy_251",Uw="_userInputContent_463jy_257",zw="_defaultEvent_463jy_274",ct={systemEvent:yw,systemTimestamp:vw,textEvent:bw,toolUseEvent:Sw,toolUseHeader:_w,toolUsePrefix:xw,toolUseName:Tw,toolUseArgs:Ew,toolResultEvent:Cw,toolResultHeader:Aw,toolResultIndicatorOk:jw,toolResultIndicatorError:Nw,toolResultLabel:ww,toolResultToggle:Dw,toolResultCommand:kw,toolResultEllipsis:Mw,toolResultPre:Rw,errorEvent:Ow,statusEvent:Bw,userInputEvent:Lw,userInputContent:Uw,defaultEvent:zw};function Iw({time:n,content:a}){return h.jsxs("div",{className:ct.systemEvent,children:[h.jsxs("span",{className:ct.systemTimestamp,children:["[",n,"]"]})," ",a]})}function Vw({content:n}){return h.jsx("div",{className:ct.textEvent,children:h.jsx(Cf,{remarkPlugins:[Af],rehypePlugins:[gw],children:n})})}function Hw({content:n}){let a="",i=n;try{const o=JSON.parse(n);a=o.tool||"",i=JSON.stringify(o.args,null,2)}catch{}return h.jsxs("div",{className:ct.toolUseEvent,children:[h.jsxs("div",{className:ct.toolUseHeader,children:[h.jsx("span",{className:ct.toolUsePrefix,children:">"}),a?h.jsx("span",{className:ct.toolUseName,children:a}):null]}),h.jsx("pre",{className:ct.toolUseArgs,children:i})]})}const s0=5;function Pw(n,a){if(a==null)return"";if(typeof a!="object")return String(a);const i=a;if(typeof i.command=="string")return i.command;if(typeof i.file_path=="string")return i.file_path;if(typeof i.pattern=="string"){const o=typeof i.path=="string"?` in ${i.path}`:"";return`${i.pattern}${o}`}if(typeof i.path=="string")return i.path;if(typeof i.query=="string")return i.query;try{const o=JSON.stringify(a);return o.length>150?`${o.slice(0,150)}…`:o}catch{return""}}function Gw({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let u=!1;if(a)try{u=JSON.parse(a).is_error===!0}catch{}const d=n.split(`
90
+ `),p=d.length>s0,m=o?n:d.slice(0,s0).join(`
91
+ `),y=((i==null?void 0:i.tool)??"")||(u?"Tool error":"Tool output"),v=i?Pw(i.tool,i.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:u?ct.toolResultIndicatorError:ct.toolResultIndicatorOk,"aria-label":u?"error":"success",children:u?"✗":"✓"}),h.jsx("span",{className:ct.toolResultLabel,children:y}),p&&h.jsx("span",{className:ct.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:ct.toolResultEvent,children:[p?h.jsx("button",{className:ct.toolResultHeader,onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:ct.toolResultHeader,children:_}),v&&h.jsx("div",{className:ct.toolResultCommand,children:v}),h.jsxs("pre",{className:ct.toolResultPre,children:[m,!o&&p&&h.jsx("span",{className:ct.toolResultEllipsis,children:"…"})]})]})}function Fw({content:n}){return h.jsxs("div",{className:ct.errorEvent,children:["Error: ",n]})}function qw({content:n}){return h.jsxs("div",{className:ct.statusEvent,children:["--- ",n," ---"]})}function $w({content:n}){return h.jsx("div",{className:ct.userInputEvent,children:h.jsx("span",{className:ct.userInputContent,children:n})})}function Yw({content:n}){return h.jsx("div",{className:ct.defaultEvent,children:n})}function Kw({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(Iw,{time:i,content:n.content});case"text":case"output":return h.jsx(Vw,{content:n.content});case"tool_use":return h.jsx(Hw,{content:n.content});case"tool_result":return h.jsx(Gw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Fw,{content:n.content});case"status":return h.jsx(qw,{content:n.content});case"user_input":return h.jsx($w,{content:n.content});default:return h.jsx(Yw,{content:n.content})}}const Zw="_overlay_cmicx_1",Xw="_dialog_cmicx_11",Qw="_title_cmicx_30",Jw="_description_cmicx_38",Ww="_actions_cmicx_45",eD="_cancelButton_cmicx_52",tD="_confirmButton_cmicx_79",ws={overlay:Zw,dialog:Xw,title:Qw,description:Jw,actions:Ww,cancelButton:eD,confirmButton:tD};function rc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:u}){const d=S.useId(),p=S.useId();return h.jsx(ea,{children:n&&h.jsx(un.div,{className:ws.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:u,onKeyDown:m=>{m.key==="Escape"&&u()},role:"dialog","aria-modal":"true","aria-labelledby":d,"aria-describedby":i?p:void 0,children:h.jsxs(un.div,{className:ws.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:m=>m.stopPropagation(),children:[h.jsx("h3",{id:d,className:ws.title,children:a}),i&&h.jsx("p",{id:p,className:ws.description,children:i}),h.jsxs("div",{className:ws.actions,children:[h.jsx("button",{type:"button",className:ws.cancelButton,onClick:u,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:ws.confirmButton,onClick:r,children:o})]})]})})})}const nD="_spinner_13c8l_1",aD="_spin_13c8l_1",sD="_sm_13c8l_14",iD="_md_13c8l_20",lD="_lg_13c8l_26",i0={spinner:nD,spin:aD,sm:sD,md:iD,lg:lD};function l0({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${i0.spinner} ${i0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const Ef={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function os(n){return n==="blocked"?Ef.blocked:Ef[vh(n)]}const oD={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function rD(n){return oD[vh(n)]??"statusPending"}const cD=["working","paused","failed","not_started","blocked","complete"],o0=["not_started","working","paused","complete","failed"],uD={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function vh(n){return n in Ef&&n!=="blocked"?n:uD[n]??"not_started"}const dD={not_started:"--text-tertiary",working:"--accent-green",paused:"--accent-yellow",complete:"--accent-green",failed:"--accent-red",pending:"--text-tertiary",assigned:"--text-tertiary",in_progress:"--accent-green",review:"--accent-yellow",done:"--accent-green",waiting_input:"--accent-yellow"},fD="_container_15oob_1",hD="_header_15oob_5",pD="_searchInput_15oob_17",mD="_searchHighlight_15oob_50",gD="_addButton_15oob_56",yD="_createForm_15oob_83",vD="_createInput_15oob_89",bD="_createButton_15oob_120",SD="_creatingHint_15oob_161",_D="_projectRow_15oob_170",xD="_selected_15oob_188",TD="_expandArrow_15oob_193",ED="_expanded_15oob_200",CD="_projectName_15oob_204",AD="_taskCount_15oob_208",jD="_newTaskButton_15oob_214",ND="_taskRow_15oob_241",wD="_taskStatusIcon_15oob_271",DD="_taskTitle_15oob_275",kD="_dependencyBadge_15oob_282",MD="_blockedBadge_15oob_294",RD="_leafSpacer_15oob_299",OD="_childCountBadge_15oob_304",BD="_addChildButton_15oob_317",LD="_emptyCta_15oob_366",UD="_ctaDescription_15oob_379",zD="_ctaButton_15oob_385",ID="_emptyTaskCta_15oob_420",VD="_headerActions_15oob_425",HD="_groupToggle_15oob_431",PD="_groupToggleActive_15oob_458",GD="_statusGroupHeader_15oob_462",FD="_statusGroupIcon_15oob_481",qD="_statusGroupLabel_15oob_485",$D="_statusGroupCount_15oob_490",YD="_createTaskLink_15oob_503",_e={container:fD,header:hD,searchInput:pD,searchHighlight:mD,addButton:gD,createForm:yD,createInput:vD,createButton:bD,creatingHint:SD,projectRow:_D,selected:xD,expandArrow:TD,expanded:ED,projectName:CD,taskCount:AD,newTaskButton:jD,taskRow:ND,taskStatusIcon:wD,taskTitle:DD,dependencyBadge:kD,blockedBadge:MD,leafSpacer:RD,childCountBadge:OD,addChildButton:BD,emptyCta:LD,ctaDescription:UD,ctaButton:zD,emptyTaskCta:ID,headerActions:VD,groupToggle:HD,groupToggleActive:PD,statusGroupHeader:GD,statusGroupIcon:FD,statusGroupLabel:qD,statusGroupCount:$D,createTaskLink:YD};function KD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[u,d]=a[o];u<=r[1]+1?r[1]=Math.max(r[1],d):i.push([u,d])}return i}function D1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=KD(a),o=[];let r=0;for(const[u,d]of i)u>r&&o.push(h.jsx("span",{children:n.slice(r,u)},`p${r}`)),o.push(h.jsx("mark",{className:_e.searchHighlight,children:n.slice(u,d+1)},`m${u}`)),r=d+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const ZD=[{name:"name",weight:2},{name:"description",weight:1}],XD=[{name:"title",weight:2},{name:"description",weight:1}],k1=34,QD=16,M1="grackle-group-by-status";function r0(){try{return localStorage.getItem(M1)==="true"}catch{return!1}}function JD(n){try{localStorage.setItem(M1,String(n))}catch{}}function WD(n,a){const i=new Map;for(const u of n){const p=u.dependsOn.length>0&&u.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":u.status,m=i.get(p);m?m.push(u):i.set(p,[u])}const o=[],r=new Set;for(const u of cD){r.add(u);const d=i.get(u);if(d&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=os(u);o.push({status:u,label:p.label,style:p,tasks:d})}}for(const[u,d]of i)if(!r.has(u)&&d.length>0){d.sort((m,g)=>m.sortOrder-g.sortOrder);const p=os(u);o.push({status:u,label:p.label,style:p,tasks:d})}return o}function ek({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:u}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:_e.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i())},children:[h.jsx("span",{className:`${_e.expandArrow} ${a?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:_e.statusGroupLabel,children:n.label}),h.jsx("span",{className:_e.statusGroupCount,children:n.tasks.length})]}),h.jsx(ea,{children:a&&h.jsx(un.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(d=>{const p=os(d.status),m=o===d.id;return h.jsxs("div",{onClick:()=>r(ss(d.id)),className:`${_e.taskRow} ${m?_e.selected:""}`,style:{"--task-indent":`${k1}px`},"data-task-id":d.id,children:[h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:_e.taskTitle,title:d.title,children:h.jsx(D1,{text:d.title,indices:u.get(d.id)})})]},d.id)})})})]})}function tk(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,u)=>r.sortOrder-u.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function R1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m}){const g=os(n.status),y=n.dependsOn.length>0&&n.dependsOn.some(E=>p.get(E)!=="complete"),v=i.has(n.id),_=n.children.length>0,T=r===n.id,C=k1+a*QD;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>u(ss(n.id)),className:`${_e.taskRow} ${T?_e.selected:""}`,style:{"--task-indent":`${C}px`},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${_e.expandArrow} ${v?_e.expanded:""}`,role:"button",tabIndex:0,"aria-label":v?"Collapse task":"Expand task",onClick:E=>{E.stopPropagation(),o(n.id)},onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),E.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:_e.leafSpacer}),h.jsx("span",{className:_e.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:_e.taskTitle,title:n.title,children:h.jsx(D1,{text:n.title,indices:m.get(n.id)})}),_&&h.jsxs("span",{className:_e.childCountBadge,children:[n.children.filter(E=>E.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${_e.dependencyBadge} ${y?_e.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:y?"blocked":"dep"}),a<TN&&h.jsx("button",{onClick:E=>{E.stopPropagation(),u(Ls(d,n.id))},title:"Add child task","aria-label":"Add child task",className:_e.addChildButton,children:"+"})]}),h.jsx(ea,{children:_&&v&&h.jsx(un.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},style:{overflow:"hidden"},children:n.children.map(E=>h.jsx(R1,{node:E,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:u,projectId:d,taskStatusById:p,titleHighlights:m},E.id))})})]})}function nk(){const{projects:n,tasks:a,loadTasks:i,createProject:o,projectCreating:r}=Gt(),u=Pn(),[d,p]=S.useState(new Set),[m,g]=S.useState(new Set),[y,v]=S.useState(new Set),[_,T]=S.useState(!1),[C,E]=S.useState(""),[j,A]=S.useState(r0),[k,R]=S.useState(r0),[Y,H]=S.useState(new Map),V=()=>{const ee=!j;JD(ee),A(ee),ee&&(R(!0),H(new Map))},G=(ee,Ce)=>{const Ae=`${ee}:${Ce}`;H(Ie=>{const mt=new Map(Ie),Tt=mt.has(Ae)?mt.get(Ae):k;return mt.set(Ae,!Tt),mt})},L=(ee,Ce)=>{const Ae=`${ee}:${Ce}`;return Y.has(Ae)?Y.get(Ae):k},W=Qt("/tasks/:taskId/*"),ae=Qt("/projects/:projectId"),I=(W==null?void 0:W.params.taskId)!=="new"?W==null?void 0:W.params.taskId:void 0,ie=ae==null?void 0:ae.params.projectId,K=S.useRef(d);K.current=d;const F=S.useMemo(()=>new Map(a.map(ee=>[ee.id,ee.status])),[a]),se=ee=>{p(Ce=>{const Ae=new Set(Ce);return Ae.has(ee)?Ae.delete(ee):(Ae.add(ee),i(ee)),Ae})},z=ee=>{g(Ce=>{const Ae=new Set(Ce);return Ae.has(ee)?(Ae.delete(ee),v(Ie=>new Set(Ie).add(ee))):(Ae.add(ee),v(Ie=>{const mt=new Set(Ie);return mt.delete(ee),mt})),Ae})};S.useEffect(()=>{const ee=new Set(a.filter(Ce=>Ce.parentTaskId).map(Ce=>Ce.parentTaskId));ee.size>0&&g(Ce=>{const Ae=new Set(Ce);for(const Ie of ee)y.has(Ie)||Ae.add(Ie);return Ae})},[a,y]),S.useEffect(()=>{ie&&!K.current.has(ie)&&(p(ee=>new Set(ee).add(ie)),i(ie))},[ie,i]);const q=()=>{!C.trim()||r||(o(C.trim()),E(""),T(!1))},[te,we]=S.useState(""),{directMatchTaskIds:ge,treeMatchTaskIds:He,visibleProjectIds:Ee,matchedProjectIds:ve,titleHighlights:Se}=S.useMemo(()=>{if(!te.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const ee=n0(n,te,ZD),Ce=n0(a,te,XD),Ae=new Set(ee.map(Fe=>Fe.item.id)),Ie=new Set(Ce.map(Fe=>Fe.item.id)),mt=new Map;for(const Fe of Ce){const Be=Fe.matches.find(Ln=>Ln.key==="title");Be&&mt.set(Fe.item.id,Be.indices)}const Tt=new Set(Ae);for(const Fe of Ce)Tt.add(Fe.item.projectId);const Bt=new Set(Ie),Xe=new Map(a.map(Fe=>[Fe.id,Fe]));for(const Fe of[...Ie]){let Be=Xe.get(Fe);for(;Be!=null&&Be.parentTaskId;)Bt.add(Be.parentTaskId),Be=Xe.get(Be.parentTaskId)}return{directMatchTaskIds:Ie,treeMatchTaskIds:Bt,visibleProjectIds:Tt,matchedProjectIds:Ae,titleHighlights:mt}},[te,n,a]),Z=S.useRef(new Set);return S.useEffect(()=>{if(te.trim())for(const ee of n)!d.has(ee.id)&&!Z.current.has(ee.id)&&(Z.current.add(ee.id),i(ee.id))},[te,n,d,i]),h.jsxs("div",{className:_e.container,children:[h.jsxs("div",{className:_e.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:_e.headerActions,children:[h.jsx("button",{className:`${_e.groupToggle} ${j?_e.groupToggleActive:""}`,onClick:V,"aria-label":j?"Switch to tree view":"Group tasks by status","aria-pressed":j,title:j?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:_e.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:te,onChange:ee=>we(ee.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:_e.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:_e.createForm,children:[h.jsx("input",{type:"text",value:C,onChange:ee=>E(ee.target.value),onKeyDown:ee=>ee.key==="Enter"&&q(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:_e.createInput}),h.jsx("button",{onClick:q,className:_e.createButton,disabled:r,children:r?h.jsx(l0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:_e.creatingHint,children:[h.jsx(l0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:_e.emptyCta,children:[h.jsx("button",{className:_e.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:_e.ctaDescription,children:"Organize your work into projects"})]}),n.map(ee=>{if(Ee&&!Ee.has(ee.id))return null;const Ce=ge!==null,Ae=d.has(ee.id)||Ce,Ie=a.filter(Be=>Be.projectId===ee.id),mt=(ve==null?void 0:ve.has(ee.id))??!1,Tt=Ce&&!mt?j?ge:He:null,Bt=Tt?Ie.filter(Be=>Tt.has(Be.id)):Ie,Xe=ie===ee.id,Fe=Ae&&!j?tk(Bt):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{Xe?se(ee.id):(Ae||se(ee.id),u(Zl(ee.id)))},className:`${_e.projectRow} ${Xe?_e.selected:""}`,children:[h.jsx("span",{className:`${_e.expandArrow} ${Ae?_e.expanded:""}`,children:"▸"}),h.jsx("span",{className:_e.projectName,title:ee.name,children:ee.name}),h.jsx("span",{className:_e.taskCount,children:Ie.length>0&&`${Ie.filter(Be=>Be.status==="complete").length}/${Ie.length}`}),h.jsx("button",{onClick:Be=>{Be.stopPropagation(),u(Ls(ee.id))},title:"New task",className:_e.newTaskButton,children:"+"})]}),h.jsx(ea,{children:Ae&&h.jsxs(un.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[j?WD(Bt,F).map(Be=>h.jsx(ek,{group:Be,isExpanded:L(ee.id,Be.status),onToggle:()=>G(ee.id,Be.status),selectedTaskId:I,navigate:u,titleHighlights:Se},Be.status)):Fe.map(Be=>h.jsx(R1,{node:Be,depth:0,expandedTasks:m,toggleTask:z,selectedTaskId:I,navigate:u,projectId:ee.id,taskStatusById:F,titleHighlights:Se},Be.id)),Bt.length===0&&h.jsx("div",{className:_e.emptyTaskCta,children:h.jsx("button",{className:_e.createTaskLink,onClick:()=>u(Ls(ee.id)),children:"+ Create Task"})})]})})]},ee.id)})]})}const ak="_container_lovia_1",sk="_content_lovia_40",c0={container:ak,content:sk},ik=320,O1=220,B1=600,L1="grackle-sidebar-width";function lk(){try{const n=localStorage.getItem(L1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=O1&&a<=B1)return a}}catch{}return ik}function ok(n){try{localStorage.setItem(L1,String(n))}catch{}}function rk(){const[n]=S.useState(lk),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const u of r){const d=u.borderBoxSize[0];if(d){const p=Math.round(d.inlineSize);p>=O1&&p<=B1&&ok(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:c0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:c0.content,children:h.jsx(nk,{})})})}const ck="_bar_8ghh5_1",uk="_barColumn_8ghh5_32",dk="_barRow_8ghh5_63",fk="_input_8ghh5_74",hk="_inputSmall_8ghh5_109",pk="_select_8ghh5_178",mk="_btnPrimary_8ghh5_214",gk="_btnDanger_8ghh5_245",yk="_btnGhost_8ghh5_284",vk="_badge_8ghh5_312",bk="_statusText_8ghh5_322",Sk="_statusCompleted_8ghh5_327",_k="_statusFailed_8ghh5_331",xk="_statusBlocked_8ghh5_335",Tk="_hintText_8ghh5_340",Ek="_creatingHint_8ghh5_345",Ck="_errorHint_8ghh5_353",Ak="_disconnectHint_8ghh5_359",ce={bar:ck,barColumn:uk,barRow:dk,input:fk,inputSmall:hk,select:pk,btnPrimary:mk,btnDanger:gk,btnGhost:yk,badge:vk,statusText:bk,statusCompleted:Sk,statusFailed:_k,statusBlocked:xk,hintText:Tk,creatingHint:Ek,errorHint:Ck,disconnectHint:Ak};function u0({value:n,onChange:a,testId:i}){return h.jsxs("select",{"data-testid":i,value:n,onChange:o=>a(o.target.value),className:ce.select,children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})}function d0(n,a){if(!n)return!1;const i=a.find(o=>o.id===n);return i!==void 0&&(i.status==="disconnected"||i.status==="error")}function f0({environmentId:n,onReconnect:a}){return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.disconnectHint,"data-testid":"env-disconnect-hint",children:"Environment unavailable"}),h.jsx("button",{type:"button",onClick:()=>a(n),className:ce.btnGhost,"data-testid":"reconnect-btn",title:"Reconnect the environment to resume messaging",children:"Reconnect"})]})}function jk(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:u,personas:d,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:y,codespaceListError:v,codespaceCreating:_,listCodespaces:T,createCodespace:C}=Gt(),{showToast:E}=so(),j=Pn(),[A]=Of(),k=Qt("/sessions/:sessionId"),R=Qt("/tasks/:taskId"),Y=Qt("/tasks/:taskId/stream"),H=Qt("/tasks/:taskId/findings"),V=Qt("/tasks/:taskId/edit"),G=Qt("/sessions/new"),L=Qt("/environments/new"),W=Qt("/projects/:projectId"),ae=Qt("/tasks/new"),I=Qt("/"),ie=Qt("/settings/*"),K=k==null?void 0:k.params.sessionId,F=(R==null?void 0:R.params.taskId)??(Y==null?void 0:Y.params.taskId)??(H==null?void 0:H.params.taskId),se=!!G,z=!!L,q=!!W,te=!!ae,we=!!V,ge=!!I&&!se&&!z&&!q&&!te,He=!!ie,Ee=se?A.get("env")??"":"",ve=se?A.get("runtime")??"claude-code":"claude-code",[Se,Z]=S.useState(""),[ee,Ce]=S.useState(se?ve:"claude-code"),[Ae,Ie]=S.useState(""),mt=et=>{if(Ie(et),et){const je=d.find(yt=>yt.id===et);je!=null&&je.runtime&&Ce(je.runtime)}},[Tt,Bt]=S.useState(""),[Xe,Fe]=S.useState("local"),[Be,Ln]=S.useState("claude-code"),[Un,ta]=S.useState(""),[en,na]=S.useState(""),[J,ne]=S.useState(""),[re,de]=S.useState(""),[be,xe]=S.useState(""),[Qe,De]=S.useState(""),[Mt,wt]=S.useState(""),[it,tn]=S.useState(""),[rt,We]=S.useState(""),[Zt,gt]=S.useState("pick");S.useEffect(()=>{se&&Ce(ve)},[se,ve]);const Ft=K?o.find(et=>et.id===K):void 0,qt=F?r.find(et=>et.id===F):void 0,Pi=(qt==null?void 0:qt.latestSessionId)||void 0,aa=Pi?o.find(et=>et.id===Pi):void 0,us=qt?qt.dependsOn.some(et=>{const je=r.find(yt=>yt.id===et);return je&&je.status!=="complete"}):!1;if(ge||He)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a session or click + to start"})});if(we||te)return h.jsx(h.Fragment,{});if(z){const et=le=>{if(!le.trim())return!0;const Lt=Number(le);return Number.isInteger(Lt)&&Lt>=1&&Lt<=65535},je=()=>!(!Tt.trim()||Xe==="ssh"&&!Un.trim()||Xe==="codespace"&&!Qe.trim()||(Xe==="local"||Xe==="ssh")&&!et(en)),yt=()=>{if(!je())return;const le={};if(Xe==="local"){if(Un.trim()&&(le.host=Un.trim()),en.trim()){const Lt=Number(en);Number.isInteger(Lt)&&(le.port=Lt)}}else if(Xe==="ssh"){if(le.host=Un.trim(),J.trim()&&(le.user=J.trim()),en.trim()){const Lt=Number(en);Number.isInteger(Lt)&&(le.sshPort=Lt)}Mt.trim()&&(le.identityFile=Mt.trim())}else Xe==="docker"?(re.trim()&&(le.image=re.trim()),be.trim()&&(le.repo=be.trim())):Xe==="codespace"&&(le.codespaceName=Qe.trim());p(Tt.trim(),Xe,le,Be),E("Environment added successfully","success"),Bt(""),Fe("local"),Ln("claude-code"),ta(""),na(""),ne(""),de(""),xe(""),De(""),wt(""),tn(""),We(""),gt("pick"),j(Mi,{replace:!0})};return h.jsxs("div",{className:ce.barColumn,children:[h.jsxs("div",{className:ce.barRow,children:[h.jsx("span",{className:ce.badge,children:"new env"}),h.jsx("input",{type:"text",value:Tt,onChange:le=>Bt(le.target.value),placeholder:"Environment name...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:Xe,onChange:le=>{Fe(le.target.value),le.target.value==="codespace"&&(T(),gt("pick"),De(""))},className:ce.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx(u0,{value:Be,onChange:Ln,testId:"new-environment-runtime-select"}),h.jsx("button",{onClick:yt,disabled:!je(),className:ce.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:ce.barRow,children:[Xe==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Un,onChange:le=>ta(le.target.value),placeholder:"Host (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:en,onChange:le=>na(le.target.value),placeholder:"Port (optional)...",className:ce.inputSmall})]}),Xe==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Un,onChange:le=>ta(le.target.value),placeholder:"Host (required)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:J,onChange:le=>ne(le.target.value),placeholder:"User (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:en,onChange:le=>na(le.target.value),placeholder:"SSH port (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Mt,onChange:le=>wt(le.target.value),placeholder:"Identity file (optional)...",className:ce.inputSmall})]}),Xe==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:re,onChange:le=>de(le.target.value),placeholder:"Image (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:be,onChange:le=>xe(le.target.value),placeholder:"Repo (optional)...",className:ce.inputSmall})]}),Xe==="codespace"&&Zt==="pick"&&h.jsxs(h.Fragment,{children:[!v&&h.jsxs("select",{value:Qe,onChange:le=>{le.target.value==="__create__"?(gt("create"),De("")):(De(le.target.value),le.target.value&&!Tt.trim()&&Bt(le.target.value))},disabled:_,className:ce.select,children:[h.jsx("option",{value:"",children:"Select a codespace..."}),g.map(le=>h.jsxs("option",{value:le.name,children:[le.name," (",le.repository,") — ",le.state]},le.name)),h.jsx("option",{value:"__create__",children:"Create new from repo..."})]}),_&&h.jsx("span",{className:ce.creatingHint,children:"Creating codespace..."}),v&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.errorHint,children:v}),h.jsx("input",{type:"text",value:Qe,onChange:le=>De(le.target.value),placeholder:"Or enter codespace name manually...",className:ce.inputSmall})]}),y&&!v&&h.jsx("span",{className:ce.errorHint,children:y})]}),Xe==="codespace"&&Zt==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:it,onChange:le=>tn(le.target.value),placeholder:"owner/repo",className:ce.inputSmall}),h.jsx("input",{type:"text",value:rt,onChange:le=>We(le.target.value),placeholder:"Machine type (optional)...",className:ce.inputSmall}),h.jsx("button",{onClick:()=>{it.trim()&&(C(it.trim(),rt.trim()||void 0),gt("pick"),tn(""),We(""))},disabled:!it.trim(),className:ce.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{gt("pick"),tn(""),We("")},className:ce.btnGhost,children:"Cancel"})]})]})]})}if(q)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a task or click + to create one"})});if(F&&qt){if(qt.status==="not_started"){const et=us?qt.dependsOn.map(je=>r.find(yt=>yt.id===je)).filter(je=>je&&je.status!=="complete").map(je=>je.title):[];return h.jsx("div",{className:ce.bar,children:us?h.jsxs("span",{className:ce.statusBlocked,children:["Blocked by: ",et.join(", ")]}):h.jsx("span",{className:ce.hintText,children:"Use the buttons above to start or manage this task"})})}if(qt.status==="working"||qt.status==="paused"){if((aa==null?void 0:aa.status)==="idle"){const je=aa.environmentId,yt=d0(je,u),le=Lt=>{Lt.preventDefault();const sa=qt.latestSessionId||Pi;!Se.trim()||!sa||yt||(a(sa,Se),Z(""))};return h.jsxs("form",{onSubmit:le,className:ce.bar,children:[yt&&je&&h.jsx(f0,{environmentId:je,onReconnect:m}),h.jsx("input",{type:"text",value:Se,onChange:Lt=>Z(Lt.target.value),placeholder:"Type a message...",autoFocus:!yt,disabled:yt,className:ce.input}),h.jsx("span",{title:yt?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Se.trim()||yt,className:ce.btnPrimary,children:"Send"})})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input})})}if(qt.status==="complete")return h.jsxs("div",{className:ce.bar,children:[h.jsx("span",{className:`${ce.statusText} ${ce.statusCompleted}`,children:"Task completed"}),h.jsx("button",{onClick:()=>j(Ls(qt.projectId)),className:ce.btnPrimary,children:"+ New Task"})]});if(qt.status==="failed")return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:`${ce.statusText} ${ce.statusFailed}`,children:"Task failed"})})}if(se){const et=je=>{je.preventDefault(),!(!Se.trim()||!Ee)&&(n(Ee,Se,void 0,ee,Ae),E("Session started","success"),Z(""),Ie(""))};return h.jsxs("form",{onSubmit:et,className:ce.bar,children:[h.jsx("span",{className:ce.badge,children:"new chat"}),h.jsx("input",{type:"text",value:Se,onChange:je=>Z(je.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ce.input}),h.jsx(u0,{value:ee,onChange:Ce,testId:"new-chat-runtime-select"}),h.jsxs("select",{value:Ae,onChange:je=>mt(je.target.value),className:ce.select,children:[h.jsx("option",{value:"",children:"No persona"}),d.map(je=>h.jsx("option",{value:je.id,children:je.name},je.id))]}),h.jsx("button",{type:"submit",disabled:!Se.trim()||!Ee,className:ce.btnPrimary,children:"Go"})]})}if(K){const et=(Ft==null?void 0:Ft.status)==="running",je=(Ft==null?void 0:Ft.status)==="idle",yt=Ft!==void 0&&["completed","failed","interrupted"].includes(Ft.status);if(et)return h.jsxs("div",{className:ce.bar,children:[h.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:ce.input}),h.jsx("button",{onClick:()=>i(K),className:ce.btnDanger,title:"Stop session",children:"Stop"})]});if(je){const le=d0(Ft.environmentId,u),Lt=sa=>{sa.preventDefault(),!(!Se.trim()||le)&&(a(K,Se),Z(""))};return h.jsxs("form",{onSubmit:Lt,className:ce.bar,children:[le&&Ft.environmentId&&h.jsx(f0,{environmentId:Ft.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:Se,onChange:sa=>Z(sa.target.value),placeholder:"Type a message...",autoFocus:!le,disabled:le,className:ce.input}),h.jsx("span",{title:le?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!Se.trim()||le,className:ce.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(K),className:ce.btnDanger,title:"Stop session",children:"Stop"})]})}if(yt)return h.jsxs("div",{className:ce.bar,children:[h.jsxs("span",{className:`${ce.statusText} ${ce.hintText}`,children:["Session ",Ft.status]}),h.jsx("button",{onClick:()=>j(z0(Ft.environmentId,Ft.runtime)),className:ce.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Loading..."})})}const Nk="_toast_da8ll_1",wk="_success_da8ll_18",Dk="_icon_da8ll_22",kk="_error_da8ll_25",Mk="_warning_da8ll_32",Rk="_info_da8ll_38",Ok="_message_da8ll_53",Bk="_close_da8ll_60",Ll={toast:Nk,success:wk,icon:Dk,error:kk,warning:Mk,info:Rk,message:Ok,close:Bk},Lk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Uk({toast:n,onDismiss:a}){return S.useEffect(()=>{const i=setTimeout(()=>a(n.id),n.duration);return()=>clearTimeout(i)},[n.id,n.duration,a]),h.jsxs(un.div,{className:`${Ll.toast} ${Ll[n.variant]}`,role:"status",initial:{opacity:0,y:-16,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.94},transition:{duration:.2,ease:"easeOut"},layout:!0,children:[h.jsx("span",{className:Ll.icon,"aria-hidden":"true",children:Lk[n.variant]}),h.jsx("span",{className:Ll.message,children:n.message}),h.jsx("button",{type:"button",className:Ll.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const zk="_container_qqse2_1",Ik={container:zk};function Vk(){const{toasts:n,dismissToast:a}=so();return h.jsx("div",{className:Ik.container,"data-testid":"toast-container",children:h.jsx(ea,{children:n.map(i=>h.jsx(Uk,{toast:i,onDismiss:a},i.id))})})}function Hk(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const d of o)r.set(d.id,d);const u=new Set;for(const d of n){u.add(d.id);const p=r.get(d.id);if(p&&p.status!==d.status&&d.status!=="sleeping"){if(d.status==="connecting"){a("Provisioning environment…","info");continue}d.status==="connected"?a("Environment connected","success"):d.status==="error"?a("Environment provision failed","error"):d.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const d of o)u.has(d.id)||a("Environment removed","info")},[n,a])}const Pk="_panelContainer_yidfr_1",Gk="_emptyState_yidfr_8",Fk="_fadeIn_yidfr_1",qk="_projectSummary_yidfr_17",$k="_projectSummaryTitle_yidfr_28",Yk="_projectSummarySubtitle_yidfr_32",Kk="_header_yidfr_36",Zk="_headerInfo_yidfr_69",Xk="_killButton_yidfr_75",Qk="_headerTitle_yidfr_104",Jk="_headerActions_yidfr_119",Wk="_taskStatusBadge_yidfr_126",eM="_taskBranch_yidfr_135",tM="_taskBlockedBadge_yidfr_141",nM="_btnPrimary_yidfr_149",aM="_btnDanger_yidfr_180",sM="_btnGhost_yidfr_219",iM="_rejectInput_yidfr_245",lM="_tabBar_yidfr_275",oM="_tab_yidfr_275",rM="_active_yidfr_301",cM="_eventScroll_yidfr_306",uM="_tabContent_yidfr_312",dM="_noContext_yidfr_317",fM="_overviewContent_yidfr_323",hM="_overviewDashboard_yidfr_332",pM="_overviewHero_yidfr_338",mM="_statusBadge_yidfr_345",gM="_statusPending_yidfr_357",yM="_statusAssigned_yidfr_362",vM="_statusInProgress_yidfr_367",bM="_statusReview_yidfr_372",SM="_statusDone_yidfr_377",_M="_statusFailed_yidfr_382",xM="_statusWaitingInput_yidfr_387",TM="_overviewBranchPill_yidfr_392",EM="_branchLink_yidfr_407",CM="_overviewSection_yidfr_418",AM="_overviewLabel_yidfr_424",jM="_overviewValue_yidfr_431",NM="_overviewMuted_yidfr_436",wM="_overviewMarkdown_yidfr_442",DM="_envRow_yidfr_511",kM="_envDot_yidfr_517",MM="_envDotGreen_yidfr_524",RM="_envDotYellow_yidfr_528",OM="_envDotRed_yidfr_532",BM="_envDotGray_yidfr_536",LM="_depList_yidfr_540",UM="_depItem_yidfr_546",zM="_depBlocked_yidfr_553",IM="_depDone_yidfr_557",VM="_timeline_yidfr_561",HM="_timelineRow_yidfr_567",PM="_timelineKey_yidfr_574",GM="_timelineValue_yidfr_580",FM="_timelineDelta_yidfr_584",qM="_reviewNotes_yidfr_595",$M="_overviewDescription_yidfr_606",YM="_waitingMessage_yidfr_612",KM="_errorMessage_yidfr_616",ZM="_eventOverflowWarning_yidfr_620",XM="_attemptSelector_yidfr_634",QM="_attemptLabel_yidfr_650",JM="_attemptButton_yidfr_654",WM="_attemptActive_yidfr_671",eR="_attemptStatus_yidfr_677",tR="_emptyCta_yidfr_683",nR="_ctaTitle_yidfr_695",aR="_ctaDescription_yidfr_701",sR="_ctaButton_yidfr_708",iR="_ctaLink_yidfr_743",lR="_projectHeader_yidfr_757",oR="_projectName_yidfr_782",rR="_projectMeta_yidfr_795",cR="_metaRow_yidfr_803",uR="_metaLabel_yidfr_816",dR="_metaValue_yidfr_831",fR="_metaPlaceholder_yidfr_841",hR="_editButton_yidfr_846",pR="_editInput_yidfr_862",mR="_editTextarea_yidfr_894",gR="_editSelect_yidfr_930",yR="_archiveButton_yidfr_963",vR="_repoLink_yidfr_993",bR="_metaValueClickable_yidfr_1003",SR="_editHint_yidfr_1022",_R="_editError_yidfr_1031",xR="_editInputInvalid_yidfr_1038",TR="_unsavedDot_yidfr_1043",ER="_metaToggle_yidfr_1051",CR="_metaToggleArrow_yidfr_1072",AR="_metaToggleArrowOpen_yidfr_1077",jR="_progressBarContainer_yidfr_1081",NR="_progressBar_yidfr_1081",wR="_progressFill_yidfr_1097",DR="_progressLabel_yidfr_1104",kR="_metaTimestamps_yidfr_1111",MR="_metaTimestamp_yidfr_1111",RR="_worktreeToggle_yidfr_1133",OR="_editFieldWrapper_yidfr_1148",D={panelContainer:Pk,emptyState:Gk,fadeIn:Fk,projectSummary:qk,projectSummaryTitle:$k,projectSummarySubtitle:Yk,header:Kk,headerInfo:Zk,killButton:Xk,headerTitle:Qk,headerActions:Jk,taskStatusBadge:Wk,taskBranch:eM,taskBlockedBadge:tM,btnPrimary:nM,btnDanger:aM,btnGhost:sM,rejectInput:iM,tabBar:lM,tab:oM,active:rM,eventScroll:cM,tabContent:uM,noContext:dM,overviewContent:fM,overviewDashboard:hM,overviewHero:pM,statusBadge:mM,statusPending:gM,statusAssigned:yM,statusInProgress:vM,statusReview:bM,statusDone:SM,statusFailed:_M,statusWaitingInput:xM,overviewBranchPill:TM,branchLink:EM,overviewSection:CM,overviewLabel:AM,overviewValue:jM,overviewMuted:NM,overviewMarkdown:wM,envRow:DM,envDot:kM,envDotGreen:MM,envDotYellow:RM,envDotRed:OM,envDotGray:BM,depList:LM,depItem:UM,depBlocked:zM,depDone:IM,timeline:VM,timelineRow:HM,timelineKey:PM,timelineValue:GM,timelineDelta:FM,reviewNotes:qM,overviewDescription:$M,waitingMessage:YM,errorMessage:KM,eventOverflowWarning:ZM,attemptSelector:XM,attemptLabel:QM,attemptButton:JM,attemptActive:WM,attemptStatus:eR,emptyCta:tR,ctaTitle:nR,ctaDescription:aR,ctaButton:sR,ctaLink:iR,projectHeader:lR,projectName:oR,projectMeta:rR,metaRow:cR,metaLabel:uR,metaValue:dR,metaPlaceholder:fR,editButton:hR,editInput:pR,editTextarea:mR,editSelect:gR,archiveButton:yR,repoLink:vR,metaValueClickable:bR,editHint:SR,editError:_R,editInputInvalid:xR,unsavedDot:TR,metaToggle:ER,metaToggleArrow:CR,metaToggleArrowOpen:AR,progressBarContainer:jR,progressBar:NR,progressFill:wR,progressLabel:DR,metaTimestamps:kR,metaTimestamp:MR,worktreeToggle:RR,editFieldWrapper:OR};function BR(){const{projects:n,createProject:a}=Gt();return n.length===0?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("div",{className:D.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:D.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:D.ctaButton,onClick:()=>{const i=window.prompt("Project name:");i!=null&&i.trim()&&a(i.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:D.emptyState,children:"Select a project or task to get started"})}function LR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const u=a.get(o);i.unshift(u),o=u.parentTaskId||void 0}return i}const Us={label:"Home",url:"/"};function UR(n){return n?[Us,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Us,{label:"Settings",url:void 0}]}function zR(){return[Us,{label:"New Environment",url:void 0}]}function IR(){return[Us,{label:"New Chat",url:void 0}]}function VR(n){return[Us,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function HR(n,a){const i=a.find(o=>o.id===n);return[Us,{label:(i==null?void 0:i.name)??"Project",url:void 0}]}function PR(n,a,i){const o=LR(n,i),r=i.get(n),u=r==null?void 0:r.projectId,d=u?a.find(g=>g.id===u):void 0,p=[Us];d&&p.push({label:d.name,url:Zl(d.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:ss(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function GR(){const n=IR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Enter a prompt below to start a new session"})]})}const U1=50;function FR(n,a,i,o,r=U1){return o?n<r:a-n-i<r}function qR(n,a){const i=a-n;return i>0?i:0}function $R({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),u=S.useRef(0),d=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let y=!0;const v=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const _=FR(g.scrollTop,g.scrollHeight,g.clientHeight,i,U1);_!==y&&(y=_,r(_))}))};return g.addEventListener("scroll",v,{passive:!0}),()=>{g.removeEventListener("scroll",v),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||d.current||(d.current=!0,i?g.scrollTop=0:g.scrollTop=g.scrollHeight,r(!0))},[n,i]),S.useLayoutEffect(()=>{const g=n.current;if(g){if(i&&!o){const y=qR(u.current,g.scrollHeight);y>0&&(g.scrollTop+=y)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),u.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const y=i?0:g.scrollHeight;g.scrollTo({top:y,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const YR="_wrapper_p24zt_1",KR="_scrollContainer_p24zt_9",ZR="_toolbar_p24zt_15",XR="_directionToggle_p24zt_22",QR="_scrollToAnchor_p24zt_60",JR="_scrollToAnchorBottom_p24zt_84",WR="_scrollToAnchorTop_p24zt_88",Ds={wrapper:YR,scrollContainer:KR,toolbar:ZR,directionToggle:XR,scrollToAnchor:QR,scrollToAnchorBottom:JR,scrollToAnchorTop:WR},z1="grackle-stream-direction";function e3(){try{return localStorage.getItem(z1)==="reversed"}catch{return!1}}function t3({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:D.eventOverflowWarning,role:"alert",children:["⚠"," ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function I1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,u]=S.useState(e3),d=xN(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=$R({scrollRef:o,contentLength:n.length,isReversed:r}),y=()=>{const T=!r;u(T);try{localStorage.setItem(z1,T?"reversed":"default")}catch{}},v=d?0:.2,_=r?-8:8;return h.jsxs("div",{className:Ds.wrapper,children:[h.jsx("div",{className:Ds.toolbar,children:h.jsx("button",{className:Ds.directionToggle,onClick:y,title:r?"Showing newest first":"Showing oldest first","aria-label":r?"Switch to newest at bottom":"Switch to newest at top","data-testid":"direction-toggle",children:r?"↓":"↑"})}),h.jsxs("div",{ref:o,className:Ds.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(t3,{eventsDropped:a}),h.jsx(ea,{initial:!1,children:p.map((T,C)=>{const E=r?n.length-1-C:C;return h.jsx(un.div,{initial:{opacity:0,y:_},animate:{opacity:1,y:0},transition:{duration:v,ease:"easeOut"},children:h.jsx(Kw,{event:T,toolUseCtx:T.toolUseCtx})},`${T.sessionId}-${T.timestamp}-${E}`)})})]}),h.jsx(ea,{children:!m&&h.jsxs(un.button,{className:`${Ds.scrollToAnchor} ${r?Ds.scrollToAnchorTop:Ds.scrollToAnchorBottom}`,onClick:g,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.15},"aria-label":"Scroll to latest","data-testid":"scroll-to-anchor",children:[r?"↑":"↓"," New events"]})})]})}function V1(n){const a=[];for(const i of n){const o=a[a.length-1];i.eventType==="text"&&(o==null?void 0:o.eventType)==="text"?a[a.length-1]={...o,content:o.content+i.content}:a.push(i)}return a}function H1(n){const a=new Map;for(const u of n)if(u.raw)try{a.set(u,JSON.parse(u.raw))}catch{}const i=new Map;for(const u of n){if(u.eventType!=="tool_use")continue;const d=a.get(u);if(!(!d||typeof d.id!="string"))try{const p=JSON.parse(u.content);i.set(d.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(u=>{if(u.eventType!=="tool_result")return u;const d=a.get(u);if(!d||typeof d.tool_use_id!="string")return u;const p=i.get(d.tool_use_id);return p?(o.add(d.tool_use_id),{...u,toolUseCtx:p}):u}).filter(u=>{if(u.eventType!=="tool_use")return!0;const d=a.get(u);return d&&typeof d.id=="string"?!o.has(d.id):!0})}function n3({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:D.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:D.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:D.killButton,children:"×"})]})]})}function a3({session:n}){const a=n&&["completed","failed","interrupted"].includes(n.status),i=a?`Session ${n.status} with no events recorded.`:"Waiting for events...";return h.jsx("div",{className:a?D.errorMessage:D.waitingMessage,children:i})}function s3(){const{sessionId:n}=Wr(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:u}=Gt(),d=S.useRef(void 0),p=VR(n),m=o.find(v=>v.id===n)??void 0,g=S.useMemo(()=>{const v=n?a.filter(_=>_.sessionId===n):[];return H1(V1(v))},[a,n]);if(S.useEffect(()=>{n&&n!==d.current&&(d.current=n,u(n))},[n,u]),!n)return h.jsx("div",{className:D.emptyState,children:"No session selected"});const y=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Hi,{segments:p}),h.jsx(n3,{sessionId:n,session:m,isActive:y,onKill:r}),h.jsx(I1,{events:g,eventsDropped:i,emptyState:h.jsx(a3,{session:m})})]})}const h0=220,p0=70,i3=40,l3=60,o3="hierarchy",r3="dependency";function c3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new py.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:i3,ranksep:l3});const i=new Map(n.map(d=>[d.id,d])),o=new Map;for(const d of n)if(d.parentTaskId&&i.has(d.parentTaskId)){const p=o.get(d.parentTaskId)||[];p.push(d),o.set(d.parentTaskId,p)}for(const d of n)a.setNode(d.id,{width:h0,height:p0});const r=[];for(const d of n){if(d.parentTaskId&&i.has(d.parentTaskId)){const p=`hierarchy-${d.parentTaskId}-${d.id}`;a.setEdge(d.parentTaskId,d.id,{},p),r.push({id:p,source:d.parentTaskId,target:d.id,type:"smoothstep",data:{edgeType:o3},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of d.dependsOn)if(i.has(p)){const m=`dependency-${p}-${d.id}`;a.setEdge(p,d.id,{},m),r.push({id:m,source:p,target:d.id,type:"smoothstep",data:{edgeType:r3},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return py.layout(a),{nodes:n.map(d=>{const p=a.node(d.id),m=o.get(d.id)||[];return{id:d.id,type:"task",position:{x:p.x-h0/2,y:p.y-p0/2},data:{task:d,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:d.dependsOn.length>0}}}),edges:r}},[n])}const u3="_dagContainer_js4w6_1",d3="_taskNode_js4w6_26",f3="_taskNodeBorder_js4w6_54",h3="_taskNodeContent_js4w6_60",p3="_taskNodeHeader_js4w6_70",m3="_taskNodeIcon_js4w6_77",g3="_taskNodeTitle_js4w6_82",y3="_taskNodeBadges_js4w6_90",v3="_childBadge_js4w6_95",b3="_depBadge_js4w6_107",S3="_handle_js4w6_119",_3="_emptyCta_js4w6_126",x3="_ctaDescription_js4w6_137",T3="_ctaButton_js4w6_144",Jt={dagContainer:u3,taskNode:d3,taskNodeBorder:f3,taskNodeContent:h3,taskNodeHeader:p3,taskNodeIcon:m3,taskNodeTitle:g3,taskNodeBadges:y3,childBadge:v3,depBadge:b3,handle:S3,emptyCta:_3,ctaDescription:x3,ctaButton:T3};function E3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,u=os(a.status);return h.jsxs("div",{className:Jt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(my,{type:"target",position:gy.Top,className:Jt.handle}),h.jsx("div",{className:Jt.taskNodeBorder,style:{backgroundColor:u.color}}),h.jsxs("div",{className:Jt.taskNodeContent,children:[h.jsxs("div",{className:Jt.taskNodeHeader,children:[h.jsx("span",{className:Jt.taskNodeIcon,style:{color:u.color},children:u.icon}),h.jsx("span",{className:Jt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Jt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Jt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Jt.depBadge,children:"dep"})]})]}),h.jsx(my,{type:"source",position:gy.Bottom,className:Jt.handle})]})}const C3=dD,A3={task:E3};function j3({projectId:n}){const{tasks:a}=Gt(),i=Pn(),{resolvedThemeId:o}=q0(),r=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),{nodes:u,edges:d}=c3(r),p=S.useMemo(()=>{const y=getComputedStyle(document.documentElement),v={};for(const[_,T]of Object.entries(C3))v[_]=y.getPropertyValue(T).trim()||"#6b7a8d";return v},[o]),m=S.useCallback((y,v)=>{i(ss(v.id))},[i]),g=S.useCallback(y=>{const v=y.data;return p[v.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Jt.emptyCta,children:[h.jsx("button",{className:Jt.ctaButton,onClick:()=>i(Ls(n)),children:"Create Task"}),h.jsx("div",{className:Jt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Jt.dagContainer,children:h.jsxs(ox,{nodes:u,edges:d,nodeTypes:A3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(rx,{variant:cx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(ux,{showInteractive:!1}),h.jsx(dx,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function N3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const u of n)if(u.parentTaskId){const d=o.get(u.parentTaskId);d?d.push(u):o.set(u.parentTaskId,[u])}const r=new Map(o0.map(u=>[u,[]]));for(const u of n){const d=vh(u.status),p=u.dependsOn.length>0&&u.dependsOn.some(C=>a.get(C)!=="complete"),m=o.get(u.id)??[],g=m.length,y=m.filter(C=>C.status==="complete").length;let v;if(d==="paused"&&i){const C=i.get(u.id);C==="idle"?v="Needs input":C==="completed"&&(v="Ready to complete")}const _={task:u,isBlocked:p,childCount:g,doneChildCount:y,pausedSubBadge:v},T=r.get(d);T?T.push(_):r.get("not_started").push(_)}for(const u of r.values())u.sort((d,p)=>d.task.sortOrder-p.task.sortOrder);return o0.map(u=>{const d=os(u);return{status:u,label:d.label,style:d,tasks:r.get(u)??[]}})}const w3="_boardContainer_1c4y1_1",D3="_column_1c4y1_17",k3="_columnHeader_1c4y1_34",M3="_columnIcon_1c4y1_47",R3="_columnLabel_1c4y1_52",O3="_columnCount_1c4y1_57",B3="_cardList_1c4y1_67",L3="_emptyPlaceholder_1c4y1_76",U3="_card_1c4y1_67",z3="_cardHeader_1c4y1_107",I3="_cardStatusIcon_1c4y1_113",V3="_cardTitle_1c4y1_119",H3="_cardBadges_1c4y1_127",P3="_badge_1c4y1_134",G3="_blockedBadge_1c4y1_146",F3="_childBadge_1c4y1_151",q3="_depBadge_1c4y1_155",$3="_parentBadge_1c4y1_159",Y3="_pausedSubBadge_1c4y1_166",K3="_personaBadge_1c4y1_170",Z3="_envBadge_1c4y1_174",X3="_emptyCta_1c4y1_178",Q3="_ctaButton_1c4y1_188",J3="_ctaDescription_1c4y1_204",Ge={boardContainer:w3,column:D3,columnHeader:k3,columnIcon:M3,columnLabel:R3,columnCount:O3,cardList:B3,emptyPlaceholder:L3,card:U3,cardHeader:z3,cardStatusIcon:I3,cardTitle:V3,cardBadges:H3,badge:P3,blockedBadge:G3,childBadge:F3,depBadge:q3,parentBadge:$3,pausedSubBadge:Y3,personaBadge:K3,envBadge:Z3,emptyCta:X3,ctaButton:Q3,ctaDescription:J3};function W3({projectId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=Gt(),u=Pn(),d=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(v=>[v.id,v.status])),[a]),m=S.useMemo(()=>new Map(d.map(v=>[v.id,v])),[d]),g=S.useMemo(()=>{const v=new Map(i.map(A=>[A.id,A])),_=new Map(o.map(A=>[A.id,A])),T=new Map(r.map(A=>[A.id,A])),C=new Map,E=new Map,j=new Map;for(const A of d)if(A.latestSessionId){const k=v.get(A.latestSessionId);if(k){if(C.set(A.id,k.status),k.personaId){const R=_.get(k.personaId);R&&E.set(A.id,R.name)}if(k.environmentId){const R=T.get(k.environmentId);R&&j.set(A.id,R.displayName)}}}return{sessionStatusByTaskId:C,personaNameByTaskId:E,environmentNameByTaskId:j}},[d,i,o,r]),y=S.useMemo(()=>N3({tasks:d,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[d,p,g]);return d.length===0?h.jsxs("div",{className:Ge.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ge.ctaButton,onClick:()=>u(Ls(n)),children:"Create Task"}),h.jsx("div",{className:Ge.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Ge.boardContainer,"data-testid":"board-container",children:y.map(v=>h.jsxs("section",{className:Ge.column,"data-testid":`board-column-${v.status}`,"aria-label":`${v.label}, ${v.tasks.length} ${v.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ge.columnHeader,children:[h.jsx("span",{className:Ge.columnIcon,style:{color:v.style.color},children:v.style.icon}),h.jsx("span",{className:Ge.columnLabel,children:v.label}),h.jsx("span",{className:Ge.columnCount,"data-testid":`board-count-${v.status}`,children:v.tasks.length})]}),h.jsx("div",{className:Ge.cardList,children:v.tasks.length===0?h.jsx("div",{className:Ge.emptyPlaceholder,children:"No tasks"}):h.jsx(ea,{mode:"popLayout",children:v.tasks.map(_=>h.jsx(un.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(eO,{boardTask:_,tasksById:m,personaName:g.personaNameByTaskId.get(_.task.id),envName:g.environmentNameByTaskId.get(_.task.id),onClick:()=>u(ss(_.task.id))})},_.task.id))})})]},v.status))})}function eO({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:u,isBlocked:d,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,y=os(u.status),v=u.parentTaskId?a.get(u.parentTaskId):void 0;return h.jsxs("div",{className:Ge.card,tabIndex:0,role:"button","data-testid":`board-card-${u.id}`,onClick:r,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),r())},children:[h.jsxs("div",{className:Ge.cardHeader,children:[h.jsx("span",{className:Ge.cardStatusIcon,style:{color:y.color},children:y.icon}),h.jsx("span",{className:Ge.cardTitle,children:u.title})]}),h.jsxs("div",{className:Ge.cardBadges,children:[v&&h.jsx("span",{className:`${Ge.badge} ${Ge.parentBadge}`,title:v.title,children:v.title}),p>0&&h.jsxs("span",{className:`${Ge.badge} ${Ge.childBadge}`,children:[m,"/",p]}),d&&h.jsx("span",{className:`${Ge.badge} ${Ge.blockedBadge}`,children:"blocked"}),u.dependsOn.length>0&&!d&&h.jsx("span",{className:`${Ge.badge} ${Ge.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Ge.badge} ${Ge.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Ge.badge} ${Ge.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Ge.badge} ${Ge.envBadge}`,children:o})]})]})}function tO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function m0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const u=Math.floor(r/60);if(u<24)return`${u}h ago`;const d=Math.floor(u/24);return d<30?`${d}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function nO(){const{projectId:n}=Wr(),a=Pn(),{tasks:i,environments:o,projects:r,archiveProject:u,updateProject:d}=Gt(),[p,m]=S.useState("tasks"),[g,y]=S.useState(!1),[v,_]=S.useState(null),[T,C]=S.useState(""),[E,j]=S.useState(""),[A,k]=S.useState(!1),R=S.useRef(void 0),Y=S.useRef(null),H=S.useRef(null),V=S.useRef(null),G=S.useRef(null),L=S.useRef(null),W=S.useRef(null),ae=HR(n,r);S.useEffect(()=>{const Z=R.current;R.current=n,!(Z===void 0||Z===n)&&(v!==null||T!=="")&&(_(null),C(""))},[n,v,T]),S.useEffect(()=>{if(v===null)return;const Z=v==="name"?H.current:v==="description"?V.current:v==="repoUrl"?G.current:v==="worktreeBasePath"?W.current:L.current;if(!Z)return;const ee=window.setTimeout(()=>{Z.focus()},0);return()=>{window.clearTimeout(ee)}},[v]);const I=r.find(Z=>Z.id===n),ie=i.filter(Z=>Z.projectId===n),K=ie.filter(Z=>Z.status==="complete").length,F=ie.length,se=F>0?Math.round(K/F*100):0,z=100,q=(Z,ee)=>{Y.current=Z,_(Z),C(ee),j("")},te=()=>{Y.current=null,_(null),C(""),j("")},we=(Z,ee)=>{if(Z==="name"){const Ce=ee.trim();if(!Ce)return"Name is required";if(Ce.length>z)return`Max ${z} characters`}if(Z==="repoUrl"){const Ce=ee.trim();if(Ce&&!/^https?:\/\/.+/.test(Ce))return"Must be a valid http(s) URL"}return""},ge=Z=>{if(!I)return;const ee=T.trim(),Ce=we(Z,T);if(Ce){j(Ce);return}if(Z==="name"){if(ee===I.name){te();return}d(I.id,{name:ee})}else if(Z==="description"){const Ae=T;if(Ae===I.description){te();return}d(I.id,{description:Ae})}else if(Z==="repoUrl"){if(ee===I.repoUrl){te();return}d(I.id,{repoUrl:ee})}else if(Z==="defaultEnvironmentId"){if(T===I.defaultEnvironmentId){te();return}d(I.id,{defaultEnvironmentId:T})}else{if(ee===I.worktreeBasePath){te();return}d(I.id,{worktreeBasePath:ee})}te()},He=(Z,ee)=>{Z.key==="Escape"?te():Z.key==="Enter"&&ee!=="description"&&ge(ee)},Ee=Z=>I?Z==="name"?T.trim()!==I.name:Z==="description"?T!==I.description:Z==="repoUrl"?T.trim()!==I.repoUrl:Z==="defaultEnvironmentId"?T!==I.defaultEnvironmentId:T.trim()!==I.worktreeBasePath:!1,ve=o.find(Z=>Z.id===(I==null?void 0:I.defaultEnvironmentId)),Se=v==="description"?"Tab to save · Esc to cancel":"Enter to save · Esc to cancel";return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Hi,{segments:ae}),h.jsxs("div",{className:D.projectHeader,children:[h.jsx("span",{className:D.projectName,"data-testid":"project-name",children:v==="name"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:H,className:`${D.editInput} ${E?D.editInputInvalid:""}`,value:T,onChange:Z=>{C(Z.target.value),j("")},onBlur:Z=>{if(Y.current==="name"){Y.current=null;return}Z.relatedTarget instanceof HTMLElement&&Z.relatedTarget.dataset.editAction==="name"||ge("name")},onKeyDown:Z=>He(Z,"name"),maxLength:z,"aria-label":"Project name","data-testid":"edit-name-input"}),Ee("name")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),E&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:E}),h.jsx("span",{className:D.editHint,children:Se})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>q("name",(I==null?void 0:I.name)||""),title:"Click to edit name","aria-label":`Edit project name: ${(I==null?void 0:I.name)||n}`,"data-testid":"edit-name-button",children:[(I==null?void 0:I.name)||n,h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})}),h.jsx("button",{className:D.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:D.metaToggle,onClick:()=>k(!A),"aria-expanded":!A,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${D.metaToggleArrow} ${A?"":D.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!A&&h.jsxs("div",{className:D.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Description"}),h.jsx("div",{className:D.metaValue,children:v==="description"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("textarea",{ref:V,className:D.editTextarea,value:T,onChange:Z=>{C(Z.target.value),j("")},onBlur:Z=>{if(Y.current==="description"){Y.current=null;return}Z.relatedTarget instanceof HTMLElement&&Z.relatedTarget.dataset.editAction==="description"||ge("description")},onKeyDown:Z=>He(Z,"description"),title:"Project description","aria-label":"Project description","data-testid":"edit-description-input"}),Ee("description")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),h.jsx("span",{className:D.editHint,children:Se})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>q("description",(I==null?void 0:I.description)||""),title:"Click to edit description","aria-label":"Edit project description","data-testid":"edit-description-button",children:[I!=null&&I.description?h.jsx("span",{className:D.overviewMarkdown,children:h.jsx(Cf,{remarkPlugins:[Af],children:I.description})}):h.jsx("span",{className:D.metaPlaceholder,children:"No description"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Repository"}),h.jsx("div",{className:D.metaValue,children:v==="repoUrl"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:G,className:`${D.editInput} ${E?D.editInputInvalid:""}`,value:T,onChange:Z=>{C(Z.target.value),j("")},onBlur:Z=>{if(Y.current==="repoUrl"){Y.current=null;return}Z.relatedTarget instanceof HTMLElement&&Z.relatedTarget.dataset.editAction==="repoUrl"||ge("repoUrl")},onKeyDown:Z=>He(Z,"repoUrl"),placeholder:"https://github.com/...","aria-label":"Project repository URL","data-testid":"edit-repo-input"}),Ee("repoUrl")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),E&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:E}),h.jsx("span",{className:D.editHint,children:Se})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:Z=>{Z.preventDefault(),q("repoUrl",(I==null?void 0:I.repoUrl)||"")},title:"Click to edit repository URL","aria-label":"Edit project repository URL","data-testid":"edit-repo-button",children:[I!=null&&I.repoUrl&&/^https?:\/\//i.test(I.repoUrl)?h.jsx("a",{className:D.repoLink,href:I.repoUrl,target:"_blank",rel:"noopener noreferrer",onClick:Z=>Z.stopPropagation(),children:I.repoUrl}):I!=null&&I.repoUrl?h.jsx("span",{children:I.repoUrl}):h.jsx("span",{className:D.metaPlaceholder,children:"No repository"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Environment"}),h.jsx("div",{className:D.metaValue,children:v==="defaultEnvironmentId"?h.jsxs("select",{ref:L,className:D.editSelect,value:T,onChange:Z=>{Y.current=null,C(Z.target.value);const ee=Z.target.value;I&&ee!==I.defaultEnvironmentId&&d(I.id,{defaultEnvironmentId:ee}),te()},onBlur:Z=>{if(Y.current==="defaultEnvironmentId"){Y.current=null;return}Z.relatedTarget instanceof HTMLElement&&Z.relatedTarget.dataset.editAction==="defaultEnvironmentId"||te()},title:"Default environment","aria-label":"Project default environment","data-testid":"edit-env-select",children:[h.jsx("option",{value:"",children:"None"}),o.map(Z=>h.jsx("option",{value:Z.id,children:Z.displayName},Z.id))]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>q("defaultEnvironmentId",(I==null?void 0:I.defaultEnvironmentId)||""),title:"Click to change default environment","aria-label":"Edit project default environment","data-testid":"edit-env-button",children:[ve?h.jsxs("span",{className:D.envRow,children:[h.jsx("span",{className:`${D.envDot} ${tO(ve.status)}`}),ve.displayName]}):h.jsx("span",{className:D.metaPlaceholder,children:(I==null?void 0:I.defaultEnvironmentId)||"No default environment"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Worktrees"}),h.jsx("div",{className:D.metaValue,children:h.jsxs("label",{className:D.worktreeToggle,"data-testid":"worktree-toggle",children:[h.jsx("input",{type:"checkbox",checked:(I==null?void 0:I.useWorktrees)??!0,onChange:Z=>{I&&d(I.id,{useWorktrees:Z.target.checked})}}),h.jsx("span",{children:"Enable worktree isolation"})]})})]}),h.jsxs("div",{className:D.metaRow,children:[h.jsx("span",{className:D.metaLabel,children:"Working Dir"}),h.jsx("div",{className:D.metaValue,children:v==="worktreeBasePath"?h.jsxs("div",{className:D.editFieldWrapper,children:[h.jsx("input",{ref:W,className:`${D.editInput} ${E?D.editInputInvalid:""}`,value:T,onChange:Z=>{C(Z.target.value),j("")},onBlur:Z=>{if(Y.current==="worktreeBasePath"){Y.current=null;return}Z.relatedTarget instanceof HTMLElement&&Z.relatedTarget.dataset.editAction==="worktreeBasePath"||ge("worktreeBasePath")},onKeyDown:Z=>He(Z,"worktreeBasePath"),placeholder:"/workspaces/my-repo","aria-label":"Working directory","data-testid":"edit-worktree-base-path-input"}),Ee("worktreeBasePath")&&h.jsx("span",{className:D.unsavedDot,title:"Unsaved changes"}),E&&h.jsx("span",{className:D.editError,"data-testid":"edit-error",children:E}),h.jsx("span",{className:D.editHint,children:Se})]}):h.jsxs("button",{type:"button",className:D.metaValueClickable,onClick:()=>q("worktreeBasePath",(I==null?void 0:I.worktreeBasePath)||""),title:"Click to edit working directory","aria-label":"Edit working directory","data-testid":"edit-worktree-base-path-button",children:[I!=null&&I.worktreeBasePath?h.jsx("span",{children:I.worktreeBasePath}):h.jsx("span",{className:D.metaPlaceholder,children:"Default (server default)"}),h.jsx("span",{className:D.editButton,"aria-hidden":"true",children:"✏️"})]})})]}),I&&h.jsxs("div",{className:D.metaTimestamps,children:[h.jsxs("span",{className:D.metaTimestamp,children:["Created ",m0(I.createdAt)]}),I.updatedAt&&I.updatedAt!==I.createdAt&&h.jsxs("span",{className:D.metaTimestamp,children:["· Updated ",m0(I.updatedAt)]})]})]}),F>0&&h.jsxs("div",{className:D.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:D.progressBar,children:h.jsx("div",{className:D.progressFill,style:{width:`${se}%`}})}),h.jsxs("span",{className:D.progressLabel,children:[K,"/",F]})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":p==="graph",className:`${D.tab} ${p==="graph"?D.active:""}`,onClick:()=>m("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":p==="board",className:`${D.tab} ${p==="board"?D.active:""}`,onClick:()=>m("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":p==="tasks",className:`${D.tab} ${p==="tasks"?D.active:""}`,onClick:()=>m("tasks"),children:"Tasks"})]}),p==="tasks"&&F>0&&h.jsxs("div",{className:D.projectSummary,children:[h.jsx("span",{className:D.projectSummaryTitle,children:`${K}/${F} tasks complete`}),h.jsx("span",{className:D.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),p==="tasks"&&F===0&&h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>a(Ls(n)),children:"Create Task"}),h.jsx("div",{className:D.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),p==="board"&&h.jsx(W3,{projectId:n}),p==="graph"&&h.jsx(j3,{projectId:n}),h.jsx(rc,{isOpen:g,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{I&&(u(I.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const aO="_container_cddyd_1",sO="_header_cddyd_8",iO="_headerTitle_cddyd_35",lO="_badge_cddyd_44",oO="_headerActions_cddyd_54",rO="_body_cddyd_61",cO="_formContent_cddyd_73",uO="_section_cddyd_85",dO="_label_cddyd_91",fO="_titleInput_cddyd_98",hO="_descriptionTextarea_cddyd_131",pO="_parentContext_cddyd_167",mO="_parentLabel_cddyd_175",gO="_parentName_cddyd_182",yO="_depList_cddyd_220",vO="_depItem_cddyd_226",bO="_depItemSelected_cddyd_248",SO="_noDeps_cddyd_252",_O="_btnPrimary_cddyd_258",xO="_btnGhost_cddyd_289",ot={container:aO,header:sO,headerTitle:iO,badge:lO,headerActions:oO,body:rO,formContent:cO,section:uO,label:dO,titleInput:fO,descriptionTextarea:hO,parentContext:pO,parentLabel:mO,parentName:gO,depList:yO,depItem:vO,depItemSelected:bO,noDeps:SO,btnPrimary:_O,btnGhost:xO};function P1({mode:n,taskId:a,projectId:i,parentTaskId:o}){const{tasks:r,createTask:u,updateTask:d}=Gt(),{showToast:p}=so(),m=Pn(),g=n==="edit",y=g&&a?r.find(K=>K.id===a):void 0,v=g?(y==null?void 0:y.projectId)??"":i??"",_=g?(y==null?void 0:y.parentTaskId)??"":o??"",T=_?r.find(K=>K.id===_):void 0,[C,E]=S.useState((y==null?void 0:y.title)??""),[j,A]=S.useState((y==null?void 0:y.description)??""),[k,R]=S.useState((y==null?void 0:y.dependsOn)??[]),[Y,H]=S.useState(!1),V=S.useRef(!1);S.useEffect(()=>{g&&y&&!V.current&&(V.current=!0,E(y.title),A(y.description),R(y.dependsOn))},[g,y]);const G=r.filter(K=>K.projectId===v&&(!g||K.id!==a)&&K.id!==_),L=C.trim().length>0&&(!g||y!==void 0)&&(g||v.length>0),W=K=>{R(F=>F.includes(K)?F.filter(se=>se!==K):[...F,K])},ae=()=>{!L||Y||g&&y===void 0||(g&&a?(d(a,C.trim(),j,k),p("Task updated","success"),m(ss(a),{replace:!0})):(H(!0),u(v,C.trim(),j,k.length>0?k:void 0,_||void 0,()=>{p("Task created","success"),m(Zl(v),{replace:!0})},K=>{p(K,"error"),H(!1)})))},I=()=>{m(g&&a?ss(a):Zl(v))},ie=g?"edit task":_?"child task":"new task";return h.jsxs("div",{className:ot.container,children:[h.jsxs("div",{className:ot.header,children:[h.jsxs("div",{className:ot.headerTitle,children:[h.jsx("span",{className:ot.badge,children:ie}),T&&h.jsxs("span",{className:ot.parentContext,children:[h.jsx("span",{className:ot.parentLabel,children:"Child of"}),h.jsx("span",{className:ot.parentName,children:T.title})]})]}),h.jsxs("div",{className:ot.headerActions,children:[h.jsx("button",{onClick:ae,disabled:!L||Y,className:ot.btnPrimary,"data-testid":"task-edit-save",children:Y?"Creating…":g?"Save Changes":"Create"}),h.jsx("button",{onClick:I,className:ot.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:ot.body,children:h.jsxs("div",{className:ot.formContent,children:[h.jsxs("div",{className:ot.section,children:[h.jsx("label",{className:ot.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:C,onChange:K=>E(K.target.value),placeholder:"Task title...",autoFocus:!0,className:ot.titleInput,"data-testid":"task-edit-title",onKeyDown:K=>{K.key==="Enter"&&L&&ae()}})]}),h.jsxs("div",{className:ot.section,children:[h.jsx("label",{className:ot.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:j,onChange:K=>A(K.target.value),placeholder:"Describe the task... (markdown supported)",className:ot.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:ot.section,children:[h.jsx("div",{className:ot.label,children:"Dependencies"}),G.length===0?h.jsx("div",{className:ot.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:ot.depList,children:G.map(K=>{const F=k.includes(K.id);return h.jsxs("label",{className:`${ot.depItem} ${F?ot.depItemSelected:""}`,"data-testid":`dep-option-${K.id}`,children:[h.jsx("input",{type:"checkbox",checked:F,onChange:()=>W(K.id)}),K.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",K.status,")"]})]},K.id)})})]})]})})]})}function TO(){const[n]=Of(),a=n.get("project")??"",i=n.get("parent")??void 0;return a?h.jsx(P1,{mode:"new",projectId:a,parentTaskId:i}):h.jsx(kr,{to:"/",replace:!0})}function EO(){const{taskId:n}=Wr();return h.jsx(P1,{mode:"edit",taskId:n})}const CO="_container_1pqxm_1",AO="_emptyState_1pqxm_8",jO="_card_1pqxm_14",NO="_cardHeader_1pqxm_34",wO="_categoryBadge_1pqxm_46",DO="_findingTitle_1pqxm_54",kO="_findingDate_1pqxm_60",MO="_findingContent_1pqxm_72",RO="_tags_1pqxm_78",OO="_tag_1pqxm_78",Yn={container:CO,emptyState:AO,card:jO,cardHeader:NO,categoryBadge:wO,findingTitle:DO,findingDate:kO,findingContent:MO,tags:RO,tag:OO};function BO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),u=Math.floor(r/60),d=Math.floor(u/60),p=Math.floor(d/24);if(r<60)return"just now";if(u<60)return`${u}m ago`;if(d<24)return`${d}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),y=a.getDate();return m?`${g} ${y}`:`${g} ${y} ${a.getFullYear()}`}const g0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function LO({projectId:n}){const{findings:a}=Gt(),i=a.filter(o=>o.projectId===n);return i.length===0?h.jsx("div",{className:Yn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:Yn.container,children:i.map((o,r)=>{const u=g0[o.category]||g0.general;return h.jsxs(un.div,{className:Yn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:Yn.cardHeader,children:[h.jsx("span",{className:Yn.categoryBadge,style:{background:u.bg,color:u.text},children:o.category}),h.jsx("span",{className:Yn.findingTitle,children:o.title}),h.jsx("span",{className:Yn.findingDate,title:o.createdAt,children:BO(o.createdAt)})]}),h.jsx("div",{className:Yn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:Yn.tags,children:o.tags.map(d=>h.jsx("span",{className:Yn.tag,style:{color:u.text,textShadow:`0 0 8px ${u.text}`},children:d},d))})]},o.id)})})}function wr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function qd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const u=Math.floor(o/60),d=o%60;return u===0?`${o}m ${r}s`:`${u}h ${d}m`}function UO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?D.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?D.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?D.envDotRed:D.envDotGray}function zO({status:n}){const a=os(n),i=rD(n);return h.jsx("span",{className:`${D.statusBadge} ${D[i]??D.statusPending}`,children:a.label})}function IO({task:n,tasksById:a,environments:i,projects:o,taskSessions:r}){const u=r.length>0?r[r.length-1]:void 0,d=(u==null?void 0:u.environmentId)??"",p=d?i.find(y=>y.id===d):void 0,m=o.find(y=>y.id===n.projectId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:D.overviewDashboard,children:[h.jsxs("div",{className:D.overviewHero,children:[h.jsx(zO,{status:n.status}),n.branch&&h.jsx("span",{className:D.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:D.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Description"}),h.jsx("div",{className:D.overviewMarkdown,children:h.jsx(Cf,{remarkPlugins:[Af],children:n.description})})]}),d&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Environment"}),h.jsxs("div",{className:D.envRow,children:[p&&h.jsx("span",{className:`${D.envDot} ${UO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:D.overviewValue,children:(p==null?void 0:p.displayName)??d})]})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:D.overviewMuted,children:"None"}):h.jsx("div",{className:D.depList,children:n.dependsOn.map(y=>{const v=a.get(y),_=(v==null?void 0:v.status)==="complete";return h.jsxs("div",{className:`${D.depItem} ${_?D.depDone:D.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(v==null?void 0:v.title)??y})]},y)})})]}),h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:D.timeline,children:[n.createdAt&&h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Created"}),h.jsx("span",{className:D.timelineValue,children:wr(n.createdAt)})]}),n.assignedAt&&(()=>{const y=qd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Assigned"}),h.jsx("span",{className:D.timelineValue,children:wr(n.assignedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.startedAt&&(()=>{const y=qd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Started"}),h.jsx("span",{className:D.timelineValue,children:wr(n.startedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),n.completedAt&&(()=>{const y=qd(n.startedAt,n.completedAt);return h.jsxs("div",{className:D.timelineRow,children:[h.jsx("span",{className:D.timelineKey,children:"Completed"}),h.jsx("span",{className:D.timelineValue,children:wr(n.completedAt)}),y!==void 0&&h.jsx("span",{className:D.timelineDelta,children:y})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:D.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:D.overviewSection,children:[h.jsx("div",{className:D.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:D.reviewNotes,children:n.reviewNotes})]})]})}function VO({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:u,onComplete:d,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:m,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:D.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:u,disabled:!a,className:D.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:d,className:D.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:D.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:D.headerActions,children:h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:D.headerActions,children:[h.jsx("button",{onClick:o,className:D.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:D.btnDanger,children:"Delete"})]})}function HO({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:D.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:D.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const u=o.id===a,d=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${D.attemptButton} ${u?D.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":u,"data-testid":`attempt-${r+1}`,children:["#",r+1,d&&h.jsx("span",{className:D.attemptStatus,children:d})]},o.id)})]})}function $d(){const{taskId:n}=Wr(),a=Wt(),i=Pn(),{events:o,eventsDropped:r,tasks:u,environments:d,loadSessionEvents:p,loadFindings:m,kill:g,startTask:y,resumeTask:v,completeTask:_,deleteTask:T,projects:C,taskSessions:E,loadTaskSessions:j}=Gt(),A=S.useRef(void 0),k=S.useRef(void 0),R=S.useRef(void 0),Y=S.useRef(void 0),H=S.useRef(void 0),V=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[G,L]=S.useState(V),[W,ae]=S.useState(!1),[I,ie]=S.useState(void 0),K=S.useRef(V);V!==K.current&&(K.current=V,V!==G&&L(V));const F=u.find(Z=>Z.id===n),se=(F==null?void 0:F.projectId)||void 0,z=F?E[F.id]??[]:[];let q;I&&z.some(Z=>Z.id===I)?q=I:q=(F==null?void 0:F.latestSessionId)||void 0;const te=()=>{ae(!0)},we=()=>{F&&(T(F.id),ae(!1),i(Zl(F.projectId),{replace:!0}))};if((F==null?void 0:F.id)!==k.current&&(k.current=F==null?void 0:F.id,I!==void 0&&ie(void 0)),S.useEffect(()=>{if(!(F!=null&&F.id))return;const Z=F.id!==Y.current,ee=F.latestSessionId!==H.current;(Z||ee)&&(Y.current=F.id,H.current=F.latestSessionId,j(F.id))},[F==null?void 0:F.id,F==null?void 0:F.latestSessionId,j]),(F==null?void 0:F.status)!==R.current){R.current=F==null?void 0:F.status;const Z=(F==null?void 0:F.status)==="not_started"?"overview":(F==null?void 0:F.status)==="working"||(F==null?void 0:F.status)==="paused"?"stream":(F==null?void 0:F.status)==="complete"?"findings":void 0;Z&&Z!==G&&L(Z)}const ge=S.useMemo(()=>new Map(u.map(Z=>[Z.id,Z])),[u]),He=S.useMemo(()=>{const Z=q?o.filter(ee=>ee.sessionId===q):[];return H1(V1(Z))},[o,q]),Ee=F?F.dependsOn.some(Z=>{const ee=ge.get(Z);return ee!==void 0&&ee.status!=="complete"}):!1,ve=S.useMemo(()=>PR(n,C,ge),[n,C,ge]);S.useEffect(()=>{q&&q!==A.current&&(A.current=q,p(q))},[q,p]),S.useEffect(()=>{G==="findings"&&se&&m(se)},[G,se,m]);const Se=Z=>{L(Z),i(ss(n,Z==="overview"?void 0:Z))};return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Hi,{segments:ve}),h.jsxs("div",{className:D.header,children:[h.jsxs("span",{className:D.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(F==null?void 0:F.title)||n}),F&&h.jsx("span",{className:D.taskStatusBadge,"data-testid":"task-status",children:F.status}),(F==null?void 0:F.branch)&&h.jsx("span",{className:D.taskBranch,children:F.branch}),Ee&&h.jsx("span",{className:D.taskBlockedBadge,children:"blocked"})]}),F&&h.jsx(VO,{task:F,sessionId:q,isBlocked:Ee,onStart:()=>y(F.id),onResume:()=>v(F.id),onStop:()=>q&&g(q),onComplete:()=>_(F.id),onDelete:te,onEdit:()=>i(ZT(F.id))})]}),h.jsxs("div",{className:D.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":G==="overview",className:`${D.tab} ${G==="overview"?D.active:""}`,onClick:()=>Se("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":G==="stream",className:`${D.tab} ${G==="stream"?D.active:""}`,onClick:()=>Se("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":G==="findings",className:`${D.tab} ${G==="findings"?D.active:""}`,onClick:()=>Se("findings"),children:"Findings"})]}),h.jsxs(ea,{mode:"wait",children:[G==="overview"&&h.jsx(un.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.overviewContent,children:F?h.jsx(IO,{task:F,tasksById:ge,environments:d,projects:C,taskSessions:z}):h.jsx("div",{className:D.waitingMessage,children:"No additional details"})},"overview"),G==="stream"&&h.jsxs(un.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},style:{display:"flex",flexDirection:"column",flex:1,overflow:"hidden"},children:[h.jsx(HO,{taskSessions:z,selectedSessionId:q,onSelect:Z=>ie(Z)}),h.jsx(I1,{events:He,eventsDropped:r,emptyState:!q&&F?h.jsxs("div",{className:D.emptyCta,children:[h.jsx("button",{className:D.ctaButton,onClick:()=>y(F.id),children:"Start Task"}),h.jsx("div",{className:D.ctaDescription,children:"Click to begin agent execution"})]}):q&&He.length===0?h.jsx("div",{className:D.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),G==="findings"&&h.jsx(un.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:D.tabContent,children:se?h.jsx(LO,{projectId:se}):h.jsx("div",{className:D.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),F&&h.jsx(rc,{isOpen:W,title:"Delete Task?",description:`"${F.title}" will be permanently removed.`,onConfirm:we,onCancel:()=>ae(!1)})]})}function PO(){const n=zR();return h.jsxs("div",{className:D.panelContainer,children:[h.jsx(Hi,{segments:n}),h.jsx("div",{className:D.emptyState,children:"Configure the new environment below"})]})}const GO="_layout_11u79_1",FO="_content_11u79_8",qO="_tabPanel_11u79_14",Yd={layout:GO,content:FO,tabPanel:qO},$O={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function YO(){const a=Wt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=$O[a],o=UR(i);return h.jsxs("div",{className:Yd.layout,children:[h.jsx(Hi,{segments:o}),h.jsx("div",{className:Yd.content,children:h.jsx("div",{className:Yd.tabPanel,children:h.jsx(M0,{})},a)})]})}const KO="_nav_13n0b_1",ZO="_tab_13n0b_44",XO="_tabIcon_13n0b_82",QO="_tabActive_13n0b_88",Dr={nav:KO,tab:ZO,tabIcon:XO,tabActive:QO},Ea=[{path:"environments",label:"Environments",icon:"🖥️"},{path:"credentials",label:"Credentials",icon:"🔑"},{path:"personas",label:"Personas",icon:"👤"},{path:"appearance",label:"Appearance",icon:"🎨"},{path:"about",label:"About",icon:"ℹ️"}];function JO(){var d;const n=Wt(),a=Pn(),i=S.useRef(null),o=((d=Ea.find(p=>n.pathname===`${Mi}/${p.path}`))==null?void 0:d.path)??Ea[0].path,r=S.useCallback(p=>{a(`${Mi}/${p}`)},[a]),u=S.useCallback(p=>{var T,C;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(E=>E===document.activeElement),y=g>=0?g:Ea.findIndex(E=>E.path===o);let v=y;if(p.key==="ArrowDown")p.preventDefault(),v=(y+1)%Ea.length;else if(p.key==="ArrowUp")p.preventDefault(),v=(y-1+Ea.length)%Ea.length;else if(p.key==="Home")p.preventDefault(),v=0;else if(p.key==="End")p.preventDefault(),v=Ea.length-1;else return;const _=Ea[v].path;a(`${Mi}/${_}`),(C=m[v])==null||C.focus()},[o,a]);return h.jsx("nav",{className:Dr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:u,children:Ea.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${Dr.tab} ${m?Dr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:Dr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const WO="_container_1nk8c_1",eB="_header_1nk8c_5",tB="_headerLabel_1nk8c_12",nB="_addButton_1nk8c_20",aB="_envRow_1nk8c_55",sB="_targeted_1nk8c_69",iB="_expanded_1nk8c_72",lB="_statusDot_1nk8c_76",oB="_pulse_1nk8c_79",rB="_envName_1nk8c_83",cB="_envActions_1nk8c_87",uB="_idleLabel_1nk8c_94",dB="_newChatButton_1nk8c_99",fB="_envActionsRow_1nk8c_126",hB="_connectButton_1nk8c_134",pB="_stopButton_1nk8c_160",mB="_deleteButton_1nk8c_186",gB="_provisionMessage_1nk8c_213",yB="_errorMessage_1nk8c_220",vB="_sessionRow_1nk8c_227",bB="_selected_1nk8c_243",SB="_sessionDot_1nk8c_248",_B="_sessionSummaryRow_1nk8c_252",xB="_sessionExpandArrow_1nk8c_272",TB="_sessionSummaryText_1nk8c_283",EB="_sessionCountBadge_1nk8c_290",CB="_emptyCta_1nk8c_313",AB="_ctaDescription_1nk8c_326",jB="_ctaButton_1nk8c_332",Pe={container:WO,header:eB,headerLabel:tB,addButton:nB,envRow:aB,targeted:sB,expanded:iB,statusDot:lB,pulse:oB,envName:rB,envActions:cB,idleLabel:uB,newChatButton:dB,envActionsRow:fB,connectButton:hB,stopButton:pB,deleteButton:mB,provisionMessage:gB,errorMessage:yB,sessionRow:vB,selected:bB,sessionDot:SB,sessionSummaryRow:_B,sessionExpandArrow:xB,sessionSummaryText:TB,sessionCountBadge:EB,emptyCta:CB,ctaDescription:AB,ctaButton:jB},NB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},wB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},y0=["running","idle","failed","interrupted","completed"],DB=.2;function kB(n){const a={};for(const u of n)a[u.status]=(a[u.status]||0)+1;const i=y0.filter(u=>a[u]>0).map(u=>`${a[u]} ${wB[u]||u}`),o=new Set(y0),r=Object.keys(a).filter(u=>!o.has(u)).sort().map(u=>`${a[u]} ${u}`);return[...i,...r].join(", ")}function MB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:Pe.sessionDot,style:{color:a},children:"●"})}function RB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:u,sessionsExpanded:d,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:y,onRemove:v,navigate:_}){const[T,C]=S.useState(!1),E=NB[n.status]||"var(--text-tertiary)",j=n.status==="connected",A=n.status==="connecting",k=n.status==="disconnected"||n.status==="error";return h.jsxs("div",{children:[h.jsx(rc,{isOpen:T,title:"Delete Environment?",description:`"${n.displayName||n.id}" will be permanently removed. This destroys the workspace and removes all data.`,onConfirm:()=>{v(n.id),C(!1)},onCancel:()=>C(!1)}),h.jsxs("div",{className:`${Pe.envRow} ${o?Pe.targeted:""} ${r?Pe.expanded:""}`,"data-testid":"env-row",onClick:u,children:[h.jsx("span",{className:`${Pe.statusDot} ${j?Pe.pulse:""}`,style:{color:E},children:"●"}),h.jsx("span",{className:Pe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:Pe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:Pe.idleLabel,children:"(idle)"}),j&&h.jsx("button",{onClick:R=>{R.stopPropagation(),_(z0(n.id,n.defaultRuntime||"claude-code"))},title:"New chat",className:Pe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:Pe.envActionsRow,children:[A&&m&&h.jsx("span",{className:Pe.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:Pe.errorMessage,children:m.message}),k&&h.jsx("button",{onClick:R=>{R.stopPropagation(),g(n.id)},className:Pe.connectButton,children:n.status==="error"?"Retry":"Connect"}),j&&h.jsx("button",{onClick:R=>{R.stopPropagation(),y(n.id)},className:Pe.stopButton,children:"Stop"}),!A&&h.jsx("button",{onClick:R=>{R.stopPropagation(),C(!0)},className:Pe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Pe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":d,"aria-label":d?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),p())},children:[h.jsx("span",{className:`${Pe.sessionExpandArrow} ${d?Pe.expanded:""}`,children:"▸"}),h.jsx("span",{className:Pe.sessionSummaryText,children:kB(a)}),h.jsx("span",{className:Pe.sessionCountBadge,children:a.length})]}),h.jsx(ea,{children:d&&h.jsx(un.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:DB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(R=>h.jsxs("div",{onClick:Y=>{Y.stopPropagation(),_(U0(R.id))},className:`${Pe.sessionRow} ${i===R.id?Pe.selected:""}`,title:R.prompt,"data-testid":"session-row",children:[h.jsx(MB,{status:R.status})," ",R.prompt.length>24?R.prompt.slice(0,24)+"...":R.prompt]},R.id))})})]})]})}function OB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:u}=Gt(),d=Pn(),[p,m]=S.useState(null),[g,y]=S.useState(new Set),v=Qt("/sessions/:sessionId"),_=Qt("/sessions/new"),T=(v==null?void 0:v.params.sessionId)!=="new"?v==null?void 0:v.params.sessionId:void 0,[C]=Of(),E=_?C.get("env")??void 0:void 0;return h.jsxs("div",{className:Pe.container,children:[h.jsxs("div",{className:Pe.header,children:[h.jsx("span",{className:Pe.headerLabel,children:"Environments"}),h.jsx("button",{className:Pe.addButton,onClick:()=>d(Ny),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:Pe.emptyCta,children:[h.jsx("button",{className:Pe.ctaButton,onClick:()=>d(Ny),children:"Add Environment"}),h.jsx("div",{className:Pe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(j=>{const A=a.filter(k=>k.environmentId===j.id);return h.jsx(RB,{env:j,envSessions:A,selectedSessionId:T,isNewChatTarget:E===j.id,expanded:p===j.id,onToggleExpand:()=>m(p===j.id?null:j.id),sessionsExpanded:g.has(j.id),onToggleSessionsExpand:()=>{y(k=>{const R=new Set(k);return R.has(j.id)?R.delete(j.id):R.add(j.id),R})},provisionProgress:i[j.id],onProvision:o,onStop:r,onRemove:u,navigate:d},j.id)})]})}function BB(){return h.jsx(OB,{})}const LB="_section_1ingb_14",UB="_sectionTitle_1ingb_26",zB="_sectionDescription_1ingb_35",IB="_tokenList_1ingb_48",VB="_tokenRow_1ingb_55",HB="_tokenBadge_1ingb_68",PB="_tokenName_1ingb_83",GB="_tokenTarget_1ingb_90",FB="_deleteButton_1ingb_99",qB="_addForm_1ingb_113",$B="_formRow_1ingb_119",YB="_input_1ingb_125",KB="_select_1ingb_155",ZB="_addButton_1ingb_187",XB="_emptyStateInfo_1ingb_221",QB="_themeOptions_1ingb_229",JB="_themeOption_1ingb_229",WB="_themeOptionSelected_1ingb_254",e4="_themeOptionHeader_1ingb_259",t4="_themeOptionLabel_1ingb_266",n4="_themeOptionDesc_1ingb_273",a4="_variantToggle_1ingb_279",s4="_variantButton_1ingb_286",i4="_variantActive_1ingb_305",l4="_themeSwatches_1ingb_311",o4="_themeSwatch_1ingb_311",r4="_systemToggle_1ingb_325",c4="_systemToggleHint_1ingb_341",u4="_themeActive_1ingb_348",d4="_aboutGrid_1ingb_354",f4="_aboutItem_1ingb_360",h4="_aboutLabel_1ingb_373",p4="_aboutValue_1ingb_379",m4="_aboutDot_1ingb_387",g4="_aboutDotConnected_1ingb_394",y4="_aboutDotDisconnected_1ingb_398",ue={section:LB,sectionTitle:UB,sectionDescription:zB,tokenList:IB,tokenRow:VB,tokenBadge:HB,tokenName:PB,tokenTarget:GB,deleteButton:FB,addForm:qB,formRow:$B,input:YB,select:KB,addButton:ZB,emptyStateInfo:XB,themeOptions:QB,themeOption:JB,themeOptionSelected:WB,themeOptionHeader:e4,themeOptionLabel:t4,themeOptionDesc:n4,variantToggle:a4,variantButton:s4,variantActive:i4,themeSwatches:l4,themeSwatch:o4,systemToggle:r4,systemToggleHint:c4,themeActive:u4,aboutGrid:d4,aboutItem:f4,aboutLabel:h4,aboutValue:p4,aboutDot:m4,aboutDotConnected:g4,aboutDotDisconnected:y4},v4=[{key:"claude",label:"Claude",description:"Forward Claude credentials for AI agent access.",options:[{value:"off",label:"Off"},{value:"subscription",label:"Subscription"},{value:"api_key",label:"API Key"}]},{key:"github",label:"GitHub",description:"Forward GITHUB_TOKEN and GH_TOKEN for git operations.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"copilot",label:"Copilot",description:"Forward Copilot tokens (COPILOT_GITHUB_TOKEN, CLI config).",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]},{key:"codex",label:"Codex",description:"Forward OPENAI_API_KEY for Codex/OpenAI access.",options:[{value:"off",label:"Off"},{value:"on",label:"On"}]}];function b4(){const{credentialProviders:n,updateCredentialProviders:a}=Gt(),i=(o,r)=>{const u={...n};o==="claude"?u.claude=r:u[o]=r,a(u)};return h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:ue.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:ue.tokenList,children:v4.map(o=>h.jsxs("div",{className:ue.tokenRow,children:[h.jsx("span",{className:ue.tokenName,children:o.label}),h.jsx("span",{className:ue.tokenTarget,children:o.description}),h.jsx("select",{className:ue.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const S4=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function _4(){const{tokens:n,setToken:a,deleteToken:i}=Gt(),{showToast:o}=so(),[r,u]=S.useState(""),[d,p]=S.useState(""),[m,g]=S.useState("env_var"),[y,v]=S.useState(""),[_,T]=S.useState(null),C=A=>{if(A.preventDefault(),!r||!d)return;const k=m==="env_var"?y||r.toUpperCase()+"_TOKEN":"";a(r,d,m,k,m==="file"?y:""),o("Token saved successfully","success"),u(""),p(""),v("")},E=A=>{T(A)},j=()=>{_&&(i(_),o("Token deleted","info")),T(null)};return h.jsxs(h.Fragment,{children:[h.jsx(rc,{isOpen:_!==null,title:"Delete Token?",description:_?`"${_}" will be permanently removed.`:void 0,onConfirm:j,onCancel:()=>T(null)}),h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Tokens"}),h.jsx("p",{className:ue.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:ue.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:ue.tokenList,children:n.map(A=>h.jsxs("div",{className:ue.tokenRow,children:[h.jsx("span",{className:ue.tokenBadge,children:A.tokenType}),h.jsx("span",{className:ue.tokenName,children:A.name}),h.jsx("span",{className:ue.tokenTarget,children:A.tokenType==="env_var"?A.envVar:A.filePath}),h.jsx("button",{className:ue.deleteButton,onClick:()=>E(A.name),title:`Delete ${A.name}`,children:"×"})]},A.name))}),h.jsxs("form",{className:ue.addForm,onSubmit:C,children:[h.jsxs("div",{className:ue.formRow,children:[h.jsx("input",{className:ue.input,type:"text",placeholder:"Token name",value:r,onChange:A=>u(A.target.value)}),h.jsx("input",{className:ue.input,type:"password",placeholder:"Value",value:d,onChange:A=>p(A.target.value)})]}),h.jsxs("div",{className:ue.formRow,children:[h.jsx("select",{className:ue.select,value:m,onChange:A=>g(A.target.value),children:S4.map(A=>h.jsx("option",{value:A.value,children:A.label},A.value))}),h.jsx("input",{className:ue.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:y,onChange:A=>v(A.target.value)}),h.jsx("button",{className:ue.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function x4(){return h.jsxs(h.Fragment,{children:[h.jsx(b4,{}),h.jsx(_4,{})]})}const T4="_container_1xcp7_1",E4="_header_1xcp7_7",C4="_form_1xcp7_19",A4="_formActions_1xcp7_87",j4="_list_1xcp7_93",N4="_card_1xcp7_99",w4="_active_1xcp7_109",D4="_cardHeader_1xcp7_113",k4="_cardActions_1xcp7_123",M4="_description_1xcp7_128",R4="_meta_1xcp7_134",O4="_promptDetails_1xcp7_151",B4="_promptText_1xcp7_163",L4="_empty_1xcp7_180",U4="_btnPrimary_1xcp7_186",z4="_btnSecondary_1xcp7_220",I4="_btnSmall_1xcp7_247",V4="_btnDanger_1xcp7_273",St={container:T4,header:E4,form:C4,formActions:A4,list:j4,card:N4,active:w4,cardHeader:D4,cardActions:k4,description:M4,meta:R4,promptDetails:O4,promptText:B4,empty:L4,btnPrimary:U4,btnSecondary:z4,btnSmall:I4,btnDanger:V4};function H4(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o}=Gt(),[r,u]=S.useState(null),[d,p]=S.useState(!1),[m,g]=S.useState(null),[y,v]=S.useState(""),[_,T]=S.useState(""),[C,E]=S.useState(""),[j,A]=S.useState(""),[k,R]=S.useState(""),[Y,H]=S.useState(0),V=()=>{v(""),T(""),E(""),A(""),R(""),H(0)},G=()=>{V(),u(null),p(!0)},L=K=>{v(K.name),T(K.description),E(K.systemPrompt),A(K.runtime),R(K.model),H(K.maxTurns),u(K),p(!1)},W=K=>{K.preventDefault(),!(!y.trim()||!C.trim())&&(r?(i(r.id,y,_,C,j,k,Y),u(null)):(a(y,_,C,j,k,Y),p(!1)),V())},ae=K=>{o(K),g(null),(r==null?void 0:r.id)===K&&(u(null),V())},I=()=>{u(null),p(!1),V()},ie=()=>h.jsxs("form",{onSubmit:W,className:St.form,children:[h.jsx("h3",{children:r?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:y,onChange:K=>v(K.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:_,onChange:K=>T(K.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:j,onChange:K=>A(K.target.value),children:[h.jsx("option",{value:"",children:"Default"}),h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:k,onChange:K=>R(K.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:Y,onChange:K=>H(parseInt(K.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:C,onChange:K=>E(K.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:St.formActions,children:[h.jsx("button",{type:"submit",className:St.btnPrimary,children:r?"Save":"Create"}),h.jsx("button",{type:"button",onClick:I,className:St.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:St.container,children:[h.jsxs("div",{className:St.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:G,className:St.btnPrimary,children:"+ New Persona"})]}),(d||r)&&ie(),n.length===0&&!d?h.jsx("p",{className:St.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:St.list,children:n.map(K=>h.jsxs("div",{className:`${St.card} ${(r==null?void 0:r.id)===K.id?St.active:""}`,children:[h.jsxs("div",{className:St.cardHeader,children:[h.jsx("strong",{children:K.name}),h.jsxs("div",{className:St.cardActions,children:[h.jsx("button",{onClick:()=>L(K),className:St.btnSmall,children:"Edit"}),m===K.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ae(K.id),className:St.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>g(null),className:St.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>g(K.id),className:St.btnSmall,children:"Delete"})]})]}),K.description&&h.jsx("p",{className:St.description,children:K.description}),h.jsxs("div",{className:St.meta,children:[K.runtime&&h.jsxs("span",{children:["Runtime: ",K.runtime]}),K.model&&h.jsxs("span",{children:["Model: ",K.model]}),K.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",K.maxTurns]})]}),h.jsxs("details",{className:St.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:St.promptText,children:K.systemPrompt})]})]},K.id))})]})}function P4(){return h.jsx(H4,{})}function G4(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=q0();return h.jsxs("section",{className:ue.section,children:[h.jsx("h3",{className:ue.sectionTitle,children:"Appearance"}),h.jsx("p",{className:ue.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:ue.themeOptions,children:tc.filter(u=>!u.hidden).map(u=>{const d=!!(u.variantLightId&&u.variantDarkId),p=d?n===u.id||n===u.variantLightId||n===u.variantDarkId:n===u.id,m=d&&a===u.variantLightId;return h.jsxs("button",{type:"button",className:`${ue.themeOption} ${p?ue.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(u.id),children:[h.jsxs("span",{className:ue.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:ue.themeOptionLabel,children:u.label}),h.jsx("span",{className:ue.themeOptionDesc,children:u.description})]}),d&&h.jsxs("span",{className:ue.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${ue.variantButton} ${p&&m?ue.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${ue.variantButton} ${p&&!m?ue.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(u.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(u.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),u.swatches&&h.jsx("span",{className:ue.themeSwatches,children:u.swatches.map((g,y)=>h.jsx("span",{className:ue.themeSwatch,style:{background:g}},y))})]},u.id)})}),h.jsxs("label",{className:ue.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:u=>r(u.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:ue.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:ue.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function F4(){return h.jsx(G4,{})}function q4(){const{connected:n,environments:a,sessions:i}=Gt(),o=a.filter(d=>d.status==="connected").length,r=a.length,u=i.filter(d=>["running","idle"].includes(d.status)).length;return h.jsxs("section",{className:ue.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:ue.sectionTitle,children:"About"}),h.jsx("p",{className:ue.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:ue.aboutGrid,children:[h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Connection"}),h.jsxs("span",{className:ue.aboutValue,children:[h.jsx("span",{className:`${ue.aboutDot} ${n?ue.aboutDotConnected:ue.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Environments"}),h.jsxs("span",{className:ue.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:ue.aboutValue,children:u})]}),h.jsxs("div",{className:ue.aboutItem,children:[h.jsx("span",{className:ue.aboutLabel,children:"Version"}),h.jsx("span",{className:ue.aboutValue,children:"0.39.0"})]})]})]})}function $4(){return h.jsx(q4,{})}const Y4="_root_h353j_1",K4="_body_h353j_7",Z4="_main_h353j_19",X4="_sidebarWrapper_h353j_26",Q4="_overlay_h353j_56",Ul={root:Y4,body:K4,main:Z4,sidebarWrapper:X4,overlay:Q4},J4=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function W4(){const{lastSpawnedId:n,environments:a}=Gt(),{showToast:i}=so();Hk(a,i);const o=Pn(),r=Wt(),u=r.pathname.startsWith(Mi),[d,p]=S.useState(!1),m=S.useCallback(()=>p(g=>!g),[]);return S.useEffect(()=>{p(!1)},[r.pathname]),S.useEffect(()=>{if(!d)return;const g=y=>{y.key==="Escape"&&p(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[d]),S.useEffect(()=>{n&&!r.pathname.startsWith("/tasks/")&&o(U0(n),{replace:!0})},[n,o,r.pathname]),h.jsxs("div",{className:Ul.root,children:[h.jsx(XE,{onToggleSidebar:u?void 0:m,sidebarOpen:d}),h.jsxs("div",{className:Ul.body,children:[h.jsx("div",{className:Ul.sidebarWrapper,"data-sidebar-open":d,"data-settings":u,children:u?h.jsx(JO,{}):h.jsx(rk,{})}),d&&!u&&h.jsx("div",{className:Ul.overlay,"data-testid":"drawer-overlay",onClick:()=>p(!1)}),h.jsxs("div",{className:Ul.main,children:[h.jsx(M0,{}),h.jsx(jk,{})]})]}),h.jsx(Vk,{})]})}function e5(){return h.jsx(pT,{children:h.jsxs(_t,{element:h.jsx(W4,{}),children:[h.jsx(_t,{index:!0,element:h.jsx(BR,{})}),h.jsx(_t,{path:"sessions/new",element:h.jsx(GR,{})}),h.jsx(_t,{path:"sessions/:sessionId",element:h.jsx(s3,{})}),h.jsx(_t,{path:"projects/:projectId",element:h.jsx(nO,{})}),h.jsx(_t,{path:"tasks/new",element:h.jsx(TO,{})}),h.jsx(_t,{path:"tasks/:taskId",element:h.jsx($d,{})}),h.jsx(_t,{path:"tasks/:taskId/stream",element:h.jsx($d,{})}),h.jsx(_t,{path:"tasks/:taskId/findings",element:h.jsx($d,{})}),h.jsx(_t,{path:"tasks/:taskId/edit",element:h.jsx(EO,{})}),h.jsx(_t,{path:"environments/new",element:h.jsx(PO,{})}),h.jsxs(_t,{path:"settings",element:h.jsx(YO,{}),children:[h.jsx(_t,{index:!0,element:h.jsx(kr,{to:"environments",replace:!0})}),h.jsx(_t,{path:"environments",element:h.jsx(BB,{})}),h.jsx(_t,{path:"credentials",element:h.jsx(x4,{})}),h.jsx(_t,{path:"tokens",element:h.jsx(kr,{to:"../credentials",replace:!0})}),h.jsx(_t,{path:"personas",element:h.jsx(P4,{})}),h.jsx(_t,{path:"appearance",element:h.jsx(F4,{})}),h.jsx(_t,{path:"about",element:h.jsx($4,{})})]}),h.jsx(_t,{path:"*",element:h.jsx(kr,{to:"/",replace:!0})})]})})}function t5(){const n=J4?OE:CE;return h.jsx(VE,{children:h.jsx(LE,{children:h.jsx(n,{children:h.jsx(IT,{children:h.jsx(e5,{})})})})})}gx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(t5,{})}));