gitnexus 1.6.12-rc.21 → 1.6.12-rc.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-C2n33ANd.js","assets/rolldown-runtime-QTnfLwEv.js","assets/src-jc8Ffy3T.js","assets/preload-helper-Czpn1I53.js","assets/error-D9MtuG9s.js","assets/context-builder-BHiFUA8O.js","assets/ProcessFlowModal-DAeX2BHW.js","assets/chunk-AQ6EADP3-CZhslHi-.js","assets/chunk-H7VHZCWX-CE1nAmt6.js","assets/chunk-QJSWEUOL-D_rf9gPD.js","assets/chunk-IJBDOHL6-BUKtY6oF.js","assets/chunk-4CAJECRU-DRYMwG9z.js","assets/chunk-5IMINLNL-DOdTeQri.js","assets/chunk-ZNLK7HRR-B0iFpmW4.js","assets/chunk-2NMSUPJH-B24w-wng.js","assets/chunk-STOV2HOB-GnExfzIX.js","assets/chunk-VY2OSTJR-Dkgc3Brg.js","assets/chunk-DZP67EKU-B3Mt380j.js","assets/chunk-Z6V44ARX-BjCEsF0Q.js","assets/chunk-VRZKL3EH-DB3KixTQ.js","assets/chunk-ZQN7UHIL-Cy7KAjQt.js","assets/chunk-4OADUZ5Q-CxrSvOwZ.js","assets/chunk-WUBWJARI-7FwILJ3k.js","assets/chunk-NUDPKBEF-CU1-BQIW.js","assets/chunk-YDMLL4PJ-IHhMngTz.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/agent-DuBBkGz1.js","assets/rolldown-runtime-QTnfLwEv.js","assets/src-jc8Ffy3T.js","assets/preload-helper-Czpn1I53.js","assets/error-D9MtuG9s.js","assets/context-builder-BHiFUA8O.js","assets/ProcessFlowModal-DAeX2BHW.js","assets/chunk-AQ6EADP3-CZhslHi-.js","assets/chunk-H7VHZCWX-CE1nAmt6.js","assets/chunk-QJSWEUOL-D_rf9gPD.js","assets/chunk-IJBDOHL6-BUKtY6oF.js","assets/chunk-4CAJECRU-DRYMwG9z.js","assets/chunk-5IMINLNL-DOdTeQri.js","assets/chunk-ZNLK7HRR-B0iFpmW4.js","assets/chunk-2NMSUPJH-B24w-wng.js","assets/chunk-STOV2HOB-GnExfzIX.js","assets/chunk-VY2OSTJR-Dkgc3Brg.js","assets/chunk-DZP67EKU-B3Mt380j.js","assets/chunk-Z6V44ARX-BjCEsF0Q.js","assets/chunk-VRZKL3EH-DB3KixTQ.js","assets/chunk-ZQN7UHIL-Cy7KAjQt.js","assets/chunk-4OADUZ5Q-CxrSvOwZ.js","assets/chunk-WUBWJARI-7FwILJ3k.js","assets/chunk-NUDPKBEF-CU1-BQIW.js","assets/chunk-YDMLL4PJ-IHhMngTz.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,r as t,t as n}from"./rolldown-runtime-QTnfLwEv.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,p as m,r as h,s as g,t as _,u as v}from"./ProcessFlowModal-DAeX2BHW.js";import{a as y,c as b,d as x,f as S,g as C,h as w,i as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N}from"./src-jc8Ffy3T.js";import{t as P}from"./preload-helper-Czpn1I53.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 F=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}}}})),I=n(((e,t)=>{t.exports=F()})),L=n((e=>{var t=r();function n(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 i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.8`})),ee=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=L()})),te=n((e=>{var t=I(),n=r(),i=ee();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`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),C=Symbol.for(`react.suspense`),w=Symbol.for(`react.suspense_list`),T=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),O=Symbol.for(`react.memo_cache_sentinel`),k=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=k&&e[k]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case C:return`Suspense`;case w:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case T:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Kd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),ep._currentValue=L)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!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(`
@@ -9,9 +9,9 @@ Error generating stack: `+e.message+`
9
9
  `+e.stack}}var ve=Object.prototype.hasOwnProperty,ye=t.unstable_scheduleCallback,be=t.unstable_cancelCallback,xe=t.unstable_shouldYield,Se=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(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 Ue(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=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(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 We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(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 Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(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-Fe(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&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(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:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(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 et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:gp(e.type)):e}function nt(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hf(e);e!==null;){if(n=e[it])return n;e=hf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=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]*$`),Ct={},V={};function wt(e){return ve.call(V,e)?!0:ve.call(Ct,e)?!1:St.test(e)?V[e]=!0:(Ct[e]=!0,!1)}function Tt(e,t,n){if(wt(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 Et(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 Dt(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 Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(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 jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Nt(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 Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(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=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(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=``+Ot(s):e.removeAttribute(`name`)}function Lt(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)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(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),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(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=``+Ot(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 Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=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 Wt(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||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(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&&Wt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(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 qt=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`]]),Jt=/^[\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 Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(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="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[at]||null;if(!i)throw Error(a(90));It(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&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(xu(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||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 on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.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 dn=i.slice(e,1<r?1-r:void 0)}function pn(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 mn(){return!0}function hn(){return!1}function gn(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)?mn:hn,this.isPropagationStopped=hn,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=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=p({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=p({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(p({},wn,{dataTransfer:0})),Dn=gn(p({},yn,{relatedTarget:0})),On=gn(p({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(p({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(p({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(p({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(p({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(p({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(p({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(p({},wn,{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})),Vn=gn(p({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],Un=on&&`CompositionEvent`in window,Wn=null;on&&`documentMode`in document&&(Wn=document.documentMode);var Gn=on&&`TextEvent`in window&&!Wn,Kn=on&&(!Un||Wn&&8<Wn&&11>=Wn),qn=` `,Jn=!1;function Yn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(Jn=!0,qn):null;case`textInput`:return e=t.data,e===qn&&Jn?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Un&&Yn(e,t)?(e=fn(),dn=un=ln=null,Zn=!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 Kn&&t.locale!==`ko`?null:t.data;default:return null}}var er={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 tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=kd(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function ar(e){xd(e,0)}function or(e){if(Mt(ht(e)))return e}function sr(e,t){if(e===`change`)return t}var cr=!1;if(on){var lr;if(on){var ur=`oninput`in document;if(!ur){var dr=document.createElement(`div`);dr.setAttribute(`oninput`,`return;`),ur=typeof dr.oninput==`function`}lr=ur}else lr=!1;cr=lr&&(!document.documentMode||9<document.documentMode)}function fr(){rr&&(rr.detachEvent(`onpropertychange`,pr),ir=rr=null)}function pr(e){if(e.propertyName===`value`&&or(ir)){var t=[];nr(t,ir,e,Qt(e)),rn(ar,t)}}function mr(e,t,n){e===`focusin`?(fr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,pr)):e===`focusout`&&fr()}function hr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return or(ir)}function gr(e,t){if(e===`click`)return or(t)}function H(e,t){if(e===`input`||e===`change`)return or(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(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(!ve.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(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=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(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=Nt(e.document)}return t}function wr(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 Tr=on&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Nt(r)||(r=Er,`selectionStart`in r&&wr(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}),Or&&yr(Or,r)||(Or=r,r=kd(Dr,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};on&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`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(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),bt(t,[e])}var Kr=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)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[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&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(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-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<fu)throw fu=0,pu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(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 ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(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 si(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 ci(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=Gf(e,n,re.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=ii(31,n,t,i),e.elementType=D,e.lanes=o,e;case _:return li(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=ii(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case C:return e=ii(13,n,t,i),e.elementType=C,e.lanes=o,e;case w:return e=ii(19,n,t,i),e.elementType=w,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case T:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:_e(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:_e(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Fe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(a(519));function Fi(e){throw Vi(mi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:Sd(`cancel`,t),Sd(`close`,t);break;case`iframe`:case`object`:case`embed`:Sd(`load`,t);break;case`video`:case`audio`:for(n=0;n<yd.length;n++)Sd(yd[n],t);break;case`source`:Sd(`error`,t);break;case`img`:case`image`:case`link`:Sd(`error`,t),Sd(`load`,t);break;case`details`:Sd(`toggle`,t);break;case`input`:Sd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Sd(`invalid`,t);break;case`textarea`:Sd(`invalid`,t),Vt(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||Fd(t.textContent,n)?(r.popover!=null&&(Sd(`beforetoggle`,t),Sd(`toggle`,t)),r.onScroll!=null&&Sd(`scroll`,t),r.onScrollEnd!=null&&Sd(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||qd(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ai=mf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Ai=mf(e)}else t===27?(t=Ai,tf(e.type)?(e=pf,pf=null,Ai=e):Ai=t):Ai=ki?ff(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=R(null),Ui=null,Wi=null;function Gi(e,t,n){B(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,z(Hi)}function qi(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 Ji(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),qi(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),qi(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 Yi(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;vr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===oe.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[ep]:e.push(ep))}i=i.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(a(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=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()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=pd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(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 ma=P.S;P.S=function(e,t){tu=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=R(null);function ga(){var e=ha.current;return e===null?Ll.pooledCache:e}function _a(e,t){t===null?B(ha,ha.current):B(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(a(460)),ba=Error(a(474)),xa=Error(a(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);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,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(a(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(a(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(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 Pa(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=oi(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=ui(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===E&&Ta(a)===t.type)?(t=i(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(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=fi(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=li(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=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case g:return t=fi(t,e.mode,n),t.return=e,t;case E:return t=Ta(t),f(e,t,n)}if(N(t)||A(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===x)return f(e,$i(e,t),n);Na(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 E:return n=Ta(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===x)return p(e,t,$i(e,n),r);Na(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 E:return r=Ta(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===x)return m(e,t,n,$i(t,r),i);Na(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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),ji&&wi(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 ji&&wi(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)}),ji&&wi(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===E&&Ta(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(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=fi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ta(o),b(e,r,o,c)}if(N(o))return v(e,r,o,c);if(A(o)){if(l=A(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,ja(o),c);if(o.$$typeof===x)return b(e,r,$i(e,o),c);Na(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=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(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=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(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,Ze(e,n)}}function Ua(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 Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!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?(Y&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!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:La=!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),Kl|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=R(null),Xa=R(0);function Za(e,t){e=Wl,B(Xa,e),B(Ya,t),Wl=e|t.baseLanes}function Qa(){B(Xa,Wl),B(Ya,Ya.current)}function $a(){Wl=Xa.current,z(Ya),z(Xa)}var U=R(null),eo=null;function W(e){var t=e.alternate;B(ao,ao.current&1),B(U,e),eo===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(eo=e)}function to(e){B(ao,ao.current),B(U,e),eo===null&&(eo=e)}function no(e){e.tag===22?(B(ao,ao.current),B(U,e),eo===null&&(eo=e)):ro(e)}function ro(){B(ao,ao.current),B(U,U.current)}function io(e){z(U),eo===e&&(eo=null),z(ao)}var ao=R(0);function oo(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 so=0,G=null,co=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(a(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return so=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){P.H=Is;var t=co!==null&&co.next!==null;if(so=0,lo=co=G=null,uo=!1,ho=0,go=null,t)throw Error(a(300));e===null||tc||(e=e.dependencies,e!==null&&Xi(e)&&(tc=!0))}function So(e,t,n,r){G=e;var i=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=i)throw Error(a(301));if(i+=1,lo=co=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=zs,o=t(n,r)}while(fo);return o}function Co(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(co===null?null:co.memoizedState)!==e&&(G.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}so=0,lo=co=G=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?G.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(co===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=co.next;var t=lo===null?G.memoizedState:lo.next;if(t!==null)lo=t,co=e;else{if(e===null)throw G.alternate===null?Error(a(467)):Error(a(310));co=e,e={memoizedState:co.memoizedState,baseState:co.baseState,baseQueue:co.baseQueue,queue:co.queue,next:null},lo===null?G.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=wa(go,e,t),t=G,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===x)return Qi(e)}throw Error(a(438,String(e)))}function Mo(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.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=ko(),G.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]=O;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),co,e)}function Fo(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?(so&f)===f:(Y&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===la&&(d=!0);else if((so&p)===p){u=u.next,p===la&&(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,G.lanes|=p,Kl|=p;f=u.action,po&&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,G.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(tc=!0,d&&(n=ua,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 Io(e){var t=Oo(),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);vr(o,t.memoizedState)||(tc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Lo(e,t,n){var r=G,i=Oo(),o=ji;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!vr((co||i).memoizedState,n);if(s&&(i.memoizedState=n,tc=!0),i=i.queue,cs(Bo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,i,n,t),null),Ll===null)throw Error(a(349));o||so&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=ko(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Ho(e){var t=$r(e,2);t!==null&&gu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,co,typeof r==`function`?r:No)}function Go(e,t,n,r,i){if(Ns(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)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ko(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(ji){var n=Ll.formState;if(n!==null){a:{var r=G;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=ff(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=ff(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,G,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,G,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),co,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===ya?xa:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=co;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=ko(),G.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 is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();G.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;co!==null&&r!==null&&yo(r,co.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(G.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=ko(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(Il&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(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 ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||so&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=hu(),G.lanes|=e,Kl|=e,n)}function ys(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(so&42)||so&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=hu(),G.lanes|=e,Kl|=e,t):(e=vs(e,n,r),vr(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ms(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,pa(c,r),mu(e)):js(e,t,r,mu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Cs(e).queue;bs(e,i,t,L,n===null?xs:function(){return ws(e),n(r)})}function Cs(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:No,lastRenderedState:L},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},mu())}function Ts(){return Qi(ep)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ba(n);var r=Va(t,e,n);r!==null&&(gu(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=Qr(e,t,n,r),n!==null&&(gu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,mu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(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,vr(s,o))return Zr(e,t,i,0),Ll===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return gu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(a(479))}else t=Qr(e,n,r,2),t!==null&&gu(t,e,2)}function Ns(e){var t=e.alternate;return e===G||t!==null&&t===G}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Is={readContext:Qi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Qi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Pe(!0);try{n(t)}finally{Pe(!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=ks.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,G,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,i=Do();if(ji){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ll===null)throw Error(a(349));Y&127||Ro(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ss(Bo.bind(null,r,o,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=Ll.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,G)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(Il&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Qi,use:jo,useCallback:gs,useContext:Qi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),co.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Qi,use:jo,useCallback:gs,useContext:Qi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return co===null?vs(n,e,t):ys(n,co.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return co===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,co,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(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 Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(gu(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=mu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(gu(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(gu(t,e,n),Ha(t,e,n))}};function Hs(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?!yr(n,r)||!yr(i,a):!0}function Us(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&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(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 Gs(e){Kr(e)}function Ks(e){console.error(e)}function qs(e){Kr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(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 Xs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=Ba(e),e.tag=3,e}function Qs(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(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,i,!0),n=U.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Ou():n.alternate===null&&Gl===0&&(Gl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),qu(e,r,i)),!1;case 22:return n.flags|=65536,r===Sa?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)),qu(e,r,i)),!1}throw Error(a(435,n.tag))}return qu(e,r,i),Ou(),!1}if(ji)return t=U.current,t===null?(r!==Pi&&(t=Error(a(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=mi(r,n),i=Xs(e.stateNode,r,i),Ua(e,i),Gl!==4&&(Gl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Pi&&(e=Error(a(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=mi(o,n),Zl===null?Zl=[o]:Zl.push(o),Gl!==4&&(Gl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Xs(n.stateNode,r,e),Ua(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`&&(iu===null||!iu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Zs(i),Qs(i,e,n,r),Ua(n,i),!1}n=n.return}while(n!==null);return!1}var ec=Error(a(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function rc(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 Zi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),wc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=ci(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?yr:n,n(o,r)&&e.ref===t.ref)return wc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Tc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,wc(e,t,i)}return pc(e,t,n,r,i)}function oc(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 cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?Qa():Za(t,a),no(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),Qa(),ro(t)):(_a(t,a.cachePool),Za(t,a),ro(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),Qa(),no(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function lc(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 uc(e,t,n){return Fa(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,io(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(to(t),(e=Ai)?(e=cf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(to(t),i)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(tc||Yi(e,t,n,!1),i=(n&e.childLanes)!==0,tc||i){if(r=Ll,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),gu(r,e,s),ec;Ou(),t=uc(e,t,n)}else e=o.treeContext,Ai=ff(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=lc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(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 pc(e,t,n,r,i){return Zi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),wc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,nc(e,t,n,i),t.child)}function K(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),wc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,nc(e,t,n,a),t.child)}function q(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,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=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(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&&Vs.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),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=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,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)&&Us(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=La||Hs(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,za(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,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)&&Us(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=La||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(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,fc(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=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=wc(e,t,i),e}function J(e,t,n,r){return zi(),t.flags|=256,nc(e,t,n,r),t.child}var mc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:va()}}function gc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),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:(ao.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ji){if(i?W(t):ro(t),(e=Ai)?(e=cf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return uf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(ro(t),i=t.mode,c=yc({mode:`hidden`,children:c},i),r=li(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,sc(null,r)):(W(t),vc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(W(t),t.flags&=-257,t=bc(e,t,n)):t.memoizedState===null?(ro(t),c=r.fallback,i=t.mode,r=yc({mode:`visible`,children:r.children},i),c=li(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=hc(n),r.childLanes=gc(e,s,n),t.memoizedState=mc,t=sc(null,r)):(ro(t),t.child=e.child,t.flags|=128,t=null);else if(W(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,Vi({value:r,source:null,stack:null}),t=bc(e,t,n)}else if(tc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,tc||s){if(s=Ll,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),gu(s,e,r),ec;lf(c)||Ou(),t=bc(e,t,n)}else lf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=ff(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=vc(t,r.children),t.flags|=4096);return t}return i?(ro(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,i,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=hc(n):(i=c.cachePool,i===null?i=va():(l=ia._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,sc(e.child,r)):(W(t),n=e.child,e=n.sibling,n=oi(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=ii(22,e,null,t),e.lanes=0,e}function bc(e,t,n){return Fa(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),qi(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=ao.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,B(ao,o),nc(e,t,r,n),r=ji?vi: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&&oo(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&&oo(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),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Yi(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=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(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&&Xi(e))):!0}function Ec(e,t,n){switch(t.tag){case 3:se(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:le(t);break;case 4:se(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,to(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(W(t),e=wc(e,t,n),e===null?null:e.sibling):_c(e,t,n):(W(t),t.flags|=128,null);W(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Yi(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(ao,ao.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return wc(e,t,n)}function Dc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Tc(e,n)&&!(t.flags&128))return tc=!1,Ec(e,t,n);tc=!!(e.flags&131072)}else tc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ws(e,r),t.tag=1,t=q(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===S){t.tag=11,t=rc(null,t,e,r,n);break a}else if(i===T){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=M(e)||e,Error(a(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ws(r,t.pendingProps),q(e,t,r,i,n);case 3:a:{if(se(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),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=J(e,t,r,n);break a}else if(r!==i){i=mi(Error(a(424)),t),Vi(i),t=J(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(Ai=ff(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===i){t=wc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=Nf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Wd(ae.current).createElement(n),r[it]=t,r[at]=e,Rd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=Nf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return le(t),e===null&&ji&&(r=t.stateNode=gf(t.type,t.pendingProps,ae.current),ki=t,Ni=!0,i=Ai,tf(t.type)?(pf=i,Ai=ff(r.firstChild)):Ai=i),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((i=r=Ai)&&(r=of(r,t.type,t.pendingProps,Ni),r===null?i=!1:(t.stateNode=r,ki=t,Ai=ff(r.firstChild),Ni=!1,i=!0)),i||Fi(t)),le(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,qd(i,o)?r=null:s!==null&&qd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=bo(e,t,Co,null,null,n),ep._currentValue=i),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=sf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return _c(e,t,n);case 4:return se(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Zi(t),i=Qi(i),r=r(i),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Cc(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(i=ga(),i===null&&(i=Ll,o=aa(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ra(t),Gi(t,ia,i)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Gi(t,ia,r),r!==i.cache&&Ji(t,[ia],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Gi(t,ia,r))),nc(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(Tu())e.flags|=8192;else throw Ea=Sa,ba}else e.flags&=-16777217}function Ac(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Kf(t))if(Tu())e.flags|=8192;else throw Ea=Sa,ba}function jc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,Xl|=t)}function Mc(e,t){if(!ji)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(Di(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),Ki(ia),ce(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Oc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),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(ue(t),n=ae.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=re.current,Ri(t)?Ii(t,e):(e=gf(i,r,n),t.stateNode=e,Oc(t))}return Nc(t),null;case 5:if(ue(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=re.current,Ri(t))Ii(t,o);else{var s=Wd(ae.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[it]=t,o[at]=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(Rd(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=ae.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=ki,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Fi(t,!0)}else e=Wd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(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[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(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=Ri(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[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),i=!1}else i=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(io(t),t):(io(t),null)}return io(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 ce(),e===null&&Td(t.stateNode.containerInfo),Nc(t),null;case 10:return Ki(t.type),Nc(t),null;case 19:if(z(ao),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(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(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;)si(n,e),n=n.sibling;return B(ao,ao.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>nu&&(t.flags|=128,i=!0,Mc(r,!1),t.lanes=4194304)}else{if(!i)if(e=oo(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&&!ji)return Nc(t),null}else 2*Ce()-r.renderingStartTime>nu&&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=Ce(),e.sibling=null,n=ao.current,B(ao,i?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return io(t),$a(),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(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Nc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Fc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),ce(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(ao),null;case 4:return ce(),null;case 10:return Ki(t.type),null;case 22:case 23:return io(t),$a(),e!==null&&z(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Ic(e,t){switch(Di(t),t.tag){case 3:Ki(ia),ce();break;case 26:case 27:case 5:ue(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:z(ao);break;case 10:Ki(t.type);break;case 22:case 23:io(t),$a(),e!==null&&z(ha);break;case 24:Ki(ia)}}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){Ku(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){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Ku(e,e.return,t)}}}function Bc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(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){Ku(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){Ku(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){Ku(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){Ku(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;zd(r,e.type,n,t),r[at]=t}catch(t){Ku(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tf(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&&tf(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=Xt));else if(r!==4&&(r===27&&tf(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&&tf(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]);Rd(t,r,n),t[it]=e,t[at]=n}catch(t){Ku(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,Hd=lp,e=Cr(e),wr(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(Ud={focusedElem:e,selectionRange:n},lp=!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=Ws(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ku(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){Ku(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ku(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{Ja(e,t)}catch(e){Ku(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=Xu.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&&ft(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(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,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;tf(n.type)&&(il=n.stateNode,al=!1),ol(e,t,n),_f(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){Ku(n,t,e)}else try{il.removeChild(n.stateNode)}catch(e){Ku(n,t,e)}break;case 18:il!==null&&(al?(e=il,nf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Fp(e)):nf(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{Fp(e)}catch(e){Ku(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{Fp(e)}catch(e){Ku(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=Zu.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(tf(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[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Rd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Uf(`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),Rd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Uf(`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),Rd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else Wf(i,e.type,e.stateNode);else e.stateNode=Rf(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?Wf(i,e.type,e.stateNode):Rf(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{Ht(i,``)}catch(t){Ku(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){Ku(e,e.return,t)}}break;case 3:if(Hf=null,i=pl,pl=bf(t.containerInfo),fl(t,e),pl=i,hl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fp(t.containerInfo)}catch(t){Ku(e,e.return,t)}Qc&&(Qc=!1,gl(e));break;case 4:r=pl,pl=bf(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)&&(eu=Ce()),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){Ku(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Ku(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?rf(m,!0):rf(l.stateNode,!1)}catch(e){Ku(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&&(Ht(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){Ku(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:_f(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){Ku(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++)qa(c[i],s)}catch(e){Ku(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&&oa(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&&oa(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&&oa(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){Ku(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&&qf(n,pl,e.memoizedState,e.memoizedProps);break;case 5:Dl(e,t,n);break;case 3:case 4:var r=pl;pl=bf(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:oa(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(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Fl=typeof WeakMap==`function`?WeakMap:Map,Il=0,Ll=null,Rl=null,Y=0,zl=0,Bl=null,Vl=!1,Hl=!1,Ul=!1,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,au=0,ou=null,su=null,cu=0,lu=0,uu=null,du=null,fu=0,pu=null;function mu(){return Il&2&&Y!==0?Y&-Y:P.T===null?tt():pd()}function hu(){if(Yl===0)if(!(Y&536870912)||ji){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),Yl=e}else Yl=536870912;return e=U.current,e!==null&&(e.flags|=32),Yl}function gu(e,t,n){(e===Ll&&(zl===2||zl===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),bu(e,Y,Yl,!1)),Je(e,n),(!(Il&2)||e!==Ll)&&(e===Ll&&(!(Il&2)&&(ql|=n),Gl===4&&bu(e,Y,Yl,!1)),ad(e))}function _u(e,t,n){if(Il&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||We(e,t),i=r?ju(e,t):ku(e,t,!0),o=r;do{if(i===0){Hl&&!r&&bu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!yu(n)){i=ku(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=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Cu(c,s).flags|=256),s=ku(c,s,!1),s!==2){if(Ul&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,i=4;break a}o=Ql,Ql=i,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Cu(e,0),bu(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:bu(r,t,Yl,!Vl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=eu+300-Ce(),10<i)){if(bu(r,t,Yl,!Vl),Ue(r,0,!0)!==0)break a;cu=t,r.timeoutHandle=Xd(vu.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,`Throttled`,-0,0),i);break a}vu(r,n,Ql,ru,$l,t,Yl,ql,Xl,Vl,o,null,-0,0)}}break}while(1);ad(e)}function vu(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:Xt},Ol(t,a,d);var m=(a&62914560)===a?eu-Ce():(a&4194048)===a?tu-Ce():0;if(m=Yf(d,m),m!==null){cu=a,e.cancelPendingCommit=m(Ru.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),bu(e,a,o,!l);return}}Ru(e,t,a,n,r,i,o,s,c)}function yu(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(!vr(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 bu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function xu(){return Il&6?!0:(od(0,!1),!1)}function Su(){if(Rl!==null){if(zl===0)var e=Rl.return;else e=Rl,Wi=Ui=null,Eo(e),ka=null,Aa=0,e=Rl;for(;e!==null;)Ic(e.alternate,e),e=e.return;Rl=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Zd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cu=0,Su(),Ll=e,Rl=n=oi(e.current,null),Y=t,zl=0,Bl=null,Vl=!1,Hl=We(e,t),Ul=!1,Xl=Yl=Jl=ql=Kl=Gl=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Wl=t,Xr(),n}function wu(e,t){G=null,P.H=Is,t===ya||t===xa?(t=Da(),zl=3):t===ba?(t=Da(),zl=4):zl=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Bl=t,Rl===null&&(Gl=1,Js(e,mi(t,e.current)))}function Tu(){var e=U.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Eu(){var e=P.H;return P.H=Is,e===null?Is:e}function Du(){var e=P.A;return P.A=Pl,e}function Ou(){Gl=4,Vl||(Y&4194048)!==Y&&U.current!==null||(Hl=!0),!(Kl&134217727)&&!(ql&134217727)||Ll===null||bu(Ll,Y,Yl,!1)}function ku(e,t,n){var r=Il;Il|=2;var i=Eu(),a=Du();(Ll!==e||Y!==t)&&(ru=null,Cu(e,t)),t=!1;var o=Gl;a:do try{if(zl!==0&&Rl!==null){var s=Rl,c=Bl;switch(zl){case 8:Su(),o=6;break a;case 3:case 2:case 9:case 6:U.current===null&&(t=!0);var l=zl;if(zl=0,Bl=null,Fu(e,s,c,l),n&&Hl){o=0;break a}break;default:l=zl,zl=0,Bl=null,Fu(e,s,c,l)}}Au(),o=Gl;break}catch(t){wu(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Il=r,P.H=i,P.A=a,Rl===null&&(Ll=null,Y=0,Xr()),o}function Au(){for(;Rl!==null;)Nu(Rl)}function ju(e,t){var n=Il;Il|=2;var r=Eu(),i=Du();Ll!==e||Y!==t?(ru=null,nu=Ce()+500,Cu(e,t)):Hl=We(e,t);a:do try{if(zl!==0&&Rl!==null){t=Rl;var o=Bl;b:switch(zl){case 1:zl=0,Bl=null,Fu(e,t,o,1);break;case 2:case 9:if(Ca(o)){zl=0,Bl=null,Pu(t);break}t=function(){zl!==2&&zl!==9||Ll!==e||(zl=7),ad(e)},o.then(t,t);break a;case 3:zl=7;break a;case 4:zl=5;break a;case 7:Ca(o)?(zl=0,Bl=null,Pu(t)):(zl=0,Bl=null,Fu(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?Kf(s):c.stateNode.complete){zl=0,Bl=null;var l=c.sibling;if(l!==null)Rl=l;else{var u=c.return;u===null?Rl=null:(Rl=u,Iu(u))}break b}}zl=0,Bl=null,Fu(e,t,o,5);break;case 6:zl=0,Bl=null,Fu(e,t,o,6);break;case 8:Su(),Gl=6;break a;default:throw Error(a(462))}}Mu();break}catch(t){wu(e,t)}while(1);return Wi=Ui=null,P.H=r,P.A=i,Il=n,Rl===null?(Ll=null,Y=0,Xr(),Gl):0}function Mu(){for(;Rl!==null&&!xe();)Nu(Rl)}function Nu(e){var t=Dc(e.alternate,e,Wl);e.memoizedProps=e.pendingProps,t===null?Iu(e):Rl=t}function Pu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=K(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=K(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:Ic(n,t),t=Rl=si(t,Wl),t=Dc(n,t,Wl)}e.memoizedProps=e.pendingProps,t===null?Iu(e):Rl=t}function Fu(e,t,n,r){Wi=Ui=null,Eo(t),ka=null,Aa=0;var i=t.return;try{if($s(e,i,t,n,Y)){Gl=1,Js(e,mi(n,e.current)),Rl=null;return}}catch(t){if(i!==null)throw Rl=i,t;Gl=1,Js(e,mi(n,e.current)),Rl=null;return}t.flags&32768?(ji||r===1?e=!0:Hl||Y&536870912?e=!1:(Vl=e=!0,(r===2||r===9||r===3||r===6)&&(r=U.current,r!==null&&r.tag===13&&(r.flags|=16384))),Lu(t,e)):Iu(t)}function Iu(e){var t=e;do{if(t.flags&32768){Lu(t,Vl);return}e=t.return;var n=Pc(t.alternate,t,Wl);if(n!==null){Rl=n;return}if(t=t.sibling,t!==null){Rl=t;return}Rl=t=e}while(t!==null);Gl===0&&(Gl=5)}function Lu(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);Gl=6,Rl=null}function Ru(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Uu();while(au!==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|=Yr,Ye(e,n,o,s,c,l),e===Ll&&(Rl=Ll=null,Y=0),su=t,ou=e,cu=n,lu=o,uu=i,du=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Qu(De,function(){return Wu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=Il,Il|=4;try{tl(e,t,n)}finally{Il=s,F.p=i,P.T=r}}au=1,zu(),Bu(),Vu()}}function zu(){if(au===1){au=0;var e=ou,t=su,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Il;Il|=4;try{ml(t,e);var a=Ud,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(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 _=xr(s,h),v=xr(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}}lp=!!Hd,Ud=Hd=null}finally{Il=i,F.p=r,P.T=n}}e.current=t,au=2}}function Bu(){if(au===2){au=0;var e=ou,t=su,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Il;Il|=4;try{nl(e,t.alternate,t)}finally{Il=i,F.p=r,P.T=n}}au=3}}function Vu(){if(au===4||au===3){au=0,Se();var e=ou,t=su,n=cu,r=du;t.subtreeFlags&10256||t.flags&10256?au=5:(au=0,su=ou=null,Hu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.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{P.T=t,F.p=i}}cu&3&&Uu(),ad(e),i=e.pendingLanes,n&261930&&i&42?e===pu?fu++:(fu=0,pu=e):fu=0,od(0,!1)}}function Hu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Uu(){return zu(),Bu(),Vu(),Wu()}function Wu(){if(au!==5)return!1;var e=ou,t=lu;lu=0;var n=et(cu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Il&6)throw Error(a(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,od(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{F.p=i,P.T=r,Hu(e,t)}}function Gu(e,t,n){t=mi(n,t),t=Xs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Je(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=mi(n,e),n=Zs(2),r=Va(t,n,2),r!==null&&(Qs(n,r,t,e),Je(r,2),ad(r));break}}t=t.return}}function qu(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)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>Ce()-eu?!(Il&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=Ke()),e=$r(e,t),e!==null&&(Je(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(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),Yu(e,n)}function Qu(e,t){return ye(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;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-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Y,a=Ue(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Yd()&&(e=id);for(var t=Ce(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ll,n=Y,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(zl===2||zl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&be(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&be(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=ud.bind(null,e),n=ye(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&be(r),e.callbackPriority=2,e.callbackNode=null,2}function ud(e,t){if(au!==0&&au!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Uu()&&e.callbackNode!==n)return null;var r=Y;return r=Ue(e,e===Ll?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(_u(e,r,t),ld(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?ud.bind(null,e):null)}function dd(e,t){if(Uu())return null;_u(e,t,!0)}function fd(){$d(function(){Il&6?ye(Te,sd):cd()})}function pd(){if(id===0){var e=la;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),id=e}return id}function md(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function hd(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 gd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=md((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?md(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(id!==0){var e=o?hd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?hd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var _d=0;_d<Wr.length;_d++){var vd=Wr[_d];Gr(vd.toLowerCase(),`on`+(vd[0].toUpperCase()+vd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var yd=`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(` `),bd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(yd));function xd(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){Kr(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){Kr(e)}i.currentTarget=null,a=c}}}}function Sd(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Ed(t,e,2,!1),n.add(r))}function Cd(e,t,n){var r=0;t&&(r|=4),Ed(n,e,r,t)}var wd=`_reactListening`+Math.random().toString(36).slice(2);function Td(e){if(!e[wd]){e[wd]=!0,vt.forEach(function(t){t!==`selectionchange`&&(bd.has(t)||Cd(t,!1,e),Cd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wd]||(t[wd]=!0,Cd(`selectionchange`,!1,t))}}function Ed(e,t,n,r){switch(gp(t)){case 2:var i=up;break;case 8:i=dp;break;default:i=fp}n=i.bind(null,t,n,e),i=void 0,!sn||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 Dd(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=pt(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}rn(function(){var r=a,i=Qt(n),o=[];a:{var c=Ur.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;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=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Ir:case Lr:case Rr:l=On;break;case Hr:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}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=an(m,p),g!=null&&d.push(Od(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!==Zt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))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?pt(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=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(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=Ad,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&&jd(o,c,l,d,!1),u!==null&&f!==null&&jd(o,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=sr;else if(tr(c))if(cr)v=H;else{v=hr;var y=mr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=sr):v=gr;if(v&&=v(e,r)){nr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(o,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(o,n,i)}var b;if(Un)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 Zn?Yn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Kn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Zn=!0)),y=kd(r,x),0<y.length&&(x=new An(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=Gn?Qn(e,n):$n(e,n))&&(x=kd(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),gd(o,e,r,n,i)}xd(o,t)})}function Od(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kd(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=an(e,n),i!=null&&r.unshift(Od(e,i,a)),i=an(e,t),i!=null&&r.push(Od(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ad(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jd(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=an(n,a),l!=null&&o.unshift(Od(n,l,c))):i||(l=an(n,a),l!=null&&o.push(Od(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Md=/\r\n?/g,Nd=/\u0000|\uFFFD/g;function Pd(e){return(typeof e==`string`?e:``+e).replace(Md,`
10
10
  `).replace(Nd,``)}function Fd(e,t){return t=Pd(t),Pd(e)===t}function Id(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(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=Yt(``+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`&&Id(e,t,`name`,i.name,i,null),Id(e,t,`formEncType`,i.formEncType,i,null),Id(e,t,`formMethod`,i.formMethod,i,null),Id(e,t,`formTarget`,i.formTarget,i,null)):(Id(e,t,`encType`,i.encType,i,null),Id(e,t,`method`,i.method,i,null),Id(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`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=Yt(``+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`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(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=qt.get(n)||n,Tt(e,n,r))}}function Ld(e,t,n,r,i,o){switch(n){case`style`:Gt(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`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&Sd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Sd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.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[at]||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,``):Tt(e,n,r)}}}function Rd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Sd(`error`,e),Sd(`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:Id(e,t,o,s,n,null)}}i&&Id(e,t,`srcSet`,n.srcSet,n,null),r&&Id(e,t,`src`,n.src,n,null);return;case`input`:Sd(`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:Id(e,t,r,d,n,null)}}Lt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Sd(`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:Id(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&zt(e,!!r,n,!0):zt(e,!!r,t,!1);return;case`textarea`:for(s in Sd(`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:Id(e,t,s,c,n,null)}Vt(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:Id(e,t,l,r,n,null)}return;case`dialog`:Sd(`beforetoggle`,e),Sd(`toggle`,e),Sd(`cancel`,e),Sd(`close`,e);break;case`iframe`:case`object`:Sd(`load`,e);break;case`video`:case`audio`:for(r=0;r<yd.length;r++)Sd(yd[r],e);break;case`image`:Sd(`error`,e),Sd(`load`,e);break;case`details`:Sd(`toggle`,e);break;case`embed`:case`source`:case`link`:Sd(`error`,e),Sd(`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:Id(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ld(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Id(e,t,c,r,n,null))}function zd(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)||Id(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&&Id(e,t,p,m,r,f)}}It(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)||Id(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&&Id(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(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:Id(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&&Id(e,t,s,i,r,o)}Bt(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:Id(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:Id(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)&&Id(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:Id(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ld(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||Ld(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Id(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||Id(e,t,f,p,r,m)}function Bd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Vd(){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&&Bd(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&&Bd(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 Hd=null,Ud=null;function Wd(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Kd(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 qd(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 Jd=null;function Yd(){var e=window.event;return e&&e.type===`popstate`?e===Jd?!1:(Jd=e,!0):(Jd=null,!1)}var Xd=typeof setTimeout==`function`?setTimeout:void 0,Zd=typeof clearTimeout==`function`?clearTimeout:void 0,Qd=typeof Promise==`function`?Promise:void 0,$d=typeof queueMicrotask==`function`?queueMicrotask:Qd===void 0?Xd:function(e){return Qd.resolve(null).then(e).catch(ef)};function ef(e){setTimeout(function(){throw e})}function tf(e){return e===`head`}function nf(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),Fp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)_f(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,_f(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&_f(e.ownerDocument.body);n=i}while(n);Fp(t)}function rf(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),ft(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[dt])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=ff(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=ff(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=ff(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 ff(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 pf=null;function mf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return ff(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hf(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 gf(e,t,n){switch(t=Wd(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 _f(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var vf=new Map,yf=new Set;function bf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var xf=F.d;F.d={f:Sf,r:Cf,D:Ef,C:Df,L:Of,m:kf,X:jf,S:Af,M:Mf};function Sf(){var e=xf.f(),t=xu();return e||t}function Cf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):xf.r(e)}var wf=typeof document>`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),yf.has(i)||(yf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Ef(e){xf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){xf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){xf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Lf(e)}vf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(Z(a))||(t=r.createElement(`link`),Rd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function kf(e,t){xf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Lf(e)}if(!vf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),vf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Z(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function Af(e,t,n){xf.S(e,t,n);var r=wf;if(r&&e){var i=gt(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);_t(c),Rd(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,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){xf.X(e,t);var n=wf;if(n&&e){var r=gt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Z(i)),a||(e=p({src:e,async:!0},t),(t=vf.get(i))&&Vf(e,t),a=n.createElement(`script`),_t(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){xf.M(e,t);var n=wf;if(n&&e){var r=gt(n).hoistableScripts,i=Lf(e),a=r.get(i);a||(a=n.querySelector(Z(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=vf.get(i))&&Vf(e,t),a=n.createElement(`script`),_t(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var i=(i=ae.current)?bf(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=Pf(n.href),n=gt(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=Pf(n.href);var o=gt(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(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),vf.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},vf.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=gt(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 Pf(e){return`href="`+Ft(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function X(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}),Rd(t,`link`,n),_t(t),e.head.appendChild(t))}function Lf(e){return`[src="`+Ft(e)+`"]`}function Z(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,_t(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`),_t(r),Rd(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Pf(n.href);var o=e.querySelector(Ff(i));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=X(n),(i=vf.get(i))&&Bf(r,i),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=Lf(n.src),(i=e.querySelector(Z(o)))?(t.instance=i,_t(i),i):(r=n,(i=vf.get(o))&&(r=p({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),_t(i),Rd(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,zf(r,n.precedence,e));return t.instance}function zf(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 Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Vf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Hf=null;function Uf(e,t,n){if(Hf===null){var r=new Map,i=Hf=new Map;i.set(n,r)}else i=Hf,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[dt]||a[it]||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 Wf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Gf(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 Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(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=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=X(r),(i=vf.get(i))&&Bf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(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=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Jf===0&&(Jf=62500*Vd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.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=Xf.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 ep={$$typeof:x,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function tp(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=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(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 np(e,t,n,r,i,a,o,s,c,l,u,d){return e=new tp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function rp(e){return e?(e=ni,e):ni}function ip(e,t,n,r,i,a){i=rp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(gu(n,e,t),Ha(n,e,t))}function ap(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function op(e,t){ap(e,t),(e=e.alternate)&&ap(e,t)}function sp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&gu(t,e,67108864),op(e,67108864)}}function cp(e){if(e.tag===13||e.tag===31){var t=mu();t=$e(t);var n=$r(e,t);n!==null&&gu(n,e,t),op(e,t)}}var lp=!0;function up(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,fp(e,t,n,r)}finally{F.p=a,P.T=i}}function dp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,fp(e,t,n,r)}finally{F.p=a,P.T=i}}function fp(e,t,n,r){if(lp){var i=pp(r);if(i===null)Dd(e,t,r,mp,n),Tp(e,r);else if(Dp(i,e,t,n,r))r.stopPropagation();else if(Tp(e,r),t&4&&-1<wp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}ad(a),!(Il&6)&&(nu=Ce()+500,od(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&gu(s,a,2),xu(),op(a,2)}if(a=pp(r),a===null&&Dd(e,t,r,mp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Dd(e,t,r,null,n)}}function pp(e){return e=Qt(e),hp(e)}var mp=null;function hp(e){if(mp=null,e=pt(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 mp=e,null}function gp(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(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var _p=!1,vp=null,yp=null,bp=null,xp=new Map,Sp=new Map,Cp=[],wp=`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 Tp(e,t){switch(e){case`focusin`:case`focusout`:vp=null;break;case`dragenter`:case`dragleave`:yp=null;break;case`mouseover`:case`mouseout`:bp=null;break;case`pointerover`:case`pointerout`:xp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Sp.delete(t.pointerId)}}function Ep(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=mt(t),t!==null&&sp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Dp(e,t,n,r,i){switch(t){case`focusin`:return vp=Ep(vp,e,t,n,r,i),!0;case`dragenter`:return yp=Ep(yp,e,t,n,r,i),!0;case`mouseover`:return bp=Ep(bp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return xp.set(a,Ep(xp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Sp.set(a,Ep(Sp.get(a)||null,e,t,n,r,i)),!0}return!1}function Op(e){var t=pt(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,nt(e.priority,function(){cp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,nt(e.priority,function(){cp(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 kp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=mt(n),t!==null&&sp(t),e.blockedOn=n,!1;t.shift()}return!0}function Ap(e,t,n){kp(e)&&n.delete(t)}function jp(){_p=!1,vp!==null&&kp(vp)&&(vp=null),yp!==null&&kp(yp)&&(yp=null),bp!==null&&kp(bp)&&(bp=null),xp.forEach(Ap),Sp.forEach(Ap)}function Mp(e,n){e.blockedOn===n&&(e.blockedOn=null,_p||(_p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jp)))}var Np=null;function Pp(e){Np!==e&&(Np=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Np===e&&(Np=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(hp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Fp(e){function t(t){return Mp(t,e)}vp!==null&&Mp(vp,e),yp!==null&&Mp(yp,e),bp!==null&&Mp(bp,e),xp.forEach(t),Sp.forEach(t);for(var n=0;n<Cp.length;n++){var r=Cp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Cp.length&&(n=Cp[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&Cp.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[at]||null;if(typeof a==`function`)o||Pp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(hp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Pp(n)}}}function Ip(){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 Lp(e){this._internalRoot=e}Rp.prototype.render=Lp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;ip(n,mu(),e,t,null,null)},Rp.prototype.unmount=Lp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ip(e.current,2,null,e,null,null),xu(),t[ot]=null}};function Rp(e){this._internalRoot=e}Rp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Cp.length&&t!==0&&t<Cp[n].priority;n++);Cp.splice(n,0,e),n===0&&Op(e)}};var zp=n.version;if(zp!==`19.2.8`)throw Error(a(527,zp,`19.2.8`));F.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 Bp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vp.isDisabled&&Vp.supportsFiber)try{Me=Vp.inject(Bp),Ne=Vp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Gs,s=Ks,c=qs;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=np(e,1,!1,null,null,n,r,null,i,s,c,Ip),e[ot]=t.current,Td(e),new Lp(t)}})),ne=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=te()})),R=t(r(),1),z=t(ne(),1),B=()=>{let e=new Map,t=new Map;return{get nodes(){return Array.from(e.values())},get relationships(){return Array.from(t.values())},get nodeCount(){return e.size},get relationshipCount(){return t.size},addNode:t=>{e.has(t.id)||e.set(t.id,t)},addRelationship:e=>{t.has(e.id)||t.set(e.id,e)}}};function re(e){let t=B();if(!e.graphSkipped){for(let n of e.nodes)t.addNode(n);for(let n of e.relationships)t.addRelationship(n)}return{graph:t,graphMode:e.graphSkipped?`chatOnly`:`full`,nodeCount:e.repoInfo.stats?.nodes??null}}function ie(e,t,n,r,i){if(r!==void 0)return Math.min(Math.max(0,r),n);let a=t*2**e,o=Math.min(n,a);return Math.floor(i()*o)}var ae=class extends Error{name=`CircuitOpenError`;retryAfterMs;constructor(e,t){super(t?`Circuit '${t}' is open; retry in ${Math.ceil(e/1e3)}s`:`Circuit is open; retry in ${Math.ceil(e/1e3)}s`),this.retryAfterMs=e}},oe=class{failureThreshold;cooldownMs;halfOpenRetryAfterMs;key;now;state=`closed`;consecutiveFailures=0;openedAt=null;probeInFlight=!1;constructor(e={}){this.failureThreshold=e.failureThreshold??3,this.cooldownMs=e.cooldownMs??3e4,this.halfOpenRetryAfterMs=e.halfOpenRetryAfterMs??1e3,this.key=e.key,this.now=e.now??(()=>Date.now())}check(){if(this.state===`open`&&this.openedAt!==null){let e=this.now()-this.openedAt;if(e<this.cooldownMs)throw new ae(this.cooldownMs-e,this.key);this.state=`half-open`}if(this.state===`half-open`){if(this.probeInFlight)throw new ae(this.halfOpenRetryAfterMs,this.key);this.probeInFlight=!0}}recordSuccess(){this.probeInFlight=!1,this.consecutiveFailures=0,this.state=`closed`,this.openedAt=null}recordFailure(){this.probeInFlight=!1,this.consecutiveFailures+=1,(this.state===`half-open`||this.consecutiveFailures>=this.failureThreshold)&&(this.state=`open`,this.openedAt=this.now())}recordNeutral(){this.probeInFlight=!1}getState(){return this.state===`open`&&this.openedAt!==null&&this.now()-this.openedAt>=this.cooldownMs?`half-open`:this.state}getConsecutiveFailures(){return this.consecutiveFailures}isProbeInFlight(){return this.probeInFlight}getOpenedAt(){return this.openedAt}getCooldownMs(){return this.cooldownMs}},se=new Map;function ce(e,t){let n=se.get(e);return n||(n=new oe({...t,key:e}),se.set(e,n)),n}var le=3e4,ue={maxAttempts:3,baseDelayMs:500,capDelayMs:5e3};function de(e,t=Date.now){if(!e)return null;let n=e.trim();if(n===``)return null;if(/^[0-9]+$/.test(n)){let e=parseInt(n,10);return Number.isNaN(e)||e<0?null:e*1e3}let r=Date.parse(n);if(Number.isNaN(r))return null;let i=r-t();return i>=0?i:0}function fe(e){return e instanceof DOMException&&(e.name===`TimeoutError`||e.name===`AbortError`)}function pe(e,t,n=le){if(e.kind===`error`)return fe(e.err)?{kind:`terminal-network`,err:e.err}:{kind:`retryable-network`,err:e.err};let r=e.resp;if(r.status>=200&&r.status<400)return{kind:`success`,resp:r};if(r.status===429){let e=de(typeof r.headers?.get==`function`?r.headers.get(`Retry-After`):null,t);return{kind:`retryable-status`,resp:r,afterMs:e===null?void 0:Math.min(e,n)}}return r.status>=500?{kind:`retryable-status`,resp:r,afterMs:void 0}:{kind:`terminal-client`,resp:r}}var me=e=>new Promise(t=>setTimeout(t,e));function he(e){try{let t=typeof e==`string`?new URL(e):e;return`${t.host}${t.pathname}`}catch{return String(e)}}var ge=class extends Error{response;name=`ResilientFetchExhaustedError`;constructor(e){super(`Request failed after retries (HTTP ${e.status})`),this.response=e}};async function _e(e,t,n={}){let r=n.fetchImpl??globalThis.fetch,i=n.now??(()=>Date.now()),a=n.breaker??ce(n.breakerKey??he(e),n.breakerOptions),o={maxAttempts:n.retry?.maxAttempts??ue.maxAttempts,baseDelayMs:n.retry?.baseDelayMs??ue.baseDelayMs,capDelayMs:n.retry?.capDelayMs??ue.capDelayMs,retryAfterCapMs:n.retry?.retryAfterCapMs??3e4},s=n.retry?.sleep??me,c=n.retry?.random??Math.random;a.check();for(let n=0;n<o.maxAttempts;n++){let l;try{l={kind:`response`,resp:await r(e,t)}}catch(e){l={kind:`error`,err:e}}let u=pe(l,i,o.retryAfterCapMs);switch(u.kind){case`success`:return a.recordSuccess(),u.resp;case`terminal-client`:return a.recordNeutral(),u.resp;case`terminal-network`:throw a.recordNeutral(),u.err;case`retryable-status`:if(n+1>=o.maxAttempts)throw a.recordFailure(),new ge(u.resp);await s(ie(n,o.baseDelayMs,o.capDelayMs,u.afterMs,c));break;case`retryable-network`:if(n+1>=o.maxAttempts)throw a.recordFailure(),u.err;await s(ie(n,o.baseDelayMs,o.capDelayMs,void 0,c));break;default:throw Error(`resilientFetch: unhandled outcome ${JSON.stringify(u)}`)}}throw Error(`resilientFetch: retry loop terminated unexpectedly`)}var ve=`gitnexus-llm-settings`,ye=e=>{let t={...D.minimax,...e};return y.includes(t.model??``)?t:{...t,model:D.minimax?.model,thinkingMode:D.minimax?.thinkingMode}},be=e=>({...D,...e,openai:{...D.openai,...e?.openai},azureOpenAI:{...D.azureOpenAI,...e?.azureOpenAI},gemini:{...D.gemini,...e?.gemini},anthropic:{...D.anthropic,...e?.anthropic},ollama:{...D.ollama,...e?.ollama},openrouter:{...D.openrouter,...e?.openrouter},minimax:ye(e?.minimax),glm:{...D.glm,...e?.glm},deepseek:{...D.deepseek,...e?.deepseek}}),xe=e=>{let t=e.getItem(ve);if(!t)return null;try{return JSON.parse(t)}catch(e){return console.warn(`Failed to parse LLM settings:`,e),null}},Se=(e,t)=>{e.setItem(ve,JSON.stringify(t))},Ce=()=>{try{let e=typeof sessionStorage<`u`?xe(sessionStorage):null;if(e)return be(e);let t=typeof localStorage<`u`?xe(localStorage):null;if(t){let e=be(t);try{typeof sessionStorage<`u`&&Se(sessionStorage,e),typeof localStorage<`u`&&localStorage.removeItem(ve)}catch(e){console.warn(`Failed to migrate legacy LLM settings to sessionStorage:`,e)}return e}return D}catch(e){return console.warn(`Failed to load LLM settings:`,e),D}},we=e=>{try{typeof sessionStorage<`u`&&Se(sessionStorage,e)}catch(e){console.error(`Failed to save LLM settings:`,e)}},Te={openai:e=>e.openai?.apiKey?{provider:`openai`,...e.openai}:null,"azure-openai":e=>!e.azureOpenAI?.apiKey||!e.azureOpenAI?.endpoint?null:{provider:`azure-openai`,...e.azureOpenAI},gemini:e=>e.gemini?.apiKey?{provider:`gemini`,...e.gemini}:null,anthropic:e=>e.anthropic?.apiKey?{provider:`anthropic`,...e.anthropic}:null,ollama:e=>({provider:`ollama`,...e.ollama,baseUrl:e.ollama?.baseUrl??`http://localhost:11434`}),openrouter:e=>!e.openrouter?.apiKey||e.openrouter.apiKey.trim()===``?null:{provider:`openrouter`,apiKey:e.openrouter.apiKey,model:e.openrouter.model||``,baseUrl:e.openrouter.baseUrl||`https://openrouter.ai/api/v1`,temperature:e.openrouter.temperature,maxTokens:e.openrouter.maxTokens},minimax:e=>e.minimax?.apiKey?{provider:`minimax`,...e.minimax}:null,glm:e=>e.glm?.apiKey?{provider:`glm`,apiKey:e.glm.apiKey,model:e.glm.model||`GLM-5`,baseUrl:e.glm.baseUrl||`https://api.z.ai/api/coding/paas/v4`,temperature:e.glm.temperature,maxTokens:e.glm.maxTokens}:null,deepseek:e=>e.deepseek?.apiKey?{provider:`deepseek`,...e.deepseek}:null},Ee=()=>{let e=Ce(),t=Te[e.activeProvider];return t?t(e):null},De=()=>Ee()!==null,Oe={preserveAssistantTranscript:!1},ke={deepseek:{preserveAssistantTranscript:!0}},Ae=e=>({...Oe,...ke[e]}),je=e=>{switch(e){case`openai`:return`OpenAI`;case`azure-openai`:return`Azure OpenAI`;case`gemini`:return`Google Gemini`;case`anthropic`:return`Anthropic`;case`ollama`:return`Ollama (Local)`;case`openrouter`:return`OpenRouter`;case`minimax`:return`MiniMax`;case`glm`:return`GLM (Z.AI)`;case`deepseek`:return`DeepSeek`;default:return e}},Me=e=>{switch(e){case`openai`:return[`gpt-4.5-preview`,`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-3.5-turbo`];case`azure-openai`:return[`gpt-4o`,`gpt-4o-mini`,`gpt-4-turbo`,`gpt-4`,`gpt-35-turbo`];case`gemini`:return[`gemini-2.0-flash`,`gemini-1.5-pro`,`gemini-1.5-flash`,`gemini-1.0-pro`];case`anthropic`:return[`claude-sonnet-4-20250514`,`claude-3-5-sonnet-20241022`,`claude-3-5-haiku-20241022`,`claude-3-opus-20240229`];case`ollama`:return[`llama3.2`,`llama3.1`,`mistral`,`codellama`,`deepseek-coder`];case`minimax`:return[...y];case`glm`:return[`GLM-5`,`GLM-5-Turbo`,`GLM-4.7`,`GLM-4.5`];case`deepseek`:return[`deepseek-v4-flash`,`deepseek-v4-pro`,`deepseek-chat`,`deepseek-reasoner`];default:return[]}},Ne=async()=>{try{let e=await _e(`${N}/models`,void 0,{breakerKey:`openrouter-models`,retry:{maxAttempts:2,baseDelayMs:500,capDelayMs:2e3}});if(!e.ok)throw Error(`Failed to fetch models`);return(await e.json()).data.map(e=>({id:e.id,name:e.name||e.id}))}catch(e){return console.error(`Error fetching OpenRouter models:`,e),[]}},Pe=(e,t)=>typeof t==`number`&&typeof e==`number`&&Number.isFinite(e)&&e>t;function Fe({explicit:e,nodeCount:t,threshold:n,edgeCount:r,edgeThreshold:i}){return typeof e==`boolean`?e:Pe(t,n)||Pe(r,i)}function Ie(e,t){return typeof e!=`number`||!Number.isFinite(e)||e>t}function Le(e){if(e==null)return;let t=e.trim().toLowerCase();if(t===`1`||t===`true`)return!0;if(t===`0`||t===`false`)return!1}var Re=e=>e.repoPath??e.path??e.name,ze=class extends Error{status;code;retryAfterMs;constructor(e,t,n,r){super(e),this.status=t,this.code=n,this.retryAfterMs=r,this.name=`BackendError`}},Be=class extends Error{nodeCount;relationshipCount;constructor(e,t,n){super(e),this.nodeCount=t,this.relationshipCount=n,this.name=`GraphTooLargeError`}};function Ve(e,t,n={}){let r=new AbortController,i=n.maxRetries??3,a=n.baseDelayMs??1e3,o=n.capDelayMs??1/0,s=``,c=e=>r.signal.aborted||e>=i?!1:(t.onReconnecting?.(),setTimeout(()=>l(e+1),Math.min(a*2**e,o)),!0),l=i=>{r.signal.aborted||(async()=>{try{let a=Xe(new Headers);s&&a.set(`Last-Event-ID`,s);let o=await fetch(e,{signal:r.signal,headers:a});if(!o.ok){if(n.retryOnHttpError&&c(i))return;t.onError?.(`Server returned ${o.status}`);return}let l=o.body?.getReader();if(!l){t.onError?.(`No response body`);return}i=0,t.onOpen?.();let u=new TextDecoder,d=``;for(;;){let{done:e,value:n}=await l.read();if(e)break;d+=u.decode(n,{stream:!0});let r=d.split(`
11
11
  `);d=r.pop()||``;let i=`message`;for(let e of r){if(e.startsWith(`id: `)){s=e.slice(4).trim();continue}if(!e.startsWith(`:`)){if(e.startsWith(`event: `))i=e.slice(7).trim();else if(e.startsWith(`data: `)){try{let n=JSON.parse(e.slice(6));if(i===`complete`){t.onComplete?.(n);return}else if(i===`failed`){let e=n;t.onError?.(e?.error||`Job failed`);return}else t.onMessage?.(n)}catch{}i=`message`}}}}c(i)}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return;c(i)||t.onError?.(e instanceof Error?e.message:`Stream error`)}})()};return l(0),r}var He=`http://localhost:4747`;function Ue(e){let t;try{t=new URL(e)}catch{throw Error(`Invalid backend URL: must be a well-formed http:// or https:// URL`)}if(t.protocol!==`http:`&&t.protocol!==`https:`)throw Error(`Backend URL must use http:// or https:// (got ${t.protocol})`)}var We=e=>{let t=e.replace(/\/$/,``);Ue(t),He=t};function Ge(e){let t=e.trim().replace(/\/+$/,``);return!t.startsWith(`http://`)&&!t.startsWith(`https://`)&&(t=t.startsWith(`localhost`)||t.startsWith(`127.0.0.1`)?`http://${t}`:`https://${t}`),t=t.replace(/\/api$/,``),t}var Ke=null,qe=()=>{try{return typeof sessionStorage>`u`?``:sessionStorage.getItem(`gitnexus-auth-token`)??``}catch{return``}},Je=()=>(Ke===null&&(Ke=qe()),Ke),Ye=e=>{let t=e.trim();Ke=t;try{if(typeof sessionStorage>`u`)return;t?sessionStorage.setItem(j,t):sessionStorage.removeItem(j)}catch(e){console.warn(`Failed to persist the GitNexus access token to sessionStorage:`,e)}},Xe=e=>{let t=Je();return t&&e.set(`Authorization`,`Bearer ${t}`),e},Ze=3e4,Qe=2e3,$e=new Set([`GET`,`HEAD`,`OPTIONS`]),et=async(e,t={},n=Ze,r=!1)=>{let i=AbortSignal.timeout(n),a=t.signal,o=a?AbortSignal.any([i,a]):i,s=Xe(new Headers(t.headers)),c=(t.method??`GET`).toUpperCase(),l=$e.has(c)||r?2:1,u;try{u=`web-backend:${new URL(He).origin}`}catch{u=`web-backend:invalid`}try{return await _e(e,{...t,headers:s,signal:o},{breakerKey:u,retry:{maxAttempts:l,baseDelayMs:250,capDelayMs:1500}})}catch(t){if(t instanceof ae)throw new ze(`GitNexus backend at ${He} is unhealthy; retry in ${Math.ceil(t.retryAfterMs/1e3)}s`,0,`network`);if(t instanceof ge)return t.response;throw t instanceof DOMException&&t.name===`TimeoutError`?new ze(`Request to ${e} timed out after ${n}ms`,0,`timeout`):t instanceof DOMException&&t.name===`AbortError`?new ze(`Request aborted`,0,`network`):t instanceof TypeError?new ze(`Network error reaching GitNexus backend at ${He}: ${t.message}`,0,`network`):t}},tt=async e=>{if(e.ok)return;let t=e.statusText,n;try{let r=await e.json();r&&typeof r.error==`string`?t=r.error:r&&typeof r.message==`string`&&(t=r.message),r&&typeof r.code==`string`&&(n=r.code)}catch{}let r=e.status===404?`not_found`:e.status===429?`rate_limited`:n===`unauthorized`?`unauthorized`:n===`origin_not_allowed`?`origin_blocked`:e.status>=400&&e.status<500?`client`:`server`,i;if(e.status===429){let t=e.headers.get(`retry-after`);if(t){let e=Number(t);if(Number.isFinite(e)&&e>=0)i=e*1e3;else{let e=Date.parse(t);Number.isFinite(e)&&(i=Math.max(0,e-Date.now()))}}}throw new ze(t,e.status,r,i)},nt=e=>e?`repo=${encodeURIComponent(e)}`:``,rt=async()=>{let e=await et(`${He}/api/info`);return await tt(e),e.json()},it=15e3,at=(e,t)=>{let n=!1,r=Ve(`${He}/api/heartbeat`,{onOpen:()=>{n=!1,e()},onReconnecting:()=>{n||(n=!0,t())}},{maxRetries:1/0,capDelayMs:it,retryOnHttpError:!0});return()=>r.abort()},ot=async e=>{await tt(await et(`${He}/api/repo?repo=${encodeURIComponent(e)}`,{method:`DELETE`}))},st=async()=>{try{let e=await et(`${He}/api/health`,{},Qe);return e.status===200?`ok`:e.status===401?`unauthorized`:`unreachable`}catch{return`unreachable`}},ct=async()=>{let e=await et(`${He}/api/repos`);return await tt(e),(await e.json()).map(e=>({...e,repoPath:e.repoPath??e.path}))},lt=3e5,ut=async(e,t)=>{let n=await et(`${He}/api/repo${e?`?${nt(e)}`:``}`,{},t?.awaitAnalysis?lt:void 0);await tt(n);let r=await n.json();return{...r,repoPath:r.repoPath??r.path}},dt=async(e,t)=>{let n=[nt(e),t?.includeContent?`includeContent=true`:``,`stream=true`].filter(Boolean).join(`&`),r=await et(`${He}/api/graph${n?`?${n}`:``}`,{signal:t?.signal},12e4);if(await tt(r),(r.headers.get(`Content-Type`)||``).includes(`application/x-ndjson`))return ft(r,t?.onProgress,t?.maxNodes,t?.maxEdges);if(!t?.onProgress||!r.body)return r.json();let i=r.headers.get(`Content-Length`),a=i?parseInt(i,10):null,o=r.body.getReader(),s=[],c=0;for(;;){let{done:e,value:n}=await o.read();if(e)break;s.push(n),c+=n.length,t.onProgress(c,a)}let l=new Uint8Array(c),u=0;for(let e of s)l.set(e,u),u+=e.length;return JSON.parse(new TextDecoder().decode(l))},ft=async(e,t,n,r)=>{if(!e.body)throw new ze(`No response body`,e.status,`server`);let i=e.headers.get(`Content-Length`),a=i?parseInt(i,10):null,o=e.body.getReader(),s=new TextDecoder,c=[],l=[],u=``,d=0,f=()=>typeof n==`number`&&c.length>n||typeof r==`number`&&l.length>r,p=t=>{let n=t.trim();if(!n)return;let r=JSON.parse(n);if(r.type===`node`){c.push(r.data);return}if(r.type===`relationship`){l.push(r.data);return}if(r.type===`error`)throw new ze(r.error,e.status||500,`server`)},m=async()=>{try{await o.cancel()}catch{}throw new Be(`Graph exceeds the size limit (nodes=${c.length}, relationships=${l.length})`,c.length,l.length)};for(;;){let{done:e,value:n}=await o.read();if(e)break;d+=n.length,t?.(d,a),u+=s.decode(n,{stream:!0});let r=u.split(`
12
- `);u=r.pop()||``;for(let e of r)p(e),f()&&await m()}return u+=s.decode(),p(u),f()&&await m(),{nodes:c,relationships:l}},pt=async(e,t)=>{let n=await et(`${He}/api/query`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cypher:e,repo:t})});await tt(n);let r=await n.json();return r.result??r},mt=async(e,t)=>{let n=await et(`${He}/api/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:e,limit:t?.limit,mode:t?.mode,enrich:t?.enrich,repo:t?.repo})});return await tt(n),(await n.json()).results??[]},ht=async(e,t,n,r)=>{let i=[`pattern=${encodeURIComponent(e)}`,nt(t),n?`limit=${n}`:``,r?.fileFilter?`fileFilter=${encodeURIComponent(r.fileFilter)}`:``,r?.caseSensitive?`caseSensitive=1`:``].filter(Boolean).join(`&`),a=await et(`${He}/api/grep?${i}`);await tt(a);let o=await a.json();return{results:o.results??[],timedOut:o.timedOut===!0}},gt=async(e,t)=>{let n=[`path=${encodeURIComponent(e)}`,nt(t?.repo),t?.startLine===void 0?``:`startLine=${t.startLine}`,t?.endLine===void 0?``:`endLine=${t.endLine}`].filter(Boolean).join(`&`),r=await et(`${He}/api/file?${n}`);return await tt(r),r.json()},_t=async(e,t,n)=>{let r=new FormData;r.append(`manifest`,JSON.stringify(t));for(let t of e)r.append(`files`,t);let i=await et(`${He}/api/analyze/upload`,{method:`POST`,body:r,signal:n},5*6e4);return await tt(i),i.json()},vt=async e=>{let t=await et(`${He}/api/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},3e4);return await tt(t),t.json()},yt=async e=>{await tt(await et(`${He}/api/analyze/${encodeURIComponent(e)}`,{method:`DELETE`}))},bt=(e,t,n,r)=>Ve(`${He}/api/analyze/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r}),xt=async e=>{let t=await et(`${He}/api/embed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo:e})},3e4);return await tt(t),t.json()},St=(e,t,n,r)=>Ve(`${He}/api/embed/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r});async function Ct(e,t,n,r,i){We(Ge(e)),t?.(`validating`,0,null);let a=await ut(r,{awaitAnalysis:i?.awaitAnalysis});if(Fe({explicit:i?.skipGraph,nodeCount:a.stats?.nodes,threshold:k,edgeCount:a.stats?.edges,edgeThreshold:S}))return{nodes:[],relationships:[],repoInfo:a,graphSkipped:!0};let o=i?.skipGraph!==!1;t?.(`downloading`,0,null);try{let{nodes:e,relationships:i}=await dt(r,{signal:n,onProgress:(e,n)=>t?.(`downloading`,e,n),maxNodes:o?k:void 0,maxEdges:o?S:void 0});return{nodes:e,relationships:i,repoInfo:a,graphSkipped:!1}}catch(e){if(e instanceof Be)return{nodes:[],relationships:[],repoInfo:a,graphSkipped:!0};throw e}}var V=e=>typeof e==`string`,wt=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Tt=e=>e==null?``:String(e),Et=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Dt=/###/g,Ot=e=>e&&e.includes(`###`)?e.replace(Dt,`.`):e,kt=e=>!e||V(e),At=(e,t,n)=>{let r=V(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(kt(e))return{};let t=Ot(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return kt(e)?{}:{obj:e,k:Ot(r[i])}},jt=(e,t,n)=>{let{obj:r,k:i}=At(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=At(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=At(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Mt=(e,t,n,r)=>{let{obj:i,k:a}=At(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Nt=(e,t)=>{let{obj:n,k:r}=At(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pt=(e,t,n)=>{let r=Nt(e,n);return r===void 0?Nt(t,n):r},Ft=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?V(e[r])||e[r]instanceof String||V(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ft(e[r],t[r],n):e[r]=t[r]);return e},It=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Lt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Rt=e=>V(e)?e.replace(/[&<>"'\/]/g,e=>Lt[e]):e,zt=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Bt=[` `,`,`,`?`,`!`,`;`],Vt=new zt(20),Ht=(e,t,n)=>{t||=``,n||=``;let r=Bt.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Vt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Ut=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Wt=e=>e?.replace(/_/g,`-`),Gt={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Kt=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Gt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>V(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),V(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},qt=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Jt=class extends qt{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):V(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Nt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!V(n)?s:Ut(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),jt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(V(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Nt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ft(s,n,i):s={...s,...n},jt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Yt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Xt=Symbol(`i18next/PATH_KEY`);function Zt(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Xt?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Qt(e,t){let{[Xt]:n}=e(Zt()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $t=e=>!V(e)&&typeof e!=`boolean`&&typeof e!=`number`,en=class e extends qt{constructor(e,t={}){super(),Et([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Kt.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=$t(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ht(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:V(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:V(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Qt(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Qt(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!V(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=$t(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(V(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:$t(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&V(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=V(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=V(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Yt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return V(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Qt(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!V(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(V(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!V(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},tn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kt.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Wt(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Wt(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(V(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),V(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return V(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):V(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},nn={zero:0,one:1,two:2,few:3,many:4,other:5},rn={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},an=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Kt.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Wt(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),rn;if(!e.match(/-|_/))return rn;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>nn[e]-nn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},on=(e,t,n,r=`.`,i=!0)=>{let a=Pt(e,t,n);return!a&&i&&V(n)&&(a=Ut(e,n,r),a===void 0&&(a=Ut(t,n,r))),a},sn=e=>e.replace(/\$/g,`$$$$`),cn=class{constructor(e={}){this.logger=Kt.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Rt:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?It(i):a||`{{`,this.suffix=o?It(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?It(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?It(l):``,this.nestingPrefix=d?It(d):f||It(`$t(`),this.nestingSuffix=p?It(p):m||It(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=on(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(on(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=V(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!V(a)&&!this.useRawValueToEscape&&(a=Tt(a));let s=t.safeValue(a);if(e=e.replace(i[0],sn(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${It(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!V(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!V(i))return i;V(i)||(i=Tt(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ln=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},un=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Wt(r),i),t[o]=s),s(n)}},dn=e=>(t,n,r)=>e(Wt(n),r)(t),fn=class{constructor(e={}){this.logger=Kt.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?un:dn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=un(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ln(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},pn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mn=class extends qt{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Kt.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Mt(n.loaded,[i],a),pn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();V(e)&&(e=this.languageUtils.toResolveHierarchy(e)),V(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},hn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gn=e=>(V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),_n=()=>{},vn=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yn=class e extends qt{constructor(e={},t){if(super(),this.options=gn(e),this.services={},this.logger=Kt,this.modules={external:[]},vn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(V(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=hn();this.options={...n,...this.options,...gn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Kt.init(r(this.modules.logger),this.options):Kt.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fn;let t=new tn(this.options);this.store=new Jt(this.options.resources,this.options);let n=this.services;n.logger=Kt,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new an(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new cn(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new mn(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new en(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=_n,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=wt(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=_n){let n=t,r=V(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=wt();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=_n,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Yt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=wt();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=V(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(V(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Qt(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Qt(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Qt(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return V(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=wt();return this.options.ns?(V(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=wt();V(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new tn(hn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=_n){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Jt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...hn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cn(n)}return a.translator=new en(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();yn.createInstance,yn.dir,yn.init,yn.loadResources,yn.reloadResources,yn.use,yn.changeLanguage,yn.getFixedT,yn.t,yn.exists,yn.setDefaultNamespace,yn.hasLoadedNamespace,yn.loadNamespaces,yn.loadLanguages;var{slice:bn,forEach:xn}=[];function Sn(e){return xn.call(bn.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Cn(e){return typeof e==`string`&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}var wn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Tn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!wn.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!wn.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},En={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Tn(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Dn={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return En.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&En.create(n,e,r,i,a)}},On={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},kn={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},An=null,jn=()=>{if(An!==null)return An;try{if(An=typeof window<`u`&&window.localStorage!==null,!An)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{An=!1}return An},Mn={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&jn())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&jn()&&window.localStorage.setItem(n,e)}},Nn=null,Pn=()=>{if(Nn!==null)return Nn;try{if(Nn=typeof window<`u`&&window.sessionStorage!==null,!Nn)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Nn=!1}return Nn},Fn={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Pn())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Pn()&&window.sessionStorage.setItem(n,e)}},In={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Ln={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},Rn={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},zn={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Bn=!1;try{document.cookie,Bn=!0}catch{}var Vn=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Bn||Vn.splice(1,1);var Hn=()=>({order:Vn,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),Un=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Sn(t,this.options||{},Hn()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Dn),this.addDetector(On),this.addDetector(Mn),this.addDetector(Fn),this.addDetector(In),this.addDetector(Ln),this.addDetector(Rn),this.addDetector(zn),this.addDetector(kn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Cn(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};Un.type=`languageDetector`;var Wn={type:`3rdParty`,init(e){c(e.options.react),l(e)}},Gn=[{code:`en`,nativeName:`English`,englishName:`English`,dir:`ltr`},{code:`zh-CN`,nativeName:`简体中文`,englishName:`Simplified Chinese`,dir:`ltr`}],Kn=Gn.map(e=>e.code);function qn(e){let t=e?.trim().split(`.`)[0]?.replace(/_/g,`-`).toLowerCase();return t?t===`en`||t.startsWith(`en-`)?`en`:t===`zh`||t===`zh-cn`||t.startsWith(`zh-cn-`)||t===`zh-hans`||t.startsWith(`zh-hans-`)?`zh-CN`:null:null}function Jn(e){let t=qn(e);return Gn.find(e=>e.code===t)??Gn[0]}var Yn=Object.assign({"../locales/en/chat.json":{tabs:{chat:`Nexus AI`,processes:`Processes`},suggestions:{architecture:`Explain the project architecture`,whatDoes:`What does this project do?`,importantFiles:`Show me the most important files`,apiHandlers:`Find all API handlers`},empty:{title:`Ask me anything`,description:`I can help you understand the architecture, find functions, or explain connections.`},input:{placeholder:`Ask about the codebase...`,initializing:`Initializing AI agent...`,configureProvider:`Configure an LLM provider to enable chat.`},actions:{closePanel:`Close Panel`,scrollBottom:`Scroll to bottom`,clearChat:`Clear chat`,stopResponse:`Stop response`},stopped:`Stopped by user`,badges:{configureAI:`Configure AI`,connecting:`Connecting`},chatOnly:{banner:`Graph not loaded (large project). Chat works normally; inline node citations won't highlight in the graph view.`},roles:{you:`You`,assistant:`Nexus AI`},newBadge:`NEW`},"../locales/en/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},updateBanner:`GitNexus {{latest}} is available — this server runs {{installed}}.`,updateBannerDismiss:`Dismiss update notification`,actions:{cancel:`Cancel`,dismiss:`Dismiss`,tryAgain:`Try again`,hide:`Hide`,retry:`Retry`,copy:`Copy`,copied:`Copied`,close:`Close`,run:`Run`,clear:`Clear`,remove:`Remove`,focusInGraph:`Focus in graph`,expand:`Expand`,collapse:`Collapse`},chat:{viewNodeInCodePanel:`View {{inner}} in Code panel`,openInCodePanel:`Open in Code panel • {{inner}}`,waitForVectorIndex:`Wait a moment, vector index is being created.`},counts:{files_one:`{{count}} file`,files_other:`{{count}} files`,nodes_one:`{{count}} node`,nodes_other:`{{count}} nodes`,edges_one:`{{count}} edge`,edges_other:`{{count}} edges`,symbols_one:`{{count}} symbol`,symbols_other:`{{count}} symbols`,flows_one:`{{count}} flow`,flows_other:`{{count}} flows`},progress:{connecting:`Connecting to server...`,connectingShort:`Connecting...`,validatingServer:`Validating server`,validatingServerEllipsis:`Validating server...`,downloadingGraph:`Downloading graph...`,downloadedMb:`{{mb}} MB downloaded`,downloadingWithPercent:`Downloading graph... {{percent}}%`,downloadingMb:`Downloading... {{mb}} MB`,processing:`Processing...`,processingGraph:`Processing graph...`,extractingFileContents:`Extracting file contents`,loadingGraph:`Loading graph...`,starting:`Starting...`,executing:`Executing...`,truncated:`... (truncated)`,ready:`Ready`,switchingRepository:`Switching repository...`,loadingRepository:`Loading {{repo}}`,validating:`Validating`,failedSwitchRepository:`Failed to switch repository`,unknownError:`Unknown error`},analyzePhases:{queued:`Queued`,cloning:`Cloning repository`,pulling:`Pulling latest`,extracting:`Scanning files`,structure:`Building structure`,parsing:`Parsing code`,imports:`Resolving imports`,calls:`Tracing calls`,heritage:`Extracting inheritance`,scopeResolution:`Resolving types`,communities:`Detecting communities`,processes:`Detecting processes`,complete:`Pipeline complete`,lbug:`Loading into database`,fts:`Creating search indexes`,embeddings:`Generating embeddings`,done:`Done`,retrying:`Retrying after crash`},units:{elapsedSeconds:`{{seconds}}s`,elapsedMinutesSeconds:`{{minutes}}m {{seconds}}s`}},"../locales/en/errors.json":{unknown:`Unknown error`,connectFailed:`Failed to connect to server`,loadGraphFailed:`Failed to load graph`,failedToConnect:`Failed to connect`,analysisFailed:`Analysis failed. Check server logs.`,startAnalysisFailed:`Failed to start analysis`,invalidGithubUrl:`Please enter a valid GitHub repository URL.`,invalidAzureDevOpsUrl:`Please enter a valid Azure DevOps repository URL.`,missingFolderPath:`Please enter a folder path.`,backend:{reconnecting:`Server connection lost. Reconnecting…`,network:"Unable to reach the GitNexus server. Make sure `gitnexus serve` is running.",timeout:`The server took too long to respond. Try again in a moment.`,rateLimited:`Too many requests. Try again in {{seconds}}s.`,notFound:`The requested repository or resource was not found.`,unauthorized:`This GitNexus deploy requires an access token. Find it in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable, then paste it into Settings.`,originBlocked:`This action isn't available from the hosted UI. Open GitNexus from the server's own address (e.g. http://localhost:4747) to continue.`,client:`Request failed: {{message}}`,server:`Server error: {{message}}`}},"../locales/en/graph.json":{statusBar:{sponsor:`Sponsor`,sponsorHint:`need to buy some API credits to run SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} files`},toolCall:{status:{running:`running`,completed:`completed`,error:`error`,stopped:`stopped`},tools:{search:`🔍 Search Code`,cypher:`🔗 Cypher Query`,grep:`🔎 Pattern Search`,read:`📄 Read File`,overview:`🗺️ Codebase Overview`,explore:`🔬 Deep Dive`,impact:`💥 Impact Analysis`},query:`Query`,input:`Input`,result:`Result`,searchPrefix:`Search: "{{query}}"`},embedding:{generateTitle:`Generate embeddings for semantic search`,enable:`Enable Semantic Search`,loadingModel:`Loading AI model...`,embeddingNodes:`Embedding {{processed}}/{{total}} nodes`,creatingIndex:`Creating vector index...`,readyTitle:`Semantic search is ready! Use natural language in the AI chat.`,ready:`Semantic Ready`,errorTitle:`Embedding failed. Click to retry.`,failedRetry:`Failed - Retry`,fallback:{title:`WebGPU said "nope"`,subtitle:`Your browser doesn't support GPU acceleration`,description:`Couldn't create embeddings with WebGPU, so semantic search (Graph RAG) won't be as smart. The graph still works fine though!`,options:`Your options:`,useCpu:`Use CPU`,useCpuDescriptionSmall:`Works but a bit slower`,useCpuDescriptionLarge:`Works but way slower`,estimated:`(~{{minutes}} min for {{count}} nodes)`,skipIt:`Skip it`,skipDescription:`Graph works, just no AI semantic search`,smallCodebase:`Small codebase detected! CPU should be fine.`,tip:`💡 Tip: Try Chrome or Edge for WebGPU support`,skipEmbeddings:`Skip Embeddings`,useCpuRecommended:`Use CPU (Recommended)`,useCpuSlow:`Use CPU (Slow)`}},queryFab:{query:`Query`,cypherQuery:`Cypher Query`,examples:`Examples`,run:`Run`,noProject:`No project loaded. Load a project first.`,dbNotReady:`Database not ready. Please wait for loading to complete.`,executionFailed:`Query execution failed`,exampleLabels:{functions:`All Functions`,classes:`All Classes`,interfaces:`All Interfaces`,calls:`Function Calls`,imports:`Import Dependencies`},clear:`Clear`,rows:`rows`,highlighted:`highlighted`,showingRows:`Showing 50 of {{count}} rows`},fileTree:{expandPanel:`Expand Panel`,fileExplorer:`File Explorer`,filters:`Filters`,collapsePanel:`Collapse Panel`,searchFiles:`Search files...`,noFilesLoaded:`No files loaded`,all:`All`,selectNodeDepth:`Select a node to apply depth filter`,explorer:`Explorer`,nodeTypes:`Node Types`,nodeTypesDesc:`Toggle visibility of node types in the graph`,edgeTypes:`Edge Types`,edgeTypesDesc:`Toggle visibility of relationship types`,focusDepth:`Focus Depth`,focusDepthDesc:`Show nodes within N hops of selection`,hops_one:`{{count}} hop`,hops_other:`{{count}} hops`,colorLegend:`Color Legend`},codePanel:{expand:`Expand Code Panel`,dragResize:`Drag to resize`,title:`Code Inspector`,clearCitations:`Clear AI citations`,clearSelection:`Clear selection`,loadingSource:`Loading source...`,selectFile:`Select a file node to preview its contents.`,code:`Code`,selected:`Selected`,aiCitations:`AI Citations`,references_one:`{{count}} reference`,references_other:`{{count}} references`,lines_one:`{{count}} line`,lines_other:`{{count}} lines`,codeNotAvailable:`Code not available in memory for {{path}}`},canvas:{viewModes:{label:`Graph view mode`,force:`Force Graph`,tree:`Sequential Layout`,circles:`Radial Layout`},zoomIn:`Zoom In`,zoomOut:`Zoom Out`,fit:`Fit to Screen`,focusSelected:`Focus on Selected Node`,clearSelection:`Clear Selection`,clear:`Clear`,stopLayout:`Stop Layout`,runLayout:`Run Layout Again`,layoutOptimizing:`Layout optimizing...`,turnOffHighlights:`Turn off all highlights`,turnOnHighlights:`Turn on AI highlights`,chatOnly:{title:`Graph not loaded`,description:`This is a large project, so the graph was skipped to keep the browser responsive. AI chat works normally.`,descriptionWithCount:`This project has {{count}} nodes, so the graph was skipped to keep the browser responsive. AI chat works normally.`,citationNote:`While the graph is unloaded, inline file citations from chat won't auto-open in the Code panel.`,loadAnyway:`Load graph anyway`,loadAnywayWarning:`This project has {{count}} nodes. Loading the full graph may make the browser slow or unresponsive. Continue?`,loadAnywayWarningUnknown:`This may be a large project. Loading the full graph may make the browser slow or unresponsive. Continue?`}},processes:{unknownStep:`Unknown`,allProcessesLabel_one:`All Processes ({{count}} combined)`,allProcessesLabel_other:`All Processes ({{count}} combined)`,emptyTitle:`No Processes Detected`,emptyDescription:`Processes are execution flows traced from entry points. Load a codebase to see detected processes.`,filterPlaceholder:`Filter processes...`,detected_one:`{{count}} process detected`,detected_other:`{{count}} processes detected`,fullMap:`Full Process Map`,viewCombined_one:`View combined map of {{count}} process`,viewCombined_other:`View combined map of {{count}} processes`,crossCommunity:`Cross-Community`,intraCommunity:`Intra-Community`,steps_one:`{{count}} step`,steps_other:`{{count}} steps`,clusters_one:`{{count}} cluster`,clusters_other:`{{count}} clusters`,highlightTitle:`Click to highlight in graph`,removeHighlightTitle:`Click to remove highlight from graph`,loading:`Loading...`,viewing:`Viewing`,view:`View`},processFlow:{title:`Process: {{label}}`,diagramTooLarge:`📊 Diagram Too Large`,renderError:`⚠️ Render Error`,tooComplex_one:`This diagram has {{count}} step and is too complex to render. Try viewing individual processes instead of "All Processes".`,tooComplex_other:`This diagram has {{count}} steps and is too complex to render. Try viewing individual processes instead of "All Processes".`,unableToRender_one:`Unable to render diagram. Steps: {{count}}`,unableToRender_other:`Unable to render diagram. Steps: {{count}}`,zoomOutTitle:`Zoom out (-)`,zoomInTitle:`Zoom in (+)`,resetTitle:`Reset zoom and pan`,resetView:`Reset View`,toggleFocus:`Toggle Focus`,copyMermaid:`Copy Mermaid`},diagram:{aiGenerated:`AI Generated Diagram`,error:`Diagram Error`,showSource:`Show source`,label:`Diagram`,expandTitle:`Expand`,loading:`Loading diagram…`}},"../locales/en/header.json":{repositories:`Repositories`,active:`active`,reanalyzing:`Re-analyzing...`,reanalyzeRepo:`Re-analyze {{repoName}}`,deleteRepo:`Delete {{repoName}}`,reanalyzingRepo:`Re-analyzing {{repoName}}: {{message}}`,analyzeNew:`Analyze a new repository...`,searchRepositories:`Search repositories...`,noRepositoriesFound:`No repositories found for "{{query}}"`,searchNodes:`Search nodes...`,noNodesFound:`No nodes found for "{{query}}"`,starIfCool:`Star if cool`,aiSettings:`AI Settings`,help:`Help`,language:`Language`,selectLanguage:`Select language`},"../locales/en/help.json":{tabs:{overview:`Overview`,ai:`Nexus AI`,shortcuts:`Shortcuts`,status:`Status bar`,graph:`Graph & nodes`,search:`Search & filter`},shortcuts:{searchNodes:`Search nodes`,deselectClose:`Deselect / close`,columns:{action:`Action`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`Function`,functionDesc:`Function declarations`,file:`File`,fileDesc:`Source files`,class:`Class`,classDesc:`Class declarations`,method:`Method`,methodDesc:`Class methods`,interface:`Interface`,interfaceDesc:`TypeScript interfaces`,folder:`Folder`,folderDesc:`Directory nodes`},status:{ready:`Ready`,readyDesc:`Graph is fully loaded and interactive`,nodesCount:`Nodes count`,nodesCountDesc:`Total files and symbols in the graph`,edgesCount:`Edges count`,edgesCountDesc:`Import / dependency connections`,aiIndexStatus:`AI index status`,aiIndexStatusDesc:`Repo is fully indexed for AI queries`,semanticReadyBadge:`Semantic Ready`,explained:`Status bar explained`},tryAsking:`Try asking:`,footer:`GitNexus — graph explorer`,title:`Help & Reference`,footerLong:`GitNexus — open source codebase graph explorer`,docsGithub:`Docs & GitHub ↗`,overview:{gettingStarted:`Getting started`,whatIsTitle:`What is GitNexus?`,whatIsDescription:`An interactive graph explorer for your codebase. Every file, function, and import becomes a node you can explore, query, and navigate visually.`,currentRepoTitle:`Your current repo`,loadedCounts:`Loaded: {{nodeCount}} nodes · {{edgeCount}} edges`,threeWaysTitle:`Three ways to explore`,wayInspect:`Click nodes to inspect`,waySearch:`Search by name or type`,wayAsk:`Ask Nexus AI a natural language question`,navigationTitle:`Navigation`,navZoom:`Scroll to zoom`,navPan:`Click and drag to pan`,navFocus:`Double-click a node to focus its subgraph`},graph:{nodeColorLegend:`Node color legend`,nodeLabel:`{{label}} nodes`,sizeDescription:`Node size reflects connection count — larger nodes are depended on by more files. Edges point from importer → imported.`,detailDescription:`Click any node to open its detail panel — showing imports, exports, and reverse dependencies.`},search:{title:`Search & filter`,searchNodes:`Search nodes`,searchDescription:`Search by filename, function name, or import path. Matching nodes are highlighted live in the graph.`,filterPanel:`Filter panel`,filterDescription:`Use the filter icon in the left sidebar to isolate specific node types, hide leaf nodes, or focus on a depth range from a selected root.`,syntax:`Search syntax`,hints:{nameFragment:`match by name fragment`,pathPrefix:`match by path prefix`,nodeType:`filter by node type`}},ai:{title:`Nexus AI`,semanticReady:`✓ Semantic Ready`,description:`Your repo is indexed and ready for semantic queries. Nexus AI understands code structure and relationships, not just file names.`,questions:{dependencies:`"Which files depend on the auth module?"`,circular:`"Find circular dependencies in this repo"`,connected:`"What are the most connected components?"`,imports:`"Show me all files that import useEffect"`},openPrompt:`Open the prompt via the Nexus AI button (top-right).`}},"../locales/en/onboarding.json":{success:{title:`Server Connected`,description:`Preparing your code knowledge graph...`},loading:{largeRepoHint:`This may take a moment for large repositories`},guide:{copyAria:`Copy to clipboard`,copiedAria:`Copied!`,startServer:`Start your local server`,devDescription:`Fire up the Express backend in a separate terminal to unlock the full graph.`,prodDescription:`One command is all it takes. The browser connects automatically.`,copyCommand:`Copy the command`,copyCommandDescription:`Click the icon in the terminal to copy.`,done:`done`,orInstallGlobally:`or install globally`,globalInstall:`Global install`,startBackend:`Start backend`,terminal:`Terminal`,waitingForServer:`Waiting for server to start`,pasteAndRun:`Paste and run in your terminal`,pasteAndRunDescription:`Open a terminal at the project root, paste, and hit Enter.`,listeningForServer:`Listening for server`,willAutoConnect:`Will auto-connect when detected`,autoConnects:`Auto-connects and opens the graph`,autoConnectsDescription:`No refresh needed — the page detects the server automatically.`,requires:`Requires`,port:`Port 4747`},analyzeFirst:{title:`Analyze your first repository`,description:`Paste a repository URL and GitNexus will clone it, parse the code, and build a live knowledge graph — right in your browser.`,footer:`Public repos only · Cloned locally by the server · No data leaves your machine`},landing:{chooseRepository:`Choose a repository`,description:`Select an indexed repository to explore, or analyze a new one.`,indexed:`Indexed {{time}}`,orAnalyzeNew:`or analyze new`,footer:`Public & private repos · Cloned locally by the server · No data leaves your machine`,time:{justNow:`just now`,minutesAgo:`{{count}}m ago`,hoursAgo:`{{count}}h ago`,daysAgo:`{{count}}d ago`}},repoAnalyzer:{inputType:`Input type`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,azureDevOpsUrl:`Azure DevOps`,localFolder:`Local Folder`,starting:`Starting analysis...`,analyzeRepository:`Analyze Repository`,complete:`Analysis complete`,loadingGraph:`Loading graph...`,defaultRepoName:`repository`,githubRepositoryUrl:`GitHub Repository URL`,githubTokenLabel:`Personal Access Token (optional)`,githubTokenPlaceholder:`ghp_… or github_pat_…`,githubTokenHelp:`Required for private repos. Needs the 'repo' (or fine-grained Contents:read) scope. Sent once, not stored.`,gitlabRepositoryUrl:`GitLab Repository URL`,gitlabSupported:`Supports GitLab.com and self-hosted GitLab instances.`,azureDevOpsRepositoryUrl:`Azure DevOps Repository URL`,azureDevOpsSupported:`Format: https://dev.azure.com/organization/project/_git/repository`,localFolderPath:`Local Folder Path`,hideBackground:`Hide (analysis continues in background)`,upload:{button:`Upload a folder`,uploading:`Uploading…`,selected:`{{fileCount}} files ready ({{dropped}} skipped: .git, node_modules, build output)`,empty:`No analyzable files found in that folder.`}}},"../locales/en/settings.json":{title:`AI Settings`,subtitle:`Configure your LLM provider`,localServer:`Local Server`,backendUrl:`Backend URL`,connected:`Connected`,notConnected:`Not connected`,runServeHint:"Run `gitnexus serve` to connect the web UI to a local backend.",accessToken:{label:`Access Token`,placeholder:`Paste your deploy access token`,hint:`Required only for a gated deploy. Find it in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable. Leave empty for a local server.`,title:`This deploy requires an access token`,promptHint:`The GitNexus server is running but gated. Find the token in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable.`,connect:`Connect`,reveal:`Show access token`,hide:`Hide access token`,sessionNote:`Stored for this browser session only. You will re-enter it in a new tab or after closing the browser.`},provider:`Provider`,apiKey:`API Key`,learnMore:`Learn more`,model:`Model`,searchModelPlaceholder:`Search or type model ID...`,selectModelPlaceholder:`Select or type a model...`,customModelHint:`Type a model ID or press Enter`,customModelExample:`e.g. openai/gpt-4o`,pressEnterCustom:`Press Enter to use as custom ID`,baseUrl:`Base URL`,optional:`optional`,deploymentName:`Deployment Name`,apiVersion:`API Version`,checkConnection:`Check connection`,privacyLabel:`Privacy:`,privacyText:`Your API keys are stored locally in this browser.`,providers:{openai:{description:`Use OpenAI models for chat and code reasoning.`,apiKeyPlaceholder:`Enter your OpenAI API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1 (default)`,baseUrlHint:`Leave empty to use the default OpenAI API. Set a custom URL for proxies or compatible APIs.`},gemini:{description:`Use Google Gemini models.`,apiKeyPlaceholder:`Enter your Google AI API key`,helperText:`Get your API key from`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`e.g., gemini-2.0-flash, gemini-1.5-pro`},anthropic:{description:`Use Anthropic Claude models.`,apiKeyPlaceholder:`Enter your Anthropic API key`,helperText:`Get your API key from`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`e.g., claude-sonnet-4-20250514, claude-3-opus`},azure:{apiKeyPlaceholder:`Enter your Azure OpenAI API key`,deploymentNamePlaceholder:`e.g., gpt-4o-deployment`},ollama:{quickStart:`📋 Quick Start:`,installFrom:`Install Ollama from`,thenRun:`, then run:`,modelPlaceholder:`e.g., llama3.2, mistral, codellama`},openrouter:{apiKeyPlaceholder:`Enter your OpenRouter API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`Enter your MiniMax API key`,helperText:`Get your API key from`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`e.g., MiniMax-M3 or MiniMax-M2.7`,helperModel:`Available: MiniMax-M3 (default) and MiniMax-M2.7`,endpoint:`Regional endpoint`,endpoints:{global:`Global (api.minimax.io)`,china:`China (api.minimaxi.com)`},thinking:`Thinking mode`,thinkingModes:{adaptive:`Adaptive`,disabled:`Disabled`,always_on:`Always on`},capabilities:`{{contextWindow}} token context | Inputs: {{modalities}}`},glm:{apiKeyPlaceholder:`Enter your Z.AI API key`}},loadingModels:`Loading models...`,noModelsMatch:`No models match "{{searchTerm}}"`,moreModels:`+{{count}} more • Refine your search`,apiKeySession:`API keys are stored in session storage and will be cleared when you close this tab.`,startLocalServer:`start the local server`,settingsSaved:`Settings saved`,failedToSave:`Failed to save`,saveSettings:`Save Settings`,endpoint:`Endpoint`,azurePortal:`Azure Portal`,azureHint:`Configure your Azure OpenAI service in the`,defaultPort:`Default port is`,pullModel:`Pull a model with`,browseModels:`Browse all models at`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API (default). Use https://api.z.ai/api/paas/v4 for the general API.`,privacyFull:`Your API keys are stored only in your browser's session storage and are cleared when the tab closes. They're sent directly to the LLM provider when you chat. Your code never leaves your machine.`},"../locales/zh-CN/chat.json":{tabs:{chat:`Nexus AI`,processes:`流程`},suggestions:{architecture:`解释项目架构`,whatDoes:`这个项目是做什么的?`,importantFiles:`显示最重要的文件`,apiHandlers:`查找所有 API 处理器`},empty:{title:`可以问我任何问题`,description:`我可以帮你理解架构、查找函数或解释连接关系。`},input:{placeholder:`询问这个代码库...`,initializing:`正在初始化 AI Agent...`,configureProvider:`配置 LLM 提供商以启用聊天。`},actions:{closePanel:`关闭面板`,scrollBottom:`滚动到底部`,clearChat:`清空聊天`,stopResponse:`停止响应`},stopped:`用户已停止`,badges:{configureAI:`配置 AI`,connecting:`连接中`},chatOnly:{banner:`图谱未加载(大型项目)。对话功能正常;内联节点引用不会在图谱视图中高亮。`},roles:{you:`你`,assistant:`Nexus AI`},newBadge:`新`},"../locales/zh-CN/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},updateBanner:`GitNexus {{latest}} 已发布 — 此服务器运行 {{installed}}。`,updateBannerDismiss:`关闭更新通知`,actions:{cancel:`取消`,dismiss:`关闭`,tryAgain:`重试`,hide:`隐藏`,retry:`重试`,copy:`复制`,copied:`已复制`,close:`关闭`,run:`运行`,clear:`清空`,remove:`移除`,focusInGraph:`在图中聚焦`,expand:`展开`,collapse:`折叠`},chat:{viewNodeInCodePanel:`在代码面板中查看 {{inner}}`,openInCodePanel:`在代码面板中打开 • {{inner}}`,waitForVectorIndex:`请稍候,正在创建向量索引。`},counts:{files_one:`{{count}} 个文件`,files_other:`{{count}} 个文件`,nodes_one:`{{count}} 个节点`,nodes_other:`{{count}} 个节点`,edges_one:`{{count}} 条边`,edges_other:`{{count}} 条边`,symbols_one:`{{count}} 个符号`,symbols_other:`{{count}} 个符号`,flows_one:`{{count}} 条流程`,flows_other:`{{count}} 条流程`},progress:{connecting:`正在连接服务器...`,connectingShort:`正在连接...`,validatingServer:`正在验证服务器`,validatingServerEllipsis:`正在验证服务器...`,downloadingGraph:`正在下载图数据...`,downloadedMb:`已下载 {{mb}} MB`,downloadingWithPercent:`正在下载图数据... {{percent}}%`,downloadingMb:`正在下载... {{mb}} MB`,processing:`正在处理...`,processingGraph:`正在处理图数据...`,extractingFileContents:`正在提取文件内容`,loadingGraph:`正在加载图数据...`,starting:`正在启动...`,executing:`正在执行...`,truncated:`...(已截断)`,ready:`就绪`,switchingRepository:`正在切换仓库...`,loadingRepository:`正在加载 {{repo}}`,validating:`正在验证`,failedSwitchRepository:`切换仓库失败`,unknownError:`未知错误`},analyzePhases:{queued:`已排队`,cloning:`正在克隆仓库`,pulling:`正在拉取最新代码`,extracting:`正在扫描文件`,structure:`正在构建结构`,parsing:`正在解析代码`,imports:`正在解析导入`,calls:`正在追踪调用`,heritage:`正在提取继承关系`,scopeResolution:`正在解析类型`,communities:`正在检测社区`,processes:`正在检测流程`,complete:`流水线完成`,lbug:`正在加载数据库`,fts:`正在创建搜索索引`,embeddings:`正在生成嵌入向量`,done:`完成`,retrying:`崩溃后正在重试`},units:{elapsedSeconds:`{{seconds}} 秒`,elapsedMinutesSeconds:`{{minutes}} 分 {{seconds}} 秒`}},"../locales/zh-CN/errors.json":{unknown:`未知错误`,connectFailed:`连接服务器失败`,loadGraphFailed:`加载图数据失败`,failedToConnect:`连接失败`,analysisFailed:`分析失败,请检查服务器日志。`,startAnalysisFailed:`启动分析失败`,invalidGithubUrl:`请输入有效的 GitHub 仓库 URL。`,invalidAzureDevOpsUrl:`请输入有效的 Azure DevOps 仓库 URL。`,missingFolderPath:`请输入文件夹路径。`,backend:{reconnecting:`服务器连接已断开,正在重连…`,network:"无法连接 GitNexus 服务器,请确认 `gitnexus serve` 正在运行。",timeout:`服务器响应超时,请稍后重试。`,rateLimited:`请求过于频繁,请在 {{seconds}} 秒后重试。`,notFound:`未找到请求的仓库或资源。`,unauthorized:`GitNexus 部署需要访问令牌。请在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中查看,然后粘贴到「设置」中。`,originBlocked:`此操作无法从托管界面执行。请通过服务器自身地址(例如 http://localhost:4747)打开 GitNexus 后再继续。`,client:`请求失败:{{message}}`,server:`服务器错误:{{message}}`}},"../locales/zh-CN/graph.json":{statusBar:{sponsor:`赞助`,sponsorHint:`需要买点 API 额度跑 SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} 个文件`},toolCall:{status:{running:`运行中`,completed:`已完成`,error:`错误`,stopped:`已停止`},tools:{search:`🔍 搜索代码`,cypher:`🔗 Cypher 查询`,grep:`🔎 模式搜索`,read:`📄 读取文件`,overview:`🗺️ 代码库概览`,explore:`🔬 深入分析`,impact:`💥 影响分析`},query:`查询`,input:`输入`,result:`结果`,searchPrefix:`搜索:"{{query}}"`},embedding:{generateTitle:`为语义搜索生成嵌入向量`,enable:`启用语义搜索`,loadingModel:`正在加载 AI 模型...`,embeddingNodes:`正在嵌入 {{processed}}/{{total}} 个节点`,creatingIndex:`正在创建向量索引...`,readyTitle:`语义搜索已就绪!可在 AI 聊天中使用自然语言。`,ready:`语义就绪`,errorTitle:`嵌入失败,点击重试。`,failedRetry:`失败 - 重试`,fallback:{title:`WebGPU 拒绝了请求`,subtitle:`你的浏览器不支持 GPU 加速`,description:`无法用 WebGPU 创建嵌入向量,因此语义搜索(Graph RAG)不会那么智能,但图谱仍可正常使用。`,options:`可选方案:`,useCpu:`使用 CPU`,useCpuDescriptionSmall:`可用,但会稍慢`,useCpuDescriptionLarge:`可用,但会慢很多`,estimated:`(约 {{minutes}} 分钟,{{count}} 个节点)`,skipIt:`跳过`,skipDescription:`图谱可用,但没有 AI 语义搜索`,smallCodebase:`检测到小型代码库!CPU 应该没问题。`,tip:`💡 提示:可尝试 Chrome 或 Edge 以获得 WebGPU 支持`,skipEmbeddings:`跳过嵌入`,useCpuRecommended:`使用 CPU(推荐)`,useCpuSlow:`使用 CPU(较慢)`}},queryFab:{query:`查询`,cypherQuery:`Cypher 查询`,examples:`示例`,run:`运行`,noProject:`未加载项目,请先加载项目。`,dbNotReady:`数据库尚未就绪,请等待加载完成。`,executionFailed:`查询执行失败`,exampleLabels:{functions:`所有函数`,classes:`所有类`,interfaces:`所有接口`,calls:`函数调用`,imports:`导入依赖`},clear:`清除`,rows:`行`,highlighted:`已高亮`,showingRows:`显示 {{count}} 行中的前 50 行`},fileTree:{expandPanel:`展开面板`,fileExplorer:`文件浏览器`,filters:`过滤器`,collapsePanel:`折叠面板`,searchFiles:`搜索文件...`,noFilesLoaded:`未加载文件`,all:`全部`,selectNodeDepth:`选择节点后才能应用深度过滤`,explorer:`浏览器`,nodeTypes:`节点类型`,nodeTypesDesc:`切换图中节点类型的可见性`,edgeTypes:`边类型`,edgeTypesDesc:`切换关系类型的可见性`,focusDepth:`聚焦深度`,focusDepthDesc:`显示所选节点 N 跳内的节点`,hops_one:`{{count}} 跳`,hops_other:`{{count}} 跳`,colorLegend:`颜色图例`},codePanel:{expand:`展开代码面板`,dragResize:`拖动调整大小`,title:`代码检查器`,clearCitations:`清除 AI 引用`,clearSelection:`清除选择`,loadingSource:`正在加载源码...`,selectFile:`选择文件节点以预览其内容。`,code:`代码`,selected:`已选择`,aiCitations:`AI 引用`,references_one:`{{count}} 条引用`,references_other:`{{count}} 条引用`,lines_one:`{{count}} 行`,lines_other:`{{count}} 行`,codeNotAvailable:`内存中没有 {{path}} 的代码内容`},canvas:{viewModes:{label:`图形视图模式`,force:`力导向图`,tree:`顺序布局`,circles:`径向布局`},zoomIn:`放大`,zoomOut:`缩小`,fit:`适应屏幕`,focusSelected:`聚焦所选节点`,clearSelection:`清除选择`,clear:`清除`,stopLayout:`停止布局`,runLayout:`重新运行布局`,layoutOptimizing:`正在优化布局...`,turnOffHighlights:`关闭全部高亮`,turnOnHighlights:`开启 AI 高亮`,chatOnly:{title:`图谱未加载`,description:`这是一个大型项目,已跳过图谱加载以保持浏览器响应。AI 对话功能正常可用。`,descriptionWithCount:`该项目包含 {{count}} 个节点,已跳过图谱加载以保持浏览器响应。AI 对话功能正常可用。`,citationNote:`图谱未加载时,对话中的内联文件引用不会自动在代码面板中打开。`,loadAnyway:`仍然加载图谱`,loadAnywayWarning:`该项目包含 {{count}} 个节点。加载完整图谱可能导致浏览器变慢或无响应。是否继续?`,loadAnywayWarningUnknown:`这可能是一个大型项目。加载完整图谱可能导致浏览器变慢或无响应。是否继续?`}},processes:{unknownStep:`未知`,allProcessesLabel_one:`全部流程(合并 {{count}} 个)`,allProcessesLabel_other:`全部流程(合并 {{count}} 个)`,emptyTitle:`未检测到流程`,emptyDescription:`流程是从入口点追踪出的执行链路。加载代码库后即可查看检测到的流程。`,filterPlaceholder:`过滤流程...`,detected_one:`检测到 {{count}} 个流程`,detected_other:`检测到 {{count}} 个流程`,fullMap:`完整流程图`,viewCombined_one:`查看 {{count}} 个流程的合并图`,viewCombined_other:`查看 {{count}} 个流程的合并图`,crossCommunity:`跨社区`,intraCommunity:`社区内`,steps_one:`{{count}} 步`,steps_other:`{{count}} 步`,clusters_one:`{{count}} 个聚类`,clusters_other:`{{count}} 个聚类`,highlightTitle:`在图谱中高亮`,removeHighlightTitle:`移除图谱高亮`,loading:`加载中...`,viewing:`查看中`,view:`查看`},processFlow:{title:`流程:{{label}}`,diagramTooLarge:`📊 图表过大`,renderError:`⚠️ 渲染错误`,tooComplex_one:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,tooComplex_other:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,unableToRender_one:`无法渲染图表。步骤数:{{count}}`,unableToRender_other:`无法渲染图表。步骤数:{{count}}`,zoomOutTitle:`缩小 (-)`,zoomInTitle:`放大 (+)`,resetTitle:`重置缩放和平移`,resetView:`重置视图`,toggleFocus:`切换聚焦`,copyMermaid:`复制 Mermaid`},diagram:{aiGenerated:`AI 生成图表`,error:`图表错误`,showSource:`显示源码`,label:`图表`,expandTitle:`展开`,loading:`正在加载图表…`}},"../locales/zh-CN/header.json":{repositories:`仓库`,active:`当前`,reanalyzing:`正在重新分析...`,reanalyzeRepo:`重新分析 {{repoName}}`,deleteRepo:`删除 {{repoName}}`,reanalyzingRepo:`正在重新分析 {{repoName}}:{{message}}`,analyzeNew:`分析新仓库...`,searchRepositories:`搜索仓库...`,noRepositoriesFound:`未找到“{{query}}”相关仓库`,searchNodes:`搜索节点...`,noNodesFound:`未找到“{{query}}”相关节点`,starIfCool:`觉得不错就点星`,aiSettings:`AI 设置`,help:`帮助`,language:`语言`,selectLanguage:`选择语言`},"../locales/zh-CN/help.json":{tabs:{overview:`概览`,ai:`Nexus AI`,shortcuts:`快捷键`,status:`状态栏`,graph:`图谱与节点`,search:`搜索与过滤`},shortcuts:{searchNodes:`搜索节点`,deselectClose:`取消选择 / 关闭`,columns:{action:`操作`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`函数`,functionDesc:`函数声明`,file:`文件`,fileDesc:`源码文件`,class:`类`,classDesc:`类声明`,method:`方法`,methodDesc:`类方法`,interface:`接口`,interfaceDesc:`TypeScript 接口`,folder:`文件夹`,folderDesc:`目录节点`},status:{ready:`就绪`,readyDesc:`图谱已完全加载并可交互`,nodesCount:`节点数`,nodesCountDesc:`图谱中的文件与符号总数`,edgesCount:`边数`,edgesCountDesc:`导入 / 依赖连接`,aiIndexStatus:`AI 索引状态`,aiIndexStatusDesc:`仓库已完成 AI 查询索引`,semanticReadyBadge:`语义就绪`,explained:`状态栏说明`},tryAsking:`可以尝试问:`,footer:`GitNexus — 图谱浏览器`,title:`帮助与参考`,footerLong:`GitNexus — 开源代码库图谱浏览器`,docsGithub:`文档与 GitHub ↗`,overview:{gettingStarted:`开始使用`,whatIsTitle:`GitNexus 是什么?`,whatIsDescription:`GitNexus 是代码库的交互式图谱浏览器。每个文件、函数和导入关系都会变成可探索、可查询、可视化导航的节点。`,currentRepoTitle:`当前仓库`,loadedCounts:`已加载:{{nodeCount}} 个节点 · {{edgeCount}} 条边`,threeWaysTitle:`三种探索方式`,wayInspect:`点击节点查看详情`,waySearch:`按名称或类型搜索`,wayAsk:`向 Nexus AI 提出自然语言问题`,navigationTitle:`导航`,navZoom:`滚动缩放`,navPan:`点击并拖动进行平移`,navFocus:`双击节点聚焦其子图`},graph:{nodeColorLegend:`节点颜色图例`,nodeLabel:`{{label}}节点`,sizeDescription:`节点大小反映连接数量——越大的节点被越多文件依赖。边的方向表示从导入方 → 被导入方。`,detailDescription:`点击任意节点可打开详情面板,查看导入、导出和反向依赖。`},search:{title:`搜索与过滤`,searchNodes:`搜索节点`,searchDescription:`可按文件名、函数名或导入路径搜索,匹配的节点会在图谱中实时高亮。`,filterPanel:`过滤面板`,filterDescription:`使用左侧栏的过滤图标隔离特定节点类型、隐藏叶子节点,或以选中节点为根聚焦指定深度范围。`,syntax:`搜索语法`,hints:{nameFragment:`按名称片段匹配`,pathPrefix:`按路径前缀匹配`,nodeType:`按节点类型过滤`}},ai:{title:`Nexus AI`,semanticReady:`✓ 语义索引就绪`,description:`仓库已完成索引,可进行语义查询。Nexus AI 理解代码结构和关系,而不只是文件名。`,questions:{dependencies:`“哪些文件依赖 auth 模块?”`,circular:`“找出这个仓库中的循环依赖”`,connected:`“哪些组件连接最密集?”`,imports:`“显示所有导入 useEffect 的文件”`},openPrompt:`点击右上角的 Nexus AI 按钮打开提问面板。`}},"../locales/zh-CN/onboarding.json":{success:{title:`服务器已连接`,description:`正在准备代码知识图谱...`},loading:{largeRepoHint:`大型仓库可能需要一些时间`},guide:{copyAria:`复制到剪贴板`,copiedAria:`已复制!`,startServer:`启动本地服务器`,devDescription:`在另一个终端启动 Express 后端,即可启用完整图谱。`,prodDescription:`只需一条命令,浏览器会自动连接。`,copyCommand:`复制命令`,copyCommandDescription:`点击终端右侧图标复制。`,done:`完成`,orInstallGlobally:`或全局安装`,globalInstall:`全局安装`,startBackend:`启动后端`,terminal:`终端`,waitingForServer:`等待服务器启动`,pasteAndRun:`粘贴并在终端运行`,pasteAndRunDescription:`在项目根目录打开终端,粘贴命令并回车。`,listeningForServer:`正在监听服务器`,willAutoConnect:`检测到后会自动连接`,autoConnects:`自动连接并打开图谱`,autoConnectsDescription:`无需刷新,页面会自动检测服务器。`,requires:`需要`,port:`端口 4747`},analyzeFirst:{title:`分析你的第一个仓库`,description:`粘贴仓库 URL,GitNexus 会克隆仓库、解析代码,并直接在浏览器中构建实时知识图谱。`,footer:`仅支持公开仓库 · 服务器本地克隆 · 数据不会离开你的机器`},landing:{chooseRepository:`选择仓库`,description:`选择一个已索引仓库开始探索,或分析一个新仓库。`,indexed:`索引于 {{time}}`,orAnalyzeNew:`或分析新仓库`,footer:`支持公开与私有仓库 · 服务器本地克隆 · 数据不会离开你的机器`,time:{justNow:`刚刚`,minutesAgo:`{{count}} 分钟前`,hoursAgo:`{{count}} 小时前`,daysAgo:`{{count}} 天前`}},repoAnalyzer:{inputType:`输入类型`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,azureDevOpsUrl:`Azure DevOps`,localFolder:`本地文件夹`,starting:`正在启动分析...`,analyzeRepository:`分析仓库`,complete:`分析完成`,loadingGraph:`正在加载图数据...`,defaultRepoName:`仓库`,githubRepositoryUrl:`GitHub 仓库 URL`,githubTokenLabel:`个人访问令牌(可选)`,githubTokenPlaceholder:`ghp_… 或 github_pat_…`,githubTokenHelp:`私有仓库需要此项。需 'repo' 范围(或细粒度 Contents:read)。仅发送一次,不会保存。`,gitlabRepositoryUrl:`GitLab 仓库 URL`,gitlabSupported:`支持 GitLab.com 和自托管 GitLab 实例。`,azureDevOpsRepositoryUrl:`Azure DevOps 仓库 URL`,azureDevOpsSupported:`格式: http://server/Collection/Project/_git/Repository`,localFolderPath:`本地文件夹路径`,hideBackground:`隐藏(分析继续在后台进行)`,upload:{button:`上传文件夹`,uploading:`上传中…`,selected:`已准备 {{fileCount}} 个文件(已跳过 {{dropped}} 个:.git、node_modules、构建产物)`,empty:`该文件夹中未找到可分析的文件。`}}},"../locales/zh-CN/settings.json":{title:`AI 设置`,subtitle:`配置你的 LLM 提供商`,localServer:`本地服务器`,backendUrl:`后端 URL`,connected:`已连接`,notConnected:`未连接`,runServeHint:"运行 `gitnexus serve` 将 Web UI 连接到本地后端。",accessToken:{label:`访问令牌`,placeholder:`粘贴部署访问令牌`,hint:`仅在启用访问控制的部署中需要。可在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中找到。本地服务器请留空。`,title:`此部署需要访问令牌`,promptHint:`GitNexus 服务器正在运行,但已启用访问控制。请在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中查看该令牌。`,connect:`连接`,reveal:`显示访问令牌`,hide:`隐藏访问令牌`,sessionNote:`仅在当前浏览器会话中保存。新标签页或重新打开浏览器后需要重新输入。`},provider:`提供商`,apiKey:`API Key`,learnMore:`了解更多`,model:`模型`,searchModelPlaceholder:`搜索或输入模型 ID...`,selectModelPlaceholder:`选择或输入模型...`,customModelHint:`输入模型 ID 或按 Enter`,customModelExample:`例如 openai/gpt-4o`,pressEnterCustom:`按 Enter 使用自定义 ID`,baseUrl:`Base URL`,optional:`可选`,deploymentName:`部署名称`,apiVersion:`API 版本`,checkConnection:`检查连接`,privacyLabel:`隐私:`,privacyText:`你的 API Key 仅保存在此浏览器本地。`,providers:{openai:{description:`使用 OpenAI 模型进行聊天和代码推理。`,apiKeyPlaceholder:`输入 OpenAI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`例如:gpt-4o、gpt-4-turbo、gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1(默认)`,baseUrlHint:`留空则使用默认 OpenAI API。可为代理或兼容 API 设置自定义 URL。`},gemini:{description:`使用 Google Gemini 模型。`,apiKeyPlaceholder:`输入 Google AI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`例如:gemini-2.0-flash、gemini-1.5-pro`},anthropic:{description:`使用 Anthropic Claude 模型。`,apiKeyPlaceholder:`输入 Anthropic API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`例如:claude-sonnet-4-20250514、claude-3-opus`},azure:{apiKeyPlaceholder:`输入 Azure OpenAI API Key`,deploymentNamePlaceholder:`例如:gpt-4o-deployment`},ollama:{quickStart:`📋 快速开始:`,installFrom:`从这里安装 Ollama:`,thenRun:`,然后运行:`,modelPlaceholder:`例如:llama3.2、mistral、codellama`},openrouter:{apiKeyPlaceholder:`输入 OpenRouter API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`输入 MiniMax API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`例如:MiniMax-M3 或 MiniMax-M2.7`,helperModel:`可用:MiniMax-M3(默认)和 MiniMax-M2.7`,endpoint:`区域端点`,endpoints:{global:`全球(api.minimax.io)`,china:`中国(api.minimaxi.com)`},thinking:`思考模式`,thinkingModes:{adaptive:`自适应`,disabled:`关闭`,always_on:`始终开启`},capabilities:`{{contextWindow}} token 上下文 | 输入:{{modalities}}`},glm:{apiKeyPlaceholder:`输入 Z.AI API Key`}},loadingModels:`正在加载模型...`,noModelsMatch:`没有匹配“{{searchTerm}}”的模型`,moreModels:`+{{count}} 个更多模型 • 缩小搜索范围`,apiKeySession:`API Key 保存在会话存储中,关闭此标签页后会被清除。`,startLocalServer:`启动本地服务器`,settingsSaved:`设置已保存`,failedToSave:`保存失败`,saveSettings:`保存设置`,endpoint:`端点`,azurePortal:`Azure Portal`,azureHint:`在这里配置 Azure OpenAI 服务:`,defaultPort:`默认端口为`,pullModel:`使用以下命令拉取模型`,browseModels:`在这里浏览全部模型:`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API(默认)。通用 API 请使用 https://api.z.ai/api/paas/v4。`,privacyFull:`你的 API Key 只保存在此浏览器的会话存储中,关闭标签页后会清除。聊天时会直接发送给 LLM 提供商,你的代码不会离开本机。`}}),Xn={},Zn=new Set;for(let[e,t]of Object.entries(Yn)){let n=e.match(/\.\.\/locales\/([^/]+)\/([^/.]+)\.json$/);if(!n)continue;let[,r,i]=n;Xn[r]??={},Xn[r][i]=t,Zn.add(i)}var Qn=Array.from(Zn).sort(),$n=`common`,er=`gitnexus.lng`;function tr(e){if(typeof document>`u`)return;let t=Jn(e);document.documentElement.lang=t.code,document.documentElement.dir=t.dir}function nr(e){return qn(e)??`en`}function rr(e){let t=qn(e);if(!(!t||typeof window>`u`))try{window.localStorage.setItem(er,t)}catch{}}yn.use(Un).use(Wn).init({resources:Xn,fallbackLng:`en`,supportedLngs:Kn,load:`currentOnly`,ns:Qn,defaultNS:$n,fallbackNS:!1,returnEmptyString:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:[`querystring`,`localStorage`,`navigator`,`htmlTag`],lookupQuerystring:`lng`,lookupLocalStorage:er,caches:[],convertDetectedLanguage:nr}}).then(()=>{let e=yn.resolvedLanguage||yn.language;tr(e),rr(e)}),yn.on(`languageChanged`,e=>{let t=yn.resolvedLanguage||e;tr(t),rr(t)});var ir=yn,ar=e=>e.replace(/\\/g,`/`).replace(/^\.?\//,``),or=/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+)(?::(\d+)(?:[-–](\d+))?)?\]\]/g,sr=/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,cr={Project:`#a855f7`,Package:`#8b5cf6`,Module:`#7c3aed`,Folder:`#6366f1`,File:`#3b82f6`,Class:`#f59e0b`,Protocol:`#ec4899`,Category:`#14b8a6`,Function:`#10b981`,Method:`#14b8a6`,Variable:`#64748b`,Interface:`#ec4899`,Enum:`#f97316`,Decorator:`#eab308`,Import:`#475569`,Type:`#a78bfa`,CodeElement:`#64748b`,Community:`#818cf8`,Process:`#f43f5e`,Section:`#60a5fa`,Struct:`#f59e0b`,Trait:`#ec4899`,Impl:`#14b8a6`,TypeAlias:`#a78bfa`,Const:`#64748b`,Static:`#64748b`,Namespace:`#7c3aed`,Union:`#f97316`,Typedef:`#a78bfa`,Macro:`#eab308`,Property:`#64748b`,Record:`#f59e0b`,Delegate:`#14b8a6`,Annotation:`#eab308`,Constructor:`#10b981`,Template:`#a78bfa`,Route:`#f43f5e`,Destination:`#fb7185`,Tool:`#a855f7`,BasicBlock:`#475569`},lr={Project:20,Package:16,Module:13,Folder:10,File:6,Class:8,Protocol:7,Category:3,Function:4,Method:3,Variable:2,Interface:7,Enum:5,Decorator:2,Import:1.5,Type:3,CodeElement:2,Community:0,Process:0,Section:8,Struct:8,Trait:7,Impl:3,TypeAlias:3,Const:2,Static:2,Namespace:13,Union:5,Typedef:3,Macro:2,Property:2,Record:8,Delegate:3,Annotation:2,Constructor:4,Template:3,Route:5,Destination:5,Tool:5,BasicBlock:2},ur=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#d946ef`,`#ec4899`,`#f43f5e`,`#14b8a6`,`#84cc16`],dr=e=>ur[e%ur.length],fr=[`Project`,`Package`,`Module`,`Folder`,`File`,`Class`,`Protocol`,`Category`,`Function`,`Method`,`Property`,`Const`,`Interface`,`Enum`,`Type`],pr=[`Folder`,`File`,`Class`,`Protocol`,`Category`,`Interface`,`Enum`,`Type`,`Function`,`Method`,`Variable`,`Property`,`Const`,`Decorator`,`Import`],mr=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`],hr=[`CONTAINS`,`DEFINES`,`IMPORTS`,`EXTENDS`,`IMPLEMENTS`,`CALLS`],gr={CONTAINS:{color:`#2d5a3d`,label:`Contains`},DEFINES:{color:`#0e7490`,label:`Defines`},IMPORTS:{color:`#1d4ed8`,label:`Imports`},CALLS:{color:`#7c3aed`,label:`Calls`},EXTENDS:{color:`#c2410c`,label:`Extends`},IMPLEMENTS:{color:`#be185d`,label:`Implements`}},H=m(),_r=(0,R.createContext)(null),vr=({children:e})=>{let[t,n]=(0,R.useState)(null),[r,i]=(0,R.useState)(null),[a,o]=(0,R.useState)(fr),[s,c]=(0,R.useState)(hr),[l,u]=(0,R.useState)(null),[d,f]=(0,R.useState)(new Set),[p,m]=(0,R.useState)(`force`),[h,g]=(0,R.useState)(`full`),[_,v]=(0,R.useState)(null),y=(0,R.useCallback)(e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),b=(0,R.useCallback)(e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),x=(0,R.useMemo)(()=>({graph:t,setGraph:n,selectedNode:r,setSelectedNode:i,visibleLabels:a,toggleLabelVisibility:y,visibleEdgeTypes:s,toggleEdgeVisibility:b,depthFilter:l,setDepthFilter:u,highlightedNodeIds:d,setHighlightedNodeIds:f,graphViewMode:p,setGraphViewMode:m,graphMode:h,setGraphMode:g,chatOnlyNodeCount:_,setChatOnlyNodeCount:v}),[t,r,a,s,l,d,p,h,_]);return(0,H.jsx)(_r.Provider,{value:x,children:e})},yr=()=>{let e=(0,R.useContext)(_r);if(!e)throw Error(`useGraphState must be used within a GraphStateProvider`);return e},br=`gitnexus.autoStartEmbeddings`,xr=()=>typeof window>`u`||!window.localStorage?!1:window.localStorage.getItem(br)===`true`,Sr=(e,t)=>e.find(e=>Re(e)===t)?.name??t.split(/[/\\]/).filter(Boolean).at(-1)??t,Cr=(0,R.createContext)(null),wr=({children:e})=>(0,H.jsx)(vr,{children:(0,H.jsx)(Tr,{children:e})}),Tr=({children:e})=>{let[t,n]=(0,R.useState)(`onboarding`),{graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,highlightedNodeIds:p,setHighlightedNodeIds:m,graphViewMode:h,setGraphViewMode:g,graphMode:_,setGraphMode:v,chatOnlyNodeCount:y,setChatOnlyNodeCount:b}=yr(),[S,C]=(0,R.useState)(!1),[w,T]=(0,R.useState)(`code`),[E,D]=(0,R.useState)(!1),O=(0,R.useCallback)(()=>{Ye(!0)},[]),k=(0,R.useCallback)(()=>{C(!0),T(`chat`)},[]),[A,j]=(0,R.useState)(null),[M,N]=(0,R.useState)(new Set),[F,I]=(0,R.useState)(new Set),[L,ee]=(0,R.useState)(new Set),[te,ne]=(0,R.useState)(!0),z=(0,R.useCallback)(()=>{ne(e=>!e)},[]),B=(0,R.useCallback)(()=>{I(new Set)},[]),ie=(0,R.useCallback)(()=>{N(new Set)},[]),ae=(0,R.useCallback)(()=>{ee(new Set)},[]),oe=(0,R.useCallback)(()=>{m(new Set),j(null)},[]),[se,ce]=(0,R.useState)(new Map),le=(0,R.useRef)(null),ue=(0,R.useCallback)((e,t)=>{let n=Date.now(),r=t===`pulse`?2e3:t===`ripple`?3e3:4e3;ce(i=>{let a=new Map(i);for(let i of e)a.set(i,{type:t,startTime:n,duration:r});return a}),setTimeout(()=>{ce(t=>{let r=new Map(t);for(let t of e){let e=r.get(t);e&&e.startTime===n&&r.delete(t)}return r})},r+100)},[]),de=(0,R.useCallback)(()=>{ce(new Map),le.current&&=(clearInterval(le.current),null)},[]),[fe,pe]=(0,R.useState)(null),[me,he]=(0,R.useState)(``),[ge,_e]=(0,R.useState)(void 0),[ve,ye]=(0,R.useState)(null),[be,xe]=(0,R.useState)([]),[Se,Te]=(0,R.useState)(`idle`),[De,Oe]=(0,R.useState)(null),[ke,je]=(0,R.useState)(Ce),[Me,Ne]=(0,R.useState)(!1),[Pe,Fe]=(0,R.useState)(!1),[Ie,Le]=(0,R.useState)(!1),[Re,ze]=(0,R.useState)(null),[Be,Ve]=(0,R.useState)([]),[He,Ue]=(0,R.useState)(!1),[We,Ge]=(0,R.useState)([]),[Ke,qe]=(0,R.useState)([]),[Je,Ye]=(0,R.useState)(!1),[Xe,Ze]=(0,R.useState)(null),Qe=(0,R.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&e.set(ar(t.properties.filePath),t.id);return e},[r]),$e=(0,R.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&t.properties.filePath&&e.set(ar(t.properties.filePath),t.properties.filePath);return e},[r]),et=(0,R.useCallback)(e=>{let t=ar(e);if($e.has(t))return $e.get(t);for(let[e,n]of $e)if(e.endsWith(t))return n;return null},[$e]),tt=(0,R.useCallback)(e=>Qe.get(ar(e)),[Qe]),nt=(0,R.useCallback)(e=>{let t=`ref-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,n={...e,id:t};qe(t=>t.some(t=>t.filePath===e.filePath&&t.startLine===e.startLine&&t.endLine===e.endLine)?t:[...t,n]),Ye(!0),Ze({filePath:e.filePath,startLine:e.startLine,endLine:e.endLine,ts:Date.now()}),e.nodeId&&e.source===`ai`&&N(t=>new Set([...t,e.nodeId]))},[]),rt=(0,R.useCallback)(()=>{qe(e=>{let t=e.filter(e=>e.source===`ai`),n=e.filter(e=>e.source!==`ai`),r=new Set(t.map(e=>e.nodeId).filter(Boolean));return r.size>0&&N(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),n.length===0&&!a&&Ye(!1),n})},[a]);(0,R.useEffect)(()=>{a&&Ye(!0)},[a]);let it=(0,R.useRef)(void 0),at=(0,R.useCallback)(e=>{it.current=e,_e(e)},[]),ot=(0,R.useCallback)(async e=>pt(e,it.current),[]),ct=(0,R.useCallback)(async()=>await st()===`ok`,[]),lt=(0,R.useRef)(null),ut=(0,R.useCallback)(async()=>{let e=it.current;if(!e)throw Error(`No repository loaded`);Te(`loading`),Oe(null);try{let{jobId:t}=await xt(e);await new Promise((e,n)=>{lt.current=St(t,e=>{Oe({phase:e.phase,percent:e.percent}),e.phase===`loading-model`||e.phase===`loading`?Te(`loading`):e.phase===`embedding`?Te(`embedding`):e.phase===`indexing`&&Te(`indexing`)},()=>{Te(`ready`),Oe({phase:`ready`,percent:100}),e()},e=>{Te(`error`),n(Error(e))})})}catch(e){if(e?.message?.includes(`already in progress`)){Te(`embedding`);return}throw Te(`error`),e}},[]),dt=(0,R.useCallback)(()=>{if(typeof navigator<`u`&&navigator.webdriver||typeof process<`u`&&{}.PLAYWRIGHT_TEST){Te(`idle`);return}if(!xr()){Te(`idle`);return}ut().catch(e=>{console.warn(`Embeddings auto-start failed:`,e)})},[ut]),ft=(0,R.useCallback)(async(e,t=10)=>mt(e,{limit:t,mode:`semantic`,repo:it.current}),[]),_t=(0,R.useCallback)(async(e,t=5,n=2)=>mt(e,{limit:t,mode:`semantic`,enrich:!0,repo:it.current}),[]),vt=(0,R.useCallback)(e=>{je(t=>{let n={...t,...e};return we(n),n})},[]),yt=(0,R.useCallback)(()=>{je(Ce())},[]),bt=(0,R.useRef)(null),V=(0,R.useRef)(null),wt=(0,R.useRef)(`idle`),Tt=(0,R.useRef)(_);(0,R.useEffect)(()=>{Tt.current=_},[_]);let Et=(0,R.useCallback)(async(e,t)=>{let n=Ee();if(!n){ze(`Please configure an LLM provider in settings`);return}let r=t?.chatOnly??Tt.current===`chatOnly`;Le(!0),ze(null);try{let i=e||me||`project`;t?.repo&&at(t.repo);let a=it.current,{createGraphRAGAgent:o}=await P(async()=>{let{createGraphRAGAgent:e}=await import(`./agent-C2n33ANd.js`);return{createGraphRAGAgent:e}},__vite__mapDeps([0,1,2,3,4,5])),{buildCodebaseContext:s}=await P(async()=>{let{buildCodebaseContext:e}=await import(`./context-builder-BHiFUA8O.js`);return{buildCodebaseContext:e}},[]),c=e=>pt(e,a),l=await s(c,i);bt.current=o(n,{executeQuery:c,search:(e,t)=>mt(e,{...t,repo:a}),grep:(e,t,n)=>ht(e,a,t,n),readFile:e=>gt(e,{repo:a}).then(e=>e.content)},l,r),Fe(!0),ze(null)}catch(e){let t=e instanceof Error?e.message:String(e);ze(t),Fe(!1)}finally{Le(!1)}},[]),Dt=(0,R.useCallback)(async e=>{if(wt.current!==`idle`||(rt(),B(),!Pe&&(await Et(),!bt.current)))return;let t={id:`user-${Date.now()}`,role:`user`,content:e,timestamp:Date.now()};if(Ve(e=>[...e,t]),Se===`indexing`){let e={id:`assistant-${Date.now()}`,role:`assistant`,content:ir.t(`common:chat.waitForVectorIndex`),timestamp:Date.now()};Ve(t=>[...t,e]),ze(null),Ue(!1),Ge([]);return}Ue(!0),wt.current=`streaming`,Ge([]),V.current?.abort();let n=new AbortController;V.current=n;let i=Ae(ke.activeProvider),a=[...Be,t].flatMap(e=>e.role===`user`?[{role:`user`,content:e.content}]:e.role===`tool`?e.toolCallId?[{role:`tool`,content:e.content,toolCallId:e.toolCallId}]:[]:i.preserveAssistantTranscript&&e.historyMessages?.length?e.historyMessages:[{role:`assistant`,content:e.content}]),o=`assistant-${Date.now()}`,s=[],c=[],l=0,u,d=()=>{let e=s.filter(e=>e.type===`reasoning`||e.type===`content`).map(e=>e.content).filter(Boolean).join(`
12
+ `);u=r.pop()||``;for(let e of r)p(e),f()&&await m()}return u+=s.decode(),p(u),f()&&await m(),{nodes:c,relationships:l}},pt=async(e,t)=>{let n=await et(`${He}/api/query`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cypher:e,repo:t})});await tt(n);let r=await n.json();return r.result??r},mt=async(e,t)=>{let n=await et(`${He}/api/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:e,limit:t?.limit,mode:t?.mode,enrich:t?.enrich,repo:t?.repo})});return await tt(n),(await n.json()).results??[]},ht=async(e,t,n,r)=>{let i=[`pattern=${encodeURIComponent(e)}`,nt(t),n?`limit=${n}`:``,r?.fileFilter?`fileFilter=${encodeURIComponent(r.fileFilter)}`:``,r?.caseSensitive?`caseSensitive=1`:``].filter(Boolean).join(`&`),a=await et(`${He}/api/grep?${i}`);await tt(a);let o=await a.json();return{results:o.results??[],timedOut:o.timedOut===!0}},gt=async(e,t)=>{let n=[`path=${encodeURIComponent(e)}`,nt(t?.repo),t?.startLine===void 0?``:`startLine=${t.startLine}`,t?.endLine===void 0?``:`endLine=${t.endLine}`].filter(Boolean).join(`&`),r=await et(`${He}/api/file?${n}`);return await tt(r),r.json()},_t=async(e,t,n)=>{let r=new FormData;r.append(`manifest`,JSON.stringify(t));for(let t of e)r.append(`files`,t);let i=await et(`${He}/api/analyze/upload`,{method:`POST`,body:r,signal:n},5*6e4);return await tt(i),i.json()},vt=async e=>{let t=await et(`${He}/api/analyze`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)},3e4);return await tt(t),t.json()},yt=async e=>{await tt(await et(`${He}/api/analyze/${encodeURIComponent(e)}`,{method:`DELETE`}))},bt=(e,t,n,r)=>Ve(`${He}/api/analyze/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r}),xt=async e=>{let t=await et(`${He}/api/embed`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo:e})},3e4);return await tt(t),t.json()},St=(e,t,n,r)=>Ve(`${He}/api/embed/${encodeURIComponent(e)}/progress`,{onMessage:t,onComplete:n,onError:r});async function Ct(e,t,n,r,i){We(Ge(e)),t?.(`validating`,0,null);let a=await ut(r,{awaitAnalysis:i?.awaitAnalysis});if(Fe({explicit:i?.skipGraph,nodeCount:a.stats?.nodes,threshold:k,edgeCount:a.stats?.edges,edgeThreshold:S}))return{nodes:[],relationships:[],repoInfo:a,graphSkipped:!0};let o=i?.skipGraph!==!1;t?.(`downloading`,0,null);try{let{nodes:e,relationships:i}=await dt(r,{signal:n,onProgress:(e,n)=>t?.(`downloading`,e,n),maxNodes:o?k:void 0,maxEdges:o?S:void 0});return{nodes:e,relationships:i,repoInfo:a,graphSkipped:!1}}catch(e){if(e instanceof Be)return{nodes:[],relationships:[],repoInfo:a,graphSkipped:!0};throw e}}var V=e=>typeof e==`string`,wt=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Tt=e=>e==null?``:String(e),Et=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Dt=/###/g,Ot=e=>e&&e.includes(`###`)?e.replace(Dt,`.`):e,kt=e=>!e||V(e),At=(e,t,n)=>{let r=V(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(kt(e))return{};let t=Ot(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return kt(e)?{}:{obj:e,k:Ot(r[i])}},jt=(e,t,n)=>{let{obj:r,k:i}=At(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=At(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=At(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Mt=(e,t,n,r)=>{let{obj:i,k:a}=At(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Nt=(e,t)=>{let{obj:n,k:r}=At(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Pt=(e,t,n)=>{let r=Nt(e,n);return r===void 0?Nt(t,n):r},Ft=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?V(e[r])||e[r]instanceof String||V(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Ft(e[r],t[r],n):e[r]=t[r]);return e},It=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Lt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Rt=e=>V(e)?e.replace(/[&<>"'\/]/g,e=>Lt[e]):e,zt=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Bt=[` `,`,`,`?`,`!`,`;`],Vt=new zt(20),Ht=(e,t,n)=>{t||=``,n||=``;let r=Bt.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Vt.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Ut=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Wt=e=>e?.replace(/_/g,`-`),Gt={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Kt=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Gt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>V(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),V(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},qt=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Jt=class extends qt{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):V(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Nt(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!V(n)?s:Ut(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),jt(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(V(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Nt(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Ft(s,n,i):s={...s,...n},jt(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Yt={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Xt=Symbol(`i18next/PATH_KEY`);function Zt(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Xt?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Qt(e,t){let{[Xt]:n}=e(Zt()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var $t=e=>!V(e)&&typeof e!=`boolean`&&typeof e!=`number`,en=class e extends qt{constructor(e,t={}){super(),Et([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Kt.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=$t(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ht(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:V(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:V(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Qt(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Qt(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!V(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=$t(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(V(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:$t(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&V(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=V(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=V(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Yt.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return V(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Qt(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!V(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(V(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!V(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},tn=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Kt.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Wt(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Wt(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(V(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),V(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return V(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):V(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},nn={zero:0,one:1,two:2,few:3,many:4,other:5},rn={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},an=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Kt.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Wt(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),rn;if(!e.match(/-|_/))return rn;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>nn[e]-nn[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},on=(e,t,n,r=`.`,i=!0)=>{let a=Pt(e,t,n);return!a&&i&&V(n)&&(a=Ut(e,n,r),a===void 0&&(a=Ut(t,n,r))),a},sn=e=>e.replace(/\$/g,`$$$$`),cn=class{constructor(e={}){this.logger=Kt.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Rt:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?It(i):a||`{{`,this.suffix=o?It(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?It(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?It(l):``,this.nestingPrefix=d?It(d):f||It(`$t(`),this.nestingSuffix=p?It(p):m||It(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=on(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(on(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=V(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!V(a)&&!this.useRawValueToEscape&&(a=Tt(a));let s=t.safeValue(a);if(e=e.replace(i[0],sn(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${It(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!V(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!V(i))return i;V(i)||(i=Tt(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ln=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},un=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Wt(r),i),t[o]=s),s(n)}},dn=e=>(t,n,r)=>e(Wt(n),r)(t),fn=class{constructor(e={}){this.logger=Kt.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?un:dn;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=un(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ln(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},pn=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},mn=class extends qt{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Kt.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Mt(n.loaded,[i],a),pn(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();V(e)&&(e=this.languageUtils.toResolveHierarchy(e)),V(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},hn=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),gn=e=>(V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),_n=()=>{},vn=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},yn=class e extends qt{constructor(e={},t){if(super(),this.options=gn(e),this.services={},this.logger=Kt,this.modules={external:[]},vn(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(V(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=hn();this.options={...n,...this.options,...gn(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Kt.init(r(this.modules.logger),this.options):Kt.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:fn;let t=new tn(this.options);this.store=new Jt(this.options.resources,this.options);let n=this.services;n.logger=Kt,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new an(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new cn(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new mn(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new en(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=_n,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=wt(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=_n){let n=t,r=V(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=wt();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=_n,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Yt.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=wt();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=V(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(V(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Qt(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Qt(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Qt(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return V(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=wt();return this.options.ns?(V(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=wt();V(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new tn(hn());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=_n){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Jt(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...hn().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new cn(n)}return a.translator=new en(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();yn.createInstance,yn.dir,yn.init,yn.loadResources,yn.reloadResources,yn.use,yn.changeLanguage,yn.getFixedT,yn.t,yn.exists,yn.setDefaultNamespace,yn.hasLoadedNamespace,yn.loadNamespaces,yn.loadLanguages;var{slice:bn,forEach:xn}=[];function Sn(e){return xn.call(bn.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Cn(e){return typeof e==`string`&&[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e))}var wn=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Tn=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!wn.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!wn.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},En={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Tn(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Dn={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return En.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&En.create(n,e,r,i,a)}},On={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},kn={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},An=null,jn=()=>{if(An!==null)return An;try{if(An=typeof window<`u`&&window.localStorage!==null,!An)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{An=!1}return An},Mn={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&jn())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&jn()&&window.localStorage.setItem(n,e)}},Nn=null,Pn=()=>{if(Nn!==null)return Nn;try{if(Nn=typeof window<`u`&&window.sessionStorage!==null,!Nn)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Nn=!1}return Nn},Fn={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Pn())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Pn()&&window.sessionStorage.setItem(n,e)}},In={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Ln={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},Rn={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},zn={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},Bn=!1;try{document.cookie,Bn=!0}catch{}var Vn=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];Bn||Vn.splice(1,1);var Hn=()=>({order:Vn,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),Un=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Sn(t,this.options||{},Hn()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Dn),this.addDetector(On),this.addDetector(Mn),this.addDetector(Fn),this.addDetector(In),this.addDetector(Ln),this.addDetector(Rn),this.addDetector(zn),this.addDetector(kn)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Cn(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};Un.type=`languageDetector`;var Wn={type:`3rdParty`,init(e){c(e.options.react),l(e)}},Gn=[{code:`en`,nativeName:`English`,englishName:`English`,dir:`ltr`},{code:`zh-CN`,nativeName:`简体中文`,englishName:`Simplified Chinese`,dir:`ltr`}],Kn=Gn.map(e=>e.code);function qn(e){let t=e?.trim().split(`.`)[0]?.replace(/_/g,`-`).toLowerCase();return t?t===`en`||t.startsWith(`en-`)?`en`:t===`zh`||t===`zh-cn`||t.startsWith(`zh-cn-`)||t===`zh-hans`||t.startsWith(`zh-hans-`)?`zh-CN`:null:null}function Jn(e){let t=qn(e);return Gn.find(e=>e.code===t)??Gn[0]}var Yn=Object.assign({"../locales/en/chat.json":{tabs:{chat:`Nexus AI`,processes:`Processes`},suggestions:{architecture:`Explain the project architecture`,whatDoes:`What does this project do?`,importantFiles:`Show me the most important files`,apiHandlers:`Find all API handlers`},empty:{title:`Ask me anything`,description:`I can help you understand the architecture, find functions, or explain connections.`},input:{placeholder:`Ask about the codebase...`,initializing:`Initializing AI agent...`,configureProvider:`Configure an LLM provider to enable chat.`},actions:{closePanel:`Close Panel`,scrollBottom:`Scroll to bottom`,clearChat:`Clear chat`,stopResponse:`Stop response`},stopped:`Stopped by user`,badges:{configureAI:`Configure AI`,connecting:`Connecting`},chatOnly:{banner:`Graph not loaded (large project). Chat works normally; inline node citations won't highlight in the graph view.`},roles:{you:`You`,assistant:`Nexus AI`},newBadge:`NEW`},"../locales/en/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},updateBanner:`GitNexus {{latest}} is available — this server runs {{installed}}.`,updateBannerDismiss:`Dismiss update notification`,actions:{cancel:`Cancel`,dismiss:`Dismiss`,tryAgain:`Try again`,hide:`Hide`,retry:`Retry`,copy:`Copy`,copied:`Copied`,close:`Close`,run:`Run`,clear:`Clear`,remove:`Remove`,focusInGraph:`Focus in graph`,expand:`Expand`,collapse:`Collapse`},chat:{viewNodeInCodePanel:`View {{inner}} in Code panel`,openInCodePanel:`Open in Code panel • {{inner}}`,waitForVectorIndex:`Wait a moment, vector index is being created.`},counts:{files_one:`{{count}} file`,files_other:`{{count}} files`,nodes_one:`{{count}} node`,nodes_other:`{{count}} nodes`,edges_one:`{{count}} edge`,edges_other:`{{count}} edges`,symbols_one:`{{count}} symbol`,symbols_other:`{{count}} symbols`,flows_one:`{{count}} flow`,flows_other:`{{count}} flows`},progress:{connecting:`Connecting to server...`,connectingShort:`Connecting...`,validatingServer:`Validating server`,validatingServerEllipsis:`Validating server...`,downloadingGraph:`Downloading graph...`,downloadedMb:`{{mb}} MB downloaded`,downloadingWithPercent:`Downloading graph... {{percent}}%`,downloadingMb:`Downloading... {{mb}} MB`,processing:`Processing...`,processingGraph:`Processing graph...`,extractingFileContents:`Extracting file contents`,loadingGraph:`Loading graph...`,starting:`Starting...`,executing:`Executing...`,truncated:`... (truncated)`,ready:`Ready`,switchingRepository:`Switching repository...`,loadingRepository:`Loading {{repo}}`,validating:`Validating`,failedSwitchRepository:`Failed to switch repository`,unknownError:`Unknown error`},analyzePhases:{queued:`Queued`,cloning:`Cloning repository`,pulling:`Pulling latest`,extracting:`Scanning files`,structure:`Building structure`,parsing:`Parsing code`,imports:`Resolving imports`,calls:`Tracing calls`,heritage:`Extracting inheritance`,scopeResolution:`Resolving types`,communities:`Detecting communities`,processes:`Detecting processes`,complete:`Pipeline complete`,lbug:`Loading into database`,fts:`Creating search indexes`,embeddings:`Generating embeddings`,done:`Done`,retrying:`Retrying after crash`},units:{elapsedSeconds:`{{seconds}}s`,elapsedMinutesSeconds:`{{minutes}}m {{seconds}}s`}},"../locales/en/errors.json":{unknown:`Unknown error`,connectFailed:`Failed to connect to server`,loadGraphFailed:`Failed to load graph`,failedToConnect:`Failed to connect`,analysisFailed:`Analysis failed. Check server logs.`,startAnalysisFailed:`Failed to start analysis`,invalidGithubUrl:`Please enter a valid GitHub repository URL.`,invalidAzureDevOpsUrl:`Please enter a valid Azure DevOps repository URL.`,missingFolderPath:`Please enter a folder path.`,backend:{reconnecting:`Server connection lost. Reconnecting…`,network:"Unable to reach the GitNexus server. Make sure `gitnexus serve` is running.",timeout:`The server took too long to respond. Try again in a moment.`,rateLimited:`Too many requests. Try again in {{seconds}}s.`,notFound:`The requested repository or resource was not found.`,unauthorized:`This GitNexus deploy requires an access token. Find it in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable, then paste it into Settings.`,originBlocked:`This action isn't available from the hosted UI. Open GitNexus from the server's own address (e.g. http://localhost:4747) to continue.`,client:`Request failed: {{message}}`,server:`Server error: {{message}}`}},"../locales/en/graph.json":{statusBar:{sponsor:`Sponsor`,sponsorHint:`need to buy some API credits to run SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} files`},toolCall:{status:{running:`running`,completed:`completed`,error:`error`,stopped:`stopped`},tools:{search:`🔍 Search Code`,cypher:`🔗 Cypher Query`,grep:`🔎 Pattern Search`,read:`📄 Read File`,overview:`🗺️ Codebase Overview`,explore:`🔬 Deep Dive`,impact:`💥 Impact Analysis`},query:`Query`,input:`Input`,result:`Result`,searchPrefix:`Search: "{{query}}"`},embedding:{generateTitle:`Generate embeddings for semantic search`,enable:`Enable Semantic Search`,loadingModel:`Loading AI model...`,embeddingNodes:`Embedding {{processed}}/{{total}} nodes`,creatingIndex:`Creating vector index...`,readyTitle:`Semantic search is ready! Use natural language in the AI chat.`,ready:`Semantic Ready`,errorTitle:`Embedding failed. Click to retry.`,failedRetry:`Failed - Retry`,fallback:{title:`WebGPU said "nope"`,subtitle:`Your browser doesn't support GPU acceleration`,description:`Couldn't create embeddings with WebGPU, so semantic search (Graph RAG) won't be as smart. The graph still works fine though!`,options:`Your options:`,useCpu:`Use CPU`,useCpuDescriptionSmall:`Works but a bit slower`,useCpuDescriptionLarge:`Works but way slower`,estimated:`(~{{minutes}} min for {{count}} nodes)`,skipIt:`Skip it`,skipDescription:`Graph works, just no AI semantic search`,smallCodebase:`Small codebase detected! CPU should be fine.`,tip:`💡 Tip: Try Chrome or Edge for WebGPU support`,skipEmbeddings:`Skip Embeddings`,useCpuRecommended:`Use CPU (Recommended)`,useCpuSlow:`Use CPU (Slow)`}},queryFab:{query:`Query`,cypherQuery:`Cypher Query`,examples:`Examples`,run:`Run`,noProject:`No project loaded. Load a project first.`,dbNotReady:`Database not ready. Please wait for loading to complete.`,executionFailed:`Query execution failed`,exampleLabels:{functions:`All Functions`,classes:`All Classes`,interfaces:`All Interfaces`,calls:`Function Calls`,imports:`Import Dependencies`},clear:`Clear`,rows:`rows`,highlighted:`highlighted`,showingRows:`Showing 50 of {{count}} rows`},fileTree:{expandPanel:`Expand Panel`,fileExplorer:`File Explorer`,filters:`Filters`,collapsePanel:`Collapse Panel`,searchFiles:`Search files...`,noFilesLoaded:`No files loaded`,all:`All`,selectNodeDepth:`Select a node to apply depth filter`,explorer:`Explorer`,nodeTypes:`Node Types`,nodeTypesDesc:`Toggle visibility of node types in the graph`,edgeTypes:`Edge Types`,edgeTypesDesc:`Toggle visibility of relationship types`,focusDepth:`Focus Depth`,focusDepthDesc:`Show nodes within N hops of selection`,hops_one:`{{count}} hop`,hops_other:`{{count}} hops`,colorLegend:`Color Legend`},codePanel:{expand:`Expand Code Panel`,dragResize:`Drag to resize`,title:`Code Inspector`,clearCitations:`Clear AI citations`,clearSelection:`Clear selection`,loadingSource:`Loading source...`,selectFile:`Select a file node to preview its contents.`,code:`Code`,selected:`Selected`,aiCitations:`AI Citations`,references_one:`{{count}} reference`,references_other:`{{count}} references`,lines_one:`{{count}} line`,lines_other:`{{count}} lines`,codeNotAvailable:`Code not available in memory for {{path}}`},canvas:{viewModes:{label:`Graph view mode`,force:`Force Graph`,tree:`Sequential Layout`,circles:`Radial Layout`},zoomIn:`Zoom In`,zoomOut:`Zoom Out`,fit:`Fit to Screen`,focusSelected:`Focus on Selected Node`,clearSelection:`Clear Selection`,clear:`Clear`,stopLayout:`Stop Layout`,runLayout:`Run Layout Again`,layoutOptimizing:`Layout optimizing...`,turnOffHighlights:`Turn off all highlights`,turnOnHighlights:`Turn on AI highlights`,chatOnly:{title:`Graph not loaded`,description:`This is a large project, so the graph was skipped to keep the browser responsive. AI chat works normally.`,descriptionWithCount:`This project has {{count}} nodes, so the graph was skipped to keep the browser responsive. AI chat works normally.`,citationNote:`While the graph is unloaded, inline file citations from chat won't auto-open in the Code panel.`,loadAnyway:`Load graph anyway`,loadAnywayWarning:`This project has {{count}} nodes. Loading the full graph may make the browser slow or unresponsive. Continue?`,loadAnywayWarningUnknown:`This may be a large project. Loading the full graph may make the browser slow or unresponsive. Continue?`}},processes:{unknownStep:`Unknown`,allProcessesLabel_one:`All Processes ({{count}} combined)`,allProcessesLabel_other:`All Processes ({{count}} combined)`,emptyTitle:`No Processes Detected`,emptyDescription:`Processes are execution flows traced from entry points. Load a codebase to see detected processes.`,filterPlaceholder:`Filter processes...`,detected_one:`{{count}} process detected`,detected_other:`{{count}} processes detected`,fullMap:`Full Process Map`,viewCombined_one:`View combined map of {{count}} process`,viewCombined_other:`View combined map of {{count}} processes`,crossCommunity:`Cross-Community`,intraCommunity:`Intra-Community`,steps_one:`{{count}} step`,steps_other:`{{count}} steps`,clusters_one:`{{count}} cluster`,clusters_other:`{{count}} clusters`,highlightTitle:`Click to highlight in graph`,removeHighlightTitle:`Click to remove highlight from graph`,loading:`Loading...`,viewing:`Viewing`,view:`View`},processFlow:{title:`Process: {{label}}`,diagramTooLarge:`📊 Diagram Too Large`,renderError:`⚠️ Render Error`,tooComplex_one:`This diagram has {{count}} step and is too complex to render. Try viewing individual processes instead of "All Processes".`,tooComplex_other:`This diagram has {{count}} steps and is too complex to render. Try viewing individual processes instead of "All Processes".`,unableToRender_one:`Unable to render diagram. Steps: {{count}}`,unableToRender_other:`Unable to render diagram. Steps: {{count}}`,zoomOutTitle:`Zoom out (-)`,zoomInTitle:`Zoom in (+)`,resetTitle:`Reset zoom and pan`,resetView:`Reset View`,toggleFocus:`Toggle Focus`,copyMermaid:`Copy Mermaid`},diagram:{aiGenerated:`AI Generated Diagram`,error:`Diagram Error`,showSource:`Show source`,label:`Diagram`,expandTitle:`Expand`,loading:`Loading diagram…`}},"../locales/en/header.json":{repositories:`Repositories`,active:`active`,reanalyzing:`Re-analyzing...`,reanalyzeRepo:`Re-analyze {{repoName}}`,deleteRepo:`Delete {{repoName}}`,reanalyzingRepo:`Re-analyzing {{repoName}}: {{message}}`,analyzeNew:`Analyze a new repository...`,searchRepositories:`Search repositories...`,noRepositoriesFound:`No repositories found for "{{query}}"`,searchNodes:`Search nodes...`,noNodesFound:`No nodes found for "{{query}}"`,starIfCool:`Star if cool`,aiSettings:`AI Settings`,help:`Help`,language:`Language`,selectLanguage:`Select language`},"../locales/en/help.json":{tabs:{overview:`Overview`,ai:`Nexus AI`,shortcuts:`Shortcuts`,status:`Status bar`,graph:`Graph & nodes`,search:`Search & filter`},shortcuts:{searchNodes:`Search nodes`,deselectClose:`Deselect / close`,columns:{action:`Action`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`Function`,functionDesc:`Function declarations`,file:`File`,fileDesc:`Source files`,class:`Class`,classDesc:`Class declarations`,method:`Method`,methodDesc:`Class methods`,interface:`Interface`,interfaceDesc:`TypeScript interfaces`,folder:`Folder`,folderDesc:`Directory nodes`},status:{ready:`Ready`,readyDesc:`Graph is fully loaded and interactive`,nodesCount:`Nodes count`,nodesCountDesc:`Total files and symbols in the graph`,edgesCount:`Edges count`,edgesCountDesc:`Import / dependency connections`,aiIndexStatus:`AI index status`,aiIndexStatusDesc:`Repo is fully indexed for AI queries`,semanticReadyBadge:`Semantic Ready`,explained:`Status bar explained`},tryAsking:`Try asking:`,footer:`GitNexus — graph explorer`,title:`Help & Reference`,footerLong:`GitNexus — open source codebase graph explorer`,docsGithub:`Docs & GitHub ↗`,overview:{gettingStarted:`Getting started`,whatIsTitle:`What is GitNexus?`,whatIsDescription:`An interactive graph explorer for your codebase. Every file, function, and import becomes a node you can explore, query, and navigate visually.`,currentRepoTitle:`Your current repo`,loadedCounts:`Loaded: {{nodeCount}} nodes · {{edgeCount}} edges`,threeWaysTitle:`Three ways to explore`,wayInspect:`Click nodes to inspect`,waySearch:`Search by name or type`,wayAsk:`Ask Nexus AI a natural language question`,navigationTitle:`Navigation`,navZoom:`Scroll to zoom`,navPan:`Click and drag to pan`,navFocus:`Double-click a node to focus its subgraph`},graph:{nodeColorLegend:`Node color legend`,nodeLabel:`{{label}} nodes`,sizeDescription:`Node size reflects connection count — larger nodes are depended on by more files. Edges point from importer → imported.`,detailDescription:`Click any node to open its detail panel — showing imports, exports, and reverse dependencies.`},search:{title:`Search & filter`,searchNodes:`Search nodes`,searchDescription:`Search by filename, function name, or import path. Matching nodes are highlighted live in the graph.`,filterPanel:`Filter panel`,filterDescription:`Use the filter icon in the left sidebar to isolate specific node types, hide leaf nodes, or focus on a depth range from a selected root.`,syntax:`Search syntax`,hints:{nameFragment:`match by name fragment`,pathPrefix:`match by path prefix`,nodeType:`filter by node type`}},ai:{title:`Nexus AI`,semanticReady:`✓ Semantic Ready`,description:`Your repo is indexed and ready for semantic queries. Nexus AI understands code structure and relationships, not just file names.`,questions:{dependencies:`"Which files depend on the auth module?"`,circular:`"Find circular dependencies in this repo"`,connected:`"What are the most connected components?"`,imports:`"Show me all files that import useEffect"`},openPrompt:`Open the prompt via the Nexus AI button (top-right).`}},"../locales/en/onboarding.json":{success:{title:`Server Connected`,description:`Preparing your code knowledge graph...`},loading:{largeRepoHint:`This may take a moment for large repositories`},guide:{copyAria:`Copy to clipboard`,copiedAria:`Copied!`,startServer:`Start your local server`,devDescription:`Fire up the Express backend in a separate terminal to unlock the full graph.`,prodDescription:`One command is all it takes. The browser connects automatically.`,copyCommand:`Copy the command`,copyCommandDescription:`Click the icon in the terminal to copy.`,done:`done`,orInstallGlobally:`or install globally`,globalInstall:`Global install`,startBackend:`Start backend`,terminal:`Terminal`,waitingForServer:`Waiting for server to start`,pasteAndRun:`Paste and run in your terminal`,pasteAndRunDescription:`Open a terminal at the project root, paste, and hit Enter.`,listeningForServer:`Listening for server`,willAutoConnect:`Will auto-connect when detected`,autoConnects:`Auto-connects and opens the graph`,autoConnectsDescription:`No refresh needed — the page detects the server automatically.`,requires:`Requires`,port:`Port 4747`},analyzeFirst:{title:`Analyze your first repository`,description:`Paste a repository URL and GitNexus will clone it, parse the code, and build a live knowledge graph — right in your browser.`,footer:`Public repos only · Cloned locally by the server · No data leaves your machine`},landing:{chooseRepository:`Choose a repository`,description:`Select an indexed repository to explore, or analyze a new one.`,indexed:`Indexed {{time}}`,orAnalyzeNew:`or analyze new`,footer:`Public & private repos · Cloned locally by the server · No data leaves your machine`,time:{justNow:`just now`,minutesAgo:`{{count}}m ago`,hoursAgo:`{{count}}h ago`,daysAgo:`{{count}}d ago`}},repoAnalyzer:{inputType:`Input type`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,azureDevOpsUrl:`Azure DevOps`,localFolder:`Local Folder`,starting:`Starting analysis...`,analyzeRepository:`Analyze Repository`,complete:`Analysis complete`,loadingGraph:`Loading graph...`,defaultRepoName:`repository`,githubRepositoryUrl:`GitHub Repository URL`,githubTokenLabel:`Personal Access Token (optional)`,githubTokenPlaceholder:`ghp_… or github_pat_…`,githubTokenHelp:`Required for private repos. Needs the 'repo' (or fine-grained Contents:read) scope. Sent once, not stored.`,gitlabRepositoryUrl:`GitLab Repository URL`,gitlabSupported:`Supports GitLab.com and self-hosted GitLab instances.`,azureDevOpsRepositoryUrl:`Azure DevOps Repository URL`,azureDevOpsSupported:`Format: https://dev.azure.com/organization/project/_git/repository`,localFolderPath:`Local Folder Path`,hideBackground:`Hide (analysis continues in background)`,upload:{button:`Upload a folder`,uploading:`Uploading…`,selected:`{{fileCount}} files ready ({{dropped}} skipped: .git, node_modules, build output)`,empty:`No analyzable files found in that folder.`}}},"../locales/en/settings.json":{title:`AI Settings`,subtitle:`Configure your LLM provider`,localServer:`Local Server`,backendUrl:`Backend URL`,connected:`Connected`,notConnected:`Not connected`,runServeHint:"Run `gitnexus serve` to connect the web UI to a local backend.",accessToken:{label:`Access Token`,placeholder:`Paste your deploy access token`,hint:`Required only for a gated deploy. Find it in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable. Leave empty for a local server.`,title:`This deploy requires an access token`,promptHint:`The GitNexus server is running but gated. Find the token in your Render dashboard under the gitnexus-web service's GITNEXUS_SERVE_AUTH_TOKEN environment variable.`,connect:`Connect`,reveal:`Show access token`,hide:`Hide access token`,sessionNote:`Stored for this browser session only. You will re-enter it in a new tab or after closing the browser.`},provider:`Provider`,apiKey:`API Key`,learnMore:`Learn more`,model:`Model`,searchModelPlaceholder:`Search or type model ID...`,selectModelPlaceholder:`Select or type a model...`,customModelHint:`Type a model ID or press Enter`,customModelExample:`e.g. openai/gpt-4o`,pressEnterCustom:`Press Enter to use as custom ID`,baseUrl:`Base URL`,optional:`optional`,deploymentName:`Deployment Name`,apiVersion:`API Version`,checkConnection:`Check connection`,privacyLabel:`Privacy:`,privacyText:`Your API keys are stored locally in this browser.`,providers:{openai:{description:`Use OpenAI models for chat and code reasoning.`,apiKeyPlaceholder:`Enter your OpenAI API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1 (default)`,baseUrlHint:`Leave empty to use the default OpenAI API. Set a custom URL for proxies or compatible APIs.`},gemini:{description:`Use Google Gemini models.`,apiKeyPlaceholder:`Enter your Google AI API key`,helperText:`Get your API key from`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`e.g., gemini-2.0-flash, gemini-1.5-pro`},anthropic:{description:`Use Anthropic Claude models.`,apiKeyPlaceholder:`Enter your Anthropic API key`,helperText:`Get your API key from`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`e.g., claude-sonnet-4-20250514, claude-3-opus`},azure:{apiKeyPlaceholder:`Enter your Azure OpenAI API key`,deploymentNamePlaceholder:`e.g., gpt-4o-deployment`},ollama:{quickStart:`📋 Quick Start:`,installFrom:`Install Ollama from`,thenRun:`, then run:`,modelPlaceholder:`e.g., llama3.2, mistral, codellama`},openrouter:{apiKeyPlaceholder:`Enter your OpenRouter API key`,helperText:`Get your API key from`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`Enter your MiniMax API key`,helperText:`Get your API key from`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`e.g., MiniMax-M3 or MiniMax-M2.7`,helperModel:`Available: MiniMax-M3 (default) and MiniMax-M2.7`,endpoint:`Regional endpoint`,endpoints:{global:`Global (api.minimax.io)`,china:`China (api.minimaxi.com)`},thinking:`Thinking mode`,thinkingModes:{adaptive:`Adaptive`,disabled:`Disabled`,always_on:`Always on`},capabilities:`{{contextWindow}} token context | Inputs: {{modalities}}`},glm:{apiKeyPlaceholder:`Enter your Z.AI API key`}},loadingModels:`Loading models...`,noModelsMatch:`No models match "{{searchTerm}}"`,moreModels:`+{{count}} more • Refine your search`,apiKeySession:`API keys are stored in session storage and will be cleared when you close this tab.`,startLocalServer:`start the local server`,settingsSaved:`Settings saved`,failedToSave:`Failed to save`,saveSettings:`Save Settings`,endpoint:`Endpoint`,azurePortal:`Azure Portal`,azureHint:`Configure your Azure OpenAI service in the`,defaultPort:`Default port is`,pullModel:`Pull a model with`,browseModels:`Browse all models at`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API (default). Use https://api.z.ai/api/paas/v4 for the general API.`,privacyFull:`Your API keys are stored only in your browser's session storage and are cleared when the tab closes. They're sent directly to the LLM provider when you chat. Your code never leaves your machine.`},"../locales/zh-CN/chat.json":{tabs:{chat:`Nexus AI`,processes:`流程`},suggestions:{architecture:`解释项目架构`,whatDoes:`这个项目是做什么的?`,importantFiles:`显示最重要的文件`,apiHandlers:`查找所有 API 处理器`},empty:{title:`可以问我任何问题`,description:`我可以帮你理解架构、查找函数或解释连接关系。`},input:{placeholder:`询问这个代码库...`,initializing:`正在初始化 AI Agent...`,configureProvider:`配置 LLM 提供商以启用聊天。`},actions:{closePanel:`关闭面板`,scrollBottom:`滚动到底部`,clearChat:`清空聊天`,stopResponse:`停止响应`},stopped:`用户已停止`,badges:{configureAI:`配置 AI`,connecting:`连接中`},chatOnly:{banner:`图谱未加载(大型项目)。对话功能正常;内联节点引用不会在图谱视图中高亮。`},roles:{you:`你`,assistant:`Nexus AI`},newBadge:`新`},"../locales/zh-CN/common.json":{app:{name:`GitNexus`,nexusAI:`Nexus AI`},updateBanner:`GitNexus {{latest}} 已发布 — 此服务器运行 {{installed}}。`,updateBannerDismiss:`关闭更新通知`,actions:{cancel:`取消`,dismiss:`关闭`,tryAgain:`重试`,hide:`隐藏`,retry:`重试`,copy:`复制`,copied:`已复制`,close:`关闭`,run:`运行`,clear:`清空`,remove:`移除`,focusInGraph:`在图中聚焦`,expand:`展开`,collapse:`折叠`},chat:{viewNodeInCodePanel:`在代码面板中查看 {{inner}}`,openInCodePanel:`在代码面板中打开 • {{inner}}`,waitForVectorIndex:`请稍候,正在创建向量索引。`},counts:{files_one:`{{count}} 个文件`,files_other:`{{count}} 个文件`,nodes_one:`{{count}} 个节点`,nodes_other:`{{count}} 个节点`,edges_one:`{{count}} 条边`,edges_other:`{{count}} 条边`,symbols_one:`{{count}} 个符号`,symbols_other:`{{count}} 个符号`,flows_one:`{{count}} 条流程`,flows_other:`{{count}} 条流程`},progress:{connecting:`正在连接服务器...`,connectingShort:`正在连接...`,validatingServer:`正在验证服务器`,validatingServerEllipsis:`正在验证服务器...`,downloadingGraph:`正在下载图数据...`,downloadedMb:`已下载 {{mb}} MB`,downloadingWithPercent:`正在下载图数据... {{percent}}%`,downloadingMb:`正在下载... {{mb}} MB`,processing:`正在处理...`,processingGraph:`正在处理图数据...`,extractingFileContents:`正在提取文件内容`,loadingGraph:`正在加载图数据...`,starting:`正在启动...`,executing:`正在执行...`,truncated:`...(已截断)`,ready:`就绪`,switchingRepository:`正在切换仓库...`,loadingRepository:`正在加载 {{repo}}`,validating:`正在验证`,failedSwitchRepository:`切换仓库失败`,unknownError:`未知错误`},analyzePhases:{queued:`已排队`,cloning:`正在克隆仓库`,pulling:`正在拉取最新代码`,extracting:`正在扫描文件`,structure:`正在构建结构`,parsing:`正在解析代码`,imports:`正在解析导入`,calls:`正在追踪调用`,heritage:`正在提取继承关系`,scopeResolution:`正在解析类型`,communities:`正在检测社区`,processes:`正在检测流程`,complete:`流水线完成`,lbug:`正在加载数据库`,fts:`正在创建搜索索引`,embeddings:`正在生成嵌入向量`,done:`完成`,retrying:`崩溃后正在重试`},units:{elapsedSeconds:`{{seconds}} 秒`,elapsedMinutesSeconds:`{{minutes}} 分 {{seconds}} 秒`}},"../locales/zh-CN/errors.json":{unknown:`未知错误`,connectFailed:`连接服务器失败`,loadGraphFailed:`加载图数据失败`,failedToConnect:`连接失败`,analysisFailed:`分析失败,请检查服务器日志。`,startAnalysisFailed:`启动分析失败`,invalidGithubUrl:`请输入有效的 GitHub 仓库 URL。`,invalidAzureDevOpsUrl:`请输入有效的 Azure DevOps 仓库 URL。`,missingFolderPath:`请输入文件夹路径。`,backend:{reconnecting:`服务器连接已断开,正在重连…`,network:"无法连接 GitNexus 服务器,请确认 `gitnexus serve` 正在运行。",timeout:`服务器响应超时,请稍后重试。`,rateLimited:`请求过于频繁,请在 {{seconds}} 秒后重试。`,notFound:`未找到请求的仓库或资源。`,unauthorized:`GitNexus 部署需要访问令牌。请在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中查看,然后粘贴到「设置」中。`,originBlocked:`此操作无法从托管界面执行。请通过服务器自身地址(例如 http://localhost:4747)打开 GitNexus 后再继续。`,client:`请求失败:{{message}}`,server:`服务器错误:{{message}}`}},"../locales/zh-CN/graph.json":{statusBar:{sponsor:`赞助`,sponsorHint:`需要买点 API 额度跑 SWE-bench 😅`},loading:{filesProgress:`{{processed}} / {{total}} 个文件`},toolCall:{status:{running:`运行中`,completed:`已完成`,error:`错误`,stopped:`已停止`},tools:{search:`🔍 搜索代码`,cypher:`🔗 Cypher 查询`,grep:`🔎 模式搜索`,read:`📄 读取文件`,overview:`🗺️ 代码库概览`,explore:`🔬 深入分析`,impact:`💥 影响分析`},query:`查询`,input:`输入`,result:`结果`,searchPrefix:`搜索:"{{query}}"`},embedding:{generateTitle:`为语义搜索生成嵌入向量`,enable:`启用语义搜索`,loadingModel:`正在加载 AI 模型...`,embeddingNodes:`正在嵌入 {{processed}}/{{total}} 个节点`,creatingIndex:`正在创建向量索引...`,readyTitle:`语义搜索已就绪!可在 AI 聊天中使用自然语言。`,ready:`语义就绪`,errorTitle:`嵌入失败,点击重试。`,failedRetry:`失败 - 重试`,fallback:{title:`WebGPU 拒绝了请求`,subtitle:`你的浏览器不支持 GPU 加速`,description:`无法用 WebGPU 创建嵌入向量,因此语义搜索(Graph RAG)不会那么智能,但图谱仍可正常使用。`,options:`可选方案:`,useCpu:`使用 CPU`,useCpuDescriptionSmall:`可用,但会稍慢`,useCpuDescriptionLarge:`可用,但会慢很多`,estimated:`(约 {{minutes}} 分钟,{{count}} 个节点)`,skipIt:`跳过`,skipDescription:`图谱可用,但没有 AI 语义搜索`,smallCodebase:`检测到小型代码库!CPU 应该没问题。`,tip:`💡 提示:可尝试 Chrome 或 Edge 以获得 WebGPU 支持`,skipEmbeddings:`跳过嵌入`,useCpuRecommended:`使用 CPU(推荐)`,useCpuSlow:`使用 CPU(较慢)`}},queryFab:{query:`查询`,cypherQuery:`Cypher 查询`,examples:`示例`,run:`运行`,noProject:`未加载项目,请先加载项目。`,dbNotReady:`数据库尚未就绪,请等待加载完成。`,executionFailed:`查询执行失败`,exampleLabels:{functions:`所有函数`,classes:`所有类`,interfaces:`所有接口`,calls:`函数调用`,imports:`导入依赖`},clear:`清除`,rows:`行`,highlighted:`已高亮`,showingRows:`显示 {{count}} 行中的前 50 行`},fileTree:{expandPanel:`展开面板`,fileExplorer:`文件浏览器`,filters:`过滤器`,collapsePanel:`折叠面板`,searchFiles:`搜索文件...`,noFilesLoaded:`未加载文件`,all:`全部`,selectNodeDepth:`选择节点后才能应用深度过滤`,explorer:`浏览器`,nodeTypes:`节点类型`,nodeTypesDesc:`切换图中节点类型的可见性`,edgeTypes:`边类型`,edgeTypesDesc:`切换关系类型的可见性`,focusDepth:`聚焦深度`,focusDepthDesc:`显示所选节点 N 跳内的节点`,hops_one:`{{count}} 跳`,hops_other:`{{count}} 跳`,colorLegend:`颜色图例`},codePanel:{expand:`展开代码面板`,dragResize:`拖动调整大小`,title:`代码检查器`,clearCitations:`清除 AI 引用`,clearSelection:`清除选择`,loadingSource:`正在加载源码...`,selectFile:`选择文件节点以预览其内容。`,code:`代码`,selected:`已选择`,aiCitations:`AI 引用`,references_one:`{{count}} 条引用`,references_other:`{{count}} 条引用`,lines_one:`{{count}} 行`,lines_other:`{{count}} 行`,codeNotAvailable:`内存中没有 {{path}} 的代码内容`},canvas:{viewModes:{label:`图形视图模式`,force:`力导向图`,tree:`顺序布局`,circles:`径向布局`},zoomIn:`放大`,zoomOut:`缩小`,fit:`适应屏幕`,focusSelected:`聚焦所选节点`,clearSelection:`清除选择`,clear:`清除`,stopLayout:`停止布局`,runLayout:`重新运行布局`,layoutOptimizing:`正在优化布局...`,turnOffHighlights:`关闭全部高亮`,turnOnHighlights:`开启 AI 高亮`,chatOnly:{title:`图谱未加载`,description:`这是一个大型项目,已跳过图谱加载以保持浏览器响应。AI 对话功能正常可用。`,descriptionWithCount:`该项目包含 {{count}} 个节点,已跳过图谱加载以保持浏览器响应。AI 对话功能正常可用。`,citationNote:`图谱未加载时,对话中的内联文件引用不会自动在代码面板中打开。`,loadAnyway:`仍然加载图谱`,loadAnywayWarning:`该项目包含 {{count}} 个节点。加载完整图谱可能导致浏览器变慢或无响应。是否继续?`,loadAnywayWarningUnknown:`这可能是一个大型项目。加载完整图谱可能导致浏览器变慢或无响应。是否继续?`}},processes:{unknownStep:`未知`,allProcessesLabel_one:`全部流程(合并 {{count}} 个)`,allProcessesLabel_other:`全部流程(合并 {{count}} 个)`,emptyTitle:`未检测到流程`,emptyDescription:`流程是从入口点追踪出的执行链路。加载代码库后即可查看检测到的流程。`,filterPlaceholder:`过滤流程...`,detected_one:`检测到 {{count}} 个流程`,detected_other:`检测到 {{count}} 个流程`,fullMap:`完整流程图`,viewCombined_one:`查看 {{count}} 个流程的合并图`,viewCombined_other:`查看 {{count}} 个流程的合并图`,crossCommunity:`跨社区`,intraCommunity:`社区内`,steps_one:`{{count}} 步`,steps_other:`{{count}} 步`,clusters_one:`{{count}} 个聚类`,clusters_other:`{{count}} 个聚类`,highlightTitle:`在图谱中高亮`,removeHighlightTitle:`移除图谱高亮`,loading:`加载中...`,viewing:`查看中`,view:`查看`},processFlow:{title:`流程:{{label}}`,diagramTooLarge:`📊 图表过大`,renderError:`⚠️ 渲染错误`,tooComplex_one:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,tooComplex_other:`该图表包含 {{count}} 个步骤,复杂度过高无法渲染。请查看单个流程,而不是“全部流程”。`,unableToRender_one:`无法渲染图表。步骤数:{{count}}`,unableToRender_other:`无法渲染图表。步骤数:{{count}}`,zoomOutTitle:`缩小 (-)`,zoomInTitle:`放大 (+)`,resetTitle:`重置缩放和平移`,resetView:`重置视图`,toggleFocus:`切换聚焦`,copyMermaid:`复制 Mermaid`},diagram:{aiGenerated:`AI 生成图表`,error:`图表错误`,showSource:`显示源码`,label:`图表`,expandTitle:`展开`,loading:`正在加载图表…`}},"../locales/zh-CN/header.json":{repositories:`仓库`,active:`当前`,reanalyzing:`正在重新分析...`,reanalyzeRepo:`重新分析 {{repoName}}`,deleteRepo:`删除 {{repoName}}`,reanalyzingRepo:`正在重新分析 {{repoName}}:{{message}}`,analyzeNew:`分析新仓库...`,searchRepositories:`搜索仓库...`,noRepositoriesFound:`未找到“{{query}}”相关仓库`,searchNodes:`搜索节点...`,noNodesFound:`未找到“{{query}}”相关节点`,starIfCool:`觉得不错就点星`,aiSettings:`AI 设置`,help:`帮助`,language:`语言`,selectLanguage:`选择语言`},"../locales/zh-CN/help.json":{tabs:{overview:`概览`,ai:`Nexus AI`,shortcuts:`快捷键`,status:`状态栏`,graph:`图谱与节点`,search:`搜索与过滤`},shortcuts:{searchNodes:`搜索节点`,deselectClose:`取消选择 / 关闭`,columns:{action:`操作`,mac:`Mac`,windows:`Windows`}},nodeTypes:{function:`函数`,functionDesc:`函数声明`,file:`文件`,fileDesc:`源码文件`,class:`类`,classDesc:`类声明`,method:`方法`,methodDesc:`类方法`,interface:`接口`,interfaceDesc:`TypeScript 接口`,folder:`文件夹`,folderDesc:`目录节点`},status:{ready:`就绪`,readyDesc:`图谱已完全加载并可交互`,nodesCount:`节点数`,nodesCountDesc:`图谱中的文件与符号总数`,edgesCount:`边数`,edgesCountDesc:`导入 / 依赖连接`,aiIndexStatus:`AI 索引状态`,aiIndexStatusDesc:`仓库已完成 AI 查询索引`,semanticReadyBadge:`语义就绪`,explained:`状态栏说明`},tryAsking:`可以尝试问:`,footer:`GitNexus — 图谱浏览器`,title:`帮助与参考`,footerLong:`GitNexus — 开源代码库图谱浏览器`,docsGithub:`文档与 GitHub ↗`,overview:{gettingStarted:`开始使用`,whatIsTitle:`GitNexus 是什么?`,whatIsDescription:`GitNexus 是代码库的交互式图谱浏览器。每个文件、函数和导入关系都会变成可探索、可查询、可视化导航的节点。`,currentRepoTitle:`当前仓库`,loadedCounts:`已加载:{{nodeCount}} 个节点 · {{edgeCount}} 条边`,threeWaysTitle:`三种探索方式`,wayInspect:`点击节点查看详情`,waySearch:`按名称或类型搜索`,wayAsk:`向 Nexus AI 提出自然语言问题`,navigationTitle:`导航`,navZoom:`滚动缩放`,navPan:`点击并拖动进行平移`,navFocus:`双击节点聚焦其子图`},graph:{nodeColorLegend:`节点颜色图例`,nodeLabel:`{{label}}节点`,sizeDescription:`节点大小反映连接数量——越大的节点被越多文件依赖。边的方向表示从导入方 → 被导入方。`,detailDescription:`点击任意节点可打开详情面板,查看导入、导出和反向依赖。`},search:{title:`搜索与过滤`,searchNodes:`搜索节点`,searchDescription:`可按文件名、函数名或导入路径搜索,匹配的节点会在图谱中实时高亮。`,filterPanel:`过滤面板`,filterDescription:`使用左侧栏的过滤图标隔离特定节点类型、隐藏叶子节点,或以选中节点为根聚焦指定深度范围。`,syntax:`搜索语法`,hints:{nameFragment:`按名称片段匹配`,pathPrefix:`按路径前缀匹配`,nodeType:`按节点类型过滤`}},ai:{title:`Nexus AI`,semanticReady:`✓ 语义索引就绪`,description:`仓库已完成索引,可进行语义查询。Nexus AI 理解代码结构和关系,而不只是文件名。`,questions:{dependencies:`“哪些文件依赖 auth 模块?”`,circular:`“找出这个仓库中的循环依赖”`,connected:`“哪些组件连接最密集?”`,imports:`“显示所有导入 useEffect 的文件”`},openPrompt:`点击右上角的 Nexus AI 按钮打开提问面板。`}},"../locales/zh-CN/onboarding.json":{success:{title:`服务器已连接`,description:`正在准备代码知识图谱...`},loading:{largeRepoHint:`大型仓库可能需要一些时间`},guide:{copyAria:`复制到剪贴板`,copiedAria:`已复制!`,startServer:`启动本地服务器`,devDescription:`在另一个终端启动 Express 后端,即可启用完整图谱。`,prodDescription:`只需一条命令,浏览器会自动连接。`,copyCommand:`复制命令`,copyCommandDescription:`点击终端右侧图标复制。`,done:`完成`,orInstallGlobally:`或全局安装`,globalInstall:`全局安装`,startBackend:`启动后端`,terminal:`终端`,waitingForServer:`等待服务器启动`,pasteAndRun:`粘贴并在终端运行`,pasteAndRunDescription:`在项目根目录打开终端,粘贴命令并回车。`,listeningForServer:`正在监听服务器`,willAutoConnect:`检测到后会自动连接`,autoConnects:`自动连接并打开图谱`,autoConnectsDescription:`无需刷新,页面会自动检测服务器。`,requires:`需要`,port:`端口 4747`},analyzeFirst:{title:`分析你的第一个仓库`,description:`粘贴仓库 URL,GitNexus 会克隆仓库、解析代码,并直接在浏览器中构建实时知识图谱。`,footer:`仅支持公开仓库 · 服务器本地克隆 · 数据不会离开你的机器`},landing:{chooseRepository:`选择仓库`,description:`选择一个已索引仓库开始探索,或分析一个新仓库。`,indexed:`索引于 {{time}}`,orAnalyzeNew:`或分析新仓库`,footer:`支持公开与私有仓库 · 服务器本地克隆 · 数据不会离开你的机器`,time:{justNow:`刚刚`,minutesAgo:`{{count}} 分钟前`,hoursAgo:`{{count}} 小时前`,daysAgo:`{{count}} 天前`}},repoAnalyzer:{inputType:`输入类型`,githubUrl:`GitHub URL`,gitlabUrl:`GitLab URL`,azureDevOpsUrl:`Azure DevOps`,localFolder:`本地文件夹`,starting:`正在启动分析...`,analyzeRepository:`分析仓库`,complete:`分析完成`,loadingGraph:`正在加载图数据...`,defaultRepoName:`仓库`,githubRepositoryUrl:`GitHub 仓库 URL`,githubTokenLabel:`个人访问令牌(可选)`,githubTokenPlaceholder:`ghp_… 或 github_pat_…`,githubTokenHelp:`私有仓库需要此项。需 'repo' 范围(或细粒度 Contents:read)。仅发送一次,不会保存。`,gitlabRepositoryUrl:`GitLab 仓库 URL`,gitlabSupported:`支持 GitLab.com 和自托管 GitLab 实例。`,azureDevOpsRepositoryUrl:`Azure DevOps 仓库 URL`,azureDevOpsSupported:`格式: http://server/Collection/Project/_git/Repository`,localFolderPath:`本地文件夹路径`,hideBackground:`隐藏(分析继续在后台进行)`,upload:{button:`上传文件夹`,uploading:`上传中…`,selected:`已准备 {{fileCount}} 个文件(已跳过 {{dropped}} 个:.git、node_modules、构建产物)`,empty:`该文件夹中未找到可分析的文件。`}}},"../locales/zh-CN/settings.json":{title:`AI 设置`,subtitle:`配置你的 LLM 提供商`,localServer:`本地服务器`,backendUrl:`后端 URL`,connected:`已连接`,notConnected:`未连接`,runServeHint:"运行 `gitnexus serve` 将 Web UI 连接到本地后端。",accessToken:{label:`访问令牌`,placeholder:`粘贴部署访问令牌`,hint:`仅在启用访问控制的部署中需要。可在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中找到。本地服务器请留空。`,title:`此部署需要访问令牌`,promptHint:`GitNexus 服务器正在运行,但已启用访问控制。请在 Render 控制台的 gitnexus-web 服务的 GITNEXUS_SERVE_AUTH_TOKEN 环境变量中查看该令牌。`,connect:`连接`,reveal:`显示访问令牌`,hide:`隐藏访问令牌`,sessionNote:`仅在当前浏览器会话中保存。新标签页或重新打开浏览器后需要重新输入。`},provider:`提供商`,apiKey:`API Key`,learnMore:`了解更多`,model:`模型`,searchModelPlaceholder:`搜索或输入模型 ID...`,selectModelPlaceholder:`选择或输入模型...`,customModelHint:`输入模型 ID 或按 Enter`,customModelExample:`例如 openai/gpt-4o`,pressEnterCustom:`按 Enter 使用自定义 ID`,baseUrl:`Base URL`,optional:`可选`,deploymentName:`部署名称`,apiVersion:`API 版本`,checkConnection:`检查连接`,privacyLabel:`隐私:`,privacyText:`你的 API Key 仅保存在此浏览器本地。`,providers:{openai:{description:`使用 OpenAI 模型进行聊天和代码推理。`,apiKeyPlaceholder:`输入 OpenAI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenAI Platform`,modelPlaceholder:`例如:gpt-4o、gpt-4-turbo、gpt-3.5-turbo`,baseUrlPlaceholder:`https://api.openai.com/v1(默认)`,baseUrlHint:`留空则使用默认 OpenAI API。可为代理或兼容 API 设置自定义 URL。`},gemini:{description:`使用 Google Gemini 模型。`,apiKeyPlaceholder:`输入 Google AI API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Google AI Studio`,modelPlaceholder:`例如:gemini-2.0-flash、gemini-1.5-pro`},anthropic:{description:`使用 Anthropic Claude 模型。`,apiKeyPlaceholder:`输入 Anthropic API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`Anthropic Console`,modelPlaceholder:`例如:claude-sonnet-4-20250514、claude-3-opus`},azure:{apiKeyPlaceholder:`输入 Azure OpenAI API Key`,deploymentNamePlaceholder:`例如:gpt-4o-deployment`},ollama:{quickStart:`📋 快速开始:`,installFrom:`从这里安装 Ollama:`,thenRun:`,然后运行:`,modelPlaceholder:`例如:llama3.2、mistral、codellama`},openrouter:{apiKeyPlaceholder:`输入 OpenRouter API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`OpenRouter Keys`},minimax:{apiKeyPlaceholder:`输入 MiniMax API Key`,helperText:`从这里获取 API Key:`,helperLinkLabel:`MiniMax Platform`,modelPlaceholder:`例如:MiniMax-M3 或 MiniMax-M2.7`,helperModel:`可用:MiniMax-M3(默认)和 MiniMax-M2.7`,endpoint:`区域端点`,endpoints:{global:`全球(api.minimax.io)`,china:`中国(api.minimaxi.com)`},thinking:`思考模式`,thinkingModes:{adaptive:`自适应`,disabled:`关闭`,always_on:`始终开启`},capabilities:`{{contextWindow}} token 上下文 | 输入:{{modalities}}`},glm:{apiKeyPlaceholder:`输入 Z.AI API Key`}},loadingModels:`正在加载模型...`,noModelsMatch:`没有匹配“{{searchTerm}}”的模型`,moreModels:`+{{count}} 个更多模型 • 缩小搜索范围`,apiKeySession:`API Key 保存在会话存储中,关闭此标签页后会被清除。`,startLocalServer:`启动本地服务器`,settingsSaved:`设置已保存`,failedToSave:`保存失败`,saveSettings:`保存设置`,endpoint:`端点`,azurePortal:`Azure Portal`,azureHint:`在这里配置 Azure OpenAI 服务:`,defaultPort:`默认端口为`,pullModel:`使用以下命令拉取模型`,browseModels:`在这里浏览全部模型:`,openRouterModels:`OpenRouter Models`,zaiPlatform:`Z.AI Platform`,glmCodingApi:`Coding API(默认)。通用 API 请使用 https://api.z.ai/api/paas/v4。`,privacyFull:`你的 API Key 只保存在此浏览器的会话存储中,关闭标签页后会清除。聊天时会直接发送给 LLM 提供商,你的代码不会离开本机。`}}),Xn={},Zn=new Set;for(let[e,t]of Object.entries(Yn)){let n=e.match(/\.\.\/locales\/([^/]+)\/([^/.]+)\.json$/);if(!n)continue;let[,r,i]=n;Xn[r]??={},Xn[r][i]=t,Zn.add(i)}var Qn=Array.from(Zn).sort(),$n=`common`,er=`gitnexus.lng`;function tr(e){if(typeof document>`u`)return;let t=Jn(e);document.documentElement.lang=t.code,document.documentElement.dir=t.dir}function nr(e){return qn(e)??`en`}function rr(e){let t=qn(e);if(!(!t||typeof window>`u`))try{window.localStorage.setItem(er,t)}catch{}}yn.use(Un).use(Wn).init({resources:Xn,fallbackLng:`en`,supportedLngs:Kn,load:`currentOnly`,ns:Qn,defaultNS:$n,fallbackNS:!1,returnEmptyString:!1,interpolation:{escapeValue:!1},react:{useSuspense:!1},detection:{order:[`querystring`,`localStorage`,`navigator`,`htmlTag`],lookupQuerystring:`lng`,lookupLocalStorage:er,caches:[],convertDetectedLanguage:nr}}).then(()=>{let e=yn.resolvedLanguage||yn.language;tr(e),rr(e)}),yn.on(`languageChanged`,e=>{let t=yn.resolvedLanguage||e;tr(t),rr(t)});var ir=yn,ar=e=>e.replace(/\\/g,`/`).replace(/^\.?\//,``),or=/\[\[([a-zA-Z0-9_\-./\\]+\.[a-zA-Z0-9]+)(?::(\d+)(?:[-–](\d+))?)?\]\]/g,sr=/\[\[(?:graph:)?(Class|Function|Method|Interface|File|Folder|Variable|Enum|Type|CodeElement):([^\]]+)\]\]/g,cr={Project:`#a855f7`,Package:`#8b5cf6`,Module:`#7c3aed`,Folder:`#6366f1`,File:`#3b82f6`,Class:`#f59e0b`,Protocol:`#ec4899`,Category:`#14b8a6`,Function:`#10b981`,Method:`#14b8a6`,Variable:`#64748b`,Interface:`#ec4899`,Enum:`#f97316`,Decorator:`#eab308`,Import:`#475569`,Type:`#a78bfa`,CodeElement:`#64748b`,Community:`#818cf8`,Process:`#f43f5e`,Section:`#60a5fa`,Struct:`#f59e0b`,Trait:`#ec4899`,Impl:`#14b8a6`,TypeAlias:`#a78bfa`,Const:`#64748b`,Static:`#64748b`,Namespace:`#7c3aed`,Union:`#f97316`,Typedef:`#a78bfa`,Macro:`#eab308`,Property:`#64748b`,Record:`#f59e0b`,Delegate:`#14b8a6`,Annotation:`#eab308`,Constructor:`#10b981`,Template:`#a78bfa`,Route:`#f43f5e`,Destination:`#fb7185`,Tool:`#a855f7`,BasicBlock:`#475569`},lr={Project:20,Package:16,Module:13,Folder:10,File:6,Class:8,Protocol:7,Category:3,Function:4,Method:3,Variable:2,Interface:7,Enum:5,Decorator:2,Import:1.5,Type:3,CodeElement:2,Community:0,Process:0,Section:8,Struct:8,Trait:7,Impl:3,TypeAlias:3,Const:2,Static:2,Namespace:13,Union:5,Typedef:3,Macro:2,Property:2,Record:8,Delegate:3,Annotation:2,Constructor:4,Template:3,Route:5,Destination:5,Tool:5,BasicBlock:2},ur=[`#ef4444`,`#f97316`,`#eab308`,`#22c55e`,`#06b6d4`,`#3b82f6`,`#8b5cf6`,`#d946ef`,`#ec4899`,`#f43f5e`,`#14b8a6`,`#84cc16`],dr=e=>ur[e%ur.length],fr=[`Project`,`Package`,`Module`,`Folder`,`File`,`Class`,`Protocol`,`Category`,`Function`,`Method`,`Property`,`Const`,`Interface`,`Enum`,`Type`],pr=[`Folder`,`File`,`Class`,`Protocol`,`Category`,`Interface`,`Enum`,`Type`,`Function`,`Method`,`Variable`,`Property`,`Const`,`Decorator`,`Import`],mr=[`CONTAINS`,`DEFINES`,`IMPORTS`,`CALLS`,`EXTENDS`,`IMPLEMENTS`],hr=[`CONTAINS`,`DEFINES`,`IMPORTS`,`EXTENDS`,`IMPLEMENTS`,`CALLS`],gr={CONTAINS:{color:`#2d5a3d`,label:`Contains`},DEFINES:{color:`#0e7490`,label:`Defines`},IMPORTS:{color:`#1d4ed8`,label:`Imports`},CALLS:{color:`#7c3aed`,label:`Calls`},EXTENDS:{color:`#c2410c`,label:`Extends`},IMPLEMENTS:{color:`#be185d`,label:`Implements`}},H=m(),_r=(0,R.createContext)(null),vr=({children:e})=>{let[t,n]=(0,R.useState)(null),[r,i]=(0,R.useState)(null),[a,o]=(0,R.useState)(fr),[s,c]=(0,R.useState)(hr),[l,u]=(0,R.useState)(null),[d,f]=(0,R.useState)(new Set),[p,m]=(0,R.useState)(`force`),[h,g]=(0,R.useState)(`full`),[_,v]=(0,R.useState)(null),y=(0,R.useCallback)(e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),b=(0,R.useCallback)(e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),x=(0,R.useMemo)(()=>({graph:t,setGraph:n,selectedNode:r,setSelectedNode:i,visibleLabels:a,toggleLabelVisibility:y,visibleEdgeTypes:s,toggleEdgeVisibility:b,depthFilter:l,setDepthFilter:u,highlightedNodeIds:d,setHighlightedNodeIds:f,graphViewMode:p,setGraphViewMode:m,graphMode:h,setGraphMode:g,chatOnlyNodeCount:_,setChatOnlyNodeCount:v}),[t,r,a,s,l,d,p,h,_]);return(0,H.jsx)(_r.Provider,{value:x,children:e})},yr=()=>{let e=(0,R.useContext)(_r);if(!e)throw Error(`useGraphState must be used within a GraphStateProvider`);return e},br=`gitnexus.autoStartEmbeddings`,xr=()=>typeof window>`u`||!window.localStorage?!1:window.localStorage.getItem(br)===`true`,Sr=(e,t)=>e.find(e=>Re(e)===t)?.name??t.split(/[/\\]/).filter(Boolean).at(-1)??t,Cr=(0,R.createContext)(null),wr=({children:e})=>(0,H.jsx)(vr,{children:(0,H.jsx)(Tr,{children:e})}),Tr=({children:e})=>{let[t,n]=(0,R.useState)(`onboarding`),{graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,highlightedNodeIds:p,setHighlightedNodeIds:m,graphViewMode:h,setGraphViewMode:g,graphMode:_,setGraphMode:v,chatOnlyNodeCount:y,setChatOnlyNodeCount:b}=yr(),[S,C]=(0,R.useState)(!1),[w,T]=(0,R.useState)(`code`),[E,D]=(0,R.useState)(!1),O=(0,R.useCallback)(()=>{Ye(!0)},[]),k=(0,R.useCallback)(()=>{C(!0),T(`chat`)},[]),[A,j]=(0,R.useState)(null),[M,N]=(0,R.useState)(new Set),[F,I]=(0,R.useState)(new Set),[L,ee]=(0,R.useState)(new Set),[te,ne]=(0,R.useState)(!0),z=(0,R.useCallback)(()=>{ne(e=>!e)},[]),B=(0,R.useCallback)(()=>{I(new Set)},[]),ie=(0,R.useCallback)(()=>{N(new Set)},[]),ae=(0,R.useCallback)(()=>{ee(new Set)},[]),oe=(0,R.useCallback)(()=>{m(new Set),j(null)},[]),[se,ce]=(0,R.useState)(new Map),le=(0,R.useRef)(null),ue=(0,R.useCallback)((e,t)=>{let n=Date.now(),r=t===`pulse`?2e3:t===`ripple`?3e3:4e3;ce(i=>{let a=new Map(i);for(let i of e)a.set(i,{type:t,startTime:n,duration:r});return a}),setTimeout(()=>{ce(t=>{let r=new Map(t);for(let t of e){let e=r.get(t);e&&e.startTime===n&&r.delete(t)}return r})},r+100)},[]),de=(0,R.useCallback)(()=>{ce(new Map),le.current&&=(clearInterval(le.current),null)},[]),[fe,pe]=(0,R.useState)(null),[me,he]=(0,R.useState)(``),[ge,_e]=(0,R.useState)(void 0),[ve,ye]=(0,R.useState)(null),[be,xe]=(0,R.useState)([]),[Se,Te]=(0,R.useState)(`idle`),[De,Oe]=(0,R.useState)(null),[ke,je]=(0,R.useState)(Ce),[Me,Ne]=(0,R.useState)(!1),[Pe,Fe]=(0,R.useState)(!1),[Ie,Le]=(0,R.useState)(!1),[Re,ze]=(0,R.useState)(null),[Be,Ve]=(0,R.useState)([]),[He,Ue]=(0,R.useState)(!1),[We,Ge]=(0,R.useState)([]),[Ke,qe]=(0,R.useState)([]),[Je,Ye]=(0,R.useState)(!1),[Xe,Ze]=(0,R.useState)(null),Qe=(0,R.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&e.set(ar(t.properties.filePath),t.id);return e},[r]),$e=(0,R.useMemo)(()=>{if(!r)return new Map;let e=new Map;for(let t of r.nodes)t.label===`File`&&t.properties.filePath&&e.set(ar(t.properties.filePath),t.properties.filePath);return e},[r]),et=(0,R.useCallback)(e=>{let t=ar(e);if($e.has(t))return $e.get(t);for(let[e,n]of $e)if(e.endsWith(t))return n;return null},[$e]),tt=(0,R.useCallback)(e=>Qe.get(ar(e)),[Qe]),nt=(0,R.useCallback)(e=>{let t=`ref-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,n={...e,id:t};qe(t=>t.some(t=>t.filePath===e.filePath&&t.startLine===e.startLine&&t.endLine===e.endLine)?t:[...t,n]),Ye(!0),Ze({filePath:e.filePath,startLine:e.startLine,endLine:e.endLine,ts:Date.now()}),e.nodeId&&e.source===`ai`&&N(t=>new Set([...t,e.nodeId]))},[]),rt=(0,R.useCallback)(()=>{qe(e=>{let t=e.filter(e=>e.source===`ai`),n=e.filter(e=>e.source!==`ai`),r=new Set(t.map(e=>e.nodeId).filter(Boolean));return r.size>0&&N(e=>{let t=new Set(e);for(let e of r)t.delete(e);return t}),n.length===0&&!a&&Ye(!1),n})},[a]);(0,R.useEffect)(()=>{a&&Ye(!0)},[a]);let it=(0,R.useRef)(void 0),at=(0,R.useCallback)(e=>{it.current=e,_e(e)},[]),ot=(0,R.useCallback)(async e=>pt(e,it.current),[]),ct=(0,R.useCallback)(async()=>await st()===`ok`,[]),lt=(0,R.useRef)(null),ut=(0,R.useCallback)(async()=>{let e=it.current;if(!e)throw Error(`No repository loaded`);Te(`loading`),Oe(null);try{let{jobId:t}=await xt(e);await new Promise((e,n)=>{lt.current=St(t,e=>{Oe({phase:e.phase,percent:e.percent}),e.phase===`loading-model`||e.phase===`loading`?Te(`loading`):e.phase===`embedding`?Te(`embedding`):e.phase===`indexing`&&Te(`indexing`)},()=>{Te(`ready`),Oe({phase:`ready`,percent:100}),e()},e=>{Te(`error`),n(Error(e))})})}catch(e){if(e?.message?.includes(`already in progress`)){Te(`embedding`);return}throw Te(`error`),e}},[]),dt=(0,R.useCallback)(()=>{if(typeof navigator<`u`&&navigator.webdriver||typeof process<`u`&&{}.PLAYWRIGHT_TEST){Te(`idle`);return}if(!xr()){Te(`idle`);return}ut().catch(e=>{console.warn(`Embeddings auto-start failed:`,e)})},[ut]),ft=(0,R.useCallback)(async(e,t=10)=>mt(e,{limit:t,mode:`semantic`,repo:it.current}),[]),_t=(0,R.useCallback)(async(e,t=5,n=2)=>mt(e,{limit:t,mode:`semantic`,enrich:!0,repo:it.current}),[]),vt=(0,R.useCallback)(e=>{je(t=>{let n={...t,...e};return we(n),n})},[]),yt=(0,R.useCallback)(()=>{je(Ce())},[]),bt=(0,R.useRef)(null),V=(0,R.useRef)(null),wt=(0,R.useRef)(`idle`),Tt=(0,R.useRef)(_);(0,R.useEffect)(()=>{Tt.current=_},[_]);let Et=(0,R.useCallback)(async(e,t)=>{let n=Ee();if(!n){ze(`Please configure an LLM provider in settings`);return}let r=t?.chatOnly??Tt.current===`chatOnly`;Le(!0),ze(null);try{let i=e||me||`project`;t?.repo&&at(t.repo);let a=it.current,{createGraphRAGAgent:o}=await P(async()=>{let{createGraphRAGAgent:e}=await import(`./agent-DuBBkGz1.js`);return{createGraphRAGAgent:e}},__vite__mapDeps([0,1,2,3,4,5])),{buildCodebaseContext:s}=await P(async()=>{let{buildCodebaseContext:e}=await import(`./context-builder-BHiFUA8O.js`);return{buildCodebaseContext:e}},[]),c=e=>pt(e,a),l=await s(c,i);bt.current=o(n,{executeQuery:c,search:(e,t)=>mt(e,{...t,repo:a}),grep:(e,t,n)=>ht(e,a,t,n),readFile:e=>gt(e,{repo:a}).then(e=>e.content)},l,r),Fe(!0),ze(null)}catch(e){let t=e instanceof Error?e.message:String(e);ze(t),Fe(!1)}finally{Le(!1)}},[]),Dt=(0,R.useCallback)(async e=>{if(wt.current!==`idle`||(rt(),B(),!Pe&&(await Et(),!bt.current)))return;let t={id:`user-${Date.now()}`,role:`user`,content:e,timestamp:Date.now()};if(Ve(e=>[...e,t]),Se===`indexing`){let e={id:`assistant-${Date.now()}`,role:`assistant`,content:ir.t(`common:chat.waitForVectorIndex`),timestamp:Date.now()};Ve(t=>[...t,e]),ze(null),Ue(!1),Ge([]);return}Ue(!0),wt.current=`streaming`,Ge([]),V.current?.abort();let n=new AbortController;V.current=n;let i=Ae(ke.activeProvider),a=[...Be,t].flatMap(e=>e.role===`user`?[{role:`user`,content:e.content}]:e.role===`tool`?e.toolCallId?[{role:`tool`,content:e.content,toolCallId:e.toolCallId}]:[]:i.preserveAssistantTranscript&&e.historyMessages?.length?e.historyMessages:[{role:`assistant`,content:e.content}]),o=`assistant-${Date.now()}`,s=[],c=[],l=0,u,d=()=>{let e=s.filter(e=>e.type===`reasoning`||e.type===`content`).map(e=>e.content).filter(Boolean).join(`
13
13
 
14
- `);Ve(t=>{let n=t.find(e=>e.id===o),r={id:o,role:`assistant`,content:e,historyMessages:u,steps:[...s],toolCalls:[...c],timestamp:n?.timestamp??Date.now()};return n?t.map(e=>e.id===o?r:e):[...t,r]})},f=!1,p=null,m=()=>{f||(f=!0,p=requestAnimationFrame(()=>{f=!1,p=null,d()}))};try{let e=e=>{switch(e.type){case`reasoning`:if(e.reasoning){let t=s[s.length-1];t&&t.type===`reasoning`?s[s.length-1]={...t,content:(t.content||``)+e.reasoning}:s.push({id:`step-${l++}`,type:`reasoning`,content:e.reasoning}),m()}break;case`content`:if(e.content){let t=s[s.length-1];t&&t.type===`content`?s[s.length-1]={...t,content:(t.content||``)+e.content}:s.push({id:`step-${l++}`,type:`content`,content:e.content}),m();let n=s[s.length-1],i=n&&n.type===`content`&&n.content||``,a=new RegExp(or.source,or.flags),o;for(;(o=a.exec(i))!==null;){let e=o[1].trim(),t=o[2]?parseInt(o[2],10):void 0,n=o[3]?parseInt(o[3],10):t,r=et(e);if(!r)continue;let i=t===void 0?void 0:Math.max(0,t-1),a=n===void 0?i:Math.max(0,n-1),s=tt(r);nt({filePath:r,startLine:i,endLine:a,nodeId:s,label:`File`,name:r.split(`/`).pop()??r,source:`ai`})}let c=new RegExp(sr.source,sr.flags),u;for(;(u=c.exec(i))!==null;){let e=u[1],t=u[2].trim();if(!r)continue;let n=r.nodes.find(n=>n.label===e&&n.properties.name===t);if(!n||!n.properties.filePath)continue;let i=et(n.properties.filePath);i&&nt({filePath:i,startLine:n.properties.startLine?n.properties.startLine-1:void 0,endLine:n.properties.endLine?n.properties.endLine-1:void 0,nodeId:n.id,label:n.label,name:n.properties.name,source:`ai`})}}break;case`tool_call`:if(e.toolCall){let t=e.toolCall;c.push(t),s.push({id:`step-${l++}`,type:`tool_call`,toolCall:t}),Ge(e=>[...e,t]),m()}break;case`tool_result`:if(e.toolCall){let t=e.toolCall,n=c.findIndex(e=>e.id===t.id);n<0&&(n=c.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=c.findIndex(e=>e.name===t.name&&!e.result)),n>=0&&c[n].status!==`stopped`&&(c[n]={...c[n],result:t.result,status:`completed`});let i=s.findIndex(e=>e.type===`tool_call`&&e.toolCall&&(e.toolCall.id===t.id||e.toolCall.name===t.name&&e.toolCall.status===`running`));if(i>=0&&s[i].toolCall&&s[i].toolCall.status!==`stopped`&&(s[i]={...s[i],toolCall:{...s[i].toolCall,result:t.result,status:`completed`}}),Ge(e=>{let n=e.findIndex(e=>e.id===t.id);return n<0&&(n=e.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=e.findIndex(e=>e.name===t.name&&!e.result)),n>=0?e[n].status===`stopped`?e:e.map((e,r)=>r===n?{...e,result:t.result,status:`completed`}:e):e}),m(),t.result){let e=t.result.match(/\[HIGHLIGHT_NODES:([^\]]+)\]/);if(e){let t=e[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length>0&&r){let e=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of t)if(n.has(i))e.add(i);else{let t=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;t&&e.add(t)}e.size>0&&I(e)}else t.length>0&&I(new Set(t))}let n=t.result.match(/\[IMPACT:([^\]]+)\]/);if(n){let e=n[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(e.length>0&&r){let t=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of e)if(n.has(i))t.add(i);else{let e=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;e&&t.add(e)}t.size>0&&ee(t)}else e.length>0&&ee(new Set(e))}}}break;case`error`:ze(e.error??`Unknown error`);break;case`done`:u=i.preserveAssistantTranscript?e.historyMessages:void 0,m();break}},t=bt.current;if(!t)throw Error(`Agent not initialized`);let{streamAgentResponse:o}=await P(async()=>{let{streamAgentResponse:e}=await import(`./agent-C2n33ANd.js`);return{streamAgentResponse:e}},__vite__mapDeps([0,1,2,3,4,5]));for await(let r of o(t,a,{captureHistory:i.preserveAssistantTranscript,signal:n.signal})){if(r.type===`cancelled`)break;e(r)}}catch(e){if(!n.signal.aborted){let t=e instanceof Error?e.message:String(e);ze(t)}}finally{p!=null&&(cancelAnimationFrame(p),p=null),wt.current=`idle`,Ue(!1),Ge([])}},[Be,Pe,Et,et,tt,nt,rt,B,r,Se]),Ot=(0,R.useCallback)(()=>{if(!V.current)return;wt.current=`aborting`,V.current.abort(),V.current=null;let e=ir.t(`chat:stopped`),t=t=>t.status===`running`||t.status===`pending`?{...t,status:`stopped`,result:e}:t;Ge(e=>e.map(t)),Ve(e=>{let n=[...e].map((e,t)=>e.role===`assistant`?t:-1).filter(e=>e>=0).pop();if(n===void 0)return e;let r=e[n],i={...r,toolCalls:r.toolCalls?.map(t),steps:r.steps?.map(e=>e.type===`tool_call`&&e.toolCall?{...e,toolCall:t(e.toolCall)}:e)};return e.map((e,t)=>t===n?i:e)}),Ue(!1)},[]),kt=(0,R.useCallback)(()=>{V.current?.abort(),V.current=null,wt.current=`idle`,Ve([]),Ge([]),ze(null),Ue(!1)},[]),At=(0,R.useCallback)(async e=>{if(!ve)return;pe({phase:`extracting`,percent:0,message:ir.t(`common:progress.switchingRepository`),detail:ir.t(`common:progress.loadingRepository`,{repo:Sr(be,e)})}),n(`loading`),Fe(!1),m(new Set),B(),ie(),ae(),o(null),j(null),qe([]),Ye(!1),Ze(null),v(`full`),b(null);let t,r,a,s=!1;try{let n=await Ct(ve,(e,t,n)=>{if(e===`validating`)pe({phase:`extracting`,percent:5,message:ir.t(`common:progress.switchingRepository`),detail:ir.t(`common:progress.validating`)});else if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);pe({phase:`extracting`,percent:e,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.downloadedMb`,{mb:r})})}else e===`extracting`&&pe({phase:`extracting`,percent:97,message:ir.t(`common:progress.processing`),detail:ir.t(`common:progress.extractingFileContents`)})},void 0,e,{awaitAnalysis:!0}),o=n.repoInfo.repoPath??n.repoInfo.path,c=n.repoInfo.name||(o||``).replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()||e||`server-project`;a=e||o||c,he(c),at(a),t=n.repoInfo,r=c;let l=re(n);i(l.graph),v(l.graphMode),b(l.graphMode===`chatOnly`?l.nodeCount:null),s=l.graphMode===`chatOnly`}catch(e){console.error(`Repo switch failed:`,e),pe({phase:`error`,percent:0,message:ir.t(`common:progress.failedSwitchRepository`),detail:e instanceof Error?e.message:ir.t(`common:progress.unknownError`)}),Fe(!1),bt.current=null,setTimeout(()=>{n(`exploring`),pe(null)},x);return}if(r){let e=new URL(window.location.href);e.searchParams.set(`project`,r);let n=t?.repoPath??t?.path;n&&e.searchParams.set(`repo`,n),e.searchParams.delete(`skipGraph`),window.history.replaceState(null,``,e.toString())}bt.current=null,Fe(!1),Ve([]);try{Ee()&&await Et(r,{chatOnly:s,repo:a}),n(`exploring`),dt(),pe(null)}catch(e){console.warn(`Failed to initialize agent:`,e),Fe(!1),bt.current=null,ze(`Failed to initialize agent`),n(`exploring`),pe(null)}},[ve,be,pe,n,he,i,v,b,Et,dt,m,B,ie,ae,o,j,qe,Ye,Ze,Ve,at]),jt=(0,R.useRef)(!1),Mt=(0,R.useRef)(null),Nt=(0,R.useRef)(!0);(0,R.useEffect)(()=>()=>{Nt.current=!1,Mt.current?.abort()},[]);let Pt=(0,R.useCallback)(async()=>{if(!ve||jt.current)return;jt.current=!0;let e=it.current,t=new AbortController;Mt.current=t,pe({phase:`extracting`,percent:0,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.validating`)}),n(`loading`);try{let r=await Ct(ve,(e,t,n)=>{if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);pe({phase:`extracting`,percent:e,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.downloadedMb`,{mb:r})})}},t.signal,e,{awaitAnalysis:!0,skipGraph:!1});if(!Nt.current||it.current!==e)return;let a=re(r);i(a.graph),v(a.graphMode),b(a.graphMode===`chatOnly`?a.nodeCount:null),pe(null),n(`exploring`),Ee()&&await Et(e?Sr(be,e):void 0,{chatOnly:!1,repo:e})}catch(t){if(!Nt.current||it.current!==e)return;console.error(`Load graph anyway failed:`,t),pe(null),n(`exploring`)}finally{Mt.current===t&&(Mt.current=null),jt.current=!1}},[ve,be,pe,n,i,v,b,Et]),Ft=(0,R.useCallback)(e=>{qe(t=>{let n=t.find(t=>t.id===e),r=t.filter(t=>t.id!==e);return n?.nodeId&&n.source===`ai`&&(r.some(e=>e.nodeId===n.nodeId&&e.source===`ai`)||N(e=>{let t=new Set(e);return t.delete(n.nodeId),t})),r.length===0&&!a&&Ye(!1),r})},[a]),It=(0,R.useCallback)(()=>{qe([]),Ye(!1),Ze(null)},[]),Lt={viewMode:t,setViewMode:n,graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,isRightPanelOpen:S,setRightPanelOpen:C,rightPanelTab:w,setRightPanelTab:T,openCodePanel:O,openChatPanel:k,helpDialogBoxOpen:E,setHelpDialogBoxOpen:D,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,graphViewMode:h,setGraphViewMode:g,graphMode:_,setGraphMode:v,chatOnlyNodeCount:y,setChatOnlyNodeCount:b,highlightedNodeIds:p,setHighlightedNodeIds:m,aiCitationHighlightedNodeIds:M,aiToolHighlightedNodeIds:F,blastRadiusNodeIds:L,isAIHighlightsEnabled:te,toggleAIHighlights:z,clearAIToolHighlights:B,clearAICitationHighlights:ie,clearBlastRadius:ae,queryResult:A,setQueryResult:j,clearQueryHighlights:oe,animatedNodes:se,triggerNodeAnimation:ue,clearAnimations:de,progress:fe,setProgress:pe,projectName:me,setProjectName:he,currentRepo:ge,serverBaseUrl:ve,setServerBaseUrl:ye,availableRepos:be,setAvailableRepos:xe,switchRepo:At,setCurrentRepo:at,loadGraphAnyway:Pt,runQuery:ot,isDatabaseReady:ct,embeddingStatus:Se,embeddingProgress:De,startEmbeddings:ut,startEmbeddingsWithFallback:dt,semanticSearch:ft,semanticSearchWithContext:_t,isEmbeddingReady:Se===`ready`,llmSettings:ke,updateLLMSettings:vt,isSettingsPanelOpen:Me,setSettingsPanelOpen:Ne,isAgentReady:Pe,isAgentInitializing:Ie,agentError:Re,chatMessages:Be,isChatLoading:He,currentToolCalls:We,refreshLLMSettings:yt,initializeAgent:Et,sendChatMessage:Dt,stopChatResponse:Ot,clearChat:kt,codeReferences:Ke,isCodePanelOpen:Je,setCodePanelOpen:Ye,addCodeReference:nt,removeCodeReference:Ft,clearAICodeReferences:rt,clearCodeReferences:It,codeReferenceFocus:Xe};return(0,H.jsx)(Cr.Provider,{value:Lt,children:e})},Er=()=>{let e=(0,R.useContext)(Cr);if(!e)throw Error(`useAppState must be used within AppStateProvider`);return e},Dr=s(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Or=s(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),kr=s(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),Ar=s(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),jr=s(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Mr=s(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Nr=s(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Pr=s(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Fr=s(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ir=s(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Lr=s(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Rr=s(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),zr=s(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Br=s(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Vr=s(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Hr=s(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Ur=s(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Wr=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Gr=s(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Kr=s(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),qr=s(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Jr=s(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Yr=s(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Xr=s(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Zr=s(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Qr=s(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$r=s(`lightbulb-off`,[[`path`,{d:`M16.8 11.2c.8-.9 1.2-2 1.2-3.2a6 6 0 0 0-9.3-5`,key:`1fkcox`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M6.3 6.3a4.67 4.67 0 0 0 1.2 5.2c.7.7 1.3 1.5 1.5 2.5`,key:`10m8kw`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ei=s(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ti=s(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),ni=s(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ri=s(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ii=s(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),ai=s(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),oi=s(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),si=s(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ci=s(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),li=s(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ui=s(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),di=s(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fi=s(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),pi=s(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),mi=s(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),hi=s(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),gi=s(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),_i=s(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),vi=s(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),yi=s(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),bi=s(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xi=s(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Si=s(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ci=s(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),wi=s(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ti=s(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ei=s(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Di=s(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Oi=s(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),ki=s(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Ai=s(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),ji=s(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Mi=s(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Ni=`gitnexus-backend-url`;function Pi(){let[e]=(0,R.useState)(()=>{try{return localStorage.getItem(Ni)??b}catch{return b}}),[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),[a,o]=(0,R.useState)(!1),s=(0,R.useRef)(0),c=(0,R.useCallback)(async()=>{let e=++s.current;i(!0);try{let t=await st();return e===s.current?(n(t===`ok`),o(t===`unauthorized`),t===`ok`):!1}catch{return e===s.current&&(n(!1),o(!1)),!1}finally{e===s.current&&i(!1)}},[]),l=(0,R.useRef)(null),[u,d]=(0,R.useState)(!1),f=(0,R.useRef)(c);f.current=c;let p=(0,R.useCallback)(()=>{l.current!==null&&(clearTimeout(l.current),l.current=null),d(!1)},[]),m=(0,R.useCallback)(()=>{p(),d(!0);let e=()=>{l.current=setTimeout(async()=>{if(document.hidden){l.current=null;return}await f.current()?(d(!1),l.current=null):e()},3e3)};e()},[p]);return(0,R.useEffect)(()=>{if(!u)return;let e=()=>{document.hidden||(l.current!==null&&(clearTimeout(l.current),l.current=null),f.current().then(e=>{!e&&u&&m()}))};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[u,m]),(0,R.useEffect)(()=>()=>{l.current!==null&&clearTimeout(l.current)},[]),(0,R.useEffect)(()=>{We(e),c()},[]),{isConnected:t,isProbing:r,isUnauthorized:a,backendUrl:e,startPolling:m,stopPolling:p,isPolling:u}}var Fi=({value:e,onChange:t,placeholder:n,label:r,revealLabel:i,hideLabel:a})=>{let[o,s]=(0,R.useState)(!1);return(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`input`,{type:o?`text`:`password`,value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,"aria-label":r,placeholder:n,className:`w-full rounded-xl border border-border-subtle bg-elevated px-4 py-3 pr-11 font-mono text-sm text-text-primary transition-all outline-none placeholder:text-text-muted focus:border-accent focus:ring-2 focus:ring-accent/20`}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>s(e=>!e),"aria-label":o?a:i,className:`absolute top-1/2 right-3 -translate-y-1/2 text-text-muted transition-colors hover:text-text-primary`,children:o?(0,H.jsx)(Br,{className:`h-4 w-4`}):(0,H.jsx)(Vr,{className:`h-4 w-4`})})]})},Ii=({onSubmit:e})=>{let{t}=f(`settings`),[n,r]=(0,R.useState)(Je);return(0,H.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),Ye(n),e?.()},className:`animate-fade-in rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsxs)(`div`,{className:`mb-5 text-center`,children:[(0,H.jsx)(`div`,{className:`mb-3 inline-flex h-10 w-10 items-center justify-center rounded-xl bg-accent/20`,children:(0,H.jsx)(Zr,{className:`h-5 w-5 text-accent`})}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`accessToken.title`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-sm text-sm leading-relaxed text-text-secondary`,children:t(`accessToken.promptHint`)})]}),(0,H.jsx)(Fi,{value:n,onChange:r,label:t(`accessToken.label`),placeholder:t(`accessToken.placeholder`),revealLabel:t(`accessToken.reveal`),hideLabel:t(`accessToken.hide`)}),(0,H.jsx)(`button`,{type:`submit`,className:`mt-4 w-full cursor-pointer rounded-xl bg-accent px-4 py-3 text-sm font-medium text-white shadow-glow-soft transition-all hover:bg-accent/90 hover:shadow-glow`,children:t(`accessToken.connect`)}),(0,H.jsx)(`p`,{className:`mt-4 border-t border-border-subtle pt-4 text-center text-xs leading-relaxed text-text-muted`,children:t(`accessToken.sessionNote`)})]})};function Li({text:e}){let{t}=f(`onboarding`),[n,r]=(0,R.useState)(!1),i=(0,R.useRef)(null);return(0,R.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),(0,H.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)}catch{}},"aria-label":t(n?`guide.copiedAria`:`guide.copyAria`),className:`shrink-0 cursor-pointer rounded-md px-2 py-1 transition-all duration-200 focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:outline-none ${n?`bg-emerald-400/10 text-emerald-400`:`text-text-muted hover:bg-white/5 hover:text-text-primary`} `,children:n?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5`}):(0,H.jsx)(o,{className:`h-3.5 w-3.5`})})}function Ri({command:e,label:t,isActive:n=!1}){return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border transition-all duration-300 ${n?`border-accent/40 shadow-glow-soft`:`border-border-default hover:border-accent/20 hover:shadow-glow-soft`} `,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-deep px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-red-500/60`}),(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-yellow-500/60`}),(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-emerald-500/60`})]}),(0,H.jsx)(`span`,{className:`flex-1 text-center font-mono text-[11px] text-text-muted`,children:t}),(0,H.jsx)(Li,{text:e})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 bg-void px-4 py-3.5 font-mono text-sm`,children:[(0,H.jsx)(`span`,{className:`text-accent/60 select-none`,"aria-hidden":`true`,children:`$`}),(0,H.jsx)(`code`,{className:`flex-1 overflow-x-auto tracking-wide whitespace-nowrap text-text-primary`,children:e})]})]})}function zi({state:e,number:t}){return e===`done`?(0,H.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-emerald-500/50 bg-emerald-500/20`,children:(0,H.jsx)(Nr,{className:`h-3 w-3 text-emerald-400`})}):e===`active`?(0,H.jsxs)(`div`,{className:`relative flex h-6 w-6 shrink-0 items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 animate-ping rounded-full border border-accent/30`}),(0,H.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-full border border-accent/60 bg-accent/20`,children:(0,H.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-accent`,children:t})})]}):(0,H.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-border-subtle bg-elevated`,children:(0,H.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-text-muted`,children:t})})}function Bi({state:e,number:t,title:n,description:r,children:i}){let{t:a}=f(`onboarding`),o=e!==`waiting`;return(0,H.jsx)(`div`,{className:`transition-all duration-300 ${e===`waiting`?`opacity-40`:`opacity-100`} `,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(zi,{state:e,number:t}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 pt-0.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium transition-colors duration-200 ${e===`done`?`text-emerald-400`:e===`active`?`text-text-primary`:`text-text-muted`}`,children:n}),e===`done`&&(0,H.jsx)(`span`,{className:`animate-fade-in font-mono text-[10px] tracking-wider text-emerald-400/60 uppercase`,children:a(`guide.done`)})]}),r&&(0,H.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-text-muted`,children:r}),o&&i&&(0,H.jsx)(`div`,{className:`mt-3 animate-slide-up`,children:i})]})]})})}function Vi(){let{t:e}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex animate-fade-in items-center gap-3 rounded-xl border border-accent/15 bg-accent/5 px-4 py-3`,"aria-live":`polite`,role:`status`,children:[(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(Mi,{className:`h-4 w-4 text-accent/70`}),(0,H.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-full border border-accent/25`})})]}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`p`,{className:`text-xs font-medium text-text-secondary`,children:[e(`guide.listeningForServer`),(0,H.jsx)(`span`,{className:`ml-0.5 inline-flex text-text-muted`,children:(0,H.jsx)(`span`,{className:`animate-pulse`,children:`...`})})]}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[11px] text-text-muted`,children:e(`guide.willAutoConnect`)})]})]})}var Hi=({isPolling:e})=>{let{t}=f(`onboarding`),n=t(`guide.terminal`),r=e?`done`:`active`,i=e?`active`:`waiting`;return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`guide.startServer`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`guide.prodDescription`)})]})}),(0,H.jsxs)(`div`,{className:`relative space-y-5`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute top-6 bottom-6 left-[11px] w-px bg-border-subtle`,"aria-hidden":`true`}),(0,H.jsxs)(Bi,{state:r,number:1,title:t(`guide.copyCommand`),description:e?void 0:t(`guide.copyCommandDescription`),children:[(0,H.jsx)(Ri,{command:`npx gitnexus@latest serve`,label:n,isActive:r===`active`}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`my-3 flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,H.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:t(`guide.orInstallGlobally`)}),(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,H.jsx)(Ri,{command:`npm install -g gitnexus && gitnexus serve`,label:t(`guide.globalInstall`),isActive:!1})]})]}),(0,H.jsx)(Bi,{state:i,number:2,title:t(e?`guide.waitingForServer`:`guide.pasteAndRun`),description:e?void 0:t(`guide.pasteAndRunDescription`),children:e&&(0,H.jsx)(Vi,{})}),(0,H.jsx)(Bi,{state:`waiting`,number:3,title:t(`guide.autoConnects`),description:t(`guide.autoConnectsDescription`)})]}),(0,H.jsxs)(`div`,{className:`mt-6 flex items-center justify-center gap-1.5 border-t border-border-subtle pt-5 text-xs text-text-muted`,children:[(0,H.jsx)(gi,{className:`h-3 w-3 shrink-0`}),(0,H.jsxs)(`span`,{children:[t(`guide.requires`),` `,(0,H.jsxs)(`a`,{href:`https://nodejs.org`,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent transition-colors hover:text-accent/80 hover:underline`,children:[`Node.js `,E,`+`]})]}),(0,H.jsx)(`span`,{className:`mx-1 text-border-default`,children:`·`}),(0,H.jsx)(Ti,{className:`h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:t(`guide.port`)})]})]})};function Ui(e,t,n){return n(`common:analyzePhases.${e}`,{defaultValue:``})||t||e}function Wi(e,t){if(!e)return``;let n=Gi[e];return n?t(n):e}var Gi={"Connecting...":`common:progress.connectingShort`,"Connecting to server...":`common:progress.connecting`,"Validating server":`common:progress.validatingServer`,"Validating server...":`common:progress.validatingServerEllipsis`,"Downloading graph...":`common:progress.downloadingGraph`,"Extracting file contents":`common:progress.extractingFileContents`,"Processing...":`common:progress.processing`,"Processing graph...":`common:progress.processingGraph`,"Loading graph...":`common:progress.loadingGraph`,Queued:`common:analyzePhases.queued`,"Starting...":`common:progress.starting`},Ki=({progress:e,onCancel:t})=>{let{t:n}=f(`common`),[r]=(0,R.useState)(()=>Date.now()),[i,a]=(0,R.useState)(0);(0,R.useEffect)(()=>{let e=setInterval(()=>a(Date.now()-r),1e3);return()=>clearInterval(e)},[r]);let o=e=>{let t=Math.floor(e/1e3);return t<60?n(`units.elapsedSeconds`,{seconds:t}):n(`units.elapsedMinutesSeconds`,{minutes:Math.floor(t/60),seconds:t%60})},s=Ui(e.phase,e.message,n),c=Math.max(0,Math.min(100,e.percent));return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,H.jsx)(`span`,{className:`font-medium text-text-secondary`,children:s}),(0,H.jsx)(`span`,{className:`font-mono text-xs text-text-muted`,children:o(i)})]}),(0,H.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300 ease-out`,style:{width:`${c}%`}})}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`span`,{className:`font-mono text-xs text-text-muted`,children:[c,`%`]}),(0,H.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 rounded-lg bg-red-500/10 px-3 py-1.5 text-xs text-red-400 transition-all duration-200 hover:bg-red-500/20`,children:[(0,H.jsx)(ji,{className:`h-3.5 w-3.5`}),n(`actions.cancel`)]})]})]})},qi=new Set([`.git`,`.hg`,`.svn`,`node_modules`,`vendor`,`.venv`,`__pycache__`,`target`,`dist`,`build`,`out`,`.next`,`_next`,`.nuxt`,`.cache`,`coverage`,`.idea`,`.gitnexus`]);function Ji(e){let t=[],n=[],r=0,i=0;for(let a=0;a<e.length;a++){let o=e[a],s=o.webkitRelativePath&&o.webkitRelativePath.length>0?o.webkitRelativePath:o.name;if(s.split(`/`).some(e=>qi.has(e))){r++;continue}if(o.size>26214400){r++;continue}t.push(o),n.push(s),i+=o.size}return{files:t,manifest:n,droppedCount:r,totalBytes:i}}function Yi(e,t){if(e instanceof ze){let n=e.retryAfterMs?Math.ceil(e.retryAfterMs/1e3):void 0,r=e.message||t(`errors:unknown`);switch(e.code){case`network`:return t(`errors:backend.network`,{defaultValue:r});case`timeout`:return t(`errors:backend.timeout`,{defaultValue:r});case`rate_limited`:return t(`errors:backend.rateLimited`,{seconds:n,defaultValue:r});case`not_found`:return t(`errors:backend.notFound`,{defaultValue:r});case`unauthorized`:return t(`errors:backend.unauthorized`,{defaultValue:r});case`origin_blocked`:return t(`errors:backend.originBlocked`,{defaultValue:r});case`client`:return t(`errors:backend.client`,{message:e.message,defaultValue:r});case`server`:return t(`errors:backend.server`,{message:e.message,defaultValue:r});default:return r}}return e instanceof Error?e.message:t(`errors:unknown`)}var Xi=/^https?:\/\/(www\.)?github\.com\/[^/\s]+\/[^/\s]+/i,Zi=/^https?:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+(\/.*)?$/i,Qi=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+_git\/[^/\s]+/i,$i=navigator.userAgent.toLowerCase().includes(`win`);function ea(e){return Xi.test(e.trim())}function ta(e){return Zi.test(e.trim())}function na(e){return Qi.test(e.trim())}function ra({mode:e,onChange:t}){let{t:n}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex gap-1 rounded-lg bg-elevated p-1`,role:`tablist`,"aria-label":n(`repoAnalyzer.inputType`),children:[(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`github`,onClick:()=>t(`github`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`github`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(p,{className:`h-3 w-3`}),n(`repoAnalyzer.githubUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`gitlab`,onClick:()=>t(`gitlab`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`gitlab`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(g,{className:`h-3 w-3`}),n(`repoAnalyzer.gitlabUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`azure`,onClick:()=>t(`azure`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`azure`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(i,{className:`h-3 w-3`}),n(`repoAnalyzer.azureDevOpsUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`local`,onClick:()=>t(`local`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`local`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(Ur,{className:`h-3 w-3`}),n(`repoAnalyzer.localFolder`)]})]})}function ia({canSubmit:e,isLoading:t,onClick:n,variant:r}){let{t:i}=f(`onboarding`);return(0,H.jsxs)(`button`,{onClick:n,disabled:!e||t,className:` ${r===`onboarding`?`w-full px-5 py-3.5 text-sm`:`w-full px-4 py-3 text-sm`} flex items-center justify-center gap-2.5 rounded-xl font-medium transition-all duration-200 ${e&&!t?`cursor-pointer bg-accent text-white shadow-glow-soft hover:-translate-y-0.5 hover:bg-accent/90 hover:shadow-glow`:`cursor-not-allowed border border-border-subtle bg-elevated text-text-muted`} `,children:[t?(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin`}):(0,H.jsx)(bi,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:i(t?`repoAnalyzer.starting`:`repoAnalyzer.analyzeRepository`)}),e&&!t&&(0,H.jsx)(Or,{className:`h-3.5 w-3.5`})]})}function aa({repoName:e}){let{t}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex animate-fade-in flex-col items-center gap-3 py-4`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-xl border border-emerald-500/30 bg-emerald-500/15 shadow-[0_0_20px_rgba(16,185,129,0.15)]`,children:(0,H.jsx)(Nr,{className:`h-6 w-6 text-emerald-400`})}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-emerald-400`,children:t(`repoAnalyzer.complete`)}),(0,H.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-text-muted`,children:e})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-secondary`,children:t(`repoAnalyzer.loadingGraph`)})]})}var oa=({variant:e,onComplete:t,onCancel:n})=>{let{t:r}=f([`common`,`errors`,`onboarding`]),a=(0,R.useId)(),[o,s]=(0,R.useState)(`github`),[c,l]=(0,R.useState)(!1),[u,d]=(0,R.useState)(null),[m,h]=(0,R.useState)(``),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(``),[x,S]=(0,R.useState)(``),[C,w]=(0,R.useState)(``),[T,E]=(0,R.useState)(`input`),[D,O]=(0,R.useState)(null),[k,A]=(0,R.useState)({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),[j,M]=(0,R.useState)(``),N=(0,R.useRef)(null),P=(0,R.useRef)(null),F=(0,R.useRef)(null),I=(0,R.useRef)(null),L=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>{P.current?.abort(),F.current?.abort(),I.current&&clearTimeout(I.current)},[]);let ee=()=>{F.current?.abort(),F.current=null},te=()=>{ee();let e=new AbortController;return F.current=e,e},ne=e=>{yt(e).catch(()=>{})},z=e=>{e!==o&&(ee(),s(e),h(``),v(``),b(``),S(``),w(``),O(null),d(null),l(!1),E(`input`))},B=o===`github`?ea(m)&&(T===`input`||T===`error`):o===`gitlab`?ta(y)&&(T===`input`||T===`error`):o===`azure`?na(x)&&(T===`input`||T===`error`):C.trim().length>1&&(T===`input`||T===`error`),re=async()=>{if(o===`github`&&!ea(m)){O(r(`errors:invalidGithubUrl`));return}if(o===`gitlab`&&!ta(y)){O(`Please enter a valid GitLab repository URL.`);return}if(o===`azure`&&!na(x)){O(r(`errors:invalidAzureDevOpsUrl`));return}if(o===`local`&&C.trim().length<2){O(r(`errors:missingFolderPath`));return}O(null),E(`starting`);let e=te();try{let{jobId:t}=await vt(o===`github`?{url:m.trim(),..._.trim()?{token:_.trim()}:{}}:o===`gitlab`?{url:y.trim()}:o===`azure`?{url:x.trim()}:{path:C.trim()});if(e.signal.aborted)return;let n=o===`github`?m.trim():o===`gitlab`?y.trim():o===`azure`?x.trim():C.trim();ie(t,n)}catch(t){if(e.signal.aborted)return;O(Yi(t,r)),E(`error`)}},ie=(e,n)=>{N.current=e,E(`analyzing`);let i=bt(e,e=>A(e),e=>{let i=e.repoName??(n?n.split(/[/\\]/).filter(Boolean).at(-1):void 0)??r(`onboarding:repoAnalyzer.defaultRepoName`),a=e.repoPath??i;M(i),v(``),E(`done`),P.current=null,I.current=setTimeout(()=>{I.current=null,t(a)},1200)},e=>{O(e||r(`errors:analysisFailed`)),E(`error`)});P.current=i},ae=async e=>{if(c||se)return;let{files:t,manifest:n,droppedCount:i}=Ji(e);if(t.length===0){O(r(`onboarding:repoAnalyzer.upload.empty`));return}O(null),d({count:t.length,dropped:i}),l(!0),E(`starting`);let a=n[0]?.split(`/`)[0]??null,o=te();try{let{jobId:e}=await _t(t,n,o.signal);if(o.signal.aborted){ne(e);return}l(!1),ie(e,a)}catch(e){if(o.signal.aborted)return;l(!1),O(Yi(e,r)),E(`error`)}},oe=async()=>{if(P.current?.abort(),P.current=null,ee(),N.current){try{await yt(N.current)}catch{}N.current=null}v(``),E(`input`),A({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),l(!1),d(null)},se=T===`starting`,ce=T!==`analyzing`&&T!==`done`,le=$i;return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[ce&&(0,H.jsx)(ra,{mode:o,onChange:z}),ce&&o===`github`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:ea(m)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(p,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:m,onChange:e=>{h(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`https://github.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),m.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:ea(m)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsxs)(`div`,{className:`space-y-1.5 pt-1`,children:[(0,H.jsx)(`label`,{htmlFor:`${a}-token`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubTokenLabel`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-border-default bg-void px-4 py-3 transition-all duration-200 focus-within:border-accent/40`,children:[(0,H.jsx)(Zr,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:`${a}-token`,type:`password`,value:_,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:r(`onboarding:repoAnalyzer.githubTokenPlaceholder`),autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.githubTokenHelp`)})]})]}),ce&&o===`gitlab`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.gitlabRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:ta(y)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(g,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:y,onChange:e=>{b(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`https://gitlab.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),y.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:ta(y)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.gitlabSupported`)})]}),ce&&o===`azure`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.azureDevOpsRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:na(x)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(i,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:x,onChange:e=>{S(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`http://azuredevops.example.com/Collection/Project/_git/Repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),x.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:na(x)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.azureDevOpsSupported`)})]}),ce&&o===`local`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:`${a}-local`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.localFolderPath`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:C.trim().length>1?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(Ur,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:`${a}-local`,type:`text`,value:C,onChange:e=>{w(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:le?`C:\\Users\\you\\project`:`/home/you/project`,autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),C.trim().length>1&&(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 shrink-0 text-emerald-400`})]}),(0,H.jsx)(`input`,{ref:L,type:`file`,webkitdirectory:``,multiple:!0,className:`hidden`,"data-testid":`folder-upload-input`,onChange:e=>{e.target.files&&e.target.files.length>0&&ae(e.target.files),e.target.value=``}}),(0,H.jsxs)(`button`,{type:`button`,"data-testid":`upload-folder`,onClick:()=>L.current?.click(),disabled:se,className:`flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg border border-border-subtle bg-elevated px-3 py-2 text-xs font-medium text-text-secondary transition-all duration-150 hover:bg-hover hover:text-text-primary disabled:opacity-50`,children:[(0,H.jsx)(Ur,{className:`h-3.5 w-3.5`}),r(`onboarding:repoAnalyzer.upload.button`)]}),c&&(0,H.jsxs)(`div`,{role:`status`,"aria-busy":`true`,"data-testid":`upload-progress`,className:`space-y-1`,children:[(0,H.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full w-1/3 animate-pulse rounded-full bg-accent`})}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.upload.uploading`)})]}),u&&!c&&T!==`error`&&(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,"data-testid":`upload-summary`,children:r(`onboarding:repoAnalyzer.upload.selected`,{fileCount:u.count,dropped:u.dropped})})]}),(T===`error`||T===`input`&&D)&&D&&(0,H.jsxs)(`p`,{className:`flex animate-fade-in items-center gap-1.5 text-xs text-red-400`,children:[(0,H.jsx)(Lr,{className:`h-3 w-3 shrink-0`}),D]}),T===`analyzing`&&(0,H.jsx)(`div`,{className:`animate-slide-up`,children:(0,H.jsx)(Ki,{progress:k,onCancel:oe})}),T===`done`&&(0,H.jsx)(aa,{repoName:j}),(T===`input`||T===`starting`)&&(0,H.jsx)(ia,{canSubmit:B,isLoading:se,onClick:re,variant:e}),T===`error`&&(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`button`,{onClick:()=>{O(null),E(`input`)},className:`flex-1 cursor-pointer rounded-xl border border-border-subtle bg-elevated px-4 py-2.5 text-sm text-text-secondary transition-all duration-200 hover:bg-hover hover:text-text-primary`,children:r(`common:actions.tryAgain`)}),n&&(0,H.jsx)(`button`,{onClick:n,className:`cursor-pointer px-4 py-2.5 text-sm text-text-muted transition-colors hover:text-text-secondary`,children:r(`common:actions.dismiss`)})]}),T===`analyzing`&&e===`sheet`&&n&&(0,H.jsx)(`button`,{onClick:n,className:`w-full cursor-pointer py-1 text-xs text-text-muted transition-colors hover:text-text-secondary`,children:r(`onboarding:repoAnalyzer.hideBackground`)})]})},sa=({onComplete:e})=>{let{t}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`div`,{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,H.jsx)(Kr,{className:`h-7 w-7 text-accent`})}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`analyzeFirst.title`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`analyzeFirst.description`)})]})}),(0,H.jsx)(`div`,{className:`relative`,children:(0,H.jsx)(oa,{variant:`onboarding`,onComplete:e})}),(0,H.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:t(`analyzeFirst.footer`)})]})};function ca(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/6e4);if(i<1)return t(`onboarding:landing.time.justNow`);if(i<60)return t(`onboarding:landing.time.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`onboarding:landing.time.hoursAgo`,{count:a});let o=Math.floor(a/24);return o<30?t(`onboarding:landing.time.daysAgo`,{count:o}):n.toLocaleDateString()}function la({repo:e,onClick:t}){let{t:n}=f([`common`,`onboarding`]),r=e.stats;return(0,H.jsxs)(`button`,{onClick:t,"data-testid":`landing-repo-card`,className:`group w-full cursor-pointer rounded-xl border border-border-default bg-elevated p-4 text-left transition-all duration-200 hover:border-accent/40 hover:bg-hover hover:shadow-glow-soft`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Kr,{className:`h-4 w-4 shrink-0 text-accent`}),(0,H.jsx)(`h3`,{className:`truncate text-sm font-semibold text-text-primary transition-colors group-hover:text-accent`,children:e.name})]}),e.indexedAt&&(0,H.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-text-muted`,children:n(`onboarding:landing.indexed`,{time:ca(e.indexedAt,n)})})]}),(0,H.jsx)(Or,{className:`h-4 w-4 shrink-0 text-text-muted opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:text-accent group-hover:opacity-100`})]}),r&&(r.files||r.nodes)&&(0,H.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 pl-6`,children:[r.files!=null&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(Hr,{className:`h-3 w-3`}),` `,n(`common:counts.files`,{count:r.files})]}),r.nodes!=null&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(Qr,{className:`h-3 w-3`}),` `,n(`common:counts.symbols`,{count:r.nodes})]}),r.processes!=null&&r.processes>0&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(bi,{className:`h-3 w-3`}),` `,n(`common:counts.flows`,{count:r.processes})]})]})]})}var ua=({repos:e,onSelectRepo:t,onAnalyzeComplete:n})=>{let{t:r}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:r(`landing.chooseRepository`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:r(`landing.description`)})]})}),(0,H.jsx)(`div`,{className:`relative mb-5 space-y-2`,children:e.map(e=>(0,H.jsx)(la,{repo:e,onClick:()=>t(Re(e))},Re(e)))}),(0,H.jsxs)(`div`,{className:`mb-5 flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,H.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:r(`landing.orAnalyzeNew`)}),(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,H.jsx)(`div`,{className:`relative`,children:(0,H.jsx)(oa,{variant:`onboarding`,onComplete:n})}),(0,H.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:r(`landing.footer`)})]})};function da({activeKey:e,children:t}){let[n,r]=(0,R.useState)(e),[i,a]=(0,R.useState)(!1),o=(0,R.useRef)(t),s=(0,R.useRef)(null);return!i&&e===n&&(o.current=t),(0,R.useEffect)(()=>(e!==n&&(a(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,r(e),a(!1)},300)),()=>{s.current&&clearTimeout(s.current)}),[e,n]),(0,H.jsx)(`div`,{className:`transition-[opacity,transform] duration-300 ease-out`,style:{opacity:+!i,transform:i?`scale(0.97) translateY(8px)`:`scale(1) translateY(0)`},children:i?o.current:t})}function fa(){let{t:e}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-emerald-500/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-emerald-500/8 blur-3xl`}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-emerald-600/10 shadow-[0_0_30px_rgba(16,185,129,0.15)]`,children:(0,H.jsx)(Nr,{className:`h-8 w-8 text-emerald-400`})}),(0,H.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-emerald-400`,children:e(`success.title`)}),(0,H.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:e(`success.description`)}),(0,H.jsx)(`div`,{className:`mt-6 flex items-center justify-center gap-2`,children:(0,H.jsx)(`div`,{className:`flex gap-1`,children:[0,1,2].map(e=>(0,H.jsx)(`div`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400/60`,style:{animationDelay:`${e*200}ms`}},e))})})]})]})}function pa({message:e}){let{t}=f([`common`,`onboarding`]);return(0,H.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-accent/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-accent/8 blur-3xl`}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,H.jsx)(ni,{className:`h-8 w-8 animate-spin text-accent`})}),(0,H.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-text-primary`,children:e||t(`common:progress.connectingShort`)}),(0,H.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:t(`onboarding:loading.largeRepoHint`)}),(0,H.jsx)(`div`,{className:`mt-5 flex items-center justify-center`,children:(0,H.jsx)(bi,{className:`h-4 w-4 text-accent/30`})})]})]})}var ma=({onServerConnect:e})=>{let{t}=f([`common`,`errors`]),[n,r]=(0,R.useState)(null),{isConnected:i,isProbing:a,isUnauthorized:o,startPolling:s,stopPolling:c,isPolling:l,backendUrl:u}=Pi(),[d,p]=(0,R.useState)(!1),m=(0,R.useRef)(!1),h=(0,R.useRef)(null),[g,_]=(0,R.useState)(`onboarding`),[v,y]=(0,R.useState)(``),b=(0,R.useRef)(null),[x,S]=(0,R.useState)([]),C=async()=>{_(`loading`),y(t(`common:progress.connectingShort`)),r(null);try{let e=await ct();if(e.length===0){_(`analyze`),m.current=!1;return}S(e),_(`landing`)}catch(e){if(e.name===`AbortError`)return;r(Yi(e,t)),_(`onboarding`)}},w=(0,R.useRef)(C);w.current=C;let T=n=>{m.current=!0,_(`loading`),y(t(`common:progress.loadingGraph`)),r(null),(async()=>{let i=new AbortController;b.current=i;try{let r=await Ct(u,(e,n,r)=>{if(e===`validating`)y(t(`common:progress.validatingServerEllipsis`));else if(e===`downloading`){let e=r?Math.round(n/r*100):null,i=(n/(1024*1024)).toFixed(1);y(e?t(`common:progress.downloadingWithPercent`,{percent:e}):t(`common:progress.downloadingMb`,{mb:i}))}else e===`extracting`&&y(t(`common:progress.processingGraph`))},i.signal,n);e&&await e(r,u)}catch(e){if(e.name===`AbortError`)return;r(Yi(e,t)),_(x.length>0?`landing`:`analyze`)}finally{b.current=null}})()};(0,R.useEffect)(()=>{!a&&!d&&p(!0)},[a,d]),(0,R.useEffect)(()=>{d&&!i&&!l&&!m.current&&s()},[d,i,l,s]),(0,R.useEffect)(()=>{i&&!m.current&&(m.current=!0,c(),_(`success`),h.current=setTimeout(()=>{h.current=null,w.current()},1200)),!i&&m.current&&!a&&(m.current=!1,h.current!==null&&(clearTimeout(h.current),h.current=null),_(`onboarding`),r(null))},[i,a,c]),(0,R.useEffect)(()=>()=>{h.current!==null&&clearTimeout(h.current),b.current?.abort()},[]);let E=d?g:null;return(0,H.jsxs)(`div`,{className:`flex min-h-screen items-center justify-center bg-void p-8`,children:[(0,H.jsxs)(`div`,{className:`pointer-events-none fixed inset-0`,children:[(0,H.jsx)(`div`,{className:`absolute top-1/4 left-1/4 h-96 w-96 rounded-full bg-accent/10 blur-3xl`}),(0,H.jsx)(`div`,{className:`absolute right-1/4 bottom-1/4 h-96 w-96 rounded-full bg-node-interface/10 blur-3xl`})]}),(0,H.jsxs)(`div`,{className:`relative w-full max-w-lg`,children:[n&&(0,H.jsx)(`div`,{className:`mb-4 animate-fade-in rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-center text-sm text-red-400`,children:n}),o&&!i&&(0,H.jsx)(Ii,{onSubmit:()=>{l||s()}}),!o&&E&&(0,H.jsxs)(da,{activeKey:E,children:[E===`onboarding`&&(0,H.jsx)(Hi,{isPolling:l}),E===`analyze`&&(0,H.jsx)(sa,{onComplete:T}),E===`landing`&&(0,H.jsx)(ua,{repos:x,onSelectRepo:T,onAnalyzeComplete:T}),E===`success`&&(0,H.jsx)(fa,{}),E===`loading`&&(0,H.jsx)(pa,{message:v})]})]})]})},ha=({progress:e})=>{let{t}=f([`common`,`graph`]),n=Wi(e.message,t),r=Wi(e.detail,t);return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center bg-void`,children:[(0,H.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,children:[(0,H.jsx)(`div`,{className:`absolute top-1/3 left-1/3 h-96 w-96 animate-pulse rounded-full bg-accent/10 blur-3xl`}),(0,H.jsx)(`div`,{className:`absolute right-1/3 bottom-1/3 h-96 w-96 animate-pulse rounded-full bg-node-interface/10 blur-3xl`})]}),(0,H.jsxs)(`div`,{className:`relative mb-10`,children:[(0,H.jsx)(`div`,{className:`h-28 w-28 animate-pulse-glow rounded-full bg-gradient-to-br from-accent to-node-interface`}),(0,H.jsx)(`div`,{className:`absolute inset-0 h-28 w-28 rounded-full bg-gradient-to-br from-accent to-node-interface opacity-50 blur-xl`})]}),(0,H.jsx)(`div`,{className:`mb-4 w-80`,children:(0,H.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300 ease-out`,style:{width:`${e.percent}%`}})})}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`p`,{className:`mb-1 font-mono text-sm text-text-secondary`,children:[n,(0,H.jsx)(`span`,{className:`animate-pulse`,children:`|`})]}),e.detail&&(0,H.jsx)(`p`,{className:`max-w-md truncate font-mono text-xs text-text-muted`,children:r})]}),e.stats&&(0,H.jsxs)(`div`,{className:`mt-8 flex items-center gap-6 text-xs text-text-muted`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-file`}),(0,H.jsx)(`span`,{children:t(`graph:loading.filesProgress`,{processed:e.stats.filesProcessed,total:e.stats.totalFiles})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-function`}),(0,H.jsx)(`span`,{children:t(`common:counts.nodes`,{count:e.stats.nodesCreated})})]})]}),(0,H.jsxs)(`p`,{className:`mt-4 font-mono text-3xl font-semibold text-text-primary`,children:[e.percent,`%`]})]})},ga=({isOpen:e,onClose:t,onUseCPU:n,onSkip:r,nodeCount:i})=>{let{t:a}=f(`graph`),[o,s]=(0,R.useState)(!0),[c,l]=(0,R.useState)(!1);if((0,R.useEffect)(()=>{e?requestAnimationFrame(()=>l(!0)):l(!1)},[e]),!e)return null;let u=Math.ceil(i*50/6e4),d=i<200;return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-200 ${c?`opacity-100`:`opacity-0`}`,onClick:t}),(0,H.jsxs)(`div`,{className:`relative mx-4 w-full max-w-md overflow-hidden rounded-2xl border border-border-subtle bg-surface shadow-2xl transition-all duration-200 ${c?`scale-100 opacity-100`:`scale-95 opacity-0`}`,children:[(0,H.jsxs)(`div`,{className:`relative border-b border-border-subtle bg-gradient-to-r from-amber-500/20 to-orange-500/20 px-6 py-5`,children:[(0,H.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1 text-text-muted transition-colors hover:text-text-primary`,children:(0,H.jsx)(ji,{className:`h-5 w-5`})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsx)(`div`,{className:`text-5xl ${o?`animate-bounce`:``}`,onAnimationEnd:()=>s(!1),onClick:()=>s(!0),children:`🤔`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold text-text-primary`,children:a(`embedding.fallback.title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-sm text-text-muted`,children:a(`embedding.fallback.subtitle`)})]})]})]}),(0,H.jsxs)(`div`,{className:`space-y-4 px-6 py-5`,children:[(0,H.jsx)(`p`,{className:`text-sm leading-relaxed text-text-secondary`,children:a(`embedding.fallback.description`)}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-border-subtle bg-elevated/50 p-4`,children:[(0,H.jsx)(`p`,{className:`text-sm text-text-secondary`,children:(0,H.jsx)(`span`,{className:`font-medium text-text-primary`,children:a(`embedding.fallback.options`)})}),(0,H.jsxs)(`ul`,{className:`mt-2 space-y-1.5 text-sm text-text-muted`,children:[(0,H.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(yi,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-amber-400`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.useCpu`)}),` `,`—`,` `,a(d?`embedding.fallback.useCpuDescriptionSmall`:`embedding.fallback.useCpuDescriptionLarge`),i>0&&(0,H.jsxs)(`span`,{className:`text-text-muted`,children:[` `,a(`embedding.fallback.estimated`,{minutes:u,count:i})]})]})]}),(0,H.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(vi,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-blue-400`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.skipIt`)}),` `,`— `,a(`embedding.fallback.skipDescription`)]})]})]})]}),d&&(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 rounded-lg bg-node-function/10 px-3 py-2 text-xs text-node-function`,children:[(0,H.jsx)(fi,{className:`h-3.5 w-3.5`}),a(`embedding.fallback.smallCodebase`)]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:a(`embedding.fallback.tip`)})]}),(0,H.jsxs)(`div`,{className:`flex gap-3 border-t border-border-subtle bg-elevated/30 px-6 py-4`,children:[(0,H.jsxs)(`button`,{onClick:r,className:`flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface px-4 py-2.5 text-sm font-medium text-text-secondary transition-all hover:bg-hover hover:text-text-primary`,children:[(0,H.jsx)(vi,{className:`h-4 w-4`}),a(`embedding.fallback.skipEmbeddings`)]}),(0,H.jsxs)(`button`,{onClick:n,className:`flex flex-1 items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-all ${d?`bg-node-function text-white hover:bg-node-function/90`:`border border-amber-500/30 bg-amber-500/20 text-amber-300 hover:bg-amber-500/30`}`,children:[(0,H.jsx)(yi,{className:`h-4 w-4`}),a(d?`embedding.fallback.useCpuRecommended`:`embedding.fallback.useCpuSlow`)]})]})]})]})},_a=()=>{let{t:e}=f(`graph`),{embeddingStatus:t,embeddingProgress:n,startEmbeddings:r,graph:i,viewMode:a,serverBaseUrl:o}=Er(),[s,c]=(0,R.useState)(!1);if(a!==`exploring`||!i||o)return null;let l=i.nodes.length,u=async e=>{try{await r()}catch(e){e?.name===`WebGPUNotAvailableError`||e?.message?.includes(`WebGPU not available`)?c(!0):console.error(`Embedding failed:`,e)}},d=(0,H.jsx)(ga,{isOpen:s,onClose:()=>c(!1),onUseCPU:()=>{c(!1),u(`wasm`)},onSkip:()=>{c(!1)},nodeCount:l});if(t===`idle`)return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsxs)(`button`,{onClick:()=>u(),className:`group flex items-center gap-2 rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-sm text-text-secondary transition-all hover:border-accent/50 hover:bg-hover hover:text-text-primary`,title:e(`embedding.generateTitle`),children:[(0,H.jsx)(Mr,{className:`h-4 w-4 text-node-interface transition-colors group-hover:text-accent`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`embedding.enable`)}),(0,H.jsx)(Mi,{className:`h-3 w-3 text-text-muted`})]})}),d]});if(t===`loading`){let t=n?.percent??0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-accent/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-accent`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.loadingModel`)}),(0,H.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300`,style:{width:`${t}%`}})})]})]}),d]})}if(t===`embedding`){let t=n?.percent??0;return(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-node-function/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-node-function`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.embeddingNodes`,{processed:0,total:0})}),(0,H.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-node-function to-accent transition-all duration-300`,style:{width:`${t}%`}})})]})]})}return t===`indexing`?(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-interface/30 bg-surface px-3 py-1.5 text-sm text-text-secondary`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-node-interface`}),(0,H.jsx)(`span`,{className:`text-xs`,children:e(`embedding.creatingIndex`)})]}):t===`ready`?(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-function/30 bg-node-function/10 px-3 py-1.5 text-sm text-node-function`,title:e(`embedding.readyTitle`),children:[(0,H.jsx)(Nr,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`text-xs font-medium`,children:e(`embedding.ready`)})]}):t===`error`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{onClick:()=>u(),className:`flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-1.5 text-sm text-red-400 transition-colors hover:bg-red-500/20`,title:e(`embedding.errorTitle`),children:[(0,H.jsx)(Lr,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`text-xs`,children:e(`embedding.failedRetry`)})]}),d]}):null},va=()=>{let{t:e,i18n:t}=f(`header`),n=t.resolvedLanguage||t.language,r=Gn.find(e=>e.code.toLowerCase()===n.toLowerCase())??Gn[0],i=e=>{t.changeLanguage(e)};return(0,H.jsxs)(`label`,{className:`flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-surface px-2 text-text-secondary transition-colors hover:border-border-default hover:bg-hover hover:text-text-primary`,title:e(`selectLanguage`),children:[(0,H.jsx)(qr,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:e(`language`)}),(0,H.jsx)(`select`,{"data-testid":`language-switcher`,value:r.code,"aria-label":e(`selectLanguage`),onChange:e=>i(e.target.value),className:`cursor-pointer border-none bg-transparent text-xs font-medium outline-none`,children:Gn.map(e=>(0,H.jsx)(`option`,{value:e.code,className:`bg-surface text-text-primary`,children:e.nativeName},e.code))})]})},ya={Folder:`#6366f1`,File:`#3b82f6`,Function:`#10b981`,Class:`#f59e0b`,Method:`#14b8a6`,Interface:`#ec4899`,Variable:`#64748b`,Import:`#475569`,Type:`#a78bfa`},ba=({onFocusNode:e,availableRepos:t=[],onSwitchRepo:n,onAnalyzeComplete:r,onReposChanged:i})=>{let{t:a}=f([`common`,`header`,`errors`]),{projectName:o,currentRepo:s,graph:c,graphMode:l,openChatPanel:u,isRightPanelOpen:d,rightPanelTab:m,setSettingsPanelOpen:h,setHelpDialogBoxOpen:g}=Er(),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(``),[x,S]=(0,R.useState)(!1),[C,w]=(0,R.useState)(!1),[T,E]=(0,R.useState)(null),[D,O]=(0,R.useState)(null),[k,A]=(0,R.useState)(null),j=(0,R.useRef)(null),M=(0,R.useRef)(null),[N,P]=(0,R.useState)(!1),[F,I]=(0,R.useState)(0),L=(0,R.useRef)(null),ee=(0,R.useRef)(null),te=c?.nodes.length??0,ne=c?.relationships.length??0,z=(0,R.useMemo)(()=>{if(!c||!_.trim())return[];let e=_.toLowerCase();return c.nodes.filter(t=>t.properties.name.toLowerCase().includes(e)).slice(0,10)},[c,_]),B=(0,R.useMemo)(()=>{let e=y.trim().toLowerCase();return e?t.filter(t=>t.name.toLowerCase().includes(e)):t},[t,y]),re=s??o;(0,R.useEffect)(()=>{let e=e=>{L.current&&!L.current.contains(e.target)&&P(!1),M.current&&!M.current.contains(e.target)&&(S(!1),w(!1),b(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,R.useEffect)(()=>()=>{j.current?.abort()},[]),(0,R.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),ee.current?.focus(),P(!0)),e.key===`Escape`&&(P(!1),ee.current?.blur())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let ie=e=>{if(!(!N||z.length===0)){if(e.key===`ArrowDown`)e.preventDefault(),I(e=>Math.min(e+1,z.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),I(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=z[F];t&&ae(t)}}},ae=t=>{e?.(t.id),v(``),P(!1),I(0)};return(0,H.jsxs)(`header`,{className:`flex items-center justify-between border-b border-dashed border-border-subtle bg-deep px-5 py-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-gradient-to-br from-accent to-node-interface text-sm font-bold text-white shadow-glow`,children:`◇`}),(0,H.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`GitNexus`})]}),o&&(0,H.jsxs)(`div`,{className:`relative`,ref:M,children:[(0,H.jsxs)(`button`,{"data-testid":`repo-switcher-trigger`,onClick:()=>{let e=!x;S(e),w(!1),e||b(``)},className:`flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-1.5 text-sm transition-all ${x?`border-accent/40 bg-accent/10 text-text-primary`:`border-border-subtle bg-surface text-text-secondary hover:border-border-default hover:bg-hover`} `,children:[(0,H.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-node-function`}),(0,H.jsx)(`span`,{className:`max-w-[160px] truncate`,children:o}),(0,H.jsx)(Pr,{className:`h-3 w-3 text-text-muted transition-transform duration-200 ${x?`rotate-180`:``}`})]}),x&&(0,H.jsx)(`div`,{className:`absolute top-full left-0 z-50 mt-1.5 flex max-h-[calc(100vh-4.5rem)] w-80 animate-slide-up flex-col overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:C?(0,H.jsx)(`div`,{className:`scrollbar-thin overflow-y-auto p-4`,children:(0,H.jsx)(oa,{variant:`sheet`,onComplete:e=>{w(!1),S(!1),b(``),r?.(e)},onCancel:()=>w(!1)})}):(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[t.length>0&&(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,H.jsx)(`div`,{className:`shrink-0 px-3 pt-2.5 pb-1.5 text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:a(`header:repositories`)}),(0,H.jsx)(`div`,{className:`shrink-0 px-3 pb-2`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border-subtle bg-deep/70 px-2.5 py-1.5 transition-colors focus-within:border-accent/60`,children:[(0,H.jsx)(mi,{className:`h-3.5 w-3.5 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{type:`text`,"aria-label":a(`header:searchRepositories`),placeholder:a(`header:searchRepositories`),value:y,onChange:e=>b(e.target.value),className:`min-w-0 flex-1 border-none bg-transparent text-xs text-text-primary outline-none placeholder:text-text-muted`})]})}),(0,H.jsx)(`div`,{className:`scrollbar-thin min-h-0 flex-1 overflow-y-auto pb-1`,children:B.length===0?(0,H.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noRepositoriesFound`,{query:y})}):B.map(e=>{let t=Re(e),o=t===re;return(0,H.jsxs)(`div`,{"data-testid":`repo-switcher-row`,"data-active":o,className:`group flex items-center gap-2 px-4 py-2 transition-colors ${o?`border-l-2 border-accent bg-accent/10`:`hover:bg-hover`}`,children:[(0,H.jsxs)(`button`,{onClick:()=>{o||n?.(t),S(!1),b(``)},className:`flex min-w-0 flex-1 cursor-pointer items-center gap-3 text-left`,children:[(0,H.jsx)(Ur,{className:`h-3.5 w-3.5 shrink-0 text-node-folder`}),(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono text-sm text-text-primary`,children:e.name}),o&&(0,H.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-accent`,children:a(`header:active`)})]}),(0,H.jsx)(`button`,{"data-testid":`repo-switcher-reanalyze`,onClick:async n=>{if(n.stopPropagation(),!T){E(t),A({phase:`queued`,percent:0,message:a(`common:progress.starting`)});try{let{jobId:n}=await vt({path:e.path,force:!0});j.current=bt(n,e=>A(e),()=>{E(null),A(null),j.current=null,r?.(t)},e=>{console.error(`Re-analyze failed:`,e),E(null),A(null),j.current=null})}catch(e){console.error(`Failed to start re-analysis:`,e),E(null),A(null)}}},disabled:!!T,className:`cursor-pointer rounded p-1 transition-all ${T===t?`text-accent`:`text-text-muted/0 group-hover:text-text-muted hover:!text-accent`}`,title:T===t?a(`header:reanalyzing`):a(`header:reanalyzeRepo`,{repoName:e.name}),children:(0,H.jsx)(di,{className:`h-3.5 w-3.5 ${T===t?`animate-spin`:``}`})}),(0,H.jsx)(`button`,{"data-testid":`repo-switcher-delete`,onClick:async e=>{e.stopPropagation(),T===t&&(j.current?.abort(),E(null),A(null),j.current=null),O(null);try{await ot(t);let e=await ct();if(i?.(e),o&&e.length>0){let t=new URL(window.location.href);t.searchParams.delete(`repo`),t.searchParams.delete(`project`),window.history.replaceState(null,``,t.toString()),n?.(Re(e[0]))}else if(e.length===0){let e=new URL(window.location.href);e.searchParams.delete(`repo`),e.searchParams.delete(`project`),e.searchParams.delete(`skipGraph`),window.history.replaceState(null,``,e.toString()),window.location.reload()}}catch(e){console.error(`Failed to delete repo:`,e),O(Yi(e,a))}},className:`cursor-pointer rounded p-1 text-text-muted/0 transition-all group-hover:text-text-muted hover:!text-red-400`,title:a(`header:deleteRepo`,{repoName:e.name}),children:(0,H.jsx)(Ei,{className:`h-3.5 w-3.5`})})]},t)})})]}),D&&(0,H.jsx)(`div`,{className:`px-3 py-2 text-xs text-red-400`,role:`alert`,children:D}),T&&k&&(0,H.jsxs)(`div`,{className:`border-t border-border-subtle bg-accent/5 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,H.jsx)(ni,{className:`h-3 w-3 shrink-0 animate-spin text-accent`}),(0,H.jsx)(`span`,{className:`truncate text-xs text-text-secondary`,children:a(`header:reanalyzingRepo`,{repoName:t.find(e=>Re(e)===T)?.name??T.split(/[/\\]/).filter(Boolean).at(-1)??T,message:Wi(k.message,a)})})]}),(0,H.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300`,style:{width:`${Math.max(2,k.percent)}%`}})})]}),(0,H.jsx)(`div`,{className:t.length>0||T?`border-t border-border-subtle`:``,children:(0,H.jsxs)(`button`,{onClick:()=>{b(``),w(!0)},disabled:!!T,className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-hover disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 shrink-0 text-accent`}),(0,H.jsx)(`span`,{className:`text-sm text-text-secondary`,children:a(`header:analyzeNew`)})]})})]})})]})]}),(0,H.jsxs)(`div`,{className:`relative mx-6 max-w-md flex-1`,ref:L,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-border-subtle bg-surface px-3.5 py-2 transition-all focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/20`,children:[(0,H.jsx)(mi,{className:`h-4 w-4 flex-shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{ref:ee,type:`text`,placeholder:a(`header:searchNodes`),value:_,onChange:e=>{v(e.target.value),P(!0),I(0)},onFocus:()=>P(!0),onKeyDown:ie,className:`flex-1 border-none bg-transparent text-sm text-text-primary outline-none placeholder:text-text-muted`}),(0,H.jsx)(`kbd`,{className:`rounded border border-border-subtle bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-text-muted`,children:`⌘K`})]}),N&&_.trim()&&(0,H.jsx)(`div`,{className:`absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:z.length===0?(0,H.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noNodesFound`,{query:_})}):(0,H.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:z.map((e,t)=>(0,H.jsxs)(`button`,{onClick:()=>ae(e),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-2.5 text-left transition-colors ${t===F?`bg-accent/20 text-text-primary`:`text-text-secondary hover:bg-hover`}`,children:[(0,H.jsx)(`span`,{className:`h-2.5 w-2.5 flex-shrink-0 rounded-full`,style:{backgroundColor:ya[e.label]||`#6b7280`}}),(0,H.jsx)(`span`,{className:`flex-1 truncate text-sm font-medium`,children:e.properties.name}),(0,H.jsx)(`span`,{className:`rounded bg-elevated px-2 py-0.5 text-xs text-text-muted`,children:e.label})]},e.id))})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`a`,{href:`https://github.com/abhigyanpatwari/GitNexus`,target:`_blank`,rel:`noopener noreferrer`,className:`group flex items-center gap-2 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 px-3.5 py-2 text-sm font-medium text-white shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:from-purple-500 hover:to-pink-500 hover:shadow-xl`,children:[(0,H.jsx)(p,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:a(`header:starIfCool`)}),(0,H.jsx)(Si,{className:`h-3.5 w-3.5 transition-all group-hover:fill-yellow-300 group-hover:text-yellow-300`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:`✨`})]}),c&&l!==`chatOnly`&&(0,H.jsxs)(`div`,{className:`mr-2 flex items-center gap-4 text-xs text-text-muted`,children:[(0,H.jsx)(`span`,{children:a(`common:counts.nodes`,{count:te})}),(0,H.jsx)(`span`,{children:a(`common:counts.edges`,{count:ne})})]}),(0,H.jsx)(_a,{}),(0,H.jsx)(va,{}),(0,H.jsx)(`button`,{onClick:()=>h(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:a(`header:aiSettings`),children:(0,H.jsx)(_i,{className:`h-4.5 w-4.5`})}),(0,H.jsx)(`button`,{title:a(`header:help`),onClick:()=>g(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:(0,H.jsx)(Rr,{className:`h-4.5 w-4.5`})}),(0,H.jsxs)(`button`,{onClick:u,className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-sm font-medium transition-all ${d&&m===`chat`?`bg-accent text-white shadow-glow`:`bg-gradient-to-r from-accent to-accent-dim text-white shadow-glow hover:-translate-y-0.5 hover:shadow-lg`} `,children:[(0,H.jsx)(bi,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:a(`common:app.nexusAI`)})]})]})]})};function xa(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Sa(e){var t=xa(e,`string`);return typeof t==`symbol`?t:t+``}function Ca(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Sa(r.key),r)}}function Ta(e,t,n){return t&&wa(e.prototype,t),n&&wa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ea(e)}function Da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Da=function(){return!!e})()}function Oa(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ka(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Oa(e)}function Aa(e,t,n){return t=Ea(t),ka(e,Da()?Reflect.construct(t,n||[],Ea(e).constructor):t.apply(e,n))}function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ja(e,t)}function Ma(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}function Na(e){if(Array.isArray(e))return e}function Pa(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e,t){if(e){if(typeof e==`string`)return Fa(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fa(e,t):void 0}}function La(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
14
+ `);Ve(t=>{let n=t.find(e=>e.id===o),r={id:o,role:`assistant`,content:e,historyMessages:u,steps:[...s],toolCalls:[...c],timestamp:n?.timestamp??Date.now()};return n?t.map(e=>e.id===o?r:e):[...t,r]})},f=!1,p=null,m=()=>{f||(f=!0,p=requestAnimationFrame(()=>{f=!1,p=null,d()}))};try{let e=e=>{switch(e.type){case`reasoning`:if(e.reasoning){let t=s[s.length-1];t&&t.type===`reasoning`?s[s.length-1]={...t,content:(t.content||``)+e.reasoning}:s.push({id:`step-${l++}`,type:`reasoning`,content:e.reasoning}),m()}break;case`content`:if(e.content){let t=s[s.length-1];t&&t.type===`content`?s[s.length-1]={...t,content:(t.content||``)+e.content}:s.push({id:`step-${l++}`,type:`content`,content:e.content}),m();let n=s[s.length-1],i=n&&n.type===`content`&&n.content||``,a=new RegExp(or.source,or.flags),o;for(;(o=a.exec(i))!==null;){let e=o[1].trim(),t=o[2]?parseInt(o[2],10):void 0,n=o[3]?parseInt(o[3],10):t,r=et(e);if(!r)continue;let i=t===void 0?void 0:Math.max(0,t-1),a=n===void 0?i:Math.max(0,n-1),s=tt(r);nt({filePath:r,startLine:i,endLine:a,nodeId:s,label:`File`,name:r.split(`/`).pop()??r,source:`ai`})}let c=new RegExp(sr.source,sr.flags),u;for(;(u=c.exec(i))!==null;){let e=u[1],t=u[2].trim();if(!r)continue;let n=r.nodes.find(n=>n.label===e&&n.properties.name===t);if(!n||!n.properties.filePath)continue;let i=et(n.properties.filePath);i&&nt({filePath:i,startLine:n.properties.startLine?n.properties.startLine-1:void 0,endLine:n.properties.endLine?n.properties.endLine-1:void 0,nodeId:n.id,label:n.label,name:n.properties.name,source:`ai`})}}break;case`tool_call`:if(e.toolCall){let t=e.toolCall;c.push(t),s.push({id:`step-${l++}`,type:`tool_call`,toolCall:t}),Ge(e=>[...e,t]),m()}break;case`tool_result`:if(e.toolCall){let t=e.toolCall,n=c.findIndex(e=>e.id===t.id);n<0&&(n=c.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=c.findIndex(e=>e.name===t.name&&!e.result)),n>=0&&c[n].status!==`stopped`&&(c[n]={...c[n],result:t.result,status:`completed`});let i=s.findIndex(e=>e.type===`tool_call`&&e.toolCall&&(e.toolCall.id===t.id||e.toolCall.name===t.name&&e.toolCall.status===`running`));if(i>=0&&s[i].toolCall&&s[i].toolCall.status!==`stopped`&&(s[i]={...s[i],toolCall:{...s[i].toolCall,result:t.result,status:`completed`}}),Ge(e=>{let n=e.findIndex(e=>e.id===t.id);return n<0&&(n=e.findIndex(e=>e.name===t.name&&e.status===`running`)),n<0&&(n=e.findIndex(e=>e.name===t.name&&!e.result)),n>=0?e[n].status===`stopped`?e:e.map((e,r)=>r===n?{...e,result:t.result,status:`completed`}:e):e}),m(),t.result){let e=t.result.match(/\[HIGHLIGHT_NODES:([^\]]+)\]/);if(e){let t=e[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(t.length>0&&r){let e=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of t)if(n.has(i))e.add(i);else{let t=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;t&&e.add(t)}e.size>0&&I(e)}else t.length>0&&I(new Set(t))}let n=t.result.match(/\[IMPACT:([^\]]+)\]/);if(n){let e=n[1].split(`,`).map(e=>e.trim()).filter(Boolean);if(e.length>0&&r){let t=new Set,n=new Set(r.nodes.map(e=>e.id));for(let i of e)if(n.has(i))t.add(i);else{let e=r.nodes.find(e=>e.id.endsWith(i)||e.id.endsWith(`:`+i))?.id;e&&t.add(e)}t.size>0&&ee(t)}else e.length>0&&ee(new Set(e))}}}break;case`error`:ze(e.error??`Unknown error`);break;case`done`:u=i.preserveAssistantTranscript?e.historyMessages:void 0,m();break}},t=bt.current;if(!t)throw Error(`Agent not initialized`);let{streamAgentResponse:o}=await P(async()=>{let{streamAgentResponse:e}=await import(`./agent-DuBBkGz1.js`);return{streamAgentResponse:e}},__vite__mapDeps([0,1,2,3,4,5]));for await(let r of o(t,a,{captureHistory:i.preserveAssistantTranscript,signal:n.signal})){if(r.type===`cancelled`)break;e(r)}}catch(e){if(!n.signal.aborted){let t=e instanceof Error?e.message:String(e);ze(t)}}finally{p!=null&&(cancelAnimationFrame(p),p=null),wt.current=`idle`,Ue(!1),Ge([])}},[Be,Pe,Et,et,tt,nt,rt,B,r,Se]),Ot=(0,R.useCallback)(()=>{if(!V.current)return;wt.current=`aborting`,V.current.abort(),V.current=null;let e=ir.t(`chat:stopped`),t=t=>t.status===`running`||t.status===`pending`?{...t,status:`stopped`,result:e}:t;Ge(e=>e.map(t)),Ve(e=>{let n=[...e].map((e,t)=>e.role===`assistant`?t:-1).filter(e=>e>=0).pop();if(n===void 0)return e;let r=e[n],i={...r,toolCalls:r.toolCalls?.map(t),steps:r.steps?.map(e=>e.type===`tool_call`&&e.toolCall?{...e,toolCall:t(e.toolCall)}:e)};return e.map((e,t)=>t===n?i:e)}),Ue(!1)},[]),kt=(0,R.useCallback)(()=>{V.current?.abort(),V.current=null,wt.current=`idle`,Ve([]),Ge([]),ze(null),Ue(!1)},[]),At=(0,R.useCallback)(async e=>{if(!ve)return;pe({phase:`extracting`,percent:0,message:ir.t(`common:progress.switchingRepository`),detail:ir.t(`common:progress.loadingRepository`,{repo:Sr(be,e)})}),n(`loading`),Fe(!1),m(new Set),B(),ie(),ae(),o(null),j(null),qe([]),Ye(!1),Ze(null),v(`full`),b(null);let t,r,a,s=!1;try{let n=await Ct(ve,(e,t,n)=>{if(e===`validating`)pe({phase:`extracting`,percent:5,message:ir.t(`common:progress.switchingRepository`),detail:ir.t(`common:progress.validating`)});else if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);pe({phase:`extracting`,percent:e,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.downloadedMb`,{mb:r})})}else e===`extracting`&&pe({phase:`extracting`,percent:97,message:ir.t(`common:progress.processing`),detail:ir.t(`common:progress.extractingFileContents`)})},void 0,e,{awaitAnalysis:!0}),o=n.repoInfo.repoPath??n.repoInfo.path,c=n.repoInfo.name||(o||``).replace(/\\/g,`/`).split(`/`).filter(Boolean).pop()||e||`server-project`;a=e||o||c,he(c),at(a),t=n.repoInfo,r=c;let l=re(n);i(l.graph),v(l.graphMode),b(l.graphMode===`chatOnly`?l.nodeCount:null),s=l.graphMode===`chatOnly`}catch(e){console.error(`Repo switch failed:`,e),pe({phase:`error`,percent:0,message:ir.t(`common:progress.failedSwitchRepository`),detail:e instanceof Error?e.message:ir.t(`common:progress.unknownError`)}),Fe(!1),bt.current=null,setTimeout(()=>{n(`exploring`),pe(null)},x);return}if(r){let e=new URL(window.location.href);e.searchParams.set(`project`,r);let n=t?.repoPath??t?.path;n&&e.searchParams.set(`repo`,n),e.searchParams.delete(`skipGraph`),window.history.replaceState(null,``,e.toString())}bt.current=null,Fe(!1),Ve([]);try{Ee()&&await Et(r,{chatOnly:s,repo:a}),n(`exploring`),dt(),pe(null)}catch(e){console.warn(`Failed to initialize agent:`,e),Fe(!1),bt.current=null,ze(`Failed to initialize agent`),n(`exploring`),pe(null)}},[ve,be,pe,n,he,i,v,b,Et,dt,m,B,ie,ae,o,j,qe,Ye,Ze,Ve,at]),jt=(0,R.useRef)(!1),Mt=(0,R.useRef)(null),Nt=(0,R.useRef)(!0);(0,R.useEffect)(()=>()=>{Nt.current=!1,Mt.current?.abort()},[]);let Pt=(0,R.useCallback)(async()=>{if(!ve||jt.current)return;jt.current=!0;let e=it.current,t=new AbortController;Mt.current=t,pe({phase:`extracting`,percent:0,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.validating`)}),n(`loading`);try{let r=await Ct(ve,(e,t,n)=>{if(e===`downloading`){let e=n?Math.round(t/n*90)+5:50,r=(t/(1024*1024)).toFixed(1);pe({phase:`extracting`,percent:e,message:ir.t(`common:progress.downloadingGraph`),detail:ir.t(`common:progress.downloadedMb`,{mb:r})})}},t.signal,e,{awaitAnalysis:!0,skipGraph:!1});if(!Nt.current||it.current!==e)return;let a=re(r);i(a.graph),v(a.graphMode),b(a.graphMode===`chatOnly`?a.nodeCount:null),pe(null),n(`exploring`),Ee()&&await Et(e?Sr(be,e):void 0,{chatOnly:!1,repo:e})}catch(t){if(!Nt.current||it.current!==e)return;console.error(`Load graph anyway failed:`,t),pe(null),n(`exploring`)}finally{Mt.current===t&&(Mt.current=null),jt.current=!1}},[ve,be,pe,n,i,v,b,Et]),Ft=(0,R.useCallback)(e=>{qe(t=>{let n=t.find(t=>t.id===e),r=t.filter(t=>t.id!==e);return n?.nodeId&&n.source===`ai`&&(r.some(e=>e.nodeId===n.nodeId&&e.source===`ai`)||N(e=>{let t=new Set(e);return t.delete(n.nodeId),t})),r.length===0&&!a&&Ye(!1),r})},[a]),It=(0,R.useCallback)(()=>{qe([]),Ye(!1),Ze(null)},[]),Lt={viewMode:t,setViewMode:n,graph:r,setGraph:i,selectedNode:a,setSelectedNode:o,isRightPanelOpen:S,setRightPanelOpen:C,rightPanelTab:w,setRightPanelTab:T,openCodePanel:O,openChatPanel:k,helpDialogBoxOpen:E,setHelpDialogBoxOpen:D,visibleLabels:s,toggleLabelVisibility:c,visibleEdgeTypes:l,toggleEdgeVisibility:u,depthFilter:d,setDepthFilter:f,graphViewMode:h,setGraphViewMode:g,graphMode:_,setGraphMode:v,chatOnlyNodeCount:y,setChatOnlyNodeCount:b,highlightedNodeIds:p,setHighlightedNodeIds:m,aiCitationHighlightedNodeIds:M,aiToolHighlightedNodeIds:F,blastRadiusNodeIds:L,isAIHighlightsEnabled:te,toggleAIHighlights:z,clearAIToolHighlights:B,clearAICitationHighlights:ie,clearBlastRadius:ae,queryResult:A,setQueryResult:j,clearQueryHighlights:oe,animatedNodes:se,triggerNodeAnimation:ue,clearAnimations:de,progress:fe,setProgress:pe,projectName:me,setProjectName:he,currentRepo:ge,serverBaseUrl:ve,setServerBaseUrl:ye,availableRepos:be,setAvailableRepos:xe,switchRepo:At,setCurrentRepo:at,loadGraphAnyway:Pt,runQuery:ot,isDatabaseReady:ct,embeddingStatus:Se,embeddingProgress:De,startEmbeddings:ut,startEmbeddingsWithFallback:dt,semanticSearch:ft,semanticSearchWithContext:_t,isEmbeddingReady:Se===`ready`,llmSettings:ke,updateLLMSettings:vt,isSettingsPanelOpen:Me,setSettingsPanelOpen:Ne,isAgentReady:Pe,isAgentInitializing:Ie,agentError:Re,chatMessages:Be,isChatLoading:He,currentToolCalls:We,refreshLLMSettings:yt,initializeAgent:Et,sendChatMessage:Dt,stopChatResponse:Ot,clearChat:kt,codeReferences:Ke,isCodePanelOpen:Je,setCodePanelOpen:Ye,addCodeReference:nt,removeCodeReference:Ft,clearAICodeReferences:rt,clearCodeReferences:It,codeReferenceFocus:Xe};return(0,H.jsx)(Cr.Provider,{value:Lt,children:e})},Er=()=>{let e=(0,R.useContext)(Cr);if(!e)throw Error(`useAppState must be used within AppStateProvider`);return e},Dr=s(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Or=s(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),kr=s(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),Ar=s(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),jr=s(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),Mr=s(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),Nr=s(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Pr=s(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Fr=s(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Ir=s(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Lr=s(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Rr=s(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),zr=s(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),Br=s(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Vr=s(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Hr=s(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Ur=s(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Wr=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Gr=s(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),Kr=s(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),qr=s(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Jr=s(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Yr=s(`heart`,[[`path`,{d:`M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5`,key:`mvr1a0`}]]),Xr=s(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),Zr=s(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Qr=s(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),$r=s(`lightbulb-off`,[[`path`,{d:`M16.8 11.2c.8-.9 1.2-2 1.2-3.2a6 6 0 0 0-9.3-5`,key:`1fkcox`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M6.3 6.3a4.67 4.67 0 0 0 1.2 5.2c.7.7 1.3 1.5 1.5 2.5`,key:`10m8kw`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ei=s(`lightbulb`,[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]),ti=s(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),ni=s(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ri=s(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ii=s(`mouse-pointer-click`,[[`path`,{d:`M14 4.1 12 6`,key:`ita8i4`}],[`path`,{d:`m5.1 8-2.9-.8`,key:`1go3kf`}],[`path`,{d:`m6 12-1.9 2`,key:`mnht97`}],[`path`,{d:`M7.2 2.2 8 5.1`,key:`1cfko1`}],[`path`,{d:`M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z`,key:`s0h3yz`}]]),ai=s(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),oi=s(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),si=s(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ci=s(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),li=s(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),ui=s(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),di=s(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),fi=s(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),pi=s(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),mi=s(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),hi=s(`send`,[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]),gi=s(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),_i=s(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),vi=s(`skip-forward`,[[`path`,{d:`M21 4v16`,key:`7j8fe9`}],[`path`,{d:`M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z`,key:`zs4d6`}]]),yi=s(`snail`,[[`path`,{d:`M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0`,key:`hneq2s`}],[`circle`,{cx:`10`,cy:`13`,r:`8`,key:`194lz3`}],[`path`,{d:`M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6`,key:`ixqyt7`}],[`path`,{d:`M18 3 19.1 5.2`,key:`9tjm43`}],[`path`,{d:`M22 3 20.9 5.2`,key:`j3odrs`}]]),bi=s(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),xi=s(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Si=s(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Ci=s(`table`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),wi=s(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Ti=s(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ei=s(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Di=s(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Oi=s(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),ki=s(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),Ai=s(`variable`,[[`path`,{d:`M8 21s-4-3-4-9 4-9 4-9`,key:`uto9ud`}],[`path`,{d:`M16 3s4 3 4 9-4 9-4 9`,key:`4w2vsq`}],[`line`,{x1:`15`,x2:`9`,y1:`9`,y2:`15`,key:`f7djnv`}],[`line`,{x1:`9`,x2:`15`,y1:`9`,y2:`15`,key:`1shsy8`}]]),ji=s(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Mi=s(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),Ni=`gitnexus-backend-url`;function Pi(){let[e]=(0,R.useState)(()=>{try{return localStorage.getItem(Ni)??b}catch{return b}}),[t,n]=(0,R.useState)(!1),[r,i]=(0,R.useState)(!1),[a,o]=(0,R.useState)(!1),s=(0,R.useRef)(0),c=(0,R.useCallback)(async()=>{let e=++s.current;i(!0);try{let t=await st();return e===s.current?(n(t===`ok`),o(t===`unauthorized`),t===`ok`):!1}catch{return e===s.current&&(n(!1),o(!1)),!1}finally{e===s.current&&i(!1)}},[]),l=(0,R.useRef)(null),[u,d]=(0,R.useState)(!1),f=(0,R.useRef)(c);f.current=c;let p=(0,R.useCallback)(()=>{l.current!==null&&(clearTimeout(l.current),l.current=null),d(!1)},[]),m=(0,R.useCallback)(()=>{p(),d(!0);let e=()=>{l.current=setTimeout(async()=>{if(document.hidden){l.current=null;return}await f.current()?(d(!1),l.current=null):e()},3e3)};e()},[p]);return(0,R.useEffect)(()=>{if(!u)return;let e=()=>{document.hidden||(l.current!==null&&(clearTimeout(l.current),l.current=null),f.current().then(e=>{!e&&u&&m()}))};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[u,m]),(0,R.useEffect)(()=>()=>{l.current!==null&&clearTimeout(l.current)},[]),(0,R.useEffect)(()=>{We(e),c()},[]),{isConnected:t,isProbing:r,isUnauthorized:a,backendUrl:e,startPolling:m,stopPolling:p,isPolling:u}}var Fi=({value:e,onChange:t,placeholder:n,label:r,revealLabel:i,hideLabel:a})=>{let[o,s]=(0,R.useState)(!1);return(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`input`,{type:o?`text`:`password`,value:e,onChange:e=>t(e.target.value),autoComplete:`off`,spellCheck:!1,"aria-label":r,placeholder:n,className:`w-full rounded-xl border border-border-subtle bg-elevated px-4 py-3 pr-11 font-mono text-sm text-text-primary transition-all outline-none placeholder:text-text-muted focus:border-accent focus:ring-2 focus:ring-accent/20`}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>s(e=>!e),"aria-label":o?a:i,className:`absolute top-1/2 right-3 -translate-y-1/2 text-text-muted transition-colors hover:text-text-primary`,children:o?(0,H.jsx)(Br,{className:`h-4 w-4`}):(0,H.jsx)(Vr,{className:`h-4 w-4`})})]})},Ii=({onSubmit:e})=>{let{t}=f(`settings`),[n,r]=(0,R.useState)(Je);return(0,H.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),Ye(n),e?.()},className:`animate-fade-in rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsxs)(`div`,{className:`mb-5 text-center`,children:[(0,H.jsx)(`div`,{className:`mb-3 inline-flex h-10 w-10 items-center justify-center rounded-xl bg-accent/20`,children:(0,H.jsx)(Zr,{className:`h-5 w-5 text-accent`})}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`accessToken.title`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-sm text-sm leading-relaxed text-text-secondary`,children:t(`accessToken.promptHint`)})]}),(0,H.jsx)(Fi,{value:n,onChange:r,label:t(`accessToken.label`),placeholder:t(`accessToken.placeholder`),revealLabel:t(`accessToken.reveal`),hideLabel:t(`accessToken.hide`)}),(0,H.jsx)(`button`,{type:`submit`,className:`mt-4 w-full cursor-pointer rounded-xl bg-accent px-4 py-3 text-sm font-medium text-white shadow-glow-soft transition-all hover:bg-accent/90 hover:shadow-glow`,children:t(`accessToken.connect`)}),(0,H.jsx)(`p`,{className:`mt-4 border-t border-border-subtle pt-4 text-center text-xs leading-relaxed text-text-muted`,children:t(`accessToken.sessionNote`)})]})};function Li({text:e}){let{t}=f(`onboarding`),[n,r]=(0,R.useState)(!1),i=(0,R.useRef)(null);return(0,R.useEffect)(()=>()=>{i.current&&clearTimeout(i.current)},[]),(0,H.jsx)(`button`,{onClick:async()=>{try{await navigator.clipboard.writeText(e),r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)}catch{}},"aria-label":t(n?`guide.copiedAria`:`guide.copyAria`),className:`shrink-0 cursor-pointer rounded-md px-2 py-1 transition-all duration-200 focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:outline-none ${n?`bg-emerald-400/10 text-emerald-400`:`text-text-muted hover:bg-white/5 hover:text-text-primary`} `,children:n?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5`}):(0,H.jsx)(o,{className:`h-3.5 w-3.5`})})}function Ri({command:e,label:t,isActive:n=!1}){return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border transition-all duration-300 ${n?`border-accent/40 shadow-glow-soft`:`border-border-default hover:border-accent/20 hover:shadow-glow-soft`} `,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-deep px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-red-500/60`}),(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-yellow-500/60`}),(0,H.jsx)(`div`,{className:`h-2.5 w-2.5 rounded-full bg-emerald-500/60`})]}),(0,H.jsx)(`span`,{className:`flex-1 text-center font-mono text-[11px] text-text-muted`,children:t}),(0,H.jsx)(Li,{text:e})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 bg-void px-4 py-3.5 font-mono text-sm`,children:[(0,H.jsx)(`span`,{className:`text-accent/60 select-none`,"aria-hidden":`true`,children:`$`}),(0,H.jsx)(`code`,{className:`flex-1 overflow-x-auto tracking-wide whitespace-nowrap text-text-primary`,children:e})]})]})}function zi({state:e,number:t}){return e===`done`?(0,H.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-emerald-500/50 bg-emerald-500/20`,children:(0,H.jsx)(Nr,{className:`h-3 w-3 text-emerald-400`})}):e===`active`?(0,H.jsxs)(`div`,{className:`relative flex h-6 w-6 shrink-0 items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 animate-ping rounded-full border border-accent/30`}),(0,H.jsx)(`div`,{className:`flex h-6 w-6 items-center justify-center rounded-full border border-accent/60 bg-accent/20`,children:(0,H.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-accent`,children:t})})]}):(0,H.jsx)(`div`,{className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full border border-border-subtle bg-elevated`,children:(0,H.jsx)(`span`,{className:`text-[10px] leading-none font-semibold text-text-muted`,children:t})})}function Bi({state:e,number:t,title:n,description:r,children:i}){let{t:a}=f(`onboarding`),o=e!==`waiting`;return(0,H.jsx)(`div`,{className:`transition-all duration-300 ${e===`waiting`?`opacity-40`:`opacity-100`} `,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(zi,{state:e,number:t}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 pt-0.5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-sm font-medium transition-colors duration-200 ${e===`done`?`text-emerald-400`:e===`active`?`text-text-primary`:`text-text-muted`}`,children:n}),e===`done`&&(0,H.jsx)(`span`,{className:`animate-fade-in font-mono text-[10px] tracking-wider text-emerald-400/60 uppercase`,children:a(`guide.done`)})]}),r&&(0,H.jsx)(`p`,{className:`mt-0.5 text-xs leading-relaxed text-text-muted`,children:r}),o&&i&&(0,H.jsx)(`div`,{className:`mt-3 animate-slide-up`,children:i})]})]})})}function Vi(){let{t:e}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex animate-fade-in items-center gap-3 rounded-xl border border-accent/15 bg-accent/5 px-4 py-3`,"aria-live":`polite`,role:`status`,children:[(0,H.jsxs)(`div`,{className:`relative shrink-0`,children:[(0,H.jsx)(Mi,{className:`h-4 w-4 text-accent/70`}),(0,H.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded-full border border-accent/25`})})]}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`p`,{className:`text-xs font-medium text-text-secondary`,children:[e(`guide.listeningForServer`),(0,H.jsx)(`span`,{className:`ml-0.5 inline-flex text-text-muted`,children:(0,H.jsx)(`span`,{className:`animate-pulse`,children:`...`})})]}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[11px] text-text-muted`,children:e(`guide.willAutoConnect`)})]})]})}var Hi=({isPolling:e})=>{let{t}=f(`onboarding`),n=t(`guide.terminal`),r=e?`done`:`active`,i=e?`active`:`waiting`;return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`guide.startServer`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`guide.prodDescription`)})]})}),(0,H.jsxs)(`div`,{className:`relative space-y-5`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute top-6 bottom-6 left-[11px] w-px bg-border-subtle`,"aria-hidden":`true`}),(0,H.jsxs)(Bi,{state:r,number:1,title:t(`guide.copyCommand`),description:e?void 0:t(`guide.copyCommandDescription`),children:[(0,H.jsx)(Ri,{command:`npx gitnexus@latest serve`,label:n,isActive:r===`active`}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`my-3 flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,H.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:t(`guide.orInstallGlobally`)}),(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,H.jsx)(Ri,{command:`npm install -g gitnexus && gitnexus serve`,label:t(`guide.globalInstall`),isActive:!1})]})]}),(0,H.jsx)(Bi,{state:i,number:2,title:t(e?`guide.waitingForServer`:`guide.pasteAndRun`),description:e?void 0:t(`guide.pasteAndRunDescription`),children:e&&(0,H.jsx)(Vi,{})}),(0,H.jsx)(Bi,{state:`waiting`,number:3,title:t(`guide.autoConnects`),description:t(`guide.autoConnectsDescription`)})]}),(0,H.jsxs)(`div`,{className:`mt-6 flex items-center justify-center gap-1.5 border-t border-border-subtle pt-5 text-xs text-text-muted`,children:[(0,H.jsx)(gi,{className:`h-3 w-3 shrink-0`}),(0,H.jsxs)(`span`,{children:[t(`guide.requires`),` `,(0,H.jsxs)(`a`,{href:`https://nodejs.org`,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent transition-colors hover:text-accent/80 hover:underline`,children:[`Node.js `,E,`+`]})]}),(0,H.jsx)(`span`,{className:`mx-1 text-border-default`,children:`·`}),(0,H.jsx)(Ti,{className:`h-3 w-3 shrink-0`}),(0,H.jsx)(`span`,{children:t(`guide.port`)})]})]})};function Ui(e,t,n){return n(`common:analyzePhases.${e}`,{defaultValue:``})||t||e}function Wi(e,t){if(!e)return``;let n=Gi[e];return n?t(n):e}var Gi={"Connecting...":`common:progress.connectingShort`,"Connecting to server...":`common:progress.connecting`,"Validating server":`common:progress.validatingServer`,"Validating server...":`common:progress.validatingServerEllipsis`,"Downloading graph...":`common:progress.downloadingGraph`,"Extracting file contents":`common:progress.extractingFileContents`,"Processing...":`common:progress.processing`,"Processing graph...":`common:progress.processingGraph`,"Loading graph...":`common:progress.loadingGraph`,Queued:`common:analyzePhases.queued`,"Starting...":`common:progress.starting`},Ki=({progress:e,onCancel:t})=>{let{t:n}=f(`common`),[r]=(0,R.useState)(()=>Date.now()),[i,a]=(0,R.useState)(0);(0,R.useEffect)(()=>{let e=setInterval(()=>a(Date.now()-r),1e3);return()=>clearInterval(e)},[r]);let o=e=>{let t=Math.floor(e/1e3);return t<60?n(`units.elapsedSeconds`,{seconds:t}):n(`units.elapsedMinutesSeconds`,{minutes:Math.floor(t/60),seconds:t%60})},s=Ui(e.phase,e.message,n),c=Math.max(0,Math.min(100,e.percent));return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,H.jsx)(`span`,{className:`font-medium text-text-secondary`,children:s}),(0,H.jsx)(`span`,{className:`font-mono text-xs text-text-muted`,children:o(i)})]}),(0,H.jsx)(`div`,{className:`h-2 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300 ease-out`,style:{width:`${c}%`}})}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,H.jsxs)(`span`,{className:`font-mono text-xs text-text-muted`,children:[c,`%`]}),(0,H.jsxs)(`button`,{onClick:t,className:`flex items-center gap-1.5 rounded-lg bg-red-500/10 px-3 py-1.5 text-xs text-red-400 transition-all duration-200 hover:bg-red-500/20`,children:[(0,H.jsx)(ji,{className:`h-3.5 w-3.5`}),n(`actions.cancel`)]})]})]})},qi=new Set([`.git`,`.hg`,`.svn`,`node_modules`,`vendor`,`.venv`,`__pycache__`,`target`,`dist`,`build`,`out`,`.next`,`_next`,`.nuxt`,`.cache`,`coverage`,`.idea`,`.gitnexus`]);function Ji(e){let t=[],n=[],r=0,i=0;for(let a=0;a<e.length;a++){let o=e[a],s=o.webkitRelativePath&&o.webkitRelativePath.length>0?o.webkitRelativePath:o.name;if(s.split(`/`).some(e=>qi.has(e))){r++;continue}if(o.size>26214400){r++;continue}t.push(o),n.push(s),i+=o.size}return{files:t,manifest:n,droppedCount:r,totalBytes:i}}function Yi(e,t){if(e instanceof ze){let n=e.retryAfterMs?Math.ceil(e.retryAfterMs/1e3):void 0,r=e.message||t(`errors:unknown`);switch(e.code){case`network`:return t(`errors:backend.network`,{defaultValue:r});case`timeout`:return t(`errors:backend.timeout`,{defaultValue:r});case`rate_limited`:return t(`errors:backend.rateLimited`,{seconds:n,defaultValue:r});case`not_found`:return t(`errors:backend.notFound`,{defaultValue:r});case`unauthorized`:return t(`errors:backend.unauthorized`,{defaultValue:r});case`origin_blocked`:return t(`errors:backend.originBlocked`,{defaultValue:r});case`client`:return t(`errors:backend.client`,{message:e.message,defaultValue:r});case`server`:return t(`errors:backend.server`,{message:e.message,defaultValue:r});default:return r}}return e instanceof Error?e.message:t(`errors:unknown`)}var Xi=/^https?:\/\/(www\.)?github\.com\/[^/\s]+\/[^/\s]+/i,Zi=/^https?:\/\/[^/\s]+\/[^/\s]+\/[^/\s]+(\/.*)?$/i,Qi=/^https?:\/\/[^/\s]+\/(?:[^/\s]+\/)+_git\/[^/\s]+/i,$i=navigator.userAgent.toLowerCase().includes(`win`);function ea(e){return Xi.test(e.trim())}function ta(e){return Zi.test(e.trim())}function na(e){return Qi.test(e.trim())}function ra({mode:e,onChange:t}){let{t:n}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex gap-1 rounded-lg bg-elevated p-1`,role:`tablist`,"aria-label":n(`repoAnalyzer.inputType`),children:[(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`github`,onClick:()=>t(`github`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`github`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(p,{className:`h-3 w-3`}),n(`repoAnalyzer.githubUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`gitlab`,onClick:()=>t(`gitlab`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`gitlab`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(g,{className:`h-3 w-3`}),n(`repoAnalyzer.gitlabUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`azure`,onClick:()=>t(`azure`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`azure`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(i,{className:`h-3 w-3`}),n(`repoAnalyzer.azureDevOpsUrl`)]}),(0,H.jsxs)(`button`,{role:`tab`,"aria-selected":e===`local`,onClick:()=>t(`local`),className:`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-md px-3 py-1.5 text-xs font-medium transition-all duration-150 ${e===`local`?`bg-accent text-white shadow-sm`:`text-text-muted hover:text-text-secondary`} `,children:[(0,H.jsx)(Ur,{className:`h-3 w-3`}),n(`repoAnalyzer.localFolder`)]})]})}function ia({canSubmit:e,isLoading:t,onClick:n,variant:r}){let{t:i}=f(`onboarding`);return(0,H.jsxs)(`button`,{onClick:n,disabled:!e||t,className:` ${r===`onboarding`?`w-full px-5 py-3.5 text-sm`:`w-full px-4 py-3 text-sm`} flex items-center justify-center gap-2.5 rounded-xl font-medium transition-all duration-200 ${e&&!t?`cursor-pointer bg-accent text-white shadow-glow-soft hover:-translate-y-0.5 hover:bg-accent/90 hover:shadow-glow`:`cursor-not-allowed border border-border-subtle bg-elevated text-text-muted`} `,children:[t?(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin`}):(0,H.jsx)(bi,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:i(t?`repoAnalyzer.starting`:`repoAnalyzer.analyzeRepository`)}),e&&!t&&(0,H.jsx)(Or,{className:`h-3.5 w-3.5`})]})}function aa({repoName:e}){let{t}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`flex animate-fade-in flex-col items-center gap-3 py-4`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-xl border border-emerald-500/30 bg-emerald-500/15 shadow-[0_0_20px_rgba(16,185,129,0.15)]`,children:(0,H.jsx)(Nr,{className:`h-6 w-6 text-emerald-400`})}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsx)(`p`,{className:`text-sm font-medium text-emerald-400`,children:t(`repoAnalyzer.complete`)}),(0,H.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-text-muted`,children:e})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-secondary`,children:t(`repoAnalyzer.loadingGraph`)})]})}var oa=({variant:e,onComplete:t,onCancel:n})=>{let{t:r}=f([`common`,`errors`,`onboarding`]),a=(0,R.useId)(),[o,s]=(0,R.useState)(`github`),[c,l]=(0,R.useState)(!1),[u,d]=(0,R.useState)(null),[m,h]=(0,R.useState)(``),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(``),[x,S]=(0,R.useState)(``),[C,w]=(0,R.useState)(``),[T,E]=(0,R.useState)(`input`),[D,O]=(0,R.useState)(null),[k,A]=(0,R.useState)({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),[j,M]=(0,R.useState)(``),N=(0,R.useRef)(null),P=(0,R.useRef)(null),F=(0,R.useRef)(null),I=(0,R.useRef)(null),L=(0,R.useRef)(null);(0,R.useEffect)(()=>()=>{P.current?.abort(),F.current?.abort(),I.current&&clearTimeout(I.current)},[]);let ee=()=>{F.current?.abort(),F.current=null},te=()=>{ee();let e=new AbortController;return F.current=e,e},ne=e=>{yt(e).catch(()=>{})},z=e=>{e!==o&&(ee(),s(e),h(``),v(``),b(``),S(``),w(``),O(null),d(null),l(!1),E(`input`))},B=o===`github`?ea(m)&&(T===`input`||T===`error`):o===`gitlab`?ta(y)&&(T===`input`||T===`error`):o===`azure`?na(x)&&(T===`input`||T===`error`):C.trim().length>1&&(T===`input`||T===`error`),re=async()=>{if(o===`github`&&!ea(m)){O(r(`errors:invalidGithubUrl`));return}if(o===`gitlab`&&!ta(y)){O(`Please enter a valid GitLab repository URL.`);return}if(o===`azure`&&!na(x)){O(r(`errors:invalidAzureDevOpsUrl`));return}if(o===`local`&&C.trim().length<2){O(r(`errors:missingFolderPath`));return}O(null),E(`starting`);let e=te();try{let{jobId:t}=await vt(o===`github`?{url:m.trim(),..._.trim()?{token:_.trim()}:{}}:o===`gitlab`?{url:y.trim()}:o===`azure`?{url:x.trim()}:{path:C.trim()});if(e.signal.aborted)return;let n=o===`github`?m.trim():o===`gitlab`?y.trim():o===`azure`?x.trim():C.trim();ie(t,n)}catch(t){if(e.signal.aborted)return;O(Yi(t,r)),E(`error`)}},ie=(e,n)=>{N.current=e,E(`analyzing`);let i=bt(e,e=>A(e),e=>{let i=e.repoName??(n?n.split(/[/\\]/).filter(Boolean).at(-1):void 0)??r(`onboarding:repoAnalyzer.defaultRepoName`),a=e.repoPath??i;M(i),v(``),E(`done`),P.current=null,I.current=setTimeout(()=>{I.current=null,t(a)},1200)},e=>{O(e||r(`errors:analysisFailed`)),E(`error`)});P.current=i},ae=async e=>{if(c||se)return;let{files:t,manifest:n,droppedCount:i}=Ji(e);if(t.length===0){O(r(`onboarding:repoAnalyzer.upload.empty`));return}O(null),d({count:t.length,dropped:i}),l(!0),E(`starting`);let a=n[0]?.split(`/`)[0]??null,o=te();try{let{jobId:e}=await _t(t,n,o.signal);if(o.signal.aborted){ne(e);return}l(!1),ie(e,a)}catch(e){if(o.signal.aborted)return;l(!1),O(Yi(e,r)),E(`error`)}},oe=async()=>{if(P.current?.abort(),P.current=null,ee(),N.current){try{await yt(N.current)}catch{}N.current=null}v(``),E(`input`),A({phase:`queued`,percent:0,message:r(`common:analyzePhases.queued`)}),l(!1),d(null)},se=T===`starting`,ce=T!==`analyzing`&&T!==`done`,le=$i;return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[ce&&(0,H.jsx)(ra,{mode:o,onChange:z}),ce&&o===`github`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:ea(m)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(p,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:m,onChange:e=>{h(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`https://github.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),m.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:ea(m)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsxs)(`div`,{className:`space-y-1.5 pt-1`,children:[(0,H.jsx)(`label`,{htmlFor:`${a}-token`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.githubTokenLabel`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-border-default bg-void px-4 py-3 transition-all duration-200 focus-within:border-accent/40`,children:[(0,H.jsx)(Zr,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:`${a}-token`,type:`password`,value:_,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:r(`onboarding:repoAnalyzer.githubTokenPlaceholder`),autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.githubTokenHelp`)})]})]}),ce&&o===`gitlab`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.gitlabRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:ta(y)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(g,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:y,onChange:e=>{b(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`https://gitlab.com/owner/repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),y.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:ta(y)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.gitlabSupported`)})]}),ce&&o===`azure`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:a,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.azureDevOpsRepositoryUrl`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:na(x)?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(i,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:a,type:`url`,value:x,onChange:e=>{S(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:`http://azuredevops.example.com/Collection/Project/_git/Repo`,autoComplete:`url`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),x.length>10&&(0,H.jsx)(`div`,{className:`shrink-0`,children:na(x)?(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 text-emerald-400`}):(0,H.jsx)(Lr,{className:`h-3.5 w-3.5 text-text-muted`})})]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.azureDevOpsSupported`)})]}),ce&&o===`local`&&(0,H.jsxs)(`div`,{className:`space-y-2`,children:[(0,H.jsx)(`label`,{htmlFor:`${a}-local`,className:`block text-xs font-medium tracking-wider text-text-secondary uppercase`,children:r(`onboarding:repoAnalyzer.localFolderPath`)}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border bg-void px-4 py-3.5 transition-all duration-200 ${D&&T===`error`?`border-red-500/50`:C.trim().length>1?`border-accent/50 shadow-[0_0_0_3px_rgba(124,58,237,0.08)]`:`border-border-default focus-within:border-accent/40`} `,children:[(0,H.jsx)(Ur,{className:`h-4 w-4 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{id:`${a}-local`,type:`text`,value:C,onChange:e=>{w(e.target.value),D&&O(null)},onKeyDown:e=>{e.key===`Enter`&&B&&!se&&(e.preventDefault(),re())},disabled:se,placeholder:le?`C:\\Users\\you\\project`:`/home/you/project`,autoComplete:`off`,spellCheck:!1,className:`flex-1 border-none bg-transparent font-mono text-sm text-text-primary outline-none placeholder:text-text-muted disabled:opacity-50`}),C.trim().length>1&&(0,H.jsx)(Nr,{className:`h-3.5 w-3.5 shrink-0 text-emerald-400`})]}),(0,H.jsx)(`input`,{ref:L,type:`file`,webkitdirectory:``,multiple:!0,className:`hidden`,"data-testid":`folder-upload-input`,onChange:e=>{e.target.files&&e.target.files.length>0&&ae(e.target.files),e.target.value=``}}),(0,H.jsxs)(`button`,{type:`button`,"data-testid":`upload-folder`,onClick:()=>L.current?.click(),disabled:se,className:`flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg border border-border-subtle bg-elevated px-3 py-2 text-xs font-medium text-text-secondary transition-all duration-150 hover:bg-hover hover:text-text-primary disabled:opacity-50`,children:[(0,H.jsx)(Ur,{className:`h-3.5 w-3.5`}),r(`onboarding:repoAnalyzer.upload.button`)]}),c&&(0,H.jsxs)(`div`,{role:`status`,"aria-busy":`true`,"data-testid":`upload-progress`,className:`space-y-1`,children:[(0,H.jsx)(`div`,{className:`h-1.5 w-full overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full w-1/3 animate-pulse rounded-full bg-accent`})}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:r(`onboarding:repoAnalyzer.upload.uploading`)})]}),u&&!c&&T!==`error`&&(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,"data-testid":`upload-summary`,children:r(`onboarding:repoAnalyzer.upload.selected`,{fileCount:u.count,dropped:u.dropped})})]}),(T===`error`||T===`input`&&D)&&D&&(0,H.jsxs)(`p`,{className:`flex animate-fade-in items-center gap-1.5 text-xs text-red-400`,children:[(0,H.jsx)(Lr,{className:`h-3 w-3 shrink-0`}),D]}),T===`analyzing`&&(0,H.jsx)(`div`,{className:`animate-slide-up`,children:(0,H.jsx)(Ki,{progress:k,onCancel:oe})}),T===`done`&&(0,H.jsx)(aa,{repoName:j}),(T===`input`||T===`starting`)&&(0,H.jsx)(ia,{canSubmit:B,isLoading:se,onClick:re,variant:e}),T===`error`&&(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`button`,{onClick:()=>{O(null),E(`input`)},className:`flex-1 cursor-pointer rounded-xl border border-border-subtle bg-elevated px-4 py-2.5 text-sm text-text-secondary transition-all duration-200 hover:bg-hover hover:text-text-primary`,children:r(`common:actions.tryAgain`)}),n&&(0,H.jsx)(`button`,{onClick:n,className:`cursor-pointer px-4 py-2.5 text-sm text-text-muted transition-colors hover:text-text-secondary`,children:r(`common:actions.dismiss`)})]}),T===`analyzing`&&e===`sheet`&&n&&(0,H.jsx)(`button`,{onClick:n,className:`w-full cursor-pointer py-1 text-xs text-text-muted transition-colors hover:text-text-secondary`,children:r(`onboarding:repoAnalyzer.hideBackground`)})]})},sa=({onComplete:e})=>{let{t}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`div`,{className:`mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,H.jsx)(Kr,{className:`h-7 w-7 text-accent`})}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:t(`analyzeFirst.title`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:t(`analyzeFirst.description`)})]})}),(0,H.jsx)(`div`,{className:`relative`,children:(0,H.jsx)(oa,{variant:`onboarding`,onComplete:e})}),(0,H.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:t(`analyzeFirst.footer`)})]})};function ca(e,t){let n=new Date(e),r=new Date().getTime()-n.getTime(),i=Math.floor(r/6e4);if(i<1)return t(`onboarding:landing.time.justNow`);if(i<60)return t(`onboarding:landing.time.minutesAgo`,{count:i});let a=Math.floor(i/60);if(a<24)return t(`onboarding:landing.time.hoursAgo`,{count:a});let o=Math.floor(a/24);return o<30?t(`onboarding:landing.time.daysAgo`,{count:o}):n.toLocaleDateString()}function la({repo:e,onClick:t}){let{t:n}=f([`common`,`onboarding`]),r=e.stats;return(0,H.jsxs)(`button`,{onClick:t,"data-testid":`landing-repo-card`,className:`group w-full cursor-pointer rounded-xl border border-border-default bg-elevated p-4 text-left transition-all duration-200 hover:border-accent/40 hover:bg-hover hover:shadow-glow-soft`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(Kr,{className:`h-4 w-4 shrink-0 text-accent`}),(0,H.jsx)(`h3`,{className:`truncate text-sm font-semibold text-text-primary transition-colors group-hover:text-accent`,children:e.name})]}),e.indexedAt&&(0,H.jsx)(`p`,{className:`mt-1 pl-6 text-xs text-text-muted`,children:n(`onboarding:landing.indexed`,{time:ca(e.indexedAt,n)})})]}),(0,H.jsx)(Or,{className:`h-4 w-4 shrink-0 text-text-muted opacity-0 transition-all duration-200 group-hover:translate-x-0.5 group-hover:text-accent group-hover:opacity-100`})]}),r&&(r.files||r.nodes)&&(0,H.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 pl-6`,children:[r.files!=null&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(Hr,{className:`h-3 w-3`}),` `,n(`common:counts.files`,{count:r.files})]}),r.nodes!=null&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(Qr,{className:`h-3 w-3`}),` `,n(`common:counts.symbols`,{count:r.nodes})]}),r.processes!=null&&r.processes>0&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-void px-2 py-0.5 text-[11px] text-text-muted`,children:[(0,H.jsx)(bi,{className:`h-3 w-3`}),` `,n(`common:counts.flows`,{count:r.processes})]})]})]})}var ua=({repos:e,onSelectRepo:t,onAnalyzeComplete:n})=>{let{t:r}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative animate-fade-in overflow-hidden rounded-3xl border border-border-default bg-surface p-7`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-28 -right-28 h-72 w-72 rounded-full bg-accent/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`pointer-events-none absolute -bottom-24 -left-24 h-56 w-56 rounded-full bg-node-function/6 blur-3xl`}),(0,H.jsx)(`div`,{className:`relative mb-6`,children:(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`div`,{className:`mb-2 inline-flex items-center gap-1.5`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 text-accent/70`}),(0,H.jsx)(`span`,{className:`text-[11px] font-medium tracking-widest text-accent/80 uppercase`,children:`GitNexus`})]}),(0,H.jsx)(`h2`,{className:`text-lg leading-snug font-semibold text-text-primary`,children:r(`landing.chooseRepository`)}),(0,H.jsx)(`p`,{className:`mx-auto mt-1.5 max-w-xs text-sm leading-relaxed text-text-secondary`,children:r(`landing.description`)})]})}),(0,H.jsx)(`div`,{className:`relative mb-5 space-y-2`,children:e.map(e=>(0,H.jsx)(la,{repo:e,onClick:()=>t(Re(e))},Re(e)))}),(0,H.jsxs)(`div`,{className:`mb-5 flex items-center gap-3`,children:[(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`}),(0,H.jsx)(`span`,{className:`text-[11px] tracking-widest text-text-muted uppercase`,children:r(`landing.orAnalyzeNew`)}),(0,H.jsx)(`div`,{className:`h-px flex-1 bg-border-subtle`})]}),(0,H.jsx)(`div`,{className:`relative`,children:(0,H.jsx)(oa,{variant:`onboarding`,onComplete:n})}),(0,H.jsx)(`p`,{className:`mt-5 text-center text-[11px] leading-relaxed text-text-muted`,children:r(`landing.footer`)})]})};function da({activeKey:e,children:t}){let[n,r]=(0,R.useState)(e),[i,a]=(0,R.useState)(!1),o=(0,R.useRef)(t),s=(0,R.useRef)(null);return!i&&e===n&&(o.current=t),(0,R.useEffect)(()=>(e!==n&&(a(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=null,r(e),a(!1)},300)),()=>{s.current&&clearTimeout(s.current)}),[e,n]),(0,H.jsx)(`div`,{className:`transition-[opacity,transform] duration-300 ease-out`,style:{opacity:+!i,transform:i?`scale(0.97) translateY(8px)`:`scale(1) translateY(0)`},children:i?o.current:t})}function fa(){let{t:e}=f(`onboarding`);return(0,H.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-emerald-500/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-emerald-500/8 blur-3xl`}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-emerald-500/30 bg-gradient-to-br from-emerald-500/20 to-emerald-600/10 shadow-[0_0_30px_rgba(16,185,129,0.15)]`,children:(0,H.jsx)(Nr,{className:`h-8 w-8 text-emerald-400`})}),(0,H.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-emerald-400`,children:e(`success.title`)}),(0,H.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:e(`success.description`)}),(0,H.jsx)(`div`,{className:`mt-6 flex items-center justify-center gap-2`,children:(0,H.jsx)(`div`,{className:`flex gap-1`,children:[0,1,2].map(e=>(0,H.jsx)(`div`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400/60`,style:{animationDelay:`${e*200}ms`}},e))})})]})]})}function pa({message:e}){let{t}=f([`common`,`onboarding`]);return(0,H.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl border border-accent/20 bg-surface p-7`,role:`status`,"aria-live":`polite`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none absolute -top-20 left-1/2 h-64 w-64 -translate-x-1/2 rounded-full bg-accent/8 blur-3xl`}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`div`,{className:`mx-auto mb-5 flex h-16 w-16 items-center justify-center rounded-2xl border border-accent/30 bg-gradient-to-br from-accent/20 to-accent-dim/10 shadow-glow-soft`,children:(0,H.jsx)(ni,{className:`h-8 w-8 animate-spin text-accent`})}),(0,H.jsx)(`h2`,{className:`mb-2 text-center text-lg font-semibold text-text-primary`,children:e||t(`common:progress.connectingShort`)}),(0,H.jsx)(`p`,{className:`text-center text-sm leading-relaxed text-text-secondary`,children:t(`onboarding:loading.largeRepoHint`)}),(0,H.jsx)(`div`,{className:`mt-5 flex items-center justify-center`,children:(0,H.jsx)(bi,{className:`h-4 w-4 text-accent/30`})})]})]})}var ma=({onServerConnect:e})=>{let{t}=f([`common`,`errors`]),[n,r]=(0,R.useState)(null),{isConnected:i,isProbing:a,isUnauthorized:o,startPolling:s,stopPolling:c,isPolling:l,backendUrl:u}=Pi(),[d,p]=(0,R.useState)(!1),m=(0,R.useRef)(!1),h=(0,R.useRef)(null),[g,_]=(0,R.useState)(`onboarding`),[v,y]=(0,R.useState)(``),b=(0,R.useRef)(null),[x,S]=(0,R.useState)([]),C=async()=>{_(`loading`),y(t(`common:progress.connectingShort`)),r(null);try{let e=await ct();if(e.length===0){_(`analyze`),m.current=!1;return}S(e),_(`landing`)}catch(e){if(e.name===`AbortError`)return;r(Yi(e,t)),_(`onboarding`)}},w=(0,R.useRef)(C);w.current=C;let T=n=>{m.current=!0,_(`loading`),y(t(`common:progress.loadingGraph`)),r(null),(async()=>{let i=new AbortController;b.current=i;try{let r=await Ct(u,(e,n,r)=>{if(e===`validating`)y(t(`common:progress.validatingServerEllipsis`));else if(e===`downloading`){let e=r?Math.round(n/r*100):null,i=(n/(1024*1024)).toFixed(1);y(e?t(`common:progress.downloadingWithPercent`,{percent:e}):t(`common:progress.downloadingMb`,{mb:i}))}else e===`extracting`&&y(t(`common:progress.processingGraph`))},i.signal,n);e&&await e(r,u)}catch(e){if(e.name===`AbortError`)return;r(Yi(e,t)),_(x.length>0?`landing`:`analyze`)}finally{b.current=null}})()};(0,R.useEffect)(()=>{!a&&!d&&p(!0)},[a,d]),(0,R.useEffect)(()=>{d&&!i&&!l&&!m.current&&s()},[d,i,l,s]),(0,R.useEffect)(()=>{i&&!m.current&&(m.current=!0,c(),_(`success`),h.current=setTimeout(()=>{h.current=null,w.current()},1200)),!i&&m.current&&!a&&(m.current=!1,h.current!==null&&(clearTimeout(h.current),h.current=null),_(`onboarding`),r(null))},[i,a,c]),(0,R.useEffect)(()=>()=>{h.current!==null&&clearTimeout(h.current),b.current?.abort()},[]);let E=d?g:null;return(0,H.jsxs)(`div`,{className:`flex min-h-screen items-center justify-center bg-void p-8`,children:[(0,H.jsxs)(`div`,{className:`pointer-events-none fixed inset-0`,children:[(0,H.jsx)(`div`,{className:`absolute top-1/4 left-1/4 h-96 w-96 rounded-full bg-accent/10 blur-3xl`}),(0,H.jsx)(`div`,{className:`absolute right-1/4 bottom-1/4 h-96 w-96 rounded-full bg-node-interface/10 blur-3xl`})]}),(0,H.jsxs)(`div`,{className:`relative w-full max-w-lg`,children:[n&&(0,H.jsx)(`div`,{className:`mb-4 animate-fade-in rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-center text-sm text-red-400`,children:n}),o&&!i&&(0,H.jsx)(Ii,{onSubmit:()=>{l||s()}}),!o&&E&&(0,H.jsxs)(da,{activeKey:E,children:[E===`onboarding`&&(0,H.jsx)(Hi,{isPolling:l}),E===`analyze`&&(0,H.jsx)(sa,{onComplete:T}),E===`landing`&&(0,H.jsx)(ua,{repos:x,onSelectRepo:T,onAnalyzeComplete:T}),E===`success`&&(0,H.jsx)(fa,{}),E===`loading`&&(0,H.jsx)(pa,{message:v})]})]})]})},ha=({progress:e})=>{let{t}=f([`common`,`graph`]),n=Wi(e.message,t),r=Wi(e.detail,t);return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col items-center justify-center bg-void`,children:[(0,H.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,children:[(0,H.jsx)(`div`,{className:`absolute top-1/3 left-1/3 h-96 w-96 animate-pulse rounded-full bg-accent/10 blur-3xl`}),(0,H.jsx)(`div`,{className:`absolute right-1/3 bottom-1/3 h-96 w-96 animate-pulse rounded-full bg-node-interface/10 blur-3xl`})]}),(0,H.jsxs)(`div`,{className:`relative mb-10`,children:[(0,H.jsx)(`div`,{className:`h-28 w-28 animate-pulse-glow rounded-full bg-gradient-to-br from-accent to-node-interface`}),(0,H.jsx)(`div`,{className:`absolute inset-0 h-28 w-28 rounded-full bg-gradient-to-br from-accent to-node-interface opacity-50 blur-xl`})]}),(0,H.jsx)(`div`,{className:`mb-4 w-80`,children:(0,H.jsx)(`div`,{className:`h-1.5 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300 ease-out`,style:{width:`${e.percent}%`}})})}),(0,H.jsxs)(`div`,{className:`text-center`,children:[(0,H.jsxs)(`p`,{className:`mb-1 font-mono text-sm text-text-secondary`,children:[n,(0,H.jsx)(`span`,{className:`animate-pulse`,children:`|`})]}),e.detail&&(0,H.jsx)(`p`,{className:`max-w-md truncate font-mono text-xs text-text-muted`,children:r})]}),e.stats&&(0,H.jsxs)(`div`,{className:`mt-8 flex items-center gap-6 text-xs text-text-muted`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-file`}),(0,H.jsx)(`span`,{children:t(`graph:loading.filesProgress`,{processed:e.stats.filesProcessed,total:e.stats.totalFiles})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`h-2 w-2 rounded-full bg-node-function`}),(0,H.jsx)(`span`,{children:t(`common:counts.nodes`,{count:e.stats.nodesCreated})})]})]}),(0,H.jsxs)(`p`,{className:`mt-4 font-mono text-3xl font-semibold text-text-primary`,children:[e.percent,`%`]})]})},ga=({isOpen:e,onClose:t,onUseCPU:n,onSkip:r,nodeCount:i})=>{let{t:a}=f(`graph`),[o,s]=(0,R.useState)(!0),[c,l]=(0,R.useState)(!1);if((0,R.useEffect)(()=>{e?requestAnimationFrame(()=>l(!0)):l(!1)},[e]),!e)return null;let u=Math.ceil(i*50/6e4),d=i<200;return(0,H.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm transition-opacity duration-200 ${c?`opacity-100`:`opacity-0`}`,onClick:t}),(0,H.jsxs)(`div`,{className:`relative mx-4 w-full max-w-md overflow-hidden rounded-2xl border border-border-subtle bg-surface shadow-2xl transition-all duration-200 ${c?`scale-100 opacity-100`:`scale-95 opacity-0`}`,children:[(0,H.jsxs)(`div`,{className:`relative border-b border-border-subtle bg-gradient-to-r from-amber-500/20 to-orange-500/20 px-6 py-5`,children:[(0,H.jsx)(`button`,{onClick:t,className:`absolute top-4 right-4 p-1 text-text-muted transition-colors hover:text-text-primary`,children:(0,H.jsx)(ji,{className:`h-5 w-5`})}),(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsx)(`div`,{className:`text-5xl ${o?`animate-bounce`:``}`,onAnimationEnd:()=>s(!1),onClick:()=>s(!0),children:`🤔`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-lg font-semibold text-text-primary`,children:a(`embedding.fallback.title`)}),(0,H.jsx)(`p`,{className:`mt-0.5 text-sm text-text-muted`,children:a(`embedding.fallback.subtitle`)})]})]})]}),(0,H.jsxs)(`div`,{className:`space-y-4 px-6 py-5`,children:[(0,H.jsx)(`p`,{className:`text-sm leading-relaxed text-text-secondary`,children:a(`embedding.fallback.description`)}),(0,H.jsxs)(`div`,{className:`rounded-lg border border-border-subtle bg-elevated/50 p-4`,children:[(0,H.jsx)(`p`,{className:`text-sm text-text-secondary`,children:(0,H.jsx)(`span`,{className:`font-medium text-text-primary`,children:a(`embedding.fallback.options`)})}),(0,H.jsxs)(`ul`,{className:`mt-2 space-y-1.5 text-sm text-text-muted`,children:[(0,H.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(yi,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-amber-400`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.useCpu`)}),` `,`—`,` `,a(d?`embedding.fallback.useCpuDescriptionSmall`:`embedding.fallback.useCpuDescriptionLarge`),i>0&&(0,H.jsxs)(`span`,{className:`text-text-muted`,children:[` `,a(`embedding.fallback.estimated`,{minutes:u,count:i})]})]})]}),(0,H.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(vi,{className:`mt-0.5 h-4 w-4 flex-shrink-0 text-blue-400`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{className:`text-text-secondary`,children:a(`embedding.fallback.skipIt`)}),` `,`— `,a(`embedding.fallback.skipDescription`)]})]})]})]}),d&&(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 rounded-lg bg-node-function/10 px-3 py-2 text-xs text-node-function`,children:[(0,H.jsx)(fi,{className:`h-3.5 w-3.5`}),a(`embedding.fallback.smallCodebase`)]}),(0,H.jsx)(`p`,{className:`text-xs text-text-muted`,children:a(`embedding.fallback.tip`)})]}),(0,H.jsxs)(`div`,{className:`flex gap-3 border-t border-border-subtle bg-elevated/30 px-6 py-4`,children:[(0,H.jsxs)(`button`,{onClick:r,className:`flex flex-1 items-center justify-center gap-2 rounded-lg border border-border-subtle bg-surface px-4 py-2.5 text-sm font-medium text-text-secondary transition-all hover:bg-hover hover:text-text-primary`,children:[(0,H.jsx)(vi,{className:`h-4 w-4`}),a(`embedding.fallback.skipEmbeddings`)]}),(0,H.jsxs)(`button`,{onClick:n,className:`flex flex-1 items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-sm font-medium transition-all ${d?`bg-node-function text-white hover:bg-node-function/90`:`border border-amber-500/30 bg-amber-500/20 text-amber-300 hover:bg-amber-500/30`}`,children:[(0,H.jsx)(yi,{className:`h-4 w-4`}),a(d?`embedding.fallback.useCpuRecommended`:`embedding.fallback.useCpuSlow`)]})]})]})]})},_a=()=>{let{t:e}=f(`graph`),{embeddingStatus:t,embeddingProgress:n,startEmbeddings:r,graph:i,viewMode:a,serverBaseUrl:o}=Er(),[s,c]=(0,R.useState)(!1);if(a!==`exploring`||!i||o)return null;let l=i.nodes.length,u=async e=>{try{await r()}catch(e){e?.name===`WebGPUNotAvailableError`||e?.message?.includes(`WebGPU not available`)?c(!0):console.error(`Embedding failed:`,e)}},d=(0,H.jsx)(ga,{isOpen:s,onClose:()=>c(!1),onUseCPU:()=>{c(!1),u(`wasm`)},onSkip:()=>{c(!1)},nodeCount:l});if(t===`idle`)return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,H.jsxs)(`button`,{onClick:()=>u(),className:`group flex items-center gap-2 rounded-lg border border-border-subtle bg-surface px-3 py-1.5 text-sm text-text-secondary transition-all hover:border-accent/50 hover:bg-hover hover:text-text-primary`,title:e(`embedding.generateTitle`),children:[(0,H.jsx)(Mr,{className:`h-4 w-4 text-node-interface transition-colors group-hover:text-accent`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:e(`embedding.enable`)}),(0,H.jsx)(Mi,{className:`h-3 w-3 text-text-muted`})]})}),d]});if(t===`loading`){let t=n?.percent??0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-accent/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-accent`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.loadingModel`)}),(0,H.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-accent to-node-interface transition-all duration-300`,style:{width:`${t}%`}})})]})]}),d]})}if(t===`embedding`){let t=n?.percent??0;return(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-node-function/30 bg-surface px-3 py-1.5 text-sm`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-node-function`}),(0,H.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,H.jsx)(`span`,{className:`text-xs text-text-secondary`,children:e(`embedding.embeddingNodes`,{processed:0,total:0})}),(0,H.jsx)(`div`,{className:`h-1 w-24 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-gradient-to-r from-node-function to-accent transition-all duration-300`,style:{width:`${t}%`}})})]})]})}return t===`indexing`?(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-interface/30 bg-surface px-3 py-1.5 text-sm text-text-secondary`,children:[(0,H.jsx)(ni,{className:`h-4 w-4 animate-spin text-node-interface`}),(0,H.jsx)(`span`,{className:`text-xs`,children:e(`embedding.creatingIndex`)})]}):t===`ready`?(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-node-function/30 bg-node-function/10 px-3 py-1.5 text-sm text-node-function`,title:e(`embedding.readyTitle`),children:[(0,H.jsx)(Nr,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`text-xs font-medium`,children:e(`embedding.ready`)})]}):t===`error`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`button`,{onClick:()=>u(),className:`flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-1.5 text-sm text-red-400 transition-colors hover:bg-red-500/20`,title:e(`embedding.errorTitle`),children:[(0,H.jsx)(Lr,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`text-xs`,children:e(`embedding.failedRetry`)})]}),d]}):null},va=()=>{let{t:e,i18n:t}=f(`header`),n=t.resolvedLanguage||t.language,r=Gn.find(e=>e.code.toLowerCase()===n.toLowerCase())??Gn[0],i=e=>{t.changeLanguage(e)};return(0,H.jsxs)(`label`,{className:`flex h-9 items-center gap-1.5 rounded-md border border-border-subtle bg-surface px-2 text-text-secondary transition-colors hover:border-border-default hover:bg-hover hover:text-text-primary`,title:e(`selectLanguage`),children:[(0,H.jsx)(qr,{className:`h-4 w-4`,"aria-hidden":`true`}),(0,H.jsx)(`span`,{className:`sr-only`,children:e(`language`)}),(0,H.jsx)(`select`,{"data-testid":`language-switcher`,value:r.code,"aria-label":e(`selectLanguage`),onChange:e=>i(e.target.value),className:`cursor-pointer border-none bg-transparent text-xs font-medium outline-none`,children:Gn.map(e=>(0,H.jsx)(`option`,{value:e.code,className:`bg-surface text-text-primary`,children:e.nativeName},e.code))})]})},ya={Folder:`#6366f1`,File:`#3b82f6`,Function:`#10b981`,Class:`#f59e0b`,Method:`#14b8a6`,Interface:`#ec4899`,Variable:`#64748b`,Import:`#475569`,Type:`#a78bfa`},ba=({onFocusNode:e,availableRepos:t=[],onSwitchRepo:n,onAnalyzeComplete:r,onReposChanged:i})=>{let{t:a}=f([`common`,`header`,`errors`]),{projectName:o,currentRepo:s,graph:c,graphMode:l,openChatPanel:u,isRightPanelOpen:d,rightPanelTab:m,setSettingsPanelOpen:h,setHelpDialogBoxOpen:g}=Er(),[_,v]=(0,R.useState)(``),[y,b]=(0,R.useState)(``),[x,S]=(0,R.useState)(!1),[C,w]=(0,R.useState)(!1),[T,E]=(0,R.useState)(null),[D,O]=(0,R.useState)(null),[k,A]=(0,R.useState)(null),j=(0,R.useRef)(null),M=(0,R.useRef)(null),[N,P]=(0,R.useState)(!1),[F,I]=(0,R.useState)(0),L=(0,R.useRef)(null),ee=(0,R.useRef)(null),te=c?.nodes.length??0,ne=c?.relationships.length??0,z=(0,R.useMemo)(()=>{if(!c||!_.trim())return[];let e=_.toLowerCase();return c.nodes.filter(t=>t.properties.name.toLowerCase().includes(e)).slice(0,10)},[c,_]),B=(0,R.useMemo)(()=>{let e=y.trim().toLowerCase();return e?t.filter(t=>t.name.toLowerCase().includes(e)):t},[t,y]),re=s??o;(0,R.useEffect)(()=>{let e=e=>{L.current&&!L.current.contains(e.target)&&P(!1),M.current&&!M.current.contains(e.target)&&(S(!1),w(!1),b(``))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]),(0,R.useEffect)(()=>()=>{j.current?.abort()},[]),(0,R.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),ee.current?.focus(),P(!0)),e.key===`Escape`&&(P(!1),ee.current?.blur())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let ie=e=>{if(!(!N||z.length===0)){if(e.key===`ArrowDown`)e.preventDefault(),I(e=>Math.min(e+1,z.length-1));else if(e.key===`ArrowUp`)e.preventDefault(),I(e=>Math.max(e-1,0));else if(e.key===`Enter`){e.preventDefault();let t=z[F];t&&ae(t)}}},ae=t=>{e?.(t.id),v(``),P(!1),I(0)};return(0,H.jsxs)(`header`,{className:`flex items-center justify-between border-b border-dashed border-border-subtle bg-deep px-5 py-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-gradient-to-br from-accent to-node-interface text-sm font-bold text-white shadow-glow`,children:`◇`}),(0,H.jsx)(`span`,{className:`text-[15px] font-semibold tracking-tight`,children:`GitNexus`})]}),o&&(0,H.jsxs)(`div`,{className:`relative`,ref:M,children:[(0,H.jsxs)(`button`,{"data-testid":`repo-switcher-trigger`,onClick:()=>{let e=!x;S(e),w(!1),e||b(``)},className:`flex cursor-pointer items-center gap-2 rounded-lg border px-3 py-1.5 text-sm transition-all ${x?`border-accent/40 bg-accent/10 text-text-primary`:`border-border-subtle bg-surface text-text-secondary hover:border-border-default hover:bg-hover`} `,children:[(0,H.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-node-function`}),(0,H.jsx)(`span`,{className:`max-w-[160px] truncate`,children:o}),(0,H.jsx)(Pr,{className:`h-3 w-3 text-text-muted transition-transform duration-200 ${x?`rotate-180`:``}`})]}),x&&(0,H.jsx)(`div`,{className:`absolute top-full left-0 z-50 mt-1.5 flex max-h-[calc(100vh-4.5rem)] w-80 animate-slide-up flex-col overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:C?(0,H.jsx)(`div`,{className:`scrollbar-thin overflow-y-auto p-4`,children:(0,H.jsx)(oa,{variant:`sheet`,onComplete:e=>{w(!1),S(!1),b(``),r?.(e)},onCancel:()=>w(!1)})}):(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[t.length>0&&(0,H.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,H.jsx)(`div`,{className:`shrink-0 px-3 pt-2.5 pb-1.5 text-[10px] font-medium tracking-wider text-text-muted uppercase`,children:a(`header:repositories`)}),(0,H.jsx)(`div`,{className:`shrink-0 px-3 pb-2`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border-subtle bg-deep/70 px-2.5 py-1.5 transition-colors focus-within:border-accent/60`,children:[(0,H.jsx)(mi,{className:`h-3.5 w-3.5 shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{type:`text`,"aria-label":a(`header:searchRepositories`),placeholder:a(`header:searchRepositories`),value:y,onChange:e=>b(e.target.value),className:`min-w-0 flex-1 border-none bg-transparent text-xs text-text-primary outline-none placeholder:text-text-muted`})]})}),(0,H.jsx)(`div`,{className:`scrollbar-thin min-h-0 flex-1 overflow-y-auto pb-1`,children:B.length===0?(0,H.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noRepositoriesFound`,{query:y})}):B.map(e=>{let t=Re(e),o=t===re;return(0,H.jsxs)(`div`,{"data-testid":`repo-switcher-row`,"data-active":o,className:`group flex items-center gap-2 px-4 py-2 transition-colors ${o?`border-l-2 border-accent bg-accent/10`:`hover:bg-hover`}`,children:[(0,H.jsxs)(`button`,{onClick:()=>{o||n?.(t),S(!1),b(``)},className:`flex min-w-0 flex-1 cursor-pointer items-center gap-3 text-left`,children:[(0,H.jsx)(Ur,{className:`h-3.5 w-3.5 shrink-0 text-node-folder`}),(0,H.jsx)(`span`,{className:`flex-1 truncate font-mono text-sm text-text-primary`,children:e.name}),o&&(0,H.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-accent`,children:a(`header:active`)})]}),(0,H.jsx)(`button`,{"data-testid":`repo-switcher-reanalyze`,onClick:async n=>{if(n.stopPropagation(),!T){E(t),A({phase:`queued`,percent:0,message:a(`common:progress.starting`)});try{let{jobId:n}=await vt({path:e.path,force:!0});j.current=bt(n,e=>A(e),()=>{E(null),A(null),j.current=null,r?.(t)},e=>{console.error(`Re-analyze failed:`,e),E(null),A(null),j.current=null})}catch(e){console.error(`Failed to start re-analysis:`,e),E(null),A(null)}}},disabled:!!T,className:`cursor-pointer rounded p-1 transition-all ${T===t?`text-accent`:`text-text-muted/0 group-hover:text-text-muted hover:!text-accent`}`,title:T===t?a(`header:reanalyzing`):a(`header:reanalyzeRepo`,{repoName:e.name}),children:(0,H.jsx)(di,{className:`h-3.5 w-3.5 ${T===t?`animate-spin`:``}`})}),(0,H.jsx)(`button`,{"data-testid":`repo-switcher-delete`,onClick:async e=>{e.stopPropagation(),T===t&&(j.current?.abort(),E(null),A(null),j.current=null),O(null);try{await ot(t);let e=await ct();if(i?.(e),o&&e.length>0){let t=new URL(window.location.href);t.searchParams.delete(`repo`),t.searchParams.delete(`project`),window.history.replaceState(null,``,t.toString()),n?.(Re(e[0]))}else if(e.length===0){let e=new URL(window.location.href);e.searchParams.delete(`repo`),e.searchParams.delete(`project`),e.searchParams.delete(`skipGraph`),window.history.replaceState(null,``,e.toString()),window.location.reload()}}catch(e){console.error(`Failed to delete repo:`,e),O(Yi(e,a))}},className:`cursor-pointer rounded p-1 text-text-muted/0 transition-all group-hover:text-text-muted hover:!text-red-400`,title:a(`header:deleteRepo`,{repoName:e.name}),children:(0,H.jsx)(Ei,{className:`h-3.5 w-3.5`})})]},t)})})]}),D&&(0,H.jsx)(`div`,{className:`px-3 py-2 text-xs text-red-400`,role:`alert`,children:D}),T&&k&&(0,H.jsxs)(`div`,{className:`border-t border-border-subtle bg-accent/5 px-4 py-2.5`,children:[(0,H.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,H.jsx)(ni,{className:`h-3 w-3 shrink-0 animate-spin text-accent`}),(0,H.jsx)(`span`,{className:`truncate text-xs text-text-secondary`,children:a(`header:reanalyzingRepo`,{repoName:t.find(e=>Re(e)===T)?.name??T.split(/[/\\]/).filter(Boolean).at(-1)??T,message:Wi(k.message,a)})})]}),(0,H.jsx)(`div`,{className:`h-1 overflow-hidden rounded-full bg-elevated`,children:(0,H.jsx)(`div`,{className:`h-full rounded-full bg-accent transition-all duration-300`,style:{width:`${Math.max(2,k.percent)}%`}})})]}),(0,H.jsx)(`div`,{className:t.length>0||T?`border-t border-border-subtle`:``,children:(0,H.jsxs)(`button`,{onClick:()=>{b(``),w(!0)},disabled:!!T,className:`flex w-full cursor-pointer items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-hover disabled:cursor-not-allowed disabled:opacity-50`,children:[(0,H.jsx)(bi,{className:`h-3.5 w-3.5 shrink-0 text-accent`}),(0,H.jsx)(`span`,{className:`text-sm text-text-secondary`,children:a(`header:analyzeNew`)})]})})]})})]})]}),(0,H.jsxs)(`div`,{className:`relative mx-6 max-w-md flex-1`,ref:L,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-lg border border-border-subtle bg-surface px-3.5 py-2 transition-all focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/20`,children:[(0,H.jsx)(mi,{className:`h-4 w-4 flex-shrink-0 text-text-muted`}),(0,H.jsx)(`input`,{ref:ee,type:`text`,placeholder:a(`header:searchNodes`),value:_,onChange:e=>{v(e.target.value),P(!0),I(0)},onFocus:()=>P(!0),onKeyDown:ie,className:`flex-1 border-none bg-transparent text-sm text-text-primary outline-none placeholder:text-text-muted`}),(0,H.jsx)(`kbd`,{className:`rounded border border-border-subtle bg-elevated px-1.5 py-0.5 font-mono text-[10px] text-text-muted`,children:`⌘K`})]}),N&&_.trim()&&(0,H.jsx)(`div`,{className:`absolute top-full right-0 left-0 z-50 mt-1 overflow-hidden rounded-xl border border-border-subtle bg-surface shadow-xl`,children:z.length===0?(0,H.jsx)(`div`,{className:`px-4 py-3 text-sm text-text-muted`,children:a(`header:noNodesFound`,{query:_})}):(0,H.jsx)(`div`,{className:`max-h-80 overflow-y-auto`,children:z.map((e,t)=>(0,H.jsxs)(`button`,{onClick:()=>ae(e),className:`flex w-full cursor-pointer items-center gap-3 px-4 py-2.5 text-left transition-colors ${t===F?`bg-accent/20 text-text-primary`:`text-text-secondary hover:bg-hover`}`,children:[(0,H.jsx)(`span`,{className:`h-2.5 w-2.5 flex-shrink-0 rounded-full`,style:{backgroundColor:ya[e.label]||`#6b7280`}}),(0,H.jsx)(`span`,{className:`flex-1 truncate text-sm font-medium`,children:e.properties.name}),(0,H.jsx)(`span`,{className:`rounded bg-elevated px-2 py-0.5 text-xs text-text-muted`,children:e.label})]},e.id))})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`a`,{href:`https://github.com/abhigyanpatwari/GitNexus`,target:`_blank`,rel:`noopener noreferrer`,className:`group flex items-center gap-2 rounded-lg bg-gradient-to-r from-purple-600 to-pink-600 px-3.5 py-2 text-sm font-medium text-white shadow-lg transition-all duration-200 hover:-translate-y-0.5 hover:from-purple-500 hover:to-pink-500 hover:shadow-xl`,children:[(0,H.jsx)(p,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:a(`header:starIfCool`)}),(0,H.jsx)(Si,{className:`h-3.5 w-3.5 transition-all group-hover:fill-yellow-300 group-hover:text-yellow-300`}),(0,H.jsx)(`span`,{className:`hidden sm:inline`,children:`✨`})]}),c&&l!==`chatOnly`&&(0,H.jsxs)(`div`,{className:`mr-2 flex items-center gap-4 text-xs text-text-muted`,children:[(0,H.jsx)(`span`,{children:a(`common:counts.nodes`,{count:te})}),(0,H.jsx)(`span`,{children:a(`common:counts.edges`,{count:ne})})]}),(0,H.jsx)(_a,{}),(0,H.jsx)(va,{}),(0,H.jsx)(`button`,{onClick:()=>h(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,title:a(`header:aiSettings`),children:(0,H.jsx)(_i,{className:`h-4.5 w-4.5`})}),(0,H.jsx)(`button`,{title:a(`header:help`),onClick:()=>g(!0),className:`flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-text-secondary transition-colors hover:bg-hover hover:text-text-primary`,children:(0,H.jsx)(Rr,{className:`h-4.5 w-4.5`})}),(0,H.jsxs)(`button`,{onClick:u,className:`flex items-center gap-1.5 rounded-lg px-3.5 py-2 text-sm font-medium transition-all ${d&&m===`chat`?`bg-accent text-white shadow-glow`:`bg-gradient-to-r from-accent to-accent-dim text-white shadow-glow hover:-translate-y-0.5 hover:shadow-lg`} `,children:[(0,H.jsx)(bi,{className:`h-4 w-4`}),(0,H.jsx)(`span`,{children:a(`common:app.nexusAI`)})]})]})]})};function xa(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Sa(e){var t=xa(e,`string`);return typeof t==`symbol`?t:t+``}function Ca(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Sa(r.key),r)}}function Ta(e,t,n){return t&&wa(e.prototype,t),n&&wa(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ea(e)}function Da(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Da=function(){return!!e})()}function Oa(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ka(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return Oa(e)}function Aa(e,t,n){return t=Ea(t),ka(e,Da()?Reflect.construct(t,n||[],Ea(e).constructor):t.apply(e,n))}function ja(e,t){return ja=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ja(e,t)}function Ma(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ja(e,t)}function Na(e){if(Array.isArray(e))return e}function Pa(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Fa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ia(e,t){if(e){if(typeof e==`string`)return Fa(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fa(e,t):void 0}}function La(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
15
15
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ra(e,t){return Na(e)||Pa(e,t)||Ia(e,t)||La()}var za={black:`#000000`,silver:`#C0C0C0`,gray:`#808080`,grey:`#808080`,white:`#FFFFFF`,maroon:`#800000`,red:`#FF0000`,purple:`#800080`,fuchsia:`#FF00FF`,green:`#008000`,lime:`#00FF00`,olive:`#808000`,yellow:`#FFFF00`,navy:`#000080`,blue:`#0000FF`,teal:`#008080`,aqua:`#00FFFF`,darkblue:`#00008B`,mediumblue:`#0000CD`,darkgreen:`#006400`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,springgreen:`#00FF7F`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,rebeccapurple:`#663399`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,dimgrey:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,slategrey:`#708090`,lightslategray:`#778899`,lightslategrey:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370DB`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,palevioletred:`#DB7093`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`},Ba=new Int8Array(4),Va=new Int32Array(Ba.buffer,0,1),Ha=new Float32Array(Ba.buffer,0,1),Ua=/^\s*rgba?\s*\(/,Wa=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Ga(e){var t=0,n=0,r=0,i=1;if(e[0]===`#`)e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(Ua.test(e)){var a=e.match(Wa);a&&(t=+a[1],n=+a[2],r=+a[3],a[4]&&(i=+a[4]))}return{r:t,g:n,b:r,a:i}}var Ka={};for(var qa in za)Ka[qa]=Ya(za[qa]),Ka[za[qa]]=Ka[qa];function Ja(e,t,n,r,i){return Va[0]=r<<24|n<<16|t<<8|e,i&&(Va[0]&=4278190079),Ha[0]}function Ya(e){if(e=e.toLowerCase(),Ka[e]!==void 0)return Ka[e];var t=Ga(e),n=t.r,r=t.g,i=t.b,a=t.a;a=a*255|0;var o=Ja(n,r,i,a,!0);return Ka[e]=o,o}var Xa={};function Za(e){if(Xa[e]!==void 0)return Xa[e];var t=Ja((e&16711680)>>>16,(e&65280)>>>8,e&255,255,!0);return Xa[e]=t,t}function Qa(e,t,n,r){return n+(t<<8)+(e<<16)}function $a(e,t,n,r,i,a){var o=Math.floor(n/a*i),s=Math.floor(e.drawingBufferHeight/a-r/a*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(o,s,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var l=Ra(c,4);return[l[0],l[1],l[2],l[3]]}function U(e,t,n){return(t=Sa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?eo(Object(n),!0).forEach(function(t){U(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function to(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Ea(e))!==null;);return e}function no(){return no=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=to(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},no.apply(null,arguments)}function ro(e,t,n,r){var i=no(Ea(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}function io(e){return e.normalized?1:e.size}function ao(e){var t=0;return e.forEach(function(e){return t+=io(e)}),t}function oo(e,t,n){var r=e===`VERTEX`?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw Error(`loadShader: error while creating the shader`);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(i);throw t.deleteShader(i),Error(`loadShader: error while compiling the shader:
16
16
  ${a}
17
17
  ${n}`)}return i}function so(e,t){return oo(`VERTEX`,e,t)}function G(e,t){return oo(`FRAGMENT`,e,t)}function co(e,t){var n=e.createProgram();if(n===null)throw Error(`loadProgram: error while creating the program.`);var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS)){var a=e.getProgramInfoLog(n);throw e.deleteProgram(n),Error(`loadProgram: error while linking the program: ${a}`)}return n}function lo(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,a=e.fragmentShader;t.deleteShader(i),t.deleteShader(a),t.deleteProgram(r),t.deleteBuffer(n)}var uo=`#define PICKING_MODE