codesesh 0.16.0 → 0.18.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.
Files changed (46) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-EWC6IODK.js → chunk-DHNP33L4.js} +23 -12
  3. package/dist/chunk-DHNP33L4.js.map +1 -0
  4. package/dist/{chunk-MWSJTNOW.js → chunk-HIYT2ZJL.js} +2091 -1261
  5. package/dist/chunk-HIYT2ZJL.js.map +1 -0
  6. package/dist/dist-DMGLFBW6.js +125 -0
  7. package/dist/index.js +1182 -785
  8. package/dist/index.js.map +1 -1
  9. package/dist/scan-refresh-worker.js +70 -64
  10. package/dist/scan-refresh-worker.js.map +1 -1
  11. package/dist/search-index-worker.js +73 -44
  12. package/dist/search-index-worker.js.map +1 -1
  13. package/dist/smart-tag-worker.js +2 -2
  14. package/dist/web/assets/AgentIcon-DcUJM198.js +1 -0
  15. package/dist/web/assets/BookmarkButton-CJjTjyae.js +1 -0
  16. package/dist/web/assets/Dashboard-wjTLT17d.js +39 -0
  17. package/dist/web/assets/DialogTitle-Bz0eXTGu.js +1 -0
  18. package/dist/web/assets/InteractiveReceipt-xnRqJvfd.js +1 -0
  19. package/dist/web/assets/PrismHighlighter-C7OfXHq2.js +6 -0
  20. package/dist/web/assets/Projects-DBxubQuM.js +1 -0
  21. package/dist/web/assets/SearchFilterBar-BG9ah_Po.js +1 -0
  22. package/dist/web/assets/SearchResultsPanel-Clmf2xKw.js +1 -0
  23. package/dist/web/assets/SessionDetail-CgR7ipmi.js +54 -0
  24. package/dist/web/assets/index-DR07vs5V.js +1890 -0
  25. package/dist/web/assets/{index-Bxe686Vr.css → index-DuB6tGoe.css} +1 -1
  26. package/dist/web/assets/index.dom-CCLJ9_FR.js +1 -0
  27. package/dist/web/assets/jsx-runtime-n5LQ9ujS.js +1 -0
  28. package/dist/web/assets/preload-helper-CmKXJxR3.js +1 -0
  29. package/dist/web/assets/session-indexes-EHJdYE4j.js +4 -0
  30. package/dist/web/assets/session-title-CNhapdPJ.js +1 -0
  31. package/dist/web/assets/useTheme-CwDcVdGz.js +1 -0
  32. package/dist/web/assets/utils-B6KiDbIe.js +1 -0
  33. package/dist/web/index.html +11 -7
  34. package/package.json +7 -12
  35. package/dist/chunk-EWC6IODK.js.map +0 -1
  36. package/dist/chunk-MWSJTNOW.js.map +0 -1
  37. package/dist/dist-AIDCOQZO.js +0 -237
  38. package/dist/web/assets/index-BpmbwB2_.js +0 -113
  39. package/dist/web/assets/markdown-dR4kAewZ.js +0 -14
  40. package/dist/web/assets/react-3acXkZNw.js +0 -1821
  41. package/dist/web/assets/rolldown-runtime-QTnfLwEv.js +0 -1
  42. package/dist/web/assets/syntax-mZXQuVcd.js +0 -6
  43. package/dist/web/assets/vendor-BVE7Fps8.js +0 -41
  44. package/dist/web/icon/agent/antigravity.svg +0 -1
  45. package/dist/web/icon/agent/kilocode.svg +0 -1
  46. /package/dist/{dist-AIDCOQZO.js.map → dist-DMGLFBW6.js.map} +0 -0
@@ -0,0 +1,1890 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-wjTLT17d.js","assets/jsx-runtime-n5LQ9ujS.js","assets/AgentIcon-DcUJM198.js","assets/preload-helper-CmKXJxR3.js","assets/session-indexes-EHJdYE4j.js","assets/session-title-CNhapdPJ.js","assets/BookmarkButton-CJjTjyae.js","assets/utils-B6KiDbIe.js","assets/Projects-DBxubQuM.js","assets/SessionDetail-CgR7ipmi.js","assets/DialogTitle-Bz0eXTGu.js","assets/index.dom-CCLJ9_FR.js","assets/SearchResultsPanel-Clmf2xKw.js","assets/SearchFilterBar-BG9ah_Po.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,n as t,r as n,t as r}from"./jsx-runtime-n5LQ9ujS.js";import{B as i,G as a,H as o,R as s,T as c,U as l,X as u,Y as d,a as f,c as p,h as m,i as h,l as g,n as _,o as v,rt as y,t as b,z as x}from"./AgentIcon-DcUJM198.js";import{_ as S,c as C,d as w,f as T,g as E,h as D,i as O,l as k,n as A,p as j,r as M,s as N,t as P,u as F}from"./preload-helper-CmKXJxR3.js";import{$ as I,$t as L,A as ee,An as te,At as R,B as z,Bn as B,Bt as V,C as ne,Cn as re,Ct as ie,D as H,Dn as ae,Dt as oe,E as se,En as ce,Et as le,F as ue,Fn as de,Ft as fe,G as pe,Gt as me,H as U,Hn as he,Ht as ge,I as _e,In as ve,It as ye,J as be,Jt as xe,K as Se,Kt as Ce,L as we,Ln as Te,Lt as Ee,M as De,Mn as Oe,Mt as W,N as ke,Nn as Ae,Nt as je,O as Me,On as Ne,Ot as Pe,P as Fe,Pn as Ie,Q as Le,Qt as Re,R as ze,Rn as Be,Rt as Ve,S as He,Sn as Ue,St as We,T as Ge,Tn as Ke,Tt as qe,U as Je,Ut as Ye,V as G,Vn as Xe,Vt as Ze,W as Qe,Wt as $e,X as et,Xt as tt,Y as nt,Yt as rt,Z as it,Zt as at,_ as ot,_n as st,_t as ct,a as lt,an as ut,at as dt,b as ft,bn as pt,bt as mt,c as ht,cn as gt,ct as _t,d as vt,dn as yt,dt as bt,en as xt,et as St,f as Ct,fn as wt,ft as Tt,g as Et,gn as Dt,gt as Ot,h as kt,hn as At,ht as jt,i as Mt,in as Nt,it as Pt,j as Ft,jn as It,jt as Lt,k as Rt,kn as zt,kt as Bt,l as Vt,ln as Ht,lt as Ut,m as Wt,mn as Gt,mt as Kt,n as qt,nn as Jt,nt as Yt,o as Xt,on as Zt,ot as Qt,p as $t,pn as en,pt as tn,q as nn,qt as rn,r as an,rn as on,rt as sn,s as cn,sn as ln,st as un,t as dn,tn as fn,tt as pn,u as mn,un as hn,ut as gn,v as _n,vn,vt as yn,w as bn,wn as xn,wt as Sn,x as Cn,xn as wn,xt as Tn,y as En,yn as Dn,yt as On,z as kn,zn as An}from"./DialogTitle-Bz0eXTGu.js";import{a as jn,c as Mn,d as Nn,f as Pn,h as Fn,i as In,l as Ln,m as Rn,n as zn,o as Bn,p as Vn,r as Hn,s as Un,t as Wn,u as Gn}from"./session-indexes-EHJdYE4j.js";import{r as Kn,t as qn}from"./session-title-CNhapdPJ.js";import{t as Jn}from"./SearchFilterBar-BG9ah_Po.js";import{a as Yn,i as Xn,n as Zn,o as Qn,r as $n,t as er}from"./BookmarkButton-CJjTjyae.js";import{n as tr,t as nr}from"./useTheme-CwDcVdGz.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var rr=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ir=n(((e,t)=>{t.exports=rr()})),ar=n((e=>{var n=ir(),r=t(),i=y();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function N(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case b:return`Profiler`;case v:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?N(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return N(e(t))}catch{}}return null}var P=Array.isArray,F=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},ee=[],te=-1;function R(e){return{current:e}}function z(e){0>te||(e.current=ee[te],ee[te]=null,te--)}function B(e,t){te++,ee[te]=e.current,e.current=t}var V=R(null),ne=R(null),re=R(null),ie=R(null);function H(e,t){switch(B(re,t),B(ne,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(V),B(V,e)}function ae(){z(V),z(ne),z(re)}function oe(e){e.memoizedState!==null&&B(ie,e);var t=V.current,n=qd(t,e.type);t!==n&&(B(ne,e),B(V,n))}function se(e){ne.current===e&&(z(V),z(ne)),ie.current===e&&(z(ie),tp._currentValue=L)}var ce,le;function ue(e){if(ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ce=t&&t[1]||``,le=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+ce+e+le}var de=!1;function fe(e,t){if(!e||de)return``;de=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{de=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ue(n):``}function pe(e,t){switch(e.tag){case 26:case 27:case 5:return ue(e.type);case 16:return ue(`Lazy`);case 13:return e.child!==t&&t!==null?ue(`Suspense Fallback`):ue(`Suspense`);case 19:return ue(`SuspenseList`);case 0:case 15:return fe(e.type,!1);case 11:return fe(e.type.render,!1);case 1:return fe(e.type,!0);case 31:return ue(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var U=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,ge=n.unstable_cancelCallback,_e=n.unstable_shouldYield,ve=n.unstable_requestPaint,ye=n.unstable_now,be=n.unstable_getCurrentPriorityLevel,xe=n.unstable_ImmediatePriority,Se=n.unstable_UserBlockingPriority,Ce=n.unstable_NormalPriority,we=n.unstable_LowPriority,Te=n.unstable_IdlePriority,Ee=n.log,De=n.unstable_setDisableYieldValue,Oe=null,W=null;function ke(e){if(typeof Ee==`function`&&De(e),W&&typeof W.setStrictMode==`function`)try{W.setStrictMode(Oe,e)}catch{}}var Ae=Math.clz32?Math.clz32:Ne,je=Math.log,Me=Math.LN2;function Ne(e){return e>>>=0,e===0?32:31-(je(e)/Me|0)|0}var Pe=256,Fe=262144,Ie=4194304;function Le(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 Re(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Le(n))):i=Le(o):i=Le(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Le(n))):i=Le(o)):i=Le(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Be(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 Ve(){var e=Ie;return Ie<<=1,!(Ie&62914560)&&(Ie=4194304),e}function He(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ue(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function We(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ae(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ge(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ge(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ae(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ke(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ae(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function qe(e,t){var n=t&-t;return n=n&42?1:Je(n),(n&(e.suspendedLanes|t))===0?n:0}function Je(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 Ye(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function G(){var e=I.p;return e===0?(e=window.event,e===void 0?32:_p(e.type)):e}function Xe(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var Ze=Math.random().toString(36).slice(2),Qe=`__reactFiber$`+Ze,$e=`__reactProps$`+Ze,et=`__reactContainer$`+Ze,tt=`__reactEvents$`+Ze,nt=`__reactListeners$`+Ze,rt=`__reactHandles$`+Ze,it=`__reactResources$`+Ze,at=`__reactMarker$`+Ze;function ot(e){delete e[Qe],delete e[$e],delete e[tt],delete e[nt],delete e[rt]}function st(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[et]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mf(e);e!==null;){if(n=e[Qe])return n;e=mf(e)}return t}e=n,n=e.parentNode}return null}function ct(e){if(e=e[Qe]||e[et]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function lt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function ut(e){var t=e[it];return t||=e[it]={hoistableStyles:new Map,hoistableScripts:new Map},t}function dt(e){e[at]=!0}var ft=new Set,pt={};function mt(e,t){ht(e,t),ht(e+`Capture`,t)}function ht(e,t){for(pt[e]=t,e=0;e<t.length;e++)ft.add(t[e])}var gt=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]*$`),_t={},vt={};function yt(e){return U.call(vt,e)?!0:U.call(_t,e)?!1:gt.test(e)?vt[e]=!0:(_t[e]=!0,!1)}function bt(e,t,n){if(yt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function xt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function St(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function wt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Tt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Et(e){if(!e._valueTracker){var t=wt(e)?`checked`:`value`;e._valueTracker=Tt(e,t,``+e[t])}}function Dt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=wt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Ot(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var kt=/[\n"\\]/g;function At(e){return e.replace(kt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function jt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ct(t)):e.value!==``+Ct(t)&&(e.value=``+Ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Nt(e,o,Ct(n)):Nt(e,o,Ct(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ct(s):e.removeAttribute(`name`)}function Mt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Et(e);return}n=n==null?``:``+Ct(n),t=t==null?n:``+Ct(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Et(e)}function Nt(e,t,n){t===`number`&&Ot(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Pt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ct(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ft(e,t,n){if(t!=null&&(t=``+Ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ct(n)}function It(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(P(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Et(e)}function Lt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rt=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 zt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Rt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Bt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&zt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&zt(e,o,t[o])}function Vt(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 Ht=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`]]),Ut=/^[\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 Wt(e){return Ut.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Gt(){}var Kt=null;function qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jt=null,Yt=null;function Xt(e){var t=ct(e);if(t&&(e=t.stateNode)){var n=e[$e]||null;a:switch(e=t.stateNode,t.type){case`input`:if(jt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+At(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[$e]||null;if(!i)throw Error(a(90));jt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Dt(r)}break a;case`textarea`:Ft(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Pt(e,!!n.multiple,t,!1)}}}var Zt=!1;function Qt(e,t,n){if(Zt)return e(t,n);Zt=!0;try{return e(t)}finally{if(Zt=!1,(Jt!==null||Yt!==null)&&(Su(),Jt&&(t=Jt,e=Yt,Yt=Jt=null,Xt(t),e)))for(t=0;t<e.length;t++)Xt(e[t])}}function $t(e,t){var n=e.stateNode;if(n===null)return null;var r=n[$e]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var en=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),tn=!1;if(en)try{var nn={};Object.defineProperty(nn,"passive",{get:function(){tn=!0}}),window.addEventListener(`test`,nn,nn),window.removeEventListener(`test`,nn,nn)}catch{tn=!1}var rn=null,an=null,on=null;function sn(){if(on)return on;var e,t=an,n=t.length,r,i=`value`in rn?rn.value:rn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return on=i.slice(e,1<r?1-r:void 0)}function cn(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 ln(){return!0}function un(){return!1}function dn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?ln:un,this.isPropagationStopped=un,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=ln)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=ln)},persist:function(){},isPersistent:ln}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pn=dn(fn),mn=p({},fn,{view:0,detail:0}),hn=dn(mn),gn,_n,vn,yn=p({},mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,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!==vn&&(vn&&e.type===`mousemove`?(gn=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=gn=0,vn=e),gn)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=dn(yn),xn=dn(p({},yn,{dataTransfer:0})),Sn=dn(p({},mn,{relatedTarget:0})),Cn=dn(p({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=dn(p({},fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=dn(p({},fn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={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`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=dn(p({},mn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=cn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?cn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?cn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=dn(p({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=dn(p({},mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=dn(p({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=dn(p({},yn,{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})),In=dn(p({},fn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=en&&`CompositionEvent`in window,zn=null;en&&`documentMode`in document&&(zn=document.documentMode);var Bn=en&&`TextEvent`in window&&!zn,Vn=en&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=sn(),on=an=rn=null,Kn=!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 Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Jt?Yt?Yt.push(r):Yt=[r]:Jt=r,t=Ad(t,`onChange`),0<t.length&&(n=new pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,$n=null;function er(e){Sd(e,0)}function tr(e){if(Dt(lt(e)))return e}function nr(e,t){if(e===`change`)return t}var rr=!1;if(en){var ar;if(en){var or=`oninput`in document;if(!or){var sr=document.createElement(`div`);sr.setAttribute(`oninput`,`return;`),or=typeof sr.oninput==`function`}ar=or}else ar=!1;rr=ar&&(!document.documentMode||9<document.documentMode)}function cr(){Qn&&(Qn.detachEvent(`onpropertychange`,lr),$n=Qn=null)}function lr(e){if(e.propertyName===`value`&&tr($n)){var t=[];Zn(t,$n,e,qt(e)),Qt(er,t)}}function ur(e,t,n){e===`focusin`?(cr(),Qn=t,$n=n,Qn.attachEvent(`onpropertychange`,lr)):e===`focusout`&&cr()}function dr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return tr($n)}function fr(e,t){if(e===`click`)return tr(t)}function pr(e,t){if(e===`input`||e===`change`)return tr(t)}function mr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var hr=typeof Object.is==`function`?Object.is:mr;function gr(e,t){if(hr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!U.call(t,i)||!hr(e[i],t[i]))return!1}return!0}function _r(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vr(e,t){var n=_r(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=_r(n)}}function yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ot(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ot(e.document)}return t}function xr(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 Sr=en&&`documentMode`in document&&11>=document.documentMode,Cr=null,wr=null,Tr=null,Er=!1;function Dr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Er||Cr==null||Cr!==Ot(r)||(r=Cr,`selectionStart`in r&&xr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tr&&gr(Tr,r)||(Tr=r,r=Ad(wr,`onSelect`),0<r.length&&(t=new pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Cr)))}function Or(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var kr={animationend:Or(`Animation`,`AnimationEnd`),animationiteration:Or(`Animation`,`AnimationIteration`),animationstart:Or(`Animation`,`AnimationStart`),transitionrun:Or(`Transition`,`TransitionRun`),transitionstart:Or(`Transition`,`TransitionStart`),transitioncancel:Or(`Transition`,`TransitionCancel`),transitionend:Or(`Transition`,`TransitionEnd`)},Ar={},jr={};en&&(jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),`TransitionEvent`in window||delete kr.transitionend.transition);function Mr(e){if(Ar[e])return Ar[e];if(!kr[e])return e;var t=kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jr)return Ar[e]=t[n];return e}var Nr=Mr(`animationend`),Pr=Mr(`animationiteration`),Fr=Mr(`animationstart`),Ir=Mr(`transitionrun`),Lr=Mr(`transitionstart`),Rr=Mr(`transitioncancel`),zr=Mr(`transitionend`),Br=new Map,Vr=`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(` `);Vr.push(`scrollEnd`);function Hr(e,t){Br.set(e,t),mt(t,[e])}var Ur=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&&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)},Wr=[],Gr=0,Kr=0;function qr(){for(var e=Gr,t=Kr=Gr=0;t<e;){var n=Wr[t];Wr[t++]=null;var r=Wr[t];Wr[t++]=null;var i=Wr[t];Wr[t++]=null;var a=Wr[t];if(Wr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Zr(n,i,a)}}function Jr(e,t,n,r){Wr[Gr++]=e,Wr[Gr++]=t,Wr[Gr++]=n,Wr[Gr++]=r,Kr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Yr(e,t,n,r){return Jr(e,t,n,r),Qr(e)}function Xr(e,t){return Jr(e,null,null,t),Qr(e)}function Zr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ae(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Qr(e){if(50<pu)throw pu=0,mu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $r={};function ei(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(e,t,n,r){return new ei(e,t,n,r)}function ni(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ri(e,t){var n=e.alternate;return n===null?(n=ti(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ii(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ai(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)ni(e)&&(s=1);else if(typeof e==`string`)s=Kf(e,n,V.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=ti(31,n,t,i),e.elementType=O,e.lanes=o,e;case _:return oi(n.children,i,o,t);case v:s=8,i|=24;break;case b:return e=ti(12,n,t,i|2),e.elementType=b,e.lanes=o,e;case w:return e=ti(13,n,t,i),e.elementType=w,e.lanes=o,e;case T:return e=ti(19,n,t,i),e.elementType=T,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case C:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=ti(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function oi(e,t,n,r){return e=ti(7,e,r,t),e.lanes=n,e}function si(e,t,n){return e=ti(6,e,null,t),e.lanes=n,e}function ci(e){var t=ti(18,null,null,0);return t.stateNode=e,t}function li(e,t,n){return t=ti(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ui=new WeakMap;function di(e,t){if(typeof e==`object`&&e){var n=ui.get(e);return n===void 0?(t={value:e,source:t,stack:me(t)},ui.set(e,t),t):n}return{value:e,source:t,stack:me(t)}}var fi=[],pi=0,mi=null,hi=0,gi=[],K=0,q=null,_i=1,vi=``;function yi(e,t){fi[pi++]=hi,fi[pi++]=mi,mi=e,hi=t}function bi(e,t,n){gi[K++]=_i,gi[K++]=vi,gi[K++]=q,q=e;var r=_i;e=vi;var i=32-Ae(r)-1;r&=~(1<<i),n+=1;var a=32-Ae(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,_i=1<<32-Ae(t)+i|n<<i|r,vi=a+e}else _i=1<<a|n<<i|r,vi=e}function xi(e){e.return!==null&&(yi(e,1),bi(e,1,0))}function Si(e){for(;e===mi;)mi=fi[--pi],fi[pi]=null,hi=fi[--pi],fi[pi]=null;for(;e===q;)q=gi[--K],gi[K]=null,vi=gi[--K],gi[K]=null,_i=gi[--K],gi[K]=null}function Ci(e,t){gi[K++]=_i,gi[K++]=vi,gi[K++]=q,_i=t.id,vi=t.overflow,q=e}var wi=null,Ti=null,Ei=!1,Di=null,Oi=!1,ki=Error(a(519));function Ai(e){throw Ii(di(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ki}function ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Qe]=e,t[$e]=r,n){case`dialog`:Cd(`cancel`,t),Cd(`close`,t);break;case`iframe`:case`object`:case`embed`:Cd(`load`,t);break;case`video`:case`audio`:for(n=0;n<bd.length;n++)Cd(bd[n],t);break;case`source`:Cd(`error`,t);break;case`img`:case`image`:case`link`:Cd(`error`,t),Cd(`load`,t);break;case`details`:Cd(`toggle`,t);break;case`input`:Cd(`invalid`,t),Mt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Cd(`invalid`,t);break;case`textarea`:Cd(`invalid`,t),It(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(Cd(`beforetoggle`,t),Cd(`toggle`,t)),r.onScroll!=null&&Cd(`scroll`,t),r.onScrollEnd!=null&&Cd(`scrollend`,t),r.onClick!=null&&(t.onclick=Gt),t=!0):t=!1,t||Ai(e,!0)}function Mi(e){for(wi=e.return;wi;)switch(wi.tag){case 5:case 31:case 13:Oi=!1;return;case 27:case 3:Oi=!0;return;default:wi=wi.return}}function Ni(e){if(e!==wi)return!1;if(!Ei)return Mi(e),Ei=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Ti&&Ai(e),Mi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ti=pf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ti=pf(e)}else t===27?(t=Ti,nf(e.type)?(e=ff,ff=null,Ti=e):Ti=t):Ti=wi?X(e.stateNode.nextSibling):null;return!0}function Pi(){Ti=wi=null,Ei=!1}function Fi(){var e=Di;return e!==null&&($l===null?$l=e:$l.push.apply($l,e),Di=null),e}function Ii(e){Di===null?Di=[e]:Di.push(e)}var Li=R(null),Ri=null,zi=null;function Bi(e,t,n){B(Li,t._currentValue),t._currentValue=n}function Vi(e){e._currentValue=Li.current,z(Li)}function Hi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ui(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Hi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Hi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function Wi(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;hr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===ie.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[tp]:e.push(tp))}i=i.return}e!==null&&Ui(t,e,n,r),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!hr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ki(e){Ri=e,zi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qi(e){return Yi(Ri,e)}function Ji(e,t){return Ri===null&&Ki(e),Yi(e,t)}function Yi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zi===null){if(e===null)throw Error(a(308));zi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zi=zi.next=t;return n}var Xi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Zi=n.unstable_scheduleCallback,Qi=n.unstable_NormalPriority,$i={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ea(){return{controller:new Xi,data:new Map,refCount:0}}function ta(e){e.refCount--,e.refCount===0&&Zi(Qi,function(){e.controller.abort()})}var na=null,ra=0,ia=0,aa=null;function oa(e,t){if(na===null){var n=na=[];ra=0,ia=md(),aa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ra++,t.then(sa,sa),t}function sa(){if(--ra===0&&na!==null){aa!==null&&(aa.status=`fulfilled`);var e=na;na=null,ia=0,aa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var la=F.S;F.S=function(e,t){nu=ye(),typeof t==`object`&&t&&typeof t.then==`function`&&oa(e,t),la!==null&&la(e,t)};var ua=R(null);function da(){var e=ua.current;return e===null?Ll.pooledCache:e}function fa(e,t){t===null?B(ua,ua.current):B(ua,t.pool)}function pa(){var e=da();return e===null?null:{parent:$i._currentValue,pool:e}}var ma=Error(a(460)),ha=Error(a(474)),ga=Error(a(542)),_a={then:function(){}};function va(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Gt,Gt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e;default:if(typeof t.status==`string`)t.then(Gt,Gt);else{if(e=Ll,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ca(e),e}throw xa=t,ma}}function ba(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(xa=e,ma):e}}var xa=null;function Sa(){if(xa===null)throw Error(a(459));var e=xa;return xa=null,e}function Ca(e){if(e===ma||e===ga)throw Error(a(483))}var wa=null,Ta=0;function Ea(e){var t=Ta;return Ta+=1,wa===null&&(wa=[]),ya(wa,e,t)}function Da(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Oa(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ka(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=ri(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=si(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&ba(a)===t.type)?(t=i(t,n.props),Da(t,n),t.return=e,t):(t=ai(n.type,n.key,n.props,null,e.mode,r),Da(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=li(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=oi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=si(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ai(t.type,t.key,t.props,null,e.mode,n),Da(n,t),n.return=e,n;case g:return t=li(t,e.mode,n),t.return=e,t;case D:return t=ba(t),f(e,t,n)}if(P(t)||j(t))return t=oi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ea(t),n);if(t.$$typeof===S)return f(e,Ji(e,t),n);Oa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case D:return n=ba(n),p(e,t,n,r)}if(P(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ea(n),r);if(n.$$typeof===S)return p(e,t,Ji(e,n),r);Oa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=ba(r),m(e,t,n,r,i)}if(P(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ea(r),i);if(r.$$typeof===S)return m(e,t,n,Ji(t,r),i);Oa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ei&&yi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ei&&yi(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ei&&yi(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ei&&yi(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&ba(l)===r.type){n(e,r.sibling),c=i(r,o.props),Da(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=oi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ai(o.type,o.key,o.props,null,e.mode,c),Da(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=li(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=ba(o),b(e,r,o,c)}if(P(o))return v(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ea(o),c);if(o.$$typeof===S)return b(e,r,Ji(e,o),c);Oa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=si(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ta=0;var i=b(e,t,n,r);return wa=null,i}catch(t){if(t===ma||t===ga)throw t;var a=ti(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Aa=ka(!0),ja=ka(!1),Ma=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(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 Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Qr(e),Zr(e,null,n),t}return Jr(e,r,t,n),Qr(e)}function La(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}function Ra(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var za=!1;function Ba(){if(za){var e=aa;if(e!==null)throw e}}function Va(e,t,n,r){za=!1;var i=e.updateQueue;Ma=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(zl&f)===f:(r&f)===f){f!==0&&f===ia&&(za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ma=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ql|=o,e.lanes=o,e.memoizedState=d}}function Ha(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ua(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ha(n[e],t)}var Wa=R(null),Ga=R(0);function Ka(e,t){e=Gl,B(Ga,e),B(Wa,t),Gl=e|t.baseLanes}function qa(){B(Ga,Gl),B(Wa,Wa.current)}function Ja(){Gl=Ga.current,z(Wa),z(Ga)}var Ya=R(null),Xa=null;function Za(e){var t=e.alternate;B(no,no.current&1),B(Ya,e),Xa===null&&(t===null||Wa.current!==null||t.memoizedState!==null)&&(Xa=e)}function Qa(e){B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)}function $a(e){e.tag===22?(B(no,no.current),B(Ya,e),Xa===null&&(Xa=e)):eo(e)}function eo(){B(no,no.current),B(Ya,Ya.current)}function to(e){z(Ya),Xa===e&&(Xa=null),z(no)}var no=R(0);function ro(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lf(n)||uf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 io=0,J=null,ao=null,oo=null,so=!1,co=!1,lo=!1,uo=0,fo=0,po=null,mo=0;function ho(){throw Error(a(321))}function go(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hr(e[n],t[n]))return!1;return!0}function _o(e,t,n,r,i,a){return io=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=e===null||e.memoizedState===null?Ps:Fs,lo=!1,a=n(r,i),lo=!1,co&&(a=yo(t,n,r,i)),vo(e),a}function vo(e){F.H=Ns;var t=ao!==null&&ao.next!==null;if(io=0,oo=ao=J=null,so=!1,fo=0,po=null,t)throw Error(a(300));e===null||Qs||(e=e.dependencies,e!==null&&Gi(e)&&(Qs=!0))}function yo(e,t,n,r){J=e;var i=0;do{if(co&&(po=null),fo=0,co=!1,25<=i)throw Error(a(301));if(i+=1,oo=ao=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}F.H=Is,o=t(n,r)}while(co);return o}function bo(){var e=F.H,t=e.useState()[0];return t=typeof t.then==`function`?Do(t):t,e=e.useState()[0],(ao===null?null:ao.memoizedState)!==e&&(J.flags|=1024),t}function xo(){var e=uo!==0;return uo=0,e}function So(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Co(e){if(so){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}so=!1}io=0,oo=ao=J=null,co=!1,fo=uo=0,po=null}function wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oo===null?J.memoizedState=oo=e:oo=oo.next=e,oo}function To(){if(ao===null){var e=J.alternate;e=e===null?null:e.memoizedState}else e=ao.next;var t=oo===null?J.memoizedState:oo.next;if(t!==null)oo=t,ao=e;else{if(e===null)throw J.alternate===null?Error(a(467)):Error(a(310));ao=e,e={memoizedState:ao.memoizedState,baseState:ao.baseState,baseQueue:ao.baseQueue,queue:ao.queue,next:null},oo===null?J.memoizedState=oo=e:oo=oo.next=e}return oo}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Do(e){var t=fo;return fo+=1,po===null&&(po=[]),e=ya(po,e,t),t=J,(oo===null?t.memoizedState:oo.next)===null&&(t=t.alternate,F.H=t===null||t.memoizedState===null?Ps:Fs),e}function Oo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Do(e);if(e.$$typeof===S)return qi(e)}throw Error(a(438,String(e)))}function ko(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=J.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Eo(),J.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Ao(e,t){return typeof t==`function`?t(e):t}function jo(e){return Mo(To(),ao,e)}function Mo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(io&f)===f:(zl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ia&&(d=!0);else if((io&p)===p){u=u.next,p===ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,J.lanes|=p,ql|=p;f=u.action,lo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,J.lanes|=f,ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!hr(o,e.memoizedState)&&(Qs=!0,d&&(n=aa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function No(e){var t=To(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);hr(o,t.memoizedState)||(Qs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Po(e,t,n){var r=J,i=To(),o=Ei;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!hr((ao||i).memoizedState,n);if(s&&(i.memoizedState=n,Qs=!0),i=i.queue,as(Lo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||oo!==null&&oo.memoizedState.tag&1){if(r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,i,n,t),null),Ll===null)throw Error(a(349));o||io&127||Fo(r,t,n)}return n}function Fo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=Eo(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Io(e,t,n,r){t.value=n,t.getSnapshot=r,Ro(t)&&zo(e)}function Lo(e,t,n){return n(function(){Ro(t)&&zo(e)})}function Ro(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hr(e,n)}catch{return!0}}function zo(e){var t=Xr(e,2);t!==null&&_u(t,e,2)}function Bo(e){var t=wo();if(typeof e==`function`){var n=e;if(e=n(),lo){ke(!0);try{n()}finally{ke(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t}function Vo(e,t,n,r){return e.baseState=n,Mo(e,ao,typeof r==`function`?r:Ao)}function Ho(e,t,n,r,i){if(As(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};F.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Uo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Uo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=F.T,o={};F.T=o;try{var s=n(i,r),c=F.S;c!==null&&c(o,s),Wo(e,t,s)}catch(n){Ko(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),F.T=a}}else try{a=n(i,r),Wo(e,t,a)}catch(n){Ko(e,t,n)}}function Wo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Go(e,t,n)},function(n){return Ko(e,t,n)}):Go(e,t,n)}function Go(e,t,n){t.status=`fulfilled`,t.value=n,qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uo(e,n)))}function Ko(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,qo(t),t=t.next;while(t!==r)}e.action=null}function qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Yo(e,t){if(Ei){var n=Ll.formState;if(n!==null){a:{var r=J;if(Ei){if(Ti){b:{for(var i=Ti,a=Oi;i.nodeType!==8;){if(!a){i=null;break b}if(i=X(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ti=X(i.nextSibling),r=i.data===`F!`;break a}}Ai(r)}r=!1}r&&(t=n[0])}}return n=wo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},n.queue=r,n=Ds.bind(null,J,r),r.dispatch=n,r=Bo(!1),a=ks.bind(null,J,!1,r.queue),r=wo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ho.bind(null,J,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xo(e){return Zo(To(),ao,e)}function Zo(e,t,n){if(t=Mo(e,t,Jo)[0],e=jo(Ao)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Do(t)}catch(e){throw e===ma?ga:e}else r=t;t=To();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(J.flags|=2048,es(9,{destroy:void 0},Qo.bind(null,i,n),null)),[r,a,e]}function Qo(e,t){e.action=t}function $o(e){var t=To(),n=ao;if(n!==null)return Zo(t,n,e);To(),t=t.memoizedState,n=To();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function es(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=J.updateQueue,t===null&&(t=Eo(),J.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ts(){return To().memoizedState}function ns(e,t,n,r){var i=wo();J.flags|=e,i.memoizedState=es(1|t,{destroy:void 0},n,r===void 0?null:r)}function rs(e,t,n,r){var i=To();r=r===void 0?null:r;var a=i.memoizedState.inst;ao!==null&&r!==null&&go(r,ao.memoizedState.deps)?i.memoizedState=es(t,a,n,r):(J.flags|=e,i.memoizedState=es(1|t,a,n,r))}function is(e,t){ns(8390656,8,e,t)}function as(e,t){rs(2048,8,e,t)}function os(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=Eo(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ss(e){var t=To().memoizedState;return os({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function cs(e,t){return rs(4,2,e,t)}function ls(e,t){return rs(4,4,e,t)}function us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ds(e,t,n){n=n==null?null:n.concat([e]),rs(4,4,us.bind(null,t,e),n)}function fs(){}function ps(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&go(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ms(e,t){var n=To();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&go(t,r[1]))return r[0];if(r=e(),lo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r}function hs(e,t,n){return n===void 0||io&1073741824&&!(zl&261930)?e.memoizedState=t:(e.memoizedState=n,e=gu(),J.lanes|=e,ql|=e,n)}function gs(e,t,n,r){return hr(n,t)?n:Wa.current===null?!(io&42)||io&1073741824&&!(zl&261930)?(Qs=!0,e.memoizedState=n):(e=gu(),J.lanes|=e,ql|=e,t):(e=hs(e,n,r),hr(e,t)||(Qs=!0),e)}function _s(e,t,n,r,i){var a=I.p;I.p=a!==0&&8>a?a:8;var o=F.T,s={};F.T=s,ks(e,!1,t,n);try{var c=i(),l=F.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,ca(c,r),hu(e)):Os(e,t,r,hu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},hu())}finally{I.p=a,o!==null&&s.types!==null&&(o.types=s.types),F.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=bs(e).queue;_s(e,i,t,L,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},hu())}function Ss(){return qi(tp)}function Cs(){return To().memoizedState}function ws(){return To().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hu();e=Fa(n);var r=Ia(t,e,n);r!==null&&(_u(r,t,n),La(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=hu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=Yr(e,t,n,r),n!==null&&(_u(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,hu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,hr(s,o))return Jr(e,t,i,0),Ll===null&&qr(),!1}catch{}if(n=Yr(e,t,i,r),n!==null)return _u(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:md(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(a(479))}else t=Yr(e,n,r,2),t!==null&&_u(t,e,2)}function As(e){var t=e.alternate;return e===J||t!==null&&t===J}function js(e,t){co=so=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ke(e,n)}}var Ns={readContext:qi,use:Oo,useCallback:ho,useContext:ho,useEffect:ho,useImperativeHandle:ho,useLayoutEffect:ho,useInsertionEffect:ho,useMemo:ho,useReducer:ho,useRef:ho,useState:ho,useDebugValue:ho,useDeferredValue:ho,useTransition:ho,useSyncExternalStore:ho,useId:ho,useHostTransitionStatus:ho,useFormState:ho,useActionState:ho,useOptimistic:ho,useMemoCache:ho,useCacheRefresh:ho};Ns.useEffectEvent=ho;var Ps={readContext:qi,use:Oo,useCallback:function(e,t){return wo().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ns(4194308,4,us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var n=wo();t=t===void 0?null:t;var r=e();if(lo){ke(!0);try{e()}finally{ke(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=wo();if(n!==void 0){var i=n(t);if(lo){ke(!0);try{n(t)}finally{ke(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=wo();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(wo(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,J,e.queue,!0,!1),wo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=J,i=wo();if(Ei){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ll===null)throw Error(a(349));zl&127||Fo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,is(Lo.bind(null,r,o,e),[e]),r.flags|=2048,es(9,{destroy:void 0},Io.bind(null,r,o,n,t),null),n},useId:function(){var e=wo(),t=Ll.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Ae(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=mo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ss,useFormState:Yo,useActionState:Yo,useOptimistic:function(e){var t=wo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ks.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:ko,useCacheRefresh:function(){return wo().memoizedState=Ts.bind(null,J)},useEffectEvent:function(e){var t=wo(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:qi,use:Oo,useCallback:ps,useContext:qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:jo,useRef:ts,useState:function(){return jo(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){return gs(To(),ao.memoizedState,e,t)},useTransition:function(){var e=jo(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:Xo,useActionState:Xo,useOptimistic:function(e,t){return Vo(To(),ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Fs.useEffectEvent=ss;var Is={readContext:qi,use:Oo,useCallback:ps,useContext:qi,useEffect:as,useImperativeHandle:ds,useInsertionEffect:cs,useLayoutEffect:ls,useMemo:ms,useReducer:No,useRef:ts,useState:function(){return No(Ao)},useDebugValue:fs,useDeferredValue:function(e,t){var n=To();return ao===null?hs(n,e,t):gs(n,ao.memoizedState,e,t)},useTransition:function(){var e=No(Ao)[0],t=To().memoizedState;return[typeof e==`boolean`?e:Do(e),t]},useSyncExternalStore:Po,useId:Cs,useHostTransitionStatus:Ss,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){var n=To();return ao===null?(n.baseState=e,[e,n.queue.dispatch]):Vo(n,ao,e,t)},useMemoCache:ko,useCacheRefresh:ws};Is.useEffectEvent=ss;function Ls(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=hu(),i=Fa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ia(e,i,r),t!==null&&(_u(t,e,r),La(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hu(),r=Fa(n);r.tag=2,t!=null&&(r.callback=t),t=Ia(e,r,n),t!==null&&(_u(t,e,n),La(t,e,n))}};function zs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!gr(n,r)||!gr(i,a):!0}function Bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Rs.enqueueReplaceState(t,t.state,null)}function Vs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Hs(e){Ur(e)}function Us(e){console.error(e)}function Ws(e){Ur(e)}function Gs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ks(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function qs(e,t,n){return n=Fa(n),n.tag=3,n.payload={element:null},n.callback=function(){Gs(e,t)},n}function Js(e){return e=Fa(e),e.tag=3,e}function Ys(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ks(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ks(t,n,r),typeof i!=`function`&&(au===null?au=new Set([this]):au.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Xs(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Wi(t,n,i,!0),n=Ya.current,n!==null){switch(n.tag){case 31:case 13:return Xa===null?ku():n.alternate===null&&Kl===0&&(Kl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Ju(e,r,i)),!1;case 22:return n.flags|=65536,r===_a?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Ju(e,r,i)),!1}throw Error(a(435,n.tag))}return Ju(e,r,i),ku(),!1}if(Ei)return t=Ya.current,t===null?(r!==ki&&(t=Error(a(423),{cause:r}),Ii(di(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=di(r,n),i=qs(e.stateNode,r,i),Ra(e,i),Kl!==4&&(Kl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==ki&&(e=Error(a(422),{cause:r}),Ii(di(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=di(o,n),Ql===null?Ql=[o]:Ql.push(o),Kl!==4&&(Kl=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=qs(n.stateNode,r,e),Ra(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(au===null||!au.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Js(i),Ys(i,e,n,r),Ra(n,i),!1}n=n.return}while(n!==null);return!1}var Zs=Error(a(461)),Qs=!1;function $s(e,t,n,r){t.child=e===null?ja(t,null,n,r):Aa(t,e.child,n,r)}function ec(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ki(t),r=_o(e,t,n,o,a,i),s=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Ei&&s&&xi(t),t.flags|=1,$s(e,t,r,i),t.child)}function tc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ni(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nc(e,t,a,r,i)):(e=ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Tc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?gr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=ri(a,r),e.ref=t.ref,e.return=t,t.child=e}function nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(gr(a,r)&&e.ref===t.ref)if(Qs=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(Qs=!0);else return t.lanes=e.lanes,wc(e,t,i)}return uc(e,t,n,r,i)}function rc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ac(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?qa():Ka(t,a),$a(t);else return r=t.lanes=536870912,ac(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),qa(),eo(t)):(fa(t,a.cachePool),Ka(t,a),eo(t),t.memoizedState=null);return $s(e,t,i,n),t.child}function ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ac(e,t,n,r,i){var a=da();return a=a===null?null:{parent:$i._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),qa(),$a(t),e!==null&&Wi(e,t,r,!0),t.childLanes=i,null}function oc(e,t){return t=yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sc(e,t,n){return Aa(t,e.child,null,n),e=oc(t,t.pendingProps),e.flags|=2,to(t),t.memoizedState=null,e}function cc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ei){if(r.mode===`hidden`)return e=oc(t,r),t.lanes=536870912,ic(null,e);if(Qa(t),(e=Ti)?(e=cf(e,Oi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:q===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return oc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Qa(t),i)if(t.flags&256)t.flags&=-257,t=sc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(Qs||Wi(e,t,n,!1),i=(n&e.childLanes)!==0,Qs||i){if(r=Ll,r!==null&&(s=qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Xr(e,s),_u(r,e,s),Zs;ku(),t=sc(e,t,n)}else e=o.treeContext,Ti=X(s.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=oc(t,r),t.flags|=4096;return t}return e=ri(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function uc(e,t,n,r,i){return Ki(t),n=_o(e,t,n,r,void 0,i),r=xo(),e!==null&&!Qs?(So(e,t,i),wc(e,t,i)):(Ei&&r&&xi(t),t.flags|=1,$s(e,t,n,i),t.child)}function dc(e,t,n,r,i,a){return Ki(t),t.updateQueue=null,n=yo(t,r,n,i),vo(e),r=xo(),e!==null&&!Qs?(So(e,t,a),wc(e,t,a)):(Ei&&r&&xi(t),t.flags|=1,$s(e,t,n,a),t.child)}function fc(e,t,n,r,i){if(Ki(t),t.stateNode===null){var a=$r,o=n.contextType;typeof o==`object`&&o&&(a=qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Rs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Na(t),o=n.contextType,a.context=typeof o==`object`&&o?qi(o):$r,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ls(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Rs.enqueueReplaceState(a,a.state,null),Va(t,r,a,i),Ba(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Vs(n,s);a.props=c;var l=a.context,u=n.contextType;o=$r,typeof u==`object`&&u&&(o=qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Bs(t,a,r,o),Ma=!1;var f=t.memoizedState;a.state=f,Va(t,r,a,i),Ba(),l=t.memoizedState,s||f!==l||Ma?(typeof d==`function`&&(Ls(t,n,d,r),l=t.memoizedState),(c=Ma||zs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Pa(e,t),o=t.memoizedProps,u=Vs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=$r,typeof l==`object`&&l&&(c=qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Bs(t,a,r,c),Ma=!1,f=t.memoizedState,a.state=f,Va(t,r,a,i),Ba();var p=t.memoizedState;o!==d||f!==p||Ma||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof s==`function`&&(Ls(t,n,s,r),p=t.memoizedState),(u=Ma||zs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Gi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Aa(t,e.child,null,i),t.child=Aa(t,null,n,i)):$s(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function pc(e,t,n,r){return Pi(),t.flags|=256,$s(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:pa()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Xl),e}function _c(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(no.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ei){if(i?Za(t):eo(t),(e=Ti)?(e=cf(e,Oi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:q===null?null:{id:_i,overflow:vi},retryLane:536870912,hydrationErrors:null},n=ci(e),n.return=t,t.child=n,wi=t,Ti=null)):e=null,e===null)throw Ai(t);return uf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(eo(t),i=t.mode,c=yc({mode:`hidden`,children:c},i),r=oi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(null,r)):(Za(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Za(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(eo(t),c=r.fallback,i=t.mode,r=yc({mode:`visible`,children:r.children},i),c=oi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Aa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=ic(null,r)):(eo(t),t.child=e.child,t.flags|=128,t=null);else if(Za(t),uf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Ii({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(Qs||Wi(e,t,n,!1),s=(n&e.childLanes)!==0,Qs||s){if(s=Ll,s!==null&&(r=qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Xr(e,r),_u(s,e,r),Zs;lf(c)||ku(),t=bc(e,t,n)}else lf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ti=X(c.nextSibling),wi=t,Ei=!0,Di=null,Oi=!1,e!==null&&Ci(t,e),t=vc(t,r.children),t.flags|=4096);return t}return i?(eo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=ri(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=oi(c,i,n,null),c.flags|=2):c=ri(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ic(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(i=c.cachePool,i===null?i=pa():(l=$i._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=gc(e,s,n),t.memoizedState=mc,ic(e.child,r)):(Za(t),n=e.child,e=n.sibling,n=ri(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function vc(e,t){return t=yc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function yc(e,t){return e=ti(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Aa(t,e.child,null,n),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hi(e.return,t,n)}function Sc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Cc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=no.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(no,o),$s(e,t,r,n),r=Ei?hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xc(e,n,t);else if(e.tag===19)xc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ro(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ro(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,a,r);break;case`together`:Sc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function wc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=ri(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ri(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Gi(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:H(t,t.stateNode.containerInfo),Bi(t,$i,e.memoizedState.cache),Pi();break;case 27:case 5:oe(t);break;case 4:H(t,t.stateNode.containerInfo);break;case 10:Bi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qa(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Za(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(Za(t),t.flags|=128,null);Za(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Wi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Cc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),B(no,no.current),r)break;return null;case 22:return t.lanes=0,rc(e,t,n,t.pendingProps);case 24:Bi(t,$i,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Qs=!0;else{if(!Tc(e,n)&&!(t.flags&128))return Qs=!1,Ec(e,t,n);Qs=!!(e.flags&131072)}else Qs=!1,Ei&&t.flags&1048576&&bi(t,hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ba(t.elementType),t.type=e,typeof e==`function`)ni(e)?(r=Vs(e,r),t.tag=1,t=fc(null,t,e,r,n)):(t.tag=0,t=uc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===C){t.tag=11,t=ec(null,t,e,r,n);break a}else if(i===E){t.tag=14,t=tc(null,t,e,r,n);break a}}throw t=N(e)||e,Error(a(306,t,``))}}return t;case 0:return uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Vs(r,t.pendingProps),fc(e,t,r,i,n);case 3:a:{if(H(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Pa(e,t),Va(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Bi(t,$i,r),r!==o.cache&&Ui(t,[$i],n,!0),Ba(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=pc(e,t,r,n);break a}else if(r!==i){i=di(Error(a(424)),t),Ii(i),t=pc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ti=X(e.firstChild),wi=t,Ei=!0,Di=null,Oi=!0,n=ja(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Pi(),r===i){t=wc(e,t,n);break a}$s(e,t,r,n)}t=t.child}return t;case 26:return lc(e,t),e===null?(n=Mf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ei||(n=t.type,e=t.pendingProps,r=Gd(re.current).createElement(n),r[Qe]=t,r[$e]=e,zd(r,n,e),dt(r),t.stateNode=r):t.memoizedState=Mf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&Ei&&(r=t.stateNode=hf(t.type,t.pendingProps,re.current),wi=t,Oi=!0,i=Ti,nf(t.type)?(ff=i,Ti=X(r.firstChild)):Ti=i),$s(e,t,t.pendingProps.children,n),lc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ei&&((i=r=Ti)&&(r=of(r,t.type,t.pendingProps,Oi),r===null?i=!1:(t.stateNode=r,wi=t,Ti=X(r.firstChild),Oi=!1,i=!0)),i||Ai(t)),oe(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(i,o)?r=null:s!==null&&Jd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=_o(e,t,bo,null,null,n),tp._currentValue=i),lc(e,t),$s(e,t,r,n),t.child;case 6:return e===null&&Ei&&((e=n=Ti)&&(n=sf(n,t.pendingProps,Oi),n===null?e=!1:(t.stateNode=n,wi=t,Ti=null,e=!0)),e||Ai(t)),null;case 13:return _c(e,t,n);case 4:return H(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Aa(t,null,r,n):$s(e,t,r,n),t.child;case 11:return ec(e,t,t.type,t.pendingProps,n);case 7:return $s(e,t,t.pendingProps,n),t.child;case 8:return $s(e,t,t.pendingProps.children,n),t.child;case 12:return $s(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Bi(t,t.type,r.value),$s(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ki(t),i=qi(i),r=r(i),t.flags|=1,$s(e,t,r,n),t.child;case 14:return tc(e,t,t.type,t.pendingProps,n);case 15:return nc(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return cc(e,t,n);case 22:return rc(e,t,n,t.pendingProps);case 24:return Ki(t),r=qi($i),e===null?(i=da(),i===null&&(i=Ll,o=ea(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Na(t),Bi(t,$i,i)):((e.lanes&n)!==0&&(Pa(e,t),Va(t,null,null,n),Ba()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Bi(t,$i,r),r!==i.cache&&Ui(t,[$i],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Bi(t,$i,r))),$s(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Oc(e){e.flags|=4}function kc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Eu())e.flags|=8192;else throw xa=_a,ha}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!qf(t))if(Eu())e.flags|=8192;else throw xa=_a,ha}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ve(),e.lanes|=t,Zl|=t)}function Mc(e,t){if(!Ei)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Nc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pc(e,t,n){var r=t.pendingProps;switch(Si(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nc(t),null;case 1:return Nc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Vi($i),ae(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ni(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fi())),Nc(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Oc(t),o===null?(Nc(t),kc(t,i,null,r,n)):(Nc(t),Ac(t,o))):o?o===e.memoizedState?(Nc(t),t.flags&=-16777217):(Oc(t),Nc(t),Ac(t,o)):(e=e.memoizedProps,e!==r&&Oc(t),Nc(t),kc(t,i,e,r,n)),null;case 27:if(se(t),n=re.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Nc(t),null}e=V.current,Ni(t)?ji(t,e):(e=hf(i,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(se(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Nc(t),null}if(o=V.current,Ni(t))ji(t,o);else{var s=Gd(re.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[Qe]=t,o[$e]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=re.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=wi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||Ai(t,!0)}else e=Gd(e).createTextNode(r),e[Qe]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(to(t),t):(to(t),null);if(t.flags&128)throw Error(a(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[Qe]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),i=!1}else i=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(to(t),t):(to(t),null)}return to(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return ae(),e===null&&Ed(t.stateNode.containerInfo),Nc(t),null;case 10:return Vi(t.type),Nc(t),null;case 19:if(z(no),r=t.memoizedState,r===null)return Nc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Mc(r,!1);else{if(Kl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ro(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ii(n,e),n=n.sibling;return B(no,no.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>ru&&(t.flags|=128,i=!0,Mc(r,!1),t.lanes=4194304)}else{if(!i)if(e=ro(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Nc(t),null}else 2*ye()-r.renderingStartTime>ru&&n!==536870912&&(t.flags|=128,i=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=no.current,B(no,i?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return to(t),Ja(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&z(ua),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Nc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Fc(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),ae(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return se(t),null;case 31:if(t.memoizedState!==null){if(to(t),t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(to(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(no),null;case 4:return ae(),null;case 10:return Vi(t.type),null;case 22:case 23:return to(t),Ja(),e!==null&&z(ua),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Ic(e,t){switch(Si(t),t.tag){case 3:Vi($i),ae();break;case 26:case 27:case 5:se(t);break;case 4:ae();break;case 31:t.memoizedState!==null&&to(t);break;case 13:to(t);break;case 19:z(no);break;case 10:Vi(t.type);break;case 22:case 23:to(t),Ja(),e!==null&&z(ua);break;case 24:Vi($i)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){qu(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){qu(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ua(t,n)}catch(t){qu(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){qu(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){qu(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){qu(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){qu(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[$e]=t}catch(t){qu(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(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&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gt));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[Qe]=e,t[$e]=n}catch(t){qu(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Ud=up,e=br(e),xr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},up=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Vs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)af(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:af(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,el=e;break}el=t.return}}function nl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:_l(e,n),r&4&&Lc(5,n);break;case 1:if(_l(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){qu(n,n.return,e)}else{var i=Vs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){qu(n,n.return,e)}}r&64&&zc(n),r&512&&Vc(n,n.return);break;case 3:if(_l(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ua(e,t)}catch(e){qu(n,n.return,e)}}break;case 27:t===null&&r&4&&Yc(n);case 26:case 5:_l(e,n),t===null&&r&4&&Uc(n),r&512&&Vc(n,n.return);break;case 12:_l(e,n);break;case 31:_l(e,n),r&4&&cl(e,n);break;case 13:_l(e,n),r&4&&ll(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Zu.bind(null,n),df(e,n))));break;case 22:if(r=n.memoizedState!==null||Xc,!r){t=t!==null&&t.memoizedState!==null||Zc,i=Xc;var a=Zc;Xc=r,(Zc=t)&&!a?yl(e,n,(n.subtreeFlags&8772)!=0):_l(e,n),Xc=i,Zc=a}break;case 30:break;default:_l(e,n)}}function rl(e){var t=e.alternate;t!==null&&(e.alternate=null,rl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ot(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 il=null,al=!1;function ol(e,t,n){for(n=n.child;n!==null;)sl(e,t,n),n=n.sibling}function sl(e,t,n){if(W&&typeof W.onCommitFiberUnmount==`function`)try{W.onCommitFiberUnmount(Oe,n)}catch{}switch(n.tag){case 26:Zc||Hc(n,t),ol(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Zc||Hc(n,t);var r=il,i=al;nf(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),gf(n.stateNode),il=r,al=i;break;case 5:Zc||Hc(n,t);case 6:if(r=il,i=al,il=null,ol(e,t,n),il=r,al=i,il!==null)if(al)try{(il.nodeType===9?il.body:il.nodeName===`HTML`?il.ownerDocument.body:il).removeChild(n.stateNode)}catch(e){qu(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){qu(n,t,e)}break;case 18:il!==null&&(al?(e=il,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Ip(e)):rf(il,n.stateNode));break;case 4:r=il,i=al,il=n.stateNode.containerInfo,al=!0,ol(e,t,n),il=r,al=i;break;case 0:case 11:case 14:case 15:Rc(2,n,t),Zc||Rc(4,n,t),ol(e,t,n);break;case 1:Zc||(Hc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Bc(n,t,r)),ol(e,t,n);break;case 21:ol(e,t,n);break;case 22:Zc=(r=Zc)||n.memoizedState!==null,ol(e,t,n),Zc=r;break;default:ol(e,t,n)}}function cl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ip(e)}catch(e){qu(t,t.return,e)}}}function ll(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ip(e)}catch(e){qu(t,t.return,e)}}function ul(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $c),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $c),t;default:throw Error(a(435,e.tag))}}function dl(e,t){var n=ul(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Qu.bind(null,e,t);t.then(r,r)}})}function fl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){il=c.stateNode,al=!1;break a}break;case 5:il=c.stateNode,al=!1;break a;case 3:case 4:il=c.stateNode.containerInfo,al=!0;break a}c=c.return}if(il===null)throw Error(a(160));sl(o,s,i),il=null,al=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ml(t,e),t=t.sibling}var pl=null;function ml(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fl(t,e),hl(e),r&4&&(Rc(3,e,e.return),Lc(3,e),Rc(5,e,e.return));break;case 1:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&64&&Xc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=pl;if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[at]||o[Qe]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),zd(o,r,n),o[Qe]=e,dt(o),r=o;break a;case`link`:var s=Wf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),zd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Wf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),zd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Qe]=e,dt(o),r=o}e.stateNode=r}else Gf(i,e.type,e.stateNode);else e.stateNode=zf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Wc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Gf(i,e.type,e.stateNode):zf(i,r,e.memoizedProps))}break;case 27:fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),n!==null&&r&4&&Wc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fl(t,e),hl(e),r&512&&(Zc||n===null||Hc(n,n.return)),e.flags&32){i=e.stateNode;try{Lt(i,``)}catch(t){qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Wc(e,i,n===null?i:n.memoizedProps)),r&1024&&(Qc=!0);break;case 6:if(fl(t,e),hl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){qu(e,e.return,t)}}break;case 3:if(Uf=null,i=pl,pl=yf(t.containerInfo),fl(t,e),pl=i,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ip(t.containerInfo)}catch(t){qu(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=yf(e.stateNode.containerInfo),fl(t,e),hl(e),pl=r;break;case 12:fl(t,e),hl(e);break;case 31:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 13:fl(t,e),hl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(tu=ye()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Xc,d=Zc;if(Xc=u||i,Zc=d||l,fl(t,e),Zc=d,Xc=u,hl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Xc||Zc||vl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?Y(m,!0):Y(l.stateNode,!1)}catch(e){qu(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,dl(e,n))));break;case 19:fl(t,e),hl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,dl(e,r)));break;case 30:break;case 21:break;default:fl(t,e),hl(e)}}function hl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Gc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Jc(e,Kc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Lt(o,``),n.flags&=-33),Jc(e,Kc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;qc(e,Kc(e),s);break;default:throw Error(a(161))}}catch(t){qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function gl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;gl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _l(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nl(e,t.alternate,t),t=t.sibling}function vl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rc(4,t,t.return),vl(t);break;case 1:Hc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Bc(t,t.return,n),vl(t);break;case 27:gf(t.stateNode);case 26:case 5:Hc(t,t.return),vl(t);break;case 22:t.memoizedState===null&&vl(t);break;case 30:vl(t);break;default:vl(t)}e=e.sibling}}function yl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:yl(i,a,n),Lc(4,a);break;case 1:if(yl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ha(c[i],s)}catch(e){qu(r,r.return,e)}}n&&o&64&&zc(a),Vc(a,a.return);break;case 27:Yc(a);case 26:case 5:yl(i,a,n),n&&r===null&&o&4&&Uc(a),Vc(a,a.return);break;case 12:yl(i,a,n);break;case 31:yl(i,a,n),n&&o&4&&cl(i,a);break;case 13:yl(i,a,n),n&&o&4&&ll(i,a);break;case 22:a.memoizedState===null&&yl(i,a,n),Vc(a,a.return);break;case 30:break;default:yl(i,a,n)}t=t.sibling}}function bl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ta(n))}function xl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e))}function Sl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cl(e,t,n,r),t=t.sibling}function Cl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Sl(e,t,n,r),i&2048&&Lc(9,t);break;case 1:Sl(e,t,n,r);break;case 3:Sl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ta(e)));break;case 12:if(i&2048){Sl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){qu(t,t.return,e)}}else Sl(e,t,n,r);break;case 31:Sl(e,t,n,r);break;case 13:Sl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Sl(e,t,n,r):(a._visibility|=2,wl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Sl(e,t,n,r):Tl(e,t),i&2048&&bl(o,t);break;case 24:Sl(e,t,n,r),i&2048&&xl(t.alternate,t);break;default:Sl(e,t,n,r)}}function wl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:wl(a,o,s,c,i),Lc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,wl(a,o,s,c,i)):u._visibility&2?wl(a,o,s,c,i):Tl(a,o),i&&l&2048&&bl(o.alternate,o);break;case 24:wl(a,o,s,c,i),i&&l&2048&&xl(o.alternate,o);break;default:wl(a,o,s,c,i)}t=t.sibling}}function Tl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Tl(n,r),i&2048&&bl(r.alternate,r);break;case 24:Tl(n,r),i&2048&&xl(r.alternate,r);break;default:Tl(n,r)}t=t.sibling}}var El=8192;function Dl(e,t,n){if(e.subtreeFlags&El)for(e=e.child;e!==null;)Ol(e,t,n),e=e.sibling}function Ol(e,t,n){switch(e.tag){case 26:Dl(e,t,n),e.flags&El&&e.memoizedState!==null&&Jf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=yf(e.stateNode.containerInfo),Dl(e,t,n),pl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=El,El=16777216,Dl(e,t,n),El=r):Dl(e,t,n));break;default:Dl(e,t,n)}}function kl(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 Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jl(e),e=e.sibling}function jl(e){switch(e.tag){case 0:case 11:case 15:Al(e),e.flags&2048&&Rc(9,e,e.return);break;case 3:Al(e);break;case 12:Al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ml(e)):Al(e);break;default:Al(e)}}function Ml(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];el=r,Nl(r,e)}kl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rc(8,t,t.return),Ml(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ml(t));break;default:Ml(t)}e=e.sibling}}function Nl(e,t){for(;el!==null;){var n=el;switch(n.tag){case 0:case 11:case 15:Rc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ta(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,el=r;else a:for(n=e;el!==null;){r=el;var i=r.sibling,a=r.return;if(rl(r),r===n){el=null;break a}if(i!==null){i.return=a,el=i;break a}el=a}}}var Pl={getCacheForType:function(e){var t=qi($i),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return qi($i).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Rl=null,zl=0,Bl=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=null,$l=null,eu=!1,tu=0,nu=0,ru=1/0,iu=null,au=null,ou=0,su=null,cu=null,lu=0,uu=0,du=null,fu=null,pu=0,mu=null;function hu(){return Il&2&&zl!==0?zl&-zl:F.T===null?G():md()}function gu(){if(Xl===0)if(!(zl&536870912)||Ei){var e=Fe;Fe<<=1,!(Fe&3932160)&&(Fe=262144),Xl=e}else Xl=536870912;return e=Ya.current,e!==null&&(e.flags|=32),Xl}function _u(e,t,n){(e===Ll&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)&&(wu(e,0),xu(e,zl,Xl,!1)),Ue(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(Jl|=n),Kl===4&&xu(e,zl,Xl,!1)),od(e))}function vu(e,t,n){if(Il&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ze(e,t),i=r?Mu(e,t):Au(e,t,!0),o=r;do{if(i===0){Ul&&!r&&xu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!bu(n)){i=Au(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Ql;var l=c.current.memoizedState.isDehydrated;if(l&&(wu(c,s).flags|=256),s=Au(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,Jl|=o,i=4;break a}o=$l,$l=i,o!==null&&($l===null?$l=o:$l.push.apply($l,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){wu(e,0),xu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:xu(r,t,Xl,!Hl);break a;case 2:$l=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=tu+300-ye(),10<i)){if(xu(r,t,Xl,!Hl),Re(r,0,!0)!==0)break a;lu=t,r.timeoutHandle=Zd(yu.bind(null,r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,`Throttled`,-0,0),i);break a}yu(r,n,$l,iu,eu,t,Xl,Jl,Zl,Hl,o,null,-0,0)}}break}while(1);od(e)}function yu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gt},Ol(t,a,d);var m=(a&62914560)===a?tu-ye():(a&4194048)===a?nu-ye():0;if(m=Xf(d,m),m!==null){lu=a,e.cancelPendingCommit=m(zu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),xu(e,a,o,!l);return}}zu(e,t,a,n,r,i,o,s,c)}function bu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!hr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function xu(e,t,n,r){t&=~Yl,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ae(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ge(e,n,t)}function Su(){return Il&6?!0:(sd(0,!1),!1)}function Cu(){if(Rl!==null){if(Bl===0)var e=Rl.return;else e=Rl,zi=Ri=null,Co(e),wa=null,Ta=0,e=Rl;for(;e!==null;)Ic(e.alternate,e),e=e.return;Rl=null}}function wu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),lu=0,Cu(),Ll=e,Rl=n=ri(e.current,null),zl=t,Bl=0,Vl=null,Hl=!1,Ul=ze(e,t),Wl=!1,Zl=Xl=Yl=Jl=ql=Kl=0,$l=Ql=null,eu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ae(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,qr(),n}function Tu(e,t){J=null,F.H=Ns,t===ma||t===ga?(t=Sa(),Bl=3):t===ha?(t=Sa(),Bl=4):Bl=t===Zs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,Rl===null&&(Kl=1,Gs(e,di(t,e.current)))}function Eu(){var e=Ya.current;return e===null?!0:(zl&4194048)===zl?Xa===null:(zl&62914560)===zl||zl&536870912?e===Xa:!1}function Du(){var e=F.H;return F.H=Ns,e===null?Ns:e}function Ou(){var e=F.A;return F.A=Pl,e}function ku(){Kl=4,Hl||(zl&4194048)!==zl&&Ya.current!==null||(Ul=!0),!(ql&134217727)&&!(Jl&134217727)||Ll===null||xu(Ll,zl,Xl,!1)}function Au(e,t,n){var r=Il;Il|=2;var i=Du(),a=Ou();(Ll!==e||zl!==t)&&(iu=null,wu(e,t)),t=!1;var o=Kl;a:do try{if(Bl!==0&&Rl!==null){var s=Rl,c=Vl;switch(Bl){case 8:Cu(),o=6;break a;case 3:case 2:case 9:case 6:Ya.current===null&&(t=!0);var l=Bl;if(Bl=0,Vl=null,Iu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=Bl,Bl=0,Vl=null,Iu(e,s,c,l)}}ju(),o=Kl;break}catch(t){Tu(e,t)}while(1);return t&&e.shellSuspendCounter++,zi=Ri=null,Il=r,F.H=i,F.A=a,Rl===null&&(Ll=null,zl=0,qr()),o}function ju(){for(;Rl!==null;)Pu(Rl)}function Mu(e,t){var n=Il;Il|=2;var r=Du(),i=Ou();Ll!==e||zl!==t?(iu=null,ru=ye()+500,wu(e,t)):Ul=ze(e,t);a:do try{if(Bl!==0&&Rl!==null){t=Rl;var o=Vl;b:switch(Bl){case 1:Bl=0,Vl=null,Iu(e,t,o,1);break;case 2:case 9:if(va(o)){Bl=0,Vl=null,Fu(t);break}t=function(){Bl!==2&&Bl!==9||Ll!==e||(Bl=7),od(e)},o.then(t,t);break a;case 3:Bl=7;break a;case 4:Bl=5;break a;case 7:va(o)?(Bl=0,Vl=null,Fu(t)):(Bl=0,Vl=null,Iu(e,t,o,7));break;case 5:var s=null;switch(Rl.tag){case 26:s=Rl.memoizedState;case 5:case 27:var c=Rl;if(s?qf(s):c.stateNode.complete){Bl=0,Vl=null;var l=c.sibling;if(l!==null)Rl=l;else{var u=c.return;u===null?Rl=null:(Rl=u,Lu(u))}break b}}Bl=0,Vl=null,Iu(e,t,o,5);break;case 6:Bl=0,Vl=null,Iu(e,t,o,6);break;case 8:Cu(),Kl=6;break a;default:throw Error(a(462))}}Nu();break}catch(t){Tu(e,t)}while(1);return zi=Ri=null,F.H=r,F.A=i,Il=n,Rl===null?(Ll=null,zl=0,qr(),Kl):0}function Nu(){for(;Rl!==null&&!_e();)Pu(Rl)}function Pu(e){var t=Dc(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Fu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=dc(n,t,t.pendingProps,t.type,void 0,zl);break;case 11:t=dc(n,t,t.pendingProps,t.type.render,t.ref,zl);break;case 5:Co(t);default:Ic(n,t),t=Rl=ii(t,Gl),t=Dc(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Lu(e):Rl=t}function Iu(e,t,n,r){zi=Ri=null,Co(t),wa=null,Ta=0;var i=t.return;try{if(Xs(e,i,t,n,zl)){Kl=1,Gs(e,di(n,e.current)),Rl=null;return}}catch(t){if(i!==null)throw Rl=i,t;Kl=1,Gs(e,di(n,e.current)),Rl=null;return}t.flags&32768?(Ei||r===1?e=!0:Ul||zl&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ya.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ru(t,e)):Lu(t)}function Lu(e){var t=e;do{if(t.flags&32768){Ru(t,Hl);return}e=t.return;var n=Pc(t.alternate,t,Gl);if(n!==null){Rl=n;return}if(t=t.sibling,t!==null){Rl=t;return}Rl=t=e}while(t!==null);Kl===0&&(Kl=5)}function Ru(e,t){do{var n=Fc(e.alternate,e);if(n!==null){n.flags&=32767,Rl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Rl=e;return}Rl=e=n}while(e!==null);Kl=6,Rl=null}function zu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Wu();while(ou!==0);if(Il&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=Kr,We(e,n,o,s,c,l),e===Ll&&(Rl=Ll=null,zl=0),cu=t,su=e,lu=n,uu=o,du=i,fu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,$u(Ce,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=F.T,F.T=null,i=I.p,I.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,I.p=i,F.T=r}}ou=1,Bu(),Vu(),Hu()}}function Bu(){if(ou===1){ou=0;var e=su,t=cu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Wd,o=br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&yr(s.ownerDocument.documentElement,s)){if(c!==null&&xr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=vr(s,h),v=vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}up=!!Ud,Wd=Ud=null}finally{Il=i,I.p=r,F.T=n}}e.current=t,ou=2}}function Vu(){if(ou===2){ou=0;var e=su,t=cu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=F.T,F.T=null;var r=I.p;I.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,I.p=r,F.T=n}}ou=3}}function Hu(){if(ou===4||ou===3){ou=0,ve();var e=su,t=cu,n=lu,r=fu;t.subtreeFlags&10256||t.flags&10256?ou=5:(ou=0,cu=su=null,Uu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(au=null),Ye(n),t=t.stateNode,W&&typeof W.onCommitFiberRoot==`function`)try{W.onCommitFiberRoot(Oe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=F.T,i=I.p,I.p=2,F.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{F.T=t,I.p=i}}lu&3&&Wu(),od(e),i=e.pendingLanes,n&261930&&i&42?e===mu?pu++:(pu=0,mu=e):pu=0,sd(0,!1)}}function Uu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ta(t)))}function Wu(){return Bu(),Vu(),Hu(),Gu()}function Gu(){if(ou!==5)return!1;var e=su,t=uu;uu=0;var n=Ye(lu),r=F.T,i=I.p;try{I.p=32>n?32:n,F.T=null,n=du,du=null;var o=su,s=lu;if(ou=0,cu=su=null,lu=0,Il&6)throw Error(a(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,sd(0,!1),W&&typeof W.onPostCommitFiberRoot==`function`)try{W.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{I.p=i,F.T=r,Uu(e,t)}}function Ku(e,t,n){t=di(n,t),t=qs(e.stateNode,t,2),e=Ia(e,t,2),e!==null&&(Ue(e,2),od(e))}function qu(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(au===null||!au.has(r))){e=di(n,e),n=Js(2),r=Ia(t,n,2),r!==null&&(Ys(n,r,t,e),Ue(r,2),od(r));break}}t=t.return}}function Ju(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Yu.bind(null,e,t,n),t.then(e,e))}function Yu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(zl&n)===n&&(Kl===4||Kl===3&&(zl&62914560)===zl&&300>ye()-tu?!(Il&2)&&wu(e,0):Yl|=n,Zl===zl&&(Zl=0)),od(e)}function Xu(e,t){t===0&&(t=Ve()),e=Xr(e,t),e!==null&&(Ue(e,t),od(e))}function Zu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xu(e,n)}function Qu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Xu(e,n)}function $u(e,t){return he(e,t)}var ed=null,td=null,nd=!1,rd=!1,id=!1,ad=0;function od(e){e!==td&&e.next===null&&(td===null?ed=td=e:td=td.next=e),rd=!0,nd||(nd=!0,pd())}function sd(e,t){if(!id&&rd){id=!0;do for(var n=!1,r=ed;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ae(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,fd(r,a))}else a=zl,a=Re(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ze(r,a)||(n=!0,fd(r,a));r=r.next}while(n);id=!1}}function cd(){ld()}function ld(){rd=nd=!1;var e=0;ad!==0&&Xd()&&(e=ad);for(var t=ye(),n=null,r=ed;r!==null;){var i=r.next,a=ud(r,t);a===0?(r.next=null,n===null?ed=i:n.next=i,i===null&&(td=n)):(n=r,(e!==0||a&3)&&(rd=!0)),r=i}ou!==0&&ou!==5||sd(e,!1),ad!==0&&(ad=0)}function ud(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ae(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Be(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=zl,n=Re(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Bl===2||Bl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ge(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ze(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ge(r),Ye(n)){case 2:case 8:n=Se;break;case 32:n=Ce;break;case 268435456:n=Te;break;default:n=Ce}return r=dd.bind(null,e),n=he(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ge(r),e.callbackPriority=2,e.callbackNode=null,2}function dd(e,t){if(ou!==0&&ou!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Wu()&&e.callbackNode!==n)return null;var r=zl;return r=Re(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(vu(e,r,t),ud(e,ye()),e.callbackNode!=null&&e.callbackNode===n?dd.bind(null,e):null)}function fd(e,t){if(Wu())return null;vu(e,t,!0)}function pd(){ef(function(){Il&6?he(xe,cd):ld()})}function md(){if(ad===0){var e=ia;e===0&&(e=Pe,Pe<<=1,!(Pe&261888)&&(Pe=256)),ad=e}return ad}function hd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Wt(``+e)}function gd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function _d(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=hd((i[$e]||null).action),o=r.submitter;o&&(t=(t=o[$e]||null)?hd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ad!==0){var e=o?gd(i,o):new FormData(i);ys(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?gd(i,o):new FormData(i),ys(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var vd=0;vd<Vr.length;vd++){var yd=Vr[vd];Hr(yd.toLowerCase(),`on`+(yd[0].toUpperCase()+yd.slice(1)))}Hr(Nr,`onAnimationEnd`),Hr(Pr,`onAnimationIteration`),Hr(Fr,`onAnimationStart`),Hr(`dblclick`,`onDoubleClick`),Hr(`focusin`,`onFocus`),Hr(`focusout`,`onBlur`),Hr(Ir,`onTransitionRun`),Hr(Lr,`onTransitionStart`),Hr(Rr,`onTransitionCancel`),Hr(zr,`onTransitionEnd`),ht(`onMouseEnter`,[`mouseout`,`mouseover`]),ht(`onMouseLeave`,[`mouseout`,`mouseover`]),ht(`onPointerEnter`,[`pointerout`,`pointerover`]),ht(`onPointerLeave`,[`pointerout`,`pointerover`]),mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var bd=`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(` `),xd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(bd));function Sd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Ur(e)}i.currentTarget=null,a=c}}}}function Cd(e,t){var n=t[tt];n===void 0&&(n=t[tt]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,ft.forEach(function(t){t!==`selectionchange`&&(xd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(_p(t)){case 2:var i=dp;break;case 8:i=fp;break;default:i=pp}n=i.bind(null,t,n,e),i=void 0,!tn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=st(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}Qt(function(){var r=a,i=qt(n),o=[];a:{var c=Br.get(e);if(c!==void 0){var l=pn,u=e;switch(e){case`keypress`:if(cn(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Nr:case Pr:case Fr:l=Cn;break;case zr:l=Pn;break;case`scroll`:case`scrollend`:l=hn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=$t(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Kt&&(u=n.relatedTarget||n.fromElement)&&(st(u)||u[et]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?st(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:lt(l),h=u==null?c:lt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,st(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=jd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Md(o,c,l,d,!1),u!==null&&f!==null&&Md(o,f,u,d,!0)}}a:{if(c=r?lt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=nr;else if(Xn(c))if(rr)v=pr;else{v=dr;var y=ur}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Vt(r.elementType)&&(v=nr):v=fr;if(v&&=v(e,r)){Zn(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Nt(c,`number`,c.value)}switch(y=r?lt(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(Cr=y,wr=r,Tr=null);break;case`focusout`:Tr=wr=Cr=null;break;case`mousedown`:Er=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Er=!1,Dr(o,n,i);break;case`selectionchange`:if(Sr)break;case`keydown`:case`keyup`:Dr(o,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=sn()):(rn=i,an=`value`in rn?rn.value:rn.textContent,Kn=!0)),y=Ad(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),_d(o,e,r,n,i)}Sd(o,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=$t(e,n),i!=null&&r.unshift(kd(e,i,a)),i=$t(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=$t(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=$t(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
10
+ `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Lt(e,``+r);break;case`className`:xt(e,`class`,r);break;case`tabIndex`:xt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:xt(e,n,r);break;case`style`:Bt(e,r,o);break;case`data`:if(t!==`object`){xt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,i.name,i,null),Ld(e,t,`formEncType`,i.formEncType,i,null),Ld(e,t,`formMethod`,i.formMethod,i,null),Ld(e,t,`formTarget`,i.formTarget,i,null)):(Ld(e,t,`encType`,i.encType,i,null),Ld(e,t,`method`,i.method,i,null),Ld(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Wt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Wt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Cd(`beforetoggle`,e),Cd(`toggle`,e),bt(e,`popover`,r);break;case`xlinkActuate`:St(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:St(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:St(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:St(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:St(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:St(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:bt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ht.get(n)||n,bt(e,n,r))}}function Rd(e,t,n,r,i,o){switch(n){case`style`:Bt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Lt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Lt(e,``+r);break;case`onScroll`:r!=null&&Cd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Cd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Gt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[$e]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):bt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Cd(`error`,e),Cd(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ld(e,t,o,s,n,null)}}i&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:Cd(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Ld(e,t,r,d,n,null)}}Mt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Cd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Pt(e,!!r,n,!0):Pt(e,!!r,t,!1);return;case`textarea`:for(s in Cd(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Ld(e,t,s,c,n,null)}It(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ld(e,t,l,r,n,null)}return;case`dialog`:Cd(`beforetoggle`,e),Cd(`toggle`,e),Cd(`cancel`,e),Cd(`close`,e);break;case`iframe`:case`object`:Cd(`load`,e);break;case`video`:case`audio`:for(r=0;r<bd.length;r++)Cd(bd[r],e);break;case`image`:Cd(`error`,e),Cd(`load`,e);break;case`details`:Cd(`toggle`,e);break;case`embed`:case`source`:case`link`:Cd(`error`,e),Cd(`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 n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ld(e,t,u,r,n,null)}return;default:if(Vt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ld(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}jt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ld(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Pt(e,!!n,n?[]:``,!1):Pt(e,!!n,t,!0)):Pt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Ld(e,t,s,i,r,o)}Ft(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ld(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ld(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if(Vt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 qd(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 Jd(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 Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Ip(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)gf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,gf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[at]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&gf(e.ownerDocument.body);n=i}while(n);Ip(t)}function Y(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function af(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:af(n),ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function of(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[at])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=X(e.nextSibling),e===null)break}return null}function sf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=X(e.nextSibling),e===null))return null;return e}function cf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=X(e.nextSibling),e===null))return null;return e}function lf(e){return e.data===`$?`||e.data===`$~`}function uf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function df(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function X(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 ff=null;function pf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return X(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function mf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function hf(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function gf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ot(e)}var _f=new Map,vf=new Set;function yf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var bf=I.d;I.d={f:xf,r:Sf,D:Tf,C:Ef,L:Df,m:Of,X:Af,S:kf,M:jf};function xf(){var e=bf.f(),t=Su();return e||t}function Sf(e){var t=ct(e);t!==null&&t.tag===5&&t.type===`form`?xs(t):bf.r(e)}var Cf=typeof document>`u`?null:document;function wf(e,t,n){var r=Cf;if(r&&typeof t==`string`&&t){var i=At(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),vf.has(i)||(vf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Tf(e){bf.D(e),wf(`dns-prefetch`,e,null)}function Ef(e,t){bf.C(e,t),wf(`preconnect`,e,t)}function Df(e,t,n){bf.L(e,t,n);var r=Cf;if(r&&e&&t){var i=`link[rel="preload"][as="`+At(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+At(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+At(n.imageSizes)+`"]`)):i+=`[href="`+At(e)+`"]`;var a=i;switch(t){case`style`:a=Nf(e);break;case`script`:a=Lf(e)}_f.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),_f.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Pf(a))||t===`script`&&r.querySelector(Rf(a))||(t=r.createElement(`link`),zd(t,`link`,e),dt(t),r.head.appendChild(t)))}}function Of(e,t){bf.m(e,t);var n=Cf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+At(r)+`"][href="`+At(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!_f.has(a)&&(e=p({rel:`modulepreload`,href:e},t),_f.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Rf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),dt(r),n.head.appendChild(r)}}}function kf(e,t,n){bf.S(e,t,n);var r=Cf;if(r&&e){var i=ut(r).hoistableStyles,a=Nf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Pf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=_f.get(a))&&Vf(e,n);var c=o=r.createElement(`link`);dt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Bf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Af(e,t){bf.X(e,t);var n=Cf;if(n&&e){var r=ut(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t){bf.M(e,t);var n=Cf;if(n&&e){var r=ut(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Rf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=_f.get(i))&&Hf(e,t),a=n.createElement(`script`),dt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t,n,r){var i=(i=re.current)?yf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Nf(n.href),n=ut(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Nf(n.href);var o=ut(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Pf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),_f.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},_f.set(e,n),o||If(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Lf(n),n=ut(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Nf(e){return`href="`+At(e)+`"`}function Pf(e){return`link[rel="stylesheet"][`+e+`]`}function Ff(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function If(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),dt(t),e.head.appendChild(t))}function Lf(e){return`[src="`+At(e)+`"]`}function Rf(e){return`script[async]`+e}function zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+At(n.href)+`"]`);if(r)return t.instance=r,dt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),dt(r),zd(r,`style`,i),Bf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Nf(n.href);var o=e.querySelector(Pf(i));if(o)return t.state.loading|=4,t.instance=o,dt(o),o;r=Ff(n),(i=_f.get(i))&&Vf(r,i),o=(e.ownerDocument||e).createElement(`link`),dt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Bf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(i=e.querySelector(Rf(o)))?(t.instance=i,dt(i),i):(r=n,(i=_f.get(o))&&(r=p({},n),Hf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),dt(i),zd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Bf(r,n.precedence,e));return t.instance}function Bf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Hf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Uf=null;function Wf(e,t,n){if(Uf===null){var r=new Map,i=Uf=new Map;i.set(n,r)}else i=Uf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[at]||a[Qe]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Gf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Kf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;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 qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Jf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Nf(r.href),a=t.querySelector(Pf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Zf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,dt(a);return}a=t.ownerDocument||t,r=Ff(r),(i=_f.get(i))&&Vf(r,i),a=a.createElement(`link`),dt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Zf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Yf=0;function Xf(e,t){return e.stylesheets&&e.count===0&&$f(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Yf===0&&(Yf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$f(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Yf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$f(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qf=null;function $f(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qf=new Map,t.forEach(ep,e),Qf=null,Zf.call(e))}function ep(e,t){if(!(t.state.loading&4)){var n=Qf.get(e);if(n)var r=n.get(null);else{n=new Map,Qf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Zf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var tp={$$typeof:S,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function np(e,t,n,r,i,a,o,s,c){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=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function rp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new np(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ti(3,null,null,t),e.current=a,a.stateNode=e,t=ea(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Na(a),e}function ip(e){return e?(e=$r,e):$r}function ap(e,t,n,r,i,a){i=ip(i),r.context===null?r.context=i:r.pendingContext=i,r=Fa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ia(e,r,t),n!==null&&(_u(n,e,t),La(n,e,t))}function op(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sp(e,t){op(e,t),(e=e.alternate)&&op(e,t)}function cp(e){if(e.tag===13||e.tag===31){var t=Xr(e,67108864);t!==null&&_u(t,e,67108864),sp(e,67108864)}}function lp(e){if(e.tag===13||e.tag===31){var t=hu();t=Je(t);var n=Xr(e,t);n!==null&&_u(n,e,t),sp(e,t)}}var up=!0;function dp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=2,pp(e,t,n,r)}finally{I.p=a,F.T=i}}function fp(e,t,n,r){var i=F.T;F.T=null;var a=I.p;try{I.p=8,pp(e,t,n,r)}finally{I.p=a,F.T=i}}function pp(e,t,n,r){if(up){var i=mp(r);if(i===null)Od(e,t,r,hp,n),Ep(e,r);else if(Op(i,e,t,n,r))r.stopPropagation();else if(Ep(e,r),t&4&&-1<Tp.indexOf(e)){for(;i!==null;){var a=ct(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Le(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ae(o);s.entanglements[1]|=c,o&=~c}od(a),!(Il&6)&&(ru=ye()+500,sd(0,!1))}}break;case 31:case 13:s=Xr(a,2),s!==null&&_u(s,a,2),Su(),sp(a,2)}if(a=mp(r),a===null&&Od(e,t,r,hp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function mp(e){return e=qt(e),gp(e)}var hp=null;function gp(e){if(hp=null,e=st(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hp=e,null}function _p(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(be()){case xe:return 2;case Se:return 8;case Ce:case we:return 32;case Te:return 268435456;default:return 32}default:return 32}}var vp=!1,yp=null,bp=null,xp=null,Sp=new Map,Cp=new Map,wp=[],Tp=`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 Ep(e,t){switch(e){case`focusin`:case`focusout`:yp=null;break;case`dragenter`:case`dragleave`:bp=null;break;case`mouseover`:case`mouseout`:xp=null;break;case`pointerover`:case`pointerout`:Sp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Cp.delete(t.pointerId)}}function Dp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ct(t),t!==null&&cp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Op(e,t,n,r,i){switch(t){case`focusin`:return yp=Dp(yp,e,t,n,r,i),!0;case`dragenter`:return bp=Dp(bp,e,t,n,r,i),!0;case`mouseover`:return xp=Dp(xp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Sp.set(a,Dp(Sp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Cp.set(a,Dp(Cp.get(a)||null,e,t,n,r,i)),!0}return!1}function kp(e){var t=st(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){lp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,Xe(e.priority,function(){lp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ap(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Kt=r,n.target.dispatchEvent(r),Kt=null}else return t=ct(n),t!==null&&cp(t),e.blockedOn=n,!1;t.shift()}return!0}function jp(e,t,n){Ap(e)&&n.delete(t)}function Mp(){vp=!1,yp!==null&&Ap(yp)&&(yp=null),bp!==null&&Ap(bp)&&(bp=null),xp!==null&&Ap(xp)&&(xp=null),Sp.forEach(jp),Cp.forEach(jp)}function Np(e,t){e.blockedOn===t&&(e.blockedOn=null,vp||(vp=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Mp)))}var Pp=null;function Fp(e){Pp!==e&&(Pp=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Pp===e&&(Pp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(gp(r||n)===null)continue;break}var a=ct(n);a!==null&&(e.splice(t,3),t-=3,ys(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ip(e){function t(t){return Np(t,e)}yp!==null&&Np(yp,e),bp!==null&&Np(bp,e),xp!==null&&Np(xp,e),Sp.forEach(t),Cp.forEach(t);for(var n=0;n<wp.length;n++){var r=wp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<wp.length&&(n=wp[0],n.blockedOn===null);)kp(n),n.blockedOn===null&&wp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[$e]||null;if(typeof a==`function`)o||Fp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[$e]||null)s=o.formAction;else if(gp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Fp(n)}}}function Lp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Rp(e){this._internalRoot=e}zp.prototype.render=Rp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;ap(n,hu(),e,t,null,null)},zp.prototype.unmount=Rp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ap(e.current,2,null,e,null,null),Su(),t[et]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=G();e={blockedOn:null,target:e,priority:t};for(var n=0;n<wp.length&&t!==0&&t<wp[n].priority;n++);wp.splice(n,0,e),n===0&&kp(e)}};var Bp=r.version;if(Bp!==`19.2.7`)throw Error(a(527,Bp,`19.2.7`));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Vp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:F,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Hp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hp.isDisabled&&Hp.supportsFiber)try{Oe=Hp.inject(Vp),W=Hp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Hs,s=Us,c=Ws;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=rp(e,1,!1,null,null,n,r,null,i,s,c,Lp),e[et]=t.current,Ed(e),new Rp(t)}})),or=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ar()})),sr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},cr=new class extends sr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},lr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ur=new class{#e=lr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function dr(e){setTimeout(e,0)}var fr=typeof window>`u`||`Deno`in globalThis;function pr(){}function mr(e,t){return typeof e==`function`?e(t):e}function hr(e){return typeof e==`number`&&e>=0&&e!==1/0}function gr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _r(e,t){return typeof e==`function`?e(t):e}function vr(e,t){return typeof e==`function`?e(t):e}function yr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==xr(o,t.options))return!1}else if(!Cr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function br(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Sr(t.options.mutationKey)!==Sr(a))return!1}else if(!Cr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xr(e,t){return(t?.queryKeyHashFn||Sr)(e)}function Sr(e){return JSON.stringify(e,(e,t)=>Or(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Cr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>Cr(e[n],t[n])):!1}var wr=Object.prototype.hasOwnProperty;function Tr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Dr(e)&&Dr(t);if(!r&&!(Or(e)&&Or(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:wr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Tr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Er(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Dr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Or(e){if(!kr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!kr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function kr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ar(e){return new Promise(t=>{ur.setTimeout(t,e)})}function jr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Tr(e,t)}function Mr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Pr=Symbol();function Fr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Pr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ir(e,t){return typeof e==`function`?e(...t):!!e}function Lr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Rr=(()=>{let e=()=>fr;return{isServer(){return e()},setIsServer(t){e=t}}})();function zr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Br=dr;function Vr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Br,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Hr=Vr(),Ur=new class extends sr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Wr(e){return Math.min(1e3*2**e,3e4)}function Gr(e){return(e??`online`)!==`online`||Ur.isOnline()}var Kr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function qr(e){return e instanceof Kr}function Jr(e){let t=!1,n=0,r,i=zr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Kr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>cr.isFocused()&&(e.networkMode===`always`||Ur.isOnline())&&e.canRun(),u=()=>Gr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Rr.isServer()?0:3),o=e.retryDelay??Wr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Ar(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Yr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),hr(this.gcTime)&&(this.#e=ur.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rr.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(ur.clearTimeout(this.#e),this.#e=void 0)}};function Xr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Lr(e,()=>t.signal,()=>n=!0)},u=Fr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Nr:Mr;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Qr:Zr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Zr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Zr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $r=class extends Yr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ni(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ni(this.options);e.data!==void 0&&(this.setState(ti(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=jr(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(pr).catch(pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>vr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Pr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>_r(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!gr(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Fr(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Jr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Kr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Kr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...ei(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ti(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Hr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ei(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Gr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ti(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ni(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ri=class extends sr{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=zr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ai(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return oi(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return oi(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof vr(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Er(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&si(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||vr(this.options.enabled,this.#t)!==vr(t.enabled,this.#t)||_r(this.options.staleTime,this.#t)!==_r(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||vr(this.options.enabled,this.#t)!==vr(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return li(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(pr)),t}#g(){this.#b();let e=_r(this.options.staleTime,this.#t);if(Rr.isServer()||this.#r.isStale||!hr(e))return;let t=gr(this.#r.dataUpdatedAt,e)+1;this.#d=ur.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Rr.isServer()||vr(this.options.enabled,this.#t)===!1||!hr(this.#p)||this.#p===0)&&(this.#f=ur.setInterval(()=>{(this.options.refetchIntervalInBackground||cr.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(ur.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(ur.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ai(e,t),o=i&&si(e,n,t,r);(a||o)&&(l={...l,...ei(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=jr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=jr(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ci(e,t),refetch:this.refetch,promise:this.#o,isEnabled:vr(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=zr();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a();break}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!Er(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){Hr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ii(e,t){return vr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&vr(t.retryOnMount,e)===!1)}function ai(e,t){return ii(e,t)||e.state.data!==void 0&&oi(e,t,t.refetchOnMount)}function oi(e,t,n){if(vr(t.enabled,e)!==!1&&_r(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ci(e,t)}return!1}function si(e,t,n,r){return(e!==t||vr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ci(e,n)}function ci(e,t){return vr(t.enabled,e)!==!1&&e.isStaleByTime(_r(t.staleTime,e))}function li(e,t){return!Er(e.getCurrentResult(),t)}var ui=class extends Yr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||di(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Jr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Hr.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function di(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var fi=class extends sr{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new ui({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=pi(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=pi(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=pi(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=pi(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Hr.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>br(t,e))}findAll(e={}){return this.getAll().filter(t=>br(e,t))}notify(e){Hr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Hr.batch(()=>Promise.all(e.map(e=>e.continue().catch(pr))))}};function pi(e){return e.options.scope?.id}var mi=class extends sr{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Er(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Sr(t.mutationKey)!==Sr(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??di();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Hr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},hi=class extends sr{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??xr(r,t),a=this.get(i);return a||(a=new $r({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Hr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>yr(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>yr(e,t)):t}notify(e){Hr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Hr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Hr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},gi=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new hi,this.#t=e.mutationCache||new fi,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=cr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ur.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(_r(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=mr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Hr.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Hr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Hr.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Hr.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(pr).catch(pr)}invalidateQueries(e,t={}){return Hr.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Hr.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(pr)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(pr)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(_r(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(pr).catch(pr)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(pr).catch(pr)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ur.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Sr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Cr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Sr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Cr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=xr(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Pr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},K=e(t(),1),q=r(),_i=K.createContext(void 0),vi=e=>{let t=K.useContext(_i);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},yi=({client:e,children:t})=>(K.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,q.jsx)(_i.Provider,{value:e,children:t})),bi=K.createContext(!1),xi=()=>K.useContext(bi);bi.Provider;function Si(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ci=K.createContext(Si()),wi=()=>K.useContext(Ci),Ti=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Ir(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Ei=e=>{K.useEffect(()=>{e.clearReset()},[e])},Di=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ir(n,[e.error,r])),Oi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},ki=(e,t)=>e.isLoading&&e.isFetching&&!t,Ai=(e,t)=>e?.suspense&&t.isPending,ji=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Mi(e,t,n){let r=xi(),i=wi(),a=vi(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Oi(o),Ti(o,i,s),Ei(i);let l=!a.getQueryCache().get(o.queryHash),[u]=K.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(K.useSyncExternalStore(K.useCallback(e=>{let t=f?u.subscribe(Hr.batchCalls(e)):pr;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),K.useEffect(()=>{u.setOptions(o)},[o,u]),Ai(o,d))throw ji(o,u,i);if(Di({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!Rr.isServer()&&ki(d,r)&&(l?ji(o,u,i):s?.promise)?.catch(pr).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Ni(e,t){return Mi(e,ri,t)}function Pi(e){return e}function Fi(e,t){let n=vi(t),[r]=K.useState(()=>new mi(n,e));K.useEffect(()=>{r.setOptions(e)},[r,e]);let i=K.useSyncExternalStore(K.useCallback(e=>r.subscribe(Hr.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=K.useCallback((e,t)=>{r.mutate(e,t).catch(pr)},[r]);if(i.error&&Ir(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var Ii=e(or(),1);function Li(e){return{days:e.days,from:e.from,to:e.to}}var Ri={bookmarks:[`bookmarks`],config:[`config`],dashboards:[`dashboard`],dashboard:(e,t)=>[`dashboard`,Li(e),t],search:(e,t)=>[`search`,e,t],searches:[`search`],sessionDetails:[`session-detail`],sessionDetail:(e,t)=>[`session-detail`,e,t],sessionSnapshots:[`session-snapshot`],sessionSnapshot:e=>[`session-snapshot`,Li(e)],sessionSnapshotAggregateQueries:[`session-snapshot-aggregates`],sessionSnapshotAggregates:e=>[`session-snapshot-aggregates`,Li(e)]},zi=Ri.sessionDetails[0];function Bi(e){let t=e.getQueryCache(),n=t.getAll().map((e,t)=>({query:e,position:t})).filter(({query:e})=>e.queryKey[0]===zi&&e.state.status===`success`&&e.getObserversCount()===0).sort((e,t)=>t.query.state.dataUpdatedAt-e.query.state.dataUpdatedAt||t.position-e.position);for(let{query:e}of n.slice(2))t.remove(e)}function Vi(e){return e.getQueryCache().subscribe(t=>{t.type===`observerRemoved`&&Bi(e)})}function Hi(){return new gi({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:0},mutations:{retry:!1}}})}var Ui=Hi();Vi(Ui);var Wi=e(y(),1);function Gi(e){return K.createElement(Un,{flushSync:Wi.flushSync,...e})}Ln();function Ki(e){return`'${e.replace(/'/g,`'\\''`)}'`}function qi({resumeCommandPrefix:e,sessionId:t,directory:n}){if(!e)return null;let r=`${e} ${Ki(t)}`,i=n??``;return i.trim()?`cd ${Ki(i)} && ${r}`:r}async function Ji(e){if(typeof navigator<`u`&&navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}if(typeof document>`u`)return!1;let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return document.body.removeChild(t),n}function Yi({resumeCommandPrefix:e,sessionId:t,directory:n,className:r=``}){let[i,a]=(0,K.useState)(!1),o=qi({resumeCommandPrefix:e,sessionId:t,directory:n});return(0,K.useEffect)(()=>{if(!i)return;let e=window.setTimeout(()=>a(!1),1500);return()=>window.clearTimeout(e)},[i]),o?(0,q.jsxs)(`button`,{type:`button`,onClick:e=>{e.preventDefault(),e.stopPropagation(),Ji(o).then(e=>{e&&a(!0)})},"aria-label":i?`Resume command copied: ${o}`:`Copy resume command: ${o}`,title:i?`Copied: ${o}`:`Copy: ${o}`,className:`console-mono motion-hover motion-press inline-flex items-center gap-1.5 rounded-sm border px-2 py-1 text-[11px] ${r} ${i?`border-[var(--console-border-strong)] bg-[var(--console-surface-muted)] text-[var(--console-text)]`:`border-[var(--console-border)] bg-[var(--console-surface-muted)] text-[var(--console-muted)] hover:border-[var(--console-border-strong)] hover:text-[var(--console-text)]`}`,children:[i?(0,q.jsx)(m,{className:`size-3`,strokeWidth:1.8}):(0,q.jsx)(c,{className:`size-3`,strokeWidth:1.8}),(0,q.jsx)(`span`,{children:i?`Copied`:`Copy resume`}),(0,q.jsx)(`span`,{className:`sr-only`,"aria-live":`polite`,children:i?`Resume command copied`:``})]}):null}function Xi(e,t){return t!=null&&!yn(t)?0:typeof e==`function`?e():e}function Zi(e,t,n){let r=Xi(e,n);return typeof r==`number`?r:r?.[t]}function Qi(e){return typeof e==`function`?e():e}function $i(e,t){return t||e===`click`||e===`mousedown`}function ea(e){return e?.includes(`mouse`)&&e!==`mousedown`}var ta=[`top`,`right`,`bottom`,`left`],na=Math.min,ra=Math.max,ia=Math.round,aa=Math.floor,oa=e=>({x:e,y:e}),sa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function ca(e,t,n){return ra(e,na(t,n))}function la(e,t){return typeof e==`function`?e(t):e}function ua(e){return e.split(`-`)[0]}function da(e){return e.split(`-`)[1]}function fa(e){return e===`x`?`y`:`x`}function pa(e){return e===`y`?`height`:`width`}function ma(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ha(e){return fa(ma(e))}function ga(e,t,n){n===void 0&&(n=!1);let r=da(e),i=ha(e),a=pa(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Ta(o)),[o,Ta(o)]}function _a(e){let t=Ta(e);return[va(e),t,va(t)]}function va(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ya=[`left`,`right`],ba=[`right`,`left`],xa=[`top`,`bottom`],Sa=[`bottom`,`top`];function Ca(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ba:ya:t?ya:ba;case`left`:case`right`:return t?xa:Sa;default:return[]}}function wa(e,t,n,r){let i=da(e),a=Ca(ua(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(va)))),a}function Ta(e){let t=ua(e);return sa[t]+e.slice(t.length)}function Ea(e){return{top:0,right:0,bottom:0,left:0,...e}}function Da(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ea(e)}function Oa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ka(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=Ye}=t,l=`rootStore`in e?e.rootStore:e,u=l.context.dataRef,d=K.useRef(void 0),f=pn(),p=oe(),m=K.useMemo(()=>{function e(e,t,n,r){let i=W(c,t,n);e&&r===`touch`&&s>0?p.start(s,()=>{l.setOpen(!0,i)}):l.setOpen(e,i)}function t(e,t,n){let r=u.current.openEvent,a=l.select(`domReferenceElement`)!==t;return e&&a||!e||!i?!0:r&&o?!n(r.type):!1}return{onPointerDown(e){d.current=e.pointerType},onMouseDown(n){let i=d.current,o=n.nativeEvent,s=l.select(`open`);if(n.button!==0||r===`click`||yn(i,!0)&&a)return;let c=t(s,n.currentTarget,e=>e===`click`||e===`mousedown`),u=tn(o);if(Ut(u)){e(c,o,u,i);return}let p=n.currentTarget;f.request(()=>{e(c,o,p,i)})},onClick(n){if(r===`mousedown-only`)return;let i=d.current;if(r===`mousedown`&&i){d.current=void 0;return}yn(i,!0)&&a||e(t(l.select(`open`),n.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),n.nativeEvent,n.currentTarget,i)},onKeyDown(){d.current=void 0}}},[u,r,a,c,l,o,i,f,p,s]);return K.useMemo(()=>n?{reference:m}:vn,[n,m])}function Aa(e,t,n){let{reference:r,floating:i}=e,a=ma(t),o=ha(t),s=pa(o),c=ua(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(da(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function ja(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=la(t,e),p=Da(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Oa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ma=50,Na=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ja},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Aa(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ma&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Aa(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pa=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=la(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ua(r),_=ma(o),v=ua(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Ta(o)]:_a(o)),x=p!==`none`;!d&&x&&b.push(...wa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ga(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ma(t))||T.every(e=>ma(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ma(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Fa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ia(e){return ta.some(t=>e[t]>=0)}var La=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=la(e,t);switch(i){case`referenceHidden`:{let e=Fa(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ia(e)}}}case`escaped`:{let e=Fa(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ia(e)}}}default:return{}}}}},Ra=new Set([`left`,`top`]);async function za(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ua(n),s=da(n),c=ma(n)===`y`,l=Ra.has(o)?-1:1,u=a&&c?-1:1,d=la(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ba=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await za(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Va=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=la(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ma(ua(i)),p=fa(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=ca(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=ca(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ha=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=la(e,t),u={x:n,y:r},d=ma(i),f=fa(d),p=u[f],m=u[d],h=la(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Ra.has(ua(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Ua=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=la(e,t),u=await o.detectOverflow(t,l),d=ua(i),f=da(i),p=ma(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=na(h-u[g],v),x=na(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=ra(u.left,0),t=ra(u.right,0),n=ra(u.top,0),r=ra(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:ra(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:ra(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Wa(e){let t=xe(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ut(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ia(n)!==a||ia(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ga(e){return Nt(e)?e:e.contextElement}function Ka(e){let t=Ga(e);if(!ut(t))return oa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Wa(t),o=(a?ia(n.width):n.width)/r,s=(a?ia(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var qa=oa(0);function Ja(e){let t=Jt(e);return!hn()||!t.visualViewport?qa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ya(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function Xa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ga(e),o=oa(1);t&&(r?Nt(r)&&(o=Ka(r)):o=Ka(e));let s=Ya(a,n,r)?Ja(a):oa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Jt(a),t=r&&Nt(r)?Jt(r):r,n=e,i=at(n);for(;i&&r&&t!==n;){let e=Ka(i),t=i.getBoundingClientRect(),r=xe(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Jt(i),i=at(n)}}return Oa({width:u,height:d,x:c,y:l})}function Za(e,t){let n=L(e).scrollLeft;return t?t.left+n:Xa(tt(e)).left+n}function Qa(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Za(e,n),y:n.top+t.scrollTop}}function $a(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=tt(r),s=t?Ht(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oa(1),u=oa(0),d=ut(r);if((d||!d&&!a)&&((Re(r)!==`body`||ln(o))&&(c=L(r)),d)){let e=Xa(r);l=Ka(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Qa(o,c):oa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function eo(e){return Array.from(e.getClientRects())}function to(e){let t=tt(e),n=L(e),r=e.ownerDocument.body,i=ra(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ra(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Za(e),s=-n.scrollTop;return xe(r).direction===`rtl`&&(o+=ra(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var no=25;function ro(e,t){let n=Jt(e),r=tt(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=hn();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Za(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=no&&(a-=o)}else l<=no&&(a+=l);return{width:a,height:o,x:s,y:c}}function io(e,t){let n=Xa(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ut(e)?Ka(e):oa(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function J(e,t,n){let r;if(t===`viewport`)r=ro(e,n);else if(t===`document`)r=to(tt(e));else if(Nt(t))r=io(t,n);else{let n=Ja(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Oa(r)}function ao(e,t){let n=fn(e);return n===t||!Nt(n)||Zt(n)?!1:xe(n).position===`fixed`||ao(n,t)}function oo(e,t){let n=t.get(e);if(n)return n;let r=xt(e,[],!1).filter(e=>Nt(e)&&Re(e)!==`body`),i=null,a=xe(e).position===`fixed`,o=a?fn(e):e;for(;Nt(o)&&!Zt(o);){let t=xe(o),n=on(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||ln(o)&&!n&&ao(e,o))?r=r.filter(e=>e!==o):i=t,o=fn(o)}return t.set(e,r),r}function so(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ht(t)?[]:oo(t,this._c):[].concat(n),r],o=J(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=J(t,a[e],i);s=ra(n.top,s),c=na(n.right,c),l=na(n.bottom,l),u=ra(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function co(e){let{width:t,height:n}=Wa(e);return{width:t,height:n}}function lo(e,t,n){let r=ut(t),i=tt(t),a=n===`fixed`,o=Xa(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=oa(0);function l(){c.x=Za(i)}if(r||!r&&!a)if((Re(t)!==`body`||ln(i))&&(s=L(t)),r){let e=Xa(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Qa(i,s):oa(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function uo(e){return xe(e).position===`static`}function fo(e,t){if(!ut(e)||xe(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return tt(e)===n&&(n=n.ownerDocument.body),n}function po(e,t){let n=Jt(e);if(Ht(e))return n;if(!ut(e)){let t=fn(e);for(;t&&!Zt(t);){if(Nt(t)&&!uo(t))return t;t=fn(t)}return n}let r=fo(e,t);for(;r&&gt(r)&&uo(r);)r=fo(r,t);return r&&Zt(r)&&uo(r)&&!on(r)?n:r||rt(e)||n}var mo=async function(e){let t=this.getOffsetParent||po,n=this.getDimensions,r=await n(e.floating);return{reference:lo(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ho(e){return xe(e).direction===`rtl`}var go={convertOffsetParentRelativeRectToViewportRelativeRect:$a,getDocumentElement:tt,getClippingRect:so,getOffsetParent:po,getElementRects:mo,getClientRects:eo,getDimensions:co,getScale:Ka,isElement:Nt,isRTL:ho};function _o(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vo(e,t){let n=null,r,i=tt(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=aa(d),h=aa(i.clientWidth-(u+f)),g=aa(i.clientHeight-(d+p)),_=aa(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ra(0,na(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!_o(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function yo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ga(e),u=i||a?[...l?xt(l):[],...t?xt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?vo(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Xa(e):null;c&&g();function g(){let t=Xa(e);h&&!_o(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var bo=Ba,xo=Va,So=Pa,Co=Ua,wo=La,To=Ha,Eo=(e,t,n)=>{let r=new Map,i={platform:go,...n},a={...i.platform,_c:r};return Na(e,t,{...i,platform:a})},Do=typeof document<`u`?K.useLayoutEffect:function(){};function Oo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Oo(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Oo(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function ko(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ao(e,t){let n=ko(e);return Math.round(t*n)/n}function jo(e){let t=K.useRef(e);return Do(()=>{t.current=e}),t}function Mo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=K.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=K.useState(r);Oo(f,r)||p(r);let[m,h]=K.useState(null),[g,_]=K.useState(null),v=K.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=K.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=K.useRef(null),C=K.useRef(null),w=K.useRef(u),T=c!=null,E=jo(c),D=jo(i),O=jo(l),k=K.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Eo(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Oo(w.current,t)&&(w.current=t,Wi.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Do(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=K.useRef(!1);Do(()=>(A.current=!0,()=>{A.current=!1}),[]),Do(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=K.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=K.useMemo(()=>({reference:b,floating:x}),[b,x]),N=K.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Ao(M.floating,u.x),r=Ao(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...ko(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return K.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var No=(e,t)=>{let n=bo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Po=(e,t)=>{let n=xo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fo=(e,t)=>({fn:To(e).fn,options:[e,t]}),Io=(e,t)=>{let n=So(e);return{name:n.name,fn:n.fn,options:[e,t]}},Lo=(e,t)=>{let n=Co(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ro=(e,t)=>{let n=wo(e);return{name:n.name,fn:n.fn,options:[e,t]}};function zo(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=R(),a=ke()!=null,o=pt(()=>new ne({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new vt,floatingId:i,syncOnly:!1,nested:a})).current;return Ce(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Nt(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Bo(e={}){let{nodeId:t,externalTree:n}=e,r=zo(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=K.useState(null),[f,p]=K.useState(void 0),[m,h]=K.useState(void 0),g=K.useRef(null),_=Fe(n),v=K.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=Mo({...e,elements:{...v,...u&&{reference:u}}}),b=Nt(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=K.useCallback(e=>{let t=Nt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=K.useCallback(e=>{(Nt(e)||e===null)&&(g.current=e,p(e)),(Nt(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!Nt(e))&&y.refs.setReference(e)},[y.refs,p]),w=K.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=K.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=K.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=K.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return Ce(()=>{s&&(g.current=s)},[s]),Ce(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),K.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var Vo=qe&&ie;function Ho(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=K.useRef(!1),c=K.useRef(null),l=K.useRef(!0),u=oe();K.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=Jt(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&ut(e)&&e===bt(St(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return sn(Pt(t,`blur`,r),Vo&&Pt(t,`keydown`,a,!0),Vo&&Pt(t,`pointerdown`,o,!0))},[i,n]),K.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);Nt(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=K.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=tn(t.nativeEvent);if(Nt(a)){if(Vo&&!t.relatedTarget){if(!l.current&&!Ut(a))return}else if(!gn(a))return}let o=un(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,W(Ze,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,W(Ze,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=Nt(n)&&n.hasAttribute(G(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=bt(St(e));!n&&t===e||Tt(o.current.floatingContext?.refs.floating.current,t)||Tt(e,t)||a||un(n??t,i.context.triggerElements)||i.setOpen(!1,W(Ze,r))})}}},[o,r,i,u]);return K.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Uo=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new le,this.restTimeout=new le,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Wo=new WeakMap;function Go(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Wo.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Wo.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Ko(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Wo.get(n);a&&a!==e&&Go(a),Go(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Wo.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function qo(e){let t=e.context.dataRef.current,n=pt(()=>t.hoverInteractionState??Uo.create()).current;return t.hoverInteractionState||=n,Pe(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Jo(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=Fe(),d=ke(),f=qo(a),p=oe(),m=rn(()=>$i(l.current.openEvent?.type,f.interactedInside)),h=rn(()=>ea(l.current.openEvent?.type)),g=rn(()=>{Go(f)});Ce(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),K.useEffect(()=>g,[g]),Ce(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&Nt(c)&&s){let e=c,t=s,n=St(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r,o=f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body;return Ko(f,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),K.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&U(u.nodesRef.current,d).length>0)}function t(e){let t=Zi(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,W(ge,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=tn(e);if(!Qt(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,v),g()}function _(n){if(e()&&u){u.events.on(`floating.closed`,v);return}if(un(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&Nt(o)&&U(u.nodesRef.current,r,!1).some(e=>Tt(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),h()&&!m()&&t(n)}}function v(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,v),a.setOpen(!1,W(ge,t)),u.events.emit(`floating.closed`,t)})}let y=s;return sn(y&&Pt(y,`mouseenter`,c),y&&Pt(y,`mouseleave`,_),y&&Pt(y,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,v)})},[n,s,a,l,r,i,h,m,g,f,u,d,p])}var Yo={current:null};function Xo(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Yo,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=Fe(l),v=qo(m),y=K.useRef(!1),b=Yt(i),x=Yt(r),S=Yt(o),C=Yt(n),w=Yt(p),T=Yt(f),E=rn(()=>$i(h.current.openEvent?.type,v.interactedInside)),D=rn(()=>w.current?.()!==!1),O=rn((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!Tt(e,t);if(!Nt(n))return!1;let i=n;return r.hasMatchingElement(e=>Tt(e,i))&&(!e||!Tt(e,i))}),k=rn(()=>{v.handler&&=(St(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=rn(()=>{Go(v)});return u&&(v.handleCloseOptions=b.current?.__options),K.useEffect(()=>k,[k]),K.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===ge,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),K.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=Zi(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,W(ge,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,W(ge,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!Nt(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!yn(v.pointerType))return;let t=Qi(S.current),n=Zi(x.current,`open`,v.pointerType),r=tn(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(Nt(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(Tt(e,r)){s=e;break}}Nt(i)&&Nt(o)&&!m.context.triggerElements.hasElement(i)&&Tt(i,o)&&(s=o);let c=s!=null&&O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&Nt(s)&&Nt(o)&&Tt(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,W(ge,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,W(ge,e,s))}):g&&D()&&m.setOpen(!0,W(ge,e,s)))}function i(t){if(E()){A();return}k();let n=St(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!un(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!Tt(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?sn(Pt(t,`mousemove`,r,{once:!0}),Pt(t,`mouseenter`,r),Pt(t,`mouseleave`,i)):sn(Pt(t,`mouseenter`,r),Pt(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),K.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!yn(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);if(e){let t=v.handleCloseOptions?.getScope?.()??n.ownerDocument.body;Ko(v,{scopeElement:t,referenceElement:n,floatingElement:e})}}let s=Qi(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,W(ge,t,n))}v.pointerType===`touch`?Wi.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var Zo=`Escape`;function Qo(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function $o(e,t){return Qo(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function es(e,t,n){return Qo(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ts(e,t,n){return Qo(t,n?e===jt:e===Ot,e===Kt)}function ns(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===Zo:Qo(t,n?e===Ot:e===jt,e===ct)}function rs(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,parentOrientation:_,id:v,resetOnPointerLeave:y=!0,externalTree:b,grid:x}=t,S=x!=null,C=`rootStore`in e?e.rootStore:e,w=C.useState(`open`),T=C.useState(`floatingElement`),E=C.useState(`domReferenceElement`),D=C.context.dataRef,O=dt(T),k=_t(E),A=Yt(O),j=ke(),M=Fe(b),N=K.useRef(f),P=K.useRef(o??-1),F=K.useRef(null),I=K.useRef(!0),L=rn(e=>{i(P.current===-1?null:P.current,e)}),ee=K.useRef(!!T),te=K.useRef(w),R=K.useRef(!1),B=K.useRef(!1),V=K.useRef(null),ne=Yt(h),re=Yt(w),ie=Yt(o),H=Yt(y),ae=pn(),oe=pn(),se=rn(()=>{function e(e){d?M?.events.emit(`virtualfocus`,e):V.current=z(e,{sync:R.current,preventScroll:!0})}let t=n.current[P.current],r=B.current;t&&e(t),(R.current?e=>e():e=>ae.request(e))(()=>{let i=n.current[P.current]||t;i&&(t||e(i),me&&(r||!I.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Ce(()=>{D.current.orientation=g},[D,g]),Ce(()=>{a&&(w&&T?(P.current=o??-1,N.current&&o!=null&&(B.current=!0,L())):ee.current&&(P.current=-1,L()))},[a,w,T,o,L]),Ce(()=>{if(a){if(!w){R.current=!1;return}if(T)if(r==null){if(R.current=!1,ie.current!=null)return;if(ee.current&&(P.current=-1,se()),(!te.current||!ee.current)&&N.current&&(F.current!=null||N.current===!0&&F.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>oe.request(e):queueMicrotask)(t),e+=1):(P.current=F.current==null||es(F.current,g,u)||l?nt(n):be(n),F.current=null,L())};t()}}else it(n.current,r)||(P.current=r,se(),B.current=!1)}},[a,w,T,r,ie,l,n,g,u,L,se,oe]),Ce(()=>{if(!a||T||!M||d||!ee.current)return;let e=M.nodesRef.current,t=e.find(e=>e.id===j)?.context?.elements.floating,n=bt(St(E??t??null)),r=e.some(e=>e.context&&Tt(e.context.elements.floating,n));t&&!r&&I.current&&t.focus({preventScroll:!0})},[a,T,E,M,j,d]),Ce(()=>{te.current=w,ee.current=!!T}),Ce(()=>{w||(F.current=null,N.current=f)},[w,f]);let ce=r!=null,le=rn(e=>{if(!re.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(P.current!==t||r!==t)&&(P.current=t,L(e))}),ue=rn(()=>_??M?.nodesRef.current.find(e=>e.id===j)?.context?.dataRef?.current.orientation),de=rn(()=>nt(n,ne.current)),pe=rn(e=>{if(I.current=!1,R.current=!0,e.which===229||!re.current&&e.currentTarget===A.current)return;if(l&&ns(e.key,g,u,S)){$o(e.key,ue())||Tn(e),C.setOpen(!1,W(Ve,e.nativeEvent)),ut(E)&&(d?M?.events.emit(`virtualfocus`,E):E.focus());return}let t=P.current,r=nt(n,h),i=be(n,h);if(k||(e.key===`Home`&&(Tn(e),P.current=r,L(e)),e.key===`End`&&(Tn(e),P.current=i,L(e))),x!=null){let t=x(e,P.current,n,g,c,u,h,r,i);if(t!=null&&(P.current=t,L(e)),g===`both`)return}if($o(e.key,g)){if(Tn(e),w&&!d&&bt(e.currentTarget.ownerDocument)===e.currentTarget){P.current=es(e.key,g,u)?r:i,L(e);return}es(e.key,g,u)?c?t>=i?s&&t!==n.current.length?P.current=-1:(R.current=!1,P.current=r):P.current=nn(n.current,{startingIndex:t,disabledIndices:h}):P.current=Math.min(i,nn(n.current,{startingIndex:t,disabledIndices:h})):c?t<=r?s&&t!==-1?P.current=n.current.length:(R.current=!1,P.current=i):P.current=nn(n.current,{startingIndex:t,decrement:!0,disabledIndices:h}):P.current=Math.max(r,nn(n.current,{startingIndex:t,decrement:!0,disabledIndices:h})),it(n.current,P.current)&&(P.current=-1),L(e)}}),me=K.useMemo(()=>({onFocus(e){R.current=!0,le(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){R.current=!0,B.current=!1,p&&le(e)},onPointerLeave(e){if(!re.current||!I.current||e.pointerType===`touch`)return;R.current=!0;let t=e.relatedTarget;if(!(!p||n.current.includes(t))&&H.current&&(V.current?.(),V.current=null,P.current=-1,L(e),!d)){let e=A.current,t=bt(St(e));e&&Tt(e,t)&&e.focus({preventScroll:!0})}}}),[le,re,A,p,n,L,H,d]),U=K.useMemo(()=>d&&w&&ce&&{"aria-activedescendant":`${v}-${r}`},[d,w,ce,v,r]),he=K.useMemo(()=>({"aria-orientation":g===`both`?void 0:g,...k?{}:U,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&w&&!d){let t=tn(e.nativeEvent);if(t&&!Tt(A.current,t))return;Tn(e),C.setOpen(!1,W(fe,e.nativeEvent)),ut(E)&&E.focus();return}pe(e)},onPointerMove(){I.current=!0}}),[U,pe,A,g,k,C,w,d,E]),ge=K.useMemo(()=>{function e(e){C.setOpen(!0,W(Ve,e.nativeEvent,e.currentTarget))}function t(e){f===`auto`&&On(e.nativeEvent)&&(N.current=!d)}function n(e){N.current=f,f===`auto`&&mt(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(t){let n=C.select(`open`);I.current=!1;let r=t.key.startsWith(`Arrow`),i=ts(t.key,ue(),u),a=$o(t.key,g),o=(l?i:a)||t.key===`Enter`||t.key.trim()===``;if(d&&n)return pe(t);if(!(!n&&!m&&r)){if(o){let e=$o(t.key,ue());F.current=l&&e?null:t.key}if(l){i&&(Tn(t),n?(P.current=de(),L(t)):e(t));return}a&&(ie.current!=null&&(P.current=ie.current),Tn(t),!n&&m?e(t):pe(t),n&&L(t))}},onFocus(e){C.select(`open`)&&!d&&(P.current=-1,L(e))},onPointerDown:n,onPointerEnter:n,onMouseDown:t,onClick:t}},[pe,f,de,l,L,C,m,g,ue,u,ie,d]),_e=K.useMemo(()=>({...U,...ge}),[U,ge]);return K.useMemo(()=>a?{reference:_e,floating:he,item:me,trigger:ge}:{},[a,_e,he,ge,me])}function is(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=`rootStore`in e?e.rootStore:e,f=d.useState(`open`),p=oe(),m=K.useRef(``),h=K.useRef(u??i??-1),g=K.useRef(null),_=rn(e=>{function t(e){let t=r?.current[e];return!t||et(t)}function c(e){return t(e)?o==null||!Le(st,e,o):!1}function d(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(!(!e[n]?.toLowerCase().startsWith(i)||!c(n)))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(Tn(e),s?.(!0)),m.current.length>0&&m.current[0]!==` `&&d(_,m.current)===-1&&e.key!==` `&&s?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(Tn(e),s?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&c(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,s?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=d(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,s?.(!1)):(a?.(b),g.current=b)}),v=rn(e=>{let t=e.relatedTarget,n=d.select(`domReferenceElement`),r=d.select(`floatingElement`);Tt(n,t)||Tt(r,t)||(p.clear(),m.current=``,h.current=g.current,s?.(!1))});Ce(()=>{!f&&u!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[f,u,p]),Ce(()=>{f&&m.current===``&&(h.current=u??i??-1)},[f,u,i]);let y=K.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return K.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var as=.1,os=as*as,ss=.5;function cs(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ls(e,t,n,r,i,a,o,s,c,l){let u=!1;return cs(e,t,n,r,i,a)&&(u=!u),cs(e,t,i,a,o,s)&&(u=!u),cs(e,t,o,s,c,l)&&(u=!u),cs(e,t,c,l,n,r)&&(u=!u),u}function us(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function ds(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function fs(e={}){let{blockPointerEvents:t=!1}=e,n=new le,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*os;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=tn(r),g=r.type===`mouseleave`,_=Tt(u,h),v=Tt(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Nt(r.relatedTarget)&&Tt(u,r.relatedTarget))return;function y(){return!!(s&&U(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=ds(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=ds(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=ds(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=ds(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!us(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?ss/2:ss*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+ss+1,o=C||T?S.bottom-ss:S.top,s=C?T?S.bottom-ss:S.top:S.bottom-ss;M=ls(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?ss/2:ss*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-ss,o=C||T?S.top+ss:S.bottom,s=C?T?S.top+ss:S.bottom:S.top+ss;M=ls(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?ss/2:ss*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+ss+1,o=w||E?S.right-ss:S.left,s=w?E?S.right-ss:S.left:S.right-ss;M=ls(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?ss/2:ss*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-ss,o=w||E?S.left+ss:S.right,s=w?E?S.left+ss:S.right:S.left+ss;M=ls(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function ps(e){let t=K.useRef(``),n=K.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:K.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function ms(e,t){let n=K.useRef(e),r=rn(t);Ce(()=>{n.current!==e&&r(n.current)},[e,r]),Ce(()=>{n.current=e},[e])}function hs(e,t){let{onClick:n,onPointerDown:r}=ps(rn((n,r)=>{(typeof e==`function`?e():e)||t(r||(Sn?`touch`:``))}));return K.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function gs(e){let[t,n]=K.useState(null),r=hs(e,n);return ms(e,t=>{t&&!e&&n(null)}),K.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function _s({target:e,onClose:t,onSave:n,onRemove:r}){let[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(!1);(0,K.useEffect)(()=>{a(e?.displayTitle??e?.title??``),s(null)},[e]);let u=async()=>{let r=i.trim();if(!r||r===e?.title.trim()){await d();return}l(!0),s(null);try{await n(r),t()}catch(e){s(e instanceof Error?e.message:`Could not rename this session.`)}finally{l(!1)}},d=async()=>{l(!0),s(null);try{await r(),t()}catch(e){s(e instanceof Error?e.message:`Could not restore the title.`)}finally{l(!1)}};return(0,q.jsx)(qt,{open:e!==null,onOpenChange:e=>e?void 0:t(),children:(0,q.jsxs)(Mt,{children:[(0,q.jsx)(yt,{className:`motion-backdrop fixed inset-0 z-50 bg-black/35`}),(0,q.jsxs)(cn,{className:`motion-modal fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-5 shadow-2xl outline-none`,children:[(0,q.jsx)(dn,{className:`console-mono text-sm font-semibold text-[var(--console-text)]`,children:`Rename session`}),(0,q.jsxs)(`label`,{className:`console-mono mt-4 block text-[11px] uppercase tracking-wide text-[var(--console-muted)]`,children:[`Session title`,(0,q.jsx)(`input`,{autoFocus:!0,autoComplete:`off`,name:`session-title`,maxLength:160,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&u()},"aria-invalid":o?!0:void 0,"aria-describedby":o?`session-alias-error`:void 0,className:`mt-1.5 w-full rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-3 py-2 text-sm normal-case tracking-normal text-[var(--console-text)] outline-none focus:border-[var(--console-accent)] focus:ring-2 focus:ring-[var(--console-accent)]/25`})]}),o?(0,q.jsx)(`p`,{id:`session-alias-error`,"aria-live":`polite`,className:`mt-2 text-xs text-[var(--console-error)]`,children:o}):null,(0,q.jsxs)(`div`,{className:`mt-5 flex items-center justify-between gap-3`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:()=>void d(),disabled:c||!e?.displayTitle,className:`text-xs text-[var(--console-muted)] underline decoration-[var(--console-border-strong)] underline-offset-4 hover:text-[var(--console-text)] disabled:cursor-not-allowed disabled:opacity-40`,children:`Remove custom title`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(Lt,{className:`rounded-sm border border-[var(--console-border)] px-3 py-1.5 text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)]`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`button`,disabled:c,onClick:()=>void u(),className:`rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-text)] px-3 py-1.5 text-xs text-white hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60 dark:text-[var(--console-bg)]`,children:c?`Saving…`:`Save title`})]})]})]})]})})}function vs(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}function ys(e){if(!e)return null;let{from:t,to:n,days:r}=e.window;if(r===0||t==null)return`All time`;let i=vs(t),a=vs(n??Date.now());return r?`Last ${r}d · ${i} → ${a}`:`${i} → ${a}`}function bs(e,t,n){return t?e?`Searching for "${e}"`:`Loading recent sessions`:e?`${n} matches for "${e}"`:`${n} recent sessions`}function xs(e){if(!e)return null;if(e.backfill?.active){let t=e.backfill.currentAgent,n=e.backfill.pendingAgents.length;return t?`Indexing full history · ${t}${n>0?` · ${n} queued`:``}`:`Indexing full history`}if(e.backfill?.failedAgents.length)return`History indexing failed · ${e.backfill.failedAgents.join(`, `)}`;if(!e.active)return null;let t=e.completedAgents.length,n=e.totalAgents,r=e.scanningAgents[0],i=r?e.agentStatuses[r]:null,a=i?.total&&i.processed!=null?` · ${i.processed}/${i.total}`:``,o=n>0?r?` · ${r}${a} · ${t}/${n} agents ready`:` · ${t}/${n} agents ready`:``;return e.phase===`initializing`?`First-run setup: indexing recent sessions${o}. Full history continues in the background.`:e.phase===`indexing`?`Preparing local session index`:n>0?r?`Checking for new or changed sessions · ${r}${a} · ${t}/${n} agents ready`:`Checking for new or changed sessions · ${t}/${n} agents ready`:`Checking for new or changed sessions`}function Ss(e,t){let n=e?.agentStatuses[t];return!n||n.status===`complete`?null:n.status===`indexing`?`Indexing`:n.total&&n.processed!=null?`${n.processed}/${n.total}`:n.status===`scanning`?`Scanning`:`Pending`}var Cs=[{value:`7d`,label:`Last 7 days`},{value:`14d`,label:`Last 14 days`},{value:`30d`,label:`Last 30 days`},{value:`90d`,label:`Last 90 days`},{value:`all`,label:`All time`}];function ws({window:e,preset:t,customFrom:n,customTo:r,onSelectPreset:i,onSelectCustom:a}){let[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(``),f=ys({window:e}),p=()=>{l(n??(e.from==null?``:vs(e.from))),d(r??vs(e.to??Date.now())),s(!0)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,q.jsxs)(`label`,{className:`relative block`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:`Session time range`}),(0,q.jsxs)(`select`,{value:t,title:f??`Session time range`,onChange:e=>{let t=e.target.value;t===`custom`?p():i(t)},className:`console-mono w-24 appearance-none rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] py-1 pr-6 pl-2 text-xs text-[var(--console-text)] outline-none hover:border-[var(--console-border-strong)] focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2 sm:w-auto sm:max-w-44 sm:pr-7`,children:[Cs.map(e=>(0,q.jsx)(`option`,{value:e.value,children:e.label},e.value)),(0,q.jsx)(`option`,{value:`custom`,children:`Custom range`})]}),(0,q.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-[10px] text-[var(--console-muted)]`,children:`▾`})]}),t===`custom`?(0,q.jsx)(`button`,{type:`button`,onClick:p,"aria-label":`Edit custom time range`,className:`console-mono motion-hover motion-press rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-1.5 py-1 text-xs text-[var(--console-muted)] hover:border-[var(--console-border-strong)] hover:text-[var(--console-text)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2`,children:`Edit`}):null]}),(0,q.jsx)(qt,{open:o,onOpenChange:s,children:(0,q.jsxs)(Mt,{children:[(0,q.jsx)(yt,{className:`motion-backdrop fixed inset-0 z-50 bg-black/35`}),(0,q.jsxs)(cn,{className:`motion-modal fixed top-1/2 left-1/2 z-50 w-[calc(100%-2rem)] max-w-sm -translate-x-1/2 -translate-y-1/2 rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-5 shadow-2xl outline-none`,children:[(0,q.jsx)(dn,{className:`console-mono text-sm font-semibold text-[var(--console-text)]`,children:`Custom time range`}),(0,q.jsx)(`p`,{className:`mt-1 text-xs text-[var(--console-muted)]`,children:`Both dates are included.`}),(0,q.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-3`,children:[(0,q.jsxs)(`label`,{className:`console-mono text-[11px] uppercase tracking-wide text-[var(--console-muted)]`,children:[`From`,(0,q.jsx)(`input`,{type:`date`,value:c,max:u||void 0,onChange:e=>l(e.target.value),className:`mt-1.5 w-full rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-2 py-2 text-xs normal-case tracking-normal text-[var(--console-text)] outline-none focus:border-[var(--console-accent)] focus:ring-2 focus:ring-[var(--console-accent)]/25`})]}),(0,q.jsxs)(`label`,{className:`console-mono text-[11px] uppercase tracking-wide text-[var(--console-muted)]`,children:[`To`,(0,q.jsx)(`input`,{type:`date`,value:u,min:c||void 0,onChange:e=>d(e.target.value),className:`mt-1.5 w-full rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-2 py-2 text-xs normal-case tracking-normal text-[var(--console-text)] outline-none focus:border-[var(--console-accent)] focus:ring-2 focus:ring-[var(--console-accent)]/25`})]})]}),(0,q.jsxs)(`div`,{className:`mt-5 flex justify-end gap-2`,children:[(0,q.jsx)(Lt,{className:`rounded-sm border border-[var(--console-border)] px-3 py-1.5 text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)]`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`button`,disabled:!c||!u||c>u,onClick:()=>{a(c,u),s(!1)},className:`rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-text)] px-3 py-1.5 text-xs text-white hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40 dark:text-[var(--console-bg)]`,children:`Apply range`})]})]})]})})]})}var Ts={agent:`agent`,notFound:`not-found`,project:`project`,projects:`projects`,root:`root`,session:`session`},Es=[{index:!0,id:Ts.root},{path:`projects`,children:[{index:!0,id:Ts.projects},{path:`:projectKind/:projectKey`,id:Ts.project}]},{path:`:agentKey`,id:Ts.agent,children:[{path:`:sessionId`,id:Ts.session}]},{path:`*`,id:Ts.notFound}];function Ds(e){try{decodeURI(new URL(e.url).pathname)}catch{throw new Response(`Malformed URL`,{status:400,statusText:`Bad Request`})}}function Os({request:e}){return Ds(e),null}var ks={mode:`invalidRoute`,activeAgentKey:null,activeSessionId:null};function As(e,t){let n=e.at(-1);if(!n)return ks;if(n.id===Ts.root)return{mode:`root`,activeAgentKey:null,activeSessionId:null};if(n.id===Ts.projects)return{mode:`projects`,activeAgentKey:null,activeSessionId:null};if(n.id===Ts.project){let e=n.params.projectKind,t=n.params.projectKey;return!e||!t||!T(e)?ks:{mode:`project`,activeAgentKey:null,activeSessionId:null,activeProjectKind:e,activeProjectKey:t}}if(n.id===Ts.agent||n.id===Ts.session){let e=n.params.agentKey?.toLowerCase();if(!e||!t.has(e))return{mode:`missingAgent`,activeAgentKey:null,activeSessionId:null,attemptedKey:e??``};if(n.id===Ts.agent)return{mode:`agent`,activeAgentKey:e,activeSessionId:null};let r=n.params.sessionId;return r?{mode:`session`,activeAgentKey:e,activeSessionId:r}:ks}return ks}function js(){let[e,t]=(0,K.useState)(null),n=(0,K.useCallback)(e=>{t(t=>t&&e.updatedAt<t.updatedAt?t:e)},[]);return(0,K.useEffect)(()=>{let e=!1;return Ae().then(t=>{e||n(t)}).catch(e=>{console.error(`Failed to load scan status:`,e)}),()=>{e=!0}},[n]),{scanStatus:e,setScanStatus:n}}var Ms=1;function Ns(e){return e.mode===`session`?{agent:e.activeAgentKey,sessionId:e.activeSessionId}:null}function Ps(e){let t=Ns(e),n=Ni({queryKey:Ri.sessionDetail(t?.agent??``,t?.sessionId??``),enabled:t!==null,staleTime:1/0,queryFn:async({signal:e})=>{if(!t)throw Error(`Session route is required`);let n=Ms++,r=`${t.agent}/${t.sessionId}`,i=performance.now(),a=!1,o=()=>{a||(a=!0,An(`session.open.cancel`,{request_id:n,request_key:r,reason:`query-cancelled`}))};e.addEventListener(`abort`,o,{once:!0}),An(`session.open.start`,{request_id:n,request_key:r,trigger:`route`,agent:t.agent,session:t.sessionId});try{let a=await de(t.agent,t.sessionId,{signal:e});if(e.aborted)throw new DOMException(`Aborted`,`AbortError`);return An(`session.open.done`,{request_id:n,request_key:r,trigger:`route`,agent:t.agent,session:t.sessionId,duration_ms:Math.round(performance.now()-i),messages:a.messages.length}),a}catch(a){throw e.aborted?(o(),a):(An(`session.open.error`,{request_id:n,request_key:r,trigger:`route`,agent:t.agent,session:t.sessionId,duration_ms:Math.round(performance.now()-i),error:a instanceof Error?a.message:String(a)}),a)}finally{e.removeEventListener(`abort`,o)}}}),r=(0,K.useCallback)(async()=>{t&&await n.refetch({cancelRefetch:!0})},[n,t]);return{session:t?n.data??null:null,sessionLoading:t!==null&&n.isPending,sessionError:t!==null&&n.isError?`Session not found`:null,refresh:r}}function Fs(e,t){return{agent:e.agent,projectKind:e.project?.kind,projectKey:e.project?.key,tag:e.tag,tool:e.tool,fileKind:e.fileKind,costMin:t}}function Is(e,t){return e.trim().length>0||!!(t.tool||t.fileKind)}function Ls(e,t,n){let r=t.agent?e.byAgent.get(t.agent)??[]:null,i=t.project?C(t.project):void 0,a=i?e.byProjectIdentityKey.get(i)??[]:null,o=r&&a?r.length<=a.length?r:a:r??a??e.sessionsByActivity,s=[];for(let e of o)if(!(t.agent&&k(e)!==t.agent)&&!(i&&(!e.project_identity||C(e.project_identity)!==i))&&!(t.tag&&!e.smart_tags?.includes(t.tag))&&!(n!==void 0&&e.stats.total_cost<n)&&(s.push({reference:{agentName:k(e),sessionId:e.id},session:e,snippet:`Recent session · ${e.directory}`,matchType:`recent`}),s.length>=50))break;return s}function Rs({usesServerSearch:e,isLoading:t,results:n,selectedProject:r,recentProjectOptions:i}){if(!e)return i;let a=new Map,o=t?[]:n;for(let e of o){let t=e.session.project_identity;if(!t?.key)continue;let n=C(t),r=a.get(n);if(r){r.count+=1;continue}a.set(n,{key:n,identityKind:t.kind,identityKey:t.key,label:t.displayName||e.session.directory,count:1,showCount:!1})}let s=r?C(r):void 0,c=s?i.find(e=>e.key===s):void 0;return s&&c&&!a.has(s)&&a.set(s,{...c,count:0,showCount:!1}),[...a.values()].toSorted((e,t)=>t.count-e.count).slice(0,8)}var zs=[];function Bs(e,t=null){let[n,r]=(0,K.useState)(``),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)({}),[u,d]=(0,K.useState)(0),f=(0,K.useRef)(null),p=(0,K.useRef)(new Map),m=(0,K.useMemo)(()=>Jn.find(e=>e.id===c.costRange)?.costMin,[c.costRange]),h=(0,K.useMemo)(()=>({...Fs(c,m),from:t?.from,to:t?.to}),[c,m,t]),g=Is(i,c),_=(0,K.useMemo)(()=>Ls(e,c,m),[e,c,m]),v=Ni({queryKey:Ri.search(i,h),enabled:o&&g,queryFn:async({signal:e})=>{let t=performance.now();An(`search.start`,{query_length:i.length});try{let n=await Ie(i,h,{signal:e});return An(`search.done`,{duration_ms:Math.round(performance.now()-t),results:n.results.length}),n.results}catch(n){throw e.aborted||(console.error(`Failed to load search results:`,n),An(`search.error`,{duration_ms:Math.round(performance.now()-t),error:n instanceof Error?n.message:String(n)})),n}}}),y=(0,K.useMemo)(()=>o?g?v.isPending?{status:`loading`}:v.isError?{status:`failed`,error:v.error instanceof Error?v.error.message:`Search request failed`}:{status:`loaded`,results:v.data}:{status:`loaded`,results:_}:{status:`idle`},[_,o,v,g]),b=(0,K.useMemo)(()=>y.status===`loaded`?y.results:zs,[y]),x=y.status===`loading`,S=(0,K.useMemo)(()=>Rs({usesServerSearch:g,isLoading:x,results:b,selectedProject:c.project,recentProjectOptions:e.projectOptions}),[c.project,x,b,e.projectOptions,g]);(0,K.useEffect)(()=>{o&&d(e=>b.length===0?0:Math.min(e,b.length-1))},[o,b.length]),(0,K.useEffect)(()=>{if(!o)return;let e=b[u];if(!e)return;let t=`${e.reference.agentName}/${e.reference.sessionId}`;p.current.get(t)?.scrollIntoView({block:`nearest`})},[o,b,u]);let C=(0,K.useCallback)(()=>{s(!0),window.setTimeout(()=>{f.current?.focus(),f.current?.select()},0)},[]),w=(0,K.useCallback)(()=>{a(n.trim()),s(!0),d(0)},[n]),T=(0,K.useCallback)(()=>{s(!1),a(``)},[]),E=(0,K.useCallback)(()=>{v.refetch()},[v]);return{draftSearchQuery:n,activeSearchQuery:i,searchMode:o,searchFilters:c,searchState:y,searchResults:b,searchLoading:x,projectOptions:S,usesServerSearch:g,selectedSearchIndex:u,searchInputRef:f,registerResultRef:(0,K.useCallback)((e,t)=>{t?p.current.set(e,t):p.current.delete(e)},[]),setDraftSearchQuery:r,setSearchFilters:l,setSelectedSearchIndex:d,openSearch:C,submitSearch:w,closeSearch:T,retrySearch:E,refresh:(0,K.useCallback)(async()=>{o&&g&&await v.refetch()},[o,v,g])}}var Vs=[];function Hs(e){return e.map(({bookmarkedAt:e,...t})=>t)}function Us(e,t,n){let r=$n(t.reference);return n?e.filter(e=>$n(e.reference)!==r):[...e,t].toSorted((e,t)=>{let n=e.session.time_updated??e.session.time_created;return(t.session.time_updated??t.session.time_created)-n})}function Ws(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function Gs(e){let t=vi(),n=Ni({queryKey:Ri.bookmarks,queryFn:async({signal:e})=>{try{return await zt({signal:e})}catch(t){throw e.aborted||console.error(`Failed to load bookmarks:`,t),t}}}),r=n.data?.bookmarks??Vs,i=(0,K.useCallback)(e=>{t.setQueryData(Ri.bookmarks,{bookmarks:e})},[t]),{mutate:a}=Fi({mutationFn:async({snapshot:e,isBookmarked:t})=>{if(t){await ce(e.reference);return}let{bookmarkedAt:n,...r}=e;await Xe(r)},onMutate:async({snapshot:e,isBookmarked:n})=>{let r=t.cancelQueries({queryKey:Ri.bookmarks}),a=t.getQueryData(Ri.bookmarks);return i(Us(a?.bookmarks??[],e,n)),An(n?`bookmark.delete`:`bookmark.add`,{agent:e.reference.agentName,session:e.reference.sessionId}),await r,a},onError:(e,n,r)=>{r&&t.setQueryData(Ri.bookmarks,r),console.error(`Failed to toggle bookmark:`,e)}}),{mutate:o}=Fi({mutationFn:e=>Te(e)}),{mutate:s}=Fi({mutationFn:e=>Te(e)});(0,K.useEffect)(()=>{let t=Yn(r,e);t===r||Ws(t,r)||(i(t),o(Hs(t),{onError:e=>console.error(`Failed to sync bookmark snapshots:`,e)}))},[r,e,i,o]),(0,K.useEffect)(()=>{let e=Xn();e.length!==0&&(t.cancelQueries({queryKey:Ri.bookmarks}),s(Hs(e),{onSuccess:e=>{i(e.bookmarks),Zn()},onError:e=>console.error(`Failed to migrate legacy bookmarks:`,e)}))},[s,t,i]);let c=(0,K.useMemo)(()=>new Set(r.map(e=>$n(e.reference))),[r]),l=(0,K.useCallback)((e,t)=>c.has($n({agentName:e,sessionId:t})),[c]),u=(0,K.useCallback)(e=>{let t=$n(e.reference);a({snapshot:e,isBookmarked:c.has(t)})},[c,a]),d=(0,K.useCallback)((e,t)=>{u(Qn(e,t))},[u]),f=(0,K.useMemo)(()=>r.toSorted((e,t)=>(t.session.time_updated??t.session.time_created)-(e.session.time_updated??e.session.time_created)),[r]),p=n.refetch;return{bookmarkedSessions:f,isSessionBookmarked:l,toggleBookmark:u,toggleSessionBookmark:d,refresh:(0,K.useCallback)(async()=>{await p()},[p])}}function Ks(e,t){let n=t?.projectKind,r=t?.projectKey,i=t?.identityKey,a=t!==void 0,[o,s]=(0,K.useState)(void 0),c=e!==null&&(!a||r!==void 0);(0,K.useEffect)(()=>{i&&s(void 0)},[i]);let l=Ni({queryKey:Ri.dashboard(e??{},{projectKind:n,projectKey:r,agent:o}),enabled:c,queryFn:async({signal:t})=>{if(!e)throw Error(`Dashboard window is required`);try{return await It(e,{projectKind:n,projectKey:r,agent:o},{signal:t})}catch(e){throw t.aborted||console.error(`Failed to load dashboard:`,e),e}}});return{dashboard:c?l.data??null:null,loading:c&&l.isPending,error:c&&l.isError?`Failed to load dashboard`:null,selectedAgent:o,setSelectedAgent:s}}function qs(e){return e.mode===`projects`||e.mode===`project`?`projects`:e.mode===`agent`||e.mode===`missingAgent`?`agents`:null}function Js(e,t){return e.find(e=>t===C(In(e)))??null}function Ys(e,t,n){return t?n?e.byProjectAgentKey.get(N(t,n))??[]:e.byProjectIdentityKey.get(t)??[]:[]}function Xs({viewState:e,sessionIndexes:t,session:n,agents:r,projects:i,selectedProjectAgent:a,isSessionBookmarked:o}){let s=qs(e),[c,l]=(0,K.useState)(s??`agents`),u=s??c;return(0,K.useEffect)(()=>{s&&l(s)},[s]),{browseBy:u,selectBrowseBy:(0,K.useCallback)(e=>{l(e)},[]),...(0,K.useMemo)(()=>{let s=e.activeAgentKey,c=r.find(e=>e.name.toLowerCase()===s)??null,l=e.mode===`project`?{kind:e.activeProjectKind,key:e.activeProjectKey}:null,d=l?C(l):null,f=l&&d?{identity:l,identityKey:d,project:Js(i,d)}:null,p=d?t.byLandingProjectIdentityKey.get(d)??[]:[],m=e.mode===`session`?t.byRouteKey.get(F(e.activeAgentKey,e.activeSessionId))??null:null,h=(e.mode===`session`&&n?.id===e.activeSessionId?n:null)?.project_identity??m?.project_identity??null,g=u===`projects`?e.mode===`project`?l:e.mode===`session`?h:null:null,_=g?C(g):null,v=null;g&&_&&(v=f?.identityKey===_?f:{identity:g,identityKey:_,project:Js(i,_)});let y=s?t.byAgent.get(s)??[]:[],b=Ys(t,_,a),x=u===`projects`?b:y,S=zn(x),w=new Set(x.filter(e=>o(k(e),e.id)).map(Hn));return{activeAgentKey:s,activeAgent:c,activeProject:f,activeProjectSessions:p,openedSessionProjectIdentity:h,selectedProjectNavigation:v,sidebarSessions:x,sidebarSessionLookup:S,bookmarkedSidebarSessionReferences:w}},[r,u,o,i,a,n,t,e])}}function Zs(e){return[e.invalidateQueries({queryKey:Ri.sessionSnapshotAggregateQueries}),e.invalidateQueries({queryKey:Ri.dashboards}),e.invalidateQueries({queryKey:Ri.searches})]}async function Qs(e){await Promise.all([...Zs(e),e.invalidateQueries({queryKey:Ri.sessionDetails})])}async function $s(e,t){let n=new Map;for(let e of t.changedSessionHeads){let{agentName:t,sessionId:r}=e.reference;n.set(`${t.toLowerCase()}\0${r}`,Ri.sessionDetail(t.toLowerCase(),r))}for(let{agentName:e,sessionId:r}of t.removedSessionRefs)n.set(`${e.toLowerCase()}\0${r}`,Ri.sessionDetail(e.toLowerCase(),r));await Promise.all([...Zs(e),...Array.from(n.values(),t=>e.invalidateQueries({queryKey:t,exact:!0}))])}var ec={agents:[],sessions:[],projects:[],dashboard:null};async function tc(e,t){try{return(await Oe(e,{signal:t})).projects}catch(e){if(t.aborted)throw e;return console.error(`Failed to load projects:`,e),[]}}async function nc(e,t){let[n,r,i]=await Promise.all([Ne(e,{signal:t}),tc(e,t),It(e,{},{signal:t})]);return{agents:n,projects:r,dashboard:i}}function rc(e){return Pi({queryKey:Ri.sessionSnapshotAggregates(e),queryFn:({signal:t})=>nc(e,t),staleTime:100})}function ic(e){return Pi({queryKey:Ri.sessionSnapshot(e),staleTime:1/0,queryFn:async({signal:t})=>{let[n,r]=await Promise.all([nc(e,t),ve({from:e.from,to:e.to},{signal:t})]);return{window:e,...n,sessions:r.sessions}}})}function ac(){let e=vi(),[t,n]=(0,K.useState)(null),r=(0,K.useRef)(null),i=Ni({queryKey:Ri.config,queryFn:async({signal:e})=>{try{return await te({signal:e})}catch(t){throw e.aborted||console.error(`Failed to load config:`,t),t}}}),a=Ni({...ic(t??{}),enabled:!1}),o=a.data,s=(0,K.useCallback)(async t=>{r.current=t,n(t);try{return await e.cancelQueries({queryKey:Ri.sessionSnapshots}),await e.invalidateQueries({queryKey:Ri.sessionSnapshot(t),exact:!0,refetchType:`none`}),await e.fetchQuery(ic(t))}catch(e){if(qr(e))return null;throw e}},[e]),c=(0,K.useCallback)(async t=>{let n=r.current;if(!n)return null;let i=Ri.sessionSnapshot(n),a=e.getQueryData(i);if(!a){let r=await s(n);return await $s(e,t),r}e.setQueryData(i,{...a,sessions:O(a.sessions,t.changedSessionHeads,t.removedSessionRefs)}),await $s(e,t);let o=await e.fetchQuery(rc(n));return e.setQueryData(i,e=>e&&{...e,...o})??null},[e,s]),l=(0,K.useCallback)(async()=>{let t=r.current;if(!t)return null;let n=await s(t);return await Qs(e),n},[e,s]),u=o?.agents??ec.agents,d=(0,K.useMemo)(()=>p(u),[u]),f=(0,K.useMemo)(()=>new Set(d.active.map(e=>e.name.toLowerCase())),[d.active]),m=i.error??a.error;return{config:i.data??null,window:o?.window??null,agents:u,sessions:o?.sessions??ec.sessions,projects:o?.projects??ec.projects,dashboard:o?.dashboard??ec.dashboard,loading:i.isPending||!i.isError&&(t===null||a.isPending),error:m?`Failed to load data. Is the CLI server running?`:null,version:a.dataUpdatedAt,activeAgents:d.active,agentCatalog:d,validAgentKeys:f,agentNameMap:d.displayNameByKey,reload:s,applyLiveEvent:c,resyncLiveState:l}}function oc(e){let t=vi(),n=(0,K.useCallback)(async()=>{await Promise.all([e(),Qs(t)])},[t,e]),{mutateAsync:r}=Fi({mutationFn:({agentKey:e,sessionId:t,alias:n})=>he(e,t,n),onSuccess:n}),{mutateAsync:i}=Fi({mutationFn:({agentKey:e,sessionId:t})=>ae(e,t),onSuccess:n});return{saveAlias:(0,K.useCallback)(async(e,t)=>{await r({...e,alias:t})},[r]),removeAlias:(0,K.useCallback)(async e=>{await i(e)},[i])}}function sc({window:e,reload:t}){(0,K.useEffect)(()=>{if(!e)return;let n=!0,r=performance.now();return An(`app.load.start`,{path:globalThis.window.location.pathname}),t(e).then(e=>{!n||!e||An(`app.load.done`,{duration_ms:Math.round(performance.now()-r),agents:e.agents.length,sessions:e.sessions.length,projects:e.projects.length})}).catch(e=>{n&&(console.error(`Failed to load data:`,e),An(`app.load.error`,{duration_ms:Math.round(performance.now()-r),error:e instanceof Error?e.message:String(e)}))}),()=>{n=!1}},[t,e])}var cc=500;function lc({applyLiveEvent:e,resyncLiveState:t,setScanStatus:n}){let[r,i]=(0,K.useState)(null),[a,o]=(0,K.useState)(null),s=(0,K.useRef)(null),c=(0,K.useRef)(null),l=(0,K.useRef)(Promise.resolve()),u=(0,K.useEffectEvent)(async t=>{try{await e(t)&&t.newSessions>0&&i(`发现 ${t.newSessions} 个新会话,列表已自动刷新`)}catch(e){console.error(`Failed to sync live session update:`,e)}}),d=(0,K.useEffectEvent)(()=>{c.current=null;let e=s.current;s.current=null,e&&(l.current=l.current.then(()=>u(e)))}),f=(0,K.useEffectEvent)(()=>{s.current=null,c.current!==null&&(window.clearTimeout(c.current),c.current=null)}),p=(0,K.useEffectEvent)(async()=>{f(),o(null);try{await l.current,await t()}catch(e){console.error(`Failed to resync live session state:`,e)}});return(0,K.useEffect)(()=>B(e=>{s.current=s.current?j(s.current,e):e,c.current??=window.setTimeout(()=>d(),cc)},n,()=>void p(),()=>{o(`实时更新已断开,重连中…`)}),[n]),(0,K.useEffect)(()=>()=>f(),[]),(0,K.useEffect)(()=>{if(!r)return;let e=window.setTimeout(()=>i(null),3500);return()=>window.clearTimeout(e)},[r]),{liveNotice:a??r}}function uc(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`||e.isContentEditable}function dc(e){let{viewState:t,browseBy:n,navigate:r,activeAgentKey:i,sidebarSessions:a,sidebarSessionLookup:o,selectedSidebarSessionReference:s,setSelectedSidebarSessionReference:c,selectedProjectNavigationIdentity:l,shortcutHelpOpen:u,setShortcutHelpOpen:d,dismissShortcutHint:f,isSearchMode:p,activeSearchQuery:m,searchResults:h,selectedSearchIndex:g,setSelectedSearchIndex:_,setDraftSearchQuery:v,openSearch:y,closeSearch:b}=e,x=(0,K.useEffectEvent)(e=>{let x=e.key;if((e.metaKey||e.ctrlKey)&&x.toLowerCase()===`k`){e.preventDefault(),y(),_(0);return}if(e.defaultPrevented||e.metaKey||e.ctrlKey||e.altKey||e.isComposing)return;let S=e.target,C=uc(S);if(u){x===`Escape`&&(e.preventDefault(),d(!1));return}if(C){x===`Escape`&&(e.preventDefault(),S instanceof HTMLElement&&S.blur());return}if(x===`?`){e.preventDefault(),d(!0),f();return}if(x===`/`){e.preventDefault(),f(),y();return}if(x===`Escape`){if(e.preventDefault(),p){b(),v(``);return}if(t.mode===`session`&&t.activeAgentKey){if(n===`projects`&&l){r(jn(l));return}r(M(t.activeAgentKey))}return}if(p){if(h.length===0)return;if(x===`j`){e.preventDefault(),f(),_(e=>Math.min(e+1,h.length-1));return}if(x===`k`){e.preventDefault(),f(),_(e=>Math.max(e-1,0));return}if(x===`g`){e.preventDefault(),f(),_(0);return}if(x===`G`){e.preventDefault(),f(),_(h.length-1);return}if(x===`Enter`){let t=h[g];if(!t)return;e.preventDefault(),f(),b(),r(D(t.reference),{state:{searchQuery:m}})}return}if(n===`agents`&&!i||a.length===0)return;let w=e=>{f();let t=s==null?-1:o.indexByReference.get(s)??-1,n=t>=0?t:e>=0?-1:a.length,r=Math.max(0,Math.min(n+e,a.length-1)),i=a[r];c(i?Hn(i):null)};if(x===`j`){e.preventDefault(),w(1);return}if(x===`k`){e.preventDefault(),w(-1);return}if(x===`g`){e.preventDefault(),f();let t=a[0];c(t?Hn(t):null);return}if(x===`G`){e.preventDefault(),f();let t=a.at(-1);c(t?Hn(t):null);return}if(x===`Enter`){let t=s==null?null:o.byReference.get(s);if(!t)return;e.preventDefault(),f(),r(n===`projects`?`/${t.slug}`:`/${i}/${t.id}`)}});(0,K.useEffect)(()=>(window.addEventListener(`keydown`,x),()=>window.removeEventListener(`keydown`,x)),[])}var fc={"7d":7,"14d":14,"30d":30,"90d":90};function pc(e){return A(e,1)-1}function mc(e,t){let n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!n)return null;let r=Number(n[1]),i=Number(n[2])-1,a=Number(n[3]),o=t?new Date(r,i,a+1,0,0,0,-1):new Date(r,i,a),s=new Date(r,i,a);return s.getFullYear()!==r||s.getMonth()!==i||s.getDate()!==a?null:o.getTime()}function hc(e){return e.days===0||e.from==null?`all`:e.days===7||e.days===14||e.days===30||e.days===90?`${e.days}d`:`custom`}function gc(e,t){if(e===`all`)return{from:0,days:0};let n=fc[e];return{from:A(E(t),-(n-1)),to:pc(t),days:n}}function _c(e,t,n=Date.now()){let r=e.get(`range`);if(r&&r!==`custom`&&r in fc||r===`all`)return{preset:r,window:gc(r,n)};if(r===`custom`){let t=e.get(`from`)??``,n=e.get(`to`)??``,i=mc(t,!1),a=mc(n,!0);if(i!=null&&a!=null&&i<=a)return{preset:r,window:{from:i,to:a},customFrom:t,customTo:n}}let i=hc(t);return i===`custom`?{preset:i,window:t,customFrom:t.from==null?void 0:S(t.from),customTo:S(t.to??n)}:{preset:i,window:gc(i,n)}}function vc(e,t){let n=new URLSearchParams(e);return n.set(`range`,t),n.delete(`from`),n.delete(`to`),n}function yc(e,t,n){let r=new URLSearchParams(e);return r.set(`range`,`custom`),r.set(`from`,t),r.set(`to`,n),r}var bc=[`range`,`from`,`to`];function xc(e){let t=new URLSearchParams;for(let n of bc){let r=e.get(n);r!=null&&t.set(n,r)}return t.toString()}function Sc(e=Date.now()){let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1).getTime()}function Cc(e,t=Date.now()){return(e>t?e:Sc(t))-1}function wc(e){return e!==null&&e!==`all`&&e!==`custom`}function Tc(e){let t=Nn(),[n,r]=Fn(),i=n.toString(),a=n.has(`range`),o=(0,K.useRef)(t.pathname),s=(0,K.useRef)(null),[c,l]=(0,K.useState)(Sc);a&&(s.current=xc(n));let u=o.current!==t.pathname,d=(0,K.useMemo)(()=>{if(a||!u||!s.current)return i;let e=new URLSearchParams(i),t=new URLSearchParams(s.current);for(let[n,r]of t)e.set(n,r);return e.toString()},[a,u,i]),f=(0,K.useMemo)(()=>new URLSearchParams(d),[d]),p=xc(f),m=(0,K.useMemo)(()=>new URLSearchParams(p),[p]);(0,K.useEffect)(()=>{if(d!==i){r(f,{replace:!0});return}o.current=t.pathname},[f,d,t.pathname,i,r]);let h=(0,K.useMemo)(()=>e?_c(m,e,Cc(c)):null,[e,c,m]),g=(0,K.useCallback)(e=>_c(m,e).window,[m]),_=(0,K.useCallback)(()=>e?g(e):null,[e,g]);(0,K.useEffect)(()=>{if(!wc(h?.preset??null))return;let e=Math.max(0,c-Date.now()),t=window.setTimeout(()=>{l(Sc())},e);return()=>window.clearTimeout(t)},[c,h?.preset]);let v=(0,K.useCallback)(e=>r(vc(new URLSearchParams(i),e)),[i,r]),y=(0,K.useCallback)((e,t)=>r(yc(new URLSearchParams(i),e,t)),[i,r]);return{timeWindow:h?.window??null,preset:h?.preset??null,customFrom:h?.customFrom,customTo:h?.customTo,resolve:g,resolveCurrent:_,selectPreset:v,selectCustom:y}}var Ec=[`light`,`dark`,`system`],Dc=`codesesh.ui-preferences`,Oc=`codesesh.shortcuts-hint-dismissed`,kc={shortcutHintDismissed:!1,sidebarCollapsed:!1,theme:`system`};function Ac(e){return typeof e==`string`&&Ec.includes(e)}function jc(){if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Mc(e){return typeof e==`object`&&!!e}function Nc(e){if(!e)return null;try{let t=JSON.parse(e);if(!Mc(t)||t.version!==1||!Mc(t.state))return null;let{shortcutHintDismissed:n,sidebarCollapsed:r,theme:i}=t.state;return typeof n!=`boolean`||typeof r!=`boolean`||i!==void 0&&!Ac(i)?null:{shortcutHintDismissed:n,sidebarCollapsed:r,theme:Ac(i)?i:`system`}}catch{return null}}function Pc(e=jc()){if(!e)return kc;try{let t=e.getItem(Dc);return t===null?{...kc,shortcutHintDismissed:e.getItem(Oc)===`1`}:Nc(t)??kc}catch{return kc}}function Fc(e,t=jc()){if(!t)return;let n={version:1,state:{shortcutHintDismissed:e.shortcutHintDismissed,sidebarCollapsed:e.sidebarCollapsed,theme:e.theme}};try{t.setItem(Dc,JSON.stringify(n)),t.removeItem(Oc)}catch{return}}function Ic(){let[e,t]=(0,K.useState)(Pc),n=(0,K.useRef)(e),r=(0,K.useCallback)(e=>{n.current=e,t(e),Fc(e)},[]),i=(0,K.useCallback)(()=>{r({...n.current,shortcutHintDismissed:!0})},[r]),a=(0,K.useCallback)(e=>{r({...n.current,sidebarCollapsed:e})},[r]),o=(0,K.useCallback)(e=>{r({...n.current,theme:e})},[r]);return{...e,dismissShortcutHint:i,setSidebarCollapsed:a,setTheme:o}}function Lc(e){let t=zc(e);return{contextLabel:Rc(e),...t,breadcrumbs:Bc(e)}}function Rc(e){if(e.isSearchMode)return`Search`;switch(e.viewState.mode){case`session`:return`Session`;case`root`:return`Dashboard`;case`projects`:return`Projects`;case`project`:return`Project`;default:return`Landing`}}function zc(e){let{viewState:t}=e;if(e.isSearchMode)return{title:`Search`,subtitle:e.searchSubtitle};if(t.mode===`root`)return{title:`Dashboard`,subtitle:e.dashboard?`${e.dashboard.totals.sessions.toLocaleString(`en-US`)} total sessions across ${e.dashboard.perAgent.length} agents`:`Aggregated view across all agents`};if(t.mode===`projects`)return{title:`Projects`,subtitle:`${e.projects.length.toLocaleString(`en-US`)} projects across ${e.sessionCount.toLocaleString(`en-US`)} sessions`};if(t.mode===`project`)return{title:e.activeProject?.displayName??`Project`,subtitle:e.activeProject?`${e.activeProject.sessionCount.toLocaleString(`en-US`)} sessions · ${e.activeProject.agentStats.length} agents`:t.activeProjectKey};if(t.mode===`agent`)return{title:e.activeAgent?.displayName??t.activeAgentKey,subtitle:`${e.sidebarSessionCount} sessions`};if(t.mode===`session`){if(e.sessionError)return{title:`Session Not Found`,subtitle:`Requested /${t.activeAgentKey}/${t.activeSessionId}`};if(e.session){let t=e.session.time_updated??e.session.time_created;return{title:qn(e.session)||`Session`,subtitle:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{children:[`ID: #`,e.session.id.slice(0,8)]}),(0,q.jsx)(`span`,{children:`·`}),(0,q.jsxs)(`span`,{children:[`Updated `,v(t)]}),(0,q.jsx)(Kn,{tags:e.session.smart_tags,limit:9,className:`inline-flex`})]})}}}return t.mode===`missingAgent`?{title:`Agent Not Found`,subtitle:`Requested /${t.attemptedKey}`}:t.mode===`missingSession`?{title:`Session Not Found`,subtitle:`Session not found in /${t.activeAgentKey}`}:{title:`CodeSesh`,subtitle:`Select an agent to browse sessions`}}function Bc(e){let{viewState:t}=e;if(e.isSearchMode)return[{label:`Search`}];let n={label:`Dashboard`,to:e.browseBy===`agents`&&t.mode===`root`||e.browseBy===`projects`&&t.mode===`projects`?void 0:e.browseBy===`projects`?`/projects`:`/`};if(t.mode===`root`)return[{label:`Dashboard`}];if(t.mode===`projects`)return[n,{label:`Projects`}];if(t.mode===`project`)return[n,{label:`Projects`,to:`/projects`},{label:e.activeProject?.displayName??t.activeProjectKey}];if(t.mode===`session`&&e.browseBy===`projects`&&e.selectedProjectIdentity)return[n,{label:`Projects`,to:`/projects`},{label:e.selectedProject?.displayName??e.selectedProjectIdentity.key,to:jn(e.selectedProjectIdentity)},{label:e.session?qn(e.session):t.activeSessionId||`Session`}];if(t.mode===`missingAgent`)return[n,{label:t.attemptedKey}];let r=e.activeAgent?.displayName??t.activeAgentKey??`Unknown Agent`,i={label:r,to:t.mode===`session`?`/${t.activeAgentKey}`:void 0};return t.mode===`agent`?[n,{label:r}]:t.mode===`missingSession`?[n,i,{label:t.attemptedSessionId}]:t.mode===`session`?[n,i,{label:e.session?qn(e.session):t.activeSessionId||`Session`}]:[n,{label:`Invalid Route`}]}var Vc=K.createContext(void 0);function Hc(e){let t=K.useContext(Vc);if(t===void 0&&!e)throw Error(wn(33));return t}var Uc=K.createContext(void 0);function Wc(e){let t=K.useContext(Uc);if(t===void 0&&!e)throw Error(wn(36));return t}var Gc=K.createContext(void 0);function Kc(e=!0){let t=K.useContext(Gc);if(t===void 0&&!e)throw Error(wn(25));return t}function qc(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=a.useState(`open`),d=Kc(!0),f=d!==void 0;return K.useMemo(()=>({id:r,role:`menuitem`,tabIndex:u&&n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:Ee})},onMouseUp(e){if(d){let t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||f&&!qe&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!f||e.button===2)&&(!c||c.type===`regular-item`)&&s.current.click()}}),[t,n,r,l,i,u,a,o,s,d,f,c])}var Jc={type:`regular-item`};function Yc(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=a.useState(`disabled`),d=n||u,f=K.useRef(null),{getButtonProps:p,buttonRef:m}=$e({disabled:d,focusableWhenDisabled:!0,native:s,composite:!0}),h=qc({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:f,itemMetadata:c}),g=K.useCallback(e=>Dt(h,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,p),[h,p,c]),_=Dn(f,m);return K.useMemo(()=>({getItemProps:g,itemRef:_}),[g,_])}var Xc=K.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Zc(){return K.useContext(Xc)}var Qc=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function $c(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=Zc(),f=K.useRef(-1),[p,m]=K.useState(a??(i===Qc.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=K.useRef(null),g=K.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return Ce(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),Ce(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),{ref:g,index:p}}var el=K.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=$c({label:a}),f=Hc(!0),p=Bt(i),{store:m}=Wc(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=Yc({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:Jc});return At(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),tl=K.createContext(void 0);function nl(e){let t=K.useContext(tl);if(t===void 0&&!e)throw Error(wn(69));return t}function rl(e){return e===`starting`?we:vn}var il={...wt,...Gt},al=K.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=Wc(),{side:c,align:l}=Hc(),u=nl(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=s.useState(`hoverEnabled`),T=s.useState(`disabled`),E=s.useState(`openMethod`),D=_.type===`context-menu`;ft({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),K.useEffect(()=>{function e(e){s.setOpen(!1,W(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]),Jo(b,{enabled:w&&!T&&!D&&_.type!==`menubar`,closeDelay:S});let O=K.useCallback(e=>{s.set(`popupElement`,e)},[s]),k=At(`div`,e,{state:{transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},ref:[t,s.context.popupRef,O],stateAttributesMapping:il,props:[p,{onKeyDown(e){u&&ht.has(e.key)&&e.stopPropagation()}},rl(f),o,{"data-rootownerid":y}]}),A=_.type===void 0||D;return(g||_.type===`menubar`&&v!==`outside-press`)&&(A=!0),(0,q.jsx)(Rt,{context:b,openInteractionType:E,modal:D,disabled:!m,returnFocus:a===void 0?A:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),ol=K.createContext(void 0);function sl(){let e=K.useContext(ol);if(e===void 0)throw Error(wn(32));return e}var cl=K.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=Wc();return i.useState(`mounted`)||n?(0,q.jsx)(ol.Provider,{value:n,children:(0,q.jsx)(_e,{ref:t,...r})}):null}),ll=K.createContext(void 0);function ul(){return K.useContext(ll)?.direction??`ltr`}var dl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=la(e,t)||{};if(l==null)return{};let f=Da(u),p={x:n,y:r},m=ha(i),h=pa(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=ca(k,j,A),N=!c.arrow&&da(i)!=null&&j!==M&&a.reference[h]/2-(j<k?D:O)-g[h]/2<0,P=N?j<k?j-k:j-A:0;return{[m]:p[m]+P,data:{[m]:M,centerOffset:j-M-P,...N&&{alignmentOffset:P}},reset:N}}}),fl=(e,t)=>({...dl(e),options:[e,t]}),pl=Ro().fn,ml={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await pl(e)).data?.referenceHidden||a}}}},hl={sideX:`left`,sideY:`top`},gl={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=Jt(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:hl};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=St(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=ua(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:hl.sideX,g=f===`top`?`bottom`:hl.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function _l(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function vl(e,t,n){let{rects:r,placement:i}=e;return{side:_l(t,ua(i),n),align:da(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function yl(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=K.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=rn(D),k=D?O:t,A=Yt(t),j=Yt(h),M=ul()===`rtl`,N=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,F=c,I=+(r===`bottom`),L=+(r===`top`),ee=+(r===`right`),te=+(r===`left`);typeof F==`number`?F={top:F+I,right:F+te,bottom:F+L,left:F+ee}:F&&={top:(F.top||0)+I,right:(F.right||0)+te,bottom:(F.bottom||0)+L,left:(F.left||0)+ee};let R={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:F},z=K.useRef(null),B=Yt(i),V=Yt(o),ne=typeof i==`function`?0:i,re=typeof o==`function`?0:o,ie=[];f&&ie.push(f),ie.push(No(e=>{let t=vl(e,r,M),n=typeof B.current==`function`?B.current(t):B.current,i=typeof V.current==`function`?V.current(t):V.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[ne,re,M,r]));let H=T===`none`&&w!==`shift`,ae=!H&&(l||_||w===`shift`),oe=w===`none`?null:Io({...R,padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`&&`alignment`,fallbackAxisSideDirection:E}),se=H?null:Po(e=>{let t=St(e.elements.floating).documentElement;return{...R,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:ae,limiter:l||_?void 0:Fo(e=>{if(!z.current)return{};let{width:t,height:n}=z.current.getBoundingClientRect(),r=ma(ua(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})}},[R,l,_,F,T]);w===`shift`||T===`shift`||a===`center`?ie.push(se,oe):ie.push(oe,se),ie.push(Lo({...R,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=Jt(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),fl(e=>({element:z.current||St(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=ua(a),l=ma(c),u=z.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(vl(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ae&&l===`y`&&b?S:x),{}}},ml,y),Ce(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let ce=K.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:le,elements:ue,x:de,y:fe,middlewareData:pe,update:me,placement:U,context:he,isPositioned:ge,floatingStyles:_e}=Bo({rootContext:m,open:p?h:void 0,placement:P,middleware:ie,strategy:n,whileElementsMounted:p?void 0:(...e)=>yo(...e,ce),nodeId:v,externalTree:x}),{sideX:ve,sideY:ye}=pe.adaptiveOrigin||hl,be=ge?n:`fixed`,xe=K.useMemo(()=>{let e=y?{position:be,[ve]:de,[ye]:fe}:{position:be,..._e};return ge||(e.opacity=0),e},[y,be,ve,de,ye,fe,_e,ge]),Se=K.useRef(null);Ce(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(bl(t)?t.current:t)||null;n!==Se.current&&(le.setPositionReference(n),Se.current=n)},[h,le,k,A]),K.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&bl(e)&&e.current!==Se.current&&(le.setPositionReference(e.current),Se.current=e.current)},[h,le,k,A]),K.useEffect(()=>{if(p&&h&&ue.reference&&ue.floating)return yo(ue.reference,ue.floating,me,ce)},[p,h,ue,me,ce]);let we=ua(U),Te=_l(r,we,M),Ee=da(U)||`center`,De=!!pe.hide?.referenceHidden;Ce(()=>{b&&h&&ge&&C(we)},[b,h,ge,we]);let Oe=K.useMemo(()=>({position:`absolute`,top:pe.arrow?.y,left:pe.arrow?.x}),[pe.arrow]),W=pe.arrow?.centerOffset!==0;return K.useMemo(()=>({positionerStyles:xe,arrowStyles:Oe,arrowRef:z,arrowUncentered:W,side:Te,align:Ee,physicalSide:we,anchorHidden:De,refs:le,context:he,isPositioned:ge,update:me}),[xe,Oe,z,W,Te,Ee,we,De,le,he,ge,me])}function bl(e){return e!=null&&`current`in e}function xl(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=rn(i),o=K.useRef(0),s=pt(Cl).current,c=pt(Sl).current,[l,u]=K.useState(0),d=K.useRef(l),f=rn((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=rn(e=>{c.delete(e),d.current+=1,u(d.current)}),m=K.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(wl).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);Ce(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),Ce(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),Ce(()=>()=>{n.current=[]},[n]),Ce(()=>()=>{r&&(r.current=[])},[r]);let h=rn(e=>(s.add(e),()=>{s.delete(e)}));Ce(()=>{s.forEach(e=>e(m))},[s,m]);let g=K.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,q.jsx)(Xc.Provider,{value:g,children:t})}function Sl(){return new Map}function Cl(){return new Set}function wl(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function Tl(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),At(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},rl(r),i],stateAttributesMapping:wt})}var El=20;function Dl(e,t,n,r){let[i,a]=K.useState(!1);Ce(()=>{if(!e||!t||n==null){a(!1);return}let r=St(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-El)},[e,t,n]),an(e&&(!t||i),r)}var Ol=K.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=ze,style:g,..._}=e,{store:v}=Wc(),y=sl(),b=Kc(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),A=v.useState(`positionerElement`),j=v.useState(`instantType`),M=v.useState(`hasViewport`),N=v.useState(`lastOpenChangeReason`),P=v.useState(`floatingNodeId`),F=v.useState(`floatingParentNodeId`),I=S.useState(`domReferenceElement`),L=K.useRef(null),te=Cn(A,!1,!1),R=n,z=c,B=l,ne=s,re=h;x.type===`context-menu`&&(R=n??x.context?.anchor,ne??=`start`,!o&&ne!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let ie=o,H=ne;x.type===`menu`?(ie??=`inline-end`,H??=`start`,re=e.collisionAvoidance??kn):x.type===`menubar`&&(ie??=x.context.orientation===`vertical`?`inline-end`:`bottom`,H??=`start`);let ae=x.type===`context-menu`,se=yl({anchor:R,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:ie,sideOffset:z,align:H,alignOffset:B,arrowPadding:ae?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:P,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:re,shiftCrossAxis:ae&&!(`side`in re&&re.side===`flip`),externalTree:C,adaptiveOrigin:M?gl:void 0});K.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===P&&v.set(`hoverEnabled`,!1),e.nodeId!==P&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,W(V)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,P]),K.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,W(t))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let ce=oe();K.useEffect(()=>{T||ce.clear()},[T,ce]),K.useEffect(()=>{function e(e){if(!(!T||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?ce.isStarted()||ce.start(e,()=>{v.setOpen(!1,W(V))}):v.setOpen(!1,W(V))}else ce.clear()}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,ce]),K.useEffect(()=>{let e={open:T,nodeId:P,parentNodeId:F,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,P,F]),Ce(()=>{let e=I,t=L.current;if(e&&(L.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return te(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[I,te,v]);let le={open:T,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:x.type===`menu`,instant:j},ue=x.type===`menubar`&&x.context.modal;Dl(T&&(ue||E&&N!==`trigger-hover`),D===`touch`,A,O);let de=Tl(e,le,{styles:se.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),fe=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&N!==`trigger-hover`||x.type===`menubar`&&x.context.modal),pe=null;return x.type===`menubar`?pe=x.context.contentElement:x.type===void 0&&(pe=O),(0,q.jsxs)(Vc.Provider,{value:se,children:[fe&&(0,q.jsx)(lt,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:Xt(!T),cutout:pe}),(0,q.jsx)(ee,{id:P,children:(0,q.jsx)(xl,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:de})})]})}),kl=K.createContext(null);function Al(e){let t=K.useContext(kl);if(t===null&&!e)throw Error(wn(5));return t}var jl={...mn,disabled:H(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:H(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:H(e=>e.openMethod),allowMouseEnter:H(e=>e.allowMouseEnter),highlightItemOnHover:H(e=>e.highlightItemOnHover),stickIfOpen:H(e=>e.stickIfOpen),parent:H(e=>e.parent),rootId:H(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:H(e=>e.activeIndex),isActive:H((e,t)=>e.activeIndex===t),hoverEnabled:H(e=>e.hoverEnabled),instantType:H(e=>e.instantType),lastOpenChangeReason:H(e=>e.openChangeReason),floatingTreeRoot:H(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:H(e=>e.floatingNodeId),floatingParentNodeId:H(e=>e.floatingParentNodeId),itemProps:H(e=>e.itemProps),closeDelay:H(e=>e.closeDelay),hasViewport:H(e=>e.hasViewport),keyboardEventRelay:H(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},Ml=class e extends bn{constructor(e){super({...Nl(),...e},{positionerRef:K.createRef(),popupRef:K.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:K.createRef(),beforeContentFocusGuardRef:K.createRef(),onOpenChangeComplete:void 0,triggerElements:new vt},jl),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=pt(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function Nl(){return{...Vt(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,highlightItemOnHover:!0,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ue,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:vn,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var Pl=K.createContext(void 0);function Fl(){return K.useContext(Pl)}var Il=Ge(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=Kc(!0),_=Wc(!0),v=Al(!0),y=Fl(),b=K.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),x=Ml.useStore(f?.store,{open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:b});Et(x,n,a,m),x.useControlledProp(`openProp`,n),x.useControlledProp(`triggerIdProp`,p),x.useContextCallback(`onOpenChangeComplete`,i);let S=R(),C=R(),w=x.useState(`floatingTreeRoot`),T=De(w),E=ke(),D=x.useState(`open`),O=x.useState(`activeTriggerElement`),k=x.useState(`positionerElement`),A=x.useState(`hoverEnabled`),j=x.useState(`disabled`),M=x.useState(`lastOpenChangeReason`),N=x.useState(`parent`),P=x.useState(`activeIndex`),F=x.useState(`payload`),I=x.useState(`floatingParentNodeId`),L=K.useRef(null),ee=K.useRef(N.type!==`context-menu`),te=oe(),z=K.useRef(!0),B=oe(),V=I!=null,{openMethod:ne,triggerProps:re}=gs(D);x.useSyncedValues({disabled:o,highlightItemOnHover:h,modal:N.type===void 0?s:void 0,openMethod:ne,rootId:S}),kt(x);let{forceUnmount:ie}=ot(D,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0})});Ce(()=>{g&&!_?x.update({parent:{type:`context-menu`,context:g},floatingNodeId:T,floatingParentNodeId:E}):_&&x.update({floatingNodeId:T,floatingParentNodeId:E})},[g,_,T,E,x]),K.useEffect(()=>{if(D||(L.current=null),N.type===`context-menu`){if(!D){te.clear(),ee.current=!1;return}te.start(500,()=>{ee.current=!0})}},[te,D,N.type]),Ce(()=>{!D&&!A&&x.set(`hoverEnabled`,!0)},[D,A,x]);let H=rn((e,t)=>{let n=t.reason;if(D===e&&t.trigger===O&&M===n)return;let i=$t(t);if(!e&&t.trigger==null&&(t.trigger=O??void 0),r?.(e,t),t.isCanceled)return;x.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&a?.type===`click`&&a.pointerType===`touch`&&!z.current)return;e&&n===`trigger-focus`?(z.current=!1,B.start(300,()=>{z.current=!0})):(z.current=!0,B.clear());let o=(n===`trigger-press`||n===`item-press`)&&a.detail===0&&a?.isTrusted,s=!e&&(n===`escape-key`||n==null),c={open:e,openChangeReason:n};L.current=t.event??null,Wt(c,e,t.trigger,i()),x.update(c),N.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?x.set(`instantType`,`group`):o||s?x.set(`instantType`,o?`click`:`dismiss`):x.set(`instantType`,void 0)}),ae=He({popupStore:x,floatingId:C,nested:E!=null,onOpenChange:H}),se=ae.context.events;K.useEffect(()=>{let e=({open:e,eventDetails:t})=>H(e,t);return se.on(`setOpen`,e),()=>{se?.off(`setOpen`,e)}},[se,H]);let ce=K.useCallback(()=>{x.setOpen(!1,W(ye))},[x]);K.useImperativeHandle(u,()=>({unmount:ie,close:ce}),[ie,ce]);let le;N.type===`context-menu`&&(le=N.context),K.useImperativeHandle(le?.positionerRef,()=>k,[k]),K.useImperativeHandle(le?.actionsRef,()=>({setOpen:H}),[H]);let ue=Me(ae,{enabled:!j,bubbles:{escapeKey:d&&N.type===`menu`},outsidePress(){return N.type!==`context-menu`||L.current?.type===`contextmenu`||ee.current},externalTree:V?w:void 0}),de=ul(),fe=K.useCallback(e=>{x.select(`activeIndex`)!==e&&x.set(`activeIndex`,e)},[x]),pe=rs(ae,{enabled:!j,listRef:x.context.itemDomElements,activeIndex:P,nested:N.type!==void 0,loopFocus:c,orientation:l,parentOrientation:N.type===`menubar`?N.context.orientation:void 0,rtl:de===`rtl`,disabledIndices:st,onNavigate:fe,openOnArrowKeyDown:N.type!==`context-menu`,externalTree:V?w:void 0,focusItemOnHover:h}),me=K.useCallback(e=>{x.context.typingRef.current=e},[x]),U=is(ae,{enabled:!j,listRef:x.context.itemLabels,elementsRef:x.context.itemDomElements,activeIndex:P,resetMs:500,onMatch:e=>{D&&e!==P&&x.set(`activeIndex`,e)},onTyping:me});_n(x,{floatingRootContext:ae,activeTriggerProps:K.useMemo(()=>{let e=Dt(U.reference,pe.reference,ue.reference,{onMouseMove(){x.set(`allowMouseEnter`,!0)}},re);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=D,e},[x,U.reference,pe.reference,ue.reference,re,D]),inactiveTriggerProps:K.useMemo(()=>{let e=Dt(pe.trigger,ue.trigger,re);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[pe.trigger,ue.trigger,re]),popupProps:K.useMemo(()=>Dt(Ct,{id:C,role:`menu`,"aria-labelledby":O?.id,onMouseMove(){x.set(`allowMouseEnter`,!0),N.type===`menu`&&x.set(`hoverEnabled`,!1)},onClick(){x.select(`hoverEnabled`)&&x.set(`hoverEnabled`,!1)},onKeyDown(e){let t=x.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},U.floating,pe.floating,ue.floating),[O,C,N.type,x,U.floating,pe.floating,ue.floating]),itemProps:pe.item??vn});let he=K.useMemo(()=>({store:x,parent:b}),[x,b]),ge=(0,q.jsx)(Uc.Provider,{value:he,children:typeof t==`function`?t({payload:F}):t});return N.type===void 0||N.type===`context-menu`?(0,q.jsx)(Ft,{externalTree:w,children:ge}):ge});function Ll(e){let t=e.getBoundingClientRect(),n=Jt(e);if(We)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Rl(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=me(),{ref:i,index:a}=$c(e),o=n===a,s=K.useRef(null),c=Dn(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}function zl(e){let{render:t,className:n,style:r,state:i=vn,props:a=st,refs:o=st,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=Rl({metadata:s});return At(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function Bl(e){if(ut(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!Zt(e))return Bl(fn(e))}function Vl(e,t){let n=K.useRef(null);function r(t){Wi.flushSync(()=>{e.setOpen(!1,W(fe,t.nativeEvent,t.currentTarget))}),pe(n.current)?.focus()}function i(n){let r=e.select(`positionerElement`);if(r&&Se(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Wi.flushSync(()=>{e.setOpen(!1,W(fe,n.nativeEvent,n.currentTarget))});let i=Qe(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&Tt(r,i);){let e=i;if(i=Je(i),i===e)break}i?.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Hl(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=K.useRef(!1);return K.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,St(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:vn,[t,n,r])}var Ul=2,Wl=se(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:c,delay:l=100,closeDelay:u=0,handle:d,payload:f,...p}=e,m=Wc(!0),h=d?.store??m?.store;if(!h)throw Error(wn(85));let g=Bt(s),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=K.useRef(null),S=Kl(),C=me(!0),w=Fe(),T=K.useMemo(()=>w??new ue,[w]),{registerTrigger:E,isMountedByThisTrigger:D}=En(g,x,h,{payload:f,closeDelay:u,parent:S,floatingTreeRoot:T,floatingNodeId:De(T),floatingParentNodeId:ke(),keyboardEventRelay:C?.relayKeyboardEvent}),O=S.type===`menubar`,k=h.useState(`disabled`),A=a||k||O&&S.context.disabled,{getButtonProps:j,buttonRef:M}=$e({disabled:A,native:o});K.useEffect(()=>{!y&&S.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,S.type]);let N=K.useRef(null),P=oe(),F=rn(e=>{if(!N.current)return;P.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Tt(N.current,t)||Tt(h.select(`positionerElement`),t)||t===N.current||t!=null&&Bl(t)===h.select(`rootId`))return;let n=Ll(N.current);e.clientX>=n.left-Ul&&e.clientX<=n.right+Ul&&e.clientY>=n.top-Ul&&e.clientY<=n.bottom+Ul||T.events.emit(`close`,{domEvent:e,reason:je})});K.useEffect(()=>{y&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&St(N.current).addEventListener(`mouseup`,F,{once:!0})},[y,F,h]);let L=O&&S.context.hasSubmenuOpen,ee=Xo(v,{enabled:(c??L)&&!A&&S.type!==`context-menu`&&(!O||L&&!D),handleClose:fs({blockPointerEvents:!O}),mouseOnly:!0,move:!1,restMs:S.type===void 0?l:void 0,delay:{close:u},triggerElementRef:x,externalTree:T,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),te=Gl(y,h.select(`lastOpenChangeReason`)),R=ka(v,{enabled:!A&&S.type!==`context-menu`,event:y&&O?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:S.type===void 0&&te}),z=Ho(v,{enabled:!A&&L}),B=Hl({open:y,enabled:O,mouseDownAction:`open`}),V=K.useMemo(()=>Dt(z.reference,R.reference),[z.reference,R.reference]),ne=h.useState(`triggerProps`,D),{preFocusGuardRef:re,handlePreFocusGuardFocus:ie,handleFocusTargetFocus:H}=Vl(h,x),ae={disabled:A,open:y},se=[N,t,M,E,x],ce=[V,ee??vn,ne,{"aria-haspopup":`menu`,"aria-controls":b,id:g,onMouseDown:e=>{h.select(`open`)||(P.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),St(e.currentTarget).addEventListener(`mouseup`,F,{once:!0}))}},O?{role:`menuitem`}:{},B,p,j],le=At(`button`,e,{enabled:!O,stateAttributesMapping:en,state:ae,ref:se,props:ce});return O?(0,q.jsx)(zl,{tag:`button`,render:n,className:r,style:i,state:ae,refs:se,props:ce,stateAttributesMapping:en}):y?(0,q.jsxs)(K.Fragment,{children:[(0,q.jsx)(I,{ref:re,onFocus:ie},`${g}-pre-focus-guard`),(0,q.jsx)(K.Fragment,{children:le},g),(0,q.jsx)(I,{ref:h.context.triggerFocusTargetRef,onFocus:H},`${g}-post-focus-guard`)]}):(0,q.jsx)(K.Fragment,{children:le},g)});function Gl(e,t){let n=oe(),[r,i]=K.useState(!1);return Ce(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Kl(){let e=Kc(!0),t=Wc(!0),n=Al(!0);return K.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}function ql({bookmarked:e,onRename:t,onToggleBookmark:n}){let r=(0,K.useRef)(null);return(0,q.jsxs)(Il,{modal:!1,children:[(0,q.jsx)(Wl,{ref:r,"aria-label":`Session options`,onClick:e=>e.stopPropagation(),className:`motion-hover motion-press inline-flex size-6 shrink-0 items-center justify-center rounded-sm border border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)] hover:text-[var(--console-text)] focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2 focus-visible:outline-none`,children:(0,q.jsx)(i,{className:`size-3.5`,"aria-hidden":`true`})}),(0,q.jsx)(cl,{children:(0,q.jsx)(Ol,{side:`bottom`,align:`end`,sideOffset:4,className:`z-30`,children:(0,q.jsxs)(al,{finalFocus:r,className:`motion-menu w-36 rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-1 shadow-lg focus-visible:outline-none`,children:[(0,q.jsxs)(el,{onClick:t,className:`motion-hover motion-press flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)] data-[highlighted]:bg-[var(--console-surface-muted)] focus-visible:outline-none`,children:[(0,q.jsx)(a,{className:`size-3`,"aria-hidden":`true`}),`Rename`]}),(0,q.jsxs)(el,{onClick:n,className:`motion-hover motion-press flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)] data-[highlighted]:bg-[var(--console-surface-muted)] focus-visible:outline-none`,children:[(0,q.jsx)(d,{className:`size-3`,fill:e?`currentColor`:`none`,"aria-hidden":`true`}),e?`Remove bookmark`:`Add bookmark`]})]})})})]})}var Jl=`file-tree-container`,Yl=`data-file-tree-style`,Xl=`data-file-tree-unsafe-css`,Zl=`data-file-tree-scrollbar-measure`,Ql=`data-file-tree-scrollbar-gutter-measured`,$l=`--trees-scrollbar-gutter-measured`,eu=`header`,tu=`context-menu`,nu=`context-menu-trigger`,ru=typeof window>`u`?K.useEffect:K.useLayoutEffect;function iu(e,t,n){let r=e==null?null:(0,q.jsx)(`div`,{slot:eu,children:e}),i=t!=null&&n!=null?(0,q.jsx)(`div`,{slot:tu,children:t(n.item,n.context)}):null;return r==null&&i==null?null:(0,q.jsxs)(q.Fragment,{children:[r,i]})}function au(e,t){return typeof window>`u`&&t!=null?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`template`,{shadowrootmode:`open`,dangerouslySetInnerHTML:{__html:t.shadowHtml}}),e]}):(0,q.jsx)(q.Fragment,{children:e})}function ou(e){let t=e.shadowRoot;return t?.querySelector(`[data-file-tree-id]`)instanceof HTMLElement||t?.querySelector(`[data-file-tree-id]`)instanceof SVGElement||e.querySelector(`template[shadowrootmode="open"]`)instanceof HTMLTemplateElement}function su(e,t,n,r,i){let a={...e??{}};if(t!=null&&delete a.header,n){let t=e?.contextMenu,n=t?.onClose,o=t?.onOpen;a.contextMenu={...t??{},enabled:!0,onClose:()=>{n?.(),r()},onOpen:(e,t)=>{i(e,t),o?.(e,t)}},delete a.contextMenu.render}return a.header!=null||a.contextMenu!=null?a:void 0}function cu({header:e,id:t,model:n,preloadedData:r,renderContextMenu:i,...a}){let[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(null),u=(0,K.useRef)(n.getComposition()),d=(0,K.useRef)(n);d.current!==n&&(d.current=n,u.current=n.getComposition());let f=i!=null,p=(0,K.useCallback)(()=>{s(null)},[]),m=(0,K.useCallback)((e,t)=>{s({context:t,item:e})},[]),h=u.current,g=(0,K.useMemo)(()=>su(h,e,f,p,m),[h,p,m,f,e]),_=(0,K.useCallback)(e=>{l(e)},[]);(0,K.useEffect)(()=>{f||s(null)},[f]),ru(()=>{n.setComposition(g)},[g,n]),ru(()=>{if(c!=null)return r!=null&&ou(c)?n.hydrate({fileTreeContainer:c}):n.render({fileTreeContainer:c}),()=>{n.unmount(),n.setComposition(h)}},[h,c,n,r]);let v=au(iu(e,i,o),r),y=t??r?.id,b={"--trees-item-height":`${String(n.getItemHeight())}px`,"--trees-density-override":n.getDensityFactor(),...a.style};return(0,q.jsx)(Jl,{...a,id:y,ref:_,style:b,suppressHydrationWarning:r!=null,children:v})}var lu=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
11
+ <symbol id="file-tree-icon-chevron" viewBox="0 0 16 16">
12
+ <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06" fill="currentcolor"/>
13
+ </symbol>
14
+ <symbol id="file-tree-icon-dot" viewBox="0 0 6 6">
15
+ <circle cx="3" cy="3" r="3" />
16
+ </symbol>
17
+ <symbol id="file-tree-icon-file" viewBox="0 0 16 16">
18
+ <path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".5"/>
19
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
20
+ </symbol>
21
+ <symbol id="file-tree-icon-lock" viewBox="0 0 16 16">
22
+ <path fill="currentcolor" d="M4 5.336V4a4 4 0 1 1 8 0v1.336c1.586.54 2 1.843 2 4.664v1c0 4.118-.883 5-5 5H7c-4.117 0-5-.883-5-5v-1c0-2.821.414-4.124 2-4.664M5.5 4v1.054Q6.166 4.998 7 5h2q.834-.002 1.5.054V4a2.5 2.5 0 0 0-5 0m-2 6v1c0 .995.055 1.692.167 2.193.107.483.246.686.35.79s.307.243.79.35c.5.112 1.198.167 2.193.167h2c.995 0 1.692-.055 2.193-.166.483-.108.686-.247.79-.35.104-.105.243-.308.35-.791.112-.5.167-1.198.167-2.193v-1c0-.995-.055-1.692-.166-2.193-.108-.483-.247-.686-.35-.79-.105-.104-.308-.243-.791-.35C10.693 6.555 9.995 6.5 9 6.5H7c-.995 0-1.692.055-2.193.167-.483.107-.686.246-.79.35s-.243.307-.35.79C3.555 8.307 3.5 9.005 3.5 10" />
23
+ </symbol>
24
+ <symbol id="file-tree-icon-ellipsis" viewBox="0 0 16 16">
25
+ <path d="M5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M9.5 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0M14 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" />
26
+ </symbol>
27
+ </svg>`,uu=`<symbol id="file-tree-builtin-astro" viewBox="0 0 16 16">
28
+ <path fill="currentColor" d="M6.08 13.92c-.63-.57-.81-1.79-.55-2.67.45.56 1.08.73 1.73.83 1 .15 1.99.1 2.92-.37l.32-.19q.13.38.08.78a2.1 2.1 0 0 1-.9 1.5q-.3.24-.61.43c-.64.44-.81.95-.57 1.69l.02.08a1.7 1.7 0 0 1-.74-.64 2 2 0 0 1-.3-.98q0-.27-.02-.52-.07-.61-.61-.62a.7.7 0 0 0-.75.6z" class="bg" opacity=".6"/>
29
+ <path fill="currentColor" d="M2.5 11.1s1.86-.9 3.72-.9l1.4-4.39c.05-.21.2-.36.38-.36s.33.15.38.36l1.4 4.38c2.2 0 3.72.92 3.72.92l-3.16-8.69q-.13-.4-.45-.42H6.11q-.3.02-.45.42z" class="fg"/>
30
+ </symbol>`,du=`<symbol id="file-tree-builtin-babel" viewBox="0 0 16 16">
31
+ <path fill="currentColor" fill-rule="evenodd" d="M9.49.5q1.92.05 2.66.54 1.27.6 1.35 1.52v.23a4 4 0 0 1-.53 1.9l-1.38 1.24q-.74.38-.72.63c.77.82 1.33 1.29.85 2.42q-.47 1.1-2.04 2.28c-.5.32-1.88 1.35-2.96 1.86-1.64.77-3.1 1.4-4.65 1.89-.51.16-1.5.16-1.5.16L.5 15A76 76 0 0 0 5.76 3.49q-.1-.08-.1-.2.1 0 .32-.35l-.03-.09q-1.17.39-2.38 1.3l-.13.03q0-.1-.21-.16-.46.31-.82.7l-.13-.19.16-.06-.03-.16-.34.29L2 4.5q.36-.48.72-.54l.04-.1V3.8q.16 0 .15-.06l.13-.06a6 6 0 0 0 1.13-.9v-.03H4.1l-.12.07q0-.1-.1-.1l-.15.07-.04-.1q.93-.52 1.63-1.05Q7.89.65 9.5.5M8.46 7.83l-.32.04c-1.31.54-2.31.82-2.91.88a71 71 0 0 0-2.2 4.54h.07q.58-.04 3.04-1.42.13 0 1.66-1.05L9.18 9.7v.03q.45-.2.81-1.3v-.2q-.5-.46-1.53-.4m.28-5.75c-.5.1-.75.19-.72.38l-1.16 2.6q-.17.1-.34.95-.3.48-.25.77v.1l.22.05A15 15 0 0 1 8.86 6c1.1-.71 2.12-1.38 2.8-2.54q.24-.33.21-.54-.02-.33-.4-.54c-.54 0-1.07-.34-1.63-.28l-.94-.03z" clip-rule="evenodd"/>
32
+ </symbol>`,fu=`<symbol id="file-tree-builtin-bash" viewBox="0 0 16 16">
33
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
34
+ <path fill="currentColor" d="M11.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zM7 6.75C7 6.42 6.64 6 6 6s-1 .42-1 .75q-.01.25.22.41.26.21.89.35.74.14 1.28.53c.37.29.61.7.61 1.21 0 .87-.68 1.5-1.5 1.7v.55a.5.5 0 0 1-1 0v-.56c-.82-.18-1.5-.82-1.5-1.69a.5.5 0 0 1 1 0c0 .33.36.75 1 .75s1-.42 1-.75q.01-.25-.22-.41a2 2 0 0 0-.89-.35q-.74-.14-1.28-.53A1.5 1.5 0 0 1 4 6.75c0-.87.68-1.5 1.5-1.7V4.5a.5.5 0 0 1 1 0v.56c.82.18 1.5.82 1.5 1.69a.5.5 0 0 1-1 0" class="fg-stroke"/>
35
+ </symbol>`,pu=`<symbol id="file-tree-builtin-biome" viewBox="0 0 16 16">
36
+ <path fill="currentColor" d="M8 2 4.88 7.35a7 7 0 0 1 3.7-.13l1.04.25-.99 4.16-1.05-.25a2.7 2.7 0 0 0-3.07 1.45l-.98-.47a4 4 0 0 1 1.07-1.31 3.8 3.8 0 0 1 3.23-.71l.5-2.08a6 6 0 0 0-5.07 1.12A5.9 5.9 0 0 0 1 14h14z"/>
37
+ </symbol>`,mu=`<symbol id="file-tree-builtin-bootstrap" viewBox="0 0 16 16">
38
+ <path fill="currentColor" fill-rule="evenodd" d="M11.72 1.5A2.5 2.5 0 0 1 14.2 4q.02 1.08.3 2.09c.22.73.56 1.24 1.08 1.45.22.08.4.27.4.5s-.18.43-.4.51q-.76.34-1.08 1.45c-.2.65-.27 1.32-.3 2a2.5 2.5 0 0 1-2.48 2.5H4.25A2.6 2.6 0 0 1 1.7 12c-.04-.85-.1-1.68-.22-2.04C1.26 9.23.92 8.7.4 8.5.18 8.42 0 8.23 0 8s.18-.42.4-.5q.77-.35 1.09-1.46c.1-.36.17-1.19.2-2.04a2.6 2.6 0 0 1 2.56-2.5z" class="bg" clip-rule="evenodd" opacity=".2"/>
39
+ <path fill="currentColor" fill-rule="evenodd" d="M8.47 4.54c1.23 0 2.04.68 2.04 1.73 0 .73-.55 1.39-1.24 1.5v.04c.94.1 1.58.77 1.58 1.7 0 1.2-.9 1.95-2.37 1.95H5.97a.3.3 0 0 1-.2-.08.3.3 0 0 1-.08-.2V4.82a.3.3 0 0 1 .08-.2.3.3 0 0 1 .2-.08zm-1.7 6.04h1.49q1.47-.01 1.49-1.15Q9.74 8.31 8.2 8.3H6.77zm0-5.16v2.06h1.21c.93 0 1.45-.38 1.45-1.06 0-.65-.44-1-1.22-1z" class="fg" clip-rule="evenodd"/>
40
+ </symbol>`,hu=`<symbol id="file-tree-builtin-browserslist" viewBox="0 0 16 16">
41
+ <path fill="currentColor" d="M8.88 6.96c0 3.82 3.72 4.7 5.7 3.74-.23.9-1.04 1.67-2.35 1.93-.02.4.42 1.28.82 1.63-.9.35-1.94-.12-2.51-.48a5 5 0 0 0-.32 1.87c-.68 0-1.57-1-1.8-1.37-.3.18-.85 1.15-.96 1.72a2.4 2.4 0 0 1-.81-.86 2.4 2.4 0 0 1-.3-1.15c-.38.27-1.48.95-1.99 1.18-.25-.58-.15-1.3 0-2.06-.21.12-1.8.27-2.43.12.32-.36.75-1.19.94-1.57A4.5 4.5 0 0 1 .44 10.6c.48-.22.97-.53 1.49-1.06C1.26 9.17.24 8.64 0 7.7a6 6 0 0 0 1.79-.32C1.28 7.08.44 6.15.6 5.01c.42.21 1.3.37 1.73.3a3.4 3.4 0 0 1-.25-2.75 5 5 0 0 0 1.48 1c-.08-.8.3-2.31.8-2.71.2.46.73 1.21 1.08 1.4.09-.61.87-2.06 1.57-2.25 0 .5.27 1.4.5 1.67.51-.54 2.25-1.44 3.64-1.13-.43.45-.75.61-.86.98 1.05 0 2.78.34 4.27 1.93-2.34-.89-5.69.56-5.69 3.5" class="bg" opacity=".5"/>
42
+ <path fill="currentColor" d="M11.21 3.59a4.1 4.1 0 0 0 2.47 2.89c.24-.22.61-.38.95-.19.76.44.2 1.26-.34 1.66l-.07.06a13 13 0 0 1-4.49 1.61l-.3-.43a10.5 10.5 0 0 0 4.13-1.31 1 1 0 0 0 .23-.25.5.5 0 0 0-.21-.69l-.15-.06a4.5 4.5 0 0 1-1.77-1.31 4.5 4.5 0 0 1-.88-1.77q.2-.12.43-.21"/>
43
+ <path fill="currentColor" d="M10.36 5.18a.4.4 0 0 0-.03.38c.09.2.3.3.46.23s.24-.3.15-.5l-.01-.02q.23.13.34.39a.83.83 0 0 1-.43 1.08.8.8 0 0 1-1.08-.43.83.83 0 0 1 .6-1.13"/>
44
+ </symbol>`,gu=`<symbol id="file-tree-builtin-bun" viewBox="0 0 16 16">
45
+ <path fill="currentColor" d="M8 14c3.87 0 7-2.46 7-5.49 0-1.88-1.2-3.53-3.04-4.52q-1.1-.61-1.84-1.07C9.2 2.35 8.64 2 8 2s-1.36.45-2.31 1.03A29 29 0 0 1 4.04 4C2.2 4.98 1 6.63 1 8.51 1 11.54 4.13 14 8 14M7.18 3.88q.3-.66.3-1.37c0-.08.11-.1.13-.01.38 1.57-.53 2.35-1.2 2.61-.08.03-.12-.07-.06-.12a3 3 0 0 0 .83-1.12m1.2-.05a3 3 0 0 0-.45-1.3V2.5c-.04-.07.05-.15.1-.1 1.15 1.2.77 2.3.33 2.87-.05.05-.13 0-.11-.08q.21-.67.13-1.37m1.04-.32a3 3 0 0 0-.94-1.02v-.01c-.06-.05-.01-.16.07-.12 1.51.61 1.61 1.8 1.43 2.5l-.03.03a.07.07 0 0 1-.1-.06 3 3 0 0 0-.43-1.32m-2.97.32c-.36.3-.74.43-1.2.56q-.11 0-.1-.1a3.5 3.5 0 0 0 1.76-1.57s.09-.07.1.04c0 .18-.2.76-.56 1.07m2.89 6.36q-.13.52-.55.88a1.3 1.3 0 0 1-.75.35 1.3 1.3 0 0 1-.77-.35 1.7 1.7 0 0 1-.54-.88.13.13 0 0 1 .15-.15h2.31a.14.14 0 0 1 .15.15M6.15 8.95a1.1 1.1 0 0 1-1.39-.14A1.1 1.1 0 0 1 5.12 7a1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1-.17 1.69m4.96 0a1.1 1.1 0 0 1-1.4-.14 1.1 1.1 0 0 1 .37-1.8 1.1 1.1 0 0 1 1.2.25 1.1 1.1 0 0 1 .24 1.2 1 1 0 0 1-.41.5"/>
46
+ </symbol>`,_u=`<symbol id="file-tree-builtin-claude" viewBox="0 0 16 16">
47
+ <path fill="currentColor" d="M3.75 10.31 6.5 8.77l.04-.14-.04-.07h-.14l-.46-.03-1.57-.04-1.38-.07-1.33-.07-.34-.07L1 7.86l.03-.21.28-.18.4.03.89.07 1.33.08.97.06 1.43.16h.22l.03-.1-.07-.05-.06-.06-1.39-.92-1.48-.98-.79-.57-.42-.28-.2-.28-.1-.6.39-.41.52.04.12.03.52.4 1.12.86L6.2 6.04l.2.17.09-.06.01-.04-.1-.15-.76-1.46-.85-1.46-.37-.6-.1-.36a1 1 0 0 1-.06-.42l.42-.59.25-.07.6.08.22.2.36.84.58 1.3.9 1.77.29.53.14.47.04.14h.1v-.07l.07-1 .14-1.22.14-1.57.04-.45.23-.53.42-.28.36.15.28.41-.04.25-.16 1.08-.36 1.7-.21 1.14h.12l.14-.15.58-.76.97-1.2.42-.5.5-.51.32-.25h.6l.44.66-.2.68-.61.79-.52.65-.74 1-.45.8.04.05h.1l1.68-.36.9-.16 1.06-.18.5.23.05.22-.2.48-1.15.28-1.34.28-2 .46-.04.01.03.04.9.09.4.03h.94l1.77.14.46.28.27.37-.04.28-.72.37-.95-.23-2.24-.53-.76-.18h-.11v.06l.64.63L12 10.86l1.48 1.35.07.34-.18.28-.2-.03-1.29-.98-.5-.42-1.12-.95h-.07v.1l.25.38 1.37 2.05.07.63-.1.2-.36.14-.38-.08-.8-1.12-.85-1.26-.66-1.15-.07.05-.4 4.23-.19.21-.42.17-.35-.28-.2-.42.2-.87.23-1.12.18-.9.17-1.1.1-.36v-.03h-.1l-.84 1.16-1.27 1.72-1 1.07-.24.1-.42-.22.04-.39.22-.32 1.4-1.8.84-1.1.57-.64-.02-.07h-.04l-3.7 2.4-.66.09-.28-.28.03-.42.14-.14 1.12-.77z"/>
48
+ </symbol>`,vu=`<symbol id="file-tree-builtin-css" viewBox="0 0 16 16">
49
+ <path fill="currentColor" d="M8 15c-5.76 0-7-1.24-7-7V2a1 1 0 0 1 1-1h6c5.77 0 7 1.24 7 7s-1.24 7-7 7" class="vector" opacity=".2"/>
50
+ <path fill="currentColor" d="M10.1 9.19h.73c.03.49.22.6 1 .6.76 0 .93-.12.93-.68 0-.52-.17-.67-.94-.85-1.38-.3-1.68-.56-1.68-1.47 0-1.05.3-1.29 1.67-1.29 1.29 0 1.57.2 1.6 1.13h-.74c-.01-.34-.17-.42-.85-.42-.77 0-.94.1-.94.58 0 .42.17.55.96.73 1.36.3 1.66.58 1.66 1.59 0 1.14-.31 1.39-1.73 1.39-1.39 0-1.69-.24-1.67-1.31m-3.9 0h.74c.03.49.21.6.99.6.76 0 .93-.12.93-.68 0-.52-.17-.67-.93-.85-1.39-.3-1.69-.56-1.69-1.47 0-1.05.3-1.29 1.67-1.29 1.3 0 1.58.2 1.6 1.13h-.73c-.02-.34-.18-.42-.85-.42-.78 0-.95.1-.95.58 0 .42.17.55.96.73 1.37.3 1.67.58 1.67 1.59 0 1.14-.32 1.39-1.74 1.39-1.38 0-1.68-.24-1.66-1.31m-1.22 0h.75c-.09 1.07-.37 1.31-1.56 1.31-1.37 0-1.68-.45-1.68-2.5 0-1.96.36-2.5 1.68-2.5 1.16 0 1.44.25 1.52 1.35h-.76c-.08-.52-.22-.64-.76-.64-.74 0-.9.33-.9 1.78 0 1.47.16 1.8.9 1.8.58 0 .74-.11.8-.6"/>
51
+ </symbol>`,yu=`<symbol id="file-tree-builtin-database" viewBox="0 0 16 16">
52
+ <path fill="currentColor" d="M14.953 9.733a12.4 12.4 0 0 1-.244 1.936c-.207.933-.532 1.58-.996 2.044s-1.11.789-2.044.996C10.73 14.918 9.533 15 8 15s-2.73-.082-3.669-.291c-.933-.207-1.58-.532-2.044-.996s-.789-1.11-.996-2.044c-.122-.547-.2-1.182-.244-1.92q.23.364.532.667c.64.639 1.482 1.031 2.533 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265a4 4 0 0 0 .541-.683"/>
53
+ <path fill="currentColor" d="M14.93 5.924c-.046.663-.118 1.24-.23 1.743-.207.932-.532 1.579-.995 2.042s-1.11.789-2.042.996c-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997s-.789-1.11-.996-2.042a12 12 0 0 1-.227-1.683l.016-.188a4 4 0 0 0 .5.62c.638.639 1.48 1.031 2.532 1.265 1.046.232 2.33.315 3.884.315 1.555 0 2.838-.083 3.884-.315 1.051-.234 1.893-.626 2.532-1.265.192-.192.357-.404.506-.633z"/>
54
+ <path fill="currentColor" d="M8 1c1.533 0 2.73.082 3.669.291.933.207 1.58.533 2.044.996.403.404.904.944.91 1.695.004.764-.509 1.318-.918 1.727-.463.463-1.11.789-2.042.996-.938.209-2.135.291-3.667.291-1.531 0-2.729-.082-3.667-.29-.932-.208-1.579-.534-2.042-.997-.406-.406-.915-.953-.915-1.71 0-.758.509-1.305.915-1.712.464-.463 1.11-.789 2.044-.996C5.27 1.082 6.467 1 8 1"/>
55
+ </symbol>`,bu=`<symbol id="file-tree-builtin-default" viewBox="0 0 16 16">
56
+ <path fill="currentColor" d="M8 1v3a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1z" class="bg" opacity=".4"/>
57
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
58
+ </symbol>`,xu=`<symbol id="file-tree-builtin-docker" viewBox="0 0 16 16">
59
+ <path fill="currentColor" d="M15.85 6.54c-.05-.04-.45-.36-1.31-.36q-.34 0-.68.06a2.7 2.7 0 0 0-1.14-1.79l-.23-.14-.15.23a3 3 0 0 0-.4 1q-.24 1.01.26 1.84c-.4.24-1.03.3-1.17.3H.5a.5.5 0 0 0-.5.52q-.01 1.46.46 2.83.55 1.5 1.6 2.18c.79.5 2.08.79 3.54.79q.96 0 1.94-.18a8 8 0 0 0 2.55-.97 7 7 0 0 0 1.73-1.5 10 10 0 0 0 1.7-3.06h.15a2.4 2.4 0 0 0 1.8-.7 2 2 0 0 0 .47-.74l.06-.2z"/>
60
+ <path fill="currentColor" d="M1.48 7.36h1.4a.14.14 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H1.48a.13.13 0 0 0-.13.14v1.32q.02.13.13.13m1.94 0h1.41a.14.14 0 0 0 .13-.13V5.91q-.01-.12-.13-.14h-1.4a.13.13 0 0 0-.13.14v1.32q0 .13.12.13m1.98 0h1.4q.13 0 .14-.13V5.91a.13.13 0 0 0-.14-.14H5.4q-.1.01-.12.14v1.32q0 .13.12.13m1.95 0h1.42q.1 0 .12-.13V5.91q0-.12-.12-.14H7.35q-.1.01-.12.14v1.32q.01.13.12.13M3.42 5.5h1.41c.07 0 .13-.08.13-.15V4.03a.13.13 0 0 0-.13-.14h-1.4q-.12 0-.13.14v1.31q0 .13.12.15m1.98 0h1.4c.08 0 .14-.08.14-.15V4.03q0-.13-.14-.14H5.4q-.1 0-.12.14v1.31q0 .13.12.15m1.95 0h1.42c.06 0 .12-.08.12-.15V4.03q-.01-.13-.12-.14H7.35q-.1 0-.12.14v1.31q.01.13.12.15m0-1.9h1.42q.1-.02.12-.14v-1.3Q8.88 2 8.77 2H7.35q-.1 0-.12.14v1.3q.01.13.12.14m1.97 3.78h1.4a.13.13 0 0 0 .14-.13V5.91q-.01-.12-.13-.14H9.32q-.1.01-.12.14v1.32q.01.13.12.13" opacity=".5"/>
61
+ </symbol>`,Su=`<symbol id="file-tree-builtin-eslint" viewBox="0 0 16 16">
62
+ <path fill="currentColor" d="M11.16 6.1 8.12 4.35a.3.3 0 0 0-.24 0L4.84 6.1a.3.3 0 0 0-.12.2v3.5q0 .14.12.22l3.04 1.74q.12.08.24 0l3.04-1.74a.2.2 0 0 0 .13-.22V6.3a.3.3 0 0 0-.13-.2" opacity=".5"/>
63
+ <path fill="currentColor" d="m.1 7.69 3.63-6.3A.8.8 0 0 1 4.37 1h7.26c.26 0 .5.17.64.4l3.63 6.27a.8.8 0 0 1 0 .75l-3.63 6.24a.7.7 0 0 1-.64.34H4.37a.7.7 0 0 1-.64-.34L.1 8.41a.7.7 0 0 1 0-.72m3 3.02q.01.15.14.23l4.63 2.66q.13.06.26 0l4.63-2.66a.3.3 0 0 0 .14-.23V5.4a.3.3 0 0 0-.14-.23L8.13 2.52a.3.3 0 0 0-.26 0L3.24 5.17a.3.3 0 0 0-.14.23z"/>
64
+ </symbol>`,Cu=`<symbol id="file-tree-builtin-font" viewBox="0 0 16 16">
65
+ <path fill="currentColor" d="M12.3 13c-1.59 0-2.68-.99-2.68-2.5 0-1.43 1-2.34 2.88-2.35h2.16v-.83c0-1.08-.62-1.68-1.73-1.68-1.05 0-1.66.54-1.73 1.36H9.93c.09-1.43 1.06-2.48 3.05-2.48 1.75 0 3.02.95 3.02 2.68v5.66h-1.29v-1.02h-.04c-.41.66-1.16 1.16-2.37 1.16m.36-1.12c1.14 0 2-.72 2-1.74v-.96H12.6c-1.12 0-1.6.54-1.6 1.28 0 .97.8 1.42 1.66 1.42m-11.24.98H0L3.8 2h1.39l3.8 10.86H7.54l-1.08-3.2H2.5zm3.09-9.25h-.04l-1.6 4.95H6.1z"/>
66
+ </symbol>`,wu=`<symbol id="file-tree-builtin-git" viewBox="0 0 16 16">
67
+ <path fill="currentColor" d="M14.74 7.38 8.62 1.26a.9.9 0 0 0-1.27 0L6.08 2.53l1.61 1.61a1.07 1.07 0 0 1 1.36 1.37l1.55 1.55a1.07 1.07 0 0 1 1.1 1.77 1.07 1.07 0 0 1-1.74-1.16L8.5 6.22v3.8a1.07 1.07 0 1 1-.89-.02V6.15a1.07 1.07 0 0 1-.58-1.4l-1.58-1.6-4.2 4.2a.9.9 0 0 0 0 1.27l6.12 6.12a.9.9 0 0 0 1.27 0l6.09-6.09a.9.9 0 0 0 0-1.27"/>
68
+ </symbol>`,Tu=`<symbol id="file-tree-builtin-go" viewBox="0 0 16 16">
69
+ <path fill="currentColor" fill-rule="evenodd" d="M4.41 4.57A3.2 3.2 0 0 1 6.87 5q.74.49 1.08 1.29.08.12-.1.16l-1.55.4c-.14.03-.15.04-.27-.1a1 1 0 0 0-.44-.34 1.6 1.6 0 0 0-1.68.14q-.95.61-.94 1.73c0 .73.52 1.33 1.25 1.43q.95.1 1.58-.6l.25-.34h-1.8c-.19 0-.24-.12-.17-.27.12-.28.34-.76.47-1a.3.3 0 0 1 .24-.14h2.98a4 4 0 0 1 .64-1.19 4 4 0 0 1 2.6-1.52 3.5 3.5 0 0 1 2.64.46q1.13.73 1.31 2.04a3.5 3.5 0 0 1-1.06 3.09q-.93.92-2.23 1.17l-.74.08a3.5 3.5 0 0 1-2.27-.8 3 3 0 0 1-.93-1.42 4 4 0 0 1-.39.61 4 4 0 0 1-2.64 1.56 3.3 3.3 0 0 1-2.5-.6 3 3 0 0 1-1.18-2.03 3.5 3.5 0 0 1 .8-2.67 4 4 0 0 1 2.6-1.58M13.1 7.5a1.53 1.53 0 0 0-1.9-1.21q-1.3.3-1.62 1.59a1.5 1.5 0 0 0 .85 1.72q.77.33 1.52-.05a2 2 0 0 0 1.18-1.74q0-.17-.03-.3" clip-rule="evenodd"/>
70
+ </symbol>`,Eu=`<symbol id="file-tree-builtin-graphql" viewBox="0 0 16 16">
71
+ <path fill="currentColor" fill-rule="evenodd" d="M8 1a1.25 1.25 0 0 1 1.18 1.65l2.8 1.61q.33-.25.77-.26a1.25 1.25 0 0 1 .48 2.4v3.2a1.25 1.25 0 1 1-1.25 2.13l-2.8 1.62A1.25 1.25 0 0 1 8 15a1.25 1.25 0 0 1-1.18-1.65l-2.8-1.62q-.33.26-.77.27a1.25 1.25 0 0 1-.48-2.4V6.4a1.25 1.25 0 1 1 1.25-2.14l2.8-1.61A1.25 1.25 0 0 1 8 1M4.44 11.14l-.06.13 2.75 1.58a1.25 1.25 0 0 1 1.74 0l2.74-1.58-.05-.13zm3.89-7.68a1.3 1.3 0 0 1-.66 0L4.03 9.77q.37.3.45.78h7.04q.08-.48.45-.78zM4.38 4.73a1.24 1.24 0 0 1-1.02 1.76v3.02l.13.01 3.67-6.35-.03-.02zm4.46-1.56 3.67 6.35.13-.01V6.49a1.25 1.25 0 0 1-1.03-1.76L8.87 3.15z" clip-rule="evenodd"/>
72
+ </symbol>`,Du=`<symbol id="file-tree-builtin-html" viewBox="0 0 16 16">
73
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
74
+ <path fill="currentColor" d="M10.48 3.76a.5.5 0 0 1 .4.58L10.6 5.8h1.14a.5.5 0 0 1 0 1h-1.32L10 9.2h1.08a.5.5 0 0 1 0 1H9.8l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H6.4l-.3 1.64a.5.5 0 1 1-.98-.18l.27-1.46H4.25a.5.5 0 0 1 0-1h1.32L6 6.8H4.93a.5.5 0 0 1 0-1H6.2l.3-1.64a.5.5 0 1 1 .98.18L7.2 5.8h2.4l.3-1.64a.5.5 0 0 1 .58-.4M6.58 9.2h2.4l.44-2.4h-2.4z" class="fg"/>
75
+ </symbol>`,Ou=`<symbol id="file-tree-builtin-image" viewBox="0 0 16 16">
76
+ <path fill="currentColor" d="M12.5 2A2.5 2.5 0 0 1 15 4.5v4.67l-4.05-3.54-4.08 4.08-3-2L1 10.6V4.5A2.5 2.5 0 0 1 3.5 2z" opacity=".3"/>
77
+ <path fill="currentColor" d="M15 10.5v1a2.5 2.5 0 0 1-2.5 2.5h-9a2.5 2.5 0 0 1-2.46-2.04L4 9l3 2 4-4zm-7-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/>
78
+ </symbol>`,ku=`<symbol id="file-tree-builtin-javascript" viewBox="0 0 16 16">
79
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
80
+ <path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66M3.5 9.5h.98c0 .76.15.92.85.92.77 0 .94-.18.94-1.02V5.1h1v4.34c0 1.54-.35 1.87-1.92 1.87-1.55 0-1.89-.32-1.86-1.8"/>
81
+ </symbol>`,Au=`<symbol id="file-tree-builtin-json" viewBox="0 0 16 16">
82
+ <path fill="currentColor" d="M13.25 11.5V9.75a.5.5 0 0 1 .36-.48l.55-.15a1.16 1.16 0 0 0 0-2.24l-.55-.15a.5.5 0 0 1-.36-.48V4.5a2.5 2.5 0 0 0-2.5-2.5h-.25a.5.5 0 0 0 0 1h.25a1.5 1.5 0 0 1 1.5 1.5v1.75a1.5 1.5 0 0 0 1.09 1.44l.54.15a.16.16 0 0 1 0 .32l-.54.15a1.5 1.5 0 0 0-1.09 1.44v1.75a1.5 1.5 0 0 1-1.5 1.5h-.25a.5.5 0 0 0 0 1h.25a2.5 2.5 0 0 0 2.5-2.5m-10.5 0V9.75a.5.5 0 0 0-.36-.48l-.55-.15a1.16 1.16 0 0 1 0-2.24l.55-.15a.5.5 0 0 0 .36-.48V4.5A2.5 2.5 0 0 1 5.25 2h.25a.5.5 0 0 1 0 1h-.25a1.5 1.5 0 0 0-1.5 1.5v1.75a1.5 1.5 0 0 1-1.09 1.44l-.54.15a.16.16 0 0 0 0 .32l.54.15a1.5 1.5 0 0 1 1.09 1.45v1.74a1.5 1.5 0 0 0 1.5 1.5h.25a.5.5 0 0 1 0 1h-.25a2.5 2.5 0 0 1-2.5-2.5"/>
83
+ </symbol>`,ju=`<symbol id="file-tree-builtin-markdown" viewBox="0 0 16 16">
84
+ <path fill="currentColor" d="M1 12V4h2l2 2.5L7 4h2v8H7V7.5l-2 2-2-2V12zm9-3 3 3.5L16 9h-2V4h-2v5z"/>
85
+ </symbol>`,Mu=`<symbol id="file-tree-builtin-mcp" viewBox="0 0 16 16">
86
+ <path fill="currentColor" d="M9.26-.04a3 3 0 0 1 2 .82 2.8 2.8 0 0 1 .8 2.35 2.9 2.9 0 0 1 2.41.8l.03.02a2.74 2.74 0 0 1 0 3.94l-5.8 5.69-.04.06-.02.07q0 .04.02.07.01.04.04.06l1.2 1.17a.55.55 0 0 1 0 .79.6.6 0 0 1-.81 0l-1.2-1.17a1.3 1.3 0 0 1 0-1.84L13.7 7.1a1.65 1.65 0 0 0 .37-1.82 2 2 0 0 0-.37-.54l-.03-.03a1.73 1.73 0 0 0-2.4 0L6.47 9.4l-.07.06a.58.58 0 0 1-.92-.18.6.6 0 0 1 .12-.6l4.85-4.76a1.65 1.65 0 0 0 0-2.36 1.73 1.73 0 0 0-2.4 0l-6.43 6.3a.6.6 0 0 1-.8 0 .55.55 0 0 1 0-.8L7.25.79a3 3 0 0 1 2-.82"/>
87
+ <path fill="currentColor" d="M9.26 2.19a.6.6 0 0 1 .52.34.6.6 0 0 1 0 .43l-.12.18L4.9 7.79a1.65 1.65 0 0 0 0 2.36 1.73 1.73 0 0 0 2.4 0l4.75-4.66a.58.58 0 0 1 .93.18.6.6 0 0 1-.12.61l-4.75 4.66a2.9 2.9 0 0 1-4.01 0 2.75 2.75 0 0 1-.62-3.04A3 3 0 0 1 4.1 7l4.74-4.65a.6.6 0 0 1 .4-.16"/>
88
+ </symbol>`,Nu=`<symbol id="file-tree-builtin-nextjs" viewBox="0 0 16 16">
89
+ <defs>
90
+ <linearGradient id="a" x1="4.522" x2="14" y1="3.943" y2="16" gradientUnits="userSpaceOnUse">
91
+ <stop stop-color="currentColor"/>
92
+ <stop offset="1" stop-color="currentColor" stop-opacity="0"/>
93
+ </linearGradient>
94
+ </defs>
95
+ <path fill="currentColor" d="M3 2h1.522v9.09H3z"/>
96
+ <path fill="url(#a)" d="M4.903 2 15 15.075q-.565.5-1.195.925L4.522 3.943z"/>
97
+ <path fill="currentColor" d="M12.172 2h-1.508v9.094h1.508z"/>
98
+ </symbol>`,Pu=`<symbol id="file-tree-builtin-npm" viewBox="0 0 16 16">
99
+ <path fill="currentColor" d="M2 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z" class="vector" opacity=".2"/>
100
+ <path fill="currentColor" d="M10.5 13H13V3H3v10h5V5.5h2.5z"/>
101
+ </symbol>`,Fu=`<symbol id="file-tree-builtin-oxc" viewBox="0 0 16 16">
102
+ <path fill="currentColor" d="M9.5 1a.5.5 0 0 1 .5.5V3h3.5a.5.5 0 0 1 .38.83L10.5 7.69v1.44q.41.04.95-.16a4 4 0 0 0 .72-.35l.04-.03h.01a.5.5 0 0 1 .67.1l2 2.5a.5.5 0 0 1 0 .62c-.76.96-3.14 2.69-6.89 2.69s-6.13-1.73-6.89-2.69a.5.5 0 0 1 0-.62l2-2.5a.5.5 0 0 1 .67-.1l.05.03.16.09q.22.13.56.26.54.2.95.16V7.69L2.12 3.83A.5.5 0 0 1 2.5 3H6V1.5a.5.5 0 0 1 .5-.5zM7 3.5a.5.5 0 0 1-.5.5H3.6l2.78 3.17a.5.5 0 0 1 .12.33v2a.5.5 0 0 1-.28.45c-.7.35-1.5.15-2.02-.05a5 5 0 0 1-.58-.26l-1.46 1.84c.82.78 2.8 2.02 5.84 2.02s5.02-1.24 5.84-2.02l-1.46-1.83a5 5 0 0 1-.58.26c-.52.2-1.33.39-2.02.04a.5.5 0 0 1-.28-.45v-2a.5.5 0 0 1 .12-.33L12.4 4H9.5a.5.5 0 0 1-.5-.5V2H7z"/>
103
+ </symbol>`,Iu=`<symbol id="file-tree-builtin-postcss" viewBox="0 0 16 16">
104
+ <path fill="currentColor" d="M14.5 8a6.5 6.5 0 0 0-5.9-6.47l5.42 8.93A7 7 0 0 0 14.5 8M2.88 12A6.5 6.5 0 0 0 8 14.5c2.08 0 3.93-.98 5.12-2.5zm8.62-1h1.68L11.5 8.24zm-1-.55a4 4 0 0 1-.7.55h.7zM8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5M5.5 11h.7a4 4 0 0 1-.7-.55zm-2.68 0H4.5V8.24zm3.76-6.2A4 4 0 0 1 8 4.5q.76 0 1.42.3L8 2.46zM1.5 8q0 1.31.48 2.46L7.4 1.53A6.5 6.5 0 0 0 1.5 8m14 0a7.5 7.5 0 0 1-.99 3.72l-.01.03-.02.03A7.5 7.5 0 0 1 8 15.5a7.5 7.5 0 0 1-6.5-3.75l-.01-.03A7.5 7.5 0 1 1 15.5 8"/>
105
+ </symbol>`,Lu=`<symbol id="file-tree-builtin-prettier" viewBox="0 0 16 16">
106
+ <path fill="currentColor" d="M6 12v1H4.93v-1zm1-2v1H2v-1zm6-4v1h-3V6zm-1-4v1H9V2z"/>
107
+ <path fill="currentColor" d="M11.5 10v1H8v-1zM5 6v1H2V6zm5-2v1H9V4z" opacity=".8"/>
108
+ <path fill="currentColor" d="M6 14v1H2v-1zm-.5-6v1H2V8zM13 4v1h-3V4zM4.93 2v1H2V2z" opacity=".6"/>
109
+ <path fill="currentColor" d="M4.93 12v1H2v-1zM13 8v1H9V8zM5.5 4v1H2V4zM9 2v1H4.93V2z" opacity=".4"/>
110
+ </symbol>`,Ru=`<symbol id="file-tree-builtin-python" viewBox="0 0 16 16">
111
+ <path fill="currentColor" d="M8.33 8.4H10c1.16 0 1.9-.73 1.9-1.86V5.08q0-.24.25-.24h.74c.75 0 1.33.32 1.66.97q.4.73.41 1.46c.09.9.09 1.78-.24 2.67-.25.73-.75 1.3-1.58 1.46h-4.8c-.08 0-.25 0-.25.08v.4s.17.09.25.09h2.82q.34-.02.33.32v1.06c0 .56-.25.97-.75 1.13-.41.16-.83.33-1.24.4a7 7 0 0 1-2.98-.07 3 3 0 0 1-1.16-.49c-.33-.32-.58-.65-.5-1.14v-2.91c0-1.13.67-1.78 1.82-1.78q.89-.1 1.66-.08m2.32 4.86a.65.65 0 0 0-.66-.65c-.34 0-.67.33-.67.65s.33.57.67.65a.65.65 0 0 0 .66-.65" class="bg" opacity=".8"/>
112
+ <path fill="currentColor" d="M7.67 7.6H6c-1.16 0-1.9.73-1.9 1.86v1.46q0 .24-.25.24h-.74c-.75 0-1.33-.32-1.66-.97a3 3 0 0 1-.41-1.46 6 6 0 0 1 .24-2.67c.25-.73.75-1.3 1.58-1.46h4.8c.08 0 .25 0 .25-.08v-.4s-.17-.09-.25-.09H4.85c-.24 0-.33-.08-.33-.32V2.65c0-.56.25-.97.75-1.13.41-.16.83-.33 1.24-.4a7 7 0 0 1 2.98.07c.41.09.83.25 1.16.49.33.32.58.65.5 1.13v2.92c0 1.14-.67 1.78-1.82 1.78-.58.08-1.16.08-1.66.08M5.35 2.73c0 .33.25.65.66.65.33 0 .66-.32.66-.65 0-.32-.33-.56-.66-.64a.65.65 0 0 0-.66.64" class="fg"/>
113
+ </symbol>`,zu=`<symbol id="file-tree-builtin-react" viewBox="0 0 16 16">
114
+ <path fill="currentColor" d="M8 6.65c.73 0 1.31.6 1.31 1.35S8.73 9.35 8 9.35 6.69 8.75 6.69 8 7.27 6.65 8 6.65"/>
115
+ <path fill="currentColor" fill-rule="evenodd" d="M8 2.55c1.3-.99 2.59-1.34 3.5-.8.92.55 1.27 1.87 1.08 3.53C14.06 5.94 15 6.9 15 8s-.94 2.06-2.42 2.72c.19 1.65-.16 2.98-1.08 3.52-.91.55-2.2.2-3.5-.8-1.3 1-2.58 1.35-3.5.8-.91-.54-1.27-1.87-1.08-3.52C1.94 10.06 1 9.1 1 8s.94-2.06 2.42-2.72c-.19-1.66.17-2.98 1.08-3.52s2.2-.2 3.5.8M4.26 11.2c-.08 1.34.28 2.03.68 2.26s1.15.22 2.25-.52l.11-.09a12 12 0 0 1-1.24-1.39 11 11 0 0 1-1.8-.41zm7.47-.15q-.83.27-1.79.41-.6.8-1.24 1.4l.11.08c1.1.74 1.86.76 2.25.52.4-.23.76-.92.68-2.26zm-3.04.54a14 14 0 0 1-1.38 0q.34.38.69.7.35-.32.7-.7M8 5.29q-.76 0-1.47.1A13 13 0 0 0 5.07 8a14 14 0 0 0 1.46 2.62 13 13 0 0 0 2.94 0A13 13 0 0 0 10.93 8a14 14 0 0 0-1.46-2.62A13 13 0 0 0 8 5.3M4.64 9.18q-.15.5-.25.96.44.16.94.27a15 15 0 0 1-.7-1.23m6.73 0a15 15 0 0 1-.7 1.23q.5-.11.95-.27a10 10 0 0 0-.25-.96M3.44 6.26C2.27 6.86 1.87 7.53 1.87 8s.4 1.14 1.57 1.74l.13.07q.18-.88.55-1.81a12 12 0 0 1-.55-1.8q-.07.02-.13.06m8.99-.07A12 12 0 0 1 11.88 8q.36.94.55 1.8l.13-.06c1.17-.6 1.56-1.27 1.56-1.74s-.39-1.14-1.56-1.74zm-7.1-.6q-.5.11-.94.27.1.46.25.96a15 15 0 0 1 .69-1.23m5.34 0a15 15 0 0 1 .7 1.23q.14-.5.24-.96-.44-.15-.94-.27M7.18 3.06c-1.09-.74-1.85-.76-2.24-.52s-.76.92-.69 2.26l.01.15a11 11 0 0 1 1.8-.41q.6-.8 1.24-1.4zm3.88-.52c-.4-.24-1.15-.22-2.25.52l-.12.08q.65.6 1.25 1.4.96.15 1.8.41v-.14c.08-1.35-.28-2.04-.68-2.27M8 3.7a10 10 0 0 0-.7.7 14 14 0 0 1 1.4 0 10 10 0 0 0-.7-.7" clip-rule="evenodd"/>
116
+ </symbol>`,Bu=`<symbol id="file-tree-builtin-ruby" viewBox="0 0 16 16">
117
+ <path fill="currentColor" fill-rule="evenodd" d="M11.04 2c.48 0 .92.23 1.18.6l2.54 3.65c.37.52.3 1.23-.15 1.69l-5.58 5.64a1.47 1.47 0 0 1-2.06 0L1.39 7.94a1.3 1.3 0 0 1-.15-1.7l2.54-3.63q.2-.3.5-.45.33-.16.68-.16zm.84 2.17a.5.5 0 0 0-.7-.05L8 6.84 4.83 4.12a.5.5 0 0 0-.65.76L6.65 7H3.5a.5.5 0 0 0 0 1h9a.5.5 0 0 0 0-1H9.35l2.48-2.12a.5.5 0 0 0 .05-.7" clip-rule="evenodd"/>
118
+ </symbol>`,Vu=`<symbol id="file-tree-builtin-rust" viewBox="0 0 16 16">
119
+ <path fill="currentColor" fill-rule="evenodd" d="M8 .8a.2.2 0 0 1 .18.1l.38.6.16.02.5-.53.01-.01a.2.2 0 0 1 .33.08l.25.68.16.05.59-.43h.02a.2.2 0 0 1 .3.14l.12.71.15.08.65-.3a.2.2 0 0 1 .2.02.2.2 0 0 1 .1.18l-.03.72.12.1.71-.16a.2.2 0 0 1 .25.25l-.17.7q.06.06.1.13l.73-.03A.2.2 0 0 1 14 4a.2.2 0 0 1 .02.2l-.3.66.08.14.71.12a.2.2 0 0 1 .14.32l-.43.59.05.16.68.25a.2.2 0 0 1 .07.35l-.53.49.01.16.62.38a.2.2 0 0 1 0 .36l-.62.38-.01.16.53.5a.2.2 0 0 1-.07.34l-.68.25-.05.16.43.59a.2.2 0 0 1-.14.32l-.72.12-.07.15.3.65a.2.2 0 0 1-.02.2.2.2 0 0 1-.18.1l-.72-.03-.1.13.16.7a.2.2 0 0 1-.25.25l-.7-.17-.13.1.03.73a.2.2 0 0 1-.1.18.2.2 0 0 1-.2.02l-.66-.3-.14.08-.12.71a.2.2 0 0 1-.32.14l-.59-.43-.16.05-.25.68a.2.2 0 0 1-.34.07l-.5-.53-.16.01-.38.62a.2.2 0 0 1-.36 0l-.38-.62-.16-.01-.5.53a.2.2 0 0 1-.34-.07l-.25-.68-.16-.05-.59.43a.2.2 0 0 1-.32-.14L5 13.78l-.15-.07-.65.3a.2.2 0 0 1-.2-.02.2.2 0 0 1-.1-.18l.03-.72-.13-.1-.7.16a.2.2 0 0 1-.25-.25l.17-.7-.1-.13-.73.03a.2.2 0 0 1-.2-.3l.3-.66-.08-.14-.71-.12a.2.2 0 0 1-.14-.32l.43-.59-.05-.16-.68-.25A.2.2 0 0 1 1 9.22l.53-.5-.02-.16-.6-.38A.2.2 0 0 1 .8 8a.2.2 0 0 1 .1-.18l.6-.38.02-.16-.53-.5a.2.2 0 0 1 .07-.34l.68-.25.05-.16-.43-.59a.2.2 0 0 1 .14-.32L2.2 5l.08-.15L2 4.2a.2.2 0 0 1 .2-.3l.72.03.1-.13-.16-.7a.2.2 0 0 1 .25-.25l.7.16.13-.1-.03-.72A.2.2 0 0 1 4 2a.2.2 0 0 1 .2-.02l.65.3L5 2.2l.12-.71v-.03a.2.2 0 0 1 .32-.1l.59.41.16-.04.25-.68.01-.02A.2.2 0 0 1 6.8.99l.49.53.16-.02.38-.61.02-.02A.2.2 0 0 1 8 .79M6.8 9.45h1.26l.06.01q.03.01.03.05v1.52q0 .07-.09.06h-4.5A5.4 5.4 0 0 0 8 13.42a5.4 5.4 0 0 0 4.45-2.33h-2.42c-.36 0-.68-.5-.77-.75-.08-.22-.2-.91-.25-1.12-.15-.61-.59-.71-.78-.73H6.8zM8 2.58a5.4 5.4 0 0 0-4.07 1.85h5.74l.17.02c.23.03.6.12.96.35.34.23.83.68.83 1.4 0 .66-.55 1.16-1.08 1.5.42.33.7.53.86 1.44.04.17.34.32.62.29.29-.03.62-.16.62-.75v-.24q0-.1.07-.1h.68A5.43 5.43 0 0 0 8 2.59M2.96 6.03a5.4 5.4 0 0 0-.19 3.37h1.66V6.03zM6.8 7.06h1.66c.35 0 .77-.12.77-.47 0-.42-.55-.53-.65-.53H6.8z" clip-rule="evenodd"/>
120
+ </symbol>`,Hu=`<symbol id="file-tree-builtin-sass" viewBox="0 0 16 16">
121
+ <path fill="currentColor" fill-rule="evenodd" d="M8.08 1.44c2.41-.91 4.96-.37 5.35 1.27.39 1.62-.92 3.56-2.6 4.25a5 5 0 0 1-3.26.35c-.58-.2-.92-.62-1-.85-.03-.09-.09-.24 0-.3.05-.03.08-.02.22.15s.7.6 1.75.48c2.78-.34 4.45-2.64 3.92-3.88-.37-.87-2.5-1.26-5.18.16C4.03 4.81 3.85 6.24 3.82 6.8c-.08 1.5 1.73 2.28 2.7 3.4q.04.03.07.08c.3-.12.7-.19 1.35-.2 1.58-.03 2.47 1.08 2.43 2.08-.03.78-.7 1.1-.82 1.13-.1.01-.14.02-.15-.06q-.03-.06.13-.15c.16-.09.42-.3.48-.72.05-.43-.24-1.44-1.76-1.63a3 3 0 0 0-1.33.08c.27.62.32 1.87-.29 2.83-.63 1-1.8 1.61-2.93 1.27-.37-.1-.93-.92-.45-2.05.46-1.07 2.4-2.12 2.66-2.26-.9-.83-3.08-1.95-3.4-3.65-.08-.49.13-1.65 1.46-2.98a12 12 0 0 1 4.11-2.52m-1.88 9.7c-.01.01-.9.47-1.52 1.17-.59.66-.75 1.48-.43 1.69.3.18 1-.04 1.51-.62a3 3 0 0 0 .5-.9q.2-.64.02-1.39z" clip-rule="evenodd"/>
122
+ </symbol>`,Uu=`<symbol id="file-tree-builtin-stylelint" viewBox="0 0 16 16">
123
+ <path fill="currentColor" d="M4 3v3.5l1.5-1L7 15 .5 6l1-1.5L0 3l2.5-2h1zm12 0-1.5 1.5 1 1.5L9 15l1.5-9.5 1.5 1V3l.5-2h1zm-8 8.5a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m0-3a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1"/>
124
+ <path fill="currentColor" d="M6.5 2.5V4l-2 1.5v-4zm5 3L9.5 4V2.5l2-1zM9 4H7V2.5h2z"/>
125
+ </symbol>`,Wu=`<symbol id="file-tree-builtin-svelte" viewBox="0 0 16 16">
126
+ <path fill="currentColor" d="m3.98 3.7 3.36-2.08a4.5 4.5 0 0 1 5.9 1.23 4 4 0 0 1 .7 3.02q-.16.75-.58 1.4c.42.77.56 1.66.4 2.52a3.7 3.7 0 0 1-1.57 2.4l-.17.1-3.36 2.09a4.5 4.5 0 0 1-5.9-1.23 4 4 0 0 1-.66-1.44 4 4 0 0 1-.04-1.58 4 4 0 0 1 .58-1.4 4 4 0 0 1-.4-2.52 3.7 3.7 0 0 1 1.57-2.4zl3.36-2.08zm7.87 0a2.7 2.7 0 0 0-1.26-.95 2.7 2.7 0 0 0-1.6-.07 3 3 0 0 0-.52.2l-.16.09-3.36 2.08a2 2 0 0 0-.69.64 2 2 0 0 0-.36.86 2.3 2.3 0 0 0 .42 1.81A2.7 2.7 0 0 0 7.18 9.4q.28-.06.53-.2l.16-.09 1.28-.79.2-.09a.8.8 0 0 1 .87.31.7.7 0 0 1 .13.55.7.7 0 0 1-.24.4l-.08.05-3.36 2.08-.2.09a1 1 0 0 1-.49-.02 1 1 0 0 1-.38-.3 1 1 0 0 1-.13-.37v-.1l.01-.13-.13-.03a4 4 0 0 1-1.1-.5l-.2-.14-.18-.12-.07.18-.08.3a2.3 2.3 0 0 0 .43 1.82q.45.64 1.19.93.73.28 1.51.14l.16-.04q.27-.07.52-.2l.16-.09 3.36-2.08q.4-.25.69-.64.27-.4.36-.86a2.3 2.3 0 0 0-.42-1.82 2.7 2.7 0 0 0-1.27-.95 2.7 2.7 0 0 0-1.6-.08q-.27.07-.52.2l-.16.1-1.28.79-.2.09a1 1 0 0 1-.49-.03 1 1 0 0 1-.38-.29.7.7 0 0 1-.13-.54.7.7 0 0 1 .24-.4l.08-.06L9.33 4.4l.2-.1a.8.8 0 0 1 .87.32 1 1 0 0 1 .13.38v.22l.11.04q.6.18 1.12.5l.2.14.17.12.06-.19.08-.3a2.3 2.3 0 0 0-.42-1.81z"/>
127
+ </symbol>`,Gu=`<symbol id="file-tree-builtin-svg" viewBox="0 0 16 16">
128
+ <path fill="currentColor" d="M5 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z"/>
129
+ <path fill="currentColor" d="M6 1a5 5 0 0 1 4.58 3H7a3 3 0 0 0-3 3v3.58A5 5 0 0 1 6 1" opacity=".5"/>
130
+ </symbol>`,Ku=`<symbol id="file-tree-builtin-svgo" viewBox="0 0 16 16">
131
+ <path fill="currentColor" d="M9.43 4.8A.6.6 0 1 1 9.19 6l-.56.96a1.2 1.2 0 0 1 .32 1.58l.7.53a.89.89 0 1 1-.17.22l-.7-.52a1.2 1.2 0 0 1-1.4.25l-.56.87a.75.75 0 1 1-.57-.2 1 1 0 0 1 .32.05l.56-.87a1.2 1.2 0 0 1-.4-1.24l-1.2-.47a.56.56 0 1 1 .1-.28v.02l1.2.47a1.2 1.2 0 0 1 1.56-.55l.56-.97a.6.6 0 0 1-.15-.64.6.6 0 0 1 .63-.4"/>
132
+ <path fill="currentColor" fill-rule="evenodd" d="M9.17 1q.16.63.27 1.26a6 6 0 0 1 1.61.67q.52-.38 1.08-.71l1.65 1.64q-.32.56-.68 1.05.48.78.72 1.67.6.09 1.18.25v2.32q-.55.15-1.11.24a6 6 0 0 1-.7 1.82q.31.44.59.91l-1.65 1.65-.85-.55a6 6 0 0 1-1.9.83q-.08.47-.2.95H6.84q-.12-.46-.2-.93a6 6 0 0 1-1.96-.81q-.39.27-.8.51l-1.65-1.65q.25-.43.53-.84a6 6 0 0 1-.75-1.9L1 9.16V6.83q.54-.14 1.09-.24a6 6 0 0 1 .77-1.74q-.33-.47-.63-.98l1.65-1.65q.54.32 1.03.68a6 6 0 0 1 1.66-.66q.1-.61.26-1.24zM7.96 3.73a4 4 0 0 0-1.74.36 4.5 4.5 0 0 0-2.3 2.3 4.4 4.4 0 0 0-.1 3.29l.03.06a4.4 4.4 0 0 0 2.4 2.47 4.4 4.4 0 0 0 3.48-.02l.03-.02a4.4 4.4 0 0 0 2.3-2.42l.06-.14a4.4 4.4 0 0 0-.2-3.4 4.4 4.4 0 0 0-2.13-2.07L9.47 4a4 4 0 0 0-1.51-.27" clip-rule="evenodd"/>
133
+ </symbol>`,qu=`<symbol id="file-tree-builtin-swift" viewBox="0 0 16 16">
134
+ <path fill="currentColor" d="M9.63 1c6.15 4.35 4.16 9.15 4.16 9.15s1.75 2.05 1.04 3.85c0 0-.72-1.26-1.93-1.26-1.17 0-1.85 1.26-4.2 1.26C3.47 14 1 9.46 1 9.46c4.71 3.22 7.93.94 7.93.94C6.8 9.12 2.29 3 2.29 3c3.93 3.47 5.63 4.39 5.63 4.39-1.01-.87-3.86-5.13-3.86-5.13C6.34 4.66 10.86 8 10.86 8c1.28-3.7-1.23-7-1.23-7"/>
135
+ </symbol>`,Ju=`<symbol id="file-tree-builtin-table" viewBox="0 0 16 16">
136
+ <path fill="currentColor" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" opacity=".4"/>
137
+ <path fill="currentColor" d="M11.5 8a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5zM5 12h2.5v-1H5zm3.5 0H11v-1H8.5zM5 10h2.5V9H5zm3.5 0H11V9H8.5zm1-9a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z" class="fg"/>
138
+ </symbol>`,Yu=`<symbol id="file-tree-builtin-tailwind" viewBox="0 0 16 16">
139
+ <path fill="currentColor" fill-rule="evenodd" d="M8 4Q5.2 4 4.5 6.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C8.98 7.23 9.77 8 11.5 8q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C10.52 4.77 9.73 4 8 4M4.5 8Q1.7 8 1 10.67q1.05-1.34 2.45-1c.53.12.91.5 1.33.9C5.48 11.23 6.26 12 8 12q2.8 0 3.5-2.67-1.05 1.34-2.45 1c-.53-.12-.91-.5-1.33-.9C7.02 8.77 6.24 8 4.5 8" clip-rule="evenodd"/>
140
+ </symbol>`,Xu=`<symbol id="file-tree-builtin-terraform" viewBox="0 0 16 16">
141
+ <path fill="currentColor" d="M1 0v5.05l4.35 2.53V2.53zm9.18 5.34L5.83 2.82v5.05l4.35 2.53zm.47 5.06V5.34L15 2.82v5.05zm-.48 5.6-4.35-2.53V8.42l4.35 2.53z"/>
142
+ </symbol>`,Zu=`<symbol id="file-tree-builtin-text" viewBox="0 0 16 16">
143
+ <path fill="currentColor" fill-rule="evenodd" d="M8 4a3 3 0 0 0 3 3h3v5.5a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 12.5v-9A2.5 2.5 0 0 1 4.5 1H8z" class="bg" clip-rule="evenodd" opacity=".4"/>
144
+ <path fill="currentColor" d="M8.5 11a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm2-2a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1zm-1-8a.5.5 0 0 1 .354.146l4 4A.5.5 0 0 1 14 5.5V6h-3a2 2 0 0 1-2-2V1z"/>
145
+ </symbol>`,Qu=`<symbol id="file-tree-builtin-typescript" viewBox="0 0 16 16">
146
+ <path fill="currentColor" d="M8 1C2.24 1 1 2.24 1 8s1.24 7 7 7 7-1.24 7-7-1.24-7-7-7" class="bg" opacity=".2"/>
147
+ <path fill="currentColor" d="M8.1 9.64h.95c.04.62.28.76 1.28.76s1.2-.14 1.2-.85c0-.66-.2-.85-1.2-1.07-1.79-.38-2.18-.7-2.18-1.86C8.15 5.3 8.54 5 10.31 5c1.67 0 2.04.26 2.07 1.42h-.95c-.02-.43-.23-.53-1.1-.53-1 0-1.22.14-1.22.74 0 .52.22.7 1.24.92 1.76.38 2.15.73 2.15 2 0 1.44-.4 1.75-2.24 1.75-1.8 0-2.18-.3-2.15-1.66m-3 1.57V5.99H3.5v-.9h4.21v.9H6.1v5.22z"/>
148
+ </symbol>`,$u=`<symbol id="file-tree-builtin-vite" viewBox="0 0 16 16">
149
+ <path fill="currentColor" d="M8.57 14.87c-.18.26-.55.11-.55-.22v-3.18l-.05-.27-.13-.22-.2-.15-.24-.06H4.29c-.26 0-.4-.32-.26-.55L6.08 7c.3-.46 0-1.1-.5-1.1H1.8c-.25 0-.4-.32-.25-.56l2.65-4.2A.3.3 0 0 1 4.46 1h7.9c.26 0 .4.32.26.55l-2.05 3.23c-.29.46 0 1.1.5 1.1h3.12c.26 0 .4.34.24.57z"/>
150
+ </symbol>`,ed=`<symbol id="file-tree-builtin-vscode" viewBox="0 0 16 16">
151
+ <path fill="currentColor" d="m5.11 9.68-2.4 1.84a.6.6 0 0 1-.75-.04l-.77-.7a.6.6 0 0 1 0-.87L3.28 8zm5.52-8.42a.51.51 0 0 1 .87.36V4.8L7.32 8 5.1 6.32z" opacity=".75"/>
152
+ <path fill="currentColor" d="M11.1 14.99h.03zM1.96 4.52a.6.6 0 0 1 .75-.04l8.8 6.71v3.19a.51.51 0 0 1-.88.36L1.19 6.1a.6.6 0 0 1 0-.87z" opacity=".65"/>
153
+ <path fill="currentColor" d="M11.62 14.91a.9.9 0 0 1-1-.17.51.51 0 0 0 .88-.36V1.62a.51.51 0 0 0-.87-.36.9.9 0 0 1 1-.17l2.87 1.39a.9.9 0 0 1 .5.8v9.44a.9.9 0 0 1-.5.8z"/>
154
+ </symbol>`,td=`<symbol id="file-tree-builtin-vue" viewBox="0 0 16 16">
155
+ <path fill="currentColor" d="M9.62 2.25 8 5.02 6.38 2.25H1l7 12 7-12z" opacity=".5"/>
156
+ <path fill="currentColor" d="M9.54 2.25 8 4.95l-1.54-2.7H4l4 7 4-7z"/>
157
+ </symbol>`,nd=`<symbol id="file-tree-builtin-wasm" viewBox="0 0 16 16">
158
+ <path fill="currentColor" d="M13 1a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h3a2 2 0 1 0 4 0z" class="subtract" opacity=".2"/>
159
+ <path fill="currentColor" d="M4.64 11.4h.02l.8-3.4h.91l.73 3.45L7.88 8h.96l-1.25 5h-.97L5.9 9.6 5.1 13h-1L3 8h.98z"/>
160
+ <path fill="currentColor" fill-rule="evenodd" d="M13 13h-1.02l-.33-1.11H9.9L9.64 13h-.97l1.26-5h1.54zm-2.49-3.77-.42 1.84h1.32l-.49-1.84z" clip-rule="evenodd"/>
161
+ </symbol>`,rd=`<symbol id="file-tree-builtin-webpack" viewBox="0 0 16 16">
162
+ <path fill="currentColor" d="M14.1 11.79 8.26 15v-2.5l3.64-1.94zm.4-.35V4.73l-2.14 1.2v4.3zm-12.6.35L7.74 15v-2.5L4.1 10.56zm-.4-.35V4.73l2.14 1.2v4.3zm.25-7.15 6-3.29v2.42L3.9 5.47l-.03.01zm12.5 0L8.25 1v2.42l3.85 2.05.03.01z" class="bg" opacity=".4"/>
163
+ <path fill="currentColor" d="m7.74 11.93-3.59-1.92v-3.8l3.6 2.02zm.52 0 3.59-1.92v-3.8l-3.6 2.02zM4.4 5.77 8 3.85l3.6 1.93L8 7.8z" class="fg"/>
164
+ </symbol>`,id=`<symbol id="file-tree-builtin-yml" viewBox="0 0 16 16">
165
+ <path fill="currentColor" d="M7.5 2A1.5 1.5 0 0 1 9 3.5v3A1.5 1.5 0 0 1 7.5 8h-2v2A1.5 1.5 0 0 0 7 11.5v-1A1.5 1.5 0 0 1 8.5 9h5a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 7 13.5v-1A2.5 2.5 0 0 1 4.5 10V8h-2A1.5 1.5 0 0 1 1 6.5v-3A1.5 1.5 0 0 1 2.5 2zm1 8a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zm-6-7a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5z"/>
166
+ </symbol>`,ad=`<symbol id="file-tree-builtin-zig" viewBox="0 0 16 16">
167
+ <path fill="currentColor" d="m14.73 1.5-7.29 8.82h4.17l-1.73 2.04H5.76L1.27 14.5l7.3-8.91H4.39l1.73-2.05h4.12z"/>
168
+ <path fill="currentColor" d="M5.21 3.54 3.56 5.6h-.55v4.73h.83L2.1 12.36H1V3.54zm9.79 0v8.82h-4.3l1.74-2.04h.55V5.68h-.83l1.74-2.14z"/>
169
+ </symbol>`,od=[fu,vu,yu,bu,Cu,wu,Tu,Du,Ou,ku,Au,ju,Mu,Ru,Bu,Vu,qu,Ju,Zu,Qu,`<symbol id="file-tree-builtin-zip" viewBox="0 0 16 16">
170
+ <path fill="currentColor" d="M4.585 2a2 2 0 0 1 1.028.285l1.788 1.072a1 1 0 0 0 .514.143H12A2 2 0 0 1 13.935 5H0V4a2 2 0 0 1 2-2z" class="bg" opacity=".5"/>
171
+ <path fill="currentColor" fill-rule="evenodd" d="M14 12a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-1.25h1v-1H0V6h14zM9.9 8.25c-.883 0-1.9.5-1.9.5H7v1h1v1s1.017.5 1.9.5c.884 0 1.6-.672 1.6-1.5s-.716-1.5-1.6-1.5M2 9.75v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1zm-5-1v1h1v-1zm2 0v1h1v-1zm2 0v1h1v-1z" class="fg" clip-rule="evenodd"/>
172
+ </symbol>`],sd=[uu,du,pu,mu,hu,gu,_u,xu,Su,Eu,Nu,Pu,Fu,Iu,Lu,zu,Hu,Uu,Wu,Gu,Ku,Yu,Xu,$u,ed,td,nd,rd,id,ad];function cd(e,t){return t.length===0?e:e.replace(`</svg>`,`\n ${t.join(`
173
+ `)}\n</svg>`)}var ld=cd(lu,od),ud={minimal:lu,standard:ld,complete:cd(ld,sd)},dd={".babelrc":`babel`,".babelrc.json":`babel`,".bash_profile":`bash`,".bashrc":`bash`,".browserslistrc":`browserslist`,".dockerignore":`docker`,".eslintignore":`eslint`,".eslintrc":`eslint`,".eslintrc.cjs":`eslint`,".eslintrc.js":`eslint`,".eslintrc.json":`eslint`,".eslintrc.yaml":`eslint`,".eslintrc.yml":`eslint`,".gitattributes":`git`,".gitignore":`git`,".gitkeep":`git`,".gitmodules":`git`,".oxlintrc.json":`oxc`,".postcssrc":`postcss`,".postcssrc.json":`postcss`,".postcssrc.yaml":`postcss`,".postcssrc.yml":`postcss`,".prettierignore":`prettier`,".prettierrc":`prettier`,".prettierrc.cjs":`prettier`,".prettierrc.js":`prettier`,".prettierrc.json":`prettier`,".prettierrc.mjs":`prettier`,".prettierrc.toml":`prettier`,".prettierrc.yaml":`prettier`,".prettierrc.yml":`prettier`,".stylelintignore":`stylelint`,".stylelintrc":`stylelint`,".stylelintrc.cjs":`stylelint`,".stylelintrc.js":`stylelint`,".stylelintrc.json":`stylelint`,".stylelintrc.mjs":`stylelint`,".stylelintrc.yaml":`stylelint`,".stylelintrc.yml":`stylelint`,".terraform.lock.hcl":`terraform`,".zprofile":`bash`,".zshenv":`bash`,".zshrc":`bash`,"babel.config.cjs":`babel`,"babel.config.js":`babel`,"babel.config.json":`babel`,"babel.config.mjs":`babel`,"biome.json":`biome`,"biome.jsonc":`biome`,"bootstrap.bundle.js":`bootstrap`,"bootstrap.bundle.min.js":`bootstrap`,"bootstrap.css":`bootstrap`,"bootstrap.js":`bootstrap`,"bootstrap.min.css":`bootstrap`,"bootstrap.min.js":`bootstrap`,"bun.lock":`bun`,"bun.lockb":`bun`,"bunfig.toml":`bun`,"claude.md":`claude`,"compose.yaml":`docker`,"compose.yml":`docker`,"docker-compose.override.yml":`docker`,"docker-compose.yaml":`docker`,"docker-compose.yml":`docker`,dockerfile:`docker`,"eslint.config.cjs":`eslint`,"eslint.config.js":`eslint`,"eslint.config.mjs":`eslint`,"eslint.config.mts":`eslint`,"eslint.config.ts":`eslint`,gemfile:`ruby`,"next.config.js":`nextjs`,"next.config.mjs":`nextjs`,"next.config.mts":`nextjs`,"next.config.ts":`nextjs`,"postcss.config.cjs":`postcss`,"postcss.config.js":`postcss`,"postcss.config.mjs":`postcss`,"postcss.config.ts":`postcss`,"prettier.config.cjs":`prettier`,"prettier.config.js":`prettier`,"prettier.config.mjs":`prettier`,rakefile:`ruby`,"readme.md":`markdown`,"stylelint.config.cjs":`stylelint`,"stylelint.config.js":`stylelint`,"stylelint.config.mjs":`stylelint`,"svgo.config.cjs":`svgo`,"svgo.config.js":`svgo`,"svgo.config.mjs":`svgo`,"svgo.config.ts":`svgo`,"tailwind.config.cjs":`tailwind`,"tailwind.config.js":`tailwind`,"tailwind.config.mjs":`tailwind`,"tailwind.config.ts":`tailwind`,"vite.config.js":`vite`,"vite.config.mjs":`vite`,"vite.config.mts":`vite`,"vite.config.ts":`vite`,"webpack.config.babel.js":`webpack`,"webpack.config.cjs":`webpack`,"webpack.config.js":`webpack`,"webpack.config.mjs":`webpack`,"webpack.config.ts":`webpack`},fd={"7z":`zip`,astro:`astro`,AUTHORS:`text`,avif:`image`,bash:`bash`,bmp:`image`,bz2:`zip`,cfg:`text`,CHANGELOG:`text`,cjs:`javascript`,"code-workspace":`vscode`,conf:`text`,CONTRIBUTORS:`text`,csh:`bash`,css:`css`,csv:`table`,cts:`typescript`,db:`database`,editorconfig:`text`,env:`text`,"env.development":`text`,"env.local":`text`,"env.production":`text`,eot:`font`,erb:`ruby`,fish:`bash`,gemspec:`ruby`,gif:`image`,go:`go`,gql:`graphql`,graphql:`graphql`,gz:`zip`,htm:`html`,html:`html`,icns:`image`,ico:`image`,ini:`text`,jar:`zip`,jpeg:`image`,jpg:`image`,js:`javascript`,json:`json`,json5:`json`,jsonc:`json`,jsonl:`json`,jsx:`javascript`,ksh:`bash`,less:`css`,LICENSE:`text`,log:`text`,markdown:`markdown`,mcp:`mcp`,md:`markdown`,mdx:`markdown`,"mdx.tsx":`markdown`,mjs:`javascript`,mts:`typescript`,ods:`table`,otf:`font`,png:`image`,postcss:`css`,py:`python`,pyi:`python`,pyw:`python`,pyx:`python`,rake:`ruby`,rar:`zip`,rb:`ruby`,rs:`rust`,rst:`text`,rtf:`text`,sass:`css`,scss:`css`,sh:`bash`,sql:`database`,sqlite:`database`,sqlite3:`database`,styl:`css`,svelte:`svelte`,svg:`svg`,swift:`swift`,tar:`zip`,tf:`terraform`,tfstate:`terraform`,tfvars:`terraform`,tgz:`zip`,tif:`image`,tiff:`image`,ts:`typescript`,tsv:`table`,tsx:`typescript`,ttf:`font`,txt:`text`,vue:`vue`,war:`zip`,wasm:`wasm`,wast:`wasm`,wat:`wasm`,webp:`image`,woff:`font`,woff2:`font`,xhtml:`html`,xls:`table`,xlsx:`table`,xz:`zip`,yaml:`yml`,yml:`yml`,zig:`zig`,zip:`zip`,zsh:`bash`},pd={jsx:`react`,sass:`sass`,scss:`sass`,tsx:`react`},md=new Set([`bash`,`css`,`database`,`default`,`font`,`git`,`go`,`html`,`image`,`javascript`,`json`,`markdown`,`mcp`,`python`,`ruby`,`rust`,`swift`,`table`,`text`,`typescript`,`zip`]),hd=new Set([`complete`]);function gd(e){return ud[e===`none`?`minimal`:e]}function _d(e){return`file-tree-builtin-${e}`}function vd(e){return e!==`none`&&hd.has(e)}function yd(e,t,n){if(e===`minimal`||e===`none`)return;let r=e===`complete`,i=dd[t.toLowerCase()];if(i!=null&&(r||md.has(i)))return i;for(let e of n){if(r){let t=pd[e];if(t!=null)return t}let t=fd[e];if(t!=null&&(r||md.has(t)))return t}return`default`}function bd(e){return e.spriteSheet!=null||e.remap!=null||e.byFileName!=null||e.byFileExtension!=null||e.byFileNameContains!=null}function xd(e){return e==null?{set:`complete`,colored:!0}:typeof e==`string`?{set:e,colored:!0}:{...e,set:e.set??(bd(e)?`none`:`complete`),colored:e.colored??!0}}var Sd={compact:{itemHeight:24,factor:.8},default:{itemHeight:30,factor:1},relaxed:{itemHeight:36,factor:1.2}};function Cd(e,t){if(typeof e==`number`)return{itemHeight:t??Sd.default.itemHeight,factor:e};let n=Sd[e??`default`];return{itemHeight:t??n.itemHeight,factor:n.factor}}var wd=Sd.default.itemHeight,Td=`@layer base, theme, unsafe;
174
+
175
+ @layer base {
176
+ :host {
177
+ /*
178
+ CSS variables use a fallback stack to ensure user and theme colors slot
179
+ in with ease. User colors take precedence over theme colors, which take
180
+ precedence over defaults.
181
+
182
+ Fallback order:
183
+
184
+ 1. --trees-*-override (explicit)
185
+ 2. --trees-theme-* (e.g. Shiki/VS Code tokens)
186
+ 3. defaults
187
+
188
+ Theme variable names mirror Shiki/VS Code theme file JSON tokens.
189
+
190
+ // Available CSS Color Overrides
191
+ --trees-fg-override
192
+ --trees-fg-muted-override
193
+ --trees-bg-override
194
+ --trees-bg-muted-override
195
+ --trees-accent-override
196
+ --trees-border-color-override
197
+
198
+ --trees-focus-ring-color-override
199
+ --trees-focus-ring-width-override
200
+ --trees-focus-ring-offset-override
201
+
202
+ --trees-search-fg-override
203
+ --trees-search-font-weight-override
204
+ --trees-search-bg-override
205
+
206
+ --trees-selected-fg-override
207
+ --trees-selected-bg-override
208
+ --trees-selected-focused-border-color-override
209
+
210
+ // Git Status Color Overrides
211
+ --trees-status-added-override
212
+ --trees-status-ignored-override
213
+ --trees-status-modified-override
214
+ --trees-status-renamed-override
215
+ --trees-status-untracked-override
216
+ --trees-status-deleted-override
217
+ --trees-git-added-color-override
218
+ --trees-git-ignored-color-override
219
+ --trees-git-modified-color-override
220
+ --trees-git-renamed-color-override
221
+ --trees-git-untracked-color-override
222
+ --trees-git-deleted-color-override
223
+
224
+ // Built-in File Icon Color Overrides
225
+ --trees-file-icon-color
226
+ --trees-file-icon-color-astro
227
+ --trees-file-icon-color-babel
228
+ --trees-file-icon-color-bash
229
+ --trees-file-icon-color-biome
230
+ --trees-file-icon-color-bootstrap
231
+ --trees-file-icon-color-browserslist
232
+ --trees-file-icon-color-bun
233
+ --trees-file-icon-color-claude
234
+ --trees-file-icon-color-css
235
+ --trees-file-icon-color-database
236
+ --trees-file-icon-color-default
237
+ --trees-file-icon-color-docker
238
+ --trees-file-icon-color-eslint
239
+ --trees-file-icon-color-git
240
+ --trees-file-icon-color-go
241
+ --trees-file-icon-color-graphql
242
+ --trees-file-icon-color-html
243
+ --trees-file-icon-color-image
244
+ --trees-file-icon-color-javascript
245
+ --trees-file-icon-color-json
246
+ --trees-file-icon-color-markdown
247
+ --trees-file-icon-color-mcp
248
+ --trees-file-icon-color-npm
249
+ --trees-file-icon-color-oxc
250
+ --trees-file-icon-color-postcss
251
+ --trees-file-icon-color-prettier
252
+ --trees-file-icon-color-python
253
+ --trees-file-icon-color-react
254
+ --trees-file-icon-color-ruby
255
+ --trees-file-icon-color-rust
256
+ --trees-file-icon-color-sass
257
+ --trees-file-icon-color-svg
258
+ --trees-file-icon-color-svelte
259
+ --trees-file-icon-color-svgo
260
+ --trees-file-icon-color-swift
261
+ --trees-file-icon-color-table
262
+ --trees-file-icon-color-text
263
+ --trees-file-icon-color-tailwind
264
+ --trees-file-icon-color-terraform
265
+ --trees-file-icon-color-typescript
266
+ --trees-file-icon-color-vite
267
+ --trees-file-icon-color-vscode
268
+ --trees-file-icon-color-vue
269
+ --trees-file-icon-color-wasm
270
+ --trees-file-icon-color-webpack
271
+ --trees-file-icon-color-yml
272
+ --trees-file-icon-color-zig
273
+ --trees-file-icon-color-zip
274
+
275
+ // Density
276
+ //
277
+ // A unitless scale factor for padding, gaps, and indentation. Usually
278
+ // set via \`density\` on useFileTree. Individual overrides take precedence.
279
+ //
280
+ // Compact: 0.8
281
+ // Default: 1
282
+ // Relaxed: 1.2
283
+ //
284
+ --trees-density-override
285
+
286
+ // Available CSS Layout Overrides
287
+ --trees-gap-override
288
+ --trees-border-radius-override
289
+ --trees-font-family-override
290
+ --trees-font-size-override
291
+ --trees-font-weight-regular-override
292
+ --trees-font-weight-semibold-override
293
+ --trees-level-gap-override
294
+ --trees-item-padding-x-override
295
+ --trees-item-margin-x-override
296
+ --trees-item-row-gap-override
297
+ --trees-icon-width-override
298
+ --trees-icon-nudge-override
299
+ --trees-scrollbar-gutter-override
300
+ --trees-padding-inline-override
301
+ */
302
+
303
+ --trees-accent: var(--trees-accent-override, #009fff);
304
+ --trees-fg: var(
305
+ --trees-fg-override,
306
+ var(--trees-theme-sidebar-fg, light-dark(#6c6c71, #adadb1))
307
+ );
308
+ --trees-fg-muted: var(
309
+ --trees-fg-muted-override,
310
+ var(--trees-theme-sidebar-header-fg, light-dark(#84848a, #84848a))
311
+ );
312
+ --trees-bg: var(
313
+ --trees-bg-override,
314
+ var(--trees-theme-sidebar-bg, light-dark(#f8f8f8, #141415))
315
+ );
316
+ /* var(--trees-theme-list-hover-bg, light-dark(#dfebff59, #19283c59)) */
317
+ --trees-bg-muted: var(
318
+ --trees-bg-muted-override,
319
+ var(
320
+ --trees-theme-list-hover-bg,
321
+ light-dark(
322
+ color-mix(
323
+ in lab,
324
+ var(--trees-accent) var(--trees-bg-alpha-light, 8%),
325
+ var(--trees-bg)
326
+ ),
327
+ color-mix(
328
+ in lab,
329
+ var(--trees-accent) var(--trees-bg-alpha-dark, 10%),
330
+ var(--trees-bg)
331
+ )
332
+ )
333
+ )
334
+ );
335
+ --trees-input-bg: var(
336
+ --trees-input-bg-override,
337
+ light-dark(#f8f8f8, #070707)
338
+ );
339
+
340
+ --trees-added-light: #16a994;
341
+ --trees-added-dark: #00cab1;
342
+ --trees-ignored-light: #adadb1;
343
+ --trees-ignored-dark: #4a4a4e;
344
+ --trees-modified-light: #1ca1c7;
345
+ --trees-modified-dark: #08c0ef;
346
+ --trees-renamed-light: #d5a910;
347
+ --trees-renamed-dark: #ffd452;
348
+ --trees-untracked-light: #16a994;
349
+ --trees-untracked-dark: #00cab1;
350
+ --trees-deleted-light: #ff2e3f;
351
+ --trees-deleted-dark: #ff6762;
352
+
353
+ --trees-border-color: var(
354
+ --trees-border-color-override,
355
+ var(--trees-theme-sidebar-border, light-dark(#eeeeef, #070707))
356
+ );
357
+ --trees-indent-guide-bg: var(
358
+ --trees-indent-guide-bg-override,
359
+ color-mix(in lab, var(--trees-fg-muted) 25%, transparent)
360
+ );
361
+ --trees-density: var(--trees-density-override, 1);
362
+ --trees-border-radius: var(
363
+ --trees-border-radius-override,
364
+ calc(6px * var(--trees-density))
365
+ );
366
+
367
+ --trees-font-family: var(--trees-font-family-override, system-ui);
368
+ --trees-font-size: var(--trees-font-size-override, 13px);
369
+ --trees-font-weight-regular: var(--trees-font-weight-regular-override, 400);
370
+ --trees-font-weight-semibold: var(
371
+ --trees-font-weight-semibold-override,
372
+ 600
373
+ );
374
+
375
+ --trees-focus-ring-color: var(
376
+ --trees-focus-ring-color-override,
377
+ var(--trees-theme-focus-ring, var(--trees-accent))
378
+ );
379
+ --trees-focus-ring-width: var(--trees-focus-ring-width-override, 1px);
380
+ --trees-focus-ring-offset: var(--trees-focus-ring-offset-override, -1px);
381
+
382
+ --trees-search-fg: var(
383
+ --trees-search-fg-override,
384
+ var(--trees-theme-input-fg, var(--trees-fg))
385
+ );
386
+ --trees-search-font-weight: var(--trees-search-font-weight-override, 600);
387
+ --trees-search-bg: var(
388
+ --trees-search-bg-override,
389
+ var(--trees-theme-input-bg, var(--trees-input-bg))
390
+ );
391
+
392
+ --trees-scrollbar-thumb: var(
393
+ --trees-scrollbar-thumb-override,
394
+ var(
395
+ --trees-theme-scrollbar-thumb,
396
+ color-mix(in lab, var(--trees-fg) 25%, var(--trees-bg))
397
+ )
398
+ );
399
+
400
+ --trees-selected-fg: var(
401
+ --trees-selected-fg-override,
402
+ var(--trees-theme-list-active-selection-fg, var(--trees-fg))
403
+ );
404
+ --trees-selected-bg: var(
405
+ --trees-selected-bg-override,
406
+ var(
407
+ --trees-theme-list-active-selection-bg,
408
+ light-dark(
409
+ color-mix(in lab, var(--trees-accent) 12%, var(--trees-bg)),
410
+ color-mix(in lab, var(--trees-accent) 15%, var(--trees-bg))
411
+ )
412
+ )
413
+ );
414
+ --trees-selected-focused-border-color: var(
415
+ --trees-selected-focused-border-color-override,
416
+ var(--trees-theme-focus-ring, var(--trees-accent))
417
+ );
418
+
419
+ /* Git status (e.g. from Shiki theme gitDecoration.*) */
420
+ --trees-status-added: var(
421
+ --trees-status-added-override,
422
+ var(
423
+ --trees-theme-git-added-fg,
424
+ light-dark(var(--trees-added-light), var(--trees-added-dark))
425
+ )
426
+ );
427
+ --trees-status-ignored: var(
428
+ --trees-status-ignored-override,
429
+ var(
430
+ --trees-theme-git-ignored-fg,
431
+ light-dark(var(--trees-ignored-light), var(--trees-ignored-dark))
432
+ )
433
+ );
434
+ --trees-status-modified: var(
435
+ --trees-status-modified-override,
436
+ var(
437
+ --trees-theme-git-modified-fg,
438
+ light-dark(var(--trees-modified-light), var(--trees-modified-dark))
439
+ )
440
+ );
441
+ --trees-status-renamed: var(
442
+ --trees-status-renamed-override,
443
+ var(
444
+ --trees-theme-git-renamed-fg,
445
+ light-dark(var(--trees-renamed-light), var(--trees-renamed-dark))
446
+ )
447
+ );
448
+ --trees-status-untracked: var(
449
+ --trees-status-untracked-override,
450
+ var(
451
+ --trees-theme-git-untracked-fg,
452
+ light-dark(var(--trees-untracked-light), var(--trees-untracked-dark))
453
+ )
454
+ );
455
+ --trees-status-deleted: var(
456
+ --trees-status-deleted-override,
457
+ var(
458
+ --trees-theme-git-deleted-fg,
459
+ light-dark(var(--trees-deleted-light), var(--trees-deleted-dark))
460
+ )
461
+ );
462
+ --trees-git-modified-color: var(
463
+ --trees-git-modified-color-override,
464
+ var(--trees-status-modified)
465
+ );
466
+ --trees-git-added-color: var(
467
+ --trees-git-added-color-override,
468
+ var(--trees-status-added)
469
+ );
470
+ --trees-git-ignored-color: var(
471
+ --trees-git-ignored-color-override,
472
+ var(--trees-status-ignored)
473
+ );
474
+ --trees-git-deleted-color: var(
475
+ --trees-git-deleted-color-override,
476
+ var(--trees-status-deleted)
477
+ );
478
+ --trees-git-renamed-color: var(
479
+ --trees-git-renamed-color-override,
480
+ var(--trees-status-renamed)
481
+ );
482
+ --trees-git-untracked-color: var(
483
+ --trees-git-untracked-color-override,
484
+ var(--trees-status-untracked)
485
+ );
486
+
487
+ --trees-icon-gray: light-dark(#84848a, #adadb1);
488
+ --trees-icon-red: light-dark(#d52c36, #ff6762);
489
+ --trees-icon-vermilion: light-dark(#ff8c5b, #d5512f);
490
+ --trees-icon-orange: light-dark(#d47628, #ffa359);
491
+ --trees-icon-yellow: light-dark(#d5a910, #ffd452);
492
+ --trees-icon-green: light-dark(#199f43, #5ecc71);
493
+ --trees-icon-teal: light-dark(#17a5af, #64d1db);
494
+ --trees-icon-cyan: light-dark(#1ca1c7, #68cdf2);
495
+ --trees-icon-blue: light-dark(#1a85d4, #69b1ff);
496
+ --trees-icon-indigo: light-dark(#693acf, #9d6afb);
497
+ --trees-icon-purple: light-dark(#a631be, #d568ea);
498
+ --trees-icon-pink: light-dark(#d32a61, #ff678d);
499
+ --trees-icon-mauve: light-dark(#594c5b, #79697b);
500
+
501
+ --trees-file-icon-color-default: var(
502
+ --trees-file-icon-color,
503
+ var(--trees-icon-gray)
504
+ );
505
+ --trees-file-icon-color-astro: var(
506
+ --trees-file-icon-color,
507
+ var(--trees-icon-purple)
508
+ );
509
+ --trees-file-icon-color-babel: var(
510
+ --trees-file-icon-color,
511
+ var(--trees-icon-yellow)
512
+ );
513
+ --trees-file-icon-color-bash: var(
514
+ --trees-file-icon-color,
515
+ var(--trees-icon-green)
516
+ );
517
+ --trees-file-icon-color-biome: var(
518
+ --trees-file-icon-color,
519
+ var(--trees-icon-blue)
520
+ );
521
+ --trees-file-icon-color-bootstrap: var(
522
+ --trees-file-icon-color,
523
+ var(--trees-icon-indigo)
524
+ );
525
+ --trees-file-icon-color-browserslist: var(
526
+ --trees-file-icon-color,
527
+ var(--trees-icon-yellow)
528
+ );
529
+ --trees-file-icon-color-bun: var(
530
+ --trees-file-icon-color,
531
+ var(--trees-icon-mauve)
532
+ );
533
+ --trees-file-icon-color-claude: var(
534
+ --trees-file-icon-color,
535
+ var(--trees-icon-orange)
536
+ );
537
+ --trees-file-icon-color-css: var(
538
+ --trees-file-icon-color,
539
+ var(--trees-icon-indigo)
540
+ );
541
+ --trees-file-icon-color-database: var(
542
+ --trees-file-icon-color,
543
+ var(--trees-icon-purple)
544
+ );
545
+ --trees-file-icon-color-docker: var(
546
+ --trees-file-icon-color,
547
+ var(--trees-icon-blue)
548
+ );
549
+ --trees-file-icon-color-eslint: var(
550
+ --trees-file-icon-color,
551
+ var(--trees-icon-indigo)
552
+ );
553
+ --trees-file-icon-color-git: var(
554
+ --trees-file-icon-vermilion,
555
+ var(--trees-icon-vermilion)
556
+ );
557
+ --trees-file-icon-color-go: var(
558
+ --trees-file-icon-color,
559
+ var(--trees-icon-cyan)
560
+ );
561
+ --trees-file-icon-color-graphql: var(
562
+ --trees-file-icon-color,
563
+ var(--trees-icon-pink)
564
+ );
565
+ --trees-file-icon-color-html: var(
566
+ --trees-file-icon-color,
567
+ var(--trees-icon-orange)
568
+ );
569
+ --trees-file-icon-color-image: var(
570
+ --trees-file-icon-color,
571
+ var(--trees-icon-pink)
572
+ );
573
+ --trees-file-icon-color-javascript: var(
574
+ --trees-file-icon-color,
575
+ var(--trees-icon-yellow)
576
+ );
577
+ --trees-file-icon-color-json: var(
578
+ --trees-file-icon-color,
579
+ var(--trees-icon-orange)
580
+ );
581
+ --trees-file-icon-color-markdown: var(
582
+ --trees-file-icon-color,
583
+ var(--trees-icon-green)
584
+ );
585
+ --trees-file-icon-color-mcp: var(
586
+ --trees-file-icon-color,
587
+ var(--trees-icon-teal)
588
+ );
589
+ --trees-file-icon-color-npm: var(
590
+ --trees-file-icon-color,
591
+ var(--trees-icon-red)
592
+ );
593
+ --trees-file-icon-color-oxc: var(
594
+ --trees-file-icon-cyan,
595
+ var(--trees-icon-cyan)
596
+ );
597
+ --trees-file-icon-color-postcss: var(
598
+ --trees-file-icon-color,
599
+ var(--trees-icon-red)
600
+ );
601
+ --trees-file-icon-color-prettier: var(
602
+ --trees-file-icon-color,
603
+ var(--trees-icon-teal)
604
+ );
605
+ --trees-file-icon-color-python: var(
606
+ --trees-file-icon-color,
607
+ var(--trees-icon-blue)
608
+ );
609
+ --trees-file-icon-color-react: var(
610
+ --trees-file-icon-color,
611
+ var(--trees-icon-cyan)
612
+ );
613
+ --trees-file-icon-color-ruby: var(
614
+ --trees-file-icon-color,
615
+ var(--trees-icon-red)
616
+ );
617
+ --trees-file-icon-color-rust: var(
618
+ --trees-file-icon-color,
619
+ var(--trees-icon-orange)
620
+ );
621
+ --trees-file-icon-color-sass: var(
622
+ --trees-file-icon-color,
623
+ var(--trees-icon-pink)
624
+ );
625
+ --trees-file-icon-color-svg: var(
626
+ --trees-file-icon-color,
627
+ var(--trees-icon-orange)
628
+ );
629
+ --trees-file-icon-color-svelte: var(
630
+ --trees-file-icon-color,
631
+ var(--trees-icon-red)
632
+ );
633
+ --trees-file-icon-color-svgo: var(
634
+ --trees-file-icon-color,
635
+ var(--trees-icon-green)
636
+ );
637
+ --trees-file-icon-color-swift: var(
638
+ --trees-file-icon-color,
639
+ var(--trees-icon-orange)
640
+ );
641
+ --trees-file-icon-color-table: var(
642
+ --trees-file-icon-color,
643
+ var(--trees-icon-teal)
644
+ );
645
+ --trees-file-icon-color-text: var(
646
+ --trees-file-icon-color,
647
+ var(--trees-icon-gray)
648
+ );
649
+ --trees-file-icon-color-tailwind: var(
650
+ --trees-file-icon-color,
651
+ var(--trees-icon-cyan)
652
+ );
653
+ --trees-file-icon-color-terraform: var(
654
+ --trees-file-icon-color,
655
+ var(--trees-icon-indigo)
656
+ );
657
+ --trees-file-icon-color-typescript: var(
658
+ --trees-file-icon-color,
659
+ var(--trees-icon-blue)
660
+ );
661
+ --trees-file-icon-color-vite: var(
662
+ --trees-file-icon-color,
663
+ var(--trees-icon-purple)
664
+ );
665
+ --trees-file-icon-color-vscode: var(
666
+ --trees-file-icon-color,
667
+ var(--trees-icon-blue)
668
+ );
669
+ --trees-file-icon-color-vue: var(
670
+ --trees-file-icon-color,
671
+ var(--trees-icon-green)
672
+ );
673
+ --trees-file-icon-color-wasm: var(
674
+ --trees-file-icon-color,
675
+ var(--trees-icon-indigo)
676
+ );
677
+ --trees-file-icon-color-webpack: var(
678
+ --trees-file-icon-color,
679
+ var(--trees-icon-blue)
680
+ );
681
+ --trees-file-icon-color-yml: var(
682
+ --trees-file-icon-color,
683
+ var(--trees-icon-red)
684
+ );
685
+ --trees-file-icon-color-zig: var(
686
+ --trees-file-icon-color,
687
+ var(--trees-icon-orange)
688
+ );
689
+ --trees-file-icon-color-zip: var(
690
+ --trees-file-icon-color,
691
+ var(--trees-icon-orange)
692
+ );
693
+
694
+ --trees-level-gap: var(
695
+ --trees-level-gap-override,
696
+ calc(8px * var(--trees-density))
697
+ );
698
+ --trees-item-padding-x: var(
699
+ --trees-item-padding-x-override,
700
+ calc(8px * var(--trees-density))
701
+ );
702
+ --trees-item-margin-x: var(
703
+ --trees-item-margin-x-override,
704
+ calc(2px * var(--trees-density))
705
+ );
706
+ --trees-item-row-gap: var(
707
+ --trees-item-row-gap-override,
708
+ calc(6px * var(--trees-density))
709
+ );
710
+ --trees-icon-width: var(--trees-icon-width-override, 16px);
711
+ --trees-icon-nudge: var(
712
+ --trees-icon-nudge-override,
713
+ calc(1px * var(--trees-density))
714
+ );
715
+ --trees-row-height: var(--trees-item-height, 30px);
716
+ --trees-git-lane-width: var(--trees-git-lane-width-override, 12px);
717
+ --trees-action-lane-width: var(
718
+ --trees-action-lane-width-override,
719
+ calc(var(--trees-icon-width) + 2px)
720
+ );
721
+ /* Keep the floating trigger aligned with the row's action lane. Going in
722
+ from the root's right edge: the scroll container reserves
723
+ \`--trees-padding-inline\` of effective inset on each side (its asymmetric
724
+ padding formula cancels the scrollbar gutter on the right), the row
725
+ sits inside that inset, and its trailing \`--trees-item-padding-x\` is the
726
+ action lane itself. The trigger's own focus-ring margin then trims one
727
+ pixel back so the button's visible right edge lines up with the lane. */
728
+ --trees-context-menu-trigger-inline-offset: calc(
729
+ var(--trees-padding-inline) + var(--trees-item-padding-x) -
730
+ var(--trees-focus-ring-width)
731
+ );
732
+
733
+ --trees-scrollbar-gutter: var(--trees-scrollbar-gutter-override, 6px);
734
+ --trees-padding-inline: var(--trees-padding-inline-override, 16px);
735
+
736
+ color-scheme: light dark;
737
+ display: flex;
738
+ flex-direction: column;
739
+ font-size: var(--trees-font-size);
740
+ color: var(--trees-fg);
741
+ background-color: var(--trees-bg);
742
+ --truncate-marker-background-color: var(--trees-bg);
743
+ --truncate-marker-background-overlay-color: transparent;
744
+ font-family: var(--trees-font-family);
745
+ font-weight: var(--trees-font-weight-regular);
746
+ }
747
+
748
+ :host([data-file-tree-virtualized='true']) {
749
+ height: 100%;
750
+ overflow: hidden;
751
+ }
752
+
753
+ [data-file-tree-virtualized-wrapper='true'] {
754
+ height: 100%;
755
+ overflow: hidden;
756
+ display: flex;
757
+ flex-direction: column;
758
+ }
759
+
760
+ [data-file-tree-virtualized-root='true'] {
761
+ height: 100%;
762
+ display: flex;
763
+ flex-direction: column;
764
+ overflow: hidden;
765
+ }
766
+
767
+ [data-file-tree-virtualized-scroll='true'],
768
+ [data-file-tree-scrollbar-measure='true'] {
769
+ overflow-y: auto;
770
+ scrollbar-gutter: stable;
771
+
772
+ &::-webkit-scrollbar {
773
+ width: var(--trees-scrollbar-gutter);
774
+ height: var(--trees-scrollbar-gutter);
775
+ }
776
+
777
+ &::-webkit-scrollbar-track {
778
+ background: transparent;
779
+ }
780
+
781
+ &::-webkit-scrollbar-thumb {
782
+ background-color: var(--trees-scrollbar-thumb);
783
+ border: 1px solid transparent;
784
+ background-clip: content-box;
785
+ border-radius: calc(var(--trees-scrollbar-gutter) / 2);
786
+ }
787
+
788
+ &::-webkit-scrollbar-corner {
789
+ background-color: transparent;
790
+ }
791
+ }
792
+
793
+ /* These are styles for a temporarily generated element to measure the size
794
+ * of the scrollbar. It's intended to be somewhat similar in scrollbar style
795
+ * scope to the scrollable tree so \`--trees-scrollbar-gutter-measured\` is an
796
+ * accurate reflection of the size the scrollbar gutter takes up. */
797
+ [data-file-tree-scrollbar-measure='true'] {
798
+ position: absolute;
799
+ top: 0;
800
+ left: 0;
801
+ visibility: hidden;
802
+ pointer-events: none;
803
+ width: 100px;
804
+ height: 100px;
805
+ }
806
+
807
+ @supports (-moz-appearance: none) {
808
+ [data-file-tree-virtualized-scroll='true'],
809
+ [data-file-tree-scrollbar-measure='true'] {
810
+ scrollbar-width: thin;
811
+ scrollbar-color: var(--trees-scrollbar-thumb) transparent;
812
+ }
813
+ }
814
+
815
+ [data-file-tree-virtualized-scroll='true'] {
816
+ position: relative;
817
+ overflow-y: auto;
818
+ flex: 1 1 0;
819
+ min-height: 0;
820
+ padding-inline: max(
821
+ calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
822
+ 0px
823
+ )
824
+ /* NOTE(amadeus): We can assume that all Webkit based browser gutters
825
+ * will align to the value of '--trees-scrollbar-gutter', however if not, then
826
+ * \`--trees-scrollbar-gutter-measured\` should correct it. Mostly we are
827
+ * hoping to avoid SSR alignment jumps if possible. In non-SSR'd environments
828
+ * \`--trees-scrollbar-gutter-measured\` should always be immediately available.
829
+ */
830
+ max(
831
+ calc(
832
+ var(--trees-padding-inline) - var(--trees-item-margin-x) -
833
+ var(
834
+ --trees-scrollbar-gutter-measured,
835
+ var(--trees-scrollbar-gutter)
836
+ )
837
+ ),
838
+ 0px
839
+ );
840
+ }
841
+
842
+ @supports (-moz-appearance: none) {
843
+ [data-file-tree-virtualized-scroll='true'] {
844
+ padding-inline: max(
845
+ calc(var(--trees-padding-inline) - var(--trees-item-margin-x)),
846
+ 0px
847
+ )
848
+ /* NOTE(amadeus): However on Firefox it can vary a little bit, but most
849
+ * likely the majority of cases will default to a 0px width scrollbar lets
850
+ * inherit that first to avoid SSR jumps. In non-SSR'd environments
851
+ * \`--trees-scrollbar-gutter-measured\` should always be immediately available.
852
+ */
853
+ max(
854
+ calc(
855
+ var(--trees-padding-inline) - var(--trees-item-margin-x) -
856
+ var(--trees-scrollbar-gutter-measured, 0px)
857
+ ),
858
+ 0px
859
+ );
860
+ }
861
+ }
862
+
863
+ [data-file-tree-sticky-overlay='true'] {
864
+ position: sticky;
865
+ top: 0;
866
+ height: 0;
867
+ z-index: 4;
868
+ overflow: visible;
869
+ pointer-events: none;
870
+ }
871
+
872
+ /* The overlay DOM is kept populated even at scrollTop=0 so the browser has
873
+ * the rendered rows on hand the moment scrolling begins — otherwise the
874
+ * compositor paints a scrolled frame before React can mount the overlay,
875
+ * and the topmost sticky folder jumps up by a couple of pixels before it
876
+ * "snaps" into its pinned position. We hide it via CSS whenever the scroll
877
+ * is at the top and no scroll is in progress, so the preview doesn't leak
878
+ * through at rest. \`data-overlay-reveal\` is stamped on the root only when
879
+ * the user initiates a scroll while already at the top — exactly the case
880
+ * where we need the pre-mounted overlay to be visible through the first
881
+ * compositor frame. It is deliberately distinct from the general
882
+ * \`data-is-scrolling\` flag so a scroll that ends at the top (e.g. ArrowUp
883
+ * navigation) re-hides the overlay the instant the scroll lands, rather
884
+ * than waiting for the hover-suppression timer to elapse. */
885
+ [data-file-tree-virtualized-root='true'][data-scroll-at-top='true']:not(
886
+ [data-overlay-reveal]
887
+ )
888
+ [data-file-tree-sticky-overlay='true'] {
889
+ visibility: hidden;
890
+ }
891
+
892
+ [data-file-tree-sticky-overlay-content='true'] {
893
+ background-color: var(--trees-bg);
894
+ position: relative;
895
+ pointer-events: none;
896
+ }
897
+
898
+ [data-file-tree-virtualized-list='true'] {
899
+ background-color: var(--trees-bg);
900
+ position: relative;
901
+ min-height: 100%;
902
+ width: 100%;
903
+ overflow-anchor: none;
904
+
905
+ &[data-is-scrolling] {
906
+ pointer-events: none;
907
+ }
908
+ }
909
+
910
+ [data-file-tree-virtualized-sticky-offset='true'] {
911
+ contain: layout size;
912
+ }
913
+
914
+ [data-file-tree-virtualized-sticky='true'] {
915
+ position: sticky;
916
+ top: 0;
917
+ width: 100%;
918
+ display: flex;
919
+ flex-direction: column;
920
+ isolation: isolate;
921
+ /* Promote to its own compositor layer so text inside the window is
922
+ * rasterized once and GPU-translated during scroll. Without this, the
923
+ * browser re-paints the window (and its text) at every scroll frame,
924
+ * which produces visible 1px shake / character tearing. */
925
+ will-change: transform;
926
+ }
927
+
928
+ [data-file-tree-search-container] {
929
+ display: flex;
930
+ padding: 0;
931
+ padding-inline: var(--trees-padding-inline);
932
+ margin-bottom: var(--trees-item-row-gap);
933
+ }
934
+
935
+ [data-file-tree-search-input] {
936
+ --trees-focus-ring-width: 2px;
937
+ font-family: var(--trees-font-family);
938
+ font-size: var(--trees-font-size);
939
+ flex: 1;
940
+ height: var(--trees-row-height);
941
+ /* 1px breathing room so the focus-visible outline isn't clipped when the
942
+ * input sits flush against the top of the scroll container. */
943
+ margin-block: 1px;
944
+ padding-inline: var(--trees-item-padding-x);
945
+ line-height: var(--trees-row-height);
946
+ color: var(--trees-search-fg);
947
+ background-color: var(--trees-search-bg);
948
+ border: 1px solid var(--trees-border-color);
949
+ border-radius: var(--trees-border-radius);
950
+ outline: none;
951
+
952
+ &::placeholder {
953
+ color: color-mix(
954
+ in lab,
955
+ var(--trees-search-fg) 65%,
956
+ var(--trees-search-bg)
957
+ );
958
+ }
959
+
960
+ &:focus-visible,
961
+ &[data-file-tree-search-input-fake-focus='true'] {
962
+ outline: var(--trees-focus-ring-width) solid var(--trees-focus-ring-color);
963
+ outline-offset: var(--trees-focus-ring-offset);
964
+ }
965
+ }
966
+
967
+ /* The wrapper for the tree items */
968
+ [role='tree'] {
969
+ position: relative;
970
+ display: flex;
971
+ flex-direction: column;
972
+ gap: var(--trees-gap-override, 0);
973
+ }
974
+
975
+ /* LIST ITEM */
976
+ [data-type='item'] {
977
+ color: inherit;
978
+ font-family: var(--trees-font-family);
979
+ font-size: var(--trees-font-size);
980
+ text-align: start;
981
+ outline: none;
982
+ background-color: var(--trees-bg);
983
+ border: none;
984
+ position: relative;
985
+
986
+ padding: 0 var(--trees-item-padding-x);
987
+ margin: 0 var(--trees-item-margin-x);
988
+ cursor: pointer;
989
+ -webkit-user-select: none;
990
+ user-select: none;
991
+ -webkit-touch-callout: none;
992
+ touch-action: manipulation;
993
+ display: flex;
994
+ flex: 0 0 var(--trees-row-height);
995
+ align-items: center;
996
+ height: var(--trees-row-height);
997
+ line-height: var(--trees-row-height);
998
+ gap: var(--trees-item-row-gap);
999
+ border-radius: var(--trees-border-radius);
1000
+ /* Row states may be translucent, so markers paint the tree background first
1001
+ * and then the state color on top to avoid compositing the same alpha twice. */
1002
+ --truncate-marker-background-color: var(--trees-bg);
1003
+ --truncate-marker-background-overlay-color: transparent;
1004
+ --truncate-marker-block-inset: 0px;
1005
+
1006
+ &:hover,
1007
+ &[data-item-context-hover='true'] {
1008
+ background-color: var(--trees-bg-muted);
1009
+ --truncate-marker-background-overlay-color: var(--trees-bg-muted);
1010
+ }
1011
+
1012
+ &[data-item-focused='true'],
1013
+ &:focus-visible {
1014
+ z-index: 2;
1015
+
1016
+ /* Flattened segment markers sit high enough to cover the row outline unless
1017
+ * their painted background is inset by the focus ring width. */
1018
+ [data-item-flattened-subitems] {
1019
+ --truncate-marker-block-inset: var(--trees-focus-ring-width);
1020
+ }
1021
+
1022
+ &::before {
1023
+ position: absolute;
1024
+ inset: 0;
1025
+ content: '';
1026
+ display: block;
1027
+ border-radius: var(--trees-border-radius);
1028
+ outline: var(--trees-focus-ring-width) solid
1029
+ var(--trees-focus-ring-color);
1030
+ outline-offset: var(--trees-focus-ring-offset);
1031
+ pointer-events: none;
1032
+ }
1033
+
1034
+ &[data-item-selected='true']::before {
1035
+ outline-color: var(--trees-selected-focused-border-color);
1036
+ }
1037
+ }
1038
+
1039
+ &[data-item-selected='true'] {
1040
+ color: var(--trees-selected-fg);
1041
+ background-color: var(--trees-selected-bg);
1042
+ --truncate-marker-background-overlay-color: var(--trees-selected-bg);
1043
+ z-index: 3;
1044
+
1045
+ [data-item-section='icon'] {
1046
+ color: var(--trees-selected-fg);
1047
+ }
1048
+ }
1049
+
1050
+ &[data-item-search-match='true'] {
1051
+ font-weight: var(--trees-search-font-weight);
1052
+ }
1053
+ }
1054
+
1055
+ [data-type='item'][data-file-tree-sticky-row='true'] {
1056
+ pointer-events: auto;
1057
+ }
1058
+
1059
+ /* Sticky rows opt back into pointer events because the overlay wrapper is
1060
+ * inert. During scroll, put them back under the same hover suppression as
1061
+ * the virtualized list so translucent hover states and menu triggers do not
1062
+ * paint over rows moving beneath the sticky stack. */
1063
+ [data-file-tree-virtualized-root='true'][data-is-scrolling]
1064
+ [data-type='item'][data-file-tree-sticky-row='true'] {
1065
+ pointer-events: none;
1066
+ }
1067
+
1068
+ [data-file-tree-virtualized-root='true'][data-is-scrolling]
1069
+ [data-type='item'][data-file-tree-sticky-row='true']:hover:not(
1070
+ [data-item-selected='true']
1071
+ ),
1072
+ [data-file-tree-virtualized-root='true'][data-is-scrolling]
1073
+ [data-type='item'][data-file-tree-sticky-row='true'][data-item-context-hover='true']:not(
1074
+ [data-item-selected='true']
1075
+ ) {
1076
+ background-color: var(--trees-bg);
1077
+ --truncate-marker-background-overlay-color: transparent;
1078
+ }
1079
+
1080
+ [data-item-selected='true']:has(+ [data-item-selected='true']) {
1081
+ border-bottom-left-radius: 0;
1082
+ border-bottom-right-radius: 0;
1083
+ }
1084
+
1085
+ [data-item-selected='true'] + [data-item-selected='true'] {
1086
+ border-top-left-radius: 0;
1087
+ border-top-right-radius: 0;
1088
+ }
1089
+
1090
+ /* Flattened Directory Parts */
1091
+ [data-item-flattened-subitems] {
1092
+ display: inline-flex;
1093
+ align-items: center;
1094
+ gap: 2px;
1095
+ }
1096
+ [data-item-flattened-subitem]:hover,
1097
+ [data-item-flattened-subitem-drag-target='true'] {
1098
+ text-decoration: underline;
1099
+ }
1100
+
1101
+ /* Icon for each item */
1102
+ [data-item-section='icon'] {
1103
+ flex-shrink: 0;
1104
+ display: flex;
1105
+ align-items: center;
1106
+ justify-content: center;
1107
+ color: var(--trees-fg-muted);
1108
+ fill: currentColor;
1109
+ width: var(--trees-icon-width);
1110
+ }
1111
+
1112
+ :where([data-item-section='icon'] > [data-icon-token]) {
1113
+ color: var(--trees-fg-muted);
1114
+ }
1115
+
1116
+ [data-file-tree-colored-icons='true'] {
1117
+ [data-icon-token='astro'] {
1118
+ color: var(--trees-file-icon-color-astro);
1119
+ }
1120
+ [data-icon-token='babel'] {
1121
+ color: var(--trees-file-icon-color-babel);
1122
+ }
1123
+ [data-icon-token='bash'] {
1124
+ color: var(--trees-file-icon-color-bash);
1125
+ }
1126
+ [data-icon-token='biome'] {
1127
+ color: var(--trees-file-icon-color-biome);
1128
+ }
1129
+ [data-icon-token='bootstrap'] {
1130
+ color: var(--trees-file-icon-color-bootstrap);
1131
+ }
1132
+ [data-icon-token='browserslist'] {
1133
+ color: var(--trees-file-icon-color-browserslist);
1134
+ }
1135
+ [data-icon-token='bun'] {
1136
+ color: var(--trees-file-icon-color-bun);
1137
+ }
1138
+ [data-icon-token='claude'] {
1139
+ color: var(--trees-file-icon-color-claude);
1140
+ }
1141
+ [data-icon-token='css'] {
1142
+ color: var(--trees-file-icon-color-css);
1143
+ }
1144
+ [data-icon-token='database'] {
1145
+ color: var(--trees-file-icon-color-database);
1146
+ }
1147
+ [data-icon-token='default'] {
1148
+ color: var(--trees-file-icon-color-default);
1149
+ }
1150
+ [data-icon-token='docker'] {
1151
+ color: var(--trees-file-icon-color-docker);
1152
+ }
1153
+ [data-icon-token='eslint'] {
1154
+ color: var(--trees-file-icon-color-eslint);
1155
+ }
1156
+ [data-icon-token='git'] {
1157
+ color: var(--trees-file-icon-color-git);
1158
+ }
1159
+ [data-icon-token='go'] {
1160
+ color: var(--trees-file-icon-color-go);
1161
+ }
1162
+ [data-icon-token='graphql'] {
1163
+ color: var(--trees-file-icon-color-graphql);
1164
+ }
1165
+ [data-icon-token='html'] {
1166
+ color: var(--trees-file-icon-color-html);
1167
+ }
1168
+ [data-icon-token='image'] {
1169
+ color: var(--trees-file-icon-color-image);
1170
+ }
1171
+ [data-icon-token='javascript'] {
1172
+ color: var(--trees-file-icon-color-javascript);
1173
+ }
1174
+ [data-icon-token='json'] {
1175
+ color: var(--trees-file-icon-color-json);
1176
+ }
1177
+ [data-icon-token='markdown'] {
1178
+ color: var(--trees-file-icon-color-markdown);
1179
+ }
1180
+ [data-icon-token='mcp'] {
1181
+ color: var(--trees-file-icon-color-mcp);
1182
+ }
1183
+ [data-icon-token='npm'] {
1184
+ color: var(--trees-file-icon-color-npm);
1185
+ }
1186
+ [data-icon-token='oxc'] {
1187
+ color: var(--trees-file-icon-color-oxc);
1188
+ }
1189
+ [data-icon-token='postcss'] {
1190
+ color: var(--trees-file-icon-color-postcss);
1191
+ }
1192
+ [data-icon-token='prettier'] {
1193
+ color: var(--trees-file-icon-color-prettier);
1194
+ }
1195
+ [data-icon-token='python'] {
1196
+ color: var(--trees-file-icon-color-python);
1197
+ }
1198
+ [data-icon-token='react'] {
1199
+ color: var(--trees-file-icon-color-react);
1200
+ }
1201
+ [data-icon-token='ruby'] {
1202
+ color: var(--trees-file-icon-color-ruby);
1203
+ }
1204
+ [data-icon-token='rust'] {
1205
+ color: var(--trees-file-icon-color-rust);
1206
+ }
1207
+ [data-icon-token='sass'] {
1208
+ color: var(--trees-file-icon-color-sass);
1209
+ }
1210
+ [data-icon-token='svg'] {
1211
+ color: var(--trees-file-icon-color-svg);
1212
+ }
1213
+ [data-icon-token='svelte'] {
1214
+ color: var(--trees-file-icon-color-svelte);
1215
+ }
1216
+ [data-icon-token='svgo'] {
1217
+ color: var(--trees-file-icon-color-svgo);
1218
+ }
1219
+ [data-icon-token='swift'] {
1220
+ color: var(--trees-file-icon-color-swift);
1221
+ }
1222
+ [data-icon-token='table'] {
1223
+ color: var(--trees-file-icon-color-table);
1224
+ }
1225
+ [data-icon-token='text'] {
1226
+ color: var(--trees-file-icon-color-text);
1227
+ }
1228
+ [data-icon-token='tailwind'] {
1229
+ color: var(--trees-file-icon-color-tailwind);
1230
+ }
1231
+ [data-icon-token='terraform'] {
1232
+ color: var(--trees-file-icon-color-terraform);
1233
+ }
1234
+ [data-icon-token='typescript'] {
1235
+ color: var(--trees-file-icon-color-typescript);
1236
+ }
1237
+ [data-icon-token='vite'] {
1238
+ color: var(--trees-file-icon-color-vite);
1239
+ }
1240
+ [data-icon-token='vscode'] {
1241
+ color: var(--trees-file-icon-color-vscode);
1242
+ }
1243
+ [data-icon-token='vue'] {
1244
+ color: var(--trees-file-icon-color-vue);
1245
+ }
1246
+ [data-icon-token='wasm'] {
1247
+ color: var(--trees-file-icon-color-wasm);
1248
+ }
1249
+ [data-icon-token='webpack'] {
1250
+ color: var(--trees-file-icon-color-webpack);
1251
+ }
1252
+ [data-icon-token='yml'] {
1253
+ color: var(--trees-file-icon-color-yml);
1254
+ }
1255
+ [data-icon-token='zig'] {
1256
+ color: var(--trees-file-icon-color-zig);
1257
+ }
1258
+ [data-icon-token='zip'] {
1259
+ color: var(--trees-file-icon-color-zip);
1260
+ }
1261
+ }
1262
+
1263
+ /* Chevron rotation and visual alignment */
1264
+ /* Chevron pointing down */
1265
+ [data-icon-name='file-tree-icon-chevron'] {
1266
+ &[data-align-capitals='false'] {
1267
+ transform: translate(0, var(--trees-icon-nudge));
1268
+ }
1269
+ &[data-align-capitals='true'] {
1270
+ transform: translate(0, 0);
1271
+ }
1272
+ }
1273
+
1274
+ [data-item-section='content'] {
1275
+ flex: 0 1 auto;
1276
+ text-align: start;
1277
+ min-width: 0;
1278
+ max-width: 100%;
1279
+ overflow: hidden;
1280
+ text-overflow: ellipsis;
1281
+ /* Breaks middle truncate component to also set this */
1282
+ /* white-space: nowrap; */
1283
+ }
1284
+
1285
+ [data-item-section='decoration'] {
1286
+ flex: 1 1 0;
1287
+ min-width: 0;
1288
+ display: flex;
1289
+ justify-content: flex-end;
1290
+ text-align: end;
1291
+ overflow: hidden;
1292
+ color: var(--trees-fg-muted);
1293
+ }
1294
+
1295
+ [data-item-section='decoration'] > span {
1296
+ min-width: 0;
1297
+ max-width: 100%;
1298
+ display: inline-flex;
1299
+ align-items: center;
1300
+ justify-content: flex-end;
1301
+ overflow: hidden;
1302
+ text-overflow: ellipsis;
1303
+ white-space: nowrap;
1304
+ }
1305
+
1306
+ [data-item-section='git'],
1307
+ [data-item-section='action'] {
1308
+ flex: 0 0 auto;
1309
+ display: flex;
1310
+ align-items: center;
1311
+ justify-content: center;
1312
+ }
1313
+
1314
+ [data-item-section='git'] {
1315
+ width: var(--trees-git-lane-width);
1316
+ }
1317
+
1318
+ [data-item-section='action'] {
1319
+ width: var(--trees-action-lane-width);
1320
+ color: var(--trees-fg-muted);
1321
+ fill: currentColor;
1322
+ pointer-events: none;
1323
+ }
1324
+
1325
+ [data-item-section='git'] > span,
1326
+ [data-item-section='action'] > span {
1327
+ width: 100%;
1328
+ display: inline-flex;
1329
+ align-items: center;
1330
+ justify-content: center;
1331
+ }
1332
+
1333
+ [data-item-action-affordance='decorative'] {
1334
+ opacity: 0.85;
1335
+ }
1336
+
1337
+ [data-item-rename-input] {
1338
+ appearance: none;
1339
+ width: 100%;
1340
+ min-width: 0;
1341
+ height: calc(var(--trees-row-height) - 4px);
1342
+ font-family: inherit;
1343
+ font-size: inherit;
1344
+ /* line-height: calc(var(--trees-row-height) - 8px); */
1345
+ color: inherit;
1346
+ background-color: transparent;
1347
+ border: 0;
1348
+ padding-inline: 6px;
1349
+ outline: none;
1350
+ box-sizing: border-box;
1351
+ }
1352
+
1353
+ [data-item-section='content']:has([data-item-rename-input])
1354
+ ~ [data-item-section='action'],
1355
+ [data-item-section='content']:has([data-item-rename-input])
1356
+ ~ [data-item-section='decoration'] {
1357
+ display: none;
1358
+ }
1359
+
1360
+ /* Chevron pointing right */
1361
+ [aria-expanded='false'][data-item-type='folder']
1362
+ > [data-item-section='icon']
1363
+ > [data-icon-name='file-tree-icon-chevron'] {
1364
+ &[data-align-capitals='true'] {
1365
+ transform: rotate(-90deg)
1366
+ translate(
1367
+ calc(var(--trees-icon-nudge) / 2),
1368
+ calc(var(--trees-icon-nudge) / 2)
1369
+ );
1370
+ }
1371
+ &[data-align-capitals='false'] {
1372
+ transform: rotate(-90deg)
1373
+ translate(
1374
+ calc(var(--trees-icon-nudge) / 2 * -1),
1375
+ calc(var(--trees-icon-nudge) / 2)
1376
+ );
1377
+ }
1378
+ }
1379
+
1380
+ /* LIST IDENTATION */
1381
+ /* Spacing container */
1382
+ [data-item-section='spacing'] {
1383
+ display: flex;
1384
+ flex-direction: row;
1385
+ align-items: center;
1386
+ justify-content: center;
1387
+ height: var(--trees-row-height);
1388
+ padding-left: calc(calc(var(--trees-icon-width) / 2) - 0.5px);
1389
+
1390
+ &:empty {
1391
+ padding-left: 0;
1392
+ }
1393
+ }
1394
+
1395
+ /* Spacing per level */
1396
+ [data-item-section='spacing-item'] {
1397
+ transform: translateX(-0.25px);
1398
+ display: inline-block;
1399
+ border-left: 1px solid var(--trees-indent-guide-bg);
1400
+ height: 100%;
1401
+ margin-right: calc(var(--trees-level-gap) - 1px);
1402
+ opacity: 0;
1403
+ transition: opacity 150ms ease;
1404
+
1405
+ & + & {
1406
+ margin-left: calc(
1407
+ var(--trees-item-row-gap) + calc(var(--trees-icon-width) / 2) - 0.5px
1408
+ );
1409
+ }
1410
+ }
1411
+
1412
+ :host(:hover) [data-item-section='spacing-item'] {
1413
+ opacity: 0.75;
1414
+ }
1415
+
1416
+ /* Git status indicator */
1417
+
1418
+ /* This is a folder that contains a git change */
1419
+ [data-item-contains-git-change='true'] > [data-item-section='git'] {
1420
+ color: var(--trees-git-modified-color);
1421
+ opacity: 0.5;
1422
+ fill: currentColor;
1423
+ }
1424
+
1425
+ /* These are files that have a git change */
1426
+ [data-item-git-status] {
1427
+ &
1428
+ > :where([data-item-section='icon'])
1429
+ > :where(:not([data-icon-name='file-tree-icon-chevron'])) {
1430
+ color: var(--trees-item-git-status-color);
1431
+ }
1432
+ & > [data-item-section='content'] {
1433
+ color: var(--trees-item-git-status-color);
1434
+ }
1435
+ & > [data-item-section='git'] {
1436
+ color: var(--trees-item-git-status-color);
1437
+ font-weight: var(--trees-font-weight-semibold);
1438
+ }
1439
+ }
1440
+
1441
+ [data-item-git-status='added'] {
1442
+ --trees-item-git-status-color: var(--trees-git-added-color);
1443
+ }
1444
+
1445
+ [data-item-git-status='deleted'] {
1446
+ --trees-item-git-status-color: var(--trees-git-deleted-color);
1447
+ }
1448
+
1449
+ [data-item-git-status='ignored'] {
1450
+ --trees-item-git-status-color: var(--trees-git-ignored-color);
1451
+
1452
+ & > [data-item-section='icon'] {
1453
+ opacity: 0.5;
1454
+ }
1455
+ }
1456
+
1457
+ [data-item-section='git'] [data-icon-name='file-tree-icon-dot'] {
1458
+ /* this is a nudge to align the dot with the likely lowercase text. it's slightly
1459
+ generalizable, but other fonts are gonna need other nudges i assume */
1460
+ transform: translateY(calc(0.65ex - 50%));
1461
+ }
1462
+
1463
+ [data-item-git-status='modified'] {
1464
+ --trees-item-git-status-color: var(--trees-git-modified-color);
1465
+ }
1466
+
1467
+ [data-item-git-status='renamed'] {
1468
+ --trees-item-git-status-color: var(--trees-git-renamed-color);
1469
+ }
1470
+
1471
+ [data-item-git-status='untracked'] {
1472
+ --trees-item-git-status-color: var(--trees-git-untracked-color);
1473
+ }
1474
+
1475
+ /* Drag and drop */
1476
+ [data-item-drag-target='true'] {
1477
+ background-color: var(--trees-selected-bg);
1478
+ }
1479
+
1480
+ [data-item-dragging='true'] {
1481
+ opacity: 0.5;
1482
+ }
1483
+
1484
+ /* Lock icon for locked paths (sibling of content) */
1485
+ [data-item-section='lock'] {
1486
+ flex: 0 0 auto;
1487
+ margin-left: auto;
1488
+ display: flex;
1489
+ align-items: center;
1490
+ color: var(--trees-fg-muted);
1491
+ }
1492
+ [data-item-section='lock'] svg {
1493
+ display: block;
1494
+ }
1495
+
1496
+ [data-type='header-slot'] {
1497
+ display: block;
1498
+ flex: 0 0 auto;
1499
+ }
1500
+
1501
+ [data-type='context-menu-wash'] {
1502
+ position: absolute;
1503
+ inset: 0;
1504
+ z-index: 3;
1505
+ background-color: transparent;
1506
+ touch-action: none;
1507
+ }
1508
+
1509
+ [data-type='context-menu-anchor'] {
1510
+ position: absolute;
1511
+ top: 0;
1512
+ right: var(--trees-context-menu-trigger-inline-offset);
1513
+ z-index: 4;
1514
+ display: none;
1515
+ align-items: center;
1516
+
1517
+ &[data-visible='true'] {
1518
+ display: flex;
1519
+ }
1520
+ }
1521
+
1522
+ /* Hide the floating trigger while the scroll container is actively moving.
1523
+ * The anchor is positioned against the root, not the scroll content, so its
1524
+ * \`top\` follows the row via a React state update — one frame behind the
1525
+ * compositor. That delay is visible as the trigger hovering over the wrong
1526
+ * row during the first frame of a scroll. The \`data-is-scrolling\` flag on
1527
+ * the root is flipped synchronously on \`wheel\`/\`touchmove\`/\`keydown\` before
1528
+ * the compositor commits the next paint, so this selector hides the anchor
1529
+ * in the same frame the scroll begins. */
1530
+ [data-file-tree-virtualized-root='true'][data-is-scrolling]
1531
+ [data-type='context-menu-anchor'] {
1532
+ display: none;
1533
+ }
1534
+
1535
+ [data-type='context-menu-anchor'] > slot[name='context-menu'] {
1536
+ display: block;
1537
+ width: 0;
1538
+ min-width: 0;
1539
+ flex: 0 0 0;
1540
+ overflow: visible;
1541
+ }
1542
+
1543
+ /* Single floating context menu trigger */
1544
+ [data-type='context-menu-trigger'] {
1545
+ all: unset;
1546
+ align-items: center;
1547
+ justify-content: center;
1548
+ width: var(--trees-action-lane-width);
1549
+ color: var(--trees-fg-muted);
1550
+ fill: currentColor;
1551
+ cursor: pointer;
1552
+ font-family: var(--trees-font-family);
1553
+ font-size: var(--trees-font-size);
1554
+ border-top-right-radius: var(--trees-border-radius);
1555
+ border-bottom-right-radius: var(--trees-border-radius);
1556
+ margin: var(--trees-focus-ring-width);
1557
+ height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2);
1558
+ border-width: 0;
1559
+ transition: color 120ms ease;
1560
+
1561
+ display: flex;
1562
+ }
1563
+
1564
+ [data-type='context-menu-trigger']:hover,
1565
+ [data-type='context-menu-trigger'][aria-expanded='true'] {
1566
+ color: var(--trees-fg);
1567
+ }
1568
+
1569
+ /** @pierre/truncate css here, manually copy pasted for now */
1570
+ [data-truncate-container] {
1571
+ /* CUSTOM TO TREES, TO SUPPORT THE OUTLINE */
1572
+ margin-top: -1px;
1573
+ margin-bottom: -1px;
1574
+
1575
+ /* Width of the fade from default marker to text */
1576
+ --truncate-internal-marker-fade-width: var(
1577
+ --truncate-marker-fade-width,
1578
+ 2px
1579
+ );
1580
+ /* Width of the solid color between the fade from the default marker to the text */
1581
+ --truncate-internal-marker-gap: var(--truncate-marker-gap, 0px);
1582
+ /* Opacity of the marker 'color' property, not of the element itself */
1583
+ --truncate-internal-marker-opacity: var(--truncate-marker-opacity, 50%);
1584
+ /* Opacity of the marker 'color' property specifically for the middle truncate, not opacity of the element itself */
1585
+ --truncate-internal-middle-marker-opacity: var(
1586
+ --truncate-middle-marker-opacity,
1587
+ 80%
1588
+ );
1589
+ /* Background color of the default marker */
1590
+ --truncate-internal-marker-background-color: var(
1591
+ --truncate-marker-background-color,
1592
+ light-dark(white, black)
1593
+ );
1594
+ --truncate-internal-marker-background-overlay-color: var(
1595
+ --truncate-marker-background-overlay-color,
1596
+ transparent
1597
+ );
1598
+ --truncate-internal-marker-block-inset: var(
1599
+ --truncate-marker-block-inset,
1600
+ 0px
1601
+ );
1602
+ /* Duration of the fade out animation for the marker */
1603
+ --truncate-internal-marker-fade-out-duration: var(
1604
+ --truncate-marker-fade-out-duration,
1605
+ 0ms
1606
+ );
1607
+ /* Duration of the fade in animation for the marker */
1608
+ --truncate-internal-marker-fade-in-duration: var(
1609
+ --truncate-marker-fade-in-duration,
1610
+ 100ms
1611
+ );
1612
+
1613
+ /* FADE Variant specifics */
1614
+ --truncate-internal-fade-marker-color: var(
1615
+ --truncate-fade-marker-color,
1616
+ #000
1617
+ );
1618
+ --truncate-internal-fade-marker-width: var(
1619
+ --truncate-fade-marker-width,
1620
+ 0.2lh
1621
+ );
1622
+
1623
+ /*
1624
+ In some special cases people might be adding spacing in other ways
1625
+ that would benefit from being able to override this, however the container
1626
+ query below can't use this and would need to be redeclared with the overridden
1627
+ value. It's a bad time, but better than nothing.
1628
+ */
1629
+ --truncate-internal-single-line-height: 1lh;
1630
+
1631
+ height: var(--truncate-internal-single-line-height);
1632
+ min-width: 0;
1633
+ overflow: hidden;
1634
+ }
1635
+
1636
+ [data-truncate-marker] {
1637
+ display: flex;
1638
+ position: absolute;
1639
+ height: var(--truncate-internal-single-line-height);
1640
+ padding-block: var(--truncate-internal-marker-block-inset);
1641
+ box-sizing: border-box;
1642
+ align-items: center;
1643
+ background-clip: content-box;
1644
+ z-index: 2;
1645
+ color: color-mix(
1646
+ in srgb,
1647
+ currentColor var(--truncate-internal-marker-opacity),
1648
+ transparent
1649
+ );
1650
+
1651
+ /* Core trick for hiding the marker until overflow occurs */
1652
+ opacity: 0;
1653
+ transition: opacity var(--truncate-internal-marker-fade-out-duration)
1654
+ ease-in-out;
1655
+ }
1656
+
1657
+ @container measure (height > 1lh) {
1658
+ [data-truncate-marker] {
1659
+ opacity: 1;
1660
+ transition: opacity var(--truncate-internal-marker-fade-in-duration)
1661
+ ease-in-out;
1662
+ }
1663
+ }
1664
+
1665
+ [data-truncate-grid] {
1666
+ display: grid;
1667
+ position: relative;
1668
+ }
1669
+
1670
+ [data-truncate-content='visible'] {
1671
+ white-space: nowrap;
1672
+ }
1673
+
1674
+ [data-truncate-content='overflow'] {
1675
+ opacity: 0;
1676
+ pointer-events: none;
1677
+ -webkit-user-select: none;
1678
+ user-select: none;
1679
+ word-break: break-all;
1680
+ margin-top: calc(-1 * var(--truncate-internal-single-line-height));
1681
+ }
1682
+
1683
+ [data-truncate-marker-cell] {
1684
+ container: measure / size;
1685
+ overflow: visible;
1686
+ -webkit-user-select: none;
1687
+ user-select: none;
1688
+ pointer-events: none;
1689
+ }
1690
+
1691
+ [data-truncate-container='truncate'] {
1692
+ & [data-truncate-grid] {
1693
+ grid-template-columns: minmax(0, max-content) 0;
1694
+ }
1695
+ & [data-truncate-marker] {
1696
+ right: 0;
1697
+ }
1698
+ & [data-truncate-fade] {
1699
+ margin-right: calc(-2 * var(--truncate-internal-fade-marker-width));
1700
+ }
1701
+ }
1702
+
1703
+ [data-truncate-container='fruncate'] {
1704
+ & [data-truncate-grid] {
1705
+ grid-template-columns: 0 minmax(0, max-content) auto;
1706
+ }
1707
+ & [data-truncate-content] {
1708
+ direction: rtl;
1709
+ }
1710
+ & [data-truncate-content] > span {
1711
+ unicode-bidi: plaintext;
1712
+ }
1713
+ & [data-truncate-fade] {
1714
+ margin-left: calc(-2 * var(--truncate-internal-fade-marker-width));
1715
+ }
1716
+ }
1717
+
1718
+ [data-truncate-variant='default'] {
1719
+ & [data-truncate-marker] {
1720
+ background-color: var(--truncate-internal-marker-background-color);
1721
+ background-image: linear-gradient(
1722
+ var(--truncate-internal-marker-background-overlay-color),
1723
+ var(--truncate-internal-marker-background-overlay-color)
1724
+ );
1725
+ }
1726
+ & [data-truncate-marker]::after,
1727
+ & [data-truncate-marker]::before {
1728
+ content: '';
1729
+ position: absolute;
1730
+ width: calc(
1731
+ var(--truncate-internal-marker-fade-width) +
1732
+ var(--truncate-internal-marker-gap)
1733
+ );
1734
+ inset-block-start: var(--truncate-internal-marker-block-inset);
1735
+ height: max(
1736
+ 0px,
1737
+ calc(
1738
+ var(--truncate-internal-single-line-height) -
1739
+ var(--truncate-internal-marker-block-inset) * 2
1740
+ )
1741
+ );
1742
+ background-color: var(--truncate-internal-marker-background-color);
1743
+ background-image: linear-gradient(
1744
+ var(--truncate-internal-marker-background-overlay-color),
1745
+ var(--truncate-internal-marker-background-overlay-color)
1746
+ );
1747
+ mask-image: linear-gradient(
1748
+ var(--truncate-internal-fade-dir),
1749
+ #000 0%,
1750
+ #000 var(--truncate-internal-marker-gap),
1751
+ transparent 100%
1752
+ );
1753
+ }
1754
+ & [data-truncate-marker]::after {
1755
+ --truncate-internal-fade-dir: to right;
1756
+ right: calc(
1757
+ -1 *
1758
+ (
1759
+ var(--truncate-internal-marker-fade-width) +
1760
+ var(--truncate-internal-marker-gap)
1761
+ )
1762
+ );
1763
+ }
1764
+ & [data-truncate-marker]::before {
1765
+ --truncate-internal-fade-dir: to left;
1766
+ left: calc(
1767
+ -1 *
1768
+ (
1769
+ var(--truncate-internal-marker-fade-width) +
1770
+ var(--truncate-internal-marker-gap)
1771
+ )
1772
+ );
1773
+ }
1774
+ }
1775
+
1776
+ [data-truncate-variant='fade'] {
1777
+ & [data-truncate-marker] {
1778
+ background: transparent;
1779
+ }
1780
+ }
1781
+
1782
+ [data-truncate-fade] {
1783
+ box-shadow:
1784
+ 0 0 calc(var(--truncate-internal-fade-marker-width) / 2)
1785
+ var(--truncate-internal-fade-marker-color),
1786
+ 0 0 var(--truncate-internal-fade-marker-width)
1787
+ var(--truncate-internal-fade-marker-color);
1788
+ width: calc(var(--truncate-internal-fade-marker-width) * 2);
1789
+ height: calc(
1790
+ var(--truncate-internal-single-line-height) -
1791
+ (var(--truncate-internal-fade-marker-width) * 2)
1792
+ );
1793
+ margin: var(--truncate-internal-fade-marker-width) 0;
1794
+ }
1795
+
1796
+ [data-truncate-group-container='middle'] {
1797
+ & [data-truncate-container] {
1798
+ --truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity);
1799
+ }
1800
+
1801
+ display: flex;
1802
+ min-width: 0;
1803
+
1804
+ & > div {
1805
+ min-width: 0;
1806
+ }
1807
+
1808
+ & > div[data-truncate-segment-priority='1'] {
1809
+ flex: 0 1 max-content;
1810
+ }
1811
+ & > div[data-truncate-segment-priority='2'] {
1812
+ flex: 0 999999 max-content;
1813
+ }
1814
+ }
1815
+ }
1816
+ `,Ed=`@layer base, unsafe;`;function Dd(e){return`${Ed}
1817
+ @layer base {
1818
+ ${e}
1819
+ }`}function Od(e){return`${Ed}
1820
+ @layer unsafe {
1821
+ ${e}
1822
+ }`}var kd=new WeakMap;function Ad(e){let t=kd.get(e);if(t!=null)return t;let n=document.createElement(`div`);n.setAttribute(Zl,`true`);let r=document.createElement(`div`);r.style.position=`relative`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n);let i=Math.max(n.offsetWidth-n.clientWidth,0);return n.remove(),kd.set(e,i),i}function jd(e,t){if(!e.isConnected)return;let n=Ad(t);if(n==null)return;let r=t.querySelector(`style[${Ql}]`),i=r instanceof HTMLStyleElement?r:document.createElement(`style`);r instanceof HTMLStyleElement||(i.setAttribute(Ql,``),t.appendChild(i)),i.textContent=`:host { ${$l}: ${n}px; }`}var Md;function Nd(e){if(typeof CSSStyleSheet<`u`&&typeof CSSStyleSheet.prototype.replaceSync==`function`&&`adoptedStyleSheets`in e){Md??(Md=new CSSStyleSheet,Md.replaceSync(Dd(Td)));let t=!1;try{e.adoptedStyleSheets=[Md],t=!0}catch{}if(t){e.querySelector(`style[${Yl}]`)?.remove();return}}if(e.querySelector(`style[data-file-tree-style]`)==null){let t=document.createElement(`style`);t.setAttribute(Yl,``),t.textContent=Dd(Td),e.prepend(t)}}function Pd(e,t){Fd(e,t),Nd(t),jd(e,t)}function Fd(e,t){let n=e.querySelector(`template[shadowrootmode="open"], template[data-file-tree-shadowrootmode="open"]`);n instanceof HTMLTemplateElement&&(t.childNodes.length>0||(t.appendChild(n.content.cloneNode(!0)),n.hasAttribute(`shadowrootmode`)&&n.remove()))}if(typeof HTMLElement<`u`&&customElements.get(`file-tree-container`)==null){class e extends HTMLElement{constructor(){super()}connectedCallback(){let e=this.shadowRoot??this.attachShadow({mode:`open`});Pd(this,e)}}if(customElements.define(Jl,e),typeof document<`u`)for(let e of Array.from(document.querySelectorAll(Jl)))e instanceof HTMLElement&&Pd(e,e.shadowRoot??e.attachShadow({mode:`open`}))}var Id=5,Ld=1<<Id,Rd=Ld*4;function zd(){return{childIdByNameId:new Map,childIds:[],childPositionById:new Map,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Bd(){return{childIdByNameId:null,childIds:[],childPositionById:null,childVisibleChunkSums:null,totalChildSubtreeNodeCount:0,totalChildVisibleSubtreeCount:0}}function Vd(e,t){if(t.childIdByNameId!=null)return t.childIdByNameId;let n=new Map;for(let r of t.childIds){let t=e[r];t!=null&&n.set(t.nameId,r)}return t.childIdByNameId=n,n}function Hd(e){if(e.childPositionById!=null)return e.childPositionById;let t=new Map;for(let n=0;n<e.childIds.length;n++){let r=e.childIds[n];r!=null&&t.set(r,n)}return e.childPositionById=t,t}function Ud(e,t){e.childPositionById!=null&&e.childPositionById.set(t,e.childIds.length),e.childIds.push(t)}function Wd(e,t){if(e.childPositionById!=null)for(let n=t;n<e.childIds.length;n++){let t=e.childIds[n];t!=null&&e.childPositionById.set(t,n)}}function Gd(e,t){let n=0,r=0;for(let i of t.childIds){let t=e[i];t!=null&&(n+=t.subtreeNodeCount,r+=t.visibleSubtreeCount)}t.totalChildSubtreeNodeCount=n,t.totalChildVisibleSubtreeCount=r,Yd(e,t)}function Kd(e,t,n,r){if(e.totalChildSubtreeNodeCount+=n,e.totalChildVisibleSubtreeCount+=r,e.childVisibleChunkSums==null||r===0)return;let i=Hd(e).get(t);if(i===void 0)return;let a=i>>Id;e.childVisibleChunkSums[a]+=r}function qd(e,t,n){let r=t.childVisibleChunkSums;if(r!=null){let i=n,a=0;for(let o of r){if(i<o){let r=Xd(e,t,a,i);return{...r,childVisibleIndex:n-r.localVisibleIndex}}i-=o,a+=Ld}throw Error(`Visible child index ${String(n)} is out of range`)}let i=n;for(let r=0;r<t.childIds.length;r++){let a=t.childIds[r];if(a==null)continue;let o=e[a];if(o!=null){if(i<o.visibleSubtreeCount)return{childIndex:r,childVisibleIndex:n-i,localVisibleIndex:i};i-=o.visibleSubtreeCount}}throw Error(`Visible child index ${String(n)} is out of range`)}function Jd(e,t,n){let r=0,i=t.childVisibleChunkSums,a=0;if(i!=null){let e=n>>Id;for(let t=0;t<e;t+=1)r+=i[t]??0;a=e<<Id}for(let i=a;i<n;i+=1){let n=t.childIds[i];if(n==null)continue;let a=e[n];a!=null&&(r+=a.visibleSubtreeCount)}return r}function Yd(e,t){if(t.childIds.length<Rd){t.childVisibleChunkSums=null;return}let n=Math.ceil(t.childIds.length/Ld),r=new Int32Array(n);for(let n=0;n<t.childIds.length;n++){let i=t.childIds[n];if(i==null)continue;let a=e[i];a!=null&&(r[n>>Id]+=a.visibleSubtreeCount)}t.childVisibleChunkSums=r}function Xd(e,t,n,r){let i=Math.min(t.childIds.length,n+Ld),a=r;for(let r=n;r<i;r++){let n=t.childIds[r];if(n==null)continue;let i=e[n];if(i!=null){if(a<i.visibleSubtreeCount)return{childIndex:r,localVisibleIndex:a};a-=i.visibleSubtreeCount}}throw Error(`Visible child index ${String(r)} is out of range`)}var Zd=7,Qd=3,$d=1<<Qd,ef=4;function tf(e,t,n=0){return e<<ef|n<<Qd|t}function nf(e){return e.depthAndFlags>>>ef}function rf(e){return(e.depthAndFlags&$d)>>Qd}function Y(e){return(e.depthAndFlags&$d)!==0}function af(e){return e.depthAndFlags&Zd}function of(e,t){return(af(e)&t)!==0}function sf(e,t){e.depthAndFlags|=t}function cf(e,t){e.depthAndFlags=tf(t,af(e),rf(e))}var lf=Symbol(`benchmarkInstrumentation`);function uf(e,t){return t==null||Object.defineProperty(e,lf,{configurable:!0,enumerable:!1,value:t,writable:!1}),e}function df(e){return e==null?null:e[lf]??null}function X(e,t,n){return e==null?n():e.measurePhase(t,n)}function ff(e,t,n){!Number.isFinite(n)||e==null||e.setCounter(t,n)}function pf(e){return e>=48&&e<=57}function mf(e){let t=[],n=0,r=0;for(;r<e.length;){for(;r<e.length&&!pf(e.charCodeAt(r));)r+=1;if(r>=e.length)break;r>n&&t.push(e.slice(n,r));let i=0;for(;r<e.length&&pf(e.charCodeAt(r));)i=i*10+(e.charCodeAt(r)-48),r+=1;t.push(i),n=r}return(n<e.length||t.length===0)&&t.push(e.slice(n)),t}function hf(e){let t=e.toLowerCase();return{lowerValue:t,tokens:mf(t)}}function gf(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n===i)continue;if(typeof n==`number`&&typeof i==`number`)return n<i?-1:1;let a=String(n),o=String(i);if(a!==o)return a<o?-1:1}return e.length===t.length?0:e.length<t.length?-1:1}function _f(e,t){if(e.tokens.length===1&&t.tokens.length===1&&typeof e.tokens[0]==`string`&&typeof t.tokens[0]==`string`)return e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1;let n=gf(e.tokens,t.tokens);return n===0?e.lowerValue===t.lowerValue?0:e.lowerValue<t.lowerValue?-1:1:n}function vf(e,t,n){let r=_f(n(e),n(t));return r===0?e===t?0:e<t?-1:1:r}function yf(e,t){return vf(e,t,hf)}function bf(e,t){return t===e.segments.length-1?+!!e.isDirectory:1}function xf(e,t){let n=Math.min(e.segments.length,t.segments.length);for(let r=0;r<n;r++){let n=e.segments[r],i=t.segments[r];if(n===i)continue;let a=bf(e,r);return a===bf(t,r)?yf(n,i):a===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function Sf(e,t){return xf(e,t)}function Cf(e,t,n){let r=e=>{let t=n.get(e);if(t!=null)return t;let r=hf(e);return n.set(e,r),r},i=Math.min(e.segments.length,t.segments.length);for(let n=0;n<i;n++){let i=e.segments[n],a=t.segments[n];if(i===a)continue;let o=bf(e,n);return o===bf(t,n)?vf(i,a,r):o===1?-1:1}return e.segments.length===t.segments.length?e.isDirectory===t.isDirectory?0:e.isDirectory?-1:1:e.segments.length<t.segments.length?-1:1}function wf(e,t){let n=e.sortKeyById[t];if(n!==void 0)return n;let r=e.valueById[t],i=hf(r);return e.sortKeyById[t]=i,i}function Tf(e={}){return{flattenEmptyDirectories:e.flattenEmptyDirectories!==!1,sort:e.sort??`default`}}function Ef(e){let t=e.length>0&&e.charCodeAt(e.length-1)===47,n=t?e.length-1:e.length,r=[],i=0;for(let t=0;t<n;t++)e.charCodeAt(t)===47&&(r.push(e.slice(i,t)),i=t+1);return r.push(e.slice(i,n)),{hasTrailingSlash:t,segments:r}}function Df(e){let{hasTrailingSlash:t,segments:n}=Ef(e);return{basename:n[n.length-1]??``,isDirectory:t,path:e,segments:n}}function Of(e){if(e.length===0)return{requiresDirectory:!1,segments:[]};let{hasTrailingSlash:t,segments:n}=Ef(e);return{requiresDirectory:t,segments:n}}var kf=``;function Af(){let e=new Map;return e.set(kf,0),{idByValue:e,valueById:[kf],sortKeyById:[hf(kf)]}}function jf(e,t){let n=e.idByValue.get(t);if(n!==void 0)return n;let r=e.valueById.length;return e.idByValue.set(t,r),e.valueById.push(t),r}function Mf(e,t){let n=e.valueById[t];if(n===void 0)throw Error(`Unknown segment ID: ${String(t)}`);return n}var Nf=Symbol(`pathStorePreparedInputKind`);function Pf(e,t){return e[Nf]=t,e}function Ff(e){return{basename:e.basename,depth:e.segments.length,isDirectory:e.isDirectory,path:e.path,segments:e.segments}}function If(e,t,n){return n==="default"?Sf(e,t):n(Ff(e),Ff(t))}function Lf(){return{depthAndFlags:tf(0,3,1),nameId:0,parentId:0,subtreeNodeCount:1,visibleSubtreeCount:1}}function Rf(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function zf(e){return e.isDirectory?e.segments.length:e.segments.length-1}function Bf(e){return Array.isArray(e)&&e.every(e=>typeof e==`object`&&!!e&&typeof e.path==`string`&&Array.isArray(e.segments)&&typeof e.basename==`string`&&typeof e.isDirectory==`boolean`)}function Vf(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function Hf(e,t={}){return Jf(e,t).map(e=>e.path)}function Uf(e,t={}){let n=Jf(e,t);return Pf({paths:n.map(e=>e.path),preparedPaths:n},`prepared`)}function Wf(e){let t=e.length,n=!1;for(let r=0;r<t;r+=1){let t=e[r];if(t.length>0&&t.charCodeAt(t.length-1)===47){n=!0;break}}return Pf({paths:e,presortedPaths:e,presortedPathsContainDirectories:n},`presorted`)}function Gf(e){let t=e,n=t.preparedPaths;if(t[Nf]===`prepared`&&n!=null)return n;if(!Bf(n))throw Error(`preparedInput must come from PathStore.prepareInput()`);return n}function Kf(e){let t=e;return t[Nf]===`presorted`&&t.presortedPaths!=null||Vf(t.presortedPaths)?t.presortedPaths:null}function qf(e){let t=e;return typeof t.presortedPathsContainDirectories==`boolean`?t.presortedPathsContainDirectories:null}function Jf(e,t={}){let n=Tf(t),r=df(t);ff(r,`workload.inputFiles`,e.length);let i=X(r,`store.preparePathEntries.parse`,()=>e.map(e=>Df(e)));return X(r,`store.preparePathEntries.sort`,()=>i.sort((e,t)=>If(e,t,n.sort))),i}var Yf=class{directories=new Map;directoryStack=[0];presortedDirectoryNodeIds=[];initialExpandedPathSet;createdDirectoriesAllExpanded=!1;createdDirectoryCount=0;lastPreparedPath=null;nodes=[Lf()];options;instrumentation;segmentSortKeyCache=new Map;segmentTable=Af();hasDeferredDirectoryIndexes=!1;constructor(e={}){this.instrumentation=df(e),this.options=Tf(e);let t=e.initialExpandedPaths??null;if(t==null||t.length===0)this.initialExpandedPathSet=null;else{let e=new Set,n=t.length;for(let r=0;r<n;r+=1){let n=t[r],i=n.length;e.add(i>0&&n.charCodeAt(i-1)===47?n.slice(0,i-1):n)}this.initialExpandedPathSet=e,this.createdDirectoriesAllExpanded=!0}this.directories.set(0,zd())}appendPaths(e){return X(this.instrumentation,`store.builder.appendPaths.parse`,()=>this.appendPreparedPaths(e.map(e=>Df(e))))}appendPreparedPaths(e,t=!0){return this.createdDirectoriesAllExpanded=!1,X(this.instrumentation,`store.builder.appendPreparedPaths`,()=>{for(let n of e)this.appendPreparedPath(n,t)}),this}appendPresortedPaths(e,t=null){return X(this.instrumentation,`store.builder.appendPresortedPaths`,()=>{if(t===!1){this.appendPresortedFilePaths(e);return}this.createdDirectoriesAllExpanded=!1;let n=null,r=0,i=this.nodes,a=this.segmentTable,o=a.idByValue,s=a.valueById,c=this.directoryStack,l=0,u=``,d=0;for(let t of e){if(n===t)throw Error(`Duplicate path: "${t}"`);let e=t.length>0&&t.charCodeAt(t.length-1)===47,a=e?t.length-1:t.length,f=0,p=0;if(n!=null)if(u.length>0&&t.length>u.length&&t.startsWith(u))f=d,p=u.length;else{let r=Math.min(a,n.length),i=!0;for(let e=0;e<r;e++){let r=t.charCodeAt(e);if(r!==n.charCodeAt(e)){i=!1;break}r===47&&(f++,p=e+1)}i&&e&&r===a&&n.length>a&&n.charCodeAt(a)===47&&(f++,p=a+1)}l=f,r=f;let m=p,h=t.indexOf(`/`,m);for(;h>=0&&h<a;){let e=c[l];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);r++;let n=t.slice(m,h),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n));let u=i.length;i.push({depthAndFlags:tf(r,0,1),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(t.slice(0,h)),l++,c[l]=u,m=h+1,h=t.indexOf(`/`,m)}if(e){if(m<a){let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory parent for "${t}"`);r++;let n=t.slice(m,a),u=o.get(n);u===void 0&&(u=s.length,o.set(n,u),s.push(n));let d=i.length;i.push({depthAndFlags:tf(r,0,1),nameId:u,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),l++,c[l]=d}let e=c[l];if(e===void 0)throw Error(`Unable to resolve directory node for "${t}"`);this.promoteDirectoryToExplicit(e,t)}else{let e=c[l];if(e===void 0)throw Error(`Unable to resolve file parent for "${t}"`);let n=t.slice(m),a=o.get(n);a===void 0&&(a=s.length,o.set(n,a),s.push(n)),i.push({depthAndFlags:tf(r+1,0),nameId:a,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1})}m!==u.length&&(u=t.substring(0,m),d=r),n=t}c.length=l+1,n!=null&&(this.lastPreparedPath=Df(n)),this.hasDeferredDirectoryIndexes=!0}),this}appendPresortedFilePaths(e){let t=null,n=0,r=this.nodes,i=this.segmentTable,a=i.idByValue,o=i.valueById,s=this.directoryStack,c=0,l=``,u=0;for(let i of e){if(t===i)throw Error(`Duplicate path: "${i}"`);let e=i.length,d=0,f=0;if(t!=null)if(l.length>0&&i.length>l.length&&i.startsWith(l))d=u,f=l.length;else{let n=Math.min(e,t.length);for(let e=0;e<n;e++){let n=i.charCodeAt(e);if(n!==t.charCodeAt(e))break;n===47&&(d++,f=e+1)}}c=d,n=d;let p=f,m=i.indexOf(`/`,p);for(;m>=0;){let e=s[c];if(e===void 0)throw Error(`Directory stack underflow while building the path store`);n++;let t=i.slice(p,m),l=a.get(t);l===void 0&&(l=o.length,a.set(t,l),o.push(t));let u=r.length;r.push({depthAndFlags:tf(n,0,1),nameId:l,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),this.recordCreatedDirectoryPath(i.slice(0,m)),this.presortedDirectoryNodeIds.push(u),c++,s[c]=u,p=m+1,m=i.indexOf(`/`,p)}let h=s[c];if(h===void 0)throw Error(`Unable to resolve file parent for "${i}"`);let g=i.slice(p),_=a.get(g);_===void 0&&(_=o.length,a.set(g,_),o.push(g)),r.push({depthAndFlags:tf(n+1,0),nameId:_,parentId:h,subtreeNodeCount:1,visibleSubtreeCount:1}),p!==l.length&&(l=i.substring(0,p),u=n),t=i}s.length=c+1,t!=null&&(this.lastPreparedPath=Df(t)),this.hasDeferredDirectoryIndexes=!0}finish(e={}){let t=e.skipSubtreeCountPass===!0;return this.hasDeferredDirectoryIndexes?(X(this.instrumentation,`store.builder.buildDirectoryIndexes`,()=>this.buildPresortedFinish(t)),this.hasDeferredDirectoryIndexes=!1):t||X(this.instrumentation,`store.builder.computeSubtreeCounts`,()=>this.computeSubtreeCounts(0)),{directories:this.directories,nodes:this.nodes,options:this.options,rootId:0,segmentTable:this.segmentTable,presortedDirectoryNodeIds:this.presortedDirectoryNodeIds.length>0?this.presortedDirectoryNodeIds:null}}didMatchAllInitialExpandedPaths(){return this.createdDirectoriesAllExpanded&&this.initialExpandedPathSet!=null&&this.createdDirectoryCount===this.initialExpandedPathSet.size}appendPreparedPath(e,t){if(this.hasDeferredDirectoryIndexes&&=(this.buildDirectoryIndexes(),!1),this.lastPreparedPath!=null){if(e.path===this.lastPreparedPath.path)throw Error(`Duplicate path: "${e.path}"`);if(t&&(this.options.sort==="default"?Cf(this.lastPreparedPath,e,this.segmentSortKeyCache):If(this.lastPreparedPath,e,this.options.sort))>0)throw Error(`Builder input must be sorted before appendPaths(): "${e.path}"`)}let n=this.lastPreparedPath,r=zf(e),i=n==null?0:zf(n),a=n==null?0:Rf(n.segments,e.segments),o=Math.min(a,r,i);this.directoryStack.length=o+1;for(let n=o;n<r;n++){let r=this.directoryStack[this.directoryStack.length-1];if(r===void 0)throw Error(`Directory stack underflow while building the path store`);let i=t?this.getOrCreateDirectoryChild(r,e.segments[n]):this.createDirectoryChild(r,e.segments[n]);this.directoryStack.push(i)}if(e.isDirectory){let t=this.directoryStack[this.directoryStack.length-1];if(t===void 0)throw Error(`Unable to resolve directory node for "${e.path}"`);this.promoteDirectoryToExplicit(t,e.path),this.lastPreparedPath=e;return}let s=this.directoryStack[this.directoryStack.length-1];if(s===void 0)throw Error(`Unable to resolve file parent for "${e.path}"`);t?this.createFileChild(s,e.basename,e.path):this.createFileChildUnchecked(s,e.basename),this.lastPreparedPath=e}recordCreatedDirectoryPath(e){!this.createdDirectoriesAllExpanded||this.initialExpandedPathSet==null||(this.createdDirectoryCount+=1,this.initialExpandedPathSet.has(e)||(this.createdDirectoriesAllExpanded=!1))}createFileChild(e,t,n){let r=jf(this.segmentTable,t),i=this.getDirectoryIndex(e),a=i.childIdByNameId;if(a!=null&&a.get(r)!==void 0)throw Error(`Path collides with an existing entry: "${n}"`);let o=this.nodes[e];if(o===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let s=this.nodes.length;return this.nodes.push({depthAndFlags:tf(nf(o)+1,0),nameId:r,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),a?.set(r,s),Ud(i,s),s}createFileChildUnchecked(e,t){let n=jf(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:tf(nf(i)+1,0),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Ud(r,a),a}getOrCreateDirectoryChild(e,t){let n=jf(this.segmentTable,t),r=this.getDirectoryIndex(e);if(r.childIdByNameId!=null){let e=r.childIdByNameId.get(n);if(e!==void 0){let n=this.nodes[e];if(n!=null&&!Y(n))throw Error(`Path collides with an existing file while creating directory "${t}"`);return e}}let i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:tf(nf(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Ud(r,a),this.directories.set(a,zd()),a}createDirectoryChild(e,t){let n=jf(this.segmentTable,t),r=this.getDirectoryIndex(e),i=this.nodes[e];if(i===void 0)throw Error(`Unknown parent node ID: ${String(e)}`);let a=this.nodes.length;return this.nodes.push({depthAndFlags:tf(nf(i)+1,0,1),nameId:n,parentId:e,subtreeNodeCount:1,visibleSubtreeCount:1}),r.childIdByNameId!=null&&r.childIdByNameId.set(n,a),Ud(r,a),this.directories.set(a,zd()),a}promoteDirectoryToExplicit(e,t){let n=this.nodes[e];if(n===void 0)throw Error(`Unknown directory node ID: ${String(e)}`);if(!Y(n))throw Error(`Path is not a directory: "${t}"`);if(of(n,1))throw Error(`Duplicate path: "${t}"`);sf(n,1)}getDirectoryIndex(e){let t=this.directories.get(e);if(t!==void 0)return t;throw Error(`Unknown directory child index for node ${String(e)}`)}buildPresortedFinish(e){let t=this.nodes,n=this.directories;n.set(0,Bd());let r=-1,i=null;for(let e=1;e<t.length;e++){let a=t[e];if(a==null)continue;if(Y(a)){let t=Bd();n.set(e,t),r=e,i=t}let o;a.parentId===r?o=i:(o=n.get(a.parentId),r=a.parentId,i=o??null),o?.childIds.push(e)}if(!e)for(let e=t.length-1;e>=1;e--){let n=t[e];if(n==null)continue;let r=t[n.parentId];r!=null&&(r.subtreeNodeCount+=n.subtreeNodeCount,r.visibleSubtreeCount+=n.visibleSubtreeCount)}}buildDirectoryIndexes(){let e=this.nodes;for(let t=1;t<e.length;t++){let n=e[t];if(n==null)continue;Y(n)&&this.directories.set(t,zd());let r=this.directories.get(n.parentId);r!=null&&(r.childIdByNameId!=null&&r.childIdByNameId.set(n.nameId,t),Ud(r,t))}}computeSubtreeCounts(e){let t=this.nodes[e];if(t===void 0)throw Error(`Unknown node ID: ${String(e)}`);if(!Y(t))return t.subtreeNodeCount=1,t.visibleSubtreeCount=1,1;let n=this.getDirectoryIndex(e),r=1;for(let e of n.childIds)r+=this.computeSubtreeCounts(e);return Gd(this.nodes,n),t.subtreeNodeCount=r,t.visibleSubtreeCount=r,r}};function Xf(e,t=`closed`,n=null){let r=Qf(t);return{activeNodeCount:e.nodes.length-1,collapsedDirectoryIds:new Set,collapseNewDirectoriesByDefault:!1,defaultExpansion:r,directoriesOpenByDefault:r===`open`,hasCollapsedDirectoryOverrides:!1,directoryLoadInfoById:new Map,expandedDirectoryIds:new Set,instrumentation:n,listeners:new Map,pathCacheByNodeId:new Map([[e.rootId,{path:``,version:0}]]),pathCacheVersion:0,snapshot:e,transactionStack:[]}}function Zf(){return{affectedAncestorIds:new Set,affectedNodeIds:new Set,events:[]}}function Qf(e){if(typeof e!=`number`)return e;if(!Number.isInteger(e)||e<0)throw Error(`initialExpansion must be "open", "closed", or a non-negative integer depth. Received: ${String(e)}`);return e}function $f(e,t){return of(t,2)||e.defaultExpansion===`open`?!0:e.defaultExpansion!==`closed`&&nf(t)<=e.defaultExpansion}function ep(e,t,n=e.snapshot.nodes[t]){return n==null||!Y(n)?!1:e.directoriesOpenByDefault&&!e.hasCollapsedDirectoryOverrides?!0:e.collapsedDirectoryIds.has(t)?!1:e.expandedDirectoryIds.has(t)?!0:$f(e,n)}function tp(e,t,n,r=e.snapshot.nodes[t]){if(r==null||!Y(r))return;let i=$f(e,r);if(n){if(i){e.collapsedDirectoryIds.delete(t),e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0;return}e.expandedDirectoryIds.add(t);return}if(i){e.collapsedDirectoryIds.add(t),e.hasCollapsedDirectoryOverrides=!0;return}e.expandedDirectoryIds.delete(t)}function np(e,t){let n=e.directoryLoadInfoById.get(t);if(n!=null)return n;let r={activeAttemptId:null,errorMessage:null,nextAttemptId:1,state:`loaded`};return e.directoryLoadInfoById.set(t,r),r}function rp(e,t){return e.directoryLoadInfoById.get(t)?.state??`loaded`}function ip(e,t){let n=np(e,t);if(n.state===`loading`&&n.activeAttemptId!=null)return{attemptId:n.activeAttemptId,nodeId:t,reused:!0};let r=n.nextAttemptId;return n.activeAttemptId=r,n.errorMessage=null,n.nextAttemptId+=1,n.state=`loading`,{attemptId:r,nodeId:t,reused:!1}}function ap(e,t){let n=np(e,t);n.activeAttemptId=null,n.errorMessage=null,n.state=`unloaded`}function op(e,t,n){let r=e.directoryLoadInfoById.get(t);return r==null||r.activeAttemptId!==n?!1:(r.activeAttemptId=null,r.errorMessage=null,r.state=`loaded`,!0)}function sp(e,t,n){return e.directoryLoadInfoById.get(t)?.activeAttemptId===n}function cp(e,t,n,r){let i=e.directoryLoadInfoById.get(t);return i==null||i.activeAttemptId!==n?!1:(i.activeAttemptId=null,i.errorMessage=r??null,i.state=`error`,!0)}function lp(e,t){e.directoryLoadInfoById.delete(t)}function up(e,t,n){let r=n,i=e.listeners.get(t);return i==null?e.listeners.set(t,new Set([r])):i.add(r),()=>{let n=e.listeners.get(t);n!=null&&(n.delete(r),n.size===0&&e.listeners.delete(t))}}function dp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`add`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function fp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,operation:`remove`,path:e.path,projectionChanged:e.projectionChanged,recursive:e.recursive,visibleCountDelta:null}}function pp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!0,from:e.from,operation:`move`,projectionChanged:e.projectionChanged,to:e.to,visibleCountDelta:null}}function mp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`expand`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function hp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`collapse`,path:e.path,projectionChanged:!0,visibleCountDelta:null}}function gp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],canonicalChanged:!1,operation:`mark-directory-unloaded`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function _p(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`begin-child-load`,path:e.path,projectionChanged:e.projectionChanged,reused:e.reused,visibleCountDelta:null}}function vp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:e.childEvents.some(e=>e.canonicalChanged),childEvents:e.childEvents,operation:`apply-child-patch`,path:e.path,projectionChanged:e.projectionChanged,visibleCountDelta:null}}function yp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,operation:`complete-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function bp(e){return{affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],attemptId:e.attemptId,canonicalChanged:!1,errorMessage:e.errorMessage,operation:`fail-child-load`,path:e.path,projectionChanged:e.projectionChanged,stale:e.stale,visibleCountDelta:null}}function xp(e){return{activeNodeCountAfter:e.activeNodeCountAfter,activeNodeCountBefore:e.activeNodeCountBefore,affectedAncestorIds:e.affectedAncestorIds??[],affectedNodeIds:e.affectedNodeIds??[],cachedPathEntryCountAfter:e.cachedPathEntryCountAfter,cachedPathEntryCountBefore:e.cachedPathEntryCountBefore,canonicalChanged:!1,idsPreserved:e.idsPreserved,loadInfoEntryCountAfter:e.loadInfoEntryCountAfter,loadInfoEntryCountBefore:e.loadInfoEntryCountBefore,mode:e.mode,operation:`cleanup`,projectionChanged:e.projectionChanged,reclaimedCachedPathEntryCount:e.reclaimedCachedPathEntryCount,reclaimedLoadInfoEntryCount:e.reclaimedLoadInfoEntryCount,reclaimedNodeSlotCount:e.reclaimedNodeSlotCount,reclaimedSegmentCount:e.reclaimedSegmentCount,segmentCountAfter:e.segmentCountAfter,segmentCountBefore:e.segmentCountBefore,totalNodeSlotCountAfter:e.totalNodeSlotCountAfter,totalNodeSlotCountBefore:e.totalNodeSlotCountBefore,visibleCountDelta:null}}function Sp(e,t,n){return{...n,visibleCountDelta:Np(e)-t}}function Cp(e,t){let n=Np(e),r=Zf();e.transactionStack.push(r);try{t()}catch(t){throw Ep(e,r,!1),t}Ep(e,r,!0,Np(e)-n)}function wp(e,t){let n=e.instrumentation;if(n==null){Tp(e,t);return}X(n,`store.events.record`,()=>Tp(e,t))}function Tp(e,t){let n=e.transactionStack[e.transactionStack.length-1]??null;if(n==null){jp(e,t);return}n.events.push(t),Ap(n,t)}function Ep(e,t,n,r=null){if(e.transactionStack.pop()!==t)throw Error(`Transaction stack underflow`);if(!n)return;let i=e.transactionStack[e.transactionStack.length-1]??null;if(i!=null){let n=e.instrumentation;n==null?kp(i,t):X(n,`store.events.batch.merge`,()=>kp(i,t));return}let a=Dp(t,r),o=e.instrumentation;if(o==null){jp(e,a);return}X(o,`store.events.batch.commit`,()=>jp(e,a))}function Dp(e,t){return{affectedAncestorIds:[...e.affectedAncestorIds],affectedNodeIds:[...e.affectedNodeIds],canonicalChanged:e.events.some(e=>e.canonicalChanged),events:[...e.events],operation:`batch`,projectionChanged:e.events.some(e=>e.projectionChanged),visibleCountDelta:t}}function Op(e,t){for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n);for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n)}function kp(e,t){for(let n of t.events)e.events.push(n);Op(e,t)}function Ap(e,t){for(let n of t.affectedNodeIds)e.affectedNodeIds.add(n);for(let n of t.affectedAncestorIds)e.affectedAncestorIds.add(n)}function jp(e,t){let n=e.instrumentation;if(n==null){Mp(e,t);return}X(n,`store.events.emit`,()=>Mp(e,t))}function Mp(e,t){e.listeners.get(t.operation)?.forEach(e=>e(t)),e.listeners.get(`*`)?.forEach(e=>e(t))}function Np(e){return e.snapshot.nodes[e.snapshot.rootId]?.visibleSubtreeCount??0}function Pp(e,t){if(e.snapshot.options.flattenEmptyDirectories!==!0)return null;let n=e.snapshot.nodes[t];if(n==null||!Y(n)||of(n,2))return null;let r=e.snapshot.directories.get(t);if(r==null||r.childIds.length!==1)return null;let i=r.childIds[0];if(i==null)return null;let a=e.snapshot.nodes[i];return a==null||!Y(a)?null:i}function Fp(e,t){let n=t;for(;;){let t=Pp(e,n);if(t==null)return n;n=t}}function Ip(e,t){let n=[t],r=t;for(;;){let t=Pp(e,r);if(t==null)return n;n.push(t),r=t}}function Lp(e,t){let n=t==null?e.snapshot.rootId:qp(e,t);return n==null?[]:Xp(e,n)}function Rp(e,t){let n=Df(t),r=n.isDirectory?n.segments:n.segments.slice(0,-1),i=dm(e,um(e,r)),{createdNodeIds:a,directoryId:o}=Zp(e,r),s=new Set(a),c=o;if(n.isDirectory){let n=Z(e,o);if(of(n,1))throw Error(`Path already exists: "${t}"`);sf(n,1),e.pathCacheByNodeId.set(o,{path:t,version:e.pathCacheVersion}),s.add(o)}else c=$p(e,o,n.basename),s.add(c);Wp(e,o);let l=dm(e,o);return dp({affectedAncestorIds:Kp(e,c),affectedNodeIds:[...s],path:t,projectionChanged:fm(i,l)})}function zp(e,t,n){let r=qp(e,t);if(r==null)throw Error(`Path does not exist: "${t}"`);let i=Z(e,r);if(of(i,2))throw Error(`The root node cannot be removed`);if(Y(i)&&Yp(e,r).childIds.length>0&&n.recursive!==!0)throw Error(`Cannot remove a non-empty directory without recursive: "${t}"`);let a=i.parentId,o=dm(e,a),s=cm(e,r);nm(e,a,r,i.nameId),lm(e,a),Wp(e,a);let c=dm(e,a);return fp({affectedAncestorIds:Kp(e,a),affectedNodeIds:s,path:t,projectionChanged:fm(o,c),recursive:n.recursive===!0})}function Bp(e,t,n,r){let i=qp(e,t);if(i==null)throw Error(`Source path does not exist: "${t}"`);let a=Z(e,i);if(of(a,2))throw Error(`The root node cannot be moved`);let o=r.collision??`error`,s=om(e,i,n),c=dm(e,a.parentId),l=dm(e,s.parentId),u=Mf(e.snapshot.segmentTable,a.nameId),d=jf(e.snapshot.segmentTable,s.basename);if(s.parentId===a.parentId&&u===s.basename)return null;if(Y(a)&&gm(e,i,s.parentId))throw Error(`Cannot move a directory into one of its descendants`);let f=Vd(e.snapshot.nodes,Yp(e,s.parentId)).get(d),p=s.existingNodeId??f??null;if(p!=null&&p!==i&&sm(e,p,o,rf(a))===`skip`)return null;let m=a.parentId;nm(e,m,i,a.nameId),a.parentId=s.parentId,a.nameId=d,e.pathCacheByNodeId.delete(i),hm(e,i),tm(e,s.parentId,i),lm(e,m),e.pathCacheVersion++,Wp(e,m),s.parentId!==m&&Wp(e,s.parentId);let h=dm(e,m),g=dm(e,s.parentId);return pp({affectedAncestorIds:[...new Set([...Kp(e,m),...Kp(e,s.parentId)])],affectedNodeIds:[i],from:t,projectionChanged:pm([c,l],[h,g]),to:Up(e,i)})}function Vp(e,t){let n=e.pathCacheByNodeId.get(t);return n!=null&&n.version===e.pathCacheVersion?n.path:null}function Hp(e,t,n){return e.pathCacheByNodeId.set(t,{path:n,version:e.pathCacheVersion}),n}function Up(e,t){let n=Z(e,t),r=Vp(e,t);if(r!=null)return r;if(of(n,2))return Hp(e,t,``);let i=Up(e,n.parentId),a=Mf(e.snapshot.segmentTable,n.nameId),o=i.length===0?a:`${i}${a}`;return Hp(e,t,Y(n)?`${o}/`:o)}function Wp(e,t){let n=e.instrumentation;if(n==null){vm(e,t);return}X(n,`store.recomputeCountsUpwardFrom`,()=>vm(e,t))}function Gp(e,t){let n=[[t,0]],{nodes:r,directories:i}=e.snapshot;for(;n.length>0;){let t=n[n.length-1],a=t[0],o=r[a];if(o==null||!Y(o)){_m(e,a,o,!0),n.pop();continue}let s=i.get(a);if(s==null||t[1]>=s.childIds.length){_m(e,a,o,!0),n.pop();continue}let c=s.childIds[t[1]++];n.push([c,0])}}function Kp(e,t){let n=[],r=t;for(;r!=null;){let t=Z(e,r);if(n.push(r),r===e.snapshot.rootId)break;r=t.parentId}return n}function qp(e,t){if(t.length===0)return e.snapshot.rootId;let n=Of(t);return Jp(e,n.segments,n.requiresDirectory)}function Jp(e,t,n){let r=e.snapshot.rootId;for(let n of t){let t=e.snapshot.segmentTable.idByValue.get(n);if(t===void 0)return null;let i=Yp(e,r),a=Vd(e.snapshot.nodes,i).get(t);if(a===void 0)return null;r=a}let i=Z(e,r);return n&&!Y(i)?null:r}function Yp(e,t){let n=e.snapshot.directories.get(t);if(n===void 0)throw Error(`Unknown directory child index for node ${String(t)}`);return n}function Z(e,t){let n=e.snapshot.nodes[t];if(n===void 0||of(n,4))throw Error(`Unknown node ID: ${String(t)}`);return n}function Xp(e,t){let n=e.snapshot.nodes[t];if(n===void 0||of(n,4))return[];if(!Y(n))return[Up(e,t)];if(Yp(e,t).childIds.length===0)return of(n,1)&&!of(n,2)?[Up(e,t)]:[];let r=[],i=[{childIndex:0,nodeId:t}];for(;i.length>0;){let t=i[i.length-1];if(t==null)break;let n=e.snapshot.nodes[t.nodeId];if(n===void 0||of(n,4)){i.pop();continue}if(!Y(n)){r.push(Up(e,t.nodeId)),i.pop();continue}let a=Yp(e,t.nodeId);if(a.childIds.length===0){of(n,1)&&!of(n,2)&&r.push(Up(e,t.nodeId)),i.pop();continue}let o=a.childIds[t.childIndex];if(o==null){i.pop();continue}t.childIndex++,i.push({childIndex:0,nodeId:o})}return r}function Zp(e,t){let n=[],r=e.snapshot.rootId;for(let i of t){let t=jf(e.snapshot.segmentTable,i),a=Yp(e,r),o=Vd(e.snapshot.nodes,a).get(t);if(o!==void 0){if(!Y(Z(e,o)))throw Error(`Cannot create a directory that collides with an existing file: "${i}"`);r=o;continue}r=Qp(e,r,t),n.push(r)}return{createdNodeIds:n,directoryId:r}}function Qp(e,t,n){let r=Z(e,t),i=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:tf(nf(r)+1,0,1),nameId:n,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),e.snapshot.directories.set(i,zd()),tm(e,t,i),e.collapseNewDirectoriesByDefault&&(e.collapsedDirectoryIds.add(i),e.hasCollapsedDirectoryOverrides=!0),e.activeNodeCount++,i}function $p(e,t,n){let r=jf(e.snapshot.segmentTable,n),i=Yp(e,t);if(Vd(e.snapshot.nodes,i).has(r))throw Error(`Path already exists: "${bm(e,t,n)}"`);let a=Z(e,t),o=e.snapshot.nodes.length;return e.snapshot.nodes.push({depthAndFlags:tf(nf(a)+1,0),nameId:r,parentId:t,subtreeNodeCount:1,visibleSubtreeCount:1}),tm(e,t,o),e.activeNodeCount++,o}function em(e,t,n){let r=0,i=t.childIds.length;for(;r<i;){let a=r+i>>>1,o=t.childIds[a];if(o==null){i=a;continue}rm(e,n,o)<0?i=a:r=a+1}return r}function tm(e,t,n){let r=Yp(e,t),i=Z(e,n);Vd(e.snapshot.nodes,r).set(i.nameId,n),Kd(r,n,i.subtreeNodeCount,i.visibleSubtreeCount);let a=em(e,r,n);r.childIds.splice(a,0,n),Wd(r,a),Yd(e.snapshot.nodes,r)}function nm(e,t,n,r){let i=Yp(e,t),a=Hd(i),o=a.get(n)??-1;Vd(e.snapshot.nodes,i).delete(r),a.delete(n);let s=e.snapshot.nodes[n];s!=null&&Kd(i,n,-s.subtreeNodeCount,-s.visibleSubtreeCount),o>=0&&(i.childIds.splice(o,1),Wd(i,o),Yd(e.snapshot.nodes,i))}function rm(e,t,n){let r=e.snapshot.options.sort;return r==="default"?im(e,t,n):r(am(e,t),am(e,n))}function im(e,t,n){let r=Z(e,t),i=Z(e,n),a=Y(r);if(a!==Y(i))return a?-1:1;let o=_f(wf(e.snapshot.segmentTable,r.nameId),wf(e.snapshot.segmentTable,i.nameId));if(o!==0)return o;let s=Mf(e.snapshot.segmentTable,r.nameId),c=Mf(e.snapshot.segmentTable,i.nameId);return s===c?t<n?-1:1:s<c?-1:1}function am(e,t){let n=Z(e,t),r=Up(e,t),i=Y(n),a=i?r.slice(0,-1):r;return{basename:Mf(e.snapshot.segmentTable,n.nameId),depth:nf(n),isDirectory:i,path:r,segments:a.length===0?[]:a.split(`/`)}}function om(e,t,n){let r=Z(e,t),i=qp(e,n);if(i!=null){let t=Z(e,i);if(Y(t))return{basename:Mf(e.snapshot.segmentTable,r.nameId),existingNodeId:null,parentId:i};let a=Of(n).segments;return{basename:a[a.length-1]??``,existingNodeId:i,parentId:t.parentId}}let a=Of(n),o=a.segments[a.segments.length-1]??``,s=a.segments.slice(0,-1),c=s.length===0?e.snapshot.rootId:Jp(e,s,!0);if(c==null)throw Error(`Destination parent does not exist: "${n}"`);return{basename:o,existingNodeId:null,parentId:c}}function sm(e,t,n,r){if(n===`skip`)return`skip`;if(n===`error`)throw Error(`Destination already exists: "${Up(e,t)}"`);let i=Z(e,t);if(rf(i)!==r)throw Error(`replace collision requires the same source and destination kinds`);if(Y(i)&&Yp(e,t).childIds.length>0)throw Error(`replace collision does not support non-empty directories`);let a=i.parentId,o=i.nameId;return cm(e,t),nm(e,a,t,o),lm(e,a),Wp(e,a),`handled`}function cm(e,t){let n=[],r=[{nodeId:t,visitedChildren:!1}];for(;r.length>0;){let t=r.pop();if(t==null)break;let i=Z(e,t.nodeId);if(t.visitedChildren||!Y(i)){Y(i)&&e.snapshot.directories.delete(t.nodeId),sf(i,4),e.pathCacheByNodeId.delete(t.nodeId),e.collapsedDirectoryIds.delete(t.nodeId)&&(e.hasCollapsedDirectoryOverrides=e.collapsedDirectoryIds.size>0),e.expandedDirectoryIds.delete(t.nodeId),lp(e,t.nodeId),e.activeNodeCount--,n.push(t.nodeId);continue}r.push({nodeId:t.nodeId,visitedChildren:!0});let a=Yp(e,t.nodeId);for(let e=a.childIds.length-1;e>=0;e--){let t=a.childIds[e];t!=null&&r.push({nodeId:t,visitedChildren:!1})}}return n}function lm(e,t){let n=t;for(;n!=null;){let t=Z(e,n);if(!Y(t)||of(t,2)||Yp(e,n).childIds.length>0)return;sf(t,1),n=t.parentId===n?null:t.parentId}}function um(e,t){let n=e.snapshot.rootId;for(let r of t){let t=e.snapshot.segmentTable.idByValue.get(r);if(t==null)break;let i=Vd(e.snapshot.nodes,Yp(e,n)).get(t);if(i==null||!Y(Z(e,i)))break;n=i}return n}function dm(e,t){let n=mm(e,t);if(n==null)return null;let r=Fp(e,n),i=Z(e,r),a=n===r?null:Ip(e,n).map(t=>Up(e,t));return JSON.stringify({flattenedSegmentPaths:a,hasChildren:Yp(e,r).childIds.length>0,path:Up(e,r),terminalKind:rf(i)})}function fm(e,t){return pm([e],[t])}function pm(e,t){for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(r==null||i==null||r!==i)return!0}return!1}function mm(e,t){let n=t;for(;n!=null;){let t=Z(e,n);if(!Y(t)||of(t,2))return null;if(!ep(e,n,t))return n;n=t.parentId}return null}function hm(e,t){let n=Z(e,t);if(cf(n,(t===e.snapshot.rootId?-1:nf(Z(e,n.parentId)))+1),!Y(n))return;let r=Yp(e,t);for(let t of r.childIds)hm(e,t)}function gm(e,t,n){let r=n;for(;r!=null;){if(r===t)return!0;let n=Z(e,r);if(r===e.snapshot.rootId)return!1;r=n.parentId}return!1}function _m(e,t,n=Z(e,t),r=!1){let i=e.instrumentation;if(i==null){ym(e,t,n,r);return}X(i,`store.recomputeNodeCounts`,()=>ym(e,t,n,r))}function vm(e,t){let n=t;for(;n!=null;){let t=Z(e,n),r=t.subtreeNodeCount,i=t.visibleSubtreeCount;if(_m(e,n,t),n===e.snapshot.rootId)return;let a=t.subtreeNodeCount-r,o=t.visibleSubtreeCount-i,s=t.parentId;(a!==0||o!==0)&&Kd(Yp(e,s),n,a,o),n=s}}function ym(e,t,n,r){if(!Y(n)){n.subtreeNodeCount=1,n.visibleSubtreeCount=1;return}let i=Yp(e,t);if(r){let t=e.instrumentation;t==null?Gd(e.snapshot.nodes,i):X(t,`store.recomputeNodeCounts.rebuildChildAggregates`,()=>Gd(e.snapshot.nodes,i))}let a=1+i.totalChildSubtreeNodeCount,o=i.totalChildVisibleSubtreeCount;if(n.subtreeNodeCount=a,of(n,2)){n.visibleSubtreeCount=o;return}n.visibleSubtreeCount=Pp(e,t)==null?ep(e,t,n)?1+o:1:o}function bm(e,t,n){let r=Up(e,t);return r.length===0?n:`${r}${n}`}function xm(e){return e!=null&&!of(e,4)}function Sm(e,t){let n=e.snapshot.nodes[t];return!xm(n)||!Y(n)||of(n,2)?null:n}function Cm(e){let t=0;for(let[n,r]of e.pathCacheByNodeId)r.version===e.pathCacheVersion&&xm(e.snapshot.nodes[n])&&(t+=1);return t}function wm(e){return Math.max(0,e.valueById.length-1)}function Tm(e){return{activeNodeCount:e.activeNodeCount,cachedPathEntryCount:Cm(e),loadInfoEntryCount:e.directoryLoadInfoById.size,segmentCount:wm(e.snapshot.segmentTable),totalNodeSlotCount:Math.max(0,e.snapshot.nodes.length-1)}}function Em(e,t,n,r){return{activeNodeCountAfter:r.activeNodeCount,activeNodeCountBefore:n.activeNodeCount,cachedPathEntryCountAfter:r.cachedPathEntryCount,cachedPathEntryCountBefore:n.cachedPathEntryCount,idsPreserved:t,loadInfoEntryCountAfter:r.loadInfoEntryCount,loadInfoEntryCountBefore:n.loadInfoEntryCount,mode:e,reclaimedCachedPathEntryCount:n.cachedPathEntryCount-r.cachedPathEntryCount,reclaimedLoadInfoEntryCount:n.loadInfoEntryCount-r.loadInfoEntryCount,reclaimedNodeSlotCount:n.totalNodeSlotCount-r.totalNodeSlotCount,reclaimedSegmentCount:n.segmentCount-r.segmentCount,segmentCountAfter:r.segmentCount,segmentCountBefore:n.segmentCount,totalNodeSlotCountAfter:r.totalNodeSlotCount,totalNodeSlotCountBefore:n.totalNodeSlotCount}}function Dm(e){let t=[],n=[];for(let n of e.collapsedDirectoryIds)Sm(e,n)!=null&&t.push(Up(e,n));for(let t of e.expandedDirectoryIds)Sm(e,t)!=null&&n.push(Up(e,t));return{collapsedPaths:t,expandedPaths:n}}function Om(e){let t=[];for(let[n,r]of e.directoryLoadInfoById)Sm(e,n)==null||rp(e,n)===`loaded`||t.push({info:{activeAttemptId:null,errorMessage:r.errorMessage,nextAttemptId:r.nextAttemptId,state:r.state},path:Up(e,n)});return t}function km(e,t){e.collapsedDirectoryIds.clear(),e.hasCollapsedDirectoryOverrides=!1,e.expandedDirectoryIds.clear();for(let n of t.expandedPaths){let t=qp(e,n);t!=null&&tp(e,t,!0,Z(e,t))}for(let n of t.collapsedPaths){let t=qp(e,n);t!=null&&tp(e,t,!1,Z(e,t))}}function Am(e,t){e.directoryLoadInfoById.clear();for(let n of t){let t=qp(e,n.path);t!=null&&Sm(e,t)!=null&&e.directoryLoadInfoById.set(t,{activeAttemptId:null,errorMessage:n.info.errorMessage,nextAttemptId:n.info.nextAttemptId,state:n.info.state})}}function jm(e){e.pathCacheVersion+=1,e.pathCacheByNodeId.clear(),e.pathCacheByNodeId.set(e.snapshot.rootId,{path:``,version:e.pathCacheVersion})}function Mm(e){let t=e.snapshot.segmentTable,n=Af();for(let r of e.snapshot.nodes)if(xm(r)){if(of(r,2)){r.nameId=0;continue}r.nameId=jf(n,Mf(t,r.nameId))}e.snapshot.segmentTable=n}function Nm(e){for(let[t,n]of e.snapshot.directories){let r=e.snapshot.nodes[t];if(!xm(r)||!Y(r)){e.snapshot.directories.delete(t);continue}let i=n.childIds.filter(n=>{let r=e.snapshot.nodes[n];return xm(r)&&r.parentId===t});n.childIds=i,n.childIdByNameId=new Map(i.map(t=>[Z(e,t).nameId,t])),n.childPositionById=new Map(i.map((e,t)=>[e,t])),Gd(e.snapshot.nodes,n)}}function Pm(e){let t=e.snapshot.nodes.length-1;for(;t>e.snapshot.rootId;){let n=e.snapshot.nodes[t];if(xm(n))break;--t}e.snapshot.nodes.length=t+1}function Fm(e){let t=Dm(e),n=Om(e);X(e.instrumentation,`store.cleanup.stable.clearPathCaches`,()=>jm(e)),X(e.instrumentation,`store.cleanup.stable.rebuildSegmentTable`,()=>Mm(e)),X(e.instrumentation,`store.cleanup.stable.rebuildDirectoryIndexes`,()=>Nm(e)),X(e.instrumentation,`store.cleanup.stable.trimTrailingRemovedNodeSlots`,()=>Pm(e)),X(e.instrumentation,`store.cleanup.stable.restoreExpansionOverrides`,()=>km(e,t)),X(e.instrumentation,`store.cleanup.stable.restoreDirectoryLoadInfos`,()=>Am(e,n)),X(e.instrumentation,`store.cleanup.stable.recomputeCounts`,()=>Gp(e,e.snapshot.rootId))}function Im(e){let t=Dm(e),n=Om(e),r=X(e.instrumentation,`store.cleanup.aggressive.listPaths`,()=>Lp(e)),i=uf({...e.snapshot.options},e.instrumentation),a=X(e.instrumentation,`store.cleanup.aggressive.rebuildSnapshot`,()=>{let e=new Yf(i);return e.appendPaths(r),e.finish()});e.snapshot=a,e.activeNodeCount=a.nodes.length-1,e.pathCacheByNodeId=new Map([[a.rootId,{path:``,version:0}]]),e.pathCacheVersion=0,X(e.instrumentation,`store.cleanup.aggressive.restoreExpansionOverrides`,()=>km(e,t)),X(e.instrumentation,`store.cleanup.aggressive.restoreDirectoryLoadInfos`,()=>Am(e,n)),X(e.instrumentation,`store.cleanup.aggressive.recomputeCounts`,()=>Gp(e,e.snapshot.rootId))}function Lm(e){for(let t of e.directoryLoadInfoById.values())if(t.state===`loading`&&t.activeAttemptId!=null)return!0;return!1}function Rm(e,t){let n=Tm(e);t===`stable`?X(e.instrumentation,`store.cleanup.stable`,()=>Fm(e)):X(e.instrumentation,`store.cleanup.aggressive`,()=>Im(e));let r=Tm(e);return Em(t,t===`stable`,n,r)}var zm=64;function Bm(e,t){let n=t+2;if(n<=e.length)return e;let r=e.length;for(;r<n;)r*=2;let i=new Int32Array(r);return i.fill(-1),i.set(e),i}function Vm(e){return Z(e,e.snapshot.rootId).visibleSubtreeCount}function Hm(e,t,n,r){let i=Z(e,t.terminalNodeId),a=Math.max(1,i.visibleSubtreeCount);return Math.min(r-1,n+a-1)}function Um(e,t,n,r){return{ancestorPaths:r,index:t.index,posInSet:t.posInSet,row:ch(e,t.cursor),setSize:t.setSize,subtreeEndIndex:Hm(e,t.cursor,t.index,n)}}function Wm(e,t,n,r,i,a){let o=Yp(e,t),{childIndex:s,childVisibleIndex:c,localVisibleIndex:l}=qd(e.snapshot.nodes,o,n),u=o.childIds[s];if(u==null)throw Error(`Visible index ${String(n)} is out of range`);return Gm(e,u,l,r+c,i+1,s,o.childIds.length,a)}function Gm(e,t,n,r,i,a,o,s){if(!Y(Z(e,t))){if(n===0)return{ancestors:s,cursor:{headNodeId:t,terminalNodeId:t,visibleDepth:i},index:r,posInSet:a,setSize:o};throw Error(`Visible index ${String(n)} is out of range for file`)}let c=nh(e,t,i);if(n===0)return{ancestors:s,cursor:c,index:r,posInSet:a,setSize:o};let l=Z(e,c.terminalNodeId);if(!Y(l)||!ep(e,c.terminalNodeId,l))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return Wm(e,c.terminalNodeId,n-1,r+1,c.visibleDepth,[...s,{cursor:c,index:r,posInSet:a,setSize:o}])}function Km(e,t){let n=Vm(e);if(t<0||t>=n)return null;let r=Wm(e,e.snapshot.rootId,t,0,-1,[]),i=r.ancestors.map(t=>Up(e,t.cursor.terminalNodeId)),a=null;return{ancestorPaths:i,get ancestorRows(){if(a!=null)return a;let t=[],i=[];for(let a of r.ancestors){let r=Um(e,a,n,[...i]);t.push(r),i.push(r.row.path)}return a=t,a},index:r.index,posInSet:r.posInSet,row:ch(e,r.cursor),setSize:r.setSize,subtreeEndIndex:Hm(e,r.cursor,r.index,n)}}function qm(e,t,n){let r=e.instrumentation,i=Vm(e);if(i<=0||n<t)return[];let a=Math.max(0,Math.min(t,i-1)),o=Math.max(a,Math.min(n,i-1));if(r==null){if(a===0)return sh(e,o+1);let t=[],n=$m(e,a);for(let r=a;r<=o&&n!=null;r++){let r=ch(e,n);t.push(r),n=ih(e,n)}return t}let s=[],c=0,l=0,u=X(r,`store.getVisibleSlice.selectFirstRow`,()=>$m(e,a));for(let t=a;t<=o&&u!=null;t++){let t=X(r,`store.getVisibleSlice.materializeRow`,()=>ch(e,u));s.push(t),t.isFlattened&&(c++,l+=t.flattenedSegments?.length??0),u=X(r,`store.getVisibleSlice.advanceCursor`,()=>ih(e,u))}return ff(r,`workload.visibleRowsRead`,s.length),ff(r,`workload.flattenedRowsRead`,c),ff(r,`workload.flattenedSegmentsRead`,l),s}function Jm(e,t=Vm(e)){let n=e.instrumentation;return n==null?oh(e,t):X(n,`store.getVisibleTreeProjection`,()=>oh(e,t))}function Ym(e){return ah(Jm(e))}function Xm(e,t){let n=qp(e,t);if(n==null||n===e.snapshot.rootId||Y(Z(e,n))&&Fp(e,n)!==n)return null;let r=0,i=n,{nodes:a,rootId:o}=e.snapshot;for(;i!==o;){let t=Z(e,i).parentId,n=Yp(e,t),s=Hd(n).get(i);if(s==null)throw Error(`Child ${String(i)} was not found in its parent index`);if(r+=Jd(a,n,s),t!==o){let n=Z(e,t),a=Pp(e,t);if(!ep(e,t,n)&&a!==i)return null;Fp(e,t)===t&&(r+=1)}i=t}return r}function Zm(e,t){let n=qp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Z(e,n);if(!Y(r))throw Error(`Path is not a directory: "${t}"`);return ep(e,n,r)?null:(tp(e,n,!0,r),Wp(e,n),mp({affectedAncestorIds:Kp(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0}))}function Qm(e,t){let n=qp(e,t);if(n==null)throw Error(`Path does not exist: "${t}"`);let r=Z(e,n);if(!Y(r))throw Error(`Path is not a directory: "${t}"`);return ep(e,n,r)?(tp(e,n,!1,r),Wp(e,n),hp({affectedAncestorIds:Kp(e,n),affectedNodeIds:[n],path:t,projectionChanged:!0})):null}function $m(e,t){return t<0||t>=Vm(e)?null:eh(e,e.snapshot.rootId,t,-1)}function eh(e,t,n,r){let i=Yp(e,t),a=e.instrumentation,{childIndex:o,localVisibleIndex:s}=a==null?qd(e.snapshot.nodes,i,n):X(a,`store.getVisibleSlice.selectChildIndex`,()=>qd(e.snapshot.nodes,i,n)),c=i.childIds[o];if(c!=null)return th(e,c,s,r+1);throw Error(`Visible index ${String(n)} is out of range`)}function th(e,t,n,r){if(!Y(Z(e,t))){if(n===0)return{headNodeId:t,terminalNodeId:t,visibleDepth:r};throw Error(`Visible index ${String(n)} is out of range for file`)}let i=nh(e,t,r);if(n===0)return i;let a=Z(e,i.terminalNodeId);if(!Y(a)||!ep(e,i.terminalNodeId,a))throw Error(`Visible index ${String(n)} is out of range for collapsed directory`);return eh(e,i.terminalNodeId,n-1,i.visibleDepth)}function nh(e,t,n){return Y(Z(e,t))?e.instrumentation==null?{headNodeId:t,terminalNodeId:Fp(e,t),visibleDepth:n}:{headNodeId:t,terminalNodeId:X(e.instrumentation,`store.getVisibleSlice.flatten.resolveTerminalDirectory`,()=>Fp(e,t)),visibleDepth:n}:{headNodeId:t,terminalNodeId:t,visibleDepth:n}}function rh(e,t){let n=Z(e,t);if(!Y(n))return!0;let r=n.parentId;return r===e.snapshot.rootId||Pp(e,r)!==t}function ih(e,t){let n=Z(e,t.terminalNodeId);if(Y(n)){let r=Yp(e,t.terminalNodeId);if(ep(e,t.terminalNodeId,n)&&r.childIds.length>0){let n=r.childIds[0];return n==null?null:th(e,n,0,t.visibleDepth+1)}}let r=t.terminalNodeId,i=t.visibleDepth;for(;;){let t=Z(e,r);if(r===e.snapshot.rootId)return null;let n=t.parentId,a=Yp(e,n),o=Hd(a).get(r)??-1;if(o<0)throw Error(`Child ${String(r)} was not found in its parent index`);let s=a.childIds[o+1]??null;if(s!=null)return th(e,s,0,i);rh(e,r)&&i--,r=n}}function ah(e){let t=e.paths.length,n=Array(t);for(let r=0;r<t;r+=1){let t=e.getParentIndex(r);n[r]={index:r,parentPath:t>=0?e.paths[t]??null:null,path:e.paths[r]??``,posInSet:e.posInSetByIndex[r]??0,setSize:e.setSizeByIndex[r]??0}}return{getParentIndex:e.getParentIndex,rows:n,get visibleIndexByPath(){return e.visibleIndexByPath}}}function oh(e,t){let n=Array(t),r=new Int32Array(t),i=new Int32Array(t),a=new Int32Array(t),o=new Int32Array(zm);o.fill(-1);let s=0,{nodes:c,directories:l,segmentTable:u}=e.snapshot,d=[[l.get(e.snapshot.rootId),0,-1,``]],f=e.snapshot.options.flattenEmptyDirectories,p=e.pathCacheByNodeId,m=e.pathCacheVersion,h=u.valueById;for(;d.length>0&&s<t;){let t=d[d.length-1],u=t[0];if(t[1]>=u.childIds.length){d.pop();continue}let g=t[1],_=u.childIds[t[1]++],v=c[_],y=t[2]+1,b=t[3];o=Bm(o,y);let x,S=_;if(Y(v))S=f?Fp(e,_):_,x=S===_?`${b}${h[v.nameId]}/`:Up(e,S);else{let e=p.get(_);x=e!=null&&e.version===m?e.path:`${b}${h[v.nameId]}`}r[s]=o[y],n[s]=x,i[s]=g,a[s]=u.childIds.length,o[y+1]=s,s+=1;let C=c[S];C!=null&&Y(C)&&ep(e,S,C)&&d.push([l.get(S),0,y,x])}s<t&&(n.length=s);let g=r.subarray(0,s),_=i.subarray(0,s),v=a.subarray(0,s),y=null;return{getParentIndex(e){return e<0||e>=s?-1:g[e]??-1},paths:n,posInSetByIndex:_,setSizeByIndex:v,get visibleIndexByPath(){if(y==null){y=new Map;for(let e=0;e<s;e+=1)y.set(n[e]??``,e)}return y}}}function sh(e,t){let n=Array(t),r=0,{nodes:i,directories:a,segmentTable:o}=e.snapshot,s=[[a.get(e.snapshot.rootId),0,-1]],c=o.valueById,l=e.snapshot.options.flattenEmptyDirectories,u=e.pathCacheByNodeId,d=e.pathCacheVersion;for(;s.length>0&&r<t;){let t=s[s.length-1],o=t[0];if(t[1]>=o.childIds.length){s.pop();continue}let f=o.childIds[t[1]++],p=i[f],m=t[2]+1;if(!Y(p)){let t=u.get(f);n[r++]={depth:m,flattenedSegments:void 0,hasChildren:!1,id:f,isExpanded:!1,isFlattened:!1,isLoading:!1,kind:`file`,loadState:void 0,name:c[p.nameId],path:t!=null&&t.version===d?t.path:Up(e,f)};continue}let h=l?Fp(e,f):f,g={headNodeId:f,terminalNodeId:h,visibleDepth:m};n[r++]=ch(e,g);let _=i[h];_!=null&&Y(_)&&ep(e,h,_)&&s.push([a.get(h),0,m])}return r<t&&(n.length=r),n}function ch(e,t){let n=Z(e,t.terminalNodeId),r=Y(n)?lh(e,t):null,i=Up(e,t.terminalNodeId),a=Mf(e.snapshot.segmentTable,n.nameId),o=Y(n)&&Yp(e,t.terminalNodeId).childIds.length>0,s=t.headNodeId!==t.terminalNodeId,c=e.instrumentation,l=s?c==null?Ip(e,t.headNodeId).map(n=>{let r=Z(e,n);return{isTerminal:n===t.terminalNodeId,name:Mf(e.snapshot.segmentTable,r.nameId),nodeId:n,path:Up(e,n)}}):X(c,`store.getVisibleSlice.flatten.collectSegments`,()=>Ip(e,t.headNodeId).map(n=>{let r=Z(e,n);return{isTerminal:n===t.terminalNodeId,name:Mf(e.snapshot.segmentTable,r.nameId),nodeId:n,path:Up(e,n)}})):void 0;return{depth:t.visibleDepth,flattenedSegments:l,hasChildren:o,id:t.terminalNodeId,isExpanded:Y(n)&&ep(e,t.terminalNodeId,n),isFlattened:s,isLoading:r===`loading`,kind:Y(n)?`directory`:`file`,loadState:r==null||r===`loaded`?void 0:r,name:a,path:i}}function lh(e,t){if(t.headNodeId===t.terminalNodeId)return rp(e,t.terminalNodeId);let n=Ip(e,t.headNodeId),r=!1,i=!1;for(let t of n){let n=rp(e,t);if(n===`loading`)return`loading`;if(n===`error`){i=!0;continue}n===`unloaded`&&(r=!0)}return i?`error`:r?`unloaded`:`loaded`}function uh(e){let{directories:t,nodes:n,options:r,rootId:i,presortedDirectoryNodeIds:a}=e.snapshot,o=r.flattenEmptyDirectories===!0,s=e=>{let r=n[e];if(r==null||!Y(r))return;let i=t.get(e);if(i==null)throw Error(`Unknown directory child index for node ${String(e)}`);let a=i.childIds,s=a.length,c=0,l=0;for(let e=0;e<s;e++){let t=a[e];if(t==null)continue;let r=n[t];c+=r.subtreeNodeCount,l+=r.visibleSubtreeCount}i.totalChildSubtreeNodeCount=c,i.totalChildVisibleSubtreeCount=l,s>=128&&Yd(n,i),r.subtreeNodeCount=1+c;let u;if(o&&s===1){let e=n[a[0]];u=e!=null&&Y(e)?l:1+l}else u=1+l;r.visibleSubtreeCount=u};if(a!=null)for(let e=a.length-1;e>=0;e--)s(a[e]);else for(let e=n.length-1;e>=1;e--)s(e);let c=n[i],l=t.get(i);if(c==null||l==null)return;let u=l.childIds,d=0,f=0;for(let e=0;e<u.length;e++){let t=u[e];if(t==null)continue;let r=n[t];d+=r.subtreeNodeCount,f+=r.visibleSubtreeCount}l.totalChildSubtreeNodeCount=d,l.totalChildVisibleSubtreeCount=f,Yd(n,l),c.subtreeNodeCount=1+d,c.visibleSubtreeCount=f}function dh(e){return e.initialExpansion===`open`&&(e.initialExpandedPaths==null||e.initialExpandedPaths.length===0)}var fh=class e{#e;constructor(e={}){let t=df(e),n=X(t,`store.builder.create`,()=>new Yf(e));if(e.preparedInput!=null){let t=Kf(e.preparedInput);t==null?n.appendPreparedPaths(Gf(e.preparedInput),!1):n.appendPresortedPaths(t,qf(e.preparedInput))}else{let r=e.paths??[];e.presorted===!0?n.appendPaths(r):n.appendPreparedPaths(X(t,`store.preparePathEntries`,()=>Jf(r,e)))}let r=X(t,`store.builder.finish`,()=>n.finish({skipSubtreeCountPass:!0})),i=X(t,`store.state.detectAllDirectoriesExpanded`,()=>(e.initialExpansion??`closed`)===`closed`&&n.didMatchAllInitialExpandedPaths());this.#e=X(t,`store.state.create`,()=>Xf(r,i?`open`:e.initialExpansion??`closed`,t)),i&&(this.#e.collapseNewDirectoriesByDefault=!0);let a=i?this.#e.snapshot.directories.size-1:X(t,`store.state.initializeExpandedPaths`,()=>this.initializeExpandedPaths(e.initialExpandedPaths));i||dh(e)||(e.initialExpansion??`closed`)===`closed`&&a===this.#e.snapshot.directories.size-1||(e.initialExpandedPaths?.length??0)>0&&X(t,`store.state.checkAllDirectoriesExpanded`,()=>this.hasAllDirectoriesExpanded())?X(t,`store.state.initializeOpenVisibleCounts`,()=>uh(this.#e)):X(t,`store.state.recomputeCounts`,()=>Gp(this.#e,this.#e.snapshot.rootId))}static preparePaths(e,t={}){return Hf(e,t)}static prepareInput(e,t={}){return Uf(e,t)}static preparePresortedInput(e){return Wf(e)}list(e){return X(this.#e.instrumentation,`store.list`,()=>Lp(this.#e,e))}add(e){X(this.#e.instrumentation,`store.add`,()=>{let t=Vm(this.#e);wp(this.#e,Sp(this.#e,t,Rp(this.#e,e)))})}remove(e,t={}){X(this.#e.instrumentation,`store.remove`,()=>{let n=Vm(this.#e);wp(this.#e,Sp(this.#e,n,zp(this.#e,e,t)))})}move(e,t,n={}){X(this.#e.instrumentation,`store.move`,()=>{let r=Vm(this.#e),i=Bp(this.#e,e,t,n);i!=null&&wp(this.#e,Sp(this.#e,r,i))})}batch(e){Cp(this.#e,()=>{if(typeof e==`function`){e(this);return}for(let t of e)switch(t.type){case`add`:this.add(t.path);break;case`remove`:this.remove(t.path,{recursive:t.recursive});break;case`move`:this.move(t.from,t.to,{collision:t.collision});break}})}getVisibleCount(){return X(this.#e.instrumentation,`store.getVisibleCount`,()=>Vm(this.#e))}getVisibleSlice(e,t){return X(this.#e.instrumentation,`store.getVisibleSlice`,()=>qm(this.#e,e,t))}getVisibleRowContext(e){return X(this.#e.instrumentation,`store.getVisibleRowContext`,()=>Km(this.#e,e))}getVisibleTreeProjection(){return Ym(this.#e)}getVisibleTreeProjectionData(e){return Jm(this.#e,e)}getVisibleIndex(e){return X(this.#e.instrumentation,`store.getVisibleIndex`,()=>Xm(this.#e,e))}getPathInfo(e){return X(this.#e.instrumentation,`store.getPathInfo`,()=>{let t=qp(this.#e,e);if(t==null)return null;let n=Z(this.#e,t);return{depth:nf(n),kind:Y(n)?`directory`:`file`,path:Up(this.#e,t)}})}isExpanded(e){return X(this.#e.instrumentation,`store.isExpanded`,()=>{let t=this.requireDirectoryNodeId(e),n=Z(this.#e,t);return ep(this.#e,t,n)})}expand(e){X(this.#e.instrumentation,`store.expand`,()=>{let t=Vm(this.#e),n=Zm(this.#e,e);n!=null&&wp(this.#e,Sp(this.#e,t,n))})}collapse(e){X(this.#e.instrumentation,`store.collapse`,()=>{let t=Vm(this.#e),n=Qm(this.#e,e);n!=null&&wp(this.#e,Sp(this.#e,t,n))})}on(e,t){return up(this.#e,e,t)}getDirectoryLoadState(e){let t=this.requireDirectoryNodeId(e);return rp(this.#e,t)}markDirectoryUnloaded(e){X(this.#e.instrumentation,`store.markDirectoryUnloaded`,()=>{let t=this.requireDirectoryNodeId(e);if(Yp(this.#e,t).childIds.length>0)throw Error(`Cannot mark a directory with known children as unloaded: "${e}"`);let n=Vm(this.#e);ap(this.#e,t),wp(this.#e,Sp(this.#e,n,gp({affectedAncestorIds:Kp(this.#e,t),affectedNodeIds:[t],path:e,projectionChanged:this.isDirectoryProjectionVisible(t)})))})}beginChildLoad(e){return X(this.#e.instrumentation,`store.beginChildLoad`,()=>{let t=this.requireDirectoryNodeId(e),n=Vm(this.#e),r=ip(this.#e,t);return wp(this.#e,Sp(this.#e,n,_p({affectedAncestorIds:Kp(this.#e,t),affectedNodeIds:[t],attemptId:r.attemptId,path:e,projectionChanged:this.isDirectoryProjectionVisible(t),reused:r.reused}))),r})}applyChildPatch(e,t){return X(this.#e.instrumentation,`store.applyChildPatch`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null||rp(this.#e,n)!==`loading`||!sp(this.#e,n,e.attemptId))return!1;let r=Up(this.#e,n);this.validateChildPatch(r,t);let i=Vm(this.#e),a=[];for(let e of t.operations){ph(r,e);let t=Vm(this.#e);switch(e.type){case`add`:a.push(Sp(this.#e,t,Rp(this.#e,e.path)));break;case`remove`:a.push(Sp(this.#e,t,zp(this.#e,e.path,{recursive:e.recursive})));break;case`move`:{let n=Bp(this.#e,e.from,e.to,{collision:e.collision});n!=null&&a.push(Sp(this.#e,t,n));break}}}let o=a.some(e=>e.projectionChanged)||this.isDirectoryProjectionVisible(n);return wp(this.#e,Sp(this.#e,i,vp({affectedAncestorIds:Kp(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,childEvents:a,path:Up(this.#e,n),projectionChanged:o}))),!0})}completeChildLoad(e){return X(this.#e.instrumentation,`store.completeChildLoad`,()=>{let t=this.resolveActiveDirectoryNodeId(e.nodeId);if(t==null)return!1;let n=Vm(this.#e),r=op(this.#e,t,e.attemptId);return wp(this.#e,Sp(this.#e,n,yp({affectedAncestorIds:Kp(this.#e,t),affectedNodeIds:[t],attemptId:e.attemptId,path:Up(this.#e,t),projectionChanged:this.isDirectoryProjectionVisible(t),stale:!r}))),r})}failChildLoad(e,t){return X(this.#e.instrumentation,`store.failChildLoad`,()=>{let n=this.resolveActiveDirectoryNodeId(e.nodeId);if(n==null)return!1;let r=Vm(this.#e),i=cp(this.#e,n,e.attemptId,t);return wp(this.#e,Sp(this.#e,r,bp({affectedAncestorIds:Kp(this.#e,n),affectedNodeIds:[n],attemptId:e.attemptId,errorMessage:t,path:Up(this.#e,n),projectionChanged:this.isDirectoryProjectionVisible(n),stale:!i}))),i})}cleanup(e={}){return X(this.#e.instrumentation,`store.cleanup`,()=>{if(this.#e.transactionStack.length>0)throw Error(`Cleanup cannot run during an open batch or transaction.`);if(Lm(this.#e))throw Error(`Cleanup cannot run while directory loads are active.`);let t=Vm(this.#e),n=Rm(this.#e,e.mode??`stable`);return wp(this.#e,Sp(this.#e,t,xp({...n,affectedAncestorIds:[],affectedNodeIds:[],projectionChanged:n.idsPreserved===!1}))),n})}getNodeCount(){return this.#e.activeNodeCount}initializeExpandedPaths(e){if(e==null||e.length===0)return 0;let t=0,n=[],r=[],i=0,a=null,o=this.#e.snapshot.segmentTable,s=o.valueById,c=this.#e.snapshot.nodes,l=new Map;for(let u of e){a!=null&&u<a&&(a=null,i=0,n.length=0,r.length=0);let e=u.length>0&&u.charCodeAt(u.length-1)===47?u.length-1:u.length;if(e===0){a=u,i=e,n.length=0,r.length=0;continue}let d=0,f=0;if(a!=null){let t=Math.min(e,i),n=!0;for(let e=0;e<t;e+=1){let t=u.charCodeAt(e);if(t!==a.charCodeAt(e)){n=!1;break}t===47&&(d+=1,f=e+1)}n&&(t===i&&e>t&&u.charCodeAt(t)===47?(d+=1,f=t+1):t===e&&i>t&&a.charCodeAt(t)===47&&(d+=1,f=e+1)),d=Math.min(d,r.length)}let p=d===0?this.#e.snapshot.rootId:r[d-1]??this.#e.snapshot.rootId,m=d,h=!0,g=f;for(;g<=e;){let t=u.indexOf(`/`,g),i=t===-1||t>e?e:t,a=u.slice(g,i),f=Yp(this.#e,p).childIds,_=m===d?n[m]??0:0,v=_,y,b=l.get(a)??hf(a);l.set(a,b);let x=(e,t)=>{for(v=e;v<t;v+=1){let e=f[v],t=c[e],n=s[t.nameId];if(n===a)return y=e,!0;let r=_f(wf(o,t.nameId),b);if(r>0||r===0&&n>a)return!1}return!1};if(!x(_,f.length)&&_>0&&x(0,_),y===void 0){h=!1;break}if(!Y(Z(this.#e,y))){h=!1;break}if(n[m]=v,r[m]=y,p=y,m+=1,i===e)break;g=i+1}if(a=u,i=e,n.length=m,r.length=m,!h){a=null,i=0,n.length=0,r.length=0;continue}for(let e=d;e<m;e+=1){let n=r[e];if(n==null)continue;let i=Z(this.#e,n);ep(this.#e,n,i)||(tp(this.#e,n,!0,i),t+=1)}}return t}hasAllDirectoriesExpanded(){for(let e of this.#e.snapshot.directories.keys()){if(e===this.#e.snapshot.rootId)continue;let t=Z(this.#e,e);if(!ep(this.#e,e,t))return!1}return!0}requireDirectoryNodeId(e){let t=qp(this.#e,e);if(t==null)throw Error(`Path does not exist: "${e}"`);if(!Y(Z(this.#e,t)))throw Error(`Path is not a directory: "${e}"`);return t}resolveActiveDirectoryNodeId(e){try{if(!Y(Z(this.#e,e)))throw Error(`Node is not a directory: ${String(e)}`);return e}catch{return null}}isDirectoryProjectionVisible(e){let t=e;for(;t!==this.#e.snapshot.rootId;){let e=Z(this.#e,t).parentId;if(e!==this.#e.snapshot.rootId){let n=Z(this.#e,e),r=Pp(this.#e,e);if(!ep(this.#e,e,n)&&r!==t)return!1}t=e}return!0}validateChildPatch(t,n){new e({paths:this.list(t),presorted:!0,sort:this.#e.snapshot.options.sort}).batch(n.operations)}};function ph(e,t){switch(t.type){case`add`:case`remove`:if(!t.path.startsWith(e)||t.path===e)throw Error(`Child patch operation must stay within ${e}: "${t.path}"`);break;case`move`:if(!t.from.startsWith(e)||!t.to.startsWith(e)||t.from===e||t.to===e)throw Error(`Child patch move must stay within ${e}: "${t.from}" -> "${t.to}"`);break}}var mh=e=>e.startsWith(`f::`)?e.slice(3):e;function hh(e){let t=e.lastIndexOf(`/`);return t<0?{parentPath:``,baseName:e}:{parentPath:e.slice(0,t),baseName:e.slice(t+1)}}function gh(e,t){return e===``?t:`${e}/${t}`}function _h({files:e,path:t,isFolder:n,nextBasename:r}){let i=mh(t),a=r.trim();if(a.length===0)return{error:`Name cannot be empty.`};if(a.includes(`/`))return{error:`Name cannot include "/".`};let{parentPath:o,baseName:s}=hh(i);if(a===s)return{nextFiles:e,sourcePath:i,destinationPath:i,isFolder:n};let c=gh(o,a),l=Array(e.length),u=new Set;if(!n){let t=`${c}/`,r=!1;for(let n=0;n<e.length;n++){let a=e[n];if(a!==i&&a.startsWith(t))return{error:`"${c}" already exists.`};let o=a===i?c:a;if(u.has(o))return{error:`"${c}" already exists.`};u.add(o),l[n]=o,a===i&&(r=!0)}return r?{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}:{error:`Could not find the selected file to rename.`}}let d=`${i}/`,f=`${c}/`,p=0;for(let t=0;t<e.length;t++){let n=e[t],r=n===i||n.startsWith(d);if(!r&&(n===c||n.startsWith(f)))return{error:`"${c}" already exists.`};let a=r?`${c}${n.slice(i.length)}`:n;if(u.has(a))return{error:`"${c}" already exists.`};u.add(a),l[t]=a,r&&p++}return p===0?{error:`Could not find the selected folder to rename.`}:{nextFiles:l,sourcePath:i,destinationPath:c,isFolder:n}}function vh(e){return e.endsWith(`/`)}function yh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function bh(e){let t=[],n=new Set;for(let r of e)n.has(r)||(n.add(r),t.push(r));let r=new Set;for(let e of t.toSorted((e,t)=>e.length===t.length?e.localeCompare(t):e.length-t.length)){let t=(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`),n=!1;for(let e=0;e<t.length-1;e+=1){let i=`${t.slice(0,e+1).join(`/`)}/`;if(r.has(i)){n=!0;break}}n||r.add(e)}return t.filter(e=>r.has(e))}function xh(e,t){return t.includes(e)?bh(t):[e]}function Sh(e,t){return e===t?!0:e==null||t==null?!1:e.kind===t.kind&&e.directoryPath===t.directoryPath&&e.flattenedSegmentPath===t.flattenedSegmentPath&&e.hoveredPath===t.hoveredPath}function Ch(e,t){return{draggedPaths:e,target:t}}function wh(e,t){if(t.kind!==`directory`||t.directoryPath==null)return!1;for(let n of e)if(vh(n)&&(t.directoryPath===n||t.directoryPath.startsWith(n)))return!0;return!1}function Th(e,t){return t.kind===`root`||t.directoryPath==null?yh(e):t.directoryPath}function Eh(e,t){let n=e.map(e=>{let n=Th(e,t);return n===e?null:{from:e,to:n,type:`move`}}).filter(e=>e!=null);return n.length===0?null:{operations:n,result:{draggedPaths:e,operation:n.length===1?`move`:`batch`,target:t}}}var Dh=Symbol(`FILE_TREE_RENAME_VIEW`);function Oh(e){return e.operation===`add`||e.operation===`remove`||e.operation===`move`||e.operation===`batch`}var kh=512,Ah=512;function jh(e,t){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Mh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function Nh(e){return Mh(e).at(-1)??null}function Ph(e,t){return t==null?e:e.startsWith(t)?e.slice(t.length):e}var Fh=e=>{let t=e.trim();return t.length===0?``:(t.includes(`\\`)?t.replaceAll(`\\`,`/`):t).toLowerCase()},Ih=e=>e.toLowerCase();function Lh(e){return e.endsWith(`/`)}function Rh(e){let t=e.endsWith(`/`)?e.slice(0,-1):e,n=t.lastIndexOf(`/`);return n<0?t:t.slice(n+1)}function zh(e){return e.endsWith(`/`)?e.slice(0,-1):e}function Bh(e,t){return t&&!e.endsWith(`/`)?`${e}/`:e}function Vh(e,t,n){if(e===t)return n;let r=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(r)?`${n.endsWith(`/`)?n:`${n}/`}${e.slice(r.length)}`:e}function Hh(e,t){if(e===t)return!0;let n=t.endsWith(`/`)?t:`${t}/`;return e.startsWith(n)}function Uh(e,t,n=!1){if(e==null)return null;switch(t.operation){case`add`:case`expand`:case`collapse`:case`mark-directory-unloaded`:case`begin-child-load`:case`apply-child-patch`:case`complete-child-load`:case`fail-child-load`:case`cleanup`:return e;case`remove`:return Hh(e,t.path)?n?e:null:e;case`move`:return Vh(e,t.from,t.to);case`batch`:{let r=e;for(let e of t.events)if(r=Uh(r,e,n),r==null)return null;return r}}}function Wh(e){return{canonicalChanged:e.canonicalChanged,projectionChanged:e.projectionChanged,visibleCountDelta:e.visibleCountDelta}}function Gh(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function Kh(e,t,n){let{paths:r,preparedInput:i}=e;if(i==null){if(r==null)throw Error(`FileTree requires paths or preparedInput`);return{paths:r,preparedInput:void 0}}let a=i.paths;if(r==null)return{paths:a,preparedInput:i};if(!Gh(fh.preparePaths(r,n==null?{}:{sort:n}),a))throw Error(`FileTree ${t} received paths and preparedInput for different path lists`);return{paths:a,preparedInput:i}}function qh(e){switch(e.operation){case`add`:return{...Wh(e),operation:`add`,path:e.path};case`remove`:return{...Wh(e),operation:`remove`,path:e.path,recursive:e.recursive};case`move`:return{...Wh(e),from:e.from,operation:`move`,to:e.to}}}function Jh(e){return{...Wh(e),events:e.events.filter(e=>e.operation===`add`||e.operation===`remove`||e.operation===`move`).map(e=>qh(e)),operation:`batch`}}function Yh(e){switch(e.operation){case`add`:case`remove`:case`move`:return qh(e);case`batch`:return Jh(e);default:return null}}function Xh(e,t,n){if(e===0)return-1;if(n!=null){let e=t(n);if(e!=null)return e;let r=Mh(n);for(let e=r.length-1;e>=0;--e){let n=r[e];if(n==null)continue;let i=t(n);if(i!=null)return i}}return 0}function Zh(e,t,n){if(e.paths.length===0)return{focusedIndex:-1,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};if(t==null)return{focusedIndex:0,getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex};let r=n??(t=>e.visibleIndexByPath.get(t)??null);return{focusedIndex:Xh(e.paths.length,r,t),getParentIndex:e.getParentIndex,paths:e.paths,posInSetByIndex:e.posInSetByIndex,setSizeByIndex:e.setSizeByIndex}}var Qh=class{#e;#t=new Set;#n=new Map;#r=null;#i=null;#a=new Map;#o=new Map;#s=-1;#c=null;#l=!1;#u=e=>-1;#d=new Map;#f=null;#p=null;#m=null;#h=null;#g=null;#_;#v;#y;#b=[];#x=new Int32Array;#S=new Int32Array;#C=void 0;#w=!1;#T=null;#E=``;#D=!1;#O=new Set;#k=[];#A;#j=null;#M=null;#N=null;#P=null;#F=null;#I=null;#L=null;#R=new Set;#z=0;#B;#V=0;#H=!1;#U=0;#W;constructor(e){let{dragAndDrop:t,fileTreeSearchMode:n,initialSearchQuery:r,initialSelectedPaths:i,renaming:a,onSearchChange:o,paths:s,preparedInput:c,...l}=e,u=Kh({paths:s,preparedInput:c},`constructor`,l.sort);this.#e=l,t!=null&&t!==!1&&(this.#r=t===!0?{}:t),this.#w=a!=null&&a!==!1,a!=null&&a!==!1&&a!==!0&&(this.#C=a.canRename,this.#v=a.onError,this.#_=a.onRename),this.#y=o,this.#A=n??`hide-non-matches`,this.#B=this.#se(u.paths,u.preparedInput);let d=i?.map(e=>this.#Ae(e)).filter(e=>e!=null)??[],f=d.at(-1)??null;d.length>0&&(this.#R=new Set(d),this.#L=f,this.#z=1),this.#Oe(f,!1),r!=null&&this.#Se(r,!1),this.#W=this.#Fe()}destroy(){this.#W?.(),this.#W=null,this.#n.clear(),this.#t.clear(),this.#d.clear(),this.#i=null,this.#pe()}focusFirstItem(){this.#ve().length>0&&this.#Me(0)}focusLastItem(){this.#U<=0||(this.#Ne(),this.#Me(this.#U-1))}focusNextItem(){this.#De(1)}focusParentItem(){if(this.#c==null)return;let e=Nh(this.#c);if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t)}focusPath(e){let t=this.#B.getPathInfo(e)?.path??null;if(t==null)return;this.#Ne();let n=this.#Y(t);n>=0&&this.#Me(n)}focusNearestPath(e){let t=this.resolveNearestVisiblePath(e);if(t==null)return null;let n=this.#Y(t);return n>=0?(this.#Me(n),this.#ve()[n]??t):null}focusPreviousItem(){this.#De(-1)}getFocusedIndex(){return this.#s}getFocusedItem(){return this.#c==null?null:this.#X(this.#c)}getFocusedPath(){return this.#c}resolveNearestVisiblePath(e){let t=this.#ve();if(this.#U===0)return null;if(e==null)return this.#c??t[0]??null;let n=this.#B.getPathInfo(e)?.path??e,r=this.#Y(n);return r>=0?t[r]??n:this.#J(n)??this.#c??t[0]??null}getSelectedPaths(){return[...this.#R]}getSelectionVersion(){return this.#z}getVisibleCount(){return this.#U}getVisibleRows(e,t){if(t<e||this.#U===0)return[];let n=Math.max(0,e),r=Math.min(this.#U-1,t);if(r<n)return[];let i=r-n+1;if(this.#F==null&&!this.#l&&r>=this.#b.length&&i<=Ah){let e=[];for(let t=n;t<=r;t+=1){let n=this.#B.getVisibleRowContext(t);if(n==null)break;e.push(this.#Q(n))}return e}if(!this.#l&&r>=this.#b.length&&this.#Ne(),this.#F!=null){let e=Array.from({length:r-n+1},(e,t)=>this.#ye(n+t)),t=new Map,i=e[0]??-1,a=i;for(let n=1;n<=e.length;n+=1){let r=e[n];if(r!=null&&r===a+1){a=r;continue}if(i>=0&&this.#B.getVisibleSlice(i,a).forEach((e,n)=>{t.set(i+n,e)}),r==null){i=-1,a=-1;continue}i=r,a=r}return Array.from({length:r-n+1},(e,r)=>{let i=n+r,a=this.#ye(i),o=t.get(a),s=this.#b[a];if(o==null||s==null)throw Error(`Missing projection row for filtered visible index ${String(i)}`);return this.#Z(o,i,a,{ancestorPaths:this.#te(a),path:s})})}return this.#B.getVisibleSlice(n,r).map((e,t)=>{let r=n+t,i=this.#b[r];if(i==null)throw Error(`Missing projection path for visible index ${String(r)}`);return this.#Z(e,r,r,{ancestorPaths:this.#te(r),path:i})})}getStickyRowCandidates(e,t){if(this.#F!=null)return null;if(this.#U===0||e<=0||t<=0)return[];let n=[];for(let r=0;r<this.#U;r+=1){let i=e+r*t,a=Math.min(this.#U-1,Math.floor(i/t)),o=this.#$(a,r)??(a>0?this.#$(a-1,r):void 0);if(o==null)break;n.push({row:this.#Q(o),subtreeEndIndex:o.subtreeEndIndex})}return n}getItem(e){let t=this.#B.getPathInfo(e);return t==null?null:this.#X(t.path,t)}selectAllVisiblePaths(){this.#Ne();let e=[...this.#ve()];this.#re(e,this.#c??this.#L)}selectOnlyPath(e){let t=this.#Ae(e);t!=null&&this.#re([t],t)}selectPath(e){let t=this.#Ae(e);t==null||this.#R.has(t)||this.#re([...this.#R,t])}deselectPath(e){let t=this.#Ae(e);t==null||!this.#R.has(t)||this.#re([...this.#R].filter(e=>e!==t))}toggleFocusedSelection(){this.#c!=null&&this.togglePathSelectionFromInput(this.#c)}togglePathSelection(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.deselectPath(t);return}this.selectPath(t)}}togglePathSelectionFromInput(e){let t=this.#Ae(e);if(t!=null){if(this.#R.has(t)){this.#re([...this.#R].filter(e=>e!==t),t);return}this.#re([...this.#R,t],t)}}selectPathRange(e,t){let n=this.#Ae(e);if(n==null)return;this.#Ne();let r=this.#L,i=r==null?-1:this.#be(r),a=this.#be(n);if(i===-1||a===-1){let e=t?[...this.#R,n]:[n];this.#re(e,n);return}let[o,s]=i<=a?[i,a]:[a,i],c=this.#ve().slice(o,s+1),l=t?[...this.#R,...c]:c;this.#re(l,r)}extendSelectionFromFocused(e){if(this.#c==null)return;let t=this.#s;if(t===-1)return;let n=Math.min(this.#U-1,Math.max(0,t+e));if(n===t)return;!this.#l&&n>=this.#b.length&&this.#Ne();let r=this.#ve(),i=r[t]??null,a=r[n]??null;if(i==null||a==null)return;let o=new Set(this.#R);o.has(i)&&o.has(a)?o.delete(i):o.add(a),this.#re([...o],this.#L??i,!1),this.#Me(n)}getDragAndDropConfig(){return this.#r}isDragAndDropEnabled(){return this.#r!=null}getDragSession(){return this.#i==null?null:{draggedPaths:[...this.#i.draggedPaths],primaryPath:this.#i.primaryPath,target:this.#i.target==null?null:{...this.#i.target}}}startDrag(e){if(this.#r==null)return!1;let t=this.#Ae(e);if(t==null||this.#M!=null&&this.#M.length>0)return!1;let n=this.getSelectedPaths(),r=xh(t,n);return this.#r.canDrag?.(r)===!1?!1:(n.includes(t)||this.#re([t],t,!1),this.#je(t),this.#i={draggedPaths:r,primaryPath:t,target:null},this.#we(),!0)}setDragTarget(e){let t=this.#i;if(t==null)return;let n=e;if(n!=null){let e=Ch(t.draggedPaths,n);(wh(t.draggedPaths,n)||this.#r?.canDrop?.(e)===!1)&&(n=null)}Sh(t.target,n)||(this.#i={...t,target:n},this.#we())}cancelDrag(){this.#i!=null&&(this.#i=null,this.#we())}completeDrag(){let e=this.#i;if(e==null)return!1;this.#i=null;let t=e.target==null?null:{...e.target};if(t==null)return this.#we(),!1;let n=Ch(e.draggedPaths,t);if(wh(e.draggedPaths,t)||this.#r?.canDrop?.(n)===!1)return this.#we(),!1;let r=Eh(e.draggedPaths,t);if(r==null)return this.#we(),!1;try{if(r.operations.length===1){let e=r.operations[0];if(e==null||e.type!==`move`)throw Error(`Expected a single move operation for one-item drops`);this.#B.move(e.from,e.to,{collision:e.collision})}else this.#oe(r.operations),this.#B.batch(r.operations)}catch(e){return this.#we(),this.#r?.onDropError?.(e instanceof Error?e.message:String(e),n),!1}return this.#r?.onDropComplete?.(r.result),!0}subscribe(e){return this.#t.add(e),e(),()=>{this.#t.delete(e)}}add(e){this.#B.add(e)}remove(e,t={}){this.#B.remove(e,t)}move(e,t,n={}){this.#B.move(e,t,n)}batch(e){this.#B.batch(e)}onMutation(e,t){let n=e,r=t,i=this.#n.get(n);return i??(i=new Set,this.#n.set(n,i)),i.add(r),()=>{let e=this.#n.get(n);e?.delete(r),e?.size===0&&this.#n.delete(n)}}setSearch(e){this.#Se(e,!0)}openSearch(e=``){this.#Se(e,!0)}closeSearch(){this.#Se(null,!0)}isSearchOpen(){return this.#M!==null}getSearchValue(){return this.#M??``}getSearchMatchingPaths(){return this.#k}focusNextSearchMatch(){this.#xe(1)}focusPreviousSearchMatch(){this.#xe(-1)}startRenaming(e=this.#c??``,t={}){if(!this.#w)return!1;let n=this.#B.getPathInfo(e);if(n==null)return!1;let r=n.path,i=Lh(r),a=zh(r);if(this.#C?.({isFolder:i,path:a})===!1)return!1;for(let e of Mh(r))this.#B.isExpanded(e)||this.#B.expand(e);return this.#re([r],r,!1),this.#M!=null&&(this.#Se(null,!1),this.#y?.(this.#M)),this.#je(r),this.#T=r,this.#E=Rh(r),this.#D=t.removeIfCanceled??!1,this.#we(),!0}[Dh](){return{cancel:()=>{this.#G()},commit:()=>{this.#K()},getPath:()=>this.#T,getValue:()=>this.#E,isActive:()=>this.#T!=null,setValue:e=>{this.#q(e)}}}#G(){if(this.#T==null)return;let e=this.#T,t=this.#D;if(this.#T=null,this.#E=``,this.#D=!1,t){this.remove(e,Lh(e)?{recursive:!0}:void 0);return}this.#je(e),this.#we()}#K(){let e=this.#T;if(e==null)return;if(this.#D&&this.#E.trim().length===0){this.#T=null,this.#E=``,this.#D=!1,this.remove(e,Lh(e)?{recursive:!0}:void 0);return}let t=Lh(e),n=_h({files:this.#B.list(),isFolder:t,nextBasename:this.#E,path:zh(e)});if(this.#T=null,this.#E=``,this.#D=!1,`error`in n){this.#je(e),this.#v?.(n.error),this.#we();return}if(n.sourcePath===n.destinationPath){this.#je(e),this.#we();return}this.#_?.({destinationPath:n.destinationPath,isFolder:n.isFolder,sourcePath:n.sourcePath}),this.move(Bh(n.sourcePath,t),Bh(n.destinationPath,t))}#q(e){this.#T==null||this.#E===e||(this.#E=e,this.#we())}resetPaths(e,t={}){let n=this.#B.list().length,r=this.#U,i=Kh({paths:e,preparedInput:t.preparedInput},`resetPaths`,this.#e.sort),a=this.#se(i.paths,i.preparedInput,t.initialExpandedPaths),o=this.#c,s=this.#T,c=this.getSelectedPaths(),l=this.#L;this.#W?.(),this.#B=a,this.#d.clear(),this.#pe();let u=c.map(e=>a.getPathInfo(e)?.path??null).filter(e=>e!=null),d=!jh(this.#R,u);this.#R=new Set(u),d&&(this.#z+=1),this.#L=l==null?null:a.getPathInfo(l)?.path??null,this.#T=s==null?null:a.getPathInfo(s)?.path??null,this.#T??(this.#E=``,this.#D=!1),this.#Oe(o,o!=null||u.length>0||this.#L!=null),this.#W=this.#Fe(),this.#we(),this.#Te({canonicalChanged:!0,operation:`reset`,pathCountAfter:i.paths.length,pathCountBefore:n,projectionChanged:!0,usedPreparedInput:t.preparedInput!=null,visibleCountDelta:this.#U-r})}#J(e){this.#Ne();let t=Nh(e),n=Ph(e,t),r=null,i=null;for(let e of this.#ve()){if(Nh(e)!==t)continue;let a=Ph(e,t);if(a<n){r=e;continue}if(a>n){i=e;break}}return r??i}#Y(e){let t=this.#be(e);if(t!==-1)return t;let n=Mh(e);for(let e=n.length-1;e>=0;--e){let t=n[e];if(t==null)continue;let r=this.#be(t);if(r!==-1)return r}return this.#ve().length>0?0:-1}#X(e,t){let n=this.#d.get(e);if(n!=null)return n;let r=t??this.#B.getPathInfo(e);if(r==null)return null;let i=r.kind===`directory`?this.#ie(r.path):this.#ae(r.path);return this.#d.set(r.path,i),i}#Z(e,t,n,r){return{ancestorPaths:r.ancestorPaths,depth:e.depth,flattenedSegments:e.flattenedSegments?.map(e=>({isTerminal:e.isTerminal,name:e.name,path:e.path})),hasChildren:e.hasChildren,index:t,isExpanded:e.isExpanded,isFlattened:e.isFlattened,isFocused:r.path===this.#c,isSelected:this.#R.has(r.path),kind:e.kind,level:e.depth,name:e.name,path:r.path,posInSet:r.posInSet??this.#x[n]??0,setSize:r.setSize??this.#S[n]??0}}#Q(e){return this.#Z(e.row,e.index,e.index,{ancestorPaths:e.ancestorPaths,path:e.row.path,posInSet:e.posInSet,setSize:e.setSize})}#$(e,t){let n=this.#B.getVisibleRowContext(e);return n==null?void 0:n.ancestorRows[t]??(t===n.ancestorRows.length&&n.row.kind===`directory`&&n.row.isExpanded?n:void 0)}#ee(e){let t=this.#a.get(e);if(t!=null)return t;let n=this.#u(e),r=n<0?[]:[...this.#ee(n),n];return this.#a.set(e,r),r}#te(e){let t=this.#o.get(e);if(t!=null)return t;let n=this.#ee(e).map(e=>this.#b[e]??``).filter(e=>e!==``);return this.#o.set(e,n),n}#ne(e){this.#B.collapse(e)}#re(e,t=this.#L,n=!0){let r=[...new Set(e)],i=!jh(this.#R,r),a=this.#L!==t;!i&&!a||(this.#R=new Set(r),this.#L=t,i&&(this.#z+=1),n&&this.#we())}#ie(e){return{collapse:()=>{this.#ne(e)},deselect:()=>{this.deselectPath(e)},expand:()=>{this.#Ee(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!0,isExpanded:()=>this.#B.isExpanded(e),isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)},toggle:()=>{this.#Ie(e)}}}#ae(e){return{deselect:()=>{this.deselectPath(e)},focus:()=>{this.focusPath(e)},getPath:()=>e,isDirectory:()=>!1,isFocused:()=>this.#c===e,isSelected:()=>this.#R.has(e),select:()=>{this.selectPath(e)},toggleSelect:()=>{this.togglePathSelection(e)}}}#oe(e){let t=this.#B.list();this.#se(t).batch(e)}#se(e,t,n){return new fh({...this.#e,paths:e,preparedInput:t??void 0,...n===void 0?{}:{initialExpandedPaths:n}})}#ce(){return this.#h??=this.#B.list(),this.#h}#le(){if(this.#m!=null)return this.#m;let e=new Set;for(let t of this.#ce()){e.add(t);for(let n of Mh(t))e.add(n)}return this.#m=[...e].sort(),this.#m}#ue(){return this.#g??=this.#ce().map(Ih),this.#g}#de(){return this.#f??=this.#le().filter(e=>e.endsWith(`/`)),this.#f}#fe(){return this.#p??=this.#de().map(Ih),this.#p}#pe(){this.#f=null,this.#p=null,this.#m=null,this.#h=null,this.#g=null}#me(){return this.#de().filter(e=>this.#B.isExpanded(e))}#he(e){let t=new Set(this.#j??[]);if(e)for(let e of this.#R)for(let n of Mh(e))t.add(n);this.#ge(t)}#ge(e){this.#H=!0;try{for(let t of this.#de()){let n=e.has(t),r=this.#B.isExpanded(t);n&&!r?this.#B.expand(t):!n&&r&&this.#B.collapse(t)}}finally{this.#H=!1}}#_e(){let e=this.#b;if(this.#k=e.filter(e=>this.#O.has(e)),this.#M==null||this.#M.length===0||this.#A!==`hide-non-matches`||this.#O.size===0){this.#F=null,this.#I=null,this.#P=null,this.#U=this.#V;return}let t=[],n=[],r=new Map;for(let[i,a]of e.entries())this.#N?.has(a)===!0&&(r.set(a,n.length),t.push(i),n.push(a));this.#F=t,this.#I=n,this.#P=r,this.#U=n.length}#ve(){return this.#I??this.#b}#ye(e){return this.#F?.[e]??e}#be(e){return this.#P?.get(e)??this.#B.getVisibleIndex(e)??-1}#xe(e){let t=this.#k;if(t.length===0)return;let n=this.#c,r=n==null?-1:t.indexOf(n),i=t[r<0?e>0?0:t.length-1:Math.min(t.length-1,Math.max(0,r+e))];i!=null&&this.focusPath(i)}#Se(e,t){let n=e==null?null:Fh(e),r=this.#M;if(r!==n){if(r==null&&n!=null&&(this.#j=this.#me()),this.#M=n,n==null)this.#he(!0),this.#j=null,this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else if(n.length===0)this.#he(!1),this.#O.clear(),this.#N=null,this.#Oe(this.#c,!0);else{let e=this.#Ce();this.#Oe(e,!0)}t&&(this.#y?.(this.#M),this.#we())}}#Ce(){if(this.#M==null||this.#M.length===0)return this.#O.clear(),this.#c;let e=this.#M,t=this.#ce(),n=this.#ue(),r=[],i=new Set,a=null;for(let o=0;o<t.length;o+=1){if(!n[o].includes(e))continue;let s=t[o];r.push(s),i.add(s),a??=s}let o=this.#de(),s=this.#fe();for(let t=0;t<o.length;t+=1){if(!s[t].includes(e))continue;let n=o[t];i.has(n)||(r.push(n),i.add(n),a??=n)}this.#O=i;let c=this.#A===`hide-non-matches`&&r.length>0?new Set:null;this.#N=c;let l=this.#A===`expand-matches`?new Set(this.#j??[]):new Set;for(let e of r){c?.add(e),e.endsWith(`/`)&&l.add(e);for(let t of Mh(e))l.add(t),c?.add(t)}return this.#ge(l),a??this.#c}#we(){for(let e of this.#t)e()}#Te(e){this.#n.get(e.operation)?.forEach(t=>{t(e)}),this.#n.get(`*`)?.forEach(t=>{t(e)})}#Ee(e){for(let t of Mh(e))this.#B.isExpanded(t)||this.#B.expand(t);this.#B.isExpanded(e)||this.#B.expand(e)}#De(e){let t=this.#U;if(t===0)return;let n=this.#s===-1?0:this.#s,r=Math.min(t-1,Math.max(0,n+e));(r!==n||this.#s===-1)&&(!this.#l&&this.#F==null&&r>=this.#b.length&&this.#Ne(),this.#Me(r))}#Oe(e,t=!0){let n=this.#B.getVisibleCount();this.#V=n;let r=Zh(this.#B.getVisibleTreeProjectionData(t?void 0:Math.min(n,kh)),e,t?e=>this.#B.getVisibleIndex(e):void 0);this.#a.clear(),this.#o.clear(),this.#l=r.paths.length>=n,this.#u=r.getParentIndex,this.#b=r.paths,this.#x=r.posInSetByIndex,this.#S=r.setSizeByIndex,this.#_e(),this.#s=e==null?this.#ve().length>0?0:-1:this.#Y(e),this.#c=this.#s<0?null:this.#ke(this.#s)}#ke(e){return this.#ve()[e]??(this.#F==null?this.#B.getVisibleRowContext(e)?.row.path??null:null)}#Ae(e){return this.#B.getPathInfo(e)?.path??null}#je(e){if(e==null)return;let t=this.#Y(e);t>=0&&this.#Me(t,!1)}#Me(e,t=!0){let n=this.#ke(e);n!=null&&(this.#s===e&&this.#c===n||(this.#s=e,this.#c=n,t&&this.#we()))}#Ne(){this.#l||this.#Oe(this.#c,!0)}#Pe(e){let t=Uh(this.#T,e);t==null&&this.#T!=null&&(this.#E=``),this.#T=t;let n=Uh(this.#c,e,!0),r=[...this.#R].map(t=>Uh(t,e)).filter(e=>e!=null).map(e=>this.#B.getPathInfo(e)?.path??null).filter(e=>e!=null),i=Uh(this.#L,e),a=i==null?null:this.#B.getPathInfo(i)?.path??null,o=[...new Set(r)];return jh(this.#R,o)||(this.#R=new Set(o),this.#z+=1),this.#L=a,n}#Fe(){return this.#B.on(`*`,e=>{if(this.#H)return;e.canonicalChanged&&(this.#d.clear(),this.#pe()),this.#i!=null&&Oh(e)&&(this.#i=null);let t=Oh(e)?this.#Pe(e):this.#c,n=this.#M!=null&&this.#M.length>0?this.#Ce():this.#M===``?this.#c:t,r=this.#M!=null||e.operation!==`expand`&&e.operation!==`collapse`;this.#Oe(n,r),this.#we();let i=Yh(e);i!=null&&this.#Te(i)})}#Ie(e){if(this.#B.isExpanded(e)){this.#ne(e);return}this.#Ee(e)}},$h=e=>{if(e==null||e.length===0)return`0`;let t=`${e.length}`;for(let n of e)t+=`\0${n.path}\0${n.status}`;return t};function eg(e){let t=e.endsWith(`/`),n=``,r=-1;for(let t=0;t<=e.length;t+=1){if(!(e[t]===`/`||t===e.length)){r===-1&&(r=t);continue}r!==-1&&(n!==``&&(n+=`/`),n+=e.slice(r,t),r=-1)}return n===``?null:{isDirectory:t,path:n}}function tg(e){let t=e.endsWith(`/`)?e.slice(0,-1):e;if(t.length===0)return[];let n=t.split(`/`);return n.slice(0,-1).map((e,t)=>`${n.slice(0,t+1).join(`/`)}/`)}function ng(e,t){return t?`${e}/`:e}function rg(e,t=null){let n=$h(e==null?void 0:[...e]);if(n===`0`)return null;if(t?.signature===n)return t;let r=new Map,i=new Set,a=new Set;for(let t of e??[]){let e=eg(t.path);if(e==null)continue;let n=ng(e.path,e.isDirectory);r.set(n,t.status),t.status===`ignored`&&e.isDirectory?a.add(n):e.isDirectory&&a.delete(n);for(let t of tg(e.path))i.add(t)}return{directoriesWithChanges:i,ignoredDirectoryPaths:a,signature:n,statusByPath:r}}var ig=e=>e.trim().toLowerCase(),ag=e=>e.split(`/`).at(-1)??e,og=e=>{let t=e.toLowerCase().split(`.`),n=[];for(let e=1;e<t.length;e+=1)n.push(t.slice(e).join(`.`));return n};function sg(e,t){return typeof e==`string`?{name:e,remappedFrom:t}:{...e,remappedFrom:t}}function cg(e){let t=xd(e),n=t.remap,r=new Map;for(let[e,n]of Object.entries(t.byFileName??{}))r.set(e.toLowerCase(),n);let i=new Map;for(let[e,n]of Object.entries(t.byFileExtension??{}))i.set(ig(e),n);let a=Object.entries(t.byFileNameContains??{}).map(([e,t])=>[e.toLowerCase(),t]);return{resolveIcon:(e,o)=>{if(e===`file-tree-icon-file`&&o!=null){let n=ag(o),s=n.toLowerCase(),c=r.get(s);if(c!=null)return sg(c,e);for(let[t,n]of a)if(s.includes(t))return sg(n,e);let l=og(n);for(let t of l){let n=i.get(t);if(n!=null)return sg(n,e)}let u=yd(t.set,n,l);if(u!=null&&t.set!==`none`)return{name:_d(u),remappedFrom:e,token:u}}let s=n?.[e];return s==null?{name:e}:sg(s,e)}}}var lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg={},bg=[],xg=Array.isArray,Sg=bg.slice,Cg=Object.assign;function wg(e){e&&e.parentNode&&e.remove()}function Tg(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`&&typeof e!=`function`?i=t[a]:o[a]=t[a];return arguments.length>2&&(o.children=arguments.length>3?Sg.call(arguments,2):n),Eg(e,o,r,i,null)}function Eg(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++ug,__i:-1,__u:0};return i==null&&lg.vnode!=null&&lg.vnode(a),a}function Dg(e){return e.children}function Og(e,t){this.props=e,this.context=t,this.__g=0}function kg(e,t){if(t==null)return e.__?kg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?kg(e):null}function Ag(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return Ag(e)}}function jg(e){(8&e.__g||!(e.__g|=8)||!dg.push(e)||pg++)&&fg==lg.debounceRendering||((fg=lg.debounceRendering)||queueMicrotask)(Mg)}function Mg(){for(var e,t,n,r,i,a,o,s,c=1;dg.length;)dg.length>c&&dg.sort(mg),e=dg.shift(),c=dg.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=Cg({},r)).__v=r.__v+1,lg.vnode&&lg.vnode(n),Bg(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??kg(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,Hg(a,n,o),n.__e!=i&&Ag(n)));pg=0}function Ng(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,m,h,g,_,v,y=r&&r.__k||bg,b=t.length;for(c=Pg(n,t,y,c,b),f=0;f<b;f++)(m=n.__k[f])!=null&&(p=m.__i==-1?yg:y[m.__i]||yg,m.__i=f,_=Bg(e,m,p,i,a,o,s,c,l,u,d),h=m.__e,m.ref&&p.ref!=m.ref&&(p.ref&&Gg(p.ref,null,m),u.push(m.ref,m.__c||h,m)),g==null&&h!=null&&(g=h),(v=!!(4&m.__u))||p.__k===m.__k?c=Fg(m,c,e,v):typeof m.type==`function`&&_!==void 0?c=_:h&&(c=h.nextSibling),m.__u&=-7);return n.__e=g,c}function Pg(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(c=a+f,(o=e.__k[a]=typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?Eg(null,o,null,null,null):xg(o)?Eg(Dg,{children:o},null,null,null):o.constructor==null&&o.__b>0?Eg(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,s=null,(l=o.__i=Ig(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=kg(s)),Kg(s,s));return r}function Fg(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=Fg(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=kg(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ig(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function Lg(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function Rg(e,t,n,r,i){var a;n:if(t==`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Lg(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||Lg(e.style,t,n[t])}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(hg,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=gg,e.addEventListener(t,a?vg:_g,a)):e.removeEventListener(t,a?vg:_g,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function zg(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=gg++;else if(t.u<n.l)return;return n(lg.event?lg.event(t):t)}}}function Bg(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=t.type;if(t.constructor!=null)return null;128&n.__u&&(c=!!(32&n.__u),n.__c.__z&&(s=t.__e=n.__e=(a=n.__c.__z)[0],n.__c.__z=null)),(d=lg.__b)&&d(t);n:if(typeof M==`function`)try{if(v=t.props,y=`prototype`in M&&M.prototype.render,b=(d=M.contextType)&&r[d.__c],x=d?b?b.props.value:d.__:r,n.__c?2&(f=t.__c=n.__c).__g&&(f.__g|=1,_=!0):(y?t.__c=f=new M(v,x):(t.__c=f=new Og(v,x),f.constructor=M,f.render=qg),b&&b.sub(f),f.props=v,f.state||={},f.context=x,f.__n=r,p=!0,f.__g|=8,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&M.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Cg({},f.__s)),Cg(f.__s,M.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&M.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&M.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),!(4&f.__g)&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)||t.__v==n.__v){for(t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),S=0;S<f._sb.length;S++)f.__h.push(f._sb[S]);f._sb=[],f.__h.length&&o.push(f);break n}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__g&=-5,C=lg.__r,w=0,y){for(f.state=f.__s,f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[]}else do f.__g&=-9,C&&C(t),d=f.render(f.props,f.state,f.context),f.state=f.__s;while(8&f.__g&&++w<25);f.state=f.__s,f.getChildContext!=null&&(r=Cg({},r,f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),E=d,d!=null&&d.type===Dg&&d.key==null&&(E=Ug(d.props.children)),s=Ng(e,xg(E)?E:[E],t,n,r,i,a,o,s,c,l,u),t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__g&=-4)}catch(e){if(t.__v=null,c||a!=null)if(e.then){for(D=0,O=!1,t.__u|=c?160:128,t.__c.__z=[],k=0;k<a.length;k++)(A=a[k])==null||O||(A.nodeType==8&&A.data==`$s`?(D>0&&t.__c.__z.push(A),D++,a[k]=null):A.nodeType==8&&A.data==`/$s`?(--D>0&&t.__c.__z.push(A),O=D===0,s=a[k],a[k]=null):D>0&&(t.__c.__z.push(A),a[k]=null));if(!O){for(;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a[a.indexOf(s)]=null,t.__c.__z=[s]}t.__e=s}else{for(j=a.length;j--;)wg(a[j]);Vg(t)}else t.__e=n.__e,t.__k=n.__k,e.then||Vg(t);lg.__e(e,t,n)}else s=t.__e=Wg(n.__e,t,n,r,i,a,o,c,l,u);return(d=lg.diffed)&&d(t),128&t.__u?void 0:s}function Vg(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(Vg)}function Hg(e,t,n){for(var r=0;r<n.length;r++)Gg(n[r],n[++r],n[++r]);lg.__c&&lg.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){lg.__e(e,t.__v)}})}function Ug(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:xg(e)?e.map(Ug):Cg({},e)}function Wg(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v=n.props,y=t.props,b=t.type;if(b==`svg`?i=`http://www.w3.org/2000/svg`:b==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(u=0;u<a.length;u++)if((m=a[u])&&`setAttribute`in m==!!b&&(b?m.localName==b:m.nodeType==3)){e=m,a[u]=null;break}}if(e==null){if(b==null)return l.createTextNode(y);e=l.createElementNS(i,b,y.is&&y),s&&=(lg.__m&&lg.__m(t,a),!1),a=null}if(b==null)v===y||s&&e.data==y||(e.data=y);else{if(a&&=Sg.call(e.childNodes),v=n.props||yg,!s&&a!=null)for(v={},u=0;u<e.attributes.length;u++)v[(m=e.attributes[u]).name]=m.value;for(u in v)if(m=v[u],u!=`children`){if(u==`dangerouslySetInnerHTML`)f=m;else if(!(u in y)){if(u==`value`&&`defaultValue`in y||u==`checked`&&`defaultChecked`in y)continue;Rg(e,u,null,m,i)}}for(u in _=1&n.__u,y)m=y[u],u==`children`?p=m:u==`dangerouslySetInnerHTML`?d=m:u==`value`?h=m:u==`checked`?g=m:s&&typeof m!=`function`||v[u]===m&&!_||Rg(e,u,m,v[u],i);if(d)s||f&&(d.__html==f.__html||d.__html==e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(f&&(e.innerHTML=``),Ng(b==`template`?e.content:e,xg(p)?p:[p],t,n,r,b==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&kg(n,0),s,c,l),a!=null)for(u=a.length;u--;)wg(a[u]);s||(u=`value`,b==`progress`&&h==null?e.removeAttribute(`value`):h==null||h===e[u]&&(b!==`progress`||h)||Rg(e,u,h,v[u],i),u=`checked`,g!=null&&g!=e[u]&&Rg(e,u,g,v[u],i))}return e}function Gg(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){lg.__e(e,n)}}function Kg(e,t,n){var r,i;if(lg.unmount&&lg.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Gg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){lg.__e(e,t)}r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Kg(r[i],t,n||typeof e.type!=`function`);n||wg(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function qg(e,t,n){return this.constructor(e,n)}function Jg(e,t){var n,r,i,a;t==document&&(t=document.documentElement),lg.__&&lg.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=Tg(Dg,null,[e]),i=[],a=[],Bg(t,e,r||yg,yg,t.namespaceURI,r?null:t.firstChild?Sg.call(t.childNodes):null,i,r?r.__e:t.firstChild,n,a,t.ownerDocument),Hg(i,e,a)}function Yg(e,t){e.__u|=32,Jg(e,t)}lg={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw pg=0,e}},ug=0,Og.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Cg({},this.state);typeof e==`function`&&(e=e(Cg({},n),this.props)),e&&Cg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),jg(this))},Og.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),jg(this))},Og.prototype.render=Dg,dg=[],pg=0,mg=function(e,t){return e.__v.__b-t.__v.__b},hg=/(PointerCapture)$|Capture$/i,gg=0,_g=zg(!1),vg=zg(!0);var Xg=0;Array.isArray;function Q(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Xg,__i:-1,__u:0,__source:i,__self:a};return lg.vnode&&lg.vnode(l),l}var Zg=16,Qg=16,$g={};function e_({name:e,remappedFrom:t,token:n,width:r,height:i,viewBox:a,label:o,alignCapitals:s=!1}){"use no memo";let c=`#${e.replace(/^#/,``)}`,{width:l,height:u,viewBox:d}=$g[e]??{width:Zg,height:Qg},f=r??l,p=i??u,m=a??d??`0 0 ${l} ${u}`;return Q(`svg`,{"data-icon-name":t??e,"data-icon-token":n,"data-align-capitals":s,...o==null?{"aria-hidden":!0}:{"aria-label":o,role:`img`},viewBox:m,width:f,height:p,children:Q(`use`,{href:c})})}var t_=e=>{if(e.length<2)return[e,``];let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]},n_=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`.`)+1,n=e.length-t>10,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},r_=e=>{if(e.length<4)return[e,``];let t=e.lastIndexOf(`/`)+1,n=e.length-t>25,r=t>=1&&!n?t:Math.ceil(e.length/2);return[e.slice(0,r),e.slice(r)]},i_=(e,{splitIndex:t}={})=>{if(typeof t!=`number`){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}return[e.slice(0,t),e.slice(t)]},a_=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=e.length-t;return[e.slice(0,n),e.slice(n)]},o_=(e,{splitOffset:t}={})=>{if(typeof t!=`number`||t<=0||t>=e.length){let t=Math.ceil(e.length/2);return[e.slice(0,t),e.slice(t)]}let n=t;return[e.slice(0,n),e.slice(n)]};function s_({children:e,marker:t,variant:n=`default`}){"use no memo";return Q(`div`,{"aria-hidden":!0,"data-truncate-marker-cell":!0,children:Q(`div`,{"data-truncate-marker":!0,children:typeof t==`function`?t({children:e}):n===`fade`?Q(`span`,{"data-truncate-fade":!0}):t})})}function c_(e){"use no memo";let{mode:t,children:n}=e;return Q(`div`,{children:[Q(`div`,{"data-truncate-content":`visible`,children:t===`fruncate`?Q(`span`,{children:n}):n}),Q(`div`,{"data-truncate-content":`overflow`,"aria-hidden":!0,children:t===`fruncate`?Q(`span`,{children:n}):n})]})}function l_({children:e,mode:t=`truncate`,marker:n=`…`,variant:r=`default`,...i}){"use no memo";let a=Q(c_,{mode:t,children:e},`content`),o=Q(s_,{marker:n,mode:t,variant:r},`marker`),s=Q(`div`,{"data-truncate-fill":!0},`fill`);return Q(`div`,{"data-truncate-container":t,"data-truncate-variant":r,...i,children:Q(`div`,{"data-truncate-grid":!0,children:t===`truncate`?[a,o]:[o,a,s]})})}function u_({children:e,...t}){"use no memo";return Q(l_,{mode:`truncate`,...t,children:e})}function d_({children:e,...t}){"use no memo";return Q(l_,{mode:`fruncate`,...t,children:e})}function f_({children:e,contents:t,priority:n=`end`,split:r=`center`,minimumLength:i=12,className:a,style:o,...s}){"use no memo";let c=null,l=null;if(Array.isArray(t)){if(t.length!==2)return console.error(`MiddleTruncate: contents must be an array of two items`),null;c=Q(u_,{...s,children:t[0]}),l=Q(d_,{...s,children:t[1]})}else{if(typeof e!=`string`)return console.error(`MiddleTruncate: children must be a string`),null;if(e.length===0)return Q(`div`,{className:a,style:o});if(e.length<i)return Q(n===`end`?d_:u_,{...s,className:a,style:o,children:e});let t=null,u=null,d=null;if(typeof r==`string`)r===`center`?t=t_:r===`extension`?t=n_:r===`leaf-path`&&(t=r_);else if(typeof r==`number`)t=i_,u=r;else if(Array.isArray(r)){let[e,n]=r;d=n,e===`last`?t=a_:e===`first`&&(t=o_)}else typeof r==`function`&&(t=r);t??=t_;let[f,p]=t(e,{priority:n,variant:s.variant,splitIndex:typeof u==`number`?u:void 0,splitOffset:typeof d==`number`?d:void 0}),m=f.length>=p.length,h=n===`equal`&&!m,g=n===`equal`&&m,_={},v={};h&&(_.marker=``),g&&(v.marker=``),c=Q(u_,{...s,..._,children:f}),l=Q(d_,{...s,...v,children:p})}return Q(`div`,{"data-truncate-group-container":`middle`,className:a,style:o,children:[Q(`div`,{"data-truncate-segment-priority":n===`start`||n===`equal`?`1`:`2`,children:c}),Q(`div`,{"data-truncate-segment-priority":n===`end`||n===`equal`?`1`:`2`,children:l})]})}var p_={endIndex:-1,startIndex:-1};function m_(e,t,n){return Math.min(Math.max(e,t),n)}function h_(e,t){return e<0||t<e?p_:{endIndex:t,startIndex:e}}function g_(e){return e.startIndex<0||e.endIndex<e.startIndex}function __(e,t){return g_(e)?0:(e.endIndex-e.startIndex+1)*t}function v_(e,t,n){if(t<=0)return-1;let r=t*n;return e<=0?0:e>=r?t:Math.floor(e/n)}function y_(e,t,n){return t<=0||e<=0?-1:e>=t*n?t-1:Math.ceil(e/n)-1}function b_(e){let t=new Map;return e.forEach((e,n)=>{if(e.kind!==`directory`||!e.isExpanded)return;let r=e.ancestorPaths.length,i=t.get(r);if(i==null){t.set(r,[n]);return}i.push(n)}),t}function x_(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=Math.floor((n+r)/2),o=e[a];if(o==null)break;if(o<=t){i=a,n=a+1;continue}r=a-1}return i}function S_(e){let t=new Map,n=[];for(let r=0;r<e.length;r+=1){let i=e[r];if(i==null)continue;let a=i.kind===`directory`&&i.isExpanded?[...i.ancestorPaths,i.path]:i.ancestorPaths,o=0;for(;o<n.length&&o<a.length&&n[o]===a[o];)o+=1;for(let e=n.length-1;e>=o;--e){let i=n[e];i!=null&&t.set(i,r-1)}n.length=o;for(let e=o;e<a.length;e+=1){let t=a[e];t!=null&&n.push(t)}}let r=e.length-1;for(let e of n)t.set(e,r);return t}function C_(e,t,n){if(e.length===0||t<=0)return[];let r=S_(e),i=b_(e),a=[];for(let r=0;r<e.length;r+=1){let o=i.get(r);if(o==null||o.length===0)break;let s=t+r*n,c=x_(o,Math.min(e.length-1,Math.floor(s/n))),l=null;for(;c>=0;){let t=o[c],n=t==null?null:e[t]??null;if(n!=null&&(r===0||n.ancestorPaths[r-1]===a[r-1]?.path)){l=n;break}--c}if(l==null)break;a.push(l)}return a.map((i,a)=>{let o=a*n,s=(r.get(i.path)??e.length-1)+1;if(s>=e.length)return{row:i,top:o};let c=s*n-t;return{row:i,top:Math.min(o,c-n)}}).filter(e=>e.top+n>0)}function w_(e,t){let n=t.totalRowCount??e.length,r=n*t.itemHeight,i=Math.max(0,t.viewportHeight),a=Math.max(0,Math.floor(t.overscan)),o=Math.max(0,r-i),s=m_(t.scrollTop,0,o),c=t.stickyRows??C_(e,s,t.itemHeight),l=c.reduce((e,n)=>Math.max(e,n.top+t.itemHeight),0),u=Math.min(r,s+l),d=Math.max(0,i-l),f=Math.max(0,r-u),p=v_(s,n,t.itemHeight),m=v_(u,n,t.itemHeight),h=l<=0||p<0||p>=n?-1:p,g=h===-1?-1:Math.min(n-1,m-1),_=h===-1||g<h?0:g-h+1,v=d<=0||m>=n?p_:h_(m,y_(u+d,n,t.itemHeight)),y=g+1,b=g_(v)?p_:h_(Math.max(y,v.startIndex-a),Math.min(n-1,v.endIndex+a)),x=__(b,t.itemHeight);return{occlusion:{firstOccludedIndex:h,lastOccludedIndex:g,occludedCount:_},physical:{itemHeight:t.itemHeight,maxScrollTop:o,overscan:a,scrollTop:s,totalHeight:r,totalRowCount:n,viewportHeight:i},projected:{contentHeight:f,paneHeight:d,paneTop:u},sticky:{height:l,rows:c},visible:v,window:{endIndex:b.endIndex,height:x,offsetTop:g_(b)?0:b.startIndex*t.itemHeight,startIndex:b.startIndex}}}var T_={added:`A`,deleted:`D`,ignored:null,modified:`M`,renamed:`R`,untracked:`U`},E_={added:`Git status: added`,deleted:`Git status: deleted`,ignored:`Git status: ignored`,modified:`Git status: modified`,renamed:`Git status: renamed`,untracked:`Git status: untracked`},D_=`Contains git status items`;function O_(e){let{renamingPath:t,previousRenamingPath:n,hasRenderedInput:r}=e;return t==null?`reset`:r?n===t?`ignore`:`focus-input`:`reveal-canonical`}function k_(e){let{row:t,mode:n,targetPath:r,ariaLabel:i,domId:a,isParked:o,itemHeight:s,features:c,state:l,extraStyle:u}=e,d=n===`sticky`,f=t.ancestorPaths.at(-1)??``,p={};return l.isFocusRinged&&(p[`data-item-focused`]=!0),t.isSelected&&(p[`data-item-selected`]=!0),l.isContextHovered&&(p[`data-item-context-hover`]=`true`),l.isDragTarget&&(p[`data-item-drag-target`]=!0),l.isDragging&&(p[`data-item-dragging`]=!0),l.effectiveGitStatus!=null&&(p[`data-item-git-status`]=l.effectiveGitStatus),l.containsGitChange&&(p[`data-item-contains-git-change`]=`true`),{"aria-expanded":!d&&t.kind===`directory`?t.isExpanded:void 0,"aria-haspopup":c.contextMenuEnabled?`menu`:void 0,"aria-label":i,"aria-level":d?void 0:t.level+1,"aria-posinset":d?void 0:t.posInSet+1,"aria-selected":d?void 0:t.isSelected?`true`:`false`,"aria-setsize":d?void 0:t.setSize,"data-file-tree-sticky-path":d?r:void 0,"data-file-tree-sticky-row":d?`true`:void 0,"data-item-context-menu-button-visibility":c.actionLaneEnabled?c.contextMenuButtonVisibility:void 0,"data-item-context-menu-trigger-mode":c.contextMenuEnabled?c.contextMenuTriggerMode:void 0,"data-item-has-context-menu-action-lane":c.actionLaneEnabled?`true`:void 0,"data-item-has-git-lane":c.gitLaneActive?`true`:void 0,"data-item-parent-path":f.length>0?f:void 0,"data-item-parked":o?`true`:void 0,"data-item-path":r,"data-item-type":t.kind===`directory`?`folder`:`file`,"data-type":`item`,id:d?void 0:a,role:d?void 0:`treeitem`,style:{minHeight:`${s}px`,...u},tabIndex:!d&&t.isFocused?0:-1,...p}}function A_(e){let{event:t,mode:n,isSearchOpen:r,isDirectory:i}=e,a=t.ctrlKey||t.metaKey,o=t.shiftKey||a,s=t.shiftKey?{additive:a,kind:`range`}:a?{kind:`toggle`}:{kind:`single`};return{closeSearch:r,revealCanonical:n===`sticky`,selection:s,toggleDirectory:!o&&i}}function j_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,topInset:i=0,viewportHeight:a}=e;if(n<0)return null;let o=Math.max(0,i),s=n*r,c=s+r;if(s<t+o){let e=Math.max(0,s-o);return e===t?null:e}if(c>t+a){let e=c-a;return e===t?null:e}return null}function M_(e){let{currentScrollTop:t,focusedIndex:n,itemHeight:r,targetViewportOffset:i,totalHeight:a,viewportHeight:o}=e;if(n<0)return null;let s=Math.max(0,i),c=n*r,l=c+r,u=t+s,d=t+o;if(c>=u&&l<=d)return null;let f=Math.max(0,a-o),p=Math.max(0,Math.min(c-s,f));return p===t?null:p}var N_,P_,F_,I_,L_=Object.is,R_=0,z_=[],B_=lg,V_=B_.__b,H_=B_.__r,U_=B_.diffed,W_=B_.__c,G_=B_.unmount,K_=B_.__;function q_(e,t){B_.__h&&B_.__h(P_,e,R_||t),R_=0;var n=P_.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({}),n.__[e]}function J_(e){return R_=1,Y_(ov,e)}function Y_(e,t,n){var r=q_(N_++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):ov(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);L_(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=P_,!P_.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,L_(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};P_.__f=!0;var a=P_.shouldComponentUpdate,o=P_.componentWillUpdate;P_.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},P_.shouldComponentUpdate=i}return r.__N||r.__}function X_(e,t){var n=q_(N_++,3);!B_.__s&&av(n.__H,t)&&(n.__=e,n.u=t,P_.__H.__h.push(n))}function Z_(e,t){var n=q_(N_++,4);!B_.__s&&av(n.__H,t)&&(n.__=e,n.u=t,P_.__h.push(n))}function $(e){return R_=5,Q_(function(){return{current:e}},[])}function Q_(e,t){var n=q_(N_++,7);return av(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function $_(e,t){return R_=8,Q_(function(){return e},t)}function ev(){for(var e;e=z_.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(rv),e.__H.__h.forEach(iv),e.__H.__h=[]}catch(t){e.__H.__h=[],B_.__e(t,e.__v)}}B_.__b=function(e){P_=null,V_&&V_(e)},B_.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),K_&&K_(e,t)},B_.__r=function(e){H_&&H_(e),N_=0;var t=(P_=e.__c).__H;t&&(F_===P_?(t.__h=[],P_.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(rv),t.__h.forEach(iv),t.__h=[],N_=0)),F_=P_},B_.diffed=function(e){U_&&U_(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(z_.push(t)!==1&&I_===B_.requestAnimationFrame||((I_=B_.requestAnimationFrame)||nv)(ev)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),F_=P_=null},B_.__c=function(e,t){t.some(function(e){try{e.__h.forEach(rv),e.__h=e.__h.filter(function(e){return!e.__||iv(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],B_.__e(n,e.__v)}}),W_&&W_(e,t)},B_.unmount=function(e){G_&&G_(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{rv(e)}catch(e){t=e}}),n.__H=void 0,t&&B_.__e(t,n.__v))};var tv=typeof requestAnimationFrame==`function`;function nv(e){var t,n=function(){clearTimeout(r),tv&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);tv&&(t=requestAnimationFrame(n))}function rv(e){var t=P_,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),P_=t}function iv(e){var t=P_;e.__c=e.__(),P_=t}function av(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!L_(t,e[n])})}function ov(e,t){return typeof t==`function`?t(e):t}function sv(e){if(e==null||!e.isConnected||e===document.body||e===document.documentElement)return!1;e.focus({preventScroll:!0});let t=e.getRootNode();return t instanceof ShadowRoot?t.activeElement===e:document.activeElement===e}function cv(e){let t=e.getRootNode();if(t instanceof ShadowRoot){let e=t.activeElement;return e instanceof HTMLElement?e:null}let n=document.activeElement;return n instanceof HTMLElement&&e.contains(n)?n:null}function lv({ariaLabel:e,isFlattened:t=!1,ref:n,value:r,onBlur:i,onInput:a}){return Q(`input`,{ref:n,"data-item-rename-input":!0,...t?{"data-item-flattened-rename-input":!0}:{},"aria-label":e,value:r,onBlur:i,onInput:a,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation()})}function uv(e,t=null,n=null){"use no memo";let r=e.flattenedSegments;return r==null||r.length===0?t??e.name:Q(`span`,{"data-item-flattened-subitems":!0,children:r.map((e,i)=>{let a=i===r.length-1;return Q(Dg,{children:[Q(`span`,{"data-item-flattened-subitem":e.path,"data-item-flattened-subitem-drag-target":n===e.path?`true`:void 0,children:a&&t!=null?t:Q(u_,{children:e.name})}),i<r.length-1?` / `:``]},e.path)})})}function dv(e){return e.isFlattened?e.flattenedSegments?.findLast(e=>e.isTerminal)?.path??e.path:e.path}function fv(e){let t=e.flattenedSegments;return t==null||t.length===0?e.name:t.map(e=>e.name).join(` / `)}function pv(e,t,n,r){return e.map((e,i)=>{let a=i*n,o=e.subtreeEndIndex+1;if(o>=r)return{row:e.row,top:a};let s=o*n-t;return{row:e.row,top:Math.min(a,s-n)}}).filter(e=>e.top+n>0)}function mv({controller:e,itemHeight:t,overscan:n,scrollTop:r,stickyFolders:i,viewportHeight:a}){let o=e.getVisibleCount(),s=i&&o>0?e.getStickyRowCandidates(r,t):[],c=s==null&&i&&o>0?e.getVisibleRows(0,o-1):[],l=w_(c,{itemHeight:t,overscan:n,scrollTop:r,stickyRows:s==null?void 0:pv(s,r,t,o),totalRowCount:o,viewportHeight:a}),u=i&&r<=0&&o>0?e.getStickyRowCandidates(1,t):[],d=u!=null&&r<=0?pv(u,1,t,o):i&&r<=0&&c.length>0?C_(c,1,t):l.sticky.rows;return{overlayHeight:d.reduce((e,n)=>Math.max(e,n.top+t),0),overlayRows:d,snapshot:l,visibleRows:c}}var hv=400,gv=10,_v=40,vv=18;function yv(e,t,n){let r=e,i=document.elementFromPoint?.bind(document)??null,a=r.elementFromPoint?.(t,n)??i?.(t,n)??null;return e instanceof ShadowRoot&&(a==null||!e.contains(a))?bv(e,t,n):a instanceof HTMLElement?a:null}function bv(e,t,n){let r=Array.from(e.querySelectorAll(`[data-type="item"], [data-item-flattened-subitem]`));for(let e=r.length-1;e>=0;e--){let i=r[e],a=i.getBoundingClientRect();if(t>=a.left&&t<=a.right&&n>=a.top&&n<=a.bottom)return i}return null}function xv(e){let t=e?.closest?.(`[data-type="item"]`);if(!(t instanceof HTMLElement))return null;let n=t.dataset.itemPath??null;if(n==null)return null;let r=e?.closest?.(`[data-item-flattened-subitem]`),i=r instanceof HTMLElement?r.getAttribute(`data-item-flattened-subitem`)??null:null;if(i!=null&&i.endsWith(`/`))return{directoryPath:i,flattenedSegmentPath:i,hoveredPath:n,kind:`directory`};if(t.dataset.itemType===`folder`)return{directoryPath:n,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`};let a=t.dataset.itemParentPath??null;return a==null||a.length===0?{directoryPath:null,flattenedSegmentPath:null,hoveredPath:n,kind:`root`}:{directoryPath:a,flattenedSegmentPath:null,hoveredPath:n,kind:`directory`}}function Sv(e){let t=e.cloneNode(!0);return t.removeAttribute(`id`),t.dataset.fileTreeDragPreview=`true`,t.setAttribute(`aria-hidden`,`true`),t.tabIndex=-1,Object.assign(t.style,{boxShadow:`0 4px 12px rgba(0, 0, 0, 0.15)`,left:`0px`,margin:`0`,pointerEvents:`none`,position:`fixed`,top:`0px`,willChange:`transform`,zIndex:`10000`}),t}function Cv(){return navigator.vendor!==`Apple Computer, Inc.`}function wv(e,t){let n=e-t.top;if(n<_v)return-Math.ceil((_v-Math.max(0,n))/_v*vv);let r=t.bottom-e;return r<_v?Math.ceil((_v-Math.max(0,r))/_v*vv):0}function Tv(e,t){if(e!=null){let t=T_[e];return t==null?null:{text:t,title:E_[e]}}return t?{icon:{name:`file-tree-icon-dot`,width:6,height:6},title:D_}:null}function Ev(e,t,n){if(t==null||t.size===0)return null;let r=[];for(let i=e.length-1;i>=0;--i){let a=e[i],o=n.get(a);if(o!=null){for(let e of r)n.set(e,o);return o?`ignored`:null}if(t.has(a)){n.set(a,!0);for(let e of r)n.set(e,!0);return`ignored`}r.push(a)}for(let e of r)n.set(e,!1);return null}function Dv(e){return e!=null&&`toggle`in e}function Ov(e){return e.code===`Space`||e.key===` `||e.key===`Spacebar`}function kv(e){return e.key.length===1&&/^[\p{L}\p{N}]$/u.test(e.key)&&!e.ctrlKey&&!e.metaKey&&!e.altKey}function Av(e,t){if(e==null)return t;let n=e.getBoundingClientRect().height;return n>0?n:e.clientHeight>0?e.clientHeight:t}function jv(e,t){return e!=null&&e>0?e:t}function Mv(e){let t=e.borderBoxSize,n=Array.isArray(t)?t[0]:t;return n!=null&&Number.isFinite(n.blockSize)&&n.blockSize>0?n.blockSize:e.contentRect.height>0?e.contentRect.height:null}function Nv(e,t,n,r,i=0){let a=j_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,topInset:i,viewportHeight:r});return a==null?!1:(e.scrollTop=a,!0)}function Pv(e,t,n,r,i,a){let o=M_({currentScrollTop:e.scrollTop,focusedIndex:t,itemHeight:n,targetViewportOffset:a,totalHeight:i,viewportHeight:r});return o==null?!1:(e.scrollTop=o,!0)}function Fv(e,t,n,r){return n.end<n.start?null:e<n.start?-t:e>n.end?r:null}function Iv(e){return e==null?``:`[data-item-section="spacing-item"][data-ancestor-path="${e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`)}"] { opacity: 1; }`}function Lv(e){return e.shiftKey&&e.key===`F10`||e.key===`ContextMenu`}function Rv(e,t){return t&&Lv(e)||(e.ctrlKey||e.metaKey)&&Ov(e)?!0:e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`||e.key===`ArrowUp`}var zv=new Set([`ArrowDown`,`ArrowLeft`,`ArrowRight`,`ArrowUp`,`End`,`Home`,`PageDown`,`PageUp`]);function Bv(e){for(let t of e.composedPath())if(t instanceof HTMLElement&&(t.dataset.fileTreeContextMenuRoot===`true`||t.dataset.type===`context-menu-anchor`||t.dataset.type===`context-menu-trigger`||t.getAttribute(`slot`)===`context-menu`))return!0;return!1}function Vv(e){return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width,x:e.x,y:e.y}}function Hv(e,t){return{bottom:t,height:0,left:e,right:e,top:t,width:0,x:e,y:t}}function Uv(e,t){if(e==null)return t.offsetTop;let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return n.top-r.top}function Wv(e,t,n){if(n==null){e.delete(t);return}e.set(t,n)}function Gv(e,t,n){if(e==null)return null;let r=t.get(e)??null;if(r!=null)return r;let i=n.get(e)??null;return i?.dataset.itemParked===`true`?null:i}function Kv(e){if(e==null)return[];let t=[];for(let n of e.querySelectorAll(`button[data-file-tree-sticky-row="true"]`)){if(!(n instanceof HTMLElement))continue;let e=n.dataset.fileTreeStickyPath;e!=null&&t.push(e)}return t}function qv(e,t){if(e==null||t==null)return null;for(let n of e.querySelectorAll(`button[data-item-focused="true"][data-item-parked="true"]`))if(n instanceof HTMLElement&&n.dataset.itemPath===t)return n;return null}function Jv(e,t,n,r,i,a,o){let s=Math.max(0,a-i),c=t?.getBoundingClientRect()??null,l=c==null||n==null?null:n.getBoundingClientRect().top-c.top,u=qv(e,r),d=c==null||u==null?null:u.getBoundingClientRect().top-c.top;return Math.max(0,Math.min(d??Math.max(l??0,s),Math.max(0,o-i)))}function Yv(e,t){return{kind:e.kind,name:fv(e),path:t}}function Xv(e){return e==null?void 0:`${e}__tree`}function Zv(e,t,n){if(e!=null)return`${e}__focused-item-${encodeURIComponent(t)}${n?`__parked`:``}`}function Qv(e){return e===`file-tree-icon-chevron`||e===`file-tree-icon-dot`||e===`file-tree-icon-file`||e===`file-tree-icon-lock`}function $v(e,t){if(e==null)return null;if(`text`in e)return Q(`span`,{title:e.title,children:e.text});let n=typeof e.icon==`string`?Qv(e.icon)?t(e.icon):{name:e.icon}:Qv(e.icon.name)?(()=>{let n=t(e.icon.name),{name:r,...i}=e.icon;return{...n,...i}})():e.icon;return Q(`span`,{title:e.title,children:Q(e_,{...n})})}function ey(e){e!=null&&sv(e.querySelector([`button:not([disabled])`,`[href]`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`].join(`, `))??e)}function ty(e,t,{actionLaneEnabled:n=!1,customDecoration:r=null,decorationLaneEnabled:i=!1,dragTargetFlattenedSegmentPath:a=null,gitDecoration:o=null,gitLaneActive:s=!1,renameInput:c=null,showDecorativeActionAffordance:l=!1}={}){let u=dv(e);return Q(Dg,{children:[e.depth>0?Q(`div`,{"data-item-section":`spacing`,children:Array.from({length:e.depth}).map((t,n)=>Q(`div`,{"data-item-section":`spacing-item`,"data-ancestor-path":e.ancestorPaths[n]},n))}):null,Q(`div`,{"data-item-section":`icon`,children:e.kind===`directory`?Q(e_,{...t(`file-tree-icon-chevron`)}):Q(e_,{...t(`file-tree-icon-file`,u)})}),Q(`div`,{"data-item-section":`content`,children:e.isFlattened?uv(e,c,a):c??Q(f_,{minimumLength:5,split:`extension`,children:e.name})}),i?Q(`div`,{"data-item-section":`decoration`,children:r==null?null:$v(r,t)}):null,s?Q(`div`,{"data-item-section":`git`,children:$v(o,t)}):null,n?Q(`div`,{"data-item-section":`action`,children:l?Q(`span`,{"aria-hidden":`true`,"data-item-action-affordance":`decorative`,children:Q(e_,{...t(`file-tree-icon-ellipsis`)})}):null}):null]})}function ny(e,t,n,r={}){let{controller:i,renameView:a,visualFocusPath:o,contextHoverPath:s,draggedPathSet:c,dragTarget:l,dragAndDropEnabled:u,shouldSuppressContextMenu:d,handleRowDragStart:f,handleRowDragEnd:p,handleRowTouchStart:m,instanceId:h,itemHeight:g,gitStatusByPath:_,ignoredGitDirectories:v,ignoredInheritanceCache:y,directoriesWithGitChanges:b,gitLaneActive:x,contextMenuEnabled:S,contextMenuTriggerMode:C,contextMenuButtonTriggerEnabled:w,contextMenuButtonVisibility:T,contextMenuRightClickEnabled:E,registerRenameInput:D,registerButton:O,resolveIcon:k,renderDecorationForRow:A,openContextMenuForRow:j,onRowClick:M,onKeyDown:N}=e,P=dv(t),{isParked:F=!1,mode:I=`flow`,style:L}=r,ee=I===`sticky`,te=_?.get(P)??null??Ev(t.ancestorPaths,v,y),R=t.kind===`directory`&&(b?.has(P)??!1),z=A(t,P),B=Tv(te,R),V=S&&w,ne=z!=null||x||V,re=V&&T===`always`,ie=a.getPath()===P,H=ie?a.getValue():``,ae=ee||!ie?null:Q(lv,{ref:D,ariaLabel:`Rename ${fv(t)}`,isFlattened:t.isFlattened,value:H,onBlur:()=>{a.commit()},onInput:e=>{a.setValue(e.currentTarget.value)}}),oe=ty(t,k,{actionLaneEnabled:V,customDecoration:z,decorationLaneEnabled:ne,dragTargetFlattenedSegmentPath:l?.flattenedSegmentPath??null,gitDecoration:B,gitLaneActive:x,renameInput:ae,showDecorativeActionAffordance:re}),se={...k_({ariaLabel:fv(t),domId:t.isFocused?Zv(h,P,F):void 0,extraStyle:L,features:{actionLaneEnabled:V,contextMenuButtonVisibility:V?T:null,contextMenuEnabled:S,contextMenuTriggerMode:S?C:null,gitLaneActive:x},isParked:F,itemHeight:g,mode:I,row:t,state:{containsGitChange:R,effectiveGitStatus:te,isContextHovered:s===P,isDragTarget:l?.kind===`directory`&&l.directoryPath===P,isDragging:c?.has(P)===!0,isFocusRinged:t.isFocused&&o===P},targetPath:P}),key:n,onContextMenu:S||u?e=>{if(d()){e.preventDefault();return}S&&(e.preventDefault(),E&&(i.focusPath(P),j(t,P,{anchorRect:Hv(e.clientX,e.clientY),source:`right-click`})))}:void 0,onFocus:ee?void 0:()=>{i.focusPath(P)},onKeyDown:ee?void 0:N,ref:e=>{O(P,e)}};return!ee&&ie?Q(`div`,{...se,children:oe}):Q(`button`,{...se,type:`button`,draggable:u&&!F,onDragEnd:u&&!F?p:void 0,onDragStart:u&&!F?e=>{f(e,t,P)}:void 0,onMouseDown:e=>{if(ee){e.preventDefault();return}i.isSearchOpen()&&e.preventDefault()},onTouchStart:u&&!F?e=>{m(e,t,P)}:void 0,onClick:e=>{M(e,t,P,I)},children:oe})}function ry(e,t,n){return t.end<t.start?[]:e.controller.getVisibleRows(t.start,t.end).filter(e=>!n.has(dv(e))).map((n,r)=>ny(e,n,t.start+r))}function iy({composition:e,controller:t,gitStatusByPath:n,ignoredGitDirectories:r,directoriesWithGitChanges:i,icons:a,instanceId:o,itemHeight:s=wd,overscan:c=10,renamingEnabled:l=!1,renderRowDecoration:u,searchBlurBehavior:d=`close`,searchEnabled:f=!1,searchFakeFocus:p=!1,slotHost:m,stickyFolders:h=!1,initialViewportHeight:g=420}){"use no memo";let _=$(null),v=$(null),y=$(!1),b=$(null),x=$(null),S=$(null),C=$(null),w=$(null),T=$(new Map),E=$(new Map),D=$(()=>{}),O=$(null),k=$(!1),A=$(null),j=$(null),M=$(!1),N=$(null),P=$(null),F=$(null),I=$(null),L=$(null),ee=$(null),te=$(null),R=$(null),z=$(!1),B=$(null),V=$(null),ne=$(null),re=$(null),ie=Q_(()=>new Map,[]),[,H]=J_(0),[ae,oe]=J_(null),[se,ce]=J_(null),[le,ue]=J_(null),[de,fe]=J_(null),[pe,me]=J_(0),[U,he]=J_(null),ge=$(U);ge.current=U;let _e=$(null),ve=$(null),ye=$(null),be=$(null),xe=$(null),Se=$(!1),Ce=()=>{ve.current=null,ye.current=null,be.current=null},we=(e,t)=>{ve.current=e,ye.current=null,be.current=t==null?null:{path:e,scrollTop:t}},Te=(e,t)=>{ve.current=null,ye.current={path:e,viewportOffset:t},be.current=null},Ee=$(d===`retain`&&t.isSearchOpen()),[De,Oe]=J_(p);X_(()=>{p||Oe(!1)},[p]);let W=$(!1),ke=$_(()=>{W.current=!0,Oe(e=>e&&!1)},[]),[Ae,je]=J_(()=>mv({controller:t,itemHeight:s,overscan:c,scrollTop:0,stickyFolders:h,viewportHeight:g})),[Me,Ne]=J_(!1);X_(()=>{Ne(!0)},[]);let Pe=e?.contextMenu?.enabled===!0||e?.contextMenu?.render!=null||e?.contextMenu?.onOpen!=null||e?.contextMenu?.onClose!=null,Fe=e?.contextMenu?.triggerMode??(Pe?`right-click`:`both`),Ie=Fe===`both`||Fe===`button`,Le=e?.contextMenu?.buttonVisibility??`when-needed`,Re=Fe===`both`||Fe===`right-click`;Z_(()=>{let e=S.current;if(e==null)return;let t=e=>{if(!(e instanceof CustomEvent))return;let t=e.detail?.path??null;xe.current=t,ce(t),fe(t==null?null:`pointer`)},n=e=>{e instanceof CustomEvent&&(Se.current=e.detail?.disabled===!0)};return e.addEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.addEventListener(`file-tree-debug-set-scroll-suppression`,n),()=>{e.removeEventListener(`file-tree-debug-set-context-menu-trigger`,t),e.removeEventListener(`file-tree-debug-set-scroll-suppression`,n)}},[]);let ze=$_((e,t)=>{Wv(T.current,e,t)},[]),Be=$_((e,t)=>{Wv(E.current,e,t)},[]),Ve=$_(e=>{x.current=e},[]),He=$_(e=>Gv(e,E.current,T.current),[]),Ue=n!=null||r!=null||i!=null,{resolveIcon:We}=Q_(()=>cg(a),[a]),Ge=t[Dh](),Ke=Ge.getPath(),qe=Ke!=null,Je=t.isSearchOpen(),Ye=t.getSearchValue(),G=t.getFocusedPath(),Xe=t.getFocusedIndex(),Ze=t.isDragAndDropEnabled(),Qe=t.getDragSession(),$e=Q_(()=>Qe==null?null:new Set(Qe.draggedPaths),[Qe]),et=Qe?.target??null,tt=Qe?.primaryPath??null,nt=Xv(o),{overlayHeight:rt,overlayRows:it,snapshot:at,visibleRows:ot}=Ae,st=at.physical.viewportHeight,ct=Q_(()=>({end:at.window.endIndex,start:at.window.startIndex}),[at.window.endIndex,at.window.startIndex]),lt=it,ut=at.sticky.rows,dt=at.physical.totalHeight,ft=at.sticky.height,pt=Q_(()=>new Set(ut.map(e=>dv(e.row))),[ut]),mt=Xe>=0&&Xe>=ct.start&&Xe<=ct.end,ht=$_((e,t)=>u?.({item:Yv(e,t),row:e})??null,[u]),gt=$_(e=>sv(e==null?null:T.current.get(e)??null)?!0:sv(S.current),[]),_t=$_(e=>{gt(t.focusNearestPath(e))},[t,gt]),vt=$(_t);vt.current=_t;let yt=$(!0),bt=$(()=>{}),xt=$_((t=!0)=>{let n=ge.current;n!=null&&(yt.current=yt.current&&t,he(null),e?.contextMenu?.onClose?.(),yt.current&&_t(n.path))},[e?.contextMenu,_t]);bt.current=xt;let St=$_(e=>{let t=e==null?null:Uv(S.current,e);ue(e=>e===t?e:t)},[]),Ct=$_((e,n,r)=>{let i=t.getItem(n);if(i==null)return;let a=He(n);if(a?.dataset.fileTreeStickyRow===`true`){let e=C.current;we(n,e?.scrollTop??null),k.current=!0,oe(e=>e===n?e:n)}i.focus(),St(a),yt.current=!0,he({anchorRect:r?.anchorRect??null,item:Yv(e,n),path:n,source:r?.source??`keyboard`})},[t,He,St]),wt=$_(e=>{if(l){if(t.isSearchOpen()){let e=C.current,t=Av(e,st);N.current=Xe<0||e==null?null:Math.max(0,Math.min(Xe*s-e.scrollTop,Math.max(0,t-s))),M.current=!0}t.startRenaming(e)!==!1&&(fe(`focus`),H(e=>e+1))}},[t,Xe,s,l,st]),Tt=$_((e,{restoreTreeFocus:n=!0,targetOffset:r=`live-overlay`}={})=>{let i=C.current;if(i==null)return!1;t.focusPath(e);let a=t.getFocusedIndex();if(a<0)return!1;let o=t.getVisibleRows(a,a)[0]??null;if(o==null)return!1;let l=Av(i,st),u=t.getVisibleCount()*s,d=r===`sticky-parents`?o.ancestorPaths.length*s:mv({controller:t,itemHeight:s,overscan:c,scrollTop:i.scrollTop,stickyFolders:h,viewportHeight:l}).snapshot.sticky.height;return k.current=!0,Pv(i,a,s,l,u,d),D.current(),_e.current=n?e:null,!0},[t,s,c,st,h]),Et=()=>y.current===!0||re.current!=null||z.current===!0,Dt=e=>typeof window.requestAnimationFrame==`function`?window.requestAnimationFrame(()=>{e()}):window.setTimeout(e,16),Ot=e=>{if(e!=null){if(typeof window.cancelAnimationFrame==`function`){window.cancelAnimationFrame(e);return}window.clearTimeout(e)}},kt=()=>{I.current!=null&&(clearTimeout(I.current),I.current=null),F.current=null},At=()=>{ee.current?.remove(),ee.current=null},jt=()=>{Ot(P.current),P.current=null,L.current=null},Mt=e=>{let t=S.current?.getRootNode();if(t instanceof ShadowRoot){t.append(e);return}document.body.append(e)},Nt=()=>{R.current?.(),R.current=null,re.current!=null&&(clearTimeout(re.current),re.current=null),z.current=!1,B.current=null,ne.current=null,V.current!=null&&(V.current.setAttribute(`draggable`,`true`),V.current.style.removeProperty(`touch-action`),V.current=null),At(),kt(),jt(),te.current=null},Pt=(e,n)=>{let r=S.current?.getRootNode(),i=xv(yv(r instanceof ShadowRoot?r:document,e,n));return t.setDragTarget(i),t.getDragSession()?.target??null},Ft=e=>{let n=t.getDragAndDropConfig()?.openOnDropDelay??800;if(e==null||e.kind!==`directory`||e.directoryPath==null||n<=0){kt();return}let r=t.getItem(e.directoryPath),i=Dv(r)?r:null;if(i==null||i.isExpanded()){kt();return}let a=`${e.directoryPath}::${e.flattenedSegmentPath??``}`;F.current!==a&&(kt(),F.current=a,I.current=setTimeout(()=>{let n=t.getDragSession()?.target;n?.kind!==`directory`||n.directoryPath!==e.directoryPath||n.flattenedSegmentPath!==e.flattenedSegmentPath||i.expand()},n))},It=()=>{P.current=null;let e=L.current,n=C.current;if(e==null||n==null||t.getDragSession()==null)return;let r=n.getBoundingClientRect(),i=wv(e.clientY,r);if(i===0)return;let a=Math.max(0,n.scrollHeight-n.clientHeight),o=Math.max(0,Math.min(a,n.scrollTop+i));o!==n.scrollTop&&(n.scrollTop=o,D.current()),Ft(Pt(e.clientX,e.clientY)),P.current=Dt(It)},Lt=(e,t)=>{L.current={clientX:e,clientY:t},P.current??=Dt(It)},Rt=(e,n,r)=>{let i=e.currentTarget;if(i!=null){if(Nt(),At(),kt(),jt(),t.startDrag(r)===!1){e.preventDefault();return}if(te.current=n,e.dataTransfer!=null&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.dropEffect=`move`,e.dataTransfer.setData(`text/plain`,r),Cv())){let t=Sv(i),n=i.getBoundingClientRect();Object.assign(t.style,{height:`${n.height}px`,opacity:`0.85`,transform:`translate3d(-9999px, 0px, 0)`,width:`${n.width}px`}),Mt(t),ee.current=t,e.dataTransfer.setDragImage(t,Math.max(0,e.clientX-n.left),Math.max(0,e.clientY-n.top))}}},zt=()=>{At(),kt(),jt(),te.current=null,t.cancelDrag()},Bt=(e,n,r)=>{if(re.current!=null||z.current)return;let i=e.touches[0],a=e.currentTarget;if(i==null||a==null)return;ne.current={clientX:i.clientX,clientY:i.clientY},V.current=a,a.setAttribute(`draggable`,`false`);let o=(e={})=>{let t=e.restoreNativeDraggable??!z.current;re.current!=null&&(clearTimeout(re.current),re.current=null),document.removeEventListener(`touchmove`,s),document.removeEventListener(`touchend`,c),document.removeEventListener(`touchcancel`,c),R.current===o&&(R.current=null),t&&(a.setAttribute(`draggable`,`true`),V.current===a&&(V.current=null),ne.current=null)},s=e=>{let t=e.touches[0],n=ne.current;if(t==null||n==null)return;let r=t.clientX-n.clientX,i=t.clientY-n.clientY;r*r+i*i<=gv*gv||o()},c=()=>{o()};document.addEventListener(`touchmove`,s,{passive:!0}),document.addEventListener(`touchend`,c),document.addEventListener(`touchcancel`,c),R.current=o,re.current=setTimeout(()=>{if(o({restoreNativeDraggable:!1}),t.startDrag(r)===!1){a.setAttribute(`draggable`,`true`),V.current===a&&(V.current=null),ne.current=null;return}z.current=!0,V.current=a,a.setAttribute(`draggable`,`false`),a.style.setProperty(`touch-action`,`none`),te.current=n;let e=a.getBoundingClientRect(),s=Sv(a);Object.assign(s.style,{height:`${e.height}px`,opacity:`0.85`,transform:`translate3d(${e.left}px, ${e.top}px, 0)`,width:`${e.width}px`}),Mt(s),ee.current=s,B.current={x:i.clientX-e.left,y:i.clientY-e.top};let c=e=>{let t=e.touches[0];if(t==null)return;e.preventDefault();let n=B.current;n!=null&&ee.current!=null&&(ee.current.style.transform=`translate3d(${t.clientX-n.x}px, ${t.clientY-n.y}px, 0)`),Ft(Pt(t.clientX,t.clientY)),Lt(t.clientX,t.clientY)},l=e=>{let n=e.changedTouches[0];n!=null&&Pt(n.clientX,n.clientY),t.completeDrag(),Nt()},u=()=>{t.cancelDrag(),Nt()};R.current=()=>{document.removeEventListener(`touchmove`,c),document.removeEventListener(`touchend`,l),document.removeEventListener(`touchcancel`,u)},document.addEventListener(`touchmove`,c,{passive:!1}),document.addEventListener(`touchend`,l),document.addEventListener(`touchcancel`,u)},hv)},Vt=e=>{if(U!=null){if(e.key===`Escape`){xt(),e.preventDefault(),e.stopPropagation();return}zv.has(e.key)&&(e.preventDefault(),e.stopPropagation());return}if(Ge.isActive()){if(e.key===`Escape`)Ge.cancel();else if(e.key===`Enter`)Ge.commit();else return;fe(`focus`),H(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(l&&e.key===`F2`){wt(G??void 0),e.preventDefault(),e.stopPropagation();return}if(Je){if(e.key===`Escape`)M.current=!1,N.current=null,t.closeSearch();else if(e.key===`Enter`){let e=t.getFocusedPath();e!=null&&t.selectOnlyPath(e);let n=C.current,r=Av(n,st);N.current=Xe<0||n==null?null:Math.max(0,Math.min(Xe*s-n.scrollTop,Math.max(0,r-s))),M.current=!0,t.closeSearch()}else if(e.key===`ArrowDown`)t.focusNextSearchMatch();else if(e.key===`ArrowUp`)t.focusPreviousSearchMatch();else return;fe(`focus`),H(e=>e+1),e.preventDefault(),e.stopPropagation();return}if(f&&kv(e)){t.openSearch(e.key),H(e=>e+1),e.preventDefault(),e.stopPropagation();return}let n=Pe&&Lv(e),r=Rv(e,Pe),i=r&&S.current!=null?cv(S.current):null,a=r?new Set(Kv(S.current)):new Set,o=i?.dataset.fileTreeStickyPath??null,c=i?.dataset.fileTreeStickyRow===`true`&&o!=null;if(c&&o!==G&&a.has(o)){let e=C.current;we(o,e?.scrollTop??null),t.focusPath(o)}let u=t.getFocusedPath(),d=t.getFocusedIndex(),p=t.getFocusedItem();if(p==null)return;let m=Dv(p)?p:null,h=u!=null&&(pt.has(u)||c&&o===u&&a.has(u)),g=e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`ArrowRight`&&m!=null&&m.isExpanded(),_=e.key===`ArrowLeft`&&h&&m!=null&&m.isExpanded(),v=C.current,y=!0;if(e.shiftKey&&e.key===`ArrowDown`)t.extendSelectionFromFocused(1);else if(e.shiftKey&&e.key===`ArrowUp`)t.extendSelectionFromFocused(-1);else if(n&&u!=null&&d>=0){let e=t.getVisibleRows(d,d)[0]??null,n=Gv(u,E.current,T.current);e==null||n==null?y=!1:Ct(e,u)}else if((e.ctrlKey||e.metaKey)&&Ov(e))t.toggleFocusedSelection();else if((e.ctrlKey||e.metaKey)&&e.key.toLowerCase()===`a`)t.selectAllVisiblePaths();else switch(e.key){case`ArrowDown`:t.focusNextItem();break;case`ArrowUp`:t.focusPreviousItem();break;case`ArrowRight`:m==null||m.isExpanded()?t.focusNextItem():m.expand();break;case`ArrowLeft`:m!=null&&m.isExpanded()?m.collapse():t.focusParentItem();break;case`Home`:t.focusFirstItem();break;case`End`:t.focusLastItem();break;default:y=!1}if(!y)return;fe(`focus`);let b=t.getFocusedPath(),x=b!=null&&(pt.has(b)||a.has(b)),w=g&&b!==u,D=n&&c&&o===u&&b===u;if((h||D)&&b!=null&&(w&&x||D))we(b,v?.scrollTop??null),k.current=!0,oe(e=>e===b?e:b);else{let t=e.key===`ArrowUp`&&h&&b!==u;b!=null&&(t||_&&b===u)?(Te(b,Jv(S.current,v,i,u,s,ft,st)),k.current=!0,oe(e=>e===b?e:b)):Ce()}H(e=>e+1),e.preventDefault(),e.stopPropagation()};Z_(()=>{if(!(!f||!Je)){if(Ee.current){Ee.current=!1;return}sv(w.current)}},[Je,f]),Z_(()=>{let e=x.current;switch(O_({hasRenderedInput:e!=null,previousRenamingPath:j.current,renamingPath:Ke})){case`reset`:j.current=null;return;case`reveal-canonical`:Ke!=null&&Tt(Ke,{restoreTreeFocus:!1,targetOffset:`live-overlay`});return;case`ignore`:return;case`focus-input`:e!=null&&(_e.current=null,j.current=Ke,sv(e),e.select());return}},[ct.end,ct.start,Ke,Tt,pt]),Z_(()=>{let e=S.current;if(e==null)return;let t=null,n=()=>{t!=null&&(clearTimeout(t),t=null)},r=()=>{let t=cv(e)?.dataset.itemPath??null;oe(e=>e===t?e:t)},i=()=>{n(),k.current=!0,r()},a=i=>{let a=i.relatedTarget;if(a==null){n(),t=setTimeout(()=>{if(t=null,cv(e)!=null){r();return}k.current=!1,oe(null)},0);return}if(!(a instanceof Node)||!e.contains(a)){n(),k.current=!1,oe(null);return}let o=a instanceof HTMLElement?a.dataset.itemPath??null:null;oe(e=>e===o?e:o)};return e.addEventListener(`focusin`,i),e.addEventListener(`focusout`,a),()=>{n(),e.removeEventListener(`focusin`,i),e.removeEventListener(`focusout`,a)}},[]),Z_(()=>{let e=S.current;e!=null&&(at.physical.scrollTop<=0?e.dataset.scrollAtTop=`true`:delete e.dataset.scrollAtTop)},[at.physical.scrollTop]),Z_(()=>{let e=null,n=C.current,r=b.current,i=S.current;if(n==null)return;O.current=Av(n,g);let a=()=>{let e=t.getVisibleCount(),r=jv(O.current,g),i=Math.max(0,e*s-r);n.scrollTop>i&&(n.scrollTop=i),je(mv({controller:t,itemHeight:s,overscan:c,scrollTop:Math.min(n.scrollTop,i),stickyFolders:h,viewportHeight:r}))};D.current=a;let o=!1,l=t.subscribe(()=>{o?H(e=>e+1):o=!0,a()}),u=()=>{Se.current!==!0&&(r!=null&&(r.dataset.isScrolling??=``),i!=null&&(i.dataset.isScrolling??=``),y.current=!0,e!=null&&clearTimeout(e),e=setTimeout(()=>{r!=null&&delete r.dataset.isScrolling,i!=null&&delete i.dataset.isScrolling,y.current=!1,me(e=>e+1),e=null},50))},d=null,f=()=>{i!=null&&delete i.dataset.overlayReveal,d!=null&&(clearTimeout(d),d=null)},p=()=>{i==null||Se.current===!0||n.scrollTop>0||(i.dataset.overlayReveal=`true`,d!=null&&clearTimeout(d),d=setTimeout(()=>{f()},200))},m=()=>{if(a(),n.scrollTop>0&&f(),ge.current!=null&&y.current&&bt.current(),Se.current===!0){y.current=!1;return}ce(e=>e==null?e:null),u()},_=()=>{u(),p()},v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`PageUp`,`PageDown`,`Home`,`End`,` `,`Spacebar`]),x=e=>{v.has(e.key)&&_()};n.addEventListener(`scroll`,m,{passive:!0}),n.addEventListener(`wheel`,_,{passive:!0}),n.addEventListener(`touchmove`,_,{passive:!0}),n.addEventListener(`keydown`,x);let w=typeof ResizeObserver<`u`?new ResizeObserver(e=>{O.current=(e[0]==null?null:Mv(e[0]))??Av(n,g),a()}):null;return w?.observe(n),()=>{D.current=()=>{},l(),n.removeEventListener(`scroll`,m),n.removeEventListener(`wheel`,_),n.removeEventListener(`touchmove`,_),n.removeEventListener(`keydown`,x),e!=null&&clearTimeout(e),d!=null&&clearTimeout(d),r!=null&&delete r.dataset.isScrolling,i!=null&&(delete i.dataset.isScrolling,delete i.dataset.overlayReveal),y.current=!1,O.current=null,w?.disconnect()}},[t,g,s,c,h]),Z_(()=>{Pe||U==null||xt(!1)},[xt,Pe,U]);let Ht=Q_(()=>U==null?null:`${U.path}::${U.source}`,[U]);Z_(()=>{if(Ht==null){m?.clearSlotContent(tu);return}let t=ge.current;if(t==null)return;let n=v.current??_.current;if(n==null)return;let r={anchorElement:n,anchorRect:t.anchorRect??Vv(n.getBoundingClientRect()),close:e=>{bt.current(e?.restoreFocus??!0)},restoreFocus:()=>{yt.current&&vt.current(ge.current?.path??null)}},i=e?.contextMenu?.render?.(t.item,r)??null;return m?.setSlotContent(tu,i),e?.contextMenu?.onOpen?.(t.item,r),ey(i),queueMicrotask(()=>{i==null||!i.isConnected||document.activeElement===i&&ey(i)}),()=>{m?.clearSlotContent(tu)}},[Ht,e?.contextMenu,m]),Z_(()=>{U!=null&&t.getItem(U.path)==null&&xt()},[xt,U,t]),Z_(()=>{if(U==null)return;let e=S.current?.getRootNode(),t=e instanceof ShadowRoot?e.host:S.current,n=e=>{let n=e.target;n instanceof Node&&(Bv(e)||_.current?.contains(n)!==!0&&t?.contains(n)!==!0&&xt())},r=e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),xt())};return document.addEventListener(`mousedown`,n,!0),document.addEventListener(`keydown`,r,!0),()=>{document.removeEventListener(`mousedown`,n,!0),document.removeEventListener(`keydown`,r,!0)}},[xt,U]),Z_(()=>{let e=C.current,t=S.current;if(e==null||t==null){A.current=G;return}let n=G==null?null:T.current.get(G)??null,r=cv(t),i=r?.dataset.itemPath??null,a=qe&&x.current===r,o=f&&w.current===r,c=M.current&&!Je,l=N.current??0,u=_e.current,d=ve.current,p=ye.current,m=be.current,h=r!=null,g=k.current||h,_=A.current!==G,v=d!=null&&d===G&&G!=null,y=c&&Pv(e,Xe,s,st,dt,l),b=u!=null&&u===G&&Pv(e,Xe,s,st,dt,ft),E=p!=null&&p.path===G&&Pv(e,Xe,s,st,dt,p.viewportOffset),O=m!=null&&m.path===G&&e.scrollTop!==m.scrollTop;if(O&&(e.scrollTop=m.scrollTop),(O||b||E||y||g&&_&&u!==G&&!v&&Nv(e,Xe,s,st,ft))&&D.current(),!g){A.current=G;return}if(a){A.current=G;return}if(o&&!c){A.current=G;return}if(n==null){c&&Xe>=0&&(Pv(e,Xe,s,st,dt,l),D.current()),A.current=G;return}(_||c||u===G||d===G||p?.path===G||m?.path===G||i==null||i!==G)&&(sv(n),u===G&&(_e.current=null),d===G&&(ve.current=null),p?.path===G&&(ye.current=null),m?.path===G&&(be.current=null),M.current=!1,N.current=null),A.current=G},[t,Xe,G,mt,s,qe,Je,ct,st,f,ft,dt,ot]);let Ut=Xe>=0&&Xe>=at.visible.startIndex&&Xe<=at.visible.endIndex,Wt=G!=null&&lt.some(e=>dv(e.row)===G),Gt=Ut||Wt,Kt=Ie&&k.current===!0&&Gt?G:null,qt=de===`pointer`?se:null,Jt=U?.path??xe.current??qt??Kt??se,Yt=U?.source===`right-click`;Z_(()=>{y.current&&U==null||St(He(Jt))},[U,He,ct,st,pe,lt,Jt,St,ot]);let Xt=$_(e=>{if(y.current||Bv(e))return;let t=e.target;if(!(t instanceof HTMLElement)||t.closest?.(`[data-type="context-menu-trigger"]`)!=null)return;let n=t.closest?.(`[data-file-tree-sticky-row="true"]`),r=t.closest?.(`[data-type="item"]`),i=n instanceof HTMLElement?n.dataset.fileTreeStickyPath??null:r instanceof HTMLElement?r.dataset.itemPath??null:null;i!=null&&fe(e=>e===`pointer`?e:`pointer`),ce(e=>e===i?e:i)},[]),Zt=$_(()=>{ce(null)},[]);Z_(()=>{if(!Ze)return;let e=()=>{Nt(),t.cancelDrag()};return window.addEventListener(`dragend`,e),()=>{window.removeEventListener(`dragend`,e),Nt(),t.cancelDrag()}},[t,Ze]);let Qt=e=>{if(!Ze||t.getDragSession()==null||z.current)return;let n=xv(e.target instanceof HTMLElement?e.target:null);t.setDragTarget(n),Ft(t.getDragSession()?.target??null),Lt(e.clientX,e.clientY),e.dataTransfer!=null&&(e.dataTransfer.dropEffect=`move`),e.preventDefault()},$t=e=>{if(!Ze||t.getDragSession()==null||z.current)return;let n=e.relatedTarget;n instanceof Node&&S.current?.contains(n)===!0||(kt(),jt(),t.setDragTarget(null))},en=e=>{!Ze||t.getDragSession()==null||z.current||(e.preventDefault(),Pt(e.clientX,e.clientY),t.completeDrag(),At(),kt(),jt(),te.current=null)},tn=at.window.height,nn=at.window.offsetTop,rn=Math.min(0,st-tn-ft),an=ae===G||M.current,on=G!=null&&an&&!mt&&Xe>=0?ot[Xe]??t.getVisibleRows(Xe,Xe)[0]??null:null,sn=on==null?null:Fv(Xe,s,ct,tn),cn=te.current,ln=tt!=null&&cn!=null&&cn.path===tt&&cn.index>=ct.start&&cn.index<=ct.end,un=tt!=null&&cn!=null&&cn.path===tt&&!ln&&cn.path!==on?.path?cn:null,dn=un==null?null:Fv(un.index,s,ct,tn),fn=Iv((Xe>=0?ot[Xe]??t.getVisibleRows(Xe,Xe)[0]??null:null)?.ancestorPaths.at(-1)??null),pn=Je&&G!=null?Zv(o,G,!mt):void 0,mn=U?.path??(Je?G:ae),hn=U?.path??se,gn=He(Jt),_n=Pe&&Ie&&!Yt&&!qe&&gn!=null&&le!=null&&Jt!=null,vn=Pe&&(_n||U!=null),yn=U?.anchorRect,bn=yn==null&&gn!=null&&le!=null&&(U!=null||_n)?le:null,xn=yn==null?bn==null?void 0:{top:`${bn}px`}:{left:`${yn.left}px`,position:`fixed`,right:`auto`,top:`${yn.top}px`},Sn=Yt?{opacity:`0`}:void 0,Cn=$_((e,n,r,i)=>{let a=t.getItem(r),o=A_({event:{ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey},isDirectory:n.kind===`directory`,isSearchOpen:t.isSearchOpen(),mode:i});switch(o.selection.kind){case`range`:t.selectPathRange(r,o.selection.additive);break;case`toggle`:t.togglePathSelectionFromInput(r);break;case`single`:t.selectOnlyPath(r);break}let s=e.currentTarget instanceof HTMLElement?e.currentTarget:null,c=n.index>=at.visible.startIndex&&n.index<=at.visible.endIndex,l=i===`flow`&&c&&s!=null&&s.dataset.itemParked!==`true`;a?.focus(),l&&(k.current=!0,oe(e=>e===r?e:r),fe(`focus`)),o.toggleDirectory&&Dv(a)&&a.toggle(),o.closeSearch&&t.closeSearch(),o.revealCanonical&&Tt(r,{targetOffset:`sticky-parents`})},[t,at.visible.endIndex,at.visible.startIndex,Tt]),wn=()=>{if(y.current||!Ie||Jt==null||gn==null)return;let e=t.getItem(Jt);e!=null&&(St(gn),yt.current=!0,he({anchorRect:null,item:{kind:e.isDirectory()?`directory`:`file`,name:gn.getAttribute(`aria-label`)??Jt,path:e.getPath()},path:e.getPath(),source:`button`}))},Tn={contextHoverPath:hn,contextMenuButtonTriggerEnabled:Ie,contextMenuButtonVisibility:Le,contextMenuEnabled:Pe,contextMenuRightClickEnabled:Re,contextMenuTriggerMode:Fe,controller:t,directoriesWithGitChanges:i,dragAndDropEnabled:Ze,draggedPathSet:$e,dragTarget:et,gitLaneActive:Ue,gitStatusByPath:n,handleRowDragEnd:zt,handleRowDragStart:Rt,handleRowTouchStart:Bt,ignoredGitDirectories:r,ignoredInheritanceCache:ie,instanceId:o,itemHeight:s,onKeyDown:Vt,onRowClick:Cn,openContextMenuForRow:Ct,registerButton:ze,registerRenameInput:Ve,renameView:Ge,renderDecorationForRow:ht,resolveIcon:We,shouldSuppressContextMenu:Et,visualFocusPath:mn},En={...Tn,registerButton:Be};return Q(`div`,{ref:S,id:nt,"data-file-tree-context-menu-button-visibility":Pe&&Ie?Le:void 0,"data-file-tree-context-menu-trigger-mode":Pe?Fe:void 0,"data-file-tree-has-context-menu-action-lane":Pe&&Ie?`true`:void 0,"data-file-tree-has-git-lane":Ue?`true`:void 0,"data-file-tree-virtualized-root":`true`,onDragLeave:Ze?$t:void 0,onDragOver:Ze?Qt:void 0,onDrop:Ze?en:void 0,onKeyDown:Vt,onPointerLeave:Pe?Zt:void 0,onPointerOver:Pe?Xt:void 0,role:`tree`,tabIndex:-1,style:{outline:`none`,position:`relative`},children:[Q(`style`,{"data-file-tree-guide-style":`true`,dangerouslySetInnerHTML:{__html:fn}}),Q(`slot`,{name:eu,"data-type":`header-slot`}),f?Q(`div`,{"data-file-tree-search-container":!0,"data-open":Je?`true`:`false`,children:Q(`input`,{ref:w,"aria-activedescendant":pn,"aria-controls":nt,placeholder:`Search…`,"data-file-tree-search-input":!0,"data-file-tree-search-input-fake-focus":De?`true`:void 0,value:Ye,onBlur:()=>{d===`retain`&&!W.current||t.closeSearch()},onFocus:ke,onPointerDown:ke,onInput:e=>{ke();let n=e.currentTarget;t.setSearch(n.value)}})}):null,Q(`div`,{ref:C,"data-file-tree-virtualized-scroll":`true`,children:[h&&Me&&lt.length>0?Q(`div`,{"aria-hidden":`true`,"data-file-tree-sticky-overlay":`true`,children:Q(`div`,{"data-file-tree-sticky-overlay-content":`true`,style:{height:`${rt}px`},children:lt.map((e,t)=>ny(En,e.row,`sticky:${dv(e.row)}`,{mode:`sticky`,style:{left:`0`,position:`absolute`,right:`0`,top:`${e.top}px`,zIndex:`${lt.length-t}`}}))})}):null,Q(`div`,{ref:b,"data-file-tree-virtualized-list":`true`,style:{height:`${dt}px`},children:[Q(`div`,{"data-file-tree-virtualized-sticky-offset":`true`,"aria-hidden":`true`,style:{height:`${nn}px`}}),Q(`div`,{"data-file-tree-virtualized-sticky":`true`,style:{height:`${tn}px`,top:`${rn}px`,bottom:`${rn}px`},children:[ry(Tn,ct,pt),on!=null&&sn!=null?ny(Tn,on,`parked:${on.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:tt===on.path?`none`:void 0,position:`absolute`,right:`0`,top:`${sn}px`}}):null,un!=null&&dn!=null?ny(Tn,un,`parked-drag:${un.path}`,{isParked:!0,style:{left:`0`,opacity:`0`,pointerEvents:`none`,position:`absolute`,right:`0`,top:`${dn}px`}}):null]})]})]}),Pe?Q(`div`,{ref:_,"data-type":`context-menu-anchor`,"data-visible":vn?`true`:`false`,style:xn,children:[Q(`button`,{ref:v,type:`button`,"data-type":nu,"aria-label":`Options`,"aria-haspopup":`menu`,"aria-expanded":U==null?`false`:`true`,"data-visible":_n?`true`:`false`,onMouseDown:e=>{e.preventDefault()},onClick:e=>{if(e.preventDefault(),e.stopPropagation(),U!=null){xt();return}wn()},tabIndex:-1,style:Sn,children:Q(e_,{...We(`file-tree-icon-ellipsis`)})}),U==null?null:Q(`slot`,{name:tu})]}):null,U==null?null:Q(`div`,{"data-type":`context-menu-wash`,"aria-hidden":`true`,onMouseDownCapture:e=>{e.preventDefault(),xt()},onTouchStartCapture:e=>{e.preventDefault(),e.stopPropagation(),xt()},onTouchMoveCapture:e=>{e.preventDefault(),e.stopPropagation()},onWheelCapture:e=>{e.preventDefault(),e.stopPropagation()}})]})}var ay={hydrateRoot:(e,t)=>{Yg(Tg(iy,t),e)},renderRoot:(e,t)=>{Jg(Tg(iy,t),e)},unmountRoot:e=>{Jg(null,e)}};function oy(e,t){ay.renderRoot(e,t)}function sy(e,t){ay.hydrateRoot(e,t)}function cy(e){ay.unmountRoot(e)}var ly=class{#e=new Map;#t=null;clearAll(){for(let e of this.#e.values())e.remove();this.#e.clear()}clearSlotContent(e){let t=this.#n(e);t!=null&&(t.remove(),this.#e.delete(e))}setHost(e){if(this.#t=e,e!=null){this.#i(e);for(let[e,t]of this.#e)this.#r(e,t)}}setSlotContent(e,t){let n=this.#n(e);if(n===t){t!=null&&(this.#e.set(e,t),this.#r(e,t));return}if(n?.remove(),t==null){this.#e.delete(e);return}this.#e.set(e,t),this.#r(e,t)}setSlotHtml(e,t){let n=t?.trim()??``;if(n.length===0){this.setSlotContent(e,null);return}let r=this.#n(e);if(r!=null&&r.innerHTML===n){this.#e.set(e,r),this.#r(e,r);return}let i=document.createElement(`div`);i.innerHTML=n,this.setSlotContent(e,i)}#n(e){let t=this.#e.get(e)??null;if(t!=null)return t;let n=this.#t;if(n==null)return null;for(let t of Array.from(n.children))if(t instanceof HTMLElement&&t.dataset.fileTreeManagedSlot===e)return t;return null}#r(e,t){t.slot=e,t.dataset.fileTreeManagedSlot=e,this.#t!=null&&t.parentNode!==this.#t&&this.#t.appendChild(t)}#i(e){for(let t of Array.from(e.children)){if(!(t instanceof HTMLElement))continue;let e=t.dataset.fileTreeManagedSlot;e==null||this.#e.has(e)||this.#e.set(e,t)}}};Array.isArray;var uy=0;function dy(e){return e!=null&&e.length>0?e:(uy+=1,`pst_ft_${uy}`)}function fy({initialVisibleRowCount:e,itemHeight:t}){return e==null?420:Math.max(0,e)*(t??wd)}function py(e){if(typeof document>`u`)return;let t=document.createElement(`div`);t.innerHTML=e;let n=t.querySelector(`svg`);return n instanceof SVGElement?n:void 0}function my(e){return e.querySelector(`#file-tree-icon-chevron`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-file`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-dot`)instanceof SVGElement&&e.querySelector(`#file-tree-icon-lock`)instanceof SVGElement}function hy(e){return Array.from(e.children).filter(e=>e instanceof SVGElement)}var gy=class{static LoadedCustomComponent=!0;#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=new ly;#u;#d;#f;#p;#m;#h;#g;#_;#v;#y=null;#b;#x=!1;#S=!1;constructor(e){let{composition:t,density:n,fileTreeSearchMode:r,gitStatus:i,id:a,initialSearchQuery:o,icons:s,itemHeight:c,onSearchChange:l,onSelectionChange:u,overscan:d,renderRowDecoration:f,renaming:p,search:m,searchBlurBehavior:h,searchFakeFocus:g,stickyFolders:_,unsafeCSS:v,initialVisibleRowCount:y,...b}=e;this.#e=t,this.#n=dy(a),this.#p=rg(i),this.#m=s,this.#h=v,this.#r=u,this.#i=f,this.#a=p!=null&&p!==!1,this.#o=h,this.#s=m===!0,this.#c=g===!0,this.#u=Cd(n,c),this.#d={itemHeight:this.#u.itemHeight,overscan:d,stickyFolders:_,initialVisibleRowCount:y},this.#t=new Qh({...b,fileTreeSearchMode:r,initialSearchQuery:o,onSearchChange:l,renaming:p}),this.#v=this.#t.getSelectionVersion(),this.#y=this.#r==null?null:this.subscribe(()=>{this.#D()})}unmount(){this.#b!=null&&(cy(this.#b),delete this.#b.dataset.fileTreeVirtualizedWrapper,this.#b=void 0),this.#l.clearAll(),this.#l.setHost(null),this.#f!=null&&(delete this.#f.dataset.fileTreeVirtualized,this.#I(this.#f),this.#f=void 0)}cleanUp(){this.unmount(),this.#y?.(),this.#y=null,this.#t.destroy()}getFileTreeContainer(){return this.#f}getItem(e){return this.#t.getItem(e)}getFocusedItem(){return this.#t.getFocusedItem()}getFocusedPath(){return this.#t.getFocusedPath()}getSelectedPaths(){return this.#t.getSelectedPaths()}getComposition(){return this.#e}getItemHeight(){return this.#u.itemHeight}getDensityFactor(){return this.#u.factor}subscribe(e){let t=!1;return this.#t.subscribe(()=>{if(!t){t=!0;return}e()})}focusPath(e){this.#t.focusPath(e)}focusNearestPath(e){return this.#t.focusNearestPath(e)}add(e){this.#t.add(e)}batch(e){this.#t.batch(e)}move(e,t,n){this.#t.move(e,t,n)}onMutation(e,t){return this.#t.onMutation(e,t)}setSearch(e){this.#t.setSearch(e)}openSearch(e){this.#t.openSearch(e)}closeSearch(){this.#t.closeSearch()}isSearchOpen(){return this.#t.isSearchOpen()}getSearchValue(){return this.#t.getSearchValue()}getSearchMatchingPaths(){return this.#t.getSearchMatchingPaths()}focusNextSearchMatch(){this.#t.focusNextSearchMatch()}focusPreviousSearchMatch(){this.#t.focusPreviousSearchMatch()}startRenaming(e,t){return this.#t.startRenaming(e,t)}remove(e,t){this.#t.remove(e,t)}resetPaths(e,t){this.#t.resetPaths(e,t)}setComposition(e){this.#e=e;let t=this.#T();t!=null&&(this.#O(),oy(t.wrapper,this.#w()))}setGitStatus(e){this.#p=rg(e,this.#p);let t=this.#T();t!=null&&oy(t.wrapper,this.#w())}setIcons(e){this.#m=e;let t=this.#T();t!=null&&(this.#E(t.host,t.wrapper),oy(t.wrapper,this.#w()))}hydrate({fileTreeContainer:e}){let t=this.#P(e),n=this.#N(t);this.#O(),sy(n,this.#w())}render({containerWrapper:e,fileTreeContainer:t}){let n=this.#P(t??this.#f,e),r=this.#N(n);this.#O(),oy(r,this.#w())}#C(){return{initialViewportHeight:fy({initialVisibleRowCount:this.#d.initialVisibleRowCount,itemHeight:this.#d.itemHeight}),itemHeight:this.#d.itemHeight,overscan:this.#d.overscan,stickyFolders:this.#d.stickyFolders}}#w(){return{composition:this.#e,controller:this.#t,gitStatusByPath:this.#p?.statusByPath,ignoredGitDirectories:this.#p?.ignoredDirectoryPaths,directoriesWithGitChanges:this.#p?.directoriesWithChanges,icons:this.#m,instanceId:this.#n,renamingEnabled:this.#a,renderRowDecoration:this.#i,searchBlurBehavior:this.#o,searchEnabled:this.#s,searchFakeFocus:this.#c,slotHost:this.#l,...this.#C()}}#T(){let e=this.#f,t=this.#b;return e==null||t==null?null:{host:e,wrapper:t}}#E(e,t){let n=e.shadowRoot;n!=null&&(this.#k(n),this.#A(n)),this.#j(t)}#D(){let e=this.#r;if(e==null)return;let t=this.#t.getSelectionVersion();t!==this.#v&&(this.#v=t,e(this.#t.getSelectedPaths()))}#O(){let e=this.#e?.header?.render;if(e!=null){this.#l.setSlotContent(eu,e());return}this.#l.setSlotHtml(eu,this.#e?.header?.html??null)}#k(e){let t=hy(e).find(e=>my(e)),n=py(gd(xd(this.#m).set));n!=null&&(t!=null&&t.outerHTML===n.outerHTML||(t==null?e.prepend(n):t.replaceWith(n)))}#A(e){let t=hy(e),n=t.find(e=>my(e)),r=t.filter(e=>e!==n),i=xd(this.#m).spriteSheet?.trim()??``;if(i.length===0){for(let e of r)e.remove();return}let a=py(i);if(a==null){for(let e of r)e.remove();return}if(!(r.length===1&&r[0].outerHTML===a.outerHTML)){for(let e of r)e.remove();e.appendChild(a)}}#j(e){let t=xd(this.#m);t.colored&&vd(t.set)?e.dataset.fileTreeColoredIcons=`true`:delete e.dataset.fileTreeColoredIcons}#M(e){let t=e.querySelector(`style[${Xl}]`);if(this.#g==null&&t instanceof HTMLStyleElement&&(this.#g=t),this.#h==null||this.#h===``){this.#g?.remove(),this.#g=void 0,this.#_=void 0;return}this.#g?.parentNode===e&&this.#_===this.#h||(this.#g??=document.createElement(`style`),this.#g.setAttribute(Xl,``),this.#g.parentNode!==e&&e.appendChild(this.#g),this.#g.textContent=Od(this.#h),this.#_=this.#h)}#N(e){if(this.#b!=null)return this.#b;let t=e.shadowRoot;if(t==null)throw Error(`FileTree requires a shadow root`);let n=Array.from(t.children).filter(e=>e instanceof HTMLDivElement&&typeof e.dataset.fileTreeId==`string`&&e.dataset.fileTreeId.length>0),r=n.find(e=>e.dataset.fileTreeId===this.#n)??n[0];return r!=null&&(this.#n=r.dataset.fileTreeId??this.#n),this.#b=r??document.createElement(`div`),this.#b.dataset.fileTreeId=this.#n,this.#b.dataset.fileTreeVirtualizedWrapper=`true`,this.#E(e,this.#b),this.#b.parentNode!==t&&t.appendChild(this.#b),this.#b}#P(e,t){let n=e??this.#f??document.createElement(`file-tree-container`);t!=null&&n.parentNode!==t&&t.appendChild(n);let r=n.shadowRoot??n.attachShadow({mode:`open`});return Pd(n,r),this.#M(r),n.dataset.fileTreeVirtualized=`true`,n.style.display=`flex`,this.#F(n),this.#l.setHost(n),this.#f=n,n}#F(e){e.style.getPropertyValue(`--trees-item-height`)===``&&(e.style.setProperty(`--trees-item-height`,`${String(this.#u.itemHeight)}px`),this.#x=!0),e.style.getPropertyValue(`--trees-density-override`)===``&&(e.style.setProperty(`--trees-density-override`,String(this.#u.factor)),this.#S=!0)}#I(e){this.#x&&=(e.style.removeProperty(`--trees-item-height`),!1),this.#S&&=(e.style.removeProperty(`--trees-density-override`),!1)}};function _y(e){let t=(0,K.useRef)(null);return t.current??=new gy(e),(0,K.useEffect)(()=>{let e=t.current;return()=>{e?.cleanUp(),t.current=null}},[]),{model:t.current}}var vy=`
1823
+ [data-type='item'][data-item-type='file'] > [data-item-section='icon'] {
1824
+ display: none;
1825
+ }
1826
+
1827
+ [data-type='item'][data-item-type='file'] > [data-item-section='spacing'] {
1828
+ padding-left: 2px;
1829
+ }
1830
+
1831
+ [data-type='item'][data-item-type='file'] > [data-item-section='spacing'] > [data-item-section='spacing-item'] {
1832
+ margin-right: 4px;
1833
+ }
1834
+
1835
+ [data-type='item'][data-item-type='file'] > [data-item-section='content'] {
1836
+ flex: 1 1 auto;
1837
+ }
1838
+
1839
+ [data-type='item'][data-item-type='file'] > [data-item-section='decoration'] {
1840
+ flex: 0 0 auto;
1841
+ padding-inline: 6px 2px;
1842
+ }
1843
+
1844
+ [data-type='item'][data-item-type='file'] > [data-item-section='decoration'] > span {
1845
+ cursor: pointer;
1846
+ font-size: 18px;
1847
+ line-height: 1;
1848
+ }
1849
+
1850
+ [data-type='item'][data-item-type='file'] [data-truncate-group-container='middle'] {
1851
+ width: 100%;
1852
+ }
1853
+
1854
+ [data-type='item'][data-item-type='file']
1855
+ [data-truncate-group-container='middle']
1856
+ > div[data-truncate-segment-priority='2'] {
1857
+ flex: 0 1 auto;
1858
+ }
1859
+
1860
+ [data-type='item'][data-item-type='file']
1861
+ [data-truncate-group-container='middle']
1862
+ > div[data-truncate-segment-priority='1'] {
1863
+ flex: 1 999999 auto;
1864
+ }
1865
+
1866
+ [data-type='item'][data-item-type='file']
1867
+ [data-truncate-group-container='middle']
1868
+ [data-truncate-container='fruncate']
1869
+ [data-truncate-grid] {
1870
+ grid-template-columns: minmax(0, max-content) 0;
1871
+ }
1872
+
1873
+ [data-type='item'][data-item-type='file']
1874
+ [data-truncate-group-container='middle']
1875
+ [data-truncate-container='fruncate']
1876
+ [data-truncate-content] {
1877
+ direction: ltr;
1878
+ }
1879
+
1880
+ [data-type='item'][data-item-type='file']
1881
+ [data-truncate-group-container='middle']
1882
+ [data-truncate-container='fruncate']
1883
+ [data-truncate-marker] {
1884
+ right: 0;
1885
+ }
1886
+
1887
+ [data-type='item'][data-item-type='file'] [data-truncate-marker] {
1888
+ display: none;
1889
+ }
1890
+ `;function yy(e){return e.replaceAll(`/`,`∕`).trim()||`(untitled)`}function by(e){return e.replace(/\/+$/,``).split(`/`).at(-1)?.trim()||`(unknown)`}function xy(e){let t=e.project_identity;if(t)return{key:C(t),label:t.displayName||by(e.directory)};let n=by(e.directory);return{key:n===`(unknown)`?`__unknown__`:`path:${e.directory||n}`,label:n}}function Sy(e){return e.time_updated??e.time_created}function Cy(e,t,n){let r=e.get(t.path)??2**53-1,i=e.get(n.path)??2**53-1;return r===i?t.path.localeCompare(n.path):r-i}function wy(){let e=new Set,t=new Map;return function(n){if(!e.has(n))return e.add(n),n;let r=t.get(n)??2,i=`${n} (${r})`;for(;e.has(i);)r+=1,i=`${n} (${r})`;return t.set(n,r+1),e.add(i),i}}function Ty(e){let t=new Map,n=new Map,r=new Map,i=new Map,a=new Map,o=wy(),s=[],c=new Map;for(let t of e){let{key:e,label:n}=xy(t),r=Sy(t),i=c.get(e);i?(i.sessions.push(t),r>i.maxTime&&(i.maxTime=r)):c.set(e,{label:n,sessions:[t],maxTime:r})}let l=[...c.entries()].sort(([,e],[,t])=>e.label===`(unknown)`?1:t.label===`(unknown)`?-1:t.maxTime-e.maxTime),u=0,d=wy();for(let[,e]of l){let c=d(yy(e.label)),l=`${c}/`,f=new Map;t.set(l,u),t.set(c,u),u+=1,i.set(l,`${e.sessions.length}`),i.set(c,`${e.sessions.length}`);for(let t of e.sessions){let e=qn(t);f.set(e,(f.get(e)??0)+1)}for(let i of e.sessions){let e=qn(i),c=o(`${l}${(f.get(e)??0)>1?`${yy(e)} #${i.id.slice(0,8)}`:yy(e)}`);s.push(c),t.set(c,u),u+=1;let d=Hn(i);n.set(d,c),r.set(d,l),a.set(c,i)}}return{paths:s,sortOrderByPath:t,pathBySessionReference:n,groupPathBySessionReference:r,groupCountByPath:i,sessionByPath:a}}function Ey(e,t){if(!xn())return t();let n=performance.now(),r=t(),i=performance.now();return Ke({id:e,source:`custom-timing`,phase:`measure`,actualDuration:Math.round((i-n)*100)/100,baseDuration:0,startTime:n,commitTime:i}),r}var Dy=(0,K.memo)(function({sessions:e,activeSessionReference:t,selectedSessionReference:n,onSelectSession:r,bookmarkedSessionReferences:i,onToggleBookmark:a,onRenameSession:o}){let[s,c]=(0,K.useState)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useMemo)(()=>Ey(`SessionTreeSidebar:buildTreeModel`,()=>Ty(e)),[e]),p=(0,K.useRef)(f.sortOrderByPath),m=(0,K.useRef)(f.groupCountByPath),h=(0,K.useRef)(f.sessionByPath),g=(0,K.useRef)(i),_=(0,K.useRef)(r),v=(0,K.useRef)(a),y=(0,K.useRef)(o),b={"--trees-bg-override":`transparent`,"--trees-border-color-override":`var(--console-border)`,"--trees-fg-override":`var(--console-text)`,"--trees-fg-muted-override":`var(--console-muted)`,"--trees-font-family-override":`"JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace`,"--trees-font-size-override":`12px`,"--trees-item-margin-x-override":`0px`,"--trees-item-padding-x-override":`4px`,"--trees-padding-inline-override":`4px`,"--trees-selected-bg-override":`var(--console-surface-muted)`},{model:x}=_y({flattenEmptyDirectories:!1,initialExpansion:`closed`,paths:f.paths,sort:(e,t)=>Cy(p.current,e,t),density:`compact`,unsafeCSS:vy,onSelectionChange(e){let t=h.current.get(e[0]??``);t&&_.current(t)},renderRowDecoration({item:e}){return h.current.get(e.path)?{text:`⋯`,title:`Session options`}:m.current.get(e.path)?{text:m.current.get(e.path),title:`Sessions`}:null}});(0,K.useEffect)(()=>{p.current=f.sortOrderByPath,m.current=f.groupCountByPath,h.current=f.sessionByPath,x.resetPaths(f.paths)},[x,f]),(0,K.useEffect)(()=>{_.current=r},[r]),(0,K.useEffect)(()=>{g.current=i},[i]),(0,K.useEffect)(()=>{v.current=a},[a]),(0,K.useEffect)(()=>{y.current=o},[o]);function S(e,t,n){l.current=t,u.current=n,c(e),d.current?.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowDown`,bubbles:!0,cancelable:!0}))}function C(e){let t=e.nativeEvent.composedPath(),n=t.find(e=>e instanceof HTMLElement&&e.parentElement?.getAttribute(`data-item-section`)===`decoration`),r=t.find(e=>e instanceof HTMLElement&&e.getAttribute(`data-type`)===`item`),i=r?h.current.get(r.getAttribute(`data-item-path`)??``):null;!n||!r||!i||(e.preventDefault(),e.stopPropagation(),S(i,n,r))}function w(e){if(e.key!==`ContextMenu`&&!(e.shiftKey&&e.key===`F10`))return;let t=e.nativeEvent.composedPath().find(e=>e instanceof HTMLElement&&e.getAttribute(`data-type`)===`item`),n=t?h.current.get(t.getAttribute(`data-item-path`)??``):null;!t||!n||(e.preventDefault(),e.stopPropagation(),S(n,t.querySelector(`[data-item-section='decoration'] > span`)??t,t))}return(0,K.useEffect)(()=>{let e=f.pathBySessionReference.get(t??``),r=f.pathBySessionReference.get(n??``)??e,i=n??t??``,a=f.groupPathBySessionReference.get(i);if(e&&x.getItem(e)?.select(),r&&t){let e=a?x.getItem(a):null;e&&`expand`in e&&e.expand(),x.focusPath(r);return}a&&x.focusPath(a)},[t,x,f,n]),(0,q.jsxs)(`div`,{className:`session-tree h-[min(560px,calc(100vh-410px))] min-h-56 overflow-hidden`,style:b,onClickCapture:C,onKeyDownCapture:w,children:[(0,q.jsx)(cu,{model:x,style:{height:`100%`},"aria-label":`Sessions`}),(0,q.jsxs)(Il,{modal:!1,children:[(0,q.jsx)(Wl,{ref:d,tabIndex:-1,"aria-hidden":`true`,className:`pointer-events-none absolute size-0 opacity-0`}),(0,q.jsx)(cl,{children:(0,q.jsx)(Ol,{anchor:l,side:`bottom`,align:`end`,sideOffset:4,className:`z-40`,children:(0,q.jsx)(al,{finalFocus:u,className:`motion-menu w-36 rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-1 shadow-lg focus-visible:outline-none`,children:s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(el,{onClick:()=>y.current(s),className:`motion-hover motion-press block w-full rounded-sm px-2 py-1.5 text-left text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)] data-[highlighted]:bg-[var(--console-surface-muted)] focus-visible:outline-none`,children:`Rename`}),(0,q.jsx)(el,{onClick:()=>v.current(s),className:`motion-hover motion-press block w-full rounded-sm px-2 py-1.5 text-left text-xs text-[var(--console-text)] hover:bg-[var(--console-surface-muted)] data-[highlighted]:bg-[var(--console-surface-muted)] focus-visible:outline-none`,children:g.current.has(Hn(s))?`Remove bookmark`:`Add bookmark`})]}):null})})})]})]})});function Oy({value:e,onChange:t,projectsDisabled:n=!1}){return(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":`Browse by`,className:`grid gap-1.5`,children:[{value:`projects`,label:`Projects`},{value:`agents`,label:`Agents`}].map(r=>{let i=e===r.value,a=r.value===`projects`&&n;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":i,disabled:a,onClick:()=>t(r.value),className:`console-mono flex items-center gap-2 rounded-sm border px-3 py-1.5 text-left text-xs motion-hover ${a?`cursor-not-allowed border-transparent text-[var(--console-muted)] opacity-45`:i?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,title:a?`Project grouping is available after the current scan finishes`:void 0,children:[(0,q.jsx)(`span`,{className:`flex size-3 shrink-0 items-center justify-center rounded-full border ${i?`border-[var(--console-accent)]`:`border-[var(--console-border-strong)]`}`,children:i?(0,q.jsx)(`span`,{className:`size-1.5 rounded-full bg-[var(--console-accent)]`}):null}),(0,q.jsx)(`span`,{children:r.label})]},r.value)})})}var ky=4,Ay=8,jy=`h-[min(560px,calc(100vh-410px))] min-h-56`;function My({session:e,agentCatalog:t,active:n,selected:r,onSelectSession:i,onToggleBookmark:a,onRenameSession:o,bookmarkedSessionReferences:s}){let c=g(t,k(e));return(0,q.jsxs)(`div`,{className:`flex items-start gap-1 rounded-sm border px-2 py-1.5 motion-hover ${n||r?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>i(e),className:`min-w-0 flex-1 text-left`,children:[(0,q.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[c?.icon?(0,q.jsx)(b,{icon:c.icon,iconColored:c.iconColored,alt:c.displayName,className:`size-3.5 shrink-0 object-contain`}):null,(0,q.jsx)(`span`,{className:`console-mono line-clamp-1 text-xs text-[var(--console-text)]`,children:qn(e)})]}),(0,q.jsx)(`span`,{className:`console-mono mt-0.5 block truncate text-[10px] text-[var(--console-muted)]`,children:v(e.time_updated??e.time_created)})]}),(0,q.jsx)(ql,{bookmarked:s.has(Hn(e)),onRename:()=>o(e),onToggleBookmark:()=>a(e)})]})}function Ny(e){if(e.sessions.length>80)return(0,q.jsx)(Py,{...e});let{sessions:t,agentCatalog:n,activeSessionReference:r,selectedSessionReference:i,bookmarkedSessionReferences:a,onSelectSession:o,onToggleBookmark:s,onRenameSession:c}=e;return(0,q.jsx)(`div`,{className:`console-scrollbar ${jy} overflow-y-auto`,children:(0,q.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsx)(My,{session:e,agentCatalog:n,active:r===Hn(e),selected:i===Hn(e),bookmarkedSessionReferences:a,onSelectSession:o,onToggleBookmark:s,onRenameSession:c})},e.slug))})})}function Py({sessions:e,agentCatalog:t,activeSessionReference:n,selectedSessionReference:r,bookmarkedSessionReferences:i,onSelectSession:a,onToggleBookmark:o,onRenameSession:s}){let c=(0,K.useRef)(null),[l,u]=(0,K.useState)({scrollTop:0,height:0}),d=(0,K.useRef)(l),f=(0,K.useCallback)(()=>{let e=c.current;if(!e)return;let t={scrollTop:e.scrollTop,height:e.clientHeight},n=d.current;Math.abs(n.scrollTop-t.scrollTop)<1&&Math.abs(n.height-t.height)<1||(d.current=t,u(t))},[]);(0,K.useEffect)(()=>{let e=c.current;if(!e)return;let t=0,n=()=>{t||=requestAnimationFrame(()=>{t=0,f()})};e.addEventListener(`scroll`,n,{passive:!0});let r=typeof ResizeObserver<`u`?new ResizeObserver(n):null;return r?.observe(e),f(),()=>{t&&cancelAnimationFrame(t),e.removeEventListener(`scroll`,n),r?.disconnect()}},[f]);let p=Math.max(0,Math.floor(l.scrollTop/51)-Ay),m=Math.min(e.length,Math.ceil((l.scrollTop+l.height)/51)+Ay),h=e.slice(p,m),g=Math.max(0,e.length*51-ky);return(0,q.jsx)(`div`,{ref:c,className:`console-scrollbar ${jy} overflow-y-auto`,children:(0,q.jsx)(`ul`,{className:`relative`,style:{height:g},children:h.map((e,c)=>(0,q.jsx)(`li`,{className:`absolute inset-x-0 top-0`,style:{transform:`translateY(${(p+c)*51}px)`},children:(0,q.jsx)(My,{session:e,agentCatalog:t,active:n===Hn(e),selected:r===Hn(e),bookmarkedSessionReferences:i,onSelectSession:a,onToggleBookmark:o,onRenameSession:s})},e.slug))})})}function Fy(e){return e?.status!==`scanning`||typeof e.total!=`number`||!Number.isFinite(e.total)||e.total<=0||typeof e.processed!=`number`||!Number.isFinite(e.processed)?null:Math.min(100,Math.max(0,Math.round(e.processed/e.total*100)))}function Iy({agents:e,activeAgentKey:t,scanStatus:n,isScanActive:r}){return(0,q.jsx)(q.Fragment,{children:e.map(e=>{let i=e.name.toLowerCase(),a=i===t,o=n?.agentStatuses[e.name],s=Ss(n,e.name),c=Fy(o),l=r&&s!==null,u=`ml-4 flex items-center gap-2 rounded-sm border px-3 py-1.5 text-left motion-hover ${l?`cursor-not-allowed border-transparent text-[var(--console-muted)] opacity-50`:a?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,d=(0,q.jsxs)(q.Fragment,{children:[e.icon&&(0,q.jsx)(b,{icon:e.icon,iconColored:e.iconColored,alt:e.displayName,className:`size-3.5 object-contain`}),(0,q.jsx)(`span`,{className:`console-mono line-clamp-1 flex-1 text-xs`,children:e.displayName}),(0,q.jsx)(`span`,{className:`console-mono text-[11px] text-[var(--console-muted)]`,children:s??e.count})]});return(0,q.jsxs)(`li`,{children:[l?(0,q.jsx)(`span`,{className:u,title:`Available after this agent scan completes`,children:d}):(0,q.jsx)(Bn,{to:M(i),className:u,children:d}),s?(0,q.jsx)(`span`,{className:`ml-4 mt-1 block h-1 overflow-hidden rounded-sm bg-[var(--console-surface-muted)]`,role:`progressbar`,"aria-label":`${e.displayName} ${o?.status===`indexing`?`indexing`:`scan`} progress`,"aria-valuemin":c==null?void 0:0,"aria-valuemax":c==null?void 0:100,"aria-valuenow":c??void 0,"aria-valuetext":c==null?s:void 0,children:(0,q.jsx)(`span`,{className:`block h-full bg-[var(--console-accent)] ${c==null?`scan-progress-indeterminate`:``}`,style:c==null?void 0:{width:`${c}%`}})}):null]},e.name)})})}function Ly({projects:e,selectedProjectNavigationId:t,onSelectProject:n}){return(0,q.jsx)(q.Fragment,{children:e.map(e=>{let r=In(e),i=t===C(r);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(Bn,{to:jn(r),onClick:()=>n(r),className:`ml-4 flex min-w-0 items-center gap-2 rounded-sm border px-3 py-1.5 text-left motion-hover ${i?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,children:[(0,q.jsx)(`span`,{className:`console-mono min-w-0 flex-1 truncate text-xs`,children:e.displayName}),(0,q.jsx)(`span`,{className:`console-mono shrink-0 text-[11px] text-[var(--console-muted)]`,children:e.sessionCount})]})},`${e.identityKind}:${e.identityKey}`)})})}function Ry({model:{sidebarCollapsed:e,browseBy:t,isScanActive:n,viewState:r,agents:i,agentCatalog:a,activeAgentKey:o,scanStatus:s,projects:c,selectedProjectNavigationId:l,loading:u,bookmarkedSessions:d,sidebarSessions:f,selectedSidebarSessionReference:p,bookmarkedSidebarSessionReferences:m},actions:{onChangeBrowseBy:h,onSelectProject:_,onToggleBookmark:v,onSelectFlatSidebarSession:y,onToggleSidebarSessionBookmark:x,onRenameSession:S,onRenameBookmarkedSession:C,onSelectTreeSidebarSession:T}}){let E=r.mode===`session`?F(r.activeAgentKey,r.activeSessionId):null;return(0,q.jsx)(`aside`,{className:`w-64 shrink-0 flex-col border-r border-[var(--console-border)] bg-[var(--console-sidebar-bg)] ${e?`hidden`:`hidden lg:flex`}`,children:(0,q.jsxs)(`div`,{className:`console-scrollbar flex-1 space-y-8 overflow-y-auto px-4 py-6`,children:[(0,q.jsxs)(`section`,{children:[(0,q.jsx)(`h3`,{className:`console-mono mb-3 text-xs font-bold uppercase text-[var(--console-text)]`,children:`BROWSE BY`}),(0,q.jsx)(Oy,{value:t,onChange:h,projectsDisabled:n})]}),(0,q.jsxs)(`section`,{children:[(0,q.jsx)(`h3`,{className:`console-mono mb-3 text-xs font-bold uppercase text-[var(--console-text)]`,children:`NAVIGATION`}),(0,q.jsxs)(`ul`,{className:`space-y-1 ${t===`projects`?`console-scrollbar max-h-[min(280px,calc(100vh-440px))] overflow-y-auto pr-1`:``}`,children:[(0,q.jsx)(`li`,{children:(0,q.jsxs)(Bn,{to:t===`projects`?`/projects`:`/`,className:`flex items-center gap-2 rounded-sm border px-3 py-1.5 text-left motion-hover ${t===`agents`&&r.mode===`root`||t===`projects`&&r.mode===`projects`?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,children:[(0,q.jsx)(`img`,{src:`/logo.svg?v=3`,alt:`Dashboard`,className:`size-3.5 rounded-[2px]`}),(0,q.jsx)(`span`,{className:`console-mono line-clamp-1 flex-1 text-xs`,children:`Dashboard`})]})}),t===`agents`?(0,q.jsx)(Iy,{agents:i,activeAgentKey:o,scanStatus:s,isScanActive:n}):(0,q.jsx)(Ly,{projects:c,selectedProjectNavigationId:l,onSelectProject:_}),t===`agents`&&i.length===0&&!u?(0,q.jsx)(`li`,{children:(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:s?.active?`Scanning agents...`:`No agents found`})}):null,t===`projects`&&c.length===0&&!u?(0,q.jsx)(`li`,{children:(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:s?.active?`Scanning projects...`:`No projects found`})}):null]})]}),(0,q.jsxs)(`section`,{children:[(0,q.jsx)(`h3`,{className:`console-mono mb-3 text-xs font-bold uppercase text-[var(--console-text)]`,children:`BOOKMARKS`}),d.length===0?(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:`No bookmarks yet`}):(0,q.jsx)(`ul`,{className:`space-y-1`,children:d.map(e=>{let{reference:t,session:n}=e,i=r.mode===`session`&&r.activeAgentKey===t.agentName&&r.activeSessionId===t.sessionId,o=g(a,t.agentName);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-sm border px-2 py-1.5 motion-hover ${i?`border-[var(--console-border-strong)] bg-[var(--console-surface)] text-[var(--console-text)]`:`border-transparent text-[var(--console-muted)] hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`}`,children:[(0,q.jsxs)(Bn,{to:w(n),className:`flex min-w-0 flex-1 items-start gap-2`,children:[o?.icon?(0,q.jsx)(b,{icon:o.icon,iconColored:o.iconColored,alt:o.displayName,className:`mt-0.5 size-3.5 shrink-0 object-contain`}):null,(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsx)(`span`,{className:`console-mono line-clamp-1 block text-xs`,children:qn(n)}),(0,q.jsx)(`span`,{className:`console-mono mt-0.5 line-clamp-1 block text-[10px] text-[var(--console-muted)]`,children:o?.displayName??t.agentName})]})]}),(0,q.jsx)(ql,{bookmarked:!0,onRename:()=>C(e),onToggleBookmark:()=>v(e)})]})},$n(t))})})]}),(0,q.jsxs)(`section`,{children:[(0,q.jsxs)(`h3`,{className:`console-mono mb-3 text-xs font-bold uppercase text-[var(--console-text)]`,children:[`SESSIONS`,f.length>0?(0,q.jsx)(`span`,{className:`ml-2 text-[10px] font-normal text-[var(--console-muted)]`,children:`Navigate j k · Open Enter`}):null]}),t===`agents`&&!o?(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:`Select an agent`}):t===`projects`&&!l?(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:`Select a project`}):f.length===0?(0,q.jsx)(`span`,{className:`console-mono block rounded-sm px-3 py-1.5 text-xs text-[var(--console-muted)]`,children:s?.active?`Scanning sessions...`:`No sessions yet`}):t===`projects`?(0,q.jsx)(Ny,{sessions:f,agentCatalog:a,activeSessionReference:E,selectedSessionReference:p,bookmarkedSessionReferences:m,onSelectSession:y,onToggleBookmark:x,onRenameSession:S}):(0,q.jsx)(re,{id:`SessionTreeSidebar`,detail:{sessions:f.length},children:(0,q.jsx)(Dy,{sessions:f,activeSessionReference:E,selectedSessionReference:p,onSelectSession:T,bookmarkedSessionReferences:m,onToggleBookmark:x,onRenameSession:S})})]})]})})}var zy=[{title:`Navigation`,items:[{keys:`j / k`,description:`Move through sessions or search results`},{keys:`Enter`,description:`Open the current selection`},{keys:`g / G`,description:`Jump to the first or last item`}]},{title:`Search & Help`,items:[{keys:`Cmd/Ctrl K`,description:`Open global search`},{keys:`/`,description:`Focus the search box`},{keys:`Esc`,description:`Exit search or close the current detail view`},{keys:`?`,description:`Open this shortcuts panel`}]}];function By({open:e,onClose:t}){return(0,q.jsx)(qt,{open:e,onOpenChange:e=>e?void 0:t(),children:(0,q.jsxs)(Mt,{children:[(0,q.jsx)(yt,{className:`shortcut-overlay fixed inset-0 z-50 bg-black/35`}),(0,q.jsxs)(cn,{className:`shortcut-content fixed left-1/2 top-1/2 z-50 w-[calc(100%-2rem)] max-w-2xl origin-center -translate-x-1/2 -translate-y-1/2 rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-5 shadow-2xl outline-none`,children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`console-mono text-[11px] uppercase tracking-[0.16em] text-[var(--console-muted)]`,children:`Keyboard Shortcuts`}),(0,q.jsx)(dn,{className:`console-mono mt-2 text-xl font-semibold text-[var(--console-text)]`,children:`Navigate without leaving the keyboard`})]}),(0,q.jsx)(Lt,{className:`console-mono rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-xs text-[var(--console-text)] motion-hover hover:bg-[var(--console-surface)]`,children:`Esc`})]}),(0,q.jsx)(`div`,{className:`mt-5 grid gap-4 md:grid-cols-2`,children:zy.map(e=>(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] p-4`,children:[(0,q.jsx)(`h3`,{className:`console-mono text-xs font-bold uppercase text-[var(--console-text)]`,children:e.title}),(0,q.jsx)(`div`,{className:`mt-3 space-y-3`,children:e.items.map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`console-mono text-xs text-[var(--console-text)]`,children:e.keys}),(0,q.jsx)(`p`,{className:`mt-1 text-sm leading-6 text-[var(--console-muted)]`,children:e.description})]},e.keys))})]},e.title))})]})]})})}var Vy={light:`dark`,dark:`system`,system:`light`},Hy={light:u,dark:x,system:s},Uy={light:`Light`,dark:`Dark`,system:`System`};function Wy({theme:e,onChange:t}){let n=Hy[e],r=Vy[e];return(0,q.jsx)(`button`,{type:`button`,onClick:()=>t(r),"aria-label":`Theme: ${Uy[e]}. Switch to ${Uy[r]}.`,title:`Theme: ${Uy[e]} (click for ${Uy[r]})`,className:`console-mono motion-hover motion-press rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-1.5 text-[var(--console-muted)] hover:bg-[var(--console-surface-muted)] hover:text-[var(--console-text)] focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2 focus-visible:outline-none`,children:(0,q.jsx)(n,{"aria-hidden":`true`,className:`size-4`})})}function Gy(e){return e.total_tokens??e.total_input_tokens+e.total_output_tokens}function Ky({label:e,value:t,hint:n}){return(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4`,children:[(0,q.jsx)(`p`,{className:`console-mono text-[11px] uppercase tracking-wider text-[var(--console-muted)]`,children:e}),(0,q.jsx)(`p`,{className:`console-mono mt-2 text-xl font-semibold text-[var(--console-text)]`,children:t}),n?(0,q.jsx)(`p`,{className:`mt-1 text-xs text-[var(--console-muted)]`,children:n}):null]})}function qy({label:e,value:t}){return(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] p-3`,children:[(0,q.jsx)(`p`,{className:`console-mono text-[11px] uppercase tracking-wider text-[var(--console-muted)]`,children:e}),(0,q.jsx)(`p`,{className:`console-mono mt-2 break-all text-sm leading-6 text-[var(--console-text)]`,children:t})]})}function Jy({code:e,title:t,description:n,aside:r,iconSrc:i,iconColored:a,iconAlt:o}){return(0,q.jsx)(`div`,{className:`rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] p-5 md:p-6`,children:(0,q.jsxs)(`div`,{className:`flex flex-col gap-5 md:flex-row md:items-start md:justify-between`,children:[(0,q.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,q.jsx)(`span`,{className:`console-mono inline-flex rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-[11px] font-semibold uppercase tracking-[0.16em] text-[var(--console-muted)]`,children:e}),(0,q.jsxs)(`div`,{className:`mt-4 flex items-start gap-3`,children:[i?(0,q.jsx)(b,{icon:i,iconColored:a,alt:o||``,className:`mt-1 size-8 shrink-0 object-contain`}):null,(0,q.jsx)(`h2`,{className:`console-mono text-2xl leading-tight font-semibold tracking-tight text-[var(--console-text)] md:text-[2rem]`,children:t})]}),(0,q.jsx)(`p`,{className:`mt-3 max-w-[42rem] text-sm leading-7 text-[var(--console-muted)]`,children:n})]}),(0,q.jsxs)(`div`,{className:`min-w-0 rounded-sm border border-dashed border-[var(--console-border)] bg-[var(--console-surface-muted)] px-4 py-3 md:max-w-xs`,children:[(0,q.jsx)(`p`,{className:`console-mono text-[11px] uppercase tracking-[0.16em] text-[var(--console-muted)]`,children:`STATUS NOTE`}),(0,q.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-[var(--console-text)]`,children:r})]})]})})}function Yy({agentItems:e}){return(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4`,children:[(0,q.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,q.jsx)(`h3`,{className:`console-mono text-xs font-bold uppercase text-[var(--console-text)]`,children:`Known Agents`}),(0,q.jsxs)(`span`,{className:`console-mono text-[11px] text-[var(--console-muted)]`,children:[e.length,` items`]})]}),(0,q.jsx)(`ul`,{className:`grid gap-2 sm:grid-cols-2`,children:e.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(Bn,{to:M(e.key),className:`flex min-h-11 items-center gap-2 rounded-sm border border-transparent px-3 py-2 motion-hover hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--console-accent)]`,children:[e.icon?(0,q.jsx)(b,{icon:e.icon,iconColored:e.iconColored,alt:e.name,className:`size-4 object-contain`}):null,(0,q.jsx)(`span`,{className:`console-mono flex-1 text-xs text-[var(--console-text)]`,children:e.name}),(0,q.jsx)(`span`,{className:`console-mono text-[11px] text-[var(--console-muted)]`,children:e.count})]})},e.key))})]})}function Xy({sessions:e,isBookmarked:t,onToggleBookmark:n}){return e.length===0?(0,q.jsx)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4 text-sm text-[var(--console-muted)]`,children:`No sessions yet`}):(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4`,children:[(0,q.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,q.jsx)(`h3`,{className:`console-mono text-xs font-bold uppercase text-[var(--console-text)]`,children:`Recent Sessions`}),(0,q.jsxs)(`span`,{className:`console-mono text-[11px] text-[var(--console-muted)]`,children:[e.length,` items`]})]}),(0,q.jsx)(`ul`,{className:`space-y-2`,children:e.map(e=>{let r=t(e.agentKey,e.id);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-sm border border-transparent px-2 py-1.5 motion-hover hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`,children:[(0,q.jsxs)(Bn,{to:D({agentName:e.agentKey,sessionId:e.sessionId}),className:`min-w-0 flex-1`,children:[(0,q.jsx)(`p`,{className:`line-clamp-1 text-sm text-[var(--console-text)]`,children:qn(e)}),(0,q.jsxs)(`p`,{className:`console-mono mt-0.5 text-[11px] text-[var(--console-muted)]`,children:[`/`,e.reference,` ·`,` `,v(e.time_updated||e.time_created)]}),(0,q.jsx)(Kn,{tags:e.smart_tags,className:`mt-1.5`})]}),(0,q.jsx)(er,{active:r,onToggle:()=>n(e)})]})},e.id)})})]})}function Zy({type:e,agentCatalog:t,sessions:n,agentItems:r,activeAgentKey:i,attemptedAgentKey:a,attemptedSessionId:o,isBookmarked:s,onToggleBookmark:c}){let l=n.toSorted((e,t)=>(t.time_updated||t.time_created||0)-(e.time_updated||e.time_created||0)),u=l.slice(0,5),d=n.reduce((e,t)=>e+t.stats.message_count,0),p=n.reduce((e,t)=>e+Gy(t.stats),0),m=n.reduce((e,t)=>e+t.stats.total_cost,0),y=m>0?n.some(e=>e.stats.cost_source===`estimated`)?`estimated`:`recorded`:void 0,x=l[0]?.time_updated||l[0]?.time_created;if(e===`missing-agent`){let e=`/${a||`unknown`}${o?`/${o}`:``}`;return(0,q.jsxs)(`div`,{className:`mx-auto max-w-4xl space-y-4`,children:[(0,q.jsx)(Jy,{code:`404 / AGENT`,title:`This agent isn't on the roster.`,description:`The path you requested is valid in shape, but there is no matching agent in the current registry. It may not be connected yet, or its name may not match what the system recognizes.`,aside:`Choose one of the available agents to continue.`}),(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,q.jsx)(qy,{label:`Requested Agent`,value:a||`unknown`}),(0,q.jsx)(qy,{label:`Requested Path`,value:e}),o?(0,q.jsx)(qy,{label:`Requested Session`,value:o}):null]}),(0,q.jsx)(Yy,{agentItems:r})]})}if(e===`missing-session`){let e=i?g(t,i):void 0,n=e?.displayName??i??`Unknown Agent`,r=e?.icon,a=o||`unknown-session`;return(0,q.jsxs)(`div`,{className:`mx-auto max-w-4xl space-y-4`,children:[(0,q.jsx)(Jy,{code:`404 / SESSION`,title:`This session isn't in the index.`,description:`${n} is available, but the session you're looking for does not exist in the current index. The session ID may be incorrect, or the record may never have been part of this dataset.`,aside:`We checked the current path, but nothing matched. The session list on the left is still available.`,iconSrc:r,iconColored:e?.iconColored,iconAlt:n}),(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:[(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] p-3`,children:[(0,q.jsx)(`p`,{className:`console-mono text-[11px] uppercase tracking-wider text-[var(--console-muted)]`,children:`Agent`}),(0,q.jsxs)(`div`,{className:`mt-2 flex items-center gap-2`,children:[r?(0,q.jsx)(b,{icon:r,iconColored:e?.iconColored,alt:n,className:`size-4 shrink-0 object-contain`}):null,(0,q.jsx)(`p`,{className:`console-mono break-all text-sm leading-6 text-[var(--console-text)]`,children:n})]})]}),(0,q.jsx)(qy,{label:`Session`,value:a})]}),(0,q.jsx)(Xy,{sessions:u,isBookmarked:s,onToggleBookmark:c})]})}if(e===`global`)return(0,q.jsxs)(`div`,{className:`mx-auto max-w-4xl space-y-4`,children:[(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,q.jsx)(Ky,{label:`Total Sessions`,value:f(n.length)}),(0,q.jsx)(Ky,{label:`Total Messages`,value:f(d)}),(0,q.jsx)(Ky,{label:`Latest Activity`,value:v(x),hint:x?new Date(x).toLocaleString(`zh-CN`):void 0})]}),(0,q.jsxs)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4`,children:[(0,q.jsx)(`h3`,{className:`console-mono mb-3 text-xs font-bold uppercase text-[var(--console-text)]`,children:`Agents`}),(0,q.jsx)(`ul`,{className:`grid gap-2 sm:grid-cols-2`,children:r.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(Bn,{to:M(e.key),className:`flex items-center gap-2 rounded-sm border border-transparent px-2 py-1.5 motion-hover hover:border-[var(--console-border)] hover:bg-[var(--console-surface-muted)]`,children:[e.icon?(0,q.jsx)(b,{icon:e.icon,iconColored:e.iconColored,alt:e.name,className:`size-4 object-contain`}):null,(0,q.jsx)(`span`,{className:`console-mono flex-1 text-xs text-[var(--console-text)]`,children:e.name}),(0,q.jsx)(`span`,{className:`console-mono text-[11px] text-[var(--console-muted)]`,children:e.count})]})},e.key))})]}),(0,q.jsx)(Xy,{sessions:u,isBookmarked:s,onToggleBookmark:c})]});let S=i?g(t,i):void 0,C=S?.displayName??`Unknown Agent`;return(0,q.jsxs)(`div`,{className:`mx-auto max-w-4xl space-y-4`,children:[(0,q.jsx)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4`,children:(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[S?.icon?(0,q.jsx)(b,{icon:S.icon,iconColored:S.iconColored,alt:C,className:`size-6 object-contain`}):null,(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h3`,{className:`console-mono text-sm font-semibold text-[var(--console-text)]`,children:C}),(0,q.jsx)(`p`,{className:`console-mono text-xs text-[var(--console-muted)]`,children:`Select a session from the left to view details`})]})]})}),(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-4`,children:[(0,q.jsx)(Ky,{label:`Sessions`,value:f(n.length)}),(0,q.jsx)(Ky,{label:`Messages`,value:f(d)}),(0,q.jsx)(Ky,{label:`Tokens`,value:f(p)}),(0,q.jsx)(Ky,{label:`Total Cost`,value:h(m),hint:_(y)})]}),(0,q.jsx)(Xy,{sessions:u,isBookmarked:s,onToggleBookmark:c})]})}var Qy=[{id:`1`,roleWidth:`w-14`,timeWidth:`w-20`,bodyWidths:[`w-full`,`w-10/12`,`w-7/12`]},{id:`2`,roleWidth:`w-16`,timeWidth:`w-24`,bodyWidths:[`w-9/12`,`w-7/12`]},{id:`3`,roleWidth:`w-14`,timeWidth:`w-16`,bodyWidths:[`w-full`,`w-11/12`,`w-8/12`,`w-5/12`]},{id:`4`,roleWidth:`w-16`,timeWidth:`w-20`,bodyWidths:[`w-10/12`,`w-8/12`]},{id:`5`,roleWidth:`w-14`,timeWidth:`w-24`,bodyWidths:[`w-full`,`w-10/12`,`w-9/12`]}];function $y({className:e}){return(0,q.jsx)(`div`,{className:`rounded-sm bg-[var(--console-border)] ${e}`})}function eb(){return(0,q.jsxs)(`div`,{className:`mx-auto flex min-h-full w-full max-w-5xl flex-col gap-8 px-2 md:px-4`,children:[(0,q.jsx)(`div`,{className:`flex flex-1 flex-col gap-8`,children:Qy.map(e=>(0,q.jsx)(`article`,{className:`w-full border-l-2 border-[var(--console-thread)] pl-4 pr-3 md:pr-5`,children:(0,q.jsxs)(`div`,{className:`flex gap-4`,children:[(0,q.jsx)(`div`,{className:`shrink-0 pt-1`,children:(0,q.jsx)(`div`,{className:`flex size-8 items-center justify-center rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)]`,children:(0,q.jsx)(`div`,{className:`size-3.5 rounded-sm bg-[var(--console-border-strong)] animate-pulse motion-reduce:animate-none`})})}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)($y,{className:`${e.roleWidth} h-3 animate-pulse motion-reduce:animate-none`}),(0,q.jsx)($y,{className:`${e.timeWidth} h-2.5 animate-pulse motion-reduce:animate-none`})]}),(0,q.jsx)(`div`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-4 shadow-[0_1px_2px_rgba(15,23,42,0.04)]`,children:(0,q.jsx)(`div`,{className:`space-y-2`,children:e.bodyWidths.map(t=>(0,q.jsx)($y,{className:`${t} h-3 animate-pulse motion-reduce:animate-none`},`${e.id}-${t}`))})})]})]})},e.id))}),(0,q.jsx)(`div`,{className:`min-h-24 flex-1 rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)]/60 animate-pulse motion-reduce:animate-none`})]})}var tb=(0,K.lazy)(()=>P(()=>import(`./Dashboard-wjTLT17d.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),nb=(0,K.lazy)(()=>P(()=>import(`./Projects-DBxubQuM.js`).then(e=>({default:e.ProjectsOverview})),__vite__mapDeps([8,1,2,3,4,5,0,6,7]))),rb=(0,K.lazy)(()=>P(()=>import(`./Projects-DBxubQuM.js`).then(e=>({default:e.ProjectDashboardView})),__vite__mapDeps([8,1,2,3,4,5,0,6,7]))),ib=(0,K.lazy)(()=>P(()=>import(`./SessionDetail-CgR7ipmi.js`).then(e=>({default:e.SessionDetail})),__vite__mapDeps([9,1,2,3,10,7,11]))),ab=(0,K.lazy)(()=>P(()=>import(`./SearchResultsPanel-Clmf2xKw.js`).then(e=>({default:e.SearchResultsPanel})),__vite__mapDeps([12,1,3,4,5,13])));function ob({children:e}){return(0,q.jsx)(Ue,{children:(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(eb,{}),children:e})})}function sb({loading:e,error:t,viewState:n,detailHighlightQuery:r,agents:i,agentCatalog:a,agentNameMap:o,projects:s,landingSessions:c,sessionsByAgent:l,activeProject:u,activeProjectSessions:d,dashboard:f,sessionDetail:p,projectDashboard:m,search:h,bookmarks:g}){let _=(0,K.useMemo)(()=>i.map(e=>({key:e.name.toLowerCase(),name:e.displayName,icon:e.icon,iconColored:e.iconColored,count:e.count})),[i]);return e?(0,q.jsx)(eb,{}):h.active?(0,q.jsx)(re,{id:`SearchResultsPanel`,detail:{results:h.state.status===`loaded`?h.state.results.length:0,loading:h.state.status===`loading`},children:(0,q.jsx)(ob,{children:(0,q.jsx)(ab,{query:h.query,state:h.state,agentNameMap:o,agents:i,projects:h.projectOptions,filters:h.filters,onChangeFilters:h.onChangeFilters,onOpenResult:h.onClose,onRetry:h.onRetry,selectedIndex:h.selectedIndex,registerResultRef:h.registerResultRef})})}):t?(0,q.jsx)(`div`,{className:`mx-auto max-w-4xl rounded-sm border border-[var(--console-error-border)] bg-[var(--console-error-bg)] p-6 text-sm text-[var(--console-error)]`,children:t}):n.mode===`root`?f?(0,q.jsx)(re,{id:`Dashboard`,detail:{sessions:f.totals.sessions,projects:s.length},children:(0,q.jsx)(ob,{children:(0,q.jsx)(tb,{data:f,agentCatalog:a,projects:s,bookmarkedSessions:g.sessions,isBookmarked:g.isBookmarked,onToggleBookmark:e=>{if(!(`bookmarkedAt`in e)){g.toggleSessionBookmark(e.session,e.reference.agentName);return}g.toggleBookmark(e)}})})}):(0,q.jsx)(Zy,{type:`global`,agentCatalog:a,sessions:c,agentItems:_,isBookmarked:g.isBookmarked,onToggleBookmark:e=>g.toggleSessionBookmark(e,e.agentKey)}):n.mode===`projects`?(0,q.jsx)(ob,{children:(0,q.jsx)(nb,{projects:s,agentCatalog:a})}):n.mode===`project`?(0,q.jsx)(ob,{children:(0,q.jsx)(rb,{project:u,agentCatalog:a,projectKey:n.activeProjectKey,dashboard:m.dashboard,loading:m.loading,error:m.error,sessions:d,activeAgent:m.selectedAgent,onChangeAgent:m.onChangeAgent,isBookmarked:g.isBookmarked,onToggleSessionBookmark:g.toggleSessionBookmark})}):n.mode===`agent`?(0,q.jsx)(Zy,{type:`agent`,agentCatalog:a,sessions:l.get(n.activeAgentKey)??[],agentItems:_,activeAgentKey:n.activeAgentKey,isBookmarked:g.isBookmarked,onToggleBookmark:e=>g.toggleSessionBookmark(e,e.agentKey)}):n.mode===`session`?p.loading?(0,q.jsx)(eb,{}):p.error||!p.session?(0,q.jsx)(Zy,{type:`missing-session`,agentCatalog:a,sessions:l.get(n.activeAgentKey)??[],agentItems:_,activeAgentKey:n.activeAgentKey,attemptedSessionId:n.activeSessionId,isBookmarked:g.isBookmarked,onToggleBookmark:e=>g.toggleSessionBookmark(e,e.agentKey)}):(0,q.jsx)(re,{id:`SessionDetail`,detail:{messages:p.session.messages.length,session:p.session.id},children:(0,q.jsx)(ob,{children:(0,q.jsx)(ib,{session:p.session,agentCatalog:a,highlightQuery:r},`${p.session.reference.agentName}/${p.session.reference.sessionId}`)})}):n.mode===`missingAgent`?(0,q.jsx)(Zy,{type:`missing-agent`,agentCatalog:a,sessions:c,agentItems:_,attemptedAgentKey:n.attemptedKey,isBookmarked:g.isBookmarked,onToggleBookmark:e=>g.toggleSessionBookmark(e,e.agentKey)}):(0,q.jsx)(`div`,{className:`text-sm text-[var(--console-muted)]`,children:`Invalid route.`})}function cb(){let e=Vn(),t=ac(),n=Tc(t.config?.window),{timeWindow:r}=n,{activeAgents:i,agentCatalog:a,sessions:s,projects:c,dashboard:u,window:d,validAgentKeys:f,agentNameMap:p,loading:m,error:h,reload:_,applyLiveEvent:v,resyncLiveState:y}=t;sc({window:r,reload:_});let[b,x]=(0,K.useState)(null),{scanStatus:S,setScanStatus:T}=js(),[E,D]=(0,K.useState)(null),[O,A]=(0,K.useState)(!1),{shortcutHintDismissed:j,sidebarCollapsed:M,theme:N,dismissShortcutHint:P,setSidebarCollapsed:I,setTheme:L}=Ic(),ee=tr(N),[te,R]=(0,K.useState)(null),z=Nn(),B=Pn(),V=(0,K.useMemo)(()=>As(B,f),[B,f]),ne=Ps(V),{session:ie,sessionError:H}=ne;(0,K.useEffect)(()=>{An(`route.change`,{path:z.pathname,mode:V.mode,agent:V.activeAgentKey,session:V.activeSessionId})},[z.pathname,V.mode,V.activeAgentKey,V.activeSessionId]),(0,K.useEffect)(()=>{V.mode===`project`&&x({kind:V.activeProjectKind,key:V.activeProjectKey})},[V]);let ae=(0,K.useMemo)(()=>Wn(s,i),[s,i]),oe=Bs(ae,d),{draftSearchQuery:se,activeSearchQuery:ce,searchMode:le,searchState:ue,searchResults:de,searchLoading:fe,selectedSearchIndex:pe,searchInputRef:me,setDraftSearchQuery:U,setSelectedSearchIndex:he,openSearch:ge,submitSearch:_e,closeSearch:ve}=oe,ye=le,be=ye?ce:typeof z.state==`object`&&z.state!==null&&`searchQuery`in z.state&&typeof z.state.searchQuery==`string`?z.state.searchQuery:``,xe=Gs(s),{bookmarkedSessions:Se,isSessionBookmarked:Ce,toggleBookmark:we,toggleSessionBookmark:Te,refresh:Ee}=xe,De=V.mode===`project`?V.activeProjectKind:null,Oe=V.mode===`project`?V.activeProjectKey:null,W=Ks(d,(0,K.useMemo)(()=>({projectKind:De??void 0,projectKey:Oe??void 0,identityKey:De&&Oe?C({kind:De,key:Oe}):void 0}),[Oe,De])),{browseBy:ke,selectBrowseBy:Ae,activeAgentKey:je,activeAgent:Me,activeProject:Ne,activeProjectSessions:Pe,openedSessionProjectIdentity:Fe,selectedProjectNavigation:Ie,sidebarSessions:Le,sidebarSessionLookup:Re,bookmarkedSidebarSessionReferences:ze}=Xs({viewState:V,sessionIndexes:ae,session:ie,agents:i,projects:c,selectedProjectAgent:W.selectedAgent,isSessionBookmarked:Ce}),Be=Ie?.identity??null,Ve=Ie?.identityKey??null,He=(0,K.useCallback)(t=>{D(Hn(t)),e(w(t))},[e]),We=(0,K.useCallback)(e=>{Te(e,k(e))},[Te]),Ge=(0,K.useCallback)(e=>{R({agentKey:k(e),sessionId:e.id,title:e.title,displayTitle:e.display_title})},[]),Ke=(0,K.useCallback)(e=>{R({agentKey:e.reference.agentName,sessionId:e.reference.sessionId,title:e.session.title,displayTitle:e.session.display_title})},[]),qe=(0,K.useCallback)(t=>{D(Hn(t)),e(w(t))},[e]),Je=xs(S),Ye=S?[S.phase,S.scanningAgents[0]??``,S.completedAgents.length,S.totalAgents,S.backfill.active,S.backfill.currentAgent??``,S.backfill.pendingAgents.length,S.backfill.failedAgents.length].join(`|`):null,[G,Xe]=(0,K.useState)(Ye),[Ze,Qe]=(0,K.useState)(Je);Ye!==G&&(Xe(Ye),Qe(Je));let $e=S?.active===!0,{liveNotice:et}=lc({applyLiveEvent:v,resyncLiveState:y,setScanStatus:T}),{saveAlias:tt,removeAlias:nt}=oc((0,K.useCallback)(async()=>{await Promise.all([r?_(r):void 0,Ee()])},[Ee,_,r])),rt=(0,K.useCallback)(async e=>{te&&await tt(te,e)},[te,tt]),it=(0,K.useCallback)(async()=>{te&&await nt(te)},[te,nt]);(0,K.useEffect)(()=>{if(!ye){if(V.mode===`session`){D(F(V.activeAgentKey,V.activeSessionId));return}if(V.mode===`agent`){D(null);return}D(null)}},[ye,V.mode,V.activeAgentKey,V.activeSessionId,Le]);let at=Lc({viewState:V,browseBy:ke,isSearchMode:ye,searchSubtitle:ue.status===`failed`?`Search failed for "${ce}"`:bs(ce,fe,de.length),dashboard:u,projects:c,sessionCount:s.length,activeProject:Ne?.project??null,activeAgent:Me,sidebarSessionCount:Le.length,session:ie,sessionError:H,selectedProjectIdentity:Be,selectedProject:Ie?.project??null}),ot=(0,q.jsx)(sb,{loading:m,error:h,viewState:V,detailHighlightQuery:be,agents:i,agentCatalog:a,agentNameMap:p,projects:c,landingSessions:ae.landingSessions,sessionsByAgent:ae.byLandingAgent,activeProject:Ne?.project??null,activeProjectSessions:Pe,dashboard:u,sessionDetail:{session:ne.session,loading:ne.sessionLoading,error:ne.sessionError},projectDashboard:{dashboard:W.dashboard,loading:W.loading,error:W.error,selectedAgent:W.selectedAgent,onChangeAgent:W.setSelectedAgent},search:{active:oe.searchMode,query:oe.activeSearchQuery,state:oe.searchState,projectOptions:oe.projectOptions,filters:oe.searchFilters,onChangeFilters:oe.setSearchFilters,onClose:oe.closeSearch,onRetry:oe.retrySearch,selectedIndex:oe.selectedSearchIndex,registerResultRef:oe.registerResultRef},bookmarks:{sessions:xe.bookmarkedSessions,isBookmarked:xe.isSessionBookmarked,toggleBookmark:xe.toggleBookmark,toggleSessionBookmark:xe.toggleSessionBookmark}});function st(t){if(!(t===`projects`&&$e)){if(Ae(t),D(null),t===`projects`){let t=Fe??(V.mode===`session`?null:b);e(t?jn(t):`/projects`);return}e(`/`)}}return dc({viewState:V,browseBy:ke,navigate:e,activeAgentKey:je,sidebarSessions:Le,sidebarSessionLookup:Re,selectedSidebarSessionReference:E,setSelectedSidebarSessionReference:D,selectedProjectNavigationIdentity:Be,shortcutHelpOpen:O,setShortcutHelpOpen:A,dismissShortcutHint:P,isSearchMode:ye,activeSearchQuery:ce,searchResults:de,selectedSearchIndex:pe,setSelectedSearchIndex:he,setDraftSearchQuery:U,openSearch:ge,closeSearch:ve}),(0,q.jsx)(nr.Provider,{value:ee,children:(0,q.jsxs)(`div`,{className:`console-ui flex h-screen flex-col overflow-hidden bg-[var(--console-bg)] text-[var(--console-text)]`,children:[(0,q.jsx)(`a`,{href:`#main`,className:`console-mono sr-only rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface)] px-3 py-1.5 text-xs text-[var(--console-text)] focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[60] focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2 focus-visible:outline-none`,children:`Skip to content`}),(0,q.jsx)(`header`,{className:`shrink-0 border-b border-[var(--console-border)] bg-[var(--console-surface)]/85 backdrop-blur-sm`,children:(0,q.jsxs)(`div`,{className:`grid min-h-14 grid-cols-[auto_1fr] items-center gap-3 px-4 py-2 sm:grid-cols-[auto_1fr_auto] sm:py-0`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-expanded":!M,"aria-label":M?`Expand sidebar`:`Collapse sidebar`,title:M?`Expand sidebar`:`Collapse sidebar`,onClick:()=>I(!M),className:`hidden rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] p-1.5 text-[var(--console-muted)] motion-hover hover:bg-[var(--console-surface-muted)] hover:text-[var(--console-text)] lg:inline-flex`,children:M?(0,q.jsx)(l,{className:`size-4`}):(0,q.jsx)(o,{className:`size-4`})}),(0,q.jsxs)(Bn,{to:`/`,className:`flex items-center gap-2 text-[var(--console-text)]`,children:[(0,q.jsx)(`img`,{src:`/logo.svg?v=3`,alt:`CodeSesh`,className:`h-6 w-6 rounded-sm`}),(0,q.jsx)(`span`,{className:`console-mono text-sm font-semibold uppercase tracking-[0.05em]`,children:`CodeSesh`})]})]}),(0,q.jsxs)(`form`,{className:`order-3 col-span-2 flex w-full items-center justify-center gap-2 sm:order-none sm:col-span-1 sm:mx-auto sm:max-w-[560px]`,onSubmit:e=>{e.preventDefault(),_e()},children:[(0,q.jsxs)(`label`,{className:`flex min-w-0 flex-1 items-center rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-2 py-1 focus-within:border-[var(--console-border-strong)] focus-within:ring-2 focus-within:ring-[var(--console-accent)] focus-within:ring-offset-2`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:`Search Sessions`}),(0,q.jsx)(`input`,{ref:me,type:`search`,name:`session-search`,autoComplete:`off`,value:se,onChange:e=>U(e.target.value),placeholder:`Search sessions… /`,className:`console-mono w-full min-w-0 bg-transparent text-xs text-[var(--console-text)] outline-none placeholder:text-[var(--console-muted)]`})]}),(0,q.jsx)(`button`,{type:`submit`,className:`console-mono rounded-sm border border-[var(--console-border-strong)] bg-[var(--console-surface-muted)] px-3 py-1 text-xs text-[var(--console-text)] motion-hover hover:bg-[var(--console-surface)] focus-visible:ring-2 focus-visible:ring-[var(--console-accent)] focus-visible:ring-offset-2 focus-visible:outline-none`,children:`Search`})]}),(0,q.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,q.jsx)(Wy,{theme:N,onChange:L}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{A(!0),P()},className:`console-mono rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-2 py-1 text-xs text-[var(--console-text)] motion-hover hover:bg-[var(--console-surface-muted)]`,title:`Show keyboard shortcuts`,children:[`?`,(0,q.jsx)(`span`,{className:`hidden sm:inline`,children:` Shortcuts`})]}),r&&n.preset?(0,q.jsx)(ws,{window:r,preset:n.preset,customFrom:n.customFrom,customTo:n.customTo,onSelectPreset:n.selectPreset,onSelectCustom:n.selectCustom}):null,(0,q.jsxs)(`span`,{className:`console-mono hidden rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-xs text-[var(--console-muted)] sm:inline-flex`,children:[`v`,`0.18.0`]})]})]})}),(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1`,children:[(0,q.jsx)(Ry,{model:{sidebarCollapsed:M,browseBy:ke,isScanActive:$e,viewState:V,agents:i,agentCatalog:a,activeAgentKey:je,scanStatus:S,projects:c,selectedProjectNavigationId:Ve,loading:m,bookmarkedSessions:Se,sidebarSessions:Le,selectedSidebarSessionReference:E,bookmarkedSidebarSessionReferences:ze},actions:{onChangeBrowseBy:st,onSelectProject:x,onToggleBookmark:we,onSelectFlatSidebarSession:He,onToggleSidebarSessionBookmark:We,onRenameSession:Ge,onRenameBookmarkedSession:Ke,onSelectTreeSidebarSession:qe}}),(0,q.jsxs)(`main`,{id:`main`,tabIndex:-1,className:`flex min-w-0 flex-1 flex-col outline-none`,children:[(0,q.jsx)(`section`,{className:`shrink-0 border-b border-[var(--console-border)] bg-[var(--console-surface)]/70 px-4 py-4 backdrop-blur-sm md:px-8`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`nav`,{"aria-label":`Breadcrumb`,className:`console-mono mb-2 flex flex-wrap items-center gap-1 text-[11px] text-[var(--console-muted)]`,children:at.breadcrumbs.map((e,t)=>(0,q.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e.to?(0,q.jsx)(Bn,{to:e.to,className:`motion-hover hover:text-[var(--console-text)]`,children:e.label}):(0,q.jsx)(`span`,{className:`text-[var(--console-text)]`,children:e.label}),t<at.breadcrumbs.length-1?(0,q.jsx)(`span`,{children:`/`}):null]},`${e.label}-${t}`))}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`console-mono rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-1.5 py-0.5 text-[10px] font-bold uppercase text-[var(--console-muted)]`,children:at.contextLabel}),(0,q.jsx)(`h1`,{className:`console-mono text-xl font-semibold tracking-tight text-[var(--console-text)]`,children:at.title})]}),(0,q.jsx)(`div`,{className:`console-mono mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-[var(--console-muted)]`,children:at.subtitle}),(0,q.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-2`,children:[j?null:(0,q.jsxs)(`div`,{className:`console-mono inline-flex items-center gap-2 rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-[11px] text-[var(--console-text)]`,children:[(0,q.jsx)(`span`,{children:`Keyboard navigation available`}),(0,q.jsx)(`span`,{className:`rounded-sm border border-[var(--console-border)] bg-[var(--console-surface)] px-1`,children:`?`}),(0,q.jsx)(`button`,{type:`button`,onClick:P,className:`text-[var(--console-muted)] motion-hover hover:text-[var(--console-text)]`,"aria-label":`Dismiss keyboard shortcuts hint`,children:`×`})]}),!ye&&V.mode===`session`?(0,q.jsx)(`span`,{className:`console-mono inline-flex rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-[11px] text-[var(--console-muted)]`,children:`Esc back`}):null,!ye&&V.mode===`session`&&ie?(0,q.jsx)(Yi,{resumeCommandPrefix:g(a,V.activeAgentKey)?.resumeCommandPrefix??null,sessionId:ie.id,directory:ie.directory}):null]}),(0,q.jsx)(`div`,{"aria-live":`polite`,children:et?(0,q.jsx)(`p`,{className:`console-mono mt-2 inline-flex rounded-sm border border-[var(--console-border)] bg-[var(--console-surface-muted)] px-2 py-1 text-[11px] text-[var(--console-text)]`,children:et}):null}),(0,q.jsx)(`div`,{children:Je&&V.mode===`root`?(0,q.jsx)(`p`,{className:`console-mono mt-2 inline-flex max-w-4xl rounded-sm border border-[var(--console-warning-border)] bg-[var(--console-warning-bg)] px-2 py-1 text-[11px] leading-relaxed text-[var(--console-warning)]`,children:Je}):null}),(0,q.jsx)(`div`,{className:`sr-only`,"aria-live":`polite`,"aria-atomic":`true`,children:V.mode===`root`?Ze:null})]})}),(0,q.jsx)(`section`,{className:`console-scrollbar bg-grid min-h-0 flex-1 overflow-y-auto px-4 py-6 md:px-8`,children:(0,q.jsx)(Ue,{children:(0,q.jsx)(re,{id:`MainContent`,detail:{mode:V.mode,search:ye,sessions:s.length},children:ot})})})]})]}),(0,q.jsx)(By,{open:O,onClose:()=>A(!1)}),(0,q.jsx)(_s,{target:te,onClose:()=>R(null),onSave:rt,onRemove:it})]})})}function lb(){let e=Rn();return(0,q.jsx)(`div`,{role:`alert`,children:Gn(e)?`${e.status} ${e.statusText}`:`The application route failed to render.`})}var ub=Mn([{id:`app-shell`,path:`/`,Component:cb,ErrorBoundary:lb,loader:Os,children:Es}]);function db(){return(0,q.jsx)(Gi,{router:ub})}Be(),Ii.createRoot(document.getElementById(`root`)).render((0,q.jsx)(K.StrictMode,{children:(0,q.jsx)(yi,{client:Ui,children:(0,q.jsx)(re,{id:`App`,children:(0,q.jsx)(db,{})})})}));