@grackle-ai/web 0.42.0 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,91 +0,0 @@
1
- import{r as ox,a as S,j as h,v as rx,b as cx,t as Tr,i as ux,f as dx,M as jf,c as Nf}from"./markdown-gcy1Jmzi.js";import{r as fx,d as vy,H as by,P as Sy,i as hx,B as px,a as mx,C as gx,M as yx}from"./dagview-EHk2VaeR.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const d of r)if(d.type==="childList")for(const u of d.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function i(r){const d={};return r.integrity&&(d.integrity=r.integrity),r.referrerPolicy&&(d.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?d.credentials="include":r.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(r){if(r.ep)return;r.ep=!0;const d=i(r);fetch(r.href,d)}})();var _d={exports:{}},Ml={},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 _y;function vx(){return _y||(_y=1,(function(n){function a(B,F){var W=B.length;B.push(F);e:for(;0<W;){var be=W-1>>>1,Te=B[be];if(0<r(Te,F))B[be]=F,B[W]=Te,W=be;else break e}}function i(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var F=B[0],W=B.pop();if(W!==F){B[0]=W;e:for(var be=0,Te=B.length,nt=Te>>>1;be<nt;){var Me=2*(be+1)-1,fe=B[Me],Ie=Me+1,Ee=B[Ie];if(0>r(fe,W))Ie<Te&&0>r(Ee,fe)?(B[be]=Ee,B[Ie]=W,be=Ie):(B[be]=fe,B[Me]=W,be=Me);else if(Ie<Te&&0>r(Ee,W))B[be]=Ee,B[Ie]=W,be=Ie;else break e}}return F}function r(B,F){var W=B.sortIndex-F.sortIndex;return W!==0?W:B.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var u=Date,p=u.now();n.unstable_now=function(){return u.now()-p}}var m=[],g=[],v=1,y=null,_=3,T=!1,E=!1,j=!1,N=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function H(B){for(var F=i(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=B)o(g),F.sortIndex=F.expirationTime,a(m,F);else break;F=i(g)}}function O(B){if(j=!1,H(B),!E)if(i(m)!==null)E=!0,$||($=!0,ae());else{var F=i(g);F!==null&&Q(O,F.startTime-B)}}var $=!1,G=-1,M=5,V=-1;function te(){return N?!0:!(n.unstable_now()-V<M)}function ne(){if(N=!1,$){var B=n.unstable_now();V=B;var F=!0;try{e:{E=!1,j&&(j=!1,A(G),G=-1),T=!0;var W=_;try{t:{for(H(B),y=i(m);y!==null&&!(y.expirationTime>B&&te());){var be=y.callback;if(typeof be=="function"){y.callback=null,_=y.priorityLevel;var Te=be(y.expirationTime<=B);if(B=n.unstable_now(),typeof Te=="function"){y.callback=Te,H(B),F=!0;break t}y===i(m)&&o(m),H(B)}else o(m);y=i(m)}if(y!==null)F=!0;else{var nt=i(g);nt!==null&&Q(O,nt.startTime-B),F=!1}}break e}finally{y=null,_=W,T=!1}F=void 0}}finally{F?ae():$=!1}}}var ae;if(typeof k=="function")ae=function(){k(ne)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,Y=re.port2;re.port1.onmessage=ne,ae=function(){Y.postMessage(null)}}else ae=function(){C(ne,0)};function Q(B,F){G=C(function(){B(n.unstable_now())},F)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return _},n.unstable_next=function(B){switch(_){case 1:case 2:case 3:var F=3;break;default:F=_}var W=_;_=F;try{return B()}finally{_=W}},n.unstable_requestPaint=function(){N=!0},n.unstable_runWithPriority=function(B,F){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=_;_=B;try{return F()}finally{_=W}},n.unstable_scheduleCallback=function(B,F,W){var be=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?be+W:be):W=be,B){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=W+Te,B={id:v++,callback:F,priorityLevel:B,startTime:W,expirationTime:Te,sortIndex:-1},W>be?(B.sortIndex=W,a(g,B),i(m)===null&&B===i(g)&&(j?(A(G),G=-1):j=!0,Q(O,W-be))):(B.sortIndex=Te,a(m,B),E||T||(E=!0,$||($=!0,ae()))),B},n.unstable_shouldYield=te,n.unstable_wrapCallback=function(B){var F=_;return function(){var W=_;_=F;try{return B.apply(this,arguments)}finally{_=W}}}})(Td)),Td}var xy;function bx(){return xy||(xy=1,xd.exports=vx()),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 Ty;function Sx(){if(Ty)return Ml;Ty=1;var n=bx(),a=ox(),i=fx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,l=t;;){var c=s.return;if(c===null)break;var f=c.alternate;if(f===null){if(l=c.return,l!==null){s=l;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===s)return m(c),e;if(f===l)return m(c),t;f=f.sibling}throw Error(o(188))}if(s.return!==l.return)s=c,l=f;else{for(var b=!1,x=c.child;x;){if(x===s){b=!0,s=c,l=f;break}if(x===l){b=!0,l=c,s=f;break}x=x.sibling}if(!b){for(x=f.child;x;){if(x===s){b=!0,s=f,l=c;break}if(x===l){b=!0,l=f,s=c;break}x=x.sibling}if(!b)throw Error(o(189))}}if(s.alternate!==l)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),k=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case N:return"StrictMode";case O:return"Suspense";case $:return"SuspenseList";case V:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case k:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:Y(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var Q=Array.isArray,B=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},be=[],Te=-1;function nt(e){return{current:e}}function Me(e){0>Te||(e.current=be[Te],be[Te]=null,Te--)}function fe(e,t){Te++,be[Te]=e.current,e.current=t}var Ie=nt(null),Ee=nt(null),ee=nt(null),Ve=nt(null);function Ne(e,t){switch(fe(ee,t),fe(Ee,e),fe(Ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hg(t),e=Pg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Me(Ie),fe(Ie,e)}function _e(){Me(Ie),Me(Ee),Me(ee)}function dt(e){e.memoizedState!==null&&fe(Ve,e);var t=Ie.current,s=Pg(t,e.type);t!==s&&(fe(Ee,e),fe(Ie,s))}function ft(e){Ee.current===e&&(Me(Ie),Me(Ee)),Ve.current===e&&(Me(Ve),Nl._currentValue=W)}var Ut,kt;function $e(e){if(Ut===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);Ut=t&&t[1]||"",kt=-1<s.stack.indexOf(`
18
- at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
19
- `+Ut+e+kt}var Re=!1;function Rn(e,t){if(!e||Re)return"";Re=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(P){var z=P}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(P){z=P}e.call(Z.prototype)}}else{try{throw Error()}catch(P){z=P}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(P){if(P&&z&&typeof P.stack=="string")return[P.stack,z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),b=f[0],x=f[1];if(b&&x){var w=b.split(`
20
- `),U=x.split(`
21
- `);for(c=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;c<U.length&&!U[c].includes("DetermineComponentFrameRoot");)c++;if(l===w.length||c===U.length)for(l=w.length-1,c=U.length-1;1<=l&&0<=c&&w[l]!==U[c];)c--;for(;1<=l&&0<=c;l--,c--)if(w[l]!==U[c]){if(l!==1||c!==1)do if(l--,c--,0>c||w[l]!==U[c]){var q=`
22
- `+w[l].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=l&&0<=c);break}}}finally{Re=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?$e(s):""}function Aa(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Rn(e.type,!1);case 11:return Rn(e.type.render,!1);case 1:return Rn(e.type,!0);case 31:return $e("Activity");default:return""}}function ja(e){try{var t="",s=null;do t+=Aa(e,s),s=e,e=e.return;while(e);return t}catch(l){return`
23
- Error generating stack: `+l.message+`
24
- `+l.stack}}var Hn=Object.prototype.hasOwnProperty,Wn=n.unstable_scheduleCallback,On=n.unstable_cancelCallback,ea=n.unstable_shouldYield,X=n.unstable_requestPaint,J=n.unstable_now,se=n.unstable_getCurrentPriorityLevel,ge=n.unstable_ImmediatePriority,pe=n.unstable_UserBlockingPriority,Ue=n.unstable_NormalPriority,Ce=n.unstable_LowPriority,bt=n.unstable_IdlePriority,xe=n.log,ht=n.unstable_setDisableYieldValue,St=null,Oe=null;function Mt(e){if(typeof xe=="function"&&ht(e),Oe&&typeof Oe.setStrictMode=="function")try{Oe.setStrictMode(St,e)}catch{}}var Se=Math.clz32?Math.clz32:le,we=Math.log,Et=Math.LN2;function le(e){return e>>>=0,e===0?32:31-(we(e)/Et|0)|0}var Ct=256,Bn=262144,ro=4194304;function rs(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function co(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=rs(l):(b&=x,b!==0?c=rs(b):s||(s=x&~e,s!==0&&(c=rs(s))))):(x=l&~f,x!==0?c=rs(x):b!==0?c=rs(b):s||(s=l&~e,s!==0&&(c=rs(s)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,s=t&-t,f>=s||f===32&&(s&4194048)!==0)?t:c}function Hi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function K1(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 xh(){var e=ro;return ro<<=1,(ro&62914560)===0&&(ro=4194304),e}function cc(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function Pi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Z1(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,w=e.expirationTimes,U=e.hiddenUpdates;for(s=b&~s;0<s;){var q=31-Se(s),Z=1<<q;x[q]=0,w[q]=-1;var z=U[q];if(z!==null)for(U[q]=null,q=0;q<z.length;q++){var P=z[q];P!==null&&(P.lane&=-536870913)}s&=~Z}l!==0&&Th(e,l,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function Th(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Se(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|s&261930}function Eh(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var l=31-Se(s),c=1<<l;c&t|e[l]&t&&(e[l]|=t),s&=~c}}function Ch(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 Ah(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:dy(e.type))}function jh(e,t){var s=F.p;try{return F.p=e,t()}finally{F.p=s}}var Na=Math.random().toString(36).slice(2),zt="__reactFiber$"+Na,Jt="__reactProps$"+Na,Us="__reactContainer$"+Na,fc="__reactEvents$"+Na,X1="__reactListeners$"+Na,Q1="__reactHandles$"+Na,Nh="__reactResources$"+Na,Gi="__reactMarker$"+Na;function hc(e){delete e[zt],delete e[Jt],delete e[fc],delete e[X1],delete e[Q1]}function zs(e){var t=e[zt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Us]||s[zt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Zg(e);e!==null;){if(s=e[zt])return s;e=Zg(e)}return t}e=s,s=e.parentNode}return null}function Vs(e){if(e=e[zt]||e[Us]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Hs(e){var t=e[Nh];return t||(t=e[Nh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Bt(e){e[Gi]=!0}var wh=new Set,Dh={};function cs(e,t){Ps(e,t),Ps(e+"Capture",t)}function Ps(e,t){for(Dh[e]=t,e=0;e<t.length;e++)wh.add(t[e])}var J1=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]*$"),kh={},Mh={};function W1(e){return Hn.call(Mh,e)?!0:Hn.call(kh,e)?!1:J1.test(e)?Mh[e]=!0:(kh[e]=!0,!1)}function uo(e,t,s){if(W1(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 fo(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 ta(e,t,s,l){if(l===null)e.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+l)}}function yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function eS(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=Rh(e)?"checked":"value";e._valueTracker=eS(e,t,""+e[t])}}function Oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),l="";return e&&(l=Rh(e)?e.checked?"true":"false":e.value),e=l,e!==s?(t.setValue(e),!0):!1}function ho(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 tS=/[\n"\\]/g;function vn(e){return e.replace(tS,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=""+yn(t)):e.value!==""+yn(t)&&(e.value=""+yn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?gc(e,b,yn(t)):s!=null?gc(e,b,yn(s)):l!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+yn(x):e.removeAttribute("name")}function Bh(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?""+yn(s):"",t=t!=null?""+yn(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"&&ho(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Gs(e,t,s,l){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&l&&(e[s].defaultSelected=!0)}else{for(s=""+yn(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Lh(e,t,s){if(t!=null&&(t=""+yn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+yn(s):""}function Ih(e,t,s,l){if(t==null){if(l!=null){if(s!=null)throw Error(o(92));if(Q(l)){if(1<l.length)throw Error(o(93));l=l[0]}s=l}s==null&&(s=""),t=s}s=yn(t),e.defaultValue=s,l=e.textContent,l===s&&l!==""&&l!==null&&(e.value=l),pc(e)}function Fs(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var nS=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 Uh(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||nS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function zh(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&&Uh(e,c,l)}else for(var f in t)t.hasOwnProperty(f)&&Uh(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 aS=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"]]),sS=/^[\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 po(e){return sS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function na(){}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 $s=null,qs=null;function Vh(e){var t=Vs(e);if(t&&(e=t.stateNode)){var s=e[Jt]||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="'+vn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var l=s[t];if(l!==e&&l.form===e.form){var c=l[Jt]||null;if(!c)throw Error(o(90));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&&Oh(l)}break e;case"textarea":Lh(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Gs(e,!!s.multiple,t,!1)}}}var Sc=!1;function Hh(e,t,s){if(Sc)return e(t,s);Sc=!0;try{var l=e(t);return l}finally{if(Sc=!1,($s!==null||qs!==null)&&(tr(),$s&&(t=$s,e=qs,qs=$s=null,Vh(t),e)))for(t=0;t<e.length;t++)Vh(e[t])}}function $i(e,t){var s=e.stateNode;if(s===null)return null;var l=s[Jt]||null;if(l===null)return null;s=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_c=!1;if(aa)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){_c=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{_c=!1}var wa=null,xc=null,mo=null;function Ph(){if(mo)return mo;var e,t=xc,s=t.length,l,c="value"in wa?wa.value:wa.textContent,f=c.length;for(e=0;e<s&&t[e]===c[e];e++);var b=s-e;for(l=1;l<=b&&t[s-l]===c[f-l];l++);return mo=c.slice(e,1<l?1-l:void 0)}function go(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yo(){return!0}function Gh(){return!1}function Wt(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)?yo:Gh,this.isPropagationStopped=Gh,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=yo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=yo)},persist:function(){},isPersistent:yo}),t}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vo=Wt(us),Yi=y({},us,{view:0,detail:0}),iS=Wt(Yi),Tc,Ec,Ki,bo=y({},Yi,{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!==Ki&&(Ki&&e.type==="mousemove"?(Tc=e.screenX-Ki.screenX,Ec=e.screenY-Ki.screenY):Ec=Tc=0,Ki=e),Tc)},movementY:function(e){return"movementY"in e?e.movementY:Ec}}),Fh=Wt(bo),lS=y({},bo,{dataTransfer:0}),oS=Wt(lS),rS=y({},Yi,{relatedTarget:0}),Cc=Wt(rS),cS=y({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),uS=Wt(cS),dS=y({},us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),fS=Wt(dS),hS=y({},us,{data:0}),$h=Wt(hS),pS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mS={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"},gS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=gS[e])?!!t[e]:!1}function Ac(){return yS}var vS=y({},Yi,{key:function(e){if(e.key){var t=pS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=go(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mS[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"?go(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?go(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bS=Wt(vS),SS=y({},bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qh=Wt(SS),_S=y({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ac}),xS=Wt(_S),TS=y({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),ES=Wt(TS),CS=y({},bo,{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}),AS=Wt(CS),jS=y({},us,{newState:0,oldState:0}),NS=Wt(jS),wS=[9,13,27,32],jc=aa&&"CompositionEvent"in window,Zi=null;aa&&"documentMode"in document&&(Zi=document.documentMode);var DS=aa&&"TextEvent"in window&&!Zi,Yh=aa&&(!jc||Zi&&8<Zi&&11>=Zi),Kh=" ",Zh=!1;function Xh(e,t){switch(e){case"keyup":return wS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ys=!1;function kS(e,t){switch(e){case"compositionend":return Qh(t);case"keypress":return t.which!==32?null:(Zh=!0,Kh);case"textInput":return e=t.data,e===Kh&&Zh?null:e;default:return null}}function MS(e,t){if(Ys)return e==="compositionend"||!jc&&Xh(e,t)?(e=Ph(),mo=xc=wa=null,Ys=!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 Yh&&t.locale!=="ko"?null:t.data;default:return null}}var RS={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 Jh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!RS[e.type]:t==="textarea"}function Wh(e,t,s,l){$s?qs?qs.push(l):qs=[l]:$s=l,t=rr(t,"onChange"),0<t.length&&(s=new vo("onChange","change",null,s,l),e.push({event:s,listeners:t}))}var Xi=null,Qi=null;function OS(e){Bg(e,0)}function So(e){var t=Fi(e);if(Oh(t))return e}function ep(e,t){if(e==="change")return t}var tp=!1;if(aa){var Nc;if(aa){var wc="oninput"in document;if(!wc){var np=document.createElement("div");np.setAttribute("oninput","return;"),wc=typeof np.oninput=="function"}Nc=wc}else Nc=!1;tp=Nc&&(!document.documentMode||9<document.documentMode)}function ap(){Xi&&(Xi.detachEvent("onpropertychange",sp),Qi=Xi=null)}function sp(e){if(e.propertyName==="value"&&So(Qi)){var t=[];Wh(t,Qi,e,bc(e)),Hh(OS,t)}}function BS(e,t,s){e==="focusin"?(ap(),Xi=t,Qi=s,Xi.attachEvent("onpropertychange",sp)):e==="focusout"&&ap()}function LS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return So(Qi)}function IS(e,t){if(e==="click")return So(t)}function US(e,t){if(e==="input"||e==="change")return So(t)}function zS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:zS;function Ji(e,t){if(ln(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(!Hn.call(t,c)||!ln(e[c],t[c]))return!1}return!0}function ip(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lp(e,t){var s=ip(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=ip(s)}}function op(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?op(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ho(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=ho(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 VS=aa&&"documentMode"in document&&11>=document.documentMode,Ks=null,kc=null,Wi=null,Mc=!1;function cp(e,t,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Mc||Ks==null||Ks!==ho(l)||(l=Ks,"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}),Wi&&Ji(Wi,l)||(Wi=l,l=rr(kc,"onSelect"),0<l.length&&(t=new vo("onSelect","select",null,t,s),e.push({event:t,listeners:l}),t.target=Ks)))}function ds(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Zs={animationend:ds("Animation","AnimationEnd"),animationiteration:ds("Animation","AnimationIteration"),animationstart:ds("Animation","AnimationStart"),transitionrun:ds("Transition","TransitionRun"),transitionstart:ds("Transition","TransitionStart"),transitioncancel:ds("Transition","TransitionCancel"),transitionend:ds("Transition","TransitionEnd")},Rc={},up={};aa&&(up=document.createElement("div").style,"AnimationEvent"in window||(delete Zs.animationend.animation,delete Zs.animationiteration.animation,delete Zs.animationstart.animation),"TransitionEvent"in window||delete Zs.transitionend.transition);function fs(e){if(Rc[e])return Rc[e];if(!Zs[e])return e;var t=Zs[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in up)return Rc[e]=t[s];return e}var dp=fs("animationend"),fp=fs("animationiteration"),hp=fs("animationstart"),HS=fs("transitionrun"),PS=fs("transitionstart"),GS=fs("transitioncancel"),pp=fs("transitionend"),mp=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 Ln(e,t){mp.set(e,t),cs(t,[e])}var _o=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bn=[],Xs=0,Bc=0;function xo(){for(var e=Xs,t=Bc=Xs=0;t<e;){var s=bn[t];bn[t++]=null;var l=bn[t];bn[t++]=null;var c=bn[t];bn[t++]=null;var f=bn[t];if(bn[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&&gp(s,c,f)}}function To(e,t,s,l){bn[Xs++]=e,bn[Xs++]=t,bn[Xs++]=s,bn[Xs++]=l,Bc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Lc(e,t,s,l){return To(e,t,s,l),Eo(e)}function hs(e,t){return To(e,null,null,t),Eo(e)}function gp(e,t,s){e.lanes|=s;var l=e.alternate;l!==null&&(l.lanes|=s);for(var c=!1,f=e.return;f!==null;)f.childLanes|=s,l=f.alternate,l!==null&&(l.childLanes|=s),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Se(s),e=f.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=s|536870912),f):null}function Eo(e){if(50<_l)throw _l=0,$u=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qs={};function FS(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 on(e,t,s,l){return new FS(e,t,s,l)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sa(e,t){var s=e.alternate;return s===null?(s=on(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 yp(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 Co(e,t,s,l,c,f){var b=0;if(l=e,typeof e=="function")Ic(e)&&(b=1);else if(typeof e=="string")b=Z_(e,s,Ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case V:return e=on(31,s,t,c),e.elementType=V,e.lanes=f,e;case j:return ps(s.children,c,f,t);case N:b=8,c|=24;break;case C:return e=on(12,s,t,c|2),e.elementType=C,e.lanes=f,e;case O:return e=on(13,s,t,c),e.elementType=O,e.lanes=f,e;case $:return e=on(19,s,t,c),e.elementType=$,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:b=10;break e;case A:b=9;break e;case H:b=11;break e;case G:b=14;break e;case M:b=16,l=null;break e}b=29,s=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=on(b,s,t,c),t.elementType=e,t.type=l,t.lanes=f,t}function ps(e,t,s,l){return e=on(7,e,l,t),e.lanes=s,e}function Uc(e,t,s){return e=on(6,e,null,t),e.lanes=s,e}function vp(e){var t=on(18,null,null,0);return t.stateNode=e,t}function zc(e,t,s){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bp=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var s=bp.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ja(t)},bp.set(e,t),t)}return{value:e,source:t,stack:ja(t)}}var Js=[],Ws=0,Ao=null,el=0,_n=[],xn=0,Da=null,Pn=1,Gn="";function ia(e,t){Js[Ws++]=el,Js[Ws++]=Ao,Ao=e,el=t}function Sp(e,t,s){_n[xn++]=Pn,_n[xn++]=Gn,_n[xn++]=Da,Da=e;var l=Pn;e=Gn;var c=32-Se(l)-1;l&=~(1<<c),s+=1;var f=32-Se(t)+c;if(30<f){var b=c-c%5;f=(l&(1<<b)-1).toString(32),l>>=b,c-=b,Pn=1<<32-Se(t)+c|s<<c|l,Gn=f+e}else Pn=1<<f|s<<c|l,Gn=e}function Vc(e){e.return!==null&&(ia(e,1),Sp(e,1,0))}function Hc(e){for(;e===Ao;)Ao=Js[--Ws],Js[Ws]=null,el=Js[--Ws],Js[Ws]=null;for(;e===Da;)Da=_n[--xn],_n[xn]=null,Gn=_n[--xn],_n[xn]=null,Pn=_n[--xn],_n[xn]=null}function _p(e,t){_n[xn++]=Pn,_n[xn++]=Gn,_n[xn++]=Da,Pn=t.id,Gn=t.overflow,Da=e}var Vt=null,at=null,ze=!1,ka=null,Tn=!1,Pc=Error(o(519));function Ma(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tl(Sn(t,e)),Pc}function xp(e){var t=e.stateNode,s=e.type,l=e.memoizedProps;switch(t[zt]=e,t[Jt]=l,s){case"dialog":ke("cancel",t),ke("close",t);break;case"iframe":case"object":case"embed":ke("load",t);break;case"video":case"audio":for(s=0;s<Tl.length;s++)ke(Tl[s],t);break;case"source":ke("error",t);break;case"img":case"image":case"link":ke("error",t),ke("load",t);break;case"details":ke("toggle",t);break;case"input":ke("invalid",t),Bh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ke("invalid",t);break;case"textarea":ke("invalid",t),Ih(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||zg(t.textContent,s)?(l.popover!=null&&(ke("beforetoggle",t),ke("toggle",t)),l.onScroll!=null&&ke("scroll",t),l.onScrollEnd!=null&&ke("scrollend",t),l.onClick!=null&&(t.onclick=na),t=!0):t=!1,t||Ma(e,!0)}function Tp(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:Vt=Vt.return}}function ei(e){if(e!==Vt)return!1;if(!ze)return Tp(e),ze=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||ld(e.type,e.memoizedProps)),s=!s),s&&at&&Ma(e),Tp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Kg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Kg(e)}else t===27?(t=at,qa(e.type)?(e=dd,dd=null,at=e):at=t):at=Vt?Cn(e.stateNode.nextSibling):null;return!0}function ms(){at=Vt=null,ze=!1}function Gc(){var e=ka;return e!==null&&(an===null?an=e:an.push.apply(an,e),ka=null),e}function tl(e){ka===null?ka=[e]:ka.push(e)}var Fc=nt(null),gs=null,la=null;function Ra(e,t,s){fe(Fc,t._currentValue),t._currentValue=s}function oa(e){e._currentValue=Fc.current,Me(Fc)}function $c(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 qc(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 w=0;w<t.length;w++)if(x.context===t[w]){f.lanes|=s,x=f.alternate,x!==null&&(x.lanes|=s),$c(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),$c(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 ti(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;ln(c.pendingProps.value,b.value)||(e!==null?e.push(x):e=[x])}}else if(c===Ve.current){if(b=c.alternate,b===null)throw Error(o(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Nl):e=[Nl])}c=c.return}e!==null&&qc(t,e,s,l),t.flags|=262144}function jo(e){for(e=e.firstContext;e!==null;){if(!ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ys(e){gs=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Ep(gs,e)}function No(e,t){return gs===null&&ys(e),Ep(e,t)}function Ep(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},la===null){if(e===null)throw Error(o(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return s}var $S=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()})}},qS=n.unstable_scheduleCallback,YS=n.unstable_NormalPriority,At={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yc(){return{controller:new $S,data:new Map,refCount:0}}function nl(e){e.refCount--,e.refCount===0&&qS(YS,function(){e.controller.abort()})}var al=null,Kc=0,ni=0,ai=null;function KS(e,t){if(al===null){var s=al=[];Kc=0,ni=Qu(),ai={status:"pending",value:void 0,then:function(l){s.push(l)}}}return Kc++,t.then(Cp,Cp),t}function Cp(){if(--Kc===0&&al!==null){ai!==null&&(ai.status="fulfilled");var e=al;al=null,ni=0,ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ZS(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 Ap=B.S;B.S=function(e,t){cg=J(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&KS(e,t),Ap!==null&&Ap(e,t)};var vs=nt(null);function Zc(){var e=vs.current;return e!==null?e:We.pooledCache}function wo(e,t){t===null?fe(vs,vs.current):fe(vs,t.pool)}function jp(){var e=Zc();return e===null?null:{parent:At._currentValue,pool:e}}var si=Error(o(460)),Xc=Error(o(474)),Do=Error(o(542)),ko={then:function(){}};function Np(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wp(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(na,na),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kp(e),e;default:if(typeof t.status=="string")t.then(na,na);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,kp(e),e}throw Ss=t,si}}function bs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ss=s,si):s}}var Ss=null;function Dp(){if(Ss===null)throw Error(o(459));var e=Ss;return Ss=null,e}function kp(e){if(e===si||e===Do)throw Error(o(483))}var ii=null,sl=0;function Mo(e){var t=sl;return sl+=1,ii===null&&(ii=[]),wp(ii,e,t)}function il(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ro(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 Mp(e){function t(R,D){if(e){var I=R.deletions;I===null?(R.deletions=[D],R.flags|=16):I.push(D)}}function s(R,D){if(!e)return null;for(;D!==null;)t(R,D),D=D.sibling;return null}function l(R){for(var D=new Map;R!==null;)R.key!==null?D.set(R.key,R):D.set(R.index,R),R=R.sibling;return D}function c(R,D){return R=sa(R,D),R.index=0,R.sibling=null,R}function f(R,D,I){return R.index=I,e?(I=R.alternate,I!==null?(I=I.index,I<D?(R.flags|=67108866,D):I):(R.flags|=67108866,D)):(R.flags|=1048576,D)}function b(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function x(R,D,I,K){return D===null||D.tag!==6?(D=Uc(I,R.mode,K),D.return=R,D):(D=c(D,I),D.return=R,D)}function w(R,D,I,K){var de=I.type;return de===j?q(R,D,I.props.children,K,I.key):D!==null&&(D.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===M&&bs(de)===D.type)?(D=c(D,I.props),il(D,I),D.return=R,D):(D=Co(I.type,I.key,I.props,null,R.mode,K),il(D,I),D.return=R,D)}function U(R,D,I,K){return D===null||D.tag!==4||D.stateNode.containerInfo!==I.containerInfo||D.stateNode.implementation!==I.implementation?(D=zc(I,R.mode,K),D.return=R,D):(D=c(D,I.children||[]),D.return=R,D)}function q(R,D,I,K,de){return D===null||D.tag!==7?(D=ps(I,R.mode,K,de),D.return=R,D):(D=c(D,I),D.return=R,D)}function Z(R,D,I){if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return D=Uc(""+D,R.mode,I),D.return=R,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case T:return I=Co(D.type,D.key,D.props,null,R.mode,I),il(I,D),I.return=R,I;case E:return D=zc(D,R.mode,I),D.return=R,D;case M:return D=bs(D),Z(R,D,I)}if(Q(D)||ae(D))return D=ps(D,R.mode,I,null),D.return=R,D;if(typeof D.then=="function")return Z(R,Mo(D),I);if(D.$$typeof===k)return Z(R,No(R,D),I);Ro(R,D)}return null}function z(R,D,I,K){var de=D!==null?D.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return de!==null?null:x(R,D,""+I,K);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case T:return I.key===de?w(R,D,I,K):null;case E:return I.key===de?U(R,D,I,K):null;case M:return I=bs(I),z(R,D,I,K)}if(Q(I)||ae(I))return de!==null?null:q(R,D,I,K,null);if(typeof I.then=="function")return z(R,D,Mo(I),K);if(I.$$typeof===k)return z(R,D,No(R,I),K);Ro(R,I)}return null}function P(R,D,I,K,de){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return R=R.get(I)||null,x(D,R,""+K,de);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return R=R.get(K.key===null?I:K.key)||null,w(D,R,K,de);case E:return R=R.get(K.key===null?I:K.key)||null,U(D,R,K,de);case M:return K=bs(K),P(R,D,I,K,de)}if(Q(K)||ae(K))return R=R.get(I)||null,q(D,R,K,de,null);if(typeof K.then=="function")return P(R,D,I,Mo(K),de);if(K.$$typeof===k)return P(R,D,I,No(D,K),de);Ro(D,K)}return null}function ie(R,D,I,K){for(var de=null,He=null,ue=D,je=D=0,Le=null;ue!==null&&je<I.length;je++){ue.index>je?(Le=ue,ue=null):Le=ue.sibling;var Pe=z(R,ue,I[je],K);if(Pe===null){ue===null&&(ue=Le);break}e&&ue&&Pe.alternate===null&&t(R,ue),D=f(Pe,D,je),He===null?de=Pe:He.sibling=Pe,He=Pe,ue=Le}if(je===I.length)return s(R,ue),ze&&ia(R,je),de;if(ue===null){for(;je<I.length;je++)ue=Z(R,I[je],K),ue!==null&&(D=f(ue,D,je),He===null?de=ue:He.sibling=ue,He=ue);return ze&&ia(R,je),de}for(ue=l(ue);je<I.length;je++)Le=P(ue,R,je,I[je],K),Le!==null&&(e&&Le.alternate!==null&&ue.delete(Le.key===null?je:Le.key),D=f(Le,D,je),He===null?de=Le:He.sibling=Le,He=Le);return e&&ue.forEach(function(Qa){return t(R,Qa)}),ze&&ia(R,je),de}function he(R,D,I,K){if(I==null)throw Error(o(151));for(var de=null,He=null,ue=D,je=D=0,Le=null,Pe=I.next();ue!==null&&!Pe.done;je++,Pe=I.next()){ue.index>je?(Le=ue,ue=null):Le=ue.sibling;var Qa=z(R,ue,Pe.value,K);if(Qa===null){ue===null&&(ue=Le);break}e&&ue&&Qa.alternate===null&&t(R,ue),D=f(Qa,D,je),He===null?de=Qa:He.sibling=Qa,He=Qa,ue=Le}if(Pe.done)return s(R,ue),ze&&ia(R,je),de;if(ue===null){for(;!Pe.done;je++,Pe=I.next())Pe=Z(R,Pe.value,K),Pe!==null&&(D=f(Pe,D,je),He===null?de=Pe:He.sibling=Pe,He=Pe);return ze&&ia(R,je),de}for(ue=l(ue);!Pe.done;je++,Pe=I.next())Pe=P(ue,R,je,Pe.value,K),Pe!==null&&(e&&Pe.alternate!==null&&ue.delete(Pe.key===null?je:Pe.key),D=f(Pe,D,je),He===null?de=Pe:He.sibling=Pe,He=Pe);return e&&ue.forEach(function(lx){return t(R,lx)}),ze&&ia(R,je),de}function Je(R,D,I,K){if(typeof I=="object"&&I!==null&&I.type===j&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case T:e:{for(var de=I.key;D!==null;){if(D.key===de){if(de=I.type,de===j){if(D.tag===7){s(R,D.sibling),K=c(D,I.props.children),K.return=R,R=K;break e}}else if(D.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===M&&bs(de)===D.type){s(R,D.sibling),K=c(D,I.props),il(K,I),K.return=R,R=K;break e}s(R,D);break}else t(R,D);D=D.sibling}I.type===j?(K=ps(I.props.children,R.mode,K,I.key),K.return=R,R=K):(K=Co(I.type,I.key,I.props,null,R.mode,K),il(K,I),K.return=R,R=K)}return b(R);case E:e:{for(de=I.key;D!==null;){if(D.key===de)if(D.tag===4&&D.stateNode.containerInfo===I.containerInfo&&D.stateNode.implementation===I.implementation){s(R,D.sibling),K=c(D,I.children||[]),K.return=R,R=K;break e}else{s(R,D);break}else t(R,D);D=D.sibling}K=zc(I,R.mode,K),K.return=R,R=K}return b(R);case M:return I=bs(I),Je(R,D,I,K)}if(Q(I))return ie(R,D,I,K);if(ae(I)){if(de=ae(I),typeof de!="function")throw Error(o(150));return I=de.call(I),he(R,D,I,K)}if(typeof I.then=="function")return Je(R,D,Mo(I),K);if(I.$$typeof===k)return Je(R,D,No(R,I),K);Ro(R,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,D!==null&&D.tag===6?(s(R,D.sibling),K=c(D,I),K.return=R,R=K):(s(R,D),K=Uc(I,R.mode,K),K.return=R,R=K),b(R)):s(R,D)}return function(R,D,I,K){try{sl=0;var de=Je(R,D,I,K);return ii=null,de}catch(ue){if(ue===si||ue===Do)throw ue;var He=on(29,ue,null,R.mode);return He.lanes=K,He.return=R,He}finally{}}}var _s=Mp(!0),Rp=Mp(!1),Oa=!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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function La(e,t,s){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Eo(e),gp(e,null,s),t}return To(e,l,t,s),Eo(e)}function ll(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,Eh(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 ol(){if(eu){var e=ai;if(e!==null)throw e}}function rl(e,t,s,l){eu=!1;var c=e.updateQueue;Oa=!1;var f=c.firstBaseUpdate,b=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var w=x,U=w.next;w.next=null,b===null?f=U:b.next=U,b=w;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==b&&(x===null?q.firstBaseUpdate=U:x.next=U,q.lastBaseUpdate=w))}if(f!==null){var Z=c.baseState;b=0,q=U=w=null,x=f;do{var z=x.lane&-536870913,P=z!==x.lane;if(P?(Be&z)===z:(l&z)===z){z!==0&&z===ni&&(eu=!0),q!==null&&(q=q.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ie=e,he=x;z=t;var Je=s;switch(he.tag){case 1:if(ie=he.payload,typeof ie=="function"){Z=ie.call(Je,Z,z);break e}Z=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=he.payload,z=typeof ie=="function"?ie.call(Je,Z,z):ie,z==null)break e;Z=y({},Z,z);break e;case 2:Oa=!0}}z=x.callback,z!==null&&(e.flags|=64,P&&(e.flags|=8192),P=c.callbacks,P===null?c.callbacks=[z]:P.push(z))}else P={lane:z,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(U=q=P,w=Z):q=q.next=P,b|=z;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;P=x,x=P.next,P.next=null,c.lastBaseUpdate=P,c.shared.pending=null}}while(!0);q===null&&(w=Z),c.baseState=w,c.firstBaseUpdate=U,c.lastBaseUpdate=q,f===null&&(c.shared.lanes=0),Ha|=b,e.lanes=b,e.memoizedState=Z}}function Op(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Bp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)Op(s[e],t)}var li=nt(null),Oo=nt(0);function Lp(e,t){e=ga,fe(Oo,e),fe(li,t),ga=e|t.baseLanes}function tu(){fe(Oo,ga),fe(li,li.current)}function nu(){ga=Oo.current,Me(li),Me(Oo)}var rn=nt(null),En=null;function Ia(e){var t=e.alternate;fe(_t,_t.current&1),fe(rn,e),En===null&&(t===null||li.current!==null||t.memoizedState!==null)&&(En=e)}function au(e){fe(_t,_t.current),fe(rn,e),En===null&&(En=e)}function Ip(e){e.tag===22?(fe(_t,_t.current),fe(rn,e),En===null&&(En=e)):Ua()}function Ua(){fe(_t,_t.current),fe(rn,rn.current)}function cn(e){Me(rn),En===e&&(En=null),Me(_t)}var _t=nt(0);function Bo(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 ra=0,Ae=null,Xe=null,jt=null,Lo=!1,oi=!1,xs=!1,Io=0,cl=0,ri=null,XS=0;function pt(){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(!ln(e[s],t[s]))return!1;return!0}function iu(e,t,s,l,c,f){return ra=f,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Sm:Su,xs=!1,f=s(l,c),xs=!1,oi&&(f=zp(t,s,l,c)),Up(e),f}function Up(e){B.H=fl;var t=Xe!==null&&Xe.next!==null;if(ra=0,jt=Xe=Ae=null,Lo=!1,cl=0,ri=null,t)throw Error(o(300));e===null||Nt||(e=e.dependencies,e!==null&&jo(e)&&(Nt=!0))}function zp(e,t,s,l){Ae=e;var c=0;do{if(oi&&(ri=null),cl=0,oi=!1,25<=c)throw Error(o(301));if(c+=1,jt=Xe=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}B.H=_m,f=t(s,l)}while(oi);return f}function QS(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?ul(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(Ae.flags|=1024),t}function lu(){var e=Io!==0;return Io=0,e}function ou(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function ru(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}ra=0,jt=Xe=Ae=null,oi=!1,cl=Io=0,ri=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ae.memoizedState=jt=e:jt=jt.next=e,jt}function xt(){if(Xe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=jt===null?Ae.memoizedState:jt.next;if(t!==null)jt=t,Xe=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},jt===null?Ae.memoizedState=jt=e:jt=jt.next=e}return jt}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ul(e){var t=cl;return cl+=1,ri===null&&(ri=[]),e=wp(ri,e,t),t=Ae,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Sm:Su),e}function zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ul(e);if(e.$$typeof===k)return Ht(e)}throw Error(o(438,String(e)))}function cu(e){var t=null,s=Ae.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var l=Ae.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=Uo(),Ae.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),l=0;l<e;l++)s[l]=te;return t.index++,s}function ca(e,t){return typeof t=="function"?t(e):t}function Vo(e){var t=xt();return uu(t,Xe,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,w=null,U=t,q=!1;do{var Z=U.lane&-536870913;if(Z!==U.lane?(Be&Z)===Z:(ra&Z)===Z){var z=U.revertLane;if(z===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),Z===ni&&(q=!0);else if((ra&z)===z){U=U.next,z===ni&&(q=!0);continue}else Z={lane:0,revertLane:U.revertLane,gesture:null,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},w===null?(x=w=Z,b=f):w=w.next=Z,Ae.lanes|=z,Ha|=z;Z=U.action,xs&&s(f,Z),f=U.hasEagerState?U.eagerState:s(f,Z)}else z={lane:Z,revertLane:U.revertLane,gesture:U.gesture,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null},w===null?(x=w=z,b=f):w=w.next=z,Ae.lanes|=Z,Ha|=Z;U=U.next}while(U!==null&&U!==t);if(w===null?b=f:w.next=x,!ln(f,e.memoizedState)&&(Nt=!0,q&&(s=ai,s!==null)))throw s;e.memoizedState=f,e.baseState=b,e.baseQueue=w,l.lastRenderedState=f}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function du(e){var t=xt(),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);ln(f,t.memoizedState)||(Nt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),s.lastRenderedState=f}return[f,l]}function Vp(e,t,s){var l=Ae,c=xt(),f=ze;if(f){if(s===void 0)throw Error(o(407));s=s()}else s=t();var b=!ln((Xe||c).memoizedState,s);if(b&&(c.memoizedState=s,Nt=!0),c=c.queue,pu(Gp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,ci(9,{destroy:void 0},Pp.bind(null,l,c,s,t),null),We===null)throw Error(o(349));f||(ra&127)!==0||Hp(l,t,s)}return s}function Hp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t=Uo(),Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function Pp(e,t,s,l){t.value=s,t.getSnapshot=l,Fp(t)&&$p(e)}function Gp(e,t,s){return s(function(){Fp(t)&&$p(e)})}function Fp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!ln(e,s)}catch{return!0}}function $p(e){var t=hs(e,2);t!==null&&sn(t,e,2)}function fu(e){var t=Yt();if(typeof e=="function"){var s=e;if(e=s(),xs){Mt(!0);try{s()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e},t}function qp(e,t,s,l){return e.baseState=s,uu(e,Xe,typeof l=="function"?l:ca)}function JS(e,t,s,l,c){if(Go(e))throw Error(o(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};B.T!==null?s(!0):f.isTransition=!1,l(f),s=t.pending,s===null?(f.next=t.pending=f,Yp(t,f)):(f.next=s.next,t.pending=s.next=f)}}function Yp(e,t){var s=t.action,l=t.payload,c=e.state;if(t.isTransition){var f=B.T,b={};B.T=b;try{var x=s(c,l),w=B.S;w!==null&&w(b,x),Kp(e,t,x)}catch(U){hu(e,t,U)}finally{f!==null&&b.types!==null&&(f.types=b.types),B.T=f}}else try{f=s(c,l),Kp(e,t,f)}catch(U){hu(e,t,U)}}function Kp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(l){Zp(e,t,l)},function(l){return hu(e,t,l)}):Zp(e,t,s)}function Zp(e,t,s){t.status="fulfilled",t.value=s,Xp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Yp(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,Xp(t),t=t.next;while(t!==l)}e.action=null}function Xp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Qp(e,t){return t}function Jp(e,t){if(ze){var s=We.formState;if(s!==null){e:{var l=Ae;if(ze){if(at){t:{for(var c=at,f=Tn;c.nodeType!==8;){if(!f){c=null;break t}if(c=Cn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){at=Cn(c.nextSibling),l=c.data==="F!";break e}}Ma(l)}l=!1}l&&(t=s[0])}}return s=Yt(),s.memoizedState=s.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qp,lastRenderedState:t},s.queue=l,s=ym.bind(null,Ae,l),l.dispatch=s,l=fu(!1),f=bu.bind(null,Ae,!1,l.queue),l=Yt(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,s=JS.bind(null,Ae,c,f,s),c.dispatch=s,l.memoizedState=e,[t,s,!1]}function Wp(e){var t=xt();return em(t,Xe,e)}function em(e,t,s){if(t=uu(e,t,Qp)[0],e=Vo(ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ul(t)}catch(b){throw b===si?Do:b}else l=t;t=xt();var c=t.queue,f=c.dispatch;return s!==t.memoizedState&&(Ae.flags|=2048,ci(9,{destroy:void 0},WS.bind(null,c,s),null)),[l,f,e]}function WS(e,t){e.action=t}function tm(e){var t=xt(),s=Xe;if(s!==null)return em(t,s,e);xt(),t=t.memoizedState,s=xt();var l=s.queue.dispatch;return s.memoizedState=e,[t,l,!1]}function ci(e,t,s,l){return e={tag:e,create:s,deps:l,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=Uo(),Ae.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(l=s.next,s.next=e,e.next=l,t.lastEffect=e),e}function nm(){return xt().memoizedState}function Ho(e,t,s,l){var c=Yt();Ae.flags|=e,c.memoizedState=ci(1|t,{destroy:void 0},s,l===void 0?null:l)}function Po(e,t,s,l){var c=xt();l=l===void 0?null:l;var f=c.memoizedState.inst;Xe!==null&&l!==null&&su(l,Xe.memoizedState.deps)?c.memoizedState=ci(t,f,s,l):(Ae.flags|=e,c.memoizedState=ci(1|t,f,s,l))}function am(e,t){Ho(8390656,8,e,t)}function pu(e,t){Po(2048,8,e,t)}function e_(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=Uo(),Ae.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function sm(e){var t=xt().memoizedState;return e_({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function im(e,t){return Po(4,2,e,t)}function lm(e,t){return Po(4,4,e,t)}function om(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 rm(e,t,s){s=s!=null?s.concat([e]):null,Po(4,4,om.bind(null,t,e),s)}function mu(){}function cm(e,t){var s=xt();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 um(e,t){var s=xt();t=t===void 0?null:t;var l=s.memoizedState;if(t!==null&&su(t,l[1]))return l[0];if(l=e(),xs){Mt(!0);try{e()}finally{Mt(!1)}}return s.memoizedState=[l,t],l}function gu(e,t,s){return s===void 0||(ra&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=dg(),Ae.lanes|=e,Ha|=e,s)}function dm(e,t,s,l){return ln(s,t)?s:li.current!==null?(e=gu(e,s,l),ln(e,t)||(Nt=!0),e):(ra&42)===0||(ra&1073741824)!==0&&(Be&261930)===0?(Nt=!0,e.memoizedState=s):(e=dg(),Ae.lanes|=e,Ha|=e,t)}function fm(e,t,s,l,c){var f=F.p;F.p=f!==0&&8>f?f:8;var b=B.T,x={};B.T=x,bu(e,!1,t,s);try{var w=c(),U=B.S;if(U!==null&&U(x,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var q=ZS(w,l);dl(e,t,q,fn(e))}else dl(e,t,l,fn(e))}catch(Z){dl(e,t,{then:function(){},status:"rejected",reason:Z},fn())}finally{F.p=f,b!==null&&x.types!==null&&(b.types=x.types),B.T=b}}function t_(){}function yu(e,t,s,l){if(e.tag!==5)throw Error(o(476));var c=hm(e).queue;fm(e,c,t,W,s===null?t_:function(){return pm(e),s(l)})}function hm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:W},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function pm(e){var t=hm(e);t.next===null&&(t=e.alternate.memoizedState),dl(e,t.next.queue,{},fn())}function vu(){return Ht(Nl)}function mm(){return xt().memoizedState}function gm(){return xt().memoizedState}function n_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=fn();e=Ba(s);var l=La(t,e,s);l!==null&&(sn(l,t,s),ll(l,t,s)),t={cache:Yc()},e.payload=t;return}t=t.return}}function a_(e,t,s){var l=fn();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Go(e)?vm(t,s):(s=Lc(e,t,s,l),s!==null&&(sn(s,e,l),bm(s,t,l)))}function ym(e,t,s){var l=fn();dl(e,t,s,l)}function dl(e,t,s,l){var c={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Go(e))vm(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,ln(x,b))return To(e,t,c,0),We===null&&xo(),!1}catch{}finally{}if(s=Lc(e,t,c,l),s!==null)return sn(s,e,l),bm(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},Go(e)){if(t)throw Error(o(479))}else t=Lc(e,s,l,2),t!==null&&sn(t,e,2)}function Go(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function vm(e,t){oi=Lo=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function bm(e,t,s){if((s&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,s|=l,t.lanes=s,Eh(e,s)}}var fl={readContext:Ht,use:zo,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};fl.useEffectEvent=pt;var Sm={readContext:Ht,use:zo,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:am,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Ho(4194308,4,om.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Ho(4194308,4,e,t)},useInsertionEffect:function(e,t){Ho(4,2,e,t)},useMemo:function(e,t){var s=Yt();t=t===void 0?null:t;var l=e();if(xs){Mt(!0);try{e()}finally{Mt(!1)}}return s.memoizedState=[l,t],l},useReducer:function(e,t,s){var l=Yt();if(s!==void 0){var c=s(t);if(xs){Mt(!0);try{s(t)}finally{Mt(!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=a_.bind(null,Ae,e),[l.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=fu(e);var t=e.queue,s=ym.bind(null,Ae,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:mu,useDeferredValue:function(e,t){var s=Yt();return gu(s,e,t)},useTransition:function(){var e=fu(!1);return e=fm.bind(null,Ae,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var l=Ae,c=Yt();if(ze){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),We===null)throw Error(o(349));(Be&127)!==0||Hp(l,t,s)}c.memoizedState=s;var f={value:s,getSnapshot:t};return c.queue=f,am(Gp.bind(null,l,f,e),[e]),l.flags|=2048,ci(9,{destroy:void 0},Pp.bind(null,l,f,s,t),null),s},useId:function(){var e=Yt(),t=We.identifierPrefix;if(ze){var s=Gn,l=Pn;s=(l&~(1<<32-Se(l)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Io++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=XS++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vu,useFormState:Jp,useActionState:Jp,useOptimistic:function(e){var t=Yt();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,Ae,!0,s),s.dispatch=t,[e,t]},useMemoCache:cu,useCacheRefresh:function(){return Yt().memoizedState=n_.bind(null,Ae)},useEffectEvent:function(e){var t=Yt(),s={impl:e};return t.memoizedState=s,function(){if((Fe&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},Su={readContext:Ht,use:zo,useCallback:cm,useContext:Ht,useEffect:pu,useImperativeHandle:rm,useInsertionEffect:im,useLayoutEffect:lm,useMemo:um,useReducer:Vo,useRef:nm,useState:function(){return Vo(ca)},useDebugValue:mu,useDeferredValue:function(e,t){var s=xt();return dm(s,Xe.memoizedState,e,t)},useTransition:function(){var e=Vo(ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Vp,useId:mm,useHostTransitionStatus:vu,useFormState:Wp,useActionState:Wp,useOptimistic:function(e,t){var s=xt();return qp(s,Xe,e,t)},useMemoCache:cu,useCacheRefresh:gm};Su.useEffectEvent=sm;var _m={readContext:Ht,use:zo,useCallback:cm,useContext:Ht,useEffect:pu,useImperativeHandle:rm,useInsertionEffect:im,useLayoutEffect:lm,useMemo:um,useReducer:du,useRef:nm,useState:function(){return du(ca)},useDebugValue:mu,useDeferredValue:function(e,t){var s=xt();return Xe===null?gu(s,e,t):dm(s,Xe.memoizedState,e,t)},useTransition:function(){var e=du(ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:ul(e),t]},useSyncExternalStore:Vp,useId:mm,useHostTransitionStatus:vu,useFormState:tm,useActionState:tm,useOptimistic:function(e,t){var s=xt();return Xe!==null?qp(s,Xe,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:cu,useCacheRefresh:gm};_m.useEffectEvent=sm;function _u(e,t,s,l){t=e.memoizedState,s=s(l,t),s=s==null?t:y({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var xu={enqueueSetState:function(e,t,s){e=e._reactInternals;var l=fn(),c=Ba(l);c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(sn(t,e,l),ll(t,e,l))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var l=fn(),c=Ba(l);c.tag=1,c.payload=t,s!=null&&(c.callback=s),t=La(e,c,l),t!==null&&(sn(t,e,l),ll(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=fn(),l=Ba(s);l.tag=2,t!=null&&(l.callback=t),t=La(e,l,s),t!==null&&(sn(t,e,s),ll(t,e,s))}};function xm(e,t,s,l,c,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,b):t.prototype&&t.prototype.isPureReactComponent?!Ji(s,l)||!Ji(c,f):!0}function Tm(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 Ts(e,t){var s=t;if("ref"in t){s={};for(var l in t)l!=="ref"&&(s[l]=t[l])}if(e=e.defaultProps){s===t&&(s=y({},s));for(var c in e)s[c]===void 0&&(s[c]=e[c])}return s}function Em(e){_o(e)}function Cm(e){console.error(e)}function Am(e){_o(e)}function Fo(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function jm(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=Ba(s),s.tag=3,s.payload={element:null},s.callback=function(){Fo(e,t)},s}function Nm(e){return e=Ba(e),e.tag=3,e}function wm(e,t,s,l){var c=s.type.getDerivedStateFromError;if(typeof c=="function"){var f=l.value;e.payload=function(){return c(f)},e.callback=function(){jm(t,s,l)}}var b=s.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){jm(t,s,l),typeof c!="function"&&(Pa===null?Pa=new Set([this]):Pa.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function s_(e,t,s,l,c){if(s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=s.alternate,t!==null&&ti(t,s,c,!0),s=rn.current,s!==null){switch(s.tag){case 31:case 13:return En===null?nr():s.alternate===null&&mt===0&&(mt=3),s.flags&=-257,s.flags|=65536,s.lanes=c,l===ko?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===ko?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),nr(),!1}if(ze)return t=rn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Pc&&(e=Error(o(422),{cause:l}),tl(Sn(e,s)))):(l!==Pc&&(t=Error(o(423),{cause:l}),tl(Sn(t,s))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=Sn(l,s),c=Tu(e.stateNode,l,c),Wc(e,c),mt!==4&&(mt=2)),!1;var f=Error(o(520),{cause:l});if(f=Sn(f,s),Sl===null?Sl=[f]:Sl.push(f),mt!==4&&(mt=2),t===null)return!0;l=Sn(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"&&(Pa===null||!Pa.has(f))))return s.flags|=65536,c&=-c,s.lanes|=c,c=Nm(c),wm(c,e,s,l),Wc(s,c),!1}s=s.return}while(s!==null);return!1}var Eu=Error(o(461)),Nt=!1;function Pt(e,t,s,l){t.child=e===null?Rp(t,null,s,l):_s(t,e.child,s,l)}function Dm(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 ys(t),l=iu(e,t,s,b,f,c),x=lu(),e!==null&&!Nt?(ou(e,t,c),ua(e,t,c)):(ze&&x&&Vc(t),t.flags|=1,Pt(e,t,l,c),t.child)}function km(e,t,s,l,c){if(e===null){var f=s.type;return typeof f=="function"&&!Ic(f)&&f.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=f,Mm(e,t,f,l,c)):(e=Co(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:Ji,s(b,l)&&e.ref===t.ref)return ua(e,t,c)}return t.flags|=1,e=sa(f,l),e.ref=t.ref,e.return=t,t.child=e}function Mm(e,t,s,l,c){if(e!==null){var f=e.memoizedProps;if(Ji(f,l)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=l=f,Mu(e,c))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,ua(e,t,c)}return Cu(e,t,s,l,c)}function Rm(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 Om(e,t,f,s,l)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wo(t,f!==null?f.cachePool:null),f!==null?Lp(t,f):tu(),Ip(t);else return l=t.lanes=536870912,Om(e,t,f!==null?f.baseLanes|s:s,s,l)}else f!==null?(wo(t,f.cachePool),Lp(t,f),Ua(),t.memoizedState=null):(e!==null&&wo(t,null),tu(),Ua());return Pt(e,t,c,s),t.child}function hl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Om(e,t,s,l,c){var f=Zc();return f=f===null?null:{parent:At._currentValue,pool:f},t.memoizedState={baseLanes:s,cachePool:f},e!==null&&wo(t,null),tu(),Ip(t),e!==null&&ti(e,t,l,!0),t.childLanes=c,null}function $o(e,t){return t=Yo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bm(e,t,s){return _s(t,e.child,null,s),e=$o(t,t.pendingProps),e.flags|=2,cn(t),t.memoizedState=null,e}function i_(e,t,s){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(l.mode==="hidden")return e=$o(t,l),t.lanes=536870912,hl(null,e);if(au(t),(e=at)?(e=Yg(e,Tn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Da!==null?{id:Pn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},s=vp(e),s.return=t,t.child=s,Vt=t,at=null)):e=null,e===null)throw Ma(t);return t.lanes=536870912,null}return $o(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=Bm(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Nt||ti(e,t,s,!1),c=(s&e.childLanes)!==0,Nt||c){if(l=We,l!==null&&(b=Ch(l,s),b!==0&&b!==f.retryLane))throw f.retryLane=b,hs(e,b),sn(l,e,b),Eu;nr(),t=Bm(e,t,s)}else e=f.treeContext,at=Cn(b.nextSibling),Vt=t,ze=!0,ka=null,Tn=!1,e!==null&&_p(t,e),t=$o(t,l),t.flags|=4096;return t}return e=sa(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 ys(t),s=iu(e,t,s,l,void 0,c),l=lu(),e!==null&&!Nt?(ou(e,t,c),ua(e,t,c)):(ze&&l&&Vc(t),t.flags|=1,Pt(e,t,s,c),t.child)}function Lm(e,t,s,l,c,f){return ys(t),t.updateQueue=null,s=zp(t,l,s,c),Up(e),l=lu(),e!==null&&!Nt?(ou(e,t,f),ua(e,t,f)):(ze&&l&&Vc(t),t.flags|=1,Pt(e,t,s,f),t.child)}function Im(e,t,s,l,c){if(ys(t),t.stateNode===null){var f=Qs,b=s.contextType;typeof b=="object"&&b!==null&&(f=Ht(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?Ht(b):Qs,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),rl(t,l,f,c),ol(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){f=t.stateNode;var x=t.memoizedProps,w=Ts(s,x);f.props=w;var U=f.context,q=s.contextType;b=Qs,typeof q=="object"&&q!==null&&(b=Ht(q));var Z=s.getDerivedStateFromProps;q=typeof Z=="function"||typeof f.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,q||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x||U!==b)&&Tm(t,f,l,b),Oa=!1;var z=t.memoizedState;f.state=z,rl(t,l,f,c),ol(),U=t.memoizedState,x||z!==U||Oa?(typeof Z=="function"&&(_u(t,s,Z,l),U=t.memoizedState),(w=Oa||xm(t,s,w,l,z,U,b))?(q||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=U),f.props=l,f.state=U,f.context=b,l=w):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{f=t.stateNode,Jc(e,t),b=t.memoizedProps,q=Ts(s,b),f.props=q,Z=t.pendingProps,z=f.context,U=s.contextType,w=Qs,typeof U=="object"&&U!==null&&(w=Ht(U)),x=s.getDerivedStateFromProps,(U=typeof x=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==Z||z!==w)&&Tm(t,f,l,w),Oa=!1,z=t.memoizedState,f.state=z,rl(t,l,f,c),ol();var P=t.memoizedState;b!==Z||z!==P||Oa||e!==null&&e.dependencies!==null&&jo(e.dependencies)?(typeof x=="function"&&(_u(t,s,x,l),P=t.memoizedState),(q=Oa||xm(t,s,q,l,z,P,w)||e!==null&&e.dependencies!==null&&jo(e.dependencies))?(U||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,P,w),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,P,w)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=P),f.props=l,f.state=P,f.context=w,l=q):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),l=!1)}return f=l,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=_s(t,e.child,null,c),t.child=_s(t,null,s,c)):Pt(e,t,s,c),t.memoizedState=f.state,e=t.child):e=ua(e,t,c),e}function Um(e,t,s,l){return ms(),t.flags|=256,Pt(e,t,s,l),t.child}var Au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ju(e){return{baseLanes:e,cachePool:jp()}}function Nu(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=dn),e}function zm(e,t,s){var l=t.pendingProps,c=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(c?Ia(t):Ua(),(e=at)?(e=Yg(e,Tn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Da!==null?{id:Pn,overflow:Gn}:null,retryLane:536870912,hydrationErrors:null},s=vp(e),s.return=t,t.child=s,Vt=t,at=null)):e=null,e===null)throw Ma(t);return ud(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,c?(Ua(),c=t.mode,x=Yo({mode:"hidden",children:x},c),l=ps(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,hl(null,l)):(Ia(t),wu(t,x))}var w=e.memoizedState;if(w!==null&&(x=w.dehydrated,x!==null)){if(f)t.flags&256?(Ia(t),t.flags&=-257,t=Du(e,t,s)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),x=l.fallback,c=t.mode,l=Yo({mode:"visible",children:l.children},c),x=ps(x,c,s,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,_s(t,e.child,null,s),l=t.child,l.memoizedState=ju(s),l.childLanes=Nu(e,b,s),t.memoizedState=Au,t=hl(null,l));else if(Ia(t),ud(x)){if(b=x.nextSibling&&x.nextSibling.dataset,b)var U=b.dgst;b=U,l=Error(o(419)),l.stack="",l.digest=b,tl({value:l,source:null,stack:null}),t=Du(e,t,s)}else if(Nt||ti(e,t,s,!1),b=(s&e.childLanes)!==0,Nt||b){if(b=We,b!==null&&(l=Ch(b,s),l!==0&&l!==w.retryLane))throw w.retryLane=l,hs(e,l),sn(b,e,l),Eu;cd(x)||nr(),t=Du(e,t,s)}else cd(x)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,at=Cn(x.nextSibling),Vt=t,ze=!0,ka=null,Tn=!1,e!==null&&_p(t,e),t=wu(t,l.children),t.flags|=4096);return t}return c?(Ua(),x=l.fallback,c=t.mode,w=e.child,U=w.sibling,l=sa(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,U!==null?x=sa(U,x):(x=ps(x,c,s,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,hl(null,l),l=t.child,x=e.child.memoizedState,x===null?x=ju(s):(c=x.cachePool,c!==null?(w=At._currentValue,c=c.parent!==w?{parent:w,pool:w}:c):c=jp(),x={baseLanes:x.baseLanes|s,cachePool:c}),l.memoizedState=x,l.childLanes=Nu(e,b,s),t.memoizedState=Au,hl(e.child,l)):(Ia(t),s=e.child,e=s.sibling,s=sa(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=Yo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yo(e,t){return e=on(22,e,null,t),e.lanes=0,e}function Du(e,t,s){return _s(t,e.child,null,s),e=wu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Vm(e,t,s){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),$c(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 Hm(e,t,s){var l=t.pendingProps,c=l.revealOrder,f=l.tail;l=l.children;var b=_t.current,x=(b&2)!==0;if(x?(b=b&1|2,t.flags|=128):b&=1,fe(_t,b),Pt(e,t,l,s),l=ze?el:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vm(e,s,t);else if(e.tag===19)Vm(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&&Bo(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&&Bo(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 ua(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),Ha|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(ti(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=sa(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=sa(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&&jo(e)))}function l_(e,t,s){switch(t.tag){case 3:Ne(t,t.stateNode.containerInfo),Ra(t,At,e.memoizedState.cache),ms();break;case 27:case 5:dt(t);break;case 4:Ne(t,t.stateNode.containerInfo);break;case 10:Ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,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?zm(e,t,s):(Ia(t),e=ua(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||(ti(e,t,s,!1),l=(s&t.childLanes)!==0),c){if(l)return Hm(e,t,s);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),fe(_t,_t.current),l)break;return null;case 22:return t.lanes=0,Rm(e,t,s,t.pendingProps);case 24:Ra(t,At,e.memoizedState.cache)}return ua(e,t,s)}function Pm(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!Mu(e,s)&&(t.flags&128)===0)return Nt=!1,l_(e,t,s);Nt=(e.flags&131072)!==0}else Nt=!1,ze&&(t.flags&1048576)!==0&&Sp(t,el,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=bs(t.elementType),t.type=e,typeof e=="function")Ic(e)?(l=Ts(e,l),t.tag=1,t=Im(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===H){t.tag=11,t=Dm(null,t,e,l,s);break e}else if(c===G){t.tag=14,t=km(null,t,e,l,s);break e}}throw t=Y(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=Ts(l,t.pendingProps),Im(e,t,l,c,s);case 3:e:{if(Ne(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var f=t.memoizedState;c=f.element,Jc(e,t),rl(t,l,null,s);var b=t.memoizedState;if(l=b.cache,Ra(t,At,l),l!==f.cache&&qc(t,[At],s,!0),ol(),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=Um(e,t,l,s);break e}else if(l!==c){c=Sn(Error(o(424)),t),tl(c),t=Um(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(at=Cn(e.firstChild),Vt=t,ze=!0,ka=null,Tn=!0,s=Rp(t,null,l,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(ms(),l===c){t=ua(e,t,s);break e}Pt(e,t,l,s)}t=t.child}return t;case 26:return qo(e,t),e===null?(s=Wg(t.type,null,t.pendingProps,null))?t.memoizedState=s:ze||(s=t.type,e=t.pendingProps,l=cr(ee.current).createElement(s),l[zt]=t,l[Jt]=e,Gt(l,s,e),Bt(l),t.stateNode=l):t.memoizedState=Wg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return dt(t),e===null&&ze&&(l=t.stateNode=Xg(t.type,t.pendingProps,ee.current),Vt=t,Tn=!0,c=at,qa(t.type)?(dd=c,at=Cn(l.firstChild)):at=c),Pt(e,t,t.pendingProps.children,s),qo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((c=l=at)&&(l=L_(l,t.type,t.pendingProps,Tn),l!==null?(t.stateNode=l,Vt=t,at=Cn(l.firstChild),Tn=!1,c=!0):c=!1),c||Ma(t)),dt(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),Nl._currentValue=c),qo(e,t),Pt(e,t,l,s),t.child;case 6:return e===null&&ze&&((e=s=at)&&(s=I_(s,t.pendingProps,Tn),s!==null?(t.stateNode=s,Vt=t,at=null,e=!0):e=!1),e||Ma(t)),null;case 13:return zm(e,t,s);case 4:return Ne(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=_s(t,null,l,s):Pt(e,t,l,s),t.child;case 11:return Dm(e,t,t.type,t.pendingProps,s);case 7:return Pt(e,t,t.pendingProps,s),t.child;case 8:return Pt(e,t,t.pendingProps.children,s),t.child;case 12:return Pt(e,t,t.pendingProps.children,s),t.child;case 10:return l=t.pendingProps,Ra(t,t.type,l.value),Pt(e,t,l.children,s),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,ys(t),c=Ht(c),l=l(c),t.flags|=1,Pt(e,t,l,s),t.child;case 14:return km(e,t,t.type,t.pendingProps,s);case 15:return Mm(e,t,t.type,t.pendingProps,s);case 19:return Hm(e,t,s);case 31:return i_(e,t,s);case 22:return Rm(e,t,s,t.pendingProps);case 24:return ys(t),l=Ht(At),e===null?(c=Zc(),c===null&&(c=We,f=Yc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=s),c=f),t.memoizedState={parent:l,cache:c},Qc(t),Ra(t,At,c)):((e.lanes&s)!==0&&(Jc(e,t),rl(t,null,null,s),ol()),c=e.memoizedState,f=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ra(t,At,l)):(l=f.cache,Ra(t,At,l),l!==c.cache&&qc(t,[At],s,!0))),Pt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function da(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(mg())e.flags|=8192;else throw Ss=ko,Xc}else e.flags&=-16777217}function Gm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sy(t))if(mg())e.flags|=8192;else throw Ss=ko,Xc}function Ko(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xh():536870912,e.lanes|=t,hi|=t)}function pl(e,t){if(!ze)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function st(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 o_(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 st(t),null;case 1:return st(t),null;case 3:return s=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),oa(At),_e(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ei(t)?da(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gc())),st(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(da(t),f!==null?(st(t),Gm(t,f)):(st(t),Ru(t,c,null,l,s))):f?f!==e.memoizedState?(da(t),st(t),Gm(t,f)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&da(t),st(t),Ru(t,c,e,l,s)),null;case 27:if(ft(t),s=ee.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return st(t),null}e=Ie.current,ei(t)?xp(t):(e=Xg(c,l,s),t.stateNode=e,da(t))}return st(t),null;case 5:if(ft(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return st(t),null}if(f=Ie.current,ei(t))xp(t);else{var b=cr(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[zt]=t,f[Jt]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(Gt(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&&da(t)}}return st(t),Ru(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&da(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,ei(t)){if(e=t.stateNode,s=t.memoizedProps,l=null,c=Vt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[zt]=t,e=!!(e.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||zg(e.nodeValue,s)),e||Ma(t,!0)}else e=cr(e).createTextNode(l),e[zt]=t,t.stateNode=e}return st(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(l=ei(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[zt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else s=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(cn(t),t):(cn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return st(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ei(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[zt]=t}else ms(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),c=!1}else c=Gc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(cn(t),t):(cn(t),null)}return cn(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),Ko(t,t.updateQueue),st(t),null);case 4:return _e(),e===null&&td(t.stateNode.containerInfo),st(t),null;case 10:return oa(t.type),st(t),null;case 19:if(Me(_t),l=t.memoizedState,l===null)return st(t),null;if(c=(t.flags&128)!==0,f=l.rendering,f===null)if(c)pl(l,!1);else{if(mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Bo(e),f!==null){for(t.flags|=128,pl(l,!1),e=f.updateQueue,t.updateQueue=e,Ko(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)yp(s,e),s=s.sibling;return fe(_t,_t.current&1|2),ze&&ia(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&J()>Wo&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Bo(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Ko(t,e),pl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!ze)return st(t),null}else 2*J()-l.renderingStartTime>Wo&&s!==536870912&&(t.flags|=128,c=!0,pl(l,!1),t.lanes=4194304);l.isBackwards?(f.sibling=t.child,t.child=f):(e=l.last,e!==null?e.sibling=f:t.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=J(),e.sibling=null,s=_t.current,fe(_t,c?s&1|2:s&1),ze&&ia(t,l.treeForkCount),e):(st(t),null);case 22:case 23:return cn(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&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(t),s=t.updateQueue,s!==null&&Ko(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==s&&(t.flags|=2048),e!==null&&Me(vs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oa(At),st(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function r_(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 oa(At),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ft(t),null;case 31:if(t.memoizedState!==null){if(cn(t),t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));ms()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Me(_t),null;case 4:return _e(),null;case 10:return oa(t.type),null;case 22:case 23:return cn(t),nu(),e!==null&&Me(vs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(At),null;case 25:return null;default:return null}}function Fm(e,t){switch(Hc(t),t.tag){case 3:oa(At),_e();break;case 26:case 27:case 5:ft(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&cn(t);break;case 13:cn(t);break;case 19:Me(_t);break;case 10:oa(t.type);break;case 22:case 23:cn(t),nu(),e!==null&&Me(vs);break;case 24:oa(At)}}function ml(e,t){try{var s=t.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var c=l.next;s=c;do{if((s.tag&e)===e){l=void 0;var f=s.create,b=s.inst;l=f(),b.destroy=l}s=s.next}while(s!==c)}}catch(x){Ze(t,t.return,x)}}function za(e,t,s){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var f=c.next;l=f;do{if((l.tag&e)===e){var b=l.inst,x=b.destroy;if(x!==void 0){b.destroy=void 0,c=t;var w=s,U=x;try{U()}catch(q){Ze(c,w,q)}}}l=l.next}while(l!==f)}}catch(q){Ze(t,t.return,q)}}function $m(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{Bp(t,s)}catch(l){Ze(e,e.return,l)}}}function qm(e,t,s){s.props=Ts(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(l){Ze(e,t,l)}}function gl(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof s=="function"?e.refCleanup=s(l):s.current=l}}catch(c){Ze(e,t,c)}}function Fn(e,t){var s=e.ref,l=e.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(c){Ze(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(c){Ze(e,t,c)}else s.current=null}function Ym(e){var t=e.type,s=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(c){Ze(e,e.return,c)}}function Ou(e,t,s){try{var l=e.stateNode;D_(l,e.type,s,t),l[Jt]=t}catch(c){Ze(e,e.return,c)}}function Km(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qa(e.type)||e.tag===4}function Bu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Km(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function 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=na));else if(l!==4&&(l===27&&qa(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 Zo(e,t,s){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(l!==4&&(l===27&&qa(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Zo(e,t,s),e=e.sibling;e!==null;)Zo(e,t,s),e=e.sibling}function Zm(e){var t=e.stateNode,s=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Gt(t,l,s),t[zt]=e,t[Jt]=s}catch(f){Ze(e,e.return,f)}}var fa=!1,wt=!1,Iu=!1,Xm=typeof WeakSet=="function"?WeakSet:Set,Lt=null;function c_(e,t){if(e=e.containerInfo,sd=gr,e=rp(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,w=-1,U=0,q=0,Z=e,z=null;t:for(;;){for(var P;Z!==s||c!==0&&Z.nodeType!==3||(x=b+c),Z!==f||l!==0&&Z.nodeType!==3||(w=b+l),Z.nodeType===3&&(b+=Z.nodeValue.length),(P=Z.firstChild)!==null;)z=Z,Z=P;for(;;){if(Z===e)break t;if(z===s&&++U===c&&(x=b),z===f&&++q===l&&(w=b),(P=Z.nextSibling)!==null)break;Z=z,z=Z.parentNode}Z=P}s=x===-1||w===-1?null:{start:x,end:w}}else s=null}s=s||{start:0,end:0}}else s=null;for(id={focusedElem:e,selectionRange:s},gr=!1,Lt=t;Lt!==null;)if(t=Lt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Lt=e;else for(;Lt!==null;){switch(t=Lt,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 ie=Ts(s.type,c);e=l.getSnapshotBeforeUpdate(ie,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(he){Ze(s,s.return,he)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)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,Lt=e;break}Lt=t.return}}function Qm(e,t,s){var l=s.flags;switch(s.tag){case 0:case 11:case 15:pa(e,s),l&4&&ml(5,s);break;case 1:if(pa(e,s),l&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(b){Ze(s,s.return,b)}else{var c=Ts(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ze(s,s.return,b)}}l&64&&$m(s),l&512&&gl(s,s.return);break;case 3:if(pa(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{Bp(e,t)}catch(b){Ze(s,s.return,b)}}break;case 27:t===null&&l&4&&Zm(s);case 26:case 5:pa(e,s),t===null&&l&4&&Ym(s),l&512&&gl(s,s.return);break;case 12:pa(e,s);break;case 31:pa(e,s),l&4&&eg(e,s);break;case 13:pa(e,s),l&4&&tg(e,s),l&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=v_.bind(null,s),U_(e,s))));break;case 22:if(l=s.memoizedState!==null||fa,!l){t=t!==null&&t.memoizedState!==null||wt,c=fa;var f=wt;fa=l,(wt=t)&&!f?ma(e,s,(s.subtreeFlags&8772)!==0):pa(e,s),fa=c,wt=f}break;case 30:break;default:pa(e,s)}}function Jm(e){var t=e.alternate;t!==null&&(e.alternate=null,Jm(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 ot=null,en=!1;function ha(e,t,s){for(s=s.child;s!==null;)Wm(e,t,s),s=s.sibling}function Wm(e,t,s){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount(St,s)}catch{}switch(s.tag){case 26:wt||Fn(s,t),ha(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:wt||Fn(s,t);var l=ot,c=en;qa(s.type)&&(ot=s.stateNode,en=!1),ha(e,t,s),Cl(s.stateNode),ot=l,en=c;break;case 5:wt||Fn(s,t);case 6:if(l=ot,c=en,ot=null,ha(e,t,s),ot=l,en=c,ot!==null)if(en)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(s.stateNode)}catch(f){Ze(s,t,f)}else try{ot.removeChild(s.stateNode)}catch(f){Ze(s,t,f)}break;case 18:ot!==null&&(en?(e=ot,$g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),_i(e)):$g(ot,s.stateNode));break;case 4:l=ot,c=en,ot=s.stateNode.containerInfo,en=!0,ha(e,t,s),ot=l,en=c;break;case 0:case 11:case 14:case 15:za(2,s,t),wt||za(4,s,t),ha(e,t,s);break;case 1:wt||(Fn(s,t),l=s.stateNode,typeof l.componentWillUnmount=="function"&&qm(s,t,l)),ha(e,t,s);break;case 21:ha(e,t,s);break;case 22:wt=(l=wt)||s.memoizedState!==null,ha(e,t,s),wt=l;break;default:ha(e,t,s)}}function eg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{_i(e)}catch(s){Ze(t,t.return,s)}}}function tg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{_i(e)}catch(s){Ze(t,t.return,s)}}function u_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xm),t;default:throw Error(o(435,e.tag))}}function Xo(e,t){var s=u_(e);t.forEach(function(l){if(!s.has(l)){s.add(l);var c=b_.bind(null,e,l);l.then(c,c)}})}function tn(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(qa(x.type)){ot=x.stateNode,en=!1;break e}break;case 5:ot=x.stateNode,en=!1;break e;case 3:case 4:ot=x.stateNode.containerInfo,en=!0;break e}x=x.return}if(ot===null)throw Error(o(160));Wm(f,b,c),ot=null,en=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ng(t,e),t=t.sibling}var In=null;function ng(e,t){var s=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),l&4&&(za(3,e,e.return),ml(3,e),za(5,e,e.return));break;case 1:tn(t,e),nn(e),l&512&&(wt||s===null||Fn(s,s.return)),l&64&&fa&&(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(tn(t,e),nn(e),l&512&&(wt||s===null||Fn(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[Gi]||f[zt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(l),c.head.insertBefore(f,c.querySelector("head > title"))),Gt(f,l,s),f[zt]=e,Bt(f),l=f;break e;case"link":var b=ny("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),Gt(f,l,s),c.head.appendChild(f);break;case"meta":if(b=ny("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),Gt(f,l,s),c.head.appendChild(f);break;default:throw Error(o(468,l))}f[zt]=e,Bt(f),l=f}e.stateNode=l}else ay(c,e.type,e.stateNode);else e.stateNode=ty(c,l,e.memoizedProps);else f!==l?(f===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):f.count--,l===null?ay(c,e.type,e.stateNode):ty(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ou(e,e.memoizedProps,s.memoizedProps)}break;case 27:tn(t,e),nn(e),l&512&&(wt||s===null||Fn(s,s.return)),s!==null&&l&4&&Ou(e,e.memoizedProps,s.memoizedProps);break;case 5:if(tn(t,e),nn(e),l&512&&(wt||s===null||Fn(s,s.return)),e.flags&32){c=e.stateNode;try{Fs(c,"")}catch(ie){Ze(e,e.return,ie)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,Ou(e,c,s!==null?s.memoizedProps:c)),l&1024&&(Iu=!0);break;case 6:if(tn(t,e),nn(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,s=e.stateNode;try{s.nodeValue=l}catch(ie){Ze(e,e.return,ie)}}break;case 3:if(fr=null,c=In,In=ur(t.containerInfo),tn(t,e),In=c,nn(e),l&4&&s!==null&&s.memoizedState.isDehydrated)try{_i(t.containerInfo)}catch(ie){Ze(e,e.return,ie)}Iu&&(Iu=!1,ag(e));break;case 4:l=In,In=ur(e.stateNode.containerInfo),tn(t,e),nn(e),In=l;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Jo=J()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 22:c=e.memoizedState!==null;var w=s!==null&&s.memoizedState!==null,U=fa,q=wt;if(fa=U||c,wt=q||w,tn(t,e),wt=q,fa=U,nn(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(s===null||w||fa||wt||Es(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){w=s=t;try{if(f=w.stateNode,c)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{x=w.stateNode;var Z=w.memoizedProps.style,z=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;x.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(ie){Ze(w,w.return,ie)}}}else if(t.tag===6){if(s===null){w=t;try{w.stateNode.nodeValue=c?"":w.memoizedProps}catch(ie){Ze(w,w.return,ie)}}}else if(t.tag===18){if(s===null){w=t;try{var P=w.stateNode;c?qg(P,!0):qg(w.stateNode,!1)}catch(ie){Ze(w,w.return,ie)}}}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,Xo(e,s))));break;case 19:tn(t,e),nn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Xo(e,l)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var s,l=e.return;l!==null;){if(Km(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);Zo(e,f,c);break;case 5:var b=s.stateNode;s.flags&32&&(Fs(b,""),s.flags&=-33);var x=Bu(e);Zo(e,x,b);break;case 3:case 4:var w=s.stateNode.containerInfo,U=Bu(e);Lu(e,U,w);break;default:throw Error(o(161))}}catch(q){Ze(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ag(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ag(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qm(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Es(t);break;case 1:Fn(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&qm(t,t.return,s),Es(t);break;case 27:Cl(t.stateNode);case 26:case 5:Fn(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function ma(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:ma(c,f,s),ml(4,f);break;case 1:if(ma(c,f,s),l=f,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(U){Ze(l,l.return,U)}if(l=f,c=l.updateQueue,c!==null){var x=l.stateNode;try{var w=c.shared.hiddenCallbacks;if(w!==null)for(c.shared.hiddenCallbacks=null,c=0;c<w.length;c++)Op(w[c],x)}catch(U){Ze(l,l.return,U)}}s&&b&64&&$m(f),gl(f,f.return);break;case 27:Zm(f);case 26:case 5:ma(c,f,s),s&&l===null&&b&4&&Ym(f),gl(f,f.return);break;case 12:ma(c,f,s);break;case 31:ma(c,f,s),s&&b&4&&eg(c,f);break;case 13:ma(c,f,s),s&&b&4&&tg(c,f);break;case 22:f.memoizedState===null&&ma(c,f,s),gl(f,f.return);break;case 30:break;default:ma(c,f,s)}t=t.sibling}}function Uu(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&&nl(s))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nl(e))}function Un(e,t,s,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sg(e,t,s,l),t=t.sibling}function sg(e,t,s,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Un(e,t,s,l),c&2048&&ml(9,t);break;case 1:Un(e,t,s,l);break;case 3:Un(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&&nl(e)));break;case 12:if(c&2048){Un(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(w){Ze(t,t.return,w)}}else Un(e,t,s,l);break;case 31:Un(e,t,s,l);break;case 13:Un(e,t,s,l);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Un(e,t,s,l):yl(e,t):f._visibility&2?Un(e,t,s,l):(f._visibility|=2,ui(e,t,s,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Uu(b,t);break;case 24:Un(e,t,s,l),c&2048&&zu(t.alternate,t);break;default:Un(e,t,s,l)}}function ui(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,w=l,U=b.flags;switch(b.tag){case 0:case 11:case 15:ui(f,b,x,w,c),ml(8,b);break;case 23:break;case 22:var q=b.stateNode;b.memoizedState!==null?q._visibility&2?ui(f,b,x,w,c):yl(f,b):(q._visibility|=2,ui(f,b,x,w,c)),c&&U&2048&&Uu(b.alternate,b);break;case 24:ui(f,b,x,w,c),c&&U&2048&&zu(b.alternate,b);break;default:ui(f,b,x,w,c)}t=t.sibling}}function yl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,l=t,c=l.flags;switch(l.tag){case 22:yl(s,l),c&2048&&Uu(l.alternate,l);break;case 24:yl(s,l),c&2048&&zu(l.alternate,l);break;default:yl(s,l)}t=t.sibling}}var vl=8192;function di(e,t,s){if(e.subtreeFlags&vl)for(e=e.child;e!==null;)ig(e,t,s),e=e.sibling}function ig(e,t,s){switch(e.tag){case 26:di(e,t,s),e.flags&vl&&e.memoizedState!==null&&X_(s,In,e.memoizedState,e.memoizedProps);break;case 5:di(e,t,s);break;case 3:case 4:var l=In;In=ur(e.stateNode.containerInfo),di(e,t,s),In=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=vl,vl=16777216,di(e,t,s),vl=l):di(e,t,s));break;default:di(e,t,s)}}function lg(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 bl(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];Lt=l,rg(l,e)}lg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)og(e),e=e.sibling}function og(e){switch(e.tag){case 0:case 11:case 15:bl(e),e.flags&2048&&za(9,e,e.return);break;case 3:bl(e);break;case 12:bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Qo(e)):bl(e);break;default:bl(e)}}function Qo(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];Lt=l,rg(l,e)}lg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),Qo(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Qo(t));break;default:Qo(t)}e=e.sibling}}function rg(e,t){for(;Lt!==null;){var s=Lt;switch(s.tag){case 0:case 11:case 15:za(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var l=s.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:nl(s.memoizedState.cache)}if(l=s.child,l!==null)l.return=s,Lt=l;else e:for(s=e;Lt!==null;){l=Lt;var c=l.sibling,f=l.return;if(Jm(l),l===s){Lt=null;break e}if(c!==null){c.return=f,Lt=c;break e}Lt=f}}}var d_={getCacheForType:function(e){var t=Ht(At),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Ht(At).controller.signal}},f_=typeof WeakMap=="function"?WeakMap:Map,Fe=0,We=null,De=null,Be=0,Ke=0,un=null,Va=!1,fi=!1,Vu=!1,ga=0,mt=0,Ha=0,Cs=0,Hu=0,dn=0,hi=0,Sl=null,an=null,Pu=!1,Jo=0,cg=0,Wo=1/0,er=null,Pa=null,Rt=0,Ga=null,pi=null,ya=0,Gu=0,Fu=null,ug=null,_l=0,$u=null;function fn(){return(Fe&2)!==0&&Be!==0?Be&-Be:B.T!==null?Qu():Ah()}function dg(){if(dn===0)if((Be&536870912)===0||ze){var e=Bn;Bn<<=1,(Bn&3932160)===0&&(Bn=262144),dn=e}else dn=536870912;return e=rn.current,e!==null&&(e.flags|=32),dn}function sn(e,t,s){(e===We&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Fa(e,Be,dn,!1)),Pi(e,s),((Fe&2)===0||e!==We)&&(e===We&&((Fe&2)===0&&(Cs|=s),mt===4&&Fa(e,Be,dn,!1)),$n(e))}function fg(e,t,s){if((Fe&6)!==0)throw Error(o(327));var l=!s&&(t&127)===0&&(t&e.expiredLanes)===0||Hi(e,t),c=l?m_(e,t):Yu(e,t,!0),f=l;do{if(c===0){fi&&!l&&Fa(e,t,0,!1);break}else{if(s=e.current.alternate,f&&!h_(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=Sl;var w=x.current.memoizedState.isDehydrated;if(w&&(mi(x,b).flags|=256),b=Yu(x,b,!1),b!==2){if(Vu&&!w){x.errorRecoveryDisabledLanes|=f,Cs|=f,c=4;break e}f=an,an=c,f!==null&&(an===null?an=f:an.push.apply(an,f))}c=b}if(f=!1,c!==2)continue}}if(c===1){mi(e,0),Fa(e,t,0,!0);break}e:{switch(l=e,f=c,f){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Fa(l,t,dn,!Va);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=Jo+300-J(),10<c)){if(Fa(l,t,dn,!Va),co(l,0,!0)!==0)break e;ya=t,l.timeoutHandle=Gg(hg.bind(null,l,s,an,er,Pu,t,dn,Cs,hi,Va,f,"Throttled",-0,0),c);break e}hg(l,s,an,er,Pu,t,dn,Cs,hi,Va,f,null,-0,0)}}break}while(!0);$n(e)}function hg(e,t,s,l,c,f,b,x,w,U,q,Z,z,P){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:na},ig(t,f,Z);var ie=(f&62914560)===f?Jo-J():(f&4194048)===f?cg-J():0;if(ie=Q_(Z,ie),ie!==null){ya=f,e.cancelPendingCommit=ie(_g.bind(null,e,t,f,s,l,c,b,x,w,q,Z,null,z,P)),Fa(e,f,b,!U);return}}_g(e,t,f,s,l,c,b,x,w)}function h_(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(!ln(f(),c))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fa(e,t,s,l){t&=~Hu,t&=~Cs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var f=31-Se(c),b=1<<f;l[f]=-1,c&=~b}s!==0&&Th(e,s,t)}function tr(){return(Fe&6)===0?(xl(0),!1):!0}function qu(){if(De!==null){if(Ke===0)var e=De.return;else e=De,la=gs=null,ru(e),ii=null,sl=0,e=De;for(;e!==null;)Fm(e.alternate,e),e=e.return;De=null}}function mi(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,R_(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ya=0,qu(),We=e,De=s=sa(e.current,null),Be=t,Ke=0,un=null,Va=!1,fi=Hi(e,t),Vu=!1,hi=dn=Hu=Cs=Ha=mt=0,an=Sl=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-Se(l),f=1<<c;t|=e[c],l&=~f}return ga=t,xo(),s}function pg(e,t){Ae=null,B.H=fl,t===si||t===Do?(t=Dp(),Ke=3):t===Xc?(t=Dp(),Ke=4):Ke=t===Eu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,un=t,De===null&&(mt=1,Fo(e,Sn(t,e.current)))}function mg(){var e=rn.current;return e===null?!0:(Be&4194048)===Be?En===null:(Be&62914560)===Be||(Be&536870912)!==0?e===En:!1}function gg(){var e=B.H;return B.H=fl,e===null?fl:e}function yg(){var e=B.A;return B.A=d_,e}function nr(){mt=4,Va||(Be&4194048)!==Be&&rn.current!==null||(fi=!0),(Ha&134217727)===0&&(Cs&134217727)===0||We===null||Fa(We,Be,dn,!1)}function Yu(e,t,s){var l=Fe;Fe|=2;var c=gg(),f=yg();(We!==e||Be!==t)&&(er=null,mi(e,t)),t=!1;var b=mt;e:do try{if(Ke!==0&&De!==null){var x=De,w=un;switch(Ke){case 8:qu(),b=6;break e;case 3:case 2:case 9:case 6:rn.current===null&&(t=!0);var U=Ke;if(Ke=0,un=null,gi(e,x,w,U),s&&fi){b=0;break e}break;default:U=Ke,Ke=0,un=null,gi(e,x,w,U)}}p_(),b=mt;break}catch(q){pg(e,q)}while(!0);return t&&e.shellSuspendCounter++,la=gs=null,Fe=l,B.H=c,B.A=f,De===null&&(We=null,Be=0,xo()),b}function p_(){for(;De!==null;)vg(De)}function m_(e,t){var s=Fe;Fe|=2;var l=gg(),c=yg();We!==e||Be!==t?(er=null,Wo=J()+500,mi(e,t)):fi=Hi(e,t);e:do try{if(Ke!==0&&De!==null){t=De;var f=un;t:switch(Ke){case 1:Ke=0,un=null,gi(e,t,f,1);break;case 2:case 9:if(Np(f)){Ke=0,un=null,bg(t);break}t=function(){Ke!==2&&Ke!==9||We!==e||(Ke=7),$n(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Np(f)?(Ke=0,un=null,bg(t)):(Ke=0,un=null,gi(e,t,f,7));break;case 5:var b=null;switch(De.tag){case 26:b=De.memoizedState;case 5:case 27:var x=De;if(b?sy(b):x.stateNode.complete){Ke=0,un=null;var w=x.sibling;if(w!==null)De=w;else{var U=x.return;U!==null?(De=U,ar(U)):De=null}break t}}Ke=0,un=null,gi(e,t,f,5);break;case 6:Ke=0,un=null,gi(e,t,f,6);break;case 8:qu(),mt=6;break e;default:throw Error(o(462))}}g_();break}catch(q){pg(e,q)}while(!0);return la=gs=null,B.H=l,B.A=c,Fe=s,De!==null?0:(We=null,Be=0,xo(),mt)}function g_(){for(;De!==null&&!ea();)vg(De)}function vg(e){var t=Pm(e.alternate,e,ga);e.memoizedProps=e.pendingProps,t===null?ar(e):De=t}function bg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=Lm(s,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Lm(s,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:ru(t);default:Fm(s,t),t=De=yp(t,ga),t=Pm(s,t,ga)}e.memoizedProps=e.pendingProps,t===null?ar(e):De=t}function gi(e,t,s,l){la=gs=null,ru(t),ii=null,sl=0;var c=t.return;try{if(s_(e,c,t,s,Be)){mt=1,Fo(e,Sn(s,e.current)),De=null;return}}catch(f){if(c!==null)throw De=c,f;mt=1,Fo(e,Sn(s,e.current)),De=null;return}t.flags&32768?(ze||l===1?e=!0:fi||(Be&536870912)!==0?e=!1:(Va=e=!0,(l===2||l===9||l===3||l===6)&&(l=rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Sg(t,e)):ar(t)}function ar(e){var t=e;do{if((t.flags&32768)!==0){Sg(t,Va);return}e=t.return;var s=o_(t.alternate,t,ga);if(s!==null){De=s;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);mt===0&&(mt=5)}function Sg(e,t){do{var s=r_(e.alternate,e);if(s!==null){s.flags&=32767,De=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=s}while(e!==null);mt=6,De=null}function _g(e,t,s,l,c,f,b,x,w){e.cancelPendingCommit=null;do sr();while(Rt!==0);if((Fe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(f=t.lanes|t.childLanes,f|=Bc,Z1(e,s,f,b,x,w),e===We&&(De=We=null,Be=0),pi=t,Ga=e,ya=s,Gu=f,Fu=c,ug=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S_(Ue,function(){return Ag(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=B.T,B.T=null,c=F.p,F.p=2,b=Fe,Fe|=4;try{c_(e,t,s)}finally{Fe=b,F.p=c,B.T=l}}Rt=1,xg(),Tg(),Eg()}}function xg(){if(Rt===1){Rt=0;var e=Ga,t=pi,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=B.T,B.T=null;var l=F.p;F.p=2;var c=Fe;Fe|=4;try{ng(t,e);var f=id,b=rp(e.containerInfo),x=f.focusedElem,w=f.selectionRange;if(b!==x&&x&&x.ownerDocument&&op(x.ownerDocument.documentElement,x)){if(w!==null&&Dc(x)){var U=w.start,q=w.end;if(q===void 0&&(q=U),"selectionStart"in x)x.selectionStart=U,x.selectionEnd=Math.min(q,x.value.length);else{var Z=x.ownerDocument||document,z=Z&&Z.defaultView||window;if(z.getSelection){var P=z.getSelection(),ie=x.textContent.length,he=Math.min(w.start,ie),Je=w.end===void 0?he:Math.min(w.end,ie);!P.extend&&he>Je&&(b=Je,Je=he,he=b);var R=lp(x,he),D=lp(x,Je);if(R&&D&&(P.rangeCount!==1||P.anchorNode!==R.node||P.anchorOffset!==R.offset||P.focusNode!==D.node||P.focusOffset!==D.offset)){var I=Z.createRange();I.setStart(R.node,R.offset),P.removeAllRanges(),he>Je?(P.addRange(I),P.extend(D.node,D.offset)):(I.setEnd(D.node,D.offset),P.addRange(I))}}}}for(Z=[],P=x;P=P.parentNode;)P.nodeType===1&&Z.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<Z.length;x++){var K=Z[x];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}gr=!!sd,id=sd=null}finally{Fe=c,F.p=l,B.T=s}}e.current=t,Rt=2}}function Tg(){if(Rt===2){Rt=0;var e=Ga,t=pi,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=B.T,B.T=null;var l=F.p;F.p=2;var c=Fe;Fe|=4;try{Qm(e,t.alternate,t)}finally{Fe=c,F.p=l,B.T=s}}Rt=3}}function Eg(){if(Rt===4||Rt===3){Rt=0,X();var e=Ga,t=pi,s=ya,l=ug;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,pi=Ga=null,Cg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Pa=null),dc(s),t=t.stateNode,Oe&&typeof Oe.onCommitFiberRoot=="function")try{Oe.onCommitFiberRoot(St,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=B.T,c=F.p,F.p=2,B.T=null;try{for(var f=e.onRecoverableError,b=0;b<l.length;b++){var x=l[b];f(x.value,{componentStack:x.stack})}}finally{B.T=t,F.p=c}}(ya&3)!==0&&sr(),$n(e),c=e.pendingLanes,(s&261930)!==0&&(c&42)!==0?e===$u?_l++:(_l=0,$u=e):_l=0,xl(0)}}function Cg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nl(t)))}function sr(){return xg(),Tg(),Eg(),Ag()}function Ag(){if(Rt!==5)return!1;var e=Ga,t=Gu;Gu=0;var s=dc(ya),l=B.T,c=F.p;try{F.p=32>s?32:s,B.T=null,s=Fu,Fu=null;var f=Ga,b=ya;if(Rt=0,pi=Ga=null,ya=0,(Fe&6)!==0)throw Error(o(331));var x=Fe;if(Fe|=4,og(f.current),sg(f,f.current,b,s),Fe=x,xl(0,!1),Oe&&typeof Oe.onPostCommitFiberRoot=="function")try{Oe.onPostCommitFiberRoot(St,f)}catch{}return!0}finally{F.p=c,B.T=l,Cg(e,t)}}function jg(e,t,s){t=Sn(s,t),t=Tu(e.stateNode,t,2),e=La(e,t,2),e!==null&&(Pi(e,2),$n(e))}function Ze(e,t,s){if(e.tag===3)jg(e,e,s);else for(;t!==null;){if(t.tag===3){jg(t,e,s);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Pa===null||!Pa.has(l))){e=Sn(s,e),s=Nm(2),l=La(t,s,2),l!==null&&(wm(s,l,t,e),Pi(l,2),$n(l));break}}t=t.return}}function Ku(e,t,s){var l=e.pingCache;if(l===null){l=e.pingCache=new f_;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=y_.bind(null,e,t,s),t.then(e,e))}function y_(e,t,s){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,We===e&&(Be&s)===s&&(mt===4||mt===3&&(Be&62914560)===Be&&300>J()-Jo?(Fe&2)===0&&mi(e,0):Hu|=s,hi===Be&&(hi=0)),$n(e)}function Ng(e,t){t===0&&(t=xh()),e=hs(e,t),e!==null&&(Pi(e,t),$n(e))}function v_(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),Ng(e,s)}function b_(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),Ng(e,s)}function S_(e,t){return Wn(e,t)}var ir=null,yi=null,Zu=!1,lr=!1,Xu=!1,$a=0;function $n(e){e!==yi&&e.next===null&&(yi===null?ir=yi=e:yi=yi.next=e),lr=!0,Zu||(Zu=!0,x_())}function xl(e,t){if(!Xu&&lr){Xu=!0;do for(var s=!1,l=ir;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var f=0;else{var b=l.suspendedLanes,x=l.pingedLanes;f=(1<<31-Se(42|e)+1)-1,f&=c&~(b&~x),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(s=!0,Mg(l,f))}else f=Be,f=co(l,l===We?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||Hi(l,f)||(s=!0,Mg(l,f));l=l.next}while(s);Xu=!1}}function __(){wg()}function wg(){lr=Zu=!1;var e=0;$a!==0&&M_()&&(e=$a);for(var t=J(),s=null,l=ir;l!==null;){var c=l.next,f=Dg(l,t);f===0?(l.next=null,s===null?ir=c:s.next=c,c===null&&(yi=s)):(s=l,(e!==0||(f&3)!==0)&&(lr=!0)),l=c}Rt!==0&&Rt!==5||xl(e),$a!==0&&($a=0)}function Dg(e,t){for(var s=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-Se(f),x=1<<b,w=c[b];w===-1?((x&s)===0||(x&l)!==0)&&(c[b]=K1(x,t)):w<=t&&(e.expiredLanes|=x),f&=~x}if(t=We,s=Be,s=co(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,s===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&On(l),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Hi(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(l!==null&&On(l),dc(s)){case 2:case 8:s=pe;break;case 32:s=Ue;break;case 268435456:s=bt;break;default:s=Ue}return l=kg.bind(null,e),s=Wn(s,l),e.callbackPriority=t,e.callbackNode=s,t}return l!==null&&l!==null&&On(l),e.callbackPriority=2,e.callbackNode=null,2}function kg(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(sr()&&e.callbackNode!==s)return null;var l=Be;return l=co(e,e===We?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(fg(e,l,t),Dg(e,J()),e.callbackNode!=null&&e.callbackNode===s?kg.bind(null,e):null)}function Mg(e,t){if(sr())return null;fg(e,t,!0)}function x_(){O_(function(){(Fe&6)!==0?Wn(ge,__):wg()})}function Qu(){if($a===0){var e=ni;e===0&&(e=Ct,Ct<<=1,(Ct&261888)===0&&(Ct=256)),$a=e}return $a}function Rg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:po(""+e)}function Og(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 T_(e,t,s,l,c){if(t==="submit"&&s&&s.stateNode===c){var f=Rg((c[Jt]||null).action),b=l.submitter;b&&(t=(t=b[Jt]||null)?Rg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var x=new vo("action","action",null,l,c);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if($a!==0){var w=b?Og(c,b):new FormData(c);yu(s,{pending:!0,data:w,method:c.method,action:f},null,w)}}else typeof f=="function"&&(x.preventDefault(),w=b?Og(c,b):new FormData(c),yu(s,{pending:!0,data:w,method:c.method,action:f},f,w))},currentTarget:c}]})}}for(var Ju=0;Ju<Oc.length;Ju++){var Wu=Oc[Ju],E_=Wu.toLowerCase(),C_=Wu[0].toUpperCase()+Wu.slice(1);Ln(E_,"on"+C_)}Ln(dp,"onAnimationEnd"),Ln(fp,"onAnimationIteration"),Ln(hp,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(HS,"onTransitionRun"),Ln(PS,"onTransitionStart"),Ln(GS,"onTransitionCancel"),Ln(pp,"onTransitionEnd"),Ps("onMouseEnter",["mouseout","mouseover"]),Ps("onMouseLeave",["mouseout","mouseover"]),Ps("onPointerEnter",["pointerout","pointerover"]),Ps("onPointerLeave",["pointerout","pointerover"]),cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),A_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Tl));function Bg(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],w=x.instance,U=x.currentTarget;if(x=x.listener,w!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch(q){_o(q)}c.currentTarget=null,f=w}else for(b=0;b<l.length;b++){if(x=l[b],w=x.instance,U=x.currentTarget,x=x.listener,w!==f&&c.isPropagationStopped())break e;f=x,c.currentTarget=U;try{f(c)}catch(q){_o(q)}c.currentTarget=null,f=w}}}}function ke(e,t){var s=t[fc];s===void 0&&(s=t[fc]=new Set);var l=e+"__bubble";s.has(l)||(Lg(t,e,2,!1),s.add(l))}function ed(e,t,s){var l=0;t&&(l|=4),Lg(s,e,l,t)}var or="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[or]){e[or]=!0,wh.forEach(function(s){s!=="selectionchange"&&(A_.has(s)||ed(s,!1,e),ed(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[or]||(t[or]=!0,ed("selectionchange",!1,t))}}function Lg(e,t,s,l){switch(dy(t)){case 2:var c=ex;break;case 8:c=tx;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 w=b.tag;if((w===3||w===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;x!==null;){if(b=zs(x),b===null)return;if(w=b.tag,w===5||w===6||w===26||w===27){l=f=b;continue e}x=x.parentNode}}l=l.return}Hh(function(){var U=f,q=bc(s),Z=[];e:{var z=mp.get(e);if(z!==void 0){var P=vo,ie=e;switch(e){case"keypress":if(go(s)===0)break e;case"keydown":case"keyup":P=bS;break;case"focusin":ie="focus",P=Cc;break;case"focusout":ie="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=Fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=oS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=xS;break;case dp:case fp:case hp:P=uS;break;case pp:P=ES;break;case"scroll":case"scrollend":P=iS;break;case"wheel":P=AS;break;case"copy":case"cut":case"paste":P=fS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=qh;break;case"toggle":case"beforetoggle":P=NS}var he=(t&4)!==0,Je=!he&&(e==="scroll"||e==="scrollend"),R=he?z!==null?z+"Capture":null:z;he=[];for(var D=U,I;D!==null;){var K=D;if(I=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||I===null||R===null||(K=$i(D,R),K!=null&&he.push(El(D,K,I))),Je)break;D=D.return}0<he.length&&(z=new P(z,ie,null,s,q),Z.push({event:z,listeners:he}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",z&&s!==vc&&(ie=s.relatedTarget||s.fromElement)&&(zs(ie)||ie[Us]))break e;if((P||z)&&(z=q.window===q?q:(z=q.ownerDocument)?z.defaultView||z.parentWindow:window,P?(ie=s.relatedTarget||s.toElement,P=U,ie=ie?zs(ie):null,ie!==null&&(Je=d(ie),he=ie.tag,ie!==Je||he!==5&&he!==27&&he!==6)&&(ie=null)):(P=null,ie=U),P!==ie)){if(he=Fh,K="onMouseLeave",R="onMouseEnter",D="mouse",(e==="pointerout"||e==="pointerover")&&(he=qh,K="onPointerLeave",R="onPointerEnter",D="pointer"),Je=P==null?z:Fi(P),I=ie==null?z:Fi(ie),z=new he(K,D+"leave",P,s,q),z.target=Je,z.relatedTarget=I,K=null,zs(q)===U&&(he=new he(R,D+"enter",ie,s,q),he.target=I,he.relatedTarget=Je,K=he),Je=K,P&&ie)t:{for(he=j_,R=P,D=ie,I=0,K=R;K;K=he(K))I++;K=0;for(var de=D;de;de=he(de))K++;for(;0<I-K;)R=he(R),I--;for(;0<K-I;)D=he(D),K--;for(;I--;){if(R===D||D!==null&&R===D.alternate){he=R;break t}R=he(R),D=he(D)}he=null}else he=null;P!==null&&Ig(Z,z,P,he,!1),ie!==null&&Je!==null&&Ig(Z,Je,ie,he,!0)}}e:{if(z=U?Fi(U):window,P=z.nodeName&&z.nodeName.toLowerCase(),P==="select"||P==="input"&&z.type==="file")var He=ep;else if(Jh(z))if(tp)He=US;else{He=LS;var ue=BS}else P=z.nodeName,!P||P.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?U&&yc(U.elementType)&&(He=ep):He=IS;if(He&&(He=He(e,U))){Wh(Z,He,s,q);break e}ue&&ue(e,z,U),e==="focusout"&&U&&z.type==="number"&&U.memoizedProps.value!=null&&gc(z,"number",z.value)}switch(ue=U?Fi(U):window,e){case"focusin":(Jh(ue)||ue.contentEditable==="true")&&(Ks=ue,kc=U,Wi=null);break;case"focusout":Wi=kc=Ks=null;break;case"mousedown":Mc=!0;break;case"contextmenu":case"mouseup":case"dragend":Mc=!1,cp(Z,s,q);break;case"selectionchange":if(VS)break;case"keydown":case"keyup":cp(Z,s,q)}var je;if(jc)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Ys?Xh(e,s)&&(Le="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Le="onCompositionStart");Le&&(Yh&&s.locale!=="ko"&&(Ys||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Ys&&(je=Ph()):(wa=q,xc="value"in wa?wa.value:wa.textContent,Ys=!0)),ue=rr(U,Le),0<ue.length&&(Le=new $h(Le,e,null,s,q),Z.push({event:Le,listeners:ue}),je?Le.data=je:(je=Qh(s),je!==null&&(Le.data=je)))),(je=DS?kS(e,s):MS(e,s))&&(Le=rr(U,"onBeforeInput"),0<Le.length&&(ue=new $h("onBeforeInput","beforeinput",null,s,q),Z.push({event:ue,listeners:Le}),ue.data=je)),T_(Z,e,U,s,q)}Bg(Z,t)})}function El(e,t,s){return{instance:e,listener:t,currentTarget:s}}function rr(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(El(e,c,f)),c=$i(e,t),c!=null&&l.push(El(e,c,f))),e.tag===3)return l;e=e.return}return[]}function j_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ig(e,t,s,l,c){for(var f=t._reactName,b=[];s!==null&&s!==l;){var x=s,w=x.alternate,U=x.stateNode;if(x=x.tag,w!==null&&w===l)break;x!==5&&x!==26&&x!==27||U===null||(w=U,c?(U=$i(s,f),U!=null&&b.unshift(El(s,U,w))):c||(U=$i(s,f),U!=null&&b.push(El(s,U,w)))),s=s.return}b.length!==0&&e.push({event:t,listeners:b})}var N_=/\r\n?/g,w_=/\u0000|\uFFFD/g;function Ug(e){return(typeof e=="string"?e:""+e).replace(N_,`
25
- `).replace(w_,"")}function zg(e,t){return t=Ug(t),Ug(e)===t}function Qe(e,t,s,l,c,f){switch(s){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Fs(e,""+l);break;case"className":fo(e,"class",l);break;case"tabIndex":fo(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":fo(e,s,l);break;case"style":zh(e,l,f);break;case"data":if(t!=="object"){fo(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=po(""+l),e.setAttribute(s,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(s==="formAction"?(t!=="input"&&Qe(e,t,"name",c.name,c,null),Qe(e,t,"formEncType",c.formEncType,c,null),Qe(e,t,"formMethod",c.formMethod,c,null),Qe(e,t,"formTarget",c.formTarget,c,null)):(Qe(e,t,"encType",c.encType,c,null),Qe(e,t,"method",c.method,c,null),Qe(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(s);break}l=po(""+l),e.setAttribute(s,l);break;case"onClick":l!=null&&(e.onclick=na);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(s=l.__html,s!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}s=po(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""+l):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":l===!0?e.setAttribute(s,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(s,l):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(s,l):e.removeAttribute(s);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(s):e.setAttribute(s,l);break;case"popover":ke("beforetoggle",e),ke("toggle",e),uo(e,"popover",l);break;case"xlinkActuate":ta(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ta(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ta(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ta(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ta(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ta(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ta(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ta(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ta(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":uo(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=aS.get(s)||s,uo(e,s,l))}}function ad(e,t,s,l,c,f){switch(s){case"style":zh(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"?Fs(e,l):(typeof l=="number"||typeof l=="bigint")&&Fs(e,""+l);break;case"onScroll":l!=null&&ke("scroll",e);break;case"onScrollEnd":l!=null&&ke("scrollend",e);break;case"onClick":l!=null&&(e.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(c=s.endsWith("Capture"),t=s.slice(2,c?s.length-7:void 0),f=e[Jt]||null,f=f!=null?f[s]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof l=="function")){typeof f!="function"&&f!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,l,c);break e}s in e?e[s]=l:l===!0?e.setAttribute(s,""):uo(e,s,l)}}}function Gt(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",e),ke("load",e);var l=!1,c=!1,f;for(f in s)if(s.hasOwnProperty(f)){var b=s[f];if(b!=null)switch(f){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,f,b,s,null)}}c&&Qe(e,t,"srcSet",s.srcSet,s,null),l&&Qe(e,t,"src",s.src,s,null);return;case"input":ke("invalid",e);var x=f=b=c=null,w=null,U=null;for(l in s)if(s.hasOwnProperty(l)){var q=s[l];if(q!=null)switch(l){case"name":c=q;break;case"type":b=q;break;case"checked":w=q;break;case"defaultChecked":U=q;break;case"value":f=q;break;case"defaultValue":x=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(o(137,t));break;default:Qe(e,t,l,q,s,null)}}Bh(e,f,x,w,U,b,c,!1);return;case"select":ke("invalid",e),l=b=f=null;for(c in s)if(s.hasOwnProperty(c)&&(x=s[c],x!=null))switch(c){case"value":f=x;break;case"defaultValue":b=x;break;case"multiple":l=x;default:Qe(e,t,c,x,s,null)}t=f,s=b,e.multiple=!!l,t!=null?Gs(e,!!l,t,!1):s!=null&&Gs(e,!!l,s,!0);return;case"textarea":ke("invalid",e),f=c=l=null;for(b in s)if(s.hasOwnProperty(b)&&(x=s[b],x!=null))switch(b){case"value":l=x;break;case"defaultValue":c=x;break;case"children":f=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(o(91));break;default:Qe(e,t,b,x,s,null)}Ih(e,l,c,f);return;case"option":for(w in s)if(s.hasOwnProperty(w)&&(l=s[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Qe(e,t,w,l,s,null)}return;case"dialog":ke("beforetoggle",e),ke("toggle",e),ke("cancel",e),ke("close",e);break;case"iframe":case"object":ke("load",e);break;case"video":case"audio":for(l=0;l<Tl.length;l++)ke(Tl[l],e);break;case"image":ke("error",e),ke("load",e);break;case"details":ke("toggle",e);break;case"embed":case"source":case"link":ke("error",e),ke("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(U in s)if(s.hasOwnProperty(U)&&(l=s[U],l!=null))switch(U){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Qe(e,t,U,l,s,null)}return;default:if(yc(t)){for(q in s)s.hasOwnProperty(q)&&(l=s[q],l!==void 0&&ad(e,t,q,l,s,void 0));return}}for(x in s)s.hasOwnProperty(x)&&(l=s[x],l!=null&&Qe(e,t,x,l,s,null))}function D_(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,w=null,U=null,q=null;for(P in s){var Z=s[P];if(s.hasOwnProperty(P)&&Z!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":w=Z;default:l.hasOwnProperty(P)||Qe(e,t,P,null,l,Z)}}for(var z in l){var P=l[z];if(Z=s[z],l.hasOwnProperty(z)&&(P!=null||Z!=null))switch(z){case"type":f=P;break;case"name":c=P;break;case"checked":U=P;break;case"defaultChecked":q=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!==Z&&Qe(e,t,z,P,l,Z)}}mc(e,b,x,w,U,q,f,c);return;case"select":P=b=x=z=null;for(f in s)if(w=s[f],s.hasOwnProperty(f)&&w!=null)switch(f){case"value":break;case"multiple":P=w;default:l.hasOwnProperty(f)||Qe(e,t,f,null,l,w)}for(c in l)if(f=l[c],w=s[c],l.hasOwnProperty(c)&&(f!=null||w!=null))switch(c){case"value":z=f;break;case"defaultValue":x=f;break;case"multiple":b=f;default:f!==w&&Qe(e,t,c,f,l,w)}t=x,s=b,l=P,z!=null?Gs(e,!!s,z,!1):!!l!=!!s&&(t!=null?Gs(e,!!s,t,!0):Gs(e,!!s,s?[]:"",!1));return;case"textarea":P=z=null;for(x in s)if(c=s[x],s.hasOwnProperty(x)&&c!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Qe(e,t,x,null,l,c)}for(b in l)if(c=l[b],f=s[b],l.hasOwnProperty(b)&&(c!=null||f!=null))switch(b){case"value":z=c;break;case"defaultValue":P=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==f&&Qe(e,t,b,c,l,f)}Lh(e,z,P);return;case"option":for(var ie in s)if(z=s[ie],s.hasOwnProperty(ie)&&z!=null&&!l.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:Qe(e,t,ie,null,l,z)}for(w in l)if(z=l[w],P=s[w],l.hasOwnProperty(w)&&z!==P&&(z!=null||P!=null))switch(w){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Qe(e,t,w,z,l,P)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in s)z=s[he],s.hasOwnProperty(he)&&z!=null&&!l.hasOwnProperty(he)&&Qe(e,t,he,null,l,z);for(U in l)if(z=l[U],P=s[U],l.hasOwnProperty(U)&&z!==P&&(z!=null||P!=null))switch(U){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:Qe(e,t,U,z,l,P)}return;default:if(yc(t)){for(var Je in s)z=s[Je],s.hasOwnProperty(Je)&&z!==void 0&&!l.hasOwnProperty(Je)&&ad(e,t,Je,void 0,l,z);for(q in l)z=l[q],P=s[q],!l.hasOwnProperty(q)||z===P||z===void 0&&P===void 0||ad(e,t,q,z,l,P);return}}for(var R in s)z=s[R],s.hasOwnProperty(R)&&z!=null&&!l.hasOwnProperty(R)&&Qe(e,t,R,null,l,z);for(Z in l)z=l[Z],P=s[Z],!l.hasOwnProperty(Z)||z===P||z==null&&P==null||Qe(e,t,Z,z,l,P)}function Vg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k_(){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&&Vg(b)){for(b=0,x=c.responseEnd,l+=1;l<s.length;l++){var w=s[l],U=w.startTime;if(U>x)break;var q=w.transferSize,Z=w.initiatorType;q&&Vg(Z)&&(w=w.responseEnd,b+=q*(w<x?1:(x-U)/(w-U)))}if(--l,t+=8*(f+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var sd=null,id=null;function cr(e){return e.nodeType===9?e:e.ownerDocument}function Hg(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 Pg(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 M_(){var e=window.event;return e&&e.type==="popstate"?e===od?!1:(od=e,!0):(od=null,!1)}var Gg=typeof setTimeout=="function"?setTimeout:void 0,R_=typeof clearTimeout=="function"?clearTimeout:void 0,Fg=typeof Promise=="function"?Promise:void 0,O_=typeof queueMicrotask=="function"?queueMicrotask:typeof Fg<"u"?function(e){return Fg.resolve(null).then(e).catch(B_)}:Gg;function B_(e){setTimeout(function(){throw e})}function qa(e){return e==="head"}function $g(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),_i(t);return}l--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")l++;else if(s==="html")Cl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Cl(s);for(var f=s.firstChild;f;){var b=f.nextSibling,x=f.nodeName;f[Gi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&f.rel.toLowerCase()==="stylesheet"||s.removeChild(f),f=b}}else s==="body"&&Cl(e.ownerDocument.body);s=c}while(s);_i(t)}function qg(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 L_(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[Gi])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=Cn(e.nextSibling),e===null)break}return null}function I_(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Cn(e.nextSibling),e===null))return null;return e}function Yg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Cn(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 U_(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 Cn(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 Kg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Cn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Zg(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 Xg(e,t,s){switch(t=cr(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 Cl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hc(e)}var An=new Map,Qg=new Set;function ur(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var va=F.d;F.d={f:z_,r:V_,D:H_,C:P_,L:G_,m:F_,X:q_,S:$_,M:Y_};function z_(){var e=va.f(),t=tr();return e||t}function V_(e){var t=Vs(e);t!==null&&t.tag===5&&t.type==="form"?pm(t):va.r(e)}var vi=typeof document>"u"?null:document;function Jg(e,t,s){var l=vi;if(l&&typeof t=="string"&&t){var c=vn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof s=="string"&&(c+='[crossorigin="'+s+'"]'),Qg.has(c)||(Qg.add(c),e={rel:e,crossOrigin:s,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Gt(t,"link",e),Bt(t),l.head.appendChild(t)))}}function H_(e){va.D(e),Jg("dns-prefetch",e,null)}function P_(e,t){va.C(e,t),Jg("preconnect",e,t)}function G_(e,t,s){va.L(e,t,s);var l=vi;if(l&&e&&t){var c='link[rel="preload"][as="'+vn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(c+='[imagesrcset="'+vn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(c+='[imagesizes="'+vn(s.imageSizes)+'"]')):c+='[href="'+vn(e)+'"]';var f=c;switch(t){case"style":f=bi(e);break;case"script":f=Si(e)}An.has(f)||(e=y({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),An.set(f,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Al(f))||t==="script"&&l.querySelector(jl(f))||(t=l.createElement("link"),Gt(t,"link",e),Bt(t),l.head.appendChild(t)))}}function F_(e,t){va.m(e,t);var s=vi;if(s&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+vn(l)+'"][href="'+vn(e)+'"]',f=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Si(e)}if(!An.has(f)&&(e=y({rel:"modulepreload",href:e},t),An.set(f,e),s.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(jl(f)))return}l=s.createElement("link"),Gt(l,"link",e),Bt(l),s.head.appendChild(l)}}}function $_(e,t,s){va.S(e,t,s);var l=vi;if(l&&e){var c=Hs(l).hoistableStyles,f=bi(e);t=t||"default";var b=c.get(f);if(!b){var x={loading:0,preload:null};if(b=l.querySelector(Al(f)))x.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},s),(s=An.get(f))&&fd(e,s);var w=b=l.createElement("link");Bt(w),Gt(w,"link",e),w._p=new Promise(function(U,q){w.onload=U,w.onerror=q}),w.addEventListener("load",function(){x.loading|=1}),w.addEventListener("error",function(){x.loading|=2}),x.loading|=4,dr(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:x},c.set(f,b)}}}function q_(e,t){va.X(e,t);var s=vi;if(s&&e){var l=Hs(s).hoistableScripts,c=Si(e),f=l.get(c);f||(f=s.querySelector(jl(c)),f||(e=y({src:e,async:!0},t),(t=An.get(c))&&hd(e,t),f=s.createElement("script"),Bt(f),Gt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Y_(e,t){va.M(e,t);var s=vi;if(s&&e){var l=Hs(s).hoistableScripts,c=Si(e),f=l.get(c);f||(f=s.querySelector(jl(c)),f||(e=y({src:e,async:!0,type:"module"},t),(t=An.get(c))&&hd(e,t),f=s.createElement("script"),Bt(f),Gt(f,"link",e),s.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(c,f))}}function Wg(e,t,s,l){var c=(c=ee.current)?ur(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=bi(s.href),s=Hs(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=bi(s.href);var f=Hs(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(Al(e)))&&!f._p&&(b.instance=f,b.state.loading=5),An.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},An.set(e,s),f||K_(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=Si(s),s=Hs(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 bi(e){return'href="'+vn(e)+'"'}function Al(e){return'link[rel="stylesheet"]['+e+"]"}function ey(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function K_(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}),Gt(t,"link",s),Bt(t),e.head.appendChild(t))}function Si(e){return'[src="'+vn(e)+'"]'}function jl(e){return"script[async]"+e}function ty(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+vn(s.href)+'"]');if(l)return t.instance=l,Bt(l),l;var c=y({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Bt(l),Gt(l,"style",c),dr(l,s.precedence,e),t.instance=l;case"stylesheet":c=bi(s.href);var f=e.querySelector(Al(c));if(f)return t.state.loading|=4,t.instance=f,Bt(f),f;l=ey(s),(c=An.get(c))&&fd(l,c),f=(e.ownerDocument||e).createElement("link"),Bt(f);var b=f;return b._p=new Promise(function(x,w){b.onload=x,b.onerror=w}),Gt(f,"link",l),t.state.loading|=4,dr(f,s.precedence,e),t.instance=f;case"script":return f=Si(s.src),(c=e.querySelector(jl(f)))?(t.instance=c,Bt(c),c):(l=s,(c=An.get(f))&&(l=y({},s),hd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Bt(c),Gt(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,dr(l,s.precedence,e));return t.instance}function dr(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 fr=null;function ny(e,t,s){if(fr===null){var l=new Map,c=fr=new Map;c.set(s,l)}else c=fr,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[Gi]||f[zt]||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 ay(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function Z_(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 sy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function X_(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=bi(l.href),f=t.querySelector(Al(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hr.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=f,Bt(f);return}f=t.ownerDocument||t,l=ey(l),(c=An.get(c))&&fd(l,c),f=f.createElement("link"),Bt(f);var b=f;b._p=new Promise(function(x,w){b.onload=x,b.onerror=w}),Gt(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=hr.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var pd=0;function Q_(e,t){return e.stylesheets&&e.count===0&&mr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var l=setTimeout(function(){if(e.stylesheets&&mr(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&pd===0&&(pd=62500*k_());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mr(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 hr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var pr=null;function mr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pr=new Map,t.forEach(J_,e),pr=null,hr.call(e))}function J_(e,t){if(!(t.state.loading&4)){var s=pr.get(e);if(s)var l=s.get(null);else{s=new Map,pr.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=hr.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Nl={$$typeof:k,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function W_(e,t,s,l,c,f,b,x,w){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=w,this.incompleteTransitions=new Map}function iy(e,t,s,l,c,f,b,x,w,U,q,Z){return e=new W_(e,t,s,b,w,U,q,Z,x),t=1,f===!0&&(t|=24),f=on(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 ly(e){return e?(e=Qs,e):Qs}function oy(e,t,s,l,c,f){c=ly(c),l.context===null?l.context=c:l.pendingContext=c,l=Ba(t),l.payload={element:s},f=f===void 0?null:f,f!==null&&(l.callback=f),s=La(e,l,t),s!==null&&(sn(s,e,t),ll(s,e,t))}function ry(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){ry(e,t),(e=e.alternate)&&ry(e,t)}function cy(e){if(e.tag===13||e.tag===31){var t=hs(e,67108864);t!==null&&sn(t,e,67108864),md(e,67108864)}}function uy(e){if(e.tag===13||e.tag===31){var t=fn();t=uc(t);var s=hs(e,t);s!==null&&sn(s,e,t),md(e,t)}}var gr=!0;function ex(e,t,s,l){var c=B.T;B.T=null;var f=F.p;try{F.p=2,gd(e,t,s,l)}finally{F.p=f,B.T=c}}function tx(e,t,s,l){var c=B.T;B.T=null;var f=F.p;try{F.p=8,gd(e,t,s,l)}finally{F.p=f,B.T=c}}function gd(e,t,s,l){if(gr){var c=yd(l);if(c===null)nd(e,t,l,yr,s),fy(e,l);else if(ax(c,e,t,s,l))l.stopPropagation();else if(fy(e,l),t&4&&-1<nx.indexOf(e)){for(;c!==null;){var f=Vs(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=rs(f.pendingLanes);if(b!==0){var x=f;for(x.pendingLanes|=2,x.entangledLanes|=2;b;){var w=1<<31-Se(b);x.entanglements[1]|=w,b&=~w}$n(f),(Fe&6)===0&&(Wo=J()+500,xl(0))}}break;case 31:case 13:x=hs(f,2),x!==null&&sn(x,f,2),tr(),md(f,2)}if(f=yd(l),f===null&&nd(e,t,l,yr,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 yr=null;function vd(e){if(yr=null,e=zs(e),e!==null){var t=d(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=u(t),e!==null)return e;e=null}else if(s===31){if(e=p(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yr=e,null}function dy(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(se()){case ge:return 2;case pe:return 8;case Ue:case Ce:return 32;case bt:return 268435456;default:return 32}default:return 32}}var bd=!1,Ya=null,Ka=null,Za=null,wl=new Map,Dl=new Map,Xa=[],nx="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 fy(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Za=null;break;case"pointerover":case"pointerout":wl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(t.pointerId)}}function kl(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=Vs(t),t!==null&&cy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function ax(e,t,s,l,c){switch(t){case"focusin":return Ya=kl(Ya,e,t,s,l,c),!0;case"dragenter":return Ka=kl(Ka,e,t,s,l,c),!0;case"mouseover":return Za=kl(Za,e,t,s,l,c),!0;case"pointerover":var f=c.pointerId;return wl.set(f,kl(wl.get(f)||null,e,t,s,l,c)),!0;case"gotpointercapture":return f=c.pointerId,Dl.set(f,kl(Dl.get(f)||null,e,t,s,l,c)),!0}return!1}function hy(e){var t=zs(e.target);if(t!==null){var s=d(t);if(s!==null){if(t=s.tag,t===13){if(t=u(s),t!==null){e.blockedOn=t,jh(e.priority,function(){uy(s)});return}}else if(t===31){if(t=p(s),t!==null){e.blockedOn=t,jh(e.priority,function(){uy(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 vr(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=Vs(s),t!==null&&cy(t),e.blockedOn=s,!1;t.shift()}return!0}function py(e,t,s){vr(e)&&s.delete(t)}function sx(){bd=!1,Ya!==null&&vr(Ya)&&(Ya=null),Ka!==null&&vr(Ka)&&(Ka=null),Za!==null&&vr(Za)&&(Za=null),wl.forEach(py),Dl.forEach(py)}function br(e,t){e.blockedOn===t&&(e.blockedOn=null,bd||(bd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,sx)))}var Sr=null;function my(e){Sr!==e&&(Sr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Sr===e&&(Sr=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=Vs(s);f!==null&&(e.splice(t,3),t-=3,yu(f,{pending:!0,data:c,method:s.method,action:l},l,c))}}))}function _i(e){function t(w){return br(w,e)}Ya!==null&&br(Ya,e),Ka!==null&&br(Ka,e),Za!==null&&br(Za,e),wl.forEach(t),Dl.forEach(t);for(var s=0;s<Xa.length;s++){var l=Xa[s];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Xa.length&&(s=Xa[0],s.blockedOn===null);)hy(s),s.blockedOn===null&&Xa.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(l=0;l<s.length;l+=3){var c=s[l],f=s[l+1],b=c[Jt]||null;if(typeof f=="function")b||my(s);else if(b){var x=null;if(f&&f.hasAttribute("formAction")){if(c=f,b=f[Jt]||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),my(s)}}}function gy(){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}_r.prototype.render=Sd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,l=fn();oy(s,l,e,t,null,null)},_r.prototype.unmount=Sd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;oy(e.current,2,null,e,null,null),tr(),t[Us]=null}};function _r(e){this._internalRoot=e}_r.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ah();e={blockedOn:null,target:e,priority:t};for(var s=0;s<Xa.length&&t!==0&&t<Xa[s].priority;s++);Xa.splice(s,0,e),s===0&&hy(e)}};var yy=a.version;if(yy!=="19.2.4")throw Error(o(527,yy,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var ix={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xr.isDisabled&&xr.supportsFiber)try{St=xr.inject(ix),Oe=xr}catch{}}return Ml.createRoot=function(e,t){if(!r(e))throw Error(o(299));var s=!1,l="",c=Em,f=Cm,b=Am;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=iy(e,1,!1,null,null,s,l,null,c,f,b,gy),e[Us]=t.current,td(e),new Sd(t)},Ml.hydrateRoot=function(e,t,s){if(!r(e))throw Error(o(299));var l=!1,c="",f=Em,b=Cm,x=Am,w=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&&(w=s.formState)),t=iy(e,1,!0,t,s??null,l,c,w,f,b,x,gy),t.context=ly(null),s=t.current,l=fn(),l=uc(l),c=Ba(l),c.callback=null,La(s,c,l),s=l,t.current.lanes=s,Pi(t,s),$n(t),e[Us]=t.current,td(e),new _r(t)},Ml.version="19.2.4",Ml}var Ey;function _x(){if(Ey)return _d.exports;Ey=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=Sx(),_d.exports}var xx=_x();/**
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 Cy="popstate";function Ay(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Tx(n={}){function a(o,r){var g;let d=(g=r.state)==null?void 0:g.masked,{pathname:u,search:p,hash:m}=d||o.location;return Xd("",{pathname:u,search:p,hash:m},r.state&&r.state.usr||null,r.state&&r.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function i(o,r){return typeof r=="string"?r:ql(r)}return Cx(a,i,null,n)}function it(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function wn(n,a){if(!n){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function Ex(){return Math.random().toString(36).substring(2,10)}function jy(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 Xd(n,a,i=null,o,r){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof a=="string"?Bi(a):a,state:i,key:a&&a.key||o||Ex(),unstable_mask:r}}function ql({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 Bi(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 Cx(n,a,i,o={}){let{window:r=document.defaultView,v5Compat:d=!1}=o,u=r.history,p="POP",m=null,g=v();g==null&&(g=0,u.replaceState({...u.state,idx:g},""));function v(){return(u.state||{idx:null}).idx}function y(){p="POP";let N=v(),C=N==null?null:N-g;g=N,m&&m({action:p,location:j.location,delta:C})}function _(N,C){p="PUSH";let A=Ay(N)?N:Xd(j.location,N,C);g=v()+1;let k=jy(A,g),H=j.createHref(A.unstable_mask||A);try{u.pushState(k,"",H)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;r.location.assign(H)}d&&m&&m({action:p,location:j.location,delta:1})}function T(N,C){p="REPLACE";let A=Ay(N)?N:Xd(j.location,N,C);g=v();let k=jy(A,g),H=j.createHref(A.unstable_mask||A);u.replaceState(k,"",H),d&&m&&m({action:p,location:j.location,delta:0})}function E(N){return Ax(N)}let j={get action(){return p},get location(){return n(r,u)},listen(N){if(m)throw new Error("A history only accepts one active listener");return r.addEventListener(Cy,y),m=N,()=>{r.removeEventListener(Cy,y),m=null}},createHref(N){return a(r,N)},createURL:E,encodeLocation(N){let C=E(N);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:_,replace:T,go(N){return u.go(N)}};return j}function Ax(n,a=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),it(i,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:ql(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=i+o),new URL(o,i)}function T0(n,a,i="/"){return jx(n,a,i,!1)}function jx(n,a,i,o){let r=typeof a=="string"?Bi(a):a,d=Ta(r.pathname||"/",i);if(d==null)return null;let u=E0(n);Nx(u);let p=null;for(let m=0;p==null&&m<u.length;++m){let g=A0(d);p=Ix(u[m],g,o)}return p}function E0(n,a=[],i=[],o="",r=!1){let d=(u,p,m=r,g)=>{let v={relativePath:g===void 0?u.path||"":g,caseSensitive:u.caseSensitive===!0,childrenIndex:p,route:u};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(o)&&m)return;it(v.relativePath.startsWith(o),`Absolute route path "${v.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(o.length)}let y=Zn([o,v.relativePath]),_=i.concat(v);u.children&&u.children.length>0&&(it(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),E0(u.children,a,_,y,m)),!(u.path==null&&!u.index)&&a.push({path:y,score:Bx(y,u.index),routesMeta:_})};return n.forEach((u,p)=>{var m;if(u.path===""||!((m=u.path)!=null&&m.includes("?")))d(u,p);else for(let g of C0(u.path))d(u,p,!0,g)}),a}function C0(n){let a=n.split("/");if(a.length===0)return[];let[i,...o]=a,r=i.endsWith("?"),d=i.replace(/\?$/,"");if(o.length===0)return r?[d,""]:[d];let u=C0(o.join("/")),p=[];return p.push(...u.map(m=>m===""?d:[d,m].join("/"))),r&&p.push(...u),p.map(m=>n.startsWith("/")&&m===""?"/":m)}function Nx(n){n.sort((a,i)=>a.score!==i.score?i.score-a.score:Lx(a.routesMeta.map(o=>o.childrenIndex),i.routesMeta.map(o=>o.childrenIndex)))}var wx=/^:[\w-]+$/,Dx=3,kx=2,Mx=1,Rx=10,Ox=-2,Ny=n=>n==="*";function Bx(n,a){let i=n.split("/"),o=i.length;return i.some(Ny)&&(o+=Ox),a&&(o+=kx),i.filter(r=>!Ny(r)).reduce((r,d)=>r+(wx.test(d)?Dx:d===""?Mx:Rx),o)}function Lx(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 Ix(n,a,i=!1){let{routesMeta:o}=n,r={},d="/",u=[];for(let p=0;p<o.length;++p){let m=o[p],g=p===o.length-1,v=d==="/"?a:a.slice(d.length)||"/",y=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},v),_=m.route;if(!y&&g&&i&&!o[o.length-1].route.index&&(y=Yl({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},v)),!y)return null;Object.assign(r,y.params),u.push({params:r,pathname:Zn([d,y.pathname]),pathnameBase:Px(Zn([d,y.pathnameBase])),route:_}),y.pathnameBase!=="/"&&(d=Zn([d,y.pathnameBase]))}return u}function Yl(n,a){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[i,o]=Ux(n.path,n.caseSensitive,n.end),r=a.match(i);if(!r)return null;let d=r[0],u=d.replace(/(.)\/+$/,"$1"),p=r.slice(1);return{params:o.reduce((g,{paramName:v,isOptional:y},_)=>{if(v==="*"){let E=p[_]||"";u=d.slice(0,d.length-E.length).replace(/(.)\/+$/,"$1")}const T=p[_];return y&&!T?g[v]=void 0:g[v]=(T||"").replace(/%2F/g,"/"),g},{}),pathname:d,pathnameBase:u,pattern:n}}function Ux(n,a=!1,i=!0){wn(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,p,m,g,v)=>{if(o.push({paramName:p,isOptional:m!=null}),m){let y=v.charAt(g+u.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,a?void 0:"i"),o]}function A0(n){try{return n.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return wn(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),n}}function Ta(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 zx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Vx(n,a="/"){let{pathname:i,search:o="",hash:r=""}=typeof n=="string"?Bi(n):n,d;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?d=wy(i.substring(1),"/"):d=wy(i,a)):d=a,{pathname:d,search:Gx(o),hash:Fx(r)}}function wy(n,a){let i=a.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?i.length>1&&i.pop():r!=="."&&i.push(r)}),i.length>1?i.join("/"):"/"}function 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 Hx(n){return n.filter((a,i)=>i===0||a.route.path&&a.route.path.length>0)}function wf(n){let a=Hx(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=Bi(n):(r={...n},it(!r.pathname||!r.pathname.includes("?"),Ed("?","pathname","search",r)),it(!r.pathname||!r.pathname.includes("#"),Ed("#","pathname","hash",r)),it(!r.search||!r.search.includes("#"),Ed("#","search","hash",r)));let d=n===""||r.pathname==="",u=d?"/":r.pathname,p;if(u==null)p=i;else{let y=a.length-1;if(!o&&u.startsWith("..")){let _=u.split("/");for(;_[0]==="..";)_.shift(),y-=1;r.pathname=_.join("/")}p=y>=0?a[y]:"/"}let m=Vx(r,p),g=u&&u!=="/"&&u.endsWith("/"),v=(d||u===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var Zn=n=>n.join("/").replace(/\/\/+/g,"/"),Px=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Gx=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Fx=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,$x=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 qx(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Yx(n){return n.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var j0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N0(n,a){let i=n;if(typeof i!="string"||!zx.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let o=i,r=!1;if(j0)try{let d=new URL(window.location.href),u=i.startsWith("//")?new URL(d.protocol+i):new URL(i),p=Ta(u.pathname,a);u.origin===d.origin&&p!=null?i=p+u.search+u.hash:r=!0}catch{wn(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:r,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var w0=["POST","PUT","PATCH","DELETE"];new Set(w0);var Kx=["GET",...w0];new Set(Kx);var Li=S.createContext(null);Li.displayName="DataRouter";var Qr=S.createContext(null);Qr.displayName="DataRouterState";var Zx=S.createContext(!1),D0=S.createContext({isTransitioning:!1});D0.displayName="ViewTransition";var Xx=S.createContext(new Map);Xx.displayName="Fetchers";var Qx=S.createContext(null);Qx.displayName="Await";var gn=S.createContext(null);gn.displayName="Navigation";var to=S.createContext(null);to.displayName="Location";var kn=S.createContext({outlet:null,matches:[],isDataRoute:!1});kn.displayName="Route";var Df=S.createContext(null);Df.displayName="RouteError";var k0="REACT_ROUTER_ERROR",Jx="REDIRECT",Wx="ROUTE_ERROR_RESPONSE";function eT(n){if(n.startsWith(`${k0}:${Jx}:{`))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 tT(n){if(n.startsWith(`${k0}:${Wx}:{`))try{let a=JSON.parse(n.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new $x(a.status,a.statusText,a.data)}catch{}}function nT(n,{relative:a}={}){it(Ls(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:o}=S.useContext(gn),{hash:r,pathname:d,search:u}=no(n,{relative:a}),p=d;return i!=="/"&&(p=d==="/"?i:Zn([i,d])),o.createHref({pathname:p,search:u,hash:r})}function Ls(){return S.useContext(to)!=null}function Qt(){return it(Ls(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(to).location}function Kt(n){it(Ls(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:a}=Qt();return S.useMemo(()=>Yl(n,A0(a)),[a,n])}var M0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function R0(n){S.useContext(gn).static||S.useLayoutEffect(n)}function Jr(){let{isDataRoute:n}=S.useContext(kn);return n?yT():aT()}function aT(){it(Ls(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(Li),{basename:a,navigator:i}=S.useContext(gn),{matches:o}=S.useContext(kn),{pathname:r}=Qt(),d=JSON.stringify(wf(o)),u=S.useRef(!1);return R0(()=>{u.current=!0}),S.useCallback((m,g={})=>{if(wn(u.current,M0),!u.current)return;if(typeof m=="number"){i.go(m);return}let v=Xr(m,JSON.parse(d),r,g.relative==="path");n==null&&a!=="/"&&(v.pathname=v.pathname==="/"?a:Zn([a,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[a,i,d,r,n])}var sT=S.createContext(null);function iT(n){let a=S.useContext(kn).outlet;return S.useMemo(()=>a&&S.createElement(sT.Provider,{value:n},a),[a,n])}function Wr(){let{matches:n}=S.useContext(kn),a=n[n.length-1];return a?a.params:{}}function no(n,{relative:a}={}){let{matches:i}=S.useContext(kn),{pathname:o}=Qt(),r=JSON.stringify(wf(i));return S.useMemo(()=>Xr(n,JSON.parse(r),o,a==="path"),[n,r,o,a])}function lT(n,a){return O0(n,a)}function O0(n,a,i){var N;it(Ls(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(gn),{matches:r}=S.useContext(kn),d=r[r.length-1],u=d?d.params:{},p=d?d.pathname:"/",m=d?d.pathnameBase:"/",g=d&&d.route;{let C=g&&g.path||"";L0(p,!g||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
35
-
36
- Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let v=Qt(),y;if(a){let C=typeof a=="string"?Bi(a):a;it(m==="/"||((N=C.pathname)==null?void 0:N.startsWith(m)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${C.pathname}" was given in the \`location\` prop.`),y=C}else y=v;let _=y.pathname||"/",T=_;if(m!=="/"){let C=m.replace(/^\//,"").split("/");T="/"+_.replace(/^\//,"").split("/").slice(C.length).join("/")}let E=T0(n,{pathname:T});wn(g||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),wn(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let j=dT(E&&E.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:Zn([m,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?m:Zn([m,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),r,i);return a&&j?S.createElement(to.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},j):j}function oT(){let n=gT(),a=qx(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},u=null;return console.error("Error handled by React Router default ErrorBoundary:",n),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},a),i?S.createElement("pre",{style:r},i):null,u)}var rT=S.createElement(oT,null),B0=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=tT(n.digest);i&&(n=i)}let a=n!==void 0?S.createElement(kn.Provider,{value:this.props.routeContext},S.createElement(Df.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(cT,{error:n},a):a}};B0.contextType=Zx;var Cd=new WeakMap;function cT({children:n,error:a}){let{basename:i}=S.useContext(gn);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=eT(a.digest);if(o){let r=Cd.get(a);if(r)throw r;let d=N0(o.location,i);if(j0&&!Cd.get(a))if(d.isExternal||o.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw Cd.set(a,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function uT({routeContext:n,match:a,children:i}){let o=S.useContext(Li);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),S.createElement(kn.Provider,{value:n},i)}function dT(n,a=[],i){let o=i==null?void 0:i.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(a.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let r=n,d=o==null?void 0:o.errors;if(d!=null){let v=r.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);it(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),r=r.slice(0,Math.min(r.length,v+1))}let u=!1,p=-1;if(i&&o){u=o.renderFallback;for(let v=0;v<r.length;v++){let y=r[v];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(p=v),y.route.id){let{loaderData:_,errors:T}=o,E=y.route.loader&&!_.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||E){i.isStatic&&(u=!0),p>=0?r=r.slice(0,p+1):r=[r[0]];break}}}}let m=i==null?void 0:i.onError,g=o&&m?(v,y)=>{var _,T;m(v,{location:o.location,params:((T=(_=o.matches)==null?void 0:_[0])==null?void 0:T.params)??{},unstable_pattern:Yx(o.matches),errorInfo:y})}:void 0;return r.reduceRight((v,y,_)=>{let T,E=!1,j=null,N=null;o&&(T=d&&y.route.id?d[y.route.id]:void 0,j=y.route.errorElement||rT,u&&(p<0&&_===0?(L0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,N=null):p===_&&(E=!0,N=y.route.hydrateFallbackElement||null)));let C=a.concat(r.slice(0,_+1)),A=()=>{let k;return T?k=j:E?k=N:y.route.Component?k=S.createElement(y.route.Component,null):y.route.element?k=y.route.element:k=v,S.createElement(uT,{match:y,routeContext:{outlet:v,matches:C,isDataRoute:o!=null},children:k})};return o&&(y.route.ErrorBoundary||y.route.errorElement||_===0)?S.createElement(B0,{location:o.location,revalidation:o.revalidation,component:j,error:T,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:g}):A()},null)}function kf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fT(n){let a=S.useContext(Li);return it(a,kf(n)),a}function hT(n){let a=S.useContext(Qr);return it(a,kf(n)),a}function pT(n){let a=S.useContext(kn);return it(a,kf(n)),a}function Mf(n){let a=pT(n),i=a.matches[a.matches.length-1];return it(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function mT(){return Mf("useRouteId")}function gT(){var o;let n=S.useContext(Df),a=hT("useRouteError"),i=Mf("useRouteError");return n!==void 0?n:(o=a.errors)==null?void 0:o[i]}function yT(){let{router:n}=fT("useNavigate"),a=Mf("useNavigate"),i=S.useRef(!1);return R0(()=>{i.current=!0}),S.useCallback(async(r,d={})=>{wn(i.current,M0),i.current&&(typeof r=="number"?await n.navigate(r):await n.navigate(r,{fromRouteId:a,...d}))},[n,a])}var Dy={};function L0(n,a,i){!a&&!Dy[n]&&(Dy[n]=!0,wn(!1,i))}S.memo(vT);function vT({routes:n,future:a,state:i,isStatic:o,onError:r}){return O0(n,void 0,{state:i,isStatic:o,onError:r})}function Di({to:n,replace:a,state:i,relative:o}){it(Ls(),"<Navigate> may be used only in the context of a <Router> component.");let{static:r}=S.useContext(gn);wn(!r,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=S.useContext(kn),{pathname:u}=Qt(),p=Jr(),m=Xr(n,wf(d),u,o==="path"),g=JSON.stringify(m);return S.useEffect(()=>{p(JSON.parse(g),{replace:a,state:i,relative:o})},[p,g,o,a,i]),null}function I0(n){return iT(n.context)}function gt(n){it(!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 bT({basename:n="/",children:a=null,location:i,navigationType:o="POP",navigator:r,static:d=!1,unstable_useTransitions:u}){it(!Ls(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let p=n.replace(/^\/*/,"/"),m=S.useMemo(()=>({basename:p,navigator:r,static:d,unstable_useTransitions:u,future:{}}),[p,r,d,u]);typeof i=="string"&&(i=Bi(i));let{pathname:g="/",search:v="",hash:y="",state:_=null,key:T="default",unstable_mask:E}=i,j=S.useMemo(()=>{let N=Ta(g,p);return N==null?null:{location:{pathname:N,search:v,hash:y,state:_,key:T,unstable_mask:E},navigationType:o}},[p,g,v,y,_,T,o,E]);return wn(j!=null,`<Router basename="${p}"> is not able to match the URL "${g}${v}${y}" because it does not start with the basename, so the <Router> won't render anything.`),j==null?null:S.createElement(gn.Provider,{value:m},S.createElement(to.Provider,{children:a,value:j}))}function ST({children:n,location:a}){return lT(Qd(n),a)}function Qd(n,a=[]){let i=[];return S.Children.forEach(n,(o,r)=>{if(!S.isValidElement(o))return;let d=[...a,r];if(o.type===S.Fragment){i.push.apply(i,Qd(o.props.children,d));return}it(o.type===gt,`[${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>`),it(!o.props.index||!o.props.children,"An index route cannot have child routes.");let u={id:o.props.id||d.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(u.children=Qd(o.props.children,d)),i.push(u)}),i}var Mr="get",Rr="application/x-www-form-urlencoded";function ec(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function _T(n){return ec(n)&&n.tagName.toLowerCase()==="button"}function xT(n){return ec(n)&&n.tagName.toLowerCase()==="form"}function TT(n){return ec(n)&&n.tagName.toLowerCase()==="input"}function ET(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function CT(n,a){return n.button===0&&(!a||a==="_self")&&!ET(n)}function Jd(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 AT(n,a){let i=Jd(n);return a&&a.forEach((o,r)=>{i.has(r)||a.getAll(r).forEach(d=>{i.append(r,d)})}),i}var Er=null;function jT(){if(Er===null)try{new FormData(document.createElement("form"),0),Er=!1}catch{Er=!0}return Er}var NT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ad(n){return n!=null&&!NT.has(n)?(wn(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rr}"`),null):n}function wT(n,a){let i,o,r,d,u;if(xT(n)){let p=n.getAttribute("action");o=p?Ta(p,a):null,i=n.getAttribute("method")||Mr,r=Ad(n.getAttribute("enctype"))||Rr,d=new FormData(n)}else if(_T(n)||TT(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?Ta(m,a):null,i=n.getAttribute("formmethod")||p.getAttribute("method")||Mr,r=Ad(n.getAttribute("formenctype"))||Ad(p.getAttribute("enctype"))||Rr,d=new FormData(p,n),!jT()){let{name:g,type:v,value:y}=n;if(v==="image"){let _=g?`${g}.`:"";d.append(`${_}x`,"0"),d.append(`${_}y`,"0")}else g&&d.append(g,y)}}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,u=n}return d&&r==="text/plain"&&(u=d,d=void 0),{action:o,method:i.toLowerCase(),encType:r,formData:d,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rf(n,a){if(n===!1||n===null||typeof n>"u")throw new Error(a)}function DT(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&&Ta(r.pathname,a)==="/"?r.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${o}`,r}async function kT(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 MT(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 RT(n,a,i){let o=await Promise.all(n.map(async r=>{let d=a.routes[r.route.id];if(d){let u=await kT(d,i);return u.links?u.links():[]}return[]}));return IT(o.flat(1).filter(MT).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function ky(n,a,i,o,r,d){let u=(m,g)=>i[g]?m.route.id!==i[g].route.id:!0,p=(m,g)=>{var v;return i[g].pathname!==m.pathname||((v=i[g].route.path)==null?void 0:v.endsWith("*"))&&i[g].params["*"]!==m.params["*"]};return d==="assets"?a.filter((m,g)=>u(m,g)||p(m,g)):d==="data"?a.filter((m,g)=>{var y;let v=o.routes[m.route.id];if(!v||!v.hasLoader)return!1;if(u(m,g)||p(m,g))return!0;if(m.route.shouldRevalidate){let _=m.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((y=i[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function OT(n,a,{includeHydrateFallback:i}={}){return BT(n.map(o=>{let r=a.routes[o.route.id];if(!r)return[];let d=[r.module];return r.clientActionModule&&(d=d.concat(r.clientActionModule)),r.clientLoaderModule&&(d=d.concat(r.clientLoaderModule)),i&&r.hydrateFallbackModule&&(d=d.concat(r.hydrateFallbackModule)),r.imports&&(d=d.concat(r.imports)),d}).flat(1))}function BT(n){return[...new Set(n)]}function LT(n){let a={},i=Object.keys(n).sort();for(let o of i)a[o]=n[o];return a}function IT(n,a){let i=new Set;return new Set(a),n.reduce((o,r)=>{let d=JSON.stringify(LT(r));return i.has(d)||(i.add(d),o.push({key:d,link:r})),o},[])}function U0(){let n=S.useContext(Li);return Rf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function UT(){let n=S.useContext(Qr);return Rf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var Of=S.createContext(void 0);Of.displayName="FrameworkContext";function z0(){let n=S.useContext(Of);return Rf(n,"You must render this element inside a <HydratedRouter> element"),n}function zT(n,a){let i=S.useContext(Of),[o,r]=S.useState(!1),[d,u]=S.useState(!1),{onFocus:p,onBlur:m,onMouseEnter:g,onMouseLeave:v,onTouchStart:y}=a,_=S.useRef(null);S.useEffect(()=>{if(n==="render"&&u(!0),n==="viewport"){let j=C=>{C.forEach(A=>{u(A.isIntersecting)})},N=new IntersectionObserver(j,{threshold:.5});return _.current&&N.observe(_.current),()=>{N.disconnect()}}},[n]),S.useEffect(()=>{if(o){let j=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(j)}}},[o]);let T=()=>{r(!0)},E=()=>{r(!1),u(!1)};return i?n!=="intent"?[d,_,{}]:[d,_,{onFocus:Rl(p,T),onBlur:Rl(m,E),onMouseEnter:Rl(g,T),onMouseLeave:Rl(v,E),onTouchStart:Rl(y,T)}]:[!1,_,{}]}function Rl(n,a){return i=>{n&&n(i),i.defaultPrevented||a(i)}}function VT({page:n,...a}){let{router:i}=U0(),o=S.useMemo(()=>T0(i.routes,n,i.basename),[i.routes,n,i.basename]);return o?S.createElement(PT,{page:n,matches:o,...a}):null}function HT(n){let{manifest:a,routeModules:i}=z0(),[o,r]=S.useState([]);return S.useEffect(()=>{let d=!1;return RT(n,a,i).then(u=>{d||r(u)}),()=>{d=!0}},[n,a,i]),o}function PT({page:n,matches:a,...i}){let o=Qt(),{future:r,manifest:d,routeModules:u}=z0(),{basename:p}=U0(),{loaderData:m,matches:g}=UT(),v=S.useMemo(()=>ky(n,a,g,d,o,"data"),[n,a,g,d,o]),y=S.useMemo(()=>ky(n,a,g,d,o,"assets"),[n,a,g,d,o]),_=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let j=new Set,N=!1;if(a.forEach(A=>{var H;let k=d.routes[A.route.id];!k||!k.hasLoader||(!v.some(O=>O.route.id===A.route.id)&&A.route.id in m&&((H=u[A.route.id])!=null&&H.shouldRevalidate)||k.hasClientLoader?N=!0:j.add(A.route.id))}),j.size===0)return[];let C=DT(n,p,r.unstable_trailingSlashAwareDataRequests,"data");return N&&j.size>0&&C.searchParams.set("_routes",a.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[p,r.unstable_trailingSlashAwareDataRequests,m,o,d,v,a,n,u]),T=S.useMemo(()=>OT(y,d),[y,d]),E=HT(y);return S.createElement(S.Fragment,null,_.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...i})),T.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...i})),E.map(({key:j,link:N})=>S.createElement("link",{key:j,nonce:i.nonce,...N,crossOrigin:N.crossOrigin??i.crossOrigin})))}function GT(...n){return a=>{n.forEach(i=>{typeof i=="function"?i(a):i!=null&&(i.current=a)})}}var FT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{FT&&(window.__reactRouterVersion="7.13.1")}catch{}function $T({basename:n,children:a,unstable_useTransitions:i,window:o}){let r=S.useRef();r.current==null&&(r.current=Tx({window:o,v5Compat:!0}));let d=r.current,[u,p]=S.useState({action:d.action,location:d.location}),m=S.useCallback(g=>{i===!1?p(g):S.startTransition(()=>p(g))},[i]);return S.useLayoutEffect(()=>d.listen(m),[d,m]),S.createElement(bT,{basename:n,children:a,location:u.location,navigationType:u.action,navigator:d,unstable_useTransitions:i})}var V0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Bf=S.forwardRef(function({onClick:a,discover:i="render",prefetch:o="none",relative:r,reloadDocument:d,replace:u,unstable_mask:p,state:m,target:g,to:v,preventScrollReset:y,viewTransition:_,unstable_defaultShouldRevalidate:T,...E},j){let{basename:N,navigator:C,unstable_useTransitions:A}=S.useContext(gn),k=typeof v=="string"&&V0.test(v),H=N0(v,N);v=H.to;let O=nT(v,{relative:r}),$=Qt(),G=null;if(p){let Q=Xr(p,[],$.unstable_mask?$.unstable_mask.pathname:"/",!0);N!=="/"&&(Q.pathname=Q.pathname==="/"?N:Zn([N,Q.pathname])),G=C.createHref(Q)}let[M,V,te]=zT(o,E),ne=ZT(v,{replace:u,unstable_mask:p,state:m,target:g,preventScrollReset:y,relative:r,viewTransition:_,unstable_defaultShouldRevalidate:T,unstable_useTransitions:A});function ae(Q){a&&a(Q),Q.defaultPrevented||ne(Q)}let re=!(H.isExternal||d),Y=S.createElement("a",{...E,...te,href:(re?G:void 0)||H.absoluteURL||O,onClick:re?ae:a,ref:GT(j,V),target:g,"data-discover":!k&&i==="render"?"true":void 0});return M&&!k?S.createElement(S.Fragment,null,Y,S.createElement(VT,{page:O})):Y});Bf.displayName="Link";var qT=S.forwardRef(function({"aria-current":a="page",caseSensitive:i=!1,className:o="",end:r=!1,style:d,to:u,viewTransition:p,children:m,...g},v){let y=no(u,{relative:g.relative}),_=Qt(),T=S.useContext(Qr),{navigator:E,basename:j}=S.useContext(gn),N=T!=null&&eE(y)&&p===!0,C=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,A=_.pathname,k=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;i||(A=A.toLowerCase(),k=k?k.toLowerCase():null,C=C.toLowerCase()),k&&j&&(k=Ta(k,j)||k);const H=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let O=A===C||!r&&A.startsWith(C)&&A.charAt(H)==="/",$=k!=null&&(k===C||!r&&k.startsWith(C)&&k.charAt(C.length)==="/"),G={isActive:O,isPending:$,isTransitioning:N},M=O?a:void 0,V;typeof o=="function"?V=o(G):V=[o,O?"active":null,$?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let te=typeof d=="function"?d(G):d;return S.createElement(Bf,{...g,"aria-current":M,className:V,ref:v,style:te,to:u,viewTransition:p},typeof m=="function"?m(G):m)});qT.displayName="NavLink";var YT=S.forwardRef(({discover:n="render",fetcherKey:a,navigate:i,reloadDocument:o,replace:r,state:d,method:u=Mr,action:p,onSubmit:m,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_,...T},E)=>{let{unstable_useTransitions:j}=S.useContext(gn),N=JT(),C=WT(p,{relative:g}),A=u.toLowerCase()==="get"?"get":"post",k=typeof p=="string"&&V0.test(p),H=O=>{if(m&&m(O),O.defaultPrevented)return;O.preventDefault();let $=O.nativeEvent.submitter,G=($==null?void 0:$.getAttribute("formmethod"))||u,M=()=>N($||O.currentTarget,{fetcherKey:a,method:G,navigate:i,replace:r,state:d,relative:g,preventScrollReset:v,viewTransition:y,unstable_defaultShouldRevalidate:_});j&&i!==!1?S.startTransition(()=>M()):M()};return S.createElement("form",{ref:E,method:A,action:C,onSubmit:o?m:H,...T,"data-discover":!k&&n==="render"?"true":void 0})});YT.displayName="Form";function KT(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function H0(n){let a=S.useContext(Li);return it(a,KT(n)),a}function ZT(n,{target:a,replace:i,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m,unstable_useTransitions:g}={}){let v=Jr(),y=Qt(),_=no(n,{relative:u});return S.useCallback(T=>{if(CT(T,a)){T.preventDefault();let E=i!==void 0?i:ql(y)===ql(_),j=()=>v(n,{replace:E,unstable_mask:o,state:r,preventScrollReset:d,relative:u,viewTransition:p,unstable_defaultShouldRevalidate:m});g?S.startTransition(()=>j()):j()}},[y,v,_,i,o,r,a,n,d,u,p,m,g])}function Lf(n){wn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let a=S.useRef(Jd(n)),i=S.useRef(!1),o=Qt(),r=S.useMemo(()=>AT(o.search,i.current?null:a.current),[o.search]),d=Jr(),u=S.useCallback((p,m)=>{const g=Jd(typeof p=="function"?p(new URLSearchParams(r)):p);i.current=!0,d("?"+g,m)},[d,r]);return[r,u]}var XT=0,QT=()=>`__${String(++XT)}__`;function JT(){let{router:n}=H0("useSubmit"),{basename:a}=S.useContext(gn),i=mT(),o=n.fetch,r=n.navigate;return S.useCallback(async(d,u={})=>{let{action:p,method:m,encType:g,formData:v,body:y}=wT(d,a);if(u.navigate===!1){let _=u.fetcherKey||QT();await o(_,i,u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||g,flushSync:u.flushSync})}else await r(u.action||p,{unstable_defaultShouldRevalidate:u.unstable_defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:v,body:y,formMethod:u.method||m,formEncType:u.encType||g,replace:u.replace,state:u.state,fromRouteId:i,flushSync:u.flushSync,viewTransition:u.viewTransition})},[o,r,a,i])}function WT(n,{relative:a}={}){let{basename:i}=S.useContext(gn),o=S.useContext(kn);it(o,"useFormAction must be used inside a RouteContext");let[r]=o.matches.slice(-1),d={...no(n||".",{relative:a})},u=Qt();if(n==null){d.search=u.search;let p=new URLSearchParams(d.search),m=p.getAll("index");if(m.some(v=>v==="")){p.delete("index"),m.filter(y=>y).forEach(y=>p.append("index",y));let v=p.toString();d.search=v?`?${v}`:""}}return(!n||n===".")&&r.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(d.pathname=d.pathname==="/"?i:Zn([i,d.pathname])),ql(d)}function eE(n,{relative:a}={}){let i=S.useContext(D0);it(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=H0("useViewTransitionState"),r=no(n,{relative:a});if(!i.isTransitioning)return!1;let d=Ta(i.currentLocation.pathname,o)||i.currentLocation.pathname,u=Ta(i.nextLocation.pathname,o)||i.nextLocation.pathname;return Yl(r.pathname,u)!=null||Yl(r.pathname,d)!=null}function Mn(){const n=Jr();return S.useCallback((a,i)=>{typeof a=="number"?n(a):n(a,i)},[n])}function P0(n){return`/sessions/${encodeURIComponent(n)}`}function Kl(n){return`/projects/${encodeURIComponent(n)}`}function ns(n,a){const i=`/tasks/${encodeURIComponent(n)}`;return a?`${i}/${a}`:i}function tE(n){return`/tasks/${encodeURIComponent(n)}/edit`}function Os(n,a){const i=new URLSearchParams({project:n});return a&&i.set("parent",a),`/tasks/new?${i.toString()}`}function G0(n){return`/sessions/new?${new URLSearchParams({env:n}).toString()}`}const My="/environments/new",ki="/settings",nE="/pair";function Dn(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function Zl(n,a){return console.warn(`[ws] Malformed "${n}" message: ${a}`),!1}function aE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.displayName=="string"&&typeof n.adapterType=="string"&&typeof n.status=="string"&&typeof n.bootstrapped=="boolean"}function Ry(n){return Dn(n)&&typeof n.id=="string"&&typeof n.environmentId=="string"&&typeof n.runtime=="string"&&typeof n.status=="string"&&typeof n.prompt=="string"&&typeof n.startedAt=="string"&&(n.endedAt===void 0||typeof n.endedAt=="string")&&(n.error===void 0||typeof n.error=="string")}function Oy(n){return Dn(n)&&typeof n.sessionId=="string"&&typeof n.eventType=="string"&&typeof n.timestamp=="string"&&typeof n.content=="string"&&(n.raw===void 0||typeof n.raw=="string")}function sE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.repoUrl=="string"&&typeof n.defaultEnvironmentId=="string"&&typeof n.status=="string"&&typeof n.worktreeBasePath=="string"&&typeof n.useWorktrees=="boolean"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function iE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.projectId=="string"&&typeof n.title=="string"&&typeof n.status=="string"&&typeof n.branch=="string"&&typeof n.sortOrder=="number"&&typeof n.depth=="number"&&(n.defaultPersonaId===void 0||typeof n.defaultPersonaId=="string")&&Array.isArray(n.dependsOn)&&Array.isArray(n.childTaskIds)}function lE(n){return Dn(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 oE(n){return Dn(n)&&typeof n.name=="string"&&typeof n.tokenType=="string"&&typeof n.envVar=="string"&&typeof n.filePath=="string"&&typeof n.expiresAt=="string"}const rE=new Set(["off","subscription","api_key"]),jd=new Set(["off","on"]);function By(n){return Dn(n)&&rE.has(n.claude)&&jd.has(n.github)&&jd.has(n.copilot)&&jd.has(n.codex)}function cE(n){return Dn(n)&&typeof n.name=="string"&&typeof n.repository=="string"&&typeof n.state=="string"&&typeof n.gitStatus=="string"}function uE(n){return Dn(n)&&typeof n.id=="string"&&typeof n.name=="string"&&typeof n.description=="string"&&typeof n.systemPrompt=="string"&&typeof n.toolConfig=="string"&&typeof n.runtime=="string"&&typeof n.model=="string"&&typeof n.maxTurns=="number"&&typeof n.mcpServers=="string"&&typeof n.createdAt=="string"&&typeof n.updatedAt=="string"}function Xn(n,a,i,o){return Array.isArray(n)?n.filter((r,d)=>a(r)?!0:(Zl(i,`item at index ${d} in "${o}" has unexpected shape`),!1)):(Zl(i,`expected "${o}" to be an array, got ${typeof n}`),[])}function dE(n){let a;try{a=JSON.parse(n)}catch{console.warn("[ws] Failed to parse WebSocket message as JSON");return}if(!Dn(a)||typeof a.type!="string"){console.warn("[ws] Received WebSocket message without a string 'type' field:",a);return}const i={type:a.type,payload:Dn(a.payload)?a.payload:void 0};return typeof a.id=="string"&&(i.id=a.id),typeof a.timestamp=="string"&&(i.timestamp=a.timestamp),i}function fE(n){switch(n){case"waiting_input":return"idle";case"killed":return"interrupted";default:return n}}const hE=3e3,xi=5e3,pE=4001;function mE(n,a){const i=typeof window<"u"?`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`:"ws://localhost:3000",o=S.useRef(void 0),[r,d]=S.useState(!1),u=S.useRef(a.onMessage);u.current=a.onMessage;const p=S.useRef(a.onConnect);p.current=a.onConnect;const m=S.useRef(a.onDisconnect);m.current=a.onDisconnect;const g=S.useCallback(v=>{var y;((y=o.current)==null?void 0:y.readyState)===WebSocket.OPEN&&o.current.send(JSON.stringify(v))},[]);return S.useEffect(()=>{let v,y;function _(){v=new WebSocket(i),o.current=v,v.onopen=()=>{d(!0),p.current(g)},v.onmessage=T=>{if(typeof T.data!="string"){console.warn("[ws] Received non-string WebSocket message; ignoring");return}const E=dE(T.data);E&&u.current(E)},v.onclose=T=>{var E;if(d(!1),o.current=void 0,(E=m.current)==null||E.call(m),clearTimeout(y),T.code===pE){window.location.href=nE;return}y=setTimeout(_,hE)},v.onerror=()=>{v.close()}}return _(),()=>{clearTimeout(y),v==null||v.close()}},[i,g]),{connected:r,send:g}}const gE=5e3;function yE(n){const[a,i]=S.useState([]),[o,r]=S.useState({}),d=S.useCallback(y=>{switch(y.type){case"environment.added":return!0;case"environment.removed":{const _=y.payload.environmentId;return _&&(i(T=>T.filter(E=>E.id!==_)),r(T=>{const E={...T};return delete E[_],E})),n({type:"list_sessions"}),!0}case"environment.changed":return n({type:"list_environments"}),!0;case"environment.provision_progress":{const _=y.payload;if(typeof _.environmentId!="string"||typeof _.stage!="string"||typeof _.message!="string"||typeof _.progress!="number")return Zl("environment.provision_progress","invalid payload"),!0;if(r(T=>({...T,[_.environmentId]:{stage:_.stage,message:_.message,progress:_.progress}})),_.stage==="ready"){const T=_.environmentId;setTimeout(()=>{r(E=>{const j={...E};return delete j[T],j})},gE)}return!0}default:return!1}},[n]),u=S.useCallback(y=>{var _;switch(y.type){case"environments":return i(Xn((_=y.payload)==null?void 0:_.environments,aE,"environments","environments")),!0;default:return!1}},[]),p=S.useCallback((y,_,T)=>{n({type:"add_environment",payload:{displayName:y,adapterType:_,adapterConfig:T||{}}})},[n]),m=S.useCallback(y=>{n({type:"provision_environment",payload:{environmentId:y}})},[n]),g=S.useCallback(y=>{n({type:"stop_environment",payload:{environmentId:y}})},[n]),v=S.useCallback(y=>{n({type:"remove_environment",payload:{environmentId:y}})},[n]);return{environments:a,provisionStatus:o,addEnvironment:p,provisionEnvironment:m,stopEnvironment:g,removeEnvironment:v,handleMessage:u,handleEvent:d}}const Nd=new Set(["pending","running","idle"]),vE=new Set(["completed","failed","interrupted"]),Ly=["pending","running","idle"];function bE(n){const[a,i]=S.useState([]),[o,r]=S.useState([]),[d,u]=S.useState(0),[p,m]=S.useState(void 0),[g,v]=S.useState({}),y=S.useCallback(A=>{var k,H,O,$,G;switch(A.type){case"sessions":return i(M=>{var ne;const V=Xn((ne=A.payload)==null?void 0:ne.sessions,Ry,"sessions","sessions"),te=new Map(M.map(ae=>[ae.id,ae.status]));return V.map(ae=>{const re=te.get(ae.id);return!re||re===ae.status?ae:vE.has(re)&&Nd.has(ae.status)?{...ae,status:re}:Nd.has(re)&&Nd.has(ae.status)&&Ly.indexOf(re)>Ly.indexOf(ae.status)?{...ae,status:re}:ae})}),!0;case"session_event":{if(!Oy(A.payload))return Zl("session_event","payload is not a valid SessionEvent"),!0;const M=A.payload;let V=0;if(r(te=>{const ne=[...te,M];return ne.length>xi?(V=ne.length-xi,ne.slice(-xi)):ne}),V>0&&u(te=>te+V),M.eventType==="status"){const te=fE(M.content);i(ne=>ne.some(re=>re.id===M.sessionId)?ne.map(re=>re.id===M.sessionId?{...re,status:te}:re):[...ne,{id:M.sessionId,environmentId:"",runtime:"",status:te,prompt:"",startedAt:M.timestamp}])}return!0}case"session_events":{const M=Xn((k=A.payload)==null?void 0:k.events,Oy,"session_events","events"),V=(H=A.payload)==null?void 0:H.sessionId;if(typeof V!="string")return Zl("session_events","missing or non-string sessionId"),!0;if(M.length>0){let te=0;r(ne=>{const ae=new Set;for(const Q of ne)Q.sessionId===V&&ae.add(`${Q.timestamp}|${Q.eventType}`);const re=M.filter(Q=>!ae.has(`${Q.timestamp}|${Q.eventType}`)),Y=[...ne,...re].sort((Q,B)=>Q.sessionId!==B.sessionId?0:Q.timestamp.localeCompare(B.timestamp));return Y.length>xi?(te=Y.length-xi,Y.slice(-xi)):Y}),te>0&&u(ne=>ne+te)}return!0}case"spawned":{const M=(O=A.payload)==null?void 0:O.sessionId;return typeof M=="string"&&M&&m(M),n({type:"list_sessions"}),!0}case"task_sessions":{const M=($=A.payload)==null?void 0:$.taskId;if(typeof M!="string"||!M)return!0;const V=Xn((G=A.payload)==null?void 0:G.sessions,Ry,"task_sessions","sessions");return v(te=>({...te,[M]:V})),!0}default:return!1}},[n]),_=S.useCallback((A,k,H,O)=>{n({type:"spawn",payload:{environmentId:A,prompt:k,personaId:H||"",worktreeBasePath:O||""}})},[n]),T=S.useCallback((A,k)=>{n({type:"send_input",payload:{sessionId:A,text:k}})},[n]),E=S.useCallback(A=>{n({type:"kill",payload:{sessionId:A}})},[n]),j=S.useCallback(A=>{n({type:"get_session_events",payload:{sessionId:A}})},[n]),N=S.useCallback(()=>{r([]),u(0)},[]),C=S.useCallback(A=>{n({type:"get_task_sessions",payload:{taskId:A}})},[n]);return{sessions:a,events:o,eventsDropped:d,lastSpawnedId:p,taskSessions:g,spawn:_,sendInput:T,kill:E,loadSessionEvents:j,clearEvents:N,loadTaskSessions:C,handleMessage:y}}function SE(n){const[a,i]=S.useState([]),[o,r]=S.useState(!1),d=S.useCallback(y=>{switch(y.type){case"project.created":return r(!1),n({type:"list_projects"}),!0;case"project.archived":case"project.updated":return n({type:"list_projects"}),!0;default:return!1}},[n]),u=S.useCallback(y=>{var _;switch(y.type){case"projects":return i(Xn((_=y.payload)==null?void 0:_.projects,sE,"projects","projects")),!0;default:return!1}},[]),p=S.useCallback(()=>{r(!1)},[]),m=S.useCallback((y,_,T,E,j)=>{r(!0),n({type:"create_project",payload:{name:y,description:_||"",repoUrl:T||"",defaultEnvironmentId:E||"",defaultPersonaId:j||""}})},[n]),g=S.useCallback(y=>{n({type:"archive_project",payload:{projectId:y}})},[n]),v=S.useCallback((y,_)=>{n({type:"update_project",payload:{projectId:y,..._}})},[n]);return{projects:a,projectCreating:o,createProject:m,archiveProject:g,updateProject:v,handleMessage:u,handleEvent:d,onDisconnect:p}}const _E=15e3;function xE(n){const[a,i]=S.useState([]),[o,r]=S.useState(void 0),d=S.useRef(new Map),u=S.useCallback(N=>{const C=N.payload;switch(N.type){case"task.created":{const A=typeof C.requestId=="string"?C.requestId:"";if(A){const H=d.current.get(A);H&&(clearTimeout(H.timer),d.current.delete(A),H.onSuccess())}const k=typeof C.projectId=="string"?C.projectId:"";return k&&n({type:"list_tasks",payload:{projectId:k}}),!0}case"task.started":{const A=typeof C.taskId=="string"?C.taskId:"",k=typeof C.sessionId=="string"?C.sessionId:"",H=typeof C.projectId=="string"?C.projectId:"";return r(O=>A&&O===A?void 0:O),k&&(n({type:"list_sessions"}),A&&i(O=>O.map($=>$.id===A?{...$,latestSessionId:k}:$))),H?n({type:"list_tasks",payload:{projectId:H}}):A&&i(O=>{const $=O.find(G=>G.id===A);return $&&n({type:"list_tasks",payload:{projectId:$.projectId}}),O}),!0}case"task.completed":case"task.deleted":case"task.updated":{const A=typeof C.projectId=="string"?C.projectId:"",k=typeof C.taskId=="string"?C.taskId:"";return A?n({type:"list_tasks",payload:{projectId:A}}):k&&i(H=>{const O=H.find($=>$.id===k);return O&&n({type:"list_tasks",payload:{projectId:O.projectId}}),H}),!0}default:return!1}},[n]),p=S.useCallback(N=>{var C,A,k,H;switch(N.type){case"tasks":{const O=Xn((C=N.payload)==null?void 0:C.tasks,iE,"tasks","tasks"),$=(typeof((A=N.payload)==null?void 0:A.projectId)=="string"?N.payload.projectId:"")||(O.length>0?O[0].projectId:"");return $?(i(G=>[...G.filter(M=>M.projectId!==$),...O]),!0):(i(O),!0)}case"create_task_error":{const O=typeof((k=N.payload)==null?void 0:k.requestId)=="string"?N.payload.requestId:"",$=typeof((H=N.payload)==null?void 0:H.message)=="string"?N.payload.message:"Failed to create task";if(O){const G=d.current.get(O);G?(clearTimeout(G.timer),d.current.delete(O),G.onError($)):console.error("[useTasks] create_task_error with unknown requestId:",$)}else console.error("[useTasks] create_task_error:",$);return!0}default:return!1}},[]),m=S.useCallback(()=>{r(void 0);for(const[,N]of d.current)clearTimeout(N.timer),N.onError("Disconnected");d.current.clear()},[]),g=S.useCallback(N=>{n({type:"list_tasks",payload:{projectId:N}})},[n]),v=S.useCallback((N,C,A,k,H,O,$,G)=>{const M={projectId:N,title:C,description:A||"",dependsOn:k||[],parentTaskId:H||"",defaultPersonaId:O||""};if($||G){const V=crypto.randomUUID();M.requestId=V;const te=G??(()=>{}),ne=setTimeout(()=>{d.current.delete(V)&&te("Request timed out")},_E);d.current.set(V,{onSuccess:$??(()=>{}),onError:te,timer:ne})}n({type:"create_task",payload:M})},[n]),y=S.useCallback((N,C,A,k)=>{r(N),n({type:"start_task",payload:{taskId:N,personaId:C||"",environmentId:A||"",notes:k||""}})},[n]),_=S.useCallback(N=>{n({type:"complete_task",payload:{taskId:N}})},[n]),T=S.useCallback(N=>{n({type:"resume_task",payload:{taskId:N}})},[n]),E=S.useCallback((N,C,A,k,H)=>{const O={taskId:N,title:C,description:A,dependsOn:k};H!==void 0&&(O.defaultPersonaId=H),n({type:"update_task",payload:O})},[n]),j=S.useCallback(N=>{n({type:"delete_task",payload:{taskId:N}})},[n]);return{tasks:a,taskStartingId:o,loadTasks:g,createTask:v,startTask:y,completeTask:_,resumeTask:T,updateTask:E,deleteTask:j,handleMessage:p,handleEvent:u,onDisconnect:m}}function TE(n){const[a,i]=S.useState([]),o=S.useCallback(p=>{if(p.type==="finding.posted"){const m=typeof p.payload.projectId=="string"?p.payload.projectId:"";return m&&n({type:"list_findings",payload:{projectId:m}}),!0}return!1},[n]),r=S.useCallback(p=>{var m;switch(p.type){case"findings":return i(Xn((m=p.payload)==null?void 0:m.findings,lE,"findings","findings")),!0;default:return!1}},[]),d=S.useCallback(p=>{n({type:"list_findings",payload:{projectId:p}})},[n]),u=S.useCallback((p,m,g,v,y)=>{n({type:"post_finding",payload:{projectId:p,title:m,content:g,category:v||"general",tags:y||[]}})},[n]);return{findings:a,loadFindings:d,postFinding:u,handleMessage:r,handleEvent:o}}function EE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>m.type==="token.changed"?(n({type:"list_tokens"}),!0):!1,[n]),r=S.useCallback(m=>{var g;switch(m.type){case"tokens":return i(Xn((g=m.payload)==null?void 0:g.tokens,oE,"tokens","tokens")),!0;default:return!1}},[]),d=S.useCallback(()=>{n({type:"list_tokens"})},[n]),u=S.useCallback((m,g,v,y,_)=>{n({type:"set_token",payload:{name:m,value:g,tokenType:v,envVar:y,filePath:_}})},[n]),p=S.useCallback(m=>{n({type:"delete_token",payload:{name:m}})},[n]);return{tokens:a,loadTokens:d,setToken:u,deleteToken:p,handleMessage:r,handleEvent:o}}function CE(n){const[a,i]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),o=S.useCallback(u=>u.type==="credential.providers_changed"?(By(u.payload)&&i(u.payload),!0):!1,[]),r=S.useCallback(u=>{switch(u.type){case"credential_providers":return By(u.payload)&&i(u.payload),!0;default:return!1}},[]),d=S.useCallback(u=>{n({type:"set_credential_providers",payload:u})},[n]);return{credentialProviders:a,updateCredentialProviders:d,handleMessage:r,handleEvent:o}}function AE(n,a){const[i,o]=S.useState([]),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState(!1),v=S.useCallback(T=>{var E,j,N;switch(T.type){case"codespaces_list":{const C=Xn((E=T.payload)==null?void 0:E.codespaces,cE,"codespaces_list","codespaces"),A=typeof((j=T.payload)==null?void 0:j.error)=="string"?T.payload.error:"";return o(C),p(A),!0}case"codespace_created":return g(!1),n({type:"list_codespaces"}),!0;case"codespace_create_error":{g(!1);const C=typeof((N=T.payload)==null?void 0:N.message)=="string"?T.payload.message:"Failed to create codespace";return d(C),!0}default:return!1}},[n]),y=S.useCallback(()=>{n({type:"list_codespaces"})},[n]),_=S.useCallback((T,E)=>{if(!a){d("Not connected to server. Please try again once the connection is restored.");return}g(!0),d("");const j={repo:T};E&&(j.machine=E),n({type:"create_codespace",payload:j})},[n,a]);return{codespaces:i,codespaceError:r,codespaceListError:u,codespaceCreating:m,listCodespaces:y,createCodespace:_,handleMessage:v}}function jE(n){const[a,i]=S.useState([]),o=S.useCallback(m=>{switch(m.type){case"persona.created":case"persona.updated":case"persona.deleted":return n({type:"list_personas"}),!0;default:return!1}},[n]),r=S.useCallback(m=>{var g;switch(m.type){case"personas":{const v=Xn((g=m.payload)==null?void 0:g.personas,uE,"personas","personas");return i(v),!0}default:return!1}},[]),d=S.useCallback((m,g,v,y,_,T)=>{n({type:"create_persona",payload:{name:m,description:g,systemPrompt:v,runtime:y||"",model:_||"",maxTurns:T||0}})},[n]),u=S.useCallback((m,g,v,y,_,T,E)=>{const j={personaId:m};g!==void 0&&(j.name=g),v!==void 0&&(j.description=v),y!==void 0&&(j.systemPrompt=y),_!==void 0&&(j.runtime=_),T!==void 0&&(j.model=T),E!==void 0&&(j.maxTurns=E),n({type:"update_persona",payload:j})},[n]),p=S.useCallback(m=>{n({type:"delete_persona",payload:{personaId:m}})},[n]);return{personas:a,createPersona:d,updatePersona:u,deletePersona:p,handleMessage:r,handleEvent:o}}function NE(n){const[a,i]=S.useState(""),[o,r]=S.useState(!0),{connected:d,send:u}=mE(n,{onMessage:O,onConnect:$,onDisconnect:G}),p=yE(u),m=bE(u),g=SE(u),v=xE(u),y=TE(u),_=EE(u),T=CE(u),E=AE(u,d),j=jE(u),N="default_persona_id",C="onboarding_completed",A=S.useCallback(V=>{i(V),u({type:"set_setting",payload:{key:N,value:V}})},[u]),k=S.useCallback(()=>{r(!0),u({type:"set_setting",payload:{key:C,value:"true"}})},[u]);function H(V){const te=V.payload.key,ne=V.payload.value;if(V.type==="setting.changed"){te===N&&i(ne??""),te===C&&r(ne==="true");return}p.handleEvent(V)||g.handleEvent(V)||v.handleEvent(V)||y.handleEvent(V)||_.handleEvent(V)||T.handleEvent(V)||j.handleEvent(V)}function O(V){var te,ne,ae;if(typeof V.type=="string"&&V.type.includes(".")){const re=V,Y={id:re.id??"",type:V.type,timestamp:re.timestamp??"",payload:V.payload??{}};H(Y);return}if(V.type==="setting"){const re=(te=V.payload)==null?void 0:te.key,Y=(ne=V.payload)==null?void 0:ne.value;re===N&&i(Y??""),re===C&&r(Y==="true");return}if(!p.handleMessage(V)&&!m.handleMessage(V)&&!g.handleMessage(V)&&!v.handleMessage(V)&&!y.handleMessage(V)&&!_.handleMessage(V)&&!T.handleMessage(V)&&!E.handleMessage(V)&&!j.handleMessage(V)&&V.type==="error"){console.error("[ws]",(ae=V.payload)==null?void 0:ae.message);return}}function $(V){V({type:"list_environments"}),V({type:"list_sessions"}),V({type:"list_projects"}),V({type:"list_tokens"}),V({type:"get_credential_providers"}),V({type:"list_personas"}),V({type:"get_setting",payload:{key:N}}),V({type:"get_setting",payload:{key:C}}),V({type:"subscribe_all"})}function G(){g.onDisconnect(),v.onDisconnect()}const M=S.useCallback(()=>{u({type:"list_environments"}),u({type:"list_sessions"}),u({type:"list_projects"}),u({type:"list_tokens"})},[u]);return{connected:d,environments:p.environments,sessions:m.sessions,events:m.events,eventsDropped:m.eventsDropped,lastSpawnedId:m.lastSpawnedId,projects:g.projects,tasks:v.tasks,findings:y.findings,tokens:_.tokens,spawn:m.spawn,sendInput:m.sendInput,kill:m.kill,refresh:M,loadSessionEvents:m.loadSessionEvents,clearEvents:m.clearEvents,createProject:g.createProject,archiveProject:g.archiveProject,updateProject:g.updateProject,loadTasks:v.loadTasks,createTask:v.createTask,startTask:v.startTask,completeTask:v.completeTask,resumeTask:v.resumeTask,updateTask:v.updateTask,deleteTask:v.deleteTask,loadFindings:y.loadFindings,postFinding:y.postFinding,addEnvironment:p.addEnvironment,loadTokens:_.loadTokens,setToken:_.setToken,deleteToken:_.deleteToken,credentialProviders:T.credentialProviders,updateCredentialProviders:T.updateCredentialProviders,provisionStatus:p.provisionStatus,provisionEnvironment:p.provisionEnvironment,stopEnvironment:p.stopEnvironment,removeEnvironment:p.removeEnvironment,codespaces:E.codespaces,codespaceError:E.codespaceError,codespaceListError:E.codespaceListError,codespaceCreating:E.codespaceCreating,listCodespaces:E.listCodespaces,createCodespace:E.createCodespace,projectCreating:g.projectCreating,taskStartingId:v.taskStartingId,personas:j.personas,createPersona:j.createPersona,updatePersona:j.updatePersona,deletePersona:j.deletePersona,taskSessions:m.taskSessions,loadTaskSessions:m.loadTaskSessions,appDefaultPersonaId:a,setAppDefaultPersonaId:A,onboardingCompleted:o,completeOnboarding:k}}const If=S.createContext(void 0);function wE({children:n}){const a=NE();return h.jsx(If.Provider,{value:a,children:n})}function It(){const n=S.useContext(If);if(!n)throw new Error("useGrackle must be used within GrackleProvider");return n}const DE=[{id:"env-local-01",displayName:"Local Dev",adapterType:"local",status:"connected",bootstrapped:!0},{id:"env-docker-01",displayName:"Docker Sandbox",adapterType:"docker",status:"connected",bootstrapped:!0},{id:"env-cs-01",displayName:"GitHub Codespace",adapterType:"codespace",status:"connected",bootstrapped:!0},{id:"env-remote-01",displayName:"Staging (SSH)",adapterType:"ssh",status:"disconnected",bootstrapped:!1}],kE=[{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"}],ME=[{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"}],RE=[{id:"proj-alpha",name:"Project Alpha",description:"Core platform API and authentication services",repoUrl:"https://github.com/acme/alpha",defaultEnvironmentId:"env-local-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-01-15T10:00:00Z",updatedAt:"2026-01-15T10:00:00Z"},{id:"proj-beta",name:"Data Pipeline",description:"ETL pipelines for analytics and reporting",repoUrl:"https://github.com/acme/data-pipeline",defaultEnvironmentId:"env-docker-01",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2026-02-01T14:30:00Z",updatedAt:"2026-02-01T14:30:00Z"},{id:"proj-gamma",name:"Mobile App",description:"React Native cross-platform mobile application",repoUrl:"",defaultEnvironmentId:"env-local-01",status:"archived",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:"",createdAt:"2025-11-20T09:00:00Z",updatedAt:"2025-11-20T09:00:00Z"}],OE=[{id:"task-001",projectId:"proj-alpha",title:"Implement JWT authentication",description:"Replace session-based auth with JWT tokens across all protected routes",status:"working",branch:"feat/jwt-auth",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-001a","task-001b","task-001c"],canDecompose:!0,defaultPersonaId:""},{id:"task-001a",projectId:"proj-alpha",title:"Design token schema",description:"Define JWT payload structure, expiry, and refresh token strategy",status:"complete",branch:"feat/jwt-auth/design-token-schema",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-25T10:10:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001b",projectId:"proj-alpha",title:"Implement auth middleware",description:"Build Express middleware that verifies JWT Bearer tokens",status:"working",branch:"feat/jwt-auth/implement-auth-middleware",latestSessionId:"sess-001",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:15:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-001c",projectId:"proj-alpha",title:"Write auth integration tests",description:"End-to-end tests for login flow, token refresh, and protected route access",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-25T10:20:00Z",parentTaskId:"task-001",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-002",projectId:"proj-alpha",title:"Add rate limiting",description:"Implement token-bucket rate limiting for public API endpoints",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-001"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-25T10:05:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-003",projectId:"proj-alpha",title:"Set up OpenAPI documentation",description:"Generate Swagger docs from route decorators and serve at /api/docs",status:"paused",branch:"feat/openapi-docs",latestSessionId:"sess-002",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-24T16:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-004",projectId:"proj-alpha",title:"Database connection pooling",description:"Switch from single connection to a connection pool with health checks",status:"complete",branch:"feat/db-pool",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-23T11:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-005",projectId:"proj-alpha",title:"Fix N+1 query in user list",description:"Use a JOIN instead of per-row lookups in GET /api/users",status:"not_started",branch:"fix/user-list-n1",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:5,createdAt:"2026-02-22T09:30:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006",projectId:"proj-beta",title:"Add Parquet export support",description:"Allow pipeline outputs to be written as Parquet files for Spark consumption",status:"working",branch:"feat/parquet-export",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:00:00Z",parentTaskId:"",depth:0,childTaskIds:["task-006a","task-006b","task-006c","task-006d"],canDecompose:!0,defaultPersonaId:""},{id:"task-006a",projectId:"proj-beta",title:"Define Parquet schema mapping",description:"Map internal column types to Arrow/Parquet type system",status:"complete",branch:"feat/parquet-export/define-parquet-schema-mapping",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:05:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006b",projectId:"proj-beta",title:"Implement row-group writer",description:"Write buffered row groups with configurable batch size",status:"complete",branch:"feat/parquet-export/implement-row-group-writer",latestSessionId:"",dependsOn:["task-006a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:10:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006c",projectId:"proj-beta",title:"Add compression options",description:"Support Snappy, ZSTD, and GZIP compression for Parquet output",status:"working",branch:"feat/parquet-export/add-compression-options",latestSessionId:"sess-004",dependsOn:["task-006b"],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T08:15:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-006d",projectId:"proj-beta",title:"Write Parquet integration tests",description:"Round-trip tests: write Parquet, read back with pyarrow, verify data integrity",status:"not_started",branch:"",latestSessionId:"",dependsOn:["task-006c"],reviewNotes:void 0,sortOrder:4,createdAt:"2026-02-26T08:20:00Z",parentTaskId:"task-006",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007",projectId:"proj-beta",title:"Implement incremental loads",description:"Track watermarks so pipelines only process new/changed rows",status:"working",branch:"feat/incremental",latestSessionId:"sess-004",dependsOn:[],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:30:00Z",parentTaskId:"",depth:0,childTaskIds:["task-007a","task-007b"],canDecompose:!0,defaultPersonaId:""},{id:"task-007a",projectId:"proj-beta",title:"Design watermark storage",description:"Define schema for per-pipeline high-watermark tracking",status:"complete",branch:"feat/incremental/design-watermark-storage",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:1,createdAt:"2026-02-26T08:35:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-007b",projectId:"proj-beta",title:"Implement change detection query",description:"Generate WHERE clauses from watermarks to fetch only changed rows",status:"failed",branch:"feat/incremental/implement-change-detection-query",latestSessionId:"",dependsOn:["task-007a"],reviewNotes:void 0,sortOrder:2,createdAt:"2026-02-26T08:40:00Z",parentTaskId:"task-007",depth:1,childTaskIds:[],canDecompose:!1,defaultPersonaId:""},{id:"task-008",projectId:"proj-beta",title:"Add pipeline monitoring dashboard",description:"Real-time metrics for pipeline throughput, latency, and error rates",status:"paused",branch:"feat/monitoring",latestSessionId:"",dependsOn:[],reviewNotes:void 0,sortOrder:3,createdAt:"2026-02-26T09:00:00Z",parentTaskId:"",depth:0,childTaskIds:[],canDecompose:!1,defaultPersonaId:""}],Iy=[{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"}],BE=[{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:""}],LE=[{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"}],IE={"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 Ot(n){return new Date(Date.now()+n).toISOString()}const Uy=[{label:"API Refactor",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:800,event:{eventType:"output",timestamp:Ot(800),content:"Analyzing current API structure in src/routes/..."}},{delayMs:1600,event:{eventType:"output",timestamp:Ot(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:Ot(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:Ot(4e3),content:"Running test suite... 22 tests passed, 3 updated, 0 failed."}},{delayMs:5e3,event:{eventType:"status",timestamp:Ot(5e3),content:"completed"}}]},{label:"Database Migration",pauseForInput:!0,pauseAfterStep:3,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:600,event:{eventType:"output",timestamp:Ot(600),content:"Scanning current schema for migration targets..."}},{delayMs:1400,event:{eventType:"output",timestamp:Ot(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:Ot(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:Ot(0),content:"Proceeding with migration..."}},{delayMs:1500,event:{eventType:"output",timestamp:Ot(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:Ot(2e3),content:"All 3 migrations applied. Running verification queries... OK."}},{delayMs:3200,event:{eventType:"status",timestamp:Ot(2700),content:"completed"}}]},{label:"Test Writer",pauseForInput:!1,steps:[{delayMs:0,event:{eventType:"status",timestamp:Ot(0),content:"running"}},{delayMs:700,event:{eventType:"output",timestamp:Ot(700),content:"Generating test scaffolding for src/services/billing.ts..."}},{delayMs:1800,event:{eventType:"output",timestamp:Ot(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:Ot(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:Ot(3500),content:"failed"}}]}],zy=400;function UE({children:n}){const[a,i]=S.useState(kE),[o,r]=S.useState(ME),[d,u]=S.useState(void 0),[p,m]=S.useState(RE),[g,v]=S.useState(OE),[y,_]=S.useState(Iy),[T,E]=S.useState(BE),[j,N]=S.useState({claude:"off",github:"off",copilot:"off",codex:"off"}),[C,A]=S.useState(LE),[k]=S.useState(IE),[H,O]=S.useState(""),$=S.useRef(0),G=S.useRef(0),M=S.useRef(new Set),V=S.useRef(new Map),te=S.useRef(g);te.current=g;const ne=S.useRef(new Map),ae=S.useRef(new Map),re=S.useCallback(X=>($.current+=1,`mock-${X}-${String($.current).padStart(3,"0")}`),[]),Y=S.useCallback(()=>{const X=Uy[G.current%Uy.length];return G.current+=1,X},[]),Q=S.useCallback((X,J,se)=>{const ge=setTimeout(()=>{var pe;M.current.delete(ge),se&&((pe=V.current.get(se))==null||pe.delete(ge)),X()},J);M.current.add(ge),se&&(V.current.has(se)||V.current.set(se,new Set),V.current.get(se).add(ge))},[]),B=S.useCallback(X=>{const J=V.current.get(X);J&&(J.forEach(se=>{clearTimeout(se),M.current.delete(se)}),V.current.delete(X))},[]),F=S.useCallback((X,J)=>{i(se=>se.map(ge=>ge.id===X?{...ge,status:J}:ge))},[]),W=S.useCallback(X=>{r(J=>[...J,X])},[]),be=S.useCallback((X,J,se)=>{J.forEach((ge,pe)=>{Q(()=>{const Ue={sessionId:X,...ge.event,timestamp:new Date().toISOString()};W(Ue),ge.event.eventType==="status"&&F(X,ge.event.content),pe===J.length-1&&se&&se()},ge.delayMs,X)})},[Q,W,F]),Te=S.useCallback((X,J,se,ge)=>{console.log("[MockGrackle] spawn",{environmentId:X,prompt:J,runtime:ge});const pe=re("sess"),Ue={id:pe,environmentId:X,runtime:ge||"claude-code",status:"running",prompt:J,startedAt:new Date().toISOString()};i(bt=>[...bt,Ue]),u(pe);const Ce=Y();if(console.log(`[MockGrackle] Playing scenario: ${Ce.label}`),Ce.pauseForInput){const bt=Ce.pauseAfterStep??Ce.steps.length-1,xe=Ce.steps.slice(0,bt+1),ht=xe.length>0?xe[xe.length-1].delayMs:0;be(pe,xe),Q(()=>{F(pe,"idle"),W({sessionId:pe,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},ht+zy,pe),Ce.resumeSteps&&ne.current.set(pe,Ce.resumeSteps)}else be(pe,Ce.steps)},[re,Y,be,Q,F,W]),nt=S.useCallback(X=>{console.log("[MockGrackle] kill",X),B(X),ne.current.delete(X),F(X,"interrupted"),W({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"interrupted"}),v(J=>J.map(se=>se.latestSessionId===X&&se.status==="working"?{...se,status:"not_started"}:se))},[B,F,W]),Me=S.useCallback(()=>{console.log("[MockGrackle] refresh")},[]),fe=S.useCallback(X=>{console.log("[MockGrackle] loadSessionEvents",X)},[]),Ie=S.useCallback(()=>{console.log("[MockGrackle] clearEvents"),r([])},[]),Ee=S.useCallback((X,J,se,ge,pe)=>{console.log("[MockGrackle] createProject",{name:X,description:J});const Ue={id:re("proj"),name:X,description:J||"",repoUrl:se||"",defaultEnvironmentId:ge||"",status:"active",worktreeBasePath:"",useWorktrees:!0,defaultPersonaId:pe||"",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};m(Ce=>[...Ce,Ue])},[re]),ee=S.useCallback(X=>{console.log("[MockGrackle] archiveProject",X),m(J=>J.map(se=>se.id===X?{...se,status:"archived"}:se))},[]),Ve=S.useCallback(X=>{console.log("[MockGrackle] loadTasks",X)},[]),Ne=S.useCallback((X,J,se,ge,pe,Ue,Ce,bt)=>{console.log("[MockGrackle] createTask",{projectId:X,title:J,parentTaskId:pe}),v(xe=>{const St=xe.filter(we=>we.projectId===X).reduce((we,Et)=>Math.max(we,Et.sortOrder),0),Oe=pe?xe.find(we=>we.id===pe):void 0;if(pe&&!Oe)return console.warn("[MockGrackle] Parent task not found:",pe),xe;if(Oe&&!Oe.canDecompose)return console.warn("[MockGrackle] Parent task does not have decomposition rights:",pe),xe;const Mt=Oe?Oe.depth+1:0,Se={id:re("task"),projectId:X,title:J,description:se||"",status:"not_started",branch:"",latestSessionId:"",dependsOn:ge||[],reviewNotes:void 0,sortOrder:St+1,createdAt:new Date().toISOString(),parentTaskId:pe||"",depth:Mt,childTaskIds:[],canDecompose:!pe,defaultPersonaId:Ue||""};return[...xe,Se]}),Ce&&Ce()},[re]),_e=S.useCallback((X,J,se,ge)=>{var ht;console.log("[MockGrackle] startTask",{taskId:X});const pe=te.current.find(St=>St.id===X),Ue=(pe==null?void 0:pe.title)??"",Ce=re("sess"),bt={id:Ce,environmentId:"env-local-01",runtime:"claude-code",status:"running",prompt:Ue||X,startedAt:new Date().toISOString()};i(St=>[...St,bt]),v(St=>St.map(Oe=>Oe.id===X?{...Oe,status:"working",latestSessionId:Ce,branch:`mock/${X.slice(0,8)}`}:Oe));const xe=Y();if(console.log(`[MockGrackle] Playing task scenario: ${xe.label}`),xe.pauseForInput){const St=xe.pauseAfterStep??xe.steps.length-1,Oe=xe.steps.slice(0,St+1),Mt=Oe.length>0?Oe[Oe.length-1].delayMs:0;if(be(Ce,Oe),Q(()=>{F(Ce,"idle"),W({sessionId:Ce,eventType:"status",timestamp:new Date().toISOString(),content:"idle"})},Mt+zy,Ce),xe.resumeSteps){const Se=[...xe.resumeSteps];ne.current.set(Ce,Se);const we=Se.reduce((Et,le)=>Math.max(Et,le.delayMs),0);ae.current.set(Ce,{taskId:X,delayAfterResume:we+200})}}else{const St=xe.steps.length>0?xe.steps[xe.steps.length-1].delayMs:0;be(Ce,xe.steps);const Oe=(ht=xe.steps[xe.steps.length-1])==null?void 0:ht.event.content;Q(()=>{Oe==="completed"?v(Mt=>Mt.map(Se=>Se.id===X&&Se.status==="working"?{...Se,status:"paused"}:Se)):Oe==="failed"&&v(Mt=>Mt.map(Se=>Se.id===X&&Se.status==="working"?{...Se,status:"failed"}:Se))},St+100,Ce)}},[re,Y,be,Q,F,W]),dt=S.useCallback((X,J)=>{console.log("[MockGrackle] sendInput",{sessionId:X,text:J}),W({sessionId:X,eventType:"output",timestamp:new Date().toISOString(),content:`User input: ${J}`}),F(X,"running"),W({sessionId:X,eventType:"status",timestamp:new Date().toISOString(),content:"running"});const se=ne.current.get(X);if(se)ne.current.delete(X),be(X,se);else{const pe=[{delayMs:500,event:{eventType:"output",timestamp:new Date().toISOString(),content:"I received your input, continuing..."}},{delayMs:1500,event:{eventType:"status",timestamp:new Date().toISOString(),content:"completed"}}];be(X,pe)}const ge=ae.current.get(X);ge&&(ae.current.delete(X),Q(()=>{v(pe=>pe.map(Ue=>Ue.id===ge.taskId&&Ue.status==="working"?{...Ue,status:"paused"}:Ue))},ge.delayAfterResume,X))},[W,F,be,Q]),ft=S.useCallback(X=>{console.log("[MockGrackle] completeTask",X),v(J=>J.map(se=>se.id===X?{...se,status:"complete"}:se))},[]),Ut=S.useCallback(X=>{console.log("[MockGrackle] resumeTask",X)},[]),kt=S.useCallback((X,J,se,ge,pe)=>{console.log("[MockGrackle] updateTask",{taskId:X,title:J}),v(Ue=>Ue.map(Ce=>Ce.id===X?{...Ce,title:J.trim()||Ce.title,description:se,dependsOn:ge,...pe!==void 0?{defaultPersonaId:pe}:{}}:Ce))},[]),$e=S.useCallback(X=>{console.log("[MockGrackle] deleteTask",X),v(J=>J.filter(se=>se.id!==X))},[]),Re=S.useCallback(X=>{console.log("[MockGrackle] loadFindings",X),_(Iy.filter(J=>J.projectId===X))},[]),Rn=S.useCallback((X,J,se,ge,pe)=>{console.log("[MockGrackle] postFinding",{projectId:X,title:J});const Ue={id:re("find"),projectId:X,taskId:"",sessionId:"",category:ge||"general",title:J,content:se,tags:pe||[],createdAt:new Date().toISOString()};_(Ce=>[...Ce,Ue])},[re]),Aa=S.useCallback((X,J,se)=>{console.log("[MockGrackle] addEnvironment",{displayName:X,adapterType:J,adapterConfig:se})},[]),ja=S.useCallback(()=>{console.log("[MockGrackle] loadTokens")},[]),Hn=S.useCallback((X,J,se,ge,pe)=>{console.log("[MockGrackle] setToken",{name:X,tokenType:se}),E(Ue=>[...Ue.filter(bt=>bt.name!==X),{name:X,tokenType:se,envVar:ge,filePath:pe,expiresAt:""}])},[]),Wn=S.useCallback(X=>{console.log("[MockGrackle] deleteToken",X),E(J=>J.filter(se=>se.name!==X))},[]),On=S.useCallback(X=>{console.log("[MockGrackle] updateCredentialProviders",X),N(X)},[]);S.useEffect(()=>()=>{M.current.forEach(clearTimeout),M.current.clear()},[]);const ea=S.useMemo(()=>({connected:!0,environments:DE,sessions:a,events:o,eventsDropped:0,lastSpawnedId:d,projects:p,tasks:g,findings:y,tokens:T,credentialProviders:j,spawn:Te,sendInput:dt,kill:nt,refresh:Me,loadSessionEvents:fe,clearEvents:Ie,createProject:Ee,archiveProject:ee,updateProject:(X,J)=>{console.log("[MockGrackle] updateProject",{projectId:X,...J}),m(se=>se.map(ge=>ge.id!==X?ge:{...ge,...J.name!==void 0?{name:J.name}:{},...J.description!==void 0?{description:J.description}:{},...J.repoUrl!==void 0?{repoUrl:J.repoUrl}:{},...J.defaultEnvironmentId!==void 0?{defaultEnvironmentId:J.defaultEnvironmentId}:{},...J.worktreeBasePath!==void 0?{worktreeBasePath:J.worktreeBasePath}:{},...J.useWorktrees!==void 0?{useWorktrees:J.useWorktrees}:{},...J.defaultPersonaId!==void 0?{defaultPersonaId:J.defaultPersonaId}:{},updatedAt:new Date().toISOString()}))},loadTasks:Ve,createTask:Ne,startTask:_e,completeTask:ft,resumeTask:Ut,updateTask:kt,deleteTask:$e,loadFindings:Re,postFinding:Rn,addEnvironment:Aa,loadTokens:ja,setToken:Hn,deleteToken:Wn,updateCredentialProviders:On,provisionStatus:{},provisionEnvironment:()=>{},stopEnvironment:()=>{},removeEnvironment:()=>{},codespaces:[],codespaceError:"",codespaceListError:"",codespaceCreating:!1,listCodespaces:()=>{},createCodespace:()=>{},projectCreating:!1,taskStartingId:void 0,personas:C,createPersona:(X,J,se,ge,pe,Ue)=>{console.log("[MockGrackle] createPersona",{name:X});const Ce={id:`mock-persona-${Date.now()}`,name:X,description:J,systemPrompt:se,toolConfig:"{}",runtime:ge??"claude-code",model:pe||"",maxTurns:Ue||0,mcpServers:"[]",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};A(bt=>[...bt,Ce])},updatePersona:(X,J,se,ge,pe,Ue,Ce)=>{console.log("[MockGrackle] updatePersona",{personaId:X,name:J}),A(bt=>bt.map(xe=>xe.id!==X?xe:{...xe,...J!==void 0?{name:J}:{},...se!==void 0?{description:se}:{},...ge!==void 0?{systemPrompt:ge}:{},...pe!==void 0?{runtime:pe}:{},...Ue!==void 0?{model:Ue}:{},...Ce!==void 0?{maxTurns:Ce}:{},updatedAt:new Date().toISOString()}))},deletePersona:X=>{console.log("[MockGrackle] deletePersona",X),A(J=>J.filter(se=>se.id!==X))},taskSessions:k,loadTaskSessions:X=>{console.log("[MockGrackle] loadTaskSessions",X)},appDefaultPersonaId:H,setAppDefaultPersonaId:X=>{console.log("[MockGrackle] setAppDefaultPersonaId",X),O(X)},onboardingCompleted:!0,completeOnboarding:()=>{console.log("[MockGrackle] completeOnboarding")}}),[a,o,d,p,g,y,T,j,C,k,H,Te,dt,nt,Me,fe,Ie,Ee,ee,Ve,Ne,_e,ft,Ut,kt,$e,Re,Rn,Aa,ja,Hn,Wn,On]);return h.jsx(If.Provider,{value:ea,children:n})}const F0=S.createContext(void 0),zE=4e3;function VE({children:n}){const[a,i]=S.useState([]),o=S.useRef(0),r=S.useCallback(u=>{i(p=>p.filter(m=>m.id!==u))},[]),d=S.useCallback((u,p="info",m=zE)=>{const g=`toast-${++o.current}`;i(v=>[...v,{id:g,message:u,variant:p,duration:m}])},[]);return h.jsx(F0.Provider,{value:{toasts:a,showToast:d,dismissToast:r},children:n})}function ao(){const n=S.useContext(F0);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"]}],$0=new Set(tc.map(n=>n.id)),Vy="grackle";function Wd(n){return tc.find(a=>a.id===n)}const ef="grackle-theme",q0="grackle-prefer-system",Y0="(prefers-color-scheme: dark)";let Il=[],Or;function wd(){Or=void 0;for(const n of Il)n()}function tf(){return typeof window>"u"?!1:window.matchMedia(Y0).matches}function Hl(){if(typeof localStorage>"u")return Vy;try{const n=localStorage.getItem(ef);if(n!==null&&$0.has(n))return n}catch{}return Vy}function Ur(){if(typeof localStorage>"u")return!1;try{return localStorage.getItem(q0)==="true"}catch{return!1}}function nf(n){return tc.find(a=>a.variantLightId===n||a.variantDarkId===n)}function K0(n,a){const i=Wd(n);if(i!=null&&i.variantDarkId)return a&&i.variantLightId?tf()?i.variantDarkId:i.variantLightId:i.variantDarkId;if(i!=null&&i.hidden&&a){const o=nf(n);if(o!=null&&o.variantLightId&&o.variantDarkId)return tf()?o.variantDarkId:o.variantLightId}return n}function Ei(n,a,i=!1){i&&document.documentElement.classList.add("no-transitions"),document.documentElement.dataset.theme=K0(n,a),i&&(document.documentElement.offsetHeight,requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")}))}typeof document<"u"&&Ei(Hl(),Ur());function HE(){return Or===void 0&&(Or={themeId:Hl(),systemDark:tf(),preferSystem:Ur()}),Or}function PE(n){return Il=[...Il,n],()=>{Il=Il.filter(a=>a!==n)}}function GE(){const n=S.useSyncExternalStore(PE,HE),{themeId:a,preferSystem:i}=n,o=K0(a,i),r=S.useCallback(u=>{if($0.has(u)){try{localStorage.setItem(ef,u)}catch{}Ei(u,Ur(),!0),wd()}},[]),d=S.useCallback(u=>{try{localStorage.setItem(q0,u?"true":"false")}catch{}if(u){const p=Hl(),m=Wd(p);if(m!=null&&m.hidden){const g=nf(p);if(g)try{localStorage.setItem(ef,g.id)}catch{}}}Ei(Hl(),u,!0),wd()},[]);return S.useEffect(()=>{Ei(a,i)},[a,i]),S.useEffect(()=>{if(typeof window>"u")return;const u=window.matchMedia(Y0),p=()=>{const m=Hl(),g=Ur();if(g){const v=Wd(m);if(v!=null&&v.variantDarkId&&v.variantLightId&&Ei(m,g),v!=null&&v.hidden){const y=nf(m);y!=null&&y.variantDarkId&&y.variantLightId&&Ei(m,g)}}wd()};return u.addEventListener("change",p),()=>{u.removeEventListener("change",p)}},[]),{themeId:a,setTheme:r,resolvedThemeId:o,preferSystem:i,setPreferSystem:d}}const Z0=S.createContext(void 0);function FE({children:n}){const a=GE();return h.jsx(Z0.Provider,{value:a,children:n})}function X0(){const n=S.useContext(Z0);if(!n)throw new Error("useThemeContext must be used within ThemeProvider");return n}const $E="_container_eix8p_1",qE="_hamburger_eix8p_33",YE="_brand_eix8p_49",KE="_info_eix8p_65",ZE="_connectionLabel_eix8p_80",XE="_connectionDot_eix8p_93",QE="_connected_eix8p_96",JE="_disconnected_eix8p_100",WE="_settingsButton_eix8p_104",ba={container:$E,hamburger:qE,brand:YE,info:KE,connectionLabel:ZE,connectionDot:XE,connected:QE,disconnected:JE,settingsButton:WE};function eC({onToggleSidebar:n,sidebarOpen:a}){const{connected:i,environments:o,sessions:r}=It(),d=Mn(),u=o.length,p=o.filter(g=>g.status==="connected").length,m=r.filter(g=>["running","idle"].includes(g.status)).length;return h.jsxs("div",{className:ba.container,children:[n&&h.jsx("button",{type:"button",className:ba.hamburger,onClick:n,"aria-label":"Toggle sidebar","aria-expanded":a,children:"☰"}),h.jsx("button",{type:"button",className:ba.brand,onClick:()=>d("/"),title:"Home",children:"Grackle"}),h.jsxs("div",{className:ba.info,children:[h.jsxs("span",{"aria-label":i?"Connected":"Disconnected",children:[h.jsx("span",{className:`${ba.connectionDot} ${i?ba.connected:ba.disconnected}`,"aria-hidden":"true",children:"●"})," ",h.jsx("span",{className:ba.connectionLabel,"aria-hidden":"true",children:i?"Connected":"Disconnected"})]}),h.jsxs("span",{children:[p,"/",u," env",u!==1?"s":""]}),h.jsxs("span",{children:[m," active"]}),h.jsx("button",{className:ba.settingsButton,onClick:()=>d(ki),title:"Settings",children:"⚙"})]})]})}const Uf=S.createContext({});function zf(n){const a=S.useRef(null);return a.current===null&&(a.current=n()),a.current}const nc=S.createContext(null),Vf=S.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"});class tC 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 nC({children:n,isPresent:a}){const i=S.useId(),o=S.useRef(null),r=S.useRef({width:0,height:0,top:0,left:0}),{nonce:d}=S.useContext(Vf);return S.useInsertionEffect(()=>{const{width:u,height:p,top:m,left:g}=r.current;if(a||!o.current||!u||!p)return;o.current.dataset.motionPopId=i;const v=document.createElement("style");return d&&(v.nonce=d),document.head.appendChild(v),v.sheet&&v.sheet.insertRule(`
79
- [data-motion-pop-id="${i}"] {
80
- position: absolute !important;
81
- width: ${u}px !important;
82
- height: ${p}px !important;
83
- top: ${m}px !important;
84
- left: ${g}px !important;
85
- }
86
- `),()=>{document.head.removeChild(v)}},[a]),h.jsx(tC,{isPresent:a,childRef:o,sizeRef:r,children:S.cloneElement(n,{ref:o})})}const aC=({children:n,initial:a,isPresent:i,onExitComplete:o,custom:r,presenceAffectsLayout:d,mode:u})=>{const p=zf(sC),m=S.useId(),g=S.useCallback(y=>{p.set(y,!0);for(const _ of p.values())if(!_)return;o&&o()},[p,o]),v=S.useMemo(()=>({id:m,initial:a,isPresent:i,custom:r,onExitComplete:g,register:y=>(p.set(y,!1),()=>p.delete(y))}),d?[Math.random(),g]:[i,g]);return S.useMemo(()=>{p.forEach((y,_)=>p.set(_,!1))},[i]),S.useEffect(()=>{!i&&!p.size&&o&&o()},[i]),u==="popLayout"&&(n=h.jsx(nC,{isPresent:i,children:n})),h.jsx(nc.Provider,{value:v,children:n})};function sC(){return new Map}function Q0(n=!0){const a=S.useContext(nc);if(a===null)return[!0,null];const{isPresent:i,onExitComplete:o,register:r}=a,d=S.useId();S.useEffect(()=>{n&&r(d)},[n]);const u=S.useCallback(()=>n&&o&&o(d),[d,o,n]);return!i&&o?[!1,u]:[!0]}const Cr=n=>n.key||"";function Hy(n){const a=[];return S.Children.forEach(n,i=>{S.isValidElement(i)&&a.push(i)}),a}const Hf=typeof window<"u",J0=Hf?S.useLayoutEffect:S.useEffect,Vn=({children:n,custom:a,initial:i=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:d="sync",propagate:u=!1})=>{const[p,m]=Q0(u),g=S.useMemo(()=>Hy(n),[n]),v=u&&!p?[]:g.map(Cr),y=S.useRef(!0),_=S.useRef(g),T=zf(()=>new Map),[E,j]=S.useState(g),[N,C]=S.useState(g);J0(()=>{y.current=!1,_.current=g;for(let H=0;H<N.length;H++){const O=Cr(N[H]);v.includes(O)?T.delete(O):T.get(O)!==!0&&T.set(O,!1)}},[N,v.length,v.join("-")]);const A=[];if(g!==E){let H=[...g];for(let O=0;O<N.length;O++){const $=N[O],G=Cr($);v.includes(G)||(H.splice(O,0,$),A.push($))}d==="wait"&&A.length&&(H=A),C(Hy(H)),j(g);return}const{forceRender:k}=S.useContext(Uf);return h.jsx(h.Fragment,{children:N.map(H=>{const O=Cr(H),$=u&&!p?!1:g===N||v.includes(O),G=()=>{if(T.has(O))T.set(O,!0);else return;let M=!0;T.forEach(V=>{V||(M=!1)}),M&&(k==null||k(),C(_.current),u&&(m==null||m()),o&&o())};return h.jsx(aC,{isPresent:$,initial:!y.current||i?void 0:!1,custom:$?void 0:a,presenceAffectsLayout:r,mode:d,onExitComplete:$?void 0:G,children:H},O)})})},pn=n=>n;let W0=pn;const iC={useManualTiming:!1};function lC(n){let a=new Set,i=new Set,o=!1,r=!1;const d=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function p(g){d.has(g)&&(m.schedule(g),n()),g(u)}const m={schedule:(g,v=!1,y=!1)=>{const T=y&&o?a:i;return v&&d.add(g),T.has(g)||T.add(g),g},cancel:g=>{i.delete(g),d.delete(g)},process:g=>{if(u=g,o){r=!0;return}o=!0,[a,i]=[i,a],a.forEach(p),a.clear(),o=!1,r&&(r=!1,m.process(g))}};return m}const Ar=["read","resolveKeyframes","update","preRender","render","postRender"],oC=40;function eb(n,a){let i=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},d=()=>i=!0,u=Ar.reduce((C,A)=>(C[A]=lC(d),C),{}),{read:p,resolveKeyframes:m,update:g,preRender:v,render:y,postRender:_}=u,T=()=>{const C=performance.now();i=!1,r.delta=o?1e3/60:Math.max(Math.min(C-r.timestamp,oC),1),r.timestamp=C,r.isProcessing=!0,p.process(r),m.process(r),g.process(r),v.process(r),y.process(r),_.process(r),r.isProcessing=!1,i&&a&&(o=!1,n(T))},E=()=>{i=!0,o=!0,r.isProcessing||n(T)};return{schedule:Ar.reduce((C,A)=>{const k=u[A];return C[A]=(H,O=!1,$=!1)=>(i||E(),k.schedule(H,O,$)),C},{}),cancel:C=>{for(let A=0;A<Ar.length;A++)u[Ar[A]].cancel(C)},state:r,steps:u}}const{schedule:lt,cancel:as,state:Ft,steps:Dd}=eb(typeof requestAnimationFrame<"u"?requestAnimationFrame:pn,!0),tb=S.createContext({strict:!1}),Py={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Mi={};for(const n in Py)Mi[n]={isEnabled:a=>Py[n].some(i=>!!a[i])};function rC(n){for(const a in n)Mi[a]={...Mi[a],...n[a]}}const cC=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 zr(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||cC.has(n)}let nb=n=>!zr(n);function uC(n){n&&(nb=a=>a.startsWith("on")?!zr(a):n(a))}try{uC(require("@emotion/is-prop-valid").default)}catch{}function dC(n,a,i){const o={};for(const r in n)r==="values"&&typeof n.values=="object"||(nb(r)||i===!0&&zr(r)||!a&&!zr(r)||n.draggable&&r.startsWith("onDrag"))&&(o[r]=n[r]);return o}function fC(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 Xl(n){return typeof n=="string"||Array.isArray(n)}function sc(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const Pf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gf=["initial",...Pf];function ic(n){return sc(n.animate)||Gf.some(a=>Xl(n[a]))}function ab(n){return!!(ic(n)||n.variants)}function hC(n,a){if(ic(n)){const{initial:i,animate:o}=n;return{initial:i===!1||Xl(i)?i:void 0,animate:Xl(o)?o:void 0}}return n.inherit!==!1?a:{}}function pC(n){const{initial:a,animate:i}=hC(n,S.useContext(ac));return S.useMemo(()=>({initial:a,animate:i}),[Gy(a),Gy(i)])}function Gy(n){return Array.isArray(n)?n.join(" "):n}const mC=Symbol.for("motionComponentSymbol");function Ci(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function gC(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):Ci(i)&&(i.current=o))},[a])}const Ff=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yC="framerAppearId",sb="data-"+Ff(yC),{schedule:$f}=eb(queueMicrotask,!1),ib=S.createContext({});function vC(n,a,i,o,r){var d,u;const{visualElement:p}=S.useContext(ac),m=S.useContext(tb),g=S.useContext(nc),v=S.useContext(Vf).reducedMotion,y=S.useRef(null);o=o||m.renderer,!y.current&&o&&(y.current=o(n,{visualState:a,parent:p,props:i,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:v}));const _=y.current,T=S.useContext(ib);_&&!_.projection&&r&&(_.type==="html"||_.type==="svg")&&bC(y.current,i,r,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{_&&E.current&&_.update(i,g)});const j=i[sb],N=S.useRef(!!j&&!(!((d=window.MotionHandoffIsComplete)===null||d===void 0)&&d.call(window,j))&&((u=window.MotionHasOptimisedAnimation)===null||u===void 0?void 0:u.call(window,j)));return J0(()=>{_&&(E.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),$f.render(_.render),N.current&&_.animationState&&_.animationState.animateChanges())}),S.useEffect(()=>{_&&(!N.current&&_.animationState&&_.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)===null||C===void 0||C.call(window,j)}),N.current=!1))}),_}function bC(n,a,i,o){const{layoutId:r,layout:d,drag:u,dragConstraints:p,layoutScroll:m,layoutRoot:g}=a;n.projection=new i(n.latestValues,a["data-framer-portal-id"]?void 0:lb(n.parent)),n.projection.setOptions({layoutId:r,layout:d,alwaysMeasureLayout:!!u||p&&Ci(p),visualElement:n,animationType:typeof d=="string"?d:"both",initialPromotionConfig:o,layoutScroll:m,layoutRoot:g})}function lb(n){if(n)return n.options.allowProjection!==!1?n.projection:lb(n.parent)}function SC({preloadedFeatures:n,createVisualElement:a,useRender:i,useVisualState:o,Component:r}){var d,u;n&&rC(n);function p(g,v){let y;const _={...S.useContext(Vf),...g,layoutId:_C(g)},{isStatic:T}=_,E=pC(g),j=o(g,T);if(!T&&Hf){xC();const N=TC(_);y=N.MeasureLayout,E.visualElement=vC(r,j,_,a,N.ProjectionNode)}return h.jsxs(ac.Provider,{value:E,children:[y&&E.visualElement?h.jsx(y,{visualElement:E.visualElement,..._}):null,i(r,g,gC(j,E.visualElement,v),j,T,E.visualElement)]})}p.displayName=`motion.${typeof r=="string"?r:`create(${(u=(d=r.displayName)!==null&&d!==void 0?d:r.name)!==null&&u!==void 0?u:""})`}`;const m=S.forwardRef(p);return m[mC]=r,m}function _C({layoutId:n}){const a=S.useContext(Uf).id;return a&&n!==void 0?a+"-"+n:n}function xC(n,a){S.useContext(tb).strict}function TC(n){const{drag:a,layout:i}=Mi;if(!a&&!i)return{};const o={...a,...i};return{MeasureLayout:a!=null&&a.isEnabled(n)||i!=null&&i.isEnabled(n)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const EC=["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 qf(n){return typeof n!="string"||n.includes("-")?!1:!!(EC.indexOf(n)>-1||/[A-Z]/u.test(n))}function Fy(n){const a=[{},{}];return n==null||n.values.forEach((i,o)=>{a[0][o]=i.get(),a[1][o]=i.getVelocity()}),a}function Yf(n,a,i,o){if(typeof a=="function"){const[r,d]=Fy(o);a=a(i!==void 0?i:n.custom,r,d)}if(typeof a=="string"&&(a=n.variants&&n.variants[a]),typeof a=="function"){const[r,d]=Fy(o);a=a(i!==void 0?i:n.custom,r,d)}return a}const af=n=>Array.isArray(n),CC=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),AC=n=>af(n)?n[n.length-1]||0:n,qt=n=>!!(n&&n.getVelocity);function Br(n){const a=qt(n)?n.get():n;return CC(a)?a.toValue():a}function jC({scrapeMotionValuesFromProps:n,createRenderState:a,onUpdate:i},o,r,d){const u={latestValues:NC(o,r,d,n),renderState:a()};return i&&(u.onMount=p=>i({props:o,current:p,...u}),u.onUpdate=p=>i(p)),u}const ob=n=>(a,i)=>{const o=S.useContext(ac),r=S.useContext(nc),d=()=>jC(n,a,o,r);return i?d():zf(d)};function NC(n,a,i,o){const r={},d=o(n,{});for(const _ in d)r[_]=Br(d[_]);let{initial:u,animate:p}=n;const m=ic(n),g=ab(n);a&&g&&!m&&n.inherit!==!1&&(u===void 0&&(u=a.initial),p===void 0&&(p=a.animate));let v=i?i.initial===!1:!1;v=v||u===!1;const y=v?p:u;if(y&&typeof y!="boolean"&&!sc(y)){const _=Array.isArray(y)?y:[y];for(let T=0;T<_.length;T++){const E=Yf(n,_[T]);if(E){const{transitionEnd:j,transition:N,...C}=E;for(const A in C){let k=C[A];if(Array.isArray(k)){const H=v?k.length-1:0;k=k[H]}k!==null&&(r[A]=k)}for(const A in j)r[A]=j[A]}}}return r}const Ii=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Is=new Set(Ii),rb=n=>a=>typeof a=="string"&&a.startsWith(n),cb=rb("--"),wC=rb("var(--"),Kf=n=>wC(n)?DC.test(n.split("/*")[0].trim()):!1,DC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ub=(n,a)=>a&&typeof n=="number"?a.transform(n):n,Ea=(n,a,i)=>i>a?a:i<n?n:i,Ui={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Ql={...Ui,transform:n=>Ea(0,1,n)},jr={...Ui,default:1},so=n=>({test:a=>typeof a=="string"&&a.endsWith(n)&&a.split(" ").length===1,parse:parseFloat,transform:a=>`${a}${n}`}),Ja=so("deg"),Qn=so("%"),me=so("px"),kC=so("vh"),MC=so("vw"),$y={...Qn,parse:n=>Qn.parse(n)/100,transform:n=>Qn.transform(n*100)},RC={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},OC={rotate:Ja,rotateX:Ja,rotateY:Ja,rotateZ:Ja,scale:jr,scaleX:jr,scaleY:jr,scaleZ:jr,skew:Ja,skewX:Ja,skewY:Ja,distance:me,translateX:me,translateY:me,translateZ:me,x:me,y:me,z:me,perspective:me,transformPerspective:me,opacity:Ql,originX:$y,originY:$y,originZ:me},qy={...Ui,transform:Math.round},Zf={...RC,...OC,zIndex:qy,size:me,fillOpacity:Ql,strokeOpacity:Ql,numOctaves:qy},BC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},LC=Ii.length;function IC(n,a,i){let o="",r=!0;for(let d=0;d<LC;d++){const u=Ii[d],p=n[u];if(p===void 0)continue;let m=!0;if(typeof p=="number"?m=p===(u.startsWith("scale")?1:0):m=parseFloat(p)===0,!m||i){const g=ub(p,Zf[u]);if(!m){r=!1;const v=BC[u]||u;o+=`${v}(${g}) `}i&&(a[u]=g)}}return o=o.trim(),i?o=i(a,r?"":o):r&&(o="none"),o}function Xf(n,a,i){const{style:o,vars:r,transformOrigin:d}=n;let u=!1,p=!1;for(const m in a){const g=a[m];if(Is.has(m)){u=!0;continue}else if(cb(m)){r[m]=g;continue}else{const v=ub(g,Zf[m]);m.startsWith("origin")?(p=!0,d[m]=v):o[m]=v}}if(a.transform||(u||i?o.transform=IC(a,n.transform,i):o.transform&&(o.transform="none")),p){const{originX:m="50%",originY:g="50%",originZ:v=0}=d;o.transformOrigin=`${m} ${g} ${v}`}}const UC={offset:"stroke-dashoffset",array:"stroke-dasharray"},zC={offset:"strokeDashoffset",array:"strokeDasharray"};function VC(n,a,i=1,o=0,r=!0){n.pathLength=1;const d=r?UC:zC;n[d.offset]=me.transform(-o);const u=me.transform(a),p=me.transform(i);n[d.array]=`${u} ${p}`}function Yy(n,a,i){return typeof n=="string"?n:me.transform(a+i*n)}function HC(n,a,i){const o=Yy(a,n.x,n.width),r=Yy(i,n.y,n.height);return`${o} ${r}`}function Qf(n,{attrX:a,attrY:i,attrScale:o,originX:r,originY:d,pathLength:u,pathSpacing:p=1,pathOffset:m=0,...g},v,y){if(Xf(n,g,y),v){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:_,style:T,dimensions:E}=n;_.transform&&(E&&(T.transform=_.transform),delete _.transform),E&&(r!==void 0||d!==void 0||T.transform)&&(T.transformOrigin=HC(E,r!==void 0?r:.5,d!==void 0?d:.5)),a!==void 0&&(_.x=a),i!==void 0&&(_.y=i),o!==void 0&&(_.scale=o),u!==void 0&&VC(_,u,p,m,!1)}const Jf=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),db=()=>({...Jf(),attrs:{}}),Wf=n=>typeof n=="string"&&n.toLowerCase()==="svg";function fb(n,{style:a,vars:i},o,r){Object.assign(n.style,a,r&&r.getProjectionStyles(o));for(const d in i)n.style.setProperty(d,i[d])}const hb=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 pb(n,a,i,o){fb(n,a,void 0,o);for(const r in a.attrs)n.setAttribute(hb.has(r)?r:Ff(r),a.attrs[r])}const Vr={};function PC(n){Object.assign(Vr,n)}function mb(n,{layout:a,layoutId:i}){return Is.has(n)||n.startsWith("origin")||(a||i!==void 0)&&(!!Vr[n]||n==="opacity")}function eh(n,a,i){var o;const{style:r}=n,d={};for(const u in r)(qt(r[u])||a.style&&qt(a.style[u])||mb(u,n)||((o=i==null?void 0:i.getValue(u))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(d[u]=r[u]);return d}function gb(n,a,i){const o=eh(n,a,i);for(const r in n)if(qt(n[r])||qt(a[r])){const d=Ii.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[d]=n[r]}return o}function GC(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 Ky=["x","y","width","height","cx","cy","r"],FC={useVisualState:ob({scrapeMotionValuesFromProps:gb,createRenderState:db,onUpdate:({props:n,prevProps:a,current:i,renderState:o,latestValues:r})=>{if(!i)return;let d=!!n.drag;if(!d){for(const p in r)if(Is.has(p)){d=!0;break}}if(!d)return;let u=!a;if(a)for(let p=0;p<Ky.length;p++){const m=Ky[p];n[m]!==a[m]&&(u=!0)}u&&lt.read(()=>{GC(i,o),lt.render(()=>{Qf(o,r,Wf(i.tagName),n.transformTemplate),pb(i,o)})})}})},$C={useVisualState:ob({scrapeMotionValuesFromProps:eh,createRenderState:Jf})};function yb(n,a,i){for(const o in a)!qt(a[o])&&!mb(o,i)&&(n[o]=a[o])}function qC({transformTemplate:n},a){return S.useMemo(()=>{const i=Jf();return Xf(i,a,n),Object.assign({},i.vars,i.style)},[a])}function YC(n,a){const i=n.style||{},o={};return yb(o,i,n),Object.assign(o,qC(n,a)),o}function KC(n,a){const i={},o=YC(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 ZC(n,a,i,o){const r=S.useMemo(()=>{const d=db();return Qf(d,a,Wf(o),n.transformTemplate),{...d.attrs,style:{...d.style}}},[a]);if(n.style){const d={};yb(d,n.style,n),r.style={...d,...r.style}}return r}function XC(n=!1){return(i,o,r,{latestValues:d},u)=>{const m=(qf(i)?ZC:KC)(o,d,u,i),g=dC(o,typeof i=="string",n),v=i!==S.Fragment?{...g,...m,ref:r}:{},{children:y}=o,_=S.useMemo(()=>qt(y)?y.get():y,[y]);return S.createElement(i,{...v,children:_})}}function QC(n,a){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const u={...qf(o)?FC:$C,preloadedFeatures:n,useRender:XC(r),createVisualElement:a,Component:o};return SC(u)}}function vb(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 Yf(o,a,i!==void 0?i:o.custom,n)}function th(n,a){return n?n[a]||n.default||n:void 0}const bb=new Set(["width","height","top","left","right","bottom",...Ii]);let Lr;function JC(){Lr=void 0}const Jn={now:()=>(Lr===void 0&&Jn.set(Ft.isProcessing||iC.useManualTiming?Ft.timestamp:performance.now()),Lr),set:n=>{Lr=n,queueMicrotask(JC)}};function nh(n,a){n.indexOf(a)===-1&&n.push(a)}function ah(n,a){const i=n.indexOf(a);i>-1&&n.splice(i,1)}class sh{constructor(){this.subscriptions=[]}add(a){return nh(this.subscriptions,a),()=>ah(this.subscriptions,a)}notify(a,i,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](a,i,o);else for(let d=0;d<r;d++){const u=this.subscriptions[d];u&&u(a,i,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Sb(n,a){return a?n*(1e3/a):0}const Zy=30,WC=n=>!isNaN(parseFloat(n));class eA{constructor(a,i={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const d=Jn.now();this.updatedAt!==d&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(a),this.owner=i.owner}setCurrent(a){this.current=a,this.updatedAt=Jn.now(),this.canTrackVelocity===null&&a!==void 0&&(this.canTrackVelocity=WC(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 sh);const o=this.events[a].add(i);return a==="change"?()=>{o(),lt.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const a in this.events)this.events[a].clear()}attach(a,i){this.passiveEffect=a,this.stopPassiveEffect=i}set(a,i=!0){!i||!this.passiveEffect?this.updateAndNotify(a,i):this.passiveEffect(a,this.updateAndNotify)}setWithVelocity(a,i,o){this.set(i),this.prev=void 0,this.prevFrameValue=a,this.prevUpdatedAt=this.updatedAt-o}jump(a,i=!0){this.updateAndNotify(a),this.prev=a,this.prevUpdatedAt=this.prevFrameValue=void 0,i&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const a=Jn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||a-this.updatedAt>Zy)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,Zy);return Sb(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(a){return this.stop(),new Promise(i=>{this.hasAnimated=!0,this.animation=a(i),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jl(n,a){return new eA(n,a)}function tA(n,a,i){n.hasValue(a)?n.getValue(a).set(i):n.addValue(a,Jl(i))}function nA(n,a){const i=lc(n,a);let{transitionEnd:o={},transition:r={},...d}=i||{};d={...d,...o};for(const u in d){const p=AC(d[u]);tA(n,u,p)}}function aA(n){return!!(qt(n)&&n.add)}function sf(n,a){const i=n.getValue("willChange");if(aA(i))return i.add(a)}function _b(n){return n.props[sb]}function ih(n){let a;return()=>(a===void 0&&(a=n()),a)}const sA=ih(()=>window.ScrollTimeline!==void 0);class iA{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(sA()&&r.attachTimeline)return r.attachTimeline(a);if(typeof i=="function")return i(r)});return()=>{o.forEach((r,d)=>{r&&r(),this.animations[d].stop()})}}get time(){return this.getAll("time")}set time(a){this.setAll("time",a)}get speed(){return this.getAll("speed")}set speed(a){this.setAll("speed",a)}get startTime(){return this.getAll("startTime")}get duration(){let a=0;for(let i=0;i<this.animations.length;i++)a=Math.max(a,this.animations[i].duration);return a}runAll(a){this.animations.forEach(i=>i[a]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class lA extends iA{then(a,i){return Promise.all(this.animations).then(a).catch(i)}}const _a=n=>n*1e3,xa=n=>n/1e3;function lh(n){return typeof n=="function"}function Xy(n,a){n.timeline=a,n.onfinish=null}const oh=n=>Array.isArray(n)&&typeof n[0]=="number",oA={linearEasing:void 0};function rA(n,a){const i=ih(n);return()=>{var o;return(o=oA[a])!==null&&o!==void 0?o:i()}}const Hr=rA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ri=(n,a,i)=>{const o=a-n;return o===0?1:(i-n)/o},xb=(n,a,i=10)=>{let o="";const r=Math.max(Math.round(a/i),2);for(let d=0;d<r;d++)o+=n(Ri(0,r-1,d))+", ";return`linear(${o.substring(0,o.length-2)})`};function Tb(n){return!!(typeof n=="function"&&Hr()||!n||typeof n=="string"&&(n in lf||Hr())||oh(n)||Array.isArray(n)&&n.every(Tb))}const Ul=([n,a,i,o])=>`cubic-bezier(${n}, ${a}, ${i}, ${o})`,lf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ul([0,.65,.55,1]),circOut:Ul([.55,0,1,.45]),backIn:Ul([.31,.01,.66,-.59]),backOut:Ul([.33,1.53,.69,.99])};function Eb(n,a){if(n)return typeof n=="function"&&Hr()?xb(n,a):oh(n)?Ul(n):Array.isArray(n)?n.map(i=>Eb(i,a)||lf.easeOut):lf[n]}const Cb=(n,a,i)=>(((1-3*i+3*a)*n+(3*i-6*a))*n+3*a)*n,cA=1e-7,uA=12;function dA(n,a,i,o,r){let d,u,p=0;do u=a+(i-a)/2,d=Cb(u,o,r)-n,d>0?i=u:a=u;while(Math.abs(d)>cA&&++p<uA);return u}function io(n,a,i,o){if(n===a&&i===o)return pn;const r=d=>dA(d,0,1,n,i);return d=>d===0||d===1?d:Cb(r(d),a,o)}const Ab=n=>a=>a<=.5?n(2*a)/2:(2-n(2*(1-a)))/2,jb=n=>a=>1-n(1-a),Nb=io(.33,1.53,.69,.99),rh=jb(Nb),wb=Ab(rh),Db=n=>(n*=2)<1?.5*rh(n):.5*(2-Math.pow(2,-10*(n-1))),ch=n=>1-Math.sin(Math.acos(n)),kb=jb(ch),Mb=Ab(ch),Rb=n=>/^0[^.\s]+$/u.test(n);function fA(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Rb(n):!0}const Pl=n=>Math.round(n*1e5)/1e5,uh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hA(n){return n==null}const pA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,dh=(n,a)=>i=>!!(typeof i=="string"&&pA.test(i)&&i.startsWith(n)||a&&!hA(i)&&Object.prototype.hasOwnProperty.call(i,a)),Ob=(n,a,i)=>o=>{if(typeof o!="string")return o;const[r,d,u,p]=o.match(uh);return{[n]:parseFloat(r),[a]:parseFloat(d),[i]:parseFloat(u),alpha:p!==void 0?parseFloat(p):1}},mA=n=>Ea(0,255,n),kd={...Ui,transform:n=>Math.round(mA(n))},Ms={test:dh("rgb","red"),parse:Ob("red","green","blue"),transform:({red:n,green:a,blue:i,alpha:o=1})=>"rgba("+kd.transform(n)+", "+kd.transform(a)+", "+kd.transform(i)+", "+Pl(Ql.transform(o))+")"};function gA(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 of={test:dh("#"),parse:gA,transform:Ms.transform},Ai={test:dh("hsl","hue"),parse:Ob("hue","saturation","lightness"),transform:({hue:n,saturation:a,lightness:i,alpha:o=1})=>"hsla("+Math.round(n)+", "+Qn.transform(Pl(a))+", "+Qn.transform(Pl(i))+", "+Pl(Ql.transform(o))+")"},$t={test:n=>Ms.test(n)||of.test(n)||Ai.test(n),parse:n=>Ms.test(n)?Ms.parse(n):Ai.test(n)?Ai.parse(n):of.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?Ms.transform(n):Ai.transform(n)},yA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vA(n){var a,i;return isNaN(n)&&typeof n=="string"&&(((a=n.match(uh))===null||a===void 0?void 0:a.length)||0)+(((i=n.match(yA))===null||i===void 0?void 0:i.length)||0)>0}const Bb="number",Lb="color",bA="var",SA="var(",Qy="${}",_A=/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 Wl(n){const a=n.toString(),i=[],o={color:[],number:[],var:[]},r=[];let d=0;const p=a.replace(_A,m=>($t.test(m)?(o.color.push(d),r.push(Lb),i.push($t.parse(m))):m.startsWith(SA)?(o.var.push(d),r.push(bA),i.push(m)):(o.number.push(d),r.push(Bb),i.push(parseFloat(m))),++d,Qy)).split(Qy);return{values:i,split:p,indexes:o,types:r}}function Ib(n){return Wl(n).values}function Ub(n){const{split:a,types:i}=Wl(n),o=a.length;return r=>{let d="";for(let u=0;u<o;u++)if(d+=a[u],r[u]!==void 0){const p=i[u];p===Bb?d+=Pl(r[u]):p===Lb?d+=$t.transform(r[u]):d+=r[u]}return d}}const xA=n=>typeof n=="number"?0:n;function TA(n){const a=Ib(n);return Ub(n)(a.map(xA))}const ss={test:vA,parse:Ib,createTransformer:Ub,getAnimatableNone:TA},EA=new Set(["brightness","contrast","saturate","opacity"]);function CA(n){const[a,i]=n.slice(0,-1).split("(");if(a==="drop-shadow")return n;const[o]=i.match(uh)||[];if(!o)return n;const r=i.replace(o,"");let d=EA.has(a)?1:0;return o!==i&&(d*=100),a+"("+d+r+")"}const AA=/\b([a-z-]*)\(.*?\)/gu,rf={...ss,getAnimatableNone:n=>{const a=n.match(AA);return a?a.map(CA).join(" "):n}},jA={...Zf,color:$t,backgroundColor:$t,outlineColor:$t,fill:$t,stroke:$t,borderColor:$t,borderTopColor:$t,borderRightColor:$t,borderBottomColor:$t,borderLeftColor:$t,filter:rf,WebkitFilter:rf},fh=n=>jA[n];function zb(n,a){let i=fh(n);return i!==rf&&(i=ss),i.getAnimatableNone?i.getAnimatableNone(a):void 0}const NA=new Set(["auto","none","0"]);function wA(n,a,i){let o=0,r;for(;o<n.length&&!r;){const d=n[o];typeof d=="string"&&!NA.has(d)&&Wl(d).values.length&&(r=n[o]),o++}if(r&&i)for(const d of a)n[d]=zb(i,r)}const Jy=n=>n===Ui||n===me,Wy=(n,a)=>parseFloat(n.split(", ")[a]),ev=(n,a)=>(i,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return Wy(r[1],a);{const d=o.match(/^matrix\((.+)\)$/u);return d?Wy(d[1],n):0}},DA=new Set(["x","y","z"]),kA=Ii.filter(n=>!DA.has(n));function MA(n){const a=[];return kA.forEach(i=>{const o=n.getValue(i);o!==void 0&&(a.push([i,o.get()]),o.set(i.startsWith("scale")?1:0))}),a}const Oi={width:({x:n},{paddingLeft:a="0",paddingRight:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),height:({y:n},{paddingTop:a="0",paddingBottom:i="0"})=>n.max-n.min-parseFloat(a)-parseFloat(i),top:(n,{top:a})=>parseFloat(a),left:(n,{left:a})=>parseFloat(a),bottom:({y:n},{top:a})=>parseFloat(a)+(n.max-n.min),right:({x:n},{left:a})=>parseFloat(a)+(n.max-n.min),x:ev(4,13),y:ev(5,14)};Oi.translateX=Oi.x;Oi.translateY=Oi.y;const Rs=new Set;let cf=!1,uf=!1;function Vb(){if(uf){const n=Array.from(Rs).filter(o=>o.needsMeasurement),a=new Set(n.map(o=>o.element)),i=new Map;a.forEach(o=>{const r=MA(o);r.length&&(i.set(o,r),o.render())}),n.forEach(o=>o.measureInitialState()),a.forEach(o=>{o.render();const r=i.get(o);r&&r.forEach(([d,u])=>{var p;(p=o.getValue(d))===null||p===void 0||p.set(u)})}),n.forEach(o=>o.measureEndState()),n.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}uf=!1,cf=!1,Rs.forEach(n=>n.complete()),Rs.clear()}function Hb(){Rs.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(uf=!0)})}function RA(){Hb(),Vb()}class hh{constructor(a,i,o,r,d,u=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...a],this.onComplete=i,this.name=o,this.motionValue=r,this.element=d,this.isAsync=u}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Rs.add(this),cf||(cf=!0,lt.read(Hb),lt.resolveKeyframes(Vb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:a,name:i,element:o,motionValue:r}=this;for(let d=0;d<a.length;d++)if(a[d]===null)if(d===0){const u=r==null?void 0:r.get(),p=a[a.length-1];if(u!==void 0)a[0]=u;else if(o&&i){const m=o.readValue(i,p);m!=null&&(a[0]=m)}a[0]===void 0&&(a[0]=p),r&&u===void 0&&r.set(a[0])}else a[d]=a[d-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Rs.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Rs.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Pb=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),OA=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function BA(n){const a=OA.exec(n);if(!a)return[,];const[,i,o,r]=a;return[`--${i??o}`,r]}function Gb(n,a,i=1){const[o,r]=BA(n);if(!o)return;const d=window.getComputedStyle(a).getPropertyValue(o);if(d){const u=d.trim();return Pb(u)?parseFloat(u):u}return Kf(r)?Gb(r,a,i+1):r}const Fb=n=>a=>a.test(n),LA={test:n=>n==="auto",parse:n=>n},$b=[Ui,me,Qn,Ja,MC,kC,LA],tv=n=>$b.find(Fb(n));class qb extends hh{constructor(a,i,o,r,d){super(a,i,o,r,d,!0)}readKeyframes(){const{unresolvedKeyframes:a,element:i,name:o}=this;if(!i||!i.current)return;super.readKeyframes();for(let m=0;m<a.length;m++){let g=a[m];if(typeof g=="string"&&(g=g.trim(),Kf(g))){const v=Gb(g,i.current);v!==void 0&&(a[m]=v),m===a.length-1&&(this.finalKeyframe=g)}}if(this.resolveNoneKeyframes(),!bb.has(o)||a.length!==2)return;const[r,d]=a,u=tv(r),p=tv(d);if(u!==p)if(Jy(u)&&Jy(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++)fA(a[r])&&o.push(r);o.length&&wA(a,o,i)}measureInitialState(){const{element:a,unresolvedKeyframes:i,name:o}=this;if(!a||!a.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Oi[o](a.measureViewportBox(),window.getComputedStyle(a.current)),i[0]=this.measuredOrigin;const r=i[i.length-1];r!==void 0&&a.getValue(o,r).jump(r,!1)}measureEndState(){var a;const{element:i,name:o,unresolvedKeyframes:r}=this;if(!i||!i.current)return;const d=i.getValue(o);d&&d.jump(this.measuredOrigin,!1);const u=r.length-1,p=r[u];r[u]=Oi[o](i.measureViewportBox(),window.getComputedStyle(i.current)),p!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=p),!((a=this.removedTransforms)===null||a===void 0)&&a.length&&this.removedTransforms.forEach(([m,g])=>{i.getValue(m).set(g)}),this.resolveNoneKeyframes()}}const nv=(n,a)=>a==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(ss.test(n)||n==="0")&&!n.startsWith("url("));function IA(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 UA(n,a,i,o){const r=n[0];if(r===null)return!1;if(a==="display"||a==="visibility")return!0;const d=n[n.length-1],u=nv(r,a),p=nv(d,a);return!u||!p?!1:IA(n)||(i==="spring"||lh(i))&&o}const zA=n=>n!==null;function oc(n,{repeat:a,repeatType:i="loop"},o){const r=n.filter(zA),d=a&&i!=="loop"&&a%2===1?0:r.length-1;return!d||o===void 0?r[d]:o}const VA=40;class Yb{constructor({autoplay:a=!0,delay:i=0,type:o="keyframes",repeat:r=0,repeatDelay:d=0,repeatType:u="loop",...p}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Jn.now(),this.options={autoplay:a,delay:i,type:o,repeat:r,repeatDelay:d,repeatType:u,...p},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>VA?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&RA(),this._resolved}onKeyframesResolved(a,i){this.resolvedAt=Jn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:d,delay:u,onComplete:p,onUpdate:m,isGenerator:g}=this.options;if(!g&&!UA(a,o,r,d))if(u)this.options.duration=0;else{m&&m(oc(a,this.options,i)),p&&p(),this.resolveFinishedPromise();return}const v=this.initPlayback(a,i);v!==!1&&(this._resolved={keyframes:a,finalKeyframe:i,...v},this.onPostResolved())}onPostResolved(){}then(a,i){return this.currentFinishedPromise.then(a,i)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(a=>{this.resolveFinishedPromise=a})}}const df=2e4;function Kb(n){let a=0;const i=50;let o=n.next(a);for(;!o.done&&a<df;)a+=i,o=n.next(a);return a>=df?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 HA({hue:n,saturation:a,lightness:i,alpha:o}){n/=360,a/=100,i/=100;let r=0,d=0,u=0;if(!a)r=d=u=i;else{const p=i<.5?i*(1+a):i+a-i*a,m=2*i-p;r=Md(m,p,n+1/3),d=Md(m,p,n),u=Md(m,p,n-1/3)}return{red:Math.round(r*255),green:Math.round(d*255),blue:Math.round(u*255),alpha:o}}function Pr(n,a){return i=>i>0?a:n}const Rd=(n,a,i)=>{const o=n*n,r=i*(a*a-o)+o;return r<0?0:Math.sqrt(r)},PA=[of,Ms,Ai],GA=n=>PA.find(a=>a.test(n));function av(n){const a=GA(n);if(!a)return!1;let i=a.parse(n);return a===Ai&&(i=HA(i)),i}const sv=(n,a)=>{const i=av(n),o=av(a);if(!i||!o)return Pr(n,a);const r={...i};return d=>(r.red=Rd(i.red,o.red,d),r.green=Rd(i.green,o.green,d),r.blue=Rd(i.blue,o.blue,d),r.alpha=ut(i.alpha,o.alpha,d),Ms.transform(r))},FA=(n,a)=>i=>a(n(i)),lo=(...n)=>n.reduce(FA),ff=new Set(["none","hidden"]);function $A(n,a){return ff.has(n)?i=>i<=0?n:a:i=>i>=1?a:n}function qA(n,a){return i=>ut(n,a,i)}function ph(n){return typeof n=="number"?qA:typeof n=="string"?Kf(n)?Pr:$t.test(n)?sv:ZA:Array.isArray(n)?Zb:typeof n=="object"?$t.test(n)?sv:YA:Pr}function Zb(n,a){const i=[...n],o=i.length,r=n.map((d,u)=>ph(d)(d,a[u]));return d=>{for(let u=0;u<o;u++)i[u]=r[u](d);return i}}function YA(n,a){const i={...n,...a},o={};for(const r in i)n[r]!==void 0&&a[r]!==void 0&&(o[r]=ph(n[r])(n[r],a[r]));return r=>{for(const d in o)i[d]=o[d](r);return i}}function KA(n,a){var i;const o=[],r={color:0,var:0,number:0};for(let d=0;d<a.values.length;d++){const u=a.types[d],p=n.indexes[u][r[u]],m=(i=n.values[p])!==null&&i!==void 0?i:0;o[d]=m,r[u]++}return o}const ZA=(n,a)=>{const i=ss.createTransformer(a),o=Wl(n),r=Wl(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?ff.has(n)&&!r.values.length||ff.has(a)&&!o.values.length?$A(n,a):lo(Zb(KA(o,r),r.values),i):Pr(n,a)};function Xb(n,a,i){return typeof n=="number"&&typeof a=="number"&&typeof i=="number"?ut(n,a,i):ph(n)(n,a)}const XA=5;function Qb(n,a,i){const o=Math.max(a-XA,0);return Sb(i-n(o),a-o)}const yt={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 QA({duration:n=yt.duration,bounce:a=yt.bounce,velocity:i=yt.velocity,mass:o=yt.mass}){let r,d,u=1-a;u=Ea(yt.minDamping,yt.maxDamping,u),n=Ea(yt.minDuration,yt.maxDuration,xa(n)),u<1?(r=g=>{const v=g*u,y=v*n,_=v-i,T=hf(g,u),E=Math.exp(-y);return Od-_/T*E},d=g=>{const y=g*u*n,_=y*i+i,T=Math.pow(u,2)*Math.pow(g,2)*n,E=Math.exp(-y),j=hf(Math.pow(g,2),u);return(-r(g)+Od>0?-1:1)*((_-T)*E)/j}):(r=g=>{const v=Math.exp(-g*n),y=(g-i)*n+1;return-Od+v*y},d=g=>{const v=Math.exp(-g*n),y=(i-g)*(n*n);return v*y});const p=5/n,m=WA(r,d,p);if(n=_a(n),isNaN(m))return{stiffness:yt.stiffness,damping:yt.damping,duration:n};{const g=Math.pow(m,2)*o;return{stiffness:g,damping:u*2*Math.sqrt(o*g),duration:n}}}const JA=12;function WA(n,a,i){let o=i;for(let r=1;r<JA;r++)o=o-n(o)/a(o);return o}function hf(n,a){return n*Math.sqrt(1-a*a)}const ej=["duration","bounce"],tj=["stiffness","damping","mass"];function iv(n,a){return a.some(i=>n[i]!==void 0)}function nj(n){let a={velocity:yt.velocity,stiffness:yt.stiffness,damping:yt.damping,mass:yt.mass,isResolvedFromDuration:!1,...n};if(!iv(n,tj)&&iv(n,ej))if(n.visualDuration){const i=n.visualDuration,o=2*Math.PI/(i*1.2),r=o*o,d=2*Ea(.05,1,1-(n.bounce||0))*Math.sqrt(r);a={...a,mass:yt.mass,stiffness:r,damping:d}}else{const i=QA(n);a={...a,...i,mass:yt.mass},a.isResolvedFromDuration=!0}return a}function Jb(n=yt.visualDuration,a=yt.bounce){const i=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:a}:n;let{restSpeed:o,restDelta:r}=i;const d=i.keyframes[0],u=i.keyframes[i.keyframes.length-1],p={done:!1,value:d},{stiffness:m,damping:g,mass:v,duration:y,velocity:_,isResolvedFromDuration:T}=nj({...i,velocity:-xa(i.velocity||0)}),E=_||0,j=g/(2*Math.sqrt(m*v)),N=u-d,C=xa(Math.sqrt(m/v)),A=Math.abs(N)<5;o||(o=A?yt.restSpeed.granular:yt.restSpeed.default),r||(r=A?yt.restDelta.granular:yt.restDelta.default);let k;if(j<1){const O=hf(C,j);k=$=>{const G=Math.exp(-j*C*$);return u-G*((E+j*C*N)/O*Math.sin(O*$)+N*Math.cos(O*$))}}else if(j===1)k=O=>u-Math.exp(-C*O)*(N+(E+C*N)*O);else{const O=C*Math.sqrt(j*j-1);k=$=>{const G=Math.exp(-j*C*$),M=Math.min(O*$,300);return u-G*((E+j*C*N)*Math.sinh(M)+O*N*Math.cosh(M))/O}}const H={calculatedDuration:T&&y||null,next:O=>{const $=k(O);if(T)p.done=O>=y;else{let G=0;j<1&&(G=O===0?_a(E):Qb(k,O,$));const M=Math.abs(G)<=o,V=Math.abs(u-$)<=r;p.done=M&&V}return p.value=p.done?u:$,p},toString:()=>{const O=Math.min(Kb(H),df),$=xb(G=>H.next(O*G).value,O,30);return O+"ms "+$}};return H}function lv({keyframes:n,velocity:a=0,power:i=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:d=500,modifyTarget:u,min:p,max:m,restDelta:g=.5,restSpeed:v}){const y=n[0],_={done:!1,value:y},T=M=>p!==void 0&&M<p||m!==void 0&&M>m,E=M=>p===void 0?m:m===void 0||Math.abs(p-M)<Math.abs(m-M)?p:m;let j=i*a;const N=y+j,C=u===void 0?N:u(N);C!==N&&(j=C-y);const A=M=>-j*Math.exp(-M/o),k=M=>C+A(M),H=M=>{const V=A(M),te=k(M);_.done=Math.abs(V)<=g,_.value=_.done?C:te};let O,$;const G=M=>{T(_.value)&&(O=M,$=Jb({keyframes:[_.value,E(_.value)],velocity:Qb(k,M,_.value),damping:r,stiffness:d,restDelta:g,restSpeed:v}))};return G(0),{calculatedDuration:null,next:M=>{let V=!1;return!$&&O===void 0&&(V=!0,H(M),G(M)),O!==void 0&&M>=O?$.next(M-O):(!V&&H(M),_)}}}const aj=io(.42,0,1,1),sj=io(0,0,.58,1),Wb=io(.42,0,.58,1),ij=n=>Array.isArray(n)&&typeof n[0]!="number",lj={linear:pn,easeIn:aj,easeInOut:Wb,easeOut:sj,circIn:ch,circInOut:Mb,circOut:kb,backIn:rh,backInOut:wb,backOut:Nb,anticipate:Db},ov=n=>{if(oh(n)){W0(n.length===4);const[a,i,o,r]=n;return io(a,i,o,r)}else if(typeof n=="string")return lj[n];return n};function oj(n,a,i){const o=[],r=i||Xb,d=n.length-1;for(let u=0;u<d;u++){let p=r(n[u],n[u+1]);if(a){const m=Array.isArray(a)?a[u]||pn:a;p=lo(m,p)}o.push(p)}return o}function rj(n,a,{clamp:i=!0,ease:o,mixer:r}={}){const d=n.length;if(W0(d===a.length),d===1)return()=>a[0];if(d===2&&a[0]===a[1])return()=>a[1];const u=n[0]===n[1];n[0]>n[d-1]&&(n=[...n].reverse(),a=[...a].reverse());const p=oj(a,o,r),m=p.length,g=v=>{if(u&&v<n[0])return a[0];let y=0;if(m>1)for(;y<n.length-2&&!(v<n[y+1]);y++);const _=Ri(n[y],n[y+1],v);return p[y](_)};return i?v=>g(Ea(n[0],n[d-1],v)):g}function cj(n,a){const i=n[n.length-1];for(let o=1;o<=a;o++){const r=Ri(0,a,o);n.push(ut(i,1,r))}}function uj(n){const a=[0];return cj(a,n.length-1),a}function dj(n,a){return n.map(i=>i*a)}function fj(n,a){return n.map(()=>a||Wb).splice(0,n.length-1)}function Gr({duration:n=300,keyframes:a,times:i,ease:o="easeInOut"}){const r=ij(o)?o.map(ov):ov(o),d={done:!1,value:a[0]},u=dj(i&&i.length===a.length?i:uj(a),n),p=rj(u,a,{ease:Array.isArray(r)?r:fj(a,r)});return{calculatedDuration:n,next:m=>(d.value=p(m),d.done=m>=n,d)}}const hj=n=>{const a=({timestamp:i})=>n(i);return{start:()=>lt.update(a,!0),stop:()=>as(a),now:()=>Ft.isProcessing?Ft.timestamp:Jn.now()}},pj={decay:lv,inertia:lv,tween:Gr,keyframes:Gr,spring:Jb},mj=n=>n/100;class mh extends Yb{constructor(a){super(a),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:m}=this.options;m&&m()};const{name:i,motionValue:o,element:r,keyframes:d}=this.options,u=(r==null?void 0:r.KeyframeResolver)||hh,p=(m,g)=>this.onKeyframesResolved(m,g);this.resolver=new u(d,p,i,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(a){const{type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:d,velocity:u=0}=this.options,p=lh(i)?i:pj[i]||Gr;let m,g;p!==Gr&&typeof a[0]!="number"&&(m=lo(mj,Xb(a[0],a[1])),a=[0,100]);const v=p({...this.options,keyframes:a});d==="mirror"&&(g=p({...this.options,keyframes:[...a].reverse(),velocity:-u})),v.calculatedDuration===null&&(v.calculatedDuration=Kb(v));const{calculatedDuration:y}=v,_=y+r,T=_*(o+1)-r;return{generator:v,mirroredGenerator:g,mapPercentToKeyframes:m,calculatedDuration:y,resolvedDuration:_,totalDuration:T}}onPostResolved(){const{autoplay:a=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!a?this.pause():this.state=this.pendingPlayState}tick(a,i=!1){const{resolved:o}=this;if(!o){const{keyframes:M}=this.options;return{done:!0,value:M[M.length-1]}}const{finalKeyframe:r,generator:d,mirroredGenerator:u,mapPercentToKeyframes:p,keyframes:m,calculatedDuration:g,totalDuration:v,resolvedDuration:y}=o;if(this.startTime===null)return d.next(0);const{delay:_,repeat:T,repeatType:E,repeatDelay:j,onUpdate:N}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,a):this.speed<0&&(this.startTime=Math.min(a-v/this.speed,this.startTime)),i?this.currentTime=a:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(a-this.startTime)*this.speed;const C=this.currentTime-_*(this.speed>=0?1:-1),A=this.speed>=0?C<0:C>v;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let k=this.currentTime,H=d;if(T){const M=Math.min(this.currentTime,v)/y;let V=Math.floor(M),te=M%1;!te&&M>=1&&(te=1),te===1&&V--,V=Math.min(V,T+1),!!(V%2)&&(E==="reverse"?(te=1-te,j&&(te-=j/y)):E==="mirror"&&(H=u)),k=Ea(0,1,te)*y}const O=A?{done:!1,value:m[0]}:H.next(k);p&&(O.value=p(O.value));let{done:$}=O;!A&&g!==null&&($=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const G=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&$);return G&&r!==void 0&&(O.value=oc(m,this.options,r)),N&&N(O.value),G&&this.finish(),O}get duration(){const{resolved:a}=this;return a?xa(a.calculatedDuration):0}get time(){return xa(this.currentTime)}set time(a){a=_a(a),this.currentTime=a,this.holdTime!==null||this.speed===0?this.holdTime=a:this.driver&&(this.startTime=this.driver.now()-a/this.speed)}get speed(){return this.playbackSpeed}set speed(a){const i=this.playbackSpeed!==a;this.playbackSpeed=a,i&&(this.time=xa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:a=hj,onPlay:i,startTime:o}=this.options;this.driver||(this.driver=a(d=>this.tick(d))),i&&i();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var a;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(a=this.currentTime)!==null&&a!==void 0?a:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:a}=this.options;a&&a()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(a){return this.startTime=0,this.tick(a,!0)}}const gj=new Set(["opacity","clipPath","filter","transform"]);function yj(n,a,i,{delay:o=0,duration:r=300,repeat:d=0,repeatType:u="loop",ease:p="easeInOut",times:m}={}){const g={[a]:i};m&&(g.offset=m);const v=Eb(p,r);return Array.isArray(v)&&(g.easing=v),n.animate(g,{delay:o,duration:r,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:d+1,direction:u==="reverse"?"alternate":"normal"})}const vj=ih(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Fr=10,bj=2e4;function Sj(n){return lh(n.type)||n.type==="spring"||!Tb(n.ease)}function _j(n,a){const i=new mh({...a,keyframes:n,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:n[0]};const r=[];let d=0;for(;!o.done&&d<bj;)o=i.sample(d),r.push(o.value),d+=Fr;return{times:void 0,keyframes:r,duration:d-Fr,ease:"linear"}}const e1={anticipate:Db,backInOut:wb,circInOut:Mb};function xj(n){return n in e1}class rv extends Yb{constructor(a){super(a);const{name:i,motionValue:o,element:r,keyframes:d}=this.options;this.resolver=new qb(d,(u,p)=>this.onKeyframesResolved(u,p),i,o,r),this.resolver.scheduleResolve()}initPlayback(a,i){let{duration:o=300,times:r,ease:d,type:u,motionValue:p,name:m,startTime:g}=this.options;if(!p.owner||!p.owner.current)return!1;if(typeof d=="string"&&Hr()&&xj(d)&&(d=e1[d]),Sj(this.options)){const{onComplete:y,onUpdate:_,motionValue:T,element:E,...j}=this.options,N=_j(a,j);a=N.keyframes,a.length===1&&(a[1]=a[0]),o=N.duration,r=N.times,d=N.ease,u="keyframes"}const v=yj(p.owner.current,m,a,{...this.options,duration:o,times:r,ease:d});return v.startTime=g??this.calcStartTime(),this.pendingTimeline?(Xy(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:y}=this.options;p.set(oc(a,this.options,i)),y&&y(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:o,times:r,type:u,ease:d,keyframes:a}}get duration(){const{resolved:a}=this;if(!a)return 0;const{duration:i}=a;return xa(i)}get time(){const{resolved:a}=this;if(!a)return 0;const{animation:i}=a;return xa(i.currentTime||0)}set time(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.currentTime=_a(a)}get speed(){const{resolved:a}=this;if(!a)return 1;const{animation:i}=a;return i.playbackRate}set speed(a){const{resolved:i}=this;if(!i)return;const{animation:o}=i;o.playbackRate=a}get state(){const{resolved:a}=this;if(!a)return"idle";const{animation:i}=a;return i.playState}get startTime(){const{resolved:a}=this;if(!a)return null;const{animation:i}=a;return i.startTime}attachTimeline(a){if(!this._resolved)this.pendingTimeline=a;else{const{resolved:i}=this;if(!i)return pn;const{animation:o}=i;Xy(o,a)}return pn}play(){if(this.isStopped)return;const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.playState==="finished"&&this.updateFinishedPromise(),i.play()}pause(){const{resolved:a}=this;if(!a)return;const{animation:i}=a;i.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:a}=this;if(!a)return;const{animation:i,keyframes:o,duration:r,type:d,ease:u,times:p}=a;if(i.playState==="idle"||i.playState==="finished")return;if(this.time){const{motionValue:g,onUpdate:v,onComplete:y,element:_,...T}=this.options,E=new mh({...T,keyframes:o,duration:r,type:d,ease:u,times:p,isGenerator:!0}),j=_a(this.time);g.setWithVelocity(E.sample(j-Fr).value,E.sample(j).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:d,damping:u,type:p}=a;if(!i||!i.owner||!(i.owner.current instanceof HTMLElement))return!1;const{onUpdate:m,transformTemplate:g}=i.owner.getProps();return vj()&&o&&gj.has(o)&&!m&&!g&&!r&&d!=="mirror"&&u!==0&&p!=="inertia"}}const Tj={type:"spring",stiffness:500,damping:25,restSpeed:10},Ej=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Cj={type:"keyframes",duration:.8},Aj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jj=(n,{keyframes:a})=>a.length>2?Cj:Is.has(n)?n.startsWith("scale")?Ej(a[1]):Tj:Aj;function Nj({when:n,delay:a,delayChildren:i,staggerChildren:o,staggerDirection:r,repeat:d,repeatType:u,repeatDelay:p,from:m,elapsed:g,...v}){return!!Object.keys(v).length}const gh=(n,a,i,o={},r,d)=>u=>{const p=th(o,n)||{},m=p.delay||o.delay||0;let{elapsed:g=0}=o;g=g-_a(m);let v={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:a.getVelocity(),...p,delay:-g,onUpdate:_=>{a.set(_),p.onUpdate&&p.onUpdate(_)},onComplete:()=>{u(),p.onComplete&&p.onComplete()},name:n,motionValue:a,element:d?void 0:r};Nj(p)||(v={...v,...jj(n,v)}),v.duration&&(v.duration=_a(v.duration)),v.repeatDelay&&(v.repeatDelay=_a(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let y=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(y=!0)),y&&!d&&a.get()!==void 0){const _=oc(v.keyframes,p);if(_!==void 0)return lt.update(()=>{v.onUpdate(_),v.onComplete()}),new lA([])}return!d&&rv.supports(v)?new rv(v):new mh(v)};function wj({protectedKeys:n,needsAnimating:a},i){const o=n.hasOwnProperty(i)&&a[i]!==!0;return a[i]=!1,o}function t1(n,a,{delay:i=0,transitionOverride:o,type:r}={}){var d;let{transition:u=n.getDefaultTransition(),transitionEnd:p,...m}=a;o&&(u=o);const g=[],v=r&&n.animationState&&n.animationState.getState()[r];for(const y in m){const _=n.getValue(y,(d=n.latestValues[y])!==null&&d!==void 0?d:null),T=m[y];if(T===void 0||v&&wj(v,y))continue;const E={delay:i,...th(u||{},y)};let j=!1;if(window.MotionHandoffAnimation){const C=_b(n);if(C){const A=window.MotionHandoffAnimation(C,y,lt);A!==null&&(E.startTime=A,j=!0)}}sf(n,y),_.start(gh(y,_,T,n.shouldReduceMotion&&bb.has(y)?{type:!1}:E,n,j));const N=_.animation;N&&g.push(N)}return p&&Promise.all(g).then(()=>{lt.update(()=>{p&&nA(n,p)})}),g}function pf(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:d=n.getDefaultTransition()||{}}=r||{};i.transitionOverride&&(d=i.transitionOverride);const u=r?()=>Promise.all(t1(n,r,i)):()=>Promise.resolve(),p=n.variantChildren&&n.variantChildren.size?(g=0)=>{const{delayChildren:v=0,staggerChildren:y,staggerDirection:_}=d;return Dj(n,a,v+g,y,_,i)}:()=>Promise.resolve(),{when:m}=d;if(m){const[g,v]=m==="beforeChildren"?[u,p]:[p,u];return g().then(()=>v())}else return Promise.all([u(),p(i.delay)])}function Dj(n,a,i=0,o=0,r=1,d){const u=[],p=(n.variantChildren.size-1)*o,m=r===1?(g=0)=>g*o:(g=0)=>p-g*o;return Array.from(n.variantChildren).sort(kj).forEach((g,v)=>{g.notify("AnimationStart",a),u.push(pf(g,a,{...d,delay:i+m(v)}).then(()=>g.notify("AnimationComplete",a)))}),Promise.all(u)}function kj(n,a){return n.sortNodePosition(a)}function Mj(n,a,i={}){n.notify("AnimationStart",a);let o;if(Array.isArray(a)){const r=a.map(d=>pf(n,d,i));o=Promise.all(r)}else if(typeof a=="string")o=pf(n,a,i);else{const r=typeof a=="function"?lc(n,a,i.custom):a;o=Promise.all(t1(n,r,i))}return o.then(()=>{n.notify("AnimationComplete",a)})}const Rj=Gf.length;function n1(n){if(!n)return;if(!n.isControllingVariants){const i=n.parent?n1(n.parent)||{}:{};return n.props.initial!==void 0&&(i.initial=n.props.initial),i}const a={};for(let i=0;i<Rj;i++){const o=Gf[i],r=n.props[o];(Xl(r)||r===!1)&&(a[o]=r)}return a}const Oj=[...Pf].reverse(),Bj=Pf.length;function Lj(n){return a=>Promise.all(a.map(({animation:i,options:o})=>Mj(n,i,o)))}function Ij(n){let a=Lj(n),i=cv(),o=!0;const r=m=>(g,v)=>{var y;const _=lc(n,v,m==="exit"?(y=n.presenceContext)===null||y===void 0?void 0:y.custom:void 0);if(_){const{transition:T,transitionEnd:E,...j}=_;g={...g,...j,...E}}return g};function d(m){a=m(n)}function u(m){const{props:g}=n,v=n1(n.parent)||{},y=[],_=new Set;let T={},E=1/0;for(let N=0;N<Bj;N++){const C=Oj[N],A=i[C],k=g[C]!==void 0?g[C]:v[C],H=Xl(k),O=C===m?A.isActive:null;O===!1&&(E=N);let $=k===v[C]&&k!==g[C]&&H;if($&&o&&n.manuallyAnimateOnMount&&($=!1),A.protectedKeys={...T},!A.isActive&&O===null||!k&&!A.prevProp||sc(k)||typeof k=="boolean")continue;const G=Uj(A.prevProp,k);let M=G||C===m&&A.isActive&&!$&&H||N>E&&H,V=!1;const te=Array.isArray(k)?k:[k];let ne=te.reduce(r(C),{});O===!1&&(ne={});const{prevResolvedValues:ae={}}=A,re={...ae,...ne},Y=F=>{M=!0,_.has(F)&&(V=!0,_.delete(F)),A.needsAnimating[F]=!0;const W=n.getValue(F);W&&(W.liveStyle=!1)};for(const F in re){const W=ne[F],be=ae[F];if(T.hasOwnProperty(F))continue;let Te=!1;af(W)&&af(be)?Te=!vb(W,be):Te=W!==be,Te?W!=null?Y(F):_.add(F):W!==void 0&&_.has(F)?Y(F):A.protectedKeys[F]=!0}A.prevProp=k,A.prevResolvedValues=ne,A.isActive&&(T={...T,...ne}),o&&n.blockInitialAnimation&&(M=!1),M&&(!($&&G)||V)&&y.push(...te.map(F=>({animation:F,options:{type:C}})))}if(_.size){const N={};_.forEach(C=>{const A=n.getBaseTarget(C),k=n.getValue(C);k&&(k.liveStyle=!0),N[C]=A??null}),y.push({animation:N})}let j=!!y.length;return o&&(g.initial===!1||g.initial===g.animate)&&!n.manuallyAnimateOnMount&&(j=!1),o=!1,j?a(y):Promise.resolve()}function p(m,g){var v;if(i[m].isActive===g)return Promise.resolve();(v=n.variantChildren)===null||v===void 0||v.forEach(_=>{var T;return(T=_.animationState)===null||T===void 0?void 0:T.setActive(m,g)}),i[m].isActive=g;const y=u(m);for(const _ in i)i[_].protectedKeys={};return y}return{animateChanges:u,setActive:p,setAnimateFunction:d,getState:()=>i,reset:()=>{i=cv(),o=!0}}}function Uj(n,a){return typeof a=="string"?a!==n:Array.isArray(a)?!vb(a,n):!1}function As(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function cv(){return{animate:As(!0),whileInView:As(),whileHover:As(),whileTap:As(),whileDrag:As(),whileFocus:As(),exit:As()}}class ls{constructor(a){this.isMounted=!1,this.node=a}update(){}}class zj extends ls{constructor(a){super(a),a.animationState||(a.animationState=Ij(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 Vj=0;class Hj extends ls{constructor(){super(...arguments),this.id=Vj++}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 Pj={animation:{Feature:zj},exit:{Feature:Hj}},zn={x:!1,y:!1};function a1(){return zn.x||zn.y}function Gj(n){return n==="x"||n==="y"?zn[n]?null:(zn[n]=!0,()=>{zn[n]=!1}):zn.x||zn.y?null:(zn.x=zn.y=!0,()=>{zn.x=zn.y=!1})}const yh=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function eo(n,a,i,o={passive:!0}){return n.addEventListener(a,i,o),()=>n.removeEventListener(a,i)}function oo(n){return{point:{x:n.pageX,y:n.pageY}}}const Fj=n=>a=>yh(a)&&n(a,oo(a));function Gl(n,a,i,o){return eo(n,a,Fj(i),o)}const uv=(n,a)=>Math.abs(n-a);function $j(n,a){const i=uv(n.x,a.x),o=uv(n.y,a.y);return Math.sqrt(i**2+o**2)}class s1{constructor(a,i,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:d=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Ld(this.lastMoveEventInfo,this.history),_=this.startEvent!==null,T=$j(y.offset,{x:0,y:0})>=3;if(!_&&!T)return;const{point:E}=y,{timestamp:j}=Ft;this.history.push({...E,timestamp:j});const{onStart:N,onMove:C}=this.handlers;_||(N&&N(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,y)},this.handlePointerMove=(y,_)=>{this.lastMoveEvent=y,this.lastMoveEventInfo=Bd(_,this.transformPagePoint),lt.update(this.updatePoint,!0)},this.handlePointerUp=(y,_)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:j}=this.handlers;if(this.dragSnapToOrigin&&j&&j(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const N=Ld(y.type==="pointercancel"?this.lastMoveEventInfo:Bd(_,this.transformPagePoint),this.history);this.startEvent&&T&&T(y,N),E&&E(y,N)},!yh(a))return;this.dragSnapToOrigin=d,this.handlers=i,this.transformPagePoint=o,this.contextWindow=r||window;const u=oo(a),p=Bd(u,this.transformPagePoint),{point:m}=p,{timestamp:g}=Ft;this.history=[{...m,timestamp:g}];const{onSessionStart:v}=i;v&&v(a,Ld(p,this.history)),this.removeListeners=lo(Gl(this.contextWindow,"pointermove",this.handlePointerMove),Gl(this.contextWindow,"pointerup",this.handlePointerUp),Gl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(a){this.handlers=a}end(){this.removeListeners&&this.removeListeners(),as(this.updatePoint)}}function Bd(n,a){return a?{point:a(n.point)}:n}function dv(n,a){return{x:n.x-a.x,y:n.y-a.y}}function Ld({point:n},a){return{point:n,delta:dv(n,i1(a)),offset:dv(n,qj(a)),velocity:Yj(a,.1)}}function qj(n){return n[0]}function i1(n){return n[n.length-1]}function Yj(n,a){if(n.length<2)return{x:0,y:0};let i=n.length-1,o=null;const r=i1(n);for(;i>=0&&(o=n[i],!(r.timestamp-o.timestamp>_a(a)));)i--;if(!o)return{x:0,y:0};const d=xa(r.timestamp-o.timestamp);if(d===0)return{x:0,y:0};const u={x:(r.x-o.x)/d,y:(r.y-o.y)/d};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const l1=1e-4,Kj=1-l1,Zj=1+l1,o1=.01,Xj=0-o1,Qj=0+o1;function mn(n){return n.max-n.min}function Jj(n,a,i){return Math.abs(n-a)<=i}function fv(n,a,i,o=.5){n.origin=o,n.originPoint=ut(a.min,a.max,n.origin),n.scale=mn(i)/mn(a),n.translate=ut(i.min,i.max,n.origin)-n.originPoint,(n.scale>=Kj&&n.scale<=Zj||isNaN(n.scale))&&(n.scale=1),(n.translate>=Xj&&n.translate<=Qj||isNaN(n.translate))&&(n.translate=0)}function Fl(n,a,i,o){fv(n.x,a.x,i.x,o?o.originX:void 0),fv(n.y,a.y,i.y,o?o.originY:void 0)}function hv(n,a,i){n.min=i.min+a.min,n.max=n.min+mn(a)}function Wj(n,a,i){hv(n.x,a.x,i.x),hv(n.y,a.y,i.y)}function pv(n,a,i){n.min=a.min-i.min,n.max=n.min+mn(a)}function $l(n,a,i){pv(n.x,a.x,i.x),pv(n.y,a.y,i.y)}function e2(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 mv(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 t2(n,{top:a,left:i,bottom:o,right:r}){return{x:mv(n.x,i,r),y:mv(n.y,a,o)}}function gv(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 n2(n,a){return{x:gv(n.x,a.x),y:gv(n.y,a.y)}}function a2(n,a){let i=.5;const o=mn(n),r=mn(a);return r>o?i=Ri(a.min,a.max-o,n.min):o>r&&(i=Ri(n.min,n.max-r,a.min)),Ea(0,1,i)}function s2(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 mf=.35;function i2(n=mf){return n===!1?n=0:n===!0&&(n=mf),{x:yv(n,"left","right"),y:yv(n,"top","bottom")}}function yv(n,a,i){return{min:vv(n,a),max:vv(n,i)}}function vv(n,a){return typeof n=="number"?n:n[a]||0}const bv=()=>({translate:0,scale:1,origin:0,originPoint:0}),ji=()=>({x:bv(),y:bv()}),Sv=()=>({min:0,max:0}),Tt=()=>({x:Sv(),y:Sv()});function Nn(n){return[n("x"),n("y")]}function r1({top:n,left:a,right:i,bottom:o}){return{x:{min:a,max:i},y:{min:n,max:o}}}function l2({x:n,y:a}){return{top:a.min,right:n.max,bottom:a.max,left:n.min}}function o2(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 Id(n){return n===void 0||n===1}function gf({scale:n,scaleX:a,scaleY:i}){return!Id(n)||!Id(a)||!Id(i)}function ws(n){return gf(n)||c1(n)||n.z||n.rotate||n.rotateX||n.rotateY||n.skewX||n.skewY}function c1(n){return _v(n.x)||_v(n.y)}function _v(n){return n&&n!=="0%"}function $r(n,a,i){const o=n-i,r=a*o;return i+r}function xv(n,a,i,o,r){return r!==void 0&&(n=$r(n,r,o)),$r(n,i,o)+a}function yf(n,a=0,i=1,o,r){n.min=xv(n.min,a,i,o,r),n.max=xv(n.max,a,i,o,r)}function u1(n,{x:a,y:i}){yf(n.x,a.translate,a.scale,a.originPoint),yf(n.y,i.translate,i.scale,i.originPoint)}const Tv=.999999999999,Ev=1.0000000000001;function r2(n,a,i,o=!1){const r=i.length;if(!r)return;a.x=a.y=1;let d,u;for(let p=0;p<r;p++){d=i[p],u=d.projectionDelta;const{visualElement:m}=d.options;m&&m.props.style&&m.props.style.display==="contents"||(o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&wi(n,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),u&&(a.x*=u.x.scale,a.y*=u.y.scale,u1(n,u)),o&&ws(d.latestValues)&&wi(n,d.latestValues))}a.x<Ev&&a.x>Tv&&(a.x=1),a.y<Ev&&a.y>Tv&&(a.y=1)}function Ni(n,a){n.min=n.min+a,n.max=n.max+a}function Cv(n,a,i,o,r=.5){const d=ut(n.min,n.max,r);yf(n,a,i,d,o)}function wi(n,a){Cv(n.x,a.x,a.scaleX,a.scale,a.originX),Cv(n.y,a.y,a.scaleY,a.scale,a.originY)}function d1(n,a){return r1(o2(n.getBoundingClientRect(),a))}function c2(n,a,i){const o=d1(n,i),{scroll:r}=a;return r&&(Ni(o.x,r.offset.x),Ni(o.y,r.offset.y)),o}const f1=({current:n})=>n?n.ownerDocument.defaultView:null,u2=new WeakMap;class d2{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=Tt(),this.visualElement=a}start(a,{snapToCursor:i=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=v=>{const{dragSnapToOrigin:y}=this.getProps();y?this.pauseAnimation():this.stopAnimation(),i&&this.snapToCursor(oo(v).point)},d=(v,y)=>{const{drag:_,dragPropagation:T,onDragStart:E}=this.getProps();if(_&&!T&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gj(_),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Nn(N=>{let C=this.getAxisMotionValue(N).get()||0;if(Qn.test(C)){const{projection:A}=this.visualElement;if(A&&A.layout){const k=A.layout.layoutBox[N];k&&(C=mn(k)*(parseFloat(C)/100))}}this.originPoint[N]=C}),E&&lt.postRender(()=>E(v,y)),sf(this.visualElement,"transform");const{animationState:j}=this.visualElement;j&&j.setActive("whileDrag",!0)},u=(v,y)=>{const{dragPropagation:_,dragDirectionLock:T,onDirectionLock:E,onDrag:j}=this.getProps();if(!_&&!this.openDragLock)return;const{offset:N}=y;if(T&&this.currentDirection===null){this.currentDirection=f2(N),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",y.point,N),this.updateAxis("y",y.point,N),this.visualElement.render(),j&&j(v,y)},p=(v,y)=>this.stop(v,y),m=()=>Nn(v=>{var y;return this.getAnimationState(v)==="paused"&&((y=this.getAxisMotionValue(v).animation)===null||y===void 0?void 0:y.play())}),{dragSnapToOrigin:g}=this.getProps();this.panSession=new s1(a,{onSessionStart:r,onStart:d,onMove:u,onSessionEnd:p,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,contextWindow:f1(this.visualElement)})}stop(a,i){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:d}=this.getProps();d&&lt.postRender(()=>d(a,i))}cancel(){this.isDragging=!1;const{projection:a,animationState:i}=this.visualElement;a&&(a.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i&&i.setActive("whileDrag",!1)}updateAxis(a,i,o){const{drag:r}=this.getProps();if(!o||!Nr(a,r,this.currentDirection))return;const d=this.getAxisMotionValue(a);let u=this.originPoint[a]+o[a];this.constraints&&this.constraints[a]&&(u=e2(u,this.constraints[a],this.elastic[a])),d.set(u)}resolveConstraints(){var a;const{dragConstraints:i,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)===null||a===void 0?void 0:a.layout,d=this.constraints;i&&Ci(i)?this.constraints||(this.constraints=this.resolveRefConstraints()):i&&r?this.constraints=t2(r.layoutBox,i):this.constraints=!1,this.elastic=i2(o),d!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Nn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=s2(r.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:a,onMeasureDragConstraints:i}=this.getProps();if(!a||!Ci(a))return!1;const o=a.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const d=c2(o,r.root,this.visualElement.getTransformPagePoint());let u=n2(r.layout.layoutBox,d);if(i){const p=i(l2(u));this.hasMutatedConstraints=!!p,p&&(u=r1(p))}return u}startAnimation(a){const{drag:i,dragMomentum:o,dragElastic:r,dragTransition:d,dragSnapToOrigin:u,onDragTransitionEnd:p}=this.getProps(),m=this.constraints||{},g=Nn(v=>{if(!Nr(v,i,this.currentDirection))return;let y=m&&m[v]||{};u&&(y={min:0,max:0});const _=r?200:1e6,T=r?40:1e7,E={type:"inertia",velocity:o?a[v]:0,bounceStiffness:_,bounceDamping:T,timeConstant:750,restDelta:1,restSpeed:10,...d,...y};return this.startAxisValueAnimation(v,E)});return Promise.all(g).then(p)}startAxisValueAnimation(a,i){const o=this.getAxisMotionValue(a);return sf(this.visualElement,a),o.start(gh(a,o,0,i,this.visualElement,!1))}stopAnimation(){Nn(a=>this.getAxisMotionValue(a).stop())}pauseAnimation(){Nn(a=>{var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.pause()})}getAnimationState(a){var i;return(i=this.getAxisMotionValue(a).animation)===null||i===void 0?void 0:i.state}getAxisMotionValue(a){const i=`_drag${a.toUpperCase()}`,o=this.visualElement.getProps(),r=o[i];return r||this.visualElement.getValue(a,(o.initial?o.initial[a]:void 0)||0)}snapToCursor(a){Nn(i=>{const{drag:o}=this.getProps();if(!Nr(i,o,this.currentDirection))return;const{projection:r}=this.visualElement,d=this.getAxisMotionValue(i);if(r&&r.layout){const{min:u,max:p}=r.layout.layoutBox[i];d.set(a[i]-ut(u,p,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:a,dragConstraints:i}=this.getProps(),{projection:o}=this.visualElement;if(!Ci(i)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Nn(u=>{const p=this.getAxisMotionValue(u);if(p&&this.constraints!==!1){const m=p.get();r[u]=a2({min:m,max:m},this.constraints[u])}});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Nn(u=>{if(!Nr(u,a,null))return;const p=this.getAxisMotionValue(u),{min:m,max:g}=this.constraints[u];p.set(ut(m,g,r[u]))})}addListeners(){if(!this.visualElement.current)return;u2.set(this.visualElement,this);const a=this.visualElement.current,i=Gl(a,"pointerdown",m=>{const{drag:g,dragListener:v=!0}=this.getProps();g&&v&&this.start(m)}),o=()=>{const{dragConstraints:m}=this.getProps();Ci(m)&&m.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,d=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),lt.read(o);const u=eo(window,"resize",()=>this.scalePositionWithinConstraints()),p=r.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:g})=>{this.isDragging&&g&&(Nn(v=>{const y=this.getAxisMotionValue(v);y&&(this.originPoint[v]+=m[v].translate,y.set(y.get()+m[v].translate))}),this.visualElement.render())}));return()=>{u(),i(),d(),p&&p()}}getProps(){const a=this.visualElement.getProps(),{drag:i=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:d=!1,dragElastic:u=mf,dragMomentum:p=!0}=a;return{...a,drag:i,dragDirectionLock:o,dragPropagation:r,dragConstraints:d,dragElastic:u,dragMomentum:p}}}function Nr(n,a,i){return(a===!0||a===n)&&(i===null||i===n)}function f2(n,a=10){let i=null;return Math.abs(n.y)>a?i="y":Math.abs(n.x)>a&&(i="x"),i}class h2 extends ls{constructor(a){super(a),this.removeGroupControls=pn,this.removeListeners=pn,this.controls=new d2(a)}mount(){const{dragControls:a}=this.node.getProps();a&&(this.removeGroupControls=a.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||pn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Av=n=>(a,i)=>{n&&lt.postRender(()=>n(a,i))};class p2 extends ls{constructor(){super(...arguments),this.removePointerDownListener=pn}onPointerDown(a){this.session=new s1(a,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:f1(this.node)})}createPanHandlers(){const{onPanSessionStart:a,onPanStart:i,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:Av(a),onStart:Av(i),onMove:o,onEnd:(d,u)=>{delete this.session,r&&lt.postRender(()=>r(d,u))}}}mount(){this.removePointerDownListener=Gl(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 Ir={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jv(n,a){return a.max===a.min?0:n/(a.max-a.min)*100}const Ol={correct:(n,a)=>{if(!a.target)return n;if(typeof n=="string")if(me.test(n))n=parseFloat(n);else return n;const i=jv(n,a.target.x),o=jv(n,a.target.y);return`${i}% ${o}%`}},m2={correct:(n,{treeScale:a,projectionDelta:i})=>{const o=n,r=ss.parse(n);if(r.length>5)return o;const d=ss.createTransformer(n),u=typeof r[0]!="number"?1:0,p=i.x.scale*a.x,m=i.y.scale*a.y;r[0+u]/=p,r[1+u]/=m;const g=ut(p,m,.5);return typeof r[2+u]=="number"&&(r[2+u]/=g),typeof r[3+u]=="number"&&(r[3+u]/=g),d(r)}};class g2 extends S.Component{componentDidMount(){const{visualElement:a,layoutGroup:i,switchLayoutGroup:o,layoutId:r}=this.props,{projection:d}=a;PC(y2),d&&(i.group&&i.group.add(d),o&&o.register&&r&&o.register(d),d.root.didUpdate(),d.addEventListener("animationComplete",()=>{this.safeToRemove()}),d.setOptions({...d.options,onExitComplete:()=>this.safeToRemove()})),Ir.hasEverUpdated=!0}getSnapshotBeforeUpdate(a){const{layoutDependency:i,visualElement:o,drag:r,isPresent:d}=this.props,u=o.projection;return u&&(u.isPresent=d,r||a.layoutDependency!==i||i===void 0?u.willUpdate():this.safeToRemove(),a.isPresent!==d&&(d?u.promote():u.relegate()||lt.postRender(()=>{const p=u.getStack();(!p||!p.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:a}=this.props.visualElement;a&&(a.root.didUpdate(),$f.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 h1(n){const[a,i]=Q0(),o=S.useContext(Uf);return h.jsx(g2,{...n,layoutGroup:o,switchLayoutGroup:S.useContext(ib),isPresent:a,safeToRemove:i})}const y2={borderRadius:{...Ol,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ol,borderTopRightRadius:Ol,borderBottomLeftRadius:Ol,borderBottomRightRadius:Ol,boxShadow:m2};function v2(n,a,i){const o=qt(n)?n:Jl(n);return o.start(gh("",o,a,i)),o.animation}function b2(n){return n instanceof SVGElement&&n.tagName!=="svg"}const S2=(n,a)=>n.depth-a.depth;class _2{constructor(){this.children=[],this.isDirty=!1}add(a){nh(this.children,a),this.isDirty=!0}remove(a){ah(this.children,a),this.isDirty=!0}forEach(a){this.isDirty&&this.children.sort(S2),this.isDirty=!1,this.children.forEach(a)}}function x2(n,a){const i=Jn.now(),o=({timestamp:r})=>{const d=r-i;d>=a&&(as(o),n(d-a))};return lt.read(o,!0),()=>as(o)}const p1=["TopLeft","TopRight","BottomLeft","BottomRight"],T2=p1.length,Nv=n=>typeof n=="string"?parseFloat(n):n,wv=n=>typeof n=="number"||me.test(n);function E2(n,a,i,o,r,d){r?(n.opacity=ut(0,i.opacity!==void 0?i.opacity:1,C2(o)),n.opacityExit=ut(a.opacity!==void 0?a.opacity:1,0,A2(o))):d&&(n.opacity=ut(a.opacity!==void 0?a.opacity:1,i.opacity!==void 0?i.opacity:1,o));for(let u=0;u<T2;u++){const p=`border${p1[u]}Radius`;let m=Dv(a,p),g=Dv(i,p);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||wv(m)===wv(g)?(n[p]=Math.max(ut(Nv(m),Nv(g),o),0),(Qn.test(g)||Qn.test(m))&&(n[p]+="%")):n[p]=g}(a.rotate||i.rotate)&&(n.rotate=ut(a.rotate||0,i.rotate||0,o))}function Dv(n,a){return n[a]!==void 0?n[a]:n.borderRadius}const C2=m1(0,.5,kb),A2=m1(.5,.95,pn);function m1(n,a,i){return o=>o<n?0:o>a?1:i(Ri(n,a,o))}function kv(n,a){n.min=a.min,n.max=a.max}function jn(n,a){kv(n.x,a.x),kv(n.y,a.y)}function Mv(n,a){n.translate=a.translate,n.scale=a.scale,n.originPoint=a.originPoint,n.origin=a.origin}function Rv(n,a,i,o,r){return n-=a,n=$r(n,1/i,o),r!==void 0&&(n=$r(n,1/r,o)),n}function j2(n,a=0,i=1,o=.5,r,d=n,u=n){if(Qn.test(a)&&(a=parseFloat(a),a=ut(u.min,u.max,a/100)-u.min),typeof a!="number")return;let p=ut(d.min,d.max,o);n===d&&(p-=a),n.min=Rv(n.min,a,i,p,r),n.max=Rv(n.max,a,i,p,r)}function Ov(n,a,[i,o,r],d,u){j2(n,a[i],a[o],a[r],a.scale,d,u)}const N2=["x","scaleX","originX"],w2=["y","scaleY","originY"];function Bv(n,a,i,o){Ov(n.x,a,N2,i?i.x:void 0,o?o.x:void 0),Ov(n.y,a,w2,i?i.y:void 0,o?o.y:void 0)}function Lv(n){return n.translate===0&&n.scale===1}function g1(n){return Lv(n.x)&&Lv(n.y)}function Iv(n,a){return n.min===a.min&&n.max===a.max}function D2(n,a){return Iv(n.x,a.x)&&Iv(n.y,a.y)}function Uv(n,a){return Math.round(n.min)===Math.round(a.min)&&Math.round(n.max)===Math.round(a.max)}function y1(n,a){return Uv(n.x,a.x)&&Uv(n.y,a.y)}function zv(n){return mn(n.x)/mn(n.y)}function Vv(n,a){return n.translate===a.translate&&n.scale===a.scale&&n.originPoint===a.originPoint}class k2{constructor(){this.members=[]}add(a){nh(this.members,a),a.scheduleRender()}remove(a){if(ah(this.members,a),a===this.prevLead&&(this.prevLead=void 0),a===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(a){const i=this.members.findIndex(r=>a===r);if(i===0)return!1;let o;for(let r=i;r>=0;r--){const d=this.members[r];if(d.isPresent!==!1){o=d;break}}return o?(this.promote(o),!0):!1}promote(a,i){const o=this.lead;if(a!==o&&(this.prevLead=o,this.lead=a,a.show(),o)){o.instance&&o.scheduleRender(),a.scheduleRender(),a.resumeFrom=o,i&&(a.resumeFrom.preserveOpacity=!0),o.snapshot&&(a.snapshot=o.snapshot,a.snapshot.latestValues=o.animationValues||o.latestValues),a.root&&a.root.isUpdating&&(a.isLayoutDirty=!0);const{crossfade:r}=a.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(a=>{const{options:i,resumingFrom:o}=a;i.onExitComplete&&i.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(a=>{a.instance&&a.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function M2(n,a,i){let o="";const r=n.x.translate/a.x,d=n.y.translate/a.y,u=(i==null?void 0:i.z)||0;if((r||d||u)&&(o=`translate3d(${r}px, ${d}px, ${u}px) `),(a.x!==1||a.y!==1)&&(o+=`scale(${1/a.x}, ${1/a.y}) `),i){const{transformPerspective:g,rotate:v,rotateX:y,rotateY:_,skewX:T,skewY:E}=i;g&&(o=`perspective(${g}px) ${o}`),v&&(o+=`rotate(${v}deg) `),y&&(o+=`rotateX(${y}deg) `),_&&(o+=`rotateY(${_}deg) `),T&&(o+=`skewX(${T}deg) `),E&&(o+=`skewY(${E}deg) `)}const p=n.x.scale*a.x,m=n.y.scale*a.y;return(p!==1||m!==1)&&(o+=`scale(${p}, ${m})`),o||"none"}const Ds={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},zl=typeof window<"u"&&window.MotionDebug!==void 0,Ud=["","X","Y","Z"],R2={visibility:"hidden"},Hv=1e3;let O2=0;function zd(n,a,i,o){const{latestValues:r}=a;r[n]&&(i[n]=r[n],a.setStaticValue(n,0),o&&(o[n]=0))}function v1(n){if(n.hasCheckedOptimisedAppear=!0,n.root===n)return;const{visualElement:a}=n.options;if(!a)return;const i=_b(a);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:r,layoutId:d}=n.options;window.MotionCancelOptimisedAnimation(i,"transform",lt,!(r||d))}const{parent:o}=n;o&&!o.hasCheckedOptimisedAppear&&v1(o)}function b1({attachResizeListener:n,defaultParent:a,measureScroll:i,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(u={},p=a==null?void 0:a()){this.id=O2++,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,zl&&(Ds.totalNodes=Ds.resolvedTargetDeltas=Ds.recalculatedProjection=0),this.nodes.forEach(I2),this.nodes.forEach(P2),this.nodes.forEach(G2),this.nodes.forEach(U2),zl&&window.MotionDebug.record(Ds)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=p?p.root||p:this,this.path=p?[...p.path,p]:[],this.parent=p,this.depth=p?p.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new _2)}addEventListener(u,p){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new sh),this.eventHandlers.get(u).add(p)}notifyListeners(u,...p){const m=this.eventHandlers.get(u);m&&m.notify(...p)}hasListeners(u){return this.eventHandlers.has(u)}mount(u,p=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=b2(u),this.instance=u;const{layoutId:m,layout:g,visualElement:v}=this.options;if(v&&!v.current&&v.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),p&&(g||m)&&(this.isLayoutDirty=!0),n){let y;const _=()=>this.root.updateBlockedByResize=!1;n(u,()=>{this.root.updateBlockedByResize=!0,y&&y(),y=x2(_,250),Ir.hasAnimatedSinceResize&&(Ir.hasAnimatedSinceResize=!1,this.nodes.forEach(Gv))})}m&&this.root.registerSharedNode(m,this),this.options.animate!==!1&&v&&(m||g)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:_,hasRelativeTargetChanged:T,layout:E})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||v.getDefaultTransition()||K2,{onLayoutAnimationStart:N,onLayoutAnimationComplete:C}=v.getProps(),A=!this.targetLayout||!y1(this.targetLayout,E)||T,k=!_&&T;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||k||_&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(y,k);const H={...th(j,"layout"),onPlay:N,onComplete:C};(v.shouldReduceMotion||this.options.layoutRoot)&&(H.delay=0,H.type=!1),this.startAnimation(H)}else _||Gv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=E})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,as(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(F2),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&v1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const y=this.path[v];y.shouldResetTransform=!0,y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:p,layout:m}=this.options;if(p===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Pv);return}this.isUpdating||this.nodes.forEach(V2),this.isUpdating=!1,this.nodes.forEach(H2),this.nodes.forEach(B2),this.nodes.forEach(L2),this.clearAllSnapshots();const p=Jn.now();Ft.delta=Ea(0,1e3/60,p-Ft.timestamp),Ft.timestamp=p,Ft.isProcessing=!0,Dd.update.process(Ft),Dd.preRender.process(Ft),Dd.render.process(Ft),Ft.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$f.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(z2),this.sharedNodes.forEach($2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let m=0;m<this.path.length;m++)this.path[m].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Tt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:p}=this.options;p&&p.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let p=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(p=!1),p){const m=o(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:i(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!r)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,p=this.projectionDelta&&!g1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,v=g!==this.prevTransformTemplateValue;u&&(p||ws(this.latestValues)||v)&&(r(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const p=this.measurePageBox();let m=this.removeElementScroll(p);return u&&(m=this.removeTransform(m)),Z2(m),{animationId:this.root.animationId,measuredBox:p,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:p}=this.options;if(!p)return Tt();const m=p.measureViewportBox();if(!(((u=this.scroll)===null||u===void 0?void 0:u.wasRoot)||this.path.some(X2))){const{scroll:v}=this.root;v&&(Ni(m.x,v.offset.x),Ni(m.y,v.offset.y))}return m}removeElementScroll(u){var p;const m=Tt();if(jn(m,u),!((p=this.scroll)===null||p===void 0)&&p.wasRoot)return m;for(let g=0;g<this.path.length;g++){const v=this.path[g],{scroll:y,options:_}=v;v!==this.root&&y&&_.layoutScroll&&(y.wasRoot&&jn(m,u),Ni(m.x,y.offset.x),Ni(m.y,y.offset.y))}return m}applyTransform(u,p=!1){const m=Tt();jn(m,u);for(let g=0;g<this.path.length;g++){const v=this.path[g];!p&&v.options.layoutScroll&&v.scroll&&v!==v.root&&wi(m,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),ws(v.latestValues)&&wi(m,v.latestValues)}return ws(this.latestValues)&&wi(m,this.latestValues),m}removeTransform(u){const p=Tt();jn(p,u);for(let m=0;m<this.path.length;m++){const g=this.path[m];if(!g.instance||!ws(g.latestValues))continue;gf(g.latestValues)&&g.updateSnapshot();const v=Tt(),y=g.measurePageBox();jn(v,y),Bv(p,g.latestValues,g.snapshot?g.snapshot.layoutBox:void 0,v)}return ws(this.latestValues)&&Bv(p,this.latestValues),p}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ft.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var p;const m=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=m.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=m.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=m.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==m;if(!(u||g&&this.isSharedProjectionDirty||this.isProjectionDirty||!((p=this.parent)===null||p===void 0)&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:_}=this.options;if(!(!this.layout||!(y||_))){if(this.resolvedRelativeTargetAt=Ft.timestamp,!this.targetDelta&&!this.relativeTarget){const T=this.getClosestProjectingParent();T&&T.layout&&this.animationProgress!==1?(this.relativeParent=T,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Tt(),this.relativeTargetOrigin=Tt(),$l(this.relativeTargetOrigin,this.layout.layoutBox,T.layout.layoutBox),jn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Tt(),this.targetWithTransforms=Tt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Wj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):jn(this.target,this.layout.layoutBox),u1(this.target,this.targetDelta)):jn(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=Tt(),this.relativeTargetOrigin=Tt(),$l(this.relativeTargetOrigin,this.target,T.target),jn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}zl&&Ds.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||gf(this.parent.latestValues)||c1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var u;const p=this.getLead(),m=!!this.resumingFrom||this!==p;let g=!0;if((this.isProjectionDirty||!((u=this.parent)===null||u===void 0)&&u.isProjectionDirty)&&(g=!1),m&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===Ft.timestamp&&(g=!1),g)return;const{layout:v,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||y))return;jn(this.layoutCorrected,this.layout.layoutBox);const _=this.treeScale.x,T=this.treeScale.y;r2(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=Tt());const{target:E}=p;if(!E){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Mv(this.prevProjectionDelta.x,this.projectionDelta.x),Mv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fl(this.projectionDelta,this.layoutCorrected,E,this.latestValues),(this.treeScale.x!==_||this.treeScale.y!==T||!Vv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",E)),zl&&Ds.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var p;if((p=this.options.visualElement)===null||p===void 0||p.scheduleRender(),u){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ji(),this.projectionDelta=ji(),this.projectionDeltaWithTransform=ji()}setAnimationOrigin(u,p=!1){const m=this.snapshot,g=m?m.latestValues:{},v={...this.latestValues},y=ji();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!p;const _=Tt(),T=m?m.source:void 0,E=this.layout?this.layout.source:void 0,j=T!==E,N=this.getStack(),C=!N||N.members.length<=1,A=!!(j&&!C&&this.options.crossfade===!0&&!this.path.some(Y2));this.animationProgress=0;let k;this.mixTargetDelta=H=>{const O=H/1e3;Fv(y.x,u.x,O),Fv(y.y,u.y,O),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(_,this.layout.layoutBox,this.relativeParent.layout.layoutBox),q2(this.relativeTarget,this.relativeTargetOrigin,_,O),k&&D2(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=Tt()),jn(k,this.relativeTarget)),j&&(this.animationValues=v,E2(v,g,this.latestValues,O,A,C)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(as(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=lt.update(()=>{Ir.hasAnimatedSinceResize=!0,this.currentAnimation=v2(0,Hv,{...u,onUpdate:p=>{this.mixTargetDelta(p),u.onUpdate&&u.onUpdate(p)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Hv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead();let{targetWithTransforms:p,target:m,layout:g,latestValues:v}=u;if(!(!p||!m||!g)){if(this!==u&&this.layout&&g&&S1(this.options.animationType,this.layout.layoutBox,g.layoutBox)){m=this.target||Tt();const y=mn(this.layout.layoutBox.x);m.x.min=u.target.x.min,m.x.max=m.x.min+y;const _=mn(this.layout.layoutBox.y);m.y.min=u.target.y.min,m.y.max=m.y.min+_}jn(p,m),wi(p,v),Fl(this.projectionDeltaWithTransform,this.layoutCorrected,p,v)}}registerSharedNode(u,p){this.sharedNodes.has(u)||this.sharedNodes.set(u,new k2),this.sharedNodes.get(u).add(p);const g=p.options.initialPromotionConfig;p.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(p):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var u;const{layoutId:p}=this.options;return p?((u=this.getStack())===null||u===void 0?void 0:u.lead)||this:this}getPrevLead(){var u;const{layoutId:p}=this.options;return p?(u=this.getStack())===null||u===void 0?void 0:u.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:p,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),p&&this.setOptions({transition:p})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let p=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(p=!0),!p)return;const g={};m.z&&zd("z",u,g,this.animationValues);for(let v=0;v<Ud.length;v++)zd(`rotate${Ud[v]}`,u,g,this.animationValues),zd(`skew${Ud[v]}`,u,g,this.animationValues);u.render();for(const v in g)u.setStaticValue(v,g[v]),this.animationValues&&(this.animationValues[v]=g[v]);u.scheduleRender()}getProjectionStyles(u){var p,m;if(!this.instance||this.isSVG)return;if(!this.isVisible)return R2;const g={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,g.opacity="",g.pointerEvents=Br(u==null?void 0:u.pointerEvents)||"",g.transform=v?v(this.latestValues,""):"none",g;const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){const j={};return this.options.layoutId&&(j.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,j.pointerEvents=Br(u==null?void 0:u.pointerEvents)||""),this.hasProjected&&!ws(this.latestValues)&&(j.transform=v?v({},""):"none",this.hasProjected=!1),j}const _=y.animationValues||y.latestValues;this.applyTransformsToTarget(),g.transform=M2(this.projectionDeltaWithTransform,this.treeScale,_),v&&(g.transform=v(_,g.transform));const{x:T,y:E}=this.projectionDelta;g.transformOrigin=`${T.origin*100}% ${E.origin*100}% 0`,y.animationValues?g.opacity=y===this?(m=(p=_.opacity)!==null&&p!==void 0?p:this.latestValues.opacity)!==null&&m!==void 0?m:1:this.preserveOpacity?this.latestValues.opacity:_.opacityExit:g.opacity=y===this?_.opacity!==void 0?_.opacity:"":_.opacityExit!==void 0?_.opacityExit:0;for(const j in Vr){if(_[j]===void 0)continue;const{correct:N,applyTo:C}=Vr[j],A=g.transform==="none"?_[j]:N(_[j],y);if(C){const k=C.length;for(let H=0;H<k;H++)g[C[H]]=A}else g[j]=A}return this.options.layoutId&&(g.pointerEvents=y===this?Br(u==null?void 0:u.pointerEvents)||"":"none"),g}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var p;return(p=u.currentAnimation)===null||p===void 0?void 0:p.stop()}),this.root.nodes.forEach(Pv),this.root.sharedNodes.clear()}}}function B2(n){n.updateLayout()}function L2(n){var a;const i=((a=n.resumeFrom)===null||a===void 0?void 0:a.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&i&&n.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=n.layout,{animationType:d}=n.options,u=i.source!==n.layout.source;d==="size"?Nn(y=>{const _=u?i.measuredBox[y]:i.layoutBox[y],T=mn(_);_.min=o[y].min,_.max=_.min+T}):S1(d,i.layoutBox,o)&&Nn(y=>{const _=u?i.measuredBox[y]:i.layoutBox[y],T=mn(o[y]);_.max=_.min+T,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[y].max=n.relativeTarget[y].min+T)});const p=ji();Fl(p,o,i.layoutBox);const m=ji();u?Fl(m,n.applyTransform(r,!0),i.measuredBox):Fl(m,o,i.layoutBox);const g=!g1(p);let v=!1;if(!n.resumeFrom){const y=n.getClosestProjectingParent();if(y&&!y.resumeFrom){const{snapshot:_,layout:T}=y;if(_&&T){const E=Tt();$l(E,i.layoutBox,_.layoutBox);const j=Tt();$l(j,o,T.layoutBox),y1(E,j)||(v=!0),y.options.layoutRoot&&(n.relativeTarget=j,n.relativeTargetOrigin=E,n.relativeParent=y)}}}n.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:m,layoutDelta:p,hasLayoutChanged:g,hasRelativeTargetChanged:v})}else if(n.isLead()){const{onExitComplete:o}=n.options;o&&o()}n.options.transition=void 0}function I2(n){zl&&Ds.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 U2(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function z2(n){n.clearSnapshot()}function Pv(n){n.clearMeasurements()}function V2(n){n.isLayoutDirty=!1}function H2(n){const{visualElement:a}=n.options;a&&a.getProps().onBeforeLayoutMeasure&&a.notify("BeforeLayoutMeasure"),n.resetTransform()}function Gv(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function P2(n){n.resolveTargetDelta()}function G2(n){n.calcProjection()}function F2(n){n.resetSkewAndRotation()}function $2(n){n.removeLeadSnapshot()}function Fv(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 $v(n,a,i,o){n.min=ut(a.min,i.min,o),n.max=ut(a.max,i.max,o)}function q2(n,a,i,o){$v(n.x,a.x,i.x,o),$v(n.y,a.y,i.y,o)}function Y2(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const K2={duration:.45,ease:[.4,0,.1,1]},qv=n=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(n),Yv=qv("applewebkit/")&&!qv("chrome/")?Math.round:pn;function Kv(n){n.min=Yv(n.min),n.max=Yv(n.max)}function Z2(n){Kv(n.x),Kv(n.y)}function S1(n,a,i){return n==="position"||n==="preserve-aspect"&&!Jj(zv(a),zv(i),.2)}function X2(n){var a;return n!==n.root&&((a=n.scroll)===null||a===void 0?void 0:a.wasRoot)}const Q2=b1({attachResizeListener:(n,a)=>eo(n,"resize",a),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vd={current:void 0},_1=b1({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Vd.current){const n=new Q2({});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"}),J2={pan:{Feature:p2},drag:{Feature:h2,ProjectionNode:_1,MeasureLayout:h1}};function W2(n,a,i){var o;if(n instanceof Element)return[n];if(typeof n=="string"){let r=document;const d=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(n);return d?Array.from(d):[]}return Array.from(n)}function x1(n,a){const i=W2(n),o=new AbortController,r={passive:!0,...a,signal:o.signal};return[i,r,()=>o.abort()]}function Zv(n){return a=>{a.pointerType==="touch"||a1()||n(a)}}function eN(n,a,i={}){const[o,r,d]=x1(n,i),u=Zv(p=>{const{target:m}=p,g=a(p);if(typeof g!="function"||!m)return;const v=Zv(y=>{g(y),m.removeEventListener("pointerleave",v)});m.addEventListener("pointerleave",v,r)});return o.forEach(p=>{p.addEventListener("pointerenter",u,r)}),d}function Xv(n,a,i){const{props:o}=n;n.animationState&&o.whileHover&&n.animationState.setActive("whileHover",i==="Start");const r="onHover"+i,d=o[r];d&&lt.postRender(()=>d(a,oo(a)))}class tN extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=eN(a,i=>(Xv(this.node,i,"Start"),o=>Xv(this.node,o,"End"))))}unmount(){}}class nN extends ls{constructor(){super(...arguments),this.isActive=!1}onFocus(){let a=!1;try{a=this.node.current.matches(":focus-visible")}catch{a=!0}!a||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=lo(eo(this.node.current,"focus",()=>this.onFocus()),eo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const T1=(n,a)=>a?n===a?!0:T1(n,a.parentElement):!1,aN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function sN(n){return aN.has(n.tagName)||n.tabIndex!==-1}const Vl=new WeakSet;function Qv(n){return a=>{a.key==="Enter"&&n(a)}}function Hd(n,a){n.dispatchEvent(new PointerEvent("pointer"+a,{isPrimary:!0,bubbles:!0}))}const iN=(n,a)=>{const i=n.currentTarget;if(!i)return;const o=Qv(()=>{if(Vl.has(i))return;Hd(i,"down");const r=Qv(()=>{Hd(i,"up")}),d=()=>Hd(i,"cancel");i.addEventListener("keyup",r,a),i.addEventListener("blur",d,a)});i.addEventListener("keydown",o,a),i.addEventListener("blur",()=>i.removeEventListener("keydown",o),a)};function Jv(n){return yh(n)&&!a1()}function lN(n,a,i={}){const[o,r,d]=x1(n,i),u=p=>{const m=p.currentTarget;if(!Jv(p)||Vl.has(m))return;Vl.add(m);const g=a(p),v=(T,E)=>{window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",_),!(!Jv(T)||!Vl.has(m))&&(Vl.delete(m),typeof g=="function"&&g(T,{success:E}))},y=T=>{v(T,i.useGlobalTarget||T1(m,T.target))},_=T=>{v(T,!1)};window.addEventListener("pointerup",y,r),window.addEventListener("pointercancel",_,r)};return o.forEach(p=>{!sN(p)&&p.getAttribute("tabindex")===null&&(p.tabIndex=0),(i.useGlobalTarget?window:p).addEventListener("pointerdown",u,r),p.addEventListener("focus",g=>iN(g,r),r)}),d}function Wv(n,a,i){const{props:o}=n;n.animationState&&o.whileTap&&n.animationState.setActive("whileTap",i==="Start");const r="onTap"+(i==="End"?"":i),d=o[r];d&&lt.postRender(()=>d(a,oo(a)))}class oN extends ls{mount(){const{current:a}=this.node;a&&(this.unmount=lN(a,i=>(Wv(this.node,i,"Start"),(o,{success:r})=>Wv(this.node,o,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const vf=new WeakMap,Pd=new WeakMap,rN=n=>{const a=vf.get(n.target);a&&a(n)},cN=n=>{n.forEach(rN)};function uN({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(cN,{root:n,...a})),o[r]}function dN(n,a,i){const o=uN(a);return vf.set(n,i),o.observe(n),()=>{vf.delete(n),o.unobserve(n)}}const fN={some:0,all:1};class hN extends ls{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:a={}}=this.node.getProps(),{root:i,margin:o,amount:r="some",once:d}=a,u={root:i?i.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:fN[r]},p=m=>{const{isIntersecting:g}=m;if(this.isInView===g||(this.isInView=g,d&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:y}=this.node.getProps(),_=g?v:y;_&&_(m)};return dN(this.node.current,u,p)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:a,prevProps:i}=this.node;["amount","margin","root"].some(pN(a,i))&&this.startObserver()}unmount(){}}function pN({viewport:n={}},{viewport:a={}}={}){return i=>n[i]!==a[i]}const mN={inView:{Feature:hN},tap:{Feature:oN},focus:{Feature:nN},hover:{Feature:tN}},gN={layout:{ProjectionNode:_1,MeasureLayout:h1}},qr={current:null},vh={current:!1};function E1(){if(vh.current=!0,!!Hf)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),a=()=>qr.current=n.matches;n.addListener(a),a()}else qr.current=!1}const yN=[...$b,$t,ss],vN=n=>yN.find(Fb(n)),e0=new WeakMap;function bN(n,a,i){for(const o in a){const r=a[o],d=i[o];if(qt(r))n.addValue(o,r);else if(qt(d))n.addValue(o,Jl(r,{owner:n}));else if(d!==r)if(n.hasValue(o)){const u=n.getValue(o);u.liveStyle===!0?u.jump(r):u.hasAnimated||u.set(r)}else{const u=n.getStaticValue(o);n.addValue(o,Jl(u!==void 0?u:r,{owner:n}))}}for(const o in i)a[o]===void 0&&n.removeValue(o);return a}const t0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class SN{scrapeMotionValuesFromProps(a,i,o){return{}}constructor({parent:a,props:i,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:d,visualState:u},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=hh,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=Jn.now();this.renderScheduledAt<T&&(this.renderScheduledAt=T,lt.render(this.render,!1,!0))};const{latestValues:m,renderState:g,onUpdate:v}=u;this.onUpdate=v,this.latestValues=m,this.baseTarget={...m},this.initialValues=i.initial?{...m}:{},this.renderState=g,this.parent=a,this.props=i,this.presenceContext=o,this.depth=a?a.depth+1:0,this.reducedMotionConfig=r,this.options=p,this.blockInitialAnimation=!!d,this.isControllingVariants=ic(i),this.isVariantNode=ab(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(a&&a.current);const{willChange:y,..._}=this.scrapeMotionValuesFromProps(i,{},this);for(const T in _){const E=_[T];m[T]!==void 0&&qt(E)&&E.set(m[T],!1)}}mount(a){this.current=a,e0.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)),vh.current||E1(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){e0.delete(this.current),this.projection&&this.projection.unmount(),as(this.notifyUpdate),as(this.render),this.valueSubscriptions.forEach(a=>a()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const a in this.events)this.events[a].clear();for(const a in this.features){const i=this.features[a];i&&(i.unmount(),i.isMounted=!1)}this.current=null}bindToMotionValue(a,i){this.valueSubscriptions.has(a)&&this.valueSubscriptions.get(a)();const o=Is.has(a),r=i.on("change",p=>{this.latestValues[a]=p,this.props.onUpdate&&lt.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),d=i.on("renderRequest",this.scheduleRender);let u;window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,a,i)),this.valueSubscriptions.set(a,()=>{r(),d(),u&&u(),i.owner&&i.stop()})}sortNodePosition(a){return!this.current||!this.sortInstanceNodePosition||this.type!==a.type?0:this.sortInstanceNodePosition(this.current,a.current)}updateFeatures(){let a="animation";for(a in Mi){const i=Mi[a];if(!i)continue;const{isEnabled:o,Feature:r}=i;if(!this.features[a]&&r&&o(this.props)&&(this.features[a]=new r(this)),this.features[a]){const d=this.features[a];d.isMounted?d.update():(d.mount(),d.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Tt()}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<t0.length;o++){const r=t0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const d="on"+r,u=a[d];u&&(this.propEventSubscriptions[r]=this.on(r,u))}this.prevMotionValues=bN(this,this.scrapeMotionValuesFromProps(a,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(a){return this.props.variants?this.props.variants[a]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(a){const i=this.getClosestVariantNode();if(i)return i.variantChildren&&i.variantChildren.add(a),()=>i.variantChildren.delete(a)}addValue(a,i){const o=this.values.get(a);i!==o&&(o&&this.removeValue(a),this.bindToMotionValue(a,i),this.values.set(a,i),this.latestValues[a]=i.get())}removeValue(a){this.values.delete(a);const i=this.valueSubscriptions.get(a);i&&(i(),this.valueSubscriptions.delete(a)),delete this.latestValues[a],this.removeValueFromRenderState(a,this.renderState)}hasValue(a){return this.values.has(a)}getValue(a,i){if(this.props.values&&this.props.values[a])return this.props.values[a];let o=this.values.get(a);return o===void 0&&i!==void 0&&(o=Jl(i===null?void 0:i,{owner:this}),this.addValue(a,o)),o}readValue(a,i){var o;let r=this.latestValues[a]!==void 0||!this.current?this.latestValues[a]:(o=this.getBaseTargetFromProps(this.props,a))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,a,this.options);return r!=null&&(typeof r=="string"&&(Pb(r)||Rb(r))?r=parseFloat(r):!vN(r)&&ss.test(i)&&(r=zb(a,i)),this.setBaseTarget(a,qt(r)?r.get():r)),qt(r)?r.get():r}setBaseTarget(a,i){this.baseTarget[a]=i}getBaseTarget(a){var i;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const u=Yf(this.props,o,(i=this.presenceContext)===null||i===void 0?void 0:i.custom);u&&(r=u[a])}if(o&&r!==void 0)return r;const d=this.getBaseTargetFromProps(this.props,a);return d!==void 0&&!qt(d)?d:this.initialValues[a]!==void 0&&r===void 0?void 0:this.baseTarget[a]}on(a,i){return this.events[a]||(this.events[a]=new sh),this.events[a].add(i)}notify(a,...i){this.events[a]&&this.events[a].notify(...i)}}class C1 extends SN{constructor(){super(...arguments),this.KeyframeResolver=qb}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;qt(a)&&(this.childSubscription=a.on("change",i=>{this.current&&(this.current.textContent=`${i}`)}))}}function _N(n){return window.getComputedStyle(n)}class xN extends C1{constructor(){super(...arguments),this.type="html",this.renderInstance=fb}readValueFromInstance(a,i){if(Is.has(i)){const o=fh(i);return o&&o.default||0}else{const o=_N(a),r=(cb(i)?o.getPropertyValue(i):o[i])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(a,{transformPagePoint:i}){return d1(a,i)}build(a,i,o){Xf(a,i,o.transformTemplate)}scrapeMotionValuesFromProps(a,i,o){return eh(a,i,o)}}class TN extends C1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Tt}getBaseTargetFromProps(a,i){return a[i]}readValueFromInstance(a,i){if(Is.has(i)){const o=fh(i);return o&&o.default||0}return i=hb.has(i)?i:Ff(i),a.getAttribute(i)}scrapeMotionValuesFromProps(a,i,o){return gb(a,i,o)}build(a,i,o){Qf(a,i,this.isSVGTag,o.transformTemplate)}renderInstance(a,i,o,r){pb(a,i,o,r)}mount(a){this.isSVGTag=Wf(a.tagName),super.mount(a)}}const EN=(n,a)=>qf(n)?new TN(a):new xN(a,{allowProjection:n!==S.Fragment}),CN=QC({...Pj,...mN,...J2,...gN},EN),Xt=fC(CN);function AN(){!vh.current&&E1();const[n]=S.useState(qr.current);return n}var vt;(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"})(vt||(vt={}));var Dt;(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"})(Dt||(Dt={}));var Wa;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.ACTIVE=1]="ACTIVE",n[n.ARCHIVED=2]="ARCHIVED"})(Wa||(Wa={}));var es;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OPEN=1]="OPEN",n[n.CLOSED=2]="CLOSED"})(es||(es={}));var Yn;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.SUBSCRIPTION=2]="SUBSCRIPTION",n[n.API_KEY=3]="API_KEY"})(Yn||(Yn={}));var ts;(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.OFF=1]="OFF",n[n.ON=2]="ON"})(ts||(ts={}));const jN=8;Object.assign(Object.create(null),{"":vt.UNSPECIFIED,text:vt.TEXT,tool_use:vt.TOOL_USE,tool_result:vt.TOOL_RESULT,error:vt.ERROR,status:vt.STATUS,system:vt.SYSTEM,finding:vt.FINDING,subtask_create:vt.SUBTASK_CREATE,user_input:vt.USER_INPUT});vt.UNSPECIFIED+"",vt.TEXT+"",vt.TOOL_USE+"",vt.TOOL_RESULT+"",vt.ERROR+"",vt.STATUS+"",vt.SYSTEM+"",vt.FINDING+"",vt.SUBTASK_CREATE+"",vt.USER_INPUT+"";Object.assign(Object.create(null),{"":Dt.UNSPECIFIED,not_started:Dt.NOT_STARTED,working:Dt.WORKING,paused:Dt.PAUSED,complete:Dt.COMPLETE,failed:Dt.FAILED,pending:Dt.NOT_STARTED,assigned:Dt.NOT_STARTED,in_progress:Dt.WORKING,waiting_input:Dt.PAUSED,review:Dt.PAUSED,done:Dt.COMPLETE});Dt.UNSPECIFIED+"",Dt.NOT_STARTED+"",Dt.WORKING+"",Dt.PAUSED+"",Dt.COMPLETE+"",Dt.FAILED+"";Object.assign(Object.create(null),{"":Wa.UNSPECIFIED,active:Wa.ACTIVE,archived:Wa.ARCHIVED});Wa.UNSPECIFIED+"",Wa.ACTIVE+"",Wa.ARCHIVED+"";Object.assign(Object.create(null),{"":es.UNSPECIFIED,open:es.OPEN,closed:es.CLOSED});es.UNSPECIFIED+"",es.OPEN+"",es.CLOSED+"";Object.assign(Object.create(null),{"":Yn.UNSPECIFIED,off:Yn.OFF,subscription:Yn.SUBSCRIPTION,api_key:Yn.API_KEY});Yn.UNSPECIFIED+"",Yn.OFF+"",Yn.SUBSCRIPTION+"",Yn.API_KEY+"";Object.assign(Object.create(null),{"":ts.UNSPECIFIED,off:ts.OFF,on:ts.ON});ts.UNSPECIFIED+"",ts.OFF+"",ts.ON+"";function Ca(n){return Array.isArray?Array.isArray(n):N1(n)==="[object Array]"}function NN(n){if(typeof n=="string")return n;let a=n+"";return a=="0"&&1/n==-1/0?"-0":a}function wN(n){return n==null?"":NN(n)}function Kn(n){return typeof n=="string"}function A1(n){return typeof n=="number"}function DN(n){return n===!0||n===!1||kN(n)&&N1(n)=="[object Boolean]"}function j1(n){return typeof n=="object"}function kN(n){return j1(n)&&n!==null}function hn(n){return n!=null}function Gd(n){return!n.trim().length}function N1(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}const MN="Incorrect 'index' type",RN=n=>`Invalid value for key ${n}`,ON=n=>`Pattern length exceeds max of ${n}.`,BN=n=>`Missing ${n} property in key`,LN=n=>`Property 'weight' in key '${n}' must be a positive integer`,n0=Object.prototype.hasOwnProperty;class IN{constructor(a){this._keys=[],this._keyMap={};let i=0;a.forEach(o=>{let r=w1(o);this._keys.push(r),this._keyMap[r.id]=r,i+=r.weight}),this._keys.forEach(o=>{o.weight/=i})}get(a){return this._keyMap[a]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function w1(n){let a=null,i=null,o=null,r=1,d=null;if(Kn(n)||Ca(n))o=n,a=a0(n),i=bf(n);else{if(!n0.call(n,"name"))throw new Error(BN("name"));const u=n.name;if(o=u,n0.call(n,"weight")&&(r=n.weight,r<=0))throw new Error(LN(u));a=a0(u),i=bf(u),d=n.getFn}return{path:a,id:i,weight:r,src:o,getFn:d}}function a0(n){return Ca(n)?n:n.split(".")}function bf(n){return Ca(n)?n.join("."):n}function UN(n,a){let i=[],o=!1;const r=(d,u,p)=>{if(hn(d))if(!u[p])i.push(d);else{let m=u[p];const g=d[m];if(!hn(g))return;if(p===u.length-1&&(Kn(g)||A1(g)||DN(g)))i.push(wN(g));else if(Ca(g)){o=!0;for(let v=0,y=g.length;v<y;v+=1)r(g[v],u,p+1)}else u.length&&r(g,u,p+1)}};return r(n,Kn(a)?a.split("."):a,0),o?i:i[0]}const zN={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},VN={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},HN={location:0,threshold:.6,distance:100},PN={useExtendedSearch:!1,getFn:UN,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var ye={...VN,...zN,...HN,...PN};const GN=/[^ ]+/g;function FN(n=1,a=3){const i=new Map,o=Math.pow(10,a);return{get(r){const d=r.match(GN).length;if(i.has(d))return i.get(d);const u=1/Math.pow(d,.5*n),p=parseFloat(Math.round(u*o)/o);return i.set(d,p),p},clear(){i.clear()}}}class bh{constructor({getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){this.norm=FN(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,Kn(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();Kn(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(!hn(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,d)=>{let u=r.getFn?r.getFn(a):this.getFn(a,r.path);if(hn(u)){if(Ca(u)){let p=[];const m=[{nestedArrIndex:-1,value:u}];for(;m.length;){const{nestedArrIndex:g,value:v}=m.pop();if(hn(v))if(Kn(v)&&!Gd(v)){let y={v,i:g,n:this.norm.get(v)};p.push(y)}else Ca(v)&&v.forEach((y,_)=>{m.push({nestedArrIndex:_,value:y})})}o.$[d]=p}else if(Kn(u)&&!Gd(u)){let p={v:u,n:this.norm.get(u)};o.$[d]=p}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function D1(n,a,{getFn:i=ye.getFn,fieldNormWeight:o=ye.fieldNormWeight}={}){const r=new bh({getFn:i,fieldNormWeight:o});return r.setKeys(n.map(w1)),r.setSources(a),r.create(),r}function $N(n,{getFn:a=ye.getFn,fieldNormWeight:i=ye.fieldNormWeight}={}){const{keys:o,records:r}=n,d=new bh({getFn:a,fieldNormWeight:i});return d.setKeys(o),d.setIndexRecords(r),d}function wr(n,{errors:a=0,currentLocation:i=0,expectedLocation:o=0,distance:r=ye.distance,ignoreLocation:d=ye.ignoreLocation}={}){const u=a/n.length;if(d)return u;const p=Math.abs(o-i);return r?u+p/r:p?1:u}function qN(n=[],a=ye.minMatchCharLength){let i=[],o=-1,r=-1,d=0;for(let u=n.length;d<u;d+=1){let p=n[d];p&&o===-1?o=d:!p&&o!==-1&&(r=d-1,r-o+1>=a&&i.push([o,r]),o=-1)}return n[d-1]&&d-o>=a&&i.push([o,d-1]),i}const ks=32;function YN(n,a,i,{location:o=ye.location,distance:r=ye.distance,threshold:d=ye.threshold,findAllMatches:u=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,includeMatches:m=ye.includeMatches,ignoreLocation:g=ye.ignoreLocation}={}){if(a.length>ks)throw new Error(ON(ks));const v=a.length,y=n.length,_=Math.max(0,Math.min(o,y));let T=d,E=_;const j=p>1||m,N=j?Array(y):[];let C;for(;(C=n.indexOf(a,E))>-1;){let G=wr(a,{currentLocation:C,expectedLocation:_,distance:r,ignoreLocation:g});if(T=Math.min(G,T),E=C+v,j){let M=0;for(;M<v;)N[C+M]=1,M+=1}}E=-1;let A=[],k=1,H=v+y;const O=1<<v-1;for(let G=0;G<v;G+=1){let M=0,V=H;for(;M<V;)wr(a,{errors:G,currentLocation:_+V,expectedLocation:_,distance:r,ignoreLocation:g})<=T?M=V:H=V,V=Math.floor((H-M)/2+M);H=V;let te=Math.max(1,_-V+1),ne=u?y:Math.min(_+V,y)+v,ae=Array(ne+2);ae[ne+1]=(1<<G)-1;for(let Y=ne;Y>=te;Y-=1){let Q=Y-1,B=i[n.charAt(Q)];if(j&&(N[Q]=+!!B),ae[Y]=(ae[Y+1]<<1|1)&B,G&&(ae[Y]|=(A[Y+1]|A[Y])<<1|1|A[Y+1]),ae[Y]&O&&(k=wr(a,{errors:G,currentLocation:Q,expectedLocation:_,distance:r,ignoreLocation:g}),k<=T)){if(T=k,E=Q,E<=_)break;te=Math.max(1,2*_-E)}}if(wr(a,{errors:G+1,currentLocation:_,expectedLocation:_,distance:r,ignoreLocation:g})>T)break;A=ae}const $={isMatch:E>=0,score:Math.max(.001,k)};if(j){const G=qN(N,p);G.length?m&&($.indices=G):$.isMatch=!1}return $}function KN(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 k1{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:d=ye.includeMatches,findAllMatches:u=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){if(this.options={location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v},a=m?a:a.toLowerCase(),a=g?Yr(a):a,this.pattern=a,this.chunks=[],!this.pattern.length)return;const y=(T,E)=>{this.chunks.push({pattern:T,alphabet:KN(T),startIndex:E})},_=this.pattern.length;if(_>ks){let T=0;const E=_%ks,j=_-E;for(;T<j;)y(this.pattern.substr(T,ks),T),T+=ks;if(E){const N=_-ks;y(this.pattern.substr(N),N)}}else y(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 j={isMatch:!0,score:0};return r&&(j.indices=[[0,a.length-1]]),j}const{location:d,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,ignoreLocation:v}=this.options;let y=[],_=0,T=!1;this.chunks.forEach(({pattern:j,alphabet:N,startIndex:C})=>{const{isMatch:A,score:k,indices:H}=YN(a,j,N,{location:d+C,distance:u,threshold:p,findAllMatches:m,minMatchCharLength:g,includeMatches:r,ignoreLocation:v});A&&(T=!0),_+=k,A&&H&&(y=[...y,...H])});let E={isMatch:T,score:T?_/this.chunks.length:1};return T&&r&&(E.indices=y),E}}class os{constructor(a){this.pattern=a}static isMultiMatch(a){return s0(a,this.multiRegex)}static isSingleMatch(a){return s0(a,this.singleRegex)}search(){}}function s0(n,a){const i=n.match(a);return i?i[1]:null}class ZN extends os{constructor(a){super(a)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(a){const i=a===this.pattern;return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class XN extends os{constructor(a){super(a)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(a){const o=a.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,a.length-1]}}}class QN extends os{constructor(a){super(a)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(a){const i=a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,this.pattern.length-1]}}}class JN extends os{constructor(a){super(a)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(a){const i=!a.startsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class WN extends os{constructor(a){super(a)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(a){const i=a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[a.length-this.pattern.length,a.length-1]}}}class ew extends os{constructor(a){super(a)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(a){const i=!a.endsWith(this.pattern);return{isMatch:i,score:i?0:1,indices:[0,a.length-1]}}}class M1 extends os{constructor(a,{location:i=ye.location,threshold:o=ye.threshold,distance:r=ye.distance,includeMatches:d=ye.includeMatches,findAllMatches:u=ye.findAllMatches,minMatchCharLength:p=ye.minMatchCharLength,isCaseSensitive:m=ye.isCaseSensitive,ignoreDiacritics:g=ye.ignoreDiacritics,ignoreLocation:v=ye.ignoreLocation}={}){super(a),this._bitapSearch=new k1(a,{location:i,threshold:o,distance:r,includeMatches:d,findAllMatches:u,minMatchCharLength:p,isCaseSensitive:m,ignoreDiacritics:g,ignoreLocation:v})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(a){return this._bitapSearch.searchIn(a)}}class R1 extends os{constructor(a){super(a)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(a){let i=0,o;const r=[],d=this.pattern.length;for(;(o=a.indexOf(this.pattern,i))>-1;)i=o+d,r.push([o,i-1]);const u=!!r.length;return{isMatch:u,score:u?0:1,indices:r}}}const Sf=[ZN,R1,QN,JN,ew,WN,XN,M1],i0=Sf.length,tw=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,nw="|";function aw(n,a={}){return n.split(nw).map(i=>{let o=i.trim().split(tw).filter(d=>d&&!!d.trim()),r=[];for(let d=0,u=o.length;d<u;d+=1){const p=o[d];let m=!1,g=-1;for(;!m&&++g<i0;){const v=Sf[g];let y=v.isMultiMatch(p);y&&(r.push(new v(y,a)),m=!0)}if(!m)for(g=-1;++g<i0;){const v=Sf[g];let y=v.isSingleMatch(p);if(y){r.push(new v(y,a));break}}}return r})}const sw=new Set([M1.type,R1.type]);class iw{constructor(a,{isCaseSensitive:i=ye.isCaseSensitive,ignoreDiacritics:o=ye.ignoreDiacritics,includeMatches:r=ye.includeMatches,minMatchCharLength:d=ye.minMatchCharLength,ignoreLocation:u=ye.ignoreLocation,findAllMatches:p=ye.findAllMatches,location:m=ye.location,threshold:g=ye.threshold,distance:v=ye.distance}={}){this.query=null,this.options={isCaseSensitive:i,ignoreDiacritics:o,includeMatches:r,minMatchCharLength:d,findAllMatches:p,ignoreLocation:u,location:m,threshold:g,distance:v},a=i?a:a.toLowerCase(),a=o?Yr(a):a,this.pattern=a,this.query=aw(this.pattern,this.options)}static condition(a,i){return i.useExtendedSearch}searchIn(a){const i=this.query;if(!i)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:r,ignoreDiacritics:d}=this.options;a=r?a:a.toLowerCase(),a=d?Yr(a):a;let u=0,p=[],m=0;for(let g=0,v=i.length;g<v;g+=1){const y=i[g];p.length=0,u=0;for(let _=0,T=y.length;_<T;_+=1){const E=y[_],{isMatch:j,indices:N,score:C}=E.search(a);if(j){if(u+=1,m+=C,o){const A=E.constructor.type;sw.has(A)?p=[...p,...N]:p.push(N)}}else{m=0,u=0,p.length=0;break}}if(u){let _={isMatch:!0,score:m/u};return o&&(_.indices=p),_}}return{isMatch:!1,score:1}}}const _f=[];function lw(...n){_f.push(...n)}function xf(n,a){for(let i=0,o=_f.length;i<o;i+=1){let r=_f[i];if(r.condition(n,a))return new r(n,a)}return new k1(n,a)}const Kr={AND:"$and",OR:"$or"},Tf={PATH:"$path",PATTERN:"$val"},Ef=n=>!!(n[Kr.AND]||n[Kr.OR]),ow=n=>!!n[Tf.PATH],rw=n=>!Ca(n)&&j1(n)&&!Ef(n),l0=n=>({[Kr.AND]:Object.keys(n).map(a=>({[a]:n[a]}))});function O1(n,a,{auto:i=!0}={}){const o=r=>{let d=Object.keys(r);const u=ow(r);if(!u&&d.length>1&&!Ef(r))return o(l0(r));if(rw(r)){const m=u?r[Tf.PATH]:d[0],g=u?r[Tf.PATTERN]:r[m];if(!Kn(g))throw new Error(RN(m));const v={keyId:bf(m),pattern:g};return i&&(v.searcher=xf(g,a)),v}let p={children:[],operator:d[0]};return d.forEach(m=>{const g=r[m];Ca(g)&&g.forEach(v=>{p.children.push(o(v))})}),p};return Ef(n)||(n=l0(n)),o(n)}function cw(n,{ignoreFieldNorm:a=ye.ignoreFieldNorm}){n.forEach(i=>{let o=1;i.matches.forEach(({key:r,norm:d,score:u})=>{const p=r?r.weight:null;o*=Math.pow(u===0&&p?Number.EPSILON:u,(p||1)*(a?1:d))}),i.score=o})}function uw(n,a){const i=n.matches;a.matches=[],hn(i)&&i.forEach(o=>{if(!hn(o.indices)||!o.indices.length)return;const{indices:r,value:d}=o;let u={indices:r,value:d};o.key&&(u.key=o.key.src),o.idx>-1&&(u.refIndex=o.idx),a.matches.push(u)})}function dw(n,a){a.score=n.score}function fw(n,a,{includeMatches:i=ye.includeMatches,includeScore:o=ye.includeScore}={}){const r=[];return i&&r.push(uw),o&&r.push(dw),n.map(d=>{const{idx:u}=d,p={item:a[u],refIndex:u};return r.length&&r.forEach(m=>{m(d,p)}),p})}class zi{constructor(a,i={},o){this.options={...ye,...i},this.options.useExtendedSearch,this._keyStore=new IN(this.options.keys),this.setCollection(a,o)}setCollection(a,i){if(this._docs=a,i&&!(i instanceof bh))throw new Error(MN);this._myIndex=i||D1(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(a){hn(a)&&(this._docs.push(a),this._myIndex.add(a))}remove(a=()=>!1){const i=[];for(let o=0,r=this._docs.length;o<r;o+=1){const d=this._docs[o];a(d,o)&&(this.removeAt(o),o-=1,r-=1,i.push(d))}return i}removeAt(a){this._docs.splice(a,1),this._myIndex.removeAt(a)}getIndex(){return this._myIndex}search(a,{limit:i=-1}={}){const{includeMatches:o,includeScore:r,shouldSort:d,sortFn:u,ignoreFieldNorm:p}=this.options;let m=Kn(a)?Kn(this._docs[0])?this._searchStringList(a):this._searchObjectList(a):this._searchLogical(a);return cw(m,{ignoreFieldNorm:p}),d&&m.sort(u),A1(i)&&i>-1&&(m=m.slice(0,i)),fw(m,this._docs,{includeMatches:o,includeScore:r})}_searchStringList(a){const i=xf(a,this.options),{records:o}=this._myIndex,r=[];return o.forEach(({v:d,i:u,n:p})=>{if(!hn(d))return;const{isMatch:m,score:g,indices:v}=i.searchIn(d);m&&r.push({item:d,idx:u,matches:[{score:g,value:d,norm:p,indices:v}]})}),r}_searchLogical(a){const i=O1(a,this.options),o=(p,m,g)=>{if(!p.children){const{keyId:y,searcher:_}=p,T=this._findMatches({key:this._keyStore.get(y),value:this._myIndex.getValueForItemAtKeyId(m,y),searcher:_});return T&&T.length?[{idx:g,item:m,matches:T}]:[]}const v=[];for(let y=0,_=p.children.length;y<_;y+=1){const T=p.children[y],E=o(T,m,g);if(E.length)v.push(...E);else if(p.operator===Kr.AND)return[]}return v},r=this._myIndex.records,d={},u=[];return r.forEach(({$:p,i:m})=>{if(hn(p)){let g=o(i,p,m);g.length&&(d[m]||(d[m]={idx:m,item:p,matches:[]},u.push(d[m])),g.forEach(({matches:v})=>{d[m].matches.push(...v)}))}}),u}_searchObjectList(a){const i=xf(a,this.options),{keys:o,records:r}=this._myIndex,d=[];return r.forEach(({$:u,i:p})=>{if(!hn(u))return;let m=[];o.forEach((g,v)=>{m.push(...this._findMatches({key:g,value:u[v],searcher:i}))}),m.length&&d.push({idx:p,item:u,matches:m})}),d}_findMatches({key:a,value:i,searcher:o}){if(!hn(i))return[];let r=[];if(Ca(i))i.forEach(({v:d,i:u,n:p})=>{if(!hn(d))return;const{isMatch:m,score:g,indices:v}=o.searchIn(d);m&&r.push({score:g,key:a,value:d,idx:u,norm:p,indices:v})});else{const{v:d,n:u}=i,{isMatch:p,score:m,indices:g}=o.searchIn(d);p&&r.push({score:m,key:a,value:d,norm:u,indices:g})}return r}}zi.version="7.1.0";zi.createIndex=D1;zi.parseIndex=$N;zi.config=ye;zi.parseQuery=O1;lw(iw);function o0(n,a,i,o){if(!a.trim())return[];const r=.3;return new zi(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 hw="_breadcrumbs_17or2_1",pw="_list_17or2_11",mw="_item_17or2_21",gw="_separator_17or2_28",yw="_link_17or2_34",vw="_current_17or2_57",Ti={breadcrumbs:hw,list:pw,item:mw,separator:gw,link:yw,current:vw},bw="›";function Vi({segments:n}){return h.jsx("nav",{className:Ti.breadcrumbs,"aria-label":"Breadcrumb","data-testid":"breadcrumbs",children:h.jsx("ol",{className:Ti.list,children:n.map((a,i)=>{const o=i===n.length-1;return h.jsxs("li",{className:Ti.item,children:[i>0&&h.jsx("span",{className:Ti.separator,"aria-hidden":"true",children:bw}),a.url&&!o?h.jsx(Bf,{className:Ti.link,to:a.url,title:a.label,children:a.label}):h.jsx("span",{className:Ti.current,"aria-current":"page",title:a.label,children:a.label})]},i)})})})}function Cf(){Cf=function(r,d){return new i(r,void 0,d)};var n=RegExp.prototype,a=new WeakMap;function i(r,d,u){var p=new RegExp(r,d);return a.set(p,u||a.get(r)),Zr(p,i.prototype)}function o(r,d){var u=a.get(d);return Object.keys(u).reduce(function(p,m){var g=u[m];if(typeof g=="number")p[m]=r[g];else{for(var v=0;r[g[v]]===void 0&&v+1<g.length;)v++;p[m]=r[g[v]]}return p},Object.create(null))}return(function(r,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(d&&d.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),d&&Zr(r,d)})(i,RegExp),i.prototype.exec=function(r){var d=n.exec.call(this,r);if(d){d.groups=o(d,this);var u=d.indices;u&&(u.groups=o(u,this))}return d},i.prototype[Symbol.replace]=function(r,d){if(typeof d=="string"){var u=a.get(this);return n[Symbol.replace].call(this,r,d.replace(/\$<([^>]+)>/g,function(m,g){var v=u[g];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof d=="function"){var p=this;return n[Symbol.replace].call(this,r,function(){var m=arguments;return typeof m[m.length-1]!="object"&&(m=[].slice.call(m)).push(o(m,p)),d.apply(this,m)})}return n[Symbol.replace].call(this,r,d)},Cf.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 r0(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,d){if(r){if(typeof r=="string")return r0(r,d);var u=Object.prototype.toString.call(r).slice(8,-1);return u==="Object"&&r.constructor&&(u=r.constructor.name),u==="Map"||u==="Set"?Array.from(r):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?r0(r,d):void 0}})(n))||a){i&&(n=i);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Sw=(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){rx(o,"element",i)};function i(o,r,d){var u,p;if(d&&d.tagName==="pre"&&o.tagName==="code"){var m=(o==null||(u=o.data)==null?void 0:u.meta)||(o==null||(p=o.properties)==null?void 0:p.metastring)||"";o.properties.className?typeof o.properties.className=="boolean"?o.properties.className=[]:Array.isArray(o.properties.className)||(o.properties.className=[o.properties.className]):o.properties.className=[];var g,v,y=(function(O){for(var $,G=Fd(O.properties.className);!($=G()).done;){var M=$.value;if(M.slice(0,9)==="language-")return M.slice(9).toLowerCase()}return null})(o);if(!y&&a.defaultLanguage&&o.properties.className.push("language-"+(y=a.defaultLanguage)),o.properties.className.push("code-highlight"),y)try{var _,T;T=(_=y)!=null&&_.includes("diff-")?y.split("-")[1]:y,g=n.highlight(Tr(o),T),d.properties.className=(d.properties.className||[]).concat("language-"+T)}catch(O){if(!a.ignoreMissing||!/Unknown language/.test(O.message))throw O;g=o}else g=o;g.children=(v=1,function O($){return $.reduce(function(G,M){if(M.type==="text"){var V=M.value,te=(V.match(/\n/g)||"").length;if(te===0)M.position={start:{line:v,column:1},end:{line:v,column:1}},G.push(M);else for(var ne,ae=V.split(`
88
- `),re=Fd(ae.entries());!(ne=re()).done;){var Y=ne.value,Q=Y[0],B=Y[1];G.push({type:"text",value:Q===ae.length-1?B:B+`
89
- `,position:{start:{line:v+Q,column:1},end:{line:v+Q,column:1}}})}return v+=te,G}if(Object.prototype.hasOwnProperty.call(M,"children")){var F=v;return M.children=O(M.children),G.push(M),M.position={start:{line:F,column:1},end:{line:v,column:1}},G}return G.push(M),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 E,j=(function(O){var $=/{([\d,-]+)}/,G=O.split(",").map(function(te){return te.trim()}).join();if($.test(G)){var M=$.exec(G)[1],V=ux(M);return function(te){return V.includes(te+1)}}return function(){return!1}})(m),N=(function(O){var $=Cf(/showLineNumbers=(\d+)/i,{lines:1});if($.test(O)){var G=$.exec(O);return Number(G.groups.lines)}return 1})(m),C=(function(O){for(var $=new Array(O),G=0;G<O;G++)$[G]={type:"element",tagName:"span",properties:{className:[]},children:[]};return $})(g.position.end.line),A=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],k=function(){var O,$,G=E.value,M=G[0],V=G[1];V.properties.className=["code-line"];var te=dx(g,function(ne){return ne.position.start.line<=M+1&&ne.position.end.line>=M+1});V.children=te.children,(m.toLowerCase().includes("showLineNumbers".toLowerCase())||a.showLineNumbers===!0||typeof a.showLineNumbers=="object"&&a.showLineNumbers.includes(y))&&!A.some(function(ne){return m.toLowerCase().includes(ne)})&&(V.properties.line=[(M+N).toString()],V.properties.className.push("line-number")),j(M)&&V.properties.className.push("highlight-line"),(y==="diff"||(O=y)!=null&&O.includes("diff-"))&&Tr(V).substring(0,1)==="-"?V.properties.className.push("deleted"):(y==="diff"||($=y)!=null&&$.includes("diff-"))&&Tr(V).substring(0,1)==="+"&&V.properties.className.push("inserted")},H=Fd(C.entries());!(E=H()).done;)k();C.length>0&&Tr(C[C.length-1]).trim()===""&&C.pop(),o.children=C}}}})(cx);const _w="_systemEvent_463jy_1",xw="_systemTimestamp_463jy_8",Tw="_textEvent_463jy_12",Ew="_toolUseEvent_463jy_98",Cw="_toolUseHeader_463jy_118",Aw="_toolUsePrefix_463jy_125",jw="_toolUseName_463jy_130",Nw="_toolUseArgs_463jy_135",ww="_toolResultEvent_463jy_146",Dw="_toolResultHeader_463jy_151",kw="_toolResultIndicatorOk_463jy_175",Mw="_toolResultIndicatorError_463jy_182",Rw="_toolResultLabel_463jy_189",Ow="_toolResultToggle_463jy_193",Bw="_toolResultCommand_463jy_199",Lw="_toolResultEllipsis_463jy_209",Iw="_toolResultPre_463jy_213",Uw="_errorEvent_463jy_234",zw="_statusEvent_463jy_242",Vw="_userInputEvent_463jy_251",Hw="_userInputContent_463jy_257",Pw="_defaultEvent_463jy_274",ct={systemEvent:_w,systemTimestamp:xw,textEvent:Tw,toolUseEvent:Ew,toolUseHeader:Cw,toolUsePrefix:Aw,toolUseName:jw,toolUseArgs:Nw,toolResultEvent:ww,toolResultHeader:Dw,toolResultIndicatorOk:kw,toolResultIndicatorError:Mw,toolResultLabel:Rw,toolResultToggle:Ow,toolResultCommand:Bw,toolResultEllipsis:Lw,toolResultPre:Iw,errorEvent:Uw,statusEvent:zw,userInputEvent:Vw,userInputContent:Hw,defaultEvent:Pw};function Gw({time:n,content:a}){return h.jsxs("div",{className:ct.systemEvent,children:[h.jsxs("span",{className:ct.systemTimestamp,children:["[",n,"]"]})," ",a]})}function Fw({content:n}){return h.jsx("div",{className:ct.textEvent,children:h.jsx(jf,{remarkPlugins:[Nf],rehypePlugins:[Sw],children:n})})}function $w({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 c0=5;function qw(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 Yw({content:n,raw:a,toolUseCtx:i}){const[o,r]=S.useState(!1);let d=!1;if(a)try{d=JSON.parse(a).is_error===!0}catch{}const u=n.split(`
90
- `),p=u.length>c0,m=o?n:u.slice(0,c0).join(`
91
- `),v=((i==null?void 0:i.tool)??"")||(d?"Tool error":"Tool output"),y=i?qw(i.tool,i.args):"",_=h.jsxs(h.Fragment,{children:[h.jsx("span",{className:d?ct.toolResultIndicatorError:ct.toolResultIndicatorOk,"aria-label":d?"error":"success","data-testid":d?"tool-result-indicator-error":"tool-result-indicator-ok",children:d?"✗":"✓"}),h.jsx("span",{className:ct.toolResultLabel,"data-testid":"tool-result-label",children:v}),p&&h.jsx("span",{className:ct.toolResultToggle,"aria-hidden":"true",children:o?"▾":"▸"})]});return h.jsxs("div",{className:ct.toolResultEvent,"data-testid":"tool-result",children:[p?h.jsx("button",{className:ct.toolResultHeader,"data-testid":"tool-result-header",onClick:()=>{r(T=>!T)},"aria-expanded":o,children:_}):h.jsx("div",{className:ct.toolResultHeader,"data-testid":"tool-result-header",children:_}),y&&h.jsx("div",{className:ct.toolResultCommand,children:y}),h.jsxs("pre",{className:ct.toolResultPre,"data-testid":"tool-result-content",children:[m,!o&&p&&h.jsx("span",{className:ct.toolResultEllipsis,children:"…"})]})]})}function Kw({content:n}){return h.jsxs("div",{className:ct.errorEvent,children:["Error: ",n]})}function Zw({content:n}){return h.jsxs("div",{className:ct.statusEvent,children:["--- ",n," ---"]})}function Xw({content:n}){return h.jsx("div",{className:ct.userInputEvent,children:h.jsx("span",{className:ct.userInputContent,children:n})})}function Qw({content:n}){return h.jsx("div",{className:ct.defaultEvent,children:n})}function Jw({event:n,toolUseCtx:a}){const i=new Date(n.timestamp).toLocaleTimeString();switch(n.eventType){case"system":return h.jsx(Gw,{time:i,content:n.content});case"text":case"output":return h.jsx(Fw,{content:n.content});case"tool_use":return h.jsx($w,{content:n.content});case"tool_result":return h.jsx(Yw,{content:n.content,raw:n.raw,toolUseCtx:a});case"error":return h.jsx(Kw,{content:n.content});case"status":return h.jsx(Zw,{content:n.content});case"user_input":return h.jsx(Xw,{content:n.content});default:return h.jsx(Qw,{content:n.content})}}const Ww="_overlay_cmicx_1",eD="_dialog_cmicx_11",tD="_title_cmicx_30",nD="_description_cmicx_38",aD="_actions_cmicx_45",sD="_cancelButton_cmicx_52",iD="_confirmButton_cmicx_79",js={overlay:Ww,dialog:eD,title:tD,description:nD,actions:aD,cancelButton:sD,confirmButton:iD};function rc({isOpen:n,title:a,description:i,confirmLabel:o="Delete",onConfirm:r,onCancel:d}){const u=S.useId(),p=S.useId();return h.jsx(Vn,{children:n&&h.jsx(Xt.div,{className:js.overlay,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},onClick:d,onKeyDown:m=>{m.key==="Escape"&&d()},role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-describedby":i?p:void 0,children:h.jsxs(Xt.div,{className:js.dialog,initial:{opacity:0,scale:.93,y:-10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.93,y:-10},transition:{duration:.15,ease:[.16,1,.3,1]},onClick:m=>m.stopPropagation(),children:[h.jsx("h3",{id:u,className:js.title,children:a}),i&&h.jsx("p",{id:p,className:js.description,children:i}),h.jsxs("div",{className:js.actions,children:[h.jsx("button",{type:"button",className:js.cancelButton,onClick:d,autoFocus:!0,children:"Cancel"}),h.jsx("button",{type:"button",className:js.confirmButton,onClick:r,children:o})]})]})})})}const lD="_spinner_13c8l_1",oD="_spin_13c8l_1",rD="_sm_13c8l_14",cD="_md_13c8l_20",uD="_lg_13c8l_26",u0={spinner:lD,spin:oD,sm:rD,md:cD,lg:uD};function d0({size:n="md",className:a,label:i="Loading",liveRegion:o=!1}){return h.jsx("span",{className:`${u0.spinner} ${u0[n]} ${a??""}`,role:o?"status":void 0,"aria-label":i,"aria-hidden":o?void 0:!0})}const Af={not_started:{color:"var(--text-tertiary)",icon:"○",label:"Not Started"},working:{color:"var(--accent-green)",icon:"●",label:"Working"},paused:{color:"var(--accent-yellow)",icon:"◉",label:"Paused"},complete:{color:"var(--accent-green)",icon:"✓",label:"Complete"},failed:{color:"var(--accent-red)",icon:"✗",label:"Failed"},blocked:{color:"var(--accent-yellow)",icon:"⦸",label:"Blocked"}};function is(n){return n==="blocked"?Af.blocked:Af[Sh(n)]}const dD={not_started:"statusPending",working:"statusInProgress",paused:"statusWaitingInput",complete:"statusDone",failed:"statusFailed"};function fD(n){return dD[Sh(n)]??"statusPending"}const hD=["working","paused","failed","not_started","blocked","complete"],f0=["not_started","working","paused","complete","failed"],pD={pending:"not_started",assigned:"not_started",in_progress:"working",waiting_input:"paused",review:"paused",done:"complete"};function Sh(n){return n in Af&&n!=="blocked"?n:pD[n]??"not_started"}const mD={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"},gD="_container_15oob_1",yD="_header_15oob_5",vD="_searchInput_15oob_17",bD="_searchHighlight_15oob_50",SD="_addButton_15oob_56",_D="_createForm_15oob_83",xD="_createInput_15oob_89",TD="_createButton_15oob_120",ED="_creatingHint_15oob_161",CD="_projectRow_15oob_170",AD="_selected_15oob_188",jD="_expandArrow_15oob_193",ND="_expanded_15oob_200",wD="_projectName_15oob_204",DD="_taskCount_15oob_208",kD="_newTaskButton_15oob_214",MD="_taskRow_15oob_241",RD="_taskStatusIcon_15oob_271",OD="_taskTitle_15oob_275",BD="_dependencyBadge_15oob_282",LD="_blockedBadge_15oob_294",ID="_leafSpacer_15oob_299",UD="_childCountBadge_15oob_304",zD="_addChildButton_15oob_317",VD="_emptyCta_15oob_366",HD="_ctaDescription_15oob_379",PD="_ctaButton_15oob_385",GD="_emptyTaskCta_15oob_420",FD="_headerActions_15oob_425",$D="_groupToggle_15oob_431",qD="_groupToggleActive_15oob_458",YD="_statusGroupHeader_15oob_462",KD="_statusGroupIcon_15oob_481",ZD="_statusGroupLabel_15oob_485",XD="_statusGroupCount_15oob_490",QD="_createTaskLink_15oob_503",ve={container:gD,header:yD,searchInput:vD,searchHighlight:bD,addButton:SD,createForm:_D,createInput:xD,createButton:TD,creatingHint:ED,projectRow:CD,selected:AD,expandArrow:jD,expanded:ND,projectName:wD,taskCount:DD,newTaskButton:kD,taskRow:MD,taskStatusIcon:RD,taskTitle:OD,dependencyBadge:BD,blockedBadge:LD,leafSpacer:ID,childCountBadge:UD,addChildButton:zD,emptyCta:VD,ctaDescription:HD,ctaButton:PD,emptyTaskCta:GD,headerActions:FD,groupToggle:$D,groupToggleActive:qD,statusGroupHeader:YD,statusGroupIcon:KD,statusGroupLabel:ZD,statusGroupCount:XD,createTaskLink:QD};function JD(n){if(n.length===0)return[];const a=[...n].sort((o,r)=>o[0]-r[0]),i=[[a[0][0],a[0][1]]];for(let o=1;o<a.length;o++){const r=i[i.length-1],[d,u]=a[o];d<=r[1]+1?r[1]=Math.max(r[1],u):i.push([d,u])}return i}function B1({text:n,indices:a}){if(!a||a.length===0)return h.jsx(h.Fragment,{children:n});const i=JD(a),o=[];let r=0;for(const[d,u]of i)d>r&&o.push(h.jsx("span",{children:n.slice(r,d)},`p${r}`)),o.push(h.jsx("mark",{className:ve.searchHighlight,children:n.slice(d,u+1)},`m${d}`)),r=u+1;return r<n.length&&o.push(h.jsx("span",{children:n.slice(r)},`p${r}`)),h.jsx(h.Fragment,{children:o})}const WD=[{name:"name",weight:2},{name:"description",weight:1}],ek=[{name:"title",weight:2},{name:"description",weight:1}],L1=34,tk=16,I1="grackle-group-by-status";function h0(){try{return localStorage.getItem(I1)==="true"}catch{return!1}}function nk(n){try{localStorage.setItem(I1,String(n))}catch{}}function ak(n,a){const i=new Map;for(const d of n){const p=d.dependsOn.length>0&&d.dependsOn.some(g=>a.get(g)!=="complete")?"blocked":d.status,m=i.get(p);m?m.push(d):i.set(p,[d])}const o=[],r=new Set;for(const d of hD){r.add(d);const u=i.get(d);if(u&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}}for(const[d,u]of i)if(!r.has(d)&&u.length>0){u.sort((m,g)=>m.sortOrder-g.sortOrder);const p=is(d);o.push({status:d,label:p.label,style:p,tasks:u})}return o}function sk({group:n,isExpanded:a,onToggle:i,selectedTaskId:o,navigate:r,titleHighlights:d}){return h.jsxs("div",{"data-testid":`status-group-${n.status}`,children:[h.jsxs("div",{className:ve.statusGroupHeader,role:"button",tabIndex:0,"aria-expanded":a,onClick:i,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),i())},children:[h.jsx("span",{className:`${ve.expandArrow} ${a?ve.expanded:""}`,children:"▸"}),h.jsx("span",{className:ve.statusGroupIcon,style:{color:n.style.color},children:n.style.icon}),h.jsx("span",{className:ve.statusGroupLabel,children:n.label}),h.jsx("span",{className:ve.statusGroupCount,children:n.tasks.length})]}),h.jsx(Vn,{children:a&&h.jsx(Xt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},style:{overflow:"hidden"},children:n.tasks.map(u=>{const p=is(u.status),m=o===u.id;return h.jsxs("div",{onClick:()=>r(ns(u.id)),className:`${ve.taskRow} ${m?ve.selected:""}`,style:{"--task-indent":`${L1}px`},"data-task-id":u.id,children:[h.jsx("span",{className:ve.leafSpacer}),h.jsx("span",{className:ve.taskStatusIcon,style:{color:p.color},children:p.icon}),h.jsx("span",{className:ve.taskTitle,title:u.title,children:h.jsx(B1,{text:u.title,indices:d.get(u.id)})})]},u.id)})})})]})}function ik(n){const a=new Map(n.map(o=>[o.id,{...o,children:[]}])),i=[];for(const o of a.values())o.parentTaskId&&a.has(o.parentTaskId)?a.get(o.parentTaskId).children.push(o):i.push(o);for(const o of a.values())o.children.sort((r,d)=>r.sortOrder-d.sortOrder);return i.sort((o,r)=>o.sortOrder-r.sortOrder)}function U1({node:n,depth:a,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,projectId:u,taskStatusById:p,titleHighlights:m}){const g=is(n.status),v=n.dependsOn.length>0&&n.dependsOn.some(j=>p.get(j)!=="complete"),y=i.has(n.id),_=n.children.length>0,T=r===n.id,E=L1+a*tk;return h.jsxs(h.Fragment,{children:[h.jsxs("div",{onClick:()=>d(ns(n.id)),className:`${ve.taskRow} ${T?ve.selected:""}`,style:{"--task-indent":`${E}px`},"data-task-id":n.id,children:[_&&h.jsx("span",{className:`${ve.expandArrow} ${y?ve.expanded:""}`,role:"button",tabIndex:0,"aria-label":y?"Collapse task":"Expand task",onClick:j=>{j.stopPropagation(),o(n.id)},onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),j.stopPropagation(),o(n.id))},children:"▸"}),!_&&h.jsx("span",{className:ve.leafSpacer}),h.jsx("span",{className:ve.taskStatusIcon,style:{color:g.color},children:g.icon}),h.jsx("span",{className:ve.taskTitle,title:n.title,children:h.jsx(B1,{text:n.title,indices:m.get(n.id)})}),_&&h.jsxs("span",{className:ve.childCountBadge,children:[n.children.filter(j=>j.status==="complete").length,"/",n.children.length]}),n.dependsOn.length>0&&h.jsx("span",{className:`${ve.dependencyBadge} ${v?ve.blockedBadge:""}`,title:`Depends on: ${n.dependsOn.join(", ")}`,children:v?"blocked":"dep"}),a<jN&&h.jsx("button",{onClick:j=>{j.stopPropagation(),d(Os(u,n.id))},title:"Add child task","aria-label":"Add child task",className:ve.addChildButton,children:"+"})]}),h.jsx(Vn,{children:_&&y&&h.jsx(Xt.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(j=>h.jsx(U1,{node:j,depth:a+1,expandedTasks:i,toggleTask:o,selectedTaskId:r,navigate:d,projectId:u,taskStatusById:p,titleHighlights:m},j.id))})})]})}function lk(){const{projects:n,tasks:a,loadTasks:i,createProject:o,projectCreating:r}=It(),d=Mn(),[u,p]=S.useState(new Set),[m,g]=S.useState(new Set),[v,y]=S.useState(new Set),[_,T]=S.useState(!1),[E,j]=S.useState(""),[N,C]=S.useState(h0),[A,k]=S.useState(h0),[H,O]=S.useState(new Map),$=()=>{const ee=!N;nk(ee),C(ee),ee&&(k(!0),O(new Map))},G=(ee,Ve)=>{const Ne=`${ee}:${Ve}`;O(_e=>{const dt=new Map(_e),ft=dt.has(Ne)?dt.get(Ne):A;return dt.set(Ne,!ft),dt})},M=(ee,Ve)=>{const Ne=`${ee}:${Ve}`;return H.has(Ne)?H.get(Ne):A},V=Kt("/tasks/:taskId/*"),te=Kt("/projects/:projectId"),ne=(V==null?void 0:V.params.taskId)!=="new"?V==null?void 0:V.params.taskId:void 0,ae=te==null?void 0:te.params.projectId,re=S.useRef(u);re.current=u;const Y=S.useMemo(()=>new Map(a.map(ee=>[ee.id,ee.status])),[a]),Q=ee=>{p(Ve=>{const Ne=new Set(Ve);return Ne.has(ee)?Ne.delete(ee):(Ne.add(ee),i(ee)),Ne})},B=ee=>{g(Ve=>{const Ne=new Set(Ve);return Ne.has(ee)?(Ne.delete(ee),y(_e=>new Set(_e).add(ee))):(Ne.add(ee),y(_e=>{const dt=new Set(_e);return dt.delete(ee),dt})),Ne})};S.useEffect(()=>{const ee=new Set(a.filter(Ve=>Ve.parentTaskId).map(Ve=>Ve.parentTaskId));ee.size>0&&g(Ve=>{const Ne=new Set(Ve);for(const _e of ee)v.has(_e)||Ne.add(_e);return Ne})},[a,v]),S.useEffect(()=>{ae&&!re.current.has(ae)&&(p(ee=>new Set(ee).add(ae)),i(ae))},[ae,i]);const F=()=>{!E.trim()||r||(o(E.trim()),j(""),T(!1))},[W,be]=S.useState(""),{directMatchTaskIds:Te,treeMatchTaskIds:nt,visibleProjectIds:Me,matchedProjectIds:fe,titleHighlights:Ie}=S.useMemo(()=>{if(!W.trim())return{directMatchTaskIds:null,treeMatchTaskIds:null,visibleProjectIds:null,matchedProjectIds:null,titleHighlights:new Map};const ee=o0(n,W,WD),Ve=o0(a,W,ek),Ne=new Set(ee.map($e=>$e.item.id)),_e=new Set(Ve.map($e=>$e.item.id)),dt=new Map;for(const $e of Ve){const Re=$e.matches.find(Rn=>Rn.key==="title");Re&&dt.set($e.item.id,Re.indices)}const ft=new Set(Ne);for(const $e of Ve)ft.add($e.item.projectId);const Ut=new Set(_e),kt=new Map(a.map($e=>[$e.id,$e]));for(const $e of[..._e]){let Re=kt.get($e);for(;Re!=null&&Re.parentTaskId;)Ut.add(Re.parentTaskId),Re=kt.get(Re.parentTaskId)}return{directMatchTaskIds:_e,treeMatchTaskIds:Ut,visibleProjectIds:ft,matchedProjectIds:Ne,titleHighlights:dt}},[W,n,a]),Ee=S.useRef(new Set);return S.useEffect(()=>{if(W.trim())for(const ee of n)!u.has(ee.id)&&!Ee.current.has(ee.id)&&(Ee.current.add(ee.id),i(ee.id))},[W,n,u,i]),h.jsxs("div",{className:ve.container,children:[h.jsxs("div",{className:ve.header,children:[h.jsx("span",{children:"Projects"}),h.jsxs("div",{className:ve.headerActions,children:[h.jsx("button",{className:`${ve.groupToggle} ${N?ve.groupToggleActive:""}`,onClick:$,"aria-label":N?"Switch to tree view":"Group tasks by status","aria-pressed":N,title:N?"Switch to tree view":"Group tasks by status","data-testid":"group-by-status-toggle",children:"≡"}),h.jsx("button",{className:ve.addButton,onClick:()=>T(!_),"aria-label":"Create project",title:"Create project",children:"+"})]})]}),n.length>0&&h.jsx("input",{type:"text",value:W,onChange:ee=>be(ee.target.value),placeholder:"Filter...","aria-label":"Filter projects and tasks",className:ve.searchInput,"data-testid":"sidebar-search"}),_&&h.jsxs("div",{className:ve.createForm,children:[h.jsx("input",{type:"text",value:E,onChange:ee=>j(ee.target.value),onKeyDown:ee=>ee.key==="Enter"&&F(),placeholder:"Project name...",autoFocus:!0,disabled:r,className:ve.createInput}),h.jsx("button",{onClick:F,className:ve.createButton,disabled:r,children:r?h.jsx(d0,{size:"sm",label:"Creating project"}):"OK"})]}),r&&h.jsxs("div",{className:ve.creatingHint,children:[h.jsx(d0,{size:"sm",label:"Creating project"}),"Creating project…"]}),n.length===0&&!_&&h.jsxs("div",{className:ve.emptyCta,children:[h.jsx("button",{className:ve.ctaButton,onClick:()=>T(!0),children:"Create Project"}),h.jsx("div",{className:ve.ctaDescription,children:"Organize your work into projects"})]}),n.map(ee=>{if(Me&&!Me.has(ee.id))return null;const Ve=Te!==null,Ne=u.has(ee.id)||Ve,_e=a.filter(Re=>Re.projectId===ee.id),dt=(fe==null?void 0:fe.has(ee.id))??!1,ft=Ve&&!dt?N?Te:nt:null,Ut=ft?_e.filter(Re=>ft.has(Re.id)):_e,kt=ae===ee.id,$e=Ne&&!N?ik(Ut):[];return h.jsxs("div",{children:[h.jsxs("div",{onClick:()=>{kt?Q(ee.id):(Ne||Q(ee.id),d(Kl(ee.id)))},className:`${ve.projectRow} ${kt?ve.selected:""}`,children:[h.jsx("span",{className:`${ve.expandArrow} ${Ne?ve.expanded:""}`,children:"▸"}),h.jsx("span",{className:ve.projectName,title:ee.name,children:ee.name}),h.jsx("span",{className:ve.taskCount,children:_e.length>0&&`${_e.filter(Re=>Re.status==="complete").length}/${_e.length}`}),h.jsx("button",{onClick:Re=>{Re.stopPropagation(),d(Os(ee.id))},title:"New task",className:ve.newTaskButton,children:"+"})]}),h.jsx(Vn,{children:Ne&&h.jsxs(Xt.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:[N?ak(Ut,Y).map(Re=>h.jsx(sk,{group:Re,isExpanded:M(ee.id,Re.status),onToggle:()=>G(ee.id,Re.status),selectedTaskId:ne,navigate:d,titleHighlights:Ie},Re.status)):$e.map(Re=>h.jsx(U1,{node:Re,depth:0,expandedTasks:m,toggleTask:B,selectedTaskId:ne,navigate:d,projectId:ee.id,taskStatusById:Y,titleHighlights:Ie},Re.id)),Ut.length===0&&h.jsx("div",{className:ve.emptyTaskCta,children:h.jsx("button",{className:ve.createTaskLink,onClick:()=>d(Os(ee.id)),children:"+ Create Task"})})]})})]},ee.id)})]})}const ok="_container_lovia_1",rk="_content_lovia_40",p0={container:ok,content:rk},ck=320,z1=220,V1=600,H1="grackle-sidebar-width";function uk(){try{const n=localStorage.getItem(H1);if(n!==null){const a=Number(n);if(Number.isFinite(a)&&a>=z1&&a<=V1)return a}}catch{}return ck}function dk(n){try{localStorage.setItem(H1,String(n))}catch{}}function fk(){const[n]=S.useState(uk),a=S.useRef(null);return S.useEffect(()=>{const i=a.current;if(!i)return;const o=new ResizeObserver(r=>{for(const d of r){const u=d.borderBoxSize[0];if(u){const p=Math.round(u.inlineSize);p>=z1&&p<=V1&&dk(p)}}});return o.observe(i),()=>{o.disconnect()}},[]),h.jsx("div",{className:p0.container,ref:a,"data-testid":"sidebar",style:{width:n},children:h.jsx("div",{className:p0.content,children:h.jsx(lk,{})})})}const hk="_bar_8ghh5_1",pk="_barColumn_8ghh5_32",mk="_barRow_8ghh5_63",gk="_input_8ghh5_74",yk="_inputSmall_8ghh5_109",vk="_select_8ghh5_178",bk="_btnPrimary_8ghh5_214",Sk="_btnDanger_8ghh5_245",_k="_btnGhost_8ghh5_284",xk="_badge_8ghh5_312",Tk="_statusText_8ghh5_322",Ek="_statusCompleted_8ghh5_327",Ck="_statusFailed_8ghh5_331",Ak="_statusBlocked_8ghh5_335",jk="_hintText_8ghh5_340",Nk="_creatingHint_8ghh5_345",wk="_errorHint_8ghh5_353",Dk="_disconnectHint_8ghh5_359",ce={bar:hk,barColumn:pk,barRow:mk,input:gk,inputSmall:yk,select:vk,btnPrimary:bk,btnDanger:Sk,btnGhost:_k,badge:xk,statusText:Tk,statusCompleted:Ek,statusFailed:Ck,statusBlocked:Ak,hintText:jk,creatingHint:Nk,errorHint:wk,disconnectHint:Dk};function m0(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 g0({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 kk(){const{spawn:n,sendInput:a,kill:i,sessions:o,tasks:r,environments:d,personas:u,addEnvironment:p,provisionEnvironment:m,codespaces:g,codespaceError:v,codespaceListError:y,codespaceCreating:_,listCodespaces:T,createCodespace:E}=It(),{showToast:j}=ao(),N=Mn(),[C]=Lf(),A=Kt("/sessions/:sessionId"),k=Kt("/tasks/:taskId"),H=Kt("/tasks/:taskId/stream"),O=Kt("/tasks/:taskId/findings"),$=Kt("/tasks/:taskId/edit"),G=Kt("/sessions/new"),M=Kt("/environments/new"),V=Kt("/projects/:projectId"),te=Kt("/tasks/new"),ne=Kt("/"),ae=Kt("/settings/*"),re=A==null?void 0:A.params.sessionId,Y=(k==null?void 0:k.params.taskId)??(H==null?void 0:H.params.taskId)??(O==null?void 0:O.params.taskId),Q=!!G,B=!!M,F=!!V,W=!!te,be=!!$,Te=!!ne&&!Q&&!B&&!F&&!W,nt=!!ae,Me=Q?C.get("env")??"":"",[fe,Ie]=S.useState(""),[Ee,ee]=S.useState(""),[Ve,Ne]=S.useState(""),[_e,dt]=S.useState("local"),[ft,Ut]=S.useState(""),[kt,$e]=S.useState(""),[Re,Rn]=S.useState(""),[Aa,ja]=S.useState(""),[Hn,Wn]=S.useState(""),[On,ea]=S.useState(""),[X,J]=S.useState(""),[se,ge]=S.useState(""),[pe,Ue]=S.useState(""),[Ce,bt]=S.useState("pick"),xe=re?o.find(Se=>Se.id===re):void 0,ht=Y?r.find(Se=>Se.id===Y):void 0,St=(ht==null?void 0:ht.latestSessionId)||void 0,Oe=St?o.find(Se=>Se.id===St):void 0,Mt=ht?ht.dependsOn.some(Se=>{const we=r.find(Et=>Et.id===Se);return we&&we.status!=="complete"}):!1;if(Te||nt)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a session or click + to start"})});if(be||W)return h.jsx(h.Fragment,{});if(B){const Se=le=>{if(!le.trim())return!0;const Ct=Number(le);return Number.isInteger(Ct)&&Ct>=1&&Ct<=65535},we=()=>!(!Ve.trim()||_e==="ssh"&&!ft.trim()||_e==="codespace"&&!On.trim()||(_e==="local"||_e==="ssh")&&!Se(kt)),Et=()=>{if(!we())return;const le={};if(_e==="local"){if(ft.trim()&&(le.host=ft.trim()),kt.trim()){const Ct=Number(kt);Number.isInteger(Ct)&&(le.port=Ct)}}else if(_e==="ssh"){if(le.host=ft.trim(),Re.trim()&&(le.user=Re.trim()),kt.trim()){const Ct=Number(kt);Number.isInteger(Ct)&&(le.sshPort=Ct)}X.trim()&&(le.identityFile=X.trim())}else _e==="docker"?(Aa.trim()&&(le.image=Aa.trim()),Hn.trim()&&(le.repo=Hn.trim())):_e==="codespace"&&(le.codespaceName=On.trim());p(Ve.trim(),_e,le),j("Environment added successfully","success"),Ne(""),dt("local"),Ut(""),$e(""),Rn(""),ja(""),Wn(""),ea(""),J(""),ge(""),Ue(""),bt("pick"),N(ki,{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:Ve,onChange:le=>Ne(le.target.value),placeholder:"Environment name...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:_e,onChange:le=>{dt(le.target.value),le.target.value==="codespace"&&(T(),bt("pick"),ea(""))},className:ce.select,children:[h.jsx("option",{value:"local",children:"local"}),h.jsx("option",{value:"ssh",children:"ssh"}),h.jsx("option",{value:"docker",children:"docker"}),h.jsx("option",{value:"codespace",children:"codespace"})]}),h.jsx("button",{onClick:Et,disabled:!we(),className:ce.btnPrimary,children:"Add"})]}),h.jsxs("div",{className:ce.barRow,children:[_e==="local"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ft,onChange:le=>Ut(le.target.value),placeholder:"Host (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:kt,onChange:le=>$e(le.target.value),placeholder:"Port (optional)...",className:ce.inputSmall})]}),_e==="ssh"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:ft,onChange:le=>Ut(le.target.value),placeholder:"Host (required)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Re,onChange:le=>Rn(le.target.value),placeholder:"User (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"number",min:1,max:65535,value:kt,onChange:le=>$e(le.target.value),placeholder:"SSH port (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:X,onChange:le=>J(le.target.value),placeholder:"Identity file (optional)...",className:ce.inputSmall})]}),_e==="docker"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:Aa,onChange:le=>ja(le.target.value),placeholder:"Image (optional)...",className:ce.inputSmall}),h.jsx("input",{type:"text",value:Hn,onChange:le=>Wn(le.target.value),placeholder:"Repo (optional)...",className:ce.inputSmall})]}),_e==="codespace"&&Ce==="pick"&&h.jsxs(h.Fragment,{children:[!y&&h.jsxs("select",{value:On,onChange:le=>{le.target.value==="__create__"?(bt("create"),ea("")):(ea(le.target.value),le.target.value&&!Ve.trim()&&Ne(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..."}),y&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:ce.errorHint,children:y}),h.jsx("input",{type:"text",value:On,onChange:le=>ea(le.target.value),placeholder:"Or enter codespace name manually...",className:ce.inputSmall})]}),v&&!y&&h.jsx("span",{className:ce.errorHint,children:v})]}),_e==="codespace"&&Ce==="create"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"text",value:se,onChange:le=>ge(le.target.value),placeholder:"owner/repo",className:ce.inputSmall}),h.jsx("input",{type:"text",value:pe,onChange:le=>Ue(le.target.value),placeholder:"Machine type (optional)...",className:ce.inputSmall}),h.jsx("button",{onClick:()=>{se.trim()&&(E(se.trim(),pe.trim()||void 0),bt("pick"),ge(""),Ue(""))},disabled:!se.trim(),className:ce.btnPrimary,children:"Create"}),h.jsx("button",{onClick:()=>{bt("pick"),ge(""),Ue("")},className:ce.btnGhost,children:"Cancel"})]})]})]})}if(F)return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Select a task or click + to create one"})});if(Y&&ht){if(ht.status==="not_started"){const Se=Mt?ht.dependsOn.map(we=>r.find(Et=>Et.id===we)).filter(we=>we&&we.status!=="complete").map(we=>we.title):[];return h.jsx("div",{className:ce.bar,children:Mt?h.jsxs("span",{className:ce.statusBlocked,children:["Blocked by: ",Se.join(", ")]}):h.jsx("span",{className:ce.hintText,children:"Use the buttons above to start or manage this task"})})}if(ht.status==="working"||ht.status==="paused"){if((Oe==null?void 0:Oe.status)==="idle"){const we=Oe.environmentId,Et=m0(we,d),le=Ct=>{Ct.preventDefault();const Bn=ht.latestSessionId||St;!fe.trim()||!Bn||Et||(a(Bn,fe),Ie(""))};return h.jsxs("form",{onSubmit:le,className:ce.bar,children:[Et&&we&&h.jsx(g0,{environmentId:we,onReconnect:m}),h.jsx("input",{type:"text",value:fe,onChange:Ct=>Ie(Ct.target.value),placeholder:"Type a message...",autoFocus:!Et,disabled:Et,className:ce.input}),h.jsx("span",{title:Et?"Environment is unavailable — reconnect first":void 0,children:h.jsx("button",{type:"submit",disabled:!fe.trim()||Et,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(ht.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:()=>N(Os(ht.projectId)),className:ce.btnPrimary,children:"+ New Task"})]});if(ht.status==="failed")return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:`${ce.statusText} ${ce.statusFailed}`,children:"Task failed"})})}if(Q){const Se=we=>{we.preventDefault(),!(!fe.trim()||!Me)&&(n(Me,fe,Ee),j("Session started","success"),Ie(""),ee(""))};return h.jsxs("form",{onSubmit:Se,className:ce.bar,children:[h.jsx("span",{className:ce.badge,children:"new chat"}),h.jsx("input",{type:"text",value:fe,onChange:we=>Ie(we.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:ce.input}),h.jsxs("select",{value:Ee,onChange:we=>ee(we.target.value),className:ce.select,children:[h.jsx("option",{value:"",children:"(Default)"}),u.map(we=>h.jsx("option",{value:we.id,children:we.name},we.id))]}),h.jsx("button",{type:"submit",disabled:!fe.trim()||!Me,className:ce.btnPrimary,children:"Go"})]})}if(re){const Se=(xe==null?void 0:xe.status)==="running",we=(xe==null?void 0:xe.status)==="idle",Et=xe!==void 0&&["completed","failed","interrupted"].includes(xe.status);if(Se)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(re),className:ce.btnDanger,title:"Stop session",children:"Stop"})]});if(we){const le=m0(xe.environmentId,d),Ct=Bn=>{Bn.preventDefault(),!(!fe.trim()||le)&&(a(re,fe),Ie(""))};return h.jsxs("form",{onSubmit:Ct,className:ce.bar,children:[le&&xe.environmentId&&h.jsx(g0,{environmentId:xe.environmentId,onReconnect:m}),h.jsx("input",{type:"text",value:fe,onChange:Bn=>Ie(Bn.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:!fe.trim()||le,className:ce.btnPrimary,children:"Send"})}),h.jsx("button",{type:"button",onClick:()=>i(re),className:ce.btnDanger,title:"Stop session",children:"Stop"})]})}if(Et)return h.jsxs("div",{className:ce.bar,children:[h.jsxs("span",{className:`${ce.statusText} ${ce.hintText}`,children:["Session ",xe.status]}),h.jsx("button",{onClick:()=>N(G0(xe.environmentId)),className:ce.btnPrimary,children:"+ New Chat"})]})}return h.jsx("div",{className:ce.bar,children:h.jsx("span",{className:ce.hintText,children:"Loading..."})})}const Mk="_toast_da8ll_1",Rk="_success_da8ll_18",Ok="_icon_da8ll_22",Bk="_error_da8ll_25",Lk="_warning_da8ll_32",Ik="_info_da8ll_38",Uk="_message_da8ll_53",zk="_close_da8ll_60",Bl={toast:Mk,success:Rk,icon:Ok,error:Bk,warning:Lk,info:Ik,message:Uk,close:zk},Vk={success:"✓",error:"✕",warning:"⚠",info:"ℹ"};function Hk({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(Xt.div,{className:`${Bl.toast} ${Bl[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:Bl.icon,"aria-hidden":"true",children:Vk[n.variant]}),h.jsx("span",{className:Bl.message,children:n.message}),h.jsx("button",{type:"button",className:Bl.close,onClick:()=>a(n.id),"aria-label":"Dismiss notification",children:"×"})]})}const Pk="_container_qqse2_1",Gk={container:Pk};function Fk(){const{toasts:n,dismissToast:a}=ao();return h.jsx("div",{className:Gk.container,"data-testid":"toast-container",children:h.jsx(Vn,{children:n.map(i=>h.jsx(Hk,{toast:i,onDismiss:a},i.id))})})}function $k(n,a){const i=S.useRef(null);S.useEffect(()=>{const o=i.current;if(i.current=n,o===null)return;const r=new Map;for(const u of o)r.set(u.id,u);const d=new Set;for(const u of n){d.add(u.id);const p=r.get(u.id);if(p&&p.status!==u.status&&u.status!=="sleeping"){if(u.status==="connecting"){a("Provisioning environment…","info");continue}u.status==="connected"?a("Environment connected","success"):u.status==="error"?a("Environment provision failed","error"):u.status==="disconnected"&&(p.status==="connected"?a("Environment disconnected","warning"):a("Environment stopped","info"))}}for(const u of o)d.has(u.id)||a("Environment removed","info")},[n,a])}const qk="_panelContainer_1ncbu_1",Yk="_emptyState_1ncbu_8",Kk="_fadeIn_1ncbu_1",Zk="_projectSummary_1ncbu_17",Xk="_projectSummaryTitle_1ncbu_28",Qk="_projectSummarySubtitle_1ncbu_32",Jk="_header_1ncbu_36",Wk="_headerInfo_1ncbu_69",eM="_killButton_1ncbu_75",tM="_headerTitle_1ncbu_104",nM="_headerActions_1ncbu_119",aM="_taskStatusBadge_1ncbu_126",sM="_taskBranch_1ncbu_135",iM="_taskBlockedBadge_1ncbu_141",lM="_btnPrimary_1ncbu_149",oM="_btnDanger_1ncbu_180",rM="_btnGhost_1ncbu_219",cM="_rejectInput_1ncbu_245",uM="_tabBar_1ncbu_275",dM="_tab_1ncbu_275",fM="_active_1ncbu_301",hM="_eventScroll_1ncbu_306",pM="_tabContent_1ncbu_312",mM="_noContext_1ncbu_317",gM="_overviewContent_1ncbu_323",yM="_overviewDashboard_1ncbu_332",vM="_overviewHero_1ncbu_338",bM="_statusBadge_1ncbu_345",SM="_statusPending_1ncbu_357",_M="_statusAssigned_1ncbu_362",xM="_statusInProgress_1ncbu_367",TM="_statusReview_1ncbu_372",EM="_statusDone_1ncbu_377",CM="_statusFailed_1ncbu_382",AM="_statusWaitingInput_1ncbu_387",jM="_overviewBranchPill_1ncbu_392",NM="_branchLink_1ncbu_407",wM="_overviewSection_1ncbu_418",DM="_overviewLabel_1ncbu_424",kM="_overviewValue_1ncbu_431",MM="_overviewMuted_1ncbu_436",RM="_overviewMarkdown_1ncbu_442",OM="_envRow_1ncbu_511",BM="_envDot_1ncbu_517",LM="_envDotGreen_1ncbu_524",IM="_envDotYellow_1ncbu_528",UM="_envDotRed_1ncbu_532",zM="_envDotGray_1ncbu_536",VM="_depList_1ncbu_540",HM="_depItem_1ncbu_546",PM="_depBlocked_1ncbu_553",GM="_depDone_1ncbu_557",FM="_timeline_1ncbu_561",$M="_timelineRow_1ncbu_567",qM="_timelineKey_1ncbu_574",YM="_timelineValue_1ncbu_580",KM="_timelineDelta_1ncbu_584",ZM="_reviewNotes_1ncbu_595",XM="_overviewDescription_1ncbu_606",QM="_waitingMessage_1ncbu_612",JM="_errorMessage_1ncbu_616",WM="_eventOverflowWarning_1ncbu_620",eR="_attemptSelector_1ncbu_634",tR="_attemptLabel_1ncbu_650",nR="_attemptButton_1ncbu_654",aR="_attemptActive_1ncbu_671",sR="_attemptStatus_1ncbu_677",iR="_emptyCta_1ncbu_683",lR="_ctaTitle_1ncbu_695",oR="_ctaDescription_1ncbu_701",rR="_ctaButton_1ncbu_708",cR="_ctaLink_1ncbu_743",uR="_projectHeader_1ncbu_757",dR="_projectName_1ncbu_782",fR="_projectMeta_1ncbu_795",hR="_metaRow_1ncbu_803",pR="_metaLabel_1ncbu_816",mR="_metaValue_1ncbu_831",gR="_archiveButton_1ncbu_841",yR="_repoLink_1ncbu_871",vR="_metaToggle_1ncbu_881",bR="_metaToggleArrow_1ncbu_902",SR="_metaToggleArrowOpen_1ncbu_907",_R="_progressBarContainer_1ncbu_911",xR="_progressBar_1ncbu_911",TR="_progressFill_1ncbu_927",ER="_progressLabel_1ncbu_934",CR="_metaTimestamps_1ncbu_941",AR="_metaTimestamp_1ncbu_941",L={panelContainer:qk,emptyState:Yk,fadeIn:Kk,projectSummary:Zk,projectSummaryTitle:Xk,projectSummarySubtitle:Qk,header:Jk,headerInfo:Wk,killButton:eM,headerTitle:tM,headerActions:nM,taskStatusBadge:aM,taskBranch:sM,taskBlockedBadge:iM,btnPrimary:lM,btnDanger:oM,btnGhost:rM,rejectInput:cM,tabBar:uM,tab:dM,active:fM,eventScroll:hM,tabContent:pM,noContext:mM,overviewContent:gM,overviewDashboard:yM,overviewHero:vM,statusBadge:bM,statusPending:SM,statusAssigned:_M,statusInProgress:xM,statusReview:TM,statusDone:EM,statusFailed:CM,statusWaitingInput:AM,overviewBranchPill:jM,branchLink:NM,overviewSection:wM,overviewLabel:DM,overviewValue:kM,overviewMuted:MM,overviewMarkdown:RM,envRow:OM,envDot:BM,envDotGreen:LM,envDotYellow:IM,envDotRed:UM,envDotGray:zM,depList:VM,depItem:HM,depBlocked:PM,depDone:GM,timeline:FM,timelineRow:$M,timelineKey:qM,timelineValue:YM,timelineDelta:KM,reviewNotes:ZM,overviewDescription:XM,waitingMessage:QM,errorMessage:JM,eventOverflowWarning:WM,attemptSelector:eR,attemptLabel:tR,attemptButton:nR,attemptActive:aR,attemptStatus:sR,emptyCta:iR,ctaTitle:lR,ctaDescription:oR,ctaButton:rR,ctaLink:cR,projectHeader:uR,projectName:dR,projectMeta:fR,metaRow:hR,metaLabel:pR,metaValue:mR,archiveButton:gR,repoLink:yR,metaToggle:vR,metaToggleArrow:bR,metaToggleArrowOpen:SR,progressBarContainer:_R,progressBar:xR,progressFill:TR,progressLabel:ER,metaTimestamps:CR,metaTimestamp:AR};function jR(){const{projects:n,createProject:a}=It();return n.length===0?h.jsxs("div",{className:L.emptyCta,children:[h.jsx("div",{className:L.ctaTitle,children:"Welcome to Grackle"}),h.jsx("div",{className:L.ctaDescription,children:"Organize your work into projects and let agents tackle the tasks."}),h.jsx("button",{className:L.ctaButton,onClick:()=>{const i=window.prompt("Project name:");i!=null&&i.trim()&&a(i.trim())},children:"Create Your First Project"})]}):h.jsx("div",{className:L.emptyState,children:"Select a project or task to get started"})}function NR(n,a){const i=[];let o=n;const r=new Set;for(;o&&a.has(o)&&!r.has(o);){r.add(o);const d=a.get(o);i.unshift(d),o=d.parentTaskId||void 0}return i}const Bs={label:"Home",url:"/"};function wR(n){return n?[Bs,{label:"Settings",url:"/settings"},{label:n,url:void 0}]:[Bs,{label:"Settings",url:void 0}]}function DR(){return[Bs,{label:"New Environment",url:void 0}]}function kR(){return[Bs,{label:"New Chat",url:void 0}]}function MR(n){return[Bs,{label:`Session ${n.slice(0,8)}`,url:void 0}]}function RR(n,a){const i=a.find(o=>o.id===n);return[Bs,{label:(i==null?void 0:i.name)??"Project",url:void 0}]}function OR(n,a,i){const o=NR(n,i),r=i.get(n),d=r==null?void 0:r.projectId,u=d?a.find(g=>g.id===d):void 0,p=[Bs];u&&p.push({label:u.name,url:Kl(u.id)});for(let g=0;g<o.length-1;g++)p.push({label:o[g].title,url:ns(o[g].id)});const m=o[o.length-1];return p.push({label:(m==null?void 0:m.title)??n,url:void 0}),p}function BR(){const n=kR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Vi,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Enter a prompt below to start a new session"})]})}const P1=50;function LR(n,a,i,o,r=P1){return o?n<r:a-n-i<r}function IR(n,a){const i=a-n;return i>0?i:0}function UR({scrollRef:n,contentLength:a,isReversed:i}){const[o,r]=S.useState(!0),d=S.useRef(0),u=S.useRef(!1),p=S.useRef(0);S.useEffect(()=>{const g=n.current;if(!g)return;let v=!0;const y=()=>{p.current||(p.current=requestAnimationFrame(()=>{p.current=0;const _=LR(g.scrollTop,g.scrollHeight,g.clientHeight,i,P1);_!==v&&(v=_,r(_))}))};return g.addEventListener("scroll",y,{passive:!0}),()=>{g.removeEventListener("scroll",y),p.current&&(cancelAnimationFrame(p.current),p.current=0)}},[n,i]),S.useLayoutEffect(()=>{const g=n.current;!g||u.current||(u.current=!0,i?g.scrollTop=0:g.scrollTop=g.scrollHeight,r(!0))},[n,i]),S.useLayoutEffect(()=>{const g=n.current;if(g){if(i&&!o){const v=IR(d.current,g.scrollHeight);v>0&&(g.scrollTop+=v)}o&&(i?g.scrollTo({top:0,behavior:"smooth"}):g.scrollTo({top:g.scrollHeight,behavior:"smooth"})),d.current=g.scrollHeight}},[a,o,i,n]);const m=S.useCallback(()=>{const g=n.current;if(!g)return;const v=i?0:g.scrollHeight;g.scrollTo({top:v,behavior:"smooth"}),r(!0)},[n,i]);return{isAtAnchor:o,scrollToAnchor:m}}const zR="_wrapper_p24zt_1",VR="_scrollContainer_p24zt_9",HR="_toolbar_p24zt_15",PR="_directionToggle_p24zt_22",GR="_scrollToAnchor_p24zt_60",FR="_scrollToAnchorBottom_p24zt_84",$R="_scrollToAnchorTop_p24zt_88",Ns={wrapper:zR,scrollContainer:VR,toolbar:HR,directionToggle:PR,scrollToAnchor:GR,scrollToAnchorBottom:FR,scrollToAnchorTop:$R},G1="grackle-stream-direction";function qR(){try{return localStorage.getItem(G1)==="reversed"}catch{return!1}}function YR({eventsDropped:n}){return n<=0?h.jsx(h.Fragment,{}):h.jsxs("div",{className:L.eventOverflowWarning,role:"alert",children:["⚠"," ",n.toLocaleString()," older event",n===1?"":"s"," were dropped — only the most recent 5,000 are shown. Full history is available in the session log."]})}function F1({events:n,eventsDropped:a,emptyState:i}){const o=S.useRef(null),[r,d]=S.useState(qR),u=AN(),p=S.useMemo(()=>r?[...n].reverse():n,[n,r]),{isAtAnchor:m,scrollToAnchor:g}=UR({scrollRef:o,contentLength:n.length,isReversed:r}),v=()=>{const T=!r;d(T);try{localStorage.setItem(G1,T?"reversed":"default")}catch{}},y=u?0:.2,_=r?-8:8;return h.jsxs("div",{className:Ns.wrapper,children:[h.jsx("div",{className:Ns.toolbar,children:h.jsx("button",{className:Ns.directionToggle,onClick:v,title:r?"Showing newest first":"Showing oldest first","aria-label":r?"Switch to newest at bottom":"Switch to newest at top","data-testid":"direction-toggle",children:r?"↓":"↑"})}),h.jsxs("div",{ref:o,className:Ns.scrollContainer,"data-testid":"event-stream-scroll",children:[n.length===0&&i,h.jsx(YR,{eventsDropped:a}),h.jsx(Vn,{initial:!1,children:p.map((T,E)=>{const j=r?n.length-1-E:E;return h.jsx(Xt.div,{initial:{opacity:0,y:_},animate:{opacity:1,y:0},transition:{duration:y,ease:"easeOut"},children:h.jsx(Jw,{event:T,toolUseCtx:T.toolUseCtx})},`${T.sessionId}-${T.timestamp}-${j}`)})})]}),h.jsx(Vn,{children:!m&&h.jsxs(Xt.button,{className:`${Ns.scrollToAnchor} ${r?Ns.scrollToAnchorTop:Ns.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 $1(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 q1(n){const a=new Map;for(const d of n)if(d.raw)try{a.set(d,JSON.parse(d.raw))}catch{}const i=new Map;for(const d of n){if(d.eventType!=="tool_use")continue;const u=a.get(d);if(!(!u||typeof u.id!="string"))try{const p=JSON.parse(d.content);i.set(u.id,{tool:p.tool,args:p.args})}catch{}}const o=new Set;return n.map(d=>{if(d.eventType!=="tool_result")return d;const u=a.get(d);if(!u||typeof u.tool_use_id!="string")return d;const p=i.get(u.tool_use_id);return p?(o.add(u.tool_use_id),{...d,toolUseCtx:p}):d}).filter(d=>{if(d.eventType!=="tool_use")return!0;const u=a.get(d);return u&&typeof u.id=="string"?!o.has(u.id):!0})}function KR({sessionId:n,session:a,isActive:i,onKill:o}){return h.jsxs("div",{className:L.header,children:[h.jsxs("span",{children:["Session: ",n.slice(0,8),a&&` | ${a.runtime} | ${a.status}`]}),h.jsxs("span",{className:L.headerInfo,children:[a&&h.jsx("span",{children:a.prompt.length>60?a.prompt.slice(0,60)+"...":a.prompt}),i&&h.jsx("button",{onClick:()=>o(n),title:"Stop session",className:L.killButton,children:"×"})]})]})}function ZR({session:n}){const a=n&&["completed","failed","interrupted"].includes(n.status),i=a?`Session ${n.status} with no events recorded.`:"Waiting for events...";return h.jsx("div",{className:a?L.errorMessage:L.waitingMessage,children:i})}function XR(){const{sessionId:n}=Wr(),{events:a,eventsDropped:i,sessions:o,kill:r,loadSessionEvents:d}=It(),u=S.useRef(void 0),p=MR(n),m=o.find(y=>y.id===n)??void 0,g=S.useMemo(()=>{const y=n?a.filter(_=>_.sessionId===n):[];return q1($1(y))},[a,n]);if(S.useEffect(()=>{n&&n!==u.current&&(u.current=n,d(n))},[n,d]),!n)return h.jsx("div",{className:L.emptyState,children:"No session selected"});const v=(m==null?void 0:m.status)==="running"||(m==null?void 0:m.status)==="idle";return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Vi,{segments:p}),h.jsx(KR,{sessionId:n,session:m,isActive:v,onKill:r}),h.jsx(F1,{events:g,eventsDropped:i,emptyState:h.jsx(ZR,{session:m})})]})}const y0=220,v0=70,QR=40,JR=60,WR="hierarchy",e3="dependency";function t3(n){return S.useMemo(()=>{if(n.length===0)return{nodes:[],edges:[]};const a=new vy.graphlib.Graph({multigraph:!0});a.setDefaultEdgeLabel(()=>({})),a.setGraph({rankdir:"TB",nodesep:QR,ranksep:JR});const i=new Map(n.map(u=>[u.id,u])),o=new Map;for(const u of n)if(u.parentTaskId&&i.has(u.parentTaskId)){const p=o.get(u.parentTaskId)||[];p.push(u),o.set(u.parentTaskId,p)}for(const u of n)a.setNode(u.id,{width:y0,height:v0});const r=[];for(const u of n){if(u.parentTaskId&&i.has(u.parentTaskId)){const p=`hierarchy-${u.parentTaskId}-${u.id}`;a.setEdge(u.parentTaskId,u.id,{},p),r.push({id:p,source:u.parentTaskId,target:u.id,type:"smoothstep",data:{edgeType:WR},style:{stroke:"var(--accent-green)",strokeWidth:2},animated:!1})}for(const p of u.dependsOn)if(i.has(p)){const m=`dependency-${p}-${u.id}`;a.setEdge(p,u.id,{},m),r.push({id:m,source:p,target:u.id,type:"smoothstep",data:{edgeType:e3},style:{stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeDasharray:"6 3"},animated:!1})}}return vy.layout(a),{nodes:n.map(u=>{const p=a.node(u.id),m=o.get(u.id)||[];return{id:u.id,type:"task",position:{x:p.x-y0/2,y:p.y-v0/2},data:{task:u,childCount:m.length,doneChildCount:m.filter(g=>g.status==="complete").length,hasDependencies:u.dependsOn.length>0}}}),edges:r}},[n])}const n3="_dagContainer_js4w6_1",a3="_taskNode_js4w6_26",s3="_taskNodeBorder_js4w6_54",i3="_taskNodeContent_js4w6_60",l3="_taskNodeHeader_js4w6_70",o3="_taskNodeIcon_js4w6_77",r3="_taskNodeTitle_js4w6_82",c3="_taskNodeBadges_js4w6_90",u3="_childBadge_js4w6_95",d3="_depBadge_js4w6_107",f3="_handle_js4w6_119",h3="_emptyCta_js4w6_126",p3="_ctaDescription_js4w6_137",m3="_ctaButton_js4w6_144",Zt={dagContainer:n3,taskNode:a3,taskNodeBorder:s3,taskNodeContent:i3,taskNodeHeader:l3,taskNodeIcon:o3,taskNodeTitle:r3,taskNodeBadges:c3,childBadge:u3,depBadge:d3,handle:f3,emptyCta:h3,ctaDescription:p3,ctaButton:m3};function g3({data:n}){const{task:a,childCount:i,doneChildCount:o,hasDependencies:r}=n,d=is(a.status);return h.jsxs("div",{className:Zt.taskNode,"data-task-id":a.id,"data-task-title":a.title,children:[h.jsx(by,{type:"target",position:Sy.Top,className:Zt.handle}),h.jsx("div",{className:Zt.taskNodeBorder,style:{backgroundColor:d.color}}),h.jsxs("div",{className:Zt.taskNodeContent,children:[h.jsxs("div",{className:Zt.taskNodeHeader,children:[h.jsx("span",{className:Zt.taskNodeIcon,style:{color:d.color},children:d.icon}),h.jsx("span",{className:Zt.taskNodeTitle,children:a.title})]}),h.jsxs("div",{className:Zt.taskNodeBadges,children:[i>0&&h.jsxs("span",{className:Zt.childBadge,children:[o,"/",i]}),r&&h.jsx("span",{className:Zt.depBadge,children:"dep"})]})]}),h.jsx(by,{type:"source",position:Sy.Bottom,className:Zt.handle})]})}const y3=mD,v3={task:g3};function b3({projectId:n}){const{tasks:a}=It(),i=Mn(),{resolvedThemeId:o}=X0(),r=S.useMemo(()=>a.filter(v=>v.projectId===n),[a,n]),{nodes:d,edges:u}=t3(r),p=S.useMemo(()=>{const v=getComputedStyle(document.documentElement),y={};for(const[_,T]of Object.entries(y3))y[_]=v.getPropertyValue(T).trim()||"#6b7a8d";return y},[o]),m=S.useCallback((v,y)=>{i(ns(y.id))},[i]),g=S.useCallback(v=>{const y=v.data;return p[y.task.status]||p.pending},[p]);return r.length===0?h.jsxs("div",{className:Zt.emptyCta,children:[h.jsx("button",{className:Zt.ctaButton,onClick:()=>i(Os(n)),children:"Create Task"}),h.jsx("div",{className:Zt.ctaDescription,children:"Create tasks to see the dependency graph"})]}):h.jsx("div",{className:Zt.dagContainer,children:h.jsxs(hx,{nodes:d,edges:u,nodeTypes:v3,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},minZoom:.3,maxZoom:2,children:[h.jsx(px,{variant:mx.Dots,gap:24,size:1,color:"var(--text-disabled)"}),h.jsx(gx,{showInteractive:!1}),h.jsx(yx,{nodeColor:g,maskColor:"var(--bg-overlay)",style:{background:"var(--bg-inset)"}})]})})}function S3({tasks:n,taskStatusById:a,sessionStatusByTaskId:i}){const o=new Map;for(const d of n)if(d.parentTaskId){const u=o.get(d.parentTaskId);u?u.push(d):o.set(d.parentTaskId,[d])}const r=new Map(f0.map(d=>[d,[]]));for(const d of n){const u=Sh(d.status),p=d.dependsOn.length>0&&d.dependsOn.some(E=>a.get(E)!=="complete"),m=o.get(d.id)??[],g=m.length,v=m.filter(E=>E.status==="complete").length;let y;if(u==="paused"&&i){const E=i.get(d.id);E==="idle"?y="Needs input":E==="completed"&&(y="Ready to complete")}const _={task:d,isBlocked:p,childCount:g,doneChildCount:v,pausedSubBadge:y},T=r.get(u);T?T.push(_):r.get("not_started").push(_)}for(const d of r.values())d.sort((u,p)=>u.task.sortOrder-p.task.sortOrder);return f0.map(d=>{const u=is(d);return{status:d,label:u.label,style:u,tasks:r.get(d)??[]}})}const _3="_boardContainer_1c4y1_1",x3="_column_1c4y1_17",T3="_columnHeader_1c4y1_34",E3="_columnIcon_1c4y1_47",C3="_columnLabel_1c4y1_52",A3="_columnCount_1c4y1_57",j3="_cardList_1c4y1_67",N3="_emptyPlaceholder_1c4y1_76",w3="_card_1c4y1_67",D3="_cardHeader_1c4y1_107",k3="_cardStatusIcon_1c4y1_113",M3="_cardTitle_1c4y1_119",R3="_cardBadges_1c4y1_127",O3="_badge_1c4y1_134",B3="_blockedBadge_1c4y1_146",L3="_childBadge_1c4y1_151",I3="_depBadge_1c4y1_155",U3="_parentBadge_1c4y1_159",z3="_pausedSubBadge_1c4y1_166",V3="_personaBadge_1c4y1_170",H3="_envBadge_1c4y1_174",P3="_emptyCta_1c4y1_178",G3="_ctaButton_1c4y1_188",F3="_ctaDescription_1c4y1_204",Ye={boardContainer:_3,column:x3,columnHeader:T3,columnIcon:E3,columnLabel:C3,columnCount:A3,cardList:j3,emptyPlaceholder:N3,card:w3,cardHeader:D3,cardStatusIcon:k3,cardTitle:M3,cardBadges:R3,badge:O3,blockedBadge:B3,childBadge:L3,depBadge:I3,parentBadge:U3,pausedSubBadge:z3,personaBadge:V3,envBadge:H3,emptyCta:P3,ctaButton:G3,ctaDescription:F3};function $3({projectId:n}){const{tasks:a,sessions:i,personas:o,environments:r}=It(),d=Mn(),u=S.useMemo(()=>a.filter(y=>y.projectId===n),[a,n]),p=S.useMemo(()=>new Map(a.map(y=>[y.id,y.status])),[a]),m=S.useMemo(()=>new Map(u.map(y=>[y.id,y])),[u]),g=S.useMemo(()=>{const y=new Map(i.map(C=>[C.id,C])),_=new Map(o.map(C=>[C.id,C])),T=new Map(r.map(C=>[C.id,C])),E=new Map,j=new Map,N=new Map;for(const C of u)if(C.latestSessionId){const A=y.get(C.latestSessionId);if(A){if(E.set(C.id,A.status),A.personaId){const k=_.get(A.personaId);k&&j.set(C.id,k.name)}if(A.environmentId){const k=T.get(A.environmentId);k&&N.set(C.id,k.displayName)}}}return{sessionStatusByTaskId:E,personaNameByTaskId:j,environmentNameByTaskId:N}},[u,i,o,r]),v=S.useMemo(()=>S3({tasks:u,taskStatusById:p,sessionStatusByTaskId:g.sessionStatusByTaskId}),[u,p,g]);return u.length===0?h.jsxs("div",{className:Ye.emptyCta,"data-testid":"board-empty-cta",children:[h.jsx("button",{className:Ye.ctaButton,onClick:()=>d(Os(n)),children:"Create Task"}),h.jsx("div",{className:Ye.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}):h.jsx("div",{className:Ye.boardContainer,"data-testid":"board-container",children:v.map(y=>h.jsxs("section",{className:Ye.column,"data-testid":`board-column-${y.status}`,"aria-label":`${y.label}, ${y.tasks.length} ${y.tasks.length===1?"task":"tasks"}`,children:[h.jsxs("div",{className:Ye.columnHeader,children:[h.jsx("span",{className:Ye.columnIcon,style:{color:y.style.color},children:y.style.icon}),h.jsx("span",{className:Ye.columnLabel,children:y.label}),h.jsx("span",{className:Ye.columnCount,"data-testid":`board-count-${y.status}`,children:y.tasks.length})]}),h.jsx("div",{className:Ye.cardList,children:y.tasks.length===0?h.jsx("div",{className:Ye.emptyPlaceholder,children:"No tasks"}):h.jsx(Vn,{mode:"popLayout",children:y.tasks.map(_=>h.jsx(Xt.div,{layout:!0,initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},children:h.jsx(q3,{boardTask:_,tasksById:m,personaName:g.personaNameByTaskId.get(_.task.id),envName:g.environmentNameByTaskId.get(_.task.id),onClick:()=>d(ns(_.task.id))})},_.task.id))})})]},y.status))})}function q3({boardTask:n,tasksById:a,personaName:i,envName:o,onClick:r}){const{task:d,isBlocked:u,childCount:p,doneChildCount:m,pausedSubBadge:g}=n,v=is(d.status),y=d.parentTaskId?a.get(d.parentTaskId):void 0;return h.jsxs("div",{className:Ye.card,tabIndex:0,role:"button","data-testid":`board-card-${d.id}`,onClick:r,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),r())},children:[h.jsxs("div",{className:Ye.cardHeader,children:[h.jsx("span",{className:Ye.cardStatusIcon,style:{color:v.color},children:v.icon}),h.jsx("span",{className:Ye.cardTitle,children:d.title})]}),h.jsxs("div",{className:Ye.cardBadges,children:[y&&h.jsx("span",{className:`${Ye.badge} ${Ye.parentBadge}`,title:y.title,children:y.title}),p>0&&h.jsxs("span",{className:`${Ye.badge} ${Ye.childBadge}`,children:[m,"/",p]}),u&&h.jsx("span",{className:`${Ye.badge} ${Ye.blockedBadge}`,children:"blocked"}),d.dependsOn.length>0&&!u&&h.jsx("span",{className:`${Ye.badge} ${Ye.depBadge}`,children:"dep"}),g&&h.jsx("span",{className:`${Ye.badge} ${Ye.pausedSubBadge}`,children:g}),i&&h.jsx("span",{className:`${Ye.badge} ${Ye.personaBadge}`,children:i}),o&&h.jsx("span",{className:`${Ye.badge} ${Ye.envBadge}`,children:o})]})]})}function _h(n){const{value:a,onSave:i,validate:o,fieldId:r,activeFieldId:d,onActivate:u,enterToSave:p=!0,trimOnSave:m=!0}=n,[g,v]=S.useState(""),[y,_]=S.useState(""),T=S.useRef(!1),E=d===r,j=S.useCallback(G=>{v(G),_("")},[]),N=S.useCallback(()=>{_("")},[]),C=S.useCallback(()=>{T.current=!1,u==null||u(null),v(""),_("")},[u]),A=S.useCallback(()=>{const G=m?g.trim():g;if(o){const V=o(g);if(V){_(V);return}}const M=m?a.trim():a;if(G===M){C();return}i(G),C()},[g,a,m,o,i,C]),k=S.useCallback(()=>{T.current=!0,u==null||u(r),v(a),_("")},[r,a,u]),H=S.useCallback(G=>{if(T.current){T.current=!1;return}G.relatedTarget instanceof HTMLElement&&G.relatedTarget.dataset.editAction===r||A()},[r,A]),O=S.useCallback(G=>{G.key==="Escape"?C():G.key==="Enter"&&p&&A()},[C,p,A]),$=(()=>{if(!E)return!1;const G=m?a.trim():a;return(m?g.trim():g)!==G})();return S.useEffect(()=>{!E&&(g!==""||y!=="")&&(v(""),_(""))},[E,g,y]),{isEditing:E,draft:g,error:y,isDirty:$,startEdit:k,cancelEdit:C,save:A,setDraft:j,clearError:N,handleBlur:H,handleKeyDown:O,ignoreInitialBlurRef:T}}const Y3="_editFieldWrapper_yuzty_1",K3="_editInput_yuzty_10",Z3="_editTextarea_yuzty_42",X3="_editSelect_yuzty_78",Q3="_editError_yuzty_111",J3="_editInputInvalid_yuzty_118",W3="_editHint_yuzty_123",eO="_unsavedDot_yuzty_132",tO="_metaValueClickable_yuzty_140",nO="_editButton_yuzty_159",aO="_metaPlaceholder_yuzty_175",sO="_worktreeToggle_yuzty_180",Ge={editFieldWrapper:Y3,editInput:K3,editTextarea:Z3,editSelect:X3,editError:Q3,editInputInvalid:J3,editHint:W3,unsavedDot:eO,metaValueClickable:tO,editButton:nO,metaPlaceholder:aO,worktreeToggle:sO};function $d(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="text",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,maxLength:y,ariaLabel:_,"data-testid":T}=n,E=S.useRef(null),j=_h({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!0,trimOnSave:!0});if(S.useEffect(()=>{if(j.isEditing){const C=window.setTimeout(()=>{var A;(A=E.current)==null||A.focus()},0);return()=>window.clearTimeout(C)}},[j.isEditing]),r==="create"){const C=k=>{m==null||m(k.target.value)},A=o==null?void 0:o(a);return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("input",{className:`${Ge.editInput} ${A?Ge.editInputInvalid:""}`,value:a,onChange:C,maxLength:y,placeholder:v,"aria-label":_,"data-testid":T?`${T}-input`:void 0}),A&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:A})]})}if(j.isEditing)return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("input",{ref:E,className:`${Ge.editInput} ${j.error?Ge.editInputInvalid:""}`,value:j.draft,onChange:C=>j.setDraft(C.target.value),onBlur:j.handleBlur,onKeyDown:j.handleKeyDown,maxLength:y,placeholder:v,"aria-label":_,"data-testid":T?`${T}-input`:void 0}),j.isDirty&&h.jsx("span",{className:Ge.unsavedDot,title:"Unsaved changes"}),j.error&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:j.error}),h.jsx("span",{className:Ge.editHint,children:"Enter to save · Esc to cancel"})]});const N=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Ge.metaValueClickable,onClick:()=>j.startEdit(),onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),j.startEdit())},title:"Click to edit","aria-label":_,"data-testid":T?`${T}-button`:void 0,children:[N!==void 0?N:a?h.jsx("span",{children:a}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function iO(n){const{value:a,onSave:i,validate:o,mode:r="edit",fieldId:d="textarea",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":_}=n,T=S.useRef(null),E=_h({value:a,onSave:i,validate:o,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});if(S.useEffect(()=>{if(E.isEditing){const N=window.setTimeout(()=>{var C;(C=T.current)==null||C.focus()},0);return()=>window.clearTimeout(N)}},[E.isEditing]),r==="create"){const N=A=>{m==null||m(A.target.value)},C=o==null?void 0:o(a);return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("textarea",{className:`${Ge.editTextarea} ${C?Ge.editInputInvalid:""}`,value:a,onChange:N,placeholder:v,"aria-label":y,"data-testid":_?`${_}-input`:void 0}),C&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:C})]})}if(E.isEditing)return h.jsxs("div",{className:Ge.editFieldWrapper,children:[h.jsx("textarea",{ref:T,className:`${Ge.editTextarea} ${E.error?Ge.editInputInvalid:""}`,value:E.draft,onChange:N=>E.setDraft(N.target.value),onBlur:E.handleBlur,onKeyDown:E.handleKeyDown,title:y,"aria-label":y,"data-testid":_?`${_}-input`:void 0}),E.isDirty&&h.jsx("span",{className:Ge.unsavedDot,title:"Unsaved changes"}),E.error&&h.jsx("span",{className:Ge.editError,"data-testid":"edit-error",children:E.error}),h.jsx("span",{className:Ge.editHint,children:"Tab to save · Esc to cancel"})]});const j=g==null?void 0:g(a);return h.jsxs("span",{role:"button",tabIndex:0,className:Ge.metaValueClickable,onClick:()=>E.startEdit(),onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),E.startEdit())},title:"Click to edit","aria-label":y,"data-testid":_?`${_}-button`:void 0,children:[j!==void 0?j:a?h.jsx("span",{children:a}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function b0(n){var k;const{value:a,onSave:i,mode:o="edit",options:r,fieldId:d="select",activeFieldId:u,onActivate:p,onChange:m,renderDisplay:g,placeholder:v,ariaLabel:y,"data-testid":_}=n,T=S.useRef(null),E=_h({value:a,onSave:i,fieldId:d,activeFieldId:u,onActivate:p,enterToSave:!1,trimOnSave:!1});S.useEffect(()=>{if(E.isEditing){const H=window.setTimeout(()=>{var O;(O=T.current)==null||O.focus()},0);return()=>window.clearTimeout(H)}},[E.isEditing]);const j=S.useCallback(H=>{const O=H.target.value;E.ignoreInitialBlurRef.current=!1,O!==a&&i(O),E.cancelEdit()},[a,i,E]),N=S.useCallback(H=>{if(E.ignoreInitialBlurRef.current){E.ignoreInitialBlurRef.current=!1;return}H.relatedTarget instanceof HTMLElement&&H.relatedTarget.dataset.editAction===d||E.cancelEdit()},[d,E]);if(o==="create")return h.jsx("select",{className:Ge.editSelect,value:a,onChange:H=>m==null?void 0:m(H.target.value),"aria-label":y,"data-testid":_?`${_}-select`:void 0,children:r.map(H=>h.jsx("option",{value:H.value,children:H.label},H.value))});if(E.isEditing)return h.jsx("select",{ref:T,className:Ge.editSelect,value:E.draft,onChange:j,onBlur:N,title:y,"aria-label":y,"data-testid":_?`${_}-select`:void 0,children:r.map(H=>h.jsx("option",{value:H.value,children:H.label},H.value))});const C=g==null?void 0:g(a),A=(k=r.find(H=>H.value===a))==null?void 0:k.label;return h.jsxs("button",{type:"button",className:Ge.metaValueClickable,onClick:()=>E.startEdit(),title:"Click to change","aria-label":y,"data-testid":_?`${_}-button`:void 0,children:[C!==void 0?C:A?h.jsx("span",{children:A}):h.jsx("span",{className:Ge.metaPlaceholder,children:v||"None"}),h.jsx("span",{className:Ge.editButton,"aria-hidden":"true",children:"✏️"})]})}function lO(n){const{checked:a,onChange:i,label:o,ariaLabel:r,"data-testid":d}=n;return h.jsxs("label",{className:Ge.worktreeToggle,"data-testid":d,children:[h.jsx("input",{type:"checkbox",checked:a,onChange:u=>i(u.target.checked),"aria-label":r}),h.jsx("span",{children:o})]})}function oO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?L.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?L.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?L.envDotRed:L.envDotGray}function S0(n){if(!n)return"";const a=new Date(n);if(isNaN(a.getTime()))return"";const o=Date.now()-a.getTime();if(o<0)return"just now";const r=Math.floor(o/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const d=Math.floor(r/60);if(d<24)return`${d}h ago`;const u=Math.floor(d/24);return u<30?`${u}d ago`:a.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}const qd=100;function rO(){const{projectId:n}=Wr(),a=Mn(),{tasks:i,environments:o,projects:r,personas:d,archiveProject:u,updateProject:p}=It(),[m,g]=S.useState("tasks"),[v,y]=S.useState(!1),[_,T]=S.useState(null),[E,j]=S.useState(!1),N=S.useRef(void 0),C=RR(n,r);S.useEffect(()=>{const M=N.current;N.current=n,!(M===void 0||M===n)&&_!==null&&T(null)},[n,_]);const A=r.find(M=>M.id===n),k=i.filter(M=>M.projectId===n),H=k.filter(M=>M.status==="complete").length,O=k.length,$=O>0?Math.round(H/O*100):0,G=o.find(M=>M.id===(A==null?void 0:A.defaultEnvironmentId));return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Vi,{segments:C}),h.jsxs("div",{className:L.projectHeader,children:[h.jsx("span",{className:L.projectName,"data-testid":"project-name",children:h.jsx($d,{value:(A==null?void 0:A.name)||"",onSave:M=>{A&&p(A.id,{name:M})},validate:M=>{const V=M.trim();if(!V)return"Name is required";if(V.length>qd)return`Max ${qd} characters`},maxLength:qd,fieldId:"name",activeFieldId:_,onActivate:T,ariaLabel:"Project name",renderDisplay:M=>M||n||void 0,"data-testid":"edit-name"})}),h.jsx("button",{className:L.archiveButton,onClick:()=>y(!0),title:"Archive project","data-testid":"archive-project-button",children:"Archive"})]}),h.jsxs("button",{className:L.metaToggle,onClick:()=>j(!E),"aria-expanded":!E,"aria-controls":"project-meta-panel","data-testid":"meta-toggle",children:[h.jsx("span",{className:`${L.metaToggleArrow} ${E?"":L.metaToggleArrowOpen}`,children:"▶"}),"Details"]}),!E&&h.jsxs("div",{className:L.projectMeta,"data-testid":"project-meta",id:"project-meta-panel",children:[h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Description"}),h.jsx("div",{className:L.metaValue,children:h.jsx(iO,{value:(A==null?void 0:A.description)||"",onSave:M=>{A&&p(A.id,{description:M})},fieldId:"description",activeFieldId:_,onActivate:T,renderDisplay:M=>M?h.jsx("span",{className:L.overviewMarkdown,children:h.jsx(jf,{remarkPlugins:[Nf],children:M})}):void 0,placeholder:"No description",ariaLabel:"Project description","data-testid":"edit-description"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Repository"}),h.jsx("div",{className:L.metaValue,children:h.jsx($d,{value:(A==null?void 0:A.repoUrl)||"",onSave:M=>{A&&p(A.id,{repoUrl:M})},validate:M=>{const V=M.trim();if(V&&!/^https?:\/\/.+/.test(V))return"Must be a valid http(s) URL"},fieldId:"repoUrl",activeFieldId:_,onActivate:T,renderDisplay:M=>M&&/^https?:\/\//i.test(M)?h.jsx("a",{className:L.repoLink,href:M,target:"_blank",rel:"noopener noreferrer",onClick:V=>V.stopPropagation(),children:M}):M?h.jsx("span",{children:M}):void 0,placeholder:"No repository",ariaLabel:"Project repository URL","data-testid":"edit-repo"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Environment"}),h.jsx("div",{className:L.metaValue,children:h.jsx(b0,{value:(A==null?void 0:A.defaultEnvironmentId)||"",onSave:M=>{A&&p(A.id,{defaultEnvironmentId:M})},options:[{value:"",label:"None"},...o.map(M=>({value:M.id,label:M.displayName}))],fieldId:"defaultEnvironmentId",activeFieldId:_,onActivate:T,renderDisplay:()=>{if(G)return h.jsxs("span",{className:L.envRow,children:[h.jsx("span",{className:`${L.envDot} ${oO(G.status)}`}),G.displayName]})},placeholder:(A==null?void 0:A.defaultEnvironmentId)||"No default environment",ariaLabel:"Project default environment","data-testid":"edit-env"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Persona"}),h.jsx("div",{className:L.metaValue,children:h.jsx(b0,{value:(A==null?void 0:A.defaultPersonaId)||"",onSave:M=>{A&&p(A.id,{defaultPersonaId:M})},options:[{value:"",label:"(Inherit)"},...d.map(M=>({value:M.id,label:M.name}))],fieldId:"defaultPersonaId",activeFieldId:_,onActivate:T,renderDisplay:M=>{const V=d.find(te=>te.id===M);if(V)return h.jsx("span",{children:V.name})},placeholder:(A==null?void 0:A.defaultPersonaId)||"(Inherit)",ariaLabel:"Project default persona","data-testid":"edit-persona"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Worktrees"}),h.jsx("div",{className:L.metaValue,children:h.jsx(lO,{checked:(A==null?void 0:A.useWorktrees)??!0,onChange:M=>{A&&p(A.id,{useWorktrees:M})},label:"Enable worktree isolation","data-testid":"worktree-toggle"})})]}),h.jsxs("div",{className:L.metaRow,children:[h.jsx("span",{className:L.metaLabel,children:"Working Dir"}),h.jsx("div",{className:L.metaValue,children:h.jsx($d,{value:(A==null?void 0:A.worktreeBasePath)||"",onSave:M=>{A&&p(A.id,{worktreeBasePath:M})},fieldId:"worktreeBasePath",activeFieldId:_,onActivate:T,placeholder:"Default (server default)",ariaLabel:"Working directory","data-testid":"edit-worktree-base-path"})})]}),A&&h.jsxs("div",{className:L.metaTimestamps,children:[h.jsxs("span",{className:L.metaTimestamp,children:["Created ",S0(A.createdAt)]}),A.updatedAt&&A.updatedAt!==A.createdAt&&h.jsxs("span",{className:L.metaTimestamp,children:["· Updated ",S0(A.updatedAt)]})]})]}),O>0&&h.jsxs("div",{className:L.progressBarContainer,"data-testid":"progress-bar",children:[h.jsx("div",{className:L.progressBar,children:h.jsx("div",{className:L.progressFill,style:{width:`${$}%`}})}),h.jsxs("span",{className:L.progressLabel,children:[H,"/",O]})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Project view",children:[h.jsx("button",{role:"tab","aria-selected":m==="graph",className:`${L.tab} ${m==="graph"?L.active:""}`,onClick:()=>g("graph"),children:"Graph"}),h.jsx("button",{role:"tab","aria-selected":m==="board",className:`${L.tab} ${m==="board"?L.active:""}`,onClick:()=>g("board"),"data-testid":"board-tab",children:"Board"}),h.jsx("button",{role:"tab","aria-selected":m==="tasks",className:`${L.tab} ${m==="tasks"?L.active:""}`,onClick:()=>g("tasks"),children:"Tasks"})]}),m==="tasks"&&O>0&&h.jsxs("div",{className:L.projectSummary,children:[h.jsx("span",{className:L.projectSummaryTitle,children:`${H}/${O} tasks complete`}),h.jsx("span",{className:L.projectSummarySubtitle,children:"Select a task or click + to create one"})]}),m==="tasks"&&O===0&&h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>a(Os(n)),children:"Create Task"}),h.jsx("div",{className:L.ctaDescription,children:"Break your work into tasks and let agents tackle them"})]}),m==="board"&&h.jsx($3,{projectId:n}),m==="graph"&&h.jsx(b3,{projectId:n}),h.jsx(rc,{isOpen:v,title:"Archive Project?",description:"This will hide the project from the sidebar. Tasks will not be deleted.",confirmLabel:"Archive",onConfirm:()=>{A&&(u(A.id),a("/",{replace:!0})),y(!1)},onCancel:()=>y(!1)})]})}const cO="_container_cddyd_1",uO="_header_cddyd_8",dO="_headerTitle_cddyd_35",fO="_badge_cddyd_44",hO="_headerActions_cddyd_54",pO="_body_cddyd_61",mO="_formContent_cddyd_73",gO="_section_cddyd_85",yO="_label_cddyd_91",vO="_titleInput_cddyd_98",bO="_descriptionTextarea_cddyd_131",SO="_parentContext_cddyd_167",_O="_parentLabel_cddyd_175",xO="_parentName_cddyd_182",TO="_personaSelect_cddyd_186",EO="_depList_cddyd_220",CO="_depItem_cddyd_226",AO="_depItemSelected_cddyd_248",jO="_noDeps_cddyd_252",NO="_btnPrimary_cddyd_258",wO="_btnGhost_cddyd_289",et={container:cO,header:uO,headerTitle:dO,badge:fO,headerActions:hO,body:pO,formContent:mO,section:gO,label:yO,titleInput:vO,descriptionTextarea:bO,parentContext:SO,parentLabel:_O,parentName:xO,personaSelect:TO,depList:EO,depItem:CO,depItemSelected:AO,noDeps:jO,btnPrimary:NO,btnGhost:wO};function Y1({mode:n,taskId:a,projectId:i,parentTaskId:o}){const{tasks:r,personas:d,createTask:u,updateTask:p}=It(),{showToast:m}=ao(),g=Mn(),v=n==="edit",y=v&&a?r.find(B=>B.id===a):void 0,_=v?(y==null?void 0:y.projectId)??"":i??"",T=v?(y==null?void 0:y.parentTaskId)??"":o??"",E=T?r.find(B=>B.id===T):void 0,[j,N]=S.useState((y==null?void 0:y.title)??""),[C,A]=S.useState((y==null?void 0:y.description)??""),[k,H]=S.useState((y==null?void 0:y.dependsOn)??[]),[O,$]=S.useState((y==null?void 0:y.defaultPersonaId)??""),[G,M]=S.useState(!1),V=S.useRef(!1);S.useEffect(()=>{v&&y&&!V.current&&(V.current=!0,N(y.title),A(y.description),H(y.dependsOn),$(y.defaultPersonaId))},[v,y]);const te=r.filter(B=>B.projectId===_&&(!v||B.id!==a)&&B.id!==T),ne=j.trim().length>0&&(!v||y!==void 0)&&(v||_.length>0),ae=B=>{H(F=>F.includes(B)?F.filter(W=>W!==B):[...F,B])},re=()=>{!ne||G||v&&y===void 0||(v&&a?(p(a,j.trim(),C,k,O),m("Task updated","success"),g(ns(a),{replace:!0})):(M(!0),u(_,j.trim(),C,k.length>0?k:void 0,T||void 0,O,()=>{m("Task created","success"),g(Kl(_),{replace:!0})},B=>{m(B,"error"),M(!1)})))},Y=()=>{g(v&&a?ns(a):Kl(_))},Q=v?"edit task":T?"child task":"new task";return h.jsxs("div",{className:et.container,children:[h.jsxs("div",{className:et.header,children:[h.jsxs("div",{className:et.headerTitle,children:[h.jsx("span",{className:et.badge,children:Q}),E&&h.jsxs("span",{className:et.parentContext,children:[h.jsx("span",{className:et.parentLabel,children:"Child of"}),h.jsx("span",{className:et.parentName,children:E.title})]})]}),h.jsxs("div",{className:et.headerActions,children:[h.jsx("button",{onClick:re,disabled:!ne||G,className:et.btnPrimary,"data-testid":"task-edit-save",children:G?"Creating…":v?"Save Changes":"Create"}),h.jsx("button",{onClick:Y,className:et.btnGhost,children:"Cancel"})]})]}),h.jsx("div",{className:et.body,children:h.jsxs("div",{className:et.formContent,children:[h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-title",children:"Title"}),h.jsx("input",{id:"task-edit-title",type:"text",value:j,onChange:B=>N(B.target.value),placeholder:"Task title...",autoFocus:!0,className:et.titleInput,"data-testid":"task-edit-title",onKeyDown:B=>{B.key==="Enter"&&ne&&re()}})]}),h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-description",children:"Description"}),h.jsx("textarea",{id:"task-edit-description",value:C,onChange:B=>A(B.target.value),placeholder:"Describe the task... (markdown supported)",className:et.descriptionTextarea,"data-testid":"task-edit-description",rows:8})]}),h.jsxs("div",{className:et.section,children:[h.jsx("label",{className:et.label,htmlFor:"task-edit-persona",children:"Default Persona"}),h.jsxs("select",{id:"task-edit-persona",value:O,onChange:B=>$(B.target.value),className:et.personaSelect,"data-testid":"task-edit-persona",children:[h.jsx("option",{value:"",children:"(Inherit)"}),d.map(B=>h.jsx("option",{value:B.id,children:B.name},B.id))]})]}),h.jsxs("div",{className:et.section,children:[h.jsx("div",{className:et.label,children:"Dependencies"}),te.length===0?h.jsx("div",{className:et.noDeps,children:"No other tasks in this project"}):h.jsx("div",{className:et.depList,children:te.map(B=>{const F=k.includes(B.id);return h.jsxs("label",{className:`${et.depItem} ${F?et.depItemSelected:""}`,"data-testid":`dep-option-${B.id}`,children:[h.jsx("input",{type:"checkbox",checked:F,onChange:()=>ae(B.id)}),B.title,h.jsxs("span",{style:{opacity:.5,fontSize:"11px",marginLeft:"4px"},children:["(",B.status,")"]})]},B.id)})})]})]})})]})}function DO(){const[n]=Lf(),a=n.get("project")??"",i=n.get("parent")??void 0;return a?h.jsx(Y1,{mode:"new",projectId:a,parentTaskId:i}):h.jsx(Di,{to:"/",replace:!0})}function kO(){const{taskId:n}=Wr();return h.jsx(Y1,{mode:"edit",taskId:n})}const MO="_container_1pqxm_1",RO="_emptyState_1pqxm_8",OO="_card_1pqxm_14",BO="_cardHeader_1pqxm_34",LO="_categoryBadge_1pqxm_46",IO="_findingTitle_1pqxm_54",UO="_findingDate_1pqxm_60",zO="_findingContent_1pqxm_72",VO="_tags_1pqxm_78",HO="_tag_1pqxm_78",qn={container:MO,emptyState:RO,card:OO,cardHeader:BO,categoryBadge:LO,findingTitle:IO,findingDate:UO,findingContent:zO,tags:VO,tag:HO};function PO(n){const a=new Date(n),i=new Date,o=i.getTime()-a.getTime(),r=Math.floor(o/1e3),d=Math.floor(r/60),u=Math.floor(d/60),p=Math.floor(u/24);if(r<60)return"just now";if(d<60)return`${d}m ago`;if(u<24)return`${u}h ago`;if(p===1)return"yesterday";if(p<7)return`${p} days ago`;const m=a.getFullYear()===i.getFullYear(),g=a.toLocaleString("en-US",{month:"short"}),v=a.getDate();return m?`${g} ${v}`:`${g} ${v} ${a.getFullYear()}`}const _0={architecture:{text:"var(--accent-blue)",bg:"var(--accent-blue-dim)"},api:{text:"var(--accent-green)",bg:"var(--accent-green-dim)"},bug:{text:"var(--accent-red)",bg:"var(--accent-red-dim)"},decision:{text:"var(--accent-yellow)",bg:"var(--accent-yellow-dim)"},dependency:{text:"var(--accent-purple)",bg:"var(--accent-purple-dim)"},pattern:{text:"var(--accent-cyan)",bg:"var(--accent-cyan-dim)"},general:{text:"var(--text-secondary)",bg:"var(--bg-elevated)"}};function GO({projectId:n}){const{findings:a}=It(),i=a.filter(o=>o.projectId===n);return i.length===0?h.jsx("div",{className:qn.emptyState,children:"No findings yet. Agents will post discoveries here."}):h.jsx("div",{className:qn.container,children:i.map((o,r)=>{const d=_0[o.category]||_0.general;return h.jsxs(Xt.div,{className:qn.card,initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:r*.05,duration:.2},children:[h.jsxs("div",{className:qn.cardHeader,children:[h.jsx("span",{className:qn.categoryBadge,style:{background:d.bg,color:d.text},children:o.category}),h.jsx("span",{className:qn.findingTitle,children:o.title}),h.jsx("span",{className:qn.findingDate,title:o.createdAt,children:PO(o.createdAt)})]}),h.jsx("div",{className:qn.findingContent,children:o.content.length>300?o.content.slice(0,300)+"...":o.content}),o.tags.length>0&&h.jsx("div",{className:qn.tags,children:o.tags.map(u=>h.jsx("span",{className:qn.tag,style:{color:d.text,textShadow:`0 0 8px ${d.text}`},children:u},u))})]},o.id)})})}function Dr(n){if(!n)return"—";const a=new Date(n);return isNaN(a.getTime())?"—":a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})}function Yd(n,a){if(!n||!a)return;const i=new Date(a).getTime()-new Date(n).getTime();if(isNaN(i)||i<0)return;const o=Math.floor(i/6e4),r=Math.floor(i%6e4/1e3);if(o===0)return`${r}s`;const d=Math.floor(o/60),u=o%60;return d===0?`${o}m ${r}s`:`${d}h ${u}m`}function FO(n){const a=n.toLowerCase();return a==="ready"||a==="running"||a==="available"||a==="connected"?L.envDotGreen:a==="provisioning"||a==="starting"||a==="pending"||a==="connecting"?L.envDotYellow:a==="error"||a==="failed"||a==="disconnected"?L.envDotRed:L.envDotGray}function $O({status:n}){const a=is(n),i=fD(n);return h.jsx("span",{className:`${L.statusBadge} ${L[i]??L.statusPending}`,children:a.label})}function qO({task:n,tasksById:a,environments:i,projects:o,taskSessions:r}){const d=r.length>0?r[r.length-1]:void 0,u=(d==null?void 0:d.environmentId)??"",p=u?i.find(v=>v.id===u):void 0,m=o.find(v=>v.id===n.projectId),g=n.branch&&(m!=null&&m.repoUrl)?`${m.repoUrl.replace(/\/$/,"")}/tree/${encodeURIComponent(n.branch)}`:void 0;return h.jsxs("div",{className:L.overviewDashboard,children:[h.jsxs("div",{className:L.overviewHero,children:[h.jsx($O,{status:n.status}),n.branch&&h.jsx("span",{className:L.overviewBranchPill,children:g?h.jsxs("a",{href:g,target:"_blank",rel:"noreferrer noopener",className:L.branchLink,children:["🔗"," ",n.branch]}):h.jsxs("span",{children:["🔗"," ",n.branch]})})]}),typeof n.description=="string"&&n.description&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Description"}),h.jsx("div",{className:L.overviewMarkdown,children:h.jsx(jf,{remarkPlugins:[Nf],children:n.description})})]}),u&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Environment"}),h.jsxs("div",{className:L.envRow,children:[p&&h.jsx("span",{className:`${L.envDot} ${FO(p.status)}`,title:p.status,"aria-label":`Status: ${p.status}`,role:"img"}),h.jsx("span",{className:L.overviewValue,children:(p==null?void 0:p.displayName)??u})]})]}),h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Dependencies"}),n.dependsOn.length===0?h.jsx("div",{className:L.overviewMuted,children:"None"}):h.jsx("div",{className:L.depList,children:n.dependsOn.map(v=>{const y=a.get(v),_=(y==null?void 0:y.status)==="complete";return h.jsxs("div",{className:`${L.depItem} ${_?L.depDone:L.depBlocked}`,children:[h.jsx("span",{children:_?"✓":"○"}),h.jsx("span",{children:(y==null?void 0:y.title)??v})]},v)})})]}),h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Timeline"}),h.jsxs("div",{className:L.timeline,children:[n.createdAt&&h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Created"}),h.jsx("span",{className:L.timelineValue,children:Dr(n.createdAt)})]}),n.assignedAt&&(()=>{const v=Yd(n.createdAt,n.assignedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Assigned"}),h.jsx("span",{className:L.timelineValue,children:Dr(n.assignedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),n.startedAt&&(()=>{const v=Yd(n.assignedAt??n.createdAt,n.startedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Started"}),h.jsx("span",{className:L.timelineValue,children:Dr(n.startedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),n.completedAt&&(()=>{const v=Yd(n.startedAt,n.completedAt);return h.jsxs("div",{className:L.timelineRow,children:[h.jsx("span",{className:L.timelineKey,children:"Completed"}),h.jsx("span",{className:L.timelineValue,children:Dr(n.completedAt)}),v!==void 0&&h.jsx("span",{className:L.timelineDelta,children:v})]})})(),!n.createdAt&&!n.assignedAt&&!n.startedAt&&!n.completedAt&&h.jsx("div",{className:L.overviewMuted,children:"No timing data"})]})]}),n.reviewNotes&&h.jsxs("div",{className:L.overviewSection,children:[h.jsx("div",{className:L.overviewLabel,children:"Review Notes"}),h.jsx("div",{className:L.reviewNotes,children:n.reviewNotes})]})]})}function YO({task:n,sessionId:a,isBlocked:i,onStart:o,onResume:r,onStop:d,onComplete:u,onDelete:p,onEdit:m}){if(n.status==="not_started")return i?h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:m,className:L.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]}):h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:o,className:L.btnPrimary,children:"Start"}),h.jsx("button",{onClick:m,className:L.btnGhost,children:"Edit"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]});if(n.status==="working")return h.jsx("div",{className:L.headerActions,children:h.jsx("button",{onClick:d,disabled:!a,className:L.btnDanger,children:"Stop"})});if(n.status==="paused")return h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:u,className:L.btnPrimary,children:"Complete"}),h.jsx("button",{onClick:r,className:L.btnGhost,children:"Resume"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]});if(n.status==="complete")return h.jsx("div",{className:L.headerActions,children:h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})});if(n.status==="failed")return h.jsxs("div",{className:L.headerActions,children:[h.jsx("button",{onClick:o,className:L.btnPrimary,children:"Retry"}),h.jsx("button",{onClick:p,className:L.btnDanger,children:"Delete"})]})}function KO({taskSessions:n,selectedSessionId:a,onSelect:i}){if(!(n.length<2))return h.jsxs("div",{className:L.attemptSelector,"data-testid":"attempt-selector",children:[h.jsx("span",{className:L.attemptLabel,children:"Attempts:"}),n.map((o,r)=>{const d=o.id===a,u=o.status==="completed"?"✓":o.status==="failed"?"✗":o.status==="running"||o.status==="idle"?"●":"";return h.jsxs("button",{className:`${L.attemptButton} ${d?L.attemptActive:""}`,onClick:()=>i(o.id),title:`Attempt #${r+1} — ${o.status}`,"aria-label":`Attempt #${r+1}, ${o.status}`,"aria-pressed":d,"data-testid":`attempt-${r+1}`,children:["#",r+1,u&&h.jsx("span",{className:L.attemptStatus,children:u})]},o.id)})]})}function Kd(){const{taskId:n}=Wr(),a=Qt(),i=Mn(),{events:o,eventsDropped:r,tasks:d,environments:u,loadSessionEvents:p,loadFindings:m,kill:g,startTask:v,resumeTask:y,completeTask:_,deleteTask:T,projects:E,taskSessions:j,loadTaskSessions:N}=It(),C=S.useRef(void 0),A=S.useRef(void 0),k=S.useRef(void 0),H=S.useRef(void 0),O=S.useRef(void 0),$=a.pathname.endsWith("/stream")?"stream":a.pathname.endsWith("/findings")?"findings":"overview",[G,M]=S.useState($),[V,te]=S.useState(!1),[ne,ae]=S.useState(void 0),re=S.useRef($);$!==re.current&&(re.current=$,$!==G&&M($));const Y=d.find(Ee=>Ee.id===n),Q=(Y==null?void 0:Y.projectId)||void 0,B=Y?j[Y.id]??[]:[];let F;ne&&B.some(Ee=>Ee.id===ne)?F=ne:F=(Y==null?void 0:Y.latestSessionId)||void 0;const W=()=>{te(!0)},be=()=>{Y&&(T(Y.id),te(!1),i(Kl(Y.projectId),{replace:!0}))};if((Y==null?void 0:Y.id)!==A.current&&(A.current=Y==null?void 0:Y.id,ne!==void 0&&ae(void 0)),S.useEffect(()=>{if(!(Y!=null&&Y.id))return;const Ee=Y.id!==H.current,ee=Y.latestSessionId!==O.current;(Ee||ee)&&(H.current=Y.id,O.current=Y.latestSessionId,N(Y.id))},[Y==null?void 0:Y.id,Y==null?void 0:Y.latestSessionId,N]),(Y==null?void 0:Y.status)!==k.current){k.current=Y==null?void 0:Y.status;const Ee=(Y==null?void 0:Y.status)==="not_started"?"overview":(Y==null?void 0:Y.status)==="working"||(Y==null?void 0:Y.status)==="paused"?"stream":(Y==null?void 0:Y.status)==="complete"?"findings":void 0;Ee&&Ee!==G&&M(Ee)}const Te=S.useMemo(()=>new Map(d.map(Ee=>[Ee.id,Ee])),[d]),nt=S.useMemo(()=>{const Ee=F?o.filter(ee=>ee.sessionId===F):[];return q1($1(Ee))},[o,F]),Me=Y?Y.dependsOn.some(Ee=>{const ee=Te.get(Ee);return ee!==void 0&&ee.status!=="complete"}):!1,fe=S.useMemo(()=>OR(n,E,Te),[n,E,Te]);S.useEffect(()=>{F&&F!==C.current&&(C.current=F,p(F))},[F,p]),S.useEffect(()=>{G==="findings"&&Q&&m(Q)},[G,Q,m]);const Ie=Ee=>{M(Ee),i(ns(n,Ee==="overview"?void 0:Ee))};return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Vi,{segments:fe}),h.jsxs("div",{className:L.header,children:[h.jsxs("span",{className:L.headerTitle,children:[h.jsx("span",{"data-testid":"task-title",children:(Y==null?void 0:Y.title)||n}),Y&&h.jsx("span",{className:L.taskStatusBadge,"data-testid":"task-status",children:Y.status}),(Y==null?void 0:Y.branch)&&h.jsx("span",{className:L.taskBranch,children:Y.branch}),Me&&h.jsx("span",{className:L.taskBlockedBadge,children:"blocked"})]}),Y&&h.jsx(YO,{task:Y,sessionId:F,isBlocked:Me,onStart:()=>v(Y.id),onResume:()=>y(Y.id),onStop:()=>F&&g(F),onComplete:()=>_(Y.id),onDelete:W,onEdit:()=>i(tE(Y.id))})]}),h.jsxs("div",{className:L.tabBar,role:"tablist","aria-label":"Task view",children:[h.jsx("button",{role:"tab","aria-selected":G==="overview",className:`${L.tab} ${G==="overview"?L.active:""}`,onClick:()=>Ie("overview"),children:"Overview"}),h.jsx("button",{role:"tab","aria-selected":G==="stream",className:`${L.tab} ${G==="stream"?L.active:""}`,onClick:()=>Ie("stream"),children:"Stream"}),h.jsx("button",{role:"tab","aria-selected":G==="findings",className:`${L.tab} ${G==="findings"?L.active:""}`,onClick:()=>Ie("findings"),children:"Findings"})]}),h.jsxs(Vn,{mode:"wait",children:[G==="overview"&&h.jsx(Xt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:L.overviewContent,children:Y?h.jsx(qO,{task:Y,tasksById:Te,environments:u,projects:E,taskSessions:B}):h.jsx("div",{className:L.waitingMessage,children:"No additional details"})},"overview"),G==="stream"&&h.jsxs(Xt.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(KO,{taskSessions:B,selectedSessionId:F,onSelect:Ee=>ae(Ee)}),h.jsx(F1,{events:nt,eventsDropped:r,emptyState:!F&&Y?h.jsxs("div",{className:L.emptyCta,children:[h.jsx("button",{className:L.ctaButton,onClick:()=>v(Y.id),children:"Start Task"}),h.jsx("div",{className:L.ctaDescription,children:"Click to begin agent execution"})]}):F&&nt.length===0?h.jsx("div",{className:L.waitingMessage,children:"Waiting for events..."}):void 0})]},"stream"),G==="findings"&&h.jsx(Xt.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.15},className:L.tabContent,children:Q?h.jsx(GO,{projectId:Q}):h.jsx("div",{className:L.noContext,children:"Navigate to a task within a project to view findings"})},"findings")]}),Y&&h.jsx(rc,{isOpen:V,title:"Delete Task?",description:`"${Y.title}" will be permanently removed.`,onConfirm:be,onCancel:()=>te(!1)})]})}function ZO(){const n=DR();return h.jsxs("div",{className:L.panelContainer,children:[h.jsx(Vi,{segments:n}),h.jsx("div",{className:L.emptyState,children:"Configure the new environment below"})]})}const XO="_layout_11u79_1",QO="_content_11u79_8",JO="_tabPanel_11u79_14",Zd={layout:XO,content:QO,tabPanel:JO},WO={environments:"Environments",credentials:"Credentials",personas:"Personas",appearance:"Appearance",about:"About"};function eB(){const a=Qt().pathname.replace(/^\/settings\/?/,"").split("/")[0],i=WO[a],o=wR(i);return h.jsxs("div",{className:Zd.layout,children:[h.jsx(Vi,{segments:o}),h.jsx("div",{className:Zd.content,children:h.jsx("div",{className:Zd.tabPanel,children:h.jsx(I0,{})},a)})]})}const tB="_nav_13n0b_1",nB="_tab_13n0b_44",aB="_tabIcon_13n0b_82",sB="_tabActive_13n0b_88",kr={nav:tB,tab:nB,tabIcon:aB,tabActive:sB},Sa=[{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 iB(){var u;const n=Qt(),a=Mn(),i=S.useRef(null),o=((u=Sa.find(p=>n.pathname===`${ki}/${p.path}`))==null?void 0:u.path)??Sa[0].path,r=S.useCallback(p=>{a(`${ki}/${p}`)},[a]),d=S.useCallback(p=>{var T,E;const m=(T=i.current)==null?void 0:T.querySelectorAll('[role="tab"]');if(!m)return;const g=Array.from(m).findIndex(j=>j===document.activeElement),v=g>=0?g:Sa.findIndex(j=>j.path===o);let y=v;if(p.key==="ArrowDown")p.preventDefault(),y=(v+1)%Sa.length;else if(p.key==="ArrowUp")p.preventDefault(),y=(v-1+Sa.length)%Sa.length;else if(p.key==="Home")p.preventDefault(),y=0;else if(p.key==="End")p.preventDefault(),y=Sa.length-1;else return;const _=Sa[y].path;a(`${ki}/${_}`),(E=m[y])==null||E.focus()},[o,a]);return h.jsx("nav",{className:kr.nav,ref:i,role:"tablist","aria-orientation":"vertical","aria-label":"Settings",onKeyDown:d,children:Sa.map(p=>{const m=p.path===o;return h.jsxs("button",{role:"tab",type:"button","aria-selected":m,tabIndex:m?0:-1,className:`${kr.tab} ${m?kr.tabActive:""}`,onClick:()=>r(p.path),children:[h.jsx("span",{className:kr.tabIcon,"aria-hidden":"true",children:p.icon}),p.label]},p.path)})})}const lB="_container_1nk8c_1",oB="_header_1nk8c_5",rB="_headerLabel_1nk8c_12",cB="_addButton_1nk8c_20",uB="_envRow_1nk8c_55",dB="_targeted_1nk8c_69",fB="_expanded_1nk8c_72",hB="_statusDot_1nk8c_76",pB="_pulse_1nk8c_79",mB="_envName_1nk8c_83",gB="_envActions_1nk8c_87",yB="_idleLabel_1nk8c_94",vB="_newChatButton_1nk8c_99",bB="_envActionsRow_1nk8c_126",SB="_connectButton_1nk8c_134",_B="_stopButton_1nk8c_160",xB="_deleteButton_1nk8c_186",TB="_provisionMessage_1nk8c_213",EB="_errorMessage_1nk8c_220",CB="_sessionRow_1nk8c_227",AB="_selected_1nk8c_243",jB="_sessionDot_1nk8c_248",NB="_sessionSummaryRow_1nk8c_252",wB="_sessionExpandArrow_1nk8c_272",DB="_sessionSummaryText_1nk8c_283",kB="_sessionCountBadge_1nk8c_290",MB="_emptyCta_1nk8c_313",RB="_ctaDescription_1nk8c_326",OB="_ctaButton_1nk8c_332",qe={container:lB,header:oB,headerLabel:rB,addButton:cB,envRow:uB,targeted:dB,expanded:fB,statusDot:hB,pulse:pB,envName:mB,envActions:gB,idleLabel:yB,newChatButton:vB,envActionsRow:bB,connectButton:SB,stopButton:_B,deleteButton:xB,provisionMessage:TB,errorMessage:EB,sessionRow:CB,selected:AB,sessionDot:jB,sessionSummaryRow:NB,sessionExpandArrow:wB,sessionSummaryText:DB,sessionCountBadge:kB,emptyCta:MB,ctaDescription:RB,ctaButton:OB},BB={connected:"var(--accent-green)",sleeping:"var(--accent-yellow)",error:"var(--accent-red)",disconnected:"var(--text-tertiary)",connecting:"var(--accent-blue)"},LB={running:"running",idle:"awaiting input",failed:"failed",interrupted:"interrupted",completed:"completed"},x0=["running","idle","failed","interrupted","completed"],IB=.2;function UB(n){const a={};for(const d of n)a[d.status]=(a[d.status]||0)+1;const i=x0.filter(d=>a[d]>0).map(d=>`${a[d]} ${LB[d]||d}`),o=new Set(x0),r=Object.keys(a).filter(d=>!o.has(d)).sort().map(d=>`${a[d]} ${d}`);return[...i,...r].join(", ")}function zB({status:n}){const a=n==="running"?"var(--accent-green)":n==="idle"?"var(--accent-yellow)":n==="completed"?"var(--text-secondary)":n==="failed"||n==="interrupted"?"var(--accent-red)":"var(--text-tertiary)";return h.jsx("span",{className:qe.sessionDot,style:{color:a},children:"●"})}function VB({env:n,envSessions:a,selectedSessionId:i,isNewChatTarget:o,expanded:r,onToggleExpand:d,sessionsExpanded:u,onToggleSessionsExpand:p,provisionProgress:m,onProvision:g,onStop:v,onRemove:y,navigate:_}){const[T,E]=S.useState(!1),j=BB[n.status]||"var(--text-tertiary)",N=n.status==="connected",C=n.status==="connecting",A=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:()=>{y(n.id),E(!1)},onCancel:()=>E(!1)}),h.jsxs("div",{className:`${qe.envRow} ${o?qe.targeted:""} ${r?qe.expanded:""}`,"data-testid":"env-row",onClick:d,children:[h.jsx("span",{className:`${qe.statusDot} ${N?qe.pulse:""}`,style:{color:j},children:"●"}),h.jsx("span",{className:qe.envName,title:n.displayName||n.id,children:n.displayName||n.id}),h.jsxs("span",{className:qe.envActions,children:[a.length===0&&!o&&!r&&h.jsx("span",{className:qe.idleLabel,children:"(idle)"}),N&&h.jsx("button",{onClick:k=>{k.stopPropagation(),_(G0(n.id))},title:"New chat",className:qe.newChatButton,children:"+"})]})]}),r&&h.jsxs("div",{className:qe.envActionsRow,children:[C&&m&&h.jsx("span",{className:qe.provisionMessage,children:m.message}),n.status==="error"&&(m==null?void 0:m.stage)==="error"&&h.jsx("span",{className:qe.errorMessage,children:m.message}),A&&h.jsx("button",{onClick:k=>{k.stopPropagation(),g(n.id)},className:qe.connectButton,children:n.status==="error"?"Retry":"Connect"}),N&&h.jsx("button",{onClick:k=>{k.stopPropagation(),v(n.id)},className:qe.stopButton,children:"Stop"}),!C&&h.jsx("button",{onClick:k=>{k.stopPropagation(),E(!0)},className:qe.deleteButton,children:"Delete"})]}),a.length>0&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:qe.sessionSummaryRow,"data-testid":"session-summary-row",role:"button",tabIndex:0,"aria-expanded":u,"aria-label":u?"Collapse sessions":"Expand sessions",onClick:p,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),p())},children:[h.jsx("span",{className:`${qe.sessionExpandArrow} ${u?qe.expanded:""}`,children:"▸"}),h.jsx("span",{className:qe.sessionSummaryText,children:UB(a)}),h.jsx("span",{className:qe.sessionCountBadge,children:a.length})]}),h.jsx(Vn,{children:u&&h.jsx(Xt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:IB,ease:"easeInOut"},style:{overflow:"hidden"},children:a.map(k=>h.jsxs("div",{onClick:H=>{H.stopPropagation(),_(P0(k.id))},className:`${qe.sessionRow} ${i===k.id?qe.selected:""}`,title:k.prompt,"data-testid":"session-row",children:[h.jsx(zB,{status:k.status})," ",k.prompt.length>24?k.prompt.slice(0,24)+"...":k.prompt]},k.id))})})]})]})}function HB(){const{environments:n,sessions:a,provisionStatus:i,provisionEnvironment:o,stopEnvironment:r,removeEnvironment:d}=It(),u=Mn(),[p,m]=S.useState(null),[g,v]=S.useState(new Set),y=Kt("/sessions/:sessionId"),_=Kt("/sessions/new"),T=(y==null?void 0:y.params.sessionId)!=="new"?y==null?void 0:y.params.sessionId:void 0,[E]=Lf(),j=_?E.get("env")??void 0:void 0;return h.jsxs("div",{className:qe.container,children:[h.jsxs("div",{className:qe.header,children:[h.jsx("span",{className:qe.headerLabel,children:"Environments"}),h.jsx("button",{className:qe.addButton,onClick:()=>u(My),title:"Add environment",children:"+ Add Environment"})]}),n.length===0&&h.jsxs("div",{className:qe.emptyCta,children:[h.jsx("button",{className:qe.ctaButton,onClick:()=>u(My),children:"Add Environment"}),h.jsx("div",{className:qe.ctaDescription,children:"Connect an environment to run agents"})]}),n.map(N=>{const C=a.filter(A=>A.environmentId===N.id);return h.jsx(VB,{env:N,envSessions:C,selectedSessionId:T,isNewChatTarget:j===N.id,expanded:p===N.id,onToggleExpand:()=>m(p===N.id?null:N.id),sessionsExpanded:g.has(N.id),onToggleSessionsExpand:()=>{v(A=>{const k=new Set(A);return k.has(N.id)?k.delete(N.id):k.add(N.id),k})},provisionProgress:i[N.id],onProvision:o,onStop:r,onRemove:d,navigate:u},N.id)})]})}function PB(){return h.jsx(HB,{})}const GB="_section_1ingb_14",FB="_sectionTitle_1ingb_26",$B="_sectionDescription_1ingb_35",qB="_tokenList_1ingb_48",YB="_tokenRow_1ingb_55",KB="_tokenBadge_1ingb_68",ZB="_tokenName_1ingb_83",XB="_tokenTarget_1ingb_90",QB="_deleteButton_1ingb_99",JB="_addForm_1ingb_113",WB="_formRow_1ingb_119",e4="_input_1ingb_125",t4="_select_1ingb_155",n4="_addButton_1ingb_187",a4="_emptyStateInfo_1ingb_221",s4="_themeOptions_1ingb_229",i4="_themeOption_1ingb_229",l4="_themeOptionSelected_1ingb_254",o4="_themeOptionHeader_1ingb_259",r4="_themeOptionLabel_1ingb_266",c4="_themeOptionDesc_1ingb_273",u4="_variantToggle_1ingb_279",d4="_variantButton_1ingb_286",f4="_variantActive_1ingb_305",h4="_themeSwatches_1ingb_311",p4="_themeSwatch_1ingb_311",m4="_systemToggle_1ingb_325",g4="_systemToggleHint_1ingb_341",y4="_themeActive_1ingb_348",v4="_aboutGrid_1ingb_354",b4="_aboutItem_1ingb_360",S4="_aboutLabel_1ingb_373",_4="_aboutValue_1ingb_379",x4="_aboutDot_1ingb_387",T4="_aboutDotConnected_1ingb_394",E4="_aboutDotDisconnected_1ingb_398",oe={section:GB,sectionTitle:FB,sectionDescription:$B,tokenList:qB,tokenRow:YB,tokenBadge:KB,tokenName:ZB,tokenTarget:XB,deleteButton:QB,addForm:JB,formRow:WB,input:e4,select:t4,addButton:n4,emptyStateInfo:a4,themeOptions:s4,themeOption:i4,themeOptionSelected:l4,themeOptionHeader:o4,themeOptionLabel:r4,themeOptionDesc:c4,variantToggle:u4,variantButton:d4,variantActive:f4,themeSwatches:h4,themeSwatch:p4,systemToggle:m4,systemToggleHint:g4,themeActive:y4,aboutGrid:v4,aboutItem:b4,aboutLabel:S4,aboutValue:_4,aboutDot:x4,aboutDotConnected:T4,aboutDotDisconnected:E4},C4=[{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 A4(){const{credentialProviders:n,updateCredentialProviders:a}=It(),i=(o,r)=>{const d={...n};o==="claude"?d.claude=r:d[o]=r,a(d)};return h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Credential Providers"}),h.jsx("p",{className:oe.sectionDescription,children:"Enable providers to automatically forward credentials to environments at task start. Credentials are read fresh from the host each time."}),h.jsx("div",{className:oe.tokenList,children:C4.map(o=>h.jsxs("div",{className:oe.tokenRow,children:[h.jsx("span",{className:oe.tokenName,children:o.label}),h.jsx("span",{className:oe.tokenTarget,children:o.description}),h.jsx("select",{className:oe.select,value:n[o.key],onChange:r=>i(o.key,r.target.value),children:o.options.map(r=>h.jsx("option",{value:r.value,children:r.label},r.value))})]},o.key))})]})}const j4=[{value:"env_var",label:"Environment Variable"},{value:"file",label:"File"}];function N4(){const{tokens:n,setToken:a,deleteToken:i}=It(),{showToast:o}=ao(),[r,d]=S.useState(""),[u,p]=S.useState(""),[m,g]=S.useState("env_var"),[v,y]=S.useState(""),[_,T]=S.useState(null),E=C=>{if(C.preventDefault(),!r||!u)return;const A=m==="env_var"?v||r.toUpperCase()+"_TOKEN":"";a(r,u,m,A,m==="file"?v:""),o("Token saved successfully","success"),d(""),p(""),y("")},j=C=>{T(C)},N=()=>{_&&(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:N,onCancel:()=>T(null)}),h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Tokens"}),h.jsx("p",{className:oe.sectionDescription,children:"API tokens are auto-pushed to environments when set or updated. Values are write-only."}),n.length===0?h.jsx("div",{className:oe.emptyStateInfo,children:"Add your first API token to enable service integrations."}):h.jsx("div",{className:oe.tokenList,children:n.map(C=>h.jsxs("div",{className:oe.tokenRow,children:[h.jsx("span",{className:oe.tokenBadge,children:C.tokenType}),h.jsx("span",{className:oe.tokenName,children:C.name}),h.jsx("span",{className:oe.tokenTarget,children:C.tokenType==="env_var"?C.envVar:C.filePath}),h.jsx("button",{className:oe.deleteButton,onClick:()=>j(C.name),title:`Delete ${C.name}`,children:"×"})]},C.name))}),h.jsxs("form",{className:oe.addForm,onSubmit:E,children:[h.jsxs("div",{className:oe.formRow,children:[h.jsx("input",{className:oe.input,type:"text",placeholder:"Token name",value:r,onChange:C=>d(C.target.value)}),h.jsx("input",{className:oe.input,type:"password",placeholder:"Value",value:u,onChange:C=>p(C.target.value)})]}),h.jsxs("div",{className:oe.formRow,children:[h.jsx("select",{className:oe.select,value:m,onChange:C=>g(C.target.value),children:j4.map(C=>h.jsx("option",{value:C.value,children:C.label},C.value))}),h.jsx("input",{className:oe.input,type:"text",placeholder:m==="env_var"?"Env var name (e.g. API_TOKEN)":"File path (e.g. /home/user/.token)",value:v,onChange:C=>y(C.target.value)}),h.jsx("button",{className:oe.addButton,type:"submit",children:"Add Token"})]})]})]})]})}function w4(){return h.jsxs(h.Fragment,{children:[h.jsx(A4,{}),h.jsx(N4,{})]})}const D4="_container_6b3ow_1",k4="_header_6b3ow_7",M4="_form_6b3ow_19",R4="_formActions_6b3ow_87",O4="_list_6b3ow_93",B4="_card_6b3ow_99",L4="_active_6b3ow_109",I4="_cardHeader_6b3ow_113",U4="_cardTitle_6b3ow_123",z4="_defaultBadge_6b3ow_129",V4="_cardActions_6b3ow_143",H4="_description_6b3ow_148",P4="_meta_6b3ow_154",G4="_promptDetails_6b3ow_171",F4="_promptText_6b3ow_183",$4="_empty_6b3ow_200",q4="_btnPrimary_6b3ow_206",Y4="_btnSecondary_6b3ow_240",K4="_btnSmall_6b3ow_267",Z4="_btnDanger_6b3ow_293",rt={container:D4,header:k4,form:M4,formActions:R4,list:O4,card:B4,active:L4,cardHeader:I4,cardTitle:U4,defaultBadge:z4,cardActions:V4,description:H4,meta:P4,promptDetails:G4,promptText:F4,empty:$4,btnPrimary:q4,btnSecondary:Y4,btnSmall:K4,btnDanger:Z4};function X4(){const{personas:n,createPersona:a,updatePersona:i,deletePersona:o,appDefaultPersonaId:r,setAppDefaultPersonaId:d}=It(),[u,p]=S.useState(null),[m,g]=S.useState(!1),[v,y]=S.useState(null),[_,T]=S.useState(""),[E,j]=S.useState(""),[N,C]=S.useState(""),[A,k]=S.useState("claude-code"),[H,O]=S.useState("sonnet"),[$,G]=S.useState(0),M=()=>{T(""),j(""),C(""),k("claude-code"),O("sonnet"),G(0)},V=()=>{M(),p(null),g(!0)},te=Q=>{T(Q.name),j(Q.description),C(Q.systemPrompt),k(Q.runtime),O(Q.model),G(Q.maxTurns),p(Q),g(!1)},ne=Q=>{Q.preventDefault(),!(!_.trim()||!N.trim()||!A||!H)&&(u?(i(u.id,_,E,N,A,H,$),p(null)):(a(_,E,N,A,H,$),g(!1)),M())},ae=Q=>{o(Q),y(null),(u==null?void 0:u.id)===Q&&(p(null),M())},re=()=>{p(null),g(!1),M()},Y=()=>h.jsxs("form",{onSubmit:ne,className:rt.form,children:[h.jsx("h3",{children:u?"Edit Persona":"Create Persona"}),h.jsxs("label",{children:["Name",h.jsx("input",{type:"text",value:_,onChange:Q=>T(Q.target.value),placeholder:"e.g. Frontend Engineer",required:!0})]}),h.jsxs("label",{children:["Description",h.jsx("input",{type:"text",value:E,onChange:Q=>j(Q.target.value),placeholder:"Brief description..."})]}),h.jsxs("label",{children:["Runtime",h.jsxs("select",{value:A,onChange:Q=>k(Q.target.value),"data-testid":"persona-runtime-select",children:[h.jsx("option",{value:"claude-code",children:"claude-code"}),h.jsx("option",{value:"codex",children:"codex"}),h.jsx("option",{value:"copilot",children:"copilot"}),h.jsx("option",{value:"stub",children:"stub"}),h.jsx("option",{value:"claude-code-acp",children:"claude-code-acp (experimental)"}),h.jsx("option",{value:"codex-acp",children:"codex-acp (experimental)"}),h.jsx("option",{value:"copilot-acp",children:"copilot-acp (experimental)"})]})]}),h.jsxs("label",{children:["Model",h.jsx("input",{type:"text",value:H,onChange:Q=>O(Q.target.value),placeholder:"e.g. sonnet"})]}),h.jsxs("label",{children:["Max Turns",h.jsx("input",{type:"number",value:$,onChange:Q=>G(parseInt(Q.target.value,10)||0),min:0})]}),h.jsxs("label",{children:["System Prompt",h.jsx("textarea",{value:N,onChange:Q=>C(Q.target.value),placeholder:"You are a senior frontend engineer...",rows:10,required:!0})]}),h.jsxs("div",{className:rt.formActions,children:[h.jsx("button",{type:"submit",className:rt.btnPrimary,children:u?"Save":"Create"}),h.jsx("button",{type:"button",onClick:re,className:rt.btnSecondary,children:"Cancel"})]})]});return h.jsxs("div",{className:rt.container,children:[h.jsxs("div",{className:rt.header,children:[h.jsx("h2",{children:"Personas"}),h.jsx("button",{onClick:V,className:rt.btnPrimary,children:"+ New Persona"})]}),(m||u)&&Y(),n.length===0&&!m?h.jsx("p",{className:rt.empty,children:"No personas yet. Create one to get started."}):h.jsx("div",{className:rt.list,children:n.map(Q=>{const B=r===Q.id;return h.jsxs("div",{className:`${rt.card} ${(u==null?void 0:u.id)===Q.id?rt.active:""}`,"data-testid":`persona-card-${Q.id}`,children:[h.jsxs("div",{className:rt.cardHeader,children:[h.jsxs("span",{className:rt.cardTitle,children:[h.jsx("strong",{children:Q.name}),B&&h.jsx("span",{className:rt.defaultBadge,"data-testid":`persona-default-badge-${Q.id}`,children:"App Default"})]}),h.jsxs("div",{className:rt.cardActions,children:[!B&&h.jsx("button",{onClick:()=>d(Q.id),className:rt.btnSmall,"data-testid":`persona-set-default-${Q.id}`,title:"Set as app default persona",children:"Set Default"}),h.jsx("button",{onClick:()=>te(Q),className:rt.btnSmall,children:"Edit"}),v===Q.id?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>ae(Q.id),className:rt.btnDanger,children:"Confirm"}),h.jsx("button",{onClick:()=>y(null),className:rt.btnSmall,children:"Cancel"})]}):h.jsx("button",{onClick:()=>y(Q.id),className:rt.btnSmall,children:"Delete"})]})]}),Q.description&&h.jsx("p",{className:rt.description,children:Q.description}),h.jsxs("div",{className:rt.meta,children:[Q.runtime&&h.jsxs("span",{children:["Runtime: ",Q.runtime]}),Q.model&&h.jsxs("span",{children:["Model: ",Q.model]}),Q.maxTurns>0&&h.jsxs("span",{children:["Max turns: ",Q.maxTurns]})]}),h.jsxs("details",{className:rt.promptDetails,children:[h.jsx("summary",{children:"System Prompt"}),h.jsx("pre",{className:rt.promptText,children:Q.systemPrompt})]})]},Q.id)})})]})}function Q4(){return h.jsx(X4,{})}function J4(){const{themeId:n,resolvedThemeId:a,setTheme:i,preferSystem:o,setPreferSystem:r}=X0();return h.jsxs("section",{className:oe.section,children:[h.jsx("h3",{className:oe.sectionTitle,children:"Appearance"}),h.jsx("p",{className:oe.sectionDescription,children:"Choose how Grackle looks across the app."}),h.jsx("div",{className:oe.themeOptions,children:tc.filter(d=>!d.hidden).map(d=>{const u=!!(d.variantLightId&&d.variantDarkId),p=u?n===d.id||n===d.variantLightId||n===d.variantDarkId:n===d.id,m=u&&a===d.variantLightId;return h.jsxs("button",{type:"button",className:`${oe.themeOption} ${p?oe.themeOptionSelected:""}`,"aria-pressed":p,onClick:()=>i(d.id),children:[h.jsxs("span",{className:oe.themeOptionHeader,children:[h.jsxs("span",{children:[h.jsx("span",{className:oe.themeOptionLabel,children:d.label}),h.jsx("span",{className:oe.themeOptionDesc,children:d.description})]}),u&&h.jsxs("span",{className:oe.variantToggle,children:[h.jsx("span",{role:"button",tabIndex:0,className:`${oe.variantButton} ${p&&m?oe.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantLightId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantLightId))},"aria-label":"Light variant","aria-pressed":p&&m,children:"☼"}),h.jsx("span",{role:"button",tabIndex:0,className:`${oe.variantButton} ${p&&!m?oe.variantActive:""}`,onClick:g=>{g.stopPropagation(),r(!1),i(d.variantDarkId)},onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),g.stopPropagation(),r(!1),i(d.variantDarkId))},"aria-label":"Dark variant","aria-pressed":p&&!m,children:"☾"})]})]}),d.swatches&&h.jsx("span",{className:oe.themeSwatches,children:d.swatches.map((g,v)=>h.jsx("span",{className:oe.themeSwatch,style:{background:g}},v))})]},d.id)})}),h.jsxs("label",{className:oe.systemToggle,children:[h.jsx("input",{type:"checkbox",checked:o,onChange:d=>r(d.target.checked)}),h.jsx("span",{children:"Match system light/dark preference"})]}),h.jsx("p",{className:oe.systemToggleHint,children:"Automatically switches between light and dark variants when available."}),h.jsxs("p",{className:oe.themeActive,children:["Active theme: ",h.jsx("strong",{children:a})]})]})}function W4(){return h.jsx(J4,{})}function e6(){const{connected:n,environments:a,sessions:i}=It(),o=a.filter(u=>u.status==="connected").length,r=a.length,d=i.filter(u=>["running","idle"].includes(u.status)).length;return h.jsxs("section",{className:oe.section,"data-testid":"about-panel",children:[h.jsx("h3",{className:oe.sectionTitle,children:"About"}),h.jsx("p",{className:oe.sectionDescription,children:"Connection status and application information."}),h.jsxs("div",{className:oe.aboutGrid,children:[h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Connection"}),h.jsxs("span",{className:oe.aboutValue,children:[h.jsx("span",{className:`${oe.aboutDot} ${n?oe.aboutDotConnected:oe.aboutDotDisconnected}`}),n?"Connected":"Disconnected"]})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Environments"}),h.jsxs("span",{className:oe.aboutValue,children:[o,"/",r," connected"]})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Active Sessions"}),h.jsx("span",{className:oe.aboutValue,children:d})]}),h.jsxs("div",{className:oe.aboutItem,children:[h.jsx("span",{className:oe.aboutLabel,children:"Version"}),h.jsx("span",{className:oe.aboutValue,children:"0.41.1"})]})]})]})}function t6(){return h.jsx(e6,{})}const n6="_wizard_gl3ke_1",a6="_container_gl3ke_10",s6="_stepContent_gl3ke_19",i6="_logoArea_gl3ke_28",l6="_heading_gl3ke_34",o6="_tagline_gl3ke_42",r6="_subtitle_gl3ke_49",c6="_featureList_gl3ke_57",u6="_runtimeGrid_gl3ke_82",d6="_runtimeCard_gl3ke_94",f6="_runtimeName_gl3ke_126",h6="_runtimeDescription_gl3ke_132",p6="_buttonRow_gl3ke_137",m6="_primaryButton_gl3ke_144",g6="_ghostButton_gl3ke_178",y6="_dots_gl3ke_206",v6="_dot_gl3ke_206",tt={wizard:n6,container:a6,stepContent:s6,logoArea:i6,heading:l6,tagline:o6,subtitle:r6,featureList:c6,runtimeGrid:u6,runtimeCard:d6,runtimeName:f6,runtimeDescription:h6,buttonRow:p6,primaryButton:m6,ghostButton:g6,dots:y6,dot:v6};function b6({onNext:n}){return h.jsxs("div",{className:tt.stepContent,"data-testid":"setup-welcome",children:[h.jsx("div",{className:tt.logoArea,children:h.jsx("span",{className:tt.logoEmoji,children:"🐦‍⬛"})}),h.jsx("h1",{className:tt.heading,children:"Welcome to Grackle"}),h.jsx("p",{className:tt.tagline,children:"Multi-agent orchestration for software teams"}),h.jsx("button",{type:"button",className:tt.primaryButton,onClick:n,"data-testid":"setup-get-started",children:"Get Started"})]})}function S6({onNext:n,onBack:a}){return h.jsxs("div",{className:tt.stepContent,"data-testid":"setup-about",children:[h.jsx("h2",{className:tt.heading,children:"What is Grackle?"}),h.jsxs("ul",{className:tt.featureList,children:[h.jsx("li",{children:"Run Claude, Copilot, and Codex agents side by side"}),h.jsx("li",{children:"Provision and control dev environments — SSH, Codespaces, or local"}),h.jsx("li",{children:"Organize work into projects with agent-executable tasks"}),h.jsx("li",{children:"Customize agent behavior with personas, tools, and MCP servers"}),h.jsx("li",{children:"Live-stream agent sessions with full terminal replay"})]}),h.jsxs("div",{className:tt.buttonRow,children:[h.jsx("button",{type:"button",className:tt.ghostButton,onClick:a,children:"Back"}),h.jsx("button",{type:"button",className:tt.primaryButton,onClick:n,"data-testid":"setup-about-next",children:"Next"})]})]})}const _6=[{id:"claude-code",name:"Claude Code",description:"Anthropic's agentic coding tool"},{id:"copilot",name:"Copilot Coding Agent",description:"GitHub's AI pair programmer"},{id:"codex",name:"Codex CLI",description:"OpenAI's coding agent"}];function x6({currentRuntime:n,onFinish:a,onBack:i,finishDisabled:o}){const[r,d]=S.useState(n||"claude-code");return S.useEffect(()=>{n&&d(n)},[n]),h.jsxs("div",{className:tt.stepContent,"data-testid":"setup-runtime",children:[h.jsx("h2",{className:tt.heading,children:"Choose Your Runtime"}),h.jsx("p",{className:tt.subtitle,children:"Select the primary agent runtime for your workspace. You can change this later."}),h.jsx("div",{className:tt.runtimeGrid,children:_6.map(u=>h.jsxs("button",{type:"button",className:tt.runtimeCard,"data-selected":r===u.id,"aria-pressed":r===u.id,"data-testid":`runtime-card-${u.id}`,onClick:()=>d(u.id),children:[h.jsx("span",{className:tt.runtimeName,children:u.name}),h.jsx("span",{className:tt.runtimeDescription,children:u.description})]},u.id))}),h.jsxs("div",{className:tt.buttonRow,children:[h.jsx("button",{type:"button",className:tt.ghostButton,onClick:i,children:"Back"}),h.jsx("button",{type:"button",className:tt.primaryButton,onClick:()=>a(r),disabled:o,"data-testid":"setup-finish",children:"Finish"})]})]})}const T6=3,E6={"claude-code":"sonnet",copilot:"gpt-4o",codex:"o3"};function C6(){const{personas:n,updatePersona:a,completeOnboarding:i,onboardingCompleted:o}=It(),r=Mn(),[d,u]=S.useState(0),p=n.find(g=>g.id==="claude-code"),m=S.useCallback(g=>{if(p&&g!==p.runtime){const v=E6[g]??"sonnet";a(p.id,void 0,void 0,void 0,g,v)}i(),r("/",{replace:!0})},[p,a,i,r]);return o?h.jsx(Di,{to:"/",replace:!0}):h.jsx("div",{className:tt.wizard,"data-testid":"setup-wizard",children:h.jsxs("div",{className:tt.container,children:[h.jsx(Vn,{mode:"wait",children:h.jsxs(Xt.div,{initial:{opacity:0,x:40},animate:{opacity:1,x:0},exit:{opacity:0,x:-40},transition:{duration:.2,ease:"easeInOut"},children:[d===0&&h.jsx(b6,{onNext:()=>u(1)}),d===1&&h.jsx(S6,{onNext:()=>u(2),onBack:()=>u(0)}),d===2&&h.jsx(x6,{currentRuntime:(p==null?void 0:p.runtime)??"claude-code",onFinish:m,onBack:()=>u(1),finishDisabled:!p})]},d)}),h.jsx("div",{className:tt.dots,children:Array.from({length:T6},(g,v)=>h.jsx("span",{className:tt.dot,"data-active":v===d},v))})]})})}const A6="_root_h353j_1",j6="_body_h353j_7",N6="_main_h353j_19",w6="_sidebarWrapper_h353j_26",D6="_overlay_h353j_56",Ll={root:A6,body:j6,main:N6,sidebarWrapper:w6,overlay:D6},k6=typeof window<"u"&&new URLSearchParams(window.location.search).has("mock");function M6(){const{lastSpawnedId:n,environments:a,connected:i,onboardingCompleted:o}=It(),{showToast:r}=ao();$k(a,r);const d=Mn(),u=Qt(),p=u.pathname.startsWith(ki),[m,g]=S.useState(!1),v=S.useCallback(()=>g(y=>!y),[]);return S.useEffect(()=>{g(!1)},[u.pathname]),S.useEffect(()=>{if(!m)return;const y=_=>{_.key==="Escape"&&g(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[m]),S.useEffect(()=>{n&&!u.pathname.startsWith("/tasks/")&&d(P0(n),{replace:!0})},[n,d,u.pathname]),i&&!o?h.jsx(Di,{to:"/setup",replace:!0}):h.jsxs("div",{className:Ll.root,children:[h.jsx(eC,{onToggleSidebar:p?void 0:v,sidebarOpen:m}),h.jsxs("div",{className:Ll.body,children:[h.jsx("div",{className:Ll.sidebarWrapper,"data-sidebar-open":m,"data-settings":p,children:p?h.jsx(iB,{}):h.jsx(fk,{})}),m&&!p&&h.jsx("div",{className:Ll.overlay,"data-testid":"drawer-overlay",onClick:()=>g(!1)}),h.jsxs("div",{className:Ll.main,children:[h.jsx(I0,{}),h.jsx(kk,{})]})]}),h.jsx(Fk,{})]})}function R6(){return h.jsxs(ST,{children:[h.jsx(gt,{path:"setup",element:h.jsx(C6,{})}),h.jsxs(gt,{element:h.jsx(M6,{}),children:[h.jsx(gt,{index:!0,element:h.jsx(jR,{})}),h.jsx(gt,{path:"sessions/new",element:h.jsx(BR,{})}),h.jsx(gt,{path:"sessions/:sessionId",element:h.jsx(XR,{})}),h.jsx(gt,{path:"projects/:projectId",element:h.jsx(rO,{})}),h.jsx(gt,{path:"tasks/new",element:h.jsx(DO,{})}),h.jsx(gt,{path:"tasks/:taskId",element:h.jsx(Kd,{})}),h.jsx(gt,{path:"tasks/:taskId/stream",element:h.jsx(Kd,{})}),h.jsx(gt,{path:"tasks/:taskId/findings",element:h.jsx(Kd,{})}),h.jsx(gt,{path:"tasks/:taskId/edit",element:h.jsx(kO,{})}),h.jsx(gt,{path:"environments/new",element:h.jsx(ZO,{})}),h.jsxs(gt,{path:"settings",element:h.jsx(eB,{}),children:[h.jsx(gt,{index:!0,element:h.jsx(Di,{to:"environments",replace:!0})}),h.jsx(gt,{path:"environments",element:h.jsx(PB,{})}),h.jsx(gt,{path:"credentials",element:h.jsx(w4,{})}),h.jsx(gt,{path:"tokens",element:h.jsx(Di,{to:"../credentials",replace:!0})}),h.jsx(gt,{path:"personas",element:h.jsx(Q4,{})}),h.jsx(gt,{path:"appearance",element:h.jsx(W4,{})}),h.jsx(gt,{path:"about",element:h.jsx(t6,{})})]}),h.jsx(gt,{path:"*",element:h.jsx(Di,{to:"/",replace:!0})})]})]})}function O6(){const n=k6?UE:wE;return h.jsx(FE,{children:h.jsx(VE,{children:h.jsx(n,{children:h.jsx($T,{children:h.jsx(R6,{})})})})})}xx.createRoot(document.getElementById("root")).render(h.jsx(S.StrictMode,{children:h.jsx(O6,{})}));