repodna-engine 1.0.1__py3-none-any.whl
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.
- repodna/__init__.py +3 -0
- repodna/__main__.py +10 -0
- repodna/advisor/__init__.py +17 -0
- repodna/advisor/engine.py +502 -0
- repodna/advisor/models.py +101 -0
- repodna/agent/__init__.py +87 -0
- repodna/agent/context.py +558 -0
- repodna/agent/deltas.py +198 -0
- repodna/agent/evidence.py +134 -0
- repodna/agent/expansion.py +447 -0
- repodna/agent/localization.py +518 -0
- repodna/agent/models.py +695 -0
- repodna/agent/patch.py +378 -0
- repodna/agent/postflight.py +278 -0
- repodna/agent/preflight.py +336 -0
- repodna/agent/ranking.py +318 -0
- repodna/agent/repo_map.py +392 -0
- repodna/agent/safety.py +111 -0
- repodna/agent/service.py +574 -0
- repodna/agent/sessions.py +264 -0
- repodna/agent/task.py +660 -0
- repodna/agent/telemetry.py +101 -0
- repodna/agent/token_budget.py +231 -0
- repodna/api/__init__.py +1 -0
- repodna/api/agent_routes.py +248 -0
- repodna/api/app.py +2904 -0
- repodna/benchmarks/__init__.py +29 -0
- repodna/benchmarks/baselines.py +126 -0
- repodna/benchmarks/budget_bench.py +162 -0
- repodna/benchmarks/engine.py +418 -0
- repodna/benchmarks/evaluator.py +310 -0
- repodna/benchmarks/metrics.py +206 -0
- repodna/benchmarks/models.py +194 -0
- repodna/benchmarks/scalability.py +166 -0
- repodna/brain/__init__.py +46 -0
- repodna/brain/evidence.py +276 -0
- repodna/brain/extractor.py +1207 -0
- repodna/brain/indexer.py +766 -0
- repodna/brain/models.py +275 -0
- repodna/brain/multilang_extractors.py +889 -0
- repodna/brain/retrieval.py +469 -0
- repodna/brain/tracer.py +203 -0
- repodna/cli/__init__.py +1 -0
- repodna/cli/__main__.py +10 -0
- repodna/cli/agent_cmd.py +228 -0
- repodna/cli/installer.py +590 -0
- repodna/cli/main.py +2173 -0
- repodna/cli/plugin_cmd.py +130 -0
- repodna/cli/workspace_cmd.py +211 -0
- repodna/context/__init__.py +9 -0
- repodna/context/builder.py +379 -0
- repodna/context/models.py +133 -0
- repodna/contract/__init__.py +39 -0
- repodna/contract/evaluator.py +318 -0
- repodna/contract/loader.py +260 -0
- repodna/contract/models.py +185 -0
- repodna/core/__init__.py +1 -0
- repodna/core/analyzer.py +1424 -0
- repodna/diff/__init__.py +35 -0
- repodna/diff/engine.py +332 -0
- repodna/diff/models.py +117 -0
- repodna/diff/snapshot.py +248 -0
- repodna/ecosystem/__init__.py +27 -0
- repodna/ecosystem/contracts.py +129 -0
- repodna/ecosystem/doctor.py +253 -0
- repodna/git_insights/__init__.py +1 -0
- repodna/git_insights/analyzer.py +273 -0
- repodna/graph/__init__.py +1 -0
- repodna/graph/engine.py +562 -0
- repodna/guardian/__init__.py +17 -0
- repodna/guardian/engine.py +369 -0
- repodna/guardian/models.py +104 -0
- repodna/history/__init__.py +40 -0
- repodna/history/cache.py +240 -0
- repodna/history/diff.py +394 -0
- repodna/history/engine.py +557 -0
- repodna/history/evidence.py +160 -0
- repodna/history/models.py +258 -0
- repodna/history/timeline.py +164 -0
- repodna/intelligence/__init__.py +33 -0
- repodna/intelligence/models.py +165 -0
- repodna/intelligence/service.py +570 -0
- repodna/live/__init__.py +94 -0
- repodna/live/alerts.py +443 -0
- repodna/live/coordinator.py +351 -0
- repodna/live/diff.py +444 -0
- repodna/live/events.py +471 -0
- repodna/live/filtering.py +329 -0
- repodna/live/history.py +637 -0
- repodna/live/models.py +505 -0
- repodna/live/observer.py +653 -0
- repodna/live/reconciliation.py +253 -0
- repodna/live/session.py +1547 -0
- repodna/mcp/__init__.py +5 -0
- repodna/mcp/__main__.py +6 -0
- repodna/mcp/agent_tools.py +258 -0
- repodna/mcp/server.py +3283 -0
- repodna/mcp/workspace_tools.py +200 -0
- repodna/parsers/__init__.py +13 -0
- repodna/parsers/base.py +126 -0
- repodna/parsers/capabilities.py +361 -0
- repodna/parsers/project_metadata.py +232 -0
- repodna/parsers/resolver.py +621 -0
- repodna/parsers/treesitter_parser.py +830 -0
- repodna/passport/__init__.py +64 -0
- repodna/passport/generator.py +546 -0
- repodna/passport/migrator.py +139 -0
- repodna/passport/models.py +224 -0
- repodna/passport/validator.py +143 -0
- repodna/performance/__init__.py +89 -0
- repodna/performance/cache.py +1584 -0
- repodna/performance/identity.py +341 -0
- repodna/performance/incremental.py +317 -0
- repodna/performance/models.py +157 -0
- repodna/performance/parallel.py +291 -0
- repodna/plugins/__init__.py +47 -0
- repodna/plugins/evaluator.py +334 -0
- repodna/plugins/models.py +113 -0
- repodna/plugins/validator.py +256 -0
- repodna/quality/__init__.py +91 -0
- repodna/quality/complexity.py +352 -0
- repodna/quality/config.py +159 -0
- repodna/quality/debt.py +73 -0
- repodna/quality/duplicates.py +330 -0
- repodna/quality/engine.py +282 -0
- repodna/quality/impact.py +198 -0
- repodna/quality/models.py +427 -0
- repodna/quality/rules.py +364 -0
- repodna/quality/sarif.py +107 -0
- repodna/quality/security_signals.py +278 -0
- repodna/quality/test_mapping.py +271 -0
- repodna/quality/unused.py +201 -0
- repodna/reports/__init__.py +1 -0
- repodna/reports/exporter.py +374 -0
- repodna/rules/__init__.py +1 -0
- repodna/rules/health.py +436 -0
- repodna/schemas/__init__.py +1 -0
- repodna/schemas/models.py +348 -0
- repodna/security/__init__.py +1 -0
- repodna/security/safe_yaml.py +81 -0
- repodna/security/validators.py +583 -0
- repodna/skills/__init__.py +0 -0
- repodna/skills/repodna/SKILL.md +59 -0
- repodna/skills/repodna/__init__.py +0 -0
- repodna/skills/repodna/examples/workflows.md +85 -0
- repodna/skills/repodna/references/architecture-rules.md +26 -0
- repodna/storage/__init__.py +1 -0
- repodna/storage/workspace.py +199 -0
- repodna/webui/__init__.py +1 -0
- repodna/webui/assets/DependencyGraph-km_Qo-nG.js +43 -0
- repodna/webui/assets/HealthReportView-WVL39aNO.js +1 -0
- repodna/webui/assets/index-ByZ5e5pe.js +506 -0
- repodna/webui/assets/index-CDj3e8hw.css +1 -0
- repodna/webui/index.html +21 -0
- repodna/workspace/__init__.py +131 -0
- repodna/workspace/compatibility.py +317 -0
- repodna/workspace/context.py +175 -0
- repodna/workspace/contracts.py +369 -0
- repodna/workspace/federation.py +411 -0
- repodna/workspace/identity.py +202 -0
- repodna/workspace/impact.py +111 -0
- repodna/workspace/manifest.py +266 -0
- repodna/workspace/models.py +461 -0
- repodna/workspace/packages.py +494 -0
- repodna/workspace/policies.py +142 -0
- repodna/workspace/services.py +238 -0
- repodna/workspace/topology.py +316 -0
- repodna_engine-1.0.1.dist-info/METADATA +129 -0
- repodna_engine-1.0.1.dist-info/RECORD +173 -0
- repodna_engine-1.0.1.dist-info/WHEEL +5 -0
- repodna_engine-1.0.1.dist-info/entry_points.txt +2 -0
- repodna_engine-1.0.1.dist-info/licenses/LICENSE +21 -0
- repodna_engine-1.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,506 @@
|
|
|
1
|
+
var RN=Object.defineProperty;var DN=(s,i,r)=>i in s?RN(s,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[i]=r;var Bf=(s,i,r)=>DN(s,typeof i!="symbol"?i+"":i,r);(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function wb(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var $f={exports:{}},br={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var ny;function ON(){if(ny)return br;ny=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(o,c,f){var m=null;if(f!==void 0&&(m=""+f),c.key!==void 0&&(m=""+c.key),"key"in c){f={};for(var h in c)h!=="key"&&(f[h]=c[h])}else f=c;return c=f.ref,{$$typeof:s,type:o,key:m,ref:c!==void 0?c:null,props:f}}return br.Fragment=i,br.jsx=r,br.jsxs=r,br}var ay;function LN(){return ay||(ay=1,$f.exports=ON()),$f.exports}var n=LN(),qf={exports:{}},De={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var sy;function zN(){if(sy)return De;sy=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.for("react.view_transition"),N=Symbol.iterator;function j(k){return k===null||typeof k!="object"?null:(k=N&&k[N]||k["@@iterator"],typeof k=="function"?k:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,_={};function K(k,M,ie){this.props=k,this.context=M,this.refs=_,this.updater=ie||T}K.prototype.isReactComponent={},K.prototype.setState=function(k,M){if(typeof k!="object"&&typeof k!="function"&&k!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,k,M,"setState")},K.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function z(){}z.prototype=K.prototype;function D(k,M,ie){this.props=k,this.context=M,this.refs=_,this.updater=ie||T}var O=D.prototype=new z;O.constructor=D,H(O,K.prototype),O.isPureReactComponent=!0;var U=Array.isArray;function q(){}var C={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function G(k,M,ie){var ce=ie.ref;return{$$typeof:s,type:k,key:M,ref:ce!==void 0?ce:null,props:ie}}function Y(k,M){return G(k.type,M,k.props)}function I(k){return typeof k=="object"&&k!==null&&k.$$typeof===s}function W(k){var M={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ie){return M[ie]})}var w=/\/+/g;function R(k,M){return typeof k=="object"&&k!==null&&k.key!=null?W(""+k.key):M.toString(36)}function A(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(q,q):(k.status="pending",k.then(function(M){k.status==="pending"&&(k.status="fulfilled",k.value=M)},function(M){k.status==="pending"&&(k.status="rejected",k.reason=M)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function V(k,M,ie,ce,me){var ge=typeof k;(ge==="undefined"||ge==="boolean")&&(k=null);var je=!1;if(k===null)je=!0;else switch(ge){case"bigint":case"string":case"number":je=!0;break;case"object":switch(k.$$typeof){case s:case i:je=!0;break;case y:return je=k._init,V(je(k._payload),M,ie,ce,me)}}if(je)return me=me(k),je=ce===""?"."+R(k,0):ce,U(me)?(ie="",je!=null&&(ie=je.replace(w,"$&/")+"/"),V(me,M,ie,"",function(Ce){return Ce})):me!=null&&(I(me)&&(me=Y(me,ie+(me.key==null||k&&k.key===me.key?"":(""+me.key).replace(w,"$&/")+"/")+je)),M.push(me)),1;je=0;var ue=ce===""?".":ce+":";if(U(k))for(var ye=0;ye<k.length;ye++)ce=k[ye],ge=ue+R(ce,ye),je+=V(ce,M,ie,ge,me);else if(ye=j(k),typeof ye=="function")for(k=ye.call(k),ye=0;!(ce=k.next()).done;)ce=ce.value,ge=ue+R(ce,ye++),je+=V(ce,M,ie,ge,me);else if(ge==="object"){if(typeof k.then=="function")return V(A(k),M,ie,ce,me);throw M=String(k),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return je}function B(k,M,ie){if(k==null)return k;var ce=[],me=0;return V(k,ce,"","",function(ge){return M.call(ie,ge,me++)}),ce}function P(k){if(k._status===-1){var M=k._result,ie=M();ie.then(function(ce){(k._status===0||k._status===-1)&&(k._status=1,k._result=ce,ie.status===void 0&&(ie.status="fulfilled",ie.value=ce))},function(ce){(k._status===0||k._status===-1)&&(k._status=2,k._result=ce,ie.status===void 0&&(ie.status="rejected",ie.reason=ce))}),k._status===-1&&(k._status=0,k._result=ie)}if(k._status===1)return k._result.default;throw k._result}var te=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)};function le(k){var M=C.T,ie={};ie.types=M!==null?M.types:null,C.T=ie;try{var ce=k(),me=C.S;me!==null&&me(ie,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(q,te)}catch(ge){te(ge)}finally{M!==null&&ie.types!==null&&(M.types=ie.types),C.T=M}}function pe(k){var M=C.T;if(M!==null){var ie=M.types;ie===null?M.types=[k]:ie.indexOf(k)===-1&&ie.push(k)}else le(pe.bind(null,k))}var ve={map:B,forEach:function(k,M,ie){B(k,function(){M.apply(this,arguments)},ie)},count:function(k){var M=0;return B(k,function(){M++}),M},toArray:function(k){return B(k,function(M){return M})||[]},only:function(k){if(!I(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return De.Activity=g,De.Children=ve,De.Component=K,De.Fragment=r,De.Profiler=c,De.PureComponent=D,De.StrictMode=o,De.Suspense=p,De.ViewTransition=b,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,De.__COMPILER_RUNTIME={__proto__:null,c:function(k){return C.H.useMemoCache(k)}},De.addTransitionType=pe,De.cache=function(k){return function(){return k.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(k,M,ie){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var ce=H({},k.props),me=k.key;if(M!=null)for(ge in M.key!==void 0&&(me=""+M.key),M)!F.call(M,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&M.ref===void 0||(ce[ge]=M[ge]);var ge=arguments.length-2;if(ge===1)ce.children=ie;else if(1<ge){for(var je=Array(ge),ue=0;ue<ge;ue++)je[ue]=arguments[ue+2];ce.children=je}return G(k.type,me,ce)},De.createContext=function(k){return k={$$typeof:m,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:f,_context:k},k},De.createElement=function(k,M,ie){var ce,me={},ge=null;if(M!=null)for(ce in M.key!==void 0&&(ge=""+M.key),M)F.call(M,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(me[ce]=M[ce]);var je=arguments.length-2;if(je===1)me.children=ie;else if(1<je){for(var ue=Array(je),ye=0;ye<je;ye++)ue[ye]=arguments[ye+2];me.children=ue}if(k&&k.defaultProps)for(ce in je=k.defaultProps,je)me[ce]===void 0&&(me[ce]=je[ce]);return G(k,ge,me)},De.createRef=function(){return{current:null}},De.forwardRef=function(k){return{$$typeof:h,render:k}},De.isValidElement=I,De.lazy=function(k){return{$$typeof:y,_payload:{_status:-1,_result:k},_init:P}},De.memo=function(k,M){return{$$typeof:v,type:k,compare:M===void 0?null:M}},De.startTransition=le,De.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},De.use=function(k){return C.H.use(k)},De.useActionState=function(k,M,ie){return C.H.useActionState(k,M,ie)},De.useCallback=function(k,M){return C.H.useCallback(k,M)},De.useContext=function(k){return C.H.useContext(k)},De.useDebugValue=function(){},De.useDeferredValue=function(k,M){return C.H.useDeferredValue(k,M)},De.useEffect=function(k,M){return C.H.useEffect(k,M)},De.useEffectEvent=function(k){return C.H.useEffectEvent(k)},De.useId=function(){return C.H.useId()},De.useImperativeHandle=function(k,M,ie){return C.H.useImperativeHandle(k,M,ie)},De.useInsertionEffect=function(k,M){return C.H.useInsertionEffect(k,M)},De.useLayoutEffect=function(k,M){return C.H.useLayoutEffect(k,M)},De.useMemo=function(k,M){return C.H.useMemo(k,M)},De.useOptimistic=function(k,M){return C.H.useOptimistic(k,M)},De.useReducer=function(k,M,ie){return C.H.useReducer(k,M,ie)},De.useRef=function(k){return C.H.useRef(k)},De.useState=function(k){return C.H.useState(k)},De.useSyncExternalStore=function(k,M,ie){return C.H.useSyncExternalStore(k,M,ie)},De.useTransition=function(){return C.H.useTransition()},De.version="19.3.1",De}var iy;function Cm(){return iy||(iy=1,qf.exports=zN()),qf.exports}var E=Cm();const _b=wb(E);var Gf={exports:{}},vr={},Vf={exports:{}},Yf={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ly;function HN(){return ly||(ly=1,(function(s){function i(A,V){var B=A.length;A.push(V);e:for(;0<B;){var P=B-1>>>1,te=A[P];if(0<c(te,V))A[P]=V,A[B]=te,B=P;else break e}}function r(A){return A.length===0?null:A[0]}function o(A){if(A.length===0)return null;var V=A[0],B=A.pop();if(B!==V){A[0]=B;e:for(var P=0,te=A.length,le=te>>>1;P<le;){var pe=2*(P+1)-1,ve=A[pe],k=pe+1,M=A[k];if(0>c(ve,B))k<te&&0>c(M,ve)?(A[P]=M,A[k]=B,P=k):(A[P]=ve,A[pe]=B,P=pe);else if(k<te&&0>c(M,B))A[P]=M,A[k]=B,P=k;else break e}}return V}function c(A,V){var B=A.sortIndex-V.sortIndex;return B!==0?B:A.id-V.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;s.unstable_now=function(){return f.now()}}else{var m=Date,h=m.now();s.unstable_now=function(){return m.now()-h}}var p=[],v=[],y=1,g=null,b=3,N=!1,j=!1,T=!1,H=!1,_=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function D(A){for(var V=r(v);V!==null;){if(V.callback===null)o(v);else if(V.startTime<=A)o(v),V.sortIndex=V.expirationTime,i(p,V);else break;V=r(v)}}function O(A){if(T=!1,D(A),!j)if(r(p)!==null)j=!0,U||(U=!0,I());else{var V=r(v);V!==null&&R(O,V.startTime-A)}}var U=!1,q=-1,C=5,F=-1;function G(){return H?!0:!(s.unstable_now()-F<C)}function Y(){if(H=!1,U){var A=s.unstable_now();F=A;var V=!0;try{e:{j=!1,T&&(T=!1,K(q),q=-1),N=!0;var B=b;try{t:{for(D(A),g=r(p);g!==null&&!(g.expirationTime>A&&G());){var P=g.callback;if(typeof P=="function"){g.callback=null,b=g.priorityLevel;var te=P(g.expirationTime<=A);if(A=s.unstable_now(),typeof te=="function"){g.callback=te,D(A),V=!0;break t}g===r(p)&&o(p),D(A)}else o(p);g=r(p)}if(g!==null)V=!0;else{var le=r(v);le!==null&&R(O,le.startTime-A),V=!1}}break e}finally{g=null,b=B,N=!1}V=void 0}}finally{V?I():U=!1}}}var I;if(typeof z=="function")I=function(){z(Y)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,w=W.port2;W.port1.onmessage=Y,I=function(){w.postMessage(null)}}else I=function(){_(Y,0)};function R(A,V){q=_(function(){A(s.unstable_now())},V)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(A){A.callback=null},s.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<A?Math.floor(1e3/A):5},s.unstable_getCurrentPriorityLevel=function(){return b},s.unstable_next=function(A){switch(b){case 1:case 2:case 3:var V=3;break;default:V=b}var B=b;b=V;try{return A()}finally{b=B}},s.unstable_requestPaint=function(){H=!0},s.unstable_runWithPriority=function(A,V){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var B=b;b=A;try{return V()}finally{b=B}},s.unstable_scheduleCallback=function(A,V,B){var P=s.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?P+B:P):B=P,A){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=B+te,A={id:y++,callback:V,priorityLevel:A,startTime:B,expirationTime:te,sortIndex:-1},B>P?(A.sortIndex=B,i(v,A),r(p)===null&&A===r(v)&&(T?(K(q),q=-1):T=!0,R(O,B-P))):(A.sortIndex=te,i(p,A),j||N||(j=!0,U||(U=!0,I()))),A},s.unstable_shouldYield=G,s.unstable_wrapCallback=function(A){var V=b;return function(){var B=b;b=V;try{return A.apply(this,arguments)}finally{b=B}}}})(Yf)),Yf}var ry;function UN(){return ry||(ry=1,Vf.exports=HN()),Vf.exports}var Ff={exports:{}},qt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var oy;function BN(){if(oy)return qt;oy=1;var s=Cm();function i(y){var g="https://react.dev/errors/"+y;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+y+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal"),f=Symbol.for("react.recoverable"),m=Symbol.for("react.optimistic_key");function h(y,g,b){var N=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:N==null?null:N===m?m:""+N,children:y,containerInfo:g,implementation:b}}var p=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(y,g){if(y==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,qt.browser=function(y){return{$$typeof:f,_reason:y}},qt.createPortal=function(y,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(i(299));return h(y,g,null,b)},qt.flushSync=function(y){var g=p.T,b=o.p;try{if(p.T=null,o.p=2,y)return y()}finally{p.T=g,o.p=b,o.d.f()}},qt.preconnect=function(y,g){typeof y=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(y,g))},qt.prefetchDNS=function(y){typeof y=="string"&&o.d.D(y)},qt.preinit=function(y,g){if(typeof y=="string"&&g&&typeof g.as=="string"){var b=g.as,N=v(b,g.crossOrigin),j=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?o.d.S(y,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:N,integrity:j,fetchPriority:T}):b==="script"&&o.d.X(y,{crossOrigin:N,integrity:j,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},qt.preinitModule=function(y,g){if(typeof y=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=v(g.as,g.crossOrigin);o.d.M(y,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}}else g==null&&o.d.M(y)},qt.preload=function(y,g){if(typeof y=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,N=v(b,g.crossOrigin);o.d.L(y,b,{crossOrigin:N,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},qt.preloadModule=function(y,g){if(typeof y=="string")if(g){var b=v(g.as,g.crossOrigin);o.d.m(y,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0})}else o.d.m(y)},qt.requestFormReset=function(y){o.d.r(y)},qt.unstable_batchedUpdates=function(y,g){return y(g)},qt.useFormState=function(y,g,b){return p.H.useFormState(y,g,b)},qt.useFormStatus=function(){return p.H.useHostTransitionStatus()},qt.version="19.3.1",qt}var cy;function $N(){if(cy)return Ff.exports;cy=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Ff.exports=BN(),Ff.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var dy;function qN(){if(dy)return vr;dy=1;var s=UN(),i=Cm(),r=$N();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){for(var t=e,a=t;a&&!a.alternate;)t=a,(t.flags&4098)!==0&&(e=t.return),a=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(o(188))}function v(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var d=a.return;if(d===null)break;var u=d.alternate;if(u===null){if(l=d.return,l!==null){a=l;continue}break}if(d.child===u.child){for(u=d.child;u;){if(u===a)return p(d),e;if(u===l)return p(d),t;u=u.sibling}throw Error(o(188))}if(a.return!==l.return)a=d,l=u;else{for(var x=!1,S=d.child;S;){if(S===a){x=!0,a=d,l=u;break}if(S===l){x=!0,l=d,a=u;break}S=S.sibling}if(!x){for(S=u.child;S;){if(S===a){x=!0,a=u,l=d;break}if(S===l){x=!0,l=u,a=d;break}S=S.sibling}if(!x)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}function g(e,t,a,l,d,u){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&a(e,l,d,u)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&g(e.child,t,a,l,d,u))return!0;e=e.sibling}return!1}function b(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function N(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function j(e){var t=[null,null],a=b(e);return a===null||T(t,e,a.child,{foundSelf:!1}),t}function T(e,t,a,l){for(;a!==null;){if(a===t)l.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(l.foundSelf)return e[1]=a,!0;e[0]=a}else if((a.tag!==22||a.memoizedState===null)&&T(e,t,a.child,l))return!0;a=a.sibling}return!1}function H(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(o(559))}}var _=null,K=null;function z(e,t,a){return e===a?!0:e===t?(_=e,!0):!1}function D(e,t,a){return e===a?(K=e,!1):e===t?(K!==null&&(_=e),!0):!1}function O(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function U(e,t,a){for(var l=0,d=e;d;d=a(d))l++;d=0;for(var u=t;u;u=a(u))d++;for(;0<l-d;)e=a(e),l--;for(;0<d-l;)t=a(t),d--;for(;l--;){if(e===t||t!==null&&e===t.alternate)return e;e=a(e),t=a(t)}return null}var q=Object.assign,C=Symbol.for("react.element"),F=Symbol.for("react.transitional.element"),G=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),W=Symbol.for("react.profiler"),w=Symbol.for("react.consumer"),R=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),pe=Symbol.for("react.legacy_hidden"),ve=Symbol.for("react.memo_cache_sentinel"),k=Symbol.for("react.view_transition"),M=Symbol.for("react.recoverable"),ie=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case W:return"Profiler";case I:return"StrictMode";case V:return"Suspense";case B:return"SuspenseList";case le:return"Activity";case k:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case G:return"Portal";case R:return e.displayName||"Context";case w:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case te:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var je=Array.isArray,ue=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce={pending:!1,data:null,method:null,action:null},dt=[],Le=-1;function Ke(e){return{current:e}}function Ee(e){0>Le||(e.current=dt[Le],dt[Le]=null,Le--)}function de(e,t){Le++,dt[Le]=e.current,e.current=t}var Me=Ke(null),at=Ke(null),J=Ke(null),Se=Ke(null);function rt(e,t){switch(de(J,t),de(at,e),de(Me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ug(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ug(t),e=fg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ee(Me),de(Me,e)}function ut(){Ee(Me),Ee(at),Ee(J)}function yt(e){var t=e.memoizedState;t!==null&&(tl._currentValue=t.memoizedState,de(Se,e)),t=Me.current;var a=fg(t,e.type);t!==a&&(de(at,e),de(Me,a))}function Je(e){at.current===e&&(Ee(Me),Ee(at)),Se.current===e&&(Ee(Se),tl._currentValue=Ce)}var fe,Xe;function $e(e){if(fe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Xe=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+fe+e+Xe}var It=!1;function en(e,t){if(!e||It)return"";It=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(xe){var X=xe}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(xe){X=xe}oe=!1;try{var ne=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),oe=!0,new e}finally{oe&&(ne!==void 0?Object.defineProperty(e.prototype,"props",ne):delete e.prototype.props)}}}else{try{throw Error()}catch(xe){X=xe}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(xe){if(xe&&X&&typeof xe.stack=="string")return[xe.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),x=u[0],S=u[1];if(x&&S){var L=x.split(`
|
|
44
|
+
`),Z=S.split(`
|
|
45
|
+
`);for(d=l=0;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;for(;d<Z.length&&!Z[d].includes("DetermineComponentFrameRoot");)d++;if(l===L.length||d===Z.length)for(l=L.length-1,d=Z.length-1;1<=l&&0<=d&&L[l]!==Z[d];)d--;for(;1<=l&&0<=d;l--,d--)if(L[l]!==Z[d]){if(l!==1||d!==1)do if(l--,d--,0>d||L[l]!==Z[d]){var se=`
|
|
46
|
+
`+L[l].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=l&&0<=d);break}}}finally{It=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?$e(a):""}function _n(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return en(e.type,!1);case 11:return en(e.type.render,!1);case 1:return en(e.type,!0);case 31:return $e("Activity");case 30:return $e("ViewTransition");default:return""}}function La(e){try{var t="",a=null;do t+=_n(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
+
Error generating stack: `+l.message+`
|
|
48
|
+
`+l.stack}}var ys=Object.prototype.hasOwnProperty,ui=s.unstable_scheduleCallback,bs=s.unstable_cancelCallback,Ir=s.unstable_shouldYield,vs=s.unstable_requestPaint,Ot=s.unstable_now,fi=s.unstable_getCurrentPriorityLevel,jl=s.unstable_ImmediatePriority,Ns=s.unstable_UserBlockingPriority,js=s.unstable_NormalPriority,wl=s.unstable_LowPriority,mi=s.unstable_IdlePriority,_l=s.log,ws=s.unstable_setDisableYieldValue,tn=null,vt=null;function Hn(e){if(typeof _l=="function"&&ws(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(tn,e)}catch{}}var Nt=Math.clz32?Math.clz32:Xr,hi=Math.log,Kr=Math.LN2;function Xr(e){return e>>>=0,e===0?32:31-(hi(e)/Kr|0)|0}var _s=256,za=262144,Ss=4194304;function Un(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&-e;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 ks(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var d=0,u=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=l&134217727;return S!==0?(l=S&~u,l!==0?d=Un(l):(x&=S,x!==0?d=Un(x):a||(a=S&~e,a!==0&&(d=Un(a))))):(S=l&~u,S!==0?d=Un(S):x!==0?d=Un(x):a||(a=l&~e,a!==0&&(d=Un(a)))),d===0?0:t!==0&&t!==d&&(t&u)===0&&(u=d&-d,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:d}function Zn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Cs(e,t){(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Nt(a),d=1<<l;t|=e[l],a&=~d}return t}function Sl(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 kl(){var e=Ss;return Ss<<=1,(Ss&62914560)===0&&(Ss=4194304),e}function Ts(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ha(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Cl(e,t,a,l,d,u){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var S=e.entanglements,L=e.expirationTimes,Z=e.hiddenUpdates;for(a=x&~a;0<a;){var se=31-Nt(a),oe=1<<se;S[se]=0,L[se]=-1;var X=Z[se];if(X!==null)for(Z[se]=null,se=0;se<X.length;se++){var ne=X[se];ne!==null&&(ne.lane&=-536870913)}a&=~oe}l!==0&&Tl(e,l,0),u!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=u&~(x&~t))}function Tl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Nt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function El(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Nt(a),d=1<<l;d&t|e[l]&t&&(e[l]|=t),a&=~d}}function Qr(e,t){var a=t&-t;return a=(a&42)!==0?1:nn(a),(a&(e.suspendedLanes|t))!==0?0:a}function nn(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 dn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bn(){var e=ye.p;return e!==0?e:(e=window.event,e===void 0?32:Qg(e.type))}function Es(e,t){var a=ye.p;try{return ye.p=e,t()}finally{ye.p=a}}var Sn=Math.random().toString(36).slice(2),jt="__reactFiber$"+Sn,mt="__reactProps$"+Sn,Ua="__reactContainer$"+Sn,Zr="__reactEvents$"+Sn,md="__reactListeners$"+Sn,hd="__reactHandles$"+Sn,Pr="__reactResources$"+Sn,As="__reactMarker$"+Sn,pi="__reactLoad$"+Sn;function xi(e){delete e[jt],delete e[mt],delete e[md],delete e[hd]}function fa(e){var t;if(t=e[jt])return t;for(var a=e.parentNode;a;){if(t=a[Ua]||a[jt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Eg(e);e!==null;){if(a=e[jt])return a;e=Eg(e)}return t}e=a,a=e.parentNode}return null}function kn(e){if(e=e[jt]||e[Ua]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ba(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Kt(e){var t=e[Pr];return t||(t=e[Pr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function wt(e){e[As]=!0}function Al(e){e[pi]=void 0}var Jr=new Set,Wr={};function $n(e,t){ma(e,t),ma(e+"Capture",t)}function ma(e,t){for(Wr[e]=t,e=0;e<t.length;e++)Jr.add(t[e])}var eo=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]*$"),ae={},Ae={};function Ue(e){return ys.call(Ae,e)?!0:ys.call(ae,e)?!1:eo.test(e)?Ae[e]=!0:(ae[e]=!0,!1)}var Oe=!1;function Vt(){var e=Oe;return Oe=!1,e}function it(e,t,a){if(Ue(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,a)}}function Yt(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,a)}}function Lt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,l)}}function qe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $a(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gi(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var d=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return d.call(this)},set:function(x){a=""+x,u.call(this,x)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function We(e){if(!e._valueTracker){var t=$a(e)?"checked":"value";e._valueTracker=gi(e,t,""+e[t])}}function yi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=$a(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}var W0=/[\n"\\]/g;function Cn(e){return e.replace(W0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pd(e,t,a,l,d,u,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qe(t)):e.value!==""+qe(t)&&(e.value=""+qe(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?x==="number"&&e.value==t?xd(e,qe(e.value)):xd(e,qe(t)):a!=null?xd(e,qe(a)):l!=null&&e.removeAttribute("value"),d==null&&u!=null&&(e.defaultChecked=!!u),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+qe(S):e.removeAttribute("name")}function eh(e,t,a,l,d,u,x,S){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){We(e);return}a=a!=null?""+qe(a):"",t=t!=null?""+qe(t):a,S||t===e.value||(e.value=t),e.defaultValue=t}l=l??d,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=S?e.checked:!!l,e.defaultChecked=!!l,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),We(e)}function xd(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function bi(e,t,a,l){if(e=e.options,t){t={};for(var d=0;d<a.length;d++)t["$"+a[d]]=!0;for(a=0;a<e.length;a++)d=t.hasOwnProperty("$"+e[a].value),e[a].selected!==d&&(e[a].selected=d),d&&l&&(e[a].defaultSelected=!0)}else{for(a=""+qe(a),t=null,d=0;d<e.length;d++){if(e[d].value===a){e[d].selected=!0,l&&(e[d].defaultSelected=!0);return}t!==null||e[d].disabled||(t=e[d])}t!==null&&(t.selected=!0)}}function th(e,t,a){if(t!=null&&(t=""+qe(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+qe(a):""}function nh(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(je(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=qe(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),We(e)}function vi(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ev=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 ah(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||ev.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function sh(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="",Oe=!0);for(var d in t)l=t[d],t.hasOwnProperty(d)&&a[d]!==l&&(ah(e,d,l),Oe=!0)}else for(var u in t)t.hasOwnProperty(u)&&ah(e,u,t[u])}function gd(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 tv=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"],["maskType","mask-type"],["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"]]),nv=/^[\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 to(e){return nv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pn(){}var yd=null;function bd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ni=null,ji=null;function ih(e){var t=kn(e);if(t&&(e=t.stateNode)){var a=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(pd(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Cn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var d=l[mt]||null;if(!d)throw Error(o(90));pd(l,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&yi(l)}break e;case"textarea":th(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&bi(e,!!a.multiple,t,!1)}}}var vd=!1;function lh(e,t,a){if(vd)return e(t,a);vd=!0;try{var l=e(t);return l}finally{if(vd=!1,(Ni!==null||ji!==null)&&(nc(),Ni&&(t=Ni,e=ji,ji=Ni=null,ih(t),e)))for(t=0;t<e.length;t++)ih(e[t])}}function Ml(e,t){var a=e.stateNode;if(a===null)return null;var l=a[mt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nd=!1;if(ha)try{var Rl={};Object.defineProperty(Rl,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",Rl,Rl),window.removeEventListener("test",Rl,Rl)}catch{Nd=!1}var qa=null,jd=null,no=null;function rh(){if(no)return no;var e,t=jd,a=t.length,l,d="value"in qa?qa.value:qa.textContent,u=d.length;for(e=0;e<a&&t[e]===d[e];e++);var x=a-e;for(l=1;l<=x&&t[a-l]===d[u-l];l++);return no=d.slice(e,1<l?1-l:void 0)}function ao(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 so(){return!0}function oh(){return!1}function Xt(e){function t(a,l,d,u,x){this._reactName=a,this._targetInst=d,this.type=l,this.nativeEvent=u,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(u):u[S]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?so:oh,this.isPropagationStopped=oh,this}return q(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=so)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=so)},persist:function(){},isPersistent:so}),t}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},io=Xt(Ga),Dl=q({},Ga,{view:0,detail:0}),av=Xt(Dl),wd,_d,Ol,lo=q({},Dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kd,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!==Ol&&(Ol&&e.type==="mousemove"?(wd=e.screenX-Ol.screenX,_d=e.screenY-Ol.screenY):_d=wd=0,Ol=e),wd)},movementY:function(e){return"movementY"in e?e.movementY:_d}}),ch=Xt(lo),sv=q({},lo,{dataTransfer:0}),iv=Xt(sv),lv=q({},Dl,{relatedTarget:0}),Sd=Xt(lv),rv=q({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),ov=Xt(rv),cv=q({},Ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),dv=Xt(cv),uv=q({},Ga,{data:0}),dh=Xt(uv),fv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mv={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"},hv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hv[e])?!!t[e]:!1}function kd(){return pv}var xv=q({},Dl,{key:function(e){if(e.key){var t=fv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?mv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kd,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gv=Xt(xv),yv=q({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=Xt(yv),bv=q({},Ga,{submitter:0}),vv=Xt(bv),Nv=q({},Dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kd}),jv=Xt(Nv),wv=q({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),_v=Xt(wv),Sv=q({},lo,{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}),kv=Xt(Sv),Cv=q({},Ga,{newState:0,oldState:0,source:0}),Tv=Xt(Cv),Ev=[9,13,27,32],Cd=ha&&"CompositionEvent"in window,Ll=null;ha&&"documentMode"in document&&(Ll=document.documentMode);var Av=ha&&"TextEvent"in window&&!Ll,fh=ha&&(!Cd||Ll&&8<Ll&&11>=Ll),mh=" ",hh=!1;function ph(e,t){switch(e){case"keyup":return Ev.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wi=!1;function Mv(e,t){switch(e){case"compositionend":return xh(t);case"keypress":return t.which!==32?null:(hh=!0,mh);case"textInput":return e=t.data,e===mh&&hh?null:e;default:return null}}function Rv(e,t){if(wi)return e==="compositionend"||!Cd&&ph(e,t)?(e=rh(),no=jd=qa=null,wi=!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 fh&&t.locale!=="ko"?null:t.data;default:return null}}var Dv={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 gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Dv[e.type]:t==="textarea"}function yh(e,t,a,l){Ni?ji?ji.push(l):ji=[l]:Ni=l,t=oc(t,"onChange"),0<t.length&&(a=new io("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var zl=null,Hl=null;function Ov(e){ig(e,0)}function ro(e){var t=Ba(e);if(yi(t))return e}function bh(e,t){if(e==="change")return t}var vh=!1;if(ha){var Td;if(ha){var Ed="oninput"in document;if(!Ed){var Nh=document.createElement("div");Nh.setAttribute("oninput","return;"),Ed=typeof Nh.oninput=="function"}Td=Ed}else Td=!1;vh=Td&&(!document.documentMode||9<document.documentMode)}function jh(){zl&&(zl.detachEvent("onpropertychange",wh),Hl=zl=null)}function wh(e){if(e.propertyName==="value"&&ro(Hl)){var t=[];yh(t,Hl,e,bd(e)),lh(Ov,t)}}function Lv(e,t,a){e==="focusin"?(jh(),zl=t,Hl=a,zl.attachEvent("onpropertychange",wh)):e==="focusout"&&jh()}function zv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ro(Hl)}function Hv(e,t){if(e==="click")return ro(t)}function Uv(e,t){if(e==="input"||e==="change")return ro(t)}function Bv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:Bv;function Ul(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var d=a[l];if(!ys.call(t,d)||!un(e[d],t[d]))return!1}return!0}function Ad(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sh(e,t){var a=_h(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_h(a)}}function kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ch(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ad(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Ad(e.document)}return t}function Md(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 $v=ha&&"documentMode"in document&&11>=document.documentMode,_i=null,Rd=null,Bl=null,Dd=!1;function Th(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Dd||_i==null||_i!==Ad(l)||(l=_i,"selectionStart"in l&&Md(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Bl&&Ul(Bl,l)||(Bl=l,l=oc(Rd,"onSelect"),0<l.length&&(t=new io("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=_i)))}function Ms(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Si={animationend:Ms("Animation","AnimationEnd"),animationiteration:Ms("Animation","AnimationIteration"),animationstart:Ms("Animation","AnimationStart"),transitionrun:Ms("Transition","TransitionRun"),transitionstart:Ms("Transition","TransitionStart"),transitioncancel:Ms("Transition","TransitionCancel"),transitionend:Ms("Transition","TransitionEnd")},Od={},Eh={};ha&&(Eh=document.createElement("div").style,"AnimationEvent"in window||(delete Si.animationend.animation,delete Si.animationiteration.animation,delete Si.animationstart.animation),"TransitionEvent"in window||delete Si.transitionend.transition);function Rs(e){if(Od[e])return Od[e];if(!Si[e])return e;var t=Si[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Eh)return Od[e]=t[a];return e}var Ah=Rs("animationend"),Mh=Rs("animationiteration"),Rh=Rs("animationstart"),qv=Rs("transitionrun"),Gv=Rs("transitionstart"),Vv=Rs("transitioncancel"),Dh=Rs("transitionend"),Oh=new Map,Ld="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Ld.push("scrollEnd");function qn(e,t){Oh.set(e,t),$n(t,[e])}var Yv=0;function pa(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Fn.identifierPrefix;var a=Yv++;return e="_"+e+"t_"+a.toString(32)+"_",t.autoName=e}function Lh(e){if(e==null||typeof e=="string")return e;var t=null,a=Fi;if(a!==null)for(var l=0;l<a.length;l++){var d=e[a[l]];if(d!=null){if(d==="none")return"none";t=t==null?d:t+(" "+d)}}return t??e.default}function xa(e,t){return e=Lh(e),t=Lh(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var oo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Tn=[],ki=0,zd=0;function co(){for(var e=ki,t=zd=ki=0;t<e;){var a=Tn[t];Tn[t++]=null;var l=Tn[t];Tn[t++]=null;var d=Tn[t];Tn[t++]=null;var u=Tn[t];if(Tn[t++]=null,l!==null&&d!==null){var x=l.pending;x===null?d.next=d:(d.next=x.next,x.next=d),l.pending=d}u!==0&&zh(a,d,u)}}function uo(e,t,a,l){Tn[ki++]=e,Tn[ki++]=t,Tn[ki++]=a,Tn[ki++]=l,zd|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Hd(e,t,a,l){return uo(e,t,a,l),fo(e)}function Ds(e,t){return uo(e,null,null,t),fo(e)}function zh(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var d=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(d=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,d&&t!==null&&(d=31-Nt(a),e=u.hiddenUpdates,l=e[d],l===null?e[d]=[t]:l.push(t),t.lane=a|536870912),u):null}function fo(e){if(50<rr)throw rr=0,tc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ci={};function Fv(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(e,t,a,l){return new Fv(e,t,a,l)}function Ud(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ga(e,t){var a=e.alternate;return a===null?(a=an(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&1206910976,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Hh(e,t){e.flags&=1206910978;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mo(e,t,a,l,d,u){var x=0;if(l=e,typeof l=="function")Ud(l)&&(x=1);else if(typeof l=="string")x=bN(e,a,Me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(l){case le:return e=an(31,a,t,d),e.elementType=le,e.lanes=u,e;case Y:return Os(a.children,d,u,t);case I:x=8,d|=24;break;case W:return e=an(12,a,t,d|2),e.elementType=W,e.lanes=u,e;case V:return e=an(13,a,t,d),e.elementType=V,e.lanes=u,e;case B:return e=an(19,a,t,d),e.elementType=B,e.lanes=u,e;case pe:case k:return e=d|32,e=an(30,a,t,e),e.elementType=k,e.lanes=u,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case R:x=10;break e;case w:x=9;break e;case A:x=11;break e;case P:x=14;break e;case te:x=16,l=null;break e}x=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=an(x,a,t,d),t.elementType=e,t.type=l,t.lanes=u,t}function Os(e,t,a,l){return e=an(7,e,l,t),e.lanes=a,e}function Bd(e,t,a){return e=an(6,e,null,t),e.lanes=a,e}function Uh(e){var t=an(18,null,null,0);return t.stateNode=e,t}function $d(e,t,a){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bh=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var a=Bh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:La(t)},Bh.set(e,t),t)}return{value:e,source:t,stack:La(t)}}var Ti=[],Ei=0,ho=null,$l=0,An=[],Mn=0,Va=null,Jn=1,Wn="";function ya(e,t){Ti[Ei++]=$l,Ti[Ei++]=ho,ho=e,$l=t}function $h(e,t,a){An[Mn++]=Jn,An[Mn++]=Wn,An[Mn++]=Va,Va=e;var l=Jn;e=Wn;var d=32-Nt(l)-1;l&=~(1<<d),a+=1;var u=32-Nt(t)+d;if(30<u){var x=d-d%5;u=(l&(1<<x)-1).toString(32),l>>=x,d-=x,Jn=1<<32-Nt(t)+d|a<<d|l,Wn=u+e}else Jn=1<<u|a<<d|l,Wn=e}function po(e){e.return!==null&&(ya(e,1),$h(e,1,0))}function qd(e){for(;e===ho;)ho=Ti[--Ei],Ti[Ei]=null,$l=Ti[--Ei],Ti[Ei]=null;for(;e===Va;)Va=An[--Mn],An[Mn]=null,Wn=An[--Mn],An[Mn]=null,Jn=An[--Mn],An[Mn]=null}function qh(e,t){An[Mn++]=Jn,An[Mn++]=Wn,An[Mn++]=Va,Jn=t.id,Wn=t.overflow,Va=e}var At=null,ot=null,Be=!1,Ya=null,Rn=!1,Gd=Error(o(519));function Fa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ql(En(t,e)),Gd}function Gh(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[jt]=e,t[mt]=l,a){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(a=0;a<cr.length;a++)Ve(cr[a],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),eh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),nh(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||cg(t.textContent,a)?(l.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),l.onScroll!=null&&Ve("scroll",t),l.onScrollEnd!=null&&Ve("scrollend",t),l.onClick!=null&&(t.onclick=Pn),t=!0):t=!1,t||Fa(e,!0)}function xo(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:At=At.return}}function Ai(e){if(e!==At)return!1;if(!Be)return xo(e),Be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||bf(e.type,e.memoizedProps)),a=!a),a&&ot&&Fa(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=Tg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=Tg(e)}else t===27?(t=ot,rs(e.type)?(e=Tf,Tf=null,ot=e):ot=t):ot=At?On(e.stateNode.nextSibling):null;return!0}function Ls(){ot=At=null,Be=!1}function Vd(){var e=Ya;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),Ya=null),e}function ql(e){Ya===null?Ya=[e]:Ya.push(e)}var Yd=Ke(null),zs=null,ba=null;function Ia(e,t,a){de(Yd,t._currentValue),t._currentValue=a}function va(e){e._currentValue=Yd.current,Ee(Yd)}function go(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Fd(e,t,a,l){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var u=d.dependencies;if(u!==null){var x=d.child;u=u.firstContext;e:for(;u!==null;){var S=u;u=d;for(var L=0;L<t.length;L++)if(S.context===t[L]){u.lanes|=a,S=u.alternate,S!==null&&(S.lanes|=a),go(u.return,a,e),l||(x=null);break e}u=S.next}}else if(d.tag===18){if(x=d.return,x===null)throw Error(o(341));x.lanes|=a,u=x.alternate,u!==null&&(u.lanes|=a),go(x,a,e),x=null}else d.tag===13&&d.memoizedState!==null&&d.memoizedState.dehydrated===null?(d.lanes|=a,x=d.alternate,x!==null&&(x.lanes|=a),go(d.return,a,e),x=d.child,x=x!==null?x.sibling:null):x=d.child;if(x!==null)x.return=d;else for(x=d;x!==null;){if(x===e){x=null;break}if(d=x.sibling,d!==null){d.return=x.return,x=d;break}x=x.return}d=x}}function Hs(e,t,a,l){e=null;for(var d=t,u=!1;d!==null;){if(!u){if((d.flags&524288)!==0)u=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var x=d.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var S=d.type;un(d.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(d===Se.current){if(x=d.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(tl):e=[tl])}d=d.return}return e!==null&&Fd(t,e,a,l),t.flags|=262144,e!==null}function yo(e){for(e=e.firstContext;e!==null;){if(!un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Us(e){zs=e,ba=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function zt(e){return Vh(zs,e)}function bo(e,t){return zs===null&&Us(e),Vh(e,t)}function Vh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ba===null){if(e===null)throw Error(o(308));ba=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ba=ba.next=t;return a}var Iv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Kv=s.unstable_scheduleCallback,Xv=s.unstable_NormalPriority,_t={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Id(){return{controller:new Iv,data:new Map,refCount:0}}function Gl(e){e.refCount--,e.refCount===0&&Kv(Xv,function(){e.controller.abort()})}function Yh(e,t){if((e.pendingLanes&4194048)!==0){var a=e.transitionTypes;for(a===null&&(a=e.transitionTypes=[]),e=0;e<t.length;e++){var l=t[e];a.indexOf(l)===-1&&a.push(l)}}}var Vl=null;function Qv(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Yl=null,Kd=0,Bs=0,Mi=null;function Zv(e,t){if(Yl===null){var a=Yl=[];Kd=0,Bs=df(),Mi={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Kd++,t.then(Fh,Fh),t}function Fh(){if(--Kd===0&&(Vl=null,Yl!==null)){Mi!==null&&(Mi.status="fulfilled");var e=Yl;Yl=null,Bs=0,Mi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Pv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(d){a.push(d)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var d=0;d<a.length;d++)(0,a[d])(t)},function(d){for(l.status="rejected",l.reason=d,d=0;d<a.length;d++)(0,a[d])(void 0)}),l}var Ih=ue.S;ue.S=function(e,t){if(Ux=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Zv(e,t),Vl!==null)for(var a=Qi;a!==null;)Yh(a,Vl),a=a.next;if(a=e.types,a!==null){for(var l=Qi;l!==null;)Yh(l,a),l=l.next;if(Bs!==0){l=Vl,l===null&&(l=Vl=[]);for(var d=0;d<a.length;d++){var u=a[d];l.indexOf(u)===-1&&l.push(u)}}}Ih!==null&&Ih(e,t)};var $s=Ke(null);function Xd(){var e=$s.current;return e!==null?e:lt.pooledCache}function vo(e,t){t===null?de($s,$s.current):de($s,t.pool)}function Kh(){var e=Xd();return e===null?null:{parent:_t._currentValue,pool:e}}var Ri=Error(o(460)),Qd=Error(o(474)),No=Error(o(542)),jo={then:function(){}};function Xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Pn,Pn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e===void 0&&!("reason"in t)?Error(o(600)):e;default:if(typeof t.status=="string")t.then(Pn,Pn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var d=t;d.status="fulfilled",d.value=l}},function(l){if(t.status==="pending"){var d=t;d.status="rejected",d.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ph(e),e}throw Gs=t,Ri}}function qs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Gs=a,Ri):a}}var Gs=null;function Zh(){if(Gs===null)throw Error(o(459));var e=Gs;return Gs=null,e}function Ph(e){if(e===Ri||e===No)throw Error(o(483))}var Di=null,Fl=0;function wo(e){var t=Fl;return Fl+=1,Di===null&&(Di=[]),Qh(Di,e,t)}function Ka(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function _o(e,t){throw t.$$typeof===C?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jh(e){function t(Q,$){if(e){var ee=Q.deletions;ee===null?(Q.deletions=[$],Q.flags|=16):ee.push($)}}function a(Q,$){if(!e)return null;for(;$!==null;)t(Q,$),$=$.sibling;return null}function l(Q){for(var $=new Map;Q!==null;)Q.key===null?$.set(Q.index,Q):$.set(Q.key,Q),Q=Q.sibling;return $}function d(Q,$){return Q=ga(Q,$),Q.index=0,Q.sibling=null,Q}function u(Q,$,ee){return Q.index=ee,e?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<$?(Q.flags|=2,$):ee):(Q.flags|=134217730,$)):(Q.flags|=1048576,$)}function x(Q){return e&&Q.alternate===null&&(Q.flags|=134217730),Q}function S(Q,$,ee,re){return $===null||$.tag!==6?($=Bd(ee,Q.mode,re),$.return=Q,$):($=d($,ee),$.return=Q,$)}function L(Q,$,ee,re){var be=ee.type;return be===Y?(Q=se(Q,$,ee.props.children,re,ee.key),Ka(Q,ee),Q):$!==null&&($.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===te&&qs(be)===$.type)?($=d($,ee.props),Ka($,ee),$.return=Q,$):($=mo(ee.type,ee.key,ee.props,null,Q.mode,re),Ka($,ee),$.return=Q,$)}function Z(Q,$,ee,re){return $===null||$.tag!==4||$.stateNode.containerInfo!==ee.containerInfo||$.stateNode.implementation!==ee.implementation?($=$d(ee,Q.mode,re),$.return=Q,$):($=d($,ee.children||[]),$.return=Q,$)}function se(Q,$,ee,re,be){return $===null||$.tag!==7?($=Os(ee,Q.mode,re,be),$.return=Q,$):($=d($,ee),$.return=Q,$)}function oe(Q,$,ee){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Bd(""+$,Q.mode,ee),$.return=Q,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case F:return ee=mo($.type,$.key,$.props,null,Q.mode,ee),Ka(ee,$),ee.return=Q,ee;case G:return $=$d($,Q.mode,ee),$.return=Q,$;case te:return $=qs($),oe(Q,$,ee)}if(je($)||ce($))return $=Os($,Q.mode,ee,null),$.return=Q,$;if(typeof $.then=="function")return oe(Q,wo($),ee);if($.$$typeof===R)return oe(Q,bo(Q,$),ee);_o(Q,$)}return null}function X(Q,$,ee,re){var be=$!==null?$.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return be!==null?null:S(Q,$,""+ee,re);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case F:return ee.key===be?L(Q,$,ee,re):null;case G:return ee.key===be?Z(Q,$,ee,re):null;case te:return ee=qs(ee),X(Q,$,ee,re)}if(je(ee)||ce(ee))return be!==null?null:se(Q,$,ee,re,null);if(typeof ee.then=="function")return X(Q,$,wo(ee),re);if(ee.$$typeof===R)return X(Q,$,bo(Q,ee),re);_o(Q,ee)}return null}function ne(Q,$,ee,re,be){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Q=Q.get(ee)||null,S($,Q,""+re,be);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case F:return Q=Q.get(re.key===null?ee:re.key)||null,L($,Q,re,be);case G:return Q=Q.get(re.key===null?ee:re.key)||null,Z($,Q,re,be);case te:return re=qs(re),ne(Q,$,ee,re,be)}if(je(re)||ce(re))return Q=Q.get(ee)||null,se($,Q,re,be,null);if(typeof re.then=="function")return ne(Q,$,ee,wo(re),be);if(re.$$typeof===R)return ne(Q,$,ee,bo($,re),be);_o($,re)}return null}function xe(Q,$,ee,re){for(var be=null,Fe=null,_e=$,Re=$=0,Ct=null;_e!==null&&Re<ee.length;Re++){_e.index>Re?(Ct=_e,_e=null):Ct=_e.sibling;var Qe=X(Q,_e,ee[Re],re);if(Qe===null){_e===null&&(_e=Ct);break}e&&_e&&Qe.alternate===null&&t(Q,_e),$=u(Qe,$,Re),Fe===null?be=Qe:Fe.sibling=Qe,Fe=Qe,_e=Ct}if(Re===ee.length)return a(Q,_e),Be&&ya(Q,Re),be;if(_e===null){for(;Re<ee.length;Re++)_e=oe(Q,ee[Re],re),_e!==null&&($=u(_e,$,Re),Fe===null?be=_e:Fe.sibling=_e,Fe=_e);return Be&&ya(Q,Re),be}for(_e=l(_e);Re<ee.length;Re++)Ct=ne(_e,Q,Re,ee[Re],re),Ct!==null&&(e&&(Qe=Ct.alternate,Qe!==null&&_e.delete(Qe.key===null?Re:Qe.key)),$=u(Ct,$,Re),Fe===null?be=Ct:Fe.sibling=Ct,Fe=Ct);return e&&_e.forEach(function(fs){return t(Q,fs)}),Be&&ya(Q,Re),be}function Ne(Q,$,ee,re){if(ee==null)throw Error(o(151));for(var be=null,Fe=null,_e=$,Re=$=0,Ct=null,Qe=ee.next();_e!==null&&!Qe.done;Re++,Qe=ee.next()){_e.index>Re?(Ct=_e,_e=null):Ct=_e.sibling;var fs=X(Q,_e,Qe.value,re);if(fs===null){_e===null&&(_e=Ct);break}e&&_e&&fs.alternate===null&&t(Q,_e),$=u(fs,$,Re),Fe===null?be=fs:Fe.sibling=fs,Fe=fs,_e=Ct}if(Qe.done)return a(Q,_e),Be&&ya(Q,Re),be;if(_e===null){for(;!Qe.done;Re++,Qe=ee.next())Qe=oe(Q,Qe.value,re),Qe!==null&&($=u(Qe,$,Re),Fe===null?be=Qe:Fe.sibling=Qe,Fe=Qe);return Be&&ya(Q,Re),be}for(_e=l(_e);!Qe.done;Re++,Qe=ee.next())Qe=ne(_e,Q,Re,Qe.value,re),Qe!==null&&(e&&(Ct=Qe.alternate,Ct!==null&&_e.delete(Ct.key===null?Re:Ct.key)),$=u(Qe,$,Re),Fe===null?be=Qe:Fe.sibling=Qe,Fe=Qe);return e&&_e.forEach(function(MN){return t(Q,MN)}),Be&&ya(Q,Re),be}function He(Q,$,ee,re){if(typeof ee=="object"&&ee!==null&&ee.type===Y&&ee.key===null&&ee.props.ref===void 0&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case F:e:{for(var be=ee.key;$!==null;){if($.key===be){if(be=ee.type,be===Y){if($.tag===7){a(Q,$.sibling),re=d($,ee.props.children),Ka(re,ee),re.return=Q,Q=re;break e}}else if($.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===te&&qs(be)===$.type){a(Q,$.sibling),re=d($,ee.props),Ka(re,ee),re.return=Q,Q=re;break e}a(Q,$);break}else t(Q,$);$=$.sibling}ee.type===Y?(re=Os(ee.props.children,Q.mode,re,ee.key),Ka(re,ee),re.return=Q,Q=re):(re=mo(ee.type,ee.key,ee.props,null,Q.mode,re),Ka(re,ee),re.return=Q,Q=re)}return x(Q);case G:e:{for(be=ee.key;$!==null;){if($.key===be)if($.tag===4&&$.stateNode.containerInfo===ee.containerInfo&&$.stateNode.implementation===ee.implementation){a(Q,$.sibling),re=d($,ee.children||[]),re.return=Q,Q=re;break e}else{a(Q,$);break}else t(Q,$);$=$.sibling}re=$d(ee,Q.mode,re),re.return=Q,Q=re}return x(Q);case te:return ee=qs(ee),He(Q,$,ee,re)}if(je(ee))return xe(Q,$,ee,re);if(ce(ee)){if(be=ce(ee),typeof be!="function")throw Error(o(150));return ee=be.call(ee),Ne(Q,$,ee,re)}if(typeof ee.then=="function")return He(Q,$,wo(ee),re);if(ee.$$typeof===R)return He(Q,$,bo(Q,ee),re);_o(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,$!==null&&$.tag===6?(a(Q,$.sibling),re=d($,ee),re.return=Q,Q=re):(a(Q,$),re=Bd(ee,Q.mode,re),re.return=Q,Q=re),x(Q)):a(Q,$)}return function(Q,$,ee,re){try{Fl=0;var be=He(Q,$,ee,re);return Di=null,be}catch(_e){if(_e===Ri||_e===No)throw _e;var Fe=an(29,_e,null,Q.mode);return Fe.lanes=re,Fe.return=Q,Fe}finally{}}}var Vs=Jh(!0),Wh=Jh(!1),Xa=!1;function Zd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pd(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 Qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var d=l.pending;return d===null?t.next=t:(t.next=d.next,d.next=t),l.pending=t,t=fo(e),zh(e,null,a),t}return uo(e,l,t,a),fo(e)}function Il(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,El(e,a)}}function Jd(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var d=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?d=u=x:u=u.next=x,a=a.next}while(a!==null);u===null?d=u=t:u=u.next=t}else d=u=t;a={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Wd=!1;function Kl(){if(Wd){var e=Mi;if(e!==null)throw e}}function Xl(e,t,a,l){Wd=!1;var d=e.updateQueue;Xa=!1;var u=d.firstBaseUpdate,x=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var L=S,Z=L.next;L.next=null,x===null?u=Z:x.next=Z,x=L;var se=e.alternate;se!==null&&(se=se.updateQueue,S=se.lastBaseUpdate,S!==x&&(S===null?se.firstBaseUpdate=Z:S.next=Z,se.lastBaseUpdate=L))}if(u!==null){var oe=d.baseState;x=0,se=Z=L=null,S=u;do{var X=S.lane&-536870913,ne=X!==S.lane;if(ne?(Ye&X)===X:(l&X)===X){X!==0&&X===Bs&&(Wd=!0),se!==null&&(se=se.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,Ne=S;X=t;var He=a;switch(Ne.tag){case 1:if(xe=Ne.payload,typeof xe=="function"){oe=xe.call(He,oe,X);break e}oe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ne.payload,X=typeof xe=="function"?xe.call(He,oe,X):xe,X==null)break e;oe=q({},oe,X);break e;case 2:Xa=!0}}X=S.callback,X!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=d.callbacks,ne===null?d.callbacks=[X]:ne.push(X))}else ne={lane:X,tag:S.tag,payload:S.payload,callback:S.callback,next:null},se===null?(Z=se=ne,L=oe):se=se.next=ne,x|=X;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;ne=S,S=ne.next,ne.next=null,d.lastBaseUpdate=ne,d.shared.pending=null}}while(!0);se===null&&(L=oe),d.baseState=L,d.firstBaseUpdate=Z,d.lastBaseUpdate=se,u===null&&(d.shared.lanes=0),as|=x,e.lanes=x,e.memoizedState=oe}}function ep(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function tp(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ep(a[e],t)}var Pa=Ke(null),So=Ke(0);function np(e,t){e=Sa,de(So,e),de(Pa,t),Sa=e|t.baseLanes}function eu(){de(So,Sa),de(Pa,Pa.current)}function tu(){Sa=So.current,Ee(Pa),Ee(So)}var Ht=Ke(null),Ft=null;function Ja(e){var t=e.alternate;de(Ut,Ut.current&1),de(Ht,e),Ft===null&&(t===null||Pa.current!==null||t.memoizedState!==null)&&(Ft=e)}function nu(e){de(Ut,Ut.current),de(Ht,e),Ft===null&&(Ft=e)}function ap(e){e.tag===22?(de(Ut,Ut.current),de(Ht,e),Ft===null&&(Ft=e)):Wa()}function Wa(){de(Ut,Ut.current),de(Ht,Ht.current)}function fn(e){Ee(Ht),Ft===e&&(Ft=null),Ee(Ut)}var Ut=Ke(0);function Ql(e,t){de(Ht,Ht.current),de(Ut,t)}function au(e){Ee(Ut),Ee(Ht),Ft===e&&(Ft=null)}function ko(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||kf(a)||Cf(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Na=0,ze=null,st=null,St=null,Co=!1,Oi=!1,Ys=!1,To=0,Zl=0,Li=null,Jv=0;function xt(){throw Error(o(321))}function su(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!un(e[a],t[a]))return!1;return!0}function iu(e,t,a,l,d,u){return Na=u,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?$p:qp,Ys=!1,u=a(l,d),Ys=!1,Oi&&(u=ip(t,a,l,d)),sp(e),u}function sp(e){ue.H=Lo;var t=st!==null&&st.next!==null;if(Na=0,St=st=ze=null,Co=!1,Zl=0,Li=null,t)throw Error(o(300));e===null||kt||(e=e.dependencies,e!==null&&yo(e)&&(kt=!0))}function ip(e,t,a,l){ze=e;var d=0;do{if(Oi&&(Li=null),Zl=0,Oi=!1,25<=d)throw Error(o(301));if(d+=1,St=st=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}ue.H=l1,u=t(a,l)}while(Oi);return u}function Wv(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?Pl(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(ze.flags|=1024),t}function lu(){var e=To!==0;return To=0,e}function ru(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function ou(e){if(Co){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Co=!1}Na=0,St=st=ze=null,Oi=!1,Zl=To=0,Li=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?ze.memoizedState=St=e:St=St.next=e,St}function bt(){if(st===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=St===null?ze.memoizedState:St.next;if(t!==null)St=t,st=e;else{if(e===null)throw ze.alternate===null?Error(o(467)):Error(o(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},St===null?ze.memoizedState=St=e:St=St.next=e}return St}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pl(e){var t=Zl;return Zl+=1,Li===null&&(Li=[]),e=Qh(Li,e,t),t=ze,(St===null?t.memoizedState:St.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?$p:qp),e}function Ao(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pl(e);if(e.$$typeof===M)return;if(e.$$typeof===R)return zt(e)}throw Error(o(438,String(e)))}function cu(e){var t=null,a=ze.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(d){return d.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),ze.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ve;return t.index++,a}function ja(e,t){return typeof t=="function"?t(e):t}function Mo(e){var t=bt();return du(t,st,e)}function du(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var d=e.baseQueue,u=l.pending;if(u!==null){if(d!==null){var x=d.next;d.next=u.next,u.next=x}t.baseQueue=d=u,l.pending=null}if(u=e.baseState,d===null)e.memoizedState=u;else{t=d.next;var S=x=null,L=null,Z=t,se=!1;do{var oe=Z.lane&-536870913;if(oe!==Z.lane?(Ye&oe)===oe:(Na&oe)===oe){var X=Z.revertLane;if(X===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),oe===Bs&&(se=!0);else if((Na&X)===X){Z=Z.next,X===Bs&&(se=!0);continue}else oe={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},L===null?(S=L=oe,x=u):L=L.next=oe,ze.lanes|=X,as|=X;oe=Z.action,Ys&&a(u,oe),u=Z.hasEagerState?Z.eagerState:a(u,oe)}else X={lane:oe,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},L===null?(S=L=X,x=u):L=L.next=X,ze.lanes|=oe,as|=oe;Z=Z.next}while(Z!==null&&Z!==t);if(L===null?x=u:L.next=S,!un(u,e.memoizedState)&&(kt=!0,se&&(a=Mi,a!==null)))throw a;e.memoizedState=u,e.baseState=x,e.baseQueue=L,l.lastRenderedState=u}return d===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function uu(e){var t=bt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,d=a.pending,u=t.memoizedState;if(d!==null){a.pending=null;var x=d=d.next;do u=e(u,x.action),x=x.next;while(x!==d);un(u,t.memoizedState)||(kt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function lp(e,t,a){var l=ze,d=bt(),u=Be;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var x=!un((st||d).memoizedState,a);if(x&&(d.memoizedState=a,kt=!0),d=d.queue,hu(cp.bind(null,l,d,e),[e]),e=d.getSnapshot!==t||x||St!==null&&(St.memoizedState.tag&1)!==0,zi(e?9:8,{destroy:void 0},op.bind(null,l,d,a,t),null),e){if(l.flags|=2048,lt===null)throw Error(o(349));u||(Na&127)!==0||rp(l,t,a)}return a}function rp(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ze.updateQueue,t===null?(t=Eo(),ze.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function op(e,t,a,l){t.value=a,t.getSnapshot=l,dp(t)&&up(e)}function cp(e,t,a){return a(function(){dp(t)&&up(e)})}function dp(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!un(e,a)}catch{return!0}}function up(e){var t=Ds(e,2);t!==null&&on(t,e,2)}function fu(e){var t=Qt();if(typeof e=="function"){var a=e;if(e=a(),Ys){Hn(!0);try{a()}finally{Hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:e},t}function fp(e,t,a,l){return e.baseState=a,du(e,st,typeof l=="function"?l:ja)}function e1(e,t,a,l,d){if(Oo(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){u.listeners.push(x)}};ue.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,mp(t,u)):(u.next=a.next,t.pending=a.next=u)}}function mp(e,t){var a=t.action,l=t.payload,d=e.state;if(t.isTransition){var u=ue.T,x={};x.types=u!==null?u.types:null,ue.T=x;try{var S=a(d,l),L=ue.S;L!==null&&L(x,S),hp(e,t,S)}catch(Z){mu(e,t,Z)}finally{u!==null&&x.types!==null&&(u.types=x.types),ue.T=u}}else try{u=a(d,l),hp(e,t,u)}catch(Z){mu(e,t,Z)}}function hp(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){pp(e,t,l)},function(l){return mu(e,t,l)}):pp(e,t,a)}function pp(e,t,a){t.status="fulfilled",t.value=a,xp(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,mp(e,a)))}function mu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,xp(t),t=t.next;while(t!==l)}e.action=null}function xp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gp(e,t){return t}function yp(e,t){if(Be){var a=lt.formState;if(a!==null){e:{var l=ze;if(Be){if(ot){t:{for(var d=ot,u=Rn;d.nodeType!==8;){if(!u){d=null;break t}if(d=On(d.nextSibling),d===null){d=null;break t}}u=d.data,d=u==="F!"||u==="F"?d:null}if(d){ot=On(d.nextSibling),l=d.data==="F!";break e}}Fa(l)}l=!1}l&&(t=a[0])}}return a=Qt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gp,lastRenderedState:t},a.queue=l,a=Hp.bind(null,ze,l),l.dispatch=a,l=fu(!1),u=bu.bind(null,ze,!1,l.queue),l=Qt(),d={state:t,dispatch:null,action:e,pending:null},l.queue=d,a=e1.bind(null,ze,d,u,a),d.dispatch=a,l.memoizedState=e,[t,a,!1]}function bp(e){var t=bt();return vp(t,st,e)}function vp(e,t,a){if(t=du(e,t,gp)[0],e=Mo(ja)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Pl(t)}catch(x){throw x===Ri?No:x}else l=t;t=bt();var d=t.queue,u=d.dispatch;return a!==t.memoizedState&&(ze.flags|=2048,zi(9,{destroy:void 0},t1.bind(null,d,a),null)),[l,u,e]}function t1(e,t){e.action=t}function Np(e){var t=bt(),a=st;if(a!==null)return vp(t,a,e);bt(),t=t.memoizedState,a=bt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function zi(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=Eo(),ze.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function jp(){return bt().memoizedState}function Ro(e,t,a,l){var d=Qt();ze.flags|=e,d.memoizedState=zi(1|t,{destroy:void 0},a,l===void 0?null:l)}function Do(e,t,a,l){var d=bt();l=l===void 0?null:l;var u=d.memoizedState.inst;st!==null&&l!==null&&su(l,st.memoizedState.deps)?d.memoizedState=zi(t,u,a,l):(ze.flags|=e,d.memoizedState=zi(1|t,u,a,l))}function wp(e,t){Ro(8390656,8,e,t)}function hu(e,t){Do(2048,8,e,t)}function n1(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=Eo(),ze.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function _p(e){var t=bt().memoizedState;return n1({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Sp(e,t){return Do(4,2,e,t)}function kp(e,t){return Do(4,4,e,t)}function Cp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tp(e,t,a){a=a!=null?a.concat([e]):null,Do(4,4,Cp.bind(null,t,e),a)}function pu(){}function Ep(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&su(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Ap(e,t){var a=bt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&su(t,l[1]))return l[0];if(l=e(),Ys){Hn(!0);try{e()}finally{Hn(!1)}}return a.memoizedState=[l,t],l}function xu(e,t,a){return a===void 0||(Na&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=$x(),ze.lanes|=e,as|=e,a)}function Mp(e,t,a,l){return un(a,t)?a:Pa.current!==null?(e=xu(e,a,l),un(e,t)||(kt=!0),e):(Na&106)===0||(Na&1073741824)!==0&&(Ye&261930)===0?(kt=!0,e.memoizedState=a):(e=$x(),ze.lanes|=e,as|=e,t)}function Rp(e,t,a,l,d){var u=ye.p;ye.p=u!==0&&8>u?u:8;var x=ue.T,S={};S.types=x!==null?x.types:null,ue.T=S,bu(e,!1,t,a);try{var L=d(),Z=ue.S;if(Z!==null&&Z(S,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var se=Pv(L,l);Jl(e,t,se,xn(e))}else Jl(e,t,l,xn(e))}catch(oe){Jl(e,t,{then:function(){},status:"rejected",reason:oe},xn())}finally{ye.p=u,x!==null&&S.types!==null&&(x.types=S.types),ue.T=x}}function a1(){}function gu(e,t,a,l){if(e.tag!==5)throw Error(o(476));var d=Dp(e).queue;Rp(e,d,t,Ce,a===null?a1:function(){return Op(e),a(l)})}function Dp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ce,baseState:Ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:Ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Op(e){var t=Dp(e);t.next===null&&(t=e.alternate.memoizedState),Jl(e,t.next.queue,{},xn())}function yu(){return zt(tl)}function Lp(){return bt().memoizedState}function zp(){return bt().memoizedState}function s1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=xn();e=Qa(a);var l=Za(t,e,a);l!==null&&(on(l,t,a),Il(l,t,a)),t={cache:Id()},e.payload=t;return}t=t.return}}function i1(e,t,a){var l=xn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Oo(e)?Up(t,a):(a=Hd(e,t,a,l),a!==null&&(on(a,e,l),Bp(a,t,l)))}function Hp(e,t,a){var l=xn();Jl(e,t,a,l)}function Jl(e,t,a,l){var d={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Oo(e))Up(t,d);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var x=t.lastRenderedState,S=u(x,a);if(d.hasEagerState=!0,d.eagerState=S,un(S,x))return uo(e,t,d,0),lt===null&&co(),!1}catch{}finally{}if(a=Hd(e,t,d,l),a!==null)return on(a,e,l),Bp(a,t,l),!0}return!1}function bu(e,t,a,l){if(l={lane:2,revertLane:df(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Oo(e)){if(t)throw Error(o(479))}else t=Hd(e,a,l,2),t!==null&&on(t,e,2)}function Oo(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Up(e,t){Oi=Co=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Bp(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,El(e,a)}}var Lo={readContext:zt,use:Ao,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt,useEffectEvent:xt},$p={readContext:zt,use:Ao,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:zt,useEffect:wp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ro(4194308,4,Cp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ro(4194308,4,e,t)},useInsertionEffect:function(e,t){Ro(4,2,e,t)},useMemo:function(e,t){var a=Qt();t=t===void 0?null:t;var l=e();if(Ys){Hn(!0);try{e()}finally{Hn(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Qt();if(a!==void 0){var d=a(t);if(Ys){Hn(!0);try{a(t)}finally{Hn(!1)}}}else d=t;return l.memoizedState=l.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},l.queue=e,e=e.dispatch=i1.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=fu(e);var t=e.queue,a=Hp.bind(null,ze,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:pu,useDeferredValue:function(e,t){var a=Qt();return xu(a,e,t)},useTransition:function(){var e=fu(!1);return e=Rp.bind(null,ze,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=ze,d=Qt();if(Be){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),lt===null)throw Error(o(349));(Ye&127)!==0||rp(l,t,a)}d.memoizedState=a;var u={value:a,getSnapshot:t};return d.queue=u,wp(cp.bind(null,l,u,e),[e]),l.flags|=2048,zi(9,{destroy:void 0},op.bind(null,l,u,a,t),null),a},useId:function(){var e=Qt(),t=lt.identifierPrefix;if(Be){var a=Wn,l=Jn;a=(l&~(1<<32-Nt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=To++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Jv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yu,useFormState:yp,useActionState:yp,useOptimistic:function(e){var t=Qt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=bu.bind(null,ze,!0,a),a.dispatch=t,[e,t]},useMemoCache:cu,useCacheRefresh:function(){return Qt().memoizedState=s1.bind(null,ze)},useEffectEvent:function(e){var t=Qt(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},qp={readContext:zt,use:Ao,useCallback:Ep,useContext:zt,useEffect:hu,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:kp,useMemo:Ap,useReducer:Mo,useRef:jp,useState:function(){return Mo(ja)},useDebugValue:pu,useDeferredValue:function(e,t){var a=bt();return Mp(a,st.memoizedState,e,t)},useTransition:function(){var e=Mo(ja)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]},useSyncExternalStore:lp,useId:Lp,useHostTransitionStatus:yu,useFormState:bp,useActionState:bp,useOptimistic:function(e,t){var a=bt();return fp(a,st,e,t)},useMemoCache:cu,useCacheRefresh:zp,useEffectEvent:_p},l1={readContext:zt,use:Ao,useCallback:Ep,useContext:zt,useEffect:hu,useImperativeHandle:Tp,useInsertionEffect:Sp,useLayoutEffect:kp,useMemo:Ap,useReducer:uu,useRef:jp,useState:function(){return uu(ja)},useDebugValue:pu,useDeferredValue:function(e,t){var a=bt();return st===null?xu(a,e,t):Mp(a,st.memoizedState,e,t)},useTransition:function(){var e=uu(ja)[0],t=bt().memoizedState;return[typeof e=="boolean"?e:Pl(e),t]},useSyncExternalStore:lp,useId:Lp,useHostTransitionStatus:yu,useFormState:Np,useActionState:Np,useOptimistic:function(e,t){var a=bt();return st!==null?fp(a,st,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:cu,useCacheRefresh:zp,useEffectEvent:_p};function vu(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:q({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Nu={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=xn(),d=Qa(l);d.payload=t,a!=null&&(d.callback=a),t=Za(e,d,l),t!==null&&(on(t,e,l),Il(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=xn(),d=Qa(l);d.tag=1,d.payload=t,a!=null&&(d.callback=a),t=Za(e,d,l),t!==null&&(on(t,e,l),Il(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=xn(),l=Qa(a);l.tag=2,t!=null&&(l.callback=t),t=Za(e,l,a),t!==null&&(on(t,e,a),Il(t,e,a))}};function Gp(e,t,a,l,d,u,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,x):t.prototype&&t.prototype.isPureReactComponent?!Ul(a,l)||!Ul(d,u):!0}function Vp(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Nu.enqueueReplaceState(t,t.state,null)}function Fs(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=q({},a));for(var d in e)a[d]===void 0&&(a[d]=e[d])}return a}function Yp(e){oo(e)}function Fp(e){console.error(e)}function Ip(e){oo(e)}function zo(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Kp(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function ju(e,t,a){return a=Qa(a),a.tag=3,a.payload={element:null},a.callback=function(){zo(e,t)},a}function Xp(e){return e=Qa(e),e.tag=3,e}function Qp(e,t,a,l){var d=a.type.getDerivedStateFromError;if(typeof d=="function"){var u=l.value;e.payload=function(){return d(u)},e.callback=function(){Kp(t,a,l)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Kp(t,a,l),typeof d!="function"&&(ss===null?ss=new Set([this]):ss.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})})}function r1(e,t,a,l,d){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Hs(t,a,d,!0),a=Ht.current,a!==null){switch(a.tag){case 31:case 13:case 19:return Ft===null?ac():a.alternate===null&>===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=d,l===jo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),rf(e,l,d)),!1;case 22:return a.flags|=65536,l===jo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),rf(e,l,d)),!1}throw Error(o(435,a.tag))}return rf(e,l,d),ac(),!1}if(Be)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=d,l!==Gd&&(e=Error(o(422),{cause:l}),ql(En(e,a)))):(l!==Gd&&(t=Error(o(423),{cause:l}),ql(En(t,a))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,l=En(l,a),d=ju(e.stateNode,l,d),Jd(e,d),gt!==4&&(gt=2)),!1;var u=Error(o(520),{cause:l});if(u=En(u,a),lr===null?lr=[u]:lr.push(u),gt!==4&&(gt=2),t===null)return!0;l=En(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=d&-d,a.lanes|=e,e=ju(a.stateNode,l,e),Jd(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(ss===null||!ss.has(u))))return a.flags|=65536,d&=-d,a.lanes|=d,d=Xp(d),Qp(d,e,a,l),Jd(a,d),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var wu=Error(o(461)),kt=!1;function Tt(e,t,a,l){t.child=e===null?Wh(t,null,a,l):Vs(t,e.child,a,l)}function Zp(e,t,a,l,d){a=a.render;var u=t.ref;if("ref"in l){var x={};for(var S in l)S!=="ref"&&(x[S]=l[S])}else x=l;return Us(t),l=iu(e,t,a,x,u,d),S=lu(),e!==null&&!kt?(ru(e,t,d),wa(e,t,d)):(Be&&S&&po(t),t.flags|=1,Tt(e,t,l,d),t.child)}function Pp(e,t,a,l,d){if(e===null){var u=a.type;return typeof u=="function"&&!Ud(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Jp(e,t,u,l,d)):(e=mo(a.type,null,l,t,t.mode,d),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Mu(e,d)){var x=u.memoizedProps;if(a=a.compare,a=a!==null?a:Ul,a(x,l)&&e.ref===t.ref)return wa(e,t,d)}return t.flags|=1,e=ga(u,l),e.ref=t.ref,e.return=t,t.child=e}function Jp(e,t,a,l,d){if(e!==null){var u=e.memoizedProps;if(Ul(u,l)&&e.ref===t.ref)if(kt=!1,t.pendingProps=l=u,Mu(e,d))(e.flags&131072)!==0&&(kt=!0);else return t.lanes=e.lanes,wa(e,t,d)}return _u(e,t,a,l,d)}function Wp(e,t,a,l){var d=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,d=0;l!==null;)d=d|l.lanes|l.childLanes,l=l.sibling;l=d&~u}else l=0,t.child=null;return ex(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,u!==null?u.cachePool:null),u!==null?np(t,u):eu(),ap(t);else return l=t.lanes=536870912,ex(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(vo(t,u.cachePool),np(t,u),Wa(),t.memoizedState=null):(e!==null&&vo(t,null),eu(),Wa());return Tt(e,t,d,a),t.child}function Wl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ex(e,t,a,l,d){var u=Xd();return u=u===null?null:{parent:_t._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&vo(t,null),eu(),ap(t),e!==null&&Hs(e,t,l,!0),t.childLanes=d,null}function Ho(e,t){return t=Uo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function tx(e,t,a){return Vs(t,e.child,null,a),e=Ho(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function o1(e,t,a){var l=t.pendingProps,d=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(l.mode==="hidden")return e=Ho(t,l),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Wl(null,e);if(nu(t),(e=ot)?(e=Cg(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=Uh(e),a.return=t,t.child=a,At=t,ot=null)):e=null,e===null)throw Fa(t);return t.lanes=536870912,null}return Ho(t,l)}var u=e.memoizedState;if(u!==null){var x=u.dehydrated;if(nu(t),d)if(t.flags&256)t.flags&=-257,t=tx(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(kt||Hs(e,t,a,!1),d=(a&e.childLanes)!==0,kt||d){if(Pa.current===null){if(l=lt,l!==null&&(x=Qr(l,a),x!==0&&x!==u.retryLane))throw u.retryLane=x,Ds(e,x),on(l,e,x),wu;ac()}t=tx(e,t,a)}else e=u.treeContext,ot=On(x.nextSibling),At=t,Be=!0,Ya=null,Rn=!1,e!==null&&qh(t,e),t=Ho(t,l),t.flags|=134221824;return t}return e=ga(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hi(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function _u(e,t,a,l,d){return Us(t),a=iu(e,t,a,l,void 0,d),l=lu(),e!==null&&!kt?(ru(e,t,d),wa(e,t,d)):(Be&&l&&po(t),t.flags|=1,Tt(e,t,a,d),t.child)}function nx(e,t,a,l,d,u){return Us(t),t.updateQueue=null,a=ip(t,l,a,d),sp(e),l=lu(),e!==null&&!kt?(ru(e,t,u),wa(e,t,u)):(Be&&l&&po(t),t.flags|=1,Tt(e,t,a,u),t.child)}function ax(e,t,a,l,d){if(Us(t),t.stateNode===null){var u=Ci,x=a.contextType;typeof x=="object"&&x!==null&&(u=zt(x)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Nu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Zd(t),x=a.contextType,u.context=typeof x=="object"&&x!==null?zt(x):Ci,u.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(vu(t,a,x,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(x=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),x!==u.state&&Nu.enqueueReplaceState(u,u.state,null),Xl(t,l,u,d),Kl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var S=t.memoizedProps,L=Fs(a,S);u.props=L;var Z=u.context,se=a.contextType;x=Ci,typeof se=="object"&&se!==null&&(x=zt(se));var oe=a.getDerivedStateFromProps;se=typeof oe=="function"||typeof u.getSnapshotBeforeUpdate=="function",S=t.pendingProps!==S,se||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(S||Z!==x)&&Vp(t,u,l,x),Xa=!1;var X=t.memoizedState;u.state=X,Xl(t,l,u,d),Kl(),Z=t.memoizedState,S||X!==Z||Xa?(typeof oe=="function"&&(vu(t,a,oe,l),Z=t.memoizedState),(L=Xa||Gp(t,a,L,l,X,Z,x))?(se||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Z),u.props=l,u.state=Z,u.context=x,l=L):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,Pd(e,t),x=t.memoizedProps,se=Fs(a,x),u.props=se,oe=t.pendingProps,X=u.context,Z=a.contextType,L=Ci,typeof Z=="object"&&Z!==null&&(L=zt(Z)),S=a.getDerivedStateFromProps,(Z=typeof S=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x!==oe||X!==L)&&Vp(t,u,l,L),Xa=!1,X=t.memoizedState,u.state=X,Xl(t,l,u,d),Kl();var ne=t.memoizedState;x!==oe||X!==ne||Xa||e!==null&&e.dependencies!==null&&yo(e.dependencies)?(typeof S=="function"&&(vu(t,a,S,l),ne=t.memoizedState),(se=Xa||Gp(t,a,se,l,X,ne,L)||e!==null&&e.dependencies!==null&&yo(e.dependencies))?(Z||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,ne,L),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,ne,L)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=ne),u.props=l,u.state=ne,u.context=L,l=se):(typeof u.componentDidUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Hi(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=Vs(t,e.child,null,d),t.child=Vs(t,null,a,d)):Tt(e,t,a,d),t.memoizedState=u.state,e=t.child):e=wa(e,t,d),e}function sx(e,t,a,l){return Ls(),t.flags|=256,Tt(e,t,a,l),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ku(e){return{baseLanes:e,cachePool:Kh()}}function Cu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=pn),e}function ix(e,t,a){var l=t.pendingProps,d=!1,u=(t.flags&128)!==0,x;if((x=u)||(x=e!==null&&e.memoizedState===null?!1:(Ut.current&2)!==0),x&&(d=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(d?Ja(t):Wa(),(e=ot)?(e=Cg(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Va!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=Uh(e),a.return=t,t.child=a,At=t,ot=null)):e=null,e===null)throw Fa(t);return Cf(e)?t.lanes=32:t.lanes=536870912,null}return u=l.children,l=l.fallback,d?(Wa(),d=t.mode,u=Uo({mode:"hidden",children:u},d),l=Os(l,d,a,null),u.return=t,l.return=t,u.sibling=l,t.child=u,l=t.child,l.memoizedState=ku(a),l.childLanes=Cu(e,x,a),t.memoizedState=Su,Wl(null,l)):(Ja(t),Tu(t,u))}var S=e.memoizedState;if(S!==null){var L=S.dehydrated;if(L!==null)return c1(e,t,u,x,l,L,S,a)}return d?(Wa(),d=l.fallback,u=t.mode,S=e.child,L=S.sibling,l=ga(S,{mode:"hidden",children:l.children}),l.subtreeFlags=S.subtreeFlags&1206910976,L!==null?d=ga(L,d):(d=Os(d,u,a,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,Wl(null,l),l=t.child,d=e.child.memoizedState,d===null?d=ku(a):(u=d.cachePool,u!==null?(S=_t._currentValue,u=u.parent!==S?{parent:S,pool:S}:u):u=Kh(),d={baseLanes:d.baseLanes|a,cachePool:u}),l.memoizedState=d,l.childLanes=Cu(e,x,a),t.memoizedState=Su,Wl(e.child,l)):(Ja(t),a=e.child,e=a.sibling,a=ga(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function Tu(e,t){return t=Uo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Uo(e,t){return e=an(22,e,null,t),e.lanes=0,e}function Bo(e,t,a){return Vs(t,e.child,null,a),e=Tu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function c1(e,t,a,l,d,u,x,S){if(a)return t.flags&256?(Ja(t),t.flags&=-257,Bo(e,t,S)):t.memoizedState!==null?(Wa(),t.child=e.child,t.flags|=128,null):(Wa(),u=d.fallback,x=t.mode,d=Uo({mode:"visible",children:d.children},x),u=Os(u,x,S,null),u.flags|=2,d.return=t,u.return=t,d.sibling=u,t.child=d,Vs(t,e.child,null,S),d=t.child,d.memoizedState=ku(S),d.childLanes=Cu(e,l,S),t.memoizedState=Su,Wl(null,d));if(Ja(t),Cf(u)){if(l=u.nextSibling&&u.nextSibling.dataset,l)var L=l.dgst;return l=L,l!==""&&(d=Error(o(419)),d.stack="",d.digest=l,ql({value:d,source:null,stack:null})),Bo(e,t,S)}if(kt||Hs(e,t,S,!1),l=(S&e.childLanes)!==0,kt||l){if(Pa.current!==null)return Bo(e,t,S);if(l=lt,l!==null&&(d=Qr(l,S),d!==0&&d!==x.retryLane))throw x.retryLane=d,Ds(e,d),on(l,e,d),wu;return kf(u)||ac(),Bo(e,t,S)}return kf(u)?(t.flags|=192,t.child=e.child,null):(e=x.treeContext,ot=On(u.nextSibling),At=t,Be=!0,Ya=null,Rn=!1,e!==null&&qh(t,e),t=Tu(t,d.children),t.flags|=134221824,t)}function lx(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),go(e.return,t,a)}function rx(e){for(var t=null;e!==null;){var a=e.alternate;a!==null&&ko(a)===null&&(t=e),e=e.sibling}return t}function $o(e,t,a,l,d,u){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:d,treeForkCount:u}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=l,x.tail=a,x.tailMode=d,x.treeForkCount=u)}function Eu(e){var t=e.child;for(e.child=null;t!==null;){var a=t.sibling;t.sibling=e.child,e.child=t,t=a}}function Au(e,t,a){var l=t.pendingProps,d=l.revealOrder,u=l.tail;l=l.children;var x=Ut.current;if(t.flags&128)return Ql(t,x),null;var S=(x&2)!==0;if(S?(x=x&1|2,t.flags|=128):x&=1,Ql(t,x),d==="backwards"&&e!==null?(Eu(e),Tt(e,t,l,a),Eu(e)):Tt(e,t,l,a),l=Be?$l:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lx(e,a,t);else if(e.tag===19)lx(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"backwards":a=rx(t.child),a===null?(d=t.child,t.child=null):(d=a.sibling,a.sibling=null,Eu(t)),$o(t,!0,d,null,u,l);break;case"unstable_legacy-backwards":for(a=null,d=t.child,t.child=null;d!==null;){if(e=d.alternate,e!==null&&ko(e)===null){t.child=d;break}e=d.sibling,d.sibling=a,a=d,d=e}$o(t,!0,a,null,u,l);break;case"together":$o(t,!1,null,null,void 0,l);break;case"independent":t.memoizedState=null;break;default:a=rx(t.child),a===null?(d=t.child,t.child=null):(d=a.sibling,a.sibling=null),$o(t,!1,d,a,u,l)}return t.child}function ox(e,t,a){var l=t.pendingProps;return Ia(t,t.type,l.value),Tt(e,t,l.children,a),t.child}function wa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),as|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Hs(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=ga(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ga(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yo(e)))}function d1(e,t,a){switch(t.tag){case 3:rt(t,t.stateNode.containerInfo),Ia(t,_t,e.memoizedState.cache),Ls();break;case 27:case 5:yt(t);break;case 4:rt(t,t.stateNode.containerInfo);break;case 10:Ia(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,nu(t),null;break;case 13:var l=t.memoizedState;if(l!==null){if(l.dehydrated!==null)return Ja(t),t.flags|=128,null;l=Hs(e,t,a,!1);var d=t.child.childLanes;return l||(a&d)!==0?ix(e,t,a):(Ja(t),e=wa(e,t,a),e!==null?e.sibling:null)}Ja(t);break;case 19:if(t.flags&128)return Au(e,t,a);if(d=(e.flags&128)!==0,l=(a&t.childLanes)!==0,l||(Hs(e,t,a,!1),l=(a&t.childLanes)!==0),d){if(l)return Au(e,t,a);t.flags|=128}if(d=t.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Ql(t,Ut.current),l)break;return null;case 22:return t.lanes=0,Wp(e,t,a,t.pendingProps);case 24:Ia(t,_t,e.memoizedState.cache)}return wa(e,t,a)}function cx(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)kt=!0;else{if(!Mu(e,a)&&(t.flags&128)===0)return kt=!1,d1(e,t,a);kt=(e.flags&131072)!==0}else kt=!1,Be&&(t.flags&1048576)!==0&&$h(t,$l,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=qs(t.elementType),t.type=e,typeof e=="function")Ud(e)?(l=Fs(e,l),t.tag=1,t=ax(null,t,e,l,a)):(t.tag=0,t=_u(null,t,e,l,a));else{if(e!=null){var d=e.$$typeof;if(d===A){t.tag=11,t=Zp(null,t,e,l,a);break e}else if(d===P){t.tag=14,t=Pp(null,t,e,l,a);break e}else if(d===R){t.tag=10,t.type=e,t=ox(null,t,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return _u(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,d=Fs(l,t.pendingProps),ax(e,t,l,d,a);case 3:e:{if(rt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var u=t.memoizedState;d=u.element,Pd(e,t),Xl(t,l,null,a);var x=t.memoizedState;if(l=x.cache,Ia(t,_t,l),l!==u.cache&&Fd(t,[_t],a,!0),Kl(),l=x.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=sx(e,t,l,a);break e}else if(l!==d){d=En(Error(o(424)),t),ql(d),t=sx(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ot=On(e.firstChild),At=t,Be=!0,Ya=null,Rn=!0,a=Wh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling}else{if(Ls(),l===d){t=wa(e,t,a);break e}Tt(e,t,l,a)}t=t.child}return t;case 26:return Hi(e,t),e===null?(a=Og(t.type,null,t.pendingProps,null))?t.memoizedState=a:Be||(t.stateNode=mg(t.type,t.pendingProps,J.current,t)):t.memoizedState=Og(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return yt(t),e===null&&Be&&(l=t.stateNode=Ag(t.type,t.pendingProps,J.current),At=t,Rn=!0,d=ot,rs(t.type)?(Tf=d,ot=On(l.firstChild)):ot=d),Tt(e,t,t.pendingProps.children,a),Hi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((d=l=ot)&&(l=sN(l,t.type,t.pendingProps,Rn),l!==null?(t.stateNode=l,At=t,ot=On(l.firstChild),Rn=!1,d=!0):d=!1),d||Fa(t)),yt(t),d=t.type,u=t.pendingProps,x=e!==null?e.memoizedProps:null,l=u.children,bf(d,u)?l=null:x!==null&&bf(d,x)&&(t.flags|=32),t.memoizedState!==null&&(d=iu(e,t,Wv,null,null,a),tl._currentValue=d),Hi(e,t),Tt(e,t,l,a),t.child;case 6:return e===null&&Be&&((e=a=ot)&&(a=iN(a,t.pendingProps,Rn),a!==null?(t.stateNode=a,At=t,ot=null,e=!0):e=!1),e||Fa(t)),null;case 13:return ix(e,t,a);case 4:return rt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Vs(t,null,l,a):Tt(e,t,l,a),t.child;case 11:return Zp(e,t,t.type,t.pendingProps,a);case 7:return l=t.pendingProps,Hi(e,t),Tt(e,t,l,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return ox(e,t,a);case 9:return d=t.type._context,l=t.pendingProps.children,Us(t),d=zt(d),l=l(d),t.flags|=1,Tt(e,t,l,a),t.child;case 14:return Pp(e,t,t.type,t.pendingProps,a);case 15:return Jp(e,t,t.type,t.pendingProps,a);case 19:return Au(e,t,a);case 31:return o1(e,t,a);case 22:return Wp(e,t,a,t.pendingProps);case 24:return Us(t),l=zt(_t),e===null?(d=Xd(),d===null&&(d=lt,u=Id(),d.pooledCache=u,u.refCount++,u!==null&&(d.pooledCacheLanes|=a),d=u),t.memoizedState={parent:l,cache:d},Zd(t),Ia(t,_t,d)):((e.lanes&a)!==0&&(Pd(e,t),Xl(t,null,null,a),Kl()),d=e.memoizedState,u=t.memoizedState,d.parent!==l?(d={parent:l,cache:l},t.memoizedState=d,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=d),Ia(t,_t,l)):(l=u.cache,Ia(t,_t,l),l!==d.cache&&Fd(t,[_t],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=t.pendingProps,l.name!=null&&l.name!=="auto"?t.flags|=e===null?18882560:18874368:Be&&po(t),e!==null&&e.memoizedProps.name!==l.name?t.flags|=4194816:Hi(e,t),Tt(e,t,l.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function _a(e){e.flags|=4}function Ru(e,t,a,l,d){var u;if((u=(e.mode&32)!==0)&&(u=a===null?Ug(t,l):Ug(t,l)&&(l.src!==a.src||l.srcSet!==a.srcSet)),u){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Yx())e.flags|=8192;else throw Gs=jo,Qd}else e.flags&=-16777217}function dx(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Bg(t))if(Yx())e.flags|=8192;else throw Gs=jo,Qd}function qo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?kl():536870912,e.lanes|=t,Gi|=t)}function er(e,t){if(!Be)switch(e.tailMode){case"visible":break;case"collapsed":for(var a=e.tail,l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null;break;default:for(t=e.tail,a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null}}function ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var d=e.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags&1206910976,l|=d.flags&1206910976,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)a|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function u1(e,t,a){var l=t.pendingProps;switch(qd(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(t),null;case 1:return ct(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),va(_t),ut(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ai(t)?_a(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Vd())),ct(t),null;case 26:var d=t.type,u=t.memoizedState;return e===null?(_a(t),u!==null?(ct(t),dx(t,u)):(ct(t),Ru(t,d,null,l,a))):u?u!==e.memoizedState?(_a(t),ct(t),dx(t,u)):(ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&_a(t),ct(t),Ru(t,d,e,l,a)),null;case 27:if(Je(t),a=J.current,d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&_a(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ct(t),t.subtreeFlags&=-33554433,null}e=Me.current,Ai(t)?Gh(t):(e=Ag(d,l,a),t.stateNode=e,_a(t))}return ct(t),t.subtreeFlags&=-33554433,null;case 5:if(Je(t),d=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&_a(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ct(t),t.subtreeFlags&=-33554433,null}if(u=Me.current,Ai(t))Gh(t);else{var x=ur(J.current);switch(u){case 1:u=x.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:u=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":u=x.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":u=x.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":u=x.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?x.createElement("select",{is:l.is}):x.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?x.createElement(d,{is:l.is}):x.createElement(d)}}u[jt]=t,u[mt]=l;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)u.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=u;e:switch($t(u,d,l),d){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&_a(t)}}return ct(t),t.subtreeFlags&=-33554433,Ru(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&_a(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=J.current,Ai(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,d=At,d!==null)switch(d.tag){case 27:case 5:l=d.memoizedProps}e[jt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||cg(e.nodeValue,a)),e||Fa(t,!0)}else e=ur(e).createTextNode(l),e[jt]=t,t.stateNode=e}return ct(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ai(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[jt]=t}else Ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),e=!1}else a=Vd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ct(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Ai(t),l!==null&&l.dehydrated!==null){if(e===null){if(!d)throw Error(o(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(o(317));d[jt]=t}else Ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ct(t),d=!1}else d=Vd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,d=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(d=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==d&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),qo(t,t.updateQueue),ct(t),null);case 4:return ut(),e===null&&hf(t.stateNode.containerInfo),t.flags|=67108864,ct(t),null;case 10:return va(t.type),ct(t),null;case 19:if(au(t),l=t.memoizedState,l===null)return ct(t),null;if(d=(t.flags&128)!==0,u=l.rendering,u===null)if(d)er(l,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ko(e),u!==null){for(t.flags|=128,er(l,!1),e=u.updateQueue,t.updateQueue=e,qo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Hh(a,e),a=a.sibling;return Ql(t,Ut.current&1|2),Be&&ya(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Ot()>Wo&&(t.flags|=128,d=!0,er(l,!1),t.lanes=4194304)}else{if(!d)if(e=ko(u),e!==null){if(t.flags|=128,d=!0,e=e.updateQueue,t.updateQueue=e,qo(t,e),er(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!u.alternate&&!Be)return ct(t),null}else 2*Ot()-l.renderingStartTime>Wo&&a!==536870912&&(t.flags|=128,d=!0,er(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}if(l.tail!==null){e=l.tail;e:{for(a=e;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Ot(),e.sibling=null,u=Ut.current,u=d?u&1|2:u&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!a||Be?Ql(t,u):(a=u,de(Ht,t),de(Ut,a),Ft===null&&(Ft=t)),Be&&ya(t,l.treeForkCount),e}return ct(t),null;case 22:case 23:return fn(t),tu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(ct(t),t.subtreeFlags&6&&(t.flags|=8192)):ct(t),a=t.updateQueue,a!==null&&qo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&Ee($s),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),va(_t),ct(t),null;case 25:return null;case 30:return t.flags|=33554432,ct(t),null}throw Error(o(156,t.tag))}function f1(e,t){switch(qd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return va(_t),ut(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Je(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(o(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return au(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ut(),null;case 10:return va(t.type),null;case 22:case 23:return fn(t),tu(),e!==null&&Ee($s),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return va(_t),null;case 25:return null;default:return null}}function ux(e,t){switch(qd(t),t.tag){case 3:va(_t),ut();break;case 26:case 27:case 5:Je(t);break;case 4:ut();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:au(t);break;case 10:va(t.type);break;case 22:case 23:fn(t),tu(),e!==null&&Ee($s);break;case 24:va(_t)}}function tr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var d=l.next;a=d;do{if((a.tag&e)===e){l=void 0;var u=a.create,x=a.inst;l=u(),x.destroy=l}a=a.next}while(a!==d)}}catch(S){tt(t,t.return,S)}}function es(e,t,a){try{var l=t.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var u=d.next;l=u;do{if((l.tag&e)===e){var x=l.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,d=t;var L=a,Z=S;try{Z()}catch(se){tt(d,L,se)}}}l=l.next}while(l!==u)}}catch(se){tt(t,t.return,se)}}function fx(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{tp(t,a)}catch(l){tt(e,e.return,l)}}}function mx(e,t,a){a.props=Fs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){tt(e,t,l)}}function ea(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var d=e.stateNode,u=pa(e.memoizedProps,d);(d.ref===null||d.ref.name!==u)&&(d.ref=vg(u)),l=d.ref;break;case 7:if(e.stateNode===null){var x=new gn(e);g(e.child,!1,nN,x,void 0,void 0),e.stateNode=x}l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(S){tt(e,t,S)}}function Bt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(d){tt(e,t,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(d){tt(e,t,d)}else a.current=null}function Go(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var a=0;a<t.length;a++)kg(e.stateNode,t[a])}function hx(e){for(var t=e.return;t!==null&&(Ou(t)&&kg(e.stateNode,t.stateNode),!Du(t));)t=t.return}function nr(e){for(var t=e.return;t!==null&&(Ou(t)&&aN(e.stateNode,t.stateNode),!Du(t));)t=t.return}function Du(e){return e.tag===5||e.tag===3||e.tag===27}function Ou(e){return e&&e.tag===7&&e.stateNode!==null}function Lu(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(d){tt(e,e.return,d)}}function zu(e,t,a){try{var l=e.stateNode;U1(l,e.type,a,t),l[mt]=t}catch(d){tt(e,e.return,d)}}function px(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rs(e.type)||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||px(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&&rs(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uu(e,t,a,l){var d=e.tag;if(d===5||d===6)d=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(d,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(d),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Pn)),Go(e,l),Oe=!0;else if(d!==4&&(d===27&&(Go(e,l),l=null,rs(e.type)&&(a=e.stateNode,t=null)),e=e.child,e!==null))for(Uu(e,t,a,l),e=e.sibling;e!==null;)Uu(e,t,a,l),e=e.sibling}function Vo(e,t,a,l){var d=e.tag;if(d===5||d===6)d=e.stateNode,t?a.insertBefore(d,t):a.appendChild(d),Go(e,l),Oe=!0;else if(d!==4&&(d===27&&(Go(e,l),l=null,rs(e.type)&&(a=e.stateNode)),e=e.child,e!==null))for(Vo(e,t,a,l),e=e.sibling;e!==null;)Vo(e,t,a,l),e=e.sibling}function xx(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,d=t.attributes;d.length;)t.removeAttributeNode(d[0]);$t(t,l,a),t[jt]=e,t[mt]=a}catch(u){tt(e,e.return,u)}}var Yo=!1,mn=null;function gx(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Yo=!0)}var ta=null;function yx(){var e=ta;return ta=null,e}var sn=0;function Ui(e,t,a,l,d){return sn=0,bx(e.child,t,a,l,d)}function bx(e,t,a,l,d){for(var u=!1;e!==null;){if(e.tag===5){var x=e.stateNode;if(l!==null){var S=jf(x);l.push(S),S.view&&(u=!0)}else u||jf(x).view&&(u=!0);Yo=!0,yg(x,sn===0?t:t+"_"+sn,a),sn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&d||bx(e.child,t,a,l,d)&&(u=!0));e=e.sibling}return u}function na(e,t){for(;e!==null;)e.tag===5?bg(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||na(e.child,t)),e=e.sibling}function Fo(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Fo(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(o(544));var a=t.name;t=xa(t.default,t.share),t!=="none"&&(Ui(e,a,t,null,!1)||na(e.child,!1))}e=e.sibling}}function Bu(e,t){if(e.tag===30){var a=e.stateNode,l=e.memoizedProps,d=pa(l,a),u=xa(l.default,a.paired?l.share:l.enter);u!=="none"?Ui(e,d,u,null,!1)?(Fo(e),a.paired||t||Ii(e,l.onEnter)):na(e.child,!1):Fo(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Bu(e,t),e=e.sibling;else Fo(e)}function $u(e){if(mn!==null&&mn.size!==0){var t=mn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var a=e.memoizedProps,l=a.name;if(l!=null&&l!=="auto"){var d=t.get(l);if(d!==void 0){var u=xa(a.default,a.share);if(u!=="none"&&(Ui(e,l,u,null,!1)?(u=e.stateNode,d.paired=u,u.paired=d,Ii(e,a.onShare)):na(e.child,!1)),t.delete(l),t.size===0)break}}}$u(e)}e=e.sibling}}}function qu(e){if(e.tag===30){var t=e.memoizedProps,a=pa(t,e.stateNode),l=mn!==null?mn.get(a):void 0,d=xa(t.default,l!==void 0?t.share:t.exit);d!=="none"&&(Ui(e,a,d,null,!1)?l!==void 0?(d=e.stateNode,l.paired=d,d.paired=l,mn.delete(a),Ii(e,t.onShare)):Ii(e,t.onExit):na(e.child,!1)),mn!==null&&$u(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)qu(e),e=e.sibling;else mn!==null&&$u(e)}function vx(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,a=pa(t,e.stateNode);t=xa(t.default,t.update),e.flags&=-5,t!=="none"&&Ui(e,a,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&vx(e);e=e.sibling}}function Gu(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,na(e.child,!1))}Gu(e)}e=e.sibling}}function Io(e){if(e.tag===30)e.stateNode.paired=null,na(e.child,!1),Gu(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Io(e),e=e.sibling;else Gu(e)}function Nx(e){for(e=e.child;e!==null;)e.tag===30?na(e.child,!1):(e.subtreeFlags&33554432)!==0&&Nx(e),e=e.sibling}function Vu(e,t,a,l,d,u,x){for(var S=!1;t!==null;){if(t.tag===5){var L=t.stateNode;if(u!==null&&sn<u.length){var Z=u[sn],se=jf(L);(Z.view||se.view)&&(S=!0);var oe;if(oe=(e.flags&4)===0)if(se.clip)oe=!0;else{oe=Z.rect;var X=se.rect;oe=oe.y!==X.y||oe.x!==X.x||oe.height!==X.height||oe.width!==X.width}oe&&(e.flags|=4),se.abs?se=!Z.abs:(Z=Z.rect,se=se.rect,se=Z.height!==se.height||Z.width!==se.width),se&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&yg(L,sn===0?a:a+"_"+sn,d),S&&(e.flags&4)!==0||(ta===null&&(ta=[]),ta.push(L,sn===0?l:l+"_"+sn,t.memoizedProps)),sn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&x?e.flags|=t.flags&32:Vu(e,t.child,a,l,d,u,x)&&(S=!0));t=t.sibling}return S}function jx(e,t){for(e=e.child;e!==null;){if(e.tag===30){var a=e.memoizedProps,l=e.stateNode,d=pa(a,l),u=xa(a.default,a.update),x;x=e.memoizedState,e.memoizedState=null,l=e;var S=e.child;sn=0,d=Vu(l,S,d,d,u,x,!1),(e.flags&4)!==0&&d&&Ii(e,a.onUpdate)}else(e.subtreeFlags&33554432)!==0&&jx(e);e=e.sibling}}var Mt=!1,Pe=!1,aa=!1,Yu=!1,wx=typeof WeakSet=="function"?WeakSet:Set,Rt=null,sa=!1,ar=!1,Ko=!1,Fu=!1;function m1(e,t,a){if(e=e.containerInfo,gf=nl,e=Ch(e),Md(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var u=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{l.nodeType,x.nodeType}catch{l=null;break e}var S=0,L=-1,Z=-1,se=0,oe=0,X=e,ne=null;t:for(;;){for(var xe;X!==l||u!==0&&X.nodeType!==3||(L=S+u),X!==x||d!==0&&X.nodeType!==3||(Z=S+d),X.nodeType===3&&(S+=X.nodeValue.length),(xe=X.firstChild)!==null;)ne=X,X=xe;for(;;){if(X===e)break t;if(ne===l&&++se===u&&(L=S),ne===x&&++oe===d&&(Z=S),(xe=X.nextSibling)!==null)break;X=ne,ne=X.parentNode}X=xe}l=L===-1||Z===-1?null:{start:L,end:Z}}else l=null}l=l||{start:0,end:0}}else l=null;for(yf={focusedElem:e,selectionRange:l},nl=!1,a=(a&335544064)===a,Rt=t,t=a?9270:1024;Rt!==null;){if(e=Rt,a&&(l=e.deletions,l!==null))for(u=0;u<l.length;u++)a&&qu(l[u]);if(e.alternate===null&&(e.flags&2)!==0)a&&gx(e),Xo(a);else{if(e.tag===22){if(l=e.alternate,e.memoizedState!==null){l!==null&&l.memoizedState===null&&a&&qu(l),Xo(a);continue}else if(l!==null&&l.memoizedState!==null){a&&gx(e),Xo(a);continue}}l=e.child,(e.subtreeFlags&t)!==0&&l!==null?(l.return=e,Rt=l):(a&&vx(e),Xo(a))}}mn=null}function Xo(e){for(;Rt!==null;){var t=Rt,a=e,l=t.alternate,d=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((d&1024)!==0&&l!==null){a=void 0,d=l.memoizedProps,l=l.memoizedState;var u=t.stateNode;try{var x=Fs(t.type,d);a=u.getSnapshotBeforeUpdate(x,l),u.__reactInternalSnapshotBeforeUpdate=a}catch(S){tt(t,t.return,S)}}break;case 3:if((d&1024)!==0){if(l=t.stateNode.containerInfo,a=l.nodeType,a===9)Sf(l);else if(a===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":Sf(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&l!==null&&(a=pa(l.memoizedProps,l.stateNode),d=t.memoizedProps,d=xa(d.default,d.update),d!=="none"&&Ui(l,a,d,l.memoizedState=[],!0));break;default:if((d&1024)!==0)throw Error(o(163))}if(l=t.sibling,l!==null){l.return=t.return,Rt=l;break}Rt=t.return}}function _x(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),l&4&&tr(5,a);break;case 1:if(ia(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){tt(a,a.return,x)}else{var d=Fs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(d,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){tt(a,a.return,x)}}l&64&&fx(a),l&512&&ea(a,a.return);break;case 3:if(ia(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{tp(e,t)}catch(x){tt(a,a.return,x)}}break;case 27:t===null&&l&4&&xx(a);case 26:case 5:ia(e,a),t===null&&l&4&&Lu(a),l&512&&ea(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),l&4&&Tx(e,a);break;case 13:ia(e,a),l&4&&Ex(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=S1.bind(null,a),lN(e,a))));break;case 22:if(l=a.memoizedState!==null||Mt,!l){var u=t!==null&&t.memoizedState!==null||Pe;t=Mt,d=Pe,Mt=l,(Pe=u)&&!d?(l=2,(a.subtreeFlags&8772)!==0&&(l|=1),Yn(e,a,l)):ia(e,a),Mt=t,Pe=d}break;case 30:ia(e,a),l&512&&ea(a,a.return);break;case 7:l&512&&ea(a,a.return);default:ia(e,a)}}function Iu(e,t){for(e=e.child;e!==null;)Sx(e,t),e=e.sibling}function Sx(e,t){switch(e.tag){case 5:case 26:try{var a=e.stateNode;if(t){var l=a.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var d=e.stateNode,u=e.memoizedProps.style,x=u!=null&&u.hasOwnProperty("display")?u.display:null;d.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(L){tt(e,e.return,L)}Ku(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Oe=!0}catch(L){tt(e,e.return,L)}break;case 18:try{var S=e.stateNode;t?gg(S,!0):gg(e.stateNode,!1)}catch(L){tt(e,e.return,L)}break;case 22:case 23:e.memoizedState===null&&Iu(e,t);break;default:Iu(e,t)}}function Ku(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var a=e,l=t;switch(a.tag){case 4:Sx(a,l);break e;case 22:a.memoizedState===null&&Ku(a,l);break e;default:Ku(a,l)}}e=e.sibling}}function kx(e){var t=e.alternate;t!==null&&(e.alternate=null,kx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&xi(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 ht=null,ln=!1;function Gn(e,t,a){for(a=a.child;a!==null;)Cx(e,t,a),a=a.sibling}function Cx(e,t,a){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(tn,a)}catch{}switch(a.tag){case 26:Pe||Bt(a,t),Gn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!Pe&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Pe||Bt(a,t),nr(a);var l=ht,d=ln;rs(a.type)&&(ht=a.stateNode,ln=!1),Gn(e,t,a),Mg(a.stateNode,a.type,a.memoizedProps),ht=l,ln=d;break;case 5:Pe||Bt(a,t),nr(a);case 6:if(a.tag===6&&nr(a),l=ht,d=ln,ht=null,Gn(e,t,a),ht=l,ln=d,ht!==null)if(ln)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode),Oe=!0}catch(u){tt(a,t,u)}else try{ht.removeChild(a.stateNode),Oe=!0}catch(u){tt(a,t,u)}break;case 18:ht!==null&&(ln?(e=ht,xg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),al(e)):xg(ht,a.stateNode));break;case 4:l=ht,d=ln,ht=a.stateNode.containerInfo,ln=!0,Gn(e,t,a),ht=l,ln=d;break;case 0:case 11:case 14:case 15:es(2,a,t),Pe||es(4,a,t),Gn(e,t,a);break;case 1:Pe||(Bt(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&mx(a,t,l)),Gn(e,t,a);break;case 21:Gn(e,t,a);break;case 22:Pe=(l=Pe)||a.memoizedState!==null,Gn(e,t,a),Pe=l;break;case 30:Bt(a,t),Gn(e,t,a);break;case 7:Pe||Bt(a,t),Gn(e,t,a);break;default:Gn(e,t,a)}}function Tx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{al(e)}catch(a){tt(t,t.return,a)}}}function Ex(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{al(e)}catch(a){tt(t,t.return,a)}}function h1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wx),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wx),t;default:throw Error(o(435,e.tag))}}function Qo(e,t){var a=h1(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var d=k1.bind(null,e,l);l.then(d,d)}})}function Zt(e,t,a){var l=t.deletions;if(l!==null)for(var d=0;d<l.length;d++){var u=l[d],x=e,S=t,L=S;e:for(;L!==null;){switch(L.tag){case 27:if(rs(L.type)){ht=L.stateNode,ln=!1;break e}break;case 5:ht=L.stateNode,ln=!1;break e;case 3:case 4:ht=L.stateNode.containerInfo,ln=!0;break e}L=L.return}if(ht===null)throw Error(o(160));Cx(x,S,u),ht=null,ln=!1,x=u.alternate,x!==null&&(x.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ax(t,e,a),t=t.sibling}var Vn=null;function Ax(e,t,a){var l=e.alternate,d=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(d&4&&(l=e.updateQueue,l=l!==null?l.events:null,l!==null))for(var u=0;u<l.length;u++){var x=l[u];x.ref.impl=x.nextImpl}Zt(t,e,a),Pt(e),d&4&&(es(3,e,e.return),tr(3,e),es(5,e,e.return));break;case 1:Zt(t,e,a),Pt(e),d&512&&(Pe||l===null||Bt(l,l.return)),d&64&&Mt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?t:a.concat(t))));break;case 26:if(u=Vn,Zt(t,e,a),Pt(e),d&512&&(Pe||l===null||Bt(l,l.return)),d&4)if(d=l!==null?l.memoizedState:null,a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null)if(Mt)e.stateNode=mg(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,a=e.memoizedProps,d=u.ownerDocument||u;t:switch(t){case"title":l=d.getElementsByTagName("title")[0],(!l||l[As]||l[jt]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=d.createElement(t),d.head.insertBefore(l,d.querySelector("head > title"))),$t(l,t,a),l[jt]=e,wt(l),t=l;break e;case"link":if(u=Hg("link","href",d).get(t+(a.href||""))){for(x=0;x<u.length;x++)if(l=u[x],l.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&l.getAttribute("rel")===(a.rel==null?null:a.rel)&&l.getAttribute("title")===(a.title==null?null:a.title)&&l.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){u.splice(x,1);break t}}l=d.createElement(t),$t(l,t,a),d.head.appendChild(l);break;case"meta":if(u=Hg("meta","content",d).get(t+(a.content||""))){for(x=0;x<u.length;x++)if(l=u[x],l.getAttribute("content")===(a.content==null?null:""+a.content)&&l.getAttribute("name")===(a.name==null?null:a.name)&&l.getAttribute("property")===(a.property==null?null:a.property)&&l.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&l.getAttribute("charset")===(a.charSet==null?null:a.charSet)){u.splice(x,1);break t}}l=d.createElement(t),$t(l,t,a),d.head.appendChild(l);break;default:throw Error(o(468,t))}l[jt]=e,wt(l),t=l}e.stateNode=t}else Mt||Rf(u,e.type,e.stateNode);else e.stateNode=zg(u,a,e.memoizedProps);else d!==a?(d===null?(t=l.stateNode,t===null||Pe||t.parentNode.removeChild(t)):d.count--,a===null?Mt||Rf(u,e.type,e.stateNode):zg(u,a,e.memoizedProps)):a===null&&e.stateNode!==null&&zu(e,e.memoizedProps,l.memoizedProps);break;case 27:Zt(t,e,a),Pt(e),d&512&&(Pe||l===null||Bt(l,l.return)),l!==null&&d&4&&zu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(u=aa,aa=!1,Zt(t,e,a),aa=u,Pt(e),d&512&&(Pe||l===null||Bt(l,l.return)),e.flags&32){t=e.stateNode;try{vi(t,""),Oe=!0}catch(se){tt(e,e.return,se)}}d&4&&e.stateNode!=null&&(t=e.memoizedProps,zu(e,t,l!==null?l.memoizedProps:t)),d&1024&&(Yu=!0);break;case 6:if(Zt(t,e,a),Pt(e),d&4){if(e.stateNode===null)throw Error(o(162));t=e.memoizedProps,a=e.stateNode;try{a.nodeValue=t,Oe=!0}catch(se){tt(e,e.return,se)}}break;case 3:if(Oe=!1,dc=null,u=Vn,Vn=fr(t.containerInfo),Zt(t,e,a),Vn=u,Pt(e),d&4&&l!==null&&l.memoizedState.isDehydrated)try{al(t.containerInfo)}catch(se){tt(e,e.return,se)}Yu&&(Yu=!1,Mx(e)),Oe=!1;break;case 4:d=aa,aa=Mt,l=Vt(),u=Vn,Vn=fr(e.stateNode.containerInfo),Zt(t,e,a),Pt(e),Vn=u,Oe&&ar&&(Ko=!0),Oe=l,aa=d;break;case 12:Zt(t,e,a),Pt(e);break;case 31:Zt(t,e,a),Pt(e),d&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Qo(e,t)));break;case 13:Zt(t,e,a),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Jo=Ot()),d&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Qo(e,t)));break;case 22:u=e.memoizedState!==null,x=l!==null&&l.memoizedState!==null;var S=Mt,L=Pe,Z=aa;Mt=S||u,aa=Z||u,Pe=L||x,Zt(t,e,a),Pe=L,aa=Z,Mt=S,Pt(e),d&8192&&(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,!u||l===null||x||Mt||Pe||(t=x||Pe,a=Mt,l=Pe,Mt=u||Mt,Pe=t,ts(e,2),Mt=a,Pe=l),!u&&aa||Iu(e,u)),d&4&&(t=e.updateQueue,t!==null&&(a=t.retryQueue,a!==null&&(t.retryQueue=null,Qo(e,a))));break;case 19:Zt(t,e,a),Pt(e),d&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Qo(e,t)));break;case 30:d&512&&(Pe||l===null||Bt(l,l.return)),d=Vt(),u=ar,x=(a&335544064)===a,S=e.memoizedProps,ar=x&&xa(S.default,S.update)!=="none",Zt(t,e,a),Pt(e),x&&l!==null&&Oe&&(e.flags|=4),ar=u,Oe=d;break;case 21:break;case 7:d&512&&(Pe||l===null||Bt(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=e);default:Zt(t,e,a),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(px(l)){a=l;break}l=l.return}l=null;for(var d=e.return;d!==null;){if(Ou(d)){var u=d.stateNode;l===null?l=[u]:l.push(u)}if(Du(d))break;d=d.return}var x=l;if(a==null)throw Error(o(160));switch(a.tag){case 27:var S=a.stateNode,L=Hu(e);Vo(e,L,S,x);break;case 5:var Z=a.stateNode;a.flags&32&&(vi(Z,""),a.flags&=-33);var se=Hu(e);Vo(e,se,Z,x);break;case 3:case 4:var oe=a.stateNode.containerInfo,X=Hu(e);Uu(e,X,oe,x);break;default:throw Error(o(161))}}catch(ne){tt(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mx(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,nl=!0,t.reset(),nl=!1),e=e.sibling}}function Bi(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Rx(t,e),t=t.sibling;else jx(t)}function Rx(e,t){var a=e.alternate;if(a===null)Bu(e,!1);else switch(e.tag){case 3:if(Fu=sa=!1,yx(),Bi(t,e),!sa&&!Ko){if(e=ta,e!==null)for(var l=0;l<e.length;l+=3){a=e[l];var d=e[l+1];bg(a,e[l+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+d+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Fu=!0}ta=null;break;case 5:Bi(t,e);break;case 4:l=sa,sa=!1,Bi(t,e),sa&&(Ko=!0),sa=l;break;case 22:e.memoizedState===null&&(a.memoizedState!==null?Bu(e,!1):Bi(t,e));break;case 30:l=sa,d=yx(),sa=!1,Bi(t,e),sa&&(e.flags|=4);var u=e.memoizedProps,x=e.stateNode;t=pa(u,x),x=pa(a.memoizedProps,x);var S=xa(u.default,u.update);S==="none"?t=!1:(u=a.memoizedState,a.memoizedState=null,a=e.child,sn=0,t=Vu(e,a,t,x,S,u,!0),sn!==(u===null?0:u.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Ii(e,e.memoizedProps.onUpdate),ta=d):d!==null&&(d.push.apply(d,ta),ta=d),sa=(e.flags&32)!==0?!0:l;break;default:Bi(t,e)}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_x(e,t.alternate,t),t=t.sibling}function ts(e,t){for(e=e.child;e!==null;){var a=e,l=t;switch(a.tag){case 0:case 11:case 14:case 15:es(4,a,a.return),ts(a,l);break;case 1:Bt(a,a.return);var d=a.stateNode;typeof d.componentWillUnmount=="function"&&mx(a,a.return,d),ts(a,l);break;case 27:(l&2)!==0&&Mg(a.stateNode,a.type,a.memoizedProps);case 5:Bt(a,a.return),a.tag!==5&&a.tag!==27||nr(a),ts(a,l);break;case 6:nr(a);break;case 26:Bt(a,a.return),d=a.stateNode,a.memoizedState!==null||d===null||Pe||d.parentNode.removeChild(d),ts(a,l);break;case 22:a.memoizedState===null&&ts(a,l);break;case 30:Bt(a,a.return),ts(a,l);break;case 7:Bt(a,a.return);default:ts(a,l)}e=e.sibling}}function Yn(e,t,a){for(a=(t.subtreeFlags&8772)!==0?a:a&-2,t=t.child;t!==null;){var l=t.alternate,d=e,u=t,x=u.flags,S=(a&1)!==0;switch(u.tag){case 0:case 11:case 15:Yn(d,u,a),tr(4,u);break;case 1:if(Yn(d,u,a),l=u,d=l.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(se){tt(l,l.return,se)}if(l=u,d=l.updateQueue,d!==null){var L=l.stateNode;try{var Z=d.shared.hiddenCallbacks;if(Z!==null)for(d.shared.hiddenCallbacks=null,d=0;d<Z.length;d++)ep(Z[d],L)}catch(se){tt(l,l.return,se)}}S&&x&64&&fx(u),ea(u,u.return);break;case 27:(a&2)!==0&&xx(u);case 5:u.tag!==5&&u.tag!==27||hx(u),Yn(d,u,a),S&&l===null&&x&4&&Lu(u),ea(u,u.return);break;case 6:hx(u);break;case 26:L=u.stateNode,u.memoizedState!==null||L===null||Mt||Rf(fr(L.ownerDocument),u.type,L),Yn(d,u,a),S&&l===null&&x&4&&Lu(u),ea(u,u.return);break;case 12:Yn(d,u,a);break;case 31:Yn(d,u,a),S&&x&4&&Tx(d,u);break;case 13:Yn(d,u,a),S&&x&4&&Ex(d,u);break;case 22:u.memoizedState===null&&Yn(d,u,a),ea(u,u.return);break;case 30:Yn(d,u,a),ea(u,u.return);break;case 7:ea(u,u.return);default:Yn(d,u,a)}t=t.sibling}}function Xu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Gl(a))}function Qu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gl(e))}function Dn(e,t,a,l){var d=(a&335544064)===a;if(t.subtreeFlags&(d?10262:10256))for(t=t.child;t!==null;)Dx(e,t,a,l),t=t.sibling;else d&&Nx(t)}function Dx(e,t,a,l){var d=(a&335544064)===a;d&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Io(t);var u=t.flags;switch(t.tag){case 0:case 11:case 15:Dn(e,t,a,l),u&2048&&tr(9,t);break;case 1:Dn(e,t,a,l);break;case 3:Dn(e,t,a,l),d&&Fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),u&2048&&(u=null,t.alternate!==null&&(u=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==u&&(t.refCount++,u!=null&&Gl(u)));break;case 12:if(u&2048){Dn(e,t,a,l),u=t.stateNode;try{var x=t.memoizedProps,S=x.id,L=x.onPostCommit;typeof L=="function"&&L(S,t.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(Z){tt(t,t.return,Z)}}else Dn(e,t,a,l);break;case 31:Dn(e,t,a,l);break;case 13:Dn(e,t,a,l);break;case 23:break;case 22:x=t.stateNode,S=t.alternate,t.memoizedState!==null?(d&&S!==null&&S.memoizedState===null&&Io(S),x._visibility&2?Dn(e,t,a,l):sr(e,t)):(d&&S!==null&&S.memoizedState!==null&&Io(t),x._visibility&2?Dn(e,t,a,l):(x._visibility|=2,$i(e,t,a,l,(t.subtreeFlags&10256)!==0||!1))),u&2048&&Xu(S,t);break;case 24:Dn(e,t,a,l),u&2048&&Qu(t.alternate,t);break;case 30:d&&(u=t.alternate,u!==null&&(na(u.child,!0),na(t.child,!0))),Dn(e,t,a,l);break;default:Dn(e,t,a,l)}}function $i(e,t,a,l,d){for(d=d&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,x=t,S=a,L=l,Z=x.flags;switch(x.tag){case 0:case 11:case 15:$i(u,x,S,L,d),tr(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?$i(u,x,S,L,d):sr(u,x):(se._visibility|=2,$i(u,x,S,L,d)),d&&Z&2048&&Xu(x.alternate,x);break;case 24:$i(u,x,S,L,d),d&&Z&2048&&Qu(x.alternate,x);break;default:$i(u,x,S,L,d)}t=t.sibling}}function sr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,d=l.flags;switch(l.tag){case 22:sr(a,l),d&2048&&Xu(l.alternate,l);break;case 24:sr(a,l),d&2048&&Qu(l.alternate,l);break;default:sr(a,l)}t=t.sibling}}var Is=8192;function Ks(e,t,a){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Ox(e,t,a),e=e.sibling}function Ox(e,t,a){switch(e.tag){case 26:Ks(e,t,a),e.flags&Is&&(e.memoizedState!==null?vN(a,Vn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&qg(a,e)));break;case 5:Ks(e,t,a),e.flags&Is&&(e=e.stateNode,(t&335544128)===t&&qg(a,e));break;case 3:case 4:var l=Vn;Vn=fr(e.stateNode.containerInfo),Ks(e,t,a),Vn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Is,Is=16777216,Ks(e,t,a),Is=l):Ks(e,t,a));break;case 30:if((e.flags&Is)!==0&&(l=e.memoizedProps.name,l!=null&&l!=="auto")){var d=e.stateNode;d.paired=null,mn===null&&(mn=new Map),mn.set(l,d)}Ks(e,t,a);break;default:Ks(e,t,a)}}function Lx(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 ir(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Rt=l,Hx(l,e)}Lx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zx(e),e=e.sibling}function zx(e){switch(e.tag){case 0:case 11:case 15:ir(e),e.flags&2048&&es(9,e,e.return);break;case 3:ir(e);break;case 12:ir(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zo(e)):ir(e);break;default:ir(e)}}function Zo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];Rt=l,Hx(l,e)}Lx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:es(8,t,t.return),Zo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Zo(t));break;default:Zo(t)}e=e.sibling}}function Hx(e,t){for(;Rt!==null;){var a=Rt;switch(a.tag){case 0:case 11:case 15:es(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Gl(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,Rt=l;else e:for(a=e;Rt!==null;){l=Rt;var d=l.sibling,u=l.return;if(kx(l),l===a){Rt=null;break e}if(d!==null){d.return=u,Rt=d;break e}Rt=u}}}var p1={getCacheForType:function(e){var t=zt(_t),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return zt(_t).controller.signal}},x1=typeof WeakMap=="function"?WeakMap:Map,Ze=0,lt=null,Ge=null,Ye=0,et=0,hn=null,ns=!1,qi=!1,Zu=!1,Sa=0,gt=0,as=0,Xs=0,Po=0,pn=0,Gi=0,lr=null,rn=null,Pu=!1,Jo=0,Ux=0,Wo=1/0,ec=null,ss=null,pt=0,Fn=null,Qs=null,la=0,Ju=0,Wu=null,Bx=null,Vi=null,Yi=null,Fi=null,rr=0,tc=null;function xn(){return(Ze&2)!==0&&Ye!==0?Ye&-Ye:ue.T!==null?df():Bn()}function $x(){if(pn===0)if((Ye&536870912)===0||Be){var e=za;za<<=1,(za&3932160)===0&&(za=262144),pn=e}else pn=536870912;return e=Ht.current,e!==null&&(e.flags|=32),pn}function Ii(e,t){if(t!=null){var a=e.stateNode,l=a.ref;l===null&&(l=a.ref=vg(pa(e.memoizedProps,a))),Yi===null&&(Yi=[]),Yi.push(t.bind(null,l))}}function on(e,t,a){(e===lt&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Ki(e,0),is(e,Ye,pn,!1)),Ha(e,a),((Ze&2)===0||e!==lt)&&(e===lt&&((Ze&2)===0&&(Xs|=a),gt===4&&is(e,Ye,pn,!1)),ra(e))}function qx(e,t,a){if((Ze&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Zn(e,t),d=l?b1(e,t):tf(e,t,!0),u=l;do{if(d===0){qi&&!l&&is(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!g1(a)){d=tf(e,t,!1),u=!1;continue}if(d===2){if(u=t,e.errorRecoveryDisabledLanes&u)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var S=e;d=lr;var L=S.current.memoizedState.isDehydrated;if(L&&(Ki(S,x).flags|=256),x=tf(S,x,!1),x!==2&&x!==6){if(Zu&&!L){S.errorRecoveryDisabledLanes|=u,Xs|=u,d=4;break e}u=rn,rn=d,u!==null&&(rn===null?rn=u:rn.push.apply(rn,u))}d=x}if(u=!1,d!==2)continue}}if(d===1){Ki(e,0),is(e,t,0,!0);break}e:{switch(l=e,u=d,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:is(l,t,pn,!ns);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(d=Jo+300-Ot(),10<d)){if(is(l,t,pn,!ns),ks(l,0,!0)!==0)break e;la=t,l.timeoutHandle=Nf(Gx.bind(null,l,a,rn,ec,Pu,t,pn,Xs,Gi,ns,u,"Throttled",-0,0),d);break e}Gx(l,a,rn,ec,Pu,t,pn,Xs,Gi,ns,u,null,-0,0)}}break}while(!0);ra(e)}function Gx(e,t,a,l,d,u,x,S,L,Z,se,oe,X,ne){e.timeoutHandle=-1;var xe=t.subtreeFlags,Ne=(u&335544064)===u;if(oe=null,(Ne||xe&8192||(xe&16785408)===16785408)&&(oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pn},mn=null,Ox(t,u,oe),Ne&&(xe=oe,Ne=e.containerInfo,Ne=(Ne.nodeType===9?Ne:Ne.ownerDocument).__reactViewTransition,Ne!=null&&(xe.count++,xe.waitingForViewTransition=!0,xe=pr.bind(xe),Ne.finished.then(xe,xe))),xe=(u&62914560)===u?Jo-Ot():(u&4194048)===u?Ux-Ot():0,xe=NN(oe,xe),xe!==null)){la=u,e.cancelPendingCommit=xe(Zx.bind(null,e,t,u,a,l,d,x,S,L,Z,se,oe,null,X,ne)),is(e,u,x,!Z);return}Zx(e,t,u,a,l,d,x,S,L,Z,se,oe)}function g1(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var d=a[l],u=d.getSnapshot;d=d.value;try{if(!un(u(),d))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 is(e,t,a,l){t=Cs(e,t),t&=~Po,t&=~Xs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var d=t;0<d;){var u=31-Nt(d),x=1<<u;l[u]=-1,d&=~x}a!==0&&Tl(e,a,t)}function nc(){return(Ze&6)===0?(or(0),!1):!0}function ef(){if(Ge!==null){if(et===0)var e=Ge.return;else e=Ge,ba=zs=null,ou(e),Di=null,Fl=0,e=Ge;for(;e!==null;)ux(e.alternate,e),e=e.return;Ge=null}}function Ki(e,t){var a=e.timeoutHandle;return a!==-1&&(e.timeoutHandle=-1,q1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),la=0,ef(),lt=e,Ge=a=ga(e.current,null),Ye=t,et=0,hn=null,ns=!1,qi=Zn(e,t),Zu=!1,Gi=pn=Po=Xs=as=gt=0,rn=lr=null,Pu=!1,Sa=Cs(e,t),co(),a}function Vx(e,t){ze=null,ue.H=Lo,t===Ri||t===No?(t=Zh(),et=3):t===Qd?(t=Zh(),et=4):et=t===wu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,Ge===null&&(gt=1,zo(e,En(t,e.current)))}function Yx(){var e=Ht.current;return e===null?!0:(Ye&4194048)===Ye?Ft===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===Ft:!1}function Fx(){var e=ue.H;return ue.H=Lo,e===null?Lo:e}function Ix(){var e=ue.A;return ue.A=p1,e}function ac(){gt=4,ns||(Ye&4194048)!==Ye&&Ht.current!==null||(qi=!0),(as&134217727)===0&&(Xs&134217727)===0||lt===null||is(lt,Ye,pn,!1)}function tf(e,t,a){var l=Ze;Ze|=2;var d=Fx(),u=Ix();(lt!==e||Ye!==t)&&(ec=null,Ki(e,t)),t=!1;var x=gt;e:do try{if(et!==0&&Ge!==null){var S=Ge,L=hn;switch(et){case 8:ef(),x=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var Z=et;if(et=0,hn=null,Xi(e,S,L,Z),a&&qi){x=0;break e}break;default:Z=et,et=0,hn=null,Xi(e,S,L,Z)}}y1(),x=gt;break}catch(se){Vx(e,se)}while(!0);return t&&e.shellSuspendCounter++,ba=zs=null,Ze=l,ue.H=d,ue.A=u,Ge===null&&(lt=null,Ye=0,co()),x}function y1(){for(;Ge!==null;)Kx(Ge)}function b1(e,t){var a=Ze;Ze|=2;var l=Fx(),d=Ix();lt!==e||Ye!==t?(ec=null,Wo=Ot()+500,Ki(e,t)):qi=Zn(e,t);e:do try{if(et!==0&&Ge!==null){t=Ge;var u=hn;t:switch(et){case 1:et=0,hn=null,Xi(e,t,u,1);break;case 2:case 9:if(Xh(u)){et=0,hn=null,Xx(t);break}t=function(){et!==2&&et!==9||lt!==e||(et=7),ra(e)},u.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:Xh(u)?(et=0,hn=null,Xx(t)):(et=0,hn=null,Xi(e,t,u,7));break;case 5:var x=null;switch(Ge.tag){case 26:x=Ge.memoizedState;case 5:case 27:var S=Ge;if(x?Bg(x):S.stateNode.complete){et=0,hn=null;var L=S.sibling;if(L!==null)Ge=L;else{var Z=S.return;Z!==null?(Ge=Z,sc(Z)):Ge=null}break t}}et=0,hn=null,Xi(e,t,u,5);break;case 6:et=0,hn=null,Xi(e,t,u,6);break;case 8:ef(),gt=6;break e;default:throw Error(o(462))}}v1();break}catch(se){Vx(e,se)}while(!0);return ba=zs=null,ue.H=l,ue.A=d,Ze=a,Ge!==null?0:(lt=null,Ye=0,co(),gt)}function v1(){for(;Ge!==null&&!Ir();)Kx(Ge)}function Kx(e){var t=cx(e.alternate,e,Sa);e.memoizedProps=e.pendingProps,t===null?sc(e):Ge=t}function Xx(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=nx(a,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=nx(a,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:ou(t);var l=t;l===At&&(Be?(xo(l),l.tag===5&&l.stateNode!=null&&(ot=l.stateNode)):(xo(l),Be=!0));default:ux(a,t),t=Ge=Hh(t,Sa),t=cx(a,t,Sa)}e.memoizedProps=e.pendingProps,t===null?sc(e):Ge=t}function Xi(e,t,a,l){ba=zs=null,ou(t),Di=null,Fl=0;var d=t.return;try{if(r1(e,d,t,a,Ye)){gt=1,zo(e,En(a,e.current)),Ge=null;return}}catch(u){if(d!==null)throw Ge=d,u;gt=1,zo(e,En(a,e.current)),Ge=null;return}t.flags&32768?(Be||l===1?e=!0:qi||(Ye&536870912)!==0?e=!1:(ns=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),Qx(t,e)):sc(t)}function sc(e){var t=e;do{if((t.flags&32768)!==0){Qx(t,ns);return}e=t.return;var a=u1(t.alternate,t,Sa);if(a!==null){Ge=a;return}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);gt===0&&(gt=5)}function Qx(e,t){do{var a=f1(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);gt=6,Ge=null}function Zx(e,t,a,l,d,u,x,S,L,Z,se,oe){e.cancelPendingCommit=null;do ic();while(pt!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));e===lt&&(Ge=lt=null,Ye=0),Qs=t,Fn=e,la=a,Wu=d,Bx=l,N1(e,t,a,x,S,L,oe)}}function N1(e,t,a,l,d,u,x){var S=t.lanes|t.childLanes;if(Ju=S,S|=zd,Cl(e,a,S,l,d,u),Yi=null,(a&335544064)===a?(Fi=Qv(e),l=10262):(Fi=null,l=10256),(t.subtreeFlags&l)!==0||(t.flags&l)!==0?(e.callbackNode=null,e.callbackPriority=0,C1(js,function(){return lf(),null})):(e.callbackNode=null,e.callbackPriority=0),Yo=!1,l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=ue.T,ue.T=null,d=ye.p,ye.p=2,u=Ze,Ze|=4;try{m1(e,t,a)}finally{Ze=u,ye.p=d,ue.T=l}}pt=1,Yo?Vi=K1(x,e.containerInfo,Fi,nf,af,w1,sf,lf,j1):(nf(),af(),sf())}function j1(e){if(pt!==0){var t=Fn.onRecoverableError;t(e,{componentStack:null})}}function w1(){pt===3&&(pt=0,Rx(Qs,Fn),pt=4)}function nf(){if(pt===1){pt=0;var e=Fn,t=Qs,a=la,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=ue.T,ue.T=null;var d=ye.p;ye.p=2;var u=Ze;Ze|=4;try{ar=Ko=!1,Ax(t,e,a),a=yf;var x=Ch(e.containerInfo),S=a.focusedElem,L=a.selectionRange;if(x!==S&&S&&S.ownerDocument&&kh(S.ownerDocument.documentElement,S)){if(L!==null&&Md(S)){var Z=L.start,se=L.end;if(se===void 0&&(se=Z),"selectionStart"in S)S.selectionStart=Z,S.selectionEnd=Math.min(se,S.value.length);else{var oe=S.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var ne=X.getSelection(),xe=S.textContent.length,Ne=Math.min(L.start,xe),He=L.end===void 0?Ne:Math.min(L.end,xe);!ne.extend&&Ne>He&&(x=He,He=Ne,Ne=x);var Q=Sh(S,Ne),$=Sh(S,He);if(Q&&$&&(ne.rangeCount!==1||ne.anchorNode!==Q.node||ne.anchorOffset!==Q.offset||ne.focusNode!==$.node||ne.focusOffset!==$.offset)){var ee=oe.createRange();ee.setStart(Q.node,Q.offset),ne.removeAllRanges(),Ne>He?(ne.addRange(ee),ne.extend($.node,$.offset)):(ee.setEnd($.node,$.offset),ne.addRange(ee))}}}}for(oe=[],ne=S;ne=ne.parentNode;)ne.nodeType===1&&oe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<oe.length;S++){var re=oe[S];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}nl=!!gf,yf=gf=null}finally{Ze=u,ye.p=d,ue.T=l}}e.current=t,pt=2}}function af(){if(pt===2){pt=0;var e=Fn,t=Qs,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=ue.T,ue.T=null;var l=ye.p;ye.p=2;var d=Ze;Ze|=4;try{_x(e,t.alternate,t)}finally{Ze=d,ye.p=l,ue.T=a}}pt=3}}function sf(){if(pt===4||pt===3){pt=0;var e=Vi;Vi=null,vs();var t=Fn,a=Qs,l=la,d=Bx,u=(l&335544064)===l?10262:10256;if((a.subtreeFlags&u)!==0||(a.flags&u)!==0?pt=5:(pt=0,Qs=Fn=null,Px(t,t.pendingLanes)),u=t.pendingLanes,u===0&&(ss=null),dn(l),a=a.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(tn,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=ue.T,u=ye.p,ye.p=2,ue.T=null;try{for(var x=t.onRecoverableError,S=0;S<d.length;S++){var L=d[S];x(L.value,{componentStack:L.stack})}}finally{ue.T=a,ye.p=u}}if(d=Yi,x=Fi,Fi=null,d!==null&&(Yi=null,x===null&&(x=[]),e!==null))for(L=0;L<d.length;L++)a=(0,d[L])(x),a!==void 0&&e.finished.finally(a);(la&3)!==0&&ic(),ra(t),u=t.pendingLanes,(l&261930)!==0&&(u&42)!==0?t===tc?rr++:(rr=0,tc=t):(rr=0,tc=null),or(0)}}function Px(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gl(t)))}function ic(){return Vi!==null&&(Vi.skipTransition(),Vi=null),nf(),af(),sf(),lf()}function lf(){if(pt!==5)return!1;var e=Fn,t=Ju;Ju=0;var a=dn(la),l=ue.T,d=ye.p;try{ye.p=32>a?32:a,ue.T=null,a=Wu,Wu=null;var u=Fn,x=la;if(pt=0,Qs=Fn=null,la=0,(Ze&6)!==0)throw Error(o(331));var S=Ze;if(Ze|=4,zx(u.current),Dx(u,u.current,x,a),Ze=S,or(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(tn,u)}catch{}return!0}finally{ye.p=d,ue.T=l,Px(e,t)}}function Jx(e,t,a){t=En(a,t),t=ju(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(Ha(e,2),ra(e))}function tt(e,t,a){if(e.tag===3)Jx(e,e,a);else for(;t!==null;){if(t.tag===3){Jx(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ss===null||!ss.has(l))){e=En(a,e),a=Xp(2),l=Za(t,a,2),l!==null&&(Qp(a,l,t,e),Ha(l,2),ra(l));break}}t=t.return}}function rf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new x1;var d=new Set;l.set(t,d)}else d=l.get(t),d===void 0&&(d=new Set,l.set(t,d));d.has(a)||(Zu=!0,d.add(a),e=_1.bind(null,e,t,a),t.then(e,e))}function _1(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,lt===e&&(Ye&a)===a&&((gt===4||gt===3&&(Ye&62914560)===Ye&&300>Ot()-Jo)&&(Ze&2)===0?Ki(e,0):Po|=a,Gi===Ye&&(Gi=0)),ra(e)}function Wx(e,t){t===0&&(t=kl()),e=Ds(e,t),e!==null&&(Ha(e,t),ra(e))}function S1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wx(e,a)}function k1(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,d=e.memoizedState;d!==null&&(a=d.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Wx(e,a)}function C1(e,t){return ui(e,t)}var Qi=null,Zi=null,of=!1,lc=!1,cf=!1,ls=0;function ra(e){e!==Zi&&e.next===null&&(Zi===null?Qi=Zi=e:Zi=Zi.next=e),lc=!0,of||(of=!0,E1())}function or(e,t){if(!cf&&lc){cf=!0;do for(var a=!1,l=Qi;l!==null;){if(e!==0){var d=l.pendingLanes;if(d===0)var u=0;else{var x=l.suspendedLanes,S=l.pingedLanes;u=(1<<31-Nt(42|e)+1)-1,u&=d&~(x&~S),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,ag(l,u))}else u=Ye,u=ks(l,l===lt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Zn(l,u)||(a=!0,ag(l,u));l=l.next}while(a);cf=!1}}function T1(){eg()}function eg(){lc=of=!1;var e=0;ls!==0&&$1()&&(e=ls);for(var t=Ot(),a=null,l=Qi;l!==null;){var d=l.next,u=tg(l,t);u===0?(l.next=null,a===null?Qi=d:a.next=d,d===null&&(Zi=a)):(a=l,(e!==0||(u&3)!==0)&&(lc=!0)),l=d}pt!==0&&pt!==5||or(e),ls!==0&&(ls=0)}function tg(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,d=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var x=31-Nt(u),S=1<<x,L=d[x];L===-1?((S&a)===0||(S&l)!==0)&&(d[x]=Sl(S,t)):L<=t&&(e.expiredLanes|=S),u&=~S}if(t=lt,a=Ye,a=ks(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&bs(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Zn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&bs(l),dn(a)){case 2:case 8:a=Ns;break;case 32:a=js;break;case 268435456:a=mi;break;default:a=js}return l=ng.bind(null,e),a=ui(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&bs(l),e.callbackPriority=2,e.callbackNode=null,2}function ng(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ic()&&e.callbackNode!==a)return null;var l=Ye;return l=ks(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(qx(e,l,t),tg(e,Ot()),e.callbackNode!=null&&e.callbackNode===a?ng.bind(null,e):null)}function ag(e,t){if(ic())return null;qx(e,t,!0)}function E1(){G1(function(){(Ze&6)!==0?ui(jl,T1):eg()})}function df(){if(ls===0){var e=Bs;e===0&&(e=_s,_s<<=1,(_s&261888)===0&&(_s=256)),ls=e}return ls}function sg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:to(e)}function A1(e,t,a,l,d){if(t==="submit"&&a&&a.stateNode===d){var u=sg((d[mt]||null).action),x=l.submitter;x&&(t=(t=x[mt]||null)?sg(t.formAction):x.getAttribute("formAction"),t!==null&&(u=t,x=null));var S=new io("action","action",null,l,d);e.push({event:S,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ls!==0){var L=new FormData(d,x);gu(a,{pending:!0,data:L,method:d.method,action:u},null,L)}}else typeof u=="function"&&(S.preventDefault(),L=new FormData(d,x),gu(a,{pending:!0,data:L,method:d.method,action:u},u,L))},currentTarget:d}]})}}for(var uf=0;uf<Ld.length;uf++){var ff=Ld[uf],M1=ff.toLowerCase(),R1=ff[0].toUpperCase()+ff.slice(1);qn(M1,"on"+R1)}qn(Ah,"onAnimationEnd"),qn(Mh,"onAnimationIteration"),qn(Rh,"onAnimationStart"),qn("dblclick","onDoubleClick"),qn("focusin","onFocus"),qn("focusout","onBlur"),qn(qv,"onTransitionRun"),qn(Gv,"onTransitionStart"),qn(Vv,"onTransitionCancel"),qn(Dh,"onTransitionEnd"),ma("onMouseEnter",["mouseout","mouseover"]),ma("onMouseLeave",["mouseout","mouseover"]),ma("onPointerEnter",["pointerout","pointerover"]),ma("onPointerLeave",["pointerout","pointerover"]),$n("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$n("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$n("onBeforeInput",["compositionend","keypress","textInput","paste"]),$n("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$n("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cr="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(" "),D1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cr));function ig(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],d=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var x=l.length-1;0<=x;x--){var S=l[x],L=S.instance,Z=S.currentTarget;if(S=S.listener,L!==u&&d.isPropagationStopped())break e;u=S,d.currentTarget=Z;try{u(d)}catch(se){oo(se)}d.currentTarget=null,u=L}else for(x=0;x<l.length;x++){if(S=l[x],L=S.instance,Z=S.currentTarget,S=S.listener,L!==u&&d.isPropagationStopped())break e;u=S,d.currentTarget=Z;try{u(d)}catch(se){oo(se)}d.currentTarget=null,u=L}}}}function Ve(e,t){var a=t[Zr];a===void 0&&(a=t[Zr]=new Set);var l=e+"__bubble";a.has(l)||(lg(t,e,2,!1),a.add(l))}function mf(e,t,a){var l=0;t&&(l|=4),lg(a,e,l,t)}var rc="_reactListening"+Math.random().toString(36).slice(2);function hf(e){if(!e[rc]){e[rc]=!0,Jr.forEach(function(a){a!=="selectionchange"&&(D1.has(a)||mf(a,!1,e),mf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rc]||(t[rc]=!0,mf("selectionchange",!1,t))}}function lg(e,t,a,l){switch(Qg(t)){case 2:var d=SN;break;case 8:d=kN;break;default:d=Of}a=d.bind(null,t,a,e),d=void 0,!Nd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(d=!0),l?d!==void 0?e.addEventListener(t,a,{capture:!0,passive:d}):e.addEventListener(t,a,!0):d!==void 0?e.addEventListener(t,a,{passive:d}):e.addEventListener(t,a,!1)}function pf(e,t,a,l,d){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var S=l.stateNode.containerInfo;if(S===d)break;if(x===4)for(x=l.return;x!==null;){var L=x.tag;if((L===3||L===4)&&x.stateNode.containerInfo===d)return;x=x.return}for(;S!==null;){if(x=fa(S),x===null)return;if(L=x.tag,L===5||L===6||L===26||L===27){l=u=x;continue e}S=S.parentNode}}l=l.return}lh(function(){var Z=u,se=bd(a),oe=[];e:{var X=Oh.get(e);if(X!==void 0){var ne=io,xe=e;switch(e){case"keypress":if(ao(a)===0)break e;case"keydown":case"keyup":ne=gv;break;case"focusin":xe="focus",ne=Sd;break;case"focusout":xe="blur",ne=Sd;break;case"beforeblur":case"afterblur":ne=Sd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=iv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=jv;break;case Ah:case Mh:case Rh:ne=ov;break;case Dh:ne=_v;break;case"scroll":case"scrollend":ne=av;break;case"wheel":ne=kv;break;case"copy":case"cut":case"paste":ne=dv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=uh;break;case"submit":ne=vv;break;case"toggle":case"beforetoggle":ne=Tv}var Ne=(t&4)!==0,He=!Ne&&(e==="scroll"||e==="scrollend"),Q=Ne?X!==null?X+"Capture":null:X;Ne=[];for(var $=Z,ee;$!==null;){var re=$;if(ee=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||ee===null||Q===null||(re=Ml($,Q),re!=null&&Ne.push(dr($,re,ee))),He)break;$=$.return}0<Ne.length&&(X=new ne(X,xe,null,a,se),oe.push({event:X,listeners:Ne}))}}if((t&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",X=e==="mouseout"||e==="pointerout",ne&&a!==yd&&(xe=a.relatedTarget||a.fromElement)&&(fa(xe)||xe[Ua]))break e;(X||ne)&&(xe=se.window===se?se:(ne=se.ownerDocument)?ne.defaultView||ne.parentWindow:window,X?(ne=a.relatedTarget||a.toElement,X=Z,ne=ne?fa(ne):null,ne!==null&&(He=f(ne),Ne=ne.tag,ne!==He||Ne!==5&&Ne!==27&&Ne!==6)&&(ne=null)):(X=null,ne=Z),X!==ne&&(Ne=ch,re="onMouseLeave",Q="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=uh,re="onPointerLeave",Q="onPointerEnter",$="pointer"),He=X==null?xe:Ba(X),ee=ne==null?xe:Ba(ne),xe=new Ne(re,$+"leave",X,a,se),xe.target=He,xe.relatedTarget=ee,re=null,fa(se)===Z&&(Ne=new Ne(Q,$+"enter",ne,a,se),Ne.target=ee,Ne.relatedTarget=He,re=Ne),He=re,Ne=X&&ne?U(X,ne,O1):null,X!==null&&rg(oe,xe,X,Ne,!1),ne!==null&&He!==null&&rg(oe,He,ne,Ne,!0)))}e:{if(X=Z?Ba(Z):window,ne=X.nodeName&&X.nodeName.toLowerCase(),ne==="select"||ne==="input"&&X.type==="file")var be=bh;else if(gh(X))if(vh)be=Uv;else{be=zv;var Fe=Lv}else ne=X.nodeName,!ne||ne.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Z&&gd(Z.elementType)&&(be=bh):be=Hv;if(be&&(be=be(e,Z))){yh(oe,be,a,se);break e}Fe&&Fe(e,X,Z)}switch(Fe=Z?Ba(Z):window,e){case"focusin":(gh(Fe)||Fe.contentEditable==="true")&&(_i=Fe,Rd=Z,Bl=null);break;case"focusout":Bl=Rd=_i=null;break;case"mousedown":Dd=!0;break;case"contextmenu":case"mouseup":case"dragend":Dd=!1,Th(oe,a,se);break;case"selectionchange":if($v)break;case"keydown":case"keyup":Th(oe,a,se)}var _e;if(Cd)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else wi?ph(e,a)&&(Re="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Re="onCompositionStart");Re&&(fh&&a.locale!=="ko"&&(wi||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&wi&&(_e=rh()):(qa=se,jd="value"in qa?qa.value:qa.textContent,wi=!0)),Fe=oc(Z,Re),0<Fe.length&&(Re=new dh(Re,e,null,a,se),oe.push({event:Re,listeners:Fe}),_e?Re.data=_e:(_e=xh(a),_e!==null&&(Re.data=_e)))),(_e=Av?Mv(e,a):Rv(e,a))&&(Re=oc(Z,"onBeforeInput"),0<Re.length&&(Fe=new dh("onBeforeInput","beforeinput",null,a,se),oe.push({event:Fe,listeners:Re}),Fe.data=_e)),A1(oe,e,Z,a,se)}ig(oe,t)})}function dr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function oc(e,t){for(var a=t+"Capture",l=[];e!==null;){var d=e,u=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||u===null||(d=Ml(e,a),d!=null&&l.unshift(dr(e,d,u)),d=Ml(e,t),d!=null&&l.push(dr(e,d,u))),e.tag===3)return l;e=e.return}return[]}function O1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rg(e,t,a,l,d){for(var u=t._reactName,x=[];a!==null&&a!==l;){var S=a,L=S.alternate,Z=S.stateNode;if(S=S.tag,L!==null&&L===l)break;S!==5&&S!==26&&S!==27||Z===null||(L=Z,d?(Z=Ml(a,u),Z!=null&&x.unshift(dr(a,Z,L))):d||(Z=Ml(a,u),Z!=null&&x.push(dr(a,Z,L)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var L1=/\r\n?/g,z1=/\u0000|\uFFFD/g;function og(e){return(typeof e=="string"?e:""+e).replace(L1,`
|
|
49
|
+
`).replace(z1,"")}function cg(e,t){return t=og(t),og(e)===t}function nt(e,t,a,l,d,u){switch(a){case"children":if(typeof l=="string")t==="body"||t==="textarea"&&l===""||vi(e,l);else if(typeof l=="number"||typeof l=="bigint")t!=="body"&&vi(e,""+l);else return;break;case"className":Yt(e,"class",l);break;case"tabIndex":Yt(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Yt(e,a,l);break;case"style":sh(e,l,u);return;case"data":if(t!=="object"){Yt(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=to(l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&nt(e,t,"name",d.name,d,null),nt(e,t,"formEncType",d.formEncType,d,null),nt(e,t,"formMethod",d.formMethod,d,null),nt(e,t,"formTarget",d.formTarget,d,null)):(nt(e,t,"encType",d.encType,d,null),nt(e,t,"method",d.method,d,null),nt(e,t,"target",d.target,d,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=to(l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Pn);return;case"onScroll":l!=null&&Ve("scroll",e);return;case"onScrollEnd":l!=null&&Ve("scrollend",e);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(o(60));(u!=null?u.__html:void 0)!==a&&(e.innerHTML=a)}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=to(l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),it(e,"popover",l);break;case"xlinkActuate":Lt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Lt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Lt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Lt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Lt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Lt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Lt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":it(e,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=tv.get(a)||a,it(e,a,l);else return}Oe=!0}function xf(e,t,a,l,d,u){switch(a){case"style":sh(e,l,u);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(d.children!=null)throw Error(o(60));(u!=null?u.__html:void 0)!==a&&(e.innerHTML=a)}}break;case"children":if(typeof l=="string")vi(e,l);else if(typeof l=="number"||typeof l=="bigint")vi(e,""+l);else return;break;case"onScroll":l!=null&&Ve("scroll",e);return;case"onScrollEnd":l!=null&&Ve("scrollend",e);return;case"onClick":l!=null&&(e.onclick=Pn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Wr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(d=a.endsWith("Capture"),u=a.slice(2,d?a.length-7:void 0),t=e[mt]||null,t=t!=null?t[a]:null,typeof t=="function"&&e.removeEventListener(u,t,d),typeof l=="function")){typeof t!="function"&&t!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(u,l,d);break e}Oe=!0,a in e?e[a]=l:l===!0?e.setAttribute(a,""):it(e,a,l)}return}Oe=!0}function $t(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var l=!1,d=!1,u;for(u in a)if(a.hasOwnProperty(u)){var x=a[u];if(x!=null)switch(u){case"src":l=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:nt(e,t,u,x,a,null)}}d&&nt(e,t,"srcSet",a.srcSet,a,null),l&&nt(e,t,"src",a.src,a,null);return;case"input":Ve("invalid",e);var S=u=x=d=null,L=null,Z=null;for(l in a)if(a.hasOwnProperty(l)){var se=a[l];if(se!=null)switch(l){case"name":d=se;break;case"type":x=se;break;case"checked":L=se;break;case"defaultChecked":Z=se;break;case"value":u=se;break;case"defaultValue":S=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,t));break;default:nt(e,t,l,se,a,null)}}eh(e,u,S,L,Z,x,d,!1);return;case"select":Ve("invalid",e),l=x=u=null;for(d in a)if(a.hasOwnProperty(d)&&(S=a[d],S!=null))switch(d){case"value":u=S;break;case"defaultValue":x=S;break;case"multiple":l=S;default:nt(e,t,d,S,a,null)}t=u,a=x,e.multiple=!!l,t!=null?bi(e,!!l,t,!1):a!=null&&bi(e,!!l,a,!0);return;case"textarea":Ve("invalid",e),u=d=l=null;for(x in a)if(a.hasOwnProperty(x)&&(S=a[x],S!=null))switch(x){case"value":l=S;break;case"defaultValue":d=S;break;case"children":u=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(o(91));break;default:nt(e,t,x,S,a,null)}nh(e,l,d,u);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(l=a[L],l!=null))switch(L){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:nt(e,t,L,l,a,null)}return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(l=0;l<cr.length;l++)Ve(cr[l],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("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(Z in a)if(a.hasOwnProperty(Z)&&(l=a[Z],l!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:nt(e,t,Z,l,a,null)}return;default:if(gd(t)){for(se in a)a.hasOwnProperty(se)&&(l=a[se],l!==void 0&&xf(e,t,se,l,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(l=a[S],l!=null&&nt(e,t,S,l,a,null))}var H1={};function U1(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,u=null,x=null,S=null,L=null,Z=null,se=null;for(ne in a){var oe=a[ne];if(a.hasOwnProperty(ne)&&oe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":L=oe;default:l.hasOwnProperty(ne)||nt(e,t,ne,null,l,oe)}}for(var X in l){var ne=l[X];if(oe=a[X],l.hasOwnProperty(X)&&(ne!=null||oe!=null))switch(X){case"type":ne!==oe&&(Oe=!0),u=ne;break;case"name":ne!==oe&&(Oe=!0),d=ne;break;case"checked":ne!==oe&&(Oe=!0),Z=ne;break;case"defaultChecked":ne!==oe&&(Oe=!0),se=ne;break;case"value":ne!==oe&&(Oe=!0),x=ne;break;case"defaultValue":ne!==oe&&(Oe=!0),S=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(o(137,t));break;default:ne!==oe&&nt(e,t,X,ne,l,oe)}}pd(e,x,S,L,Z,se,u,d);return;case"select":ne=x=S=X=null;for(u in a)if(L=a[u],a.hasOwnProperty(u)&&L!=null)switch(u){case"value":break;case"multiple":ne=L;default:l.hasOwnProperty(u)||nt(e,t,u,null,l,L)}for(d in l)if(u=l[d],L=a[d],l.hasOwnProperty(d)&&(u!=null||L!=null))switch(d){case"value":u!==L&&(Oe=!0),X=u;break;case"defaultValue":u!==L&&(Oe=!0),S=u;break;case"multiple":u!==L&&(Oe=!0),x=u;default:u!==L&&nt(e,t,d,u,l,L)}t=S,a=x,l=ne,X!=null?bi(e,!!a,X,!1):!!l!=!!a&&(t!=null?bi(e,!!a,t,!0):bi(e,!!a,a?[]:"",!1));return;case"textarea":ne=X=null;for(S in a)if(d=a[S],a.hasOwnProperty(S)&&d!=null&&!l.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:nt(e,t,S,null,l,d)}for(x in l)if(d=l[x],u=a[x],l.hasOwnProperty(x)&&(d!=null||u!=null))switch(x){case"value":d!==u&&(Oe=!0),X=d;break;case"defaultValue":d!==u&&(Oe=!0),ne=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(o(91));break;default:d!==u&&nt(e,t,x,d,l,u)}th(e,X,ne);return;case"option":for(var xe in a)if(X=a[xe],a.hasOwnProperty(xe)&&X!=null&&!l.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:nt(e,t,xe,null,l,X)}for(L in l)if(X=l[L],ne=a[L],l.hasOwnProperty(L)&&X!==ne&&(X!=null||ne!=null))switch(L){case"selected":X!==ne&&(Oe=!0),e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:nt(e,t,L,X,l,ne)}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 Ne in a)X=a[Ne],a.hasOwnProperty(Ne)&&X!=null&&!l.hasOwnProperty(Ne)&&nt(e,t,Ne,null,l,X);for(Z in l)if(X=l[Z],ne=a[Z],l.hasOwnProperty(Z)&&X!==ne&&(X!=null||ne!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:nt(e,t,Z,X,l,ne)}return;default:if(gd(t)){for(var He in a)X=a[He],a.hasOwnProperty(He)&&X!==void 0&&!l.hasOwnProperty(He)&&xf(e,t,He,void 0,l,X);for(se in l)X=l[se],ne=a[se],!l.hasOwnProperty(se)||X===ne||X===void 0&&ne===void 0||xf(e,t,se,X,l,ne);return}}for(var Q in a)X=a[Q],a.hasOwnProperty(Q)&&X!=null&&!l.hasOwnProperty(Q)&&nt(e,t,Q,null,l,X);for(oe in l)X=l[oe],ne=a[oe],!l.hasOwnProperty(oe)||X===ne||X==null&&ne==null||nt(e,t,oe,X,l,ne)}function dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function B1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var d=a[l],u=d.transferSize,x=d.initiatorType,S=d.duration;if(u&&S&&dg(x)){for(x=0,S=d.responseEnd,l+=1;l<a.length;l++){var L=a[l],Z=L.startTime;if(Z>S)break;var se=L.transferSize,oe=L.initiatorType;se&&dg(oe)&&(L=L.responseEnd,x+=se*(L<S?1:(S-Z)/(L-Z)))}if(--l,t+=8*(u+x)/(d.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 gf=null,yf=null;function ur(e){return e.nodeType===9?e:e.ownerDocument}function ug(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fg(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 mg(e,t,a,l){return a=ur(a).createElement(e),a[jt]=l,a[mt]=t,$t(a,e,t),wt(a),a}function bf(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 vf=null;function $1(){var e=window.event;return e&&e.type==="popstate"?e===vf?!1:(vf=e,!0):(vf=null,!1)}var Nf=typeof setTimeout=="function"?setTimeout:void 0,q1=typeof clearTimeout=="function"?clearTimeout:void 0,hg=typeof Promise=="function"?Promise:void 0,pg=typeof requestAnimationFrame=="function"?requestAnimationFrame:Nf,G1=typeof queueMicrotask=="function"?queueMicrotask:typeof hg<"u"?function(e){return hg.resolve(null).then(e).catch(V1)}:Nf;function V1(e){setTimeout(function(){throw e})}function rs(e){return e==="head"}function xg(e,t){var a=t,l=0;do{var d=a.nextSibling;if(e.removeChild(a),d&&d.nodeType===8)if(a=d.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(d),al(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ef(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ef(a);for(var u=a.firstChild;u;){var x=u.nextSibling,S=u.nodeName;u[As]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=x}}else a==="body"&&Ef(e.ownerDocument.body);a=d}while(a);al(t)}function gg(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function yg(e,t,a){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,a!=null&&(e.style.viewTransitionClass=a),a=getComputedStyle(e),a.display==="inline"){if(t=e.getClientRects(),t.length===1)var l=1;else for(var d=l=0;d<t.length;d++){var u=t[d];0<u.width&&0<u.height&&l++}l===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+a.paddingTop,e.marginBottom="-"+a.paddingBottom)}}function bg(e,t){e=e.style,t=t.style;var a=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(a=t.display,e.display=a==null||typeof a=="boolean"?"":a,a=t.margin,a!=null?e.margin=a:(a=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=a==null||typeof a=="boolean"?"":a,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Y1(e,t,a){return a=a.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=a.innerHeight&&e.left<=a.innerWidth}}function jf(e){var t=e.getBoundingClientRect(),a=getComputedStyle(e);return Y1(t,a,e)}function F1(e){return e.documentElement.clientHeight}function I1(e){this.addEventListener("load",e),this.addEventListener("error",e)}function K1(e,t,a,l,d,u,x,S,L){var Z=t.nodeType===9?t:t.ownerDocument;try{var se=Z.startViewTransition({update:function(){var X=Z.defaultView,ne=X.navigation&&X.navigation.transition,xe=Z.fonts.status;l();var Ne=[];if(xe==="loaded"&&(F1(Z),Z.fonts.status==="loading"&&Ne.push(Z.fonts.ready)),xe=Ne.length,e!==null)for(var He=e.suspenseyImages,Q=0,$=0;$<He.length;$++){var ee=He[$];if(!ee.complete){var re=ee.getBoundingClientRect();if(0<re.bottom&&0<re.right&&re.top<X.innerHeight&&re.left<X.innerWidth){if(Q+=$g(ee),Q>uc){Ne.length=xe;break}ee=new Promise(I1.bind(ee)),Ne.push(ee)}}}if(0<Ne.length)return X=Promise.race([Promise.all(Ne),new Promise(function(be){return setTimeout(be,500)})]).then(d,d),(ne?Promise.allSettled([ne.finished,X]):X).then(u,u);if(d(),ne)return ne.finished.then(u,u);u()},types:a});Z.__reactViewTransition=se;var oe=[];return se.ready.then(function(){for(var X=Z.documentElement.getAnimations({subtree:!0}),ne=0;ne<X.length;ne++){var xe=X[ne],Ne=xe.effect,He=Ne.pseudoElement;if(He!=null&&He.startsWith("::view-transition")){oe.push(xe),xe=Ne.getKeyframes();for(var Q=He=void 0,$=!0,ee=0;ee<xe.length;ee++){var re=xe[ee],be=re.width;if(He===void 0)He=be;else if(He!==be){$=!1;break}if(be=re.height,Q===void 0)Q=be;else if(Q!==be){$=!1;break}delete re.width,delete re.height,re.transform==="none"&&delete re.transform}$&&He!==void 0&&Q!==void 0&&(Ne.setKeyframes(xe),$=getComputedStyle(Ne.target,Ne.pseudoElement),$.width!==He||$.height!==Q)&&($=xe[0],$.width=He,$.height=Q,$=xe[xe.length-1],$.width=He,$.height=Q,Ne.setKeyframes(xe))}}x()},function(X){Z.__reactViewTransition===se&&(Z.__reactViewTransition=null);try{if(typeof X=="object"&&X!==null)switch(X.name){case"InvalidStateError":(X.message==="View transition was skipped because document visibility state is hidden."||X.message==="Skipping view transition because document visibility state has become hidden."||X.message==="Skipping view transition because viewport size changed."||X.message==="Transition was aborted because of invalid state")&&(X=null)}X!==null&&L(X)}finally{l(),d(),x()}}),se.finished.finally(function(){for(var X=0;X<oe.length;X++)oe[X].cancel();Z.__reactViewTransition===se&&(Z.__reactViewTransition=null),S()}),se}catch{return l(),d(),x(),null}}function Zs(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Zs.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:q({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Zs.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,a=e.getAnimations({subtree:!0}),l=[],d=0;d<a.length;d++){var u=a[d].effect;u!==null&&u.target===e&&u.pseudoElement===t&&l.push(a[d])}return l},Zs.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function vg(e){return{name:e,group:new Zs("group",e),imagePair:new Zs("image-pair",e),old:new Zs("old",e),new:new Zs("new",e)}}function gn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}gn.prototype.addEventListener=function(e,t,a){var l=null,d=null;if(!(a!=null&&typeof a!="boolean"&&(l=a.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var u=this._eventListeners;if(jg(u,e,t,a)===-1){var x=this,S=t;a!=null&&typeof a!="boolean"&&a.once===!0&&(S=function(L){x.removeEventListener(e,t,a),typeof t=="function"?t.call(this,L):t.handleEvent(L)}),l!==null&&(d=x.removeEventListener.bind(x,e,t,a),l.addEventListener("abort",d,{once:!0}),d=l.removeEventListener.bind(l,"abort",d)),l=Pi(a),u.push({type:e,listener:t,optionsOrUseCapture:a,attachedListener:S,cleanup:d}),g(this._fragmentFiber.child,!1,X1,e,S,l)}this._eventListeners=u}};function X1(e,t,a,l){return H(e).addEventListener(t,a,l),!1}gn.prototype.removeEventListener=function(e,t,a){var l=this._eventListeners;if(l!==null&&(t=jg(l,e,t,a),t!==-1)){var d=l[t];a=d.attachedListener;var u=d.cleanup;d=Pi(d.optionsOrUseCapture),g(this._fragmentFiber.child,!1,Q1,e,a,d),l.splice(t,1),u!==null&&u()}};function Q1(e,t,a,l){return H(e).removeEventListener(t,a,l),!1}function Pi(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Ng(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function jg(e,t,a,l){if(e.length===0)return-1;l=Ng(l);for(var d=0;d<e.length;d++){var u=e[d];if(u.type===t&&u.listener===a&&Ng(u.optionsOrUseCapture)===l)return d}return-1}gn.prototype.dispatchEvent=function(e){var t=b(this._fragmentFiber);if(t===null)return!0;t=H(t);var a=this._eventListeners;if(a!==null&&0<a.length||!e.bubbles){var l=t.nodeType===9?t.createComment(""):document.createTextNode("");if(a)for(var d=0;d<a.length;d++){var u=a[d];l.addEventListener(u.type,u.attachedListener,Pi(u.optionsOrUseCapture))}if(t.appendChild(l),e=l.dispatchEvent(e),a)for(d=0;d<a.length;d++)u=a[d],l.removeEventListener(u.type,u.attachedListener,Pi(u.optionsOrUseCapture));return t.removeChild(l),e}return t.dispatchEvent(e)},gn.prototype.focus=function(e){g(this._fragmentFiber.child,!0,wg,e,void 0,void 0)};function wg(e,t){return e.tag===6?!1:(e=H(e),rN(e,t))}gn.prototype.focusLast=function(e){var t=[];g(this._fragmentFiber.child,!0,wf,t,void 0,void 0);for(var a=t.length-1;0<=a&&!wg(t[a],e);a--);};function wf(e,t){return t.push(e),!1}gn.prototype.blur=function(){var e=b(this._fragmentFiber);e!==null&&(e=H(e),e=ur(e).activeElement,e!==null&&g(this._fragmentFiber.child,!1,Z1,e,void 0,void 0))};function Z1(e,t){return e.tag===6?!1:(e=H(e),e===t||e.contains(t)?(t.blur(),!0):!1)}gn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),g(this._fragmentFiber.child,!1,P1,e,void 0,void 0)};function P1(e,t){return e.tag===6||(e=H(e),t.observe(e)),!1}gn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),g(this._fragmentFiber.child,!1,J1,e,void 0,void 0);for(var a=t=0;a<In.length;a++){var l=In[a];l.fragmentInstance===this&&l.observer===e?e.unobserve(l.instance):In[t++]=l}In.length=t}};function J1(e,t){return e.tag===6||(e=H(e),t.unobserve(e)),!1}var In=[],_f=!1;function W1(e,t,a){In.push({fragmentInstance:e,observer:t,instance:a}),_f||(_f=!0,oN(function(){_f=!1;var l=In;In=[];for(var d=0;d<l.length;d++){var u=l[d];u.observer.unobserve(u.instance)}}))}gn.prototype.getClientRects=function(){var e=[];return g(this._fragmentFiber.child,!1,eN,e,void 0,void 0),e};function eN(e,t){if(e.tag===6){e=e.stateNode;var a=e.ownerDocument.createRange();a.selectNodeContents(e),t.push.apply(t,a.getClientRects())}else e=H(e),t.push.apply(t,e.getClientRects());return!1}gn.prototype.getRootNode=function(e){var t=b(this._fragmentFiber);return t===null?this:H(t).getRootNode(e)},gn.prototype.compareDocumentPosition=function(e){var t=b(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];g(this._fragmentFiber.child,!1,wf,a,void 0,void 0);var l=H(t);if(a.length===0){if(a=l,N(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(a=t)}t=this._fragmentFiber;var d=l=a.compareDocumentPosition(e);return a===e?d=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=j(t)[1],a===null?d=Node.DOCUMENT_POSITION_PRECEDING:(e=H(a).compareDocumentPosition(e),d=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),d|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=H(a[0]),d=H(a[a.length-1]);var u=N(this._fragmentFiber)?t.parentElement:l;if(u==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=u.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,u=u.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY;var x=t.compareDocumentPosition(e),S=d.compareDocumentPosition(e),L=x&Node.DOCUMENT_POSITION_CONTAINED_BY||S&Node.DOCUMENT_POSITION_CONTAINED_BY;return S=l&&u&&x&Node.DOCUMENT_POSITION_FOLLOWING&&S&Node.DOCUMENT_POSITION_PRECEDING,t=l&&t===e||u&&d===e||L||S?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&t===e||!u&&d===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:x,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||tN(t,this._fragmentFiber,a[0],a[a.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function tN(e,t,a,l,d){var u=fa(d);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!u)e:{for(;u!==null;){if(u.tag===7&&(u===t||u.alternate===t)){a=!0;break e}u=u.return}a=!1}return a}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(u===null)return u=d.ownerDocument,d===u||d===u.documentElement||d===u.body;e:{for(u=t,t=b(t);u!==null;){if(!(u.tag!==5&&u.tag!==3&&u.tag!==27||u!==t&&u.alternate!==t)){u=!0;break e}u=u.return}u=!1}return u}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!u)&&!(t=u===a)&&(t=U(a,u,O),t===null?t=!1:(g(t,!0,z,u,a),u=_,_=null,t=u!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!u)&&!(t=u===l)&&(t=U(l,u,O),t===null?t=!1:(g(t,!0,D,u,l),u=_,K=_=null,t=u!==null)),t):!1}function _g(e,t){var a=e.ownerDocument.createRange();a.selectNodeContents(e),e=a.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}gn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(o(566));var t=[];g(this._fragmentFiber.child,!1,wf,t,void 0,void 0);var a=e!==!1;if(t.length===0){var l=j(this._fragmentFiber);if(l=a?l[1]||l[0]||b(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){e=H(l),_g(e,a);return}if(l=H(l),l.nodeType!==9){if(l.nodeType===11){a="host"in l?l.host:null,a!==null&&a.scrollIntoView(e);return}l.scrollIntoView(e)}}for(l=a?t.length-1:0;l!==(a?-1:t.length);){var d=t[l];d.tag===6?(d=H(d),_g(d,a)):H(d).scrollIntoView(e),l+=a?-1:1}};function nN(e,t){return e=H(e),Sg(e,t),!1}function Sg(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function kg(e,t){var a=t._eventListeners;if(a!==null)for(var l=0;l<a.length;l++){var d=a[l];e.addEventListener(d.type,d.attachedListener,Pi(d.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(u){for(var x=0,S=0;S<In.length;S++){var L=In[S];(L.fragmentInstance!==t||L.observer!==u||L.instance!==e)&&(In[x++]=L)}In.length=x,u.observe(e)}),Sg(e,t))}function aN(e,t){var a=t._eventListeners;if(a!==null)for(var l=0;l<a.length;l++){var d=a[l];e.removeEventListener(d.type,d.attachedListener,Pi(d.optionsOrUseCapture))}e.nodeType!==3&&(a=t._observers,a!==null&&a.forEach(function(u){typeof u.rootMargin=="string"?W1(t,u,e):u.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Sf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Sf(a),xi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function sN(e,t,a,l){for(;e.nodeType===1;){var d=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[As])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function iN(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=On(e.nextSibling),e===null))return null;return e}function Cg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function kf(e){return e.data==="$?"||e.data==="$~"}function Cf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lN(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function On(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 Tf=null;function Tg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return On(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Eg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function rN(e,t){function a(){l=!0}if(e.ownerDocument.activeElement===e)return!0;var l=!1;try{e.ownerDocument.addEventListener("focus",a,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",a,!0)}return l}function oN(e){pg(function(){pg(function(t){return e(t)})})}function Ag(e,t,a){switch(t=ur(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Mg(e,t,a){for(var l in a){var d=a[l];a.hasOwnProperty(l)&&d!=null&&nt(e,t,l,null,H1,d)}a.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Pn&&(e.onclick=null),xi(e)}function Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);xi(e)}var Ln=new Map,Rg=new Set;function fr(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var ka=ye.d;ye.d={f:cN,r:dN,D:uN,C:fN,L:mN,m:hN,X:xN,S:pN,M:gN};function cN(){var e=ka.f(),t=nc();return e||t}function dN(e){var t=kn(e);t!==null&&t.tag===5&&t.type==="form"?Op(t):ka.r(e)}var Ji=typeof document>"u"?null:document;function Dg(e,t,a){var l=Ji;if(l&&typeof t=="string"&&t){var d=Cn(t);d='link[rel="'+e+'"][href="'+d+'"]',typeof a=="string"&&(d+='[crossorigin="'+a+'"]'),Rg.has(d)||(Rg.add(d),e={rel:e,crossOrigin:a,href:t},l.querySelector(d)===null&&(t=l.createElement("link"),$t(t,"link",e),wt(t),l.head.appendChild(t)))}}function uN(e){ka.D(e),Dg("dns-prefetch",e,null)}function fN(e,t){ka.C(e,t),Dg("preconnect",e,t)}function mN(e,t,a){ka.L(e,t,a);var l=Ji;if(l&&e&&t){var d='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(d+='[imagesrcset="'+Cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(d+='[imagesizes="'+Cn(a.imageSizes)+'"]')):d+='[href="'+Cn(e)+'"]';var u=d;switch(t){case"style":u=Wi(e);break;case"script":u=el(e)}if(!(Ln.has(u)||(e=q({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ln.set(u,e),l.querySelector(d)!==null||t==="style"&&l.querySelector(mr(u))||t==="script"&&l.querySelector(hr(u))))){var x=l.createElement("link");$t(x,"link",e),t==="style"&&(x[pi]=!0,x.onload=x.onerror=function(){Al(x)}),wt(x),l.head.appendChild(x)}}}function hN(e,t){ka.m(e,t);var a=Ji;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",d='link[rel="modulepreload"][as="'+Cn(l)+'"][href="'+Cn(e)+'"]',u=d;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=el(e)}if(!Ln.has(u)&&(e=q({rel:"modulepreload",href:e},t),Ln.set(u,e),a.querySelector(d)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(hr(u)))return}l=a.createElement("link"),$t(l,"link",e),wt(l),a.head.appendChild(l)}}}function pN(e,t,a){ka.S(e,t,a);var l=Ji;if(l&&e){var d=Kt(l).hoistableStyles,u=Wi(e);t=t||"default";var x=d.get(u);if(!x){var S={loading:0,preload:null};if(x=l.querySelector(mr(u)))S.loading=5;else{e=q({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ln.get(u))&&Af(e,a);var L=x=l.createElement("link");wt(L),$t(L,"link",e),L._p=new Promise(function(Z,se){L.onload=Z,L.onerror=se}),L.addEventListener("load",function(){S.loading|=1}),L.addEventListener("error",function(){S.loading|=2}),S.loading|=4,cc(x,t,l)}x={type:"stylesheet",instance:x,count:1,state:S},d.set(u,x)}}}function xN(e,t){ka.X(e,t);var a=Ji;if(a&&e){var l=Kt(a).hoistableScripts,d=el(e),u=l.get(d);u||(u=a.querySelector(hr(d)),u||(e=q({src:e,async:!0},t),(t=Ln.get(d))&&Mf(e,t),u=a.createElement("script"),wt(u),$t(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(d,u))}}function gN(e,t){ka.M(e,t);var a=Ji;if(a&&e){var l=Kt(a).hoistableScripts,d=el(e),u=l.get(d);u||(u=a.querySelector(hr(d)),u||(e=q({src:e,async:!0,type:"module"},t),(t=Ln.get(d))&&Mf(e,t),u=a.createElement("script"),wt(u),$t(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(d,u))}}function Og(e,t,a,l){var d=(d=J.current)?fr(d):null;if(!d)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Wi(a.href),t=Kt(d).hoistableStyles,l=t.get(a),l||(l={type:"style",instance:null,count:0,state:null},t.set(a,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Wi(a.href);var u=Kt(d).hoistableStyles,x=u.get(e);if(x||(d=d.ownerDocument||d,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,x),(u=d.querySelector(mr(e)))?u._p||(x.instance=u,x.state.loading=5):(u=Ln.get(e),u||(u={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ln.set(e,u)),yN(d,e,u,x.state))),t&&l===null)throw Error(o(528,""));return x}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=el(a),t=Kt(d).hoistableScripts,l=t.get(a),l||(l={type:"script",instance:null,count:0,state:null},t.set(a,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Wi(e){return'href="'+Cn(e)+'"'}function mr(e){return'link[rel="stylesheet"]['+e+"]"}function Lg(e){return q({},e,{"data-precedence":e.precedence,precedence:null})}function yN(e,t,a,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[pi]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[pi]=!0,t.onload=t.onerror=Al.bind(null,t),$t(t,"link",a),wt(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function el(e){return'[src="'+Cn(e)+'"]'}function hr(e){return"script[async]"+e}function zg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Cn(a.href)+'"]');if(l)return t.instance=l,wt(l),l;var d=q({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),wt(l),$t(l,"style",d),cc(l,a.precedence,e),t.instance=l;case"stylesheet":d=Wi(a.href);var u=e.querySelector(mr(d));if(u)return t.state.loading|=4,t.instance=u,wt(u),u;l=Lg(a),(d=Ln.get(d))&&Af(l,d),u=(e.ownerDocument||e).createElement("link"),wt(u);var x=u;return x._p=new Promise(function(S,L){x.onload=S,x.onerror=L}),$t(u,"link",l),t.state.loading|=4,cc(u,a.precedence,e),t.instance=u;case"script":return u=el(a.src),(d=e.querySelector(hr(u)))?(t.instance=d,wt(d),d):(l=a,(d=Ln.get(u))&&(l=q({},a),Mf(l,d)),e=e.ownerDocument||e,d=e.createElement("script"),wt(d),$t(d,"link",l),e.head.appendChild(d),t.instance=d);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,cc(l,a.precedence,e));return t.instance}function cc(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=l.length?l[l.length-1]:null,u=d,x=0;x<l.length;x++){var S=l[x];if(S.dataset.precedence===t)u=S;else if(u!==d)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Af(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var dc=null;function Hg(e,t,a){if(dc===null){var l=new Map,d=dc=new Map;d.set(a,l)}else d=dc,l=d.get(a),l||(l=new Map,d.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),d=0;d<a.length;d++){var u=a[d];if(!(u[As]||u[jt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var x=u.getAttribute(t)||"";x=e+x;var S=l.get(x);S?S.push(u):l.set(x,[u])}}return l}function Rf(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function bN(e,t,a){if(a===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 Ug(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function Bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $g(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function qg(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=$g(t),e.suspenseyImages.push(t)),e=jN.bind(e),t.decode().then(e,e))}function vN(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var d=Wi(l.href),u=t.querySelector(mr(d));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,wt(u);return}u=t.ownerDocument||t,l=Lg(l),(d=Ln.get(d))&&Af(l,d),u=u.createElement("link"),wt(u);var x=u;x._p=new Promise(function(S,L){x.onload=S,x.onerror=L}),$t(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=pr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var uc=0;function NN(e,t){return e.stylesheets&&e.count===0&&mc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&mc(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&uc===0&&(uc=62500*B1());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&mc(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>uc?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(d)}}:null}function Gg(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)mc(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function pr(){this.count--,Gg(this)}function jN(){this.imgCount--,Gg(this)}var fc=null;function mc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fc=new Map,t.forEach(wN,e),fc=null,pr.call(e))}function wN(e,t){if(!(t.state.loading&4)){var a=fc.get(e);if(a)var l=a.get(null);else{a=new Map,fc.set(e,a);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<d.length;u++){var x=d[u];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),l=x)}l&&a.set(null,l)}d=t.instance,x=d.getAttribute("data-precedence"),u=a.get(x)||l,u===l&&a.set(null,d),a.set(x,d),this.count++,l=pr.bind(this),d.addEventListener("load",l),d.addEventListener("error",l),u?u.parentNode.insertBefore(d,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),t.state.loading|=4}}var tl={$$typeof:R,Provider:null,Consumer:null,_currentValue:Ce,_currentValue2:Ce,_threadCount:0};function _N(e,t,a,l,d,u,x,S,L){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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=l,this.onUncaughtError=d,this.onCaughtError=u,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.transitionTypes=null,this.incompleteTransitions=new Map}function Vg(e,t,a,l,d,u,x,S,L,Z,se,oe){return e=new _N(e,t,a,x,L,Z,se,oe,S),t=1,u===!0&&(t|=24),u=an(3,null,null,t),e.current=u,u.stateNode=e,t=Id(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Zd(u),e}function Yg(e){return e?(e=Ci,e):Ci}function Fg(e,t,a,l,d,u){d=Yg(d),l.context===null?l.context=d:l.pendingContext=d,l=Qa(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=Za(e,l,t),a!==null&&(on(a,e,t),Il(a,e,t))}function Ig(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Df(e,t){Ig(e,t),(e=e.alternate)&&Ig(e,t)}function Kg(e){if(e.tag===13||e.tag===31){var t=Ds(e,67108864);t!==null&&on(t,e,67108864),Df(e,67108864)}}function Xg(e){if(e.tag===13||e.tag===31){var t=xn();t=nn(t);var a=Ds(e,t);a!==null&&on(a,e,t),Df(e,t)}}var nl=!0;function SN(e,t,a,l){var d=ue.T;ue.T=null;var u=ye.p;try{ye.p=2,Of(e,t,a,l)}finally{ye.p=u,ue.T=d}}function kN(e,t,a,l){var d=ue.T;ue.T=null;var u=ye.p;try{ye.p=8,Of(e,t,a,l)}finally{ye.p=u,ue.T=d}}function Of(e,t,a,l){if(nl){var d=Lf(l);if(d===null)pf(e,t,l,hc,a),Zg(e,l);else if(TN(d,e,t,a,l))l.stopPropagation();else if(Zg(e,l),t&4&&-1<CN.indexOf(e)){for(;d!==null;){var u=kn(d);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var x=Un(u.pendingLanes);if(x!==0){var S=u;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var L=1<<31-Nt(x);S.entanglements[1]|=L,x&=~L}ra(u),(Ze&6)===0&&(Wo=Ot()+500,or(0))}}break;case 31:case 13:S=Ds(u,2),S!==null&&on(S,u,2),nc(),Df(u,2)}if(u=Lf(l),u===null&&pf(e,t,l,hc,a),u===d)break;d=u}d!==null&&l.stopPropagation()}else pf(e,t,l,null,a)}}function Lf(e){return e=bd(e),zf(e)}var hc=null;function zf(e){if(hc=null,e=fa(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=h(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return hc=e,null}function Qg(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fi()){case jl:return 2;case Ns:return 8;case js:case wl:return 32;case mi:return 268435456;default:return 32}default:return 32}}var Hf=!1,os=null,cs=null,ds=null,xr=new Map,gr=new Map,us=[],CN="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 Zg(e,t){switch(e){case"focusin":case"focusout":os=null;break;case"dragenter":case"dragleave":cs=null;break;case"mouseover":case"mouseout":ds=null;break;case"pointerover":case"pointerout":xr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gr.delete(t.pointerId)}}function yr(e,t,a,l,d,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[d]},t!==null&&(t=kn(t),t!==null&&Kg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,d!==null&&t.indexOf(d)===-1&&t.push(d),e)}function TN(e,t,a,l,d){switch(t){case"focusin":return os=yr(os,e,t,a,l,d),!0;case"dragenter":return cs=yr(cs,e,t,a,l,d),!0;case"mouseover":return ds=yr(ds,e,t,a,l,d),!0;case"pointerover":var u=d.pointerId;return xr.set(u,yr(xr.get(u)||null,e,t,a,l,d)),!0;case"gotpointercapture":return u=d.pointerId,gr.set(u,yr(gr.get(u)||null,e,t,a,l,d)),!0}return!1}function Pg(e){var t=fa(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Es(e.priority,function(){Xg(a)});return}}else if(t===31){if(t=h(a),t!==null){e.blockedOn=t,Es(e.priority,function(){Xg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function pc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Lf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);yd=l,a.target.dispatchEvent(l),yd=null}else return t=kn(a),t!==null&&Kg(t),e.blockedOn=a,!1;t.shift()}return!0}function Jg(e,t,a){pc(e)&&a.delete(t)}function EN(){Hf=!1,os!==null&&pc(os)&&(os=null),cs!==null&&pc(cs)&&(cs=null),ds!==null&&pc(ds)&&(ds=null),xr.forEach(Jg),gr.forEach(Jg)}function xc(e,t){e.blockedOn===t&&(e.blockedOn=null,Hf||(Hf=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,EN)))}var gc=null;function Wg(e){gc!==e&&(gc=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){gc===e&&(gc=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],d=e[t+2];if(typeof l!="function"){if(zf(l||a)===null)continue;break}var u=kn(a);u!==null&&(e.splice(t,3),t-=3,gu(u,{pending:!0,data:d,method:a.method,action:l},l,d))}}))}function al(e){function t(L){return xc(L,e)}os!==null&&xc(os,e),cs!==null&&xc(cs,e),ds!==null&&xc(ds,e),xr.forEach(t),gr.forEach(t);for(var a=0;a<us.length;a++){var l=us[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<us.length&&(a=us[0],a.blockedOn===null);)Pg(a),a.blockedOn===null&&us.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var d=a[l],u=a[l+1],x=d[mt]||null;if(typeof u=="function")x||Wg(a);else if(x){var S=null;if(u&&u.hasAttribute("formAction")){if(d=u,x=u[mt]||null)S=x.formAction;else if(zf(d)!==null)continue}else S=x.action;typeof S=="function"?a[l+1]=S:(a.splice(l,3),l-=3),Wg(a)}}}function ey(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(x){return d=x})},focusReset:"manual",scroll:"manual"})}function t(){d!==null&&(d(),d=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),d!==null&&(d(),d=null)}}}function Uf(e){this._internalRoot=e}yc.prototype.render=Uf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=xn();Fg(a,l,e,t,null,null)},yc.prototype.unmount=Uf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fg(e.current,2,null,e,null,null),nc(),t[Ua]=null}};function yc(e){this._internalRoot=e}yc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bn();e={blockedOn:null,target:e,priority:t};for(var a=0;a<us.length&&t!==0&&t<us[a].priority;a++);us.splice(a,0,e),a===0&&Pg(e)}};var ty=i.version;if(ty!=="19.3.1")throw Error(o(527,ty,"19.3.1"));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=v(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var AN={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bc.isDisabled&&bc.supportsFiber)try{tn=bc.inject(AN),vt=bc}catch{}}return vr.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,l="",d=Yp,u=Fp,x=Ip;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(d=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=Vg(e,1,!1,null,null,a,l,null,d,u,x,ey),e[Ua]=t.current,hf(e),new Uf(t)},vr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var l=!1,d="",u=Yp,x=Fp,S=Ip,L=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),t=Vg(e,1,!0,t,a??null,l,d,L,u,x,S,ey),t.context=Yg(null),a=t.current,l=xn(),l=nn(l),d=Qa(l),d.callback=null,Za(a,d,l),a=l,t.current.lanes=a,Ha(t,a),ra(t),e[Ua]=t.current,hf(e),new yc(t)},vr.version="19.3.1",vr}var uy;function GN(){if(uy)return Gf.exports;uy=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Gf.exports=qN(),Gf.exports}var VN=GN();const YN=wb(VN),Te=s=>typeof s=="string",Nr=()=>{let s,i;const r=new Promise((o,c)=>{s=o,i=c});return r.resolve=s,r.reject=i,r},vc=s=>s==null?"":String(s),FN=s=>Te(s)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(s)&&!s.includes("..")&&!["__proto__","constructor","prototype"].includes(s),rm=s=>{var i;return(s==null?void 0:s.callbackApi)??((i=s==null?void 0:s.constructor)==null?void 0:i.callbackApi)},IN=(s,i,r)=>{s.forEach(o=>{i[o]&&(r[o]=i[o])})},KN=/###/g,fy=s=>s&&s.includes("###")?s.replace(KN,"."):s,my=s=>!s||Te(s),Cr=(s,i,r)=>{const o=Te(i)?i.split("."):i;let c=0;for(;c<o.length-1;){if(my(s))return{};const f=fy(o[c]);!s[f]&&r&&(s[f]=new r),Object.prototype.hasOwnProperty.call(s,f)?s=s[f]:s={},++c}return my(s)?{}:{obj:s,k:fy(o[c])}},hy=(s,i,r)=>{const{obj:o,k:c}=Cr(s,i,Object);if(o!==void 0||i.length===1){o[c]=r;return}let f=i[i.length-1],m=i.slice(0,i.length-1),h=Cr(s,m,Object);for(;h.obj===void 0&&m.length;)f=`${m[m.length-1]}.${f}`,m=m.slice(0,m.length-1),h=Cr(s,m,Object),h!=null&&h.obj&&typeof h.obj[`${h.k}.${f}`]<"u"&&(h.obj=void 0);h.obj[`${h.k}.${f}`]=r},XN=(s,i,r,o)=>{const{obj:c,k:f}=Cr(s,i,Object);c[f]=c[f]||[],c[f].push(r)},Hc=(s,i)=>{const{obj:r,k:o}=Cr(s,i);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},QN=(s,i,r)=>{const o=Hc(s,r);return o!==void 0?o:Hc(i,r)},Sb=(s,i,r)=>{for(const o in i)o!=="__proto__"&&o!=="constructor"&&(Object.prototype.hasOwnProperty.call(s,o)?Te(s[o])||s[o]instanceof String||Te(i[o])||i[o]instanceof String?r&&(s[o]=i[o]):Sb(s[o],i[o],r):s[o]=i[o]);return s},Ps=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),ZN={"&":"&","<":"<",">":">",'"':""","'":"'"},PN=s=>Te(s)?s.replace(/[&<>"']/g,i=>ZN[i]):s;class JN{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const o=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,o),this.regExpQueue.push(i),o}}const WN=[" ",",","?","!",";"],ej=new JN(20),tj=(s,i,r)=>{i=i||"",r=r||"";const o=WN.filter(m=>!i.includes(m)&&!r.includes(m));if(o.length===0)return!0;const c=ej.getRegExp(`(${o.map(m=>m==="?"?"\\?":m).join("|")})`);let f=!c.test(s);if(!f){const m=s.indexOf(r);m>0&&!c.test(s.substring(0,m))&&(f=!0)}return f},om=(s,i,r=".")=>{if(!s)return;if(s[i]||!r)return Object.prototype.hasOwnProperty.call(s,i)?s[i]:void 0;const o=i.split(r);let c=s;for(let f=0;f<o.length;){if(!c||typeof c!="object")return;let m,h="";for(let p=f;p<o.length;++p)if(p!==f&&(h+=r),h+=o[p],m=c[h],(typeof m=="function"||h==="__proto__")&&!Object.prototype.hasOwnProperty.call(c,h)&&(m=void 0),m!==void 0){if(["string","number","boolean"].includes(typeof m)&&p<o.length-1)continue;f+=p-f+1;break}c=m}return c},dl=s=>s==null?void 0:s.replace(/_/g,"-"),nj={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,i){var r,o;(o=(r=console==null?void 0:console[s])==null?void 0:r.apply)==null||o.call(r,console,i)}};class Rr{constructor(i,r={}){this.init(i,r)}init(i,r={}){this.prefix=r.prefix||"i18next:",this.logger=i||nj,this.options=r,this.debug=r.debug,this.seen=new Set}log(...i){return this.forward(i,"log","",!0)}warn(...i){return this.forward(i,"warn","",!0)}error(...i){return this.forward(i,"error","")}deprecate(...i){return this.forward(i,"warn","WARNING DEPRECATED: ",!0)}once(i,r,...o){return!this.debug||this.seen.has(i)||this.seen.size>=1e3?null:(this.seen.add(i),this[r](...o))}forward(i,r,o,c){return c&&!this.debug?null:(i=i.map(f=>Te(f)?f.replace(/[\r\n\x00-\x1F\x7F]/g," "):f),Te(i[0])&&(i[0]=`${o}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new Rr(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new Rr(this.logger,i)}}var ci=new Rr;class Wc{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const c=this.observers[o].get(r)||0;this.observers[o].set(r,c+1)}),this}off(i,r){(typeof i=="string"?i.split(" "):[i]).forEach(o=>{if(this.observers[o]){if(!r){delete this.observers[o];return}this.observers[o].delete(r)}})}once(i,r){const o=(...c)=>{r(...c),this.off(i,o)};return this.on(i,o),this}emit(i,...r){this.observers[i]&&Array.from(this.observers[i].entries()).forEach(([c,f])=>{for(let m=0;m<f;m++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([c,f])=>{for(let m=0;m<f;m++)c(i,...r)})}}const py=new WeakSet,If=(s,...i)=>{if(i.some(r=>!Te(r)))throw new TypeError(`${s}: pass language, namespace${s==="addResource"?" and key":""} as separate strings; the dotted form ('en.translation.key') was removed in i18next v27`)};class xy extends Wc{constructor(i,r={ns:["translation"],defaultNS:"translation"},o=ci){super(),this.data=i||{},this.options=r,this.logger=o.create("resourceStore"),this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.includes(i)||this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,o,c={}){var v,y;const f=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,m=c.ignoreJSONStructure!==void 0?c.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[i,r];o&&(Array.isArray(o)?h.push(...o):Te(o)&&f?h.push(...o.split(f)):h.push(o));const p=Hc(this.data,h);return p!=null||!m||!Te(o)?p:om((y=(v=this.data)==null?void 0:v[i])==null?void 0:y[r],o,f)}addResource(i,r,o,c,f={silent:!1}){If("addResource",i,r,o);const m=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let h=[i,r];o&&(h=h.concat(m?o.split(m):o)),this.addNamespaces(r),hy(this.data,h,c),f.silent||this.emit("added",i,r,o,c)}addResources(i,r,o,c={silent:!1}){If("addResources",i,r),Object.keys(o||{}).forEach(f=>{f==="__proto__"||f==="constructor"||this.addResource(i,r,f,o[f],{silent:!0})}),c.silent||this.emit("added",i,r,o)}addResourceBundle(i,r,o,c,f,m={silent:!1,skipCopy:!1}){If("addResourceBundle",i,r);const h=[i,r];this.addNamespaces(r);let p=Hc(this.data,h)||{};m.skipCopy||(o=JSON.parse(JSON.stringify(o))),c?Sb(p,o,f):p={...p,...o},hy(this.data,h,p),m.silent||this.emit("added",i,r,o)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(c=>{const f=r[c];return py.has(f)?!0:!f||Object.keys(f).length===0?!1:(typeof f=="object"&&py.add(f),!0)})}toJSON(){return this.data}}const kb=Symbol("i18next/PATH_KEY");function aj(){const s=[],i=Object.create(null);let r;return i.get=(o,c)=>{var f;return(f=r==null?void 0:r.revoke)==null||f.call(r),c===kb?s:(s.push(c),r=Proxy.revocable(o,i),r.proxy)},Proxy.revocable(Object.create(null),i).proxy}function ei(s,i){const{[kb]:r}=s(aj()),o=(i==null?void 0:i.keySeparator)||".",c=(i==null?void 0:i.nsSeparator)??":",f=(i==null?void 0:i.enableSelector)==="strict";if(r.length>1&&c){const m=i==null?void 0:i.ns,h=f?Array.isArray(m)?m:m?[m]:null:Array.isArray(m)?m:null;if(h&&(f?h:h.length>1?h.slice(1):[]).includes(r[0]))return`${r[0]}${c}${r.slice(1).join(o)}`}return r.join(o)}const Nc=s=>!Te(s)&&typeof s!="boolean"&&typeof s!="number";class Uc extends Wc{constructor(i,r={}){super(),IN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils","postProcessors"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=(i.logger||ci).create("translator"),this.checkedLoadedFor={}}changeLanguage(i){i&&(this.language=i)}exists(i,r={interpolation:{}}){const o={...r};if(i==null)return!1;const c=this.resolve(i,o);if((c==null?void 0:c.res)===void 0)return!1;const f=Nc(c.res);return!(o.returnObjects===!1&&f)}extractFromKey(i,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const c=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const m=o&&i.includes(o),h=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!tj(i,o,c);if(m&&!h){const p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:Te(f)?[f]:f};const v=i.split(o);(o!==c||o===c&&this.options.ns.includes(v[0]))&&(f=v.shift()),i=v.join(c)}return{key:i,namespaces:Te(f)?[f]:f}}translate(i,r,o){let c=typeof r=="object"?{...r}:r;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),i==null)return"";typeof i=="function"&&(i=ei(i,{...this.options,...c})),Array.isArray(i)||(i=[String(i)]),i=i.map(R=>typeof R=="function"?ei(R,{...this.options,...c}):String(R));const f=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,m=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:h,namespaces:p}=this.extractFromKey(i[i.length-1],c),v=p[p.length-1];let y=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const g=c.lng||this.language,b=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode")return b?f?{res:`${v}${y}${h}`,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:v,usedParams:this.getUsedParamsDetails(c)}:`${v}${y}${h}`:f?{res:h,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:v,usedParams:this.getUsedParamsDetails(c)}:h;const N=this.resolve(i,c);let j=N==null?void 0:N.res;const T=(N==null?void 0:N.usedKey)||h,H=(N==null?void 0:N.exactUsedKey)||h,_=["[object Number]","[object Function]","[object RegExp]"],K=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,z=!this.i18nFormat||this.i18nFormat.handleAsObject,D=c.count!==void 0&&!Te(c.count),O=Uc.hasDefaultValue(c),U=D?this.pluralResolver.getSuffix(g,c.count,c):"",q=c.ordinal&&D?this.pluralResolver.getSuffix(g,c.count,{ordinal:!1}):"",C=D&&!c.ordinal&&c.count===0,F=C&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${U}`]||c[`defaultValue${q}`]||c.defaultValue;let G=j;z&&!j&&O&&(G=F);const Y=Nc(G),I=Object.prototype.toString.apply(G),W=z&&G&&Y&&!_.includes(I)&&!(Te(K)&&Array.isArray(G)),w=W&&!c.returnObjects&&!this.options.returnObjects;if(w&&this.options.returnedObjectHandler){const R=this.options.returnedObjectHandler(T,G,{...c,ns:p});return f?(N.res=R,N.usedParams=this.getUsedParamsDetails(c),N):R}if(w&&this.logger.warn("accessing an object - but returnObjects options is not enabled!"),W&&!w){if(m){const R=Array.isArray(G),A=R?[]:{},V=R?H:T;for(const B in G)if(Object.prototype.hasOwnProperty.call(G,B)){const P=`${V}${m}${B}`;O&&!j?A[B]=this.translate(P,{...c,defaultValue:Nc(F)?F[B]:void 0,joinArrays:!1,ns:p}):A[B]=this.translate(P,{...c,joinArrays:!1,ns:p}),A[B]===P&&(A[B]=G[B])}j=A}}else if(z&&Te(K)&&Array.isArray(j))j=j.join(K),j&&(j=this.extendTranslation(j,i,c,N,o));else{let R=!1,A=!1;w&&(j=void 0),!this.isValidLookup(j)&&O&&!(w&&Nc(F))&&(R=!0,j=F),!this.isValidLookup(j)&&!(R&&j==="")&&(A=!0,j=h);const B=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:j,P=O&&F!==j&&this.options.updateMissing;if(!w&&(A||R||P)){if(this.logger.log(P?"updateKey":"missingKey",g,v,D&&!P?`${h}${this.pluralResolver.getSuffix(g,c.count,c)}`:h,P?F:j),m){const ve=this.resolve(h,{...c,keySeparator:!1});ve&&ve.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 te=[];const le=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&le&&le[0])for(let ve=0;ve<le.length;ve++)te.push(le[ve]);else this.options.saveMissingTo==="all"?te=this.languageUtils.toResolveHierarchy(c.lng||this.language):te.push(c.lng||this.language);const pe=(ve,k,M)=>{var ce,me;const ie=O&&M!==j?M:B;this.options.missingKeyHandler?this.options.missingKeyHandler(ve,v,k,ie,P,c):(ce=this.backendConnector)!=null&&ce.saveMissing&&this.backendConnector.saveMissing(ve,v,k,ie,P,c,void 0,(me=this.utils)==null?void 0:me.hasLoadedNamespace),this.emit("missingKey",ve,v,k,j)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?te.forEach(ve=>{const k=this.pluralResolver.getSuffixes(ve,c);C&&c[`defaultValue${this.options.pluralSeparator}zero`]&&!k.includes(`${this.options.pluralSeparator}zero`)&&k.push(`${this.options.pluralSeparator}zero`),k.forEach(M=>{pe([ve],h+M,c[`defaultValue${M}`]||F)})}):pe(te,h,F))}j=this.extendTranslation(j,i,c,N,o),A&&j===h&&this.options.appendNamespaceToMissingKey&&(j=`${v}${y}${h}`),(A||R)&&this.options.parseMissingKeyHandler&&(j=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${v}${y}${h}`:h,R?j:void 0,c))}return f?(N.res=j,N.usedParams=this.getUsedParamsDetails(c),N):j}extendTranslation(i,r,o,c,f){var p,v,y;if((p=this.i18nFormat)!=null&&p.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const g=Te(i)&&(((v=o==null?void 0:o.interpolation)==null?void 0:v.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(g){const j=i.match(this.interpolator.nestingRegexp);b=j&&j.length}let N=o.replace&&!Te(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(N={...this.options.interpolation.defaultVariables,...N}),i=this.interpolator.interpolate(i,N,o.lng||this.language||c.usedLng,o),g){const j=i.match(this.interpolator.nestingRegexp),T=j&&j.length;b<T&&(o.nest=!1)}!o.lng&&c&&c.res&&(o.lng=this.language||c.usedLng),o.nest!==!1&&(i=this.interpolator.nest(i,(...j)=>(f==null?void 0:f[0])===j[0]&&!o.context?(this.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${r[0]}`),null):this.translate(...j,r),o)),o.interpolation&&this.interpolator.reset()}const m=o.postProcess||this.options.postProcess,h=Te(m)?[m]:m;if(i!=null&&(h!=null&&h.length)&&o.applyPostProcessor!==!1){const g=(y=this.options)!=null&&y.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(o)},...o}:o;h.forEach(b=>{var j;const N=(j=this.postProcessors)==null?void 0:j[b];if(!N){this.logger.once(`postProcess:${b}`,"warn",`postProcess: '${b}' is not registered on this i18next instance; call use() with it on this instance`);return}i=N.process(i,r,g,this)??i})}return i}resolve(i,r={}){let o,c,f,m,h;return Te(i)&&(i=[i]),Array.isArray(i)&&(i=i.map(p=>typeof p=="function"?ei(p,{...this.options,...r}):p)),i.forEach(p=>{if(this.isValidLookup(o))return;const v=this.extractFromKey(p,r),y=v.key;c=y;let g=v.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const b=r.count!==void 0&&!Te(r.count),N=b&&!r.ordinal&&r.count===0,j=r.context!==void 0&&(Te(r.context)||typeof r.context=="number")&&r.context!=="",T=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);g.forEach(H=>{var _,K;this.isValidLookup(o)||(h=H,!this.checkedLoadedFor[`${T[0]}-${H}`]&&((_=this.utils)!=null&&_.hasLoadedNamespace)&&!((K=this.utils)!=null&&K.hasLoadedNamespace(h))&&(this.checkedLoadedFor[`${T[0]}-${H}`]=!0,this.logger.warn(`key "${c}" for languages "${T.join(", ")}" won't get resolved as namespace "${h}" 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!!!")),T.forEach(z=>{var U;if(this.isValidLookup(o))return;m=z;const D=[y];if((U=this.i18nFormat)!=null&&U.addLookupKeys)this.i18nFormat.addLookupKeys(D,y,z,H,r);else{let q;b&&(q=this.pluralResolver.getSuffix(z,r.count,r));const C=`${this.options.pluralSeparator}zero`,F=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(b&&(r.ordinal&&q.startsWith(F)&&D.push(y+q.replace(F,this.options.pluralSeparator)),D.push(y+q),N&&D.push(y+C)),j){const G=`${y}${this.options.contextSeparator||"_"}${r.context}`;D.push(G),b&&(r.ordinal&&q.startsWith(F)&&D.push(G+q.replace(F,this.options.pluralSeparator)),D.push(G+q),N&&D.push(G+C))}}let O;for(;O=D.pop();)this.isValidLookup(o)||(f=O,o=this.getResource(z,H,O,r))}))})}),{res:o,usedKey:c,exactUsedKey:f,usedLng:m,usedNS:h}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,o,c={}){var f;return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(i,r,o,c):this.resourceStore.getResource(i,r,o,c)}getUsedParamsDetails(i={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=i.replace&&!Te(i.replace);let c=o?i.replace:i;if(o&&typeof i.count<"u"&&(c={...c,count:i.count}),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!o){c={...c};for(const f of r)delete c[f]}return c}static hasDefaultValue(i){const r="defaultValue";for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)&&o.startsWith(r)&&i[o]!==void 0)return!0;return!1}}class gy{constructor(i,r=ci){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=r.create("languageUtils"),this.resolveHierarchyCache={},this.formattedCodes=new Map}clearCache(){this.resolveHierarchyCache={},this.formattedCodes.clear()}getScriptPartFromCode(i){if(i=dl(i),!i||!i.includes("-"))return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=dl(i),!i||!i.includes("-"))return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(!Te(i))return i;let r=this.formattedCodes.get(i);return r!==void 0||(r=this.formatUncached(i),this.formattedCodes.size>=1e3&&this.formattedCodes.clear(),this.formattedCodes.set(i,r)),r}formatUncached(i){const r=i.includes("-");if(r||this.options.cleanCode!==!1){let o;try{o=Intl.getCanonicalLocales(i)[0]}catch{}if(o&&(r||o.toLowerCase()===i.toLowerCase()))return this.options.lowerCaseLng?o.toLowerCase():o;if(o)return i.toLowerCase()}return this.options.lowerCaseLng||this.options.cleanCode&&!r?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(i)}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(o=>{if(r)return;const c=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(c))&&(r=c)}),!r&&this.options.supportedLngs&&i.forEach(o=>{if(r)return;const c=this.getScriptPartFromCode(o);if(this.isSupportedCode(c))return r=c;const f=this.getLanguagePartFromCode(o);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(m=>m===f?!0:!m.includes("-")&&!f.includes("-")?!1:!!(m.includes("-")&&!f.includes("-")&&m.slice(0,m.indexOf("-"))===f))}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),Te(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let o=i[r];return o||(o=i[this.getScriptPartFromCode(r)]),o||(o=i[this.formatLanguageCode(r)]),o||(o=i[this.getLanguagePartFromCode(r)]),o||(o=i.default),o||[]}toResolveHierarchy(i,r){const o=this.options.fallbackLng,c=Array.isArray(o)?o.join("|"):o;c!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=c);const f=r===void 0||r===!1||Te(r),m=r===void 0&&typeof this.options.fallbackLng=="function",h=Te(i)&&f&&!m;let p=null;if(h){let b;r===void 0?b="undefined":r===!1?b="boolean:false":b=`string:${r}`,p=`${i.length}:${i}|${b}`}if(p!==null){const b=this.resolveHierarchyCache[p];if(b!==void 0)return b.slice()}const v=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],i),y=[],g=b=>{b&&(this.isSupportedCode(b)?y.push(b):this.logger.warn(`rejecting language code not found in supportedLngs: ${b}`))};return Te(i)&&(i.includes("-")||i.includes("_"))?(this.options.load!=="languageOnly"&&g(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&g(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&g(this.getLanguagePartFromCode(i))):Te(i)&&g(this.formatLanguageCode(i)),v.forEach(b=>{const N=this.formatLanguageCode(b);y.includes(N)||g(N)}),p!==null?(this.resolveHierarchyCache[p]=y,y.slice()):y}}const yy={zero:0,one:1,two:2,few:3,many:4,other:5},by={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class sj{constructor(i,r={},o=ci){this.languageUtils=i,this.options=r,this.logger=o.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(i,r={}){const o=dl(i==="dev"?"en":i),c=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:o,type:c});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let m;try{m=new Intl.PluralRules(o,{type:c})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),by;if(!i.match(/-|_/))return by;const p=this.languageUtils.getLanguagePartFromCode(i);m=this.getRule(p,r)}return this.pluralRulesCache[f]=m,m}needsPlural(i,r={}){let o=this.getRule(i,r);return o||(o=this.getRule("dev",r)),(o==null?void 0:o.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(i,r,o={}){return this.getSuffixes(i,o).map(c=>`${r}${c}`)}getSuffixes(i,r={}){let o=this.getRule(i,r);return o||(o=this.getRule("dev",r)),o?o.resolvedOptions().pluralCategories.sort((c,f)=>yy[c]-yy[f]).map(c=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${c}`):[]}getSuffix(i,r,o={}){const c=this.getRule(i,o);return c?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${c.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,o))}}const vy=(s,i,r,o=".",c=!0)=>{let f=QN(s,i,r);return f==null&&c&&Te(r)&&(f=om(s,r,o),f===void 0&&(f=om(i,r,o))),f};class Ny{constructor(i={},r=ci){var o;this.logger=r.create("interpolator"),this.options=i,this.format=((o=i==null?void 0:i.interpolation)==null?void 0:o.format)||(c=>c),this.init(i)}init(i={}){i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:c,prefix:f,suffix:m,formatSeparator:h,unescapeSuffix:p,unescapePrefix:v,nestingPrefix:y,nestingSuffix:g,nestingOptionsSeparator:b,maxReplaces:N,alwaysFormat:j}=i.interpolation;this.escape=r!==void 0?r:PN,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=c!==void 0?c:!1,this.prefix=f?Ps(f):"{{",this.suffix=m?Ps(m):"}}",this.formatSeparator=h||",",this.unescapePrefix=p?"":v?Ps(v):"-",this.unescapeSuffix=this.unescapePrefix?"":p?Ps(p):"",this.nestingPrefix=Ps(y||"$t("),this.nestingSuffix=Ps(g||")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=N||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,o)=>(r==null?void 0:r.source)===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(i,r,o,c){var H;let f,m,h;const p=i,v=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},y=_=>{if(!_.includes(this.formatSeparator)){const O=vy(r,v,_,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(O,void 0,o,{...c,...r,interpolationkey:_}):O}const K=_.split(this.formatSeparator),z=K.shift().trim(),D=K.join(this.formatSeparator).trim();return this.format(vy(r,v,z,this.options.keySeparator,this.options.ignoreJSONStructure),D,o,{...c,...r,interpolationkey:z})};this.resetRegExp(),!this.escapeValue&&typeof i=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(i)&&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.");const g=(c==null?void 0:c.missingInterpolationHandler)||this.options.missingInterpolationHandler,b=((H=c==null?void 0:c.interpolation)==null?void 0:H.skipOnVariables)!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,N=[{regex:this.regexpUnescape,safeValue:_=>_},{regex:this.regexp,safeValue:_=>this.escapeValue?this.escape(_):_}],j=[];let T=0;return N.forEach(_=>{for(h=0;f=_.regex.exec(i);){const K=f.index-T,z=j.find(([U,q])=>K>=U&&K<q);if(z){_.regex.lastIndex=z[1]+T;continue}const D=f[1].trim();if(m=y(D),m===void 0)if(typeof g=="function"){const U=g(i,f,c);m=Te(U)?U:""}else if(c&&Object.prototype.hasOwnProperty.call(c,D))m="";else if(b){this.logger.debug&&this.logger.once(`${p}\0${f[0]}`,"warn",`missed to pass in variable ${D} for interpolating ${p}`),m=f[0];continue}else this.logger.warn(`missed to pass in variable ${D} for interpolating ${i}`),m="";else!Te(m)&&!this.useRawValueToEscape&&(m=vc(m));const O=vc(_.safeValue(m));if(i=i.slice(0,f.index)+O+i.slice(f.index+f[0].length),b?(_.regex===this.regexpUnescape?j.push([f.index,f.index+O.length]):T+=O.length-f[0].length,_.regex.lastIndex+=O.length,_.regex.lastIndex-=f[0].length):_.regex.lastIndex=0,h++,h>=this.maxReplaces)break}}),i}nest(i,r,o={}){let c,f,m;const h=(g,b)=>{const N=this.nestingOptionsSeparator;if(!g.includes(N))return g;const j=g.split(new RegExp(`${Ps(N)}[ ]*{`));let T=`{${j[1]}`;g=j[0],T=this.interpolate(T,m);const H=T.match(/'/g),_=T.match(/"/g);(((H==null?void 0:H.length)??0)%2===0&&!_||((_==null?void 0:_.length)??0)%2!==0)&&(T=T.replace(/'/g,'"'));try{m=JSON.parse(T),b&&(m={...b,...m})}catch(K){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,K),`${g}${N}${T}`}return m.defaultValue&&m.defaultValue.includes(this.prefix)&&delete m.defaultValue,g},p=new RegExp(this.nestingRegexp);let v="",y=0;for(;c=p.exec(i);){let g=[];m={...o},m=m.replace&&!Te(m.replace)?m.replace:m,m.applyPostProcessor=!1,delete m.defaultValue;const b=/{.*}/s.test(c[1])?c[1].lastIndexOf("}")+1:c[1].indexOf(this.formatSeparator);if(b!==-1&&(g=c[1].slice(b).split(this.formatSeparator).map(N=>N.trim()).filter(Boolean),c[1]=c[1].slice(0,b)),f=r(h.call(this,c[1].trim(),m),m),f&&c[0]===i&&!Te(f))return f;Te(f)||(f=vc(f)),f||(this.logger.warn(`missed to resolve ${c[1]} for nesting ${i}`),f=""),g.length&&(f=g.reduce((N,j)=>this.format(N,j,o.lng,{...o,interpolationkey:c[1].trim()}),f.trim())),v+=i.slice(y,c.index)+vc(f),y=p.lastIndex,this.regexp.lastIndex=0}return y?v+i.slice(y):i}}const ij=s=>{let i=s.toLowerCase().trim();const r={};if(s.includes("(")){const o=s.split("(");i=o[0].toLowerCase().trim();const c=o[1].slice(0,-1);i==="currency"&&!c.includes(":")?r.currency||(r.currency=c.trim()):i==="relativetime"&&!c.includes(":")?r.range||(r.range=c.trim()):c.split(";").forEach(m=>{if(m){const[h,...p]=m.split(":"),v=p.join(":").trim().replace(/^'+|'+$/g,""),y=h.trim();r[y]||(r[y]=v),v==="false"&&(r[y]=!1),v==="true"&&(r[y]=!0),isNaN(v)||(r[y]=parseInt(v,10))}})}return{formatName:i,formatOptions:r}},lj=1e3,jy=s=>{const i=new Map;return(r,o,c)=>{let f=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(f={...f,[c.interpolationkey]:void 0});let m;try{m=o+JSON.stringify(f)}catch{return s(dl(o),c)(r)}let h=i.get(m);return h||(h=s(dl(o),c),i.size>=lj&&i.delete(i.keys().next().value),i.set(m,h)),h(r)}},rj=s=>(i,r,o)=>s(dl(r),o)(i);class oj{constructor(i={}){this.logger=ci.create("formatter"),this.options=i,this.init(i)}init(i,r={interpolation:{}}){var c;(c=i==null?void 0:i.logger)!=null&&c.create&&(this.logger=i.logger.create("formatter")),this.formatSeparator=r.interpolation.formatSeparator||",";const o=r.cacheInBuiltFormats?jy:rj;this.formats={number:o((f,m)=>{const h=new Intl.NumberFormat(f,{...m});return p=>h.format(p)}),currency:o((f,m)=>{const h=new Intl.NumberFormat(f,{...m,style:"currency"});return p=>h.format(p)}),datetime:o((f,m)=>{const h=new Intl.DateTimeFormat(f,{...m});return p=>h.format(p)}),relativetime:o((f,m)=>{const h=new Intl.RelativeTimeFormat(f,{...m});return p=>h.format(p,m.range||"day")}),list:o((f,m)=>{const h=new Intl.ListFormat(f,{...m});return p=>h.format(p)})}}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=jy(r)}format(i,r,o,c={}){if(!r||i==null)return i;const f=r.split(this.formatSeparator),m=[];for(let p=0;p<f.length;p++){let v=f[p];for(;v.indexOf("(")>-1&&!v.includes(")")&&p+1<f.length;)v=`${v}${this.formatSeparator}${f[++p]}`;m.push(v)}return m.reduce((p,v)=>{var b;const{formatName:y,formatOptions:g}=ij(v);if(this.formats[y]){let N=p;try{const j=((b=c==null?void 0:c.formatParams)==null?void 0:b[c.interpolationkey])||{},T=j.locale||j.lng||c.locale||c.lng||o;N=this.formats[y](p,T,{...g,...c,...j})}catch(j){this.logger.warn(j)}return N}else this.logger.warn(`there was no format function for ${y}`);return p},i)}}const cj=(s,i)=>{s.pending[i]!==void 0&&(delete s.pending[i],s.pendingCount--)};class dj extends Wc{constructor(i,r,o,c={}){var f,m;super(),this.backend=i,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=c,this.logger=(o.logger||ci).create("backendConnector"),this.waitingReads=[],this.maxParallelReads=c.maxParallelReads||10,this.readingCalls=0,this.maxRetries=c.maxRetries>=0?c.maxRetries:5,this.retryTimeout=c.retryTimeout>=1?c.retryTimeout:350,this.state={},this.queue=[],(m=(f=this.backend)==null?void 0:f.init)==null||m.call(f,o,c.backend,c),this.callbackApi=rm(this.backend),this.backend&&this.callbackApi===void 0&&(this.backend.read||this.backend.create)&&this.logger.deprecate("backend: set callbackApi to declare the calling convention (true: read(language, namespace, callback) and create(languages, namespace, key, fallbackValue, callback, options); false: both return a promise or a value); guessing it from the number of parameters is deprecated")}queueLoad(i,r,o,c){const f={},m={},h={},p={};return i.forEach(v=>{let y=!0;r.forEach(g=>{const b=`${v}|${g}`;!o.reload&&this.store.hasResourceBundle(v,g)?this.state[b]=2:!o.reload&&this.state[b]<0||(this.state[b]===1?m[b]===void 0&&(m[b]=!0):(this.state[b]=1,y=!1,m[b]===void 0&&(m[b]=!0),f[b]===void 0&&(f[b]=!0),p[g]===void 0&&(p[g]=!0)))}),y||(h[v]=!0)}),(Object.keys(f).length||Object.keys(m).length)&&this.queue.push({pending:m,pendingCount:Object.keys(m).length,loaded:{},errors:[],callback:c}),{toLoad:Object.keys(f),pending:Object.keys(m),toLoadLanguages:Object.keys(h),toLoadNamespaces:Object.keys(p)}}loaded(i,r,o){const c=i.split("|"),f=c[0],m=c[1];r&&this.emit("failedLoading",f,m,r),!r&&o&&this.store.addResourceBundle(f,m,o,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&o&&(this.state[i]=0);const h={};this.queue.forEach(p=>{XN(p.loaded,[f],m),cj(p,i),r&&p.errors.push(r),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(v=>{h[v]||(h[v]={});const y=p.loaded[v];y.length&&y.forEach(g=>{h[v][g]===void 0&&(h[v][g]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(p=>!p.done)}read(i,r,o,c=0,f=this.retryTimeout,m){if(!i.length)return m(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:o,tried:c,wait:f,callback:m});return}this.readingCalls++;const h=(v,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(v&&y&&c<this.maxRetries){setTimeout(()=>{this.read(i,r,o,c+1,f*2,m)},f);return}m(v,y)},p=this.backend[o].bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&p.length===2){try{const v=p(i,r);v&&typeof v.then=="function"?v.then(y=>h(null,y)).catch(h):h(null,v)}catch(v){h(v)}return}return p(i,r,h)}prepareLoading(i,r,o={},c){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),c&&c();Te(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Te(r)&&(r=[r]);const f=this.queueLoad(i,r,o,c);if(!f.toLoad.length)return f.pending.length||c(),null;f.toLoad.forEach(m=>{this.loadOne(m)})}load(i,r,o){this.prepareLoading(i,r,{},o)}reload(i,r,o){this.prepareLoading(i,r,{reload:!0},o)}loadOne(i,r=""){const o=i.split("|"),c=o[0],f=o[1];this.read(c,f,"read",void 0,void 0,(m,h)=>{m&&this.logger.warn(`${r}loading namespace ${f} for language ${c} failed`,m),!m&&h&&this.logger.log(`${r}loaded namespace ${f} for language ${c}`,h),this.loaded(i,m,h)})}saveMissing(i,r,o,c,f,m={},h=()=>{},p=this.newestCloneHasLoadedNamespace||(y=>(y=(v=>(v=this.services)==null?void 0:v.utils)())==null?void 0:y.hasLoadedNamespace)()){var g;if(p&&!p(r)){this.logger.warn(`did not save key "${o}" as the namespace "${r}" 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(!(o==null||o==="")){if((g=this.backend)!=null&&g.create){const b={...m,isUpdate:f},N=this.backend.create.bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&N.length<6)try{let j;this.callbackApi===!1||N.length===5?j=N(i,r,o,c,b):j=N(i,r,o,c),j&&typeof j.then=="function"?j.then(T=>h(null,T)).catch(h):h(null,j)}catch(j){h(j)}else N(i,r,o,c,h,b)}!i||!i[0]||this.store.addResource(i[0],r,o,c)}}}const cm=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:!1,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:!1,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:s=>{let i={};if(typeof s[1]=="object"&&(i=s[1]),Te(s[1])&&(i.defaultValue=s[1]),Te(s[2])&&(i.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const r=s[3]||s[2];Object.keys(r).forEach(o=>{i[o]=r[o]})}return i},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),wy=s=>(Te(s.ns)&&(s.ns=[s.ns]),Te(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),Te(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),s.supportedLngs&&!s.supportedLngs.includes("cimode")&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),s),jc=()=>{},_y=s=>{const i=cm(),r={...i,...s};return r.interpolation={...i.interpolation,...s.interpolation},typeof r.overloadTranslationOptionHandler!="function"&&(r.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler),r},Sy=s=>{const i=[].concat(s.supportedLngs||[],s.preload||[]);i.push(...Object.keys(s.resources||{}));const r=s.fallbackLng;return Te(r)||Array.isArray(r)?i.push(...[].concat(r)):r&&typeof r=="object"&&Object.keys(r).forEach(o=>{o!=="default"&&i.push(o),i.push(...[].concat(r[o]))}),i},Kf=(s,i)=>{var r;return!Te(i)||FN(i)||(r=s.configuredLngs)!=null&&r.has(i)?!1:(s.logger.once(`lng:${i}`,"warn",`refused the language code '${i.slice(0,64)}' from lng, changeLanguage(), the language detector or loadLanguages(): it is not configured and has other characters than letters, digits, '-', '_', '@' and '.' (or '..', or more than 128). List it in supportedLngs to use it`),!0)},uj=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(r=>{typeof s[r]=="function"&&(s[r]=s[r].bind(s))})};class Tr extends Wc{constructor(i={},r){if(super(),this.userOptions=wy(i),this.options=_y(this.userOptions),this.services={postProcessors:Object.create(null)},this.logger=new Rr(null,this.options),this.modules={external:[]},uj(this),r&&!this.isInitialized&&!i.isClone){if(!this.userOptions.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(i={},r){var v;this.isInitializing=!0,typeof i=="function"&&(r=i,i={}),i.defaultNS==null&&i.ns&&(Te(i.ns)?i.defaultNS=i.ns:i.ns.includes("translation")||(i.defaultNS=i.ns[0])),wy(i);const o={...this.userOptions,...i};this.options=_y({...this.options,...i}),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator),this.options.isClone||(this.configuredLngs=new Set([...this.configuredLngs||[],...Sy(o)]));const c=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.logger.init(c(this.modules.logger),this.options);const{logger:y}=this;(v=this.pendingWarnings)==null||v.forEach(j=>this.logger.warn(j)),this.pendingWarnings=void 0;let g;this.modules.formatter?g=this.modules.formatter:g=oj;const b=new gy(this.options,y);this.store=new xy(this.options.resources,this.options,y);const N=this.services;N.logger=y,N.resourceStore=this.store,N.languageUtils=b,N.pluralResolver=new sj(b,{prepend:this.options.pluralSeparator},y),g&&(N.formatter=c(g),N.formatter.init&&N.formatter.init(N,this.options),this.options.interpolation.format=N.formatter.format.bind(N.formatter)),N.interpolator=new Ny(this.options,y),N.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},N.backendConnector=new dj(c(this.modules.backend),N.resourceStore,N,this.options),N.backendConnector.on("*",(j,...T)=>{this.emit(j,...T)}),this.modules.languageDetector&&(N.languageDetector=c(this.modules.languageDetector),N.languageDetector.init&&N.languageDetector.init(N,this.options.detection,this.options),N.languageDetector.async&&rm(N.languageDetector)===void 0&&this.logger.deprecate("languageDetector: set callbackApi to declare how the async detect() answers (true: detect(callback); false: detect() returns a promise); guessing it from the number of parameters is deprecated")),this.modules.i18nFormat&&(N.i18nFormat=c(this.modules.i18nFormat),N.i18nFormat.init&&N.i18nFormat.init(this)),this.translator=new Uc(this.services,this.options),this.translator.on("*",(j,...T)=>{this.emit(j,...T)}),this.modules.external.forEach(j=>{j.init&&j.init(this)})}if(this.format=this.options.interpolation.format,r||(r=jc),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[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(y=>{this[y]=(...g)=>this.store[y](...g)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=(...g)=>(this.store[y](...g),this)});const h=Nr(),p=()=>{const y=(g,b)=>{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),h.resolve(b),r(g,b)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),h}loadResources(i,r=jc){var f,m;let o=r;const c=Te(i)?i:this.language;if(typeof i=="function"&&(o=i),!this.options.resources||this.options.partialBundledLanguages){if((c==null?void 0:c.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const h=[],p=v=>{if(!v||v==="cimode")return;this.services.languageUtils.toResolveHierarchy(v).forEach(g=>{g!=="cimode"&&(h.includes(g)||h.push(g))})};c?p(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>p(y)),(m=(f=this.options.preload)==null?void 0:f.forEach)==null||m.call(f,v=>p(v)),this.services.backendConnector.load(h,this.options.ns,v=>{!v&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(v)})}else o(null)}reloadResources(i,r,o){const c=Nr();if(typeof i=="function"&&(o=i,i=void 0),typeof r=="function"&&(o=r,r=void 0),!i){const f=Object.keys(this.services.backendConnector.state).map(m=>m.split("|")[0]);i=[...new Set([...this.languages||[],...f])].filter(m=>m!=="cimode")}return r||(r=this.options.ns),o||(o=jc),this.services.backendConnector.reload(i,r,f=>{c.resolve(),o(f)}),c}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");const r=o=>{if(this.modules[o]&&this.modules[o]!==i){const c=`use: this ${o} replaces the ${o} passed to an earlier use() call; only one ${o} is used per instance`;this.isInitializing||this.isInitialized?this.logger.warn(c):(this.pendingWarnings=this.pendingWarnings||[]).push(c)}this.modules[o]=i};return i.type==="backend"&&r("backend"),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&r("languageDetector"),i.type==="i18nFormat"&&r("i18nFormat"),i.type==="postProcessor"&&(this.services.postProcessors[i.name]=i),i.type==="formatter"&&r("formatter"),i.type==="3rdParty"&&this.modules.external.push(i),this}hydrate(i,r){return this.options.isClone?this:this.services.resourceStore?(i&&!this.initializedStoreOnce&&(this.services.resourceStore.data=i,Object.values(i).forEach(o=>{Object.keys(o).forEach(c=>{this.options.ns.includes(c)||this.options.ns.push(c)})}),this.initializedStoreOnce=!0,this.isInitialized=!0),r&&!this.initializedLanguageOnce&&(this.changeLanguage(r),this.initializedLanguageOnce=!0),this):(this.logger.warn("hydrate: call init() first, the instance has no resource store yet"),this)}setResolvedLanguage(i){if(!(!i||!this.languages)&&!["cimode","dev"].includes(i)){for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!["cimode","dev"].includes(o)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}!this.resolvedLanguage&&!this.languages.includes(i)&&this.store.hasLanguageSomeTranslations(i)&&(this.resolvedLanguage=i,this.languages.unshift(i))}}changeLanguage(i,r){this.isLanguageChangingTo=i;const o=Nr();this.emit("languageChanging",i);const c=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},f=(h,p)=>{p?this.isLanguageChangingTo===i&&(c(p),this.translator.changeLanguage(p),this.isLanguageChangingTo=void 0,this.emit("languageChanged",p),this.logger.log("languageChanged",p)):this.isLanguageChangingTo=void 0,o.resolve((...v)=>this.t(...v)),r&&r(h,(...v)=>this.t(...v))},m=h=>{var g,b;!i&&!h&&this.services.languageDetector&&(h=[]);const{supportedLngs:p}=this.options;if(h&&!p){const N=[].concat(h).filter(j=>!Kf(this,j));N.length<[].concat(h).length&&(h=N)}const v=Te(h)?h:h&&h[0];let y=this.store.hasLanguageSomeTranslations(v)?v:this.services.languageUtils.getBestMatchFromCodes(Te(h)?[h]:h);p&&Kf(this,y)&&(y=this.services.languageUtils.getBestMatchFromCodes([])),y&&(this.language||c(y),this.translator.language||this.translator.changeLanguage(y),(b=(g=this.services.languageDetector)==null?void 0:g.cacheUserLanguage)==null||b.call(g,y)),this.loadResources(y,N=>{f(N,y)})};if(!i&&this.services.languageDetector&&!this.services.languageDetector.async)m(this.services.languageDetector.detect());else if(!i&&this.services.languageDetector&&this.services.languageDetector.async){const h=rm(this.services.languageDetector);h===!1||h===void 0&&this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(m):this.services.languageDetector.detect(m)}else m(i);return o}getFixedT(i,r,o,c){const f=c==null?void 0:c.scopeNs,m=(h,p,...v)=>{let y;typeof p!="object"?y=this.options.overloadTranslationOptionHandler([h,p].concat(v)):y={...p},y.lng=y.lng||m.lng,y.lngs=y.lngs||m.lngs;const g=y.ns!==void 0&&y.ns!==null;y.ns=y.ns||m.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||o||m.keyPrefix);const b={...this.options,...y};Array.isArray(f)&&!g&&(b.ns=f),typeof y.keyPrefix=="function"&&(y.keyPrefix=ei(y.keyPrefix,b));const N=this.options.keySeparator||".";let j;return y.keyPrefix&&Array.isArray(h)?j=h.map(T=>(typeof T=="function"&&(T=ei(T,b)),`${y.keyPrefix}${N}${T}`)):(typeof h=="function"&&(h=ei(h,b)),j=y.keyPrefix?`${y.keyPrefix}${N}${h}`:h),this.t(j,y)};return Te(i)?m.lng=i:m.lngs=i,m.ns=r,m.keyPrefix=o,m}t(...i){return this.translator?this.translator.translate(...i):(this.logger.warn("t: called before init(); returning an empty string"),"")}exists(...i){var r;return(r=this.translator)==null?void 0:r.exists(...i)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i,r={}){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;const o=r.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const m=(v,y)=>{const g=this.services.backendConnector.state[`${v}|${y}`];return g===-1||g===0||g===2};if(r.precheck){const v=r.precheck(this,m);if(v!==void 0)return v}if(this.hasResourceBundle(o,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;const{languageUtils:h}=this.services,p=r.lng?h.isSupportedCode(o)&&h.toResolveHierarchy(o,!1)[0]:o;return!!((!p||m(p,i))&&(!c||m(f,i)))}loadNamespaces(i,r){const o=Nr();return!this.options.ns||!this.services.backendConnector?(r&&r(),Promise.resolve()):(Te(i)&&(i=[i]),i.forEach(c=>{this.options.ns.includes(c)||this.options.ns.push(c)}),this.loadResources(c=>{o.resolve(),r&&r(c)}),o)}loadLanguages(i,r){const o=Nr();Te(i)&&(i=[i]);const c=this.options.preload||[],f=i.filter(m=>!c.includes(m)&&!Kf(this,m)&&this.services.languageUtils.isSupportedCode(m));return f.length?(this.options.preload=c.concat(f),this.loadResources(m=>{o.resolve(),r&&r(m)}),o):(r&&r(),Promise.resolve())}dir(i){var c,f;if(i||(i=this.resolvedLanguage||(((c=this.languages)==null?void 0:c.length)>0?this.languages[0]:this.language)),!i)return"ltr";try{const m=new Intl.Locale(i);if(m&&m.getTextInfo){const h=m.getTextInfo();if(h&&h.direction)return h.direction}}catch{}const r=["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"],o=((f=this.services)==null?void 0:f.languageUtils)||new gy(cm());return i.toLowerCase().indexOf("-latn")>1?"ltr":r.includes(o.getLanguagePartFromCode(i))||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(i={},r){const o=new Tr(i,r);return o.createInstance=Tr.createInstance,o}cloneInstance(i={},r=jc){const o=i.forkResourceStore;o&&(i={...i},delete i.forkResourceStore);const c={...this.options,preload:!1,...i,isClone:!0},f=new Tr(c);if(f.logger=i.debug!==void 0||i.prefix!==void 0?this.logger.clone(i):this.logger,["store","language"].forEach(h=>{f[h]=this[h]}),f.services={...this.services},f.services.postProcessors=Object.create(this.services.postProcessors),f.services.utils={...f.services.utils,hasLoadedNamespace:f.hasLoadedNamespace.bind(f),reloadResources:f.reloadResources.bind(f)},o){const h=v=>{const y=Array.isArray(v)?[...v]:{...v};return Object.keys(y).forEach(g=>{y[g]&&typeof y[g]=="object"&&(y[g]=h(y[g]))}),y},p=h(this.store.data);f.store=new xy(p,c,this.logger),f.services.resourceStore=f.store}if(i.interpolation){const p={...cm().interpolation,...this.options.interpolation,...i.interpolation},v={...c,interpolation:p};f.services.interpolator=new Ny(v,this.logger)}return f.configuredLngs=new Set([...this.configuredLngs||[],...Sy(i)]),f.translator=new Uc(f.services,c),f.translator.on("*",(h,...p)=>{f.emit(h,...p)}),f.init(c,r),f.translator.options=c,f.translator.backendConnector.newestCloneHasLoadedNamespace=f.hasLoadedNamespace.bind(f),f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Wt=Tr.createInstance();Wt.createInstance;Wt.dir;Wt.init;Wt.loadResources;Wt.reloadResources;Wt.use;Wt.changeLanguage;Wt.getFixedT;Wt.t;Wt.exists;Wt.setDefaultNamespace;Wt.hasLoadedNamespace;Wt.loadNamespaces;Wt.loadLanguages;const fj=(s,i,r,o)=>{var f,m,h,p;const c=[r,{code:i,...o||{}}];if((m=(f=s==null?void 0:s.services)==null?void 0:f.logger)!=null&&m.forward)return s.services.logger.forward(c,"warn","react-i18next::",!0);ul(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),(p=(h=s==null?void 0:s.services)==null?void 0:h.logger)!=null&&p.warn?s.services.logger.warn(...c):console!=null&&console.warn&&console.warn(...c)},ky=new WeakMap,mj=new Set,Ac=(s,i,r,o)=>{var c;if(ul(r)){let f=mj;const m=((c=s==null?void 0:s.services)==null?void 0:c.logger)||s;if(Tb(m)&&(f=ky.get(m),f||ky.set(m,f=new Set)),f.has(r))return;f.add(r)}fj(s,i,r,o)},hj=()=>{try{return!1}catch{return!1}},Cb=(s,i)=>()=>{s.isInitialized?i():s.once("initialized",()=>i())},dm=(s,i,r)=>{s.loadNamespaces(i,Cb(s,r))},Cy=(s,i,r,o)=>{if(ul(r)&&(r=[r]),s.options.preload&&s.options.preload.indexOf(i)>-1)return dm(s,r,o);r.forEach(c=>{s.options.ns.indexOf(c)<0&&s.options.ns.push(c)}),s.loadLanguages(i,Cb(s,o))},pj=(s,i,r={})=>!i.languages||!i.languages.length?(Ac(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(s,{lng:r.lng,precheck:(o,c)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!c(o.isLanguageChangingTo,s))return!1}}),ul=s=>typeof s=="string",Tb=s=>typeof s=="object"&&s!==null,xj=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,gj={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},yj=s=>gj[s],bj=s=>s.replace(xj,yj);let vj={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:bj,transDefaultProps:void 0};const Nj=()=>vj;let Eb;const jj=s=>{Eb=s},wj=()=>Eb,_j={type:"3rdParty",init(s){jj(s)}},Sj=E.createContext();class kj{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Cj=(s,i)=>{if(ul(i))return i;if(Tb(i)&&ul(i.defaultValue))return i.defaultValue;if(typeof s=="function")return"";if(Array.isArray(s)){const r=s[s.length-1];return typeof r=="function"?"":r}return s},Tj=s=>{var i;return`${s.language}|${s.resolvedLanguage}|${(i=s.languages)==null?void 0:i.join(",")}`},Ej=s=>new Proxy(s,{get:(i,r)=>r==="__original"?i:Reflect.get(i,r)}),Aj={t:Cj,ready:!1},Mj=()=>()=>{},Rj=(s,{bindI18n:i,bindI18nStore:r},o)=>(i&&s.on(i,o),r&&s.store.on(r,o),()=>{i&&s.off(i,o),r&&s.store.off(r,o)}),ft=(s,i={})=>{var Y,I,W;const{i18n:r}=i,{i18n:o,defaultNS:c}=E.useContext(Sj)||{},f=r||o||wj();f&&!f.reportNamespaces&&(f.reportNamespaces=new kj),f||Ac(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const m=E.useMemo(()=>{var w;return{...Nj(),...(w=f==null?void 0:f.options)==null?void 0:w.react,...i}},[f,i]),{useSuspense:h,keyPrefix:p,bindI18n:v,bindI18nStore:y}=m,g=c||((Y=f==null?void 0:f.options)==null?void 0:Y.defaultNS),b=ul(g)?[g]:g||["translation"],N=JSON.stringify(b),j=E.useMemo(()=>b,[N]);(W=(I=f==null?void 0:f.reportNamespaces)==null?void 0:I.addUsedNamespaces)==null||W.call(I,j);const T=E.useRef(0),H=E.useCallback(w=>f?Rj(f,{bindI18n:v,bindI18nStore:y},()=>{T.current+=1,w()}):Mj,[f,v,y]),_=E.useRef(),K=E.useCallback(()=>{if(!f)return Aj;const w=!!(f.isInitialized||f.initializedStoreOnce)&&j.every(le=>pj(le,f,m)),R=i.lng||f.language,A=T.current,V=typeof p=="function"?ei(p,{...f.options,ns:j}):p,B=_.current;if(B&&B.i18n===f&&B.ready===w&&B.lng===R&&B.namespaces===j&&B.keyPrefix===V&&B.revision===A)return B;const te={t:f.getFixedT(R,m.nsMode==="fallback"?j:j[0],p,{scopeNs:j}),i18n:f,ready:w,lng:R,namespaces:j,keyPrefix:V,revision:A};return _.current=te,te},[f,j,p,m,i.lng]),[z,D]=E.useState(0);let{t:O,ready:U}=E.useSyncExternalStore(H,K,K),q;f&&h&&!U&&(q=new Promise(w=>{const R=()=>w();i.lng?Cy(f,i.lng,j,R):dm(f,j,R)}),{t:O,ready:U}=K()),E.useEffect(()=>{if(f&&!U&&!h){const w=()=>D(R=>R+1);i.lng?Cy(f,i.lng,j,w):dm(f,j,w)}},[f,i.lng,j,U,h,z]);const C=f||{},F=E.useRef(null),G=E.useMemo(()=>{var P;const w=C,R=Tj(w);(((P=F.current)==null?void 0:P.original)!==w||F.current.lang!==R)&&(F.current={original:w,lang:R,wrapper:Ej(w)});const A=F.current.wrapper,V=!U&&!h?(...te)=>(Ac(f,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),O(...te)):O,B=[V,A,U];return B.t=V,B.i18n=A,B.ready=U,B},[O,C,U,C.resolvedLanguage,C.language,C.languages]);if(f&&h&&!U)throw hj()&&Ac(f,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),q;return G},Dj={simpleMode:"Simple",advancedMode:"Advanced",switchMode:"Switch workstation mode",language:"Language",help:"Guide",themeDark:"Dark theme",themeLight:"Light theme",loading:"Analyzing repository…",cancel:"Cancel scan",copy:"Copy",copied:"Copied!",copyFailed:"Failed to copy",export:"Export",exportJson:"Export JSON",exportHtml:"Export HTML Report",exportSuccess:"Export downloaded successfully",exportError:"Export failed",close:"Close",reset:"Reset",dismiss:"Dismiss",none:"None",active:"Active",acyclic:"Acyclic",previousAnalysis:"Previous analysis",confidenceHigh:"High",confidenceMedium:"Medium",confidenceLow:"Low",notEvaluated:"Not evaluated",insufficientCoverage:"Insufficient Dependency Coverage",search:"Search",searching:"Searching…",generating:"Generating…"},Oj={title:"RepoDNA",subtitle:"Repository intelligence workstation",changeRepo:"Change repository",hideControls:"Hide source controls",showControls:"Show source controls",studioTab:"Architecture Studio",intelligenceTab:"Intelligence",reportTab:"Health & Transparency Report",guardianTab:"Architecture Guardian",contractTab:"Contract Inspector",passportTab:"Passport Viewer",historyTab:"Time Machine",advisorTab:"Refactoring Advisor",commandPalette:"Command Palette",sampleBadge:"Sample analysis",demoBadge:"Demo Mode — Sample Dataset",previousBanner:"Showing previous analysis while new scan runs in background",branchOptional:"branch (optional)",guardrails:"Guardrails",analyzeRepo:"Analyze Repository",sourceLocal:"Local Folder",sourceGithub:"GitHub HTTPS",sourceDemo:"Demo Dataset",updatingAutomatically:"Updating automatically when complete…",viewingPreviousSnapshot:"Viewing previous snapshot while scanning"},Lj={headline:"Understand how your project's files and modules connect.",subline:"Trace module dependencies, investigate coupling, and review architectural findings with the evidence behind each one.",localTitle:"Open a local repository",localDesc:"Analyze a directory on this machine. Files are read only when you start a scan.",analyzeWorkspace:"Analyze Current Workspace",browseFolder:"Browse Other Folder…",githubTitle:"Inspect a GitHub repository",githubDesc:"Analyze a public repository via HTTPS. The temporary clone is removed after analysis.",githubInputPlaceholder:"Enter GitHub HTTPS URL",githubBtn:"Analyze Repository",demoTitle:"Explore the sample",demoDesc:"A multi-language project with circular dependencies and hotspots ready to inspect immediately.",demoBtn:"Try Demo Architecture",footSecurity:"Read-only analysis. Repository code never executes.",footCoverage:"Coverage limits stay visible in every report.",footShortcuts:"Ctrl K to search commands"},zj={architectureHealth:"Architecture Health",codeVolume:"Code Volume",moduleTopology:"Module Topology",circularDeps:"Circular Dependencies",astCoverage:"AST Language Coverage",gitHotspots:"Git History & Hotspots",files:"files",edges:"edges",cycles:"cycles",commits:"commits",hotspots:"hotspots",unsupported:"unsupported",previousAnalysis:"Previous analysis",recommendedAction:"Recommended Next Action",actionCycle:"Inspect circular dependency cycles in the graph to break tight coupling.",actionGod:"Examine large oversized files in the Inspector to plan cohesive refactoring.",actionClean:"Architecture is healthy. Explore modules or review the transparency report.",actionLowCoverage:"Language coverage is partial. Dependency cycles cannot be ruled out.",notEvaluatedLowAst:"Not evaluated (Low AST coverage)",acyclicZero:"0 cycles (Acyclic)",cyclesBreakdown:"{{cycles}} cycles ({{sccs}} SCCs, {{modules}} modules)",gitNotAvailable:"N/A (Git not available)"},Hj={filesView:"Files",canvasView:"Canvas",inspectorView:"Inspector",explorerToggle:"Explorer",inspectorToggle:"Inspector",focusCanvas:"Focus canvas",exitFocus:"Exit focus",modulesLabel:"Modules",packagesLabel:"Packages",resizeExplorer:"Explorer width",resizeInspector:"Inspector width"},Uj={title:"Explorer",searchPlaceholder:"Search file path or symbol… (/)",allLanguages:"All Languages",allSupport:"All Support Levels",inCycleFilter:"In Cycle",hubsFilter:"Hubs",orphansFilter:"Orphans",noResults:"No matching files found.",clearFilters:"Reset filters"},Bj={layered:"Layered",cluster:"Directory Grid",radial:"Radial",modules:"Modules",collapsePackages:"Collapse Packages",densityCompact:"Compact",densityBalanced:"Balanced",densitySpacious:"Spacious",fitReset:"Fit & Reset",focus1Hop:"Focus 1-Hop",highlightCycles:"Highlight Cycles",zoomSelection:"Zoom to selection",legendSelected:"Selected / Focused Edge",legendCycle:"Circular Dependency Cycle",legendDirection:"Dependency direction",showingModules:"Showing {{files}} modules and {{edges}} directed dependency edges",showingPackages:"Showing {{packages}} package clusters and {{edges}} directed dependency edges",loading:"Loading architecture canvas…"},$j={title:"Selected Module Inspector",noSelectionTitle:"No Module Selected",noSelectionDesc:"Click any node on the interactive dependency graph or choose a file in the Explorer to inspect its AST imports, stability metrics, and architectural findings.",packageTitle:"Selected package",expandPackage:"Expand package to modules",moduleDetailsBelow:"Module details below:",copyPath:"Copy path",copyMetrics:"Copy metrics",couplingHeading:"Topological Coupling & Stability",fanIn:"Fan-In (Ca)",fanOut:"Fan-Out (Ce)",instability:"Instability (I)",role:"Role:",roleIsolated:"Isolated (No Internal Edges)",roleStable:"Stable Core Provider (Low I)",roleVolatile:"Volatile Orchestrator / Dependent (High I)",roleBalanced:"Balanced Intermediate Module",roleIncomplete:"Dependency coverage incomplete",cyclesHeading:"Circular Dependency Participant",triggeredRulesHeading:"Triggered Health Rules",directImportsHeading:"Direct Internal Imports",externalImportsHeading:"External Dependencies",advancedHeading:"Advanced Metrics & Git Churn",symbolsHeading:"Declared Symbols",gitCommits:"Commits",gitChurn:"Churn Score",comments:"comments",remediationHeading:"Remediation",noCycles:"No circular dependency violations for this file.",noTriggeredRules:"No health rule violations triggered by this module."},qj={title:"Explainable Rule-Based Architecture Health Report",overallScore:"Overall Score",confidenceLabel:"Confidence:",fullAstCoverage:"Full AST Coverage:",ofLoc:"of LOC",ofFiles:"of files",lowCoverageTitle:"Not Evaluated — Insufficient Dependency Coverage",lowCoverageExplanation:"The majority of this repository's code uses languages or frameworks where AST dependency resolution is incomplete. Missing dependencies are not treated as evidence of clean architecture.",summaryTab:"Findings Summary",evidenceTab:"Detailed Mathematical Evidence",ruleCol:"Rule",severityCol:"Severity",deductionCol:"Deduction",evidenceCol:"Formula, Threshold & Evidence",remediationCol:"Engineering Remediation",passedRulesHeading:"Passed Architectural Rules",noFindings:"No architectural rule violations were triggered. All evaluated structural rules passed successfully.",weight:"Weight:",pts:"pts",deductionLabel:"Deduction:",loading:"Loading health report…",findingsHeading:"Key Findings & Remediation Plan",remediation:"Remediation:",affectedModules:"Affected modules:",moreModules:"+{{count}} more",evaluationsHeading:"Rule Evaluations & Mathematical Deductions ({{triggered}} Triggered, {{passed}} Passed)",threshold:"Threshold:",unverifiedRulesHeading:"Unverified / Not Evaluated Rules ({{count}})",lowAstCoverage:"low AST coverage",issuesCount_one:"{{count}} issue",issuesCount_other:"{{count}} issues",noEvaluatedFindings:"No findings from evaluated rules. Dependency rules remain unverified because AST coverage is insufficient.",noEvaluatedFindingsGeneral:"No findings in the evaluated rules. See coverage and unverified rules below."},Gj={"ARCH-001":{title:"Circular Dependency Violations (ADP)",remediation:"Extract shared contracts/interfaces into a lower-level module or apply Dependency Inversion to break mutual imports."},"ARCH-002":{title:"Excessive Efferent Coupling (High Fan-Out)",remediation:"Decompose orchestrator modules into focused domain services or facade sub-packages to reduce direct fan-out."},"ARCH-003":{title:"Stable Dependencies Principle (SDP) Inversion",remediation:"Invert the dependency using an abstract interface or move shared types into the stable core layer."},"ARCH-004":{title:"Oversized Modules / God File Risk",remediation:"Split large modules along cohesive responsibility boundaries into smaller, testable modules."},"ARCH-005":{title:"Isolated / Potentially Unreferenced Modules",remediation:"Verify whether isolated modules are dead code, dynamically loaded plugins, or standalone scripts, and remove unused files."},"ARCH-006":{title:"Excessive Directory Hierarchy Depth",remediation:"Flatten deeply nested package directories to improve discoverability and shorten import paths."},"SEC-001":{title:"Potential Secret or Sensitive File Exposure",remediation:"Remove sensitive files from version control, rotate any exposed credentials immediately, and add patterns to .gitignore."}},Vj={SCAN_CANCELLED:"Analysis was cancelled by the user.",SCAN_TIMEOUT:"Analysis timed out before completion.",INTERNAL_SCAN_ERROR:"An unexpected error occurred during analysis.",JOB_NOT_FOUND:"Analysis job not found.",ANALYSIS_NOT_FOUND:"Analysis snapshot not found.",RESULT_NOT_READY:"Analysis is still processing. Please wait…",EMPTY_URL:"GitHub repository URL cannot be empty.",INVALID_URL_CHARS:"URL contains disallowed characters.",SSRF_IP_LITERAL:"Direct IP addresses are blocked to prevent SSRF.",SSRF_LOCAL_HOST:"Localhost and internal domain names are blocked.",EMPTY_PATH:"Directory path cannot be empty.",PATH_NOT_FOUND:"Directory not found on local machine.",NOT_A_DIRECTORY:"Target path is not a directory.",SYSTEM_DIR_BLOCKED:"Scanning system directories is forbidden.",FILESYSTEM_ROOT_BLOCKED:"Scanning an entire filesystem root is blocked.",SCAN_FAILED:"Analysis failed. Please check repository path and permissions."},Yj={searchPlaceholder:"Search commands or modules…",categoryNavigation:"Navigation & Actions",categoryGraph:"Graph Controls",categoryModules:"Repository Modules",actStudioTitle:"Switch to Architecture Studio View",actStudioSub:"Interactive module dependency graph and inspector",actReportTitle:"Open Health & Transparency Report",actReportSub:"Rule-based architectural deductions, circular chains, and git churn",actHistoryTitle:"Switch to Architecture Time Machine",actHistorySub:"Explore commit history, timeline scrubber, and evolution diff",actAdvisorTitle:"Switch to Refactoring Advisor",actAdvisorSub:"Explore deterministic refactoring advice for cycles, coupling, and hubs",actThemeTitle:"Toggle Dark / Light Workstation Theme",actThemeSub:"Switch color scheme across all panels and canvas",actModeTitle:"Toggle Simple / Advanced Workstation Mode",actModeSub:"Currently in {{mode}} mode. Toggle cognitive simplification.",actLangTitle:"Switch Language (Türkçe / English)",actLangSub:"Currently {{lang}}. Toggle interface language.",actTourTitle:"Open RepoDNA Quick Guide",actTourSub:"Step-by-step introduction to repository analysis",actDemoTitle:"Load Labeled Demo Showcase Dataset",actDemoSub:"Inspect multi-language sample architecture with cycles and hotspots",grpDirsTitle:"Group Graph by Directory Packages (Collapse Nodes)",grpDirsSub:"Aggregate files by directory to reduce node and edge count",grpFilesTitle:"Expand Graph to Individual File Modules",grpFilesSub:"Show all individual source files and direct import edges",layoutLayeredTitle:"Switch to Hierarchical Layered Graph Layout",layoutLayeredSub:"Daguerre-style vertical flow showing top-level callers to bottom-level leaves",densityCompactTitle:"Set Graph Density to Compact",densityCompactSub:"Minimal spacing to view more nodes on screen",fltCyclesTitle:"Toggle Circular Dependency Filter (Cycles Only)",fltCyclesSub:"Isolate modules participating in Tarjan SCC dependency cycles",fltResetTitle:"Reset All Graph & Explorer Filters",fltResetSub:"Clear search, language, cycle, hub, and neighborhood filters",expJsonTitle:"Export Machine-Readable Analysis JSON",expJsonSub:"Full dependency graph, SCC cycles, and health findings dump",expHtmlTitle:"Export Standalone HTML Health Report",expHtmlSub:"Self-contained architectural health document with remediation evidence"},Fj={title:"RepoDNA Quick Guide",step:"Step {{current}} of {{total}}",step1Title:"Choose a Repository",step1Desc:"Start with your local workspace, any public GitHub repository, or explore the preloaded demo architecture in one click.",step2Title:"Understand Architecture Health",step2Desc:"The summary strip displays your project's overall score, circular dependencies, and language coverage confidence.",step3Title:"Explore the Architecture Graph",step3Desc:"Zoom, pan, and select modules or package clusters. Edges show how files import each other with directional flow.",step4Title:"Inspect Findings & Remediation",step4Desc:"Click any file or package to see its role, stability, and actionable engineering recommendations in the Inspector.",next:"Next",back:"Back",finish:"Get Started",skip:"Skip tour",tryDemo:"Try Demo Architecture"},Ij={fanInTitle:"Fan-In (Afferent Coupling, Ca)",fanInDesc:"Number of other modules that import or depend on this file. High Fan-In modules are core providers.",fanOutTitle:"Fan-Out (Efferent Coupling, Ce)",fanOutDesc:"Number of other modules this file directly imports. High Fan-Out modules are orchestrators that depend on many parts.",instabilityTitle:"Instability (I = Ce / (Ca + Ce))",instabilityDesc:"Measures resilience to change. 0.00 is completely stable (depended upon, depends on nothing). 1.00 is volatile.",sccTitle:"Strongly Connected Components (SCC)",sccDesc:"Groups of modules mutually reachable through dependency chains, detected using Tarjan's algorithm.",circularTitle:"Circular Dependency",circularDesc:"A mutual dependency loop between two or more modules (e.g. A → B → A) violating the Acyclic Dependencies Principle.",astCoverageTitle:"AST Language Coverage",astCoverageDesc:"Percentage of source code parsed with Tree-sitter abstract syntax trees for verified static dependency extraction.",confidenceTitle:"Confidence Level",confidenceDesc:"A coverage-based assessment reflecting how completely imports and syntax could be resolved via Tree-sitter AST, not an empirical accuracy probability. Repositories with partial language support are honestly rated Low or Unverified."},Kj={title:"PR Architecture Guardian",subtitle:"Continuous regression gate detecting new circular dependencies, policy violations, and coupling spikes.",baseLabel:"Base",headLabel:"Head",advisoryMode:"Advisory",enforceMode:"Enforce",analyzing:"Evaluating…",runCheck:"Assess PR",verdictPass:"PASS — ARCHITECTURE CLEAN",verdictWarning:"WARNING — ADVISORY ISSUES",verdictFail:"FAIL — POLICY VIOLATED",verdictInconclusive:"INCONCLUSIVE — LOW COVERAGE",noReportTitle:"Evaluate Pull Request Architecture",noReportDesc:"Specify base and head Git revisions (e.g. main vs HEAD) to inspect circular dependency regressions, contract policy violations, and risk score.",runCurrentDiff:"Run Assessment for HEAD",riskScore:"Risk Score",riskFactors:"Identified Risk Contributors",newCycles:"New Cycles",contractViolations:"Contract Violations",healthDelta:"Health Score",astCoverage:"AST LOC Coverage",newViolationsTitle:"New Architectural Policy Violations",newCyclesTitle:"Regressive Circular Dependency Loops",rule:"Rule",source:"Source Module",target:"Target Module",remediation:"Remediation",moduleChanges:"Module Changes & Coupling",added:"Added",removed:"Removed",renamed:"Renamed"},Xj={title:"Architecture Contract Inspector",subtitle:"Declarative boundary policy rules defined in .repodna/architecture.yml for structural integrity.",notFoundTitle:"No Architecture Contract Found",notFoundDesc:"This repository does not have a .repodna/architecture.yml file yet. Initialize a starter policy to define layer boundaries and prohibited imports.",policyMode:"Policy Mode",unknownBehavior:"Unknown Handling",schemaVersion:"Schema Version",declaredRules:"Declared Boundary Rules",fromPatterns:"Source Files (from)",disallowImports:"Prohibited Imports",remediation:"Remediation"},Qj={title:"Repository Passport",subtitle:"Portable, verified architectural identity manifest for AI coding agents and engineering teams.",noAnalysis:"Analyze a repository to view its structural Repository Passport.",copyJson:"Copy JSON",downloadJson:"Download Manifest",confidence:"Confidence",gitRevision:"Git Revision",astCoverage:"AST Coverage",healthGrade:"Health Grade",modulesCount:"Total Modules",boundaries:"Identified Boundaries",hubsTitle:"Architectural Hubs (Highest Fan-In / Impact)",modulePath:"Module Path",fanIn:"Fan-In",fanOut:"Fan-Out",instability:"Instability (I)",inventoryTitle:"Indexed Module Inventory",searchPlaceholder:"Filter modules…",module:"Module",language:"Lang",loc:"LOC",status:"Status",hubs:"Architectural Hubs (Highest Fan-In / Impact)",noHubs:"No architectural hubs detected.",supportLevel:"Support Level",files:"Files",share:"Code %",entrypoints:"Architectural Entrypoints",moduleRoles:"Major Module Roles",symbolIntel:"Symbol & Brain Intelligence",migratedToV2:"Migrated to v2.0.0",migrateToV2:"Upgrade to Passport v2.0",migrating:"Upgrading…"},Zj={title:"Repository Brain Intelligence",subtitle:"AST-indexed semantic code search, verified symbol relationships, staleness-aware evidence ledger, and token-calibrated agent context generation.",tabSearch:"Smart Search",tabSymbols:"Symbol Relations",tabEvidence:"Evidence Ledger",tabContext:"Agent Context",searchFailed:"Search failed.",filters:"Filters",filterLanguage:"Filter by language",allLanguages:"All Languages",filterKind:"Filter by symbol kind",allKinds:"All Symbol Kinds",class:"Class",function:"Function",method:"Method",interface:"Interface",type:"Type",struct:"Struct",pathFilterPlaceholder:"Path prefix (e.g. backend/api)",resultsFound:"Found {{count}} matching modules",intent:"Intent",evaluatedTerms:"Terms",hubModule:"Hub",cycle:"Cyclic",matchEvidence:"Scoring & Retrieval Rationale",matchedSymbols:"Matched Symbols",clickToTrace:"Click to trace callers and blast radius",loc:"{{count}} LOC",inspectEvidence:"Evidence ({{count}})",viewInStudio:"View in Studio",noResults:"No matching modules found.",emptyPrompt:"Enter a natural language or symbol query to explore the repository brain.",lookupSymbol:"Lookup Symbol",inClass:"in class {{container}}",memberOf:"member of",openFileInStudio:"Studio",fileLocation:"File Location",downstreamImpact:"Downstream Impact",modulesCount:"{{count}} dependent modules",language:"Language",verifiedCallers:"Verified Usages & Callers (AST Proven)",noVerifiedCallers:"No verified internal callers detected across repository AST.",inSymbol:"in",candidateReferences:"Candidate / Potential Usages",blastRadiusModules:"Downstream Blast Radius Modules ({{count}})",symbolEmptyPrompt:"Search for a symbol name or select one from Smart Search to inspect its relationship graph.",evidenceLedger:"Architectural Evidence Ledger",verifyStaleness:"Verify Staleness",filterByFilePath:"Filter by file path (e.g. backend/api)…",filterBySymbol:"Symbol name…",allStaleness:"All Staleness Statuses",allEvidenceTypes:"All Evidence Types",allSupportLevels:"All Support Levels",verified:"Verified (AST)",candidate:"Candidate",unresolved:"Unresolved",evidenceItemsCount:"{{count}} evidence references found",revision:"Revision",confidenceReason:"Confidence Reason",stalenessStatus:"Staleness Status",freshEvidence:"Fresh: Source content matches indexed SHA-256 and line range exactly.",shiftedEvidence:"Line Shift: Lines shifted by {{delta}} lines in modified file.",deletedEvidence:"File Deleted: Referenced file does not exist on disk.",modifiedEvidence:"Content Changed: File was modified without line shift tracking.",noEvidence:"No evidence references match current filters.",contextPanelTitle:"AI Agent Architecture Context Generator",modeCompact:"Compact",modeFocused:"Focused",modeDeep:"Deep",targetQuery:"Target Query / Task Scope",tokenBudget:"Token Budget",minimalContract:"Minimal Response Contract",generateContext:"Build Context",contextOutputTokens:"Context Size",tokenReduction:"reduction vs codebase",contextEmptyTitle:'Configure mode & token budget and click "Build Context".'},Pj={timelineTab:"Commit Timeline & Scrubber",diffTab:"Evolution Diff",trendsTab:"Architecture Trends",commitHistory:"Git Commits",searchPlaceholder:"Filter commits or authors...",scrubber:"Time Scrubber",loadingCommits:"Reading Git commit history...",noCommitsFound:"No matching commits.",cached:"Cached",calculatingDiff:"Comparing...",compareCommits:"Compare Architecture",shallowWarning:"Shallow repository detected. History depth may be limited.",extractingSnapshot:"Extracting historical architecture snapshot..."},Jj={sectionTitle:"Performance Engine & Cache",modeLabel:"Analysis Mode",modeAuto:"Auto (Incremental)",modeIncremental:"Incremental",modeFull:"Full Re-parse",useCacheLabel:"Persistent SQLite Cache",workersLabel:"Worker Cap (blank = Auto)",cacheStatsTitle:"Persistent Cache Storage",cacheEmpty:"Cache empty",clearCacheBtn:"Clear Cache",clearingCache:"Clearing…",cacheCleared:"Cache cleared ({{count}} entries removed).",cacheClearFailed:"Failed to clear cache.",engineLabel:"Performance Engine",modeWarm:"Warm Cache",modeInc:"Incremental",modeFullBadge:"Full Scan",reusedShort:"{{reused}} reused / {{reparsed}} parsed",cacheHit:"Cache Hit",cachePartial:"Partial Hit",cacheMiss:"Cold Miss",cacheBypassed:"Bypassed",cacheRecovered:"Recovered",fallbackPrefix:"Fallback:",workersShort:"{{count}}w",visibleEdgesDisclosure:"Showing {{visible}} / {{total}} edges (compact)"},Wj={tabLabel:"Live",title:"Live Architecture Engine",optInSubtitle:"Opt-in continuous monitoring of your local working tree with SHA-256 verification.",localOnlyNotice:"Select a local repository directory to enable Live Architecture monitoring.",startWatch:"Start Watch",starting:"Starting…",pause:"Pause",resume:"Resume",reconcileNow:"Reconcile",stopWatch:"Stop Watch",forcePolling:"Polling fallback",freshnessLabel:"Freshness",summarySection:"Live session summary",watchStateLabel:"Watch Status",notStarted:"Monitoring disabled (opt-in)",lastVerifiedLabel:"Last Verified Update",noSnapshotYet:"Waiting for initial snapshot",lastDeltaLabel:"Latest Architectural Delta",noChangesYet:"No working-tree changes observed yet.",activeRisksLabel:"Active Risks",reviewAlertsBelow:"Review active alerts below",noActiveRisks:"No new architectural risks",pausedFreshnessWarning:"Live monitoring is paused. Working-tree edits made while paused are not reflected until you resume and reconcile.",degradedPrefix:"Degraded mode",timelineTitle:"Live Working-Tree Timeline",clearHistory:"Clear",timelineEmpty:"Start live watch to record working-tree architectural deltas separately from Git history.",filesShort:"file(s)",snapshotUnavailable:"snapshot evicted",cyclesLabel:"cycle(s)",symbolsLabel:"public symbol(s)",alertsTitle:"Live Guardian Alerts",filterAlerts:"Filter live alerts",alertsEmpty:"No alerts match the current filter.",acknowledge:"Acknowledge",acknowledgedStillPresent:"Acknowledged — underlying architectural issue is still present until resolved.",confidenceLabel:"Confidence",evidenceLabel:"Evidence",selectedNodeRemoved:"Previously selected module '{{fileId}}' was removed in the latest working-tree update.",status:{OFF:"OFF",WATCHING:"WATCHING",UPDATING:"UPDATING",PAUSED:"PAUSED",STALE:"STALE",DEGRADED:"DEGRADED"},freshness:{VERIFIED_CURRENT:"Verified Current",CHANGE_PENDING:"Changes Pending",ANALYZING:"Analyzing",STALE:"Stale",UNKNOWN:"Unknown",DEGRADED:"Degraded"},connection:{disconnected:"Stream Off",connecting:"Connecting…",connected:"Stream Open",reconnecting:"Reconnecting…",error:"Stream Error"},alertFilter:{ALL:"All",ACTIVE:"Active",ACKNOWLEDGED:"Ack",RESOLVED:"Resolved"},diag:{backend:"Observer",pendingFiles:"Pending Queue",phase:"Last Phase",reuseRatio:"Reused / Parsed",generation:"Generation",batchesReconciles:"Batches / Reconciles"}},e2={tabLabel:"Quality",title:"Code Quality Workstation",subtitle:"Evidence-backed AST complexity, verified Type-1/Type-2 clones, conservative unused candidates, and static test mapping.",noAnalysis:"Run a repository analysis first to inspect Deep Code Intelligence metrics and quality findings.",refresh:"Refresh",sections:"Quality sections",unknown:"Unknown",inspectGraph:"Inspect in Graph",incompleteCoverage:"Incomplete coverage",conservativeHint:"Review candidates only",coverageLabel:"AST Coverage",syntaxErrorsBanner:"{{count}} file(s) had syntax errors and were partially extracted.",topHotspots:"Top Complexity Hotspots",noComplexityData:"No callable symbols found for complexity measurement.",limitationsTitle:"Methodology & Static Analysis Limitations",searchPlaceholder:"Filter by file, symbol, rule, or explanation...",filterCategory:"Category",filterSeverity:"Severity",filterLanguage:"Language",allCategories:"All categories",allSeverities:"All severities",noFindings:"No matching quality findings.",sortBy:"Sort by",contributors:"Complexity Contributors",noBranches:"No control-flow branches (base complexity = 1).",noDuplicates:"No verified Type-1 or Type-2 structural clones detected above threshold.",unusedDisclosure:"Conservative review candidates only — absence of static references does not prove dead code.",noUnused:"No conservative unused-code candidates flagged.",testMappingDisclosure:"Static test mapping identifies AST/naming relationships only — NOT runtime code coverage.",noTestMapping:"No production modules available for test mapping.",noImpactChanges:"No symbol-level changes detected against baseline snapshot.",tabs:{overview:"Overview",findings:"Findings",complexity:"Complexity",duplicates:"Duplicates",unused:"Unused Candidates",tests:"Test Relationships",impact:"Symbol Impact"},metrics:{activeFindings:"Active Findings",cloneGroups:"Clone Groups",unusedCandidates:"Unused Candidates",debtIndex:"Technical Debt Index"}},t2={tabLabel:"Agent",title:"AI Agent Intelligence Workstation",subtitle:"Deterministic, local-first, read-only context compilation, evidence verification, and preflight/postflight architecture checks.",navLabel:"Agent Intelligence Sections",sections:{context:"Task Context",map:"Repository Map",evidence:"Evidence Inspector",preflight:"Change Preflight",patch:"Patch Inspection",postflight:"Postflight Verification",diagnostics:"Context Diagnostics"},taskPromptLabel:"Engineering Task Description (EN / TR)",taskPlaceholder:"e.g. Investigate cache eviction or find authentication handler...",tokenBudgetLabel:"Token Budget",targetModelLabel:"Target Model",compileContext:"Compile Context Pack",emptyContext:"Enter a task description and token budget to compile an evidence-grounded context pack.",copyContext:"Copy Markdown",exportJson:"Export JSON",rankedCandidates:"Ranked Files & Symbols",noCandidates:"No grounded files matched this task (honest abstention).",expand:"Expand",openInStudio:"Studio",evidenceCitations:"Verified Evidence Citations",verifyEvidenceBtn:"Verify Evidence",expandedTarget:"Expanded Target",mapMode:"Map Mode",optionalTask:"Optional Task Focus",compileMap:"Compile Repository Map",evidenceIdLabel:"Evidence ID",intendedFiles:"Intended Files (comma-separated)",proposedEdges:"Proposed Dependency Edges (optional, a->b)",runPreflight:"Run Read-Only Preflight",hypotheticalRisks:"Hypothetical Risks (Pre-Edit Estimate)",patchLabel:"Unified Diff (Strictly Read-Only — Never Applied to Disk)",inspectPatch:"Inspect Unified Diff",runPostflight:"Run Static Postflight Verification",diagnosticsTitle:"Local-First Context Diagnostics"},n2={common:Dj,header:Oj,launchpad:Lj,summary:zj,workspace:Hj,explorer:Uj,graph:Bj,inspector:$j,report:qj,rules:Gj,errors:Vj,palette:Yj,onboarding:Fj,help:Ij,guardian:Kj,contract:Xj,passport:Qj,intelligence:Zj,history:Pj,performance:Jj,live:Wj,quality:e2,agent:t2},a2={simpleMode:"Basit",advancedMode:"İleri Düzey",switchMode:"Çalışma modunu değiştir",language:"Dil",help:"Rehber",themeDark:"Karanlık tema",themeLight:"Aydınlık tema",loading:"Depo analiz ediliyor…",cancel:"Taramayı iptal et",copy:"Kopyala",copied:"Kopyalandı!",copyFailed:"Kopyalanamadı",export:"Dışa Aktar",exportJson:"JSON Olarak İndir",exportHtml:"HTML Raporu Olarak İndir",exportSuccess:"Rapor başarıyla indirildi",exportError:"Dışa aktarma başarısız",close:"Kapat",reset:"Sıfırla",dismiss:"Kapat",none:"Yok",active:"Aktif",acyclic:"Döngüsüz",previousAnalysis:"Önceki analiz",confidenceHigh:"Yüksek",confidenceMedium:"Orta",confidenceLow:"Düşük",notEvaluated:"Değerlendirilmedi",insufficientCoverage:"Bağımlılık analizi kapsamı yetersiz",search:"Ara",searching:"Aranıyor…",generating:"Üretiliyor…"},s2={title:"RepoDNA",subtitle:"Depo mimari istihbarat çalışma alanı",changeRepo:"Depo değiştir",hideControls:"Kaynak ayarlarını gizle",showControls:"Kaynak ayarlarını göster",studioTab:"Mimari İnceleme",intelligenceTab:"Zeka",reportTab:"Sağlık ve Şeffaflık Raporu",guardianTab:"Mimari Koruyucu",contractTab:"Sözleşme Denetçisi",passportTab:"Pasaport Görüntüleyici",historyTab:"Zaman Tüneli",advisorTab:"Refactoring Danışmanı",commandPalette:"Komut Paleti",sampleBadge:"Örnek analiz",demoBadge:"Demo Modu — Örnek Veri Seti",previousBanner:"Arka planda yeni tarama sürerken önceki analiz gösteriliyor",branchOptional:"dal / branch (isteğe bağlı)",guardrails:"Sınırlar",analyzeRepo:"Depoyu Analiz Et",sourceLocal:"Yerel Dizin",sourceGithub:"GitHub HTTPS",sourceDemo:"Demo Modu",updatingAutomatically:"Tamamlandığında otomatik güncellenecek…",viewingPreviousSnapshot:"Tarama sürerken önceki anlık görüntü inceleniyor"},i2={headline:"Projendeki dosyaların ve modüllerin nasıl birbirine bağlandığını keşfet.",subline:"Modül bağımlılıklarını izleyin, bağlantı karmaşıklığını inceleyin ve somut kanıtlarla mimari bulguları değerlendirin.",localTitle:"Yerel projeyi aç",localDesc:"Bu bilgisayardaki bir klasörü analiz edin. Dosyalar yalnızca tarama başlatıldığında salt okunur taranır.",analyzeWorkspace:"Mevcut Çalışma Alanını Analiz Et",browseFolder:"Başka Klasör Seç…",githubTitle:"GitHub projesini analiz et",githubDesc:"Herkese açık bir depoyu HTTPS ile analiz edin. Geçici kopya analiz sonrasında otomatik temizlenir.",githubInputPlaceholder:"GitHub HTTPS bağlantısını girin",githubBtn:"Depoyu Analiz Et",demoTitle:"Demoyu dene",demoDesc:"Döngüsel bağımlılıklar ve riskli modüller içeren çok dilli örnek projeyi hemen inceleyin.",demoBtn:"Örnek Mimariyi İncele",footSecurity:"Salt okunur analiz. Depo kodu asla çalıştırılmaz.",footCoverage:"Kapsam sınırları her raporda şeffaf biçimde gösterilir.",footShortcuts:"Komutları aramak için Ctrl K"},l2={architectureHealth:"Mimari Sağlık",codeVolume:"Kod Hacmi",moduleTopology:"Modül Topolojisi",circularDeps:"Döngüsel Bağımlılıklar",astCoverage:"AST Dil Kapsamı",gitHotspots:"Git Geçmişi ve Riskler",files:"dosya",edges:"bağlantı",cycles:"döngü",commits:"commit",hotspots:"riskli dosya",unsupported:"desteklenmeyen",previousAnalysis:"Önceki analiz",recommendedAction:"Önerilen Sonraki Aksiyon",actionCycle:"Sıkı bağlantıları çözmek için graf üzerindeki döngüsel modülleri inceleyin.",actionGod:"Bölünmesi gereken aşırı büyük modülleri Denetçi'de inceleyin.",actionClean:"Mimari sağlıklı görünüyor. Modülleri keşfedin veya şeffaflık raporunu inceleyin.",actionLowCoverage:"Dil kapsamı kısmi. Döngüsel bağımlılıkların olmadığı kesin olarak söylenemez.",notEvaluatedLowAst:"Değerlendirilmedi (Düşük AST kapsamı)",acyclicZero:"0 döngü (Döngüsüz)",cyclesBreakdown:"{{cycles}} döngü ({{sccs}} SCC, {{modules}} modül)",gitNotAvailable:"N/A (Git geçmişi bulunamadı)"},r2={filesView:"Dosyalar",canvasView:"Tuval",inspectorView:"Denetçi",explorerToggle:"Dosya Ağacı",inspectorToggle:"Denetçi",focusCanvas:"Tuvale Odaklan",exitFocus:"Odaktan Çık",modulesLabel:"Modüller",packagesLabel:"Paketler",resizeExplorer:"Dosya ağacı genişliğini ayarla",resizeInspector:"Denetçi genişliğini ayarla"},o2={title:"Dosya Ağacı",searchPlaceholder:"Dosya yolu veya sembol ara… (/)",allLanguages:"Tüm Diller",allSupport:"Tüm Destek Seviyeleri",inCycleFilter:"Döngüde",hubsFilter:"Merkezler",orphansFilter:"İlişkisizler",noResults:"Eşleşen dosya bulunamadı.",clearFilters:"Filtreleri Temizle"},c2={layered:"Katmanlı",cluster:"Dizin Izgarası",radial:"Dairesel",modules:"Tekil Modüller",collapsePackages:"Paketleri Kümele",densityCompact:"Kompakt",densityBalanced:"Dengeli",densitySpacious:"Geniş",fitReset:"Sığdır ve Sıfırla",focus1Hop:"1-Adım Komşuluk",highlightCycles:"Döngüleri Vurgula",zoomSelection:"Seçilene Yakınlaş",legendSelected:"Seçili / Odaklı Bağlantı",legendCycle:"Bağımlılık Döngüsü",legendDirection:"Bağımlılık yönü",showingModules:"{{files}} modül ve {{edges}} yönlü bağımlılık bağlantısı gösteriliyor",showingPackages:"{{packages}} paket kümesi ve {{edges}} yönlü bağımlılık bağlantısı gösteriliyor",loading:"Mimari tuval yükleniyor…"},d2={title:"Seçili Modül Denetçisi",noSelectionTitle:"Modül Seçilmedi",noSelectionDesc:"AST içe aktarımlarını, kararlılık metriklerini ve mimari bulguları incelemek için graftan bir düğüm veya ağaçtan bir dosya seçin.",packageTitle:"Seçili paket",expandPackage:"Paketi modüllere genişlet",moduleDetailsBelow:"Seçili modül ayrıntıları:",copyPath:"Yolu kopyala",copyMetrics:"Metrikleri kopyala",couplingHeading:"Topolojik Bağlantı ve Kararlılık",fanIn:"Gelen Bağımlılık (Ca)",fanOut:"Giden Bağımlılık (Ce)",instability:"Kararsızlık Oranı (I)",role:"Rol:",roleIsolated:"İzole (İç Bağlantı Yok)",roleStable:"Kararlı Çekirdek Sağlayıcı (Düşük I)",roleVolatile:"Hassas Orkestratör / Bağımlı (Yüksek I)",roleBalanced:"Dengeli Ara Modül",roleIncomplete:"Bağımlılık kapsamı eksik",cyclesHeading:"Döngüsel Bağımlılık Katılımcısı",triggeredRulesHeading:"Tetiklenen Mimari Kurallar",directImportsHeading:"Doğrudan İçe Aktarılan Modüller",externalImportsHeading:"Dış Kütüphane Bağımlılıkları",advancedHeading:"İleri Düzey Metrikler ve Git Analizi",symbolsHeading:"Tanımlı Semboller",gitCommits:"Commit Sayısı",gitChurn:"Değişim Skoru",comments:"yorum satırı",remediationHeading:"Çözüm Önerisi",noCycles:"Bu dosya için herhangi bir döngüsel bağımlılık ihlali yok.",noTriggeredRules:"Bu modül tarafından tetiklenen herhangi bir mimari kural ihlali yok."},u2={title:"Açıklanabilir Kural Tabanlı Mimari Sağlık Raporu",overallScore:"Genel Skor",confidenceLabel:"Güvenilirlik:",fullAstCoverage:"Tam AST Kapsamı:",ofLoc:"kod satırı",ofFiles:"dosya",lowCoverageTitle:"Değerlendirilmedi — Bağımlılık Analizi Kapsamı Yetersiz",lowCoverageExplanation:"Bu projenin büyük bölümü henüz sözdizimsel AST bağımlılık analizine dahil edilemiyor. Eksik bağımlılıklar sağlıklı mimari kanıtı olarak kabul edilmediği için genel mimari puanı hesaplanmadı.",summaryTab:"Bulgu Özeti",evidenceTab:"Ayrıntılı Matematiksel Kanıtlar",ruleCol:"Kural",severityCol:"Önem",deductionCol:"Puan Kırılımı",evidenceCol:"Formül, Eşik Değer ve Kanıt",remediationCol:"Mühendislik Çözüm Önerisi",passedRulesHeading:"Başarıyla Geçilen Mimari Kurallar",noFindings:"Herhangi bir kural ihlali tespit edilmedi. Değerlendirilen tüm yapısal kurallar başarıyla geçti.",weight:"Ağırlık:",pts:"puan",deductionLabel:"Puan Kırılımı:",loading:"Mimari sağlık raporu yükleniyor…",findingsHeading:"Önemli Bulgular ve Çözüm Planı",remediation:"Çözüm:",affectedModules:"Etkilenen modüller:",moreModules:"+{{count}} diğer",evaluationsHeading:"Kural Değerlendirmeleri ve Puan Kırılımları ({{triggered}} Tetiklendi, {{passed}} Geçti)",threshold:"Eşik Değer:",unverifiedRulesHeading:"Doğrulanamayan / Değerlendirilmeyen Kurallar ({{count}})",lowAstCoverage:"düşük AST kapsamı",issuesCount_one:"{{count}} bulgu",issuesCount_other:"{{count}} bulgu",noEvaluatedFindings:"Değerlendirilen kurallarda herhangi bir bulgu yok. AST kapsamı yetersiz olduğundan bağımlılık kuralları doğrulanamadı.",noEvaluatedFindingsGeneral:"Değerlendirilen kurallarda ihlal bulunamadı. Kapsam ve doğrulanamayan kuralları aşağıda inceleyin."},f2={"ARCH-001":{title:"Döngüsel Bağımlılık İhlalleri (ADP)",remediation:"Ortak arayüz ve tipleri alt katmandaki bir modüle taşıyın veya karşılıklı içe aktarımı kırmak için Bağımlılık Tersine Çevirme (Dependency Inversion) uygulayın."},"ARCH-002":{title:"Aşırı Dışa Bağımlılık (Yüksek Fan-Out)",remediation:"Orkestratör modülleri odaklı alan servislerine veya cephe (facade) alt paketlerine bölerek doğrudan giden bağımlılıkları azaltın."},"ARCH-003":{title:"Kararlı Bağımlılıklar Prensibi (SDP) İhlali",remediation:"Soyut bir arayüz kullanarak bağımlılık yönünü tersine çevirin veya paylaşılan tipleri kararlı çekirdek katmana taşıyın."},"ARCH-004":{title:"Aşırı Büyük Modüller / God File Riski",remediation:"Büyük modülleri tekil sorumluluk sınırları boyunca daha küçük ve test edilebilir modüllere ayırın."},"ARCH-005":{title:"Yalıtılmış / Referans Verilmemiş Modüller",remediation:"Yalıtılmış modüllerin ölü kod, dinamik eklenti veya bağımsız betik olup olmadığını doğrulayın; kullanılmayan dosyaları temizleyin."},"ARCH-006":{title:"Aşırı Dizin Hiyerarşi Derinliği",remediation:"İç içe geçmiş derin paket dizinlerini düzleştirerek modül erişilebilirliğini artırın ve import yollarını kısaltın."},"SEC-001":{title:"Hassas Dosya veya Gizli Anahtar İfşası Riski",remediation:"Hassas dosyaları sürüm kontrolünden çıkarın, açığa çıkan kimlik bilgilerini derhal yenileyin ve yolları .gitignore dosyasına ekleyin."}},m2={SCAN_CANCELLED:"Analiz kullanıcı tarafından iptal edildi.",SCAN_TIMEOUT:"Analiz zaman aşımına uğradı.",INTERNAL_SCAN_ERROR:"Analiz sırasında beklenmeyen bir hata oluştu.",JOB_NOT_FOUND:"Tarama işi bulunamadı.",ANALYSIS_NOT_FOUND:"Analiz kaydı bulunamadı.",RESULT_NOT_READY:"Analiz henüz tamamlanmadı. Lütfen bekleyin…",EMPTY_URL:"GitHub depo bağlantısı boş bırakılamaz.",INVALID_URL_CHARS:"Bağlantı adresi geçersiz karakterler içeriyor.",SSRF_IP_LITERAL:"Doğrudan IP adresleri güvenlik gereği engellenmiştir.",SSRF_LOCAL_HOST:"Yerel adresler ve iç ağ alan adları engellenmiştir.",EMPTY_PATH:"Dizin yolu boş bırakılamaz.",PATH_NOT_FOUND:"Belirtilen dizin yerel sistemde bulunamadı.",NOT_A_DIRECTORY:"Belirtilen hedef bir klasör değil.",SYSTEM_DIR_BLOCKED:"Sistem dizinlerinin taranması güvenlik gereği engellenmiştir.",FILESYSTEM_ROOT_BLOCKED:"Tüm disk kök dizininin taranması güvenlik gereği engellenmiştir.",SCAN_FAILED:"Analiz başarısız oldu. Lütfen dosya yolunu ve izinleri kontrol edin."},h2={searchPlaceholder:"Komut veya modül ara…",categoryNavigation:"Gezinme ve Eylemler",categoryGraph:"Graf Kontrolleri",categoryModules:"Proje Modülleri",actStudioTitle:"Mimari İnceleme Görünümüne Geç",actStudioSub:"Etkileşimli modül bağımlılık grafı ve denetçi paneli",actReportTitle:"Sağlık ve Şeffaflık Raporunu Aç",actReportSub:"Kural tabanlı mimari puan kırılımları, döngüler ve git analizi",actHistoryTitle:"Mimari Zaman Tüneline Geç",actHistorySub:"Commit geçmişi, zaman kaydırıcı ve evrimsel farkı incele",actAdvisorTitle:"Refactoring Danışmanına Geç",actAdvisorSub:"Döngüler, yüksek bağlılık ve hub modülleri için deterministik refactoring önerilerini incele",actThemeTitle:"Karanlık / Aydınlık Temayı Değiştir",actThemeSub:"Tüm paneller ve tuval için renk temasını değiştir",actModeTitle:"Basit / İleri Düzey Çalışma Modunu Değiştir",actModeSub:"Şu an {{mode}} modunda. Bilişsel basitleştirmeyi aç/kapat.",actLangTitle:"Dili Değiştir (Türkçe / English)",actLangSub:"Şu an {{lang}}. Arayüz dilini değiştir.",actTourTitle:"RepoDNA Hızlı Başlangıç Rehberini Aç",actTourSub:"Depo analizine adım adım giriş rehberi",actDemoTitle:"Örnek Demo Veri Setini Yükle",actDemoSub:"Döngüler ve riskler içeren çok dilli örnek mimariyi incele",grpDirsTitle:"Grafı Dizin Paketlerine Göre Kümele (Düğümleri Daralt)",grpDirsSub:"Düğüm ve bağlantı sayısını azaltmak için dosyaları dizinlere göre topla",grpFilesTitle:"Grafı Tekil Dosya Modüllerine Genişlet",grpFilesSub:"Tüm tekil kaynak dosyaları ve doğrudan import bağlantılarını göster",layoutLayeredTitle:"Hiyerarşik Katmanlı Graf Düzenine Geç",layoutLayeredSub:"Üst düzey çağıranlardan alt yaprak modüllere doğru dikey akış",densityCompactTitle:"Graf Yoğunluğunu Kompakt Olarak Ayarla",densityCompactSub:"Ekranda daha fazla düğüm görebilmek için minimum boşluk",fltCyclesTitle:"Döngüsel Bağımlılık Filtresini Aç/Kapat (Yalnızca Döngüler)",fltCyclesSub:"Tarjan SCC bağımlılık döngülerine katılan modülleri izole et",fltResetTitle:"Tüm Graf ve Gezgin Filtrelerini Sıfırla",fltResetSub:"Arama, dil, döngü, merkez ve komşuluk filtrelerini temizle",expJsonTitle:"Makine Tarafından Okunabilir Analiz JSON'ı İndir",expJsonSub:"Tam bağımlılık grafı, SCC döngüleri ve sağlık bulguları dökümü",expHtmlTitle:"Bağımsız HTML Sağlık Raporu İndir",expHtmlSub:"Çözüm kanıtlarını içeren bağımsız mimari sağlık dokümanı"},p2={title:"RepoDNA Hızlı Başlangıç Rehberi",step:"Adım {{current}} / {{total}}",step1Title:"Bir Depo Seçin",step1Desc:"Mevcut yerel çalışma alanınızı veya bir GitHub bağlantısını analiz edin; ya da hazır demoyu tek tıkla açın.",step2Title:"Mimari Sağlığı Değerlendirin",step2Desc:"Üst özet şerit; genel mimari skoru, döngüsel bağımlılıkları ve analiz kapsam güvenilirliğini gösterir.",step3Title:"Mimari Grafı Keşfedin",step3Desc:"Yakınlaştırın, sürükleyin ve modülleri seçin. Bağlantılar dosyaların birbirini nasıl içe aktardığını gösterir.",step4Title:"Bulguları ve Çözümleri İnceleyin",step4Desc:"Denetçi panelinde modülün rolünü, kararlılığını ve somut çözüm önerilerini inceleyin.",next:"İleri",back:"Geri",finish:"Başla",skip:"Rehberi atla",tryDemo:"Örnek Mimariyi İncele"},x2={fanInTitle:"Fan-In (Gelen Bağımlılık, Ca)",fanInDesc:"Bu dosyayı doğrudan içe aktaran veya kullanan diğer modüllerin sayısı. Yüksek Fan-In'e sahip modüller çekirdek sağlayıcılardır.",fanOutTitle:"Fan-Out (Giden Bağımlılık, Ce)",fanOutDesc:"Bu dosyanın doğrudan içe aktardığı diğer modüllerin sayısı. Yüksek Fan-Out'a sahip modüller çok sayıda parçaya bağımlı orkestratörlerdir.",instabilityTitle:"Kararsızlık Oranı (I = Ce / (Ca + Ce))",instabilityDesc:"Değişime karşı hassasiyeti ölçer. 0.00 tamamen kararlıdır (başkaları buna bağımlıdır, kendisi bağımsızdır). 1.00 ise değişimden kolay etkilenir.",sccTitle:"Güçlü Bağlantılı Bileşenler (SCC)",sccDesc:"Karşılıklı bağımlılık döngüsü oluşturan modül grupları; Tarjan algoritması kullanılarak tespit edilir.",circularTitle:"Döngüsel Bağımlılık (Circular Dependency)",circularDesc:"Modüllerin birbirine döngü oluşturacak biçimde bağımlı olması (ör. A → B → A). Döngüsüz Bağımlılık Prensibi'ne (ADP) aykırıdır.",astCoverageTitle:"AST Dil Kapsamı",astCoverageDesc:"Statik bağımlılıkların güvenilir tespiti için tam Tree-sitter sözdizim ağacı ile taranan kaynak kod oranı.",confidenceTitle:"Güvenilirlik Seviyesi",confidenceDesc:"Doğruluk olasılığı değil; kodun ne kadarının Tree-sitter AST ile çözümlenebildiğini gösteren kapsam temelli bir değerlendirmedir. Kısmi dillerde dürüstçe Düşük veya Değerlendirilmedi olarak işaretlenir."},g2={title:"PR Mimari Koruyucu",subtitle:"Yeni döngüsel bağımlılıkları, sözleşme ihlallerini ve aşırı modül bağımlılıklarını izleyen sürekli mimari denetçi.",baseLabel:"Taban",headLabel:"Hedef",advisoryMode:"Tavsiye",enforceMode:"Zorunlu",analyzing:"İnceleniyor…",runCheck:"PR'ı Değerlendir",verdictPass:"BAŞARILI — MİMARİ TEMİZ",verdictWarning:"UYARI — TAVSİYE İHLALLERİ",verdictFail:"BAŞARISIZ — POLİTİKA İHLALİ",verdictInconclusive:"BELİRSİZ — YETERSİZ KAPSAM",noReportTitle:"Pull Request Mimarisini İncele",noReportDesc:"İki Git revizyonunu (ör. main ile HEAD) karşılaştırarak döngü regresyonlarını ve mimari sözleşme durumunu denetleyin.",runCurrentDiff:"HEAD İçin İncelemeyi Başlat",riskScore:"Risk Puanı",riskFactors:"Tespit Edilen Risk Faktörleri",newCycles:"Yeni Döngüler",contractViolations:"Sözleşme İhlalleri",healthDelta:"Sağlık Puanı",astCoverage:"AST Satır Kapsamı",newViolationsTitle:"Yeni Mimari Politika İhlalleri",newCyclesTitle:"Yeni Eklenen Döngüsel Bağımlılıklar",rule:"Kural",source:"Kaynak Modül",target:"Hedef Modül",remediation:"Çözüm",moduleChanges:"Modül Değişiklikleri ve Bağımlılık",added:"Eklenen",removed:"Silinen",renamed:"Yeniden Adlandırılan"},y2={title:"Mimari Sözleşme Denetçisi",subtitle:".repodna/architecture.yml dosyasında tanımlı katman ve bağımlılık sınır kuralları.",notFoundTitle:"Mimari Sözleşme Bulunamadı",notFoundDesc:"Bu depoda henüz .repodna/architecture.yml dosyası tanımlanmamış. Katman kurallarını tanımlamak için başlangıç şablonu oluşturabilirsiniz.",policyMode:"Politika Modu",unknownBehavior:"Bilinmeyen İçe Aktarma Davranışı",schemaVersion:"Şema Sürümü",declaredRules:"Tanımlı Mimari Kurallar",fromPatterns:"Kaynak Dosyalar (from)",disallowImports:"Yasaklı İçe Aktarmalar",remediation:"Çözüm Önerisi"},b2={title:"Depo Pasaportu",subtitle:"AI kodlama ajanları ve mühendislik ekipleri için taşınabilir, kanıtlanmış mimari kimlik manifestosu.",noAnalysis:"Yapısal depo pasaportunu görüntülemek için önce bir analiz çalıştırın.",copyJson:"JSON Kopyala",downloadJson:"Manifesti İndir",confidence:"Güvenilirlik",gitRevision:"Git Revizyonu",astCoverage:"AST Kapsamı",healthGrade:"Sağlık Notu",modulesCount:"Toplam Modül",boundaries:"Tespit Edilen Sınırlar",hubsTitle:"Mimari Merkezler (Yüksek Fan-In / Etki)",modulePath:"Modül Yolu",fanIn:"Gelen Bağımlılık (Fan-In)",fanOut:"Giden Bağımlılık (Fan-Out)",instability:"Kararsızlık (I)",inventoryTitle:"İndekslenen Modül Listesi",searchPlaceholder:"Modülleri filtrele…",module:"Modül",language:"Dil",loc:"Satır",status:"Durum",hubs:"Mimari Merkezler (En Yüksek Fan-In / Etki)",noHubs:"Mimari merkez tespit edilmedi.",supportLevel:"Destek Seviyesi",files:"Dosyalar",share:"Kod Payı %",entrypoints:"Mimari Giriş Noktaları",moduleRoles:"Temel Modül Rolleri",symbolIntel:"Sembol ve Beyin Zekası",migratedToV2:"v2.0.0'a Yükseltildi",migrateToV2:"Pasaport v2.0'a Yükselt",migrating:"Yükseltiliyor…"},v2={title:"Depo Beyin Zekası",subtitle:"AST-indeksli semantik kod araması, doğrulanmış sembol ilişkileri, güncellik farkında kanıt kayıt defteri ve token kalibreli ajan bağlam üretimi.",tabSearch:"Akıllı Arama",tabSymbols:"Sembol İlişkileri",tabEvidence:"Kanıt Kayıtları",tabContext:"Ajan Bağlamı",searchFailed:"Arama başarısız oldu.",filters:"Filtreler",filterLanguage:"Dile göre filtrele",allLanguages:"Tüm Diller",filterKind:"Sembol türüne göre filtrele",allKinds:"Tüm Sembol Türleri",class:"Sınıf",function:"Fonksiyon",method:"Metot",interface:"Arayüz",type:"Tip",struct:"Yapı",pathFilterPlaceholder:"Dizin öneki (örn. backend/api)",resultsFound:"{{count}} eşleşen modül bulundu",intent:"Amaç",evaluatedTerms:"Terimler",hubModule:"Merkez",cycle:"Döngüsel",matchEvidence:"Puanlama ve Getirme Gerekçesi",matchedSymbols:"Eşleşen Semboller",clickToTrace:"Çağıranları ve etki yarıçapını izlemek için tıklayın",loc:"{{count}} satır",inspectEvidence:"Kanıtlar ({{count}})",viewInStudio:"Stüdyoda Gör",noResults:"Eşleşen modül bulunamadı.",emptyPrompt:"Depo beynini keşfetmek için doğal dil veya sembol sorgusu girin.",lookupSymbol:"Sembolü Ara",inClass:"{{container}} sınıfında",memberOf:"üyesi",openFileInStudio:"Stüdyo",fileLocation:"Dosya Konumu",downstreamImpact:"Aşağı Akış Etkisi",modulesCount:"{{count}} bağımlı modül",language:"Dil",verifiedCallers:"Doğrulanmış Kullanımlar ve Çağıranlar (AST Kanıtlı)",noVerifiedCallers:"Depo AST'sinde doğrulanmış iç çağırıcı tespit edilmedi.",inSymbol:"içinde",candidateReferences:"Aday / Olası Kullanımlar",blastRadiusModules:"Aşağı Akış Etki Yarıçapı Modülleri ({{count}})",symbolEmptyPrompt:"İlişki grafiğini incelemek için bir sembol adı arayın veya Akıllı Arama'dan bir sembol seçin.",evidenceLedger:"Mimari Kanıt Kayıt Defteri",verifyStaleness:"Güncelliği Doğrula",filterByFilePath:"Dosya yoluna göre filtrele (örn. backend/api)…",filterBySymbol:"Sembol adı…",allStaleness:"Tüm Güncellik Durumları",allEvidenceTypes:"Tüm Kanıt Türleri",allSupportLevels:"Tüm Destek Seviyeleri",verified:"Doğrulanmış (AST)",candidate:"Aday",unresolved:"Çözümlenmemiş",evidenceItemsCount:"{{count}} kanıt referansı bulundu",revision:"Revizyon",confidenceReason:"Güven Gerekçesi",stalenessStatus:"Güncellik Durumu",freshEvidence:"Güncel: Kaynak içerik indekslenen SHA-256 ve satır aralığıyla tam eşleşiyor.",shiftedEvidence:"Satır Kayması: Değiştirilen dosyada satırlar {{delta}} satır kaymış.",deletedEvidence:"Dosya Silinmiş: Referans verilen dosya diskte bulunmuyor.",modifiedEvidence:"İçerik Değişti: Dosya satır takibi olmadan değiştirildi.",noEvidence:"Mevcut filtrelerle eşleşen kanıt referansı yok.",contextPanelTitle:"AI Ajan Mimari Bağlam Üreticisi",modeCompact:"Kompakt",modeFocused:"Odaklanmış",modeDeep:"Derin",targetQuery:"Hedef Sorgu / Görev Kapsamı",tokenBudget:"Token Bütçesi",minimalContract:"Minimal Yanıt Sözleşmesi",generateContext:"Bağlam Oluştur",contextOutputTokens:"Bağlam Boyutu",tokenReduction:"kod tabanına kıyasla tasarruf",contextEmptyTitle:'Modu ve token bütçesini yapılandırıp "Bağlam Oluştur"a tıklayın.'},N2={timelineTab:"Commit Zaman Çizelgesi ve Kaydırıcı",diffTab:"Evrimsel Fark",trendsTab:"Mimari Trendleri",commitHistory:"Git Commitleri",searchPlaceholder:"Commit veya yazar filtrele...",scrubber:"Zaman Kaydırıcı",loadingCommits:"Git commit geçmişi okunuyor...",noCommitsFound:"Eşleşen commit bulunamadı.",cached:"Önbellekte",calculatingDiff:"Karşılaştırılıyor...",compareCommits:"Mimariyi Karşılaştır",shallowWarning:"Sığ (shallow) depo algılandı. Geçmiş derinliği sınırlı olabilir.",extractingSnapshot:"Tarihsel mimari anlık görüntüsü çıkarılıyor..."},j2={sectionTitle:"Performans Motoru ve Önbellek",modeLabel:"Analiz Modu",modeAuto:"Otomatik (Artımlı)",modeIncremental:"Artımlı (Incremental)",modeFull:"Tam Analiz",useCacheLabel:"Kalıcı SQLite Önbelleği",workersLabel:"İşçi Sınırı (boş = Otomatik)",cacheStatsTitle:"Kalıcı Önbellek Depolaması",cacheEmpty:"Önbellek boş",clearCacheBtn:"Önbelleği Temizle",clearingCache:"Temizleniyor…",cacheCleared:"Önbellek temizlendi ({{count}} kayıt silindi).",cacheClearFailed:"Önbellek temizlenemedi.",engineLabel:"Performans Motoru",modeWarm:"Sıcak Önbellek",modeInc:"Artımlı",modeFullBadge:"Tam Tarama",reusedShort:"{{reused}} önbellek / {{reparsed}} analiz",cacheHit:"Önbellek İsabeti",cachePartial:"Kısmi İsabet",cacheMiss:"Soğuk Başlatma",cacheBypassed:"Devre Dışı",cacheRecovered:"Onarıldı",fallbackPrefix:"Geri Dönüş:",workersShort:"{{count}} işçi",visibleEdgesDisclosure:"{{visible}} / {{total}} bağlantı görünür (kompakt)"},w2={tabLabel:"Canlı",title:"Canlı Mimari Motoru",optInSubtitle:"Yerel çalışma ağacınız için SHA-256 doğrulamalı, isteğe bağlı sürekli mimari izleme.",localOnlyNotice:"Canlı Mimari izlemeyi etkinleştirmek için yerel bir depo klasörü seçin.",startWatch:"İzlemeyi Başlat",starting:"Başlatılıyor…",pause:"Duraklat",resume:"Devam Et",reconcileNow:"Doğrula",stopWatch:"Durdur",forcePolling:"Yoklama (Polling) modu",freshnessLabel:"Güncellik",summarySection:"Canlı oturum özeti",watchStateLabel:"İzleme Durumu",notStarted:"İzleme kapalı (isteğe bağlı)",lastVerifiedLabel:"Son Doğrulanmış Güncelleme",noSnapshotYet:"İlk doğrulanmış anlık görüntü bekleniyor",lastDeltaLabel:"Son Mimari Değişiklik",noChangesYet:"Henüz çalışma ağacı değişikliği gözlenmedi.",activeRisksLabel:"Aktif Riskler",reviewAlertsBelow:"Aşağıdaki aktif uyarıları inceleyin",noActiveRisks:"Yeni mimari risk tespit edilmedi",pausedFreshnessWarning:"Canlı izleme duraklatıldı. Duraklatma sırasında yapılan değişiklikler devam ettirilip doğrulanana kadar yansıtılmaz.",degradedPrefix:"Kısıtlı mod",timelineTitle:"Canlı Çalışma Ağacı Zaman Çizelgesi",clearHistory:"Temizle",timelineEmpty:"Git geçmişinden ayrı olarak çalışma ağacı mimari değişikliklerini kaydetmek için canlı izlemeyi başlatın.",filesShort:"dosya",snapshotUnavailable:"anlık görüntü önbellekten silindi",cyclesLabel:"döngü",symbolsLabel:"genel sembol",alertsTitle:"Canlı Guardian Uyarıları",filterAlerts:"Canlı uyarıları filtrele",alertsEmpty:"Seçili filtreyle eşleşen uyarı yok.",acknowledge:"Onayla",acknowledgedStillPresent:"Onaylandı — alttaki mimari sorun çözülene kadar devam etmektedir.",confidenceLabel:"Güven",evidenceLabel:"Kanıt",selectedNodeRemoved:"Önceden seçilen '{{fileId}}' modülü son çalışma ağacı güncellemesinde kaldırıldı.",status:{OFF:"KAPALI",WATCHING:"İZLENİYOR",UPDATING:"GÜNCELLENİYOR",PAUSED:"DURAKLATILDI",STALE:"ESKİMİŞ",DEGRADED:"KISITLI"},freshness:{VERIFIED_CURRENT:"Doğrulanmış Güncel",CHANGE_PENDING:"Değişiklik Bekliyor",ANALYZING:"Analiz Ediliyor",STALE:"Eskimiş",UNKNOWN:"Bilinmiyor",DEGRADED:"Kısıtlı"},connection:{disconnected:"Akış Kapalı",connecting:"Bağlanıyor…",connected:"Akış Açık",reconnecting:"Yeniden Bağlanıyor…",error:"Akış Hatası"},alertFilter:{ALL:"Tümü",ACTIVE:"Aktif",ACKNOWLEDGED:"Onaylı",RESOLVED:"Çözüldü"},diag:{backend:"İzleyici",pendingFiles:"Bekleyen Kuyruk",phase:"Son Aşama",reuseRatio:"Önbellek / Analiz",generation:"Nesil",batchesReconciles:"Toplu / Doğrulama"}},_2={tabLabel:"Kalite",title:"Kod Kalitesi Çalışma İstasyonu",subtitle:"Kanıta dayalı AST karmaşıklığı, doğrulanmış Tip-1/Tip-2 klonlar, ihtiyatlı kullanılmayan kod adayları ve statik test eşlemesi.",noAnalysis:"Derin Kod Zekası metriklerini ve kalite bulgularını incelemek için önce bir repository analizi çalıştırın.",refresh:"Yenile",sections:"Kalite bölümleri",unknown:"Bilinmiyor",inspectGraph:"Grafta İncele",incompleteCoverage:"Eksik kapsam",conservativeHint:"Yalnızca inceleme adayı",coverageLabel:"AST Kapsamı",syntaxErrorsBanner:"{{count}} dosyada sözdizimi hatası bulundu ve kısmi çıkarım uygulandı.",topHotspots:"En Yüksek Karmaşıklık Noktaları",noComplexityData:"Karmaşıklık ölçümü için çağrılabilir sembol bulunamadı.",limitationsTitle:"Metodoloji ve Statik Analiz Sınırları",searchPlaceholder:"Dosya, sembol, kural veya açıklama ile filtrele...",filterCategory:"Kategori",filterSeverity:"Önem",filterLanguage:"Dil",allCategories:"Tüm kategoriler",allSeverities:"Tüm önem seviyeleri",noFindings:"Eşleşen kalite bulgusu yok.",sortBy:"Sırala",contributors:"Karmaşıklık Bileşenleri",noBranches:"Kontrol akışı dallanması yok (taban karmaşıklık = 1).",noDuplicates:"Eşik üzerinde doğrulanmış Tip-1 veya Tip-2 yapısal klon tespit edilmedi.",unusedDisclosure:"Yalnızca ihtiyatlı inceleme adaylarıdır — statik referans olmaması kodun ölü olduğunu kanıtlamaz.",noUnused:"İhtiyatlı kullanılmayan kod adayı işaretlenmedi.",testMappingDisclosure:"Statik test eşlemesi yalnızca AST/adlandırma ilişkilerini gösterir — çalışma zamanı kod kapsamı DEĞİLDİR.",noTestMapping:"Test eşlemesi için üretim modülü bulunamadı.",noImpactChanges:"Temel anlık görüntüye göre sembol düzeyinde değişiklik tespit edilmedi.",tabs:{overview:"Genel Bakış",findings:"Bulgular",complexity:"Karmaşıklık",duplicates:"Klonlar",unused:"Kullanılmayan Adaylar",tests:"Test İlişkileri",impact:"Sembol Etkisi"},metrics:{activeFindings:"Aktif Bulgular",cloneGroups:"Klon Grupları",unusedCandidates:"Kullanılmayan Adaylar",debtIndex:"Teknik Borç İndeksi"}},S2={tabLabel:"Ajan",title:"Yapay Zeka Ajan Istihbarat Calisma Alani",subtitle:"Deterministik, yerel-oncelikli, salt-okunur baglam derleme, kanit dogrulama ve degisiklik oncesi/sonrasi mimari kontrolleri.",navLabel:"Ajan Istihbarat Bolumleri",sections:{context:"Gorev Baglami",map:"Depo Haritasi",evidence:"Kanit Denetleyici",preflight:"Degisiklik Oncesi",patch:"Yama Inceleme",postflight:"Degisiklik Sonrasi",diagnostics:"Baglam Tanilama"},taskPromptLabel:"Gelistirme Gorev Aciklamasi (TR / EN)",taskPlaceholder:"Orn. Onbellek tahliye mekanizmasini incele veya kimlik dogrulama hatasini bul...",tokenBudgetLabel:"Token Butcesi",targetModelLabel:"Hedef Model",compileContext:"Baglam Paketi Derle",emptyContext:"Kanit dayanakli baglam paketi derlemek icin bir gorev aciklamasi ve token butcesi girin.",copyContext:"Markdown Kopyala",exportJson:"JSON Disa Aktar",rankedCandidates:"Sirali Dosyalar ve Semboller",noCandidates:"Bu gorevle eslesen dogrulanmis dosya bulunamadi (durust cekimserlik).",expand:"Genislet",openInStudio:"Studyo",evidenceCitations:"Dogrulanmis Kanit Atiflari",verifyEvidenceBtn:"Kaniti Dogrula",expandedTarget:"Genisletilen Hedef",mapMode:"Harita Modu",optionalTask:"Istege Bagli Gorev Odagi",compileMap:"Depo Haritasi Derle",evidenceIdLabel:"Kanit Kimligi",intendedFiles:"Hedef Dosyalar (virgul ile ayirin)",proposedEdges:"Onerilen Bagimlilik Kenarlari (istege bagli, a->b)",runPreflight:"Salt-Okunur Preflight Calistir",hypotheticalRisks:"Hipotetik Riskler (Degisiklik Oncesi Tahmin)",patchLabel:"Birlesik Fark / Unified Diff (Salt-Okunur — Diske Uygulanmaz)",inspectPatch:"Yamayi Incele",runPostflight:"Statik Postflight Dogrulamasi Calistir",diagnosticsTitle:"Yerel-Oncelikli Baglam Tanilama"},k2={common:a2,header:s2,launchpad:i2,summary:l2,workspace:r2,explorer:o2,graph:c2,inspector:d2,report:u2,rules:f2,errors:m2,palette:h2,onboarding:p2,help:x2,guardian:g2,contract:y2,passport:b2,intelligence:v2,history:N2,performance:j2,live:w2,quality:_2,agent:S2},C2=()=>{var s;try{const i=localStorage.getItem("repodna.locale");if(i){const r=JSON.parse(i);if(r==="en"||r==="tr")return r}}catch{}return typeof navigator<"u"&&((s=navigator.language)!=null&&s.toLowerCase().startsWith("tr"))?"tr":"en"},Ab=C2();Wt.use(_j).init({resources:{en:{translation:n2},tr:{translation:k2}},lng:Ab,fallbackLng:"en",interpolation:{escapeValue:!1}});typeof document<"u"&&(document.documentElement.lang=Ab);const T2="modulepreload",E2=function(s){return"/"+s},Ty={},Mb=function(i,r,o){let c=Promise.resolve();if(r&&r.length>0){let m=function(v){return Promise.all(v.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));c=m(r.map(v=>{if(v=E2(v),v in Ty)return;Ty[v]=!0;const y=v.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${g}`))return;const b=document.createElement("link");if(b.rel=y?"stylesheet":T2,y||(b.as="script"),b.crossOrigin="",b.href=v,p&&b.setAttribute("nonce",p),document.head.appendChild(b),y)return new Promise((N,j)=>{b.addEventListener("load",N),b.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${v}`)))})}))}function f(m){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=m,window.dispatchEvent(h),!h.defaultPrevented)throw m}return c.then(m=>{for(const h of m||[])h.status==="rejected"&&f(h.reason);return i().catch(f)})};/**
|
|
50
|
+
* @license lucide-react v0.475.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const A2=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rb=(...s)=>s.filter((i,r,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===r).join(" ").trim();/**
|
|
55
|
+
* @license lucide-react v0.475.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var M2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
60
|
+
* @license lucide-react v0.475.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const R2=E.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:m,...h},p)=>E.createElement("svg",{ref:p,...M2,width:i,height:i,stroke:s,strokeWidth:o?Number(r)*24/Number(i):r,className:Rb("lucide",c),...h},[...m.map(([v,y])=>E.createElement(v,y)),...Array.isArray(f)?f:[f]]));/**
|
|
65
|
+
* @license lucide-react v0.475.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const he=(s,i)=>{const r=E.forwardRef(({className:o,...c},f)=>E.createElement(R2,{ref:f,iconNode:i,className:Rb(`lucide-${A2(s)}`,o),...c}));return r.displayName=`${s}`,r};/**
|
|
70
|
+
* @license lucide-react v0.475.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const D2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Tm=he("Activity",D2);/**
|
|
75
|
+
* @license lucide-react v0.475.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const O2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],L2=he("ArrowLeft",O2);/**
|
|
80
|
+
* @license lucide-react v0.475.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const z2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ai=he("ArrowRight",z2);/**
|
|
85
|
+
* @license lucide-react v0.475.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const H2=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Db=he("ArrowUpRight",H2);/**
|
|
90
|
+
* @license lucide-react v0.475.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const U2=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Ob=he("BookOpen",U2);/**
|
|
95
|
+
* @license lucide-react v0.475.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const B2=[["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"}]],$2=he("Box",B2);/**
|
|
100
|
+
* @license lucide-react v0.475.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const q2=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],G2=he("Boxes",q2);/**
|
|
105
|
+
* @license lucide-react v0.475.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const V2=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Y2=he("Calendar",V2);/**
|
|
110
|
+
* @license lucide-react v0.475.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const F2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],I2=he("ChartLine",F2);/**
|
|
115
|
+
* @license lucide-react v0.475.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const K2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Em=he("Check",K2);/**
|
|
120
|
+
* @license lucide-react v0.475.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const X2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Lb=he("ChevronDown",X2);/**
|
|
125
|
+
* @license lucide-react v0.475.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const Q2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mc=he("ChevronRight",Q2);/**
|
|
130
|
+
* @license lucide-react v0.475.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const Z2=[["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"}]],vn=he("CircleAlert",Z2);/**
|
|
135
|
+
* @license lucide-react v0.475.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const P2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],jn=he("CircleCheck",P2);/**
|
|
140
|
+
* @license lucide-react v0.475.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const J2=[["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"}]],W2=he("CircleHelp",J2);/**
|
|
145
|
+
* @license lucide-react v0.475.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const ew=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Ey=he("CircleX",ew);/**
|
|
150
|
+
* @license lucide-react v0.475.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const tw=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]],nw=he("ClipboardCopy",tw);/**
|
|
155
|
+
* @license lucide-react v0.475.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const aw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Am=he("Clock",aw);/**
|
|
160
|
+
* @license lucide-react v0.475.0 - ISC
|
|
161
|
+
*
|
|
162
|
+
* This source code is licensed under the ISC license.
|
|
163
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
+
*/const sw=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],fl=he("CodeXml",sw);/**
|
|
165
|
+
* @license lucide-react v0.475.0 - ISC
|
|
166
|
+
*
|
|
167
|
+
* This source code is licensed under the ISC license.
|
|
168
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
+
*/const iw=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],zb=he("Command",iw);/**
|
|
170
|
+
* @license lucide-react v0.475.0 - ISC
|
|
171
|
+
*
|
|
172
|
+
* This source code is licensed under the ISC license.
|
|
173
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
+
*/const lw=[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Mm=he("Compass",lw);/**
|
|
175
|
+
* @license lucide-react v0.475.0 - ISC
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the ISC license.
|
|
178
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
+
*/const rw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 18a6 6 0 0 0 0-12v12z",key:"j4l70d"}]],ow=he("Contrast",rw);/**
|
|
180
|
+
* @license lucide-react v0.475.0 - ISC
|
|
181
|
+
*
|
|
182
|
+
* This source code is licensed under the ISC license.
|
|
183
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
+
*/const cw=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xs=he("Copy",cw);/**
|
|
185
|
+
* @license lucide-react v0.475.0 - ISC
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the ISC license.
|
|
188
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/const dw=[["polyline",{points:"14 9 9 4 4 9",key:"m9oyvo"}],["path",{d:"M20 20h-7a4 4 0 0 1-4-4V4",key:"1blwi3"}]],uw=he("CornerLeftUp",dw);/**
|
|
190
|
+
* @license lucide-react v0.475.0 - ISC
|
|
191
|
+
*
|
|
192
|
+
* This source code is licensed under the ISC license.
|
|
193
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
+
*/const fw=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],Bc=he("Cpu",fw);/**
|
|
195
|
+
* @license lucide-react v0.475.0 - ISC
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the ISC license.
|
|
198
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/const mw=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Ay=he("Database",mw);/**
|
|
200
|
+
* @license lucide-react v0.475.0 - ISC
|
|
201
|
+
*
|
|
202
|
+
* This source code is licensed under the ISC license.
|
|
203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
+
*/const hw=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],zn=he("Download",hw);/**
|
|
205
|
+
* @license lucide-react v0.475.0 - ISC
|
|
206
|
+
*
|
|
207
|
+
* This source code is licensed under the ISC license.
|
|
208
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
+
*/const pw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ed=he("ExternalLink",pw);/**
|
|
210
|
+
* @license lucide-react v0.475.0 - ISC
|
|
211
|
+
*
|
|
212
|
+
* This source code is licensed under the ISC license.
|
|
213
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
+
*/const xw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 18v-1",key:"zg0ygc"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"M16 18v-3",key:"j5jt4h"}]],Hb=he("FileChartColumn",xw);/**
|
|
215
|
+
* @license lucide-react v0.475.0 - ISC
|
|
216
|
+
*
|
|
217
|
+
* This source code is licensed under the ISC license.
|
|
218
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
+
*/const gw=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]],di=he("FileCode2",gw);/**
|
|
220
|
+
* @license lucide-react v0.475.0 - ISC
|
|
221
|
+
*
|
|
222
|
+
* This source code is licensed under the ISC license.
|
|
223
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
+
*/const yw=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Dr=he("FileCode",yw);/**
|
|
225
|
+
* @license lucide-react v0.475.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*/const bw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],vw=he("FileDiff",bw);/**
|
|
230
|
+
* @license lucide-react v0.475.0 - ISC
|
|
231
|
+
*
|
|
232
|
+
* This source code is licensed under the ISC license.
|
|
233
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
+
*/const Nw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],jw=he("FileJson",Nw);/**
|
|
235
|
+
* @license lucide-react v0.475.0 - ISC
|
|
236
|
+
*
|
|
237
|
+
* This source code is licensed under the ISC license.
|
|
238
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
+
*/const ww=[["path",{d:"M21 7h-3a2 2 0 0 1-2-2V2",key:"9rb54x"}],["path",{d:"M21 6v6.5c0 .8-.7 1.5-1.5 1.5h-7c-.8 0-1.5-.7-1.5-1.5v-9c0-.8.7-1.5 1.5-1.5H17Z",key:"1059l0"}],["path",{d:"M7 8v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H15",key:"16874u"}],["path",{d:"M3 12v8.8c0 .3.2.6.4.8.2.2.5.4.8.4H11",key:"k2ox98"}]],_w=he("FileStack",ww);/**
|
|
240
|
+
* @license lucide-react v0.475.0 - ISC
|
|
241
|
+
*
|
|
242
|
+
* This source code is licensed under the ISC license.
|
|
243
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
+
*/const Sw=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],kw=he("FileX",Sw);/**
|
|
245
|
+
* @license lucide-react v0.475.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const Cw=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Rm=he("Filter",Cw);/**
|
|
250
|
+
* @license lucide-react v0.475.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* This source code is licensed under the ISC license.
|
|
253
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
254
|
+
*/const Tw=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],Ew=he("FlaskConical",Tw);/**
|
|
255
|
+
* @license lucide-react v0.475.0 - ISC
|
|
256
|
+
*
|
|
257
|
+
* This source code is licensed under the ISC license.
|
|
258
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
259
|
+
*/const Aw=[["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],Mw=he("FolderGit2",Aw);/**
|
|
260
|
+
* @license lucide-react v0.475.0 - ISC
|
|
261
|
+
*
|
|
262
|
+
* This source code is licensed under the ISC license.
|
|
263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
264
|
+
*/const Rw=[["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"}]],um=he("FolderOpen",Rw);/**
|
|
265
|
+
* @license lucide-react v0.475.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*/const Dw=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],Ow=he("FolderTree",Dw);/**
|
|
270
|
+
* @license lucide-react v0.475.0 - ISC
|
|
271
|
+
*
|
|
272
|
+
* This source code is licensed under the ISC license.
|
|
273
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
274
|
+
*/const Lw=[["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"}]],fm=he("Folder",Lw);/**
|
|
275
|
+
* @license lucide-react v0.475.0 - ISC
|
|
276
|
+
*
|
|
277
|
+
* This source code is licensed under the ISC license.
|
|
278
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
+
*/const zw=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Hw=he("Gauge",zw);/**
|
|
280
|
+
* @license lucide-react v0.475.0 - ISC
|
|
281
|
+
*
|
|
282
|
+
* This source code is licensed under the ISC license.
|
|
283
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
284
|
+
*/const Uw=[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]],Bw=he("Ghost",Uw);/**
|
|
285
|
+
* @license lucide-react v0.475.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/const $w=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],$c=he("GitBranch",$w);/**
|
|
290
|
+
* @license lucide-react v0.475.0 - ISC
|
|
291
|
+
*
|
|
292
|
+
* This source code is licensed under the ISC license.
|
|
293
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
294
|
+
*/const qw=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Or=he("GitCommitHorizontal",qw);/**
|
|
295
|
+
* @license lucide-react v0.475.0 - ISC
|
|
296
|
+
*
|
|
297
|
+
* This source code is licensed under the ISC license.
|
|
298
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
299
|
+
*/const Gw=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]],Lr=he("GitCompare",Gw);/**
|
|
300
|
+
* @license lucide-react v0.475.0 - ISC
|
|
301
|
+
*
|
|
302
|
+
* This source code is licensed under the ISC license.
|
|
303
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
304
|
+
*/const Vw=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],Ub=he("Github",Vw);/**
|
|
305
|
+
* @license lucide-react v0.475.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*/const Yw=[["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"}]],Bb=he("Globe",Yw);/**
|
|
310
|
+
* @license lucide-react v0.475.0 - ISC
|
|
311
|
+
*
|
|
312
|
+
* This source code is licensed under the ISC license.
|
|
313
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
314
|
+
*/const Fw=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],$b=he("History",Fw);/**
|
|
315
|
+
* @license lucide-react v0.475.0 - ISC
|
|
316
|
+
*
|
|
317
|
+
* This source code is licensed under the ISC license.
|
|
318
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
319
|
+
*/const Iw=[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]],Kw=he("Languages",Iw);/**
|
|
320
|
+
* @license lucide-react v0.475.0 - ISC
|
|
321
|
+
*
|
|
322
|
+
* This source code is licensed under the ISC license.
|
|
323
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
324
|
+
*/const Xw=[["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"}]],cn=he("Layers",Xw);/**
|
|
325
|
+
* @license lucide-react v0.475.0 - ISC
|
|
326
|
+
*
|
|
327
|
+
* This source code is licensed under the ISC license.
|
|
328
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
329
|
+
*/const Qw=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Zw=he("Map",Qw);/**
|
|
330
|
+
* @license lucide-react v0.475.0 - ISC
|
|
331
|
+
*
|
|
332
|
+
* This source code is licensed under the ISC license.
|
|
333
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
334
|
+
*/const Pw=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Jw=he("Moon",Pw);/**
|
|
335
|
+
* @license lucide-react v0.475.0 - ISC
|
|
336
|
+
*
|
|
337
|
+
* This source code is licensed under the ISC license.
|
|
338
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
339
|
+
*/const Ww=[["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"}]],zr=he("Network",Ww);/**
|
|
340
|
+
* @license lucide-react v0.475.0 - ISC
|
|
341
|
+
*
|
|
342
|
+
* This source code is licensed under the ISC license.
|
|
343
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
344
|
+
*/const e_=[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],qb=he("OctagonAlert",e_);/**
|
|
345
|
+
* @license lucide-react v0.475.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*/const t_=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 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.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],n_=he("Package",t_);/**
|
|
350
|
+
* @license lucide-react v0.475.0 - ISC
|
|
351
|
+
*
|
|
352
|
+
* This source code is licensed under the ISC license.
|
|
353
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
354
|
+
*/const a_=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],s_=he("Pause",a_);/**
|
|
355
|
+
* @license lucide-react v0.475.0 - ISC
|
|
356
|
+
*
|
|
357
|
+
* This source code is licensed under the ISC license.
|
|
358
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
359
|
+
*/const i_=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],qc=he("Play",i_);/**
|
|
360
|
+
* @license lucide-react v0.475.0 - ISC
|
|
361
|
+
*
|
|
362
|
+
* This source code is licensed under the ISC license.
|
|
363
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
364
|
+
*/const l_=[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]],mm=he("Radio",l_);/**
|
|
365
|
+
* @license lucide-react v0.475.0 - ISC
|
|
366
|
+
*
|
|
367
|
+
* This source code is licensed under the ISC license.
|
|
368
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
369
|
+
*/const r_=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],ml=he("RefreshCcw",r_);/**
|
|
370
|
+
* @license lucide-react v0.475.0 - ISC
|
|
371
|
+
*
|
|
372
|
+
* This source code is licensed under the ISC license.
|
|
373
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
374
|
+
*/const o_=[["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"}]],bn=he("RefreshCw",o_);/**
|
|
375
|
+
* @license lucide-react v0.475.0 - ISC
|
|
376
|
+
*
|
|
377
|
+
* This source code is licensed under the ISC license.
|
|
378
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
+
*/const c_=[["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"}]],Hr=he("RotateCcw",c_);/**
|
|
380
|
+
* @license lucide-react v0.475.0 - ISC
|
|
381
|
+
*
|
|
382
|
+
* This source code is licensed under the ISC license.
|
|
383
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
384
|
+
*/const d_=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ra=he("Search",d_);/**
|
|
385
|
+
* @license lucide-react v0.475.0 - ISC
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the ISC license.
|
|
388
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
+
*/const u_=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],My=he("Settings2",u_);/**
|
|
390
|
+
* @license lucide-react v0.475.0 - ISC
|
|
391
|
+
*
|
|
392
|
+
* This source code is licensed under the ISC license.
|
|
393
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
394
|
+
*/const f_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],vl=he("ShieldAlert",f_);/**
|
|
395
|
+
* @license lucide-react v0.475.0 - ISC
|
|
396
|
+
*
|
|
397
|
+
* This source code is licensed under the ISC license.
|
|
398
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
399
|
+
*/const m_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Gt=he("ShieldCheck",m_);/**
|
|
400
|
+
* @license lucide-react v0.475.0 - ISC
|
|
401
|
+
*
|
|
402
|
+
* This source code is licensed under the ISC license.
|
|
403
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
404
|
+
*/const h_=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Dm=he("Shield",h_);/**
|
|
405
|
+
* @license lucide-react v0.475.0 - ISC
|
|
406
|
+
*
|
|
407
|
+
* This source code is licensed under the ISC license.
|
|
408
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
409
|
+
*/const p_=[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]],x_=he("SlidersHorizontal",p_);/**
|
|
410
|
+
* @license lucide-react v0.475.0 - ISC
|
|
411
|
+
*
|
|
412
|
+
* This source code is licensed under the ISC license.
|
|
413
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
414
|
+
*/const g_=[["line",{x1:"4",x2:"4",y1:"21",y2:"14",key:"1p332r"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3",key:"gb41h5"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12",key:"hf2csr"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3",key:"1kfi7u"}],["line",{x1:"20",x2:"20",y1:"21",y2:"16",key:"1lhrwl"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3",key:"16vvfq"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14",key:"1uebub"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8",key:"1yglbp"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16",key:"1jxqpz"}]],y_=he("SlidersVertical",g_);/**
|
|
415
|
+
* @license lucide-react v0.475.0 - ISC
|
|
416
|
+
*
|
|
417
|
+
* This source code is licensed under the ISC license.
|
|
418
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
419
|
+
*/const b_=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],Et=he("Sparkles",b_);/**
|
|
420
|
+
* @license lucide-react v0.475.0 - ISC
|
|
421
|
+
*
|
|
422
|
+
* This source code is licensed under the ISC license.
|
|
423
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
424
|
+
*/const v_=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],hm=he("Split",v_);/**
|
|
425
|
+
* @license lucide-react v0.475.0 - ISC
|
|
426
|
+
*
|
|
427
|
+
* This source code is licensed under the ISC license.
|
|
428
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
429
|
+
*/const N_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Gb=he("Square",N_);/**
|
|
430
|
+
* @license lucide-react v0.475.0 - ISC
|
|
431
|
+
*
|
|
432
|
+
* This source code is licensed under the ISC license.
|
|
433
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
434
|
+
*/const j_=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],Vb=he("Sun",j_);/**
|
|
435
|
+
* @license lucide-react v0.475.0 - ISC
|
|
436
|
+
*
|
|
437
|
+
* This source code is licensed under the ISC license.
|
|
438
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
439
|
+
*/const w_=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],__=he("Trash2",w_);/**
|
|
440
|
+
* @license lucide-react v0.475.0 - ISC
|
|
441
|
+
*
|
|
442
|
+
* This source code is licensed under the ISC license.
|
|
443
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
444
|
+
*/const S_=[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]],Yb=he("TrendingDown",S_);/**
|
|
445
|
+
* @license lucide-react v0.475.0 - ISC
|
|
446
|
+
*
|
|
447
|
+
* This source code is licensed under the ISC license.
|
|
448
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
449
|
+
*/const k_=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Fb=he("TrendingUp",k_);/**
|
|
450
|
+
* @license lucide-react v0.475.0 - ISC
|
|
451
|
+
*
|
|
452
|
+
* This source code is licensed under the ISC license.
|
|
453
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
454
|
+
*/const C_=[["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"}]],Jt=he("TriangleAlert",C_);/**
|
|
455
|
+
* @license lucide-react v0.475.0 - ISC
|
|
456
|
+
*
|
|
457
|
+
* This source code is licensed under the ISC license.
|
|
458
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
459
|
+
*/const T_=[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]],E_=he("Unlink",T_);/**
|
|
460
|
+
* @license lucide-react v0.475.0 - ISC
|
|
461
|
+
*
|
|
462
|
+
* This source code is licensed under the ISC license.
|
|
463
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
464
|
+
*/const A_=[["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"}]],Ry=he("User",A_);/**
|
|
465
|
+
* @license lucide-react v0.475.0 - ISC
|
|
466
|
+
*
|
|
467
|
+
* This source code is licensed under the ISC license.
|
|
468
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
469
|
+
*/const M_=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],R_=he("WifiOff",M_);/**
|
|
470
|
+
* @license lucide-react v0.475.0 - ISC
|
|
471
|
+
*
|
|
472
|
+
* This source code is licensed under the ISC license.
|
|
473
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
474
|
+
*/const D_=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],O_=he("Wifi",D_);/**
|
|
475
|
+
* @license lucide-react v0.475.0 - ISC
|
|
476
|
+
*
|
|
477
|
+
* This source code is licensed under the ISC license.
|
|
478
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
479
|
+
*/const L_=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],z_=he("Workflow",L_);/**
|
|
480
|
+
* @license lucide-react v0.475.0 - ISC
|
|
481
|
+
*
|
|
482
|
+
* This source code is licensed under the ISC license.
|
|
483
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
484
|
+
*/const H_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gr=he("X",H_);/**
|
|
485
|
+
* @license lucide-react v0.475.0 - ISC
|
|
486
|
+
*
|
|
487
|
+
* This source code is licensed under the ISC license.
|
|
488
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
489
|
+
*/const U_=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],B_=he("Zap",U_),we="/api";class td extends Error{constructor(r,o,c){super(o);Bf(this,"code");Bf(this,"status");this.name="ApiError",this.code=r,this.status=c}}async function ke(s){if(!s.ok){let i="HTTP_ERROR",r=`Request failed with status ${s.status}`;try{const o=await s.json();o!=null&&o.detail&&typeof o.detail=="object"?(i=o.detail.code||i,r=o.detail.message||r):typeof(o==null?void 0:o.detail)=="string"&&(r=o.detail)}catch{}throw new td(i,r,s.status)}return s.json()}async function $_(){const s=await fetch(`${we}/health`);return ke(s)}async function q_(s){const i=await fetch(`${we}/jobs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function G_(s){const i=await fetch(`${we}/jobs/${encodeURIComponent(s)}`);return ke(i)}async function V_(s){const i=await fetch(`${we}/jobs/${encodeURIComponent(s)}/cancel`,{method:"POST"});return ke(i)}async function Y_(s){const i=await fetch(`${we}/jobs/${encodeURIComponent(s)}/result`);return ke(i)}async function Dy(s,i){let c=0;for(;;)try{return await Y_(s)}catch(f){if(!(f instanceof td&&(f.status===409||f.code==="RESULT_NOT_READY"))||c>=5)throw f;const h=80*Math.pow(2,c);c+=1,await new Promise(p=>window.setTimeout(p,h))}}async function F_(s){const i=s?`?path=${encodeURIComponent(s)}`:"",r=await fetch(`${we}/fs/browse${i}`);return ke(r)}function il(s,i){return`${we}/analyses/${encodeURIComponent(s)}/export/${i}`}async function I_(s,i=150){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/passport?max_modules=${i}`);return ke(r)}async function K_(s="."){try{const i=await fetch(`${we}/contract?path=${encodeURIComponent(s)}`);return i.status===404?null:await ke(i)}catch(i){if(i instanceof td&&i.status===404)return null;throw i}}async function X_(s){const i=await fetch(`${we}/guardian/assess`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function Q_(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function Z_(s,i){const r=new URLSearchParams;i!=null&&i.name&&r.set("name",i.name),i!=null&&i.kind&&r.set("kind",i.kind),i!=null&&i.language&&r.set("language",i.language),i!=null&&i.file_path&&r.set("file_path",i.file_path),i!=null&&i.container&&r.set("container",i.container),r.set("limit",String(i.limit));const o=r.toString()?`?${r.toString()}`:"",c=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/symbols${o}`);return ke(c)}async function P_(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/symbols/${encodeURIComponent(i)}/trace`);return ke(r)}async function J_(s,i){const r=new URLSearchParams;i!=null&&i.evidence_id&&r.set("evidence_id",i.evidence_id),i!=null&&i.file_path&&r.set("file_path",i.file_path),i!=null&&i.symbol_name&&r.set("symbol_name",i.symbol_name),i!=null&&i.evidence_type&&r.set("evidence_type",i.evidence_type),r.set("check_staleness",String(i.check_staleness)),r.set("limit",String(i.limit));const o=r.toString()?`?${r.toString()}`:"",c=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/evidence${o}`);return ke(c)}async function W_(s,i,r=!0){const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/evidence/${encodeURIComponent(i)}?check_staleness=${r}`);return ke(o)}async function eS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/brain/context`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function tS(s,i=150){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/passport/v2?max_modules=${i}`);return ke(r)}async function nS(s){const i=await fetch(`${we}/passport/migrate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({manifest_json:s})});return ke(i)}async function aS(s,i=50,r=0){const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/history/commits?limit=${i}&offset=${r}`);return ke(o)}async function sS(s,i,r=!0){const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/history/snapshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({commit_sha:i,use_cache:r})});return ke(o)}async function iS(s,i,r){const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/history/diff`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({base_commit_sha:i,head_commit_sha:r})});return ke(o)}async function lS(s,i=30,r){const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/history/timeline`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({limit:i,commits:r})});return ke(o)}async function rS(s,i,r,o,c=1,f=50){const m=new URLSearchParams({commit_sha:r,file_path:o,line_start:String(c),line_end:String(f)}),h=await fetch(`${we}/analyses/${encodeURIComponent(s)}/history/evidence/${encodeURIComponent(i)}?${m.toString()}`);return ke(h)}async function oS(s,i,r){const o=new URLSearchParams;i&&o.set("category",i),r&&o.set("min_severity",r);const c=o.toString()?`?${o.toString()}`:"",f=await fetch(`${we}/analyses/${encodeURIComponent(s)}/advisor${c}`);return ke(f)}async function Oy(){const s=await fetch(`${we}/cache/stats`);return ke(s)}async function cS(s){const i=await fetch(`${we}/cache/clear`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});return ke(i)}async function dS(s){const i=await fetch(`${we}/live/sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function uS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}`);return ke(i)}async function fS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/snapshot`);return ke(i)}async function mS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/pause`,{method:"POST"});return ke(i)}async function hS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/resume`,{method:"POST"});return ke(i)}async function pS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/reconcile`,{method:"POST"});return ke(i)}async function xS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}`,{method:"DELETE"});return ke(i)}async function gS(s,i=50){const r=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/history?limit=${i}`);return ke(r)}async function yS(s){const i=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/history`,{method:"DELETE"});return ke(i)}async function bS(s,i){const o=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/alerts`);return ke(o)}async function vS(s,i){const r=await fetch(`${we}/live/sessions/${encodeURIComponent(s)}/alerts/${encodeURIComponent(i)}/acknowledge`,{method:"POST"});return ke(r)}function NS(s,i){const r=i?`?last_event_id=${encodeURIComponent(i)}`:"";return`${we}/live/sessions/${encodeURIComponent(s)}/events${r}`}async function jS(s,i=!0){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/quality?use_cache=${i?"true":"false"}`);return ke(r)}function wS(s){return`${we}/analyses/${encodeURIComponent(s)}/quality?format=sarif`}async function Ib(s,i={}){const r=new URLSearchParams;Object.entries(i).forEach(([c,f])=>{f!==void 0&&f!==""&&r.set(c,String(f))});const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/findings?${r.toString()}`);return ke(o)}async function _S(s,i={}){const r=new URLSearchParams;Object.entries(i).forEach(([c,f])=>{f!==void 0&&f!==""&&r.set(c,String(f))});const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/complexity?${r.toString()}`);return ke(o)}async function SS(s,i={}){const r=new URLSearchParams;Object.entries(i).forEach(([c,f])=>{f!==void 0&&f!==""&&r.set(c,String(f))});const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/duplicates?${r.toString()}`);return ke(o)}async function kS(s,i={}){const r=new URLSearchParams;Object.entries(i).forEach(([c,f])=>{f!==void 0&&f!==""&&r.set(c,String(f))});const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/unused-code?${r.toString()}`);return ke(o)}async function CS(s,i={}){const r=new URLSearchParams;Object.entries(i).forEach(([c,f])=>{f!==void 0&&f!==""&&r.set(c,String(f))});const o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/test-map?${r.toString()}`);return ke(o)}async function TS(s,i){const r=i?`?base_analysis_id=${encodeURIComponent(i)}`:"",o=await fetch(`${we}/analyses/${encodeURIComponent(s)}/symbol-impact${r}`);return ke(o)}async function ES(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/context`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function AS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/map`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function MS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/expand`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function RS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/preflight`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function DS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/inspect-patch`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({patch_text:i})});return ke(r)}async function OS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/postflight`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return ke(r)}async function LS(s,i){const r=await fetch(`${we}/analyses/${encodeURIComponent(s)}/agent/evidence/${encodeURIComponent(i)}`);return ke(r)}async function zS(){const s=await fetch(`${we}/agent/diagnostics`);return ke(s)}async function HS(s){const i=await fetch(`${we}/workspaces/analyze`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function US(s){const i=await fetch(`${we}/workspaces/impact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function BS(s){const i=await fetch(`${we}/workspaces/context`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});return ke(i)}async function $S(s){const i=await fetch(`${we}/workspaces/${encodeURIComponent(s)}/freshness`);return ke(i)}function Kb(){try{if(typeof window<"u"&&window.localStorage)return window.localStorage}catch{}return null}function Ta(s,i,r){try{const o=Kb();if(!o)return i;const c=o.getItem(`repodna.${s}`);if(c===null)return i;const f=JSON.parse(c);return r(f)?f:i}catch{return i}}function yn(s,i){try{const r=Kb();if(!r)return;r.setItem(`repodna.${s}`,JSON.stringify(i))}catch{}}const qS=({isOpen:s,onClose:i,files:r,onSelectFile:o,onSwitchTab:c,onToggleTheme:f,onChangeLayout:m,onChangeGrouping:h,onChangeDensity:p,onToggleCyclesOnly:v,onResetFilters:y,onExportReport:g,onLoadDemo:b,workstationMode:N="simple",onToggleMode:j,onToggleLanguage:T,onOpenTour:H})=>{const{t:_,i18n:K}=ft(),z=E.useRef(null),D=E.useRef(null),[O,U]=E.useState(()=>Ta("recentCommands",[],R=>Array.isArray(R)&&R.every(A=>typeof A=="string"))),[q,C]=E.useState(""),[F,G]=E.useState(0);E.useEffect(()=>{const R=z.current;R&&(s&&!R.open?(C(""),G(0),R.showModal(),window.setTimeout(()=>{var A;R.open&&((A=D.current)==null||A.focus())},20)):!s&&R.open&&(R.close(),window.requestAnimationFrame(()=>{const A=document.querySelector('[data-testid="open-command-palette-btn"]');A==null||A.focus()})))},[s]),E.useEffect(()=>{const R=z.current;if(!R)return;const A=()=>{R.open||(R.returnValue="",i(),window.requestAnimationFrame(()=>{const B=document.querySelector('[data-testid="open-command-palette-btn"]');B==null||B.focus()}))};R.addEventListener("close",A);let V=null;return"closedBy"in HTMLDialogElement.prototype||(V=B=>{if(B.target!==R)return;const P=R.getBoundingClientRect();P.top<=B.clientY&&B.clientY<=P.top+P.height&&P.left<=B.clientX&&B.clientX<=P.left+P.width||R.close()},R.addEventListener("click",V)),()=>{R.removeEventListener("close",A),V&&R.removeEventListener("click",V)}},[i]);const Y=E.useMemo(()=>{const R=_("palette.categoryNavigation"),A=_("palette.categoryGraph"),V=_("palette.categoryModules"),B=[{id:"act-studio",category:R,title:_("palette.actStudioTitle"),subtitle:_("palette.actStudioSub"),icon:n.jsx(di,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"View",onRun:()=>{c("studio"),i()}},{id:"act-report",category:R,title:_("palette.actReportTitle"),subtitle:_("palette.actReportSub"),icon:n.jsx(Gt,{className:"w-4 h-4 text-success","aria-hidden":"true"}),badge:"View",onRun:()=>{c("report"),i()}},{id:"act-history",category:R,title:_("palette.actHistoryTitle","Switch to Architecture Time Machine"),subtitle:_("palette.actHistorySub","Explore commit history, timeline scrubber, and evolution diff"),icon:n.jsx($b,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"View",onRun:()=>{c("history"),i()}},{id:"act-advisor",category:R,title:_("palette.actAdvisorTitle","Switch to Refactoring Advisor"),subtitle:_("palette.actAdvisorSub","Explore deterministic refactoring advice for cycles, coupling, and hubs"),icon:n.jsx(Et,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"View",onRun:()=>{c("advisor"),i()}},{id:"act-theme",category:R,title:_("palette.actThemeTitle"),subtitle:_("palette.actThemeSub"),icon:n.jsx(Vb,{className:"w-4 h-4 text-warning","aria-hidden":"true"}),badge:"Theme",onRun:()=>{f(),i()}},{id:"act-mode",category:R,title:_("palette.actModeTitle"),subtitle:_("palette.actModeSub",{mode:N}),icon:n.jsx(y_,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Mode",onRun:()=>{j==null||j(),i()}},{id:"act-lang",category:R,title:_("palette.actLangTitle"),subtitle:_("palette.actLangSub",{lang:K.language.startsWith("tr")?"Türkçe":"English"}),icon:n.jsx(Kw,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Lang",onRun:()=>{T==null||T(),i()}},{id:"act-tour",category:R,title:_("palette.actTourTitle"),subtitle:_("palette.actTourSub"),icon:n.jsx(Mm,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Guide",onRun:()=>{H==null||H(),i()}},{id:"act-demo",category:R,title:_("palette.actDemoTitle"),subtitle:_("palette.actDemoSub"),icon:n.jsx(Et,{className:"w-4 h-4 text-warning","aria-hidden":"true"}),badge:"Scan",onRun:()=>{b(),i()}},{id:"grp-dirs",category:A,title:_("palette.grpDirsTitle"),subtitle:_("palette.grpDirsSub"),icon:n.jsx(Ow,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Cluster",onRun:()=>{h("directories"),c("studio"),i()}},{id:"grp-files",category:A,title:_("palette.grpFilesTitle"),subtitle:_("palette.grpFilesSub"),icon:n.jsx(cn,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Modules",onRun:()=>{h("files"),c("studio"),i()}},{id:"layout-layered",category:A,title:_("palette.layoutLayeredTitle"),subtitle:_("palette.layoutLayeredSub"),icon:n.jsx(cn,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Layout",onRun:()=>{m("layered"),c("studio"),i()}},{id:"density-compact",category:A,title:_("palette.densityCompactTitle"),subtitle:_("palette.densityCompactSub"),icon:n.jsx(x_,{className:"w-4 h-4 text-muted","aria-hidden":"true"}),badge:"Density",onRun:()=>{p("compact"),c("studio"),i()}},{id:"flt-cycles",category:A,title:_("palette.fltCyclesTitle"),subtitle:_("palette.fltCyclesSub"),icon:n.jsx(ml,{className:"w-4 h-4 text-danger","aria-hidden":"true"}),badge:"Filter",onRun:()=>{v(),c("studio"),i()}},{id:"flt-reset",category:A,title:_("palette.fltResetTitle"),subtitle:_("palette.fltResetSub"),icon:n.jsx(ml,{className:"w-4 h-4 text-muted","aria-hidden":"true"}),badge:"Reset",onRun:()=>{y(),i()}},{id:"exp-json",category:R,title:_("palette.expJsonTitle"),subtitle:_("palette.expJsonSub"),icon:n.jsx(zn,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),badge:"Export",onRun:()=>{g==null||g("json"),i()}},{id:"exp-html",category:R,title:_("palette.expHtmlTitle"),subtitle:_("palette.expHtmlSub"),icon:n.jsx(zn,{className:"w-4 h-4 text-success","aria-hidden":"true"}),badge:"Export",onRun:()=>{g==null||g("html"),i()}}],P=r.slice(0,100).map(te=>({id:`file-${te.id}`,category:V,title:te.id,subtitle:`${te.language} · ${te.lines_code} LOC · ${te.support_level}${te.in_cycle?" · IN CYCLE":""}`,icon:n.jsx("span",{className:`w-2 h-2 rounded-full ${te.in_cycle?"bg-danger":"bg-accent"}`,"aria-hidden":"true"}),badge:te.language,onRun:()=>{o(te.id),c("studio"),i()}}));return[...B,...P]},[r,o,c,f,m,h,p,v,y,g,b,j,T,H,N,K.language,_,i]),I=E.useMemo(()=>{const R=q.trim().toLowerCase(),A=new Map(Y.map(V=>[V.id,V]));if(!R){const V=O.map(P=>A.get(P)).filter(P=>!!P).map(P=>({...P,category:"Navigation & Actions",isRecent:!0})),B=Y.filter(P=>!O.includes(P.id));return[...V,...B]}return Y.filter(V=>{const B=V.title.toLowerCase().includes(R),P=V.subtitle.toLowerCase().includes(R),te=V.id.toLowerCase().includes(R);return B||P||te}).sort((V,B)=>{const P=V.title.toLowerCase(),te=B.title.toLowerCase();return P.startsWith(R)&&!te.startsWith(R)?-1:!P.startsWith(R)&&te.startsWith(R)?1:0})},[Y,q,O]);E.useEffect(()=>{G(0)},[q]);const W=R=>{var A;U(V=>{const B=[R.id,...V.filter(P=>P!==R.id)].slice(0,5);return yn("recentCommands",B),B}),(A=z.current)==null||A.close(),i(),R.onRun(),window.setTimeout(()=>{if(typeof document<"u"){const V=document.querySelector('[data-testid="open-command-palette-btn"]');V==null||V.focus()}},50)},w=R=>{R.key==="ArrowDown"?(R.preventDefault(),G(A=>A<I.length-1?A+1:0)):R.key==="ArrowUp"?(R.preventDefault(),G(A=>A>0?A-1:I.length-1)):R.key==="Enter"?(R.preventDefault(),I[F]&&W(I[F])):R.key==="Escape"&&(R.preventDefault(),R.stopPropagation(),i())};return s?n.jsx("dialog",{ref:z,"aria-label":"Command Palette","data-testid":"command-palette-dialog",className:"backdrop:bg-black/60 rounded-xl bg-canvas border border-line p-0 text-ink max-w-xl w-full shadow-2xl overflow-hidden m-auto",children:n.jsxs("div",{className:"flex flex-col max-h-[75vh]",children:[n.jsxs("div",{className:"p-3 border-b border-line flex items-center gap-2.5 bg-panel",children:[n.jsx(zb,{className:"w-4 h-4 text-accent shrink-0","aria-hidden":"true"}),n.jsx("input",{ref:D,"data-testid":"command-palette-input",type:"text",role:"combobox","aria-expanded":I.length>0,"aria-controls":"command-palette-list","aria-activedescendant":I[F]?`command-option-${F}`:void 0,"aria-label":_("palette.searchPlaceholder"),value:q,onChange:R=>C(R.target.value),onKeyDown:w,placeholder:_("palette.searchPlaceholder"),className:"flex-1 bg-transparent border-0 text-sm font-medium text-ink placeholder:text-muted focus:outline-none"}),q&&n.jsx("button",{type:"button",onClick:()=>C(""),className:"p-1 rounded text-muted hover:text-ink cursor-pointer",children:n.jsx(Gr,{className:"w-3.5 h-3.5","aria-hidden":"true"})})]}),n.jsx("div",{id:"command-palette-list",role:"listbox",tabIndex:-1,className:"flex-1 overflow-y-auto p-2 space-y-1 text-xs",children:I.length===0?n.jsx("div",{className:"p-8 text-center text-muted",children:"No matching commands or modules found."}):I.map((R,A)=>{const V=A===F,B=!q&&O.includes(R.id);return n.jsxs("div",{id:`command-option-${A}`,role:"option","aria-selected":V,onMouseEnter:()=>G(A),onClick:()=>W(R),className:`p-2.5 rounded-lg flex items-center justify-between gap-3 cursor-pointer transition ${V?"bg-accent/15 border border-accent/40":"hover:bg-raised"}`,children:[n.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[n.jsx("div",{className:"p-1.5 rounded bg-panel border border-line shrink-0",children:R.icon}),n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"text-xs font-semibold text-ink flex items-center gap-1.5 truncate",children:[B&&n.jsx("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-accent/20 text-accent font-bold uppercase",children:"Recent"}),n.jsx("span",{className:"truncate",children:R.title})]}),n.jsx("div",{className:"text-[11px] text-muted truncate mt-0.5 font-mono",children:R.subtitle})]})]}),R.badge&&n.jsx("span",{className:"text-[10px] px-2 py-0.5 rounded font-mono font-semibold bg-panel border border-line text-muted uppercase shrink-0",children:R.badge})]},`${R.id}-${A}`)})}),n.jsxs("div",{className:"px-3 py-2 border-t border-line bg-panel flex items-center justify-between text-[11px] text-muted",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{children:[n.jsx("kbd",{className:"px-1 py-0.5 rounded bg-raised border border-line font-mono",children:"↑"})," ",n.jsx("kbd",{className:"px-1 py-0.5 rounded bg-raised border border-line font-mono",children:"↓"})," ","to navigate"]}),n.jsxs("span",{children:[n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-raised border border-line font-mono",children:"Enter"})," ","to select"]})]}),n.jsxs("span",{children:[n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-raised border border-line font-mono",children:"Esc"})," ","to close"]})]})]})}):null},GS=({result:s,defaultWorkspacePath:i})=>{const{t:r}=ft(),[o,c]=E.useState(null),[f,m]=E.useState(!1),[h,p]=E.useState(null),v=(s==null?void 0:s.target_display)||i||".",y=E.useCallback(async()=>{m(!0),p(null);try{const g=await K_(v);c(g)}catch(g){const b=g instanceof Error?g.message:String(g);p(b)}finally{m(!1)}},[v]);return E.useEffect(()=>{y()},[y]),n.jsxs("div",{className:"h-full flex flex-col overflow-y-auto bg-canvas text-ink p-4 sm:p-6 space-y-6",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-line",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Dm,{className:"w-5 h-5 text-accent","aria-hidden":"true"}),n.jsx("h1",{className:"text-lg font-bold tracking-tight",children:r("contract.title","Architecture Contract Inspector")})]}),n.jsx("p",{className:"text-xs text-muted mt-1",children:r("contract.subtitle","Declarative boundary policy rules defined in .repodna/architecture.yml for structural integrity.")})]}),n.jsxs("button",{type:"button",onClick:()=>void y(),disabled:f,className:"px-3 py-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1.5 cursor-pointer self-start sm:self-auto shadow-xs",children:[n.jsx(Hr,{className:`w-3.5 h-3.5 ${f?"animate-spin":""}`,"aria-hidden":"true"}),r("common.refresh","Refresh Contract")]})]}),h&&n.jsxs("div",{className:"p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-lg text-xs flex items-center gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:h})]}),f&&n.jsxs("div",{className:"p-8 text-center text-xs text-muted",children:[n.jsx(Hr,{className:"w-6 h-6 animate-spin mx-auto mb-2 text-accent"}),r("common.loading","Loading contract…")]}),!f&&!o&&!h&&n.jsxs("div",{className:"p-8 text-center bg-panel border border-line rounded-xl space-y-3",children:[n.jsx(Ob,{className:"w-10 h-10 text-muted mx-auto","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold",children:r("contract.notFoundTitle","No Architecture Contract Found")}),n.jsx("p",{className:"text-xs text-muted max-w-md mx-auto",children:r("contract.notFoundDesc","This repository does not have a .repodna/architecture.yml file yet. Initialize a starter policy to define layer boundaries and prohibited imports.")}),n.jsx("div",{className:"p-3 bg-raised rounded-lg border border-line max-w-sm mx-auto font-mono text-xs text-ink select-all",children:"repodna contract init"})]}),o&&n.jsxs("div",{className:"space-y-6",children:[n.jsx("div",{className:"p-4 bg-panel border border-line rounded-xl space-y-3",children:n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[n.jsxs("span",{className:"text-muted font-medium",children:[r("contract.policyMode","Policy Mode"),":"]}),n.jsx("span",{className:`px-2.5 py-0.5 rounded-full font-bold uppercase ${o.policy.mode==="enforce"?"bg-red-500/15 text-red-600 dark:text-red-400 border border-red-500/20":"bg-amber-500/15 text-amber-600 dark:text-amber-400 border border-amber-500/20"}`,children:o.policy.mode}),n.jsxs("span",{className:"text-muted ml-2",children:[r("contract.unknownBehavior","Unknown Handling"),":"," ",n.jsx("strong",{className:"text-ink",children:o.policy.unknown_behavior})]})]}),n.jsxs("div",{className:"text-xs text-muted",children:[r("contract.schemaVersion","Schema Version"),": ",n.jsxs("strong",{children:["v",o.version]})]})]})}),n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("h2",{className:"text-xs font-bold uppercase tracking-wider text-muted",children:[r("contract.declaredRules","Declared Boundary Rules")," (",o.rules.length,")"]})}),o.rules.map(g=>n.jsxs("div",{className:"p-4 bg-panel border border-line rounded-xl space-y-3 hover:border-accent/40 transition",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"px-2 py-0.5 rounded text-[11px] font-mono font-bold bg-raised border border-line text-ink",children:g.id}),n.jsx("h3",{className:"text-sm font-semibold text-ink",children:g.title})]}),n.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-bold uppercase self-start sm:self-auto ${g.severity==="critical"?"bg-red-500/15 text-red-600":g.severity==="warning"?"bg-amber-500/15 text-amber-600":"bg-blue-500/15 text-blue-600"}`,children:g.severity})]}),g.description&&n.jsx("p",{className:"text-xs text-muted",children:g.description}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 pt-2 text-xs",children:[n.jsxs("div",{className:"p-2.5 bg-raised rounded-lg border border-line space-y-1",children:[n.jsxs("span",{className:"text-[11px] font-semibold text-muted uppercase",children:[r("contract.fromPatterns","Source Files (from)"),":"]}),n.jsx("div",{className:"font-mono text-ink text-[11px] space-y-0.5",children:g.from.map((b,N)=>n.jsxs("div",{children:["• ",b]},N))})]}),n.jsxs("div",{className:"p-2.5 bg-raised rounded-lg border border-line space-y-1",children:[n.jsxs("span",{className:"text-[11px] font-semibold text-red-500 uppercase",children:[r("contract.disallowImports","Prohibited Imports"),":"]}),n.jsx("div",{className:"font-mono text-ink text-[11px] space-y-0.5",children:g.disallow_imports.length>0?g.disallow_imports.map((b,N)=>n.jsxs("div",{className:"text-red-600 dark:text-red-400",children:["• ",b]},N)):n.jsx("span",{className:"text-muted",children:"None"})})]})]}),g.remediation&&n.jsxs("div",{className:"text-xs text-muted bg-raised/50 p-2 rounded border border-line/50",children:[n.jsxs("strong",{className:"text-ink",children:[r("contract.remediation","Remediation"),":"]})," ",g.remediation]})]},g.id))]})]})]})},VS=({allFiles:s,filteredFiles:i,selectedFileId:r,onSelectFile:o,searchQuery:c,onSearchChange:f,languageFilter:m,onLanguageFilterChange:h,supportFilter:p,onSupportFilterChange:v,cyclesOnly:y,onCyclesOnlyChange:g,hubsOnly:b,onHubsOnlyChange:N,orphansOnly:j,onOrphansOnlyChange:T,onResetFilters:H})=>{const{t:_}=ft(),[K,z]=E.useState(new Set),D=E.useMemo(()=>{const C=new Set;for(const F of s)C.add(F.language);return Array.from(C).sort()},[s]),O=E.useMemo(()=>{const C=new Map;for(const F of i){const G=F.directory||"(root)",Y=C.get(G)??[];Y.push(F),C.set(G,Y)}return Array.from(C.entries()).sort((F,G)=>F[0].localeCompare(G[0]))},[i]),U=C=>{z(F=>{const G=new Set(F);return G.has(C)?G.delete(C):G.add(C),G})},q=c.trim()!==""||m!=="ALL"||p!=="ALL"||y||b||j;return n.jsxs("aside",{"aria-label":"Repository Explorer and Filters",className:"w-full lg:w-80 shrink-0 border-b lg:border-b-0 lg:border-r border-line bg-canvas flex flex-col max-h-[38vh] lg:max-h-none",children:[n.jsxs("div",{className:"p-3 border-b border-line flex flex-col gap-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("h2",{className:"text-xs font-bold tracking-wide text-muted m-0 flex items-center gap-1.5",children:[n.jsx(Rm,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),_("explorer.title")," (",i.length,"/",s.length,")"]}),q&&n.jsx("button",{type:"button",onClick:H,className:"text-[11px] text-accent hover:underline font-medium cursor-pointer",children:_("explorer.clearFilters")})]}),n.jsxs("div",{className:"relative",children:[n.jsx("label",{htmlFor:"explorer-search-input",className:"visually-hidden",children:"Filter modules by path or symbol name"}),n.jsx(Ra,{className:"w-3.5 h-3.5 text-muted absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none","aria-hidden":"true"}),n.jsx("input",{id:"explorer-search-input",type:"search",value:c,onChange:C=>f(C.target.value),placeholder:_("explorer.searchPlaceholder"),className:"w-full bg-panel border border-line rounded-lg pl-8 pr-2.5 py-1.5 text-xs text-ink placeholder:text-muted"})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-1.5 text-xs",children:[n.jsxs("div",{children:[n.jsx("label",{htmlFor:"filter-language-select",className:"visually-hidden",children:"Filter by Language"}),n.jsxs("select",{id:"filter-language-select",value:m,onChange:C=>h(C.target.value),className:"w-full bg-panel border border-line rounded-lg px-2 py-1 text-xs text-ink",children:[n.jsx("option",{value:"ALL",children:_("explorer.allLanguages")}),D.map(C=>n.jsx("option",{value:C,children:C},C))]})]}),n.jsxs("div",{children:[n.jsx("label",{htmlFor:"filter-support-select",className:"visually-hidden",children:"Filter by AST Support Level"}),n.jsxs("select",{id:"filter-support-select",value:p,onChange:C=>v(C.target.value),className:"w-full bg-panel border border-line rounded-lg px-2 py-1 text-xs text-ink",children:[n.jsx("option",{value:"ALL",children:_("explorer.allSupport")}),n.jsx("option",{value:"full_ast",children:"Full AST Only"}),n.jsx("option",{value:"partial_static",children:"Partial Static"}),n.jsx("option",{value:"unsupported",children:"Unsupported Only"})]})]})]}),n.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[n.jsxs("button",{type:"button",onClick:()=>g(!y),"aria-pressed":y,className:`px-2 py-1 rounded-md text-[11px] font-medium flex items-center gap-1 border cursor-pointer ${y?"bg-danger/20 text-danger border-danger/50":"bg-panel text-muted border-line hover:text-ink"}`,children:[n.jsx(ml,{className:"w-3 h-3","aria-hidden":"true"}),_("explorer.inCycleFilter")]}),n.jsxs("button",{type:"button",onClick:()=>N(!b),"aria-pressed":b,className:`px-2 py-1 rounded-md text-[11px] font-medium flex items-center gap-1 border cursor-pointer ${b?"bg-accent/20 text-accent border-accent/50":"bg-panel text-muted border-line hover:text-ink"}`,children:[n.jsx(Et,{className:"w-3 h-3","aria-hidden":"true"}),_("explorer.hubsFilter")]}),n.jsxs("button",{type:"button",onClick:()=>T(!j),"aria-pressed":j,className:`px-2 py-1 rounded-md text-[11px] font-medium flex items-center gap-1 border cursor-pointer ${j?"bg-warning/20 text-warning border-warning/50":"bg-panel text-muted border-line hover:text-ink"}`,children:[n.jsx(E_,{className:"w-3 h-3","aria-hidden":"true"}),_("explorer.orphansFilter")]})]})]}),n.jsx("div",{tabIndex:0,role:"region","aria-label":"Files list",className:"flex-1 overflow-y-auto p-2 space-y-1 text-xs",onKeyDown:C=>{if(C.key==="ArrowDown"||C.key==="ArrowUp"){const F=Array.from(C.currentTarget.querySelectorAll('[data-testid^="explorer-file-"]'));if(!F.length)return;const G=F.indexOf(document.activeElement);if(C.preventDefault(),C.key==="ArrowDown"){const Y=G<F.length-1?F[G+1]:F[0];Y==null||Y.focus()}else{const Y=G>0?F[G-1]:F[F.length-1];Y==null||Y.focus()}}},children:O.length===0?n.jsx("div",{className:"p-4 text-center text-muted text-xs",children:_("explorer.noResults")}):O.map(([C,F])=>{const G=K.has(C);return n.jsxs("div",{className:"explorer-directory",children:[n.jsxs("button",{type:"button",onClick:()=>U(C),className:"w-full flex items-center justify-between px-2 py-1.5 rounded-md hover:bg-raised text-muted text-xs font-medium cursor-pointer","aria-expanded":!G,children:[n.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[G?n.jsx(Mc,{className:"w-3.5 h-3.5 text-muted shrink-0"}):n.jsx(Lb,{className:"w-3.5 h-3.5 text-muted shrink-0"}),n.jsx(fm,{className:"w-3.5 h-3.5 text-accent shrink-0"}),n.jsx("span",{className:"font-mono text-ink truncate",children:C})]}),n.jsx("span",{className:"text-[10px] px-1.5 py-0.2 rounded bg-canvas border border-line text-muted",children:F.length})]}),!G&&n.jsx("div",{className:"pl-4 space-y-0.5 mt-0.5",children:F.map(Y=>{const I=r===Y.id,W=Y.in_cycle;return n.jsxs("button",{type:"button","data-testid":`explorer-file-${Y.id}`,onClick:()=>o(Y.id),className:`w-full flex items-center justify-between px-2 py-1 rounded-md text-left font-mono text-[11px] cursor-pointer transition ${I?"bg-accent/20 text-accent font-semibold border border-accent/40":"text-ink hover:bg-raised border border-transparent"}`,title:`${Y.id} (${Y.lines_code} LOC, ${Y.language})`,children:[n.jsxs("div",{className:"flex items-center gap-1.5 truncate min-w-0",children:[n.jsx(Dr,{className:`w-3 h-3 shrink-0 ${W?"text-danger":I?"text-accent":"text-muted"}`}),n.jsx("span",{className:"truncate",children:c&&Y.name.toLowerCase().includes(c.toLowerCase())?n.jsxs(n.Fragment,{children:[Y.name.slice(0,Y.name.toLowerCase().indexOf(c.toLowerCase())),n.jsx("mark",{children:Y.name.slice(Y.name.toLowerCase().indexOf(c.toLowerCase()),Y.name.toLowerCase().indexOf(c.toLowerCase())+c.length)}),Y.name.slice(Y.name.toLowerCase().indexOf(c.toLowerCase())+c.length)]}):Y.name})]}),n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 ml-1",children:[W&&n.jsx("span",{className:"text-[9px] px-1 py-0.2 rounded bg-danger/20 text-danger border border-danger/40 font-sans font-bold",children:"CYCLE"}),n.jsxs("span",{className:"text-[10px] text-muted",children:[Y.lines_code,"L"]})]})]},Y.id)})})]},C)})})]})},YS=({isOpen:s,initialPath:i,onClose:r,onSelectFolder:o})=>{const c=E.useRef(null),[f,m]=E.useState(null),[h,p]=E.useState(!1),[v,y]=E.useState(null);E.useEffect(()=>{const b=c.current;b&&(s&&!b.open?(b.showModal(),g(i||void 0)):!s&&b.open&&b.close())},[s,i]),E.useEffect(()=>{const b=c.current;if(!b)return;const N=()=>{b.returnValue="",r()};b.addEventListener("close",N);let j=null;return"closedBy"in HTMLDialogElement.prototype||(j=T=>{if(T.target!==b)return;const H=b.getBoundingClientRect();H.top<=T.clientY&&T.clientY<=H.top+H.height&&H.left<=T.clientX&&T.clientX<=H.left+H.width||b.close()},b.addEventListener("click",j)),()=>{b.removeEventListener("close",N),j&&b.removeEventListener("click",j)}},[r]);async function g(b){p(!0),y(null);try{const N=await F_(b);m(N)}catch(N){y(N instanceof Error?N.message:"Failed to list directory")}finally{p(!1)}}return n.jsx("dialog",{ref:c,closedby:"any","aria-labelledby":"folder-dialog-title",children:n.jsxs("div",{className:"p-5 flex flex-col gap-4",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-3",children:[n.jsxs("h2",{id:"folder-dialog-title",className:"text-base font-semibold flex items-center gap-2 m-0",children:[n.jsx(fm,{className:"w-5 h-5 text-accent","aria-hidden":"true"}),"Select Local Repository Directory"]}),n.jsx("button",{type:"button",onClick:()=>{var b;return(b=c.current)==null?void 0:b.close()},"aria-label":"Close folder browser",className:"p-1.5 rounded-lg hover:bg-raised text-muted hover:text-ink cursor-pointer",children:n.jsx(Gr,{className:"w-4 h-4","aria-hidden":"true"})})]}),n.jsxs("p",{className:"text-xs text-muted m-0",children:["RepoDNA never scans files until you explicitly confirm and click ",n.jsx("strong",{children:"Analyze Repository"}),"."]}),f&&n.jsxs("div",{className:"flex items-center justify-between gap-2 bg-panel border border-line rounded-lg px-3 py-2 text-xs font-mono",children:[n.jsx("span",{className:"truncate",title:f.current_path,children:f.current_path}),f.parent_path&&n.jsxs("button",{type:"button",onClick:()=>void g(f.parent_path),className:"flex items-center gap-1 px-2 py-1 rounded bg-raised hover:bg-raised text-ink shrink-0 cursor-pointer",children:[n.jsx(uw,{className:"w-3.5 h-3.5","aria-hidden":"true"}),"Up"]})]}),v&&n.jsx("div",{role:"alert",className:"text-xs text-danger bg-danger/10 border border-danger/60 rounded-lg p-3",children:v}),n.jsx("div",{className:"max-h-64 overflow-y-auto border border-line rounded-lg divide-y divide-line",children:h?n.jsx("div",{className:"p-6 text-center text-xs text-muted",children:"Loading subdirectories..."}):f&&f.directories.length>0?f.directories.map(b=>n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 hover:bg-raised text-xs",children:[n.jsxs("button",{type:"button",onClick:()=>void g(b.path),className:"flex items-center gap-2 text-left font-medium hover:text-accent truncate flex-1 cursor-pointer",children:[b.is_git_repo?n.jsx(Mw,{className:"w-4 h-4 text-success shrink-0","aria-hidden":"true"}):n.jsx(fm,{className:"w-4 h-4 text-muted shrink-0","aria-hidden":"true"}),n.jsx("span",{className:"truncate",children:b.name}),b.is_git_repo&&n.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded bg-success/15 text-success border border-success/30",children:".git"})]}),n.jsx("button",{type:"button",onClick:()=>{var N;o(b.path),(N=c.current)==null||N.close()},"aria-label":`Select folder ${b.name}`,className:"px-2.5 py-1 rounded bg-accent/20 hover:bg-accent/30 text-accent border border-accent/30 text-xs font-medium cursor-pointer",children:"Select"})]},b.path)):n.jsx("div",{className:"p-6 text-center text-xs text-muted",children:"No subdirectories found in this folder."})}),n.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-line",children:[n.jsx("button",{type:"button",onClick:()=>{var b;return(b=c.current)==null?void 0:b.close()},className:"px-3 py-1.5 rounded-lg border border-line text-xs hover:bg-raised cursor-pointer",children:"Cancel"}),f&&n.jsx("button",{type:"button",onClick:()=>{var b;o(f.current_path),(b=c.current)==null||b.close()},className:"px-4 py-1.5 rounded-lg bg-accent-solid hover:bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:"Use Current Folder"})]})]})})},FS=({result:s,defaultWorkspacePath:i,workstationMode:r="simple"})=>{const{t:o}=ft(),[c,f]=E.useState("HEAD~1"),[m,h]=E.useState("HEAD"),[p,v]=E.useState("enforce"),[y,g]=E.useState(!1),[b,N]=E.useState(null),[j,T]=E.useState(null),H=(s==null?void 0:s.target_display)||i||".",_=async z=>{z&&z.preventDefault(),g(!0),N(null);try{const D=await X_({target:H,base_ref:c.trim()||"HEAD~1",head_ref:m.trim()||"HEAD",mode:p});T(D)}catch(D){const O=D instanceof Error?D.message:String(D);N(O)}finally{g(!1)}},K=z=>{switch(z){case"PASS":return n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30",children:[n.jsx(jn,{className:"w-4 h-4","aria-hidden":"true"}),o("guardian.verdictPass","PASS — ARCHITECTURE CLEAN")]});case"WARNING":return n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-amber-500/15 text-amber-600 dark:text-amber-400 border border-amber-500/30",children:[n.jsx(Jt,{className:"w-4 h-4","aria-hidden":"true"}),o("guardian.verdictWarning","WARNING — ADVISORY ISSUES")]});case"FAIL":return n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-red-500/15 text-red-600 dark:text-red-400 border border-red-500/30",children:[n.jsx(Ey,{className:"w-4 h-4","aria-hidden":"true"}),o("guardian.verdictFail","FAIL — POLICY VIOLATED")]});case"INCONCLUSIVE":default:return n.jsxs("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold bg-purple-500/15 text-purple-600 dark:text-purple-400 border border-purple-500/30",children:[n.jsx(W2,{className:"w-4 h-4","aria-hidden":"true"}),o("guardian.verdictInconclusive","INCONCLUSIVE — LOW COVERAGE")]})}};return n.jsxs("div",{className:"h-full flex flex-col overflow-y-auto bg-canvas text-ink p-4 sm:p-6 space-y-6",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-line",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vl,{className:"w-5 h-5 text-accent","aria-hidden":"true"}),n.jsx("h1",{className:"text-lg font-bold tracking-tight",children:o("guardian.title","PR Architecture Guardian")})]}),n.jsx("p",{className:"text-xs text-muted mt-1",children:o("guardian.subtitle","Continuous regression gate detecting new circular dependencies, policy violations, and coupling spikes.")})]}),n.jsxs("form",{onSubmit:_,className:"flex flex-wrap items-center gap-2",children:[n.jsxs("div",{className:"flex items-center bg-panel border border-line rounded-lg px-2.5 py-1 text-xs gap-1.5",children:[n.jsx($c,{className:"w-3.5 h-3.5 text-muted","aria-hidden":"true"}),n.jsxs("span",{className:"text-muted",children:[o("guardian.baseLabel","Base"),":"]}),n.jsx("input",{type:"text",value:c,onChange:z=>f(z.target.value),placeholder:"origin/main",className:"bg-transparent text-ink font-mono focus:outline-none w-24 sm:w-28"})]}),n.jsx(ai,{className:"w-3.5 h-3.5 text-muted hidden sm:inline","aria-hidden":"true"}),n.jsxs("div",{className:"flex items-center bg-panel border border-line rounded-lg px-2.5 py-1 text-xs gap-1.5",children:[n.jsxs("span",{className:"text-muted",children:[o("guardian.headLabel","Head"),":"]}),n.jsx("input",{type:"text",value:m,onChange:z=>h(z.target.value),placeholder:"HEAD",className:"bg-transparent text-ink font-mono focus:outline-none w-20 sm:w-24"})]}),n.jsxs("div",{className:"flex items-center bg-panel border border-line rounded-lg p-0.5 text-xs",children:[n.jsx("button",{type:"button",onClick:()=>v("advisory"),className:`px-2 py-0.5 rounded text-[11px] font-medium transition cursor-pointer ${p==="advisory"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:o("guardian.advisoryMode","Advisory")}),n.jsx("button",{type:"button",onClick:()=>v("enforce"),className:`px-2 py-0.5 rounded text-[11px] font-medium transition cursor-pointer ${p==="enforce"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:o("guardian.enforceMode","Enforce")})]}),n.jsxs("button",{type:"submit",disabled:y,className:"px-3 py-1.5 rounded-lg bg-accent-solid text-white text-xs font-medium flex items-center gap-1.5 cursor-pointer hover:opacity-90 disabled:opacity-50 transition shadow-xs",children:[y?n.jsx(Hr,{className:"w-3.5 h-3.5 animate-spin"}):n.jsx(qc,{className:"w-3.5 h-3.5"}),y?o("guardian.analyzing","Evaluating…"):o("guardian.runCheck","Assess PR")]})]})]}),b&&n.jsxs("div",{className:"p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-lg text-xs flex items-center gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:b})]}),!j&&!y&&n.jsxs("div",{className:"p-8 text-center bg-panel border border-line rounded-xl space-y-3",children:[n.jsx(Gt,{className:"w-10 h-10 text-muted mx-auto","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold",children:o("guardian.noReportTitle","Evaluate Pull Request Architecture")}),n.jsx("p",{className:"text-xs text-muted max-w-md mx-auto",children:o("guardian.noReportDesc","Specify base and head Git revisions (e.g. main vs HEAD) to inspect circular dependency regressions, contract policy violations, and risk score.")}),n.jsx("button",{type:"button",onClick:()=>void _(),className:"px-4 py-2 rounded-lg bg-accent-solid text-white text-xs font-medium cursor-pointer shadow-xs hover:opacity-90",children:o("guardian.runCurrentDiff","Run Assessment for HEAD")})]}),j&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"p-4 sm:p-5 bg-panel border border-line rounded-xl space-y-3",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[K(j.verdict),n.jsxs("span",{className:"text-xs text-muted font-mono",children:[j.base_provenance.ref_name," → ",j.head_provenance.ref_name]})]}),n.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[j.should_block_ci?n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold uppercase bg-red-500/15 text-red-600 border border-red-500/30",children:"CI BLOCK (Exit 1)"}):n.jsx("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold uppercase bg-blue-500/15 text-blue-600 border border-blue-500/30",children:"CI ADVISORY (Exit 0)"}),n.jsxs("span",{className:"text-muted",children:[o("guardian.riskScore","Risk Score"),":"]}),n.jsxs("span",{className:"font-bold text-ink",children:[j.risk_assessment.risk_score," / 100"]}),n.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-semibold uppercase ${j.risk_assessment.risk_level==="CRITICAL"?"bg-red-500/15 text-red-600":j.risk_assessment.risk_level==="HIGH"?"bg-amber-500/15 text-amber-600":"bg-emerald-500/15 text-emerald-600"}`,children:j.risk_assessment.risk_level})]})]}),n.jsx("p",{className:"text-xs text-ink bg-raised p-2.5 rounded-lg border border-line",children:j.verdict_reason}),j.risk_assessment.risk_factors.length>0&&n.jsxs("div",{className:"text-xs space-y-1 pt-1",children:[n.jsxs("div",{className:"text-muted font-medium text-[11px] uppercase tracking-wider",children:[o("guardian.riskFactors","Identified Risk Contributors"),":"]}),n.jsx("ul",{className:"list-disc list-inside space-y-0.5 text-ink",children:j.risk_assessment.risk_factors.map((z,D)=>n.jsx("li",{children:z},D))})]})]}),n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"p-3 bg-panel border border-line rounded-xl",children:[n.jsx("div",{className:"text-[11px] text-muted",children:o("guardian.newCycles","New Cycles")}),n.jsxs("div",{className:"text-xl font-bold mt-1 text-ink flex items-center gap-1.5",children:[j.new_cycles.length>0?n.jsxs("span",{className:"text-red-500 font-bold",children:["+",j.new_cycles.length]}):n.jsx("span",{className:"text-emerald-500 font-medium",children:"0"}),j.resolved_cycles.length>0&&n.jsxs("span",{className:"text-xs text-emerald-500 font-normal",children:["(-",j.resolved_cycles.length," resolved)"]})]})]}),n.jsxs("div",{className:"p-3 bg-panel border border-line rounded-xl",children:[n.jsx("div",{className:"text-[11px] text-muted",children:o("guardian.contractViolations","Contract Violations")}),n.jsxs("div",{className:"text-xl font-bold mt-1 text-ink flex items-center gap-1.5",children:[j.new_contract_violations.length>0?n.jsxs("span",{className:"text-red-500 font-bold",children:["+",j.new_contract_violations.length]}):n.jsx("span",{className:"text-emerald-500 font-medium",children:"0"}),j.existing_baseline_violations.length>0&&n.jsxs("span",{className:"text-xs text-muted font-normal",children:["(",j.existing_baseline_violations.length," baseline)"]})]})]}),n.jsxs("div",{className:"p-3 bg-panel border border-line rounded-xl",children:[n.jsx("div",{className:"text-[11px] text-muted",children:o("guardian.healthDelta","Health Score")}),n.jsxs("div",{className:"text-xl font-bold mt-1 text-ink flex items-center gap-1.5",children:[n.jsx("span",{children:j.health_delta.score_after??"N/A"}),j.health_delta.score_delta!==null&&n.jsxs("span",{className:`text-xs flex items-center ${j.health_delta.score_delta>0?"text-emerald-500":j.health_delta.score_delta<0?"text-red-500":"text-muted"}`,children:[j.health_delta.score_delta>0?n.jsx(Fb,{className:"w-3 h-3 mr-0.5"}):n.jsx(Yb,{className:"w-3 h-3 mr-0.5"}),j.health_delta.score_delta>0?"+":"",j.health_delta.score_delta]})]})]}),n.jsxs("div",{className:"p-3 bg-panel border border-line rounded-xl",children:[n.jsx("div",{className:"text-[11px] text-muted",children:o("guardian.astCoverage","AST LOC Coverage")}),n.jsxs("div",{className:"text-xl font-bold mt-1 text-ink flex items-center gap-1.5",children:[n.jsxs("span",{children:[j.coverage_delta.ast_loc_coverage_after.toFixed(1),"%"]}),n.jsxs("span",{className:"text-xs text-muted",children:["(",j.coverage_delta.ast_loc_coverage_delta>=0?"+":"",j.coverage_delta.ast_loc_coverage_delta.toFixed(1),"%)"]})]})]})]}),j.new_contract_violations.length>0&&n.jsxs("div",{className:"p-4 bg-panel border border-line rounded-xl space-y-3",children:[n.jsxs("h2",{className:"text-xs font-bold uppercase tracking-wider text-red-500 flex items-center gap-1.5",children:[n.jsx(Jt,{className:"w-4 h-4"}),o("guardian.newViolationsTitle","New Architectural Policy Violations")," (",j.new_contract_violations.length,")"]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-line text-muted",children:[n.jsx("th",{className:"py-2 px-2 font-medium",children:o("guardian.rule","Rule")}),n.jsx("th",{className:"py-2 px-2 font-medium",children:o("guardian.source","Source Module")}),n.jsx("th",{className:"py-2 px-2 font-medium",children:o("guardian.target","Target Module")}),n.jsx("th",{className:"py-2 px-2 font-medium",children:o("guardian.remediation","Remediation")})]})}),n.jsx("tbody",{children:j.new_contract_violations.map((z,D)=>n.jsxs("tr",{className:"border-b border-line/50 hover:bg-raised",children:[n.jsx("td",{className:"py-2 px-2 font-mono font-bold text-red-500",children:z.rule_id}),n.jsxs("td",{className:"py-2 px-2 font-mono text-ink",children:[z.source_file,":",z.line]}),n.jsx("td",{className:"py-2 px-2 font-mono text-ink",children:z.target_file}),n.jsx("td",{className:"py-2 px-2 text-muted",children:z.remediation||z.message})]},D))})]})})]}),j.new_cycles.length>0&&n.jsxs("div",{className:"p-4 bg-panel border border-line rounded-xl space-y-3",children:[n.jsxs("h2",{className:"text-xs font-bold uppercase tracking-wider text-red-500 flex items-center gap-1.5",children:[n.jsx(Ey,{className:"w-4 h-4"}),o("guardian.newCyclesTitle","Regressive Circular Dependency Loops")," (",j.new_cycles.length,")"]}),n.jsx("div",{className:"space-y-2",children:j.new_cycles.map((z,D)=>n.jsxs("div",{className:"p-2.5 bg-raised rounded-lg border border-line font-mono text-xs",children:[n.jsxs("span",{className:"font-bold text-red-500 mr-2",children:["[",z.id,"]"]}),n.jsx("span",{className:"text-ink",children:z.nodes.join(" → ")})]},D))})]}),r==="advanced"&&n.jsxs("div",{className:"p-4 bg-panel border border-line rounded-xl space-y-3",children:[n.jsx("h2",{className:"text-xs font-bold uppercase tracking-wider text-muted",children:o("guardian.moduleChanges","Module Changes & Coupling")}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 text-xs",children:[n.jsxs("div",{className:"p-2 bg-raised rounded border border-line",children:[n.jsxs("span",{className:"text-muted",children:[o("guardian.added","Added"),":"]})," ",n.jsxs("span",{className:"font-bold text-emerald-500",children:["+",j.added_modules.length]})]}),n.jsxs("div",{className:"p-2 bg-raised rounded border border-line",children:[n.jsxs("span",{className:"text-muted",children:[o("guardian.removed","Removed"),":"]})," ",n.jsxs("span",{className:"font-bold text-red-500",children:["-",j.removed_modules.length]})]}),n.jsxs("div",{className:"p-2 bg-raised rounded border border-line",children:[n.jsxs("span",{className:"text-muted",children:[o("guardian.renamed","Renamed"),":"]})," ",n.jsx("span",{className:"font-bold text-ink",children:j.renamed_modules.length})]})]})]})]})]})};function Xb(s){return!s||s.state==="STOPPED"?"OFF":s.state==="FAILED"||s.state==="DEGRADED"||s.freshness==="DEGRADED"?"DEGRADED":s.state==="PAUSED"?"PAUSED":s.state==="STARTING"||s.state==="ANALYZING"||s.state==="DEBOUNCING"||s.analysis_in_progress||s.freshness==="ANALYZING"||s.freshness==="CHANGE_PENDING"?"UPDATING":s.freshness==="STALE"||s.freshness==="UNKNOWN"?"STALE":"WATCHING"}function IS(s){switch(s){case"VERIFIED_CURRENT":return"bg-success/15 text-success border-success/40";case"ANALYZING":case"CHANGE_PENDING":return"bg-accent/15 text-accent border-accent/40";case"DEGRADED":return"bg-danger/15 text-danger border-danger/40";case"STALE":case"UNKNOWN":default:return"bg-warning/15 text-warning border-warning/40"}}function KS(s){return s==="critical"?"bg-danger/15 text-danger border-danger/40":s==="warning"?"bg-warning/15 text-warning border-warning/40":"bg-panel text-muted border-line"}const XS=({sourceType:s,targetPath:i,session:r,connectionState:o,history:c,alerts:f,busyAction:m,liveError:h,workstationMode:p,onStartWatch:v,onPauseWatch:y,onResumeWatch:g,onReconcileNow:b,onStopWatch:N,onClearHistory:j,onAcknowledgeAlert:T,onInspectModuleInStudio:H})=>{const{t:_}=ft(),[K,z]=E.useState("ALL"),[D,O]=E.useState(!1),U=r!==null&&r.state!=="STOPPED"&&r.state!=="FAILED",q=(r==null?void 0:r.state)==="PAUSED",C=s==="local"&&i.trim().length>0&&i!=="demo",F=Xb(r),G=E.useMemo(()=>K==="ALL"?f:f.filter(W=>W.status===K),[f,K]),Y=E.useMemo(()=>f.filter(W=>W.status==="ACTIVE"||W.status==="UNKNOWN").length,[f]),I=E.useMemo(()=>c.find(W=>W.delta&&W.has_architectural_changes)??c[0]??null,[c]);return n.jsxs("div",{"data-testid":"live-workstation-view",className:"flex-1 overflow-auto bg-canvas text-ink",children:[n.jsx("section",{className:"border-b border-line bg-panel px-4 py-3",children:n.jsxs("div",{className:"max-w-7xl mx-auto flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(mm,{className:"w-4 h-4 text-accent shrink-0","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold m-0 text-ink",children:_("live.title")}),n.jsx("span",{"data-testid":"live-compact-status-badge",className:`text-[11px] font-mono font-semibold px-2 py-0.5 rounded border ${IS(r==null?void 0:r.freshness)}`,children:_(`live.status.${F}`)}),n.jsxs("span",{"data-testid":"live-sse-connection-badge",className:`text-[11px] font-mono px-2 py-0.5 rounded border flex items-center gap-1 ${o==="connected"?"bg-panel text-ink border-line":o==="reconnecting"||o==="connecting"?"bg-warning/15 text-warning border-warning/40":"bg-panel text-muted border-line"}`,children:[o==="connected"?n.jsx(O_,{className:"w-3 h-3 text-success","aria-hidden":"true"}):n.jsx(R_,{className:"w-3 h-3 text-muted","aria-hidden":"true"}),n.jsx("span",{children:_(`live.connection.${o}`)})]})]}),n.jsx("p",{className:"text-xs text-muted mt-1 mb-0",children:r?`${r.repo_name} — ${_("live.freshnessLabel")}: ${_(`live.freshness.${r.freshness}`)}`:_(C?"live.optInSubtitle":"live.localOnlyNotice")})]}),n.jsx("div",{className:"flex flex-wrap items-center gap-2",children:U?n.jsxs(n.Fragment,{children:[q?n.jsxs("button",{type:"button","data-testid":"live-resume-btn",disabled:m!==null,onClick:g,className:"px-3 py-1.5 min-h-8 rounded-md bg-accent-solid text-white text-xs font-semibold flex items-center gap-1.5 cursor-pointer disabled:opacity-40",children:[n.jsx(qc,{className:"w-3.5 h-3.5","aria-hidden":"true"}),_("live.resume")]}):n.jsxs("button",{type:"button","data-testid":"live-pause-btn",disabled:m!==null,onClick:y,className:"px-3 py-1.5 min-h-8 rounded-md bg-canvas hover:bg-raised border border-line text-ink text-xs font-medium flex items-center gap-1.5 cursor-pointer disabled:opacity-40",children:[n.jsx(s_,{className:"w-3.5 h-3.5","aria-hidden":"true"}),_("live.pause")]}),n.jsxs("button",{type:"button","data-testid":"live-reconcile-btn",disabled:m!==null||q,onClick:b,className:"px-3 py-1.5 min-h-8 rounded-md bg-canvas hover:bg-raised border border-line text-ink text-xs font-medium flex items-center gap-1.5 cursor-pointer disabled:opacity-40",children:[n.jsx(bn,{className:"w-3.5 h-3.5","aria-hidden":"true"}),_("live.reconcileNow")]}),n.jsxs("button",{type:"button","data-testid":"live-stop-btn",disabled:m!==null,onClick:N,className:"px-3 py-1.5 min-h-8 rounded-md bg-danger-solid text-white text-xs font-semibold flex items-center gap-1.5 cursor-pointer disabled:opacity-40",children:[n.jsx(Gb,{className:"w-3.5 h-3.5","aria-hidden":"true"}),_("live.stopWatch")]})]}):n.jsxs(n.Fragment,{children:[p==="advanced"&&n.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted px-2 py-1 rounded border border-line bg-canvas cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:D,onChange:W=>O(W.target.checked)}),n.jsx("span",{children:_("live.forcePolling")})]}),n.jsxs("button",{type:"button","data-testid":"live-start-btn",disabled:!C||m!==null,onClick:()=>v(D),className:"px-3 py-1.5 min-h-8 rounded-md bg-accent-solid text-white text-xs font-semibold flex items-center gap-1.5 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",children:[n.jsx(qc,{className:"w-3.5 h-3.5","aria-hidden":"true"}),_(m==="start"?"live.starting":"live.startWatch")]})]})})]})}),h&&n.jsx("div",{role:"alert","data-testid":"live-error-banner",className:"border-b border-danger/50 bg-danger/10 px-4 py-2 text-xs text-danger",children:n.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:h})]})}),r&&q&&n.jsx("div",{"data-testid":"live-paused-disclosure",className:"border-b border-warning/40 bg-warning/10 px-4 py-2 text-xs text-warning",children:n.jsx("div",{className:"max-w-7xl mx-auto",children:_("live.pausedFreshnessWarning")})}),r&&r.diagnostics.degraded_reason&&n.jsx("div",{"data-testid":"live-degraded-disclosure",className:"border-b border-danger/40 bg-danger/10 px-4 py-2 text-xs text-danger",children:n.jsxs("div",{className:"max-w-7xl mx-auto",children:[_("live.degradedPrefix"),": ",r.diagnostics.degraded_reason]})}),n.jsxs("div",{className:"max-w-7xl mx-auto px-4 py-4 space-y-5",children:[n.jsxs("section",{"aria-label":_("live.summarySection"),className:"border border-line rounded-md bg-panel",children:[n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 divide-y sm:divide-y-0 sm:divide-x divide-line",children:[n.jsxs("div",{className:"p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.watchStateLabel")}),n.jsx("div",{className:"text-sm font-semibold mt-0.5 text-ink","data-testid":"live-summary-state",children:_(r?`live.status.${F}`:"live.status.OFF")}),n.jsx("div",{className:"text-[11px] text-muted mt-0.5 font-mono",children:_(r?`live.freshness.${r.freshness}`:"live.notStarted")})]}),n.jsxs("div",{className:"p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.lastVerifiedLabel")}),n.jsx("div",{className:"text-sm font-semibold mt-0.5 text-ink font-mono",children:r!=null&&r.last_verified_at?new Date(r.last_verified_at).toLocaleTimeString():"—"}),n.jsx("div",{className:"text-[11px] text-muted mt-0.5 font-mono truncate",title:(r==null?void 0:r.last_verified_snapshot_identity)??"",children:r!=null&&r.last_verified_snapshot_identity?r.last_verified_snapshot_identity.slice(0,26):_("live.noSnapshotYet")})]}),n.jsxs("div",{className:"p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.lastDeltaLabel")}),n.jsx("div",{className:"text-xs font-medium mt-0.5 text-ink line-clamp-2","data-testid":"live-summary-delta",children:I?I.summary:_("live.noChangesYet")})]}),n.jsxs("div",{className:"p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.activeRisksLabel")}),n.jsx("div",{"data-testid":"live-active-risks-count",className:`text-sm font-semibold mt-0.5 font-mono ${Y>0?"text-danger":"text-success"}`,children:Y}),n.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:Y>0?_("live.reviewAlertsBelow"):_("live.noActiveRisks")})]})]}),p==="advanced"&&r&&n.jsxs("div",{"data-testid":"live-advanced-diagnostics",className:"border-t border-line bg-canvas px-3 py-2.5 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 text-xs",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.backend")}),n.jsx("div",{className:"font-mono text-ink",children:r.watcher_backend})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.pendingFiles")}),n.jsxs("div",{className:"font-mono text-ink",children:[r.pending_changes_count," (hwm: ",r.diagnostics.queue_high_water_mark,")"]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.phase")}),n.jsxs("div",{className:"font-mono text-ink",children:[r.diagnostics.last_analysis_phase," (",r.diagnostics.last_analysis_duration_ms," ms)"]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.reuseRatio")}),n.jsxs("div",{className:"font-mono text-ink",children:[r.diagnostics.last_reused_files," / ",r.diagnostics.last_reparsed_files]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.generation")}),n.jsxs("div",{className:"font-mono text-ink",children:["g",r.session_generation," · ",r.published_change_generation,"/",r.latest_observed_change_generation]})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] text-muted",children:_("live.diag.batchesReconciles")}),n.jsxs("div",{className:"font-mono text-ink",children:[r.diagnostics.total_batches_flushed,"b · ",r.diagnostics.total_reconciliations,"r · ",r.diagnostics.overflow_count,"ovf"]})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 items-start",children:[n.jsxs("section",{"aria-labelledby":"live-timeline-heading","data-testid":"live-timeline-panel",className:"border border-line rounded-md bg-panel",children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2.5 border-b border-line",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Am,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsxs("h3",{id:"live-timeline-heading",className:"text-xs font-semibold m-0 text-ink",children:[_("live.timelineTitle")," (",c.length,")"]})]}),r&&c.length>0&&n.jsxs("button",{type:"button","data-testid":"live-clear-history-btn",onClick:j,className:"px-2 py-1 rounded text-[11px] text-muted hover:text-ink hover:bg-raised flex items-center gap-1 cursor-pointer",children:[n.jsx(__,{className:"w-3 h-3","aria-hidden":"true"}),_("live.clearHistory")]})]}),c.length===0?n.jsx("div",{className:"p-4 text-xs text-muted",children:_("live.timelineEmpty")}):n.jsx("ol",{className:"divide-y divide-line m-0 p-0 list-none max-h-[520px] overflow-auto",children:c.map(W=>{const w=W.delta,R=Array.from(new Set([...(w==null?void 0:w.added_modules)??[],...(w==null?void 0:w.added_edges.map(A=>A.source))??[],...(w==null?void 0:w.new_cycles.flatMap(A=>A.nodes))??[],...W.changed_paths_preview??[]])).slice(0,6);return n.jsxs("li",{className:"p-3 space-y-1.5",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-canvas border border-line text-ink",children:W.event_kind}),n.jsx("span",{className:"text-[11px] font-mono text-muted",children:new Date(W.timestamp).toLocaleTimeString()}),W.analysis_duration_ms>0&&n.jsxs("span",{className:"text-[11px] font-mono text-muted",children:[W.analysis_duration_ms," ms"]})]}),n.jsxs("span",{className:"text-[11px] font-mono text-muted",children:[W.changed_file_count," ",_("live.filesShort"),!W.snapshot_available&&` · ${_("live.snapshotUnavailable")}`]})]}),n.jsx("p",{className:"text-xs text-ink m-0",children:W.summary}),w&&w.has_architectural_changes&&n.jsxs("div",{className:"flex flex-wrap gap-1.5 text-[11px] font-mono",children:[w.new_cycles.length>0&&n.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-danger/15 text-danger",children:["+",w.new_cycles.length," ",_("live.cyclesLabel")]}),w.resolved_cycles.length>0&&n.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-success/15 text-success",children:["-",w.resolved_cycles.length," ",_("live.cyclesLabel")]}),(w.added_edges.length>0||w.removed_edges.length>0)&&n.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-canvas border border-line text-muted",children:["edges +",w.added_edges.length,"/-",w.removed_edges.length]}),w.public_interface_changes.length>0&&n.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-canvas border border-line text-muted",children:[w.public_interface_changes.length," ",_("live.symbolsLabel")]})]}),R.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1 pt-0.5",children:R.map(A=>n.jsx("button",{type:"button",onClick:()=>H(A),className:"px-1.5 py-0.5 rounded bg-canvas hover:bg-raised border border-line text-[11px] font-mono text-accent cursor-pointer",children:A},`${W.entry_id}-${A}`))})]},W.entry_id)})})]}),n.jsxs("section",{"aria-labelledby":"live-alerts-heading","data-testid":"live-alerts-panel",className:"border border-line rounded-md bg-panel",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2.5 border-b border-line",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vl,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsxs("h3",{id:"live-alerts-heading",className:"text-xs font-semibold m-0 text-ink",children:[_("live.alertsTitle")," (",G.length,")"]})]}),n.jsx("div",{role:"group","aria-label":_("live.filterAlerts"),className:"flex items-center gap-1 text-[11px]",children:["ALL","ACTIVE","ACKNOWLEDGED","RESOLVED"].map(W=>n.jsx("button",{type:"button","aria-pressed":K===W,onClick:()=>z(W),className:`px-2 py-0.5 rounded cursor-pointer ${K===W?"bg-accent-solid text-white":"text-muted hover:text-ink hover:bg-raised"}`,children:_(`live.alertFilter.${W}`)},W))})]}),G.length===0?n.jsxs("div",{className:"p-4 text-xs text-muted flex items-center gap-2",children:[n.jsx(jn,{className:"w-4 h-4 text-success shrink-0","aria-hidden":"true"}),n.jsx("span",{children:_("live.alertsEmpty")})]}):n.jsx("ul",{className:"divide-y divide-line m-0 p-0 list-none max-h-[520px] overflow-auto",children:G.map(W=>n.jsxs("li",{"data-testid":`live-alert-${W.alert_id}`,"data-alert-status":W.status,"data-alert-category":W.category,className:"p-3 space-y-2",children:[n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.jsx("span",{className:`text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded border ${KS(W.severity)}`,children:W.severity.toUpperCase()}),n.jsx("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded bg-canvas border border-line text-ink",children:W.category}),n.jsx("span",{className:"text-[11px] font-mono text-muted",children:W.status})]}),W.status==="ACTIVE"&&n.jsx("button",{type:"button","data-testid":`ack-alert-${W.alert_id}`,onClick:()=>T(W.alert_id),className:"px-2 py-0.5 rounded bg-canvas hover:bg-raised border border-line text-[11px] text-ink cursor-pointer",children:_("live.acknowledge")})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-semibold text-ink",children:W.title}),n.jsx("p",{className:"text-xs text-muted mt-0.5 mb-0",children:W.explanation}),W.status==="ACKNOWLEDGED"&&W.is_underlying_issue_present&&n.jsx("p",{className:"text-[11px] text-warning mt-1 mb-0",children:_("live.acknowledgedStillPresent")})]}),W.affected_modules.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1",children:W.affected_modules.slice(0,6).map(w=>n.jsx("button",{type:"button",onClick:()=>H(w),className:"px-1.5 py-0.5 rounded bg-canvas hover:bg-raised border border-line text-[11px] font-mono text-accent cursor-pointer",children:w},`${W.alert_id}-${w}`))}),n.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-[11px] font-mono text-muted",children:[n.jsxs("span",{children:[_("live.confidenceLabel"),": ",W.confidence]}),W.evidence_refs.length>0&&n.jsxs("span",{className:"truncate",children:[_("live.evidenceLabel"),": ",W.evidence_refs.slice(0,2).join(", ")]}),n.jsxs("span",{children:[n.jsx(Tm,{className:"w-3 h-3 inline mr-0.5","aria-hidden":"true"}),"×",W.occurrence_count]})]})]},W.alert_id))})]})]})]})]})},Om="1.0.0",QS=({sourceType:s,onSourceTypeChange:i,targetInput:r,onTargetInputChange:o,branchInput:c,onBranchInputChange:f,limits:m,onLimitsChange:h,analysisMode:p="auto",onAnalysisModeChange:v,useCache:y=!0,onUseCacheChange:g,workers:b=null,onWorkersChange:N,onTriggerScan:j,onOpenFolderBrowser:T,activeJob:H,onCancelJob:_,result:K,activeTab:z,onTabChange:D,defaultWorkspacePath:O,onOpenCommandPalette:U,workstationMode:q="simple",onWorkstationModeChange:C,onOpenTour:F,liveSession:G=null,liveConnectionState:Y="disconnected"})=>{var Ee;const{t:I,i18n:W}=ft(),w=E.useRef(null),[R,A]=E.useState(!1),[V,B]=E.useState(!1),[P,te]=E.useState(null),[le,pe]=E.useState(!1),[ve,k]=E.useState(null),[M,ie]=E.useState("dark"),[ce,me]=E.useState(null),ge=!!((Ee=W==null?void 0:W.language)!=null&&Ee.startsWith("tr")),je=de=>{W.changeLanguage(de),typeof document<"u"&&(document.documentElement.lang=de),yn("locale",de)},ue=de=>{C==null||C(de),yn("mode",de)},ye=async(de,Me)=>{if(de.preventDefault(),!!K){me(`Preparing ${Me.toUpperCase()} report…`);try{const at=await fetch(il(K.analysis_id,Me));if(!at.ok)throw new Error("Export failed");const J=URL.createObjectURL(await at.blob()),Se=document.createElement("a");Se.href=J,Se.download=`repodna-${K.repo_name}.${Me}`,Se.click(),window.setTimeout(()=>URL.revokeObjectURL(J),1e3),me(`Exported ${Me.toUpperCase()} report — download started`)}catch{me("Export failed. Check the backend connection and try again.")}}};E.useEffect(()=>{const de=()=>{var yt;const ut=(yt=document.querySelector('meta[name="color-scheme"]'))==null?void 0:yt.content;if(ut==="light"||ut==="dark")return ut;try{const Je=localStorage.getItem("color-scheme");if(Je==="light"||Je==="dark")return Je}catch{}return typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"dark"},Me=()=>{const ut=de();ie(ut),ut==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.setAttribute("data-theme","dark")):(document.documentElement.classList.remove("dark"),document.documentElement.setAttribute("data-theme","light"))};Me();const at=document.querySelector('meta[name="color-scheme"]');let J=null;at&&typeof MutationObserver<"u"&&(J=new MutationObserver(Me),J.observe(at,{attributes:!0,attributeFilter:["content"]})),window.addEventListener("storage",Me);let Se=null,rt=null;return typeof window<"u"&&typeof window.matchMedia=="function"&&(Se=window.matchMedia("(prefers-color-scheme: dark)"),rt=()=>{var yt;((yt=document.querySelector('meta[name="color-scheme"]'))==null?void 0:yt.content)||Me()},Se.addEventListener("change",rt)),()=>{J==null||J.disconnect(),window.removeEventListener("storage",Me),Se&&rt&&Se.removeEventListener("change",rt)}},[]);const Ce=()=>{const de=M==="dark"?"light":"dark";ie(de);let Me=document.querySelector('meta[name="color-scheme"]');Me||(Me=document.createElement("meta"),Me.name="color-scheme",document.head.appendChild(Me)),Me.content=de,de==="dark"?(document.documentElement.classList.add("dark"),document.documentElement.setAttribute("data-theme","dark")):(document.documentElement.classList.remove("dark"),document.documentElement.setAttribute("data-theme","light"));try{localStorage.setItem("color-scheme",de)}catch{}};E.useEffect(()=>{const de=w.current;de&&(V&&!de.open?(de.showModal(),k(null),Oy().then(Me=>te(Me)).catch(()=>te(null))):!V&&de.open&&de.close())},[V]);const dt=async()=>{pe(!0),k(null);try{const de=await cS();k(I("performance.cacheCleared",{count:de.deleted_entries}));const Me=await Oy();te(Me)}catch{k(I("performance.cacheClearFailed"))}finally{pe(!1)}};E.useEffect(()=>{const de=w.current;if(!de)return;const Me=()=>{de.returnValue="",B(!1)};de.addEventListener("close",Me);let at=null;return"closedBy"in HTMLDialogElement.prototype||(at=J=>{if(J.target!==de)return;const Se=de.getBoundingClientRect();Se.top<=J.clientY&&J.clientY<=Se.top+Se.height&&Se.left<=J.clientX&&J.clientX<=Se.left+Se.width||de.close()},de.addEventListener("click",at)),()=>{de.removeEventListener("close",Me),at&&de.removeEventListener("click",at)}},[]);const Le=H!==null&&!["completed","cancelled","failed"].includes(H.status),Ke=de=>{de.preventDefault(),j()};return n.jsxs("header",{className:"app-header border-b border-line bg-canvas px-4 py-2 flex flex-col gap-2",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2.5",children:[n.jsxs("div",{className:"flex items-center gap-2.5",children:[n.jsx("div",{className:"brand-symbol",children:n.jsx(Tm,{className:"w-5 h-5 text-white","aria-hidden":"true"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h1",{className:"text-base font-bold tracking-tight m-0 text-ink",children:I("header.title")}),n.jsxs("span",{className:"text-[11px] font-mono tracking-wide px-2 py-0.5 rounded-full bg-accent/15 text-accent border border-accent/30",children:["v",Om]}),(K==null?void 0:K.is_demo)&&n.jsx("span",{"data-testid":"demo-mode-badge",className:"text-[11px] font-semibold tracking-wide px-2.5 py-0.5 rounded-full bg-warning/20 text-warning border border-warning/40",children:I("header.demoBadge")}),G&&G.state!=="STOPPED"&&n.jsxs("button",{type:"button","data-testid":"header-live-status-pill",onClick:()=>D("live"),className:`text-[11px] font-mono font-semibold px-2 py-0.5 rounded-full border flex items-center gap-1 cursor-pointer ${G.freshness==="VERIFIED_CURRENT"?"bg-success/15 text-success border-success/40":G.state==="DEGRADED"||G.state==="FAILED"?"bg-danger/15 text-danger border-danger/40":G.state==="PAUSED"?"bg-warning/15 text-warning border-warning/40":"bg-accent/15 text-accent border-accent/40"}`,title:`${I("live.freshnessLabel")}: ${I(`live.freshness.${G.freshness}`)} (${I(`live.connection.${Y}`)})`,children:[n.jsx(mm,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{children:I(`live.status.${Xb(G)}`)})]})]}),n.jsx("p",{className:"header-description text-[11px] text-muted m-0",children:I("header.subtitle")})]})]}),n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("div",{role:"group","aria-label":I("common.switchMode"),className:"flex items-center bg-panel p-0.5 rounded-lg border border-line",children:[n.jsx("button",{type:"button","data-testid":"mode-simple-btn",onClick:()=>ue("simple"),"aria-pressed":q==="simple",className:`px-2.5 py-1 rounded-md text-xs font-medium cursor-pointer transition ${q==="simple"?"bg-accent-solid text-white shadow-sm":"text-muted hover:text-ink"}`,children:I("common.simpleMode")}),n.jsx("button",{type:"button","data-testid":"mode-advanced-btn",onClick:()=>ue("advanced"),"aria-pressed":q==="advanced",className:`px-2.5 py-1 rounded-md text-xs font-medium cursor-pointer transition ${q==="advanced"?"bg-accent-solid text-white shadow-sm":"text-muted hover:text-ink"}`,children:I("common.advancedMode")})]}),n.jsxs("nav",{"aria-label":"Workspace views",className:"flex flex-wrap items-center bg-panel p-0.5 rounded-lg border border-line",children:[n.jsxs("button",{type:"button","data-testid":"tab-studio-btn","aria-label":I("header.studioTab"),title:I("header.studioTab"),onClick:()=>D("studio"),"aria-pressed":z==="studio",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="studio"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(di,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.studioTab")})]}),n.jsxs("button",{type:"button","data-testid":"tab-live-btn","aria-label":I("live.tabLabel","Live"),title:I("live.title","Live Architecture Engine"),onClick:()=>D("live"),"aria-pressed":z==="live",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="live"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(mm,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("live.tabLabel","Live")})]}),n.jsxs("button",{type:"button","data-testid":"tab-quality-btn","aria-label":I("quality.tabLabel","Quality"),title:I("quality.title","Code Quality Workstation"),onClick:()=>D("quality"),"aria-pressed":z==="quality",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="quality"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Gt,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("quality.tabLabel","Quality")})]}),n.jsxs("button",{type:"button","data-testid":"tab-agent-btn","aria-label":I("agent.tabLabel","Agent"),title:I("agent.title","AI Agent Intelligence Workstation"),onClick:()=>D("agent"),"aria-pressed":z==="agent",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="agent"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Et,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("agent.tabLabel","Agent")})]}),n.jsxs("button",{type:"button","data-testid":"tab-workspace-btn","aria-label":I("workspace.tabLabel","Workspaces"),title:I("workspace.title","Multi-Repository Workspace Intelligence"),onClick:()=>D("workspace"),"aria-pressed":z==="workspace",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="workspace"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(cn,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("workspace.tabLabel","Workspaces")})]}),n.jsxs("button",{type:"button","data-testid":"tab-intelligence-btn","aria-label":I("header.intelligenceTab","Intelligence"),title:I("header.intelligenceTab","Intelligence"),onClick:()=>D("intelligence"),"aria-pressed":z==="intelligence",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="intelligence"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Et,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.intelligenceTab","Intelligence")})]}),n.jsxs("button",{type:"button","data-testid":"tab-report-btn","aria-label":I("header.reportTab"),title:I("header.reportTab"),onClick:()=>D("report"),"aria-pressed":z==="report",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="report"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Gt,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.reportTab")})]}),n.jsxs("button",{type:"button","data-testid":"tab-guardian-btn","aria-label":I("header.guardianTab","Guardian"),title:I("header.guardianTab","Guardian"),onClick:()=>D("guardian"),"aria-pressed":z==="guardian",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="guardian"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(vl,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.guardianTab","Guardian")})]}),n.jsxs("button",{type:"button","data-testid":"tab-contract-btn","aria-label":I("header.contractTab","Contract"),title:I("header.contractTab","Contract"),onClick:()=>D("contract"),"aria-pressed":z==="contract",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="contract"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Ob,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.contractTab","Contract")})]}),n.jsxs("button",{type:"button","data-testid":"tab-passport-btn","aria-label":I("header.passportTab","Passport"),title:I("header.passportTab","Passport"),onClick:()=>D("passport"),"aria-pressed":z==="passport",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="passport"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Bb,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.passportTab","Passport")})]}),n.jsxs("button",{type:"button","data-testid":"tab-history-btn","aria-label":I("header.historyTab","Time Machine"),title:I("header.historyTab","Time Machine"),onClick:()=>D("history"),"aria-pressed":z==="history",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="history"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx($b,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.historyTab","Time Machine")})]}),n.jsxs("button",{type:"button","data-testid":"tab-advisor-btn","aria-label":I("header.advisorTab","Refactoring Advisor"),title:I("header.advisorTab","Refactoring Advisor"),onClick:()=>D("advisor"),"aria-pressed":z==="advisor",className:`px-2.5 py-1 min-h-7 min-w-7 rounded-md text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer ${z==="advisor"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:[n.jsx(Et,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("header.advisorTab","Advisor")})]})]}),n.jsxs("button",{type:"button","data-testid":"open-command-palette-btn",onClick:U,title:`${I("header.commandPalette")} (Ctrl+K)`,className:"px-2.5 py-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1.5 cursor-pointer",children:[n.jsx(zb,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),n.jsx("span",{className:"hidden sm:inline",children:I("header.commandPalette")}),n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-raised text-[11px] font-mono text-muted border border-line",children:"Ctrl+K"})]}),K&&n.jsxs("div",{className:"flex items-center bg-panel border border-line rounded-lg p-0.5 text-xs",children:[n.jsxs("span",{className:"px-2 text-muted font-medium flex items-center gap-1",children:[n.jsx(zn,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),n.jsx("span",{className:"hidden md:inline",children:I("common.export")})]}),n.jsx("a",{href:il(K.analysis_id,"json"),download:`repodna-${K.repo_name}.json`,onClick:de=>void ye(de,"json"),className:"px-2 py-0.5 hover:bg-raised rounded text-ink font-medium no-underline",children:"Export JSON"}),n.jsx("span",{className:"text-line mx-0.5","aria-hidden":"true",children:"|"}),n.jsx("a",{href:il(K.analysis_id,"html"),download:`repodna-${K.repo_name}.html`,onClick:de=>void ye(de,"html"),className:"px-2 py-0.5 hover:bg-raised rounded text-ink font-medium no-underline",children:"Export HTML"}),ce&&n.jsx("span",{role:"status","data-testid":"export-status-badge",className:"ml-1 px-1.5 py-0.5 rounded bg-success/20 border border-success/40 text-success text-[11px] font-medium",children:ce})]}),n.jsxs("div",{role:"group","aria-label":I("common.language"),"data-testid":"lang-toggle-btn",className:"flex items-center bg-panel p-0.5 rounded-lg border border-line text-xs font-mono font-bold",children:[n.jsx("button",{type:"button","data-testid":"lang-tr-btn",onClick:()=>je("tr"),"aria-pressed":ge,className:`px-2 py-0.5 rounded cursor-pointer transition ${ge?"bg-accent-solid text-white shadow-sm":"text-muted hover:text-ink"}`,children:"TR"}),n.jsx("button",{type:"button","data-testid":"lang-en-btn",onClick:()=>je("en"),"aria-pressed":!ge,className:`px-2 py-0.5 rounded cursor-pointer transition ${ge?"text-muted hover:text-ink":"bg-accent-solid text-white shadow-sm"}`,children:"EN"})]}),F&&n.jsxs("button",{type:"button","data-testid":"open-tour-btn",onClick:F,title:I("common.help"),"aria-label":I("common.help"),className:"p-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-ink cursor-pointer flex items-center gap-1 text-xs",children:[n.jsx(Mm,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("span",{className:"hidden lg:inline",children:I("common.help")})]}),n.jsx("button",{type:"button","data-testid":"theme-toggle-btn",onClick:Ce,className:"p-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-ink cursor-pointer flex items-center gap-1.5 text-xs",children:M==="dark"?n.jsxs(n.Fragment,{children:[n.jsx(Vb,{className:"w-4 h-4 text-warning","aria-hidden":"true"}),n.jsx("span",{className:"visually-hidden",children:I("common.themeLight")})]}):n.jsxs(n.Fragment,{children:[n.jsx(Jw,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("span",{className:"visually-hidden",children:I("common.themeDark")})]})})]})]}),K&&n.jsxs("div",{className:"repository-identity",children:[n.jsx($c,{size:15,"aria-hidden":"true",className:"text-accent shrink-0"}),n.jsx("strong",{title:K.repo_name,children:K.repo_name}),n.jsx("span",{children:Le?I("common.loading"):K.is_demo?I("header.sampleBadge"):I("header.analyzeRepo")}),n.jsx("button",{type:"button","data-testid":"toggle-source-controls-btn",className:"ml-auto text-xs text-accent cursor-pointer","aria-expanded":R,onClick:()=>A(de=>!de),children:I(R?"header.hideControls":"header.changeRepo")})]}),(!K||R||Le)&&n.jsxs("form",{onSubmit:Ke,className:"flex flex-wrap items-center gap-2 pt-1",children:[n.jsxs("div",{role:"group","aria-label":"Source type",className:"flex items-center bg-panel p-0.5 rounded-lg border border-line",children:[n.jsxs("button",{type:"button",onClick:()=>{i("local"),(r==="demo"||r.startsWith("https://"))&&o(O)},"aria-pressed":s==="local",className:`px-2.5 py-1 rounded-md text-xs font-medium flex items-center gap-1 cursor-pointer ${s==="local"?"bg-raised text-accent border border-line":"text-muted hover:text-ink"}`,children:[n.jsx(um,{className:"w-3.5 h-3.5","aria-hidden":"true"}),I("header.sourceLocal")]}),n.jsxs("button",{type:"button",onClick:()=>{i("github"),r.startsWith("https://github.com/")||o("https://github.com/Cihanak1/AImage")},"aria-pressed":s==="github",className:`px-2.5 py-1 rounded-md text-xs font-medium flex items-center gap-1 cursor-pointer ${s==="github"?"bg-raised text-accent border border-line":"text-muted hover:text-ink"}`,children:[n.jsx(Ub,{className:"w-3.5 h-3.5","aria-hidden":"true"}),I("header.sourceGithub")]}),n.jsxs("button",{type:"button",onClick:()=>{i("demo"),o("demo"),j("demo","demo")},"aria-pressed":s==="demo",className:`px-2.5 py-1 rounded-md text-xs font-medium flex items-center gap-1 cursor-pointer ${s==="demo"?"bg-warning/20 text-warning border border-warning/40":"text-muted hover:text-ink"}`,children:[n.jsx(Et,{className:"w-3.5 h-3.5","aria-hidden":"true"}),I("header.sourceDemo")]})]}),n.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-1.5",children:[n.jsx("label",{htmlFor:"repo-target-input",className:"visually-hidden",children:s==="github"?"Public HTTPS GitHub Repository URL":"Local Repository Directory Path"}),n.jsx("input",{id:"repo-target-input",name:"repository",autoComplete:"off",spellCheck:!1,type:"text",value:r,onChange:de=>o(de.target.value),placeholder:s==="github"?"https://github.com/owner/repository":"Enter local repository directory path...",className:"flex-1 bg-panel border border-line rounded-lg px-3 py-1.5 text-xs font-mono text-ink placeholder:text-muted"}),s==="local"&&n.jsxs("button",{type:"button",onClick:T,className:"px-2.5 py-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1 shrink-0 cursor-pointer",children:[n.jsx(um,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),I("launchpad.browseFolder")]}),s==="github"&&n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("label",{htmlFor:"repo-branch-input",className:"visually-hidden",children:"Git Branch (optional)"}),n.jsx($c,{className:"w-3.5 h-3.5 text-muted","aria-hidden":"true"}),n.jsx("input",{id:"repo-branch-input",type:"text",value:c,onChange:de=>f(de.target.value),placeholder:I("header.branchOptional"),className:"w-28 bg-panel border border-line rounded-lg px-2 py-1.5 text-xs font-mono text-ink placeholder:text-muted"})]})]}),n.jsxs("button",{type:"button","data-testid":"open-guardrails-btn",onClick:()=>B(!0),className:"px-2.5 py-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-xs font-medium text-muted flex items-center gap-1.5 cursor-pointer",children:[n.jsx(My,{className:"w-3.5 h-3.5 text-muted","aria-hidden":"true"}),I("header.guardrails")," (",m.max_files," files / ",m.timeout_seconds,"s)"]}),Le?n.jsxs("button",{type:"button",onClick:_,className:"px-3.5 py-1.5 rounded-lg bg-danger-solid hover:bg-danger-solid text-white text-xs font-semibold flex items-center gap-1.5 cursor-pointer",children:[n.jsx(Gb,{className:"w-3.5 h-3.5","aria-hidden":"true"}),I("common.cancel")]}):n.jsxs("button",{type:"submit","data-testid":"analyze-submit-btn",className:"px-4 py-1.5 rounded-lg bg-accent-solid hover:bg-accent-solid text-white text-xs font-semibold flex items-center gap-1.5 shadow-sm shadow-sky-500/20 cursor-pointer",children:[n.jsx(qc,{className:"w-3.5 h-3.5","aria-hidden":"true"}),I("header.analyzeRepo")]})]}),n.jsx("dialog",{ref:w,"aria-labelledby":"limits-dialog-title",className:"backdrop:bg-black/60 rounded-xl bg-canvas border border-line p-0 text-ink max-w-md w-full shadow-2xl m-auto",children:n.jsxs("div",{className:"p-4 space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-2",children:[n.jsxs("h2",{id:"limits-dialog-title",className:"text-sm font-bold flex items-center gap-2 m-0",children:[n.jsx(My,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),"Scan Guardrails & Safety Limits"]}),n.jsx("button",{type:"button",onClick:()=>{var de;return(de=w.current)==null?void 0:de.close()},"aria-label":"Close dialog",className:"p-1 rounded-md hover:bg-raised text-muted hover:text-ink cursor-pointer",children:n.jsx(Gr,{className:"w-4 h-4","aria-hidden":"true"})})]}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 text-xs",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{htmlFor:"limit-max-files",className:"font-medium text-muted",children:"Max Files Limit"}),n.jsx("input",{id:"limit-max-files",type:"number",min:10,max:2e4,value:m.max_files,onChange:de=>h({...m,max_files:Math.max(10,Math.min(2e4,Number(de.target.value)||2500))}),className:"bg-panel border border-line rounded-lg px-2.5 py-1.5 font-mono text-ink"})]}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{htmlFor:"limit-max-file-bytes",className:"font-medium text-muted",children:"Max Single File Size (KB)"}),n.jsx("input",{id:"limit-max-file-bytes",type:"number",min:16,max:10240,value:Math.round(m.max_file_size_bytes/1024),onChange:de=>h({...m,max_file_size_bytes:Math.max(16,Math.min(10240,Number(de.target.value)||1024))*1024}),className:"bg-panel border border-line rounded-lg px-2.5 py-1.5 font-mono text-ink"})]}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{htmlFor:"limit-timeout-sec",className:"font-medium text-muted",children:"Timeout (Seconds)"}),n.jsx("input",{id:"limit-timeout-sec",type:"number",min:5,max:300,value:m.timeout_seconds,onChange:de=>h({...m,timeout_seconds:Math.max(5,Math.min(300,Number(de.target.value)||60))}),className:"bg-panel border border-line rounded-lg px-2.5 py-1.5 font-mono text-ink"})]})]}),n.jsxs("div",{className:"border-t border-line pt-3 space-y-3 text-xs","data-testid":"performance-settings-section",children:[n.jsx("h3",{className:"text-xs font-bold text-ink m-0",children:I("performance.sectionTitle")}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{htmlFor:"perf-analysis-mode",className:"font-medium text-muted",children:I("performance.modeLabel")}),n.jsxs("select",{id:"perf-analysis-mode","data-testid":"perf-mode-select",value:p,onChange:de=>v==null?void 0:v(de.target.value),className:"bg-panel border border-line rounded-lg px-2.5 py-1.5 text-ink cursor-pointer",children:[n.jsx("option",{value:"auto",children:I("performance.modeAuto")}),n.jsx("option",{value:"incremental",children:I("performance.modeIncremental")}),n.jsx("option",{value:"full",children:I("performance.modeFull")})]})]}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{htmlFor:"perf-workers-input",className:"font-medium text-muted",children:I("performance.workersLabel")}),n.jsx("input",{id:"perf-workers-input","data-testid":"perf-workers-input",type:"number",min:1,max:32,placeholder:"Auto",value:b??"",onChange:de=>{const Me=de.target.value.trim();N==null||N(Me?Math.max(1,Math.min(32,Number(Me)||1)):null)},className:"bg-panel border border-line rounded-lg px-2.5 py-1.5 font-mono text-ink"})]})]}),n.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-ink",children:[n.jsx("input",{type:"checkbox","data-testid":"perf-use-cache-toggle",checked:y,onChange:de=>g==null?void 0:g(de.target.checked),className:"accent-sky-500 cursor-pointer"}),n.jsx("span",{children:I("performance.useCacheLabel")})]}),n.jsxs("div",{className:"p-2.5 rounded-lg bg-panel border border-line flex items-center justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"font-semibold text-muted",children:I("performance.cacheStatsTitle")}),P?n.jsxs("div",{className:"font-mono text-[11px] text-ink mt-0.5","data-testid":"cache-stats-summary",children:[P.total_repo_snapshots," snaps • ",P.total_file_artifacts," files •"," ",((P.physical_disk_bytes??P.total_size_bytes)/(1024*1024)).toFixed(2)," MB",typeof P.logical_payload_bytes=="number"&&n.jsxs(n.Fragment,{children:[" (",(P.logical_payload_bytes/(1024*1024)).toFixed(2)," MB payload)"]})," ","(",P.usage_pct,"%)"]}):n.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:I("performance.cacheEmpty")})]}),n.jsx("button",{type:"button","data-testid":"clear-cache-btn",disabled:le,onClick:()=>void dt(),className:"px-2.5 py-1.5 rounded-lg bg-raised hover:bg-danger/15 border border-line text-xs font-medium text-ink hover:text-danger cursor-pointer shrink-0 disabled:opacity-50",children:I(le?"performance.clearingCache":"performance.clearCacheBtn")})]}),ve&&n.jsx("div",{role:"status","data-testid":"cache-clear-status",className:"text-[11px] text-accent font-medium",children:ve})]}),n.jsx("div",{className:"flex justify-end pt-2 border-t border-line",children:n.jsx("button",{type:"button",onClick:()=>{var de;return(de=w.current)==null?void 0:de.close()},className:"px-4 py-1.5 rounded-lg bg-accent-solid hover:bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:I("common.close")})})]})})]})},Xf=({title:s,description:i,children:r,id:o})=>{const[c,f]=E.useState(!1),m=o||`info-tooltip-${s.toLowerCase().replace(/[^a-z0-9]/g,"-")}`;return n.jsxs("span",{className:"relative inline-flex items-center group cursor-help",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onFocus:()=>f(!0),onBlur:()=>f(!1),onKeyDown:h=>{h.key==="Escape"&&(h.stopPropagation(),f(!1))},tabIndex:0,role:"button","aria-describedby":c?m:void 0,"aria-label":`${s}: ${i}`,children:[n.jsx("span",{className:"border-b border-dotted border-muted/80 hover:border-accent transition-colors",children:r}),c&&n.jsxs("span",{id:m,role:"tooltip",className:"info-tooltip-popover absolute bottom-full left-1/2 -translate-x-1/2 mb-2 w-64 p-2.5 rounded-lg bg-panel border border-line shadow-xl text-ink text-left z-50 pointer-events-none animate-in fade-in duration-100",children:[n.jsx("span",{className:"block text-xs font-bold text-accent mb-1",children:s}),n.jsx("span",{className:"block text-[11px] text-muted leading-relaxed font-normal",children:i}),n.jsx("span",{className:"absolute top-full left-1/2 -translate-x-1/2 -mt-px border-4 border-transparent border-t-panel"})]})]})},ZS=({selectedFile:s,allCycles:i,allFindings:r,onSelectFile:o,packageFiles:c,onExpandPackage:f,workstationMode:m="simple",onOpenAdvisor:h})=>{const{t:p}=ft(),[v,y]=E.useState(""),g=async T=>{try{await navigator.clipboard.writeText(T),y(p("common.copied")),window.setTimeout(()=>y(""),2500)}catch{y(p("common.copyFailed")),window.setTimeout(()=>y(""),2500)}};if(!s)return n.jsxs("aside",{"aria-label":p("inspector.title"),"data-testid":"inspector-panel",className:"w-full lg:w-96 shrink-0 border-t lg:border-t-0 lg:border-l border-line bg-canvas p-6 flex flex-col items-center justify-center text-center text-xs text-muted",children:[n.jsx(di,{className:"w-8 h-8 text-muted mb-2","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold text-muted m-0",children:p("inspector.noSelectionTitle")}),n.jsx("p",{className:"mt-1 max-w-xs leading-relaxed",children:p("inspector.noSelectionDesc")})]});const b=i.filter(T=>s.cycle_ids.includes(T.id)),N=r.filter(T=>T.affected_files.includes(s.id)),j=s.support_level!=="full_ast"?p("inspector.roleIncomplete"):s.fan_in+s.fan_out===0?p("inspector.roleIsolated"):s.instability<=.3?p("inspector.roleStable"):s.instability>=.7?p("inspector.roleVolatile"):p("inspector.roleBalanced");return n.jsxs("aside",{"aria-label":p("inspector.title"),"data-testid":"inspector-panel",className:"w-full lg:w-96 shrink-0 border-t lg:border-t-0 lg:border-l border-line bg-canvas flex flex-col overflow-y-auto max-h-[45vh] lg:max-h-none",children:[n.jsxs("div",{className:"p-3.5 border-b border-line bg-panel",children:[c&&n.jsxs("section",{"aria-label":p("inspector.packageTitle"),className:"mb-3 border-b border-line pb-3",children:[n.jsx("h2",{className:"text-base font-semibold break-all text-ink",children:s.directory||"Repository root"}),n.jsxs("p",{className:"text-xs text-muted mt-0.5",children:[c.length," ",p("summary.files")," / ",c.reduce((T,H)=>T+H.lines_code,0).toLocaleString()," LOC"]}),n.jsxs("button",{type:"button",className:"text-xs text-accent font-semibold hover:underline cursor-pointer mt-1.5 flex items-center gap-1",onClick:f,children:[n.jsx(n_,{className:"w-3.5 h-3.5","aria-hidden":"true"}),p("inspector.expandPackage")]}),n.jsxs("p",{className:"text-[11px] text-muted mt-1.5",children:[p("inspector.moduleDetailsBelow")," ",n.jsx("span",{className:"font-mono text-ink",children:s.name})]})]}),n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"text-[11px] font-mono tracking-wide px-2 py-0.5 rounded bg-accent/15 text-accent border border-accent/30",children:s.language}),n.jsx("span",{className:`text-[11px] font-mono px-2 py-0.5 rounded border ${s.support_level==="full_ast"?"bg-success/15 text-success border-success/30":s.support_level==="partial_static"?"bg-warning/15 text-warning border-warning/30":"bg-raised text-muted border-line"}`,children:s.support_level})]}),n.jsx("div",{className:"mt-2 mb-1",children:n.jsx("h2",{"data-testid":"inspector-file-title",className:"text-sm font-bold font-mono text-ink break-all m-0",title:s.id,children:s.id})}),n.jsxs("div",{className:"copy-actions flex items-center gap-2 mt-1.5",children:[n.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded bg-raised hover:bg-line border border-line text-ink cursor-pointer",onClick:()=>void g(s.id),children:p("inspector.copyPath")}),n.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded bg-raised hover:bg-line border border-line text-ink cursor-pointer",onClick:()=>void g(JSON.stringify({path:s.id,fan_in:s.fan_in,fan_out:s.fan_out,instability:s.instability,support_level:s.support_level},null,2)),children:p("inspector.copyMetrics")}),v&&n.jsx("span",{role:"status",className:"text-xs font-semibold text-accent animate-in fade-in",children:v})]}),n.jsxs("div",{className:"text-[11px] text-muted flex items-center gap-2 mt-2",children:[n.jsxs("span",{children:[s.lines_code.toLocaleString()," LOC"]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:[s.lines_comment," ",p("inspector.comments")]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:[(s.size_bytes/1024).toFixed(1)," KB"]})]}),h&&(s.in_cycle||s.is_hub||N.length>0)&&n.jsxs("button",{type:"button","data-testid":"inspector-open-advisor-btn",onClick:h,className:"w-full mt-2.5 py-1.5 px-3 rounded bg-indigo-600/20 hover:bg-indigo-600/30 text-indigo-300 border border-indigo-500/30 text-xs font-medium flex items-center justify-center gap-1.5 transition cursor-pointer",children:[n.jsx(Et,{className:"w-3.5 h-3.5 text-indigo-400"}),n.jsx("span",{children:"Open in Refactoring Advisor"})]})]}),n.jsxs("div",{className:"inspector-body p-3.5 space-y-3.5 text-xs",children:[n.jsxs("section",{"aria-labelledby":"inspector-role-heading",className:"bg-panel border border-line rounded-md p-3",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{id:"inspector-role-heading",className:"text-[11px] font-bold text-muted uppercase tracking-wide",children:p("inspector.role")}),n.jsx("span",{className:"font-semibold text-accent",children:j})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-2.5 text-center",children:[n.jsxs("div",{className:"bg-canvas border border-line rounded p-2",children:[n.jsx("span",{className:"text-[11px] text-muted block",children:n.jsx(Xf,{title:p("help.fanInTitle"),description:p("help.fanInDesc"),children:p("inspector.fanIn")})}),n.jsx("span",{className:"text-base font-bold text-success font-mono block mt-0.5",children:s.fan_in})]}),n.jsxs("div",{className:"bg-canvas border border-line rounded p-2",children:[n.jsx("span",{className:"text-[11px] text-muted block",children:n.jsx(Xf,{title:p("help.fanOutTitle"),description:p("help.fanOutDesc"),children:p("inspector.fanOut")})}),n.jsx("span",{className:"text-base font-bold text-accent font-mono block mt-0.5",children:s.fan_out})]})]})]}),s.in_cycle&&n.jsxs("section",{"aria-labelledby":"inspector-cycles-heading",className:"bg-danger/10 border border-danger/40 rounded-md p-3 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5 text-danger font-semibold text-[11px]",children:[n.jsx(ml,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsxs("h3",{id:"inspector-cycles-heading",className:"m-0 font-bold",children:[p("inspector.cyclesHeading")," (",b.length,")"]})]}),b.map(T=>n.jsxs("div",{className:"bg-panel/80 p-2 rounded border border-danger/30 text-[11px]",children:[n.jsxs("div",{className:"font-mono text-danger font-bold",children:[T.id," (",T.length," hops)"]}),n.jsx("div",{className:"mt-1 font-mono text-[11px] text-muted space-y-0.5 break-all",children:T.nodes.map((H,_)=>n.jsxs("div",{className:"flex items-center gap-1",children:[_>0&&n.jsx("span",{children:"→"}),n.jsx("span",{className:H===s.id?"text-ink font-bold underline":"",children:H})]},_))})]},T.id))]}),N.length>0&&n.jsxs("section",{"aria-labelledby":"inspector-findings-heading",className:"bg-panel border border-line rounded-md p-3 space-y-2",children:[n.jsxs("h3",{id:"inspector-findings-heading",className:"text-[11px] font-bold text-muted uppercase tracking-wide m-0",children:[p("inspector.triggeredRulesHeading")," (",N.length,")"]}),N.map((T,H)=>n.jsxs("div",{className:`p-2.5 rounded border text-[11px] ${T.severity==="critical"?"bg-danger/10 border-danger/40 text-danger":"bg-warning/10 border-warning/40 text-warning"}`,children:[n.jsxs("div",{className:"flex items-center justify-between font-bold",children:[n.jsxs("span",{children:[T.rule_id,": ",p(`rules.${T.rule_id}.title`,T.title)]}),n.jsx("span",{className:"uppercase text-[10px] px-1.5 py-0.5 rounded bg-panel font-mono border",children:T.severity})]}),n.jsx("p",{className:"mt-1 text-ink leading-relaxed m-0 text-xs",children:p(`rules.${T.rule_id}.remediation`,T.remediation)})]},H))]}),n.jsxs("section",{"aria-labelledby":"inspector-outgoing-heading",className:"bg-panel border border-line rounded-md p-3",children:[n.jsxs("h3",{id:"inspector-outgoing-heading",className:"text-[11px] font-bold text-muted uppercase tracking-wide m-0 mb-1.5 flex items-center gap-1",children:[n.jsx(Db,{className:"w-3.5 h-3.5 text-accent"}),p("inspector.directImportsHeading")," (",s.imports_internal.length,")"]}),s.imports_internal.length===0?n.jsx("p",{className:"text-[11px] text-muted m-0 italic",children:p("common.none")}):n.jsx("div",{className:"flex flex-col gap-1 max-h-32 overflow-y-auto",children:s.imports_internal.map(T=>n.jsx("button",{type:"button",onClick:()=>o(T),className:"text-left font-mono text-[11px] text-accent hover:underline truncate cursor-pointer",title:T,children:T},T))})]}),n.jsxs("details",{"data-testid":"inspector-technical-details",open:m==="advanced",className:"bg-panel border border-line rounded-md p-3 group",children:[n.jsxs("summary",{className:"text-[11px] font-bold text-muted uppercase tracking-wide cursor-pointer flex items-center justify-between list-none select-none",children:[n.jsxs("span",{className:"flex items-center gap-1.5",children:[n.jsx($2,{className:"w-3.5 h-3.5 text-accent"}),p("inspector.advancedHeading")]}),n.jsx(Lb,{className:"w-3.5 h-3.5 text-muted transition-transform group-open:rotate-180"})]}),n.jsxs("div",{className:"mt-3 space-y-3 pt-2 border-t border-line text-xs",children:[n.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-[11px] text-muted",children:n.jsx(Xf,{title:p("help.instabilityTitle"),description:p("help.instabilityDesc"),children:p("inspector.instability")})}),n.jsx("span",{className:"font-mono font-bold text-ink",children:s.instability.toFixed(2)})]}),s.git_commits>0&&n.jsxs("div",{className:"p-2 rounded bg-canvas border border-line flex items-center justify-between",children:[n.jsxs("span",{className:"text-[11px] text-muted flex items-center gap-1",children:[n.jsx(Or,{className:"w-3.5 h-3.5 text-muted"}),p("inspector.gitCommits")]}),n.jsxs("span",{className:"font-mono text-ink font-semibold",children:[s.git_commits," ",p("summary.commits")]})]}),s.imports_external.length>0&&n.jsxs("div",{children:[n.jsxs("span",{className:"text-[11px] font-semibold text-muted block mb-1",children:[p("inspector.externalImportsHeading")," (",s.imports_external.length,")"]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:s.imports_external.map((T,H)=>n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-raised border border-line font-mono text-[11px] text-muted",children:T},H))})]}),s.symbols.length>0&&n.jsxs("div",{children:[n.jsxs("span",{className:"text-[11px] font-semibold text-muted block mb-1",children:[p("inspector.symbolsHeading")," (",s.symbols.length,")"]}),n.jsx("div",{className:"max-h-28 overflow-y-auto font-mono text-[11px] text-muted space-y-0.5",children:s.symbols.map((T,H)=>n.jsxs("div",{className:"truncate",title:T.name,children:[n.jsx("span",{className:"text-accent",children:T.kind})," ",T.name]},H))})]})]})]})]})]})},PS=({analysisId:s,onSelectFileInStudio:i,onSelectSymbolForTrace:r,onSelectEvidence:o})=>{const{t:c}=ft(),[f,m]=E.useState(""),[h,p]=E.useState(""),[v,y]=E.useState(""),[g,b]=E.useState(""),[N,j]=E.useState(!1),[T,H]=E.useState(null),[_,K]=E.useState(null),[z,D]=E.useState(null),O=async C=>{if(C&&C.preventDefault(),!!f.trim()){j(!0),K(null);try{const F=await Q_(s,{query:f.trim(),limit:15,kind:v||void 0,path_filter:g.trim()||void 0,language:h||void 0});H(F)}catch(F){K(F instanceof Error?F.message:c("intelligence.searchFailed","Search failed."))}finally{j(!1)}}},U=(C,F)=>{navigator.clipboard.writeText(C),D(F),setTimeout(()=>D(null),1800)},q=C=>{switch(C){case"HIGH":return"bg-success/15 text-success border-success/30";case"MEDIUM":return"bg-warning/15 text-warning border-warning/30";case"LOW":default:return"bg-muted/15 text-muted border-line"}};return n.jsxs("div",{className:"flex flex-col h-full bg-canvas overflow-y-auto",children:[n.jsx("div",{className:"p-4 bg-panel border-b border-line shadow-xs shrink-0",children:n.jsxs("form",{onSubmit:O,className:"flex flex-col gap-3 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Ra,{className:"w-4 h-4 text-muted absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none"}),n.jsx("input",{type:"text","data-testid":"smart-search-input",value:f,onChange:C=>m(C.target.value),placeholder:c("intelligence.searchPlaceholder",'Search symbols, services, controllers, or architectural roles (e.g. "auth session token", "Tarjan cycles")…'),className:"w-full pl-9 pr-4 py-2 bg-canvas border border-line rounded-md text-xs text-ink placeholder:text-muted focus:outline-hidden focus:border-accent"})]}),n.jsxs("button",{type:"submit","data-testid":"smart-search-submit-btn",disabled:N||!f.trim(),className:"px-4 py-2 bg-accent-solid text-white text-xs font-medium rounded-md hover:opacity-90 transition cursor-pointer flex items-center gap-1.5 shrink-0",children:[n.jsx(Et,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:N?c("common.searching","Searching…"):c("common.search","Search")})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[n.jsxs("span",{className:"flex items-center gap-1 font-medium text-ink",children:[n.jsx(Rm,{className:"w-3 h-3"}),n.jsxs("span",{children:[c("intelligence.filters","Filters"),":"]})]}),n.jsxs("select",{value:h,onChange:C=>p(C.target.value),className:"bg-canvas border border-line rounded px-2 py-1 text-xs text-ink cursor-pointer","aria-label":c("intelligence.filterLanguage","Filter by language"),children:[n.jsx("option",{value:"",children:c("intelligence.allLanguages","All Languages")}),n.jsx("option",{value:"Python",children:"Python"}),n.jsx("option",{value:"TypeScript",children:"TypeScript"}),n.jsx("option",{value:"JavaScript",children:"JavaScript"}),n.jsx("option",{value:"Go",children:"Go"})]}),n.jsxs("select",{value:v,onChange:C=>y(C.target.value),className:"bg-canvas border border-line rounded px-2 py-1 text-xs text-ink cursor-pointer","aria-label":c("intelligence.filterKind","Filter by symbol kind"),children:[n.jsx("option",{value:"",children:c("intelligence.allKinds","All Symbol Kinds")}),n.jsx("option",{value:"class",children:c("intelligence.class","Class")}),n.jsx("option",{value:"function",children:c("intelligence.function","Function")}),n.jsx("option",{value:"method",children:c("intelligence.method","Method")}),n.jsx("option",{value:"interface",children:c("intelligence.interface","Interface")}),n.jsx("option",{value:"type",children:c("intelligence.type","Type")}),n.jsx("option",{value:"struct",children:c("intelligence.struct","Struct")})]}),n.jsx("input",{type:"text",value:g,onChange:C=>b(C.target.value),placeholder:c("intelligence.pathFilterPlaceholder","Path prefix (e.g. backend/api)"),className:"bg-canvas border border-line rounded px-2 py-1 text-xs text-ink placeholder:text-muted max-w-[180px]"}),(h||v||g)&&n.jsx("button",{type:"button",onClick:()=>{p(""),y(""),b("")},className:"text-xs text-accent hover:underline cursor-pointer ml-1",children:c("common.reset","Reset filters")})]})]})}),n.jsxs("div",{className:"flex-1 p-4 max-w-5xl mx-auto w-full",children:[_&&n.jsxs("div",{className:"p-3 mb-4 rounded-md bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:_})]}),T&&n.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2 pb-2 border-b border-line text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"font-semibold text-ink",children:c("intelligence.resultsFound","Found {{count}} matching modules",{count:T.total_matches})}),n.jsxs("span",{className:"px-2 py-0.5 rounded-full text-[11px] font-mono bg-raised border border-line text-muted",children:[c("intelligence.intent","Intent"),": ",T.query_intent]})]}),T.tokens_evaluated.length>0&&n.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-muted",children:[n.jsxs("span",{children:[c("intelligence.evaluatedTerms","Terms"),":"]}),n.jsxs("span",{className:"font-mono text-ink",children:[T.tokens_evaluated.slice(0,6).join(", "),T.tokens_evaluated.length>6?"…":""]})]})]}),T!=null&&T.matches&&T.matches.length>0?n.jsx("div",{className:"space-y-4",children:T.matches.map((C,F)=>n.jsxs("div",{className:"p-4 rounded-lg bg-panel border border-line shadow-xs hover:border-accent/50 transition flex flex-col gap-3",children:[n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"w-5 h-5 rounded-full bg-raised border border-line flex items-center justify-center text-[10px] font-mono text-muted",children:F+1}),n.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(C.file_id),className:"font-mono font-semibold text-xs text-ink hover:text-accent hover:underline text-left cursor-pointer flex items-center gap-1.5",children:[n.jsx("span",{children:C.file_id}),n.jsx(ed,{className:"w-3 h-3 text-muted"})]}),n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono bg-raised text-muted",children:C.language}),C.is_hub&&n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium bg-accent/15 text-accent border border-accent/30",children:c("intelligence.hubModule","Hub")}),C.in_cycle&&n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium bg-danger/15 text-danger border border-danger/30",children:c("intelligence.cycle","Cyclic")})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-bold border uppercase ${q(C.relevance_tier)}`,children:C.relevance_tier}),n.jsxs("div",{className:"text-right",children:[n.jsxs("div",{className:"text-xs font-mono font-bold text-ink",children:[C.score.toFixed(1)," pts"]}),n.jsx("div",{className:"w-16 h-1.5 bg-raised rounded-full overflow-hidden mt-0.5 border border-line",children:n.jsx("div",{className:"h-full bg-accent-solid rounded-full",style:{width:`${Math.min(100,C.score/60*100)}%`}})})]})]})]}),C.match_reasons.length>0&&n.jsxs("div",{className:"bg-canvas p-2.5 rounded border border-line text-xs",children:[n.jsxs("div",{className:"text-[11px] font-medium text-muted mb-1 flex items-center gap-1",children:[n.jsx(Gt,{className:"w-3 h-3 text-accent"}),n.jsxs("span",{children:[c("intelligence.matchEvidence","Scoring & Retrieval Rationale"),":"]})]}),n.jsx("ul",{className:"space-y-0.5 pl-4 list-disc text-ink text-[11px]",children:C.match_reasons.map((G,Y)=>n.jsx("li",{children:G},Y))})]}),C.matched_symbols.length>0&&n.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[n.jsxs("span",{className:"text-[11px] text-muted flex items-center gap-1",children:[n.jsx(fl,{className:"w-3 h-3"}),n.jsxs("span",{children:[c("intelligence.matchedSymbols","Matched Symbols"),":"]})]}),C.matched_symbols.map(G=>n.jsxs("button",{type:"button","data-testid":"trace-symbol-btn",onClick:()=>r==null?void 0:r(G.id),className:"px-2 py-1 rounded-md text-[11px] font-mono bg-raised border border-line hover:border-accent text-ink hover:text-accent cursor-pointer flex items-center gap-1 transition",title:c("intelligence.clickToTrace","Click to trace callers and blast radius"),children:[n.jsxs("span",{className:"text-muted text-[10px] uppercase font-semibold",children:["[",G.kind,"]"]}),n.jsx("span",{children:G.name}),n.jsxs("span",{className:"text-muted text-[10px]",children:["L",G.line_start]}),n.jsx(ai,{className:"w-2.5 h-2.5 text-muted"})]},G.id))]}),C.snippet&&n.jsxs("div",{className:"relative group rounded bg-canvas border border-line p-2 text-xs font-mono overflow-x-auto",children:[n.jsx("div",{className:"absolute right-2 top-2 opacity-0 group-hover:opacity-100 transition",children:n.jsx("button",{type:"button",onClick:()=>U(C.snippet||"",C.file_id),className:"p-1 rounded bg-panel border border-line hover:bg-raised text-muted hover:text-ink cursor-pointer",title:c("common.copy","Copy snippet"),children:z===C.file_id?n.jsx(jn,{className:"w-3.5 h-3.5 text-success"}):n.jsx(xs,{className:"w-3.5 h-3.5"})})}),n.jsx("pre",{className:"text-ink text-[11px] leading-relaxed whitespace-pre-wrap",children:C.snippet})]}),n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 pt-2 border-t border-line text-xs",children:[n.jsxs("div",{className:"flex items-center gap-3 text-muted text-[11px]",children:[n.jsx("span",{children:c("intelligence.loc","{{count}} LOC",{count:C.lines_code})}),n.jsxs("span",{children:["Fan-In: ",C.fan_in]}),n.jsxs("span",{children:["Fan-Out: ",C.fan_out]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[C.evidence_items.length>0&&o&&n.jsxs("button",{type:"button",onClick:()=>o(C.evidence_items[0].evidence_id),className:"px-2.5 py-1 rounded bg-raised border border-line hover:border-accent text-ink text-xs font-medium cursor-pointer flex items-center gap-1 transition",children:[n.jsx(Gt,{className:"w-3 h-3 text-accent"}),n.jsx("span",{children:c("intelligence.inspectEvidence","Evidence ({{count}})",{count:C.evidence_items.length})})]}),n.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(C.file_id),className:"px-2.5 py-1 rounded bg-accent-solid text-white text-xs font-medium cursor-pointer hover:opacity-90 flex items-center gap-1 transition",children:[n.jsx(cn,{className:"w-3 h-3"}),n.jsx("span",{children:c("intelligence.viewInStudio","View in Studio")})]})]})]})]},C.file_id))}):T&&!N?n.jsxs("div",{className:"p-8 text-center bg-panel rounded-lg border border-line text-muted",children:[n.jsx(Ra,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),n.jsx("p",{className:"text-xs font-medium text-ink mb-1",children:c("intelligence.noResults","No matching modules found.")}),n.jsx("p",{className:"text-[11px]",children:T.summary_text})]}):!N&&n.jsxs("div",{className:"p-8 text-center bg-panel/50 rounded-lg border border-dashed border-line text-muted",children:[n.jsx(Et,{className:"w-8 h-8 mx-auto mb-2 text-accent opacity-70"}),n.jsx("p",{className:"text-xs font-medium text-ink mb-1",children:c("intelligence.emptyPrompt","Enter a natural language or symbol query to explore the repository brain.")}),n.jsx("p",{className:"text-[11px] max-w-md mx-auto",children:c("intelligence.emptyHint",'Examples: "PR architecture guardian rules", "fastapi app routing endpoints", "tarjan circular dependency detector"')})]})]})]})},JS=({analysisId:s})=>{var F;const{t:i}=ft(),[r,o]=E.useState("focused"),[c,f]=E.useState(""),[m,h]=E.useState(2e3),[p,v]=E.useState(!1),[y]=E.useState([]),[g,b]=E.useState("markdown"),[N,j]=E.useState(null),[T,H]=E.useState(!1),[_,K]=E.useState(null),[z,D]=E.useState(!1),O=async G=>{G&&G.preventDefault(),H(!0),K(null);try{const Y=await eS(s,{mode:r,query:r==="focused"&&c.trim()||void 0,target_files:y.length>0?y:void 0,max_tokens:m,minimal_contract:p});j(Y)}catch(Y){K(Y instanceof Error?Y.message:"Failed to generate agent context.")}finally{H(!1)}},U=()=>{if(!N)return;const G=g==="json"?JSON.stringify(N,null,2):N.summary+`
|
|
490
|
+
|
|
491
|
+
`+(N.evidence||[]).map(Y=>`- ${Y}`).join(`
|
|
492
|
+
`);navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1800)},q=()=>{if(!N)return;const G=g==="json",Y=G?JSON.stringify(N,null,2):N.summary+`
|
|
493
|
+
|
|
494
|
+
`+(N.evidence||[]).map(R=>`- ${R}`).join(`
|
|
495
|
+
`),I=new Blob([Y],{type:G?"application/json":"text/markdown"}),W=URL.createObjectURL(I),w=document.createElement("a");w.href=W,w.download=`repodna-context-${r}.${G?"json":"md"}`,w.click(),URL.revokeObjectURL(W)},C=[500,1e3,2e3,4e3,8e3];return n.jsxs("div",{className:"flex flex-col h-full bg-canvas overflow-y-auto",children:[n.jsx("div",{className:"p-4 bg-panel border-b border-line shadow-xs shrink-0",children:n.jsxs("form",{onSubmit:O,className:"flex flex-col gap-4 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-sm font-bold text-ink flex items-center gap-2",children:[n.jsx(Bc,{className:"w-4 h-4 text-accent"}),n.jsx("span",{children:i("intelligence.contextPanelTitle","AI Agent Architecture Context Generator")})]}),n.jsx("p",{className:"text-xs text-muted mt-0.5",children:i("intelligence.contextSubtitle","Controlled, deterministic architectural context with token budgeting and verifiable evidence ledger.")})]}),n.jsxs("div",{className:"flex rounded-md p-1 bg-raised border border-line",children:[n.jsx("button",{type:"button","data-testid":"context-mode-compact-btn",onClick:()=>o("compact"),className:`px-3 py-1 rounded text-xs font-medium transition cursor-pointer ${r==="compact"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:i("intelligence.modeCompact","Compact")}),n.jsx("button",{type:"button","data-testid":"context-mode-focused-btn",onClick:()=>o("focused"),className:`px-3 py-1 rounded text-xs font-medium transition cursor-pointer ${r==="focused"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:i("intelligence.modeFocused","Focused")}),n.jsx("button",{type:"button","data-testid":"context-mode-deep-btn",onClick:()=>o("deep"),className:`px-3 py-1 rounded text-xs font-medium transition cursor-pointer ${r==="deep"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink"}`,children:i("intelligence.modeDeep","Deep")})]})]}),r==="focused"&&n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-ink mb-1",children:i("intelligence.targetQuery","Target Query / Task Scope")}),n.jsx("input",{type:"text","data-testid":"context-query-input",value:c,onChange:G=>f(G.target.value),placeholder:i("intelligence.queryContextPlaceholder",'e.g. "auth session token validation", "Tarjan circular dependency detector", "fastapi routes"'),className:"w-full px-3 py-1.5 bg-canvas border border-line rounded text-xs text-ink placeholder:text-muted focus:outline-hidden focus:border-accent"})]}),n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"font-medium text-ink",children:[i("intelligence.tokenBudget","Token Budget"),":"]}),n.jsx("div",{className:"flex items-center gap-1",children:C.map(G=>n.jsx("button",{type:"button","data-testid":`preset-${G}-btn`,onClick:()=>h(G),className:`px-2 py-0.5 rounded font-mono text-[11px] transition cursor-pointer border ${m===G?"bg-accent/15 border-accent text-accent font-bold":"bg-canvas border-line text-muted hover:text-ink"}`,children:G},G))}),n.jsx("input",{type:"number",min:50,max:32e3,step:100,value:m,onChange:G=>h(parseInt(G.target.value,10)||1e3),className:"w-20 px-2 py-0.5 bg-canvas border border-line rounded text-xs font-mono text-ink text-center"})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-ink cursor-pointer",children:[n.jsx("input",{type:"checkbox","data-testid":"minimal-contract-checkbox",checked:p,onChange:G=>v(G.target.checked),className:"rounded border-line text-accent cursor-pointer"}),n.jsx("span",{children:i("intelligence.minimalContract","Minimal Response Contract")})]}),n.jsxs("button",{type:"submit","data-testid":"generate-context-btn",onClick:G=>{G.preventDefault(),O()},disabled:T,className:"px-4 py-1.5 bg-accent-solid text-white text-xs font-medium rounded hover:opacity-90 transition cursor-pointer flex items-center gap-1.5",children:[n.jsx(Et,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:T?i("common.generating","Generating…"):i("intelligence.generateContext","Build Context")})]})]})]})]})}),n.jsxs("div",{className:"flex-1 p-4 max-w-5xl mx-auto w-full flex flex-col gap-4",children:[_&&n.jsxs("div",{className:"p-3 rounded bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:_})]}),N?n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsxs("div",{className:"p-3 rounded-lg bg-panel border border-line shadow-xs flex flex-wrap items-center justify-between gap-3 text-xs",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("span",{className:"font-semibold text-ink",children:[i("intelligence.contextOutputTokens","Context Size"),":"]}),n.jsxs("span",{className:"px-2 py-0.5 rounded font-mono font-bold bg-raised border border-line text-ink",children:[(F=N.estimated_tokens)==null?void 0:F.toLocaleString()," tokens"]}),n.jsxs("span",{className:"text-[11px] text-muted",children:["(",N.token_counting_method==="tiktoken_cl100k"?"tiktoken cl100k":"heuristic ~4 chars/tok",")"]}),N.token_savings_pct!==void 0&&N.token_savings_pct>0&&n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-bold bg-success/15 text-success border border-success/30",children:[N.token_savings_pct.toFixed(1),"% ",i("intelligence.tokenReduction","reduction vs codebase")]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[N.truncated?n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-warning/15 text-warning border border-warning/30 flex items-center gap-1",children:[n.jsx(Jt,{className:"w-3 h-3"}),n.jsx("span",{children:"TRUNCATED TO FIT BUDGET"})]}):n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-success/15 text-success border border-success/30 flex items-center gap-1",children:[n.jsx(jn,{className:"w-3 h-3"}),n.jsx("span",{children:"BUDGET COMPLIANT"})]}),N.continuation_token&&n.jsxs("span",{className:"text-[10px] font-mono text-muted",children:["Next: ",N.continuation_token]})]})]}),N.limitations.some(G=>G.includes("exceeds requested budget"))&&n.jsxs("div",{className:"p-3 rounded bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:i("intelligence.metadataOverflowAlert","Minimal metadata envelope exceeds requested budget. Increase token budget to fit full headers.")})]}),n.jsxs("div",{className:"flex items-center justify-between pt-1",children:[n.jsxs("div",{className:"flex rounded p-0.5 bg-raised border border-line text-xs",children:[n.jsx("button",{type:"button",onClick:()=>b("markdown"),className:`px-3 py-1 rounded text-xs font-medium cursor-pointer transition ${g==="markdown"?"bg-panel text-ink shadow-xs":"text-muted hover:text-ink"}`,children:"Markdown"}),n.jsx("button",{type:"button",onClick:()=>b("json"),className:`px-3 py-1 rounded text-xs font-medium cursor-pointer transition ${g==="json"?"bg-panel text-ink shadow-xs":"text-muted hover:text-ink"}`,children:"JSON"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:q,className:"px-2.5 py-1 rounded bg-raised border border-line hover:border-accent text-xs font-medium text-ink cursor-pointer flex items-center gap-1 transition",children:[n.jsx(zn,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Download"})]}),n.jsx("button",{type:"button",onClick:U,className:"px-3 py-1 rounded bg-accent-solid text-white text-xs font-medium cursor-pointer hover:opacity-90 flex items-center gap-1.5 transition",children:z?n.jsxs(n.Fragment,{children:[n.jsx(jn,{className:"w-3.5 h-3.5 text-success"}),n.jsx("span",{children:"Copied!"})]}):n.jsxs(n.Fragment,{children:[n.jsx(xs,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:"Copy Context"})]})})]})]}),n.jsx("div",{className:"rounded-lg bg-panel border border-line shadow-xs p-4 font-mono text-xs overflow-x-auto max-h-[550px] overflow-y-auto",children:n.jsx("pre",{className:"text-ink leading-relaxed whitespace-pre-wrap",children:g==="json"?JSON.stringify(N,null,2):N.summary+`
|
|
496
|
+
|
|
497
|
+
`+(N.relevant_modules&&N.relevant_modules.length>0?`### Relevant Modules
|
|
498
|
+
`+N.relevant_modules.map(G=>`- **${G.id}** (${G.language||"code"}): Fan-In ${G.fan_in}, Fan-Out ${G.fan_out}`).join(`
|
|
499
|
+
`)+`
|
|
500
|
+
|
|
501
|
+
`:"")+(N.evidence&&N.evidence.length>0?`### Architectural Evidence Citations
|
|
502
|
+
`+N.evidence.map(G=>`- ${G}`).join(`
|
|
503
|
+
`):"")})})]}):T?null:n.jsxs("div",{className:"p-12 text-center bg-panel/50 rounded-lg border border-dashed border-line text-muted my-auto",children:[n.jsx(Bc,{className:"w-10 h-10 mx-auto mb-2 text-accent opacity-70"}),n.jsx("p",{className:"text-xs font-medium text-ink mb-1",children:i("intelligence.contextEmptyTitle",'Configure mode & token budget and click "Build Context".')}),n.jsx("p",{className:"text-[11px] max-w-md mx-auto",children:i("intelligence.contextEmptyDesc","Outputs bounded, deterministic architectural knowledge for LLMs without flooding token windows.")})]})]})]})},WS=({analysisId:s,initialEvidenceId:i,onSelectFileInStudio:r,onSelectSymbolForTrace:o})=>{const{t:c}=ft(),[f,m]=E.useState(""),[h,p]=E.useState(""),[v,y]=E.useState(""),[g,b]=E.useState(""),[N,j]=E.useState(null),[T,H]=E.useState(null),[_,K]=E.useState(!1),[z,D]=E.useState(null),[O,U]=E.useState(!1),q=async()=>{K(!0),D(null);try{const Y=await J_(s,{file_path:f.trim()||void 0,symbol_name:h.trim()||void 0,evidence_type:g||void 0,check_staleness:!0,limit:100});j(Y),Y.evidence_items.length>0&&!T&&H(Y.evidence_items[0])}catch(Y){D(Y instanceof Error?Y.message:"Failed to load evidence ledger.")}finally{K(!1)}};E.useEffect(()=>{q()},[s,g]),E.useEffect(()=>{i&&W_(s,i,!0).then(Y=>H(Y)).catch(()=>{})},[s,i]);const C=Y=>{navigator.clipboard.writeText(Y),U(!0),setTimeout(()=>U(!1),1800)},F=Y=>{switch(Y){case"fresh":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-success/15 text-success border border-success/30 flex items-center gap-1",children:[n.jsx(jn,{className:"w-3 h-3"}),n.jsx("span",{children:"FRESH"})]});case"line_shift":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-warning/15 text-warning border border-warning/30 flex items-center gap-1",children:[n.jsx(Am,{className:"w-3 h-3"}),n.jsx("span",{children:"LINE SHIFT"})]});case"content_changed":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-danger/15 text-danger border border-danger/30 flex items-center gap-1",children:[n.jsx(Jt,{className:"w-3 h-3"}),n.jsx("span",{children:"CONTENT CHANGED"})]});case"revision_mismatch":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-accent/15 text-accent border border-accent/30 flex items-center gap-1",children:[n.jsx(Or,{className:"w-3 h-3"}),n.jsx("span",{children:"REVISION MISMATCH"})]});case"file_deleted":default:return n.jsxs("span",{className:"px-2 py-0.5 rounded text-[10px] font-semibold bg-muted/20 text-muted border border-line flex items-center gap-1",children:[n.jsx(kw,{className:"w-3 h-3"}),n.jsx("span",{children:"FILE DELETED"})]})}},G=((N==null?void 0:N.evidence_items)||[]).filter(Y=>!(v&&Y.staleness_reason!==v));return n.jsxs("div",{className:"flex flex-col h-full bg-canvas overflow-hidden",children:[n.jsx("div",{className:"p-4 bg-panel border-b border-line shadow-xs shrink-0",children:n.jsxs("form",{onSubmit:Y=>{Y.preventDefault(),q()},className:"flex flex-col gap-3 max-w-7xl mx-auto",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Gt,{className:"w-4 h-4 text-accent"}),n.jsx("h2",{className:"text-sm font-bold text-ink",children:c("intelligence.evidenceLedger","Architectural Evidence Ledger")}),N&&n.jsxs("span",{className:"px-2 py-0.5 rounded-full text-[11px] font-mono bg-raised border border-line text-muted",children:[N.total_evidence," total citations (",N.stale_count," stale)"]})]}),n.jsxs("button",{type:"button","data-testid":"verify-staleness-btn",onClick:()=>void q(),className:"px-3 py-1.5 rounded-md bg-raised border border-line hover:border-accent text-xs font-medium text-ink cursor-pointer flex items-center gap-1.5 transition",children:[n.jsx(bn,{className:`w-3.5 h-3.5 ${_?"animate-spin":""}`}),n.jsx("span",{children:c("intelligence.verifyStaleness","Verify Staleness")})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[n.jsxs("div",{className:"relative min-w-[200px] flex-1",children:[n.jsx(Ra,{className:"w-3.5 h-3.5 text-muted absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none"}),n.jsx("input",{type:"text",value:f,onChange:Y=>m(Y.target.value),placeholder:c("intelligence.filterByFilePath","Filter by file path (e.g. backend/api)…"),className:"w-full pl-8 pr-3 py-1.5 bg-canvas border border-line rounded text-xs text-ink placeholder:text-muted"})]}),n.jsx("input",{type:"text",value:h,onChange:Y=>p(Y.target.value),placeholder:c("intelligence.filterBySymbol","Symbol name…"),className:"px-3 py-1.5 bg-canvas border border-line rounded text-xs text-ink placeholder:text-muted max-w-[160px]"}),n.jsxs("select",{value:v,onChange:Y=>y(Y.target.value),className:"bg-canvas border border-line rounded px-2.5 py-1.5 text-xs text-ink cursor-pointer",children:[n.jsx("option",{value:"",children:c("intelligence.allStaleness","All Staleness Statuses")}),n.jsx("option",{value:"fresh",children:"Fresh (Verified)"}),n.jsx("option",{value:"line_shift",children:"Line Shift"}),n.jsx("option",{value:"content_changed",children:"Content Changed"}),n.jsx("option",{value:"revision_mismatch",children:"Revision Mismatch"}),n.jsx("option",{value:"file_deleted",children:"File Deleted"})]}),n.jsxs("select",{value:g,onChange:Y=>b(Y.target.value),className:"bg-canvas border border-line rounded px-2.5 py-1.5 text-xs text-ink cursor-pointer",children:[n.jsx("option",{value:"",children:c("intelligence.allEvidenceTypes","All Evidence Types")}),n.jsx("option",{value:"symbol_definition",children:"Symbol Definition"}),n.jsx("option",{value:"symbol_reference",children:"Symbol Reference"}),n.jsx("option",{value:"import_statement",children:"Import Statement"}),n.jsx("option",{value:"dependency_edge",children:"Dependency Edge"}),n.jsx("option",{value:"architectural_hub",children:"Architectural Hub"}),n.jsx("option",{value:"contract_violation",children:"Contract Violation"}),n.jsx("option",{value:"cycle_participation",children:"Cycle Participation"})]}),n.jsx("button",{type:"submit",className:"px-3 py-1.5 bg-accent-solid text-white text-xs font-medium rounded hover:opacity-90 transition cursor-pointer",children:c("common.filter","Filter")})]})]})}),n.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[n.jsxs("div",{className:"w-1/2 border-r border-line bg-canvas overflow-y-auto p-3 space-y-2",children:[z&&n.jsxs("div",{className:"p-3 mb-2 rounded bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:z})]}),G.map(Y=>n.jsxs("button",{type:"button","data-testid":"evidence-item-btn",onClick:()=>H(Y),className:`w-full p-3 rounded-lg border text-left transition cursor-pointer flex flex-col gap-1.5 ${(T==null?void 0:T.evidence_id)===Y.evidence_id?"bg-panel border-accent shadow-xs":"bg-panel/70 border-line hover:border-line-hover hover:bg-panel"}`,children:[n.jsxs("div",{className:"flex items-center justify-between text-xs font-mono",children:[n.jsxs("span",{className:"font-semibold text-ink flex items-center gap-1.5",children:[n.jsx(Gt,{className:"w-3.5 h-3.5 text-accent"}),n.jsx("span",{children:Y.evidence_id})]}),F(Y.staleness_reason)]}),n.jsxs("div",{className:"text-xs font-mono text-ink truncate",children:[Y.file_path,":",Y.line_start,"–",Y.line_end]}),n.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted",children:[n.jsx("span",{className:"uppercase text-[10px] font-semibold text-muted",children:Y.evidence_type.replace(/_/g," ")}),Y.symbol_name&&n.jsxs("span",{className:"font-mono text-accent",children:["sym: ",Y.symbol_name]})]})]},Y.evidence_id)),G.length===0&&!_&&n.jsx("div",{className:"p-8 text-center text-muted text-xs",children:c("intelligence.noEvidenceFound","No evidence citations match current filters.")})]}),n.jsx("div",{className:"w-1/2 bg-panel overflow-y-auto p-4 flex flex-col gap-4",children:T?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-start justify-between pb-3 border-b border-line gap-2",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-sm font-mono font-bold text-ink",children:T.evidence_id}),F(T.staleness_reason)]}),n.jsxs("div",{className:"text-xs font-mono text-muted mt-0.5",children:["Git Revision: ",n.jsx("span",{className:"text-ink font-semibold",children:T.repository_revision})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[T.symbol_name&&o&&n.jsxs("button",{type:"button",onClick:()=>o(T.symbol_name||""),className:"px-2.5 py-1 rounded bg-raised border border-line hover:border-accent text-xs font-medium text-ink cursor-pointer flex items-center gap-1 transition",children:[n.jsx(fl,{className:"w-3 h-3"}),n.jsx("span",{children:c("intelligence.traceSymbol","Trace Symbol")})]}),n.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(T.file_path),className:"px-2.5 py-1 rounded bg-accent-solid text-white text-xs font-medium cursor-pointer hover:opacity-90 flex items-center gap-1 transition",children:[n.jsx(ed,{className:"w-3 h-3"}),n.jsx("span",{children:c("intelligence.viewInStudio","View in Studio")})]})]})]}),T.staleness_details&&n.jsxs("div",{className:`p-3 rounded text-xs border ${T.is_stale?"bg-warning/10 border-warning/30 text-warning":"bg-success/10 border-success/30 text-success"}`,children:[n.jsxs("div",{className:"font-semibold mb-0.5",children:[c("intelligence.stalenessCheck","Staleness Verification"),":"]}),n.jsx("div",{children:T.staleness_details}),T.line_shift_delta!==null&&T.line_shift_delta!==void 0&&T.line_shift_delta!==0&&n.jsxs("div",{className:"mt-1 font-mono text-[11px]",children:["Shift delta: ",T.line_shift_delta>0?`+${T.line_shift_delta}`:T.line_shift_delta," lines"]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[n.jsxs("div",{className:"p-2.5 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:c("intelligence.filePath","File Path")}),n.jsx("span",{className:"font-mono text-ink text-xs truncate block",children:T.file_path}),n.jsxs("span",{className:"text-muted text-[11px]",children:["Lines ",T.line_start,"–",T.line_end]})]}),n.jsxs("div",{className:"p-2.5 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:c("intelligence.evidenceType","Evidence Type")}),n.jsx("span",{className:"font-mono text-ink text-xs capitalize",children:T.evidence_type.replace(/_/g," ")}),n.jsx("span",{className:"text-muted text-[11px] block",children:T.support_level})]})]}),n.jsxs("div",{className:"p-3 rounded bg-canvas border border-line text-xs",children:[n.jsx("div",{className:"text-[11px] font-semibold text-muted uppercase mb-1",children:c("intelligence.confidenceReason","Validity Proof & Rationale")}),n.jsx("div",{className:"text-ink leading-relaxed",children:T.confidence_reason})]}),T.code_snippet?n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs text-muted",children:[n.jsxs("span",{className:"font-semibold text-ink flex items-center gap-1",children:[n.jsx(Dr,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:c("intelligence.sourceSnippet","Source Code Snippet")})]}),n.jsx("button",{type:"button",onClick:()=>C(T.code_snippet||""),className:"px-2 py-0.5 rounded bg-raised border border-line hover:border-accent text-[11px] text-ink cursor-pointer flex items-center gap-1 transition",children:O?n.jsxs(n.Fragment,{children:[n.jsx(jn,{className:"w-3 h-3 text-success"}),n.jsx("span",{children:"Copied"})]}):n.jsxs(n.Fragment,{children:[n.jsx(xs,{className:"w-3 h-3"}),n.jsx("span",{children:"Copy"})]})})]}),n.jsx("div",{className:"rounded bg-canvas border border-line p-3 font-mono text-xs overflow-x-auto",children:n.jsx("pre",{className:"text-ink leading-relaxed whitespace-pre-wrap",children:T.code_snippet})})]}):n.jsx("div",{className:"p-4 rounded bg-canvas border border-dashed border-line text-xs text-muted text-center",children:c("intelligence.noSnippetAvailable","No snippet captured for this evidence citation.")})]}):n.jsx("div",{className:"p-8 text-center text-muted text-xs my-auto",children:c("intelligence.selectEvidencePrompt","Select an evidence reference from the left pane to view details and live staleness verification.")})})]})]})},ek=({analysisId:s,initialSymbolId:i,onSelectFileInStudio:r,onSelectEvidence:o})=>{const{t:c}=ft(),[f,m]=E.useState(""),[h,p]=E.useState(""),[v,y]=E.useState([]),[g,b]=E.useState(i??null),[N,j]=E.useState(null),[T,H]=E.useState(!1),[_,K]=E.useState(null);E.useEffect(()=>{if(!g)return;let O=!0;return H(!0),K(null),P_(s,g).then(U=>{O&&(j(U),H(!1))}).catch(U=>{O&&(K(U instanceof Error?U.message:"Failed to trace symbol."),H(!1))}),()=>{O=!1}},[s,g]);const z=async O=>{if(O&&O.preventDefault(),!!f.trim()){H(!0),K(null);try{const U=await Z_(s,{name:f.trim(),kind:h||void 0,limit:30});y(U.symbols),U.symbols.length===1?b(U.symbols[0].id):U.symbols.length===0&&K(c("intelligence.noSymbolsFound","No symbols found matching query."))}catch(U){K(U instanceof Error?U.message:"Failed to search symbols.")}finally{H(!1)}}},D=O=>{switch(O){case"verified":return n.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold bg-success/15 text-success border border-success/30 flex items-center gap-1",children:[n.jsx(jn,{className:"w-2.5 h-2.5"}),n.jsx("span",{children:c("intelligence.verified","VERIFIED")})]});case"candidate":return n.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold bg-warning/15 text-warning border border-warning/30 flex items-center gap-1",children:[n.jsx(Jt,{className:"w-2.5 h-2.5"}),n.jsx("span",{children:c("intelligence.candidate","CANDIDATE")})]});case"unresolved":default:return n.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold bg-muted/20 text-muted border border-line flex items-center gap-1",children:[n.jsx(vn,{className:"w-2.5 h-2.5"}),n.jsx("span",{children:c("intelligence.unresolved","UNRESOLVED")})]})}};return n.jsxs("div",{className:"flex flex-col h-full bg-canvas overflow-y-auto",children:[n.jsx("div",{className:"p-4 bg-panel border-b border-line shadow-xs shrink-0",children:n.jsxs("form",{onSubmit:z,className:"flex flex-col gap-3 max-w-5xl mx-auto",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("div",{className:"relative flex-1",children:[n.jsx(Ra,{className:"w-4 h-4 text-muted absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none"}),n.jsx("input",{type:"text","data-testid":"symbol-search-input",value:f,onChange:O=>m(O.target.value),placeholder:c("intelligence.symbolSearchPlaceholder",'Search symbol by identifier name (e.g. "SmartRetrievalEngine", "build_context", "execute")…'),className:"w-full pl-9 pr-4 py-2 bg-canvas border border-line rounded-md text-xs text-ink placeholder:text-muted focus:outline-hidden focus:border-accent"})]}),n.jsxs("select",{value:h,onChange:O=>p(O.target.value),className:"bg-canvas border border-line rounded px-2.5 py-2 text-xs text-ink cursor-pointer",children:[n.jsx("option",{value:"",children:c("intelligence.allKinds","All Kinds")}),n.jsx("option",{value:"class",children:"Class"}),n.jsx("option",{value:"function",children:"Function"}),n.jsx("option",{value:"method",children:"Method"}),n.jsx("option",{value:"interface",children:"Interface"}),n.jsx("option",{value:"type",children:"Type"})]}),n.jsxs("button",{type:"submit","data-testid":"symbol-search-submit-btn",disabled:T||!f.trim(),className:"px-4 py-2 bg-accent-solid text-white text-xs font-medium rounded-md hover:opacity-90 transition cursor-pointer flex items-center gap-1.5 shrink-0",children:[n.jsx(fl,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:c("intelligence.lookupSymbol","Lookup Symbol")})]})]}),v.length>1&&n.jsxs("div",{className:"p-3 rounded-lg bg-raised border border-accent/40 flex flex-col gap-2",children:[n.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold text-accent",children:[n.jsx(hm,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:c("intelligence.ambiguousMatches",'Multiple symbols match "{{name}}" ({{count}} found). Disambiguate below:',{name:f,count:v.length})})]}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:v.map(O=>n.jsxs("button",{type:"button",onClick:()=>b(O.id),className:`p-2 rounded text-left border transition cursor-pointer flex flex-col gap-0.5 ${g===O.id?"bg-accent/15 border-accent text-ink":"bg-panel border-line hover:border-accent/50 text-muted"}`,children:[n.jsxs("div",{className:"flex items-center justify-between text-xs font-mono",children:[n.jsxs("span",{className:"font-semibold text-ink",children:["[",O.kind,"] ",O.name]}),n.jsxs("span",{className:"text-[10px] text-muted",children:["L",O.line_start,"-",O.line_end]})]}),n.jsx("div",{className:"text-[11px] font-mono text-muted truncate",children:O.file_path}),O.container_name&&n.jsx("div",{className:"text-[10px] text-accent",children:c("intelligence.inClass","in class {{container}}",{container:O.container_name})})]},O.id))})]})]})}),n.jsxs("div",{className:"flex-1 p-4 max-w-5xl mx-auto w-full",children:[_&&n.jsxs("div",{className:"p-3 mb-4 rounded-md bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:_})]}),N?n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg bg-panel border border-line shadow-xs flex flex-col gap-3",children:[n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2 pb-3 border-b border-line",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"px-2 py-0.5 rounded text-[11px] font-mono uppercase bg-raised text-muted font-bold",children:N.symbol.kind}),n.jsx("span",{className:"text-sm font-mono font-bold text-ink",children:N.symbol.name}),N.symbol.container_name&&n.jsxs("span",{className:"text-xs text-muted font-mono",children:["(",c("intelligence.memberOf","member of")," ",n.jsx("span",{className:"text-accent font-semibold",children:N.symbol.container_name}),")"]}),N.symbol.is_exported&&n.jsx("span",{className:"px-1.5 py-0.2 rounded text-[10px] font-medium bg-accent/15 text-accent border border-accent/30",children:"Exported"})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{type:"button",onClick:()=>o==null?void 0:o(N.definition_evidence.evidence_id),className:"px-2 py-1 rounded bg-raised border border-line hover:border-accent text-[11px] font-mono text-ink cursor-pointer flex items-center gap-1 transition",children:[n.jsx(Gt,{className:"w-3 h-3 text-accent"}),n.jsx("span",{children:N.definition_evidence.evidence_id})]}),n.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(N.symbol.file_path),className:"px-2.5 py-1 rounded bg-accent-solid text-white text-xs font-medium cursor-pointer hover:opacity-90 flex items-center gap-1 transition",children:[n.jsx(cn,{className:"w-3 h-3"}),n.jsx("span",{children:c("intelligence.openFileInStudio","Studio")})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2 text-xs",children:[n.jsxs("div",{className:"p-2 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:c("intelligence.fileLocation","File Location")}),n.jsx("span",{className:"font-mono text-ink truncate block",children:N.symbol.file_path}),n.jsxs("span",{className:"text-muted text-[11px]",children:["Lines ",N.symbol.line_start,"–",N.symbol.line_end]})]}),n.jsxs("div",{className:"p-2 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:c("intelligence.downstreamImpact","Downstream Impact")}),n.jsx("span",{className:"text-ink font-semibold text-xs",children:c("intelligence.modulesCount","{{count}} dependent modules",{count:N.downstream_impact_count})}),n.jsxs("div",{className:"text-[10px] text-muted",children:[N.calling_modules.length," direct caller module(s)"]})]}),n.jsxs("div",{className:"p-2 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:c("intelligence.language","Language")}),n.jsx("span",{className:"text-ink font-medium",children:N.symbol.language}),N.symbol.signature&&n.jsx("div",{className:"font-mono text-[10px] text-muted truncate mt-0.5",children:N.symbol.signature})]})]}),N.cycle_warning&&n.jsxs("div",{className:"p-3 rounded bg-danger/10 border border-danger/30 text-danger text-xs flex items-center gap-2",children:[n.jsx(vl,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:N.cycle_warning})]})]}),n.jsxs("div",{className:"p-4 rounded-lg bg-panel border border-line shadow-xs flex flex-col gap-3",children:[n.jsx("div",{className:"flex items-center justify-between pb-2 border-b border-line",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider",children:c("intelligence.verifiedCallers","Verified Usages & Callers (AST Proven)")}),n.jsx("span",{className:"px-1.5 py-0.2 rounded text-[10px] font-mono bg-success/15 text-success border border-success/30 font-bold",children:N.references.length})]})}),N.references.length>0?n.jsx("div",{className:"space-y-2",children:N.references.map((O,U)=>n.jsxs("div",{className:"p-2.5 rounded-md bg-canvas border border-success/30 flex items-center justify-between gap-2 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[D(O.resolution_status),n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono uppercase bg-raised text-muted",children:O.reference_kind}),n.jsxs("span",{className:"font-mono text-ink font-medium",children:[O.file_path,":",O.line]}),O.source_symbol_name&&n.jsxs("span",{className:"text-muted text-[11px]",children:[c("intelligence.inSymbol","in")," ",n.jsx("code",{className:"text-ink",children:O.source_symbol_name})]})]}),n.jsx("span",{className:"text-[11px] text-muted",children:O.confidence_reason})]},U))}):n.jsx("p",{className:"text-xs text-muted py-2",children:c("intelligence.noVerifiedCallers","No verified internal callers detected across repository AST.")})]}),N.candidate_references.length>0&&n.jsxs("div",{className:"p-4 rounded-lg bg-panel border border-line shadow-xs flex flex-col gap-3",children:[n.jsx("div",{className:"flex items-center justify-between pb-2 border-b border-line",children:n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider",children:c("intelligence.candidateReferences","Candidate / Potential Usages")}),n.jsx("span",{className:"px-1.5 py-0.2 rounded text-[10px] font-mono bg-warning/15 text-warning border border-warning/30 font-bold",children:N.candidate_references.length})]})}),n.jsx("div",{className:"space-y-2",children:N.candidate_references.map((O,U)=>n.jsxs("div",{className:"p-2.5 rounded-md bg-canvas border border-warning/30 border-dashed flex items-center justify-between gap-2 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[D(O.resolution_status),n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono uppercase bg-raised text-muted",children:O.reference_kind}),n.jsxs("span",{className:"font-mono text-ink",children:[O.file_path,":",O.line]})]}),n.jsx("span",{className:"text-[11px] text-muted",children:O.confidence_reason})]},U))})]}),N.downstream_dependents.length>0&&n.jsxs("div",{className:"p-4 rounded-lg bg-panel border border-line shadow-xs flex flex-col gap-3",children:[n.jsx("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider pb-2 border-b border-line",children:c("intelligence.blastRadiusModules","Downstream Blast Radius Modules ({{count}})",{count:N.downstream_dependents.length})}),n.jsx("div",{className:"flex flex-wrap gap-1.5",children:N.downstream_dependents.map((O,U)=>n.jsxs("button",{type:"button",onClick:()=>r==null?void 0:r(O),className:"px-2 py-1 rounded bg-canvas border border-line hover:border-accent text-ink hover:text-accent font-mono text-xs cursor-pointer flex items-center gap-1 transition",children:[n.jsx("span",{children:O}),n.jsx(ed,{className:"w-2.5 h-2.5 text-muted"})]},U))})]})]}):T?null:n.jsxs("div",{className:"p-8 text-center bg-panel/50 rounded-lg border border-dashed border-line text-muted",children:[n.jsx(fl,{className:"w-8 h-8 mx-auto mb-2 text-accent opacity-70"}),n.jsx("p",{className:"text-xs font-medium text-ink mb-1",children:c("intelligence.symbolEmptyPrompt","Search for a symbol name or select one from Smart Search to inspect its relationship graph.")}),n.jsx("p",{className:"text-[11px] max-w-md mx-auto",children:c("intelligence.symbolEmptyHint","RepoDNA proves caller-callee links via AST and distinguishes verified edges from candidate and unresolved usages.")})]})]})]})},tk=({result:s,onSelectFileInStudio:i})=>{const{t:r}=ft(),[o,c]=E.useState("search"),[f,m]=E.useState(null),[h,p]=E.useState(null),v=g=>{m(g),c("symbols")},y=g=>{p(g),c("evidence")};return n.jsxs("div",{className:"flex flex-col h-full bg-canvas overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 bg-panel border-b border-line flex items-center justify-between gap-3 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5 overflow-x-auto",children:[n.jsxs("button",{type:"button","data-testid":"subtab-search-btn",onClick:()=>c("search"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${o==="search"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(Ra,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:r("intelligence.tabSearch","Smart Search")})]}),n.jsxs("button",{type:"button","data-testid":"subtab-symbols-btn",onClick:()=>c("symbols"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${o==="symbols"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(fl,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:r("intelligence.tabSymbols","Symbol Relations")})]}),n.jsxs("button",{type:"button","data-testid":"subtab-evidence-btn",onClick:()=>c("evidence"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${o==="evidence"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(Gt,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:r("intelligence.tabEvidence","Evidence Ledger")})]}),n.jsxs("button",{type:"button","data-testid":"subtab-context-btn",onClick:()=>c("context"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${o==="context"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(Bc,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:r("intelligence.tabContext","Agent Context")})]})]}),n.jsxs("div",{className:"hidden sm:flex items-center gap-2 text-xs text-muted",children:[n.jsx("span",{className:"font-mono text-ink font-semibold",children:s.repo_name}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:[s.total_files," files"]}),n.jsx("span",{children:"•"}),n.jsx("span",{children:"v0.5.0 Brain"})]})]}),n.jsxs("div",{className:"flex-1 overflow-hidden",children:[o==="search"&&n.jsx(PS,{analysisId:s.analysis_id,onSelectFileInStudio:i,onSelectSymbolForTrace:v,onSelectEvidence:y}),o==="symbols"&&n.jsx(ek,{analysisId:s.analysis_id,initialSymbolId:f,onSelectFileInStudio:i,onSelectEvidence:y}),o==="evidence"&&n.jsx(WS,{analysisId:s.analysis_id,initialEvidenceId:h,onSelectFileInStudio:i,onSelectSymbolForTrace:()=>{c("symbols")}}),o==="context"&&n.jsx(JS,{analysisId:s.analysis_id,result:s})]})]})};function nk({workspace:s,onWorkspace:i,onBrowse:r,onGithub:o,onDemo:c,scanning:f}){const{t:m}=ft();return n.jsx("div",{className:"launchpad","data-testid":"welcome-launchpad",children:n.jsxs("div",{className:"launchpad-inner",children:[n.jsxs("div",{className:"launchpad-intro",children:[n.jsx("span",{className:"text-muted text-xs uppercase tracking-wider font-semibold",children:m("header.subtitle")}),n.jsx("h2",{children:m("launchpad.headline")}),n.jsx("p",{children:m("launchpad.subline")})]}),n.jsxs("div",{className:"launchpad-options",children:[n.jsxs("article",{children:[n.jsx(um,{"aria-hidden":"true",className:"text-accent",size:22}),n.jsx("h3",{children:m("launchpad.localTitle")}),n.jsx("p",{children:m("launchpad.localDesc")}),s&&n.jsx("button",{type:"button",disabled:f,className:"primary-action","data-testid":"launchpad-scan-workspace-btn",onClick:i,children:m("launchpad.analyzeWorkspace")}),n.jsx("button",{type:"button",disabled:f,onClick:r,children:m("launchpad.browseFolder")}),s&&n.jsx("p",{className:"font-mono text-[11px] text-muted truncate mt-2",title:s,children:s})]}),n.jsxs("article",{children:[n.jsx(Ub,{"aria-hidden":"true",className:"text-muted",size:22}),n.jsx("h3",{children:m("launchpad.githubTitle")}),n.jsx("p",{children:m("launchpad.githubDesc")}),n.jsx("button",{type:"button",disabled:f,onClick:o,children:m("launchpad.githubBtn")})]}),n.jsxs("article",{children:[n.jsx(Et,{"aria-hidden":"true",className:"text-accent",size:22}),n.jsx("h3",{children:m("launchpad.demoTitle")}),n.jsx("p",{children:m("launchpad.demoDesc")}),n.jsx("button",{type:"button",disabled:f,"data-testid":"launchpad-demo-btn",onClick:c,className:"border-accent/40 hover:border-accent text-accent font-semibold",children:m("launchpad.demoBtn")})]})]}),n.jsxs("div",{className:"launchpad-foot",children:[n.jsx("span",{children:m("launchpad.footSecurity")}),n.jsx("span",{children:m("launchpad.footCoverage")}),n.jsxs("span",{children:[n.jsx("kbd",{className:"px-1.5 py-0.5 rounded bg-raised border border-line text-[11px] font-mono",children:"Ctrl K"})," ",m("launchpad.footShortcuts")]})]})]})})}const ak=({analysisId:s,baseAnalysisId:i=null,workstationMode:r,qualityFreshness:o=null,onInspectFileInGraph:c})=>{const{t:f}=ft(),[m,h]=E.useState("overview"),[p,v]=E.useState(!1),[y,g]=E.useState(null),[b,N]=E.useState(null),[j,T]=E.useState(null),[H,_]=E.useState(null),[K,z]=E.useState(null),[D,O]=E.useState(null),[U,q]=E.useState(null),[C,F]=E.useState(null),[G,Y]=E.useState(""),[I,W]=E.useState(""),[w,R]=E.useState(""),[A,V]=E.useState(""),[B,P]=E.useState("cyclomatic"),[te,le]=E.useState(null),[pe,ve]=E.useState(0);return E.useEffect(()=>{if(!s)return;let k=!1;return v(!0),g(null),jS(s,pe===0).then(M=>{k||N(M)}).catch(M=>{k||g(M instanceof Error?M.message:"Failed to load quality overview.")}).finally(()=>{k||v(!1)}),()=>{k=!0}},[s,pe]),E.useEffect(()=>{if(!s)return;let k=!1;return m==="findings"?Ib(s,{q:G||void 0,category:I||void 0,severity:w||void 0,language:A||void 0,limit:50}).then(M=>{k||T(M)}).catch(()=>{}):m==="complexity"?_S(s,{q:G||void 0,language:A||void 0,sort_by:B,limit:50}).then(M=>{k||_(M)}).catch(()=>{}):m==="duplicates"?SS(s,{language:A||void 0,limit:50}).then(M=>{k||z(M)}).catch(()=>{}):m==="unused"?kS(s,{language:A||void 0,limit:50}).then(M=>{k||O(M)}).catch(()=>{}):m==="tests"?CS(s,{language:A||void 0,limit:50}).then(M=>{k||q(M)}).catch(()=>{}):m==="impact"&&TS(s,i||void 0).then(M=>{k||F(M)}).catch(()=>{}),()=>{k=!0}},[s,i,m,G,I,w,A,B,pe]),s?n.jsx("section",{className:"flex-1 overflow-auto p-4 md:p-5 bg-canvas text-ink","data-testid":"quality-workstation-view","aria-label":f("quality.title"),children:n.jsxs("div",{className:"max-w-7xl mx-auto flex flex-col gap-4",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-line pb-3",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsxs("h2",{className:"text-base font-bold m-0 text-ink flex items-center gap-2",children:[n.jsx(Gt,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),f("quality.title")]}),b&&n.jsx("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded bg-panel border border-line text-muted",children:b.ruleset_fingerprint}),o&&n.jsx("span",{"data-testid":"quality-freshness-badge",className:`text-[11px] font-mono px-2 py-0.5 rounded border ${o==="VERIFIED_CURRENT"?"bg-success/15 text-success border-success/40":"bg-warning/15 text-warning border-warning/40"}`,children:o})]}),n.jsx("p",{className:"text-xs text-muted m-0 mt-1",children:f("quality.subtitle")})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{type:"button","data-testid":"quality-refresh-btn",onClick:()=>ve(k=>k+1),className:"px-2.5 py-1 rounded-md bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1.5 cursor-pointer",children:[n.jsx(bn,{className:"w-3.5 h-3.5","aria-hidden":"true"}),f("quality.refresh")]}),n.jsxs("a",{href:wS(s),download:`repodna-quality-${(b==null?void 0:b.repo_name)??"report"}.sarif.json`,"data-testid":"quality-sarif-export-link",className:"px-2.5 py-1 rounded-md bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1.5 no-underline",children:[n.jsx(zn,{className:"w-3.5 h-3.5 text-accent","aria-hidden":"true"}),"SARIF 2.1.0"]})]})]}),n.jsx("div",{role:"tablist","aria-label":f("quality.sections"),className:"flex flex-wrap gap-1.5 bg-panel p-1 rounded-lg border border-line",children:[["overview",f("quality.tabs.overview"),Gt],["findings",f("quality.tabs.findings"),Jt],["complexity",f("quality.tabs.complexity"),Hw],["duplicates",f("quality.tabs.duplicates"),xs],["unused",f("quality.tabs.unused"),Bw],["tests",f("quality.tabs.tests"),Ew],["impact",f("quality.tabs.impact"),Lr]].map(([k,M,ie])=>n.jsxs("button",{type:"button",role:"tab","aria-selected":m===k,"data-testid":`quality-subtab-${k}`,onClick:()=>h(k),className:`px-2.5 py-1 rounded-md text-xs font-medium flex items-center gap-1.5 cursor-pointer ${m===k?"bg-accent-solid text-white":"text-muted hover:text-ink"}`,children:[n.jsx(ie,{className:"w-3.5 h-3.5","aria-hidden":"true"}),n.jsx("span",{children:M})]},k))}),y&&n.jsx("div",{role:"alert",className:"p-3 rounded-lg border border-danger/40 bg-danger/10 text-danger text-xs",children:y}),p&&!b&&n.jsx("div",{role:"status",className:"p-4 text-xs text-muted",children:f("common.loading")}),m==="overview"&&b&&n.jsxs("div",{className:"flex flex-col gap-4","data-testid":"quality-overview-panel",children:[n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:f("quality.metrics.activeFindings")}),n.jsx("div",{className:"text-lg font-bold font-mono text-ink mt-1",children:b.active_findings}),n.jsxs("div",{className:"text-[11px] text-muted mt-0.5",children:["C:",b.severity_distribution.critical," · W:",b.severity_distribution.warning," · I:",b.severity_distribution.info]})]}),n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:f("quality.metrics.cloneGroups")}),n.jsx("div",{className:"text-lg font-bold font-mono text-ink mt-1",children:b.duplicates_summary.total_clone_groups}),n.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:b.duplicates_summary.incomplete_coverage?f("quality.incompleteCoverage"):"Type-1 / Type-2"})]}),n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:f("quality.metrics.unusedCandidates")}),n.jsx("div",{className:"text-lg font-bold font-mono text-ink mt-1",children:b.unused_candidates_count}),n.jsx("div",{className:"text-[11px] text-muted mt-0.5",children:f("quality.conservativeHint")})]}),n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-3",children:[n.jsx("div",{className:"text-[11px] text-muted",children:f("quality.metrics.debtIndex")}),n.jsx("div",{className:"text-lg font-bold font-mono text-ink mt-1",children:b.technical_debt.total_debt_index}),n.jsxs("div",{className:"text-[11px] text-muted mt-0.5",children:[f("quality.coverageLabel"),": ",b.technical_debt.coverage_pct,"%"]})]})]}),b.syntax_error_files_count>0&&n.jsx("div",{className:"p-3 rounded-lg border border-warning/40 bg-warning/10 text-xs text-warning",children:f("quality.syntaxErrorsBanner",{count:b.syntax_error_files_count})}),n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-4",children:[n.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted m-0 mb-3",children:f("quality.topHotspots")}),b.complexity_hotspots.length===0?n.jsx("p",{className:"text-xs text-muted m-0",children:f("quality.noComplexityData")}):n.jsx("div",{className:"flex flex-col gap-2",children:b.complexity_hotspots.slice(0,5).map(k=>n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line pb-2 last:border-0 last:pb-0 text-xs",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("span",{className:"font-mono font-semibold text-ink",children:k.qualified_name||k.symbol_name}),n.jsxs("span",{className:"text-muted ml-2 font-mono",children:[k.file_path,":",k.line_start]})]}),n.jsxs("div",{className:"flex items-center gap-2 font-mono",children:[n.jsxs("span",{children:["CC: ",k.cyclomatic_complexity??f("quality.unknown")]}),n.jsxs("span",{children:["Nest: ",k.max_nesting_depth??f("quality.unknown")]}),n.jsxs("button",{type:"button",onClick:()=>c(k.file_path),className:"text-accent hover:underline cursor-pointer flex items-center gap-1",children:[n.jsx(ed,{className:"w-3 h-3","aria-hidden":"true"}),f("quality.inspectGraph")]})]})]},k.symbol_id))})]}),n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-4",children:[n.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-muted m-0 mb-2",children:f("quality.limitationsTitle")}),n.jsx("ul",{className:"m-0 pl-4 text-xs text-muted space-y-1",children:b.limitations.map((k,M)=>n.jsx("li",{children:k},M))}),r==="advanced"&&n.jsxs("div",{className:"mt-3 pt-3 border-t border-line text-[11px] font-mono text-muted flex flex-wrap gap-3",children:[n.jsxs("span",{children:["engine=",b.engine_version]}),n.jsxs("span",{children:["cache_hit=",String(b.cache_hit)]}),n.jsxs("span",{children:["duration=",b.duration_ms,"ms"]}),n.jsxs("span",{children:["supported_files=",b.supported_files_count]}),n.jsxs("span",{children:["unsupported_files=",b.unsupported_files_count]})]})]})]}),m==="findings"&&n.jsxs("div",{className:"flex flex-col gap-3","data-testid":"quality-findings-panel",children:[n.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.jsx("input",{type:"search",value:G,onChange:k=>Y(k.target.value),placeholder:f("quality.searchPlaceholder"),"aria-label":f("quality.searchPlaceholder"),className:"flex-1 min-w-48 bg-panel border border-line rounded-md px-2.5 py-1 text-xs text-ink"}),n.jsxs("select",{value:I,onChange:k=>W(k.target.value),"aria-label":f("quality.filterCategory"),className:"bg-panel border border-line rounded-md px-2 py-1 text-xs text-ink",children:[n.jsx("option",{value:"",children:f("quality.allCategories")}),n.jsx("option",{value:"complexity",children:"Complexity"}),n.jsx("option",{value:"duplication",children:"Duplication"}),n.jsx("option",{value:"unused_code",children:"Unused Code"}),n.jsx("option",{value:"coupling",children:"Coupling"}),n.jsx("option",{value:"test_gap",children:"Test Mapping Gap"}),n.jsx("option",{value:"security_signal",children:"Security Signal"})]}),n.jsxs("select",{value:w,onChange:k=>R(k.target.value),"aria-label":f("quality.filterSeverity"),className:"bg-panel border border-line rounded-md px-2 py-1 text-xs text-ink",children:[n.jsx("option",{value:"",children:f("quality.allSeverities")}),n.jsx("option",{value:"critical",children:"Critical"}),n.jsx("option",{value:"warning",children:"Warning"}),n.jsx("option",{value:"info",children:"Info"})]}),n.jsx("input",{type:"text",value:A,onChange:k=>V(k.target.value),placeholder:f("quality.filterLanguage"),"aria-label":f("quality.filterLanguage"),className:"w-32 bg-panel border border-line rounded-md px-2 py-1 text-xs text-ink"})]}),n.jsx("div",{className:"border border-line rounded-lg bg-panel divide-y divide-line",children:!j||j.items.length===0?n.jsx("div",{className:"p-4 text-xs text-muted",children:f("quality.noFindings")}):j.items.map(k=>n.jsxs("div",{className:"p-3 flex flex-col gap-1 text-xs",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{className:`font-mono px-1.5 py-0.5 rounded text-[11px] uppercase ${k.severity==="critical"?"bg-danger/15 text-danger":k.severity==="warning"?"bg-warning/15 text-warning":"bg-accent/15 text-accent"}`,children:k.severity}),n.jsx("span",{className:"font-mono font-semibold text-ink",children:k.rule_id}),n.jsxs("span",{className:"font-mono text-muted",children:[k.file_path,":",k.line_start]}),n.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded bg-canvas border border-line text-muted",children:k.confidence}),k.status==="SUPPRESSED"&&n.jsx("span",{className:"text-[11px] px-1.5 py-0.5 rounded bg-warning/15 text-warning",children:"SUPPRESSED"})]}),n.jsxs("button",{type:"button",onClick:()=>c(k.file_path),className:"text-accent hover:underline cursor-pointer flex items-center gap-1",children:[n.jsx(di,{className:"w-3.5 h-3.5","aria-hidden":"true"}),f("quality.inspectGraph")]})]}),n.jsx("p",{className:"m-0 text-ink",children:k.explanation}),k.suggested_action&&n.jsx("p",{className:"m-0 text-muted",children:k.suggested_action})]},k.finding_id))})]}),m==="complexity"&&n.jsxs("div",{className:"flex flex-col gap-3","data-testid":"quality-complexity-panel",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("label",{className:"text-xs text-muted",htmlFor:"complexity-sort-select",children:[f("quality.sortBy"),":"]}),n.jsxs("select",{id:"complexity-sort-select",value:B,onChange:k=>P(k.target.value),className:"bg-panel border border-line rounded-md px-2 py-1 text-xs text-ink",children:[n.jsx("option",{value:"cyclomatic",children:"Cyclomatic"}),n.jsx("option",{value:"nesting",children:"Nesting Depth"}),n.jsx("option",{value:"length",children:"Length"}),n.jsx("option",{value:"parameters",children:"Parameters"})]})]}),n.jsx("div",{className:"table-wrapper",children:n.jsxs("table",{children:[n.jsx("thead",{children:n.jsxs("tr",{className:"text-left text-[11px] text-muted",children:[n.jsx("th",{className:"p-2",children:"Symbol"}),n.jsx("th",{className:"p-2",children:"File"}),n.jsx("th",{className:"p-2",children:"CC"}),n.jsx("th",{className:"p-2",children:"Nesting"}),n.jsx("th",{className:"p-2",children:"Params"}),n.jsx("th",{className:"p-2",children:"Lines"})]})}),n.jsx("tbody",{className:"text-xs",children:H==null?void 0:H.items.map(k=>n.jsxs(_b.Fragment,{children:[n.jsxs("tr",{className:"border-t border-line hover:bg-raised cursor-pointer",onClick:()=>le(te===k.symbol_id?null:k.symbol_id),children:[n.jsx("th",{className:"p-2 font-mono font-medium text-ink",children:k.qualified_name||k.symbol_name}),n.jsxs("td",{className:"p-2 font-mono text-muted",children:[k.file_path,":",k.line_start]}),n.jsx("td",{className:"p-2 font-mono",children:k.cyclomatic_complexity??f("quality.unknown")}),n.jsx("td",{className:"p-2 font-mono",children:k.max_nesting_depth??f("quality.unknown")}),n.jsx("td",{className:"p-2 font-mono",children:k.parameter_count??f("quality.unknown")}),n.jsx("td",{className:"p-2 font-mono",children:k.function_length})]}),te===k.symbol_id&&n.jsx("tr",{className:"bg-canvas",children:n.jsxs("td",{colSpan:6,className:"p-3 text-xs",children:[n.jsxs("div",{className:"font-semibold mb-1",children:[f("quality.contributors")," (",k.contributors.length,")"]}),k.contributors.length===0?n.jsx("span",{className:"text-muted",children:f("quality.noBranches")}):n.jsx("div",{className:"flex flex-wrap gap-1.5 font-mono text-[11px]",children:k.contributors.slice(0,20).map((M,ie)=>n.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-panel border border-line",children:["L",M.line,": ",M.construct_kind," (+",M.cyclomatic_delta,", depth=",M.nesting_depth,")"]},ie))})]})})]},k.symbol_id))})]})})]}),m==="duplicates"&&n.jsxs("div",{className:"flex flex-col gap-3","data-testid":"quality-duplicates-panel",children:[(K==null?void 0:K.incomplete_coverage)&&n.jsxs("div",{className:"p-2.5 rounded border border-warning/40 bg-warning/10 text-xs text-warning",children:[f("quality.incompleteCoverage"),": ",K.incomplete_reason]}),!K||K.items.length===0?n.jsx("div",{className:"p-4 border border-line rounded-lg bg-panel text-xs text-muted",children:f("quality.noDuplicates")}):K.items.map(k=>n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-3 text-xs",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 mb-2",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"font-mono font-semibold",children:k.clone_group_id}),n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-canvas border border-line font-mono text-[11px]",children:k.clone_type}),n.jsxs("span",{className:"text-muted font-mono",children:[k.token_count," tokens × ",k.occurrence_count]})]}),n.jsx("span",{className:"text-[11px] font-mono text-muted",children:k.confidence})]}),n.jsx("p",{className:"m-0 mb-2 text-muted",children:k.explanation}),n.jsx("div",{className:"flex flex-col gap-1 font-mono text-[11px]",children:k.locations.map((M,ie)=>n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsxs("span",{children:[M.file_path,":",M.line_start,"-",M.line_end]}),n.jsx("button",{type:"button",onClick:()=>c(M.file_path),className:"text-accent hover:underline cursor-pointer",children:f("quality.inspectGraph")})]},ie))})]},k.clone_group_id))]}),m==="unused"&&n.jsxs("div",{className:"flex flex-col gap-3","data-testid":"quality-unused-panel",children:[n.jsx("div",{className:"p-2.5 rounded border border-line bg-panel text-xs text-muted",children:(D==null?void 0:D.disclosure)||f("quality.unusedDisclosure")}),n.jsx("div",{className:"border border-line rounded-lg bg-panel divide-y divide-line",children:!D||D.items.length===0?n.jsx("div",{className:"p-4 text-xs text-muted",children:f("quality.noUnused")}):D.items.map(k=>n.jsxs("div",{className:"p-3 text-xs flex flex-col gap-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono font-semibold text-ink",children:k.qualified_name||k.symbol_name}),n.jsxs("span",{className:"font-mono text-muted",children:[k.file_path,":",k.line_start," · ",k.confidence]})]}),n.jsx("p",{className:"m-0 text-ink",children:k.explanation}),n.jsx("p",{className:"m-0 text-[11px] text-muted",children:k.known_limitations[0]})]},k.candidate_id))})]}),m==="tests"&&n.jsxs("div",{className:"flex flex-col gap-3","data-testid":"quality-tests-panel",children:[n.jsx("div",{className:"p-2.5 rounded border border-line bg-panel text-xs text-muted",children:(U==null?void 0:U.disclosure)||f("quality.testMappingDisclosure")}),n.jsx("div",{className:"border border-line rounded-lg bg-panel divide-y divide-line",children:!U||U.items.length===0?n.jsx("div",{className:"p-4 text-xs text-muted",children:f("quality.noTestMapping")}):U.items.map(k=>n.jsxs("div",{className:"p-3 text-xs flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"font-mono font-semibold text-ink",children:k.production_file}),n.jsx("div",{className:"text-muted text-[11px]",children:k.explanation})]}),n.jsx("span",{className:"font-mono text-[11px] px-2 py-0.5 rounded bg-canvas border border-line",children:k.relationship_kind})]},k.production_file))})]}),m==="impact"&&n.jsx("div",{className:"flex flex-col gap-3","data-testid":"quality-impact-panel",children:C?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"p-3 rounded-lg border border-line bg-panel text-xs",children:n.jsx("div",{className:"font-semibold text-ink",children:C.summary_text})}),n.jsx("div",{className:"border border-line rounded-lg bg-panel divide-y divide-line",children:C.items.length===0?n.jsx("div",{className:"p-4 text-xs text-muted",children:f("quality.noImpactChanges")}):C.items.map((k,M)=>n.jsxs("div",{className:"p-3 text-xs flex flex-col gap-1",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono font-semibold",children:k.qualified_name||k.symbol_name}),n.jsx("span",{className:"font-mono text-[11px] px-1.5 py-0.5 rounded bg-canvas border border-line",children:k.change_kind})]}),n.jsx("p",{className:"m-0 text-muted",children:k.explanation}),k.is_potential_breaking&&n.jsx("span",{className:"text-danger text-[11px] font-medium",children:k.breaking_reason})]},M))})]}):n.jsx("div",{className:"p-4 text-xs text-muted",children:f("common.loading")})})]})}):n.jsx("section",{className:"p-6 max-w-4xl mx-auto","data-testid":"quality-empty-state",children:n.jsxs("div",{className:"border border-line rounded-lg bg-panel p-6",children:[n.jsx("h2",{className:"text-base font-semibold text-ink m-0 mb-2",children:f("quality.title")}),n.jsx("p",{className:"text-xs text-muted m-0",children:f("quality.noAnalysis")})]})})},sk=[256,512,1024,2048,4096,8192,16384],ik=({analysisId:s,repoName:i,workstationMode:r="simple",onInspectModuleInStudio:o})=>{var Je;const{t:c}=ft(),[f,m]=E.useState("context"),[h,p]=E.useState(!1),[v,y]=E.useState(null),[g,b]=E.useState(""),[N,j]=E.useState(1024),[T,H]=E.useState("generic"),[_,K]=E.useState(null),[z,D]=E.useState(!1),[O,U]=E.useState(null),[q,C]=E.useState("overview"),[F,G]=E.useState(""),[Y,I]=E.useState(null),[W,w]=E.useState(""),[R,A]=E.useState(null),[V,B]=E.useState(""),[P,te]=E.useState(""),[le,pe]=E.useState(null),[ve,k]=E.useState(""),[M,ie]=E.useState(null),[ce,me]=E.useState(""),[ge,je]=E.useState(null),[ue,ye]=E.useState(null),Ce=async fe=>{p(!0),y(null);try{await fe()}catch(Xe){y(Xe instanceof Error?Xe.message:String(Xe))}finally{p(!1)}},dt=()=>{g.trim()&&Ce(async()=>{const fe=await ES(s,{task:g.trim(),token_budget:N,target_model:T});K(fe),U(null)})},Le=(fe,Xe)=>{Ce(async()=>{const $e=await MS(s,{target_type:fe,target_id:Xe,snapshot_id:_==null?void 0:_.freshness.snapshot_id,token_budget:1024});U($e)})},Ke=()=>{_&&(navigator.clipboard&&navigator.clipboard.writeText(_.rendered_markdown),D(!0),setTimeout(()=>D(!1),1800))},Ee=()=>{if(!_)return;const fe=new Blob([JSON.stringify(_,null,2)],{type:"application/json"}),Xe=URL.createObjectURL(fe),$e=document.createElement("a");$e.href=Xe,$e.download=`repodna-agent-context-${_.task.task_id}.json`,$e.click(),URL.revokeObjectURL(Xe)},de=()=>{Ce(async()=>{const fe=await AS(s,{mode:q,task:F.trim()||void 0,token_budget:N});I(fe)})},Me=fe=>{const Xe=(fe??W).trim();Xe&&(w(Xe),Ce(async()=>{const $e=await LS(s,Xe);A($e)}))},at=()=>{const fe=V.split(",").map($e=>$e.trim()).filter(Boolean),Xe=P.split(",").map($e=>$e.trim()).filter($e=>$e.includes("->")).map($e=>{const[It,en]=$e.split("->",2);return[It.trim(),en.trim()]});Ce(async()=>{const $e=await RS(s,{intended_files:fe,proposed_dependency_edges:Xe});pe($e)})},J=()=>{ve.trim()&&Ce(async()=>{const fe=await DS(s,ve);ie(fe)})},Se=()=>{const fe=ce.split(",").map(Xe=>Xe.trim()).filter(Boolean);Ce(async()=>{const Xe=await OS(s,{intended_files:fe});je(Xe)})},rt=()=>{Ce(async()=>{const fe=await zS();ye(fe)})},ut=[{id:"context",label:c("agent.sections.context","Task Context"),icon:n.jsx(Ra,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"map",label:c("agent.sections.map","Repository Map"),icon:n.jsx(Zw,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"evidence",label:c("agent.sections.evidence","Evidence Inspector"),icon:n.jsx(Gt,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"preflight",label:c("agent.sections.preflight","Change Preflight"),icon:n.jsx(cn,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"patch",label:c("agent.sections.patch","Patch Inspection"),icon:n.jsx(vw,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"postflight",label:c("agent.sections.postflight","Postflight Verification"),icon:n.jsx(Lr,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"diagnostics",label:c("agent.sections.diagnostics","Context Diagnostics"),icon:n.jsx(Tm,{className:"w-3.5 h-3.5","aria-hidden":"true"})}],yt=(_==null?void 0:_.blocks.filter(fe=>fe.block_type==="file"))??[];return n.jsxs("div",{"data-testid":"agent-workstation-view",className:"flex-1 flex flex-col overflow-hidden bg-surface text-ink",children:[n.jsxs("div",{className:"px-4 py-3 border-b border-line bg-panel flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsxs("h2",{className:"text-sm font-semibold text-ink flex items-center gap-2",children:[n.jsx(Gt,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),c("agent.title","AI Agent Intelligence Workstation")," — ",n.jsx("span",{className:"font-mono text-accent",children:i})]}),n.jsx("p",{className:"text-xs text-muted mt-0.5",children:c("agent.subtitle","Deterministic, local-first, read-only context compilation, evidence verification, and preflight/postflight architecture checks.")})]}),n.jsx("nav",{"aria-label":c("agent.navLabel","Agent Intelligence Sections"),className:"flex flex-wrap items-center gap-1",children:ut.map(fe=>n.jsxs("button",{type:"button","data-testid":`agent-section-${fe.id}`,"aria-pressed":f===fe.id,onClick:()=>{m(fe.id),fe.id==="diagnostics"&&rt()},className:`px-2.5 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 cursor-pointer border ${f===fe.id?"bg-accent/15 text-accent border-accent/40":"bg-surface text-muted hover:text-ink border-line"}`,children:[fe.icon,n.jsx("span",{children:fe.label})]},fe.id))})]}),v&&n.jsxs("div",{role:"alert",className:"mx-4 mt-3 px-3 py-2 rounded-md border border-danger/40 bg-danger/10 text-xs text-danger flex items-center gap-2",children:[n.jsx(vl,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:v})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[f==="context"&&n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-3",children:n.jsxs("div",{className:"flex flex-wrap items-end gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-[240px]",children:[n.jsx("label",{htmlFor:"agent-task-input",className:"block text-xs font-medium text-ink mb-1",children:c("agent.taskPromptLabel","Engineering Task Description (EN / TR)")}),n.jsx("input",{id:"agent-task-input","data-testid":"agent-task-input",type:"text",value:g,onChange:fe=>b(fe.target.value),onKeyDown:fe=>{fe.key==="Enter"&&dt()},placeholder:c("agent.taskPlaceholder","e.g. Investigate cache eviction or find authentication handler..."),className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs text-ink placeholder:text-muted"})]}),n.jsxs("div",{children:[n.jsx("label",{htmlFor:"agent-budget-select",className:"block text-xs font-medium text-ink mb-1",children:c("agent.tokenBudgetLabel","Token Budget")}),n.jsx("select",{id:"agent-budget-select","data-testid":"agent-budget-select",value:N,onChange:fe=>j(Number(fe.target.value)),className:"px-2.5 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink",children:sk.map(fe=>n.jsxs("option",{value:fe,children:[fe.toLocaleString()," tokens"]},fe))})]}),r==="advanced"&&n.jsxs("div",{children:[n.jsx("label",{htmlFor:"agent-model-input",className:"block text-xs font-medium text-ink mb-1",children:c("agent.targetModelLabel","Target Model")}),n.jsx("input",{id:"agent-model-input",type:"text",value:T,onChange:fe=>H(fe.target.value),className:"w-32 px-2.5 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"})]}),n.jsx("button",{type:"button","data-testid":"agent-compile-context-btn",disabled:h||!g.trim(),onClick:dt,className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer disabled:opacity-50",children:h?c("common.loading","Compiling..."):c("agent.compileContext","Compile Context Pack")})]})}),_?n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[n.jsxs("span",{"data-testid":"agent-intent-badge",className:"px-2 py-0.5 rounded bg-accent/15 text-accent font-mono font-semibold",children:[_.task.intent," (",Math.round(_.task.intent_confidence*100),"%)"]}),n.jsxs("span",{"data-testid":"agent-tokenizer-badge",className:"px-2 py-0.5 rounded bg-raised border border-line font-mono text-ink",children:[_.budget.counted_tokens," / ",_.budget.requested_budget," tokens (",_.budget.exact_or_estimated.toUpperCase()," · ",_.budget.tokenizer_name,")"]}),n.jsx("span",{className:`px-2 py-0.5 rounded font-mono ${_.budget.budget_compliant?"bg-emerald-500/15 text-emerald-400":"bg-amber-500/15 text-amber-400"}`,children:_.budget.budget_compliant?"BUDGET COMPLIANT":"EXCEEDS MIN ENVELOPE"}),n.jsxs("span",{className:"text-muted font-mono",children:["snapshot: ",_.freshness.snapshot_id]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("button",{type:"button","data-testid":"agent-copy-context-btn",onClick:Ke,className:"px-2.5 py-1.5 rounded-md border border-line bg-surface hover:bg-raised text-xs flex items-center gap-1.5 cursor-pointer",children:[n.jsx(nw,{className:"w-3.5 h-3.5","aria-hidden":"true"}),z?c("common.copied","Copied"):c("agent.copyContext","Copy Markdown")]}),n.jsxs("button",{type:"button","data-testid":"agent-export-context-btn",onClick:Ee,className:"px-2.5 py-1.5 rounded-md border border-line bg-surface hover:bg-raised text-xs flex items-center gap-1.5 cursor-pointer",children:[n.jsx(zn,{className:"w-3.5 h-3.5","aria-hidden":"true"}),c("agent.exportJson","Export JSON")]})]})]}),n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-2",children:[n.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted",children:[c("agent.rankedCandidates","Ranked Files & Symbols")," (",yt.length,")"]}),yt.length===0?n.jsx("p",{className:"text-xs text-muted",children:c("agent.noCandidates","No grounded files matched this task (honest abstention).")}):n.jsx("ul",{className:"space-y-2",children:yt.map(fe=>{const Xe=String(fe.payload.file_id??fe.scope),$e=Array.isArray(fe.payload.symbols)?fe.payload.symbols:[],It=String(fe.payload.why??"");return n.jsxs("li",{className:"p-3 rounded-md border border-line bg-surface flex flex-wrap items-start justify-between gap-2",children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(di,{className:"w-3.5 h-3.5 text-accent shrink-0","aria-hidden":"true"}),n.jsx("span",{className:"font-mono text-xs font-semibold text-ink",children:Xe}),n.jsxs("span",{className:"text-[11px] font-mono text-muted",children:["score ",String(fe.payload.score??0)," · ",String(fe.payload.confidence??"medium")]})]}),It&&n.jsx("p",{className:"text-xs text-muted mt-1",children:It}),$e.length>0&&n.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:$e.slice(0,4).map((en,_n)=>n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-raised border border-line font-mono text-[11px] text-ink",children:en},_n))})]}),n.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[n.jsx("button",{type:"button","data-testid":`agent-expand-file-${Xe}`,onClick:()=>Le("file",Xe),className:"px-2 py-1 rounded border border-line bg-panel hover:bg-raised text-[11px] cursor-pointer",children:c("agent.expand","Expand")}),o&&n.jsx("button",{type:"button",onClick:()=>o(Xe),className:"px-2 py-1 rounded border border-line bg-panel hover:bg-raised text-[11px] cursor-pointer",children:c("agent.openInStudio","Studio")})]})]},fe.block_id)})})]}),_.evidence.length>0&&n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-2",children:[n.jsxs("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted",children:[c("agent.evidenceCitations","Verified Evidence Citations")," (",_.evidence.length,")"]}),n.jsx("div",{className:"space-y-1.5",children:_.evidence.map(fe=>n.jsxs("div",{className:"p-2.5 rounded border border-line bg-surface flex flex-wrap items-center justify-between gap-2 text-xs",children:[n.jsxs("div",{className:"font-mono",children:[n.jsx("span",{className:"text-accent",children:fe.evidence_id})," · ",fe.file_path,":",fe.line_start,"-",fe.line_end," ",n.jsxs("span",{className:"text-muted",children:["[",fe.status,"]"]})]}),n.jsx("button",{type:"button",onClick:()=>{m("evidence"),Me(fe.evidence_id)},className:"px-2 py-1 rounded border border-line bg-panel hover:bg-raised text-[11px] cursor-pointer",children:c("agent.verifyEvidenceBtn","Verify")})]},fe.evidence_id))})]}),O&&n.jsxs("div",{"data-testid":"agent-expansion-result",className:"p-4 rounded-lg border border-accent/40 bg-panel space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between text-xs",children:[n.jsxs("span",{className:"font-semibold text-accent",children:[c("agent.expandedTarget","Expanded Target"),": ",O.target_type," · ",O.target_id]}),n.jsxs("span",{className:"font-mono text-muted",children:["status: ",O.status]})]}),n.jsx("pre",{className:"p-3 rounded bg-surface border border-line text-[11px] font-mono overflow-x-auto max-h-64",children:JSON.stringify(O.blocks,null,2)})]})]}):n.jsx("div",{className:"p-6 rounded-lg border border-dashed border-line bg-panel/50 text-center text-xs text-muted",children:c("agent.emptyContext","Enter a task description and token budget to compile an evidence-grounded context pack.")})]}),f==="map"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel flex flex-wrap items-end gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{htmlFor:"agent-map-mode",className:"block text-xs font-medium mb-1",children:c("agent.mapMode","Map Mode")}),n.jsxs("select",{id:"agent-map-mode","data-testid":"agent-map-mode",value:q,onChange:fe=>C(fe.target.value),className:"px-2.5 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink",children:[n.jsx("option",{value:"overview",children:"overview"}),n.jsx("option",{value:"task-focused",children:"task-focused"}),n.jsx("option",{value:"symbol-focused",children:"symbol-focused"}),n.jsx("option",{value:"architecture-focused",children:"architecture-focused"}),n.jsx("option",{value:"test-focused",children:"test-focused"}),n.jsx("option",{value:"change-focused",children:"change-focused"})]})]}),n.jsxs("div",{className:"flex-1 min-w-[200px]",children:[n.jsx("label",{htmlFor:"agent-map-task",className:"block text-xs font-medium mb-1",children:c("agent.optionalTask","Optional Task Focus")}),n.jsx("input",{id:"agent-map-task",type:"text",value:F,onChange:fe=>G(fe.target.value),placeholder:"Optional task focus...",className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs text-ink"})]}),n.jsx("button",{type:"button","data-testid":"agent-compile-map-btn",disabled:h,onClick:de,className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:c("agent.compileMap","Compile Repository Map")})]}),Y&&n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs font-mono",children:[n.jsx("span",{className:"px-2 py-0.5 rounded bg-accent/15 text-accent",children:Y.mode}),n.jsxs("span",{children:[Y.modules.length," modules · ",Y.budget.counted_tokens,"/",Y.budget.requested_budget," tokens (",Y.budget.exact_or_estimated,")"]})]}),n.jsx("div",{className:"space-y-2",children:Y.modules.map(fe=>n.jsxs("div",{className:"p-3 rounded border border-line bg-surface text-xs",children:[n.jsxs("div",{className:"font-mono font-semibold text-ink",children:[fe.file_id," ",n.jsxs("span",{className:"text-muted",children:["(",fe.language,", ",fe.lines_code," LOC, Fan-In: ",fe.fan_in,")"]})]}),fe.exported_symbols.length>0&&n.jsx("ul",{className:"mt-1.5 space-y-0.5 font-mono text-[11px] text-muted",children:fe.exported_symbols.slice(0,6).map(Xe=>n.jsxs("li",{children:["L",Xe.line_start,": ",Xe.signature]},Xe.symbol_id))})]},fe.file_id))})]})]}),f==="evidence"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel flex flex-wrap items-end gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-[240px]",children:[n.jsx("label",{htmlFor:"agent-evidence-id",className:"block text-xs font-medium mb-1",children:c("agent.evidenceIdLabel","Evidence ID")}),n.jsx("input",{id:"agent-evidence-id","data-testid":"agent-evidence-id-input",type:"text",value:W,onChange:fe=>w(fe.target.value),placeholder:"ev_...",className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"})]}),n.jsx("button",{type:"button","data-testid":"agent-verify-evidence-btn",disabled:h||!W.trim(),onClick:()=>Me(),className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:c("agent.verifyEvidenceBtn","Verify Evidence")})]}),R&&n.jsxs("div",{"data-testid":"agent-evidence-result",className:"p-4 rounded-lg border border-line bg-panel space-y-2 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2 font-mono",children:[n.jsx("span",{className:`px-2 py-0.5 rounded font-semibold ${R.status==="VERIFIED"?"bg-emerald-500/15 text-emerald-400":"bg-amber-500/15 text-amber-400"}`,children:R.status}),n.jsx("span",{children:R.evidence_id})]}),n.jsx("p",{className:"text-muted",children:R.details}),n.jsx("p",{className:"text-[11px] text-muted italic",children:R.semantic_disclaimer}),((Je=R.evidence)==null?void 0:Je.snippet)&&n.jsx("pre",{className:"p-3 rounded bg-surface border border-line font-mono text-[11px] overflow-x-auto",children:R.evidence.snippet})]})]}),f==="preflight"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{htmlFor:"agent-preflight-files",className:"block text-xs font-medium mb-1",children:c("agent.intendedFiles","Intended Files (comma-separated)")}),n.jsx("input",{id:"agent-preflight-files","data-testid":"agent-preflight-files-input",type:"text",value:V,onChange:fe=>B(fe.target.value),placeholder:"src/auth.py, src/session.py",className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"})]}),n.jsxs("div",{children:[n.jsx("label",{htmlFor:"agent-preflight-edges",className:"block text-xs font-medium mb-1",children:c("agent.proposedEdges","Proposed Dependency Edges (optional, a->b)")}),n.jsx("input",{id:"agent-preflight-edges",type:"text",value:P,onChange:fe=>te(fe.target.value),placeholder:"a.py->b.py",className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"})]})]}),n.jsx("button",{type:"button","data-testid":"agent-run-preflight-btn",disabled:h,onClick:at,className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:c("agent.runPreflight","Run Read-Only Preflight")})]}),le&&n.jsxs("div",{"data-testid":"agent-preflight-result",className:"p-4 rounded-lg border border-line bg-panel space-y-3 text-xs",children:[n.jsxs("div",{className:"flex flex-wrap gap-3 font-mono",children:[n.jsxs("span",{children:["Direct dependents: ",le.directly_affected_modules.length]}),n.jsxs("span",{children:["Transitive: ",le.transitively_affected_modules.length]}),n.jsxs("span",{children:["Verified symbols: ",le.verified_impacted_symbols.length]}),n.jsxs("span",{children:["Candidate symbols: ",le.candidate_impacted_symbols.length]})]}),le.hypothetical_risks.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsx("h4",{className:"font-semibold text-amber-400",children:c("agent.hypotheticalRisks","Hypothetical Risks (Pre-Edit Estimate)")}),le.hypothetical_risks.map(fe=>n.jsxs("div",{className:"p-2 rounded border border-amber-500/30 bg-amber-500/10",children:[n.jsxs("span",{className:"font-mono font-semibold mr-2",children:["[HYPOTHETICAL · ",fe.severity.toUpperCase(),"]"]}),fe.description]},fe.risk_id))]})]})]}),f==="patch"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-3",children:[n.jsx("label",{htmlFor:"agent-patch-textarea",className:"block text-xs font-medium",children:c("agent.patchLabel","Unified Diff (Strictly Read-Only — Never Applied to Disk)")}),n.jsx("textarea",{id:"agent-patch-textarea","data-testid":"agent-patch-textarea",rows:6,value:ve,onChange:fe=>k(fe.target.value),placeholder:`--- a/file.py
|
|
504
|
+
+++ b/file.py
|
|
505
|
+
@@ -1,1 +1,2 @@`,className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"}),n.jsx("button",{type:"button","data-testid":"agent-inspect-patch-btn",disabled:h||!ve.trim(),onClick:J,className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:c("agent.inspectPatch","Inspect Unified Diff")})]}),M&&n.jsxs("div",{"data-testid":"agent-patch-result",className:"p-4 rounded-lg border border-line bg-panel space-y-2 text-xs",children:[n.jsxs("div",{className:"font-mono flex flex-wrap gap-3",children:[n.jsx("span",{className:"text-emerald-400",children:"READ-ONLY"}),n.jsxs("span",{children:["Files: ",M.total_files]}),n.jsxs("span",{children:["+",M.total_added_lines," / -",M.total_deleted_lines]}),n.jsxs("span",{children:["Hypothetical Snapshot: ",M.hypothetical_snapshot_id]})]}),M.rejected_paths.length>0&&n.jsxs("p",{className:"text-danger",children:["Rejected unsafe paths: ",M.rejected_paths.join(", ")]})]})]}),f==="postflight"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel flex flex-wrap items-end gap-3",children:[n.jsxs("div",{className:"flex-1 min-w-[240px]",children:[n.jsx("label",{htmlFor:"agent-postflight-files",className:"block text-xs font-medium mb-1",children:c("agent.intendedFiles","Intended Files (optional, comma-separated)")}),n.jsx("input",{id:"agent-postflight-files",type:"text",value:ce,onChange:fe=>me(fe.target.value),className:"w-full px-3 py-2 rounded-md border border-line bg-surface text-xs font-mono text-ink"})]}),n.jsx("button",{type:"button","data-testid":"agent-run-postflight-btn",disabled:h,onClick:Se,className:"px-4 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold cursor-pointer",children:c("agent.runPostflight","Run Static Postflight Verification")})]}),ge&&n.jsxs("div",{"data-testid":"agent-postflight-result",className:"p-4 rounded-lg border border-line bg-panel space-y-2 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2 font-mono",children:[n.jsx(jn,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsxs("span",{className:"font-semibold",children:["Verdict: ",ge.verdict]}),n.jsxs("span",{className:"text-muted",children:["after: ",ge.after_snapshot_id]})]}),n.jsx("p",{className:"text-[11px] text-muted italic",children:ge.verdict_scope_disclaimer}),n.jsxs("div",{className:"font-mono text-muted",children:["Changed files: ",ge.actual_changed_files.length," · New cycles: ",ge.new_cycles.length," · Quality regressions: ",ge.quality_regressions.length]})]})]}),f==="diagnostics"&&n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{className:"p-4 rounded-lg border border-line bg-panel space-y-2 text-xs",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h3",{className:"font-semibold",children:c("agent.diagnosticsTitle","Local-First Context Diagnostics")}),n.jsx("button",{type:"button",onClick:rt,className:"px-2.5 py-1 rounded border border-line bg-surface hover:bg-raised cursor-pointer",children:c("common.refresh","Refresh")})]}),ue&&n.jsxs("div",{"data-testid":"agent-diagnostics-panel",className:"space-y-2 font-mono",children:[n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:[n.jsxs("div",{className:"p-2.5 rounded bg-surface border border-line",children:[n.jsx("div",{className:"text-muted text-[11px]",children:"Invocations"}),n.jsx("div",{className:"text-sm font-semibold",children:ue.total_invocations})]}),n.jsxs("div",{className:"p-2.5 rounded bg-surface border border-line",children:[n.jsx("div",{className:"text-muted text-[11px]",children:"Avg / P95 Latency"}),n.jsxs("div",{className:"text-sm font-semibold",children:[ue.avg_latency_ms,"ms / ",ue.p95_latency_ms,"ms"]})]}),n.jsxs("div",{className:"p-2.5 rounded bg-surface border border-line",children:[n.jsx("div",{className:"text-muted text-[11px]",children:"Payload Tokens"}),n.jsx("div",{className:"text-sm font-semibold",children:ue.total_counted_payload_tokens.toLocaleString()})]}),n.jsxs("div",{className:"p-2.5 rounded bg-surface border border-line",children:[n.jsx("div",{className:"text-muted text-[11px]",children:"External Analytics"}),n.jsx("div",{className:"text-sm font-semibold text-emerald-400",children:"DISABLED"})]})]}),n.jsx("p",{className:"text-[11px] font-sans text-muted",children:ue.privacy_notice})]})]})})]})]})},lk=({initialManifestPath:s="repodna-workspace.yml"})=>{const{i18n:i}=ft(),r=!!(i.language&&i.language.toLowerCase().startsWith("tr")),[o,c]=E.useState(s),[f,m]=E.useState(!0),[h,p]=E.useState(!1),[v,y]=E.useState(null),[g,b]=E.useState(null),[N,j]=E.useState("repositories"),[T,H]=E.useState(!1),[_,K]=E.useState(""),[z,D]=E.useState(""),[O,U]=E.useState(null),[q,C]=E.useState(!1),[F,G]=E.useState(null),[Y,I]=E.useState(""),[W,w]=E.useState(2048),[R,A]=E.useState(null),[V,B]=E.useState(!1),P=async M=>{if(M&&M.preventDefault(),!!o.trim()){p(!0),y(null);try{const ie=await HS({manifest_path:o.trim(),use_incremental_cache:f});b(ie),G({workspace_id:ie.workspace_id,workspace_snapshot_id:ie.snapshot.workspace_snapshot_id,consistency_status:ie.snapshot.consistency_status}),!z&&ie.snapshot.repositories.length>0&&D(ie.snapshot.repositories[0].alias)}catch(ie){y(ie instanceof Error?ie.message:String(ie))}finally{p(!1)}}},te=async()=>{if(!(!g||!z)){C(!0),y(null);try{const M=await US({manifest_path:o.trim(),changed_alias:z});U(M)}catch(M){y(M instanceof Error?M.message:String(M))}finally{C(!1)}}},le=async()=>{if(g)try{const M=await $S(g.workspace_id);G(M)}catch(M){y(M instanceof Error?M.message:String(M))}},pe=async M=>{if(M.preventDefault(),!(!g||!Y.trim())){B(!0),y(null);try{const ie=await BS({manifest_path:o.trim(),task:Y.trim(),token_budget:W});A(ie)}catch(ie){y(ie instanceof Error?ie.message:String(ie))}finally{B(!1)}}},ve=E.useMemo(()=>g?g.topology.edges.filter(M=>{if(T&&M.resolution_status!=="VERIFIED")return!1;if(_.trim()){const ie=_.toLowerCase();return M.source_alias.toLowerCase().includes(ie)||M.target_alias.toLowerCase().includes(ie)||M.kind.toLowerCase().includes(ie)||M.note.toLowerCase().includes(ie)}return!0}):[],[g,T,_]),k=[{id:"repositories",label:r?"Depolar":"Repositories",icon:n.jsx(G2,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"topology",label:r?"Sistem Topolojisi":"System Topology",icon:n.jsx(zr,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"contracts",label:r?"API Sözleşmeleri":"API Contracts",icon:n.jsx(di,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"impact",label:r?"Değişiklik Etkisi":"Change Impact",icon:n.jsx($c,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"policies",label:r?"Çalışma Alanı Politikaları":"Workspace Policies",icon:n.jsx(Dm,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"freshness",label:r?"Anlık Görüntü & Tazelik":"Snapshot & Freshness",icon:n.jsx(bn,{className:"w-3.5 h-3.5","aria-hidden":"true"})},{id:"context",label:r?"Ajan Bağlamı":"Agent Context",icon:n.jsx(Et,{className:"w-3.5 h-3.5","aria-hidden":"true"})}];return n.jsxs("section",{"data-testid":"workspace-intelligence-view","aria-label":r?"Çoklu Depo Çalışma Alanı Zekası":"Workspace Intelligence",className:"flex flex-col h-full w-full overflow-hidden bg-surface text-ink",children:[n.jsxs("div",{className:"border-b border-line bg-panel px-4 py-3 flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(cn,{className:"w-4 h-4 text-accent-ink","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold",children:r?"Çoklu Depo Çalışma Alanı (Workspace Intelligence)":"Workspace Intelligence"}),n.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded border border-line text-muted",children:r?"Salt-Okunur · Sıfır Yürütme":"Read-Only · Zero-Execution"})]}),n.jsxs("form",{onSubmit:P,className:"flex flex-wrap items-center gap-2 flex-1 max-w-2xl justify-end",children:[n.jsx("label",{htmlFor:"ws-manifest-input",className:"sr-only",children:r?"Workspace manifest yolu":"Workspace manifest path"}),n.jsx("input",{id:"ws-manifest-input","data-testid":"ws-manifest-input",type:"text",value:o,onChange:M=>c(M.target.value),placeholder:"repodna-workspace.yml",className:"flex-1 min-w-[220px] px-2.5 py-1.5 text-xs rounded border border-line bg-surface text-ink"}),n.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-muted cursor-pointer",children:[n.jsx("input",{type:"checkbox",checked:f,onChange:M=>m(M.target.checked)}),n.jsx("span",{children:r?"Artımlı Önbellek":"Incremental Cache"})]}),n.jsx("button",{type:"submit","data-testid":"ws-analyze-btn",disabled:h,className:"px-3 py-1.5 text-xs font-medium rounded bg-accent-solid text-white cursor-pointer disabled:opacity-50",children:h?r?"Analiz Ediliyor...":"Analyzing...":r?"Çalışma Alanını Analiz Et":"Analyze Workspace"})]})]}),v&&n.jsxs("div",{role:"alert","data-testid":"ws-error-banner",className:"mx-4 mt-3 px-3 py-2 text-xs rounded border border-rose-500/40 bg-rose-500/10 text-rose-200 flex items-center gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:v})]}),g?n.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 border-b border-line bg-panel/60 flex flex-wrap items-center gap-4 text-xs",children:[n.jsxs("span",{children:[n.jsx("strong",{children:g.workspace_name})," (",g.workspace_id,")"]}),n.jsxs("span",{children:[r?"Depolar:":"Repositories:"," ",n.jsxs("strong",{children:[g.snapshot.available_count,"/",g.snapshot.repositories.length]})]}),n.jsxs("span",{children:[r?"Bağlantılar:":"Edges:"," ",n.jsx("strong",{children:g.topology.edges.length})]}),n.jsxs("span",{children:[r?"Servisler:":"Services:"," ",n.jsx("strong",{children:g.services.length})]}),n.jsxs("span",{children:[r?"Sözleşmeler:":"Contracts:"," ",n.jsx("strong",{children:g.contracts.length})]}),n.jsxs("span",{children:[r?"Politika:":"Policy:"," ",n.jsx("strong",{"data-testid":"ws-policy-verdict",children:g.policy_report.verdict})]}),n.jsxs("span",{children:[r?"Tazelik:":"Freshness:"," ",n.jsx("strong",{"data-testid":"ws-consistency-status",children:(F==null?void 0:F.consistency_status)??g.snapshot.consistency_status})]}),n.jsx("span",{className:"text-muted",children:r?`Yeniden kullanılan: ${g.reused_repositories}, Yeniden hesaplanan: ${g.recomputed_repositories}`:`Reused: ${g.reused_repositories}, Recomputed: ${g.recomputed_repositories}`})]}),n.jsx("div",{role:"tablist","aria-label":r?"Çalışma alanı görünümleri":"Workspace sections",className:"px-4 pt-2 border-b border-line flex flex-wrap gap-1",children:k.map(M=>n.jsxs("button",{type:"button",role:"tab","data-testid":`ws-subtab-${M.id}`,"aria-selected":N===M.id,onClick:()=>j(M.id),className:`px-3 py-1.5 text-xs font-medium rounded-t flex items-center gap-1.5 cursor-pointer border-b-2 transition ${N===M.id?"border-accent-solid text-ink bg-panel":"border-transparent text-muted hover:text-ink"}`,children:[M.icon,n.jsx("span",{children:M.label})]},M.id))}),n.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[N==="repositories"&&n.jsxs("div",{className:"space-y-3","data-testid":"ws-panel-repositories",children:[g.snapshot.missing_or_failed_count>0&&n.jsxs("div",{className:"p-2.5 rounded border border-amber-500/40 bg-amber-500/10 text-xs flex items-center gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:r?`${g.snapshot.missing_or_failed_count} depo eksik veya erişilemez. Çalışma alanı eksiksiz (clean) olarak kabul edilemez.`:`${g.snapshot.missing_or_failed_count} repository is missing or inaccessible. Workspace completeness is partial/incomplete.`})]}),n.jsx("div",{className:"overflow-x-auto border border-line rounded",children:n.jsxs("table",{className:"w-full text-left text-xs",children:[n.jsx("thead",{className:"bg-panel border-b border-line text-muted",children:n.jsxs("tr",{children:[n.jsx("th",{className:"p-2",children:r?"Takma Ad":"Alias"}),n.jsx("th",{className:"p-2",children:r?"Durum":"Status"}),n.jsx("th",{className:"p-2",children:r?"Diller":"Languages"}),n.jsx("th",{className:"p-2",children:r?"Dosya":"Files"}),n.jsx("th",{className:"p-2",children:r?"Sağlık":"Health"}),n.jsx("th",{className:"p-2",children:r?"Önbellek":"Cache"})]})}),n.jsx("tbody",{className:"divide-y divide-line",children:g.snapshot.repositories.map(M=>n.jsxs("tr",{children:[n.jsx("td",{className:"p-2 font-mono font-medium",children:M.alias}),n.jsx("td",{className:"p-2",children:M.status}),n.jsx("td",{className:"p-2",children:M.languages.join(", ")||"—"}),n.jsx("td",{className:"p-2",children:M.total_files}),n.jsx("td",{className:"p-2",children:M.health_score!==null?`${M.health_score.toFixed(1)} (${M.health_grade})`:"—"}),n.jsx("td",{className:"p-2",children:M.reused_from_cache?r?"Yeniden Kullanıldı":"Reused":r?"Hesaplandı":"Computed"})]},M.repository_id))})]})})]}),N==="topology"&&n.jsxs("div",{className:"space-y-3","data-testid":"ws-panel-topology",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[n.jsx("input",{type:"text","data-testid":"ws-edge-search",value:_,onChange:M=>K(M.target.value),placeholder:r?"Bağlantı ara...":"Filter edges...",className:"px-2.5 py-1 text-xs rounded border border-line bg-surface"}),n.jsxs("label",{className:"flex items-center gap-1.5 text-xs cursor-pointer",children:[n.jsx("input",{type:"checkbox","data-testid":"ws-verified-only-toggle",checked:T,onChange:M=>H(M.target.checked)}),n.jsx("span",{children:r?"Yalnızca Doğrulanmış (VERIFIED)":"Verified Only"})]}),n.jsx("span",{className:"text-xs text-muted",children:r?`Doğrulanmış Döngüler: ${g.topology.verified_cycles.length} | Aday Döngüler: ${g.topology.candidate_cycles.length}`:`Verified Cycles: ${g.topology.verified_cycles.length} | Candidate Cycles: ${g.topology.candidate_cycles.length}`})]}),n.jsx("p",{className:"text-[11px] text-muted",children:g.topology.coverage_note}),n.jsx("div",{className:"space-y-2",children:ve.length===0?n.jsx("p",{className:"text-xs text-muted",children:r?"Filtreyle eşleşen çapraz depo bağlantısı yok.":"No cross-repository edges match the current filter."}):ve.map(M=>n.jsxs("div",{"data-testid":"ws-edge-row",className:"p-2.5 rounded border border-line bg-panel text-xs space-y-1",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("span",{className:"font-mono font-semibold",children:[M.source_alias," → ",M.target_alias]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"px-1.5 py-0.5 rounded border border-line text-[11px]",children:M.kind}),n.jsxs("span",{className:"px-1.5 py-0.5 rounded border border-line text-[11px] font-medium",children:[M.resolution_status," (",Math.round(M.confidence*100),"%)"]})]})]}),n.jsx("div",{className:"text-muted",children:M.note})]},M.edge_id))})]}),N==="contracts"&&n.jsx("div",{className:"space-y-3","data-testid":"ws-panel-contracts",children:g.contracts.length===0?n.jsx("p",{className:"text-xs text-muted",children:r?"Çalışma alanında statik API sözleşmesi bulunamadı.":"No static API contracts discovered in this workspace."}):g.contracts.map(M=>n.jsxs("div",{className:"p-3 rounded border border-line bg-panel text-xs space-y-2",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[n.jsxs("span",{className:"font-semibold",children:[M.title," (",M.version,") — ",n.jsx("code",{className:"font-mono",children:M.repository_alias})]}),n.jsxs("span",{className:"text-muted",children:[M.format," · ",M.support_status," · ",M.operations.length," ",r?"işlem":"operations"]})]}),n.jsx("div",{className:"text-muted font-mono text-[11px]",children:M.file_path}),M.operations.length>0&&n.jsx("ul",{className:"space-y-1 pl-3 list-disc",children:M.operations.slice(0,15).map((ie,ce)=>n.jsxs("li",{className:"font-mono text-[11px]",children:[ie.method," ",ie.path,ie.request_required_props.length>0?` [req: ${ie.request_required_props.join(", ")}]`:""]},`${ie.method}-${ie.path}-${ce}`))})]},M.contract_id))}),N==="impact"&&n.jsxs("div",{className:"space-y-3","data-testid":"ws-panel-impact",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("select",{"aria-label":r?"Değişen depo":"Changed repository","data-testid":"ws-impact-alias-select",value:z,onChange:M=>D(M.target.value),className:"px-2.5 py-1.5 text-xs rounded border border-line bg-surface",children:g.snapshot.repositories.map(M=>n.jsx("option",{value:M.alias,children:M.alias},M.repository_id))}),n.jsx("button",{type:"button","data-testid":"ws-compute-impact-btn",onClick:te,disabled:q||!z,className:"px-3 py-1.5 text-xs font-medium rounded bg-accent-solid text-white cursor-pointer disabled:opacity-50",children:q?r?"Hesaplanıyor...":"Computing...":r?"Çapraz Etkiyi Hesapla":"Compute Cross-Repo Impact"})]}),O&&n.jsxs("div",{className:"space-y-2 text-xs","data-testid":"ws-impact-results",children:[n.jsxs("div",{children:[n.jsx("strong",{children:r?"Doğrudan Etkilenen Depolar:":"Direct Impacts:"})," ",O.direct_impacts.length," |"," ",n.jsx("strong",{children:r?"Dolaylı Etkilenenler:":"Transitive Impacts:"})," ",O.transitive_impacts.length]}),[...O.direct_impacts,...O.transitive_impacts].map(M=>n.jsxs("div",{className:"p-2.5 rounded border border-line bg-panel",children:[n.jsx("span",{className:"font-mono font-semibold",children:M.repository_alias})," —"," ",n.jsx("span",{children:M.impact_level})," (hop ",M.hop_distance,")"]},M.repository_id))]})]}),N==="policies"&&n.jsxs("div",{className:"space-y-2 text-xs","data-testid":"ws-panel-policies",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jn,{className:"w-4 h-4 text-accent-ink","aria-hidden":"true"}),n.jsxs("span",{children:[r?"Genel Politika Kararı:":"Overall Policy Verdict:"," ",n.jsx("strong",{children:g.policy_report.verdict})," (",g.policy_report.evaluated_rules," ",r?"kural değerlendirildi":"rules evaluated",")"]})]}),g.policy_report.findings.map((M,ie)=>n.jsxs("div",{className:"p-2.5 rounded border border-line bg-panel",children:[n.jsxs("div",{className:"font-semibold",children:["[",M.verdict,"] ",M.rule_id," (",M.severity,")"]}),n.jsx("div",{className:"text-muted",children:M.message})]},`${M.rule_id}-${ie}`))]}),N==="freshness"&&n.jsxs("div",{className:"space-y-3 text-xs","data-testid":"ws-panel-freshness",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("span",{children:[r?"Anlık Görüntü Vektörü:":"Snapshot Vector ID:"," ",n.jsx("code",{className:"font-mono",children:g.snapshot.workspace_snapshot_id})]}),n.jsx("button",{type:"button","data-testid":"ws-refresh-freshness-btn",onClick:le,className:"px-2.5 py-1 rounded border border-line hover:bg-panel cursor-pointer",children:r?"Tazeliği Yeniden Doğrula":"Re-verify Freshness"})]}),n.jsx("p",{className:"text-muted",children:g.snapshot.consistency_note})]}),N==="context"&&n.jsxs("div",{className:"space-y-3 text-xs","data-testid":"ws-panel-context",children:[n.jsxs("form",{onSubmit:pe,className:"flex flex-wrap items-center gap-2",children:[n.jsx("input",{type:"text","data-testid":"ws-context-task-input",value:Y,onChange:M=>I(M.target.value),placeholder:r?"Örn: Auth endpoint değişikliğinin frontend etkisini incele":"e.g., Inspect auth endpoint impact across backend and frontend",className:"flex-1 min-w-[240px] px-2.5 py-1.5 rounded border border-line bg-surface"}),n.jsx("input",{type:"number",min:256,max:32768,value:W,onChange:M=>w(Number(M.target.value)||2048),className:"w-24 px-2 py-1.5 rounded border border-line bg-surface"}),n.jsx("button",{type:"submit","data-testid":"ws-compile-context-btn",disabled:V||!Y.trim(),className:"px-3 py-1.5 font-medium rounded bg-accent-solid text-white cursor-pointer disabled:opacity-50",children:V?r?"Derleniyor...":"Compiling...":r?"Bağlam Paketi Oluştur":"Compile Context Pack"})]}),R&&n.jsxs("div",{className:"space-y-2","data-testid":"ws-context-results",children:[n.jsxs("div",{className:"text-muted",children:[r?"Kullanılan Tahmini Token:":"Estimated Tokens Used:"," ",n.jsxs("strong",{children:[R.used_tokens," / ",R.token_budget]})," ","(",R.tokenizer_mode,") · ",R.blocks.length," ",r?"blok":"blocks"]}),R.blocks.map(M=>n.jsxs("div",{className:"p-2.5 rounded border border-line bg-panel space-y-1",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"font-semibold",children:["[",M.repository_alias,"] ",M.title]}),n.jsxs("span",{className:"text-muted",children:["~",M.estimated_tokens," tok"]})]}),n.jsx("pre",{className:"text-[11px] whitespace-pre-wrap font-mono text-muted",children:M.content})]},M.block_id))]})]})]})]}):n.jsx("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:n.jsxs("div",{className:"max-w-md space-y-2",children:[n.jsx(cn,{className:"w-8 h-8 mx-auto text-muted","aria-hidden":"true"}),n.jsx("h3",{className:"text-sm font-semibold",children:r?"Bir repodna-workspace.yml manifesti yükleyin":"Load an explicit repodna-workspace.yml manifest"}),n.jsx("p",{className:"text-xs text-muted",children:r?"RepoDNA yalnızca açıkça yetkilendirilmiş yerel depoları analiz eder; kaynak kodu çalıştırmaz ve çalışma zamanı ağına bağlanmaz.":"RepoDNA analyzes only explicitly authorized local repositories without executing target code or probing live runtime networks."})]})})]})},rk=({activeDomain:s,onSelectDomain:i,findingsCount:r=0})=>{const{i18n:o}=ft(),c=!!(o.language&&o.language.toLowerCase().startsWith("tr")),f=[{id:"architecture",label:c?"Mimari":"Architecture",icon:n.jsx(zr,{className:"w-4 h-4","aria-hidden":"true"})},{id:"code",label:c?"Kod Zekası":"Code Intel",icon:n.jsx(Gt,{className:"w-4 h-4","aria-hidden":"true"})},{id:"findings",label:c?"Bulgular":"Findings",icon:n.jsx(qb,{className:"w-4 h-4","aria-hidden":"true"}),badge:r>0?r:void 0},{id:"changes",label:c?"Değişiklikler":"Changes",icon:n.jsx(Lr,{className:"w-4 h-4","aria-hidden":"true"})},{id:"agent",label:c?"Ajan":"Agent",icon:n.jsx(Et,{className:"w-4 h-4","aria-hidden":"true"})},{id:"workspace",label:c?"Çoklu Depo":"Workspaces",icon:n.jsx(cn,{className:"w-4 h-4","aria-hidden":"true"})},{id:"reports",label:c?"Raporlar":"Reports",icon:n.jsx(Hb,{className:"w-4 h-4","aria-hidden":"true"})}];return n.jsx("nav",{"data-testid":"workstation-activity-rail","aria-label":c?"Çalışma alanı ana navigasyonu":"Primary workstation navigation",className:"hidden sm:flex flex-col items-center py-2 px-1 gap-1 border-r border-line bg-panel shrink-0 w-14 select-none",children:f.map(m=>{const h=s===m.id;return n.jsxs("button",{type:"button","data-testid":`rail-${m.id}-btn`,"aria-current":h?"page":void 0,title:m.badge!==void 0?`${m.label} (${m.badge})`:m.label,onClick:()=>i(m.id),className:`relative w-11 py-1.5 rounded flex flex-col items-center justify-center gap-0.5 text-[10px] font-medium transition cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-1 ${h?"bg-accent-solid text-white":"text-muted hover:text-ink hover:bg-raised"}`,children:[m.icon,n.jsx("span",{className:"truncate max-w-[42px] leading-tight",children:m.label}),m.badge!==void 0&&n.jsx("span",{className:"absolute -top-0.5 -right-0.5 px-1 min-w-[16px] h-4 rounded-full bg-danger-solid text-white text-[9px] font-semibold flex items-center justify-center",children:m.badge>99?"99+":m.badge})]},m.id)})})},ok=({repoName:s,totalFiles:i,liveStatus:r,workstationMode:o,highContrast:c,onToggleMode:f,onToggleHighContrast:m,onResetLayout:h})=>{const{i18n:p}=ft(),v=!!(p.language&&p.language.toLowerCase().startsWith("tr"));return n.jsxs("footer",{"data-testid":"workstation-status-bar",role:"contentinfo","aria-label":v?"Çalışma alanı durum çubuğu":"Workstation status bar",className:"h-7 px-3 border-t border-line bg-panel text-[11px] text-muted flex items-center justify-between gap-3 shrink-0 select-none overflow-x-auto",children:[n.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[n.jsxs("span",{className:"flex items-center gap-1 font-medium text-ink truncate",children:[n.jsx(Dm,{className:"w-3 h-3 text-accent shrink-0","aria-hidden":"true"}),n.jsx("span",{children:s??(v?"Depo seçilmedi":"No repository loaded")})]}),s&&n.jsxs("span",{children:[i," ",v?"dosya":"files"]}),n.jsxs("span",{className:"px-1.5 py-0.5 rounded border border-line text-[10px]",children:[v?"Canlı:":"Live:"," ",r]}),n.jsx("span",{className:"hidden md:inline text-[10px]",children:v?"Salt-Okunur · Sıfır Yürütme · 47 MCP":"Read-Only · Zero-Execution · 47 MCP"})]}),n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n.jsx("button",{type:"button","data-testid":"statusbar-mode-toggle",onClick:f,className:"px-1.5 py-0.5 rounded hover:bg-raised text-ink cursor-pointer",title:v?"Basit / Gelişmiş mod değiştir":"Toggle Simple / Advanced mode",children:o==="simple"?v?"Mod: Basit":"Mode: Simple":v?"Mod: Gelişmiş":"Mode: Advanced"}),n.jsxs("button",{type:"button","data-testid":"statusbar-contrast-toggle","aria-pressed":c,onClick:m,className:"px-1.5 py-0.5 rounded hover:bg-raised flex items-center gap-1 cursor-pointer",title:v?"Yüksek kontrast temasını değiştir":"Toggle high contrast",children:[n.jsx(ow,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{className:"hidden sm:inline",children:v?"Kontrast":"Contrast"})]}),n.jsxs("button",{type:"button","data-testid":"statusbar-reset-layout",onClick:h,className:"px-1.5 py-0.5 rounded hover:bg-raised flex items-center gap-1 cursor-pointer",title:v?"Panel yerleşimini sıfırla":"Reset panel layout",children:[n.jsx(Hr,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{className:"hidden sm:inline",children:v?"Yerleşimi Sıfırla":"Reset Layout"})]}),n.jsxs("span",{className:"font-mono text-[10px]",children:["v",Om]})]})]})},jr=25,ck=({result:s,onInspectFile:i})=>{const{i18n:r}=ft(),o=!!(r.language&&r.language.toLowerCase().startsWith("tr")),[c,f]=E.useState([]),[m,h]=E.useState(!1),[p,v]=E.useState(null),[y,g]=E.useState(""),[b,N]=E.useState("all"),[j,T]=E.useState("all"),[H,_]=E.useState(0);E.useEffect(()=>{let C=!1;return h(!0),v(null),Ib(s.analysis_id,{limit:200}).then(F=>{if(C)return;const G=(F.items??[]).map(Y=>({id:Y.finding_id,source:"quality",severity:String(Y.severity||"info").toLowerCase(),status:String(Y.status||"active").toUpperCase(),category:String(Y.category||"quality"),rule:Y.rule_id,title:Y.explanation,file:Y.file_path??null,line:Y.line_start??null}));f(G)}).catch(F=>{C||(v(F instanceof Error?F.message:String(F)),f([]))}).finally(()=>{C||h(!1)}),()=>{C=!0}},[s.analysis_id]);const K=E.useMemo(()=>{var C;return(((C=s.health_report)==null?void 0:C.findings)??[]).map((F,G)=>{var Y;return{id:`arch_${G}_${F.rule_id}`,source:"architecture",severity:String(F.severity||"warning").toLowerCase(),status:"ACTIVE",category:"architecture",rule:F.rule_id,title:F.title,file:((Y=F.affected_files)==null?void 0:Y[0])??null,line:null}})},[s]),z=E.useMemo(()=>[...K,...c],[K,c]),D=E.useMemo(()=>{const C=y.trim().toLowerCase();return z.filter(F=>j!=="all"&&F.source!==j||b!=="all"&&F.severity!==b?!1:C?F.title.toLowerCase().includes(C)||F.rule.toLowerCase().includes(C)||(F.file??"").toLowerCase().includes(C)||F.category.toLowerCase().includes(C):!0)},[z,j,b,y]),O=Math.max(1,Math.ceil(D.length/jr)),U=Math.min(H,O-1),q=D.slice(U*jr,(U+1)*jr);return n.jsxs("section",{"data-testid":"unified-findings-view","aria-label":o?"Birleşik Bulgular İncelemesi":"Unified Findings Investigation",className:"flex flex-col h-full w-full overflow-hidden bg-surface text-ink",children:[n.jsxs("div",{className:"border-b border-line bg-panel px-4 py-3 flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(qb,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold",children:o?"Birleşik Bulgular (Mimari + Kod Kalitesi)":"Unified Findings (Architecture + Quality)"}),n.jsxs("span",{className:"text-xs text-muted",children:[D.length," / ",z.length]})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("div",{className:"relative",children:[n.jsx(Ra,{className:"w-3.5 h-3.5 absolute left-2 top-2 text-muted","aria-hidden":"true"}),n.jsx("input",{type:"text","data-testid":"findings-search-input","aria-label":o?"Bulgu ara":"Search findings",value:y,onChange:C=>{g(C.target.value),_(0)},placeholder:o?"Kural, dosya veya başlık ara...":"Filter by rule, file, or title...",className:"pl-7 pr-2.5 py-1 text-xs rounded border border-line bg-surface w-56"})]}),n.jsxs("select",{"aria-label":o?"Kaynak filtresi":"Filter by source","data-testid":"findings-source-filter",value:j,onChange:C=>{T(C.target.value),_(0)},className:"px-2 py-1 text-xs rounded border border-line bg-surface",children:[n.jsx("option",{value:"all",children:o?"Tüm Kaynaklar":"All Sources"}),n.jsx("option",{value:"architecture",children:o?"Mimari":"Architecture"}),n.jsx("option",{value:"quality",children:o?"Kod Kalitesi":"Quality"})]}),n.jsxs("select",{"aria-label":o?"Önem düzeyi filtresi":"Filter by severity","data-testid":"findings-severity-filter",value:b,onChange:C=>{N(C.target.value),_(0)},className:"px-2 py-1 text-xs rounded border border-line bg-surface",children:[n.jsx("option",{value:"all",children:o?"Tüm Önem Düzeyleri":"All Severities"}),n.jsx("option",{value:"critical",children:"Critical"}),n.jsx("option",{value:"high",children:"High"}),n.jsx("option",{value:"warning",children:"Warning"}),n.jsx("option",{value:"medium",children:"Medium"}),n.jsx("option",{value:"info",children:"Info"})]})]})]}),p&&n.jsx("div",{role:"status",className:"mx-4 mt-2 px-3 py-1.5 text-xs rounded border border-line bg-panel text-muted",children:o?`Kod kalitesi bulguları yüklenemedi (${p}); mimari bulguları gösteriliyor.`:`Quality findings unavailable (${p}); showing architecture findings.`}),n.jsx("div",{className:"flex-1 overflow-auto p-4",children:m&&z.length===0?n.jsx("p",{className:"text-xs text-muted",children:o?"Bulgular yükleniyor...":"Loading findings..."}):q.length===0?n.jsx("p",{className:"text-xs text-muted","data-testid":"findings-empty-state",children:o?"Mevcut filtrelerle eşleşen bulgu yok. Not: Sıfır bulgu, çalışma zamanı doğrulamasının yerini almaz.":"No findings match the current filters. Note: zero static findings does not replace runtime testing."}):n.jsx("div",{className:"border border-line rounded overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-xs",children:[n.jsx("thead",{className:"bg-panel border-b border-line text-muted",children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",className:"p-2",children:o?"Önem":"Severity"}),n.jsx("th",{scope:"col",className:"p-2",children:o?"Durum":"Status"}),n.jsx("th",{scope:"col",className:"p-2",children:o?"Kaynak / Kural":"Source / Rule"}),n.jsx("th",{scope:"col",className:"p-2",children:o?"Açıklama":"Description"}),n.jsx("th",{scope:"col",className:"p-2",children:o?"Konum":"Location"})]})}),n.jsx("tbody",{className:"divide-y divide-line",children:q.map(C=>n.jsxs("tr",{"data-testid":"unified-finding-row",className:"hover:bg-panel/60",children:[n.jsx("td",{className:"p-2 font-mono uppercase text-[11px]",children:C.severity}),n.jsx("td",{className:"p-2 font-mono text-[11px]",children:C.status}),n.jsxs("td",{className:"p-2 font-mono text-[11px]",children:[C.source," · ",C.rule]}),n.jsx("td",{className:"p-2",children:C.title}),n.jsx("td",{className:"p-2 font-mono text-[11px]",children:C.file?n.jsxs("button",{type:"button",onClick:()=>i(C.file),className:"inline-flex items-center gap-1 text-accent hover:underline cursor-pointer",children:[n.jsxs("span",{children:[C.file,C.line?`:${C.line}`:""]}),n.jsx(Db,{className:"w-3 h-3","aria-hidden":"true"})]}):"—"})]},C.id))})]})})}),n.jsxs("div",{className:"border-t border-line bg-panel px-4 py-2 flex items-center justify-between text-xs text-muted",children:[n.jsx("span",{children:o?`Sayfa ${U+1} / ${O} (sayfa başına en fazla ${jr} kayıt)`:`Page ${U+1} of ${O} (bounded to ${jr} rows per page)`}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",disabled:U===0,onClick:()=>_(C=>Math.max(0,C-1)),className:"px-2 py-0.5 rounded border border-line disabled:opacity-40 cursor-pointer",children:o?"Önceki":"Previous"}),n.jsx("button",{type:"button",disabled:U>=O-1,onClick:()=>_(C=>Math.min(O-1,C+1)),className:"px-2 py-0.5 rounded border border-line disabled:opacity-40 cursor-pointer",children:o?"Sonraki":"Next"})]})]})]})},dk=({result:s,onOpenPassport:i,onOpenHealthReport:r})=>{const{i18n:o}=ft(),c=!!(o.language&&o.language.toLowerCase().startsWith("tr")),f=`/api/analyses/${encodeURIComponent(s.analysis_id)}/quality?format=sarif`,m=il(s.analysis_id,"json"),h=il(s.analysis_id,"html");return n.jsxs("section",{"data-testid":"report-center-view","aria-label":c?"Birleşik Rapor Merkezi":"Unified Report Center",className:"flex flex-col h-full w-full overflow-y-auto bg-surface text-ink p-4 space-y-4",children:[n.jsxs("div",{className:"border border-line rounded bg-panel p-4 flex flex-wrap items-center justify-between gap-3",children:[n.jsxs("div",{className:"space-y-1",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Hb,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("h2",{className:"text-sm font-semibold",children:c?"Rapor Merkezi (Report Center)":"Report Center"})]}),n.jsx("p",{className:"text-xs text-muted",children:c?"Tüm dışa aktarımlar mevcut statik analiz anlık görüntüsünden deterministik olarak üretilir.":"All exports are generated deterministically from the active static analysis snapshot."})]}),n.jsxs("div",{className:"text-xs text-muted font-mono space-y-0.5 text-right",children:[n.jsxs("div",{children:[s.repo_name," (",s.total_files," ",c?"dosya":"files",")"]}),n.jsxs("div",{children:["Analysis ID: ",s.analysis_id," · RepoDNA v",Om]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[n.jsxs("div",{className:"border border-line rounded bg-panel p-4 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold",children:[n.jsx(jw,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("span",{children:c?"Mimari Analiz Raporu (JSON / HTML)":"Architecture Analysis Report (JSON / HTML)"})]}),n.jsx("p",{className:"text-xs text-muted",children:c?"Tam bağımlılık grafiği, sağlık puanı, döngüler ve bulguları içerir.":"Includes full dependency graph, architecture health score, cycles, and findings."}),n.jsxs("div",{className:"flex flex-wrap gap-2 pt-1",children:[n.jsxs("a",{href:m,download:!0,"data-testid":"report-download-json",className:"px-2.5 py-1 text-xs rounded border border-line hover:bg-raised inline-flex items-center gap-1",children:[n.jsx(zn,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{children:"JSON"})]}),n.jsxs("a",{href:h,download:!0,"data-testid":"report-download-html",className:"px-2.5 py-1 text-xs rounded border border-line hover:bg-raised inline-flex items-center gap-1",children:[n.jsx(zn,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{children:"HTML"})]}),n.jsx("button",{type:"button",onClick:r,className:"px-2.5 py-1 text-xs rounded bg-accent-solid text-white cursor-pointer",children:c?"Önizlemeyi Aç":"Open Preview"})]})]}),n.jsxs("div",{className:"border border-line rounded bg-panel p-4 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold",children:[n.jsx(Gt,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("span",{children:c?"Kod Kalitesi SARIF 2.1.0 Raporu":"Code Quality SARIF 2.1.0 Report"})]}),n.jsx("p",{className:"text-xs text-muted",children:c?"GitHub Code Scanning ve CI araçları için doğrulanmış SARIF 2.1.0 çıktısı.":"Validated SARIF 2.1.0 output for GitHub Code Scanning and CI pipelines."}),n.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:n.jsxs("a",{href:f,download:!0,"data-testid":"report-download-sarif",className:"px-2.5 py-1 text-xs rounded border border-line hover:bg-raised inline-flex items-center gap-1",children:[n.jsx(zn,{className:"w-3 h-3","aria-hidden":"true"}),n.jsx("span",{children:"SARIF 2.1.0"})]})})]}),n.jsxs("div",{className:"border border-line rounded bg-panel p-4 space-y-2",children:[n.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold",children:[n.jsx(di,{className:"w-4 h-4 text-accent","aria-hidden":"true"}),n.jsx("span",{children:c?"Repository Passport (Kanıt Pasaportu)":"Repository Passport"})]}),n.jsx("p",{className:"text-xs text-muted",children:c?"Yapılandırılmış mimari kimlik, dil dağılımı ve kanıt özetini inceleyin veya dışa aktarın.":"Inspect or export structured repository identity, language coverage, and evidence summary."}),n.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:n.jsx("button",{type:"button","data-testid":"report-open-passport",onClick:i,className:"px-2.5 py-1 text-xs rounded bg-accent-solid text-white cursor-pointer",children:c?"Pasaportu Aç":"Open Passport"})})]})]}),n.jsx("div",{className:"border border-line rounded bg-panel/60 p-3 text-[11px] text-muted",children:c?"Sınırlar: Tüm raporlar statik AST ve yapısal inceleme çıktılarıdır; hedef kod yürütülmemiştir ve çalışma zamanı test kapsamının yerini almaz.":"Limitations: All reports reflect static AST and structural inspection only; target repository code is never executed and reports do not replace runtime tests."})]})},uk=({isOpen:s,onClose:i,onTryDemo:r})=>{const{t:o}=ft(),[c,f]=E.useState(1),m=4,h=E.useRef(null);if(E.useEffect(()=>{s&&f(1)},[s]),E.useEffect(()=>{if(!s)return;const b=N=>{N.key==="Escape"?(N.preventDefault(),i()):N.key==="ArrowRight"?f(j=>j<m?j+1:j):N.key==="ArrowLeft"&&f(j=>j>1?j-1:j)};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[s,i]),!s)return null;const p=()=>{c<m?f(b=>b+1):i()},v=()=>{c>1&&f(b=>b-1)},g=[{title:o("onboarding.step1Title"),desc:o("onboarding.step1Desc"),action:n.jsxs("button",{type:"button","data-testid":"onboarding-demo-btn",onClick:()=>{i(),r()},className:"mt-3 w-full flex items-center justify-center gap-2 px-3 py-2 rounded-md bg-accent-solid text-white text-xs font-semibold hover:opacity-90 cursor-pointer shadow-sm transition",children:[n.jsx(Et,{className:"w-4 h-4","aria-hidden":"true"}),o("onboarding.tryDemo")]})},{title:o("onboarding.step2Title"),desc:o("onboarding.step2Desc"),action:null},{title:o("onboarding.step3Title"),desc:o("onboarding.step3Desc"),action:null},{title:o("onboarding.step4Title"),desc:o("onboarding.step4Desc"),action:null}][c-1];return n.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"onboarding-title","data-testid":"onboarding-tour-modal",className:"fixed bottom-6 right-6 z-50 max-w-sm w-full bg-panel border border-accent/40 rounded-xl shadow-2xl p-4 text-ink flex flex-col gap-3 animate-in fade-in slide-in-from-bottom-2 duration-150",ref:h,children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-2",children:[n.jsxs("div",{className:"flex items-center gap-2 text-accent font-semibold text-xs tracking-wide",children:[n.jsx(Mm,{className:"w-4 h-4","aria-hidden":"true"}),n.jsx("span",{id:"onboarding-title",children:o("onboarding.title")})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{"data-testid":"onboarding-step-indicator",className:"text-[11px] font-mono text-muted",children:o("onboarding.step",{current:c,total:m})}),n.jsx("button",{type:"button",onClick:i,"aria-label":o("common.close"),className:"p-1 rounded hover:bg-raised text-muted hover:text-ink cursor-pointer",children:n.jsx(Gr,{className:"w-4 h-4","aria-hidden":"true"})})]})]}),n.jsxs("div",{className:"space-y-1.5 py-1",children:[n.jsx("h3",{className:"text-sm font-bold text-ink m-0",children:g.title}),n.jsx("p",{className:"text-xs text-muted leading-relaxed m-0",children:g.desc}),g.action]}),n.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-line",children:[n.jsx("div",{className:"flex items-center gap-1.5","aria-hidden":"true",children:[1,2,3,4].map(b=>n.jsx("span",{className:`h-1.5 rounded-full transition-all ${b===c?"w-5 bg-accent":"w-1.5 bg-line"}`},b))}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button","data-testid":"onboarding-skip-btn",onClick:i,className:"text-xs text-muted hover:text-ink px-2 py-1 cursor-pointer",children:o("onboarding.skip")}),c>1&&n.jsx("button",{type:"button",onClick:v,"aria-label":o("onboarding.back"),className:"p-1.5 rounded bg-raised hover:bg-line text-ink cursor-pointer text-xs",children:n.jsx(L2,{className:"w-3.5 h-3.5","aria-hidden":"true"})}),n.jsxs("button",{type:"button","data-testid":"onboarding-next-btn",onClick:p,className:"flex items-center gap-1 px-3 py-1.5 rounded-md bg-accent-solid text-white text-xs font-medium hover:opacity-90 cursor-pointer shadow-sm",children:[n.jsx("span",{children:o(c===m?"onboarding.finish":"onboarding.next")}),c===m?n.jsx(Em,{className:"w-3.5 h-3.5","aria-hidden":"true"}):n.jsx(ai,{className:"w-3.5 h-3.5","aria-hidden":"true"})]})]})]})]})};function Ly({label:s,value:i,min:r,max:o,reverse:c,onChange:f}){const m=E.useRef(null),h=p=>f(Math.max(r,Math.min(o,p)));return n.jsx("div",{role:"separator",tabIndex:0,"aria-label":s,"aria-orientation":"vertical","aria-valuemin":r,"aria-valuemax":o,"aria-valuenow":i,className:"panel-resizer",title:`${s}: drag or use arrow keys. Home / End for limits.`,onPointerDown:p=>{m.current={x:p.clientX,value:i},p.currentTarget.setPointerCapture(p.pointerId),p.preventDefault()},onPointerMove:p=>{m.current&&h(m.current.value+(p.clientX-m.current.x)*(c?-1:1))},onPointerUp:()=>{m.current=null},onLostPointerCapture:()=>{m.current=null},onKeyDown:p=>{["ArrowLeft","ArrowRight","Home","End"].includes(p.key)&&(p.preventDefault(),p.key==="Home"?h(r):p.key==="End"?h(o):h(i+(p.key==="ArrowRight"?16:-16)*(c?-1:1)))}})}const fk=({result:s})=>{const{t:i}=ft(),[r,o]=E.useState("2.0"),[c,f]=E.useState(null),[m,h]=E.useState(!1),[p,v]=E.useState(null),[y,g]=E.useState(!1),[b,N]=E.useState(!1),j=s==null?void 0:s.analysis_id,T=E.useCallback(async()=>{if(j){h(!0),v(null);try{if(r==="2.0"){const O=await tS(j,200);f(O)}else{const O=await I_(j,200);f(O)}}catch(O){const U=O instanceof Error?O.message:String(O);v(U)}finally{h(!1)}}},[j,r]);E.useEffect(()=>{j&&T()},[j,T]);const H=async()=>{if(c){N(!0);try{const O=await nS(JSON.stringify(c));f(O),o("2.0")}catch(O){v(O instanceof Error?O.message:"Migration failed.")}finally{N(!1)}}},_=()=>{c&&(navigator.clipboard.writeText(JSON.stringify(c,null,2)),g(!0),window.setTimeout(()=>g(!1),2e3))},K=()=>{if(!c)return;const O=new Blob([JSON.stringify(c,null,2)],{type:"application/json"}),U=URL.createObjectURL(O),q=document.createElement("a");q.href=U,q.download=`repodna-passport-${c.repo_name}-v${c.schema_version}.json`,q.click(),window.setTimeout(()=>URL.revokeObjectURL(U),1e3)};if(!s)return n.jsx("div",{className:"h-full flex items-center justify-center p-8 text-center text-muted text-xs",children:i("passport.noAnalysis","Analyze a repository to view its structural Repository Passport.")});const z=(c==null?void 0:c.schema_version)==="2.0.0",D=z?c:null;return n.jsxs("div",{className:"h-full flex flex-col overflow-y-auto bg-canvas text-ink p-4 sm:p-6 space-y-6",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 pb-4 border-b border-line",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Bb,{className:"w-5 h-5 text-accent","aria-hidden":"true"}),n.jsx("h1",{className:"text-lg font-bold tracking-tight",children:i("passport.title","Repository Passport")}),n.jsxs("span",{className:"px-2 py-0.5 rounded text-[11px] font-mono font-bold bg-raised border border-line",children:["v",(c==null?void 0:c.schema_version)??r]})]}),n.jsx("p",{className:"text-xs text-muted mt-1",children:i("passport.subtitle","Portable, verified architectural identity manifest for AI coding agents and engineering teams.")})]}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("div",{className:"flex rounded-md p-0.5 bg-raised border border-line text-xs",children:[n.jsx("button",{type:"button","data-testid":"passport-v1-btn",onClick:()=>o("1.0"),className:`px-2.5 py-1 rounded text-xs font-medium cursor-pointer transition ${r==="1.0"?"bg-panel text-ink shadow-xs font-semibold":"text-muted hover:text-ink"}`,children:"v1.0 (Legacy)"}),n.jsx("button",{type:"button","data-testid":"passport-v2-btn",onClick:()=>o("2.0"),className:`px-2.5 py-1 rounded text-xs font-medium cursor-pointer transition ${r==="2.0"?"bg-accent-solid text-white shadow-xs font-semibold":"text-muted hover:text-ink"}`,children:"v2.0 (Brain)"})]}),!z&&n.jsxs("button",{type:"button","data-testid":"passport-migrate-btn",onClick:H,disabled:b||!c,className:"px-3 py-1.5 rounded-lg bg-raised hover:bg-panel border border-accent/40 text-xs font-medium text-accent flex items-center gap-1.5 cursor-pointer shadow-xs disabled:opacity-50",children:[n.jsx(Et,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:b?"Migrating…":"Migrate to v2"})]}),n.jsxs("button",{type:"button",onClick:_,disabled:!c,className:"px-3 py-1.5 rounded-lg bg-panel hover:bg-raised border border-line text-xs font-medium text-ink flex items-center gap-1.5 cursor-pointer shadow-xs disabled:opacity-50",children:[y?n.jsx(Em,{className:"w-3.5 h-3.5 text-emerald-500"}):n.jsx(xs,{className:"w-3.5 h-3.5 text-muted"}),y?i("common.copied","Copied!"):i("passport.copyJson","Copy JSON")]}),n.jsxs("button",{type:"button",onClick:K,disabled:!c,className:"px-3 py-1.5 rounded-lg bg-accent-solid text-white text-xs font-medium flex items-center gap-1.5 cursor-pointer shadow-xs hover:opacity-90 disabled:opacity-50",children:[n.jsx(zn,{className:"w-3.5 h-3.5"}),i("passport.downloadJson","Download Manifest")]})]})]}),p&&n.jsxs("div",{className:"p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-lg text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0","aria-hidden":"true"}),n.jsx("span",{children:p})]}),m&&n.jsxs("div",{className:"p-8 text-center text-xs text-muted",children:[n.jsx(Hr,{className:"w-6 h-6 animate-spin mx-auto mb-2 text-accent"}),i("common.loading","Loading passport manifest…")]}),c&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-4",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[n.jsxs("div",{children:[n.jsxs("span",{className:"text-[11px] font-mono uppercase tracking-wider text-muted",children:["Schema v",c.schema_version," • RepoDNA v",c.repodna_version]}),n.jsx("h2",{className:"text-base font-bold text-ink mt-0.5",children:c.repo_name})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsxs("span",{className:"text-xs text-muted",children:[i("passport.confidence","Confidence"),":"]}),n.jsx("span",{className:"px-2.5 py-0.5 rounded-full text-xs font-bold uppercase bg-emerald-500/15 text-emerald-600 dark:text-emerald-400 border border-emerald-500/20",children:c.confidence})]})]}),n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 text-xs border-t border-line/60 pt-3",children:[n.jsxs("div",{children:[n.jsxs("span",{className:"text-muted",children:[i("passport.gitRevision","Git Revision"),":"]}),n.jsxs("div",{className:"font-mono font-medium text-ink truncate mt-0.5 flex items-center gap-1.5",children:[n.jsx("span",{className:"truncate",children:c.git_revision}),c.provenance_verified?n.jsx("span",{className:"text-[9px] px-1 py-0.5 bg-emerald-500/15 text-emerald-600 rounded shrink-0",children:"SHA"}):n.jsx("span",{className:"text-[9px] px-1 py-0.5 bg-amber-500/15 text-amber-600 rounded shrink-0",children:"unverified"})]})]}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-muted",children:[i("passport.astCoverage","AST Coverage"),":"]}),n.jsxs("div",{className:"font-bold text-ink mt-0.5",children:[c.ast_coverage.ast_loc_coverage_pct.toFixed(1),"% LOC"]})]}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-muted",children:[i("passport.healthGrade","Health Grade"),":"]}),n.jsxs("div",{className:"font-bold text-ink mt-0.5",children:[c.architecture_health.score??"N/A"," (",c.architecture_health.grade,")"]})]}),n.jsxs("div",{children:[n.jsxs("span",{className:"text-muted",children:[i("passport.modulesCount","Total Modules"),":"]}),n.jsx("div",{className:"font-bold text-ink mt-0.5",children:c.dependency_summary.total_modules})]})]}),c.identified_boundaries.length>0&&n.jsxs("div",{className:"border-t border-line/60 pt-3 text-xs",children:[n.jsxs("span",{className:"text-muted font-medium mr-2",children:[i("passport.boundaries","Identified Boundaries"),":"]}),n.jsx("div",{className:"inline-flex flex-wrap gap-1.5 mt-1",children:c.identified_boundaries.map((O,U)=>n.jsx("span",{className:"px-2 py-0.5 rounded bg-raised border border-line font-mono text-[11px] text-ink",children:O},U))})]})]}),(D==null?void 0:D.symbol_index_summary)&&n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-2",children:[n.jsx(fl,{className:"w-4 h-4 text-accent"}),n.jsx("span",{children:"Symbol Intelligence Summary (Repository Brain)"})]}),n.jsxs("span",{className:"px-2 py-0.5 rounded text-[11px] font-mono bg-raised text-muted",children:[D.symbol_index_summary.total_symbols," total symbols"]})]}),n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 text-xs",children:[n.jsxs("div",{className:"p-3 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:"Verified References"}),n.jsx("div",{className:"text-base font-mono font-bold text-success mt-0.5",children:D.symbol_index_summary.total_verified_references}),n.jsx("span",{className:"text-[10px] text-muted",children:"Proven AST edges"})]}),n.jsxs("div",{className:"p-3 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:"Candidate References"}),n.jsx("div",{className:"text-base font-mono font-bold text-warning mt-0.5",children:D.symbol_index_summary.total_candidate_references}),n.jsx("span",{className:"text-[10px] text-muted",children:"Potential call sites"})]}),n.jsxs("div",{className:"p-3 rounded bg-canvas border border-line",children:[n.jsx("span",{className:"text-muted block text-[10px] uppercase font-semibold",children:"Unresolved References"}),n.jsx("div",{className:"text-base font-mono font-bold text-muted mt-0.5",children:D.symbol_index_summary.total_unresolved_references}),n.jsx("span",{className:"text-[10px] text-muted",children:"External or dynamic"})]})]}),Object.keys(D.symbol_index_summary.symbols_by_kind).length>0&&n.jsxs("div",{className:"flex flex-wrap gap-2 pt-2 border-t border-line/60 text-xs",children:[n.jsx("span",{className:"text-muted text-[11px] self-center",children:"Symbols by Kind:"}),Object.entries(D.symbol_index_summary.symbols_by_kind).map(([O,U])=>n.jsxs("span",{className:"px-2 py-0.5 rounded bg-raised border border-line font-mono text-[11px] text-ink",children:[n.jsxs("span",{className:"text-muted uppercase font-semibold",children:[O,":"]})," ",U]},O))]})]}),(D==null?void 0:D.architectural_entrypoints)&&D.architectural_entrypoints.length>0&&n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-3",children:[n.jsxs("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-2",children:[n.jsx(cn,{className:"w-4 h-4 text-accent"}),n.jsx("span",{children:"Architectural Entrypoints"})]}),n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2",children:D.architectural_entrypoints.map((O,U)=>n.jsxs("div",{className:"p-3 rounded bg-canvas border border-line flex flex-col gap-1 text-xs",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono uppercase bg-accent/15 text-accent font-bold",children:O.role}),O.evidence_id&&n.jsx("span",{className:"text-[10px] font-mono text-muted",children:O.evidence_id})]}),n.jsx("div",{className:"font-mono text-ink text-xs truncate mt-0.5",children:O.file_path}),O.primary_symbol&&n.jsxs("div",{className:"text-[10px] font-mono text-muted truncate",children:["Primary: ",n.jsx("span",{className:"text-ink font-semibold",children:O.primary_symbol})]})]},U))})]}),(D==null?void 0:D.major_module_roles)&&D.major_module_roles.length>0&&n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-3",children:[n.jsxs("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-2",children:[n.jsx(Bc,{className:"w-4 h-4 text-accent"}),n.jsx("span",{children:"Major Module Roles"})]}),n.jsx("div",{className:"space-y-1.5",children:D.major_module_roles.map((O,U)=>n.jsxs("div",{className:"p-2.5 rounded bg-canvas border border-line flex items-center justify-between gap-3 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono uppercase bg-raised text-muted font-bold shrink-0",children:O.role}),n.jsx("span",{className:"font-mono text-ink font-semibold truncate",children:O.file_path})]}),n.jsx("span",{className:"text-[11px] text-muted shrink-0 max-w-[50%] text-right truncate",children:O.responsibility})]},U))})]}),n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-3",children:[n.jsx("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider",children:i("passport.languages","Primary Languages")}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-xs border-collapse",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-line text-muted",children:[n.jsx("th",{className:"py-2 pr-4",children:i("passport.language","Language")}),n.jsx("th",{className:"py-2 pr-4",children:i("passport.supportLevel","Support Level")}),n.jsx("th",{className:"py-2 pr-4 text-right",children:i("passport.files","Files")}),n.jsx("th",{className:"py-2 pr-4 text-right",children:i("passport.loc","LOC")}),n.jsx("th",{className:"py-2 text-right",children:i("passport.share","Code %")})]})}),n.jsx("tbody",{className:"divide-y divide-line/60",children:c.primary_languages.map((O,U)=>n.jsxs("tr",{className:"hover:bg-raised/40",children:[n.jsx("td",{className:"py-2 pr-4 font-medium text-ink",children:O.language}),n.jsx("td",{className:"py-2 pr-4",children:n.jsx("span",{className:"font-mono text-[11px] px-1.5 py-0.5 rounded bg-raised text-muted",children:O.support_level})}),n.jsx("td",{className:"py-2 pr-4 text-right font-mono text-muted",children:O.file_count}),n.jsx("td",{className:"py-2 pr-4 text-right font-mono text-muted",children:O.lines_code.toLocaleString()}),n.jsxs("td",{className:"py-2 text-right font-mono font-medium text-ink",children:[O.percentage,"%"]})]},U))})]})})]}),n.jsxs("div",{className:"p-5 bg-panel border border-line rounded-xl space-y-3",children:[n.jsx("h3",{className:"text-xs font-bold text-ink uppercase tracking-wider",children:i("passport.hubs","Architectural Hubs (Highest Fan-In / Impact)")}),c.architectural_hubs.length>0?n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2",children:c.architectural_hubs.slice(0,12).map((O,U)=>n.jsxs("div",{className:"p-3 bg-canvas border border-line rounded-lg text-xs space-y-1",children:[n.jsx("div",{className:"font-mono font-medium text-ink truncate",children:O.file_id}),n.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted",children:[n.jsxs("span",{children:["Fan-In: ",n.jsx("strong",{className:"text-ink",children:O.fan_in})]}),n.jsxs("span",{children:["Fan-Out: ",n.jsx("strong",{className:"text-ink",children:O.fan_out})]}),n.jsxs("span",{children:["Instability: ",n.jsx("strong",{className:"text-ink",children:O.instability.toFixed(2)})]})]})]},U))}):n.jsx("p",{className:"text-xs text-muted",children:i("passport.noHubs","No architectural hubs detected.")})]})]})]})},mk=({result:s,onSelectFileInStudio:i,onNavigateTab:r})=>{const[o,c]=E.useState(null),[f,m]=E.useState(!1),[h,p]=E.useState(null),[v,y]=E.useState("all"),[g,b]=E.useState("all"),[N,j]=E.useState(null),[T,H]=E.useState({}),_=s==null?void 0:s.analysis_id,K=E.useCallback(async()=>{if(_){m(!0),p(null);try{const G=await oS(_,v==="all"?void 0:v,g==="all"?void 0:g);c(G)}catch(C){p(C instanceof Error?C.message:"Failed to load refactoring advice")}finally{m(!1)}}},[_,v,g]);E.useEffect(()=>{K()},[K]);const z=C=>{const F=[`### [${C.severity.toUpperCase()}] ${C.title}`,`**Category**: \`${C.category}\``,`**Target Module**: \`${C.target_module}\``,`**Impact**: ${C.description}`,"","**Action Steps**:",...C.suggested_action_steps.map((G,Y)=>`${Y+1}. ${G}`),"",`**Expected Benefit**: ${C.expected_architectural_benefit}`,`**Risks**: ${C.risks_and_limitations}`].join(`
|
|
506
|
+
`);navigator.clipboard.writeText(F).then(()=>{j(C.recommendation_id),setTimeout(()=>j(null),2e3)})},D=(C,F)=>{H(G=>{var Y;return{...G,[C]:{...G[C]||{},[F]:!((Y=G[C])!=null&&Y[F])}}})},O=C=>{switch(C){case"critical":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-xs font-semibold bg-rose-500/20 text-rose-400 border border-rose-500/30 flex items-center gap-1",children:[n.jsx(Jt,{className:"w-3 h-3"})," Critical"]});case"high":return n.jsxs("span",{className:"px-2 py-0.5 rounded text-xs font-semibold bg-amber-500/20 text-amber-400 border border-amber-500/30 flex items-center gap-1",children:[n.jsx(Jt,{className:"w-3 h-3"})," High"]});case"medium":return n.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-semibold bg-blue-500/20 text-blue-400 border border-blue-500/30",children:"Medium"});default:return n.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-semibold bg-slate-500/20 text-slate-400 border border-slate-500/30",children:"Low"})}},U=C=>{switch(C){case"circular_dependency_reduction":return n.jsx(zy,{className:"w-4 h-4 text-rose-400"});case"high_coupling_module_review":return n.jsx(hm,{className:"w-4 h-4 text-amber-400"});case"layer_boundary_improvement":return n.jsx(cn,{className:"w-4 h-4 text-indigo-400"});case"oversized_architectural_hub_review":return n.jsx(zr,{className:"w-4 h-4 text-purple-400"});default:return n.jsx(z_,{className:"w-4 h-4 text-emerald-400"})}},q=C=>{switch(C){case"circular_dependency_reduction":return"Circular Dependency";case"high_coupling_module_review":return"High Coupling Review";case"layer_boundary_improvement":return"Layer Inversion";case"oversized_architectural_hub_review":return"Oversized Hub";default:return C}};return n.jsxs("div",{className:"flex-1 overflow-y-auto p-6 bg-slate-950 text-slate-100 flex flex-col gap-6",children:[n.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 p-5 rounded-xl bg-slate-900 border border-slate-800 shadow-sm",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx(Et,{className:"w-5 h-5 text-indigo-400"}),n.jsx("h1",{className:"text-xl font-bold tracking-tight text-white",children:"Architecture Refactoring Advisor"}),n.jsx("span",{className:"px-2 py-0.5 text-xs font-semibold rounded-full bg-indigo-500/20 text-indigo-300 border border-indigo-500/30",children:"v0.7.0 Portfolio Release"})]}),n.jsx("p",{className:"text-xs text-slate-400 max-w-3xl",children:"Deterministic, evidence-grounded architectural recommendations to break cycles, decouple high-fanout modules, eliminate layer inversions, and decompose oversized hubs."})]}),n.jsxs("button",{type:"button",onClick:K,disabled:f||!_,"data-testid":"refresh-advisor-btn",className:"self-start md:self-auto px-3.5 py-1.5 rounded-lg bg-indigo-600 hover:bg-indigo-500 disabled:opacity-50 text-xs font-medium text-white flex items-center gap-1.5 transition cursor-pointer shadow-sm",children:[n.jsx(bn,{className:`w-3.5 h-3.5 ${f?"animate-spin":""}`}),f?"Analyzing...":"Re-evaluate Advice"]})]}),o&&n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3.5",children:[n.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 flex flex-col gap-1",children:[n.jsx("span",{className:"text-xs text-slate-400",children:"Total Recommendations"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-2xl font-bold text-white",children:o.total_recommendations}),n.jsxs("span",{className:"text-xs text-slate-500",children:["/ ",o.total_modules_analyzed," modules"]})]})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 flex flex-col gap-1",children:[n.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1.5",children:[n.jsx(zy,{className:"w-3.5 h-3.5 text-rose-400"})," Critical Cycles"]}),n.jsx("div",{className:"flex items-baseline gap-2",children:n.jsx("span",{className:`text-2xl font-bold ${o.by_category.circular_dependency_reduction>0?"text-rose-400":"text-slate-300"}`,children:o.by_category.circular_dependency_reduction||0})})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 flex flex-col gap-1",children:[n.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1.5",children:[n.jsx(hm,{className:"w-3.5 h-3.5 text-amber-400"})," High Coupling"]}),n.jsx("div",{className:"flex items-baseline gap-2",children:n.jsx("span",{className:`text-2xl font-bold ${o.by_category.high_coupling_module_review>0?"text-amber-400":"text-slate-300"}`,children:o.by_category.high_coupling_module_review||0})})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 flex flex-col gap-1",children:[n.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1.5",children:[n.jsx(cn,{className:"w-3.5 h-3.5 text-indigo-400"})," Layer Inversions"]}),n.jsx("div",{className:"flex items-baseline gap-2",children:n.jsx("span",{className:`text-2xl font-bold ${o.by_category.layer_boundary_improvement>0?"text-indigo-400":"text-slate-300"}`,children:o.by_category.layer_boundary_improvement||0})})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 flex flex-col gap-1",children:[n.jsxs("span",{className:"text-xs text-slate-400 flex items-center gap-1.5",children:[n.jsx(zr,{className:"w-3.5 h-3.5 text-purple-400"})," Oversized Hubs"]}),n.jsx("div",{className:"flex items-baseline gap-2",children:n.jsx("span",{className:`text-2xl font-bold ${o.by_category.oversized_architectural_hub_review>0?"text-purple-400":"text-slate-300"}`,children:o.by_category.oversized_architectural_hub_review||0})})]})]}),n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 p-3.5 rounded-xl bg-slate-900/80 border border-slate-800 text-xs",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsxs("span",{className:"text-slate-400 font-medium flex items-center gap-1 mr-1",children:[n.jsx(Rm,{className:"w-3.5 h-3.5"})," Category:"]}),[{id:"all",label:"All"},{id:"circular_dependency_reduction",label:"Cycles"},{id:"high_coupling_module_review",label:"Coupling"},{id:"layer_boundary_improvement",label:"Layers"},{id:"oversized_architectural_hub_review",label:"Hubs"}].map(C=>n.jsx("button",{type:"button","data-testid":`filter-cat-${C.id}`,onClick:()=>y(C.id),className:`px-2.5 py-1 rounded-md font-medium transition cursor-pointer ${v===C.id?"bg-indigo-600 text-white":"bg-slate-800/80 text-slate-300 hover:bg-slate-800"}`,children:C.label},C.id))]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-slate-400 font-medium",children:"Min Severity:"}),["all","critical","high","medium","low"].map(C=>n.jsx("button",{type:"button","data-testid":`filter-sev-${C}`,onClick:()=>b(C),className:`px-2 py-0.5 rounded text-xs capitalize transition cursor-pointer ${g===C?"bg-slate-200 text-slate-950 font-semibold":"text-slate-400 hover:text-slate-200"}`,children:C},C))]})]}),h?n.jsxs("div",{className:"p-6 rounded-xl bg-rose-950/40 border border-rose-800/60 text-rose-300 text-sm flex items-center gap-3",children:[n.jsx(Jt,{className:"w-5 h-5 flex-shrink-0"}),n.jsx("span",{children:h})]}):f&&!o?n.jsxs("div",{className:"p-12 text-center text-slate-400 text-sm flex flex-col items-center gap-3",children:[n.jsx(bn,{className:"w-6 h-6 animate-spin text-indigo-400"}),n.jsx("span",{children:"Generating architectural refactoring recommendations..."})]}):(o==null?void 0:o.recommendations.length)===0?n.jsxs("div",{className:"p-12 text-center rounded-xl bg-slate-900 border border-slate-800 flex flex-col items-center gap-3",children:[n.jsx(Gt,{className:"w-10 h-10 text-emerald-400"}),n.jsx("h2",{className:"text-base font-semibold text-white",children:"Clean Architectural Baseline"}),n.jsx("p",{className:"text-xs text-slate-400 max-w-lg",children:"No actionable architectural refactoring recommendations were triggered for the selected filters. Dependency graph couplings, cycle counts, and layer boundaries meet configured thresholds."})]}):n.jsx("div",{className:"flex flex-col gap-4",children:o==null?void 0:o.recommendations.map(C=>{const F=Object.values(T[C.recommendation_id]||{}).filter(Boolean).length,G=C.suggested_action_steps.length;return n.jsxs("div",{"data-testid":`advisor-card-${C.recommendation_id}`,className:"p-5 rounded-xl bg-slate-900/90 border border-slate-800 hover:border-slate-700/80 transition flex flex-col gap-4 shadow-sm",children:[n.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-start gap-3",children:[n.jsx("div",{className:"p-2 rounded-lg bg-slate-800/80 border border-slate-700/60 mt-0.5",children:U(C.category)}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[O(C.severity),n.jsx("span",{className:"text-xs text-slate-400 font-mono",children:q(C.category)}),n.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["#",C.recommendation_id.slice(-6)]})]}),n.jsx("h3",{className:"text-sm font-semibold text-white",children:C.title}),n.jsxs("button",{type:"button",onClick:()=>i(C.target_module),className:"text-xs font-mono text-indigo-400 hover:text-indigo-300 hover:underline flex items-center gap-1 mt-0.5 text-left",children:[n.jsx(Dr,{className:"w-3.5 h-3.5"}),C.target_module]})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>z(C),title:"Copy recommendation markdown",className:"px-2.5 py-1 rounded bg-slate-800 hover:bg-slate-700 text-xs text-slate-300 flex items-center gap-1.5 transition cursor-pointer",children:N===C.recommendation_id?n.jsxs(n.Fragment,{children:[n.jsx(Em,{className:"w-3.5 h-3.5 text-emerald-400"})," Copied"]}):n.jsxs(n.Fragment,{children:[n.jsx(xs,{className:"w-3.5 h-3.5"})," Copy Prompt"]})}),n.jsxs("button",{type:"button",onClick:()=>i(C.target_module),"data-testid":`inspect-graph-btn-${C.recommendation_id}`,className:"px-2.5 py-1 rounded bg-indigo-600/20 hover:bg-indigo-600/30 text-indigo-300 border border-indigo-500/30 text-xs font-medium flex items-center gap-1 transition cursor-pointer",children:["Inspect in Graph ",n.jsx(ai,{className:"w-3 h-3"})]}),r&&n.jsx("button",{type:"button",onClick:()=>r("history"),className:"px-2 py-1 rounded bg-slate-800 hover:bg-slate-700 text-xs text-slate-300 flex items-center gap-1 transition cursor-pointer",title:"View evolution in Time Machine",children:"History"})]})]}),n.jsx("div",{className:"p-3 rounded-lg bg-slate-950/60 border border-slate-800 text-xs text-slate-300 leading-relaxed",children:C.description}),Object.keys(C.metric_delta_preview).length>0&&n.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs bg-slate-950/40 p-2.5 rounded-lg border border-slate-800/80 font-mono",children:[n.jsx("span",{className:"text-slate-400 font-sans font-medium text-[11px]",children:"METRICS DELTA:"}),Object.entries(C.metric_delta_preview).map(([Y,I])=>n.jsxs("span",{className:"px-2 py-0.5 rounded bg-slate-800/90 text-slate-200",children:[n.jsxs("strong",{className:"text-slate-400",children:[Y,":"]})," ",String(I)]},Y))]}),n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("span",{className:"text-xs font-semibold text-slate-300",children:["Action Checklist (",F,"/",G," complete)"]})}),n.jsx("div",{className:"flex flex-col gap-1.5",children:C.suggested_action_steps.map((Y,I)=>{var w;const W=!!((w=T[C.recommendation_id])!=null&&w[I]);return n.jsxs("div",{onClick:()=>D(C.recommendation_id,I),className:`p-2 rounded-lg text-xs flex items-start gap-2.5 transition cursor-pointer select-none border ${W?"bg-emerald-950/20 border-emerald-900/40 text-emerald-300 line-through":"bg-slate-950/40 border-slate-800/80 text-slate-300 hover:border-slate-700"}`,children:[n.jsx("input",{type:"checkbox",checked:W,onChange:()=>{},className:"mt-0.5 rounded border-slate-700 text-emerald-500 focus:ring-0 cursor-pointer"}),n.jsx("span",{className:"leading-snug flex-1",children:Y})]},I)})})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-xs pt-1 border-t border-slate-800/60",children:[n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(jn,{className:"w-4 h-4 text-emerald-400 flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-emerald-400",children:"Expected Benefit:"}),n.jsx("p",{className:"text-slate-300 mt-0.5",children:C.expected_architectural_benefit})]})]}),n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Jt,{className:"w-4 h-4 text-amber-400 flex-shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("span",{className:"font-semibold text-amber-400",children:"Risks & Considerations:"}),n.jsx("p",{className:"text-slate-300 mt-0.5",children:C.risks_and_limitations})]})]})]})]},C.recommendation_id)})})]})};function zy(s){return n.jsxs("svg",{...s,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:[n.jsx("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),n.jsx("path",{d:"M3 3v5h5"})]})}const hk=({result:s})=>{const{t:i}=ft(),[r,o]=E.useState("timeline"),[c,f]=E.useState([]),[m,h]=E.useState(!1),[p,v]=E.useState(null),[y,g]=E.useState(""),[b,N]=E.useState(null),[j,T]=E.useState(null),[H,_]=E.useState(!1),[K,z]=E.useState(null),[D,O]=E.useState(null),[U,q]=E.useState(!1),[C,F]=E.useState(null),[G,Y]=E.useState(""),[I,W]=E.useState(""),[w,R]=E.useState(null),[A,V]=E.useState(!1),[B,P]=E.useState(null),[te,le]=E.useState(!1),[pe,ve]=E.useState(null),[k,M]=E.useState(!1),[ie,ce]=E.useState(null),[me,ge]=E.useState(!1),[je,ue]=E.useState(null),ye=J=>{ue(J),window.setTimeout(()=>ue(null),3e3)},Ce=E.useCallback(async()=>{h(!0),v(null);try{const J=await aS(s.analysis_id,100,0);f(J.commits),J.commits.length>0&&!b&&(N(J.commits[0].sha),J.commits.length>1&&(Y(J.commits[J.commits.length-1].sha),W(J.commits[0].sha)))}catch(J){const Se=J instanceof Error?J.message:"Failed to fetch commits.";v(Se)}finally{h(!1)}},[s.analysis_id,b]);E.useEffect(()=>{Ce()},[Ce]),E.useEffect(()=>{if(!b)return;let J=!1;return(async()=>{_(!0),z(null);try{const rt=await sS(s.analysis_id,b,!0);J||T(rt)}catch(rt){if(!J){const ut=rt instanceof Error?rt.message:"Snapshot analysis failed.";z(ut)}}finally{J||_(!1)}})(),()=>{J=!0}},[s.analysis_id,b]);const dt=E.useCallback(async()=>{if(!(D||U)){q(!0),F(null);try{const J=await lS(s.analysis_id,5);O(J)}catch(J){const Se=J instanceof Error?J.message:"Failed to generate timeline.";F(Se)}finally{q(!1)}}},[s.analysis_id,D,U]);E.useEffect(()=>{r==="trends"&&dt()},[r,dt]);const Le=async()=>{if(!(!G||!I)){V(!0),P(null);try{const J=await iS(s.analysis_id,G,I);R(J)}catch(J){const Se=J instanceof Error?J.message:"Diff calculation failed.";P(Se)}finally{V(!1)}}},Ke=async(J,Se,rt=1,ut=50,yt="ev_inspect")=>{le(!0),M(!0),ce(null);try{const Je=await rS(s.analysis_id,yt,J,Se,rt,ut);ve(Je)}catch(Je){const fe=Je instanceof Error?Je.message:"Failed to read historical Git blob.";ce(fe)}finally{M(!1)}},Ee=(J,Se)=>{navigator.clipboard.writeText(J),ye(`${Se} copied to clipboard!`)},de=J=>{if(!w)return;const Se=J==="json"?JSON.stringify(w,null,2):w.summary_text,rt=new Blob([Se],{type:J==="json"?"application/json":"text/markdown"}),ut=URL.createObjectURL(rt),yt=document.createElement("a");yt.href=ut,yt.download=`repodna-evolution-diff-${w.base_commit_sha.slice(0,7)}-to-${w.head_commit_sha.slice(0,7)}.${J==="json"?"json":"md"}`,yt.click(),URL.revokeObjectURL(ut),ye(`Exported diff as ${J.toUpperCase()}`)},Me=E.useMemo(()=>{if(!y.trim())return c;const J=y.toLowerCase();return c.filter(Se=>Se.subject.toLowerCase().includes(J)||Se.author.toLowerCase().includes(J)||Se.sha.toLowerCase().includes(J))},[c,y]),at=E.useMemo(()=>c.findIndex(J=>J.sha===b),[c,b]);return n.jsxs("div",{"data-testid":"time-machine-workstation",className:"flex flex-col h-full bg-canvas overflow-hidden",children:[n.jsxs("div",{className:"px-4 py-2 bg-panel border-b border-line flex items-center justify-between gap-3 shrink-0",children:[n.jsxs("div",{className:"flex items-center gap-1.5 overflow-x-auto",children:[n.jsxs("button",{type:"button","data-testid":"tm-subtab-timeline-btn",onClick:()=>o("timeline"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${r==="timeline"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(Am,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:i("history.timelineTab","Commit Timeline & Scrubber")})]}),n.jsxs("button",{type:"button","data-testid":"tm-subtab-diff-btn",onClick:()=>o("diff"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${r==="diff"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(Lr,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:i("history.diffTab","Evolution Diff")})]}),n.jsxs("button",{type:"button","data-testid":"tm-subtab-trends-btn",onClick:()=>o("trends"),className:`px-3 py-1.5 rounded-md text-xs font-medium flex items-center gap-1.5 transition cursor-pointer ${r==="trends"?"bg-accent-solid text-white shadow-xs":"text-muted hover:text-ink hover:bg-raised"}`,children:[n.jsx(I2,{className:"w-3.5 h-3.5"}),n.jsx("span",{children:i("history.trendsTab","Architecture Trends")})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[je&&n.jsx("span",{role:"status",className:"text-xs px-2 py-0.5 rounded bg-accent/15 border border-accent/30 text-accent font-medium animate-fade",children:je}),n.jsx("button",{type:"button",onClick:()=>void Ce(),disabled:m,className:"p-1 rounded-md text-muted hover:text-ink hover:bg-raised transition cursor-pointer",title:"Refresh commit history",children:n.jsx(bn,{className:`w-3.5 h-3.5 ${m?"animate-spin":""}`})})]})]}),n.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[r==="timeline"&&n.jsxs("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden",children:[n.jsxs("div",{className:"w-full md:w-80 border-r border-line bg-panel flex flex-col shrink-0 overflow-hidden",children:[n.jsxs("div",{className:"p-3 border-b border-line flex flex-col gap-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-1.5",children:[n.jsx(Or,{className:"w-3.5 h-3.5 text-accent"}),n.jsx("span",{children:i("history.commitHistory","Git Commits")})]}),n.jsxs("span",{className:"text-[11px] font-mono text-muted",children:[Me.length," / ",c.length]})]}),n.jsxs("div",{className:"relative",children:[n.jsx(Ra,{className:"w-3 h-3 text-muted absolute left-2.5 top-1/2 -translate-y-1/2"}),n.jsx("input",{type:"text","data-testid":"commit-search-input",value:y,onChange:J=>g(J.target.value),placeholder:i("history.searchPlaceholder","Filter commits or authors..."),className:"w-full pl-7 pr-3 py-1 bg-canvas border border-line rounded text-xs text-ink placeholder:text-muted focus:outline-none focus:border-accent"})]})]}),c.length>1&&n.jsxs("div",{className:"px-3 py-2 bg-raised border-b border-line flex flex-col gap-1",children:[n.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted",children:[n.jsx("span",{children:i("history.scrubber","Time Scrubber")}),n.jsxs("span",{className:"font-mono",children:["#",at>=0?c.length-at:1," of"," ",c.length]})]}),n.jsx("input",{type:"range",min:0,max:c.length-1,value:at>=0?at:0,onChange:J=>{const Se=parseInt(J.target.value,10);c[Se]&&N(c[Se].sha)},className:"w-full accent-accent cursor-pointer h-1.5 bg-line rounded-lg"}),n.jsxs("div",{className:"flex justify-between text-[10px] text-muted font-mono",children:[n.jsx("span",{children:"Latest (HEAD)"}),n.jsx("span",{children:"Oldest"})]})]}),n.jsx("div",{"data-testid":"commit-list-container",className:"flex-1 overflow-y-auto divide-y divide-line/60",children:m?n.jsxs("div",{className:"p-6 text-center text-xs text-muted",children:[n.jsx(bn,{className:"w-4 h-4 animate-spin mx-auto mb-2 text-accent"}),n.jsx("span",{children:i("history.loadingCommits","Reading Git commit history...")})]}):p?n.jsxs("div",{className:"p-4 text-xs text-danger bg-danger/10 m-3 rounded border border-danger/30",children:[n.jsx(vn,{className:"w-4 h-4 mb-1"}),n.jsx("p",{children:p})]}):Me.length===0?n.jsx("div",{className:"p-6 text-center text-xs text-muted",children:i("history.noCommitsFound","No matching commits.")}):Me.map(J=>{const Se=J.sha===b;return n.jsxs("div",{"data-testid":`commit-item-${J.short_sha}`,onClick:()=>N(J.sha),className:`p-3 transition cursor-pointer text-left flex flex-col gap-1 ${Se?"bg-accent/10 border-l-4 border-accent pl-2":"hover:bg-raised"}`,children:[n.jsxs("div",{className:"flex items-center justify-between gap-1 text-[11px]",children:[n.jsxs("span",{className:"font-mono font-bold text-accent flex items-center gap-1",children:[n.jsx(Or,{className:"w-3 h-3"}),J.short_sha]}),n.jsxs("span",{className:"text-[10px] text-muted flex items-center gap-1",children:[n.jsx(Y2,{className:"w-2.5 h-2.5"}),J.timestamp?J.timestamp.slice(0,10):""]})]}),n.jsx("p",{className:"text-xs text-ink font-medium line-clamp-2 leading-relaxed",children:J.subject}),n.jsxs("div",{className:"flex items-center justify-between text-[10px] text-muted mt-0.5",children:[n.jsxs("span",{className:"flex items-center gap-1 truncate max-w-[130px]",children:[n.jsx(Ry,{className:"w-2.5 h-2.5"}),J.author]}),J.is_cached?n.jsx("span",{className:"px-1.5 py-0.2 rounded bg-success/15 border border-success/30 text-success font-medium",children:i("history.cached","Cached")}):n.jsx("span",{className:"text-muted/70",children:"Unanalyzed"})]})]},J.sha)})})]}),n.jsx("div",{className:"flex-1 flex flex-col overflow-y-auto bg-canvas p-4 md:p-6",children:H?n.jsxs("div",{"data-testid":"snapshot-loading-indicator",className:"flex-1 flex flex-col items-center justify-center text-xs text-muted gap-2",children:[n.jsx(bn,{className:"w-6 h-6 animate-spin text-accent"}),n.jsx("p",{className:"font-medium text-ink",children:i("history.extractingSnapshot","Extracting and analyzing historical Git snapshot...")}),n.jsx("p",{className:"text-muted text-[11px]",children:"Using safe sandbox extraction. Active working tree remains untouched."})]}):K?n.jsxs("div",{className:"p-4 bg-danger/10 border border-danger/30 rounded-lg text-xs text-danger flex flex-col gap-2",children:[n.jsxs("div",{className:"flex items-center gap-2 font-bold",children:[n.jsx(vl,{className:"w-4 h-4"}),n.jsx("span",{children:"Snapshot Analysis Failed"})]}),n.jsx("p",{children:K})]}):j?n.jsxs("div",{className:"flex flex-col gap-6 max-w-5xl mx-auto w-full",children:[n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line shadow-xs flex flex-col gap-3",children:[n.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line pb-3",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"px-2 py-0.5 rounded bg-accent-solid text-white font-mono text-xs font-bold",children:j.commit_sha.slice(0,10)}),n.jsxs("button",{type:"button",onClick:()=>Ee(j.commit_sha,"Commit SHA"),className:"text-muted hover:text-ink text-xs flex items-center gap-1 cursor-pointer",title:"Copy full 40-char SHA",children:[n.jsx(xs,{className:"w-3 h-3"}),n.jsxs("span",{className:"font-mono text-[11px]",children:[j.commit_sha.slice(0,20),"..."]})]})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[j.cache_hit?n.jsxs("span",{"data-testid":"snapshot-cache-hit-badge",className:"px-2 py-0.5 rounded bg-success/15 border border-success/30 text-success text-xs font-medium flex items-center gap-1",children:[n.jsx(Ay,{className:"w-3 h-3"}),n.jsx("span",{children:"Cache Hit (Instant)"})]}):n.jsx("span",{className:"px-2 py-0.5 rounded bg-raised border border-line text-muted text-xs font-medium",children:"Fresh Analysis"}),n.jsx("span",{className:"text-xs text-muted font-mono",children:j.commit_timestamp?j.commit_timestamp.slice(0,10):""})]})]}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("h3",{className:"text-base font-bold text-ink leading-snug",children:j.commit_message||"Commit with no message"}),n.jsxs("p",{className:"text-xs text-muted flex items-center gap-1.5",children:[n.jsx(Ry,{className:"w-3 h-3 text-accent"}),n.jsxs("span",{children:["Author: ",j.commit_author]}),n.jsx("span",{children:"•"}),n.jsxs("span",{children:["Repo: ",j.repo_identity]})]})]}),j.is_shallow&&n.jsxs("div",{className:"p-2.5 rounded bg-warning/10 border border-warning/30 text-warning text-xs flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("span",{children:i("history.shallowWarning","Repository is a shallow clone; parent lineage is truncated.")})]})]}),n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Health Score"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-xl font-bold font-mono text-ink",children:j.health.score!==null?j.health.score.toFixed(1):"N/A"}),n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-accent/15 text-accent font-bold text-xs",children:j.health.grade})]}),n.jsxs("span",{className:"text-[10px] text-muted",children:["Status: ",j.health.status]})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Total Modules"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-xl font-bold font-mono text-ink",children:j.total_files}),n.jsxs("span",{className:"text-xs text-muted font-mono",children:[j.total_lines_code.toLocaleString()," LOC"]})]}),n.jsxs("span",{className:"text-[10px] text-muted",children:["AST: ",j.ast_loc_coverage_pct.toFixed(1),"%"]})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Dependencies"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-xl font-bold font-mono text-ink",children:j.dependencies.length}),n.jsx("span",{className:"text-xs text-muted",children:"edges"})]}),n.jsx("span",{className:"text-[10px] text-muted",children:"Cross-module linkages"})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Architectural Cycles"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:`text-xl font-bold font-mono ${j.cycles.length>0?"text-danger":"text-success"}`,children:j.cycles.length}),n.jsx("span",{className:"text-xs text-muted",children:"detected"})]}),n.jsx("span",{className:"text-[10px] text-muted",children:j.cycles.length===0?"Zero circular dependencies":"Circular dependencies present"})]})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line flex flex-col gap-3",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-line pb-2.5",children:[n.jsxs("h4",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-2",children:[n.jsx(Dr,{className:"w-3.5 h-3.5 text-accent"}),n.jsxs("span",{children:["Module Inventory & Evidence (",j.modules.length,")"]})]}),n.jsx("span",{className:"text-xs text-muted",children:"Click module to inspect historical Git blob"})]}),n.jsx("div",{className:"divide-y divide-line/60 max-h-80 overflow-y-auto",children:j.modules.map(J=>n.jsxs("div",{"data-testid":`snapshot-module-${J.name}`,onClick:()=>void Ke(j.commit_sha,J.path,1,40,`ev_mod_${J.name}`),className:"py-2.5 px-2 hover:bg-raised transition flex items-center justify-between gap-3 text-xs cursor-pointer rounded",children:[n.jsxs("div",{className:"flex flex-col min-w-0",children:[n.jsx("span",{className:"font-mono font-medium text-ink truncate",children:J.path}),n.jsxs("span",{className:"text-[11px] text-muted",children:[J.language," • ",J.lines_code," LOC • ",J.symbol_count," symbols"]})]}),n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[J.in_cycle&&n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-danger/15 text-danger font-medium text-[10px]",children:"In Cycle"}),J.is_hub&&n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-warning/15 text-warning font-medium text-[10px]",children:"Hub"}),n.jsxs("span",{className:"font-mono text-muted text-[11px]",children:["In: ",J.fan_in," / Out: ",J.fan_out]}),n.jsx(Mc,{className:"w-3.5 h-3.5 text-muted"})]})]},J.path))})]})]}):null})]}),r==="diff"&&n.jsx("div",{className:"flex-1 flex flex-col p-4 md:p-6 overflow-y-auto bg-canvas",children:n.jsxs("div",{className:"max-w-5xl mx-auto w-full flex flex-col gap-6",children:[n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line shadow-xs flex flex-col md:flex-row items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex flex-wrap items-center gap-3 w-full md:w-auto",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{className:"text-[11px] font-bold text-muted uppercase",children:"Base Commit (Older)"}),n.jsx("select",{"data-testid":"diff-base-select",value:G,onChange:J=>Y(J.target.value),className:"px-2.5 py-1.5 bg-canvas border border-line rounded text-xs font-mono text-ink focus:outline-none focus:border-accent",children:c.map(J=>n.jsxs("option",{value:J.sha,children:[J.short_sha," — ",J.subject?J.subject.slice(0,36):""," (",J.timestamp?J.timestamp.slice(0,10):"",")"]},`base-${J.sha}`))})]}),n.jsx(ai,{className:"w-4 h-4 text-muted hidden md:block mt-4"}),n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx("label",{className:"text-[11px] font-bold text-muted uppercase",children:"Head Commit (Newer)"}),n.jsx("select",{"data-testid":"diff-head-select",value:I,onChange:J=>W(J.target.value),className:"px-2.5 py-1.5 bg-canvas border border-line rounded text-xs font-mono text-ink focus:outline-none focus:border-accent",children:c.map(J=>n.jsxs("option",{value:J.sha,children:[J.short_sha," — ",J.subject?J.subject.slice(0,36):""," (",J.timestamp?J.timestamp.slice(0,10):"",")"]},`head-${J.sha}`))})]})]}),n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[n.jsxs("button",{type:"button","data-testid":"run-diff-btn",onClick:()=>void Le(),disabled:A||!G||!I,className:"px-4 py-2 bg-accent-solid text-white font-medium text-xs rounded-lg shadow-xs hover:opacity-95 transition flex items-center gap-1.5 cursor-pointer disabled:opacity-50",children:[n.jsx(Lr,{className:`w-3.5 h-3.5 ${A?"animate-spin":""}`}),n.jsx("span",{children:A?i("history.calculatingDiff","Comparing..."):i("history.compareCommits","Compare Architecture")})]}),w&&n.jsxs("div",{className:"flex items-center gap-1 border-l border-line pl-2",children:[n.jsxs("button",{type:"button",onClick:()=>de("json"),className:"px-2 py-1.5 rounded bg-raised hover:bg-line text-ink text-xs font-medium transition cursor-pointer flex items-center gap-1",title:"Download Diff JSON",children:[n.jsx(zn,{className:"w-3 h-3 text-accent"}),n.jsx("span",{children:"JSON"})]}),n.jsxs("button",{type:"button",onClick:()=>de("markdown"),className:"px-2 py-1.5 rounded bg-raised hover:bg-line text-ink text-xs font-medium transition cursor-pointer flex items-center gap-1",title:"Download Diff Markdown",children:[n.jsx(zn,{className:"w-3 h-3 text-accent"}),n.jsx("span",{children:"MD"})]})]})]})]}),A?n.jsxs("div",{className:"p-12 text-center text-xs text-muted flex flex-col items-center gap-2",children:[n.jsx(bn,{className:"w-6 h-6 animate-spin text-accent"}),n.jsx("p",{className:"font-bold text-ink",children:"Analyzing architectural evolution between revisions..."})]}):B?n.jsxs("div",{className:"p-4 bg-danger/10 border border-danger/30 rounded-lg text-xs text-danger flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsx("p",{children:B})]}):w?n.jsxs("div",{"data-testid":"evolution-diff-content",className:"flex flex-col gap-6",children:[n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Health Score Delta"}),n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx("span",{className:"text-xl font-bold font-mono text-ink",children:w.health_delta.score_after!==null?w.health_delta.score_after.toFixed(1):"N/A"}),w.health_delta.score_delta!==null&&n.jsxs("span",{className:`text-xs font-bold font-mono flex items-center ${w.health_delta.score_delta>=0?"text-success":"text-danger"}`,children:[w.health_delta.score_delta>=0?"+":"",w.health_delta.score_delta.toFixed(1)]})]}),n.jsxs("span",{className:"text-[10px] text-muted",children:[w.health_delta.grade_before," →"," ",w.health_delta.grade_after]})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Modules Churn"}),n.jsxs("div",{className:"flex items-baseline gap-2 text-xs font-mono font-bold",children:[n.jsxs("span",{className:"text-success",children:["+",w.module_changes.added.length]}),n.jsx("span",{children:"/"}),n.jsxs("span",{className:"text-danger",children:["-",w.module_changes.removed.length]}),n.jsx("span",{children:"/"}),n.jsxs("span",{className:"text-accent",children:["~",w.module_changes.renamed.length]})]}),n.jsx("span",{className:"text-[10px] text-muted",children:"Added / Removed / Renamed"})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Dependencies"}),n.jsxs("div",{className:"flex items-baseline gap-2 text-xs font-mono font-bold",children:[n.jsxs("span",{className:"text-success",children:["+",w.dependency_changes.added_edges.length]}),n.jsx("span",{children:"/"}),n.jsxs("span",{className:"text-danger",children:["-",w.dependency_changes.removed_edges.length]})]}),n.jsx("span",{className:"text-[10px] text-muted",children:"Added / Removed Edges"})]}),n.jsxs("div",{className:"p-3.5 rounded-lg bg-panel border border-line flex flex-col gap-1",children:[n.jsx("span",{className:"text-[11px] font-medium text-muted",children:"Cycle Progression"}),n.jsxs("div",{className:"flex items-baseline gap-2 text-xs font-mono font-bold",children:[n.jsxs("span",{className:"text-danger",children:["+",w.cycle_changes.new_cycles.length," new"]}),n.jsx("span",{children:"•"}),n.jsxs("span",{className:"text-success",children:["-",w.cycle_changes.resolved_cycles.length," resolved"]})]}),n.jsxs("span",{className:"text-[10px] text-muted",children:["Persisting: ",w.cycle_changes.persisting_cycles_count]})]})]}),w.caveats.length>0&&n.jsxs("div",{className:"p-3 rounded-lg bg-raised border border-line text-xs text-muted flex flex-col gap-1",children:[n.jsxs("span",{className:"font-bold text-ink flex items-center gap-1.5",children:[n.jsx(vn,{className:"w-3.5 h-3.5 text-accent"}),n.jsx("span",{children:"Honest Evaluation Caveats:"})]}),n.jsx("ul",{className:"list-disc list-inside text-[11px] space-y-0.5",children:w.caveats.map(J=>n.jsx("li",{children:J},J))})]}),w.module_changes.renamed.length>0&&n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line flex flex-col gap-2.5",children:[n.jsxs("h4",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-1.5",children:[n.jsx(Et,{className:"w-3.5 h-3.5 text-accent"}),n.jsxs("span",{children:["Renamed / Moved Modules (",w.module_changes.renamed.length,")"]})]}),n.jsx("div",{className:"divide-y divide-line/60",children:w.module_changes.renamed.map(J=>n.jsxs("div",{className:"py-2 flex flex-col sm:flex-row sm:items-center justify-between gap-2 text-xs",children:[n.jsxs("div",{className:"flex items-center gap-1.5 font-mono",children:[n.jsx("span",{className:"text-muted line-through",children:J.old_path}),n.jsx(ai,{className:"w-3.5 h-3.5 text-accent shrink-0"}),n.jsx("span",{className:"text-ink font-medium",children:J.new_path})]}),n.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[J.is_verified_by_git?n.jsxs("span",{className:"px-2 py-0.5 rounded bg-success/15 border border-success/30 text-success text-[10px] font-medium flex items-center gap-1",children:[n.jsx(jn,{className:"w-3 h-3"}),n.jsx("span",{children:"Git-Detected Rename"})]}):n.jsx("span",{className:"px-2 py-0.5 rounded bg-warning/15 border border-warning/30 text-warning text-[10px] font-medium",children:"Candidate Heuristic Match"}),n.jsxs("span",{className:"text-[10px] font-mono text-muted",children:["Conf: ",(J.confidence*100).toFixed(0),"%"]})]})]},`${J.old_path}->${J.new_path}`))})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line flex flex-col gap-2",children:[n.jsxs("h4",{className:"text-xs font-bold text-success uppercase tracking-wider flex items-center gap-1.5",children:[n.jsx(Fb,{className:"w-3.5 h-3.5"}),n.jsxs("span",{children:["Added Modules (",w.module_changes.added.length,")"]})]}),n.jsx("div",{className:"max-h-60 overflow-y-auto divide-y divide-line/40 text-xs font-mono",children:w.module_changes.added.length===0?n.jsx("span",{className:"text-muted text-[11px]",children:"No new modules added."}):w.module_changes.added.map(J=>n.jsxs("div",{onClick:()=>void Ke(I,J,1,40,`ev_add_${J}`),className:"py-1.5 px-1 hover:bg-raised text-ink cursor-pointer truncate flex items-center justify-between",children:[n.jsx("span",{children:J}),n.jsx(Mc,{className:"w-3 h-3 text-muted"})]},`add-${J}`))})]}),n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line flex flex-col gap-2",children:[n.jsxs("h4",{className:"text-xs font-bold text-danger uppercase tracking-wider flex items-center gap-1.5",children:[n.jsx(Yb,{className:"w-3.5 h-3.5"}),n.jsxs("span",{children:["Removed Modules (",w.module_changes.removed.length,")"]})]}),n.jsx("div",{className:"max-h-60 overflow-y-auto divide-y divide-line/40 text-xs font-mono",children:w.module_changes.removed.length===0?n.jsx("span",{className:"text-muted text-[11px]",children:"No modules removed."}):w.module_changes.removed.map(J=>n.jsxs("div",{onClick:()=>void Ke(G,J,1,40,`ev_rem_${J}`),className:"py-1.5 px-1 hover:bg-raised text-muted line-through cursor-pointer truncate flex items-center justify-between",children:[n.jsx("span",{children:J}),n.jsx(Mc,{className:"w-3 h-3 text-muted"})]},`rem-${J}`))})]})]}),w.coupling_deltas.length>0&&n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line flex flex-col gap-2.5",children:[n.jsxs("h4",{className:"text-xs font-bold text-ink uppercase tracking-wider flex items-center gap-1.5",children:[n.jsx(cn,{className:"w-3.5 h-3.5 text-accent"}),n.jsxs("span",{children:["Coupling Hotspot Shifts (",w.coupling_deltas.length,")"]})]}),n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-xs font-mono",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-line text-[11px] text-muted",children:[n.jsx("th",{className:"py-2 px-2",children:"Module"}),n.jsx("th",{className:"py-2 px-2 text-right",children:"Fan-In (Ca)"}),n.jsx("th",{className:"py-2 px-2 text-right",children:"Fan-Out (Ce)"}),n.jsx("th",{className:"py-2 px-2 text-right",children:"Instability (I)"})]})}),n.jsx("tbody",{className:"divide-y divide-line/40",children:w.coupling_deltas.slice(0,10).map(J=>n.jsxs("tr",{className:"hover:bg-raised",children:[n.jsx("td",{className:"py-2 px-2 font-medium text-ink truncate max-w-xs",children:J.path}),n.jsxs("td",{className:"py-2 px-2 text-right",children:[J.fan_in_before," → ",J.fan_in_after," ",n.jsxs("span",{className:J.fan_in_delta>0?"text-accent":J.fan_in_delta<0?"text-muted":"",children:["(",J.fan_in_delta>=0?"+":"",J.fan_in_delta,")"]})]}),n.jsxs("td",{className:"py-2 px-2 text-right",children:[J.fan_out_before," → ",J.fan_out_after," ",n.jsxs("span",{className:J.fan_out_delta>0?"text-danger":J.fan_out_delta<0?"text-success":"",children:["(",J.fan_out_delta>=0?"+":"",J.fan_out_delta,")"]})]}),n.jsxs("td",{className:"py-2 px-2 text-right",children:[J.instability_before.toFixed(2)," →"," ",J.instability_after.toFixed(2)]})]},J.path))})]})})]})]}):n.jsx("div",{className:"p-12 text-center text-xs text-muted border border-dashed border-line rounded-xl",children:'Select two commits above and click "Compare Architecture" to inspect structural differences.'})]})}),r==="trends"&&n.jsx("div",{className:"flex-1 flex flex-col p-4 md:p-6 overflow-y-auto bg-canvas",children:n.jsxs("div",{className:"max-w-5xl mx-auto w-full flex flex-col gap-6",children:[n.jsxs("div",{className:"p-4 rounded-xl bg-panel border border-line shadow-xs flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-bold text-ink",children:"Historical Architectural Progression"}),n.jsx("p",{className:"text-xs text-muted",children:"Trace health scores, modular scale, and cycles across commit sequence."})]}),n.jsxs("button",{type:"button",onClick:()=>{O(null),dt()},disabled:U,className:"px-3 py-1.5 rounded bg-raised hover:bg-line text-ink text-xs font-medium transition cursor-pointer flex items-center gap-1.5",children:[n.jsx(bn,{className:`w-3.5 h-3.5 ${U?"animate-spin":""}`}),n.jsx("span",{children:"Re-evaluate"})]})]}),U?n.jsxs("div",{className:"p-12 text-center text-xs text-muted flex flex-col items-center gap-2",children:[n.jsx(bn,{className:"w-6 h-6 animate-spin text-accent"}),n.jsx("p",{className:"font-bold text-ink",children:"Building chronological architecture progression..."})]}):C?n.jsx("div",{className:"p-4 bg-danger/10 border border-danger/30 rounded text-xs text-danger",children:C}):D?n.jsxs("div",{className:"flex flex-col gap-4",children:[D.failed_commits>0&&n.jsxs("div",{className:"p-3 bg-warning/10 border border-warning/30 rounded text-xs text-warning flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 shrink-0"}),n.jsxs("span",{children:[D.failed_commits," commit(s) failed extraction and are marked as UNAVAILABLE rather than reporting fake zeros."]})]}),n.jsx("div",{className:"rounded-xl bg-panel border border-line overflow-hidden shadow-xs",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full text-left text-xs font-mono",children:[n.jsx("thead",{className:"bg-raised border-b border-line text-muted text-[11px]",children:n.jsxs("tr",{children:[n.jsx("th",{className:"py-2.5 px-3",children:"Commit"}),n.jsx("th",{className:"py-2.5 px-3",children:"Date"}),n.jsx("th",{className:"py-2.5 px-3",children:"Author"}),n.jsx("th",{className:"py-2.5 px-3",children:"Status"}),n.jsx("th",{className:"py-2.5 px-3 text-right",children:"Health Score"}),n.jsx("th",{className:"py-2.5 px-3 text-right",children:"Modules"}),n.jsx("th",{className:"py-2.5 px-3 text-right",children:"Lines Code"}),n.jsx("th",{className:"py-2.5 px-3 text-right",children:"Cycles"}),n.jsx("th",{className:"py-2.5 px-3 text-right",children:"AST Cov"})]})}),n.jsx("tbody",{className:"divide-y divide-line/50",children:D.entries.map(J=>{const Se=J.status==="failed";return n.jsxs("tr",{className:`hover:bg-raised transition ${Se?"bg-danger/5":""}`,children:[n.jsx("td",{className:"py-2 px-3 font-bold text-accent",children:J.commit_sha.slice(0,10)}),n.jsx("td",{className:"py-2 px-3 text-muted",children:J.commit_timestamp?J.commit_timestamp.slice(0,10):"N/A"}),n.jsx("td",{className:"py-2 px-3 text-ink truncate max-w-[120px]",children:J.commit_author}),n.jsx("td",{className:"py-2 px-3",children:Se?n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-danger/15 text-danger font-bold text-[10px]",children:"FAILED"}):n.jsx("span",{className:"px-1.5 py-0.5 rounded bg-success/15 text-success font-bold text-[10px]",children:"SUCCESS"})}),n.jsx("td",{className:"py-2 px-3 text-right font-bold text-ink",children:Se||J.health_score===null?"N/A":`${J.health_score.toFixed(1)} (${J.health_grade})`}),n.jsx("td",{className:"py-2 px-3 text-right text-ink",children:Se?"N/A":J.modules_count}),n.jsx("td",{className:"py-2 px-3 text-right text-muted",children:Se?"N/A":J.total_lines_code.toLocaleString()}),n.jsx("td",{className:"py-2 px-3 text-right",children:Se?"N/A":J.cycles_count>0?n.jsx("span",{className:"text-danger font-bold",children:J.cycles_count}):n.jsx("span",{className:"text-success",children:"0"})}),n.jsx("td",{className:"py-2 px-3 text-right text-muted",children:Se?"N/A":`${J.ast_coverage_pct.toFixed(1)}%`})]},J.commit_sha)})})]})})})]}):null]})})]}),te&&n.jsx("div",{"data-testid":"evidence-inspector-modal",className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-xs flex items-center justify-center p-4 animate-fade",children:n.jsxs("div",{className:"bg-panel border border-line rounded-xl max-w-3xl w-full max-h-[85vh] flex flex-col shadow-2xl overflow-hidden",children:[n.jsxs("div",{className:"p-4 border-b border-line flex items-center justify-between bg-raised",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(Dr,{className:"w-4 h-4 text-accent"}),n.jsx("h3",{className:"text-sm font-bold text-ink",children:"Historical Git Blob Evidence Inspector"})]}),n.jsx("button",{type:"button",onClick:()=>le(!1),className:"p-1 rounded text-muted hover:text-ink cursor-pointer",children:n.jsx(Gr,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"p-5 flex-1 overflow-y-auto flex flex-col gap-4",children:[n.jsxs("div",{className:"p-3 rounded-lg bg-accent/10 border border-accent/30 text-xs text-accent flex items-start gap-2",children:[n.jsx(Ay,{className:"w-4 h-4 shrink-0 mt-0.5"}),n.jsxs("div",{children:[n.jsx("p",{className:"font-bold",children:"Cryptographically Verified Historical Blob"}),n.jsx("p",{className:"text-[11px] text-muted",children:"This file snippet is read directly from Git commit blob storage. It reflects the code as it existed at the specified revision, entirely isolated from your active working tree."})]})]}),k?n.jsxs("div",{className:"p-8 text-center text-xs text-muted flex flex-col items-center gap-2",children:[n.jsx(bn,{className:"w-5 h-5 animate-spin text-accent"}),n.jsx("span",{children:"Loading source from historical Git object..."})]}):ie?n.jsx("div",{className:"p-4 bg-danger/10 border border-danger/30 rounded text-xs text-danger",children:ie}):pe?n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2 text-xs font-mono",children:[n.jsxs("div",{className:"p-2 bg-canvas border border-line rounded",children:[n.jsx("span",{className:"text-[10px] text-muted block",children:"Commit SHA"}),n.jsx("span",{className:"font-bold text-ink truncate block",children:pe.commit_sha.slice(0,10)})]}),n.jsxs("div",{className:"p-2 bg-canvas border border-line rounded",children:[n.jsx("span",{className:"text-[10px] text-muted block",children:"File Path"}),n.jsx("span",{className:"font-bold text-ink truncate block",children:pe.file_path})]}),n.jsxs("div",{className:"p-2 bg-canvas border border-line rounded",children:[n.jsx("span",{className:"text-[10px] text-muted block",children:"Line Range"}),n.jsxs("span",{className:"font-bold text-ink",children:["L",pe.line_start," - L",pe.line_end]})]}),n.jsxs("div",{className:"p-2 bg-canvas border border-line rounded",children:[n.jsx("span",{className:"text-[10px] text-muted block",children:"Source"}),n.jsx("span",{className:"font-bold text-success truncate block",children:pe.revision_source})]})]}),n.jsxs("div",{className:"rounded-lg bg-canvas border border-line overflow-hidden font-mono text-xs",children:[n.jsxs("div",{className:"px-3 py-1.5 bg-raised border-b border-line flex items-center justify-between text-[11px] text-muted",children:[n.jsx("span",{children:pe.file_path}),n.jsxs("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(pe.snippet),ge(!0),window.setTimeout(()=>ge(!1),2e3)},className:"flex items-center gap-1 hover:text-ink cursor-pointer",children:[n.jsx(xs,{className:"w-3 h-3"}),n.jsx("span",{children:me?"Copied!":"Copy Code"})]})]}),n.jsx("pre",{className:"p-4 overflow-x-auto text-ink leading-relaxed",children:n.jsx("code",{children:pe.snippet})})]})]}):null]}),n.jsx("div",{className:"p-3 border-t border-line bg-raised flex justify-end",children:n.jsx("button",{type:"button",onClick:()=>le(!1),className:"px-4 py-1.5 rounded-lg bg-panel hover:bg-canvas border border-line text-xs font-medium text-ink cursor-pointer",children:"Close Inspector"})})]})})]})},pk=({result:s,cyclesOnly:i,onToggleCyclesOnly:r,onOpenReportTab:o,isPreviousAnalysis:c=!1,workstationMode:f="simple"})=>{const{t:m}=ft(),h=s.health_report,p=s.graph_metrics,v=s.transparency,y={A:"text-success bg-success/15 border-success/30",B:"text-accent bg-accent/15 border-accent/30",C:"text-warning bg-warning/15 border-warning/30",D:"text-warning bg-warning/15 border-warning/30",F:"text-danger bg-danger/15 border-danger/30","N/A":"text-muted bg-raised border-line"},g=h.status==="insufficient_dependency_coverage",b=s.cycles.length>0,N=h.findings[0],j=g?m("summary.actionLowCoverage"):b?m("summary.actionCycle"):N?N.remediation:m("summary.actionClean");return n.jsxs("section",{"aria-label":"Repository analysis summary metrics",className:"summary-strip text-xs","data-mode":f,children:[n.jsxs("button",{type:"button",onClick:o,className:"flex items-center justify-between p-2 rounded-lg bg-panel hover:bg-raised border border-line text-left cursor-pointer transition",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"text-[11px] tracking-wide text-muted font-semibold flex items-center gap-1.5",children:[n.jsx("span",{children:m("summary.architectureHealth")}),c&&n.jsx("span",{"data-testid":"previous-analysis-badge",className:"px-1.5 py-0.5 rounded bg-warning/20 border border-warning/40 text-warning text-[11px] font-bold uppercase",children:m("summary.previousAnalysis")})]}),n.jsx("div",{className:"text-base font-bold text-ink mt-0.5 flex items-baseline gap-1.5",children:h.overall_score!==null?n.jsxs(n.Fragment,{children:[n.jsx("span",{"data-testid":"summary-health-score",children:h.overall_score.toFixed(1)}),n.jsx("span",{className:"text-[11px] font-normal text-muted",children:"/ 100"})]}):g?n.jsx("span",{"data-testid":"summary-health-score",className:"text-xs text-warning font-semibold",children:m("common.insufficientCoverage")}):n.jsxs("span",{"data-testid":"summary-health-score",className:"text-sm text-muted",children:["N/A (",m("common.notEvaluated"),")"]})}),h.confidence&&h.confidence!=="none"&&n.jsxs("div",{className:"text-[11px] text-muted mt-0.5",children:[m("report.confidenceLabel")," ",n.jsx("span",{"data-testid":"summary-health-confidence",className:h.confidence==="high"?"text-success font-semibold uppercase":h.confidence==="medium"?"text-accent font-semibold uppercase":"text-warning font-semibold uppercase",children:h.confidence})]})]}),n.jsx("span",{className:`px-2.5 py-1 rounded-lg font-bold text-sm border ${y[h.grade]??y["N/A"]}`,children:h.grade})]}),n.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:"text-[11px] tracking-wide text-muted font-semibold",children:m("summary.codeVolume")}),n.jsxs("div",{className:"text-sm font-bold text-ink mt-0.5",children:[n.jsx("span",{"data-testid":"summary-total-files",children:s.total_files.toLocaleString()})," ",m("summary.files")," •"," ",n.jsx("span",{className:"text-accent",children:s.total_lines_code.toLocaleString()})," LOC"]}),s.performance&&n.jsxs("div",{className:"text-[11px] text-muted mt-0.5 font-mono truncate","data-testid":"summary-perf-pill",children:[s.performance.analysis_mode_executed==="warm_snapshot"?m("performance.modeWarm"):s.performance.analysis_mode_executed==="incremental"?m("performance.modeInc"):m("performance.modeFullBadge")," ","• ",s.duration_ms," ms"]})]}),n.jsx(_w,{className:"w-4 h-4 text-accent shrink-0","aria-hidden":"true"})]}),f==="simple"&&n.jsxs("button",{type:"button",onClick:r,className:`flex items-center justify-between p-2 rounded-lg border text-left cursor-pointer transition ${i?"bg-accent/15 border-accent text-accent":"bg-panel hover:bg-raised border-line text-ink"}`,children:[n.jsxs("div",{className:"min-w-0 pr-1",children:[n.jsxs("div",{className:"text-[11px] tracking-wide text-muted font-semibold flex items-center gap-1",children:[n.jsx("span",{children:m("summary.circularDeps")}),i&&n.jsxs("span",{className:"text-[10px] text-accent font-bold uppercase",children:["(",m("common.active"),")"]})]}),n.jsx("div",{className:"text-sm font-bold mt-0.5 truncate",children:g?n.jsx("span",{"data-testid":"summary-cycle-count",className:"text-warning text-xs font-semibold",children:m("summary.notEvaluatedLowAst")}):b?n.jsx("span",{"data-testid":"summary-cycle-count",className:"text-danger font-mono",children:m("summary.cyclesBreakdown",{cycles:s.cycles.length,sccs:p.scc_count,modules:p.nodes_in_cycles})}):n.jsxs("span",{"data-testid":"summary-cycle-count",className:"text-success text-xs font-semibold flex items-center gap-1",children:[n.jsx(jn,{className:"w-3.5 h-3.5 text-success"}),m("summary.acyclicZero")]})})]}),n.jsx(ml,{className:`w-4 h-4 shrink-0 ${b?"text-danger":"text-success"} ${i?"rotate-180 transition-transform":""}`,"aria-hidden":"true"})]}),f==="simple"&&n.jsxs("div",{className:"hidden lg:flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{className:"min-w-0 pr-2",children:[n.jsxs("div",{className:"text-[11px] tracking-wide text-accent font-semibold flex items-center gap-1",children:[n.jsx(Et,{className:"w-3 h-3 text-accent"}),n.jsx("span",{children:m("summary.recommendedAction")})]}),n.jsx("p",{className:"text-xs text-muted mt-0.5 truncate leading-snug",title:j,children:j})]}),n.jsx(ai,{className:"w-3.5 h-3.5 text-muted shrink-0","aria-hidden":"true"})]}),f==="advanced"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] tracking-wide text-muted font-semibold",children:m("summary.moduleTopology")}),n.jsxs("div",{className:"text-sm font-bold text-ink mt-0.5 font-mono",children:[p.total_edges," ",n.jsx("span",{className:"font-sans font-normal text-xs text-muted",children:m("summary.edges")})," •"," ",n.jsxs("span",{className:"text-accent",children:["I=",p.average_instability.toFixed(2)]})]})]}),n.jsx(zr,{className:"w-4 h-4 text-muted shrink-0","aria-hidden":"true"})]}),n.jsxs("button",{type:"button",onClick:r,className:`flex items-center justify-between p-2 rounded-lg border text-left cursor-pointer transition ${i?"bg-accent/15 border-accent text-accent":"bg-panel hover:bg-raised border-line text-ink"}`,children:[n.jsxs("div",{children:[n.jsxs("div",{className:"text-[11px] tracking-wide text-muted font-semibold flex items-center gap-1",children:[n.jsx("span",{children:m("summary.circularDeps")}),i&&n.jsxs("span",{className:"text-[10px] text-accent font-bold uppercase",children:["(",m("common.active"),")"]})]}),n.jsx("div",{className:"text-sm font-bold mt-0.5 font-mono",children:g?n.jsx("span",{"data-testid":"summary-cycle-count",className:"text-warning text-xs font-sans font-semibold",children:m("summary.notEvaluatedLowAst")}):s.cycles.length>0?n.jsx("span",{"data-testid":"summary-cycle-count",className:"text-danger",children:m("summary.cyclesBreakdown",{cycles:s.cycles.length,sccs:p.scc_count,modules:p.nodes_in_cycles})}):n.jsx("span",{"data-testid":"summary-cycle-count",className:"text-success text-xs font-sans font-semibold",children:m("summary.acyclicZero")})})]}),n.jsx(ml,{className:`w-4 h-4 shrink-0 ${s.cycles.length>0?"text-danger":"text-success"} ${i?"rotate-180 transition-transform":""}`,"aria-hidden":"true"})]}),n.jsxs("div",{"data-testid":"summary-ast-coverage",className:"flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] tracking-wide text-muted font-semibold",children:m("summary.astCoverage")}),n.jsxs("div",{className:"text-xs font-bold text-ink mt-0.5",children:[n.jsxs("span",{className:"text-accent",children:[(v.ast_loc_coverage_pct??0).toFixed(1),"% LOC"]})," ",n.jsxs("span",{className:"text-muted font-normal",children:["(",(v.ast_file_coverage_pct??0).toFixed(1),"% ",m("summary.files"),") AST"]}),v.unsupported_files_count>0&&n.jsxs("span",{className:"text-warning ml-1",children:["• ",v.unsupported_files_count," ",m("summary.unsupported")]})]})]}),n.jsx(cn,{className:"w-4 h-4 text-muted shrink-0","aria-hidden":"true"})]}),n.jsxs("div",{"data-testid":"summary-git-hotspots",className:"flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-[11px] tracking-wide text-muted font-semibold",children:m("summary.gitHotspots")}),n.jsx("div",{className:"text-xs font-bold text-ink mt-0.5 font-mono",children:s.git_insights.is_git_repo?n.jsxs(n.Fragment,{children:[n.jsxs("span",{children:[s.git_insights.total_commits_scanned," ",m("summary.commits")]})," •"," ",n.jsxs("span",{className:"text-warning",children:[s.git_insights.hotspots.length," ",m("summary.hotspots")]})]}):n.jsx("span",{className:"text-muted font-sans font-normal",children:m("summary.gitNotAvailable")})})]}),n.jsx(Or,{className:"w-4 h-4 text-muted shrink-0","aria-hidden":"true"})]}),s.performance&&n.jsxs("div",{"data-testid":"summary-performance-diagnostics",className:"flex items-center justify-between p-2 rounded-lg bg-panel border border-line",children:[n.jsxs("div",{className:"min-w-0",children:[n.jsxs("div",{className:"text-[11px] tracking-wide text-muted font-semibold flex items-center gap-1.5",children:[n.jsx("span",{children:m("performance.engineLabel")}),n.jsx("span",{"data-testid":"perf-cache-status-badge",className:`px-1.5 py-0.2 rounded text-[10px] font-bold uppercase ${s.performance.cache_status==="hit"?"bg-success/15 text-success":s.performance.cache_status==="partial"?"bg-accent/15 text-accent":s.performance.cache_status==="bypassed"?"bg-warning/15 text-warning":"bg-raised text-muted"}`,children:s.performance.cache_status==="hit"?m("performance.cacheHit"):s.performance.cache_status==="partial"?m("performance.cachePartial"):s.performance.cache_status==="bypassed"?m("performance.cacheBypassed"):s.performance.cache_status==="recovered"?m("performance.cacheRecovered"):m("performance.cacheMiss")})]}),n.jsxs("div",{className:"text-xs font-bold text-ink mt-0.5 font-mono truncate",children:[m("performance.reusedShort",{reused:s.performance.reused_files,reparsed:s.performance.reparsed_files})," ","• ",m("performance.workersShort",{count:s.performance.workers_used})]}),s.performance.fallback_reason&&n.jsxs("div",{"data-testid":"perf-fallback-reason",className:"text-[10px] text-warning truncate mt-0.5",title:s.performance.fallback_detail??s.performance.fallback_reason,children:[m("performance.fallbackPrefix")," ",s.performance.fallback_reason]})]}),n.jsx(B_,{className:"w-4 h-4 text-accent shrink-0","aria-hidden":"true"})]})]})]})},Hy=600;function Uy(s,i){return{sessionId:s,sessionGeneration:i,lastSequence:0,seenEventIds:[]}}function xk(s,i){if(i.session_id!==s.sessionId)return{accepted:!1,reason:"session_mismatch",nextGuard:s};if(i.session_generation<s.sessionGeneration)return{accepted:!1,reason:"stale_generation",nextGuard:s};if(i.event_type==="stream_reset"){const o=Math.max(s.sessionGeneration,i.session_generation),c=i.session_generation>s.sessionGeneration?i.sequence:Math.max(s.lastSequence,i.sequence);return{accepted:!0,reason:"stream_reset",nextGuard:{sessionId:s.sessionId,sessionGeneration:o,lastSequence:c,seenEventIds:[i.event_id]}}}if(s.seenEventIds.includes(i.event_id))return{accepted:!1,reason:"duplicate_event",nextGuard:s};if(i.session_generation===s.sessionGeneration&&i.sequence<=s.lastSequence)return{accepted:!1,reason:"out_of_order_stale",nextGuard:s};const r=[...s.seenEventIds,i.event_id];return r.length>Hy&&r.splice(0,r.length-Hy),{accepted:!0,reason:"accepted",nextGuard:{sessionId:s.sessionId,sessionGeneration:i.session_generation,lastSequence:i.sequence,seenEventIds:r}}}function By(s,i){const r=s.findIndex(f=>f.alert_id===i.alert_id),o=r>=0?s.map((f,m)=>m===r?i:f):[i,...s],c={ACTIVE:0,UNKNOWN:1,ACKNOWLEDGED:2,RESOLVED:3};return[...o].sort((f,m)=>{const h=(c[f.status]??9)-(c[m.status]??9);return h!==0?h:m.last_observed_at.localeCompare(f.last_observed_at)})}const gk=["session_started","session_state_changed","filesystem_batch","analysis_started","analysis_progress","analysis_completed","analysis_superseded","analysis_failed","architecture_delta","alert_created","alert_resolved","snapshot_published","freshness_changed","reconciliation_required","stream_reset","session_stopped"];var yk={value:()=>{}};function nd(){for(var s=0,i=arguments.length,r={},o;s<i;++s){if(!(o=arguments[s]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Rc(r)}function Rc(s){this._=s}function bk(s,i){return s.trim().split(/^|\s+/).map(function(r){var o="",c=r.indexOf(".");if(c>=0&&(o=r.slice(c+1),r=r.slice(0,c)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Rc.prototype=nd.prototype={constructor:Rc,on:function(s,i){var r=this._,o=bk(s+"",r),c,f=-1,m=o.length;if(arguments.length<2){for(;++f<m;)if((c=(s=o[f]).type)&&(c=vk(r[c],s.name)))return c;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++f<m;)if(c=(s=o[f]).type)r[c]=$y(r[c],s.name,i);else if(i==null)for(c in r)r[c]=$y(r[c],s.name,null);return this},copy:function(){var s={},i=this._;for(var r in i)s[r]=i[r].slice();return new Rc(s)},call:function(s,i){if((c=arguments.length-2)>0)for(var r=new Array(c),o=0,c,f;o<c;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(f=this._[s],o=0,c=f.length;o<c;++o)f[o].value.apply(i,r)},apply:function(s,i,r){if(!this._.hasOwnProperty(s))throw new Error("unknown type: "+s);for(var o=this._[s],c=0,f=o.length;c<f;++c)o[c].value.apply(i,r)}};function vk(s,i){for(var r=0,o=s.length,c;r<o;++r)if((c=s[r]).name===i)return c.value}function $y(s,i,r){for(var o=0,c=s.length;o<c;++o)if(s[o].name===i){s[o]=yk,s=s.slice(0,o).concat(s.slice(o+1));break}return r!=null&&s.push({name:i,value:r}),s}var pm="http://www.w3.org/1999/xhtml",qy={svg:"http://www.w3.org/2000/svg",xhtml:pm,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ad(s){var i=s+="",r=i.indexOf(":");return r>=0&&(i=s.slice(0,r))!=="xmlns"&&(s=s.slice(r+1)),qy.hasOwnProperty(i)?{space:qy[i],local:s}:s}function Nk(s){return function(){var i=this.ownerDocument,r=this.namespaceURI;return r===pm&&i.documentElement.namespaceURI===pm?i.createElement(s):i.createElementNS(r,s)}}function jk(s){return function(){return this.ownerDocument.createElementNS(s.space,s.local)}}function Qb(s){var i=ad(s);return(i.local?jk:Nk)(i)}function wk(){}function Lm(s){return s==null?wk:function(){return this.querySelector(s)}}function _k(s){typeof s!="function"&&(s=Lm(s));for(var i=this._groups,r=i.length,o=new Array(r),c=0;c<r;++c)for(var f=i[c],m=f.length,h=o[c]=new Array(m),p,v,y=0;y<m;++y)(p=f[y])&&(v=s.call(p,p.__data__,y,f))&&("__data__"in p&&(v.__data__=p.__data__),h[y]=v);return new wn(o,this._parents)}function Sk(s){return s==null?[]:Array.isArray(s)?s:Array.from(s)}function kk(){return[]}function Zb(s){return s==null?kk:function(){return this.querySelectorAll(s)}}function Ck(s){return function(){return Sk(s.apply(this,arguments))}}function Tk(s){typeof s=="function"?s=Ck(s):s=Zb(s);for(var i=this._groups,r=i.length,o=[],c=[],f=0;f<r;++f)for(var m=i[f],h=m.length,p,v=0;v<h;++v)(p=m[v])&&(o.push(s.call(p,p.__data__,v,m)),c.push(p));return new wn(o,c)}function Pb(s){return function(){return this.matches(s)}}function Jb(s){return function(i){return i.matches(s)}}var Ek=Array.prototype.find;function Ak(s){return function(){return Ek.call(this.children,s)}}function Mk(){return this.firstElementChild}function Rk(s){return this.select(s==null?Mk:Ak(typeof s=="function"?s:Jb(s)))}var Dk=Array.prototype.filter;function Ok(){return Array.from(this.children)}function Lk(s){return function(){return Dk.call(this.children,s)}}function zk(s){return this.selectAll(s==null?Ok:Lk(typeof s=="function"?s:Jb(s)))}function Hk(s){typeof s!="function"&&(s=Pb(s));for(var i=this._groups,r=i.length,o=new Array(r),c=0;c<r;++c)for(var f=i[c],m=f.length,h=o[c]=[],p,v=0;v<m;++v)(p=f[v])&&s.call(p,p.__data__,v,f)&&h.push(p);return new wn(o,this._parents)}function Wb(s){return new Array(s.length)}function Uk(){return new wn(this._enter||this._groups.map(Wb),this._parents)}function Gc(s,i){this.ownerDocument=s.ownerDocument,this.namespaceURI=s.namespaceURI,this._next=null,this._parent=s,this.__data__=i}Gc.prototype={constructor:Gc,appendChild:function(s){return this._parent.insertBefore(s,this._next)},insertBefore:function(s,i){return this._parent.insertBefore(s,i)},querySelector:function(s){return this._parent.querySelector(s)},querySelectorAll:function(s){return this._parent.querySelectorAll(s)}};function Bk(s){return function(){return s}}function $k(s,i,r,o,c,f){for(var m=0,h,p=i.length,v=f.length;m<v;++m)(h=i[m])?(h.__data__=f[m],o[m]=h):r[m]=new Gc(s,f[m]);for(;m<p;++m)(h=i[m])&&(c[m]=h)}function qk(s,i,r,o,c,f,m){var h,p,v=new Map,y=i.length,g=f.length,b=new Array(y),N;for(h=0;h<y;++h)(p=i[h])&&(b[h]=N=m.call(p,p.__data__,h,i)+"",v.has(N)?c[h]=p:v.set(N,p));for(h=0;h<g;++h)N=m.call(s,f[h],h,f)+"",(p=v.get(N))?(o[h]=p,p.__data__=f[h],v.delete(N)):r[h]=new Gc(s,f[h]);for(h=0;h<y;++h)(p=i[h])&&v.get(b[h])===p&&(c[h]=p)}function Gk(s){return s.__data__}function Vk(s,i){if(!arguments.length)return Array.from(this,Gk);var r=i?qk:$k,o=this._parents,c=this._groups;typeof s!="function"&&(s=Bk(s));for(var f=c.length,m=new Array(f),h=new Array(f),p=new Array(f),v=0;v<f;++v){var y=o[v],g=c[v],b=g.length,N=Yk(s.call(y,y&&y.__data__,v,o)),j=N.length,T=h[v]=new Array(j),H=m[v]=new Array(j),_=p[v]=new Array(b);r(y,g,T,H,_,N,i);for(var K=0,z=0,D,O;K<j;++K)if(D=T[K]){for(K>=z&&(z=K+1);!(O=H[z])&&++z<j;);D._next=O||null}}return m=new wn(m,o),m._enter=h,m._exit=p,m}function Yk(s){return typeof s=="object"&&"length"in s?s:Array.from(s)}function Fk(){return new wn(this._exit||this._groups.map(Wb),this._parents)}function Ik(s,i,r){var o=this.enter(),c=this,f=this.exit();return typeof s=="function"?(o=s(o),o&&(o=o.selection())):o=o.append(s+""),i!=null&&(c=i(c),c&&(c=c.selection())),r==null?f.remove():r(f),o&&c?o.merge(c).order():c}function Kk(s){for(var i=s.selection?s.selection():s,r=this._groups,o=i._groups,c=r.length,f=o.length,m=Math.min(c,f),h=new Array(c),p=0;p<m;++p)for(var v=r[p],y=o[p],g=v.length,b=h[p]=new Array(g),N,j=0;j<g;++j)(N=v[j]||y[j])&&(b[j]=N);for(;p<c;++p)h[p]=r[p];return new wn(h,this._parents)}function Xk(){for(var s=this._groups,i=-1,r=s.length;++i<r;)for(var o=s[i],c=o.length-1,f=o[c],m;--c>=0;)(m=o[c])&&(f&&m.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(m,f),f=m);return this}function Qk(s){s||(s=Zk);function i(g,b){return g&&b?s(g.__data__,b.__data__):!g-!b}for(var r=this._groups,o=r.length,c=new Array(o),f=0;f<o;++f){for(var m=r[f],h=m.length,p=c[f]=new Array(h),v,y=0;y<h;++y)(v=m[y])&&(p[y]=v);p.sort(i)}return new wn(c,this._parents).order()}function Zk(s,i){return s<i?-1:s>i?1:s>=i?0:NaN}function Pk(){var s=arguments[0];return arguments[0]=this,s.apply(null,arguments),this}function Jk(){return Array.from(this)}function Wk(){for(var s=this._groups,i=0,r=s.length;i<r;++i)for(var o=s[i],c=0,f=o.length;c<f;++c){var m=o[c];if(m)return m}return null}function e5(){let s=0;for(const i of this)++s;return s}function t5(){return!this.node()}function n5(s){for(var i=this._groups,r=0,o=i.length;r<o;++r)for(var c=i[r],f=0,m=c.length,h;f<m;++f)(h=c[f])&&s.call(h,h.__data__,f,c);return this}function a5(s){return function(){this.removeAttribute(s)}}function s5(s){return function(){this.removeAttributeNS(s.space,s.local)}}function i5(s,i){return function(){this.setAttribute(s,i)}}function l5(s,i){return function(){this.setAttributeNS(s.space,s.local,i)}}function r5(s,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttribute(s):this.setAttribute(s,r)}}function o5(s,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttributeNS(s.space,s.local):this.setAttributeNS(s.space,s.local,r)}}function c5(s,i){var r=ad(s);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((i==null?r.local?s5:a5:typeof i=="function"?r.local?o5:r5:r.local?l5:i5)(r,i))}function e0(s){return s.ownerDocument&&s.ownerDocument.defaultView||s.document&&s||s.defaultView}function d5(s){return function(){this.style.removeProperty(s)}}function u5(s,i,r){return function(){this.style.setProperty(s,i,r)}}function f5(s,i,r){return function(){var o=i.apply(this,arguments);o==null?this.style.removeProperty(s):this.style.setProperty(s,o,r)}}function m5(s,i,r){return arguments.length>1?this.each((i==null?d5:typeof i=="function"?f5:u5)(s,i,r??"")):hl(this.node(),s)}function hl(s,i){return s.style.getPropertyValue(i)||e0(s).getComputedStyle(s,null).getPropertyValue(i)}function h5(s){return function(){delete this[s]}}function p5(s,i){return function(){this[s]=i}}function x5(s,i){return function(){var r=i.apply(this,arguments);r==null?delete this[s]:this[s]=r}}function g5(s,i){return arguments.length>1?this.each((i==null?h5:typeof i=="function"?x5:p5)(s,i)):this.node()[s]}function t0(s){return s.trim().split(/^|\s+/)}function zm(s){return s.classList||new n0(s)}function n0(s){this._node=s,this._names=t0(s.getAttribute("class")||"")}n0.prototype={add:function(s){var i=this._names.indexOf(s);i<0&&(this._names.push(s),this._node.setAttribute("class",this._names.join(" ")))},remove:function(s){var i=this._names.indexOf(s);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(s){return this._names.indexOf(s)>=0}};function a0(s,i){for(var r=zm(s),o=-1,c=i.length;++o<c;)r.add(i[o])}function s0(s,i){for(var r=zm(s),o=-1,c=i.length;++o<c;)r.remove(i[o])}function y5(s){return function(){a0(this,s)}}function b5(s){return function(){s0(this,s)}}function v5(s,i){return function(){(i.apply(this,arguments)?a0:s0)(this,s)}}function N5(s,i){var r=t0(s+"");if(arguments.length<2){for(var o=zm(this.node()),c=-1,f=r.length;++c<f;)if(!o.contains(r[c]))return!1;return!0}return this.each((typeof i=="function"?v5:i?y5:b5)(r,i))}function j5(){this.textContent=""}function w5(s){return function(){this.textContent=s}}function _5(s){return function(){var i=s.apply(this,arguments);this.textContent=i??""}}function S5(s){return arguments.length?this.each(s==null?j5:(typeof s=="function"?_5:w5)(s)):this.node().textContent}function k5(){this.innerHTML=""}function C5(s){return function(){this.innerHTML=s}}function T5(s){return function(){var i=s.apply(this,arguments);this.innerHTML=i??""}}function E5(s){return arguments.length?this.each(s==null?k5:(typeof s=="function"?T5:C5)(s)):this.node().innerHTML}function A5(){this.nextSibling&&this.parentNode.appendChild(this)}function M5(){return this.each(A5)}function R5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function D5(){return this.each(R5)}function O5(s){var i=typeof s=="function"?s:Qb(s);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function L5(){return null}function z5(s,i){var r=typeof s=="function"?s:Qb(s),o=i==null?L5:typeof i=="function"?i:Lm(i);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function H5(){var s=this.parentNode;s&&s.removeChild(this)}function U5(){return this.each(H5)}function B5(){var s=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(s,this.nextSibling):s}function $5(){var s=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(s,this.nextSibling):s}function q5(s){return this.select(s?$5:B5)}function G5(s){return arguments.length?this.property("__data__",s):this.node().__data__}function V5(s){return function(i){s.call(this,i,this.__data__)}}function Y5(s){return s.trim().split(/^|\s+/).map(function(i){var r="",o=i.indexOf(".");return o>=0&&(r=i.slice(o+1),i=i.slice(0,o)),{type:i,name:r}})}function F5(s){return function(){var i=this.__on;if(i){for(var r=0,o=-1,c=i.length,f;r<c;++r)f=i[r],(!s.type||f.type===s.type)&&f.name===s.name?this.removeEventListener(f.type,f.listener,f.options):i[++o]=f;++o?i.length=o:delete this.__on}}}function I5(s,i,r){return function(){var o=this.__on,c,f=V5(i);if(o){for(var m=0,h=o.length;m<h;++m)if((c=o[m]).type===s.type&&c.name===s.name){this.removeEventListener(c.type,c.listener,c.options),this.addEventListener(c.type,c.listener=f,c.options=r),c.value=i;return}}this.addEventListener(s.type,f,r),c={type:s.type,name:s.name,value:i,listener:f,options:r},o?o.push(c):this.__on=[c]}}function K5(s,i,r){var o=Y5(s+""),c,f=o.length,m;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,v=h.length,y;p<v;++p)for(c=0,y=h[p];c<f;++c)if((m=o[c]).type===y.type&&m.name===y.name)return y.value}return}for(h=i?I5:F5,c=0;c<f;++c)this.each(h(o[c],i,r));return this}function i0(s,i,r){var o=e0(s),c=o.CustomEvent;typeof c=="function"?c=new c(i,r):(c=o.document.createEvent("Event"),r?(c.initEvent(i,r.bubbles,r.cancelable),c.detail=r.detail):c.initEvent(i,!1,!1)),s.dispatchEvent(c)}function X5(s,i){return function(){return i0(this,s,i)}}function Q5(s,i){return function(){return i0(this,s,i.apply(this,arguments))}}function Z5(s,i){return this.each((typeof i=="function"?Q5:X5)(s,i))}function*P5(){for(var s=this._groups,i=0,r=s.length;i<r;++i)for(var o=s[i],c=0,f=o.length,m;c<f;++c)(m=o[c])&&(yield m)}var l0=[null];function wn(s,i){this._groups=s,this._parents=i}function Vr(){return new wn([[document.documentElement]],l0)}function J5(){return this}wn.prototype=Vr.prototype={constructor:wn,select:_k,selectAll:Tk,selectChild:Rk,selectChildren:zk,filter:Hk,data:Vk,enter:Uk,exit:Fk,join:Ik,merge:Kk,selection:J5,order:Xk,sort:Qk,call:Pk,nodes:Jk,node:Wk,size:e5,empty:t5,each:n5,attr:c5,style:m5,property:g5,classed:N5,text:S5,html:E5,raise:M5,lower:D5,append:O5,insert:z5,remove:U5,clone:q5,datum:G5,on:K5,dispatch:Z5,[Symbol.iterator]:P5};function Nn(s){return typeof s=="string"?new wn([[document.querySelector(s)]],[document.documentElement]):new wn([[s]],l0)}var W5=0;function Gy(){this._="@"+(++W5).toString(36)}Gy.prototype={constructor:Gy,get:function(s){for(var i=this._;!(i in s);)if(!(s=s.parentNode))return;return s[i]},set:function(s,i){return s[this._]=i},remove:function(s){return this._ in s&&delete s[this._]},toString:function(){return this._}};function e3(s){let i;for(;i=s.sourceEvent;)s=i;return s}function Kn(s,i){if(s=e3(s),i===void 0&&(i=s.currentTarget),i){var r=i.ownerSVGElement||i;if(r.createSVGPoint){var o=r.createSVGPoint();return o.x=s.clientX,o.y=s.clientY,o=o.matrixTransform(i.getScreenCTM().inverse()),[o.x,o.y]}if(i.getBoundingClientRect){var c=i.getBoundingClientRect();return[s.clientX-c.left-i.clientLeft,s.clientY-c.top-i.clientTop]}}return[s.pageX,s.pageY]}const t3={passive:!1},Ur={capture:!0,passive:!1};function Qf(s){s.stopImmediatePropagation()}function ll(s){s.preventDefault(),s.stopImmediatePropagation()}function r0(s){var i=s.document.documentElement,r=Nn(s).on("dragstart.drag",ll,Ur);"onselectstart"in i?r.on("selectstart.drag",ll,Ur):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function o0(s,i){var r=s.document.documentElement,o=Nn(s).on("dragstart.drag",null);i&&(o.on("click.drag",ll,Ur),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var wc=s=>()=>s;function xm(s,{sourceEvent:i,subject:r,target:o,identifier:c,active:f,x:m,y:h,dx:p,dy:v,dispatch:y}){Object.defineProperties(this,{type:{value:s,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:c,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:m,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:v,enumerable:!0,configurable:!0},_:{value:y}})}xm.prototype.on=function(){var s=this._.on.apply(this._,arguments);return s===this._?this:s};function n3(s){return!s.ctrlKey&&!s.button}function a3(){return this.parentNode}function s3(s,i){return i??{x:s.x,y:s.y}}function i3(){return navigator.maxTouchPoints||"ontouchstart"in this}function c0(){var s=n3,i=a3,r=s3,o=i3,c={},f=nd("start","drag","end"),m=0,h,p,v,y,g=0;function b(D){D.on("mousedown.drag",N).filter(o).on("touchstart.drag",H).on("touchmove.drag",_,t3).on("touchend.drag touchcancel.drag",K).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function N(D,O){if(!(y||!s.call(this,D,O))){var U=z(this,i.call(this,D,O),D,O,"mouse");U&&(Nn(D.view).on("mousemove.drag",j,Ur).on("mouseup.drag",T,Ur),r0(D.view),Qf(D),v=!1,h=D.clientX,p=D.clientY,U("start",D))}}function j(D){if(ll(D),!v){var O=D.clientX-h,U=D.clientY-p;v=O*O+U*U>g}c.mouse("drag",D)}function T(D){Nn(D.view).on("mousemove.drag mouseup.drag",null),o0(D.view,v),ll(D),c.mouse("end",D)}function H(D,O){if(s.call(this,D,O)){var U=D.changedTouches,q=i.call(this,D,O),C=U.length,F,G;for(F=0;F<C;++F)(G=z(this,q,D,O,U[F].identifier,U[F]))&&(Qf(D),G("start",D,U[F]))}}function _(D){var O=D.changedTouches,U=O.length,q,C;for(q=0;q<U;++q)(C=c[O[q].identifier])&&(ll(D),C("drag",D,O[q]))}function K(D){var O=D.changedTouches,U=O.length,q,C;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),q=0;q<U;++q)(C=c[O[q].identifier])&&(Qf(D),C("end",D,O[q]))}function z(D,O,U,q,C,F){var G=f.copy(),Y=Kn(F||U,O),I,W,w;if((w=r.call(D,new xm("beforestart",{sourceEvent:U,target:b,identifier:C,active:m,x:Y[0],y:Y[1],dx:0,dy:0,dispatch:G}),q))!=null)return I=w.x-Y[0]||0,W=w.y-Y[1]||0,function R(A,V,B){var P=Y,te;switch(A){case"start":c[C]=R,te=m++;break;case"end":delete c[C],--m;case"drag":Y=Kn(B||V,O),te=m;break}G.call(A,D,new xm(A,{sourceEvent:V,subject:w,target:b,identifier:C,active:te,x:Y[0]+I,y:Y[1]+W,dx:Y[0]-P[0],dy:Y[1]-P[1],dispatch:G}),q)}}return b.filter=function(D){return arguments.length?(s=typeof D=="function"?D:wc(!!D),b):s},b.container=function(D){return arguments.length?(i=typeof D=="function"?D:wc(D),b):i},b.subject=function(D){return arguments.length?(r=typeof D=="function"?D:wc(D),b):r},b.touchable=function(D){return arguments.length?(o=typeof D=="function"?D:wc(!!D),b):o},b.on=function(){var D=f.on.apply(f,arguments);return D===f?b:D},b.clickDistance=function(D){return arguments.length?(g=(D=+D)*D,b):Math.sqrt(g)},b}function Nl(s,i,r){s.prototype=i.prototype=r,r.constructor=s}function Yr(s,i){var r=Object.create(s.prototype);for(var o in i)r[o]=i[o];return r}function gs(){}var si=.7,pl=1/si,rl="\\s*([+-]?\\d+)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",l3=/^#([0-9a-f]{3,8})$/,r3=new RegExp(`^rgb\\(${rl},${rl},${rl}\\)$`),o3=new RegExp(`^rgb\\(${ca},${ca},${ca}\\)$`),c3=new RegExp(`^rgba\\(${rl},${rl},${rl},${Br}\\)$`),d3=new RegExp(`^rgba\\(${ca},${ca},${ca},${Br}\\)$`),u3=new RegExp(`^hsl\\(${Br},${ca},${ca}\\)$`),f3=new RegExp(`^hsla\\(${Br},${ca},${ca},${Br}\\)$`),Vy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Nl(gs,ii,{copy(s){return Object.assign(new this.constructor,this,s)},displayable(){return this.rgb().displayable()},hex:Yy,formatHex:Yy,formatHex8:m3,formatHsl:h3,formatRgb:Fy,toString:Fy});function Yy(){return this.rgb().formatHex()}function m3(){return this.rgb().formatHex8()}function h3(){return d0(this).formatHsl()}function Fy(){return this.rgb().formatRgb()}function ii(s){var i,r;return s=(s+"").trim().toLowerCase(),(i=l3.exec(s))?(r=i[1].length,i=parseInt(i[1],16),r===6?Iy(i):r===3?new Dt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?_c(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?_c(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=r3.exec(s))?new Dt(i[1],i[2],i[3],1):(i=o3.exec(s))?new Dt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=c3.exec(s))?_c(i[1],i[2],i[3],i[4]):(i=d3.exec(s))?_c(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=u3.exec(s))?Qy(i[1],i[2]/100,i[3]/100,1):(i=f3.exec(s))?Qy(i[1],i[2]/100,i[3]/100,i[4]):Vy.hasOwnProperty(s)?Iy(Vy[s]):s==="transparent"?new Dt(NaN,NaN,NaN,0):null}function Iy(s){return new Dt(s>>16&255,s>>8&255,s&255,1)}function _c(s,i,r,o){return o<=0&&(s=i=r=NaN),new Dt(s,i,r,o)}function Hm(s){return s instanceof gs||(s=ii(s)),s?(s=s.rgb(),new Dt(s.r,s.g,s.b,s.opacity)):new Dt}function gm(s,i,r,o){return arguments.length===1?Hm(s):new Dt(s,i,r,o??1)}function Dt(s,i,r,o){this.r=+s,this.g=+i,this.b=+r,this.opacity=+o}Nl(Dt,gm,Yr(gs,{brighter(s){return s=s==null?pl:Math.pow(pl,s),new Dt(this.r*s,this.g*s,this.b*s,this.opacity)},darker(s){return s=s==null?si:Math.pow(si,s),new Dt(this.r*s,this.g*s,this.b*s,this.opacity)},rgb(){return this},clamp(){return new Dt(ti(this.r),ti(this.g),ti(this.b),Vc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ky,formatHex:Ky,formatHex8:p3,formatRgb:Xy,toString:Xy}));function Ky(){return`#${Js(this.r)}${Js(this.g)}${Js(this.b)}`}function p3(){return`#${Js(this.r)}${Js(this.g)}${Js(this.b)}${Js((isNaN(this.opacity)?1:this.opacity)*255)}`}function Xy(){const s=Vc(this.opacity);return`${s===1?"rgb(":"rgba("}${ti(this.r)}, ${ti(this.g)}, ${ti(this.b)}${s===1?")":`, ${s})`}`}function Vc(s){return isNaN(s)?1:Math.max(0,Math.min(1,s))}function ti(s){return Math.max(0,Math.min(255,Math.round(s)||0))}function Js(s){return s=ti(s),(s<16?"0":"")+s.toString(16)}function Qy(s,i,r,o){return o<=0?s=i=r=NaN:r<=0||r>=1?s=i=NaN:i<=0&&(s=NaN),new Xn(s,i,r,o)}function d0(s){if(s instanceof Xn)return new Xn(s.h,s.s,s.l,s.opacity);if(s instanceof gs||(s=ii(s)),!s)return new Xn;if(s instanceof Xn)return s;s=s.rgb();var i=s.r/255,r=s.g/255,o=s.b/255,c=Math.min(i,r,o),f=Math.max(i,r,o),m=NaN,h=f-c,p=(f+c)/2;return h?(i===f?m=(r-o)/h+(r<o)*6:r===f?m=(o-i)/h+2:m=(i-r)/h+4,h/=p<.5?f+c:2-f-c,m*=60):h=p>0&&p<1?0:m,new Xn(m,h,p,s.opacity)}function x3(s,i,r,o){return arguments.length===1?d0(s):new Xn(s,i,r,o??1)}function Xn(s,i,r,o){this.h=+s,this.s=+i,this.l=+r,this.opacity=+o}Nl(Xn,x3,Yr(gs,{brighter(s){return s=s==null?pl:Math.pow(pl,s),new Xn(this.h,this.s,this.l*s,this.opacity)},darker(s){return s=s==null?si:Math.pow(si,s),new Xn(this.h,this.s,this.l*s,this.opacity)},rgb(){var s=this.h%360+(this.h<0)*360,i=isNaN(s)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*i,c=2*r-o;return new Dt(Zf(s>=240?s-240:s+120,c,o),Zf(s,c,o),Zf(s<120?s+240:s-120,c,o),this.opacity)},clamp(){return new Xn(Zy(this.h),Sc(this.s),Sc(this.l),Vc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const s=Vc(this.opacity);return`${s===1?"hsl(":"hsla("}${Zy(this.h)}, ${Sc(this.s)*100}%, ${Sc(this.l)*100}%${s===1?")":`, ${s})`}`}}));function Zy(s){return s=(s||0)%360,s<0?s+360:s}function Sc(s){return Math.max(0,Math.min(1,s||0))}function Zf(s,i,r){return(s<60?i+(r-i)*s/60:s<180?r:s<240?i+(r-i)*(240-s)/60:i)*255}const u0=Math.PI/180,f0=180/Math.PI,Yc=18,m0=.96422,h0=1,p0=.82521,x0=4/29,ol=6/29,g0=3*ol*ol,g3=ol*ol*ol;function y0(s){if(s instanceof da)return new da(s.l,s.a,s.b,s.opacity);if(s instanceof Ea)return b0(s);s instanceof Dt||(s=Hm(s));var i=em(s.r),r=em(s.g),o=em(s.b),c=Pf((.2225045*i+.7168786*r+.0606169*o)/h0),f,m;return i===r&&r===o?f=m=c:(f=Pf((.4360747*i+.3850649*r+.1430804*o)/m0),m=Pf((.0139322*i+.0971045*r+.7141733*o)/p0)),new da(116*c-16,500*(f-c),200*(c-m),s.opacity)}function y3(s,i,r,o){return arguments.length===1?y0(s):new da(s,i,r,o??1)}function da(s,i,r,o){this.l=+s,this.a=+i,this.b=+r,this.opacity=+o}Nl(da,y3,Yr(gs,{brighter(s){return new da(this.l+Yc*(s??1),this.a,this.b,this.opacity)},darker(s){return new da(this.l-Yc*(s??1),this.a,this.b,this.opacity)},rgb(){var s=(this.l+16)/116,i=isNaN(this.a)?s:s+this.a/500,r=isNaN(this.b)?s:s-this.b/200;return i=m0*Jf(i),s=h0*Jf(s),r=p0*Jf(r),new Dt(Wf(3.1338561*i-1.6168667*s-.4906146*r),Wf(-.9787684*i+1.9161415*s+.033454*r),Wf(.0719453*i-.2289914*s+1.4052427*r),this.opacity)}}));function Pf(s){return s>g3?Math.pow(s,1/3):s/g0+x0}function Jf(s){return s>ol?s*s*s:g0*(s-x0)}function Wf(s){return 255*(s<=.0031308?12.92*s:1.055*Math.pow(s,1/2.4)-.055)}function em(s){return(s/=255)<=.04045?s/12.92:Math.pow((s+.055)/1.055,2.4)}function b3(s){if(s instanceof Ea)return new Ea(s.h,s.c,s.l,s.opacity);if(s instanceof da||(s=y0(s)),s.a===0&&s.b===0)return new Ea(NaN,0<s.l&&s.l<100?0:NaN,s.l,s.opacity);var i=Math.atan2(s.b,s.a)*f0;return new Ea(i<0?i+360:i,Math.sqrt(s.a*s.a+s.b*s.b),s.l,s.opacity)}function v3(s,i,r,o){return arguments.length===1?b3(s):new Ea(s,i,r,o??1)}function Ea(s,i,r,o){this.h=+s,this.c=+i,this.l=+r,this.opacity=+o}function b0(s){if(isNaN(s.h))return new da(s.l,0,0,s.opacity);var i=s.h*u0;return new da(s.l,Math.cos(i)*s.c,Math.sin(i)*s.c,s.opacity)}Nl(Ea,v3,Yr(gs,{brighter(s){return new Ea(this.h,this.c,this.l+Yc*(s??1),this.opacity)},darker(s){return new Ea(this.h,this.c,this.l-Yc*(s??1),this.opacity)},rgb(){return b0(this).rgb()}}));var v0=-.14861,Um=1.78277,Bm=-.29227,sd=-.90649,$r=1.97294,Py=$r*sd,Jy=$r*Um,Wy=Um*Bm-sd*v0;function N3(s){if(s instanceof ni)return new ni(s.h,s.s,s.l,s.opacity);s instanceof Dt||(s=Hm(s));var i=s.r/255,r=s.g/255,o=s.b/255,c=(Wy*o+Py*i-Jy*r)/(Wy+Py-Jy),f=o-c,m=($r*(r-c)-Bm*f)/sd,h=Math.sqrt(m*m+f*f)/($r*c*(1-c)),p=h?Math.atan2(m,f)*f0-120:NaN;return new ni(p<0?p+360:p,h,c,s.opacity)}function ym(s,i,r,o){return arguments.length===1?N3(s):new ni(s,i,r,o??1)}function ni(s,i,r,o){this.h=+s,this.s=+i,this.l=+r,this.opacity=+o}Nl(ni,ym,Yr(gs,{brighter(s){return s=s==null?pl:Math.pow(pl,s),new ni(this.h,this.s,this.l*s,this.opacity)},darker(s){return s=s==null?si:Math.pow(si,s),new ni(this.h,this.s,this.l*s,this.opacity)},rgb(){var s=isNaN(this.h)?0:(this.h+120)*u0,i=+this.l,r=isNaN(this.s)?0:this.s*i*(1-i),o=Math.cos(s),c=Math.sin(s);return new Dt(255*(i+r*(v0*o+Um*c)),255*(i+r*(Bm*o+sd*c)),255*(i+r*($r*o)),this.opacity)}}));var id=s=>()=>s;function N0(s,i){return function(r){return s+r*i}}function j3(s,i,r){return s=Math.pow(s,r),i=Math.pow(i,r)-s,r=1/r,function(o){return Math.pow(s+o*i,r)}}function w3(s,i){var r=i-s;return r?N0(s,r>180||r<-180?r-360*Math.round(r/360):r):id(isNaN(s)?i:s)}function _3(s){return(s=+s)==1?cl:function(i,r){return r-i?j3(i,r,s):id(isNaN(i)?r:i)}}function cl(s,i){var r=i-s;return r?N0(s,r):id(isNaN(s)?i:s)}var Fc=(function s(i){var r=_3(i);function o(c,f){var m=r((c=gm(c)).r,(f=gm(f)).r),h=r(c.g,f.g),p=r(c.b,f.b),v=cl(c.opacity,f.opacity);return function(y){return c.r=m(y),c.g=h(y),c.b=p(y),c.opacity=v(y),c+""}}return o.gamma=s,o})(1);function S3(s,i){i||(i=[]);var r=s?Math.min(i.length,s.length):0,o=i.slice(),c;return function(f){for(c=0;c<r;++c)o[c]=s[c]*(1-f)+i[c]*f;return o}}function k3(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function C3(s,i){var r=i?i.length:0,o=s?Math.min(r,s.length):0,c=new Array(o),f=new Array(r),m;for(m=0;m<o;++m)c[m]=Er(s[m],i[m]);for(;m<r;++m)f[m]=i[m];return function(h){for(m=0;m<o;++m)f[m]=c[m](h);return f}}function T3(s,i){var r=new Date;return s=+s,i=+i,function(o){return r.setTime(s*(1-o)+i*o),r}}function oa(s,i){return s=+s,i=+i,function(r){return s*(1-r)+i*r}}function E3(s,i){var r={},o={},c;(s===null||typeof s!="object")&&(s={}),(i===null||typeof i!="object")&&(i={});for(c in i)c in s?r[c]=Er(s[c],i[c]):o[c]=i[c];return function(f){for(c in r)o[c]=r[c](f);return o}}var bm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tm=new RegExp(bm.source,"g");function A3(s){return function(){return s}}function M3(s){return function(i){return s(i)+""}}function j0(s,i){var r=bm.lastIndex=tm.lastIndex=0,o,c,f,m=-1,h=[],p=[];for(s=s+"",i=i+"";(o=bm.exec(s))&&(c=tm.exec(i));)(f=c.index)>r&&(f=i.slice(r,f),h[m]?h[m]+=f:h[++m]=f),(o=o[0])===(c=c[0])?h[m]?h[m]+=c:h[++m]=c:(h[++m]=null,p.push({i:m,x:oa(o,c)})),r=tm.lastIndex;return r<i.length&&(f=i.slice(r),h[m]?h[m]+=f:h[++m]=f),h.length<2?p[0]?M3(p[0].x):A3(i):(i=p.length,function(v){for(var y=0,g;y<i;++y)h[(g=p[y]).i]=g.x(v);return h.join("")})}function Er(s,i){var r=typeof i,o;return i==null||r==="boolean"?id(i):(r==="number"?oa:r==="string"?(o=ii(i))?(i=o,Fc):j0:i instanceof ii?Fc:i instanceof Date?T3:k3(i)?S3:Array.isArray(i)?C3:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?E3:oa)(s,i)}var eb=180/Math.PI,vm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function w0(s,i,r,o,c,f){var m,h,p;return(m=Math.sqrt(s*s+i*i))&&(s/=m,i/=m),(p=s*r+i*o)&&(r-=s*p,o-=i*p),(h=Math.sqrt(r*r+o*o))&&(r/=h,o/=h,p/=h),s*o<i*r&&(s=-s,i=-i,p=-p,m=-m),{translateX:c,translateY:f,rotate:Math.atan2(i,s)*eb,skewX:Math.atan(p)*eb,scaleX:m,scaleY:h}}var kc;function R3(s){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(s+"");return i.isIdentity?vm:w0(i.a,i.b,i.c,i.d,i.e,i.f)}function D3(s){return s==null||(kc||(kc=document.createElementNS("http://www.w3.org/2000/svg","g")),kc.setAttribute("transform",s),!(s=kc.transform.baseVal.consolidate()))?vm:(s=s.matrix,w0(s.a,s.b,s.c,s.d,s.e,s.f))}function _0(s,i,r,o){function c(v){return v.length?v.pop()+" ":""}function f(v,y,g,b,N,j){if(v!==g||y!==b){var T=N.push("translate(",null,i,null,r);j.push({i:T-4,x:oa(v,g)},{i:T-2,x:oa(y,b)})}else(g||b)&&N.push("translate("+g+i+b+r)}function m(v,y,g,b){v!==y?(v-y>180?y+=360:y-v>180&&(v+=360),b.push({i:g.push(c(g)+"rotate(",null,o)-2,x:oa(v,y)})):y&&g.push(c(g)+"rotate("+y+o)}function h(v,y,g,b){v!==y?b.push({i:g.push(c(g)+"skewX(",null,o)-2,x:oa(v,y)}):y&&g.push(c(g)+"skewX("+y+o)}function p(v,y,g,b,N,j){if(v!==g||y!==b){var T=N.push(c(N)+"scale(",null,",",null,")");j.push({i:T-4,x:oa(v,g)},{i:T-2,x:oa(y,b)})}else(g!==1||b!==1)&&N.push(c(N)+"scale("+g+","+b+")")}return function(v,y){var g=[],b=[];return v=s(v),y=s(y),f(v.translateX,v.translateY,y.translateX,y.translateY,g,b),m(v.rotate,y.rotate,g,b),h(v.skewX,y.skewX,g,b),p(v.scaleX,v.scaleY,y.scaleX,y.scaleY,g,b),v=y=null,function(N){for(var j=-1,T=b.length,H;++j<T;)g[(H=b[j]).i]=H.x(N);return g.join("")}}}var O3=_0(R3,"px, ","px)","deg)"),L3=_0(D3,", ",")",")"),z3=1e-12;function tb(s){return((s=Math.exp(s))+1/s)/2}function H3(s){return((s=Math.exp(s))-1/s)/2}function U3(s){return((s=Math.exp(2*s))-1)/(s+1)}var Dc=(function s(i,r,o){function c(f,m){var h=f[0],p=f[1],v=f[2],y=m[0],g=m[1],b=m[2],N=y-h,j=g-p,T=N*N+j*j,H,_;if(T<z3)_=Math.log(b/v)/i,H=function(q){return[h+q*N,p+q*j,v*Math.exp(i*q*_)]};else{var K=Math.sqrt(T),z=(b*b-v*v+o*T)/(2*v*r*K),D=(b*b-v*v-o*T)/(2*b*r*K),O=Math.log(Math.sqrt(z*z+1)-z),U=Math.log(Math.sqrt(D*D+1)-D);_=(U-O)/i,H=function(q){var C=q*_,F=tb(O),G=v/(r*K)*(F*U3(i*C+O)-H3(O));return[h+G*N,p+G*j,v*F/tb(i*C+O)]}}return H.duration=Math.abs(_)*1e3*i/Math.SQRT2,H}return c.rho=function(f){var m=Math.max(.001,+f),h=m*m,p=h*h;return s(m,h,p)},c})(Math.SQRT2,2,4);function S0(s){return(function i(r){r=+r;function o(c,f){var m=s((c=ym(c)).h,(f=ym(f)).h),h=cl(c.s,f.s),p=cl(c.l,f.l),v=cl(c.opacity,f.opacity);return function(y){return c.h=m(y),c.s=h(y),c.l=p(Math.pow(y,r)),c.opacity=v(y),c+""}}return o.gamma=i,o})(1)}S0(w3);S0(cl);var xl=0,Sr=0,wr=0,k0=1e3,Ic,kr,Kc=0,li=0,ld=0,qr=typeof performance=="object"&&performance.now?performance:Date,C0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(s){setTimeout(s,17)};function $m(){return li||(C0(B3),li=qr.now()+ld)}function B3(){li=0}function Xc(){this._call=this._time=this._next=null}Xc.prototype=T0.prototype={constructor:Xc,restart:function(s,i,r){if(typeof s!="function")throw new TypeError("callback is not a function");r=(r==null?$m():+r)+(i==null?0:+i),!this._next&&kr!==this&&(kr?kr._next=this:Ic=this,kr=this),this._call=s,this._time=r,Nm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nm())}};function T0(s,i,r){var o=new Xc;return o.restart(s,i,r),o}function $3(){$m(),++xl;for(var s=Ic,i;s;)(i=li-s._time)>=0&&s._call.call(void 0,i),s=s._next;--xl}function nb(){li=(Kc=qr.now())+ld,xl=Sr=0;try{$3()}finally{xl=0,G3(),li=0}}function q3(){var s=qr.now(),i=s-Kc;i>k0&&(ld-=i,Kc=s)}function G3(){for(var s,i=Ic,r,o=1/0;i;)i._call?(o>i._time&&(o=i._time),s=i,i=i._next):(r=i._next,i._next=null,i=s?s._next=r:Ic=r);kr=s,Nm(o)}function Nm(s){if(!xl){Sr&&(Sr=clearTimeout(Sr));var i=s-li;i>24?(s<1/0&&(Sr=setTimeout(nb,Math.ceil(s-qr.now()-ld)+1)),wr&&(wr=clearInterval(wr))):(wr||(Kc=qr.now(),wr=setInterval(q3,k0)),xl=1,C0(nb))}}function ab(s,i,r){var o=new Xc;return i=i==null?0:+i,o.restart(c=>{o.stop(),s(c+i)},i,r),o}function V3(s){return((s*=2)<=1?s*s*s:(s-=2)*s*s+2)/2}var qm=3;(function s(i){i=+i;function r(o){return Math.pow(o,i)}return r.exponent=s,r})(qm);(function s(i){i=+i;function r(o){return 1-Math.pow(1-o,i)}return r.exponent=s,r})(qm);(function s(i){i=+i;function r(o){return((o*=2)<=1?Math.pow(o,i):2-Math.pow(2-o,i))/2}return r.exponent=s,r})(qm);function Qc(s){return(Math.pow(2,-10*s)-.0009765625)*1.0009775171065494}var Gm=1.70158;(function s(i){i=+i;function r(o){return(o=+o)*o*(i*(o-1)+o)}return r.overshoot=s,r})(Gm);(function s(i){i=+i;function r(o){return--o*o*((o+1)*i+o)+1}return r.overshoot=s,r})(Gm);(function s(i){i=+i;function r(o){return((o*=2)<1?o*o*((i+1)*o-i):(o-=2)*o*((i+1)*o+i)+2)/2}return r.overshoot=s,r})(Gm);var gl=2*Math.PI,Vm=1,Ym=.3;(function s(i,r){var o=Math.asin(1/(i=Math.max(1,i)))*(r/=gl);function c(f){return i*Qc(- --f)*Math.sin((o-f)/r)}return c.amplitude=function(f){return s(f,r*gl)},c.period=function(f){return s(i,f)},c})(Vm,Ym);(function s(i,r){var o=Math.asin(1/(i=Math.max(1,i)))*(r/=gl);function c(f){return 1-i*Qc(f=+f)*Math.sin((f+o)/r)}return c.amplitude=function(f){return s(f,r*gl)},c.period=function(f){return s(i,f)},c})(Vm,Ym);(function s(i,r){var o=Math.asin(1/(i=Math.max(1,i)))*(r/=gl);function c(f){return((f=f*2-1)<0?i*Qc(-f)*Math.sin((o-f)/r):2-i*Qc(f)*Math.sin((o+f)/r))/2}return c.amplitude=function(f){return s(f,r*gl)},c.period=function(f){return s(i,f)},c})(Vm,Ym);var Y3=nd("start","end","cancel","interrupt"),F3=[],E0=0,sb=1,jm=2,Oc=3,ib=4,wm=5,Lc=6;function rd(s,i,r,o,c,f){var m=s.__transition;if(!m)s.__transition={};else if(r in m)return;I3(s,r,{name:i,index:o,group:c,on:Y3,tween:F3,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:E0})}function Fm(s,i){var r=Qn(s,i);if(r.state>E0)throw new Error("too late; already scheduled");return r}function ua(s,i){var r=Qn(s,i);if(r.state>Oc)throw new Error("too late; already running");return r}function Qn(s,i){var r=s.__transition;if(!r||!(r=r[i]))throw new Error("transition not found");return r}function I3(s,i,r){var o=s.__transition,c;o[i]=r,r.timer=T0(f,0,r.time);function f(v){r.state=sb,r.timer.restart(m,r.delay,r.time),r.delay<=v&&m(v-r.delay)}function m(v){var y,g,b,N;if(r.state!==sb)return p();for(y in o)if(N=o[y],N.name===r.name){if(N.state===Oc)return ab(m);N.state===ib?(N.state=Lc,N.timer.stop(),N.on.call("interrupt",s,s.__data__,N.index,N.group),delete o[y]):+y<i&&(N.state=Lc,N.timer.stop(),N.on.call("cancel",s,s.__data__,N.index,N.group),delete o[y])}if(ab(function(){r.state===Oc&&(r.state=ib,r.timer.restart(h,r.delay,r.time),h(v))}),r.state=jm,r.on.call("start",s,s.__data__,r.index,r.group),r.state===jm){for(r.state=Oc,c=new Array(b=r.tween.length),y=0,g=-1;y<b;++y)(N=r.tween[y].value.call(s,s.__data__,r.index,r.group))&&(c[++g]=N);c.length=g+1}}function h(v){for(var y=v<r.duration?r.ease.call(null,v/r.duration):(r.timer.restart(p),r.state=wm,1),g=-1,b=c.length;++g<b;)c[g].call(s,y);r.state===wm&&(r.on.call("end",s,s.__data__,r.index,r.group),p())}function p(){r.state=Lc,r.timer.stop(),delete o[i];for(var v in o)return;delete s.__transition}}function zc(s,i){var r=s.__transition,o,c,f=!0,m;if(r){i=i==null?null:i+"";for(m in r){if((o=r[m]).name!==i){f=!1;continue}c=o.state>jm&&o.state<wm,o.state=Lc,o.timer.stop(),o.on.call(c?"interrupt":"cancel",s,s.__data__,o.index,o.group),delete r[m]}f&&delete s.__transition}}function K3(s){return this.each(function(){zc(this,s)})}function X3(s,i){var r,o;return function(){var c=ua(this,s),f=c.tween;if(f!==r){o=r=f;for(var m=0,h=o.length;m<h;++m)if(o[m].name===i){o=o.slice(),o.splice(m,1);break}}c.tween=o}}function Q3(s,i,r){var o,c;if(typeof r!="function")throw new Error;return function(){var f=ua(this,s),m=f.tween;if(m!==o){c=(o=m).slice();for(var h={name:i,value:r},p=0,v=c.length;p<v;++p)if(c[p].name===i){c[p]=h;break}p===v&&c.push(h)}f.tween=c}}function Z3(s,i){var r=this._id;if(s+="",arguments.length<2){for(var o=Qn(this.node(),r).tween,c=0,f=o.length,m;c<f;++c)if((m=o[c]).name===s)return m.value;return null}return this.each((i==null?X3:Q3)(r,s,i))}function Im(s,i,r){var o=s._id;return s.each(function(){var c=ua(this,o);(c.value||(c.value={}))[i]=r.apply(this,arguments)}),function(c){return Qn(c,o).value[i]}}function A0(s,i){var r;return(typeof i=="number"?oa:i instanceof ii?Fc:(r=ii(i))?(i=r,Fc):j0)(s,i)}function P3(s){return function(){this.removeAttribute(s)}}function J3(s){return function(){this.removeAttributeNS(s.space,s.local)}}function W3(s,i,r){var o,c=r+"",f;return function(){var m=this.getAttribute(s);return m===c?null:m===o?f:f=i(o=m,r)}}function eC(s,i,r){var o,c=r+"",f;return function(){var m=this.getAttributeNS(s.space,s.local);return m===c?null:m===o?f:f=i(o=m,r)}}function tC(s,i,r){var o,c,f;return function(){var m,h=r(this),p;return h==null?void this.removeAttribute(s):(m=this.getAttribute(s),p=h+"",m===p?null:m===o&&p===c?f:(c=p,f=i(o=m,h)))}}function nC(s,i,r){var o,c,f;return function(){var m,h=r(this),p;return h==null?void this.removeAttributeNS(s.space,s.local):(m=this.getAttributeNS(s.space,s.local),p=h+"",m===p?null:m===o&&p===c?f:(c=p,f=i(o=m,h)))}}function aC(s,i){var r=ad(s),o=r==="transform"?L3:A0;return this.attrTween(s,typeof i=="function"?(r.local?nC:tC)(r,o,Im(this,"attr."+s,i)):i==null?(r.local?J3:P3)(r):(r.local?eC:W3)(r,o,i))}function sC(s,i){return function(r){this.setAttribute(s,i.call(this,r))}}function iC(s,i){return function(r){this.setAttributeNS(s.space,s.local,i.call(this,r))}}function lC(s,i){var r,o;function c(){var f=i.apply(this,arguments);return f!==o&&(r=(o=f)&&iC(s,f)),r}return c._value=i,c}function rC(s,i){var r,o;function c(){var f=i.apply(this,arguments);return f!==o&&(r=(o=f)&&sC(s,f)),r}return c._value=i,c}function oC(s,i){var r="attr."+s;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;var o=ad(s);return this.tween(r,(o.local?lC:rC)(o,i))}function cC(s,i){return function(){Fm(this,s).delay=+i.apply(this,arguments)}}function dC(s,i){return i=+i,function(){Fm(this,s).delay=i}}function uC(s){var i=this._id;return arguments.length?this.each((typeof s=="function"?cC:dC)(i,s)):Qn(this.node(),i).delay}function fC(s,i){return function(){ua(this,s).duration=+i.apply(this,arguments)}}function mC(s,i){return i=+i,function(){ua(this,s).duration=i}}function hC(s){var i=this._id;return arguments.length?this.each((typeof s=="function"?fC:mC)(i,s)):Qn(this.node(),i).duration}function pC(s,i){if(typeof i!="function")throw new Error;return function(){ua(this,s).ease=i}}function xC(s){var i=this._id;return arguments.length?this.each(pC(i,s)):Qn(this.node(),i).ease}function gC(s,i){return function(){var r=i.apply(this,arguments);if(typeof r!="function")throw new Error;ua(this,s).ease=r}}function yC(s){if(typeof s!="function")throw new Error;return this.each(gC(this._id,s))}function bC(s){typeof s!="function"&&(s=Pb(s));for(var i=this._groups,r=i.length,o=new Array(r),c=0;c<r;++c)for(var f=i[c],m=f.length,h=o[c]=[],p,v=0;v<m;++v)(p=f[v])&&s.call(p,p.__data__,v,f)&&h.push(p);return new Da(o,this._parents,this._name,this._id)}function vC(s){if(s._id!==this._id)throw new Error;for(var i=this._groups,r=s._groups,o=i.length,c=r.length,f=Math.min(o,c),m=new Array(o),h=0;h<f;++h)for(var p=i[h],v=r[h],y=p.length,g=m[h]=new Array(y),b,N=0;N<y;++N)(b=p[N]||v[N])&&(g[N]=b);for(;h<o;++h)m[h]=i[h];return new Da(m,this._parents,this._name,this._id)}function NC(s){return(s+"").trim().split(/^|\s+/).every(function(i){var r=i.indexOf(".");return r>=0&&(i=i.slice(0,r)),!i||i==="start"})}function jC(s,i,r){var o,c,f=NC(i)?Fm:ua;return function(){var m=f(this,s),h=m.on;h!==o&&(c=(o=h).copy()).on(i,r),m.on=c}}function wC(s,i){var r=this._id;return arguments.length<2?Qn(this.node(),r).on.on(s):this.each(jC(r,s,i))}function _C(s){return function(){var i=this.parentNode;for(var r in this.__transition)if(+r!==s)return;i&&i.removeChild(this)}}function SC(){return this.on("end.remove",_C(this._id))}function kC(s){var i=this._name,r=this._id;typeof s!="function"&&(s=Lm(s));for(var o=this._groups,c=o.length,f=new Array(c),m=0;m<c;++m)for(var h=o[m],p=h.length,v=f[m]=new Array(p),y,g,b=0;b<p;++b)(y=h[b])&&(g=s.call(y,y.__data__,b,h))&&("__data__"in y&&(g.__data__=y.__data__),v[b]=g,rd(v[b],i,r,b,v,Qn(y,r)));return new Da(f,this._parents,i,r)}function CC(s){var i=this._name,r=this._id;typeof s!="function"&&(s=Zb(s));for(var o=this._groups,c=o.length,f=[],m=[],h=0;h<c;++h)for(var p=o[h],v=p.length,y,g=0;g<v;++g)if(y=p[g]){for(var b=s.call(y,y.__data__,g,p),N,j=Qn(y,r),T=0,H=b.length;T<H;++T)(N=b[T])&&rd(N,i,r,T,b,j);f.push(b),m.push(y)}return new Da(f,m,i,r)}var TC=Vr.prototype.constructor;function EC(){return new TC(this._groups,this._parents)}function AC(s,i){var r,o,c;return function(){var f=hl(this,s),m=(this.style.removeProperty(s),hl(this,s));return f===m?null:f===r&&m===o?c:c=i(r=f,o=m)}}function M0(s){return function(){this.style.removeProperty(s)}}function MC(s,i,r){var o,c=r+"",f;return function(){var m=hl(this,s);return m===c?null:m===o?f:f=i(o=m,r)}}function RC(s,i,r){var o,c,f;return function(){var m=hl(this,s),h=r(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(s),hl(this,s))),m===p?null:m===o&&p===c?f:(c=p,f=i(o=m,h))}}function DC(s,i){var r,o,c,f="style."+i,m="end."+f,h;return function(){var p=ua(this,s),v=p.on,y=p.value[f]==null?h||(h=M0(i)):void 0;(v!==r||c!==y)&&(o=(r=v).copy()).on(m,c=y),p.on=o}}function OC(s,i,r){var o=(s+="")=="transform"?O3:A0;return i==null?this.styleTween(s,AC(s,o)).on("end.style."+s,M0(s)):typeof i=="function"?this.styleTween(s,RC(s,o,Im(this,"style."+s,i))).each(DC(this._id,s)):this.styleTween(s,MC(s,o,i),r).on("end.style."+s,null)}function LC(s,i,r){return function(o){this.style.setProperty(s,i.call(this,o),r)}}function zC(s,i,r){var o,c;function f(){var m=i.apply(this,arguments);return m!==c&&(o=(c=m)&&LC(s,m,r)),o}return f._value=i,f}function HC(s,i,r){var o="style."+(s+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(i==null)return this.tween(o,null);if(typeof i!="function")throw new Error;return this.tween(o,zC(s,i,r??""))}function UC(s){return function(){this.textContent=s}}function BC(s){return function(){var i=s(this);this.textContent=i??""}}function $C(s){return this.tween("text",typeof s=="function"?BC(Im(this,"text",s)):UC(s==null?"":s+""))}function qC(s){return function(i){this.textContent=s.call(this,i)}}function GC(s){var i,r;function o(){var c=s.apply(this,arguments);return c!==r&&(i=(r=c)&&qC(c)),i}return o._value=s,o}function VC(s){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(s==null)return this.tween(i,null);if(typeof s!="function")throw new Error;return this.tween(i,GC(s))}function YC(){for(var s=this._name,i=this._id,r=R0(),o=this._groups,c=o.length,f=0;f<c;++f)for(var m=o[f],h=m.length,p,v=0;v<h;++v)if(p=m[v]){var y=Qn(p,i);rd(p,s,r,v,m,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Da(o,this._parents,s,r)}function FC(){var s,i,r=this,o=r._id,c=r.size();return new Promise(function(f,m){var h={value:m},p={value:function(){--c===0&&f()}};r.each(function(){var v=ua(this,o),y=v.on;y!==s&&(i=(s=y).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(p)),v.on=i}),c===0&&f()})}var IC=0;function Da(s,i,r,o){this._groups=s,this._parents=i,this._name=r,this._id=o}function R0(){return++IC}var Ca=Vr.prototype;Da.prototype={constructor:Da,select:kC,selectAll:CC,selectChild:Ca.selectChild,selectChildren:Ca.selectChildren,filter:bC,merge:vC,selection:EC,transition:YC,call:Ca.call,nodes:Ca.nodes,node:Ca.node,size:Ca.size,empty:Ca.empty,each:Ca.each,on:wC,attr:aC,attrTween:oC,style:OC,styleTween:HC,text:$C,textTween:VC,remove:SC,tween:Z3,delay:uC,duration:hC,ease:xC,easeVarying:yC,end:FC,[Symbol.iterator]:Ca[Symbol.iterator]};var KC={time:null,delay:0,duration:250,ease:V3};function XC(s,i){for(var r;!(r=s.__transition)||!(r=r[i]);)if(!(s=s.parentNode))throw new Error(`transition ${i} not found`);return r}function QC(s){var i,r;s instanceof Da?(i=s._id,s=s._name):(i=R0(),(r=KC).time=$m(),s=s==null?null:s+"");for(var o=this._groups,c=o.length,f=0;f<c;++f)for(var m=o[f],h=m.length,p,v=0;v<h;++v)(p=m[v])&&rd(p,s,i,v,m,r||XC(p,i));return new Da(o,this._parents,s,i)}Vr.prototype.interrupt=K3;Vr.prototype.transition=QC;var Cc=s=>()=>s;function ZC(s,{sourceEvent:i,target:r,transform:o,dispatch:c}){Object.defineProperties(this,{type:{value:s,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:c}})}function Aa(s,i,r){this.k=s,this.x=i,this.y=r}Aa.prototype={constructor:Aa,scale:function(s){return s===1?this:new Aa(this.k*s,this.x,this.y)},translate:function(s,i){return s===0&i===0?this:new Aa(this.k,this.x+this.k*s,this.y+this.k*i)},apply:function(s){return[s[0]*this.k+this.x,s[1]*this.k+this.y]},applyX:function(s){return s*this.k+this.x},applyY:function(s){return s*this.k+this.y},invert:function(s){return[(s[0]-this.x)/this.k,(s[1]-this.y)/this.k]},invertX:function(s){return(s-this.x)/this.k},invertY:function(s){return(s-this.y)/this.k},rescaleX:function(s){return s.copy().domain(s.range().map(this.invertX,this).map(s.invert,s))},rescaleY:function(s){return s.copy().domain(s.range().map(this.invertY,this).map(s.invert,s))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var od=new Aa(1,0,0);D0.prototype=Aa.prototype;function D0(s){for(;!s.__zoom;)if(!(s=s.parentNode))return od;return s.__zoom}function nm(s){s.stopImmediatePropagation()}function _r(s){s.preventDefault(),s.stopImmediatePropagation()}function PC(s){return(!s.ctrlKey||s.type==="wheel")&&!s.button}function JC(){var s=this;return s instanceof SVGElement?(s=s.ownerSVGElement||s,s.hasAttribute("viewBox")?(s=s.viewBox.baseVal,[[s.x,s.y],[s.x+s.width,s.y+s.height]]):[[0,0],[s.width.baseVal.value,s.height.baseVal.value]]):[[0,0],[s.clientWidth,s.clientHeight]]}function lb(){return this.__zoom||od}function WC(s){return-s.deltaY*(s.deltaMode===1?.05:s.deltaMode?1:.002)*(s.ctrlKey?10:1)}function e4(){return navigator.maxTouchPoints||"ontouchstart"in this}function t4(s,i,r){var o=s.invertX(i[0][0])-r[0][0],c=s.invertX(i[1][0])-r[1][0],f=s.invertY(i[0][1])-r[0][1],m=s.invertY(i[1][1])-r[1][1];return s.translate(c>o?(o+c)/2:Math.min(0,o)||Math.max(0,c),m>f?(f+m)/2:Math.min(0,f)||Math.max(0,m))}function O0(){var s=PC,i=JC,r=t4,o=WC,c=e4,f=[0,1/0],m=[[-1/0,-1/0],[1/0,1/0]],h=250,p=Dc,v=nd("start","zoom","end"),y,g,b,N=500,j=150,T=0,H=10;function _(w){w.property("__zoom",lb).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",G).filter(c).on("touchstart.zoom",Y).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(w,R,A,V){var B=w.selection?w.selection():w;B.property("__zoom",lb),w!==B?O(w,R,A,V):B.interrupt().each(function(){U(this,arguments).event(V).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},_.scaleBy=function(w,R,A,V){_.scaleTo(w,function(){var B=this.__zoom.k,P=typeof R=="function"?R.apply(this,arguments):R;return B*P},A,V)},_.scaleTo=function(w,R,A,V){_.transform(w,function(){var B=i.apply(this,arguments),P=this.__zoom,te=A==null?D(B):typeof A=="function"?A.apply(this,arguments):A,le=P.invert(te),pe=typeof R=="function"?R.apply(this,arguments):R;return r(z(K(P,pe),te,le),B,m)},A,V)},_.translateBy=function(w,R,A,V){_.transform(w,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof A=="function"?A.apply(this,arguments):A),i.apply(this,arguments),m)},null,V)},_.translateTo=function(w,R,A,V,B){_.transform(w,function(){var P=i.apply(this,arguments),te=this.__zoom,le=V==null?D(P):typeof V=="function"?V.apply(this,arguments):V;return r(od.translate(le[0],le[1]).scale(te.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof A=="function"?-A.apply(this,arguments):-A),P,m)},V,B)};function K(w,R){return R=Math.max(f[0],Math.min(f[1],R)),R===w.k?w:new Aa(R,w.x,w.y)}function z(w,R,A){var V=R[0]-A[0]*w.k,B=R[1]-A[1]*w.k;return V===w.x&&B===w.y?w:new Aa(w.k,V,B)}function D(w){return[(+w[0][0]+ +w[1][0])/2,(+w[0][1]+ +w[1][1])/2]}function O(w,R,A,V){w.on("start.zoom",function(){U(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){U(this,arguments).event(V).end()}).tween("zoom",function(){var B=this,P=arguments,te=U(B,P).event(V),le=i.apply(B,P),pe=A==null?D(le):typeof A=="function"?A.apply(B,P):A,ve=Math.max(le[1][0]-le[0][0],le[1][1]-le[0][1]),k=B.__zoom,M=typeof R=="function"?R.apply(B,P):R,ie=p(k.invert(pe).concat(ve/k.k),M.invert(pe).concat(ve/M.k));return function(ce){if(ce===1)ce=M;else{var me=ie(ce),ge=ve/me[2];ce=new Aa(ge,pe[0]-me[0]*ge,pe[1]-me[1]*ge)}te.zoom(null,ce)}})}function U(w,R,A){return!A&&w.__zooming||new q(w,R)}function q(w,R){this.that=w,this.args=R,this.active=0,this.sourceEvent=null,this.extent=i.apply(w,R),this.taps=0}q.prototype={event:function(w){return w&&(this.sourceEvent=w),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(w,R){return this.mouse&&w!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&w!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&w!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(w){var R=Nn(this.that).datum();v.call(w,this.that,new ZC(w,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:v}),R)}};function C(w,...R){if(!s.apply(this,arguments))return;var A=U(this,R).event(w),V=this.__zoom,B=Math.max(f[0],Math.min(f[1],V.k*Math.pow(2,o.apply(this,arguments)))),P=Kn(w);if(A.wheel)(A.mouse[0][0]!==P[0]||A.mouse[0][1]!==P[1])&&(A.mouse[1]=V.invert(A.mouse[0]=P)),clearTimeout(A.wheel);else{if(V.k===B)return;A.mouse=[P,V.invert(P)],zc(this),A.start()}_r(w),A.wheel=setTimeout(te,j),A.zoom("mouse",r(z(K(V,B),A.mouse[0],A.mouse[1]),A.extent,m));function te(){A.wheel=null,A.end()}}function F(w,...R){if(b||!s.apply(this,arguments))return;var A=w.currentTarget,V=U(this,R,!0).event(w),B=Nn(w.view).on("mousemove.zoom",pe,!0).on("mouseup.zoom",ve,!0),P=Kn(w,A),te=w.clientX,le=w.clientY;r0(w.view),nm(w),V.mouse=[P,this.__zoom.invert(P)],zc(this),V.start();function pe(k){if(_r(k),!V.moved){var M=k.clientX-te,ie=k.clientY-le;V.moved=M*M+ie*ie>T}V.event(k).zoom("mouse",r(z(V.that.__zoom,V.mouse[0]=Kn(k,A),V.mouse[1]),V.extent,m))}function ve(k){B.on("mousemove.zoom mouseup.zoom",null),o0(k.view,V.moved),_r(k),V.event(k).end()}}function G(w,...R){if(s.apply(this,arguments)){var A=this.__zoom,V=Kn(w.changedTouches?w.changedTouches[0]:w,this),B=A.invert(V),P=A.k*(w.shiftKey?.5:2),te=r(z(K(A,P),V,B),i.apply(this,R),m);_r(w),h>0?Nn(this).transition().duration(h).call(O,te,V,w):Nn(this).call(_.transform,te,V,w)}}function Y(w,...R){if(s.apply(this,arguments)){var A=w.touches,V=A.length,B=U(this,R,w.changedTouches.length===V).event(w),P,te,le,pe;for(nm(w),te=0;te<V;++te)le=A[te],pe=Kn(le,this),pe=[pe,this.__zoom.invert(pe),le.identifier],B.touch0?!B.touch1&&B.touch0[2]!==pe[2]&&(B.touch1=pe,B.taps=0):(B.touch0=pe,P=!0,B.taps=1+!!y);y&&(y=clearTimeout(y)),P&&(B.taps<2&&(g=pe[0],y=setTimeout(function(){y=null},N)),zc(this),B.start())}}function I(w,...R){if(this.__zooming){var A=U(this,R).event(w),V=w.changedTouches,B=V.length,P,te,le,pe;for(_r(w),P=0;P<B;++P)te=V[P],le=Kn(te,this),A.touch0&&A.touch0[2]===te.identifier?A.touch0[0]=le:A.touch1&&A.touch1[2]===te.identifier&&(A.touch1[0]=le);if(te=A.that.__zoom,A.touch1){var ve=A.touch0[0],k=A.touch0[1],M=A.touch1[0],ie=A.touch1[1],ce=(ce=M[0]-ve[0])*ce+(ce=M[1]-ve[1])*ce,me=(me=ie[0]-k[0])*me+(me=ie[1]-k[1])*me;te=K(te,Math.sqrt(ce/me)),le=[(ve[0]+M[0])/2,(ve[1]+M[1])/2],pe=[(k[0]+ie[0])/2,(k[1]+ie[1])/2]}else if(A.touch0)le=A.touch0[0],pe=A.touch0[1];else return;A.zoom("touch",r(z(te,le,pe),A.extent,m))}}function W(w,...R){if(this.__zooming){var A=U(this,R).event(w),V=w.changedTouches,B=V.length,P,te;for(nm(w),b&&clearTimeout(b),b=setTimeout(function(){b=null},N),P=0;P<B;++P)te=V[P],A.touch0&&A.touch0[2]===te.identifier?delete A.touch0:A.touch1&&A.touch1[2]===te.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(te=Kn(te,this),Math.hypot(g[0]-te[0],g[1]-te[1])<H)){var le=Nn(this).on("dblclick.zoom");le&&le.apply(this,arguments)}}}return _.wheelDelta=function(w){return arguments.length?(o=typeof w=="function"?w:Cc(+w),_):o},_.filter=function(w){return arguments.length?(s=typeof w=="function"?w:Cc(!!w),_):s},_.touchable=function(w){return arguments.length?(c=typeof w=="function"?w:Cc(!!w),_):c},_.extent=function(w){return arguments.length?(i=typeof w=="function"?w:Cc([[+w[0][0],+w[0][1]],[+w[1][0],+w[1][1]]]),_):i},_.scaleExtent=function(w){return arguments.length?(f[0]=+w[0],f[1]=+w[1],_):[f[0],f[1]]},_.translateExtent=function(w){return arguments.length?(m[0][0]=+w[0][0],m[1][0]=+w[1][0],m[0][1]=+w[0][1],m[1][1]=+w[1][1],_):[[m[0][0],m[0][1]],[m[1][0],m[1][1]]]},_.constrain=function(w){return arguments.length?(r=w,_):r},_.duration=function(w){return arguments.length?(h=+w,_):h},_.interpolate=function(w){return arguments.length?(p=w,_):p},_.on=function(){var w=v.on.apply(v,arguments);return w===v?_:w},_.clickDistance=function(w){return arguments.length?(T=(w=+w)*w,_):Math.sqrt(T)},_.tapDistance=function(w){return arguments.length?(H=+w,_):H},_}const Zc={error001:(s="react")=>`Seems like you have not used ${s==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${s}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:s=>`Node type "${s}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:s=>`The old edge with id=${s} does not exist.`,error009:s=>`Marker type "${s}" doesn't exist.`,error008:(s,{id:i,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${s} handle id: "${s==="source"?r:o}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:s=>`Edge type "${s}" not found. Using fallback type "default".`,error012:s=>`Node with id "${s}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(s="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${s}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:s=>`Edge with id "${s}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},n4=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],tT=["Enter"," ","Escape"],a4={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:s,x:i,y:r})=>`Moved selected node ${s}. New position, x: ${i}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Pc;(function(s){s.Strict="strict",s.Loose="loose"})(Pc||(Pc={}));var Ar;(function(s){s.Free="free",s.Vertical="vertical",s.Horizontal="horizontal"})(Ar||(Ar={}));var rb;(function(s){s.Partial="partial",s.Full="full"})(rb||(rb={}));const nT={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ob;(function(s){s.Bezier="default",s.Straight="straight",s.Step="step",s.SmoothStep="smoothstep",s.SimpleBezier="simplebezier"})(ob||(ob={}));var _m;(function(s){s.Arrow="arrow",s.ArrowClosed="arrowclosed"})(_m||(_m={}));var Ie;(function(s){s.Left="left",s.Top="top",s.Right="right",s.Bottom="bottom"})(Ie||(Ie={}));const cb={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top},s4=s=>!!s&&typeof s=="object"&&"id"in s&&"source"in s&&"target"in s,aT=s=>!!s&&typeof s=="object"&&"id"in s&&"position"in s&&!("source"in s)&&!("target"in s),Km=s=>!!s&&typeof s=="object"&&"id"in s&&"internals"in s&&!("source"in s)&&!("target"in s),Fr=(s,i=[0,0])=>{const{width:r,height:o}=Oa(s),c=s.origin??i,f=r*c[0],m=o*c[1];return{x:s.position.x-f,y:s.position.y-m}},sT=(s,i={nodeOrigin:[0,0]})=>{if(s.length===0)return{x:0,y:0,width:0,height:0};let r=!1;const o=s.reduce((c,f)=>{const m=typeof f=="string";let h=!i.nodeLookup&&!m?f:void 0;return i.nodeLookup&&(h=m?i.nodeLookup.get(f):Km(f)?f:i.nodeLookup.get(f.id)),h?(r=!0,cd(c,Jc(h,i.nodeOrigin))):c},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return r?dd(o):{x:0,y:0,width:0,height:0}},L0=(s,i={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return s.forEach(c=>{(i.filter===void 0||i.filter(c))&&(r=cd(r,Jc(c)),o=!0)}),o?dd(r):{x:0,y:0,width:0,height:0}},iT=(s,i,[r,o,c]=[0,0,1],f=!1,m=!1)=>{const h=(i.x-r)/c,p=(i.y-o)/c,v=i.width/c,y=i.height/c,g=[];for(const b of s.values()){const{measured:N,selectable:j=!0,hidden:T=!1}=b;if(m&&!j||T)continue;const H=N.width??b.width??b.initialWidth??0,_=N.height??b.height??b.initialHeight??0,{x:K,y:z}=b.internals.positionAbsolute,D=U0(h,p,v,y,K,z,H,_),O=H*_,U=f&&D>0;(!b.internals.handleBounds||U||D>=O||b.dragging)&&g.push(b)}return g},i4=(s,i)=>{const r=new Set;return s.forEach(o=>{r.add(o.id)}),i.filter(o=>r.has(o.source)||r.has(o.target))};function l4(s,i){const r=new Map,o=i!=null&&i.nodes?new Set(i.nodes.map(c=>c.id)):null;return s.forEach(c=>{let f;if(i!=null&&i.includeHiddenNodes){const{width:m,height:h}=Oa(c);f=m>0&&h>0}else f=!!(c.measured.width&&c.measured.height&&!c.hidden);f&&(!o||o.has(c.id))&&r.set(c.id,c)}),r}async function lT({nodes:s,width:i,height:r,panZoom:o,minZoom:c,maxZoom:f},m){if(s.size===0)return!0;const h=l4(s,m),p=L0(h),v=u4(p,i,r,(m==null?void 0:m.minZoom)??c,(m==null?void 0:m.maxZoom)??f,(m==null?void 0:m.padding)??.1);return await o.setViewport(v,{duration:m==null?void 0:m.duration,ease:m==null?void 0:m.ease,interpolate:m==null?void 0:m.interpolate}),!0}function r4({nodeId:s,nextPosition:i,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:c,onError:f}){const m=r.get(s),h=m.parentId?r.get(m.parentId):void 0,{x:p,y:v}=h?h.internals.positionAbsolute:{x:0,y:0},y=m.origin??o;let g=m.extent||c;if(m.extent==="parent"&&!m.expandParent)if(!h)f==null||f("005",Zc.error005());else{const{width:N,height:j}=Oa(h);N&&j&&(g=[[p,v],[p+N,v+j]])}else h&&oi(m.extent)&&(g=[[m.extent[0][0]+p,m.extent[0][1]+v],[m.extent[1][0]+p,m.extent[1][1]+v]]);const b=oi(g)?ri(i,g,m.measured):i;return(m.measured.width===void 0||m.measured.height===void 0)&&(f==null||f("015",Zc.error015())),{position:{x:b.x-p+(m.measured.width??0)*y[0],y:b.y-v+(m.measured.height??0)*y[1]},positionAbsolute:b}}async function rT({nodesToRemove:s=[],edgesToRemove:i=[],nodes:r,edges:o,onBeforeDelete:c}){const f=new Set(s.map(b=>b.id)),m=[];for(const b of r){if(b.deletable===!1)continue;const N=f.has(b.id),j=!N&&b.parentId&&m.find(T=>T.id===b.parentId);(N||j)&&m.push(b)}const h=new Set(i.map(b=>b.id)),p=o.filter(b=>b.deletable!==!1),y=i4(m,p);for(const b of p)h.has(b.id)&&!y.find(j=>j.id===b.id)&&y.push(b);if(!c)return{edges:y,nodes:m};const g=await c({nodes:m,edges:y});return typeof g=="boolean"?g?{edges:y,nodes:m}:{edges:[],nodes:[]}:g}const yl=(s,i=0,r=1)=>Math.min(Math.max(s,i),r),ri=(s={x:0,y:0},i,r)=>({x:yl(s.x,i[0][0],i[1][0]-((r==null?void 0:r.width)??0)),y:yl(s.y,i[0][1],i[1][1]-((r==null?void 0:r.height)??0))});function z0(s,i,r){const{width:o,height:c}=Oa(r),{x:f,y:m}=r.internals.positionAbsolute;return ri(s,[[f,m],[f+o,m+c]],i)}const db=(s,i,r)=>s<i?yl(Math.abs(s-i),1,i)/i:s>r?-yl(Math.abs(s-r),1,i)/i:0,H0=(s,i,r=15,o=40)=>{const c=db(s.x,o,i.width-o)*r,f=db(s.y,o,i.height-o)*r;return[c,f]},cd=(s,i)=>({x:Math.min(s.x,i.x),y:Math.min(s.y,i.y),x2:Math.max(s.x2,i.x2),y2:Math.max(s.y2,i.y2)}),Sm=({x:s,y:i,width:r,height:o})=>({x:s,y:i,x2:s+r,y2:i+o}),dd=({x:s,y:i,x2:r,y2:o})=>({x:s,y:i,width:r-s,height:o-i}),Xm=(s,i=[0,0])=>{var c,f;const{x:r,y:o}=Km(s)?s.internals.positionAbsolute:Fr(s,i);return{x:r,y:o,width:((c=s.measured)==null?void 0:c.width)??s.width??s.initialWidth??0,height:((f=s.measured)==null?void 0:f.height)??s.height??s.initialHeight??0}},Jc=(s,i=[0,0])=>{var c,f;const{x:r,y:o}=Km(s)?s.internals.positionAbsolute:Fr(s,i);return{x:r,y:o,x2:r+(((c=s.measured)==null?void 0:c.width)??s.width??s.initialWidth??0),y2:o+(((f=s.measured)==null?void 0:f.height)??s.height??s.initialHeight??0)}},o4=(s,i)=>dd(cd(Sm(s),Sm(i))),U0=(s,i,r,o,c,f,m,h)=>{const p=Math.max(0,Math.min(s+r,c+m)-Math.max(s,c)),v=Math.max(0,Math.min(i+o,f+h)-Math.max(i,f));return Math.ceil(p*v)},B0=(s,i)=>U0(s.x,s.y,s.width,s.height,i.x,i.y,i.width,i.height),oT=s=>Ws(s.width)&&Ws(s.height)&&Ws(s.x)&&Ws(s.y),Ws=s=>!isNaN(s)&&isFinite(s),cT=(s,i)=>(r,o)=>{},ud=(s,i=[1,1])=>({x:i[0]*Math.round(s.x/i[0]),y:i[1]*Math.round(s.y/i[1])}),$0=({x:s,y:i},[r,o,c],f=!1,m=[1,1])=>{const h={x:(s-r)/c,y:(i-o)/c};return f?ud(h,m):h},km=({x:s,y:i},[r,o,c])=>({x:s*c+r,y:i*c+o});function sl(s,i){if(typeof s=="number")return Math.floor((i-i/(1+s))*.5);if(typeof s=="string"&&s.endsWith("px")){const r=parseFloat(s);if(!Number.isNaN(r))return Math.floor(r)}if(typeof s=="string"&&s.endsWith("%")){const r=parseFloat(s);if(!Number.isNaN(r))return Math.floor(i*r*.01)}return console.error(`The padding value "${s}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function c4(s,i,r){if(typeof s=="string"||typeof s=="number"){const o=sl(s,r),c=sl(s,i);return{top:o,right:c,bottom:o,left:c,x:c*2,y:o*2}}if(typeof s=="object"){const o=sl(s.top??s.y??0,r),c=sl(s.bottom??s.y??0,r),f=sl(s.left??s.x??0,i),m=sl(s.right??s.x??0,i);return{top:o,right:m,bottom:c,left:f,x:f+m,y:o+c}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function d4(s,i,r,o,c,f){const{x:m,y:h}=km(s,[i,r,o]),{x:p,y:v}=km({x:s.x+s.width,y:s.y+s.height},[i,r,o]),y=c-p,g=f-v;return{left:Math.floor(m),top:Math.floor(h),right:Math.floor(y),bottom:Math.floor(g)}}const u4=(s,i,r,o,c,f)=>{const m=c4(f,i,r),h=(i-m.x)/s.width,p=(r-m.y)/s.height,v=Math.min(h,p),y=yl(v,o,c),g=s.x+s.width/2,b=s.y+s.height/2,N=i/2-g*y,j=r/2-b*y,T=d4(s,N,j,y,i,r),H={left:Math.min(T.left-m.left,0),top:Math.min(T.top-m.top,0),right:Math.min(T.right-m.right,0),bottom:Math.min(T.bottom-m.bottom,0)};return{x:N-H.left+H.right,y:j-H.top+H.bottom,zoom:y}},Qm=()=>{var s;return typeof navigator<"u"&&((s=navigator==null?void 0:navigator.userAgent)==null?void 0:s.indexOf("Mac"))>=0};function oi(s){return s!=null&&s!=="parent"}function Oa(s){var i,r;return{width:((i=s.measured)==null?void 0:i.width)??s.width??s.initialWidth??0,height:((r=s.measured)==null?void 0:r.height)??s.height??s.initialHeight??0}}function dT(s){var i,r;return(((i=s.measured)==null?void 0:i.width)??s.width??s.initialWidth)!==void 0&&(((r=s.measured)==null?void 0:r.height)??s.height??s.initialHeight)!==void 0}function uT(s,i={width:0,height:0},r,o,c){const f={...s},m=o.get(r);if(m){const h=m.origin||c;f.x+=m.internals.positionAbsolute.x-(i.width??0)*h[0],f.y+=m.internals.positionAbsolute.y-(i.height??0)*h[1]}return f}function fT(s,i){if(s.size!==i.size)return!1;for(const r of s)if(!i.has(r))return!1;return!0}function mT(){let s,i;return{promise:new Promise((o,c)=>{s=o,i=c}),resolve:s,reject:i}}function hT(s){return{...a4,...s||{}}}function pT(s){return s===null?null:s?"valid":"invalid"}function Mr(s,{snapGrid:i=[0,0],snapToGrid:r=!1,transform:o,containerBounds:c}){const{x:f,y:m}=Ma(s),h=$0({x:f-((c==null?void 0:c.left)??0),y:m-((c==null?void 0:c.top)??0)},o),{x:p,y:v}=r?ud(h,i):h;return{xSnapped:p,ySnapped:v,...h}}const q0=s=>({width:s.offsetWidth,height:s.offsetHeight}),f4=s=>{var i;return((i=s==null?void 0:s.getRootNode)==null?void 0:i.call(s))||(window==null?void 0:window.document)},m4=["INPUT","SELECT","TEXTAREA"];function xT(s){var o,c;const i=((c=(o=s.composedPath)==null?void 0:o.call(s))==null?void 0:c[0])||s.target;return(i==null?void 0:i.nodeType)!==1?!1:m4.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const h4=s=>"clientX"in s,Ma=(s,i)=>{var f,m;const r=h4(s),o=r?s.clientX:(f=s.touches)==null?void 0:f[0].clientX,c=r?s.clientY:(m=s.touches)==null?void 0:m[0].clientY;return{x:o-((i==null?void 0:i.left)??0),y:c-((i==null?void 0:i.top)??0)}},ub=(s,i,r,o,c)=>{const f=i.querySelectorAll(`.${s}`);return!f||!f.length?null:Array.from(f).map(m=>{const h=m.getBoundingClientRect();return{id:m.getAttribute("data-handleid"),type:s,nodeId:c,position:m.getAttribute("data-handlepos"),x:(h.left-r.left)/o,y:(h.top-r.top)/o,...q0(m)}})};function p4({sourceX:s,sourceY:i,targetX:r,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:m,targetControlY:h}){const p=s*.125+c*.375+m*.375+r*.125,v=i*.125+f*.375+h*.375+o*.125,y=Math.abs(p-s),g=Math.abs(v-i);return[p,v,y,g]}function Tc(s,i){return s>=0?.5*s:i*25*Math.sqrt(-s)}function fb({pos:s,x1:i,y1:r,x2:o,y2:c,c:f}){switch(s){case Ie.Left:return[i-Tc(i-o,f),r];case Ie.Right:return[i+Tc(o-i,f),r];case Ie.Top:return[i,r-Tc(r-c,f)];case Ie.Bottom:return[i,r+Tc(c-r,f)]}}function gT({sourceX:s,sourceY:i,sourcePosition:r=Ie.Bottom,targetX:o,targetY:c,targetPosition:f=Ie.Top,curvature:m=.25}){const[h,p]=fb({pos:r,x1:s,y1:i,x2:o,y2:c,c:m}),[v,y]=fb({pos:f,x1:o,y1:c,x2:s,y2:i,c:m}),[g,b,N,j]=p4({sourceX:s,sourceY:i,targetX:o,targetY:c,sourceControlX:h,sourceControlY:p,targetControlX:v,targetControlY:y});return[`M${s},${i} C${h},${p} ${v},${y} ${o},${c}`,g,b,N,j]}function G0({sourceX:s,sourceY:i,targetX:r,targetY:o}){const c=Math.abs(r-s)/2,f=r<s?r+c:r-c,m=Math.abs(o-i)/2,h=o<i?o+m:o-m;return[f,h,c,m]}function yT({sourceNode:s,targetNode:i,selected:r=!1,zIndex:o=0,elevateOnSelect:c=!1,zIndexMode:f="basic"}){if(f==="manual")return o;const m=c&&r?o+1e3:o,h=Math.max(s.parentId||c&&s.selected?s.internals.z:0,i.parentId||c&&i.selected?i.internals.z:0);return m+h}function bT({sourceNode:s,targetNode:i,width:r,height:o,transform:c}){const f=cd(Jc(s),Jc(i));f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);const m={x:-c[0]/c[2],y:-c[1]/c[2],width:r/c[2],height:o/c[2]};return B0(m,dd(f))>0}const x4=({source:s,sourceHandle:i,target:r,targetHandle:o})=>`xy-edge__${s}${i||""}-${r}${o||""}`,g4=(s,i)=>i.some(r=>r.source===s.source&&r.target===s.target&&(r.sourceHandle===s.sourceHandle||!r.sourceHandle&&!s.sourceHandle)&&(r.targetHandle===s.targetHandle||!r.targetHandle&&!s.targetHandle)),vT=(s,i,r={})=>{var f;if(!s.source||!s.target)return(f=r.onError)==null||f.call(r,"006",Zc.error006()),i;const o=r.getEdgeId||x4;let c;return s4(s)?c={...s}:c={...s,id:o(s)},g4(c,i)?i:(c.sourceHandle===null&&delete c.sourceHandle,c.targetHandle===null&&delete c.targetHandle,i.concat(c))};function NT({sourceX:s,sourceY:i,targetX:r,targetY:o}){const[c,f,m,h]=G0({sourceX:s,sourceY:i,targetX:r,targetY:o});return[`M ${s},${i}L ${r},${o}`,c,f,m,h]}const mb={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},y4=({source:s,sourcePosition:i=Ie.Bottom,target:r})=>i===Ie.Left||i===Ie.Right?s.x<r.x?{x:1,y:0}:{x:-1,y:0}:s.y<r.y?{x:0,y:1}:{x:0,y:-1},hb=(s,i)=>Math.sqrt(Math.pow(i.x-s.x,2)+Math.pow(i.y-s.y,2)),b4=(s,i,r)=>s.x===i.x&&i.x===r.x&&(i.y-s.y)*(r.y-i.y)>=0||s.y===i.y&&i.y===r.y&&(i.x-s.x)*(r.x-i.x)>=0;function v4({source:s,sourcePosition:i=Ie.Bottom,target:r,targetPosition:o=Ie.Top,center:c,offset:f,stepPosition:m}){const h=mb[i],p=mb[o],v={x:s.x+h.x*f,y:s.y+h.y*f},y={x:r.x+p.x*f,y:r.y+p.y*f},g=y4({source:v,sourcePosition:i,target:y}),b=g.x!==0?"x":"y",N=g[b];let j=[],T,H;const _={x:0,y:0},K={x:0,y:0},[,,z,D]=G0({sourceX:s.x,sourceY:s.y,targetX:r.x,targetY:r.y});if(h[b]*p[b]===-1){b==="x"?(T=c.x??v.x+(y.x-v.x)*m,H=c.y??(v.y+y.y)/2):(T=c.x??(v.x+y.x)/2,H=c.y??v.y+(y.y-v.y)*m);const C=[{x:T,y:v.y},{x:T,y:y.y}],F=[{x:v.x,y:H},{x:y.x,y:H}];h[b]===N?j=b==="x"?C:F:j=b==="x"?F:C}else{const C=[{x:v.x,y:y.y}],F=[{x:y.x,y:v.y}];if(b==="x"?j=h.x===N?F:C:j=h.y===N?C:F,i===o){const w=Math.abs(s[b]-r[b]);if(w<=f){const R=Math.min(f-1,f-w);h[b]===N?_[b]=(v[b]>s[b]?-1:1)*R:K[b]=(y[b]>r[b]?-1:1)*R}}if(i!==o){const w=b==="x"?"y":"x",R=h[b]===p[w],A=v[w]>y[w],V=v[w]<y[w];(h[b]===1&&(!R&&A||R&&V)||h[b]!==1&&(!R&&V||R&&A))&&(j=b==="x"?C:F)}const G={x:v.x+_.x,y:v.y+_.y},Y={x:y.x+K.x,y:y.y+K.y},I=Math.max(Math.abs(G.x-j[0].x),Math.abs(Y.x-j[0].x)),W=Math.max(Math.abs(G.y-j[0].y),Math.abs(Y.y-j[0].y));I>=W?(T=(G.x+Y.x)/2,H=j[0].y):(T=j[0].x,H=(G.y+Y.y)/2)}const O={x:v.x+_.x,y:v.y+_.y},U={x:y.x+K.x,y:y.y+K.y},q=[];for(const C of[s,O,...j,U,r]){const[F,G]=q.slice(-2);G&&b4(F,G,C)&&q.pop(),q.push(C)}return[q,T,H,z,D]}function N4(s,i,r,o){const c=Math.min(hb(s,i)/2,hb(i,r)/2,o),{x:f,y:m}=i;if(s.x===f&&f===r.x||s.y===m&&m===r.y)return`L${f} ${m}`;if(s.y===m){const v=s.x<r.x?-1:1,y=s.y<r.y?1:-1;return`L ${f+c*v},${m}Q ${f},${m} ${f},${m+c*y}`}const h=s.x<r.x?1:-1,p=s.y<r.y?-1:1;return`L ${f},${m+c*p}Q ${f},${m} ${f+c*h},${m}`}function jT({sourceX:s,sourceY:i,sourcePosition:r=Ie.Bottom,targetX:o,targetY:c,targetPosition:f=Ie.Top,borderRadius:m=5,centerX:h,centerY:p,offset:v=20,stepPosition:y=.5}){const[g,b,N,j,T]=v4({source:{x:s,y:i},sourcePosition:r,target:{x:o,y:c},targetPosition:f,center:{x:h,y:p},offset:v,stepPosition:y});let H=`M${g[0].x} ${g[0].y}`;for(let _=1;_<g.length-1;_++)H+=N4(g[_-1],g[_],g[_+1],m);return H+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[H,b,N,j,T]}function pb(s){var i;return s&&!!(s.internals.handleBounds||(i=s.handles)!=null&&i.length)&&!!(s.measured.width||s.width||s.initialWidth)}function wT(s){var g;const{sourceNode:i,targetNode:r}=s;if(!pb(i)||!pb(r))return null;const o=i.internals.handleBounds||xb(i.handles),c=r.internals.handleBounds||xb(r.handles),f=gb((o==null?void 0:o.source)??[],s.sourceHandle),m=gb(s.connectionMode===Pc.Strict?(c==null?void 0:c.target)??[]:((c==null?void 0:c.target)??[]).concat((c==null?void 0:c.source)??[]),s.targetHandle);if(!f||!m)return(g=s.onError)==null||g.call(s,"008",Zc.error008(f?"target":"source",{id:s.id,sourceHandle:s.sourceHandle,targetHandle:s.targetHandle})),null;const h=(f==null?void 0:f.position)||Ie.Bottom,p=(m==null?void 0:m.position)||Ie.Top,v=bl(i,f,h),y=bl(r,m,p);return{sourceX:v.x,sourceY:v.y,targetX:y.x,targetY:y.y,sourcePosition:h,targetPosition:p}}function xb(s){if(!s)return null;const i=[],r=[];for(const o of s)o.width=o.width??1,o.height=o.height??1,o.type==="source"?i.push(o):o.type==="target"&&r.push(o);return{source:i,target:r}}function bl(s,i,r=Ie.Left,o=!1){const c=((i==null?void 0:i.x)??0)+s.internals.positionAbsolute.x,f=((i==null?void 0:i.y)??0)+s.internals.positionAbsolute.y,{width:m,height:h}=i??Oa(s);if(o)return{x:c+m/2,y:f+h/2};switch((i==null?void 0:i.position)??r){case Ie.Top:return{x:c+m/2,y:f};case Ie.Right:return{x:c+m,y:f+h/2};case Ie.Bottom:return{x:c+m/2,y:f+h};case Ie.Left:return{x:c,y:f+h/2}}}function gb(s,i){return s&&(i?s.find(r=>r.id===i):s[0])||null}function j4(s,i){return s?typeof s=="string"?s:`${i?`${i}__`:""}${Object.keys(s).sort().map(o=>`${o}=${s[o]}`).join("&")}`:""}function _T(s,{id:i,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:c}){const f=new Set;return s.reduce((m,h)=>([h.markerStart||o,h.markerEnd||c].forEach(p=>{if(p&&typeof p=="object"){const v=j4(p,i);f.has(v)||(m.push({id:v,color:p.color||r,...p}),f.add(v))}}),m),[]).sort((m,h)=>m.id.localeCompare(h.id))}const V0=1e3,w4=10,Zm={nodeOrigin:[0,0],nodeExtent:n4,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},_4={...Zm,checkEquality:!0};function Pm(s,i){const r={...s};for(const o in i)i[o]!==void 0&&(r[o]=i[o]);return r}function ST(s,i,r){const o=Pm(Zm,r);for(const c of s.values())if(c.parentId)Wm(c,s,i,o);else{const f=Fr(c,o.nodeOrigin),m=oi(c.extent)?c.extent:o.nodeExtent,h=ri(f,m,Oa(c));c.internals.positionAbsolute=h}}function S4(s,i){if(!s.handles)return s.measured?i==null?void 0:i.internals.handleBounds:void 0;const r=[],o=[];for(const c of s.handles){const f={id:c.id,width:c.width??1,height:c.height??1,nodeId:s.id,x:c.x,y:c.y,position:c.position,type:c.type};c.type==="source"?r.push(f):c.type==="target"&&o.push(f)}return{source:r,target:o}}function Jm(s){return s==="manual"}function kT(s,i,r,o={}){var y,g;const c=Pm(_4,o),f={i:0},m=new Map(i),h=c!=null&&c.elevateNodesOnSelect&&!Jm(c.zIndexMode)?V0:0;let p=s.length>0,v=!1;i.clear(),r.clear();for(const b of s){let N=m.get(b.id);if(c.checkEquality&&b===(N==null?void 0:N.internals.userNode))i.set(b.id,N);else{const j=Fr(b,c.nodeOrigin),T=oi(b.extent)?b.extent:c.nodeExtent,H=ri(j,T,Oa(b));N={...c.defaults,...b,measured:{width:(y=b.measured)==null?void 0:y.width,height:(g=b.measured)==null?void 0:g.height},internals:{positionAbsolute:H,handleBounds:S4(b,N),z:Y0(b,h,c.zIndexMode),userNode:b}},i.set(b.id,N)}(N.measured===void 0||N.measured.width===void 0||N.measured.height===void 0)&&!N.hidden&&(p=!1),b.parentId&&Wm(N,i,r,o,f),v||(v=b.selected??!1)}return{nodesInitialized:p,hasSelectedNodes:v}}function k4(s,i){if(!s.parentId)return;const r=i.get(s.parentId);r?r.set(s.id,s):i.set(s.parentId,new Map([[s.id,s]]))}function Wm(s,i,r,o,c){const{elevateNodesOnSelect:f,nodeOrigin:m,nodeExtent:h,zIndexMode:p}=Pm(Zm,o),v=s.parentId,y=i.get(v);if(!y){console.warn(`Parent node ${v} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}k4(s,r),c&&!y.parentId&&y.internals.rootParentIndex===void 0&&p==="auto"&&(y.internals.rootParentIndex=++c.i,y.internals.z=y.internals.z+c.i*w4),c&&y.internals.rootParentIndex!==void 0&&(c.i=y.internals.rootParentIndex);const g=f&&!Jm(p)?V0:0,{x:b,y:N,z:j}=C4(s,y,m,h,g,p),{positionAbsolute:T}=s.internals,H=b!==T.x||N!==T.y;(H||j!==s.internals.z)&&i.set(s.id,{...s,internals:{...s.internals,positionAbsolute:H?{x:b,y:N}:T,z:j}})}function Y0(s,i,r){const o=Ws(s.zIndex)?s.zIndex:0;return Jm(r)?o:o+(s.selected?i:0)}function C4(s,i,r,o,c,f){const{x:m,y:h}=i.internals.positionAbsolute,p=Oa(s),v=Fr(s,r),y=oi(s.extent)?ri(v,s.extent,p):v;let g=ri({x:m+y.x,y:h+y.y},o,p);s.extent==="parent"&&(g=z0(g,p,i));const b=Y0(s,c,f),N=i.internals.z??0;return{x:g.x,y:g.y,z:N>=b?N+1:b}}function T4(s,i,r,o=[0,0]){var m;const c=[],f=new Map;for(const h of s){const p=i.get(h.parentId);if(!p)continue;const v=((m=f.get(h.parentId))==null?void 0:m.expandedRect)??Xm(p),y=o4(v,h.rect);f.set(h.parentId,{expandedRect:y,parent:p})}return f.size>0&&f.forEach(({expandedRect:h,parent:p},v)=>{var z;const y=p.internals.positionAbsolute,g=Oa(p),b=p.origin??o,N=h.x<y.x?Math.round(Math.abs(y.x-h.x)):0,j=h.y<y.y?Math.round(Math.abs(y.y-h.y)):0,T=Math.max(g.width,Math.round(h.width)),H=Math.max(g.height,Math.round(h.height)),_=(T-g.width)*b[0],K=(H-g.height)*b[1];(N>0||j>0||_||K)&&(c.push({id:v,type:"position",position:{x:p.position.x-N+_,y:p.position.y-j+K}}),(z=r.get(v))==null||z.forEach(D=>{s.some(O=>O.id===D.id)||c.push({id:D.id,type:"position",position:{x:D.position.x+N,y:D.position.y+j}})})),(g.width<h.width||g.height<h.height||N||j)&&c.push({id:v,type:"dimensions",setAttributes:!0,dimensions:{width:T+(N?b[0]*N-_:0),height:H+(j?b[1]*j-K:0)}})}),c}function CT(s,i,r,o,c,f,m){const h=o==null?void 0:o.querySelector(".xyflow__viewport");let p=!1;if(!h)return{changes:[],updatedInternals:p};const v=[],y=window.getComputedStyle(h),{m22:g}=new window.DOMMatrixReadOnly(y.transform),b=[];for(const N of s.values()){const j=i.get(N.id);if(!j)continue;if(j.hidden){i.set(j.id,{...j,internals:{...j.internals,handleBounds:void 0}}),p=!0;continue}const T=q0(N.nodeElement),H=j.measured.width!==T.width||j.measured.height!==T.height;if(!!(T.width&&T.height&&(H||!j.internals.handleBounds||N.force))){const K=N.nodeElement.getBoundingClientRect(),z=oi(j.extent)?j.extent:f;let{positionAbsolute:D}=j.internals;if(j.parentId&&j.extent==="parent"){const U=i.get(j.parentId);U&&(D=z0(D,T,U))}else z&&(D=ri(D,z,T));const O={...j,measured:T,internals:{...j.internals,positionAbsolute:D,handleBounds:{source:ub("source",N.nodeElement,K,g,j.id),target:ub("target",N.nodeElement,K,g,j.id)}}};i.set(j.id,O),j.parentId&&Wm(O,i,r,{nodeOrigin:c,zIndexMode:m}),p=!0,H&&(v.push({id:j.id,type:"dimensions",dimensions:T}),j.expandParent&&j.parentId&&b.push({id:j.id,parentId:j.parentId,rect:Xm(O,c)}))}}if(b.length>0){const N=T4(b,i,r,c);v.push(...N)}return{changes:v,updatedInternals:p}}async function TT({delta:s,panZoom:i,transform:r,translateExtent:o,width:c,height:f}){if(!i||!s.x&&!s.y)return!1;const m=await i.setViewportConstrained({x:r[0]+s.x,y:r[1]+s.y,zoom:r[2]},[[0,0],[c,f]],o);return!!m&&(m.x!==r[0]||m.y!==r[1]||m.k!==r[2])}function yb(s,i,r,o,c,f){let m=c;const h=o.get(m)||new Map;o.set(m,h.set(r,i)),m=`${c}-${s}`;const p=o.get(m)||new Map;if(o.set(m,p.set(r,i)),f){m=`${c}-${s}-${f}`;const v=o.get(m)||new Map;o.set(m,v.set(r,i))}}function ET(s,i,r){s.clear(),i.clear();for(const o of r){const{source:c,target:f,sourceHandle:m=null,targetHandle:h=null}=o,p={edgeId:o.id,source:c,target:f,sourceHandle:m,targetHandle:h},v=`${c}-${m}--${f}-${h}`,y=`${f}-${h}--${c}-${m}`;yb("source",p,y,s,c,m),yb("target",p,v,s,f,h),i.set(o.id,o)}}function F0(s,i){if(!s.parentId)return!1;const r=i.get(s.parentId);return r?r.selected?!0:F0(r,i):!1}function bb(s,i,r){var c;let o=s;do{if((c=o==null?void 0:o.matches)!=null&&c.call(o,i))return!0;if(o===r)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function E4(s,i,r,o,c){const f=new Map;for(const[m,h]of s)if((c?h.id===o:h.selected||h.id===o)&&(c||!h.parentId||!F0(h,s))&&(h.draggable||i&&typeof h.draggable>"u")){const v=s.get(m);v&&f.set(m,{id:m,position:v.position||{x:0,y:0},distance:{x:r.x-v.internals.positionAbsolute.x,y:r.y-v.internals.positionAbsolute.y},extent:v.extent,parentId:v.parentId,origin:v.origin,expandParent:v.expandParent,internals:{positionAbsolute:v.internals.positionAbsolute||{x:0,y:0}},measured:{width:v.measured.width??0,height:v.measured.height??0}})}return f}function am({nodeId:s,dragItems:i,nodeLookup:r,dragging:o=!0}){var m,h,p;const c=[];for(const[v,y]of i){const g=(m=r.get(v))==null?void 0:m.internals.userNode;g&&c.push({...g,position:y.position,dragging:o})}if(!s)return[c[0],c];const f=(h=r.get(s))==null?void 0:h.internals.userNode;return[f?{...f,position:((p=i.get(s))==null?void 0:p.position)||f.position,dragging:o}:c[0],c]}function A4({dragItems:s,snapGrid:i,x:r,y:o}){const c=s.values().next().value;if(!c)return null;const f={x:r-c.distance.x,y:o-c.distance.y},m=ud(f,i);return{x:m.x-f.x,y:m.y-f.y}}function AT({onNodeMouseDown:s,getStoreItems:i,onDragStart:r,onDrag:o,onDragStop:c}){let f={x:null,y:null},m=0,h=new Map,p=!1,v={x:0,y:0},y=null,g=!1,b=null,N=!1,j=!1,T=null;function H({noDragClassName:K,handleSelector:z,domNode:D,isSelectable:O,nodeId:U,nodeClickDistance:q=0}){b=Nn(D);function C({x:I,y:W}){const{nodeLookup:w,nodeExtent:R,snapGrid:A,snapToGrid:V,nodeOrigin:B,onNodeDrag:P,onSelectionDrag:te,onError:le,updateNodePositions:pe}=i();f={x:I,y:W};let ve=!1;const k=h.size>1,M=k&&R?Sm(L0(h)):null,ie=k&&V?A4({dragItems:h,snapGrid:A,x:I,y:W}):null;for(const[ce,me]of h){if(!w.has(ce))continue;let ge={x:I-me.distance.x,y:W-me.distance.y};V&&(ge=ie?{x:Math.round(ge.x+ie.x),y:Math.round(ge.y+ie.y)}:ud(ge,A));let je=null;if(k&&R&&!me.extent&&M){const{positionAbsolute:Ce}=me.internals,dt=Ce.x-M.x+R[0][0],Le=Ce.x+me.measured.width-M.x2+R[1][0],Ke=Ce.y-M.y+R[0][1],Ee=Ce.y+me.measured.height-M.y2+R[1][1];je=[[dt,Ke],[Le,Ee]]}const{position:ue,positionAbsolute:ye}=r4({nodeId:ce,nextPosition:ge,nodeLookup:w,nodeExtent:je||R,nodeOrigin:B,onError:le});ve=ve||me.position.x!==ue.x||me.position.y!==ue.y,me.position=ue,me.internals.positionAbsolute=ye}if(j=j||ve,!!ve&&(pe(h,!0),T&&(o||P||!U&&te))){const[ce,me]=am({nodeId:U,dragItems:h,nodeLookup:w});o==null||o(T,h,ce,me),P==null||P(T,ce,me),U||te==null||te(T,me)}}async function F(){if(!y)return;const{transform:I,panBy:W,autoPanSpeed:w,autoPanOnNodeDrag:R}=i();if(!R){p=!1,cancelAnimationFrame(m);return}const[A,V]=H0(v,y,w);(A!==0||V!==0)&&(f.x=(f.x??0)-A/I[2],f.y=(f.y??0)-V/I[2],await W({x:A,y:V})&&C(f)),m=requestAnimationFrame(F)}function G(I){var M,ie;const{nodeLookup:W,multiSelectionActive:w,nodesDraggable:R,transform:A,snapGrid:V,snapToGrid:B,selectNodesOnDrag:P,onNodeDragStart:te,onSelectionDragStart:le,unselectNodesAndEdges:pe}=i();g=!0;const ve=!!U&&!w&&!((M=W.get(U))!=null&&M.selected);(!P||!O)&&!w&&U&&((ie=W.get(U))!=null&&ie.selected||pe()),O&&P&&U&&(s==null||s(U));const k=Mr(I.sourceEvent,{transform:A,snapGrid:V,snapToGrid:B,containerBounds:y});if(f=k,h=E4(W,R,k,U,ve),h.size>0&&(r||te||!U&&le)){const[ce,me]=am({nodeId:U,dragItems:h,nodeLookup:W});r==null||r(I.sourceEvent,h,ce,me),te==null||te(I.sourceEvent,ce,me),U||le==null||le(I.sourceEvent,me)}}const Y=c0().clickDistance(q).on("start",I=>{const{domNode:W,nodeDragThreshold:w,transform:R,snapGrid:A,snapToGrid:V}=i();y=(W==null?void 0:W.getBoundingClientRect())||null,N=!1,j=!1,T=I.sourceEvent,w===0&&G(I),f=Mr(I.sourceEvent,{transform:R,snapGrid:A,snapToGrid:V,containerBounds:y}),v=Ma(I.sourceEvent,y)}).on("drag",I=>{const{autoPanOnNodeDrag:W,transform:w,snapGrid:R,snapToGrid:A,nodeDragThreshold:V,nodeLookup:B}=i(),P=Mr(I.sourceEvent,{transform:w,snapGrid:R,snapToGrid:A,containerBounds:y});if(T=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||U&&!B.has(U))&&(N=!0),!N){if(!p&&W&&g&&(p=!0,F()),!g){const te=Ma(I.sourceEvent,y),le=te.x-v.x,pe=te.y-v.y;Math.sqrt(le*le+pe*pe)>V&&G(I)}(f.x!==P.xSnapped||f.y!==P.ySnapped)&&h&&g&&(v=Ma(I.sourceEvent,y),C(P))}}).on("end",I=>{if(!g||N){N&&h.size>0&&i().updateNodePositions(h,!1);return}if(p=!1,g=!1,cancelAnimationFrame(m),h.size>0){const{nodeLookup:W,updateNodePositions:w,onNodeDragStop:R,onSelectionDragStop:A}=i();if(j&&(w(h,!1),j=!1),c||R||!U&&A){const[V,B]=am({nodeId:U,dragItems:h,nodeLookup:W,dragging:!1});c==null||c(I.sourceEvent,h,V,B),R==null||R(I.sourceEvent,V,B),U||A==null||A(I.sourceEvent,B)}}}).filter(I=>{const W=I.target;return!I.button&&(!K||!bb(W,`.${K}`,D))&&(!z||bb(W,z,D))});b.call(Y)}function _(){b==null||b.on(".drag",null)}return{update:H,destroy:_}}function M4(s,i,r){const o=[],c={x:s.x-r,y:s.y-r,width:r*2,height:r*2};for(const f of i.values())B0(c,Xm(f))>0&&o.push(f);return o}const R4=250;function D4(s,i,r,o){var h,p;let c=[],f=1/0;const m=M4(s,r,i+R4);for(const v of m){const y=[...((h=v.internals.handleBounds)==null?void 0:h.source)??[],...((p=v.internals.handleBounds)==null?void 0:p.target)??[]];for(const g of y){if(o.nodeId===g.nodeId&&o.type===g.type&&o.id===g.id)continue;const{x:b,y:N}=bl(v,g,g.position,!0),j=Math.sqrt(Math.pow(b-s.x,2)+Math.pow(N-s.y,2));j>i||(j<f?(c=[{...g,x:b,y:N}],f=j):j===f&&c.push({...g,x:b,y:N}))}}if(!c.length)return null;if(c.length>1){const v=o.type==="source"?"target":"source";return c.find(y=>y.type===v)??c[0]}return c[0]}function I0(s,i,r,o,c,f=!1){var v,y,g;const m=o.get(s);if(!m)return null;const h=c==="strict"?(v=m.internals.handleBounds)==null?void 0:v[i]:[...((y=m.internals.handleBounds)==null?void 0:y.source)??[],...((g=m.internals.handleBounds)==null?void 0:g.target)??[]],p=(r?h==null?void 0:h.find(b=>b.id===r):h==null?void 0:h[0])??null;return p&&f?{...p,...bl(m,p,p.position,!0)}:p}function K0(s,i){return s||(i!=null&&i.classList.contains("target")?"target":i!=null&&i.classList.contains("source")?"source":null)}function O4(s,i){let r=null;return i?r=!0:s&&!i&&(r=!1),r}const X0=()=>!0;function L4(s,{connectionMode:i,connectionRadius:r,handleId:o,nodeId:c,edgeUpdaterType:f,isTarget:m,domNode:h,nodeLookup:p,lib:v,autoPanOnConnect:y,flowId:g,panBy:b,cancelConnection:N,onConnectStart:j,onConnect:T,onConnectEnd:H,isValidConnection:_=X0,onReconnectEnd:K,updateConnection:z,getTransform:D,getFromHandle:O,autoPanSpeed:U,dragThreshold:q=1,handleDomNode:C}){const F=f4(s.target);let G=0,Y;const{x:I,y:W}=Ma(s),w=K0(f,C),R=h==null?void 0:h.getBoundingClientRect();let A=!1;if(!R||!w)return;const V=I0(c,w,o,p,i);if(!V)return;let B=Ma(s,R),P=!1,te=null,le=!1,pe=null;function ve(){if(!y||!R)return;const[ue,ye]=H0(B,R,U);b({x:ue,y:ye}),G=requestAnimationFrame(ve)}const k={...V,nodeId:c,type:w,position:V.position},M=p.get(c);let ce={inProgress:!0,isValid:null,from:bl(M,k,Ie.Left,!0),fromHandle:k,fromPosition:k.position,fromNode:M,to:B,toHandle:null,toPosition:cb[k.position],toNode:null,pointer:B};function me(){A=!0,z(ce),j==null||j(s,{nodeId:c,handleId:o,handleType:w})}q===0&&me();function ge(ue){if(!A){const{x:Ee,y:de}=Ma(ue),Me=Ee-I,at=de-W;if(!(Me*Me+at*at>q*q))return;me()}if(!O()||!k){je(ue);return}const ye=D();B=Ma(ue,R),Y=D4($0(B,ye,!1,[1,1]),r,p,k),P||(ve(),P=!0);const Ce=Q0(ue,{handle:Y,connectionMode:i,fromNodeId:c,fromHandleId:o,fromType:m?"target":"source",isValidConnection:_,doc:F,lib:v,flowId:g,nodeLookup:p});pe=Ce.handleDomNode,te=Ce.connection,le=O4(!!Y,Ce.isValid);const dt=p.get(c),Le=dt?bl(dt,k,Ie.Left,!0):ce.from,Ke={...ce,from:Le,isValid:le,to:Ce.toHandle&&le?km({x:Ce.toHandle.x,y:Ce.toHandle.y},ye):B,toHandle:Ce.toHandle,toPosition:le&&Ce.toHandle?Ce.toHandle.position:cb[k.position],toNode:Ce.toHandle?p.get(Ce.toHandle.nodeId):null,pointer:B};z(Ke),ce=Ke}function je(ue){if(!("touches"in ue&&ue.touches.length>0)){if(A){(Y||pe)&&te&&le&&(T==null||T(te));const{inProgress:ye,...Ce}=ce,dt={...Ce,toPosition:ce.toHandle?ce.toPosition:null};H==null||H(ue,dt),f&&(K==null||K(ue,dt))}N(),cancelAnimationFrame(G),P=!1,le=!1,te=null,pe=null,F.removeEventListener("mousemove",ge),F.removeEventListener("mouseup",je),F.removeEventListener("touchmove",ge),F.removeEventListener("touchend",je)}}F.addEventListener("mousemove",ge),F.addEventListener("mouseup",je),F.addEventListener("touchmove",ge),F.addEventListener("touchend",je)}function Q0(s,{handle:i,connectionMode:r,fromNodeId:o,fromHandleId:c,fromType:f,doc:m,lib:h,flowId:p,isValidConnection:v=X0,nodeLookup:y}){const g=f==="target",b=i?m.querySelector(`.${h}-flow__handle[data-id="${p}-${i==null?void 0:i.nodeId}-${i==null?void 0:i.id}-${i==null?void 0:i.type}"]`):null,{x:N,y:j}=Ma(s),T=m.elementFromPoint(N,j),H=T!=null&&T.classList.contains(`${h}-flow__handle`)?T:b,_={handleDomNode:H,isValid:!1,connection:null,toHandle:null};if(H){const K=K0(void 0,H),z=H.getAttribute("data-nodeid"),D=H.getAttribute("data-handleid"),O=H.classList.contains("connectable"),U=H.classList.contains("connectableend");if(!z||!K)return _;const q={source:g?z:o,sourceHandle:g?D:c,target:g?o:z,targetHandle:g?c:D};_.connection=q;const F=O&&U&&(r===Pc.Strict?g&&K==="source"||!g&&K==="target":z!==o||D!==c);_.isValid=F&&v(q),_.toHandle=I0(z,K,D,y,r,!0)}return _}const MT={onPointerDown:L4,isValid:Q0};function RT({domNode:s,panZoom:i,getTransform:r,getViewScale:o}){const c=Nn(s);function f({translateExtent:h,width:p,height:v,zoomStep:y=1,pannable:g=!0,zoomable:b=!0,inversePan:N=!1}){const j=z=>{if(z.sourceEvent.type!=="wheel"||!i)return;const D=r(),O=z.sourceEvent.ctrlKey&&Qm()?10:1,U=-z.sourceEvent.deltaY*(z.sourceEvent.deltaMode===1?.05:z.sourceEvent.deltaMode?1:.002)*y,q=D[2]*Math.pow(2,U*O);i.scaleTo(q)};let T=[0,0];const H=z=>{(z.sourceEvent.type==="mousedown"||z.sourceEvent.type==="touchstart")&&(T=[z.sourceEvent.clientX??z.sourceEvent.touches[0].clientX,z.sourceEvent.clientY??z.sourceEvent.touches[0].clientY])},_=z=>{const D=r();if(z.sourceEvent.type!=="mousemove"&&z.sourceEvent.type!=="touchmove"||!i)return;const O=[z.sourceEvent.clientX??z.sourceEvent.touches[0].clientX,z.sourceEvent.clientY??z.sourceEvent.touches[0].clientY],U=[O[0]-T[0],O[1]-T[1]];T=O;const q=o()*Math.max(D[2],Math.log(D[2]))*(N?-1:1),C={x:D[0]-U[0]*q,y:D[1]-U[1]*q},F=[[0,0],[p,v]];i.setViewportConstrained({x:C.x,y:C.y,zoom:D[2]},F,h)},K=O0().on("start",H).on("zoom",g?_:null).on("zoom.wheel",b?j:null);c.call(K,{})}function m(){c.on("zoom",null)}return{update:f,destroy:m,pointer:Kn}}const fd=s=>({x:s.x,y:s.y,zoom:s.k}),sm=({x:s,y:i,zoom:r})=>od.translate(s,i).scale(r),ps=(s,i)=>s.target.closest(`.${i}`),Z0=(s,i)=>i===2&&Array.isArray(s)&&s.includes(2),z4=s=>((s*=2)<=1?s*s*s:(s-=2)*s*s+2)/2,im=(s,i=0,r=z4,o=()=>{})=>{const c=typeof i=="number"&&i>0;return c||o(),c?s.transition().duration(i).ease(r).on("end",o):s},P0=s=>{const i=s.ctrlKey&&Qm()?10:1;return-s.deltaY*(s.deltaMode===1?.05:s.deltaMode?1:.002)*i};function H4({zoomPanValues:s,noWheelClassName:i,d3Selection:r,d3Zoom:o,panOnScrollMode:c,panOnScrollSpeed:f,zoomOnPinch:m,onPanZoomStart:h,onPanZoom:p,onPanZoomEnd:v}){return y=>{if(ps(y,i))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const g=r.property("__zoom").k||1;if(y.ctrlKey&&m){const H=Kn(y),_=P0(y),K=g*Math.pow(2,_);o.scaleTo(r,K,H,y);return}const b=y.deltaMode===1?20:1;let N=c===Ar.Vertical?0:y.deltaX*b,j=c===Ar.Horizontal?0:y.deltaY*b;!Qm()&&y.shiftKey&&c!==Ar.Vertical&&(N=y.deltaY*b,j=0),o.translateBy(r,-(N/g)*f,-(j/g)*f,{internal:!0});const T=fd(r.property("__zoom"));clearTimeout(s.panScrollTimeout),s.isPanScrolling?p==null||p(y,T):(s.isPanScrolling=!0,h==null||h(y,T)),s.panScrollTimeout=setTimeout(()=>{v==null||v(y,T),s.isPanScrolling=!1},150)}}function U4({noWheelClassName:s,preventScrolling:i,d3ZoomHandler:r}){return function(o,c){const f=o.type==="wheel",m=!i&&f&&!o.ctrlKey,h=ps(o,s);if(o.ctrlKey&&f&&h&&o.preventDefault(),m||h)return null;o.preventDefault(),r.call(this,o,c)}}function B4({zoomPanValues:s,onDraggingChange:i,onPanZoomStart:r}){return o=>{var f,m,h;if((f=o.sourceEvent)!=null&&f.internal)return;const c=fd(o.transform);s.mouseButton=((m=o.sourceEvent)==null?void 0:m.button)||0,s.isZoomingOrPanning=!0,s.prevViewport=c,((h=o.sourceEvent)==null?void 0:h.type)==="mousedown"&&i(!0),r&&(r==null||r(o.sourceEvent,c))}}function $4({zoomPanValues:s,panOnDrag:i,onPaneContextMenu:r,onTransformChange:o,onPanZoom:c}){return f=>{var m,h;s.usedRightMouseButton=!!(r&&Z0(i,s.mouseButton??0)),(m=f.sourceEvent)!=null&&m.sync||o([f.transform.x,f.transform.y,f.transform.k]),c&&!((h=f.sourceEvent)!=null&&h.internal)&&(c==null||c(f.sourceEvent,fd(f.transform)))}}function q4({zoomPanValues:s,panOnDrag:i,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:c,onPaneContextMenu:f}){return m=>{var h;if(!((h=m.sourceEvent)!=null&&h.internal)&&(s.isZoomingOrPanning=!1,f&&Z0(i,s.mouseButton??0)&&!s.usedRightMouseButton&&m.sourceEvent&&f(m.sourceEvent),s.usedRightMouseButton=!1,o(!1),c)){const p=fd(m.transform);s.prevViewport=p,clearTimeout(s.timerId),s.timerId=setTimeout(()=>{c==null||c(m.sourceEvent,p)},r?150:0)}}}function G4({panActivationKeyPressed:s,zoomActivationKeyPressed:i,zoomOnScroll:r,zoomOnPinch:o,panOnDrag:c,panOnScroll:f,zoomOnDoubleClick:m,userSelectionActive:h,noWheelClassName:p,noPanClassName:v,lib:y,connectionInProgress:g}){return b=>{var _;const N=i||r,j=o&&b.ctrlKey,T=b.type==="wheel";if(b.button===1&&b.type==="mousedown"&&(ps(b,`${y}-flow__node`)||ps(b,`${y}-flow__edge`)||ps(b,`${y}-flow__selection`)||ps(b,`${y}-flow__nodesselection`)))return!0;if(!c&&!N&&!f&&!m&&!o||h||g&&!T||ps(b,p)&&T||ps(b,v)&&(!T||f&&T&&!i)||!o&&b.ctrlKey&&T)return!1;if(!o&&b.type==="touchstart"&&((_=b.touches)==null?void 0:_.length)>1)return b.preventDefault(),!1;if(!N&&!f&&!j&&T||!c&&(b.type==="mousedown"||b.type==="touchstart")||Array.isArray(c)&&!c.includes(b.button)&&b.type==="mousedown")return!1;const H=Array.isArray(c)&&c.includes(b.button)||!b.button||b.button<=1;return(!b.ctrlKey||T||s)&&H}}function DT({domNode:s,minZoom:i,maxZoom:r,translateExtent:o,viewport:c,onPanZoom:f,onPanZoomStart:m,onPanZoomEnd:h,onDraggingChange:p}){const v={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=s.getBoundingClientRect();let g=[[0,0],[y.width,y.height]];const b=typeof ResizeObserver<"u"?new ResizeObserver(W=>{const w=W[0];w!=null&&w.contentRect&&(g=[[0,0],[w.contentRect.width,w.contentRect.height]])}):null;b==null||b.observe(s);const N=O0().extent(()=>g).scaleExtent([i,r]).translateExtent(o),j=Nn(s).call(N);D({x:c.x,y:c.y,zoom:yl(c.zoom,i,r)},[[0,0],[y.width,y.height]],o);const T=j.on("wheel.zoom"),H=j.on("dblclick.zoom");N.wheelDelta(P0);async function _(W,w){return j?new Promise(R=>{N==null||N.interpolate((w==null?void 0:w.interpolate)==="linear"?Er:Dc).transform(im(j,w==null?void 0:w.duration,w==null?void 0:w.ease,()=>R(!0)),W)}):!1}function K({noWheelClassName:W,noPanClassName:w,onPaneContextMenu:R,userSelectionActive:A,panOnScroll:V,panOnDrag:B,panOnScrollMode:P,panOnScrollSpeed:te,preventScrolling:le,zoomOnPinch:pe,zoomOnScroll:ve,zoomOnDoubleClick:k,panActivationKeyPressed:M=!1,zoomActivationKeyPressed:ie,lib:ce,onTransformChange:me,connectionInProgress:ge,paneClickDistance:je,selectionOnDrag:ue}){A&&!v.isZoomingOrPanning&&N.on("zoom",null);const ye=V&&!ie&&!A;N.clickDistance(ue?1/0:!Ws(je)||je<0?0:je);const Ce=ye?H4({zoomPanValues:v,noWheelClassName:W,d3Selection:j,d3Zoom:N,panOnScrollMode:P,panOnScrollSpeed:te,zoomOnPinch:pe,onPanZoomStart:m,onPanZoom:f,onPanZoomEnd:h}):U4({noWheelClassName:W,preventScrolling:le,d3ZoomHandler:T});j.on("wheel.zoom",Ce,{passive:!1});const dt=B4({zoomPanValues:v,onDraggingChange:p,onPanZoomStart:m});N.on("start",dt);const Le=$4({zoomPanValues:v,panOnDrag:B,onPaneContextMenu:!!R,onPanZoom:f,onTransformChange:me});N.on("zoom",Le);const Ke=q4({zoomPanValues:v,panOnDrag:B,panOnScroll:V,onPaneContextMenu:R,onPanZoomEnd:h,onDraggingChange:p});N.on("end",Ke);const Ee=G4({panActivationKeyPressed:M,zoomActivationKeyPressed:ie,panOnDrag:B,zoomOnScroll:ve,panOnScroll:V,zoomOnDoubleClick:k,zoomOnPinch:pe,userSelectionActive:A,noPanClassName:w,noWheelClassName:W,lib:ce,connectionInProgress:ge});N.filter(Ee),k?j.on("dblclick.zoom",H):j.on("dblclick.zoom",null)}function z(){N.on("zoom",null),b==null||b.disconnect()}async function D(W,w,R){const A=sm(W),V=N==null?void 0:N.constrain()(A,w,R);return V&&await _(V),V}async function O(W,w){const R=sm(W);return await _(R,w),R}function U(W){if(j){const w=sm(W),R=j.property("__zoom");(R.k!==W.zoom||R.x!==W.x||R.y!==W.y)&&(N==null||N.transform(j,w,null,{sync:!0}))}}function q(){const W=j?D0(j.node()):{x:0,y:0,k:1};return{x:W.x,y:W.y,zoom:W.k}}async function C(W,w){return j?new Promise(R=>{N==null||N.interpolate((w==null?void 0:w.interpolate)==="linear"?Er:Dc).scaleTo(im(j,w==null?void 0:w.duration,w==null?void 0:w.ease,()=>R(!0)),W)}):!1}async function F(W,w){return j?new Promise(R=>{N==null||N.interpolate((w==null?void 0:w.interpolate)==="linear"?Er:Dc).scaleBy(im(j,w==null?void 0:w.duration,w==null?void 0:w.ease,()=>R(!0)),W)}):!1}function G(W){N==null||N.scaleExtent(W)}function Y(W){N==null||N.translateExtent(W)}function I(W){const w=!Ws(W)||W<0?0:W;N==null||N.clickDistance(w)}return{update:K,destroy:z,setViewport:O,setViewportConstrained:D,getViewport:q,scaleTo:C,scaleBy:F,setScaleExtent:G,setTranslateExtent:Y,syncViewport:U,setClickDistance:I}}var vb;(function(s){s.Line="line",s.Handle="handle"})(vb||(vb={}));function V4({width:s,prevWidth:i,height:r,prevHeight:o,affectsX:c,affectsY:f}){const m=s-i,h=r-o,p=[m>0?1:m<0?-1:0,h>0?1:h<0?-1:0];return m&&c&&(p[0]=p[0]*-1),h&&f&&(p[1]=p[1]*-1),p}function Nb(s){const i=s.includes("right")||s.includes("left"),r=s.includes("bottom")||s.includes("top"),o=s.includes("left"),c=s.includes("top");return{isHorizontal:i,isVertical:r,affectsX:o,affectsY:c}}function ms(s,i){return Math.max(0,i-s)}function hs(s,i){return Math.max(0,s-i)}function Ec(s,i,r){return Math.max(0,i-s,s-r)}function jb(s,i){return s?!i:i}function Y4(s,i,r,o,c,f,m,h){let{affectsX:p,affectsY:v}=i;const{isHorizontal:y,isVertical:g}=i,b=y&&g,{xSnapped:N,ySnapped:j}=r,{minWidth:T,maxWidth:H,minHeight:_,maxHeight:K}=o,{x:z,y:D,width:O,height:U,aspectRatio:q}=s;let C=Math.floor(y?N-s.pointerX:0),F=Math.floor(g?j-s.pointerY:0);const G=O+(p?-C:C),Y=U+(v?-F:F),I=-f[0]*O,W=-f[1]*U;let w=Ec(G,T,H),R=Ec(Y,_,K);if(m){let B=0,P=0;p&&C<0?B=ms(z+C+I,m[0][0]):!p&&C>0&&(B=hs(z+G+I,m[1][0])),v&&F<0?P=ms(D+F+W,m[0][1]):!v&&F>0&&(P=hs(D+Y+W,m[1][1])),w=Math.max(w,B),R=Math.max(R,P)}if(h){let B=0,P=0;p&&C>0?B=hs(z+C,h[0][0]):!p&&C<0&&(B=ms(z+G,h[1][0])),v&&F>0?P=hs(D+F,h[0][1]):!v&&F<0&&(P=ms(D+Y,h[1][1])),w=Math.max(w,B),R=Math.max(R,P)}if(c){if(y){const B=Ec(G/q,_,K)*q;if(w=Math.max(w,B),m){let P=0;!p&&!v||p&&!v&&b?P=hs(D+W+G/q,m[1][1])*q:P=ms(D+W+(p?C:-C)/q,m[0][1])*q,w=Math.max(w,P)}if(h){let P=0;!p&&!v||p&&!v&&b?P=ms(D+G/q,h[1][1])*q:P=hs(D+(p?C:-C)/q,h[0][1])*q,w=Math.max(w,P)}}if(g){const B=Ec(Y*q,T,H)/q;if(R=Math.max(R,B),m){let P=0;!p&&!v||v&&!p&&b?P=hs(z+Y*q+I,m[1][0])/q:P=ms(z+(v?F:-F)*q+I,m[0][0])/q,R=Math.max(R,P)}if(h){let P=0;!p&&!v||v&&!p&&b?P=ms(z+Y*q,h[1][0])/q:P=hs(z+(v?F:-F)*q,h[0][0])/q,R=Math.max(R,P)}}}F=F+(F<0?R:-R),C=C+(C<0?w:-w),c&&(b?G>Y*q?F=(jb(p,v)?-C:C)/q:C=(jb(p,v)?-F:F)*q:y?(F=C/q,v=p):(C=F*q,p=v));const A=p?z+C:z,V=v?D+F:D;return{width:O+(p?-C:C),height:U+(v?-F:F),x:f[0]*C*(p?-1:1)+A,y:f[1]*F*(v?-1:1)+V}}const J0={width:0,height:0,x:0,y:0},F4={...J0,pointerX:0,pointerY:0,aspectRatio:1};function I4(s,i,r){const o=i.position.x+s.position.x,c=i.position.y+s.position.y,f=s.measured.width??0,m=s.measured.height??0,h=r[0]*f,p=r[1]*m;return[[o-h,c-p],[o+f-h,c+m-p]]}function OT({domNode:s,nodeId:i,getStoreItems:r,onChange:o,onEnd:c}){const f=Nn(s);let m={controlDirection:Nb("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:v,boundaries:y,keepAspectRatio:g,resizeDirection:b,onResizeStart:N,onResize:j,onResizeEnd:T,shouldResize:H}){let _={...J0},K={...F4};m={boundaries:y,resizeDirection:b,keepAspectRatio:g,controlDirection:Nb(v)};let z,D=null,O=[],U,q,C;const F=c0().on("start",G=>{const{nodeLookup:Y,transform:I,snapGrid:W,snapToGrid:w,nodeOrigin:R,paneDomNode:A}=r();if(z=Y.get(i),!z)return;D=(A==null?void 0:A.getBoundingClientRect())??null;const{xSnapped:V,ySnapped:B}=Mr(G.sourceEvent,{transform:I,snapGrid:W,snapToGrid:w,containerBounds:D});_={width:z.measured.width??0,height:z.measured.height??0,x:z.position.x??0,y:z.position.y??0},K={..._,pointerX:V,pointerY:B,aspectRatio:_.width/_.height},U=void 0,q=oi(z.extent)?z.extent:void 0,z.parentId&&(z.extent==="parent"||z.expandParent)&&(U=Y.get(z.parentId)),U&&z.extent==="parent"&&(q=[[0,0],[U.measured.width,U.measured.height]]),O=[],C=void 0;for(const[P,te]of Y)if(te.parentId===i&&(O.push({id:P,position:{...te.position},extent:te.extent}),te.extent==="parent"||te.expandParent)){const le=I4(te,z,te.origin??R);C?C=[[Math.min(le[0][0],C[0][0]),Math.min(le[0][1],C[0][1])],[Math.max(le[1][0],C[1][0]),Math.max(le[1][1],C[1][1])]]:C=le}N==null||N(G,{..._})}).on("drag",G=>{const{transform:Y,snapGrid:I,snapToGrid:W,nodeOrigin:w}=r(),R=Mr(G.sourceEvent,{transform:Y,snapGrid:I,snapToGrid:W,containerBounds:D}),A=[];if(!z)return;const{x:V,y:B,width:P,height:te}=_,le={},pe=z.origin??w,{width:ve,height:k,x:M,y:ie}=Y4(K,m.controlDirection,R,m.boundaries,m.keepAspectRatio,pe,q,C),ce=ve!==P,me=k!==te,ge=M!==V&&ce,je=ie!==B&&me;if(!ge&&!je&&!ce&&!me)return;const ue={prevValues:{..._},startX:K.x,startY:K.y,childNodes:O.map(Le=>({...Le,position:{...Le.position}}))};if((ge||je||pe[0]===1||pe[1]===1)&&(le.x=ge?M:_.x,le.y=je?ie:_.y,_.x=le.x,_.y=le.y,O.length>0)){const Le=M-V,Ke=ie-B;for(const Ee of O)Ee.position={x:Ee.position.x-Le+pe[0]*(ve-P),y:Ee.position.y-Ke+pe[1]*(k-te)},A.push(Ee)}if((ce||me)&&(le.width=ce&&(!m.resizeDirection||m.resizeDirection==="horizontal")?ve:_.width,le.height=me&&(!m.resizeDirection||m.resizeDirection==="vertical")?k:_.height,_.width=le.width,_.height=le.height),U&&z.expandParent){const Le=pe[0]*(le.width??0);le.x&&le.x<Le&&(_.x=Le,K.x=K.x-(le.x-Le));const Ke=pe[1]*(le.height??0);le.y&&le.y<Ke&&(_.y=Ke,K.y=K.y-(le.y-Ke))}const ye=V4({width:_.width,prevWidth:P,height:_.height,prevHeight:te,affectsX:m.controlDirection.affectsX,affectsY:m.controlDirection.affectsY}),Ce={..._,direction:ye};if((H==null?void 0:H(G,Ce))===!1){_=ue.prevValues,K.x=ue.startX,K.y=ue.startY,O.forEach((Le,Ke)=>{Le.position=ue.childNodes[Ke].position});return}j==null||j(G,Ce),o(le,A)}).on("end",G=>{T==null||T(G,{..._}),c==null||c({..._})});f.call(F)}function p(){f.on(".drag",null)}return{update:h,destroy:p}}function lm(s){return s.replace(/[İIı]/g,"i").replace(/[Şş]/g,"s").replace(/[Ğğ]/g,"g").replace(/[Üü]/g,"u").replace(/[Öö]/g,"o").replace(/[Çç]/g,"c").toLowerCase()}function K4(s,i,r){const o=lm(r.searchQuery.trim());let c=s.filter(p=>{if(r.languageFilter!=="ALL"&&p.language!==r.languageFilter||r.supportFilter!=="ALL"&&p.support_level!==r.supportFilter||r.cyclesOnly&&!p.in_cycle||r.hubsOnly&&!p.is_hub||r.orphansOnly&&!p.is_orphan)return!1;if(o){const v=lm(p.id).includes(o),y=p.symbols.some(g=>lm(g.name).includes(o));if(!v&&!y)return!1}return!0});const f=new Set;if(r.selectedFileId)for(const p of i)p.source===r.selectedFileId?f.add(p.target):p.target===r.selectedFileId&&f.add(p.source);if(r.focusSelectedNeighborhood&&r.selectedFileId){const p=new Set([r.selectedFileId,...f]);c=c.filter(v=>p.has(v.id))}const m=new Set(c.map(p=>p.id)),h=i.filter(p=>m.has(p.source)&&m.has(p.target));return{filteredFiles:c,filteredEdges:h,neighborIds:f}}function X4(s,i,r){var g,b;const o=new Map,c=new Map;for(const N of s){const T=`dir:${N.directory||"(root)"}`;c.set(N.id,T);const H=o.get(T)??[];H.push(N),o.set(T,H)}const f=[],m=new Map;let h=null;for(const[N,j]of Array.from(o.entries()).sort((T,H)=>T[0].localeCompare(H[0]))){const T=N.slice(4),H=j.reduce((U,q)=>U+q.lines_code,0),_=j.reduce((U,q)=>U+q.lines_total,0),K=j.reduce((U,q)=>U+q.size_bytes,0),z=j.some(U=>U.in_cycle),D=j.some(U=>U.is_hub),O=j.find(U=>U.id===r)??[...j].sort((U,q)=>q.fan_in+q.fan_out-(U.fan_in+U.fan_out))[0];m.set(N,O.id),f.push({id:N,name:`${T} (${j.length} files)`,directory:"Directory Package",extension:"",language:O.language,support_level:j.every(U=>U.support_level==="full_ast")?"full_ast":j.every(U=>U.support_level==="unsupported")?"unsupported":"partial_static",size_bytes:K,lines_total:_,lines_code:H,lines_comment:0,lines_blank:0,imports_internal:[],imported_by:[],imports_external:[],unresolved_imports:[],symbols:[],fan_in:0,fan_out:0,instability:0,in_cycle:z,cycle_ids:z?["CLUSTER-CYCLE"]:[],is_orphan:!1,is_hub:D,git_commits:j.reduce((U,q)=>U+q.git_commits,0),git_last_author:O.git_last_author,git_last_modified:O.git_last_modified,secret_warnings:[]})}const p=new Map,v=new Map,y=new Map;for(const N of i){const j=c.get(N.source),T=c.get(N.target);if(!j||!T||j===T)continue;const H=`${j}->${T}`;v.has(j)||v.set(j,new Set),y.has(T)||y.set(T,new Set),v.get(j).add(T),y.get(T).add(j);const _=p.get(H);_?N.in_cycle&&(_.in_cycle=!0):p.set(H,{id:H,source:j,target:T,import_names:[...N.import_names.slice(0,3)],line:N.line,in_cycle:N.in_cycle})}for(const N of f){const j=((g=y.get(N.id))==null?void 0:g.size)??0,T=((b=v.get(N.id))==null?void 0:b.size)??0;N.fan_in=j,N.fan_out=T,N.instability=j+T>0?Number((T/(j+T)).toFixed(3)):0}return{clusterFiles:f,clusterEdges:Array.from(p.values()),clusterRepMap:m,activeClusterId:h}}function Q4(s,i,r,o="balanced",c="files"){let f=s,m=i,h=new Map;const p=new Map;if(c==="directories"){const y=X4(s,i,null);f=y.clusterFiles,m=y.clusterEdges,h=y.clusterRepMap;for(const g of s){const b=g.directory||"(root)";p.set(g.id,`dir:${b}`)}}const v=Z4(f,m,r,o);return{targetFiles:f,targetEdges:m,positions:v,clusterRepMap:h,fileToClusterMap:p}}function LT(s,i,r,o,c="balanced",f="files"){const m=Q4(i,r,o,c,f);if(!s||s.positions.size===0)return m;const h=new Map,p=new Set,v=(g,b)=>`${Math.round(g/140)}:${Math.round(b/80)}`;for(const g of m.targetFiles){const b=s.positions.get(g.id);b&&(h.set(g.id,{x:b.x,y:b.y}),p.add(v(b.x,b.y)))}const y=new Map;for(const g of m.targetEdges){const b=y.get(g.source)??[];b.push(g.target),y.set(g.source,b);const N=y.get(g.target)??[];N.push(g.source),y.set(g.target,N)}for(const g of m.targetFiles){if(h.has(g.id))continue;const b=y.get(g.id)??[],N=[];for(const _ of b){const K=h.get(_);K&&N.push(K)}let j,T;if(N.length>0)j=Math.round(N.reduce((_,K)=>_+K.x,0)/N.length+280),T=Math.round(N.reduce((_,K)=>_+K.y,0)/N.length+40);else{const _=m.positions.get(g.id)??{x:0,y:0};j=_.x,T=_.y}let H=0;for(;p.has(v(j,T))&&H<24;)H+=1,T+=135,H%4===0&&(j+=300,T-=540);h.set(g.id,{x:j,y:T}),p.add(v(j,T))}return{...m,positions:h}}function zT(s,i,r,o,c="balanced",f="files",m,h){const{targetFiles:p,positions:v,clusterRepMap:y,fileToClusterMap:g}=s,b=s.targetEdges.length,N=f==="directories"?i?g.get(i)??null:null:i;let j=s.targetEdges,T=!1;c==="compact"&&p.length>40&&(j=j.filter(z=>z.in_cycle||z.source===N||z.target===N),T=j.length<b);const H=p.map(z=>{const D=v.get(z.id)??{x:0,y:0},O=f==="directories";return{id:z.id,type:"moduleNode",width:256,height:100,selected:z.id===N,ariaLabel:`${z.name}, ${z.language}, ${z.support_level}${z.in_cycle?", cycle participant":""}`,style:{opacity:N&&z.id!==N&&!r.has(z.id)&&!z.in_cycle&&f==="files"?.92:1},position:D,data:{file:z,isSelected:z.id===N,isNeighbor:r.has(z.id),highlightCycles:o,isPackageCluster:O,representativeFileId:y.get(z.id),isLiveChanged:!!(m&&m.has(z.id))}}}),_=c!=="compact"&&j.length<=80,K=j.map(z=>{const D=z.in_cycle&&o,O=!!(h&&h.has(`${z.source}->${z.target}`)),U=N!==null&&(z.source===N||z.target===N),q=D?"var(--danger)":O?"var(--success)":U?"var(--brand-accent)":"var(--edge-color)";return{id:z.id,source:z.source,target:z.target,animated:!1,label:_&&U&&z.import_names.length>0?z.import_names.slice(0,2).join(", "):void 0,labelStyle:{fontSize:10,fill:"var(--text-secondary)",fontWeight:500},labelBgStyle:{fill:"var(--bg-panel)",rx:4,ry:4},style:{stroke:q,strokeWidth:D?2.5:O?2.4:U?2.2:1.4,opacity:N&&!U&&!D&&!O?.35:.92},markerEnd:{type:_m.ArrowClosed,color:q,width:16,height:16}}});return{nodes:H,edges:K,clusterRepMap:y,totalAvailableEdges:b,edgesTruncatedInCompact:T}}function Z4(s,i,r,o="balanced"){const c=new Map,f=s.length;if(f===0)return c;const m=o==="compact"?.82:o==="spacious"?1.24:1;if(r==="radial"){const H=Math.round(Math.max(240,f*38)*m);return s.forEach((_,K)=>{const z=2*Math.PI*K/f-Math.PI/2;c.set(_.id,{x:Math.round(H*Math.cos(z)),y:Math.round(H*Math.sin(z))})}),c}if(r==="cluster"){const H=new Map;for(const q of s){const C=q.directory||"(root)",F=H.get(C)??[];F.push(q),H.set(C,F)}const _=Array.from(H.entries()).sort((q,C)=>q[0].localeCompare(C[0])),K=Math.max(1,Math.ceil(Math.sqrt(_.length))),z=Math.round(680*m),D=Math.max(440,Math.ceil(Math.max(..._.map(([,q])=>q.length))/2)*145+80)*m,O=Math.max(280,Math.round(300*m)),U=Math.round(145*m);return _.forEach(([,q],C)=>{const F=C%K*z,G=Math.floor(C/K)*D;q.forEach((Y,I)=>{const W=I%2,w=Math.floor(I/2);c.set(Y.id,{x:F+W*O,y:G+w*U})})}),c}const h=new Map,p=new Map;for(const H of s)h.set(H.id,0),p.set(H.id,[]);for(const H of i)p.has(H.source)&&h.has(H.target)&&(p.get(H.source).push(H.target),h.set(H.target,(h.get(H.target)??0)+1));const v=new Map,y=[...s].sort((H,_)=>H.fan_in===0&&_.fan_in>0?-1:_.fan_in===0&&H.fan_in>0?1:_.instability-H.instability||H.id.localeCompare(_.id));for(const H of y){let _;H.fan_in===0&&H.fan_out>0?_=0:H.instability>=.65?_=1:H.instability>=.35?_=2:H.fan_in>0&&H.fan_out===0?_=3:_=4,v.set(H.id,_)}const g=new Map;for(const H of s){const _=v.get(H.id)??2,K=g.get(_)??[];K.push(H),g.set(_,K)}const b=o==="compact"?6:5,N=Math.max(280,Math.round(300*m)),j=Math.max(120,Math.round(125*m));let T=0;for(const H of[0,1,2,3,4]){const _=g.get(H);if(!_||_.length===0)continue;_.sort((z,D)=>z.id.localeCompare(D.id));const K=Math.ceil(_.length/b);_.forEach((z,D)=>{const O=Math.floor(D/b),U=D%b,F=-((Math.min(b,_.length-O*b)-1)*N)/2+U*N;c.set(z.id,{x:Math.round(F),y:T+O*j})}),T+=K*j+24}return c}const P4=E.lazy(()=>Mb(()=>import("./DependencyGraph-km_Qo-nG.js"),[]).then(s=>({default:s.DependencyGraph}))),J4=E.lazy(()=>Mb(()=>import("./HealthReportView-WVL39aNO.js"),[]).then(s=>({default:s.HealthReportView}))),W4=()=>{var ma,eo;const{t:s,i18n:i}=ft(),[r,o]=E.useState(""),[c,f]=E.useState("local"),[m,h]=E.useState(""),p=E.useRef(!1),v=E.useCallback(ae=>{p.current=!0,h(ae)},[]),[y,g]=E.useState(""),[b,N]=E.useState({max_files:2500,max_file_size_bytes:1048576,max_total_size_bytes:104857600,timeout_seconds:60}),[j,T]=E.useState(()=>Ta("analysisMode","auto",ae=>ae==="auto"||ae==="full"||ae==="incremental")),[H,_]=E.useState(!0),[K,z]=E.useState(null);E.useEffect(()=>{yn("analysisMode",j)},[j]);const[D,O]=E.useState(!1),[U,q]=E.useState(!1),[C,F]=E.useState(!1),[G,Y]=E.useState(null),[I,W]=E.useState(""),[w,R]=E.useState(null),[A,V]=E.useState(null),[B,P]=E.useState(()=>Ta("mode","simple",ae=>ae==="simple"||ae==="advanced"));E.useEffect(()=>{yn("mode",B)},[B]);const[te,le]=E.useState("studio"),[pe,ve]=E.useState(()=>Ta("highContrast",!1,ae=>typeof ae=="boolean"));E.useEffect(()=>{yn("highContrast",pe),typeof document<"u"&&(pe?document.documentElement.setAttribute("data-contrast","high"):document.documentElement.removeAttribute("data-contrast"))},[pe]);const k=te==="workspace"?"workspace":te==="findings"?"findings":te==="reportcenter"||te==="report"?"reports":te==="agent"?"agent":te==="live"||te==="history"?"changes":te==="quality"||te==="intelligence"?"code":"architecture",M=ae=>{ae==="workspace"?le("workspace"):ae==="architecture"?le("studio"):ae==="code"?le("quality"):ae==="findings"?le("findings"):ae==="changes"?le("live"):ae==="agent"?le("agent"):ae==="reports"&&le("reportcenter")},[ie,ce]=E.useState(null),[me,ge]=E.useState("disconnected"),[je,ue]=E.useState([]),[ye,Ce]=E.useState([]),[dt,Le]=E.useState(null),[Ke,Ee]=E.useState(null),[de,Me]=E.useState(()=>new Set),[at,J]=E.useState(()=>new Set),[Se,rt]=E.useState(null),[ut,yt]=E.useState(""),Je=E.useRef(null),fe=E.useRef(null),Xe=E.useRef(null),$e=E.useRef(null),It=E.useRef(null),en=E.useRef(null),[_n,La]=E.useState(null),[ys,ui]=E.useState(()=>Ta("layout","layered",ae=>ae==="layered"||ae==="cluster"||ae==="radial")),[bs,Ir]=E.useState(()=>Ta("density","balanced",ae=>ae==="compact"||ae==="balanced"||ae==="spacious")),[vs,Ot]=E.useState(()=>Ta("grouping","files",ae=>ae==="files"||ae==="directories"));E.useEffect(()=>{yn("layout",ys)},[ys]),E.useEffect(()=>{yn("density",bs)},[bs]),E.useEffect(()=>{yn("grouping",vs)},[vs]);const[fi,jl]=E.useState(()=>Ta("explorerWidth",260,ae=>typeof ae=="number"&&ae>=220&&ae<=400)),[Ns,js]=E.useState(()=>Ta("inspectorWidth",320,ae=>typeof ae=="number"&&ae>=260&&ae<=460)),[wl,mi]=E.useState(!0),[_l,ws]=E.useState(!0),[tn,vt]=E.useState(!1),[Hn,Nt]=E.useState("canvas");E.useEffect(()=>{yn("explorerWidth",fi)},[fi]),E.useEffect(()=>{yn("inspectorWidth",Ns)},[Ns]),E.useEffect(()=>{const ae=Ae=>{Ae.target instanceof HTMLElement&&Ae.target.closest("input,textarea,select,[contenteditable=true],dialog[open]")||(Ae.key==="Escape"&&vt(!1),Ae.altKey&&Ae.key.toLowerCase()==="f"&&(Ae.preventDefault(),vt(Ue=>!Ue),Nt("canvas")),Ae.altKey&&Ae.key.toLowerCase()==="i"&&(Ae.preventDefault(),ws(Ue=>!Ue)),Ae.altKey&&Ae.key.toLowerCase()==="m"&&(Ae.preventDefault(),P(Ue=>Ue==="simple"?"advanced":"simple")),Ae.key==="/"&&(Ae.preventDefault(),mi(!0),Nt("files"),requestAnimationFrame(()=>{var Ue;return(Ue=document.getElementById("explorer-search-input"))==null?void 0:Ue.focus()})))};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[]);const hi=ae=>{La(ae),Nt("inspector"),ws(!0)},[Kr,Xr]=E.useState(""),_s=E.useDeferredValue(Kr),[za,Ss]=E.useState("ALL"),[Un,ks]=E.useState("ALL"),[Zn,Cs]=E.useState(!1),[Sl,kl]=E.useState(!1),[Ts,Ha]=E.useState(!1),[Cl,Tl]=E.useState(!1),[El,Qr]=E.useState(!0),nn=E.useRef(null),dn=E.useRef(!1),Bn=E.useRef(0);E.useEffect(()=>{const ae=Ae=>{if((Ae.ctrlKey||Ae.metaKey)&&Ae.key.toLowerCase()==="k"){if(typeof document<"u"&&document.querySelector('dialog[open]:not([data-testid="command-palette-dialog"])'))return;Ae.preventDefault(),q(Ue=>!Ue)}};return window.addEventListener("keydown",ae),()=>window.removeEventListener("keydown",ae)},[]),E.useEffect(()=>{let ae=!0;return $_().then(Ae=>{ae&&(o(Ae.default_workspace),h(Ue=>p.current||Ue?Ue:Ae.default_workspace))}).catch(Ae=>{ae&&console.warn("Backend /api/health unavailable on mount:",Ae)}),()=>{ae=!1}},[]),E.useEffect(()=>()=>{nn.current!==null&&(window.clearTimeout(nn.current),nn.current=null),$e.current!==null&&(window.clearTimeout($e.current),$e.current=null),It.current!==null&&(window.clearTimeout(It.current),It.current=null),en.current!==null&&(window.clearTimeout(en.current),en.current=null),Je.current&&(Je.current.close(),Je.current=null)},[]);const Es=E.useCallback(ae=>{en.current!==null&&window.clearTimeout(en.current),en.current=window.setTimeout(()=>{yt(ae)},350)},[]),Sn=E.useCallback(ae=>{R(ae),La(Ae=>{var Oe;return Ae?ae.files.some(Vt=>Vt.id===Ae)?(rt(null),Ae):(rt(Ae),null):((Oe=ae.files[0])==null?void 0:Oe.id)??null})},[]),jt=E.useCallback(async ae=>{try{const[Ae,Ue,Oe]=await Promise.all([uS(ae),gS(ae,50),bS(ae)]);if(ce(Ae),ue(Ue.entries),Ce(Oe.alerts),Ae.last_analysis_id)try{const Vt=await fS(ae);Sn(Vt.analysis)}catch{}}catch(Ae){Ee(Ae instanceof Error?Ae.message:"Failed to synchronize live session state.")}},[Sn]),mt=E.useCallback(ae=>{$e.current!==null&&window.clearTimeout($e.current),$e.current=window.setTimeout(()=>{$e.current=null,jt(ae)},120)},[jt]),Ua=E.useCallback((ae,Ae)=>{if(Je.current&&(Je.current.close(),Je.current=null),typeof EventSource>"u"){ge("disconnected");return}fe.current=Uy(ae,Ae),ge("connecting");const Ue=new EventSource(NS(ae,Xe.current));Je.current=Ue,Ue.onopen=()=>{ge("connected"),Ee(null)},Ue.onerror=()=>{Ue.readyState===EventSource.CLOSED?ge("disconnected"):ge("reconnecting")};const Oe=Vt=>{try{const it=JSON.parse(String(Vt.data)),Yt=fe.current??Uy(it.session_id,it.session_generation),Lt=xk(Yt,it);if(!Lt.accepted)return;if(fe.current=Lt.nextGuard,Xe.current=it.event_id,it.event_type==="stream_reset"){mt(ae);return}if(it.event_type==="alert_created"||it.event_type==="alert_resolved"){const qe=it.payload;qe&&qe.alert_id&&(Ce($a=>By($a,qe)),it.event_type==="alert_created"?Es(`New live alert: ${qe.title}`):Es(`Live alert resolved: ${qe.title}`));return}if(it.event_type==="architecture_delta"){const qe=it.payload;if(qe){const $a=new Set([...qe.added_modules??[],...(qe.renamed_modules??[]).map(We=>We.new_path),...(qe.added_edges??[]).map(We=>We.source),...(qe.added_edges??[]).map(We=>We.target),...(qe.coupling_deltas??[]).map(We=>We.file_id)]),gi=new Set([...(qe.added_edges??[]).map(We=>`${We.source}->${We.target}`),...(qe.changed_edges??[]).map(We=>`${We.source}->${We.target}`)]);Me($a),J(gi),It.current!==null&&window.clearTimeout(It.current),It.current=window.setTimeout(()=>{Me(new Set),J(new Set)},3500)}return}if(it.event_type==="snapshot_published"){mt(ae),Es(it.payload.has_architectural_changes?"Live architecture snapshot updated with structural changes.":"Live architecture snapshot verified current.");return}if(it.event_type==="session_state_changed"||it.event_type==="freshness_changed"||it.event_type==="reconciliation_required"||it.event_type==="analysis_completed"||it.event_type==="analysis_failed"){mt(ae);return}it.event_type==="session_stopped"&&(Ue.close(),Je.current===Ue&&(Je.current=null),ge("disconnected"),mt(ae))}catch{}};for(const Vt of gk)Ue.addEventListener(Vt,Oe)},[Es,mt]),Zr=async(ae=!1)=>{const Ae=m.trim()||r;if(!Ae||c!=="local"||Ae==="demo"){Ee(s("live.localOnlyNotice"));return}Le("start"),Ee(null),Xe.current=null;try{const Ue=await dS({target:Ae,limits:b,live_limits:{workers:K},force_polling:ae,use_cache:H,persist_history:!0});ce(Ue),Ua(Ue.session_id,Ue.session_generation),mt(Ue.session_id)}catch(Ue){Ee(Ue instanceof Error?Ue.message:"Failed to start live architecture watch.")}finally{Le(null)}},md=async()=>{if(ie){Le("pause"),Ee(null);try{const ae=await mS(ie.session_id);ce(ae),mt(ae.session_id)}catch(ae){Ee(ae instanceof Error?ae.message:"Failed to pause live session.")}finally{Le(null)}}},hd=async()=>{if(ie){Le("resume"),Ee(null);try{const ae=await hS(ie.session_id);ce(ae),mt(ae.session_id)}catch(ae){Ee(ae instanceof Error?ae.message:"Failed to resume live session.")}finally{Le(null)}}},Pr=async()=>{if(ie){Le("reconcile"),Ee(null);try{const ae=await pS(ie.session_id);ce(ae),mt(ae.session_id)}catch(ae){Ee(ae instanceof Error?ae.message:"Failed to trigger reconciliation.")}finally{Le(null)}}},As=async()=>{if(ie){Le("stop"),Ee(null);try{const ae=await xS(ie.session_id);Je.current&&(Je.current.close(),Je.current=null),ge("disconnected"),ce(ae)}catch(ae){Ee(ae instanceof Error?ae.message:"Failed to stop live session.")}finally{Le(null)}}},pi=async()=>{if(ie)try{await yS(ie.session_id),ue([])}catch(ae){Ee(ae instanceof Error?ae.message:"Failed to clear live history.")}},xi=async ae=>{if(ie)try{const Ae=await vS(ie.session_id,ae);Ce(Ue=>By(Ue,Ae))}catch(Ae){Ee(Ae instanceof Error?Ae.message:"Failed to acknowledge alert.")}},fa=async()=>{if(Bn.current+=1,dn.current=!1,nn.current!==null&&(window.clearTimeout(nn.current),nn.current=null),!!G)try{await V_(G.job_id)}catch(ae){console.warn("Failed to request scan cancellation:",ae)}finally{Y(null)}},kn=async(ae,Ae)=>{var it;const Ue=ae??c,Oe=(Ae??m).trim();if(!Oe){V({code:"EMPTY_TARGET",message:"Please enter a valid local directory path or HTTPS GitHub repository URL."});return}V(null),W(Oe),Bn.current+=1;const Vt=Bn.current;dn.current=!1,nn.current!==null&&(window.clearTimeout(nn.current),nn.current=null);try{const Yt=await q_({source_type:Ue,target:Oe,branch:Ue==="github"&&y.trim()?y.trim():void 0,limits:b,analysis_mode:j,use_cache:H,workers:K});if(Y(Yt),Yt.status==="completed"){const qe=await Dy(Yt.job_id);R(qe),le("studio"),Y(null),La(((it=qe.files[0])==null?void 0:it.id)??null);return}const Lt=(qe,$a)=>{Bn.current===Vt&&(nn.current=window.setTimeout(async()=>{var gi;if(Bn.current===Vt){if(dn.current){Lt(qe,400);return}dn.current=!0;try{const We=await G_(qe);if(Bn.current!==Vt)return;if(Y(We),We.status==="completed"){dn.current=!1;const yi=await Dy(qe);R(yi),le("studio"),La(((gi=yi.files[0])==null?void 0:gi.id)??null),Y(null);return}if(We.status==="failed"){dn.current=!1,V({code:We.error_code??"SCAN_FAILED",message:We.error_message??"Scan failed without a detailed error message."}),Y(null);return}if(We.status==="cancelled"){dn.current=!1,Y(null);return}dn.current=!1,Lt(qe,500)}catch(We){if(dn.current=!1,Bn.current!==Vt)return;if(We instanceof Error&&We.message.includes("409")){Lt(qe,1e3);return}V({code:"NETWORK_ERROR",message:We instanceof Error?We.message:"Failed to poll scan job status from backend."}),Y(null)}}},$a))};Lt(Yt.job_id,300)}catch(Yt){if(Bn.current!==Vt)return;V({code:Yt instanceof td?Yt.code:"SCAN_INIT_FAILED",message:Yt instanceof Error?Yt.message:"Failed to start scan job."}),Y(null)}},Ba=()=>{Xr(""),Ss("ALL"),ks("ALL"),Cs(!1),kl(!1),Ha(!1),Tl(!1)},Kt=ae=>{La(ae),le("studio"),Nt("inspector"),ws(!0)},wt=()=>{const ae=document.querySelector('[data-testid="theme-toggle-btn"]');ae==null||ae.click()},{filteredFiles:Al,filteredEdges:Jr,neighborIds:Wr}=E.useMemo(()=>w?K4(w.files,w.edges,{searchQuery:_s,languageFilter:za,supportFilter:Un,cyclesOnly:Zn,hubsOnly:Sl,orphansOnly:Ts,focusSelectedNeighborhood:Cl,selectedFileId:_n}):{filteredFiles:[],filteredEdges:[],neighborIds:new Set},[w,_s,za,Un,Zn,Sl,Ts,Cl,_n,El]),$n=E.useMemo(()=>!w||!_n?null:w.files.find(ae=>ae.id===_n)??null,[w,_n]);return n.jsxs("div",{className:"app-shell flex flex-col bg-canvas text-ink font-sans selection:bg-accent/20",children:[n.jsx("a",{href:"#main-workspace",className:"sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:px-3 focus:py-1.5 focus:bg-accent focus:text-white focus:rounded focus:outline-none",children:"Skip to main content"}),n.jsx(QS,{sourceType:c,onSourceTypeChange:f,targetInput:m,onTargetInputChange:v,branchInput:y,onBranchInputChange:g,limits:b,onLimitsChange:N,analysisMode:j,onAnalysisModeChange:T,useCache:H,onUseCacheChange:_,workers:K,onWorkersChange:z,onTriggerScan:kn,onOpenFolderBrowser:()=>O(!0),activeJob:G,onCancelJob:fa,result:w,activeTab:te,onTabChange:le,defaultWorkspacePath:r,onOpenCommandPalette:()=>q(!0),workstationMode:B,onWorkstationModeChange:P,onOpenTour:()=>F(!0),liveSession:ie,liveConnectionState:me}),n.jsx("div",{className:"visually-hidden",role:"status","aria-live":"polite","aria-atomic":"true",children:ut}),Se&&n.jsxs("div",{role:"status","data-testid":"removed-selection-notice",className:"bg-warning/10 border-b border-warning/40 px-4 py-1.5 flex items-center justify-between gap-2 text-xs text-warning",children:[n.jsx("span",{children:s("live.selectedNodeRemoved",{fileId:Se})}),n.jsx("button",{type:"button",onClick:()=>rt(null),className:"px-2 py-0.5 rounded bg-canvas border border-line text-[11px] text-ink cursor-pointer",children:s("common.dismiss")})]}),A&&n.jsxs("div",{role:"alert","data-testid":"error-alert-banner",className:"bg-danger/10 border-b border-danger/70 px-4 py-2 flex items-center justify-between gap-3 text-xs text-danger",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vn,{className:"w-4 h-4 text-danger shrink-0","aria-hidden":"true"}),n.jsxs("span",{children:[n.jsxs("strong",{className:"font-mono",children:["[",A.code,"]"]})," ",s(`errors.${A.code}`,A.message)]})]}),n.jsx("button",{type:"button",onClick:()=>V(null),className:"px-2 py-0.5 rounded bg-danger-solid hover:bg-danger-solid text-white text-[11px] cursor-pointer",children:s("common.dismiss")})]}),G&&w&&n.jsxs("div",{role:"status","data-testid":"previous-analysis-banner",className:"bg-warning/10 border-b border-warning/60 px-4 py-1.5 flex items-center justify-between gap-3 text-xs text-warning",children:[n.jsxs("div",{children:[n.jsxs("strong",{className:"tracking-wide font-bold text-warning mr-2",children:[s("common.previousAnalysis")," (",w.repo_name,")"]}),n.jsxs("span",{children:[s("header.viewingPreviousSnapshot")," ",n.jsx("code",{className:"font-mono text-warning",children:I})," —"," ",G.phase_message," (",G.progress_percent.toFixed(0),"%)",G.reused_files||G.reparsed_files?n.jsxs("span",{className:"ml-2 font-mono text-[11px]",children:["[",s("performance.reusedShort",{reused:G.reused_files??0,reparsed:G.reparsed_files??0}),"]"]}):null]})]}),n.jsx("span",{className:"text-[11px] font-mono text-warning shrink-0",children:s("header.updatingAutomatically")})]}),w&&n.jsx(pk,{result:w,cyclesOnly:Zn,onToggleCyclesOnly:()=>{Cs(ae=>!ae),le("studio")},onOpenReportTab:()=>le("report"),isPreviousAnalysis:G!==null,workstationMode:B}),n.jsxs("div",{className:"flex-1 flex flex-row overflow-hidden min-h-0",children:[w&&n.jsx(rk,{activeDomain:k,onSelectDomain:M,findingsCount:((eo=(ma=w.health_report)==null?void 0:ma.findings)==null?void 0:eo.length)??0}),n.jsx("main",{id:"main-workspace",tabIndex:-1,className:"flex-1 flex flex-col overflow-hidden min-w-0",children:te==="live"?n.jsx(XS,{sourceType:c,targetPath:m||r,session:ie,connectionState:me,history:je,alerts:ye,busyAction:dt,liveError:Ke,workstationMode:B,onStartWatch:ae=>void Zr(ae),onPauseWatch:()=>void md(),onResumeWatch:()=>void hd(),onReconcileNow:()=>void Pr(),onStopWatch:()=>void As(),onClearHistory:()=>void pi(),onAcknowledgeAlert:ae=>void xi(ae),onInspectModuleInStudio:Kt}):w?te==="studio"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"workspace-controls",role:"toolbar","aria-label":"Workspace panels",children:[n.jsxs("span",{className:"text-muted text-xs mr-auto hidden sm:block",children:["Architecture / ",s(vs==="files"?"workspace.modulesLabel":"workspace.packagesLabel")]}),["files","canvas","inspector"].map(ae=>n.jsx("button",{className:"mobile-view","aria-pressed":Hn===ae,onClick:()=>Nt(ae),children:s(ae==="files"?"workspace.filesView":ae==="canvas"?"workspace.canvasView":"workspace.inspectorView")},ae)),n.jsx("button",{className:"desktop-panel-toggle","aria-pressed":wl&&!tn,onClick:()=>{vt(!1),mi(ae=>!ae)},children:s("workspace.explorerToggle")}),n.jsx("button",{className:"desktop-panel-toggle","aria-pressed":_l&&!tn,title:"Toggle inspector (Alt+I)",onClick:()=>{vt(!1),ws(ae=>!ae)},children:s("workspace.inspectorToggle")}),n.jsx("button",{"aria-pressed":tn,title:"Focus canvas (Alt+F), Escape to exit",onClick:()=>{vt(ae=>!ae),Nt("canvas")},children:s(tn?"workspace.exitFocus":"workspace.focusCanvas")})]}),n.jsxs("div",{className:"workspace-panels","data-mobile":Hn,"data-explorer":wl&&!tn,"data-inspector":_l&&!tn,style:{"--explorer-width":`${fi}px`,"--inspector-width":`${Ns}px`},children:[n.jsx(VS,{allFiles:w.files,filteredFiles:Al,selectedFileId:_n,onSelectFile:hi,searchQuery:Kr,onSearchChange:Xr,languageFilter:za,onLanguageFilterChange:Ss,supportFilter:Un,onSupportFilterChange:ks,cyclesOnly:Zn,onCyclesOnlyChange:Cs,hubsOnly:Sl,onHubsOnlyChange:kl,orphansOnly:Ts,onOrphansOnlyChange:Ha,onResetFilters:Ba}),wl&&!tn&&n.jsx(Ly,{label:s("workspace.resizeExplorer"),value:fi,min:220,max:400,onChange:jl}),n.jsx(E.Suspense,{fallback:n.jsx("div",{className:"graph-workspace grid place-content-center text-xs text-muted",role:"status",children:s("graph.loading")}),children:n.jsx(P4,{files:Al,edges:Jr,selectedFileId:_n,neighborIds:Wr,onSelectFile:hi,layoutMode:ys,onLayoutModeChange:ui,densityMode:bs,onDensityModeChange:Ir,groupingMode:vs,onGroupingModeChange:Ot,focusNeighborhood:Cl,onToggleFocusNeighborhood:()=>Tl(ae=>!ae),highlightCycles:El,onToggleHighlightCycles:()=>Qr(ae=>!ae),workstationMode:B,isLiveActive:!!(ie&&ie.state!=="STOPPED"),liveChangedNodeIds:de,liveChangedEdgeKeys:at})}),_l&&!tn&&n.jsx(Ly,{label:s("workspace.resizeInspector"),value:Ns,min:260,max:460,reverse:!0,onChange:js}),n.jsx(ZS,{packageFiles:vs==="directories"&&$n?w.files.filter(ae=>ae.directory===$n.directory):void 0,onExpandPackage:()=>Ot("files"),selectedFile:$n,allCycles:w.cycles,allFindings:w.health_report.findings,onSelectFile:hi,workstationMode:B,onOpenAdvisor:()=>le("advisor")},_n)]})]}):te==="intelligence"?n.jsx(tk,{result:w,onSelectFileInStudio:Kt,workstationMode:B}):te==="report"?n.jsx(E.Suspense,{fallback:n.jsx("p",{role:"status",className:"p-6 text-xs text-muted",children:s("report.loading")}),children:n.jsx(J4,{result:w,onSelectFileInStudio:Kt,workstationMode:B})}):te==="guardian"?n.jsx(FS,{result:w,defaultWorkspacePath:r,workstationMode:B}):te==="contract"?n.jsx(GS,{result:w,defaultWorkspacePath:r,workstationMode:B}):te==="passport"?n.jsx(fk,{result:w,defaultWorkspacePath:r,workstationMode:B}):te==="quality"?n.jsx(ak,{analysisId:(w==null?void 0:w.analysis_id)??null,workstationMode:B,qualityFreshness:(ie==null?void 0:ie.quality_freshness)??null,onInspectFileInGraph:Kt}):te==="agent"?n.jsx(ik,{analysisId:w.analysis_id,repoName:w.repo_name,workstationMode:B,onInspectModuleInStudio:Kt}):te==="workspace"?n.jsx(lk,{}):te==="findings"?n.jsx(ck,{result:w,onInspectFile:Kt}):te==="reportcenter"?n.jsx(dk,{result:w,onOpenPassport:()=>le("passport"),onOpenHealthReport:()=>le("report")}):te==="advisor"?n.jsx(mk,{result:w,workstationMode:B,onSelectFileInStudio:Kt,onNavigateTab:ae=>le(ae)}):n.jsx(hk,{result:w,workstationMode:B,onSelectFileInStudio:Kt}):n.jsx(nk,{workspace:r,scanning:G!==null,onWorkspace:()=>{f("local"),h(r),kn("local",r)},onBrowse:()=>O(!0),onGithub:()=>{var ae;f("github"),h("https://github.com/"),(ae=document.getElementById("repo-target-input"))==null||ae.focus()},onDemo:()=>{f("demo"),h("demo"),kn("demo","demo")}})})]}),n.jsx(ok,{repoName:(w==null?void 0:w.repo_name)??null,totalFiles:(w==null?void 0:w.total_files)??0,liveStatus:ie?ie.state.toUpperCase():"IDLE",workstationMode:B,highContrast:pe,onToggleMode:()=>P(ae=>ae==="simple"?"advanced":"simple"),onToggleHighContrast:()=>ve(ae=>!ae),onResetLayout:()=>{jl(260),js(340),mi(!0),ws(!0),vt(!1)}}),n.jsx(YS,{isOpen:D,initialPath:m.startsWith("https://")||m==="demo"?r:m,onClose:()=>O(!1),onSelectFolder:ae=>{f("local"),h(ae)}}),n.jsx(qS,{isOpen:U,onClose:()=>q(!1),files:w?w.files:[],onSelectFile:hi,onSwitchTab:le,onToggleTheme:wt,onChangeLayout:ui,onChangeGrouping:Ot,onChangeDensity:Ir,onToggleCyclesOnly:()=>Cs(ae=>!ae),onResetFilters:Ba,workstationMode:B,onToggleMode:()=>P(ae=>ae==="simple"?"advanced":"simple"),onToggleLanguage:()=>{const ae=i.language.startsWith("tr")?"en":"tr";i.changeLanguage(ae),typeof document<"u"&&(document.documentElement.lang=ae),yn("locale",ae)},onOpenTour:()=>F(!0),onExportReport:w?ae=>{window.open(il(w.analysis_id,ae),"_blank","noopener")}:void 0,onLoadDemo:()=>{f("demo"),h("demo"),kn("demo","demo")}}),n.jsx(uk,{isOpen:C,onClose:()=>{F(!1),yn("onboardingDismissed",!0)},onTryDemo:()=>{f("demo"),h("demo"),kn("demo","demo")}})]})};YN.createRoot(document.getElementById("root")).render(n.jsx(_b.StrictMode,{children:n.jsx(W4,{})}));export{OT as $,bl as A,T4 as B,CT as C,ST as D,ET as E,lT as F,Oa as G,vb as H,Pc as I,_T as J,jT as K,gT as L,_m as M,wT as N,yT as O,Ie as P,j4 as Q,_b as R,L0 as S,a4 as T,n4 as U,Ar as V,rb as W,RT as X,ob as Y,Qm as Z,o4 as _,$N as a,vT as a0,DT as a1,AT as a2,ud as a3,r4 as a4,iT as a5,xT as a6,tT as a7,Ws as a8,NT as a9,bT as aa,pT as ab,cT as ac,hT as ad,Ma as ae,p4 as af,q0 as ag,H0 as ah,fT as ai,ft as aj,LT as ak,Q4 as al,zT as am,cn as an,Ow as ao,x_ as ap,ml as aq,Gt as ar,Et as as,jn as at,Jt as au,E as b,he as c,sT as d,B0 as e,rT as f,wb as g,Zc as h,oT as i,n as j,km as k,u4 as l,uT as m,Xm as n,f4 as o,$0 as p,MT as q,Cm as r,h4 as s,aT as t,s4 as u,dT as v,mT as w,nT as x,TT as y,kT as z};
|