@i14ks/ccv 0.15.0 → 0.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/bundle/ccv.mjs +155 -30
  2. package/package.json +1 -1
  3. package/web/assets/{codemirror-wcb7BToF.js → codemirror-Dg4vvH8i.js} +1 -1
  4. package/web/assets/{index-ZyET8YfL.js → index-0iOvZWuA.js} +1 -1
  5. package/web/assets/{index-D8i-20tT.js → index-B96oAtZO.js} +1 -1
  6. package/web/assets/{index-CKo4-duU.js → index-Bg6okyOc.js} +1 -1
  7. package/web/assets/index-Bo84aMH8.js +134 -0
  8. package/web/assets/{index-qJpQucwj.js → index-Bpw3TKRV.js} +1 -1
  9. package/web/assets/{index-Bug5lJuD.js → index-CB6_9alP.js} +1 -1
  10. package/web/assets/{index-DzuxHBqN.js → index-CM3XoNnk.js} +1 -1
  11. package/web/assets/{index-B1iGktMS.js → index-CNi4N4PL.js} +1 -1
  12. package/web/assets/index-COiPHc3p.css +1 -0
  13. package/web/assets/{index-B7uOCyzk.js → index-CRyJJS40.js} +1 -1
  14. package/web/assets/{index-BebgK8qS.js → index-CTrrHYKx.js} +1 -1
  15. package/web/assets/{index-ggJz6TAQ.js → index-CanbdA5V.js} +1 -1
  16. package/web/assets/{index-BoWGjyq1.js → index-CrC2iAsw.js} +1 -1
  17. package/web/assets/{index-H1KO3hWw.js → index-CzbpsO2-.js} +1 -1
  18. package/web/assets/{index-DaeBIEG7.js → index-D04xl5g2.js} +1 -1
  19. package/web/assets/{index-CLUF7ja0.js → index-DB0qYzJa.js} +1 -1
  20. package/web/assets/{index-B8ioctog.js → index-DMpA08Ie.js} +1 -1
  21. package/web/assets/{index-s31Rk-Wi.js → index-LHO2W5bU.js} +1 -1
  22. package/web/assets/{index-BgYZP6B5.js → index-SxQ8qp4S.js} +1 -1
  23. package/web/assets/{index-jRANpi-W.js → index-ZEjcSNDk.js} +1 -1
  24. package/web/assets/{index-tW3KsNuy.js → index-kBFqQTK1.js} +1 -1
  25. package/web/index.html +2 -2
  26. package/web/assets/index-BKeYZb3W.css +0 -1
  27. package/web/assets/index-DfzFdzpd.js +0 -134
@@ -0,0 +1,134 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CanbdA5V.js","./index-kBFqQTK1.js","./index-CNi4N4PL.js","./index-BHot-lnj.js","./index-891wE-Rj.js","./index-CzbpsO2-.js","./index-0iOvZWuA.js","./index-Bg6okyOc.js","./index-SxQ8qp4S.js","./index-DMpA08Ie.js","./index-LHO2W5bU.js","./index-ZEjcSNDk.js","./index-CB6_9alP.js","./index-CrC2iAsw.js","./index-Bpw3TKRV.js","./index-CRyJJS40.js","./index-CTrrHYKx.js","./index-B96oAtZO.js","./index-CM3XoNnk.js","./index-D04xl5g2.js","./index-DB0qYzJa.js","./codemirror-Dg4vvH8i.js","./xterm-D6Mng-DB.js","./_commonjsHelpers-CqkleIqs.js","./addon-fit-CevVMrUA.js","./addon-web-links-CnB65OV_.js","./xterm-DYP7pi_n.css"])))=>i.map(i=>d[i]);
2
+ var d0=Object.defineProperty;var _b=s=>{throw TypeError(s)};var h0=(s,l,r)=>l in s?d0(s,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[l]=r;var Ot=(s,l,r)=>h0(s,typeof l!="symbol"?l+"":l,r),Th=(s,l,r)=>l.has(s)||_b("Cannot "+r);var Ye=(s,l,r)=>(Th(s,l,"read from private field"),r?r.call(s):l.get(s)),un=(s,l,r)=>l.has(s)?_b("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(s):l.set(s,r),vt=(s,l,r,c)=>(Th(s,l,"write to private field"),c?c.call(s,r):l.set(s,r),r),Mn=(s,l,r)=>(Th(s,l,"access private method"),r);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))c(o);new MutationObserver(o=>{for(const d of o)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function r(o){const d={};return o.integrity&&(d.integrity=o.integrity),o.referrerPolicy&&(d.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?d.credentials="include":o.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(o){if(o.ep)return;o.ep=!0;const d=r(o);fetch(o.href,d)}})();var Eh={exports:{}},ko={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var vb;function p0(){if(vb)return ko;vb=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function r(c,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var m in o)m!=="key"&&(d[m]=o[m])}else d=o;return o=d.ref,{$$typeof:s,type:c,key:h,ref:o!==void 0?o:null,props:d}}return ko.Fragment=l,ko.jsx=r,ko.jsxs=r,ko}var jb;function m0(){return jb||(jb=1,Eh.exports=p0()),Eh.exports}var i=m0(),Ch={exports:{}},Qe={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var Sb;function g0(){if(Sb)return Qe;Sb=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),v=Symbol.iterator;function E(N){return N===null||typeof N!="object"?null:(N=v&&N[v]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,L={};function X(N,V,re){this.props=N,this.context=V,this.refs=L,this.updater=re||T}X.prototype.isReactComponent={},X.prototype.setState=function(N,V){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,V,"setState")},X.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function J(){}J.prototype=X.prototype;function G(N,V,re){this.props=N,this.context=V,this.refs=L,this.updater=re||T}var O=G.prototype=new J;O.constructor=G,C(O,X.prototype),O.isPureReactComponent=!0;var Z=Array.isArray;function M(){}var D={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function ne(N,V,re){var me=re.ref;return{$$typeof:s,type:N,key:V,ref:me!==void 0?me:null,props:re}}function he(N,V){return ne(N.type,V,N.props)}function W(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function ue(N){var V={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(re){return V[re]})}var je=/\/+/g;function Me(N,V){return typeof N=="object"&&N!==null&&N.key!=null?ue(""+N.key):V.toString(36)}function Ce(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(M,M):(N.status="pending",N.then(function(V){N.status==="pending"&&(N.status="fulfilled",N.value=V)},function(V){N.status==="pending"&&(N.status="rejected",N.reason=V)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function A(N,V,re,me,Ne){var ve=typeof N;(ve==="undefined"||ve==="boolean")&&(N=null);var De=!1;if(N===null)De=!0;else switch(ve){case"bigint":case"string":case"number":De=!0;break;case"object":switch(N.$$typeof){case s:case l:De=!0;break;case _:return De=N._init,A(De(N._payload),V,re,me,Ne)}}if(De)return Ne=Ne(N),De=me===""?"."+Me(N,0):me,Z(Ne)?(re="",De!=null&&(re=De.replace(je,"$&/")+"/"),A(Ne,V,re,"",function(Ve){return Ve})):Ne!=null&&(W(Ne)&&(Ne=he(Ne,re+(Ne.key==null||N&&N.key===Ne.key?"":(""+Ne.key).replace(je,"$&/")+"/")+De)),V.push(Ne)),1;De=0;var yt=me===""?".":me+":";if(Z(N))for(var Xe=0;Xe<N.length;Xe++)me=N[Xe],ve=yt+Me(me,Xe),De+=A(me,V,re,ve,Ne);else if(Xe=E(N),typeof Xe=="function")for(N=Xe.call(N),Xe=0;!(me=N.next()).done;)me=me.value,ve=yt+Me(me,Xe++),De+=A(me,V,re,ve,Ne);else if(ve==="object"){if(typeof N.then=="function")return A(Ce(N),V,re,me,Ne);throw V=String(N),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return De}function ce(N,V,re){if(N==null)return N;var me=[],Ne=0;return A(N,me,"","",function(ve){return V.call(re,ve,Ne++)}),me}function z(N){if(N._status===-1){var V=N._result;V=V(),V.then(function(re){(N._status===0||N._status===-1)&&(N._status=1,N._result=re)},function(re){(N._status===0||N._status===-1)&&(N._status=2,N._result=re)}),N._status===-1&&(N._status=0,N._result=V)}if(N._status===1)return N._result.default;throw N._result}var be=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ye={map:ce,forEach:function(N,V,re){ce(N,function(){V.apply(this,arguments)},re)},count:function(N){var V=0;return ce(N,function(){V++}),V},toArray:function(N){return ce(N,function(V){return V})||[]},only:function(N){if(!W(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Qe.Activity=S,Qe.Children=ye,Qe.Component=X,Qe.Fragment=r,Qe.Profiler=o,Qe.PureComponent=G,Qe.StrictMode=c,Qe.Suspense=g,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return D.H.useMemoCache(N)}},Qe.cache=function(N){return function(){return N.apply(null,arguments)}},Qe.cacheSignal=function(){return null},Qe.cloneElement=function(N,V,re){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var me=C({},N.props),Ne=N.key;if(V!=null)for(ve in V.key!==void 0&&(Ne=""+V.key),V)!H.call(V,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&V.ref===void 0||(me[ve]=V[ve]);var ve=arguments.length-2;if(ve===1)me.children=re;else if(1<ve){for(var De=Array(ve),yt=0;yt<ve;yt++)De[yt]=arguments[yt+2];me.children=De}return ne(N.type,Ne,me)},Qe.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:d,_context:N},N},Qe.createElement=function(N,V,re){var me,Ne={},ve=null;if(V!=null)for(me in V.key!==void 0&&(ve=""+V.key),V)H.call(V,me)&&me!=="key"&&me!=="__self"&&me!=="__source"&&(Ne[me]=V[me]);var De=arguments.length-2;if(De===1)Ne.children=re;else if(1<De){for(var yt=Array(De),Xe=0;Xe<De;Xe++)yt[Xe]=arguments[Xe+2];Ne.children=yt}if(N&&N.defaultProps)for(me in De=N.defaultProps,De)Ne[me]===void 0&&(Ne[me]=De[me]);return ne(N,ve,Ne)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(N){return{$$typeof:m,render:N}},Qe.isValidElement=W,Qe.lazy=function(N){return{$$typeof:_,_payload:{_status:-1,_result:N},_init:z}},Qe.memo=function(N,V){return{$$typeof:x,type:N,compare:V===void 0?null:V}},Qe.startTransition=function(N){var V=D.T,re={};D.T=re;try{var me=N(),Ne=D.S;Ne!==null&&Ne(re,me),typeof me=="object"&&me!==null&&typeof me.then=="function"&&me.then(M,be)}catch(ve){be(ve)}finally{V!==null&&re.types!==null&&(V.types=re.types),D.T=V}},Qe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Qe.use=function(N){return D.H.use(N)},Qe.useActionState=function(N,V,re){return D.H.useActionState(N,V,re)},Qe.useCallback=function(N,V){return D.H.useCallback(N,V)},Qe.useContext=function(N){return D.H.useContext(N)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(N,V){return D.H.useDeferredValue(N,V)},Qe.useEffect=function(N,V){return D.H.useEffect(N,V)},Qe.useEffectEvent=function(N){return D.H.useEffectEvent(N)},Qe.useId=function(){return D.H.useId()},Qe.useImperativeHandle=function(N,V,re){return D.H.useImperativeHandle(N,V,re)},Qe.useInsertionEffect=function(N,V){return D.H.useInsertionEffect(N,V)},Qe.useLayoutEffect=function(N,V){return D.H.useLayoutEffect(N,V)},Qe.useMemo=function(N,V){return D.H.useMemo(N,V)},Qe.useOptimistic=function(N,V){return D.H.useOptimistic(N,V)},Qe.useReducer=function(N,V,re){return D.H.useReducer(N,V,re)},Qe.useRef=function(N){return D.H.useRef(N)},Qe.useState=function(N){return D.H.useState(N)},Qe.useSyncExternalStore=function(N,V,re){return D.H.useSyncExternalStore(N,V,re)},Qe.useTransition=function(){return D.H.useTransition()},Qe.version="19.2.8",Qe}var wb;function mp(){return wb||(wb=1,Ch.exports=g0()),Ch.exports}var y=mp(),Ah={exports:{}},No={},Mh={exports:{}},Rh={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var kb;function b0(){return kb||(kb=1,(function(s){function l(A,ce){var z=A.length;A.push(ce);e:for(;0<z;){var be=z-1>>>1,ye=A[be];if(0<o(ye,ce))A[be]=ce,A[z]=ye,z=be;else break e}}function r(A){return A.length===0?null:A[0]}function c(A){if(A.length===0)return null;var ce=A[0],z=A.pop();if(z!==ce){A[0]=z;e:for(var be=0,ye=A.length,N=ye>>>1;be<N;){var V=2*(be+1)-1,re=A[V],me=V+1,Ne=A[me];if(0>o(re,z))me<ye&&0>o(Ne,re)?(A[be]=Ne,A[me]=z,be=me):(A[be]=re,A[V]=z,be=V);else if(me<ye&&0>o(Ne,z))A[be]=Ne,A[me]=z,be=me;else break e}}return ce}function o(A,ce){var z=A.sortIndex-ce.sortIndex;return z!==0?z:A.id-ce.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;s.unstable_now=function(){return d.now()}}else{var h=Date,m=h.now();s.unstable_now=function(){return h.now()-m}}var g=[],x=[],_=1,S=null,v=3,E=!1,T=!1,C=!1,L=!1,X=typeof setTimeout=="function"?setTimeout:null,J=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function O(A){for(var ce=r(x);ce!==null;){if(ce.callback===null)c(x);else if(ce.startTime<=A)c(x),ce.sortIndex=ce.expirationTime,l(g,ce);else break;ce=r(x)}}function Z(A){if(C=!1,O(A),!T)if(r(g)!==null)T=!0,M||(M=!0,ue());else{var ce=r(x);ce!==null&&Ce(Z,ce.startTime-A)}}var M=!1,D=-1,H=5,ne=-1;function he(){return L?!0:!(s.unstable_now()-ne<H)}function W(){if(L=!1,M){var A=s.unstable_now();ne=A;var ce=!0;try{e:{T=!1,C&&(C=!1,J(D),D=-1),E=!0;var z=v;try{t:{for(O(A),S=r(g);S!==null&&!(S.expirationTime>A&&he());){var be=S.callback;if(typeof be=="function"){S.callback=null,v=S.priorityLevel;var ye=be(S.expirationTime<=A);if(A=s.unstable_now(),typeof ye=="function"){S.callback=ye,O(A),ce=!0;break t}S===r(g)&&c(g),O(A)}else c(g);S=r(g)}if(S!==null)ce=!0;else{var N=r(x);N!==null&&Ce(Z,N.startTime-A),ce=!1}}break e}finally{S=null,v=z,E=!1}ce=void 0}}finally{ce?ue():M=!1}}}var ue;if(typeof G=="function")ue=function(){G(W)};else if(typeof MessageChannel<"u"){var je=new MessageChannel,Me=je.port2;je.port1.onmessage=W,ue=function(){Me.postMessage(null)}}else ue=function(){X(W,0)};function Ce(A,ce){D=X(function(){A(s.unstable_now())},ce)}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"):H=0<A?Math.floor(1e3/A):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(A){switch(v){case 1:case 2:case 3:var ce=3;break;default:ce=v}var z=v;v=ce;try{return A()}finally{v=z}},s.unstable_requestPaint=function(){L=!0},s.unstable_runWithPriority=function(A,ce){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=v;v=A;try{return ce()}finally{v=z}},s.unstable_scheduleCallback=function(A,ce,z){var be=s.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?be+z:be):z=be,A){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=z+ye,A={id:_++,callback:ce,priorityLevel:A,startTime:z,expirationTime:ye,sortIndex:-1},z>be?(A.sortIndex=z,l(x,A),r(g)===null&&A===r(x)&&(C?(J(D),D=-1):C=!0,Ce(Z,z-be))):(A.sortIndex=ye,l(g,A),T||E||(T=!0,M||(M=!0,ue()))),A},s.unstable_shouldYield=he,s.unstable_wrapCallback=function(A){var ce=v;return function(){var z=v;v=ce;try{return A.apply(this,arguments)}finally{v=z}}}})(Rh)),Rh}var Nb;function x0(){return Nb||(Nb=1,Mh.exports=b0()),Mh.exports}var Dh={exports:{}},rl={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var Tb;function y0(){if(Tb)return rl;Tb=1;var s=mp();function l(g){var x="https://react.dev/errors/"+g;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)x+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+g+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(l(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(g,x,_){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:S==null?null:""+S,children:g,containerInfo:x,implementation:_}}var h=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,x){if(g==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return rl.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,rl.createPortal=function(g,x){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(l(299));return d(g,x,null,_)},rl.flushSync=function(g){var x=h.T,_=c.p;try{if(h.T=null,c.p=2,g)return g()}finally{h.T=x,c.p=_,c.d.f()}},rl.preconnect=function(g,x){typeof g=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,c.d.C(g,x))},rl.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},rl.preinit=function(g,x){if(typeof g=="string"&&x&&typeof x.as=="string"){var _=x.as,S=m(_,x.crossOrigin),v=typeof x.integrity=="string"?x.integrity:void 0,E=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;_==="style"?c.d.S(g,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:S,integrity:v,fetchPriority:E}):_==="script"&&c.d.X(g,{crossOrigin:S,integrity:v,fetchPriority:E,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},rl.preinitModule=function(g,x){if(typeof g=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var _=m(x.as,x.crossOrigin);c.d.M(g,{crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&c.d.M(g)},rl.preload=function(g,x){if(typeof g=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var _=x.as,S=m(_,x.crossOrigin);c.d.L(g,_,{crossOrigin:S,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},rl.preloadModule=function(g,x){if(typeof g=="string")if(x){var _=m(x.as,x.crossOrigin);c.d.m(g,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else c.d.m(g)},rl.requestFormReset=function(g){c.d.r(g)},rl.unstable_batchedUpdates=function(g,x){return g(x)},rl.useFormState=function(g,x,_){return h.H.useFormState(g,x,_)},rl.useFormStatus=function(){return h.H.useHostTransitionStatus()},rl.version="19.2.8",rl}var Eb;function _0(){if(Eb)return Dh.exports;Eb=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(l){console.error(l)}}return s(),Dh.exports=y0(),Dh.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var Cb;function v0(){if(Cb)return No;Cb=1;var s=x0(),l=mp(),r=_0();function c(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function h(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 m(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 g(e){if(d(e)!==e)throw Error(c(188))}function x(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var n=e,a=t;;){var u=n.return;if(u===null)break;var f=u.alternate;if(f===null){if(a=u.return,a!==null){n=a;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===n)return g(u),e;if(f===a)return g(u),t;f=f.sibling}throw Error(c(188))}if(n.return!==a.return)n=u,a=f;else{for(var b=!1,j=u.child;j;){if(j===n){b=!0,n=u,a=f;break}if(j===a){b=!0,a=u,n=f;break}j=j.sibling}if(!b){for(j=f.child;j;){if(j===n){b=!0,n=f,a=u;break}if(j===a){b=!0,a=f,n=u;break}j=j.sibling}if(!b)throw Error(c(189))}}if(n.alternate!==a)throw Error(c(190))}if(n.tag!==3)throw Error(c(188));return n.stateNode.current===n?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,v=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),G=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var je=Symbol.for("react.client.reference");function Me(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case X:return"Profiler";case L:return"StrictMode";case Z:return"Suspense";case M:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case G:return e.displayName||"Context";case J:return(e._context.displayName||"Context")+".Consumer";case O:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:Me(e.type)||"Memo";case H:t=e._payload,e=e._init;try{return Me(e(t))}catch{}}return null}var Ce=Array.isArray,A=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},be=[],ye=-1;function N(e){return{current:e}}function V(e){0>ye||(e.current=be[ye],be[ye]=null,ye--)}function re(e,t){ye++,be[ye]=e.current,e.current=t}var me=N(null),Ne=N(null),ve=N(null),De=N(null);function yt(e,t){switch(re(ve,t),re(Ne,e),re(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yg(t),e=Xg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(me),re(me,e)}function Xe(){V(me),V(Ne),V(ve)}function Ve(e){e.memoizedState!==null&&re(De,e);var t=me.current,n=Xg(t,e.type);t!==n&&(re(Ne,e),re(me,n))}function $e(e){Ne.current===e&&(V(me),V(Ne)),De.current===e&&(V(De),vo._currentValue=z)}var It,rt;function fn(e){if(It===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);It=t&&t[1]||"",rt=-1<n.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+It+e+rt}var ft=!1;function dn(e,t){if(!e||ft)return"";ft=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={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(te){var F=te}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(te){F=te}e.call(oe.prototype)}}else{try{throw Error()}catch(te){F=te}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(te){if(te&&F&&typeof te.stack=="string")return[te.stack,F.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=a.DetermineComponentFrameRoot(),b=f[0],j=f[1];if(b&&j){var R=b.split(`
45
+ `),K=j.split(`
46
+ `);for(u=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;u<K.length&&!K[u].includes("DetermineComponentFrameRoot");)u++;if(a===R.length||u===K.length)for(a=R.length-1,u=K.length-1;1<=a&&0<=u&&R[a]!==K[u];)u--;for(;1<=a&&0<=u;a--,u--)if(R[a]!==K[u]){if(a!==1||u!==1)do if(a--,u--,0>u||R[a]!==K[u]){var ae=`
47
+ `+R[a].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=a&&0<=u);break}}}finally{ft=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?fn(n):""}function jn(e,t){switch(e.tag){case 26:case 27:case 5:return fn(e.type);case 16:return fn("Lazy");case 13:return e.child!==t&&t!==null?fn("Suspense Fallback"):fn("Suspense");case 19:return fn("SuspenseList");case 0:case 15:return dn(e.type,!1);case 11:return dn(e.type.render,!1);case 1:return dn(e.type,!0);case 31:return fn("Activity");default:return""}}function bn(e){try{var t="",n=null;do t+=jn(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
48
+ Error generating stack: `+a.message+`
49
+ `+a.stack}}var Pt=Object.prototype.hasOwnProperty,tt=s.unstable_scheduleCallback,et=s.unstable_cancelCallback,en=s.unstable_shouldYield,Xt=s.unstable_requestPaint,nt=s.unstable_now,St=s.unstable_getCurrentPriorityLevel,Vt=s.unstable_ImmediatePriority,rn=s.unstable_UserBlockingPriority,wt=s.unstable_NormalPriority,xn=s.unstable_LowPriority,qt=s.unstable_IdlePriority,hn=s.log,Dn=s.unstable_setDisableYieldValue,Gt=null,ct=null;function Ct(e){if(typeof hn=="function"&&Dn(e),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(Gt,e)}catch{}}var Pe=Math.clz32?Math.clz32:ge,Sl=Math.log,le=Math.LN2;function ge(e){return e>>>=0,e===0?32:31-(Sl(e)/le|0)|0}var He=256,B=262144,P=4194304;function _e(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ie(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var u=0,f=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var j=a&134217727;return j!==0?(a=j&~f,a!==0?u=_e(a):(b&=j,b!==0?u=_e(b):n||(n=j&~e,n!==0&&(u=_e(n))))):(j=a&~f,j!==0?u=_e(j):b!==0?u=_e(b):n||(n=a&~e,n!==0&&(u=_e(n)))),u===0?0:t!==0&&t!==u&&(t&f)===0&&(f=u&-u,n=t&-t,f>=n||f===32&&(n&4194048)!==0)?t:u}function Lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ul(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 On(){var e=P;return P<<=1,(P&62914560)===0&&(P=4194304),e}function fl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ll(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hl(e,t,n,a,u,f){var b=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var j=e.entanglements,R=e.expirationTimes,K=e.hiddenUpdates;for(n=b&~n;0<n;){var ae=31-Pe(n),oe=1<<ae;j[ae]=0,R[ae]=-1;var F=K[ae];if(F!==null)for(K[ae]=null,ae=0;ae<F.length;ae++){var te=F[ae];te!==null&&(te.lane&=-536870913)}n&=~oe}a!==0&&hs(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(b&~t))}function hs(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Pe(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function dl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Pe(n),u=1<<a;u&t|e[a]&t&&(e[a]|=t),n&=~u}}function sl(e,t){var n=t&-t;return n=(n&42)!==0?1:hl(n),(n&(e.suspendedLanes|t))!==0?0:n}function hl(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 Yt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $t(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:hb(e.type))}function wl(e,t){var n=ce.p;try{return ce.p=e,t()}finally{ce.p=n}}var kt=Math.random().toString(36).slice(2),Qt="__reactFiber$"+kt,Oe="__reactProps$"+kt,At="__reactContainer$"+kt,qn="__reactEvents$"+kt,tn="__reactListeners$"+kt,Ln="__reactHandles$"+kt,al="__reactResources$"+kt,Sn="__reactMarker$"+kt;function Bl(e){delete e[Qt],delete e[Oe],delete e[qn],delete e[tn],delete e[Ln]}function il(e){var t=e[Qt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[At]||n[Qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Jg(e);e!==null;){if(n=e[Qt])return n;e=Jg(e)}return t}e=n,n=e.parentNode}return null}function nn(e){if(e=e[Qt]||e[At]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function cn(e){var t=e[al];return t||(t=e[al]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Fe(e){e[Sn]=!0}var pl=new Set,Ds={};function Gn(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(Ds[e]=t,e=0;e<t.length;e++)pl.add(t[e])}var ps=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]*$"),ms={},pn={};function Fl(e){return Pt.call(pn,e)?!0:Pt.call(ms,e)?!1:ps.test(e)?pn[e]=!0:(ms[e]=!0,!1)}function Zn(e,t,n){if(Fl(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function zn(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function wn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Os(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ri(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(b){n=""+b,f.call(this,b)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(b){n=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ls(e){if(!e._valueTracker){var t=Os(e)?"checked":"value";e._valueTracker=Ri(e,t,""+e[t])}}function Yn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Os(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var La=/[\n"\\]/g;function kn(e){return e.replace(La,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ln(e,t,n,a,u,f,b,j){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?lt(e,b,zt(t)):n!=null?lt(e,b,zt(n)):a!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?e.name=""+zt(j):e.removeAttribute("name")}function Jl(e,t,n,a,u,f,b,j){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||n!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){Ls(e);return}n=n!=null?""+zt(n):"",t=t!=null?""+zt(t):n,j||t===e.value||(e.value=t),e.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=j?e.checked:!!a,e.defaultChecked=!!a,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Ls(e)}function lt(e,t,n){t==="number"&&kl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Xn(e,t,n,a){if(e=e.options,t){t={};for(var u=0;u<n.length;u++)t["$"+n[u]]=!0;for(n=0;n<e.length;n++)u=t.hasOwnProperty("$"+e[n].value),e[n].selected!==u&&(e[n].selected=u),u&&a&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,u=0;u<e.length;u++){if(e[u].value===n){e[u].selected=!0,a&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function pe(e,t,n){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zt(n):""}function k(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(c(92));if(Ce(a)){if(1<a.length)throw Error(c(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=zt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Ls(e)}function Y(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fe=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 we(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||fe.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ae(e,t,n){if(t!=null&&typeof t!="object")throw Error(c(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var u in t)a=t[u],t.hasOwnProperty(u)&&n[u]!==a&&we(e,u,a)}else for(var f in t)t.hasOwnProperty(f)&&we(e,f,t[f])}function ze(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 dt=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),w=/^[\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 se(e){return w.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ke(){}var Je=null;function ht(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gs=null,za=null;function mr(e){var t=nn(e);if(t&&(e=t.stateNode)){var n=e[Oe]||null;e:switch(e=t.stateNode,t.type){case"input":if(ln(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+kn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var u=a[Oe]||null;if(!u)throw Error(c(90));ln(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Yn(a)}break e;case"textarea":pe(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Xn(e,!!n.multiple,t,!1)}}}var Ua=!1;function jc(e,t,n){if(Ua)return e(t,n);Ua=!0;try{var a=e(t);return a}finally{if(Ua=!1,(gs!==null||za!==null)&&(Iu(),gs&&(t=gs,e=za,za=gs=null,mr(t),e)))for(t=0;t<e.length;t++)mr(e[t])}}function zs(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Oe]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(c(231,t,typeof n));return n}var Wl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bs=!1;if(Wl)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){bs=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{bs=!1}var Us=null,Di=null,ia=null;function gr(){if(ia)return ia;var e,t=Di,n=t.length,a,u="value"in Us?Us.value:Us.textContent,f=u.length;for(e=0;e<n&&t[e]===u[e];e++);var b=n-e;for(a=1;a<=b&&t[n-a]===u[f-a];a++);return ia=u.slice(e,1<a?1-a:void 0)}function Oi(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 ra(){return!0}function ca(){return!1}function Vn(e){function t(n,a,u,f,b){this._reactName=n,this._targetInst=u,this.type=a,this.nativeEvent=f,this.target=b,this.currentTarget=null;for(var j in e)e.hasOwnProperty(j)&&(n=e[j],this[j]=n?n(f):f[j]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?ra:ca,this.isPropagationStopped=ca,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ra)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ra)},persist:function(){},isPersistent:ra}),t}var Pl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hs=Vn(Pl),Li=S({},Pl,{view:0,detail:0}),br=Vn(Li),Sc,Ha,Bs,Ba=S({},Li,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:da,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!==Bs&&(Bs&&e.type==="mousemove"?(Sc=e.screenX-Bs.screenX,Ha=e.screenY-Bs.screenY):Ha=Sc=0,Bs=e),Sc)},movementY:function(e){return"movementY"in e?e.movementY:Ha}}),Ia=Vn(Ba),oa=S({},Ba,{dataTransfer:0}),xr=Vn(oa),wc=S({},Li,{relatedTarget:0}),kc=Vn(wc),ua=S({},Pl,{animationName:0,elapsedTime:0,pseudoElement:0}),yr=Vn(ua),Xo=S({},Pl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_r=Vn(Xo),Vo=S({},Pl,{data:0}),zi=Vn(Vo),ys={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vr={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"},Ui={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fa(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ui[e])?!!t[e]:!1}function da(){return fa}var sn=S({},Li,{key:function(e){if(e.key){var t=ys[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:da,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nc=Vn(sn),Qf=S({},Ba,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$o=Vn(Qf),Qo=S({},Li,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:da}),jr=Vn(Qo),Un=S({},Pl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Hi=Vn(Un),Bi=S({},Ba,{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}),Ko=Vn(Bi),Nn=S({},Pl,{newState:0,oldState:0}),Zo=Vn(Nn),Fo=[9,13,27,32],Il=Wl&&"CompositionEvent"in window,qa=null;Wl&&"documentMode"in document&&(qa=document.documentMode);var Sr=Wl&&"TextEvent"in window&&!qa,Ii=Wl&&(!Il||qa&&8<qa&&11>=qa),Ga=" ",Is=!1;function Tc(e,t){switch(e){case"keyup":return Fo.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ya(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _s=!1;function qi(e,t){switch(e){case"compositionend":return Ya(t);case"keypress":return t.which!==32?null:(Is=!0,Ga);case"textInput":return e=t.data,e===Ga&&Is?null:e;default:return null}}function Gi(e,t){if(_s)return e==="compositionend"||!Il&&Tc(e,t)?(e=gr(),ia=Di=Us=null,_s=!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 Ii&&t.locale!=="ko"?null:t.data;default:return null}}var Jo={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 Xa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jo[e.type]:t==="textarea"}function Wo(e,t,n,a){gs?za?za.push(a):za=[a]:gs=a,t=Qu(t,"onChange"),0<t.length&&(n=new Hs("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var ee=null,es=null;function Ec(e){Ug(e,0)}function wr(e){var t=Kt(e);if(Yn(t))return e}function Po(e,t){if(e==="change")return t}var Q=!1;if(Wl){var ha;if(Wl){var pa="oninput"in document;if(!pa){var Cc=document.createElement("div");Cc.setAttribute("oninput","return;"),pa=typeof Cc.oninput=="function"}ha=pa}else ha=!1;Q=ha&&(!document.documentMode||9<document.documentMode)}function Ac(){ee&&(ee.detachEvent("onpropertychange",eu),es=ee=null)}function eu(e){if(e.propertyName==="value"&&wr(es)){var t=[];Wo(t,es,e,ht(e)),jc(Ec,t)}}function Va(e,t,n){e==="focusin"?(Ac(),ee=t,es=n,ee.attachEvent("onpropertychange",eu)):e==="focusout"&&Ac()}function Kf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wr(es)}function Zf(e,t){if(e==="click")return wr(t)}function Ff(e,t){if(e==="input"||e==="change")return wr(t)}function Jf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ml=typeof Object.is=="function"?Object.is:Jf;function ts(e,t){if(ml(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var u=n[a];if(!Pt.call(t,u)||!ml(e[u],t[u]))return!1}return!0}function tu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nu(e,t){var n=tu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=tu(n)}}function lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function su(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=kl(e.document)}return t}function Mc(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 Wf=Wl&&"documentMode"in document&&11>=document.documentMode,$a=null,Rc=null,ma=null,Dc=!1;function au(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dc||$a==null||$a!==kl(a)||(a=$a,"selectionStart"in a&&Mc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ma&&ts(ma,a)||(ma=a,a=Qu(Rc,"onSelect"),0<a.length&&(t=new Hs("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=$a)))}function vs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qa={animationend:vs("Animation","AnimationEnd"),animationiteration:vs("Animation","AnimationIteration"),animationstart:vs("Animation","AnimationStart"),transitionrun:vs("Transition","TransitionRun"),transitionstart:vs("Transition","TransitionStart"),transitioncancel:vs("Transition","TransitionCancel"),transitionend:vs("Transition","TransitionEnd")},Oc={},Yi={};Wl&&(Yi=document.createElement("div").style,"AnimationEvent"in window||(delete Qa.animationend.animation,delete Qa.animationiteration.animation,delete Qa.animationstart.animation),"TransitionEvent"in window||delete Qa.transitionend.transition);function ga(e){if(Oc[e])return Oc[e];if(!Qa[e])return e;var t=Qa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yi)return Oc[e]=t[n];return e}var Lc=ga("animationend"),zc=ga("animationiteration"),Uc=ga("animationstart"),iu=ga("transitionrun"),Pf=ga("transitionstart"),ru=ga("transitioncancel"),Hc=ga("transitionend"),cu=new Map,kr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");kr.push("scrollEnd");function gl(e,t){cu.set(e,t),Gn(t,[e])}var Nr=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)},Nl=[],Ka=0,Bc=0;function qs(){for(var e=Ka,t=Bc=Ka=0;t<e;){var n=Nl[t];Nl[t++]=null;var a=Nl[t];Nl[t++]=null;var u=Nl[t];Nl[t++]=null;var f=Nl[t];if(Nl[t++]=null,a!==null&&u!==null){var b=a.pending;b===null?u.next=u:(u.next=b.next,b.next=u),a.pending=u}f!==0&&ou(n,u,f)}}function Xi(e,t,n,a){Nl[Ka++]=e,Nl[Ka++]=t,Nl[Ka++]=n,Nl[Ka++]=a,Bc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ic(e,t,n,a){return Xi(e,t,n,a),Tr(e)}function Gs(e,t){return Xi(e,null,null,t),Tr(e)}function ou(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var u=!1,f=e.return;f!==null;)f.childLanes|=n,a=f.alternate,a!==null&&(a.childLanes|=n),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&t!==null&&(u=31-Pe(n),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[t]:a.push(t),t.lane=n|536870912),f):null}function Tr(e){if(50<po)throw po=0,Jd=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Za={};function ed(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bl(e,t,n,a){return new ed(e,t,n,a)}function qc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function js(e,t){var n=e.alternate;return n===null?(n=bl(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function uu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Er(e,t,n,a,u,f){var b=0;if(a=e,typeof e=="function")qc(e)&&(b=1);else if(typeof e=="string")b=e0(e,n,me.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=bl(31,n,t,u),e.elementType=ne,e.lanes=f,e;case C:return ba(n.children,u,f,t);case L:b=8,u|=24;break;case X:return e=bl(12,n,t,u|2),e.elementType=X,e.lanes=f,e;case Z:return e=bl(13,n,t,u),e.elementType=Z,e.lanes=f,e;case M:return e=bl(19,n,t,u),e.elementType=M,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:b=10;break e;case J:b=9;break e;case O:b=11;break e;case D:b=14;break e;case H:b=16,a=null;break e}b=29,n=Error(c(130,e===null?"null":typeof e,"")),a=null}return t=bl(b,n,t,u),t.elementType=e,t.type=a,t.lanes=f,t}function ba(e,t,n,a){return e=bl(7,e,a,t),e.lanes=n,e}function Gc(e,t,n){return e=bl(6,e,null,t),e.lanes=n,e}function fu(e){var t=bl(18,null,null,0);return t.stateNode=e,t}function Cr(e,t,n){return t=bl(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var du=new WeakMap;function Tl(e,t){if(typeof e=="object"&&e!==null){var n=du.get(e);return n!==void 0?n:(t={value:e,source:t,stack:bn(t)},du.set(e,t),t)}return{value:e,source:t,stack:bn(t)}}var Fa=[],Ja=0,Wa=null,xa=0,Fn=[],El=0,Ys=null,ns=1,ls="";function Ss(e,t){Fa[Ja++]=xa,Fa[Ja++]=Wa,Wa=e,xa=t}function hu(e,t,n){Fn[El++]=ns,Fn[El++]=ls,Fn[El++]=Ys,Ys=e;var a=ns;e=ls;var u=32-Pe(a)-1;a&=~(1<<u),n+=1;var f=32-Pe(t)+u;if(30<f){var b=u-u%5;f=(a&(1<<b)-1).toString(32),a>>=b,u-=b,ns=1<<32-Pe(t)+u|n<<u|a,ls=f+e}else ns=1<<f|n<<u|a,ls=e}function Yc(e){e.return!==null&&(Ss(e,1),hu(e,1,0))}function Xc(e){for(;e===Wa;)Wa=Fa[--Ja],Fa[Ja]=null,xa=Fa[--Ja],Fa[Ja]=null;for(;e===Ys;)Ys=Fn[--El],Fn[El]=null,ls=Fn[--El],Fn[El]=null,ns=Fn[--El],Fn[El]=null}function pu(e,t){Fn[El++]=ns,Fn[El++]=ls,Fn[El++]=Ys,ns=t.id,ls=t.overflow,Ys=e}var Hn=null,Ut=null,st=!1,Xs=null,Cl=!1,Vc=Error(c(519));function Vs(e){var t=Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Jn(Tl(t,e)),Vc}function mu(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Qt]=e,t[Oe]=a,n){case"dialog":it("cancel",t),it("close",t);break;case"iframe":case"object":case"embed":it("load",t);break;case"video":case"audio":for(n=0;n<go.length;n++)it(go[n],t);break;case"source":it("error",t);break;case"img":case"image":case"link":it("error",t),it("load",t);break;case"details":it("toggle",t);break;case"input":it("invalid",t),Jl(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":it("invalid",t);break;case"textarea":it("invalid",t),k(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||qg(t.textContent,n)?(a.popover!=null&&(it("beforetoggle",t),it("toggle",t)),a.onScroll!=null&&it("scroll",t),a.onScrollEnd!=null&&it("scrollend",t),a.onClick!=null&&(t.onclick=ke),t=!0):t=!1,t||Vs(e,!0)}function $c(e){for(Hn=e.return;Hn;)switch(Hn.tag){case 5:case 31:case 13:Cl=!1;return;case 27:case 3:Cl=!0;return;default:Hn=Hn.return}}function ya(e){if(e!==Hn)return!1;if(!st)return $c(e),st=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||dh(e.type,e.memoizedProps)),n=!n),n&&Ut&&Vs(e),$c(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ut=Fg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ut=Fg(e)}else t===27?(t=Ut,gi(e.type)?(e=bh,bh=null,Ut=e):Ut=t):Ut=Hn?cs(e.stateNode.nextSibling):null;return!0}function ss(){Ut=Hn=null,st=!1}function xl(){var e=Xs;return e!==null&&(Ll===null?Ll=e:Ll.push.apply(Ll,e),Xs=null),e}function Jn(e){Xs===null?Xs=[e]:Xs.push(e)}var Wn=N(null),$s=null,ql=null;function ws(e,t,n){re(Wn,t._currentValue),t._currentValue=n}function Al(e){e._currentValue=Wn.current,V(Wn)}function Ar(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Qc(e,t,n,a){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var b=u.child;f=f.firstContext;e:for(;f!==null;){var j=f;f=u;for(var R=0;R<t.length;R++)if(j.context===t[R]){f.lanes|=n,j=f.alternate,j!==null&&(j.lanes|=n),Ar(f.return,n,e),a||(b=null);break e}f=j.next}}else if(u.tag===18){if(b=u.return,b===null)throw Error(c(341));b.lanes|=n,f=b.alternate,f!==null&&(f.lanes|=n),Ar(b,n,e),b=null}else b=u.child;if(b!==null)b.return=u;else for(b=u;b!==null;){if(b===e){b=null;break}if(u=b.sibling,u!==null){u.return=b.return,b=u;break}b=b.return}u=b}}function as(e,t,n,a){e=null;for(var u=t,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var b=u.alternate;if(b===null)throw Error(c(387));if(b=b.memoizedProps,b!==null){var j=u.type;ml(u.pendingProps.value,b.value)||(e!==null?e.push(j):e=[j])}}else if(u===De.current){if(b=u.alternate,b===null)throw Error(c(387));b.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(vo):e=[vo])}u=u.return}e!==null&&Qc(t,e,n,a),t.flags|=262144}function Vi(e){for(e=e.firstContext;e!==null;){if(!ml(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){$s=e,ql=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function yn(e){return Pa($s,e)}function Mr(e,t){return $s===null&&_a(e),Pa(e,t)}function Pa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ql===null){if(e===null)throw Error(c(308));ql=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ql=ql.next=t;return n}var ei=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},td=s.unstable_scheduleCallback,gu=s.unstable_NormalPriority,on={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Kc(){return{controller:new ei,data:new Map,refCount:0}}function $i(e){e.refCount--,e.refCount===0&&td(gu,function(){e.controller.abort()})}var ti=null,Rr=0,ni=0,li=null;function nd(e,t){if(ti===null){var n=ti=[];Rr=0,ni=lh(),li={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Rr++,t.then(Dr,Dr),t}function Dr(){if(--Rr===0&&ti!==null){li!==null&&(li.status="fulfilled");var e=ti;ti=null,ni=0,li=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function bu(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(u){n.push(u)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var u=0;u<n.length;u++)(0,n[u])(t)},function(u){for(a.status="rejected",a.reason=u,u=0;u<n.length;u++)(0,n[u])(void 0)}),a}var xu=A.S;A.S=function(e,t){fg=nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&nd(e,t),xu!==null&&xu(e,t)};var Ml=N(null);function Qi(){var e=Ml.current;return e!==null?e:Bt.pooledCache}function Or(e,t){t===null?re(Ml,Ml.current):re(Ml,t.pool)}function Zc(){var e=Qi();return e===null?null:{parent:on._currentValue,pool:e}}var p=Error(c(460)),I=Error(c(474)),de=Error(c(542)),Be={then:function(){}};function Ht(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Tn(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ke,ke),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jc(e),e;default:if(typeof t.status=="string")t.then(ke,ke);else{if(e=Bt,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=a}},function(a){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jc(e),e}throw Gl=t,p}}function Bn(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Gl=n,p):n}}var Gl=null;function Fc(){if(Gl===null)throw Error(c(459));var e=Gl;return Gl=null,e}function Jc(e){if(e===p||e===de)throw Error(c(483))}var xe=null,Te=0;function Ge(e){var t=Te;return Te+=1,xe===null&&(xe=[]),Tn(xe,e,t)}function pt(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nt(e,t){throw t.$$typeof===v?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function is(e){function t(q,U){if(e){var $=q.deletions;$===null?(q.deletions=[U],q.flags|=16):$.push(U)}}function n(q,U){if(!e)return null;for(;U!==null;)t(q,U),U=U.sibling;return null}function a(q){for(var U=new Map;q!==null;)q.key!==null?U.set(q.key,q):U.set(q.index,q),q=q.sibling;return U}function u(q,U){return q=js(q,U),q.index=0,q.sibling=null,q}function f(q,U,$){return q.index=$,e?($=q.alternate,$!==null?($=$.index,$<U?(q.flags|=67108866,U):$):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function b(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function j(q,U,$,ie){return U===null||U.tag!==6?(U=Gc($,q.mode,ie),U.return=q,U):(U=u(U,$),U.return=q,U)}function R(q,U,$,ie){var Ue=$.type;return Ue===C?ae(q,U,$.props.children,ie,$.key):U!==null&&(U.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===H&&Bn(Ue)===U.type)?(U=u(U,$.props),pt(U,$),U.return=q,U):(U=Er($.type,$.key,$.props,null,q.mode,ie),pt(U,$),U.return=q,U)}function K(q,U,$,ie){return U===null||U.tag!==4||U.stateNode.containerInfo!==$.containerInfo||U.stateNode.implementation!==$.implementation?(U=Cr($,q.mode,ie),U.return=q,U):(U=u(U,$.children||[]),U.return=q,U)}function ae(q,U,$,ie,Ue){return U===null||U.tag!==7?(U=ba($,q.mode,ie,Ue),U.return=q,U):(U=u(U,$),U.return=q,U)}function oe(q,U,$){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=Gc(""+U,q.mode,$),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case E:return $=Er(U.type,U.key,U.props,null,q.mode,$),pt($,U),$.return=q,$;case T:return U=Cr(U,q.mode,$),U.return=q,U;case H:return U=Bn(U),oe(q,U,$)}if(Ce(U)||ue(U))return U=ba(U,q.mode,$,null),U.return=q,U;if(typeof U.then=="function")return oe(q,Ge(U),$);if(U.$$typeof===G)return oe(q,Mr(q,U),$);Nt(q,U)}return null}function F(q,U,$,ie){var Ue=U!==null?U.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return Ue!==null?null:j(q,U,""+$,ie);if(typeof $=="object"&&$!==null){switch($.$$typeof){case E:return $.key===Ue?R(q,U,$,ie):null;case T:return $.key===Ue?K(q,U,$,ie):null;case H:return $=Bn($),F(q,U,$,ie)}if(Ce($)||ue($))return Ue!==null?null:ae(q,U,$,ie,null);if(typeof $.then=="function")return F(q,U,Ge($),ie);if($.$$typeof===G)return F(q,U,Mr(q,$),ie);Nt(q,$)}return null}function te(q,U,$,ie,Ue){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return q=q.get($)||null,j(U,q,""+ie,Ue);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case E:return q=q.get(ie.key===null?$:ie.key)||null,R(U,q,ie,Ue);case T:return q=q.get(ie.key===null?$:ie.key)||null,K(U,q,ie,Ue);case H:return ie=Bn(ie),te(q,U,$,ie,Ue)}if(Ce(ie)||ue(ie))return q=q.get($)||null,ae(U,q,ie,Ue,null);if(typeof ie.then=="function")return te(q,U,$,Ge(ie),Ue);if(ie.$$typeof===G)return te(q,U,$,Mr(U,ie),Ue);Nt(U,ie)}return null}function Re(q,U,$,ie){for(var Ue=null,bt=null,Le=U,We=U=0,ut=null;Le!==null&&We<$.length;We++){Le.index>We?(ut=Le,Le=null):ut=Le.sibling;var xt=F(q,Le,$[We],ie);if(xt===null){Le===null&&(Le=ut);break}e&&Le&&xt.alternate===null&&t(q,Le),U=f(xt,U,We),bt===null?Ue=xt:bt.sibling=xt,bt=xt,Le=ut}if(We===$.length)return n(q,Le),st&&Ss(q,We),Ue;if(Le===null){for(;We<$.length;We++)Le=oe(q,$[We],ie),Le!==null&&(U=f(Le,U,We),bt===null?Ue=Le:bt.sibling=Le,bt=Le);return st&&Ss(q,We),Ue}for(Le=a(Le);We<$.length;We++)ut=te(Le,q,We,$[We],ie),ut!==null&&(e&&ut.alternate!==null&&Le.delete(ut.key===null?We:ut.key),U=f(ut,U,We),bt===null?Ue=ut:bt.sibling=ut,bt=ut);return e&&Le.forEach(function(vi){return t(q,vi)}),st&&Ss(q,We),Ue}function qe(q,U,$,ie){if($==null)throw Error(c(151));for(var Ue=null,bt=null,Le=U,We=U=0,ut=null,xt=$.next();Le!==null&&!xt.done;We++,xt=$.next()){Le.index>We?(ut=Le,Le=null):ut=Le.sibling;var vi=F(q,Le,xt.value,ie);if(vi===null){Le===null&&(Le=ut);break}e&&Le&&vi.alternate===null&&t(q,Le),U=f(vi,U,We),bt===null?Ue=vi:bt.sibling=vi,bt=vi,Le=ut}if(xt.done)return n(q,Le),st&&Ss(q,We),Ue;if(Le===null){for(;!xt.done;We++,xt=$.next())xt=oe(q,xt.value,ie),xt!==null&&(U=f(xt,U,We),bt===null?Ue=xt:bt.sibling=xt,bt=xt);return st&&Ss(q,We),Ue}for(Le=a(Le);!xt.done;We++,xt=$.next())xt=te(Le,q,We,xt.value,ie),xt!==null&&(e&&xt.alternate!==null&&Le.delete(xt.key===null?We:xt.key),U=f(xt,U,We),bt===null?Ue=xt:bt.sibling=xt,bt=xt);return e&&Le.forEach(function(f0){return t(q,f0)}),st&&Ss(q,We),Ue}function Dt(q,U,$,ie){if(typeof $=="object"&&$!==null&&$.type===C&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case E:e:{for(var Ue=$.key;U!==null;){if(U.key===Ue){if(Ue=$.type,Ue===C){if(U.tag===7){n(q,U.sibling),ie=u(U,$.props.children),ie.return=q,q=ie;break e}}else if(U.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===H&&Bn(Ue)===U.type){n(q,U.sibling),ie=u(U,$.props),pt(ie,$),ie.return=q,q=ie;break e}n(q,U);break}else t(q,U);U=U.sibling}$.type===C?(ie=ba($.props.children,q.mode,ie,$.key),ie.return=q,q=ie):(ie=Er($.type,$.key,$.props,null,q.mode,ie),pt(ie,$),ie.return=q,q=ie)}return b(q);case T:e:{for(Ue=$.key;U!==null;){if(U.key===Ue)if(U.tag===4&&U.stateNode.containerInfo===$.containerInfo&&U.stateNode.implementation===$.implementation){n(q,U.sibling),ie=u(U,$.children||[]),ie.return=q,q=ie;break e}else{n(q,U);break}else t(q,U);U=U.sibling}ie=Cr($,q.mode,ie),ie.return=q,q=ie}return b(q);case H:return $=Bn($),Dt(q,U,$,ie)}if(Ce($))return Re(q,U,$,ie);if(ue($)){if(Ue=ue($),typeof Ue!="function")throw Error(c(150));return $=Ue.call($),qe(q,U,$,ie)}if(typeof $.then=="function")return Dt(q,U,Ge($),ie);if($.$$typeof===G)return Dt(q,U,Mr(q,$),ie);Nt(q,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,U!==null&&U.tag===6?(n(q,U.sibling),ie=u(U,$),ie.return=q,q=ie):(n(q,U),ie=Gc($,q.mode,ie),ie.return=q,q=ie),b(q)):n(q,U)}return function(q,U,$,ie){try{Te=0;var Ue=Dt(q,U,$,ie);return xe=null,Ue}catch(Le){if(Le===p||Le===de)throw Le;var bt=bl(29,Le,null,q.mode);return bt.lanes=ie,bt.return=q,bt}finally{}}}var ks=is(!0),Lp=is(!1),si=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sd(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 ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ii(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_t&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Tr(e),ou(e,null,n),t}return Xi(e,a,t,n),Tr(e)}function Wc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dl(e,n)}}function ad(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var u=null,f=null;if(n=n.firstBaseUpdate,n!==null){do{var b={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};f===null?u=f=b:f=f.next=b,n=n.next}while(n!==null);f===null?u=f=t:f=f.next=t}else u=f=t;n={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var id=!1;function Pc(){if(id){var e=li;if(e!==null)throw e}}function eo(e,t,n,a){id=!1;var u=e.updateQueue;si=!1;var f=u.firstBaseUpdate,b=u.lastBaseUpdate,j=u.shared.pending;if(j!==null){u.shared.pending=null;var R=j,K=R.next;R.next=null,b===null?f=K:b.next=K,b=R;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,j=ae.lastBaseUpdate,j!==b&&(j===null?ae.firstBaseUpdate=K:j.next=K,ae.lastBaseUpdate=R))}if(f!==null){var oe=u.baseState;b=0,ae=K=R=null,j=f;do{var F=j.lane&-536870913,te=F!==j.lane;if(te?(ot&F)===F:(a&F)===F){F!==0&&F===ni&&(id=!0),ae!==null&&(ae=ae.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Re=e,qe=j;F=t;var Dt=n;switch(qe.tag){case 1:if(Re=qe.payload,typeof Re=="function"){oe=Re.call(Dt,oe,F);break e}oe=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=qe.payload,F=typeof Re=="function"?Re.call(Dt,oe,F):Re,F==null)break e;oe=S({},oe,F);break e;case 2:si=!0}}F=j.callback,F!==null&&(e.flags|=64,te&&(e.flags|=8192),te=u.callbacks,te===null?u.callbacks=[F]:te.push(F))}else te={lane:F,tag:j.tag,payload:j.payload,callback:j.callback,next:null},ae===null?(K=ae=te,R=oe):ae=ae.next=te,b|=F;if(j=j.next,j===null){if(j=u.shared.pending,j===null)break;te=j,j=te.next,te.next=null,u.lastBaseUpdate=te,u.shared.pending=null}}while(!0);ae===null&&(R=oe),u.baseState=R,u.firstBaseUpdate=K,u.lastBaseUpdate=ae,f===null&&(u.shared.lanes=0),fi|=b,e.lanes=b,e.memoizedState=oe}}function zp(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function Up(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)zp(n[e],t)}var Lr=N(null),yu=N(0);function Hp(e,t){e=Ca,re(yu,e),re(Lr,t),Ca=e|t.baseLanes}function rd(){re(yu,Ca),re(Lr,Lr.current)}function cd(){Ca=yu.current,V(Lr),V(yu)}var Yl=N(null),rs=null;function ri(e){var t=e.alternate;re(_n,_n.current&1),re(Yl,e),rs===null&&(t===null||Lr.current!==null||t.memoizedState!==null)&&(rs=e)}function od(e){re(_n,_n.current),re(Yl,e),rs===null&&(rs=e)}function Bp(e){e.tag===22?(re(_n,_n.current),re(Yl,e),rs===null&&(rs=e)):ci()}function ci(){re(_n,_n.current),re(Yl,Yl.current)}function Xl(e){V(Yl),rs===e&&(rs=null),V(_n)}var _n=N(0);function _u(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mh(n)||gh(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==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 va=0,Ze=null,Mt=null,En=null,vu=!1,zr=!1,Ki=!1,ju=0,to=0,Ur=null,t_=0;function mn(){throw Error(c(321))}function ud(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ml(e[n],t[n]))return!1;return!0}function fd(e,t,n,a,u,f){return va=f,Ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?jm:Nd,Ki=!1,f=n(a,u),Ki=!1,zr&&(f=qp(t,n,a,u)),Ip(e),f}function Ip(e){A.H=so;var t=Mt!==null&&Mt.next!==null;if(va=0,En=Mt=Ze=null,vu=!1,to=0,Ur=null,t)throw Error(c(300));e===null||Cn||(e=e.dependencies,e!==null&&Vi(e)&&(Cn=!0))}function qp(e,t,n,a){Ze=e;var u=0;do{if(zr&&(Ur=null),to=0,zr=!1,25<=u)throw Error(c(301));if(u+=1,En=Mt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}A.H=Sm,f=t(n,a)}while(zr);return f}function n_(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?no(t):t,e=e.useState()[0],(Mt!==null?Mt.memoizedState:null)!==e&&(Ze.flags|=1024),t}function dd(){var e=ju!==0;return ju=0,e}function hd(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function pd(e){if(vu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vu=!1}va=0,En=Mt=Ze=null,zr=!1,to=ju=0,Ur=null}function yl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return En===null?Ze.memoizedState=En=e:En=En.next=e,En}function vn(){if(Mt===null){var e=Ze.alternate;e=e!==null?e.memoizedState:null}else e=Mt.next;var t=En===null?Ze.memoizedState:En.next;if(t!==null)En=t,Mt=e;else{if(e===null)throw Ze.alternate===null?Error(c(467)):Error(c(310));Mt=e,e={memoizedState:Mt.memoizedState,baseState:Mt.baseState,baseQueue:Mt.baseQueue,queue:Mt.queue,next:null},En===null?Ze.memoizedState=En=e:En=En.next=e}return En}function Su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function no(e){var t=to;return to+=1,Ur===null&&(Ur=[]),e=Tn(Ur,e,t),t=Ze,(En===null?t.memoizedState:En.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?jm:Nd),e}function wu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return no(e);if(e.$$typeof===G)return yn(e)}throw Error(c(438,String(e)))}function md(e){var t=null,n=Ze.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ze.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Su(),Ze.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=he;return t.index++,n}function ja(e,t){return typeof t=="function"?t(e):t}function ku(e){var t=vn();return gd(t,Mt,e)}function gd(e,t,n){var a=e.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=n;var u=e.baseQueue,f=a.pending;if(f!==null){if(u!==null){var b=u.next;u.next=f.next,f.next=b}t.baseQueue=u=f,a.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var j=b=null,R=null,K=t,ae=!1;do{var oe=K.lane&-536870913;if(oe!==K.lane?(ot&oe)===oe:(va&oe)===oe){var F=K.revertLane;if(F===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),oe===ni&&(ae=!0);else if((va&F)===F){K=K.next,F===ni&&(ae=!0);continue}else oe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},R===null?(j=R=oe,b=f):R=R.next=oe,Ze.lanes|=F,fi|=F;oe=K.action,Ki&&n(f,oe),f=K.hasEagerState?K.eagerState:n(f,oe)}else F={lane:oe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},R===null?(j=R=F,b=f):R=R.next=F,Ze.lanes|=oe,fi|=oe;K=K.next}while(K!==null&&K!==t);if(R===null?b=f:R.next=j,!ml(f,e.memoizedState)&&(Cn=!0,ae&&(n=li,n!==null)))throw n;e.memoizedState=f,e.baseState=b,e.baseQueue=R,a.lastRenderedState=f}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function bd(e){var t=vn(),n=t.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=e;var a=n.dispatch,u=n.pending,f=t.memoizedState;if(u!==null){n.pending=null;var b=u=u.next;do f=e(f,b.action),b=b.next;while(b!==u);ml(f,t.memoizedState)||(Cn=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,a]}function Gp(e,t,n){var a=Ze,u=vn(),f=st;if(f){if(n===void 0)throw Error(c(407));n=n()}else n=t();var b=!ml((Mt||u).memoizedState,n);if(b&&(u.memoizedState=n,Cn=!0),u=u.queue,_d(Vp.bind(null,a,u,e),[e]),u.getSnapshot!==t||b||En!==null&&En.memoizedState.tag&1){if(a.flags|=2048,Hr(9,{destroy:void 0},Xp.bind(null,a,u,n,t),null),Bt===null)throw Error(c(349));f||(va&127)!==0||Yp(a,t,n)}return n}function Yp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ze.updateQueue,t===null?(t=Su(),Ze.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xp(e,t,n,a){t.value=n,t.getSnapshot=a,$p(t)&&Qp(e)}function Vp(e,t,n){return n(function(){$p(t)&&Qp(e)})}function $p(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ml(e,n)}catch{return!0}}function Qp(e){var t=Gs(e,2);t!==null&&zl(t,e,2)}function xd(e){var t=yl();if(typeof e=="function"){var n=e;if(e=n(),Ki){Ct(!0);try{n()}finally{Ct(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:e},t}function Kp(e,t,n,a){return e.baseState=n,gd(e,Mt,typeof a=="function"?a:ja)}function l_(e,t,n,a,u){if(Eu(e))throw Error(c(485));if(e=t.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){f.listeners.push(b)}};A.T!==null?n(!0):f.isTransition=!1,a(f),n=t.pending,n===null?(f.next=t.pending=f,Zp(t,f)):(f.next=n.next,t.pending=n.next=f)}}function Zp(e,t){var n=t.action,a=t.payload,u=e.state;if(t.isTransition){var f=A.T,b={};A.T=b;try{var j=n(u,a),R=A.S;R!==null&&R(b,j),Fp(e,t,j)}catch(K){yd(e,t,K)}finally{f!==null&&b.types!==null&&(f.types=b.types),A.T=f}}else try{f=n(u,a),Fp(e,t,f)}catch(K){yd(e,t,K)}}function Fp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Jp(e,t,a)},function(a){return yd(e,t,a)}):Jp(e,t,n)}function Jp(e,t,n){t.status="fulfilled",t.value=n,Wp(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Zp(e,n)))}function yd(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Wp(t),t=t.next;while(t!==a)}e.action=null}function Wp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pp(e,t){return t}function em(e,t){if(st){var n=Bt.formState;if(n!==null){e:{var a=Ze;if(st){if(Ut){t:{for(var u=Ut,f=Cl;u.nodeType!==8;){if(!f){u=null;break t}if(u=cs(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Ut=cs(u.nextSibling),a=u.data==="F!";break e}}Vs(a)}a=!1}a&&(t=n[0])}}return n=yl(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pp,lastRenderedState:t},n.queue=a,n=ym.bind(null,Ze,a),a.dispatch=n,a=xd(!1),f=kd.bind(null,Ze,!1,a.queue),a=yl(),u={state:t,dispatch:null,action:e,pending:null},a.queue=u,n=l_.bind(null,Ze,u,f,n),u.dispatch=n,a.memoizedState=e,[t,n,!1]}function tm(e){var t=vn();return nm(t,Mt,e)}function nm(e,t,n){if(t=gd(e,t,Pp)[0],e=ku(ja)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=no(t)}catch(b){throw b===p?de:b}else a=t;t=vn();var u=t.queue,f=u.dispatch;return n!==t.memoizedState&&(Ze.flags|=2048,Hr(9,{destroy:void 0},s_.bind(null,u,n),null)),[a,f,e]}function s_(e,t){e.action=t}function lm(e){var t=vn(),n=Mt;if(n!==null)return nm(t,n,e);vn(),t=t.memoizedState,n=vn();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Hr(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ze.updateQueue,t===null&&(t=Su(),Ze.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function sm(){return vn().memoizedState}function Nu(e,t,n,a){var u=yl();Ze.flags|=e,u.memoizedState=Hr(1|t,{destroy:void 0},n,a===void 0?null:a)}function Tu(e,t,n,a){var u=vn();a=a===void 0?null:a;var f=u.memoizedState.inst;Mt!==null&&a!==null&&ud(a,Mt.memoizedState.deps)?u.memoizedState=Hr(t,f,n,a):(Ze.flags|=e,u.memoizedState=Hr(1|t,f,n,a))}function am(e,t){Nu(8390656,8,e,t)}function _d(e,t){Tu(2048,8,e,t)}function a_(e){Ze.flags|=4;var t=Ze.updateQueue;if(t===null)t=Su(),Ze.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function im(e){var t=vn().memoizedState;return a_({ref:t,nextImpl:e}),function(){if((_t&2)!==0)throw Error(c(440));return t.impl.apply(void 0,arguments)}}function rm(e,t){return Tu(4,2,e,t)}function cm(e,t){return Tu(4,4,e,t)}function om(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function um(e,t,n){n=n!=null?n.concat([e]):null,Tu(4,4,om.bind(null,t,e),n)}function vd(){}function fm(e,t){var n=vn();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&ud(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function dm(e,t){var n=vn();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&ud(t,a[1]))return a[0];if(a=e(),Ki){Ct(!0);try{e()}finally{Ct(!1)}}return n.memoizedState=[a,t],a}function jd(e,t,n){return n===void 0||(va&1073741824)!==0&&(ot&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=hg(),Ze.lanes|=e,fi|=e,n)}function hm(e,t,n,a){return ml(n,t)?n:Lr.current!==null?(e=jd(e,n,a),ml(e,t)||(Cn=!0),e):(va&42)===0||(va&1073741824)!==0&&(ot&261930)===0?(Cn=!0,e.memoizedState=n):(e=hg(),Ze.lanes|=e,fi|=e,t)}function pm(e,t,n,a,u){var f=ce.p;ce.p=f!==0&&8>f?f:8;var b=A.T,j={};A.T=j,kd(e,!1,t,n);try{var R=u(),K=A.S;if(K!==null&&K(j,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var ae=bu(R,a);lo(e,t,ae,Ql(e))}else lo(e,t,a,Ql(e))}catch(oe){lo(e,t,{then:function(){},status:"rejected",reason:oe},Ql())}finally{ce.p=f,b!==null&&j.types!==null&&(b.types=j.types),A.T=b}}function i_(){}function Sd(e,t,n,a){if(e.tag!==5)throw Error(c(476));var u=mm(e).queue;pm(e,u,t,z,n===null?i_:function(){return gm(e),n(a)})}function mm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:z},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function gm(e){var t=mm(e);t.next===null&&(t=e.alternate.memoizedState),lo(e,t.next.queue,{},Ql())}function wd(){return yn(vo)}function bm(){return vn().memoizedState}function xm(){return vn().memoizedState}function r_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ql();e=ai(n);var a=ii(t,e,n);a!==null&&(zl(a,t,n),Wc(a,t,n)),t={cache:Kc()},e.payload=t;return}t=t.return}}function c_(e,t,n){var a=Ql();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Eu(e)?_m(t,n):(n=Ic(e,t,n,a),n!==null&&(zl(n,e,a),vm(n,t,a)))}function ym(e,t,n){var a=Ql();lo(e,t,n,a)}function lo(e,t,n,a){var u={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eu(e))_m(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var b=t.lastRenderedState,j=f(b,n);if(u.hasEagerState=!0,u.eagerState=j,ml(j,b))return Xi(e,t,u,0),Bt===null&&qs(),!1}catch{}finally{}if(n=Ic(e,t,u,a),n!==null)return zl(n,e,a),vm(n,t,a),!0}return!1}function kd(e,t,n,a){if(a={lane:2,revertLane:lh(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Eu(e)){if(t)throw Error(c(479))}else t=Ic(e,n,a,2),t!==null&&zl(t,e,2)}function Eu(e){var t=e.alternate;return e===Ze||t!==null&&t===Ze}function _m(e,t){zr=vu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vm(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dl(e,n)}}var so={readContext:yn,use:wu,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useInsertionEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useSyncExternalStore:mn,useId:mn,useHostTransitionStatus:mn,useFormState:mn,useActionState:mn,useOptimistic:mn,useMemoCache:mn,useCacheRefresh:mn};so.useEffectEvent=mn;var jm={readContext:yn,use:wu,useCallback:function(e,t){return yl().memoizedState=[e,t===void 0?null:t],e},useContext:yn,useEffect:am,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Nu(4194308,4,om.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nu(4194308,4,e,t)},useInsertionEffect:function(e,t){Nu(4,2,e,t)},useMemo:function(e,t){var n=yl();t=t===void 0?null:t;var a=e();if(Ki){Ct(!0);try{e()}finally{Ct(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=yl();if(n!==void 0){var u=n(t);if(Ki){Ct(!0);try{n(t)}finally{Ct(!1)}}}else u=t;return a.memoizedState=a.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},a.queue=e,e=e.dispatch=c_.bind(null,Ze,e),[a.memoizedState,e]},useRef:function(e){var t=yl();return e={current:e},t.memoizedState=e},useState:function(e){e=xd(e);var t=e.queue,n=ym.bind(null,Ze,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vd,useDeferredValue:function(e,t){var n=yl();return jd(n,e,t)},useTransition:function(){var e=xd(!1);return e=pm.bind(null,Ze,e.queue,!0,!1),yl().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ze,u=yl();if(st){if(n===void 0)throw Error(c(407));n=n()}else{if(n=t(),Bt===null)throw Error(c(349));(ot&127)!==0||Yp(a,t,n)}u.memoizedState=n;var f={value:n,getSnapshot:t};return u.queue=f,am(Vp.bind(null,a,f,e),[e]),a.flags|=2048,Hr(9,{destroy:void 0},Xp.bind(null,a,f,n,t),null),n},useId:function(){var e=yl(),t=Bt.identifierPrefix;if(st){var n=ls,a=ns;n=(a&~(1<<32-Pe(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ju++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=t_++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wd,useFormState:em,useActionState:em,useOptimistic:function(e){var t=yl();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=kd.bind(null,Ze,!0,n),n.dispatch=t,[e,t]},useMemoCache:md,useCacheRefresh:function(){return yl().memoizedState=r_.bind(null,Ze)},useEffectEvent:function(e){var t=yl(),n={impl:e};return t.memoizedState=n,function(){if((_t&2)!==0)throw Error(c(440));return n.impl.apply(void 0,arguments)}}},Nd={readContext:yn,use:wu,useCallback:fm,useContext:yn,useEffect:_d,useImperativeHandle:um,useInsertionEffect:rm,useLayoutEffect:cm,useMemo:dm,useReducer:ku,useRef:sm,useState:function(){return ku(ja)},useDebugValue:vd,useDeferredValue:function(e,t){var n=vn();return hm(n,Mt.memoizedState,e,t)},useTransition:function(){var e=ku(ja)[0],t=vn().memoizedState;return[typeof e=="boolean"?e:no(e),t]},useSyncExternalStore:Gp,useId:bm,useHostTransitionStatus:wd,useFormState:tm,useActionState:tm,useOptimistic:function(e,t){var n=vn();return Kp(n,Mt,e,t)},useMemoCache:md,useCacheRefresh:xm};Nd.useEffectEvent=im;var Sm={readContext:yn,use:wu,useCallback:fm,useContext:yn,useEffect:_d,useImperativeHandle:um,useInsertionEffect:rm,useLayoutEffect:cm,useMemo:dm,useReducer:bd,useRef:sm,useState:function(){return bd(ja)},useDebugValue:vd,useDeferredValue:function(e,t){var n=vn();return Mt===null?jd(n,e,t):hm(n,Mt.memoizedState,e,t)},useTransition:function(){var e=bd(ja)[0],t=vn().memoizedState;return[typeof e=="boolean"?e:no(e),t]},useSyncExternalStore:Gp,useId:bm,useHostTransitionStatus:wd,useFormState:lm,useActionState:lm,useOptimistic:function(e,t){var n=vn();return Mt!==null?Kp(n,Mt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:md,useCacheRefresh:xm};Sm.useEffectEvent=im;function Td(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:S({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ed={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Ql(),u=ai(a);u.payload=t,n!=null&&(u.callback=n),t=ii(e,u,a),t!==null&&(zl(t,e,a),Wc(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Ql(),u=ai(a);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=ii(e,u,a),t!==null&&(zl(t,e,a),Wc(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ql(),a=ai(n);a.tag=2,t!=null&&(a.callback=t),t=ii(e,a,n),t!==null&&(zl(t,e,n),Wc(t,e,n))}};function wm(e,t,n,a,u,f,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,b):t.prototype&&t.prototype.isPureReactComponent?!ts(n,a)||!ts(u,f):!0}function km(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Ed.enqueueReplaceState(t,t.state,null)}function Zi(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=S({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Nm(e){Nr(e)}function Tm(e){console.error(e)}function Em(e){Nr(e)}function Cu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Cm(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Cd(e,t,n){return n=ai(n),n.tag=3,n.payload={element:null},n.callback=function(){Cu(e,t)},n}function Am(e){return e=ai(e),e.tag=3,e}function Mm(e,t,n,a){var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var f=a.value;e.payload=function(){return u(f)},e.callback=function(){Cm(t,n,a)}}var b=n.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Cm(t,n,a),typeof u!="function"&&(di===null?di=new Set([this]):di.add(this));var j=a.stack;this.componentDidCatch(a.value,{componentStack:j!==null?j:""})})}function o_(e,t,n,a,u){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&as(t,n,u,!0),n=Yl.current,n!==null){switch(n.tag){case 31:case 13:return rs===null?qu():n.alternate===null&&gn===0&&(gn=3),n.flags&=-257,n.flags|=65536,n.lanes=u,a===Be?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),eh(e,a,u)),!1;case 22:return n.flags|=65536,a===Be?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),eh(e,a,u)),!1}throw Error(c(435,n.tag))}return eh(e,a,u),qu(),!1}if(st)return t=Yl.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,a!==Vc&&(e=Error(c(422),{cause:a}),Jn(Tl(e,n)))):(a!==Vc&&(t=Error(c(423),{cause:a}),Jn(Tl(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=Tl(a,n),u=Cd(e.stateNode,a,u),ad(e,u),gn!==4&&(gn=2)),!1;var f=Error(c(520),{cause:a});if(f=Tl(f,n),ho===null?ho=[f]:ho.push(f),gn!==4&&(gn=2),t===null)return!0;a=Tl(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=Cd(n.stateNode,a,e),ad(n,e),!1;case 1:if(t=n.type,f=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(di===null||!di.has(f))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Am(u),Mm(u,e,n,a),ad(n,u),!1}n=n.return}while(n!==null);return!1}var Ad=Error(c(461)),Cn=!1;function Pn(e,t,n,a){t.child=e===null?Lp(t,null,n,a):ks(t,e.child,n,a)}function Rm(e,t,n,a,u){n=n.render;var f=t.ref;if("ref"in a){var b={};for(var j in a)j!=="ref"&&(b[j]=a[j])}else b=a;return _a(t),a=fd(e,t,n,b,f,u),j=dd(),e!==null&&!Cn?(hd(e,t,u),Sa(e,t,u)):(st&&j&&Yc(t),t.flags|=1,Pn(e,t,a,u),t.child)}function Dm(e,t,n,a,u){if(e===null){var f=n.type;return typeof f=="function"&&!qc(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,Om(e,t,f,a,u)):(e=Er(n.type,null,a,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Hd(e,u)){var b=f.memoizedProps;if(n=n.compare,n=n!==null?n:ts,n(b,a)&&e.ref===t.ref)return Sa(e,t,u)}return t.flags|=1,e=js(f,a),e.ref=t.ref,e.return=t,t.child=e}function Om(e,t,n,a,u){if(e!==null){var f=e.memoizedProps;if(ts(f,a)&&e.ref===t.ref)if(Cn=!1,t.pendingProps=a=f,Hd(e,u))(e.flags&131072)!==0&&(Cn=!0);else return t.lanes=e.lanes,Sa(e,t,u)}return Md(e,t,n,a,u)}function Lm(e,t,n,a){var u=a.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|n:n,e!==null){for(a=t.child=e.child,u=0;a!==null;)u=u|a.lanes|a.childLanes,a=a.sibling;a=u&~f}else a=0,t.child=null;return zm(e,t,f,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Or(t,f!==null?f.cachePool:null),f!==null?Hp(t,f):rd(),Bp(t);else return a=t.lanes=536870912,zm(e,t,f!==null?f.baseLanes|n:n,n,a)}else f!==null?(Or(t,f.cachePool),Hp(t,f),ci(),t.memoizedState=null):(e!==null&&Or(t,null),rd(),ci());return Pn(e,t,u,n),t.child}function ao(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zm(e,t,n,a,u){var f=Qi();return f=f===null?null:{parent:on._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&Or(t,null),rd(),Bp(t),e!==null&&as(e,t,a,!0),t.childLanes=u,null}function Au(e,t){return t=Ru({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Um(e,t,n){return ks(t,e.child,null,n),e=Au(t,t.pendingProps),e.flags|=2,Xl(t),t.memoizedState=null,e}function u_(e,t,n){var a=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(st){if(a.mode==="hidden")return e=Au(t,a),t.lanes=536870912,ao(null,e);if(od(t),(e=Ut)?(e=Zg(e,Cl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ys!==null?{id:ns,overflow:ls}:null,retryLane:536870912,hydrationErrors:null},n=fu(e),n.return=t,t.child=n,Hn=t,Ut=null)):e=null,e===null)throw Vs(t);return t.lanes=536870912,null}return Au(t,a)}var f=e.memoizedState;if(f!==null){var b=f.dehydrated;if(od(t),u)if(t.flags&256)t.flags&=-257,t=Um(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(c(558));else if(Cn||as(e,t,n,!1),u=(n&e.childLanes)!==0,Cn||u){if(a=Bt,a!==null&&(b=sl(a,n),b!==0&&b!==f.retryLane))throw f.retryLane=b,Gs(e,b),zl(a,e,b),Ad;qu(),t=Um(e,t,n)}else e=f.treeContext,Ut=cs(b.nextSibling),Hn=t,st=!0,Xs=null,Cl=!1,e!==null&&pu(t,e),t=Au(t,a),t.flags|=4096;return t}return e=js(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Mu(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(c(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Md(e,t,n,a,u){return _a(t),n=fd(e,t,n,a,void 0,u),a=dd(),e!==null&&!Cn?(hd(e,t,u),Sa(e,t,u)):(st&&a&&Yc(t),t.flags|=1,Pn(e,t,n,u),t.child)}function Hm(e,t,n,a,u,f){return _a(t),t.updateQueue=null,n=qp(t,a,n,u),Ip(e),a=dd(),e!==null&&!Cn?(hd(e,t,f),Sa(e,t,f)):(st&&a&&Yc(t),t.flags|=1,Pn(e,t,n,f),t.child)}function Bm(e,t,n,a,u){if(_a(t),t.stateNode===null){var f=Za,b=n.contextType;typeof b=="object"&&b!==null&&(f=yn(b)),f=new n(a,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Ed,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=a,f.state=t.memoizedState,f.refs={},ld(t),b=n.contextType,f.context=typeof b=="object"&&b!==null?yn(b):Za,f.state=t.memoizedState,b=n.getDerivedStateFromProps,typeof b=="function"&&(Td(t,n,b,a),f.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(b=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),b!==f.state&&Ed.enqueueReplaceState(f,f.state,null),eo(t,a,f,u),Pc(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){f=t.stateNode;var j=t.memoizedProps,R=Zi(n,j);f.props=R;var K=f.context,ae=n.contextType;b=Za,typeof ae=="object"&&ae!==null&&(b=yn(ae));var oe=n.getDerivedStateFromProps;ae=typeof oe=="function"||typeof f.getSnapshotBeforeUpdate=="function",j=t.pendingProps!==j,ae||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(j||K!==b)&&km(t,f,a,b),si=!1;var F=t.memoizedState;f.state=F,eo(t,a,f,u),Pc(),K=t.memoizedState,j||F!==K||si?(typeof oe=="function"&&(Td(t,n,oe,a),K=t.memoizedState),(R=si||wm(t,n,R,a,F,K,b))?(ae||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=K),f.props=a,f.state=K,f.context=b,a=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,sd(e,t),b=t.memoizedProps,ae=Zi(n,b),f.props=ae,oe=t.pendingProps,F=f.context,K=n.contextType,R=Za,typeof K=="object"&&K!==null&&(R=yn(K)),j=n.getDerivedStateFromProps,(K=typeof j=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(b!==oe||F!==R)&&km(t,f,a,R),si=!1,F=t.memoizedState,f.state=F,eo(t,a,f,u),Pc();var te=t.memoizedState;b!==oe||F!==te||si||e!==null&&e.dependencies!==null&&Vi(e.dependencies)?(typeof j=="function"&&(Td(t,n,j,a),te=t.memoizedState),(ae=si||wm(t,n,ae,a,F,te,R)||e!==null&&e.dependencies!==null&&Vi(e.dependencies))?(K||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,te,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,te,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=te),f.props=a,f.state=te,f.context=R,a=ae):(typeof f.componentDidUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&F===e.memoizedState||(t.flags|=1024),a=!1)}return f=a,Mu(e,t),a=(t.flags&128)!==0,f||a?(f=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&a?(t.child=ks(t,e.child,null,u),t.child=ks(t,null,n,u)):Pn(e,t,n,u),t.memoizedState=f.state,e=t.child):e=Sa(e,t,u),e}function Im(e,t,n,a){return ss(),t.flags|=256,Pn(e,t,n,a),t.child}var Rd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Dd(e){return{baseLanes:e,cachePool:Zc()}}function Od(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=$l),e}function qm(e,t,n){var a=t.pendingProps,u=!1,f=(t.flags&128)!==0,b;if((b=f)||(b=e!==null&&e.memoizedState===null?!1:(_n.current&2)!==0),b&&(u=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(st){if(u?ri(t):ci(),(e=Ut)?(e=Zg(e,Cl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ys!==null?{id:ns,overflow:ls}:null,retryLane:536870912,hydrationErrors:null},n=fu(e),n.return=t,t.child=n,Hn=t,Ut=null)):e=null,e===null)throw Vs(t);return gh(e)?t.lanes=32:t.lanes=536870912,null}var j=a.children;return a=a.fallback,u?(ci(),u=t.mode,j=Ru({mode:"hidden",children:j},u),a=ba(a,u,n,null),j.return=t,a.return=t,j.sibling=a,t.child=j,a=t.child,a.memoizedState=Dd(n),a.childLanes=Od(e,b,n),t.memoizedState=Rd,ao(null,a)):(ri(t),Ld(t,j))}var R=e.memoizedState;if(R!==null&&(j=R.dehydrated,j!==null)){if(f)t.flags&256?(ri(t),t.flags&=-257,t=zd(e,t,n)):t.memoizedState!==null?(ci(),t.child=e.child,t.flags|=128,t=null):(ci(),j=a.fallback,u=t.mode,a=Ru({mode:"visible",children:a.children},u),j=ba(j,u,n,null),j.flags|=2,a.return=t,j.return=t,a.sibling=j,t.child=a,ks(t,e.child,null,n),a=t.child,a.memoizedState=Dd(n),a.childLanes=Od(e,b,n),t.memoizedState=Rd,t=ao(null,a));else if(ri(t),gh(j)){if(b=j.nextSibling&&j.nextSibling.dataset,b)var K=b.dgst;b=K,a=Error(c(419)),a.stack="",a.digest=b,Jn({value:a,source:null,stack:null}),t=zd(e,t,n)}else if(Cn||as(e,t,n,!1),b=(n&e.childLanes)!==0,Cn||b){if(b=Bt,b!==null&&(a=sl(b,n),a!==0&&a!==R.retryLane))throw R.retryLane=a,Gs(e,a),zl(b,e,a),Ad;mh(j)||qu(),t=zd(e,t,n)}else mh(j)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,Ut=cs(j.nextSibling),Hn=t,st=!0,Xs=null,Cl=!1,e!==null&&pu(t,e),t=Ld(t,a.children),t.flags|=4096);return t}return u?(ci(),j=a.fallback,u=t.mode,R=e.child,K=R.sibling,a=js(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,K!==null?j=js(K,j):(j=ba(j,u,n,null),j.flags|=2),j.return=t,a.return=t,a.sibling=j,t.child=a,ao(null,a),a=t.child,j=e.child.memoizedState,j===null?j=Dd(n):(u=j.cachePool,u!==null?(R=on._currentValue,u=u.parent!==R?{parent:R,pool:R}:u):u=Zc(),j={baseLanes:j.baseLanes|n,cachePool:u}),a.memoizedState=j,a.childLanes=Od(e,b,n),t.memoizedState=Rd,ao(e.child,a)):(ri(t),n=e.child,e=n.sibling,n=js(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=n,t.memoizedState=null,n)}function Ld(e,t){return t=Ru({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ru(e,t){return e=bl(22,e,null,t),e.lanes=0,e}function zd(e,t,n){return ks(t,e.child,null,n),e=Ld(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Gm(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Ar(e.return,t,n)}function Ud(e,t,n,a,u,f){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:u,treeForkCount:f}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=a,b.tail=n,b.tailMode=u,b.treeForkCount=f)}function Ym(e,t,n){var a=t.pendingProps,u=a.revealOrder,f=a.tail;a=a.children;var b=_n.current,j=(b&2)!==0;if(j?(b=b&1|2,t.flags|=128):b&=1,re(_n,b),Pn(e,t,a,n),a=st?xa:0,!j&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Gm(e,n,t);else if(e.tag===19)Gm(e,n,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(u){case"forwards":for(n=t.child,u=null;n!==null;)e=n.alternate,e!==null&&_u(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Ud(t,!1,u,n,f,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&_u(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Ud(t,!0,n,null,f,a);break;case"together":Ud(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),fi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(as(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,n=js(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=js(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vi(e)))}function f_(e,t,n){switch(t.tag){case 3:yt(t,t.stateNode.containerInfo),ws(t,on,e.memoizedState.cache),ss();break;case 27:case 5:Ve(t);break;case 4:yt(t,t.stateNode.containerInfo);break;case 10:ws(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,od(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ri(t),t.flags|=128,null):(n&t.child.childLanes)!==0?qm(e,t,n):(ri(t),e=Sa(e,t,n),e!==null?e.sibling:null);ri(t);break;case 19:var u=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(as(e,t,n,!1),a=(n&t.childLanes)!==0),u){if(a)return Ym(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),re(_n,_n.current),a)break;return null;case 22:return t.lanes=0,Lm(e,t,n,t.pendingProps);case 24:ws(t,on,e.memoizedState.cache)}return Sa(e,t,n)}function Xm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Cn=!0;else{if(!Hd(e,n)&&(t.flags&128)===0)return Cn=!1,f_(e,t,n);Cn=(e.flags&131072)!==0}else Cn=!1,st&&(t.flags&1048576)!==0&&hu(t,xa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Bn(t.elementType),t.type=e,typeof e=="function")qc(e)?(a=Zi(e,a),t.tag=1,t=Bm(null,t,e,a,n)):(t.tag=0,t=Md(null,t,e,a,n));else{if(e!=null){var u=e.$$typeof;if(u===O){t.tag=11,t=Rm(null,t,e,a,n);break e}else if(u===D){t.tag=14,t=Dm(null,t,e,a,n);break e}}throw t=Me(e)||e,Error(c(306,t,""))}}return t;case 0:return Md(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,u=Zi(a,t.pendingProps),Bm(e,t,a,u,n);case 3:e:{if(yt(t,t.stateNode.containerInfo),e===null)throw Error(c(387));a=t.pendingProps;var f=t.memoizedState;u=f.element,sd(e,t),eo(t,a,null,n);var b=t.memoizedState;if(a=b.cache,ws(t,on,a),a!==f.cache&&Qc(t,[on],n,!0),Pc(),a=b.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Im(e,t,a,n);break e}else if(a!==u){u=Tl(Error(c(424)),t),Jn(u),t=Im(e,t,a,n);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(Ut=cs(e.firstChild),Hn=t,st=!0,Xs=null,Cl=!0,n=Lp(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ss(),a===u){t=Sa(e,t,n);break e}Pn(e,t,a,n)}t=t.child}return t;case 26:return Mu(e,t),e===null?(n=tb(t.type,null,t.pendingProps,null))?t.memoizedState=n:st||(n=t.type,e=t.pendingProps,a=Ku(ve.current).createElement(n),a[Qt]=t,a[Oe]=e,el(a,n,e),Fe(a),t.stateNode=a):t.memoizedState=tb(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ve(t),e===null&&st&&(a=t.stateNode=Wg(t.type,t.pendingProps,ve.current),Hn=t,Cl=!0,u=Ut,gi(t.type)?(bh=u,Ut=cs(a.firstChild)):Ut=u),Pn(e,t,t.pendingProps.children,n),Mu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&st&&((u=a=Ut)&&(a=q_(a,t.type,t.pendingProps,Cl),a!==null?(t.stateNode=a,Hn=t,Ut=cs(a.firstChild),Cl=!1,u=!0):u=!1),u||Vs(t)),Ve(t),u=t.type,f=t.pendingProps,b=e!==null?e.memoizedProps:null,a=f.children,dh(u,f)?a=null:b!==null&&dh(u,b)&&(t.flags|=32),t.memoizedState!==null&&(u=fd(e,t,n_,null,null,n),vo._currentValue=u),Mu(e,t),Pn(e,t,a,n),t.child;case 6:return e===null&&st&&((e=n=Ut)&&(n=G_(n,t.pendingProps,Cl),n!==null?(t.stateNode=n,Hn=t,Ut=null,e=!0):e=!1),e||Vs(t)),null;case 13:return qm(e,t,n);case 4:return yt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ks(t,null,a,n):Pn(e,t,a,n),t.child;case 11:return Rm(e,t,t.type,t.pendingProps,n);case 7:return Pn(e,t,t.pendingProps,n),t.child;case 8:return Pn(e,t,t.pendingProps.children,n),t.child;case 12:return Pn(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,ws(t,t.type,a.value),Pn(e,t,a.children,n),t.child;case 9:return u=t.type._context,a=t.pendingProps.children,_a(t),u=yn(u),a=a(u),t.flags|=1,Pn(e,t,a,n),t.child;case 14:return Dm(e,t,t.type,t.pendingProps,n);case 15:return Om(e,t,t.type,t.pendingProps,n);case 19:return Ym(e,t,n);case 31:return u_(e,t,n);case 22:return Lm(e,t,n,t.pendingProps);case 24:return _a(t),a=yn(on),e===null?(u=Qi(),u===null&&(u=Bt,f=Kc(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=n),u=f),t.memoizedState={parent:a,cache:u},ld(t),ws(t,on,u)):((e.lanes&n)!==0&&(sd(e,t),eo(t,null,null,n),Pc()),u=e.memoizedState,f=t.memoizedState,u.parent!==a?(u={parent:a,cache:a},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),ws(t,on,a)):(a=f.cache,ws(t,on,a),a!==u.cache&&Qc(t,[on],n,!0))),Pn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function wa(e){e.flags|=4}function Bd(e,t,n,a,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(bg())e.flags|=8192;else throw Gl=Be,I}else e.flags&=-16777217}function Vm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ib(t))if(bg())e.flags|=8192;else throw Gl=Be,I}function Du(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?On():536870912,e.lanes|=t,Gr|=t)}function io(e,t){if(!st)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var u=e.child;u!==null;)n|=u.lanes|u.childLanes,a|=u.subtreeFlags&65011712,a|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)n|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function d_(e,t,n){var a=t.pendingProps;switch(Xc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(t),null;case 1:return Zt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Al(on),Xe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ya(t)?wa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xl())),Zt(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(wa(t),f!==null?(Zt(t),Vm(t,f)):(Zt(t),Bd(t,u,null,a,n))):f?f!==e.memoizedState?(wa(t),Zt(t),Vm(t,f)):(Zt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&wa(t),Zt(t),Bd(t,u,e,a,n)),null;case 27:if($e(t),n=ve.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Zt(t),null}e=me.current,ya(t)?mu(t):(e=Wg(u,a,n),t.stateNode=e,wa(t))}return Zt(t),null;case 5:if($e(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(!a){if(t.stateNode===null)throw Error(c(166));return Zt(t),null}if(f=me.current,ya(t))mu(t);else{var b=Ku(ve.current);switch(f){case 1:f=b.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=b.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=b.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=b.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is=="string"?b.createElement("select",{is:a.is}):b.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is=="string"?b.createElement(u,{is:a.is}):b.createElement(u)}}f[Qt]=t,f[Oe]=a;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)f.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=f;e:switch(el(f,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&wa(t)}}return Zt(t),Bd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&wa(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(c(166));if(e=ve.current,ya(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,u=Hn,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||qg(e.nodeValue,n)),e||Vs(t,!0)}else e=Ku(e).createTextNode(a),e[Qt]=t,t.stateNode=e}return Zt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ya(t),n!==null){if(e===null){if(!a)throw Error(c(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[Qt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Zt(t),e=!1}else n=xl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Xl(t),t):(Xl(t),null);if((t.flags&128)!==0)throw Error(c(558))}return Zt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=ya(t),a!==null&&a.dehydrated!==null){if(e===null){if(!u)throw Error(c(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(c(317));u[Qt]=t}else ss(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Zt(t),u=!1}else u=xl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Xl(t),t):(Xl(t),null)}return Xl(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==u&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Du(t,t.updateQueue),Zt(t),null);case 4:return Xe(),e===null&&rh(t.stateNode.containerInfo),Zt(t),null;case 10:return Al(t.type),Zt(t),null;case 19:if(V(_n),a=t.memoizedState,a===null)return Zt(t),null;if(u=(t.flags&128)!==0,f=a.rendering,f===null)if(u)io(a,!1);else{if(gn!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=_u(e),f!==null){for(t.flags|=128,io(a,!1),e=f.updateQueue,t.updateQueue=e,Du(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)uu(n,e),n=n.sibling;return re(_n,_n.current&1|2),st&&Ss(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&nt()>Hu&&(t.flags|=128,u=!0,io(a,!1),t.lanes=4194304)}else{if(!u)if(e=_u(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Du(t,e),io(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!st)return Zt(t),null}else 2*nt()-a.renderingStartTime>Hu&&n!==536870912&&(t.flags|=128,u=!0,io(a,!1),t.lanes=4194304);a.isBackwards?(f.sibling=t.child,t.child=f):(e=a.last,e!==null?e.sibling=f:t.child=f,a.last=f)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=nt(),e.sibling=null,n=_n.current,re(_n,u?n&1|2:n&1),st&&Ss(t,a.treeForkCount),e):(Zt(t),null);case 22:case 23:return Xl(t),cd(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Zt(t),t.subtreeFlags&6&&(t.flags|=8192)):Zt(t),n=t.updateQueue,n!==null&&Du(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&V(Ml),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Al(on),Zt(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function h_(e,t){switch(Xc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Al(on),Xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $e(t),null;case 31:if(t.memoizedState!==null){if(Xl(t),t.alternate===null)throw Error(c(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xl(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));ss()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(_n),null;case 4:return Xe(),null;case 10:return Al(t.type),null;case 22:case 23:return Xl(t),cd(),e!==null&&V(Ml),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Al(on),null;case 25:return null;default:return null}}function $m(e,t){switch(Xc(t),t.tag){case 3:Al(on),Xe();break;case 26:case 27:case 5:$e(t);break;case 4:Xe();break;case 31:t.memoizedState!==null&&Xl(t);break;case 13:Xl(t);break;case 19:V(_n);break;case 10:Al(t.type);break;case 22:case 23:Xl(t),cd(),e!==null&&V(Ml);break;case 24:Al(on)}}function ro(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var u=a.next;n=u;do{if((n.tag&e)===e){a=void 0;var f=n.create,b=n.inst;a=f(),b.destroy=a}n=n.next}while(n!==u)}}catch(j){Et(t,t.return,j)}}function oi(e,t,n){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){var b=a.inst,j=b.destroy;if(j!==void 0){b.destroy=void 0,u=t;var R=n,K=j;try{K()}catch(ae){Et(u,R,ae)}}}a=a.next}while(a!==f)}}catch(ae){Et(t,t.return,ae)}}function Qm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Up(t,n)}catch(a){Et(e,e.return,a)}}}function Km(e,t,n){n.props=Zi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Et(e,t,a)}}function co(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(u){Et(e,t,u)}}function Qs(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(u){Et(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){Et(e,t,u)}else n.current=null}function Zm(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(u){Et(e,e.return,u)}}function Id(e,t,n){try{var a=e.stateNode;L_(a,e.type,n,t),a[Oe]=t}catch(u){Et(e,e.return,u)}}function Fm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&gi(e.type)||e.tag===4}function qd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&gi(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 Gd(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ke));else if(a!==4&&(a===27&&gi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gd(e,t,n),e=e.sibling;e!==null;)Gd(e,t,n),e=e.sibling}function Ou(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&gi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ou(e,t,n),e=e.sibling;e!==null;)Ou(e,t,n),e=e.sibling}function Jm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);el(t,a,n),t[Qt]=e,t[Oe]=n}catch(f){Et(e,e.return,f)}}var ka=!1,An=!1,Yd=!1,Wm=typeof WeakSet=="function"?WeakSet:Set,$n=null;function p_(e,t){if(e=e.containerInfo,uh=tf,e=su(e),Mc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var u=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{n.nodeType,f.nodeType}catch{n=null;break e}var b=0,j=-1,R=-1,K=0,ae=0,oe=e,F=null;t:for(;;){for(var te;oe!==n||u!==0&&oe.nodeType!==3||(j=b+u),oe!==f||a!==0&&oe.nodeType!==3||(R=b+a),oe.nodeType===3&&(b+=oe.nodeValue.length),(te=oe.firstChild)!==null;)F=oe,oe=te;for(;;){if(oe===e)break t;if(F===n&&++K===u&&(j=b),F===f&&++ae===a&&(R=b),(te=oe.nextSibling)!==null)break;oe=F,F=oe.parentNode}oe=te}n=j===-1||R===-1?null:{start:j,end:R}}else n=null}n=n||{start:0,end:0}}else n=null;for(fh={focusedElem:e,selectionRange:n},tf=!1,$n=t;$n!==null;)if(t=$n,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$n=e;else for(;$n!==null;){switch(t=$n,f=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)u=e[n],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,n=t,u=f.memoizedProps,f=f.memoizedState,a=n.stateNode;try{var Re=Zi(n.type,u);e=a.getSnapshotBeforeUpdate(Re,f),a.__reactInternalSnapshotBeforeUpdate=e}catch(qe){Et(n,n.return,qe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ph(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ph(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(c(163))}if(e=t.sibling,e!==null){e.return=t.return,$n=e;break}$n=t.return}}function Pm(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ta(e,n),a&4&&ro(5,n);break;case 1:if(Ta(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(b){Et(n,n.return,b)}else{var u=Zi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Et(n,n.return,b)}}a&64&&Qm(n),a&512&&co(n,n.return);break;case 3:if(Ta(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Up(e,t)}catch(b){Et(n,n.return,b)}}break;case 27:t===null&&a&4&&Jm(n);case 26:case 5:Ta(e,n),t===null&&a&4&&Zm(n),a&512&&co(n,n.return);break;case 12:Ta(e,n);break;case 31:Ta(e,n),a&4&&ng(e,n);break;case 13:Ta(e,n),a&4&&lg(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=S_.bind(null,n),Y_(e,n))));break;case 22:if(a=n.memoizedState!==null||ka,!a){t=t!==null&&t.memoizedState!==null||An,u=ka;var f=An;ka=a,(An=t)&&!f?Ea(e,n,(n.subtreeFlags&8772)!==0):Ta(e,n),ka=u,An=f}break;case 30:break;default:Ta(e,n)}}function eg(e){var t=e.alternate;t!==null&&(e.alternate=null,eg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Bl(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 an=null,Rl=!1;function Na(e,t,n){for(n=n.child;n!==null;)tg(e,t,n),n=n.sibling}function tg(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Gt,n)}catch{}switch(n.tag){case 26:An||Qs(n,t),Na(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:An||Qs(n,t);var a=an,u=Rl;gi(n.type)&&(an=n.stateNode,Rl=!1),Na(e,t,n),xo(n.stateNode),an=a,Rl=u;break;case 5:An||Qs(n,t);case 6:if(a=an,u=Rl,an=null,Na(e,t,n),an=a,Rl=u,an!==null)if(Rl)try{(an.nodeType===9?an.body:an.nodeName==="HTML"?an.ownerDocument.body:an).removeChild(n.stateNode)}catch(f){Et(n,t,f)}else try{an.removeChild(n.stateNode)}catch(f){Et(n,t,f)}break;case 18:an!==null&&(Rl?(e=an,Qg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Fr(e)):Qg(an,n.stateNode));break;case 4:a=an,u=Rl,an=n.stateNode.containerInfo,Rl=!0,Na(e,t,n),an=a,Rl=u;break;case 0:case 11:case 14:case 15:oi(2,n,t),An||oi(4,n,t),Na(e,t,n);break;case 1:An||(Qs(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Km(n,t,a)),Na(e,t,n);break;case 21:Na(e,t,n);break;case 22:An=(a=An)||n.memoizedState!==null,Na(e,t,n),An=a;break;default:Na(e,t,n)}}function ng(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fr(e)}catch(n){Et(t,t.return,n)}}}function lg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fr(e)}catch(n){Et(t,t.return,n)}}function m_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Wm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Wm),t;default:throw Error(c(435,e.tag))}}function Lu(e,t){var n=m_(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var u=w_.bind(null,e,a);a.then(u,u)}})}function Dl(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],f=e,b=t,j=b;e:for(;j!==null;){switch(j.tag){case 27:if(gi(j.type)){an=j.stateNode,Rl=!1;break e}break;case 5:an=j.stateNode,Rl=!1;break e;case 3:case 4:an=j.stateNode.containerInfo,Rl=!0;break e}j=j.return}if(an===null)throw Error(c(160));tg(f,b,u),an=null,Rl=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sg(t,e),t=t.sibling}var Ns=null;function sg(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Dl(t,e),Ol(e),a&4&&(oi(3,e,e.return),ro(3,e),oi(5,e,e.return));break;case 1:Dl(t,e),Ol(e),a&512&&(An||n===null||Qs(n,n.return)),a&64&&ka&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var u=Ns;if(Dl(t,e),Ol(e),a&512&&(An||n===null||Qs(n,n.return)),a&4){var f=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,u=u.ownerDocument||u;t:switch(a){case"title":f=u.getElementsByTagName("title")[0],(!f||f[Sn]||f[Qt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(a),u.head.insertBefore(f,u.querySelector("head > title"))),el(f,a,n),f[Qt]=e,Fe(f),a=f;break e;case"link":var b=sb("link","href",u).get(a+(n.href||""));if(b){for(var j=0;j<b.length;j++)if(f=b[j],f.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&f.getAttribute("rel")===(n.rel==null?null:n.rel)&&f.getAttribute("title")===(n.title==null?null:n.title)&&f.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){b.splice(j,1);break t}}f=u.createElement(a),el(f,a,n),u.head.appendChild(f);break;case"meta":if(b=sb("meta","content",u).get(a+(n.content||""))){for(j=0;j<b.length;j++)if(f=b[j],f.getAttribute("content")===(n.content==null?null:""+n.content)&&f.getAttribute("name")===(n.name==null?null:n.name)&&f.getAttribute("property")===(n.property==null?null:n.property)&&f.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&f.getAttribute("charset")===(n.charSet==null?null:n.charSet)){b.splice(j,1);break t}}f=u.createElement(a),el(f,a,n),u.head.appendChild(f);break;default:throw Error(c(468,a))}f[Qt]=e,Fe(f),a=f}e.stateNode=a}else ab(u,e.type,e.stateNode);else e.stateNode=lb(u,a,e.memoizedProps);else f!==a?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,a===null?ab(u,e.type,e.stateNode):lb(u,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Id(e,e.memoizedProps,n.memoizedProps)}break;case 27:Dl(t,e),Ol(e),a&512&&(An||n===null||Qs(n,n.return)),n!==null&&a&4&&Id(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Dl(t,e),Ol(e),a&512&&(An||n===null||Qs(n,n.return)),e.flags&32){u=e.stateNode;try{Y(u,"")}catch(Re){Et(e,e.return,Re)}}a&4&&e.stateNode!=null&&(u=e.memoizedProps,Id(e,u,n!==null?n.memoizedProps:u)),a&1024&&(Yd=!0);break;case 6:if(Dl(t,e),Ol(e),a&4){if(e.stateNode===null)throw Error(c(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(Re){Et(e,e.return,Re)}}break;case 3:if(Ju=null,u=Ns,Ns=Zu(t.containerInfo),Dl(t,e),Ns=u,Ol(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Fr(t.containerInfo)}catch(Re){Et(e,e.return,Re)}Yd&&(Yd=!1,ag(e));break;case 4:a=Ns,Ns=Zu(e.stateNode.containerInfo),Dl(t,e),Ol(e),Ns=a;break;case 12:Dl(t,e),Ol(e);break;case 31:Dl(t,e),Ol(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lu(e,a)));break;case 13:Dl(t,e),Ol(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Uu=nt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lu(e,a)));break;case 22:u=e.memoizedState!==null;var R=n!==null&&n.memoizedState!==null,K=ka,ae=An;if(ka=K||u,An=ae||R,Dl(t,e),An=ae,ka=K,Ol(e),a&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||R||ka||An||Fi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){R=n=t;try{if(f=R.stateNode,u)b=f.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{j=R.stateNode;var oe=R.memoizedProps.style,F=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;j.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(Re){Et(R,R.return,Re)}}}else if(t.tag===6){if(n===null){R=t;try{R.stateNode.nodeValue=u?"":R.memoizedProps}catch(Re){Et(R,R.return,Re)}}}else if(t.tag===18){if(n===null){R=t;try{var te=R.stateNode;u?Kg(te,!0):Kg(R.stateNode,!1)}catch(Re){Et(R,R.return,Re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Lu(e,n))));break;case 19:Dl(t,e),Ol(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Lu(e,a)));break;case 30:break;case 21:break;default:Dl(t,e),Ol(e)}}function Ol(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Fm(a)){n=a;break}a=a.return}if(n==null)throw Error(c(160));switch(n.tag){case 27:var u=n.stateNode,f=qd(e);Ou(e,f,u);break;case 5:var b=n.stateNode;n.flags&32&&(Y(b,""),n.flags&=-33);var j=qd(e);Ou(e,j,b);break;case 3:case 4:var R=n.stateNode.containerInfo,K=qd(e);Gd(e,K,R);break;default:throw Error(c(161))}}catch(ae){Et(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ag(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ag(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Pm(e,t.alternate,t),t=t.sibling}function Fi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:oi(4,t,t.return),Fi(t);break;case 1:Qs(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Km(t,t.return,n),Fi(t);break;case 27:xo(t.stateNode);case 26:case 5:Qs(t,t.return),Fi(t);break;case 22:t.memoizedState===null&&Fi(t);break;case 30:Fi(t);break;default:Fi(t)}e=e.sibling}}function Ea(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,u=e,f=t,b=f.flags;switch(f.tag){case 0:case 11:case 15:Ea(u,f,n),ro(4,f);break;case 1:if(Ea(u,f,n),a=f,u=a.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(K){Et(a,a.return,K)}if(a=f,u=a.updateQueue,u!==null){var j=a.stateNode;try{var R=u.shared.hiddenCallbacks;if(R!==null)for(u.shared.hiddenCallbacks=null,u=0;u<R.length;u++)zp(R[u],j)}catch(K){Et(a,a.return,K)}}n&&b&64&&Qm(f),co(f,f.return);break;case 27:Jm(f);case 26:case 5:Ea(u,f,n),n&&a===null&&b&4&&Zm(f),co(f,f.return);break;case 12:Ea(u,f,n);break;case 31:Ea(u,f,n),n&&b&4&&ng(u,f);break;case 13:Ea(u,f,n),n&&b&4&&lg(u,f);break;case 22:f.memoizedState===null&&Ea(u,f,n),co(f,f.return);break;case 30:break;default:Ea(u,f,n)}t=t.sibling}}function Xd(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&$i(n))}function Vd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e))}function Ts(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ig(e,t,n,a),t=t.sibling}function ig(e,t,n,a){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Ts(e,t,n,a),u&2048&&ro(9,t);break;case 1:Ts(e,t,n,a);break;case 3:Ts(e,t,n,a),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&$i(e)));break;case 12:if(u&2048){Ts(e,t,n,a),e=t.stateNode;try{var f=t.memoizedProps,b=f.id,j=f.onPostCommit;typeof j=="function"&&j(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Et(t,t.return,R)}}else Ts(e,t,n,a);break;case 31:Ts(e,t,n,a);break;case 13:Ts(e,t,n,a);break;case 23:break;case 22:f=t.stateNode,b=t.alternate,t.memoizedState!==null?f._visibility&2?Ts(e,t,n,a):oo(e,t):f._visibility&2?Ts(e,t,n,a):(f._visibility|=2,Br(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),u&2048&&Xd(b,t);break;case 24:Ts(e,t,n,a),u&2048&&Vd(t.alternate,t);break;default:Ts(e,t,n,a)}}function Br(e,t,n,a,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,b=t,j=n,R=a,K=b.flags;switch(b.tag){case 0:case 11:case 15:Br(f,b,j,R,u),ro(8,b);break;case 23:break;case 22:var ae=b.stateNode;b.memoizedState!==null?ae._visibility&2?Br(f,b,j,R,u):oo(f,b):(ae._visibility|=2,Br(f,b,j,R,u)),u&&K&2048&&Xd(b.alternate,b);break;case 24:Br(f,b,j,R,u),u&&K&2048&&Vd(b.alternate,b);break;default:Br(f,b,j,R,u)}t=t.sibling}}function oo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,u=a.flags;switch(a.tag){case 22:oo(n,a),u&2048&&Xd(a.alternate,a);break;case 24:oo(n,a),u&2048&&Vd(a.alternate,a);break;default:oo(n,a)}t=t.sibling}}var uo=8192;function Ir(e,t,n){if(e.subtreeFlags&uo)for(e=e.child;e!==null;)rg(e,t,n),e=e.sibling}function rg(e,t,n){switch(e.tag){case 26:Ir(e,t,n),e.flags&uo&&e.memoizedState!==null&&t0(n,Ns,e.memoizedState,e.memoizedProps);break;case 5:Ir(e,t,n);break;case 3:case 4:var a=Ns;Ns=Zu(e.stateNode.containerInfo),Ir(e,t,n),Ns=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=uo,uo=16777216,Ir(e,t,n),uo=a):Ir(e,t,n));break;default:Ir(e,t,n)}}function cg(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 fo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$n=a,ug(a,e)}cg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)og(e),e=e.sibling}function og(e){switch(e.tag){case 0:case 11:case 15:fo(e),e.flags&2048&&oi(9,e,e.return);break;case 3:fo(e);break;case 12:fo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zu(e)):fo(e);break;default:fo(e)}}function zu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];$n=a,ug(a,e)}cg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:oi(8,t,t.return),zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zu(t));break;default:zu(t)}e=e.sibling}}function ug(e,t){for(;$n!==null;){var n=$n;switch(n.tag){case 0:case 11:case 15:oi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:$i(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,$n=a;else e:for(n=e;$n!==null;){a=$n;var u=a.sibling,f=a.return;if(eg(a),a===n){$n=null;break e}if(u!==null){u.return=f,$n=u;break e}$n=f}}}var g_={getCacheForType:function(e){var t=yn(on),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return yn(on).controller.signal}},b_=typeof WeakMap=="function"?WeakMap:Map,_t=0,Bt=null,at=null,ot=0,Tt=0,Vl=null,ui=!1,qr=!1,$d=!1,Ca=0,gn=0,fi=0,Ji=0,Qd=0,$l=0,Gr=0,ho=null,Ll=null,Kd=!1,Uu=0,fg=0,Hu=1/0,Bu=null,di=null,In=0,hi=null,Yr=null,Aa=0,Zd=0,Fd=null,dg=null,po=0,Jd=null;function Ql(){return(_t&2)!==0&&ot!==0?ot&-ot:A.T!==null?lh():$t()}function hg(){if($l===0)if((ot&536870912)===0||st){var e=B;B<<=1,(B&3932160)===0&&(B=262144),$l=e}else $l=536870912;return e=Yl.current,e!==null&&(e.flags|=32),$l}function zl(e,t,n){(e===Bt&&(Tt===2||Tt===9)||e.cancelPendingCommit!==null)&&(Xr(e,0),pi(e,ot,$l,!1)),ll(e,n),((_t&2)===0||e!==Bt)&&(e===Bt&&((_t&2)===0&&(Ji|=n),gn===4&&pi(e,ot,$l,!1)),Ks(e))}function pg(e,t,n){if((_t&6)!==0)throw Error(c(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Lt(e,t),u=a?__(e,t):Pd(e,t,!0),f=a;do{if(u===0){qr&&!a&&pi(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!x_(n)){u=Pd(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var j=e;u=ho;var R=j.current.memoizedState.isDehydrated;if(R&&(Xr(j,b).flags|=256),b=Pd(j,b,!1),b!==2){if($d&&!R){j.errorRecoveryDisabledLanes|=f,Ji|=f,u=4;break e}f=Ll,Ll=u,f!==null&&(Ll===null?Ll=f:Ll.push.apply(Ll,f))}u=b}if(f=!1,u!==2)continue}}if(u===1){Xr(e,0),pi(e,t,0,!0);break}e:{switch(a=e,f=u,f){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:pi(a,t,$l,!ui);break e;case 2:Ll=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(u=Uu+300-nt(),10<u)){if(pi(a,t,$l,!ui),Ie(a,0,!0)!==0)break e;Aa=t,a.timeoutHandle=Vg(mg.bind(null,a,n,Ll,Bu,Kd,t,$l,Ji,Gr,ui,f,"Throttled",-0,0),u);break e}mg(a,n,Ll,Bu,Kd,t,$l,Ji,Gr,ui,f,null,-0,0)}}break}while(!0);Ks(e)}function mg(e,t,n,a,u,f,b,j,R,K,ae,oe,F,te){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ke},rg(t,f,oe);var Re=(f&62914560)===f?Uu-nt():(f&4194048)===f?fg-nt():0;if(Re=n0(oe,Re),Re!==null){Aa=f,e.cancelPendingCommit=Re(Sg.bind(null,e,t,f,n,a,u,b,j,R,ae,oe,null,F,te)),pi(e,f,b,!K);return}}Sg(e,t,f,n,a,u,b,j,R)}function x_(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var u=n[a],f=u.getSnapshot;u=u.value;try{if(!ml(f(),u))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function pi(e,t,n,a){t&=~Qd,t&=~Ji,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var u=t;0<u;){var f=31-Pe(u),b=1<<f;a[f]=-1,u&=~b}n!==0&&hs(e,n,t)}function Iu(){return(_t&6)===0?(mo(0),!1):!0}function Wd(){if(at!==null){if(Tt===0)var e=at.return;else e=at,ql=$s=null,pd(e),xe=null,Te=0,e=at;for(;e!==null;)$m(e.alternate,e),e=e.return;at=null}}function Xr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,H_(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Aa=0,Wd(),Bt=e,at=n=js(e.current,null),ot=t,Tt=0,Vl=null,ui=!1,qr=Lt(e,t),$d=!1,Gr=$l=Qd=Ji=fi=gn=0,Ll=ho=null,Kd=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var u=31-Pe(a),f=1<<u;t|=e[u],a&=~f}return Ca=t,qs(),n}function gg(e,t){Ze=null,A.H=so,t===p||t===de?(t=Fc(),Tt=3):t===I?(t=Fc(),Tt=4):Tt=t===Ad?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Vl=t,at===null&&(gn=1,Cu(e,Tl(t,e.current)))}function bg(){var e=Yl.current;return e===null?!0:(ot&4194048)===ot?rs===null:(ot&62914560)===ot||(ot&536870912)!==0?e===rs:!1}function xg(){var e=A.H;return A.H=so,e===null?so:e}function yg(){var e=A.A;return A.A=g_,e}function qu(){gn=4,ui||(ot&4194048)!==ot&&Yl.current!==null||(qr=!0),(fi&134217727)===0&&(Ji&134217727)===0||Bt===null||pi(Bt,ot,$l,!1)}function Pd(e,t,n){var a=_t;_t|=2;var u=xg(),f=yg();(Bt!==e||ot!==t)&&(Bu=null,Xr(e,t)),t=!1;var b=gn;e:do try{if(Tt!==0&&at!==null){var j=at,R=Vl;switch(Tt){case 8:Wd(),b=6;break e;case 3:case 2:case 9:case 6:Yl.current===null&&(t=!0);var K=Tt;if(Tt=0,Vl=null,Vr(e,j,R,K),n&&qr){b=0;break e}break;default:K=Tt,Tt=0,Vl=null,Vr(e,j,R,K)}}y_(),b=gn;break}catch(ae){gg(e,ae)}while(!0);return t&&e.shellSuspendCounter++,ql=$s=null,_t=a,A.H=u,A.A=f,at===null&&(Bt=null,ot=0,qs()),b}function y_(){for(;at!==null;)_g(at)}function __(e,t){var n=_t;_t|=2;var a=xg(),u=yg();Bt!==e||ot!==t?(Bu=null,Hu=nt()+500,Xr(e,t)):qr=Lt(e,t);e:do try{if(Tt!==0&&at!==null){t=at;var f=Vl;t:switch(Tt){case 1:Tt=0,Vl=null,Vr(e,t,f,1);break;case 2:case 9:if(Ht(f)){Tt=0,Vl=null,vg(t);break}t=function(){Tt!==2&&Tt!==9||Bt!==e||(Tt=7),Ks(e)},f.then(t,t);break e;case 3:Tt=7;break e;case 4:Tt=5;break e;case 7:Ht(f)?(Tt=0,Vl=null,vg(t)):(Tt=0,Vl=null,Vr(e,t,f,7));break;case 5:var b=null;switch(at.tag){case 26:b=at.memoizedState;case 5:case 27:var j=at;if(b?ib(b):j.stateNode.complete){Tt=0,Vl=null;var R=j.sibling;if(R!==null)at=R;else{var K=j.return;K!==null?(at=K,Gu(K)):at=null}break t}}Tt=0,Vl=null,Vr(e,t,f,5);break;case 6:Tt=0,Vl=null,Vr(e,t,f,6);break;case 8:Wd(),gn=6;break e;default:throw Error(c(462))}}v_();break}catch(ae){gg(e,ae)}while(!0);return ql=$s=null,A.H=a,A.A=u,_t=n,at!==null?0:(Bt=null,ot=0,qs(),gn)}function v_(){for(;at!==null&&!en();)_g(at)}function _g(e){var t=Xm(e.alternate,e,Ca);e.memoizedProps=e.pendingProps,t===null?Gu(e):at=t}function vg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Hm(n,t,t.pendingProps,t.type,void 0,ot);break;case 11:t=Hm(n,t,t.pendingProps,t.type.render,t.ref,ot);break;case 5:pd(t);default:$m(n,t),t=at=uu(t,Ca),t=Xm(n,t,Ca)}e.memoizedProps=e.pendingProps,t===null?Gu(e):at=t}function Vr(e,t,n,a){ql=$s=null,pd(t),xe=null,Te=0;var u=t.return;try{if(o_(e,u,t,n,ot)){gn=1,Cu(e,Tl(n,e.current)),at=null;return}}catch(f){if(u!==null)throw at=u,f;gn=1,Cu(e,Tl(n,e.current)),at=null;return}t.flags&32768?(st||a===1?e=!0:qr||(ot&536870912)!==0?e=!1:(ui=e=!0,(a===2||a===9||a===3||a===6)&&(a=Yl.current,a!==null&&a.tag===13&&(a.flags|=16384))),jg(t,e)):Gu(t)}function Gu(e){var t=e;do{if((t.flags&32768)!==0){jg(t,ui);return}e=t.return;var n=d_(t.alternate,t,Ca);if(n!==null){at=n;return}if(t=t.sibling,t!==null){at=t;return}at=t=e}while(t!==null);gn===0&&(gn=5)}function jg(e,t){do{var n=h_(e.alternate,e);if(n!==null){n.flags&=32767,at=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){at=e;return}at=e=n}while(e!==null);gn=6,at=null}function Sg(e,t,n,a,u,f,b,j,R){e.cancelPendingCommit=null;do Yu();while(In!==0);if((_t&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(f=t.lanes|t.childLanes,f|=Bc,Hl(e,n,f,b,j,R),e===Bt&&(at=Bt=null,ot=0),Yr=t,hi=e,Aa=n,Zd=f,Fd=u,dg=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,k_(wt,function(){return Eg(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=A.T,A.T=null,u=ce.p,ce.p=2,b=_t,_t|=4;try{p_(e,t,n)}finally{_t=b,ce.p=u,A.T=a}}In=1,wg(),kg(),Ng()}}function wg(){if(In===1){In=0;var e=hi,t=Yr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var a=ce.p;ce.p=2;var u=_t;_t|=4;try{sg(t,e);var f=fh,b=su(e.containerInfo),j=f.focusedElem,R=f.selectionRange;if(b!==j&&j&&j.ownerDocument&&lu(j.ownerDocument.documentElement,j)){if(R!==null&&Mc(j)){var K=R.start,ae=R.end;if(ae===void 0&&(ae=K),"selectionStart"in j)j.selectionStart=K,j.selectionEnd=Math.min(ae,j.value.length);else{var oe=j.ownerDocument||document,F=oe&&oe.defaultView||window;if(F.getSelection){var te=F.getSelection(),Re=j.textContent.length,qe=Math.min(R.start,Re),Dt=R.end===void 0?qe:Math.min(R.end,Re);!te.extend&&qe>Dt&&(b=Dt,Dt=qe,qe=b);var q=nu(j,qe),U=nu(j,Dt);if(q&&U&&(te.rangeCount!==1||te.anchorNode!==q.node||te.anchorOffset!==q.offset||te.focusNode!==U.node||te.focusOffset!==U.offset)){var $=oe.createRange();$.setStart(q.node,q.offset),te.removeAllRanges(),qe>Dt?(te.addRange($),te.extend(U.node,U.offset)):($.setEnd(U.node,U.offset),te.addRange($))}}}}for(oe=[],te=j;te=te.parentNode;)te.nodeType===1&&oe.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<oe.length;j++){var ie=oe[j];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}tf=!!uh,fh=uh=null}finally{_t=u,ce.p=a,A.T=n}}e.current=t,In=2}}function kg(){if(In===2){In=0;var e=hi,t=Yr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var a=ce.p;ce.p=2;var u=_t;_t|=4;try{Pm(e,t.alternate,t)}finally{_t=u,ce.p=a,A.T=n}}In=3}}function Ng(){if(In===4||In===3){In=0,Xt();var e=hi,t=Yr,n=Aa,a=dg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?In=5:(In=0,Yr=hi=null,Tg(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(di=null),Yt(n),t=t.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(Gt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=A.T,u=ce.p,ce.p=2,A.T=null;try{for(var f=e.onRecoverableError,b=0;b<a.length;b++){var j=a[b];f(j.value,{componentStack:j.stack})}}finally{A.T=t,ce.p=u}}(Aa&3)!==0&&Yu(),Ks(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===Jd?po++:(po=0,Jd=e):po=0,mo(0)}}function Tg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,$i(t)))}function Yu(){return wg(),kg(),Ng(),Eg()}function Eg(){if(In!==5)return!1;var e=hi,t=Zd;Zd=0;var n=Yt(Aa),a=A.T,u=ce.p;try{ce.p=32>n?32:n,A.T=null,n=Fd,Fd=null;var f=hi,b=Aa;if(In=0,Yr=hi=null,Aa=0,(_t&6)!==0)throw Error(c(331));var j=_t;if(_t|=4,og(f.current),ig(f,f.current,b,n),_t=j,mo(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(Gt,f)}catch{}return!0}finally{ce.p=u,A.T=a,Tg(e,t)}}function Cg(e,t,n){t=Tl(n,t),t=Cd(e.stateNode,t,2),e=ii(e,t,2),e!==null&&(ll(e,2),Ks(e))}function Et(e,t,n){if(e.tag===3)Cg(e,e,n);else for(;t!==null;){if(t.tag===3){Cg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(di===null||!di.has(a))){e=Tl(n,e),n=Am(2),a=ii(t,n,2),a!==null&&(Mm(n,a,t,e),ll(a,2),Ks(a));break}}t=t.return}}function eh(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new b_;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(n)||($d=!0,u.add(n),e=j_.bind(null,e,t,n),t.then(e,e))}function j_(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Bt===e&&(ot&n)===n&&(gn===4||gn===3&&(ot&62914560)===ot&&300>nt()-Uu?(_t&2)===0&&Xr(e,0):Qd|=n,Gr===ot&&(Gr=0)),Ks(e)}function Ag(e,t){t===0&&(t=On()),e=Gs(e,t),e!==null&&(ll(e,t),Ks(e))}function S_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ag(e,n)}function w_(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,u=e.memoizedState;u!==null&&(n=u.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(c(314))}a!==null&&a.delete(t),Ag(e,n)}function k_(e,t){return tt(e,t)}var Xu=null,$r=null,th=!1,Vu=!1,nh=!1,mi=0;function Ks(e){e!==$r&&e.next===null&&($r===null?Xu=$r=e:$r=$r.next=e),Vu=!0,th||(th=!0,T_())}function mo(e,t){if(!nh&&Vu){nh=!0;do for(var n=!1,a=Xu;a!==null;){if(e!==0){var u=a.pendingLanes;if(u===0)var f=0;else{var b=a.suspendedLanes,j=a.pingedLanes;f=(1<<31-Pe(42|e)+1)-1,f&=u&~(b&~j),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(n=!0,Og(a,f))}else f=ot,f=Ie(a,a===Bt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(f&3)===0||Lt(a,f)||(n=!0,Og(a,f));a=a.next}while(n);nh=!1}}function N_(){Mg()}function Mg(){Vu=th=!1;var e=0;mi!==0&&U_()&&(e=mi);for(var t=nt(),n=null,a=Xu;a!==null;){var u=a.next,f=Rg(a,t);f===0?(a.next=null,n===null?Xu=u:n.next=u,u===null&&($r=n)):(n=a,(e!==0||(f&3)!==0)&&(Vu=!0)),a=u}In!==0&&In!==5||mo(e),mi!==0&&(mi=0)}function Rg(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var b=31-Pe(f),j=1<<b,R=u[b];R===-1?((j&n)===0||(j&a)!==0)&&(u[b]=ul(j,t)):R<=t&&(e.expiredLanes|=j),f&=~j}if(t=Bt,n=ot,n=Ie(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Tt===2||Tt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&et(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Lt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&et(a),Yt(n)){case 2:case 8:n=rn;break;case 32:n=wt;break;case 268435456:n=qt;break;default:n=wt}return a=Dg.bind(null,e),n=tt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&et(a),e.callbackPriority=2,e.callbackNode=null,2}function Dg(e,t){if(In!==0&&In!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var a=ot;return a=Ie(e,e===Bt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(pg(e,a,t),Rg(e,nt()),e.callbackNode!=null&&e.callbackNode===n?Dg.bind(null,e):null)}function Og(e,t){if(Yu())return null;pg(e,t,!0)}function T_(){B_(function(){(_t&6)!==0?tt(Vt,N_):Mg()})}function lh(){if(mi===0){var e=ni;e===0&&(e=He,He<<=1,(He&261888)===0&&(He=256)),mi=e}return mi}function Lg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:se(""+e)}function zg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function E_(e,t,n,a,u){if(t==="submit"&&n&&n.stateNode===u){var f=Lg((u[Oe]||null).action),b=a.submitter;b&&(t=(t=b[Oe]||null)?Lg(t.formAction):b.getAttribute("formAction"),t!==null&&(f=t,b=null));var j=new Hs("action","action",null,a,u);e.push({event:j,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(mi!==0){var R=b?zg(u,b):new FormData(u);Sd(n,{pending:!0,data:R,method:u.method,action:f},null,R)}}else typeof f=="function"&&(j.preventDefault(),R=b?zg(u,b):new FormData(u),Sd(n,{pending:!0,data:R,method:u.method,action:f},f,R))},currentTarget:u}]})}}for(var sh=0;sh<kr.length;sh++){var ah=kr[sh],C_=ah.toLowerCase(),A_=ah[0].toUpperCase()+ah.slice(1);gl(C_,"on"+A_)}gl(Lc,"onAnimationEnd"),gl(zc,"onAnimationIteration"),gl(Uc,"onAnimationStart"),gl("dblclick","onDoubleClick"),gl("focusin","onFocus"),gl("focusout","onBlur"),gl(iu,"onTransitionRun"),gl(Pf,"onTransitionStart"),gl(ru,"onTransitionCancel"),gl(Hc,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var go="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(" "),M_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(go));function Ug(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],u=a.event;a=a.listeners;e:{var f=void 0;if(t)for(var b=a.length-1;0<=b;b--){var j=a[b],R=j.instance,K=j.currentTarget;if(j=j.listener,R!==f&&u.isPropagationStopped())break e;f=j,u.currentTarget=K;try{f(u)}catch(ae){Nr(ae)}u.currentTarget=null,f=R}else for(b=0;b<a.length;b++){if(j=a[b],R=j.instance,K=j.currentTarget,j=j.listener,R!==f&&u.isPropagationStopped())break e;f=j,u.currentTarget=K;try{f(u)}catch(ae){Nr(ae)}u.currentTarget=null,f=R}}}}function it(e,t){var n=t[qn];n===void 0&&(n=t[qn]=new Set);var a=e+"__bubble";n.has(a)||(Hg(t,e,2,!1),n.add(a))}function ih(e,t,n){var a=0;t&&(a|=4),Hg(n,e,a,t)}var $u="_reactListening"+Math.random().toString(36).slice(2);function rh(e){if(!e[$u]){e[$u]=!0,pl.forEach(function(n){n!=="selectionchange"&&(M_.has(n)||ih(n,!1,e),ih(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$u]||(t[$u]=!0,ih("selectionchange",!1,t))}}function Hg(e,t,n,a){switch(hb(t)){case 2:var u=a0;break;case 8:u=i0;break;default:u=jh}n=u.bind(null,t,n,e),u=void 0,!bs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),a?u!==void 0?e.addEventListener(t,n,{capture:!0,passive:u}):e.addEventListener(t,n,!0):u!==void 0?e.addEventListener(t,n,{passive:u}):e.addEventListener(t,n,!1)}function ch(e,t,n,a,u){var f=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var b=a.tag;if(b===3||b===4){var j=a.stateNode.containerInfo;if(j===u)break;if(b===4)for(b=a.return;b!==null;){var R=b.tag;if((R===3||R===4)&&b.stateNode.containerInfo===u)return;b=b.return}for(;j!==null;){if(b=il(j),b===null)return;if(R=b.tag,R===5||R===6||R===26||R===27){a=f=b;continue e}j=j.parentNode}}a=a.return}jc(function(){var K=f,ae=ht(n),oe=[];e:{var F=cu.get(e);if(F!==void 0){var te=Hs,Re=e;switch(e){case"keypress":if(Oi(n)===0)break e;case"keydown":case"keyup":te=Nc;break;case"focusin":Re="focus",te=kc;break;case"focusout":Re="blur",te=kc;break;case"beforeblur":case"afterblur":te=kc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Ia;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=xr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=jr;break;case Lc:case zc:case Uc:te=yr;break;case Hc:te=Hi;break;case"scroll":case"scrollend":te=br;break;case"wheel":te=Ko;break;case"copy":case"cut":case"paste":te=_r;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=$o;break;case"toggle":case"beforetoggle":te=Zo}var qe=(t&4)!==0,Dt=!qe&&(e==="scroll"||e==="scrollend"),q=qe?F!==null?F+"Capture":null:F;qe=[];for(var U=K,$;U!==null;){var ie=U;if($=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||$===null||q===null||(ie=zs(U,q),ie!=null&&qe.push(bo(U,ie,$))),Dt)break;U=U.return}0<qe.length&&(F=new te(F,Re,null,n,ae),oe.push({event:F,listeners:qe}))}}if((t&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",F&&n!==Je&&(Re=n.relatedTarget||n.fromElement)&&(il(Re)||Re[At]))break e;if((te||F)&&(F=ae.window===ae?ae:(F=ae.ownerDocument)?F.defaultView||F.parentWindow:window,te?(Re=n.relatedTarget||n.toElement,te=K,Re=Re?il(Re):null,Re!==null&&(Dt=d(Re),qe=Re.tag,Re!==Dt||qe!==5&&qe!==27&&qe!==6)&&(Re=null)):(te=null,Re=K),te!==Re)){if(qe=Ia,ie="onMouseLeave",q="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(qe=$o,ie="onPointerLeave",q="onPointerEnter",U="pointer"),Dt=te==null?F:Kt(te),$=Re==null?F:Kt(Re),F=new qe(ie,U+"leave",te,n,ae),F.target=Dt,F.relatedTarget=$,ie=null,il(ae)===K&&(qe=new qe(q,U+"enter",Re,n,ae),qe.target=$,qe.relatedTarget=Dt,ie=qe),Dt=ie,te&&Re)t:{for(qe=R_,q=te,U=Re,$=0,ie=q;ie;ie=qe(ie))$++;ie=0;for(var Ue=U;Ue;Ue=qe(Ue))ie++;for(;0<$-ie;)q=qe(q),$--;for(;0<ie-$;)U=qe(U),ie--;for(;$--;){if(q===U||U!==null&&q===U.alternate){qe=q;break t}q=qe(q),U=qe(U)}qe=null}else qe=null;te!==null&&Bg(oe,F,te,qe,!1),Re!==null&&Dt!==null&&Bg(oe,Dt,Re,qe,!0)}}e:{if(F=K?Kt(K):window,te=F.nodeName&&F.nodeName.toLowerCase(),te==="select"||te==="input"&&F.type==="file")var bt=Po;else if(Xa(F))if(Q)bt=Ff;else{bt=Kf;var Le=Va}else te=F.nodeName,!te||te.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?K&&ze(K.elementType)&&(bt=Po):bt=Zf;if(bt&&(bt=bt(e,K))){Wo(oe,bt,n,ae);break e}Le&&Le(e,F,K),e==="focusout"&&K&&F.type==="number"&&K.memoizedProps.value!=null&&lt(F,"number",F.value)}switch(Le=K?Kt(K):window,e){case"focusin":(Xa(Le)||Le.contentEditable==="true")&&($a=Le,Rc=K,ma=null);break;case"focusout":ma=Rc=$a=null;break;case"mousedown":Dc=!0;break;case"contextmenu":case"mouseup":case"dragend":Dc=!1,au(oe,n,ae);break;case"selectionchange":if(Wf)break;case"keydown":case"keyup":au(oe,n,ae)}var We;if(Il)e:{switch(e){case"compositionstart":var ut="onCompositionStart";break e;case"compositionend":ut="onCompositionEnd";break e;case"compositionupdate":ut="onCompositionUpdate";break e}ut=void 0}else _s?Tc(e,n)&&(ut="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(ut="onCompositionStart");ut&&(Ii&&n.locale!=="ko"&&(_s||ut!=="onCompositionStart"?ut==="onCompositionEnd"&&_s&&(We=gr()):(Us=ae,Di="value"in Us?Us.value:Us.textContent,_s=!0)),Le=Qu(K,ut),0<Le.length&&(ut=new zi(ut,e,null,n,ae),oe.push({event:ut,listeners:Le}),We?ut.data=We:(We=Ya(n),We!==null&&(ut.data=We)))),(We=Sr?qi(e,n):Gi(e,n))&&(ut=Qu(K,"onBeforeInput"),0<ut.length&&(Le=new zi("onBeforeInput","beforeinput",null,n,ae),oe.push({event:Le,listeners:ut}),Le.data=We)),E_(oe,e,K,n,ae)}Ug(oe,t)})}function bo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qu(e,t){for(var n=t+"Capture",a=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=zs(e,n),u!=null&&a.unshift(bo(e,u,f)),u=zs(e,t),u!=null&&a.push(bo(e,u,f))),e.tag===3)return a;e=e.return}return[]}function R_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bg(e,t,n,a,u){for(var f=t._reactName,b=[];n!==null&&n!==a;){var j=n,R=j.alternate,K=j.stateNode;if(j=j.tag,R!==null&&R===a)break;j!==5&&j!==26&&j!==27||K===null||(R=K,u?(K=zs(n,f),K!=null&&b.unshift(bo(n,K,R))):u||(K=zs(n,f),K!=null&&b.push(bo(n,K,R)))),n=n.return}b.length!==0&&e.push({event:t,listeners:b})}var D_=/\r\n?/g,O_=/\u0000|\uFFFD/g;function Ig(e){return(typeof e=="string"?e:""+e).replace(D_,`
50
+ `).replace(O_,"")}function qg(e,t){return t=Ig(t),Ig(e)===t}function Rt(e,t,n,a,u,f){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Y(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Y(e,""+a);break;case"className":zn(e,"class",a);break;case"tabIndex":zn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":zn(e,n,a);break;case"style":Ae(e,a,f);break;case"data":if(t!=="object"){zn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=se(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(n==="formAction"?(t!=="input"&&Rt(e,t,"name",u.name,u,null),Rt(e,t,"formEncType",u.formEncType,u,null),Rt(e,t,"formMethod",u.formMethod,u,null),Rt(e,t,"formTarget",u.formTarget,u,null)):(Rt(e,t,"encType",u.encType,u,null),Rt(e,t,"method",u.method,u,null),Rt(e,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=se(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ke);break;case"onScroll":a!=null&&it("scroll",e);break;case"onScrollEnd":a!=null&&it("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=se(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":it("beforetoggle",e),it("toggle",e),Zn(e,"popover",a);break;case"xlinkActuate":wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":wn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":wn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":wn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":wn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Zn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=dt.get(n)||n,Zn(e,n,a))}}function oh(e,t,n,a,u,f){switch(n){case"style":Ae(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(c(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(c(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Y(e,a):(typeof a=="number"||typeof a=="bigint")&&Y(e,""+a);break;case"onScroll":a!=null&&it("scroll",e);break;case"onScrollEnd":a!=null&&it("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ke);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ds.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(u=n.endsWith("Capture"),t=n.slice(2,u?n.length-7:void 0),f=e[Oe]||null,f=f!=null?f[n]:null,typeof f=="function"&&e.removeEventListener(t,f,u),typeof a=="function")){typeof f!="function"&&f!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,u);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Zn(e,n,a)}}}function el(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":it("error",e),it("load",e);var a=!1,u=!1,f;for(f in n)if(n.hasOwnProperty(f)){var b=n[f];if(b!=null)switch(f){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Rt(e,t,f,b,n,null)}}u&&Rt(e,t,"srcSet",n.srcSet,n,null),a&&Rt(e,t,"src",n.src,n,null);return;case"input":it("invalid",e);var j=f=b=u=null,R=null,K=null;for(a in n)if(n.hasOwnProperty(a)){var ae=n[a];if(ae!=null)switch(a){case"name":u=ae;break;case"type":b=ae;break;case"checked":R=ae;break;case"defaultChecked":K=ae;break;case"value":f=ae;break;case"defaultValue":j=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(c(137,t));break;default:Rt(e,t,a,ae,n,null)}}Jl(e,f,j,R,K,b,u,!1);return;case"select":it("invalid",e),a=b=f=null;for(u in n)if(n.hasOwnProperty(u)&&(j=n[u],j!=null))switch(u){case"value":f=j;break;case"defaultValue":b=j;break;case"multiple":a=j;default:Rt(e,t,u,j,n,null)}t=f,n=b,e.multiple=!!a,t!=null?Xn(e,!!a,t,!1):n!=null&&Xn(e,!!a,n,!0);return;case"textarea":it("invalid",e),f=u=a=null;for(b in n)if(n.hasOwnProperty(b)&&(j=n[b],j!=null))switch(b){case"value":a=j;break;case"defaultValue":u=j;break;case"children":f=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(c(91));break;default:Rt(e,t,b,j,n,null)}k(e,a,u,f);return;case"option":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Rt(e,t,R,a,n,null)}return;case"dialog":it("beforetoggle",e),it("toggle",e),it("cancel",e),it("close",e);break;case"iframe":case"object":it("load",e);break;case"video":case"audio":for(a=0;a<go.length;a++)it(go[a],e);break;case"image":it("error",e),it("load",e);break;case"details":it("toggle",e);break;case"embed":case"source":case"link":it("error",e),it("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(K in n)if(n.hasOwnProperty(K)&&(a=n[K],a!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Rt(e,t,K,a,n,null)}return;default:if(ze(t)){for(ae in n)n.hasOwnProperty(ae)&&(a=n[ae],a!==void 0&&oh(e,t,ae,a,n,void 0));return}}for(j in n)n.hasOwnProperty(j)&&(a=n[j],a!=null&&Rt(e,t,j,a,n,null))}function L_(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,b=null,j=null,R=null,K=null,ae=null;for(te in n){var oe=n[te];if(n.hasOwnProperty(te)&&oe!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":R=oe;default:a.hasOwnProperty(te)||Rt(e,t,te,null,a,oe)}}for(var F in a){var te=a[F];if(oe=n[F],a.hasOwnProperty(F)&&(te!=null||oe!=null))switch(F){case"type":f=te;break;case"name":u=te;break;case"checked":K=te;break;case"defaultChecked":ae=te;break;case"value":b=te;break;case"defaultValue":j=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(c(137,t));break;default:te!==oe&&Rt(e,t,F,te,a,oe)}}ln(e,b,j,R,K,ae,f,u);return;case"select":te=b=j=F=null;for(f in n)if(R=n[f],n.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":te=R;default:a.hasOwnProperty(f)||Rt(e,t,f,null,a,R)}for(u in a)if(f=a[u],R=n[u],a.hasOwnProperty(u)&&(f!=null||R!=null))switch(u){case"value":F=f;break;case"defaultValue":j=f;break;case"multiple":b=f;default:f!==R&&Rt(e,t,u,f,a,R)}t=j,n=b,a=te,F!=null?Xn(e,!!n,F,!1):!!a!=!!n&&(t!=null?Xn(e,!!n,t,!0):Xn(e,!!n,n?[]:"",!1));return;case"textarea":te=F=null;for(j in n)if(u=n[j],n.hasOwnProperty(j)&&u!=null&&!a.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Rt(e,t,j,null,a,u)}for(b in a)if(u=a[b],f=n[b],a.hasOwnProperty(b)&&(u!=null||f!=null))switch(b){case"value":F=u;break;case"defaultValue":te=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(c(91));break;default:u!==f&&Rt(e,t,b,u,a,f)}pe(e,F,te);return;case"option":for(var Re in n)if(F=n[Re],n.hasOwnProperty(Re)&&F!=null&&!a.hasOwnProperty(Re))switch(Re){case"selected":e.selected=!1;break;default:Rt(e,t,Re,null,a,F)}for(R in a)if(F=a[R],te=n[R],a.hasOwnProperty(R)&&F!==te&&(F!=null||te!=null))switch(R){case"selected":e.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:Rt(e,t,R,F,a,te)}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 qe in n)F=n[qe],n.hasOwnProperty(qe)&&F!=null&&!a.hasOwnProperty(qe)&&Rt(e,t,qe,null,a,F);for(K in a)if(F=a[K],te=n[K],a.hasOwnProperty(K)&&F!==te&&(F!=null||te!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(c(137,t));break;default:Rt(e,t,K,F,a,te)}return;default:if(ze(t)){for(var Dt in n)F=n[Dt],n.hasOwnProperty(Dt)&&F!==void 0&&!a.hasOwnProperty(Dt)&&oh(e,t,Dt,void 0,a,F);for(ae in a)F=a[ae],te=n[ae],!a.hasOwnProperty(ae)||F===te||F===void 0&&te===void 0||oh(e,t,ae,F,a,te);return}}for(var q in n)F=n[q],n.hasOwnProperty(q)&&F!=null&&!a.hasOwnProperty(q)&&Rt(e,t,q,null,a,F);for(oe in a)F=a[oe],te=n[oe],!a.hasOwnProperty(oe)||F===te||F==null&&te==null||Rt(e,t,oe,F,a,te)}function Gg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var u=n[a],f=u.transferSize,b=u.initiatorType,j=u.duration;if(f&&j&&Gg(b)){for(b=0,j=u.responseEnd,a+=1;a<n.length;a++){var R=n[a],K=R.startTime;if(K>j)break;var ae=R.transferSize,oe=R.initiatorType;ae&&Gg(oe)&&(R=R.responseEnd,b+=ae*(R<j?1:(j-K)/(R-K)))}if(--a,t+=8*(f+b)/(u.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 uh=null,fh=null;function Ku(e){return e.nodeType===9?e:e.ownerDocument}function Yg(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 Xg(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 dh(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 hh=null;function U_(){var e=window.event;return e&&e.type==="popstate"?e===hh?!1:(hh=e,!0):(hh=null,!1)}var Vg=typeof setTimeout=="function"?setTimeout:void 0,H_=typeof clearTimeout=="function"?clearTimeout:void 0,$g=typeof Promise=="function"?Promise:void 0,B_=typeof queueMicrotask=="function"?queueMicrotask:typeof $g<"u"?function(e){return $g.resolve(null).then(e).catch(I_)}:Vg;function I_(e){setTimeout(function(){throw e})}function gi(e){return e==="head"}function Qg(e,t){var n=t,a=0;do{var u=n.nextSibling;if(e.removeChild(n),u&&u.nodeType===8)if(n=u.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(u),Fr(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")xo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,xo(n);for(var f=n.firstChild;f;){var b=f.nextSibling,j=f.nodeName;f[Sn]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=b}}else n==="body"&&xo(e.ownerDocument.body);n=u}while(n);Fr(t)}function Kg(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function ph(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ph(n),Bl(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function q_(e,t,n,a){for(;e.nodeType===1;){var u=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Sn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=cs(e.nextSibling),e===null)break}return null}function G_(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=cs(e.nextSibling),e===null))return null;return e}function Zg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=cs(e.nextSibling),e===null))return null;return e}function mh(e){return e.data==="$?"||e.data==="$~"}function gh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y_(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function cs(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 bh=null;function Fg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return cs(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Jg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Wg(e,t,n){switch(t=Ku(n),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function xo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Bl(e)}var os=new Map,Pg=new Set;function Zu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ma=ce.d;ce.d={f:X_,r:V_,D:$_,C:Q_,L:K_,m:Z_,X:J_,S:F_,M:W_};function X_(){var e=Ma.f(),t=Iu();return e||t}function V_(e){var t=nn(e);t!==null&&t.tag===5&&t.type==="form"?gm(t):Ma.r(e)}var Qr=typeof document>"u"?null:document;function eb(e,t,n){var a=Qr;if(a&&typeof t=="string"&&t){var u=kn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),Pg.has(u)||(Pg.add(u),e={rel:e,crossOrigin:n,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),el(t,"link",e),Fe(t),a.head.appendChild(t)))}}function $_(e){Ma.D(e),eb("dns-prefetch",e,null)}function Q_(e,t){Ma.C(e,t),eb("preconnect",e,t)}function K_(e,t,n){Ma.L(e,t,n);var a=Qr;if(a&&e&&t){var u='link[rel="preload"][as="'+kn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+kn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+kn(n.imageSizes)+'"]')):u+='[href="'+kn(e)+'"]';var f=u;switch(t){case"style":f=Kr(e);break;case"script":f=Zr(e)}os.has(f)||(e=S({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),os.set(f,e),a.querySelector(u)!==null||t==="style"&&a.querySelector(yo(f))||t==="script"&&a.querySelector(_o(f))||(t=a.createElement("link"),el(t,"link",e),Fe(t),a.head.appendChild(t)))}}function Z_(e,t){Ma.m(e,t);var n=Qr;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+kn(a)+'"][href="'+kn(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Zr(e)}if(!os.has(f)&&(e=S({rel:"modulepreload",href:e},t),os.set(f,e),n.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(_o(f)))return}a=n.createElement("link"),el(a,"link",e),Fe(a),n.head.appendChild(a)}}}function F_(e,t,n){Ma.S(e,t,n);var a=Qr;if(a&&e){var u=cn(a).hoistableStyles,f=Kr(e);t=t||"default";var b=u.get(f);if(!b){var j={loading:0,preload:null};if(b=a.querySelector(yo(f)))j.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},n),(n=os.get(f))&&xh(e,n);var R=b=a.createElement("link");Fe(R),el(R,"link",e),R._p=new Promise(function(K,ae){R.onload=K,R.onerror=ae}),R.addEventListener("load",function(){j.loading|=1}),R.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Fu(b,t,a)}b={type:"stylesheet",instance:b,count:1,state:j},u.set(f,b)}}}function J_(e,t){Ma.X(e,t);var n=Qr;if(n&&e){var a=cn(n).hoistableScripts,u=Zr(e),f=a.get(u);f||(f=n.querySelector(_o(u)),f||(e=S({src:e,async:!0},t),(t=os.get(u))&&yh(e,t),f=n.createElement("script"),Fe(f),el(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function W_(e,t){Ma.M(e,t);var n=Qr;if(n&&e){var a=cn(n).hoistableScripts,u=Zr(e),f=a.get(u);f||(f=n.querySelector(_o(u)),f||(e=S({src:e,async:!0,type:"module"},t),(t=os.get(u))&&yh(e,t),f=n.createElement("script"),Fe(f),el(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function tb(e,t,n,a){var u=(u=ve.current)?Zu(u):null;if(!u)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Kr(n.href),n=cn(u).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Kr(n.href);var f=cn(u).hoistableStyles,b=f.get(e);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,b),(f=u.querySelector(yo(e)))&&!f._p&&(b.instance=f,b.state.loading=5),os.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},os.set(e,n),f||P_(u,e,n,b.state))),t&&a===null)throw Error(c(528,""));return b}if(t&&a!==null)throw Error(c(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zr(n),n=cn(u).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Kr(e){return'href="'+kn(e)+'"'}function yo(e){return'link[rel="stylesheet"]['+e+"]"}function nb(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function P_(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),el(t,"link",n),Fe(t),e.head.appendChild(t))}function Zr(e){return'[src="'+kn(e)+'"]'}function _o(e){return"script[async]"+e}function lb(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kn(n.href)+'"]');if(a)return t.instance=a,Fe(a),a;var u=S({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Fe(a),el(a,"style",u),Fu(a,n.precedence,e),t.instance=a;case"stylesheet":u=Kr(n.href);var f=e.querySelector(yo(u));if(f)return t.state.loading|=4,t.instance=f,Fe(f),f;a=nb(n),(u=os.get(u))&&xh(a,u),f=(e.ownerDocument||e).createElement("link"),Fe(f);var b=f;return b._p=new Promise(function(j,R){b.onload=j,b.onerror=R}),el(f,"link",a),t.state.loading|=4,Fu(f,n.precedence,e),t.instance=f;case"script":return f=Zr(n.src),(u=e.querySelector(_o(f)))?(t.instance=u,Fe(u),u):(a=n,(u=os.get(f))&&(a=S({},n),yh(a,u)),e=e.ownerDocument||e,u=e.createElement("script"),Fe(u),el(u,"link",a),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Fu(a,n.precedence,e));return t.instance}function Fu(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,f=u,b=0;b<a.length;b++){var j=a[b];if(j.dataset.precedence===t)f=j;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function xh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ju=null;function sb(e,t,n){if(Ju===null){var a=new Map,u=Ju=new Map;u.set(n,a)}else u=Ju,a=u.get(n),a||(a=new Map,u.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),u=0;u<n.length;u++){var f=n[u];if(!(f[Sn]||f[Qt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var b=f.getAttribute(t)||"";b=e+b;var j=a.get(b);j?j.push(f):a.set(b,[f])}}return a}function ab(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function e0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ib(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function t0(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=Kr(a.href),f=t.querySelector(yo(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,Fe(f);return}f=t.ownerDocument||t,a=nb(a),(u=os.get(u))&&xh(a,u),f=f.createElement("link"),Fe(f);var b=f;b._p=new Promise(function(j,R){b.onload=j,b.onerror=R}),el(f,"link",a),n.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Wu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var _h=0;function n0(e,t){return e.stylesheets&&e.count===0&&ef(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&ef(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&_h===0&&(_h=62500*z_());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ef(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>_h?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Wu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ef(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pu=null;function ef(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pu=new Map,t.forEach(l0,e),Pu=null,Wu.call(e))}function l0(e,t){if(!(t.state.loading&4)){var n=Pu.get(e);if(n)var a=n.get(null);else{n=new Map,Pu.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var b=u[f];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(n.set(b.dataset.precedence,b),a=b)}a&&n.set(null,a)}u=t.instance,b=u.getAttribute("data-precedence"),f=n.get(b)||a,f===a&&n.set(null,u),n.set(b,u),this.count++,a=Wu.bind(this),u.addEventListener("load",a),u.addEventListener("error",a),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var vo={$$typeof:G,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function s0(e,t,n,a,u,f,b,j,R){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=fl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.hiddenUpdates=fl(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function rb(e,t,n,a,u,f,b,j,R,K,ae,oe){return e=new s0(e,t,n,b,R,K,ae,oe,j),t=1,f===!0&&(t|=24),f=bl(3,null,null,t),e.current=f,f.stateNode=e,t=Kc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:a,isDehydrated:n,cache:t},ld(f),e}function cb(e){return e?(e=Za,e):Za}function ob(e,t,n,a,u,f){u=cb(u),a.context===null?a.context=u:a.pendingContext=u,a=ai(t),a.payload={element:n},f=f===void 0?null:f,f!==null&&(a.callback=f),n=ii(e,a,t),n!==null&&(zl(n,e,t),Wc(n,e,t))}function ub(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vh(e,t){ub(e,t),(e=e.alternate)&&ub(e,t)}function fb(e){if(e.tag===13||e.tag===31){var t=Gs(e,67108864);t!==null&&zl(t,e,67108864),vh(e,67108864)}}function db(e){if(e.tag===13||e.tag===31){var t=Ql();t=hl(t);var n=Gs(e,t);n!==null&&zl(n,e,t),vh(e,t)}}var tf=!0;function a0(e,t,n,a){var u=A.T;A.T=null;var f=ce.p;try{ce.p=2,jh(e,t,n,a)}finally{ce.p=f,A.T=u}}function i0(e,t,n,a){var u=A.T;A.T=null;var f=ce.p;try{ce.p=8,jh(e,t,n,a)}finally{ce.p=f,A.T=u}}function jh(e,t,n,a){if(tf){var u=Sh(a);if(u===null)ch(e,t,a,nf,n),pb(e,a);else if(c0(u,e,t,n,a))a.stopPropagation();else if(pb(e,a),t&4&&-1<r0.indexOf(e)){for(;u!==null;){var f=nn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var b=_e(f.pendingLanes);if(b!==0){var j=f;for(j.pendingLanes|=2,j.entangledLanes|=2;b;){var R=1<<31-Pe(b);j.entanglements[1]|=R,b&=~R}Ks(f),(_t&6)===0&&(Hu=nt()+500,mo(0))}}break;case 31:case 13:j=Gs(f,2),j!==null&&zl(j,f,2),Iu(),vh(f,2)}if(f=Sh(a),f===null&&ch(e,t,a,nf,n),f===u)break;u=f}u!==null&&a.stopPropagation()}else ch(e,t,a,null,n)}}function Sh(e){return e=ht(e),wh(e)}var nf=null;function wh(e){if(nf=null,e=il(e),e!==null){var t=d(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=h(t),e!==null)return e;e=null}else if(n===31){if(e=m(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return nf=e,null}function hb(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(St()){case Vt:return 2;case rn:return 8;case wt:case xn:return 32;case qt:return 268435456;default:return 32}default:return 32}}var kh=!1,bi=null,xi=null,yi=null,jo=new Map,So=new Map,_i=[],r0="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 pb(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":jo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":So.delete(t.pointerId)}}function wo(e,t,n,a,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:f,targetContainers:[u]},t!==null&&(t=nn(t),t!==null&&fb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function c0(e,t,n,a,u){switch(t){case"focusin":return bi=wo(bi,e,t,n,a,u),!0;case"dragenter":return xi=wo(xi,e,t,n,a,u),!0;case"mouseover":return yi=wo(yi,e,t,n,a,u),!0;case"pointerover":var f=u.pointerId;return jo.set(f,wo(jo.get(f)||null,e,t,n,a,u)),!0;case"gotpointercapture":return f=u.pointerId,So.set(f,wo(So.get(f)||null,e,t,n,a,u)),!0}return!1}function mb(e){var t=il(e.target);if(t!==null){var n=d(t);if(n!==null){if(t=n.tag,t===13){if(t=h(n),t!==null){e.blockedOn=t,wl(e.priority,function(){db(n)});return}}else if(t===31){if(t=m(n),t!==null){e.blockedOn=t,wl(e.priority,function(){db(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Sh(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Je=a,n.target.dispatchEvent(a),Je=null}else return t=nn(n),t!==null&&fb(t),e.blockedOn=n,!1;t.shift()}return!0}function gb(e,t,n){lf(e)&&n.delete(t)}function o0(){kh=!1,bi!==null&&lf(bi)&&(bi=null),xi!==null&&lf(xi)&&(xi=null),yi!==null&&lf(yi)&&(yi=null),jo.forEach(gb),So.forEach(gb)}function sf(e,t){e.blockedOn===t&&(e.blockedOn=null,kh||(kh=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,o0)))}var af=null;function bb(e){af!==e&&(af=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){af===e&&(af=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],u=e[t+2];if(typeof a!="function"){if(wh(a||n)===null)continue;break}var f=nn(n);f!==null&&(e.splice(t,3),t-=3,Sd(f,{pending:!0,data:u,method:n.method,action:a},a,u))}}))}function Fr(e){function t(R){return sf(R,e)}bi!==null&&sf(bi,e),xi!==null&&sf(xi,e),yi!==null&&sf(yi,e),jo.forEach(t),So.forEach(t);for(var n=0;n<_i.length;n++){var a=_i[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<_i.length&&(n=_i[0],n.blockedOn===null);)mb(n),n.blockedOn===null&&_i.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var u=n[a],f=n[a+1],b=u[Oe]||null;if(typeof f=="function")b||bb(n);else if(b){var j=null;if(f&&f.hasAttribute("formAction")){if(u=f,b=f[Oe]||null)j=b.formAction;else if(wh(u)!==null)continue}else j=b.action;typeof j=="function"?n[a+1]=j:(n.splice(a,3),a-=3),bb(n)}}}function xb(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(b){return u=b})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Nh(e){this._internalRoot=e}rf.prototype.render=Nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var n=t.current,a=Ql();ob(n,a,e,t,null,null)},rf.prototype.unmount=Nh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ob(e.current,2,null,e,null,null),Iu(),t[At]=null}};function rf(e){this._internalRoot=e}rf.prototype.unstable_scheduleHydration=function(e){if(e){var t=$t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_i.length&&t!==0&&t<_i[n].priority;n++);_i.splice(n,0,e),n===0&&mb(e)}};var yb=l.version;if(yb!=="19.2.8")throw Error(c(527,yb,"19.2.8"));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=x(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var u0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cf.isDisabled&&cf.supportsFiber)try{Gt=cf.inject(u0),ct=cf}catch{}}return No.createRoot=function(e,t){if(!o(e))throw Error(c(299));var n=!1,a="",u=Nm,f=Tm,b=Em;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=rb(e,1,!1,null,null,n,a,null,u,f,b,xb),e[At]=t.current,rh(e),new Nh(t)},No.hydrateRoot=function(e,t,n){if(!o(e))throw Error(c(299));var a=!1,u="",f=Nm,b=Tm,j=Em,R=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(b=n.onCaughtError),n.onRecoverableError!==void 0&&(j=n.onRecoverableError),n.formState!==void 0&&(R=n.formState)),t=rb(e,1,!0,t,n??null,a,u,R,f,b,j,xb),t.context=cb(null),n=t.current,a=Ql(),a=hl(a),u=ai(a),u.callback=null,ii(n,u,a),n=a,t.current.lanes=n,ll(t,n),Ks(t),e[At]=t.current,rh(e),new rf(t)},No.version="19.2.8",No}var Ab;function j0(){if(Ab)return Ah.exports;Ab=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(l){console.error(l)}}return s(),Ah.exports=v0(),Ah.exports}var S0=j0();const Px=1;var Oa,uc,fc,dc,hc,Go,pc,Gf,ey;class w0{constructor(l){un(this,Gf);un(this,Oa,null);un(this,uc,new Set);un(this,fc,500);un(this,dc,null);un(this,hc,!1);un(this,Go,null);un(this,pc,null);this.url=l}get statusText(){return this.connected?"Хост на связи":"Нет связи с хостом"}onStatus(l){vt(this,pc,l)}connect(){if(Ye(this,hc))return;const l=new WebSocket(this.url);vt(this,Oa,l),l.addEventListener("open",()=>{var r,c;vt(this,fc,500),this.send({type:"hello",protocol:Px,clientName:"ccv-web"}),(r=Ye(this,Go))==null||r.call(this),(c=Ye(this,pc))==null||c.call(this)}),l.addEventListener("message",r=>{let c;try{c=JSON.parse(String(r.data))}catch{return}for(const o of Ye(this,uc))o(c)}),l.addEventListener("close",()=>{var r;vt(this,Oa,null),(r=Ye(this,pc))==null||r.call(this),Mn(this,Gf,ey).call(this)}),l.addEventListener("error",()=>l.close())}onReconnect(l){vt(this,Go,l)}on(l){return Ye(this,uc).add(l),()=>Ye(this,uc).delete(l)}send(l){var r;((r=Ye(this,Oa))==null?void 0:r.readyState)===WebSocket.OPEN&&Ye(this,Oa).send(JSON.stringify(l))}get connected(){var l;return((l=Ye(this,Oa))==null?void 0:l.readyState)===WebSocket.OPEN}close(){var l;vt(this,hc,!0),(l=Ye(this,Oa))==null||l.close()}}Oa=new WeakMap,uc=new WeakMap,fc=new WeakMap,dc=new WeakMap,hc=new WeakMap,Go=new WeakMap,pc=new WeakMap,Gf=new WeakSet,ey=function(){if(Ye(this,hc)||Ye(this,dc)!==null)return;const l=Ye(this,fc);vt(this,fc,Math.min(l*2,1e4)),vt(this,dc,window.setTimeout(()=>{vt(this,dc,null),this.connect()},l))};const k0=1,ty="ccv:relay",Cf="ccv:relay.host";function N0(){try{const s=localStorage.getItem(ty);if(!s)return null;const l=JSON.parse(s);return typeof(l==null?void 0:l.token)!="string"||typeof l.expiresAt=="number"&&l.expiresAt<=Date.now()?null:l}catch{return null}}function ny(){localStorage.removeItem(ty)}var na,mc,la,gc,bc,Ci,sr,ar,Ai,ir,xc,rr,cr,Jt,wi,ep,ly,tr,tp;class T0{constructor(l){un(this,Jt);un(this,na,null);un(this,mc,new Set);un(this,la,null);un(this,gc,null);un(this,bc,500);un(this,Ci,null);un(this,sr,!1);un(this,ar,!1);un(this,Ai,!1);un(this,ir,null);un(this,xc,"Подключаемся…");un(this,rr,0);un(this,cr,[]);this.session=l}get connected(){return Ye(this,ar)&&Ye(this,Ai)}get statusText(){return Ye(this,xc)}get hostId(){return Ye(this,ir)}on(l){return Ye(this,mc).add(l),()=>Ye(this,mc).delete(l)}onReconnect(l){vt(this,gc,l)}onStatus(l){vt(this,la,l)}connect(){Ye(this,sr)||Mn(this,Jt,ep).call(this)}send(l){if(!Ye(this,ar)){Ye(this,cr).length<64&&Ye(this,cr).push(l);return}Mn(this,Jt,tr).call(this,{t:"client.frame",body:l})}close(){var l;vt(this,sr,!0),Ye(this,Ci)!==null&&window.clearTimeout(Ye(this,Ci)),(l=Ye(this,na))==null||l.close()}}na=new WeakMap,mc=new WeakMap,la=new WeakMap,gc=new WeakMap,bc=new WeakMap,Ci=new WeakMap,sr=new WeakMap,ar=new WeakMap,Ai=new WeakMap,ir=new WeakMap,xc=new WeakMap,rr=new WeakMap,cr=new WeakMap,Jt=new WeakSet,wi=function(l){var r;Ye(this,xc)!==l&&(vt(this,xc,l),(r=Ye(this,la))==null||r.call(this))},ep=async function(){if(Ye(this,na))return;if(!Ye(this,ir))try{vt(this,ir,await E0(this.session.token))}catch(c){Mn(this,Jt,wi).call(this,c instanceof Error?c.message:String(c)),Mn(this,Jt,tp).call(this);return}const l=location.protocol==="https:"?"wss":"ws",r=new WebSocket(`${l}://${location.host}/relay/client`);vt(this,na,r),r.addEventListener("open",()=>{Mn(this,Jt,tr).call(this,{t:"client.hello",protocol:k0,token:this.session.token})}),r.addEventListener("message",c=>{let o;try{o=JSON.parse(String(c.data))}catch{return}Mn(this,Jt,ly).call(this,o)}),r.addEventListener("close",()=>{var c;vt(this,na,null),vt(this,ar,!1),vt(this,Ai,!1),Mn(this,Jt,wi).call(this,"Нет связи с сервером"),(c=Ye(this,la))==null||c.call(this),Mn(this,Jt,tp).call(this)}),r.addEventListener("error",()=>r.close())},ly=function(l){var r,c,o,d,h,m,g;switch(l.t){case"client.ok":vt(this,bc,500),Mn(this,Jt,tr).call(this,{t:"client.attach",hostId:Ye(this,ir)??"",...Ye(this,rr)>0?{sinceRseq:Ye(this,rr)}:{}});return;case"client.attached":vt(this,ar,!0),vt(this,Ai,l.online),vt(this,rr,l.rseq),Mn(this,Jt,wi).call(this,l.online?"Хост на связи":"Компьютер не на связи"),Mn(this,Jt,tr).call(this,{t:"client.frame",body:{type:"hello",protocol:Px,clientName:"ccv-web-relay"}});const x=Ye(this,cr);vt(this,cr,[]);for(const _ of x)Mn(this,Jt,tr).call(this,{t:"client.frame",body:_});(r=Ye(this,gc))==null||r.call(this),(c=Ye(this,la))==null||c.call(this);return;case"host.frame":{l.rseq>0&&vt(this,rr,l.rseq);const _=l.body;for(const S of Ye(this,mc))S(_);return}case"host.online":vt(this,Ai,!0),Mn(this,Jt,wi).call(this,"Хост на связи"),(o=Ye(this,gc))==null||o.call(this),(d=Ye(this,la))==null||d.call(this);return;case"host.offline":vt(this,Ai,!1),Mn(this,Jt,wi).call(this,"Компьютер не на связи"),(h=Ye(this,la))==null||h.call(this);return;case"ping":Mn(this,Jt,tr).call(this,{t:"pong",nonce:l.nonce});return;case"error":if(l.code==="auth"){ny(),location.href="/login";return}if(l.code==="not_found"){localStorage.removeItem(Cf),Mn(this,Jt,wi).call(this,"Этот компьютер отвязан от аккаунта"),vt(this,sr,!0),(m=Ye(this,na))==null||m.close();return}l.code!=="offline"&&Mn(this,Jt,wi).call(this,l.message),(g=Ye(this,la))==null||g.call(this);return}},tr=function(l){var r;((r=Ye(this,na))==null?void 0:r.readyState)===WebSocket.OPEN&&Ye(this,na).send(JSON.stringify(l))},tp=function(){if(Ye(this,sr)||Ye(this,Ci)!==null)return;const l=Ye(this,bc);vt(this,bc,Math.min(l*2,1e4)),vt(this,Ci,window.setTimeout(()=>{vt(this,Ci,null),Mn(this,Jt,ep).call(this)},l))};async function E0(s){const l=new URLSearchParams(location.search).get("host");if(l)return localStorage.setItem(Cf,l),l;const r=localStorage.getItem(Cf);if(r)return r;const c=await fetch("/api/hosts",{headers:{authorization:`Bearer ${s}`}});if(c.status===401)throw ny(),location.href="/login",new Error("нужен вход");const d=(await c.json()).hosts??[];if(d.length===1&&d[0])return localStorage.setItem(Cf,d[0].id),d[0].id;throw location.href="/hosts",new Error("выберите компьютер")}function Af(){return location.pathname==="/app"||location.pathname.startsWith("/app/")?"relay":"local"}const C0=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`;function A0(){if(Af()==="local")return new w0(C0);const s=N0();return s?new T0(s):(location.replace(`/login?next=${encodeURIComponent(location.pathname+location.search)}`),null)}const sy="ccv:drafts",M0=40,R0=2e4,D0=500;let Uo=null,Ho=null;function gp(){if(Uo)return Uo;const s=new Map;try{const l=localStorage.getItem(sy);if(l){const r=JSON.parse(l);if(typeof r=="object"&&r!==null)for(const[c,o]of Object.entries(r))typeof o=="string"&&o!==""&&s.set(c,o)}}catch{}return Uo=s,window.addEventListener("pagehide",ry),s}function Oh(s){return gp().get(s)??""}function ay(s,l){const r=gp(),c=l.slice(0,R0),o=r.has(s);if(o&&r.delete(s),c!=="")r.set(s,c);else if(!o)return;for(;r.size>M0;){const d=r.keys().next();if(d.done)break;r.delete(d.value)}z0(),L0()}function iy(){const s=new Set;for(const l of gp().keys())s.add(l.startsWith("side:")?l.slice(5):l);return[...s].sort()}const np=new Set;let Mb="";function O0(s){return np.add(s),()=>np.delete(s)}function L0(){const s=iy(),l=s.join(`
51
+ `);if(l!==Mb){Mb=l;for(const r of np)r(s)}}function z0(){Ho===null&&(Ho=window.setTimeout(ry,D0))}function ry(){if(Ho!==null&&window.clearTimeout(Ho),Ho=null,!!Uo)try{localStorage.setItem(sy,JSON.stringify(Object.fromEntries(Uo)))}catch{}}const _l={items:[],pending:[],lastSeq:0,contextTokens:null},Lh={entries:[],total:0,loading:!1};function cy(s){var l;return((l=s.entries[0])==null?void 0:l.seq)??1}function Rb(s){return s.total>0&&cy(s)>1}function U0(s,l){const r=new Set(s.entries.map(o=>o.seq));return{entries:[...s.entries,...l.entries.filter(o=>!r.has(o.seq))].sort((o,d)=>o.seq-d.seq),total:l.total,loading:!1}}function H0(s){return Mf(_l,s).items.map(l=>({...l,id:`h:${l.id}`}))}function Mf(s,l){let r=s;for(const c of l)c.seq<=r.lastSeq||(r={...B0(r,c.event,c.seq),lastSeq:c.seq});return r}function B0(s,l,r){var o,d;const c=s.items;switch(l.kind){case"user.message":return Zs(s,{id:`u${r}`,kind:"user",text:l.text,images:l.images});case"assistant.delta":{const h=c.findIndex(g=>g.id===l.blockId);if(h===-1)return Zs(s,{id:l.blockId,kind:"assistant",text:l.text,streaming:!0});const m=c[h];return Jr(s,h,{...m,text:m.text+l.text})}case"assistant.text":{const h=c.findIndex(g=>g.id===l.blockId),m={id:l.blockId,kind:"assistant",text:l.text,streaming:!1};return h===-1?Zs(s,m):Jr(s,h,m)}case"thinking.delta":{const h=c.findIndex(g=>g.id===l.blockId);if(h===-1)return Zs(s,{id:l.blockId,kind:"thinking",text:l.text});const m=c[h];return Jr(s,h,{...m,text:m.text+l.text})}case"assistant.thinking":{const h=c.findIndex(g=>g.id===l.blockId),m={id:l.blockId,kind:"thinking",text:l.text};return h===-1?Zs(s,m):Jr(s,h,m)}case"tool.use":return Zs(s,{id:`t${l.toolUseId}`,kind:"tool",toolUseId:l.toolUseId,name:l.name,input:l.input,result:null,isError:!1,awaitingPermission:!1});case"tool.result":{const h=c.findIndex(g=>g.kind==="tool"&&g.toolUseId===l.toolUseId);if(h===-1)return s;const m=c[h];return Jr(s,h,{...m,result:l.content,isError:l.isError,awaitingPermission:!1})}case"permission.request":return{...s,pending:[...s.pending,{requestId:l.requestId,toolName:l.toolName,input:l.input,...l.reason?{reason:l.reason}:{},...l.questions?{questions:l.questions}:{},...l.toolUseId?{toolUseId:l.toolUseId}:{}}]};case"permission.resolved":{const h=s.pending.find(g=>g.requestId===l.requestId),m=s.pending.filter(g=>g.requestId!==l.requestId);if(l.answers&&(h!=null&&h.toolUseId)){const g=c.findIndex(x=>x.kind==="tool"&&x.toolUseId===h.toolUseId);if(g!==-1){const x=c[g];return Jr({...s,pending:m},g,{...x,answers:l.answers})}}return l.decision==="allow"?{...s,pending:m}:Zs({...s,pending:m},{id:`p${r}`,kind:"notice",tone:"info",text:`Отклонено${l.reason?`: ${l.reason}`:""}`})}case"result":{const h=s.items.map(g=>g.kind==="assistant"&&g.streaming?{...g,streaming:!1}:g),m=l.contextTokens??s.contextTokens;return Zs({...s,items:h,contextTokens:m},{id:`r${r}`,kind:"result",subtype:l.subtype,isError:l.isError,durationMs:l.durationMs,costUsd:l.costUsd,inputTokens:((o=l.usage)==null?void 0:o.inputTokens)??0,outputTokens:((d=l.usage)==null?void 0:d.outputTokens)??0})}case"system":return l.subtype!=="compact_boundary"?s:Zs(s,{id:`s${r}`,kind:"notice",tone:"info",text:"Контекст сжат"});case"error":return Zs(s,{id:`e${r}`,kind:"notice",tone:"error",text:l.message});case"state":return s;case"rewound":return s;default:return s}}function I0(s,l){let r=0;for(let c=0;c<s.length;c++)if(s[c].event.kind==="user.message"){if(r===l)return s.slice(0,c);r++}return s}function q0(s,l,r){const c=l-r;if(c<=0)return[];let o=0;for(let d=0;d<s.length;d++)if(s[d].kind==="user"){if(o===c)return s.slice(0,d);o++}return s}function Zs(s,l){return{...s,items:[...s.items,l]}}function Jr(s,l,r){const c=s.items.slice();return c[l]=r,{...s,items:c}}const lp="ccv:theme",zh=["system","light","dark"];function G0(){const[s,l]=y.useState(Y0);y.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)"),d=()=>{const h=s==="dark"||s==="system"&&o.matches;document.documentElement.dataset.theme=h?"dark":"light"};return d(),o.addEventListener("change",d),()=>o.removeEventListener("change",d)},[s]);const r=y.useCallback(o=>{try{localStorage.setItem(lp,o)}catch{}l(o)},[]),c=y.useCallback(()=>{l(o=>{const d=zh[(zh.indexOf(o)+1)%zh.length];try{localStorage.setItem(lp,d)}catch{}return d})},[]);return[s,r,c]}function Y0(){try{const s=localStorage.getItem(lp);if(s==="light"||s==="dark"||s==="system")return s}catch{}return"system"}const oy=[{value:"default",hint:"спрашивать перед каждым действием"},{value:"acceptEdits",hint:"правки файлов без подтверждения"},{value:"plan",hint:"только чтение и план, без изменений"},{value:"auto",hint:"спрашивать только о рискованном — решает сам"},{value:"bypassPermissions",hint:"ничего не спрашивать"}],X0=[{value:"default",hint:"рискованное agy отклоняет сам: спросить он не может"},{value:"acceptEdits",hint:"правки файлов без подтверждения, команды — нет"},{value:"plan",hint:"только план, без изменений"},{value:"bypassPermissions",hint:"разрешено всё, включая команды"}],or={sidebar:{side:"left",min:200,max:520,width:276,label:"сессий"},files:{side:"left",min:180,max:560,width:260,label:"файлов"},search:{side:"left",min:220,max:640,width:320,label:"поиска"},git:{side:"left",min:220,max:640,width:320,label:"истории"},ask:{side:"right",min:260,max:720,width:380,label:"вопроса"}},V0=320,uy="ccv:panes";function $0(s){return`--${s}-w`}function fy(s,l){const r=or[s];return Math.round(Math.min(r.max,Math.max(r.min,l)))}function Q0(){const s={};for(const l of Object.keys(or))s[l]=or[l].width;try{const l=localStorage.getItem(uy);if(l){const r=JSON.parse(l);for(const c of Object.keys(or)){const o=r[c];typeof o=="number"&&Number.isFinite(o)&&(s[c]=fy(c,o))}}}catch{}return s}function K0(){const[s,l]=y.useState(Q0),r=y.useCallback(h=>{try{localStorage.setItem(uy,JSON.stringify(h))}catch{}},[]),c=y.useCallback((h,m)=>{l(g=>{const x=fy(h,m);if(g[h]===x)return g;const _={...g,[h]:x};return r(_),_})},[r]),o=y.useCallback(h=>{l(m=>{const g={...m,[h]:or[h].width};return r(g),g})},[r]),d={};for(const h of Object.keys(or))d[$0(h)]=`${s[h]}px`;return{widths:s,style:d,setWidth:c,reset:o}}const Uh=260,dy=120,Z0=200,Db="ccv:terminal-h";function Ob(s,l){return Math.round(Math.min(l,Math.max(dy,s)))}function F0(){const[s,l]=y.useState(()=>{try{const d=localStorage.getItem(Db);if(d){const h=Number(d);if(Number.isFinite(h))return Ob(h,1/0)}}catch{}return Uh}),r=y.useCallback(d=>{try{localStorage.setItem(Db,String(d))}catch{}},[]),c=y.useCallback((d,h)=>{const m=Ob(d,h);l(g=>g===m?g:(r(m),m))},[r]),o=y.useCallback(()=>{l(Uh),r(Uh)},[r]);return{height:s,setHeight:c,reset:o}}function Yf(s){const[l,r]=y.useState(()=>typeof window>"u"?!1:window.matchMedia(s).matches);return y.useEffect(()=>{const c=window.matchMedia(s),o=()=>r(c.matches);return o(),c.addEventListener("change",o),()=>c.removeEventListener("change",o)},[s]),l}const J0=500,W0=6;function hy({onLongPress:s,onClick:l,disabled:r=!1,thresholdMs:c=J0,moveCancelPx:o=W0}){const d=y.useRef(null),[h,m]=y.useState(!1),g=y.useCallback(()=>{d.current&&window.clearTimeout(d.current.timer),d.current=null,m(!1)},[]),x=y.useCallback(C=>{if(r||C.button!==0)return;const L={timer:0,x:C.clientX,y:C.clientY,fired:!1};L.timer=window.setTimeout(()=>{L.fired=!0,m(!1),s()},c),d.current=L,m(!0)},[r,c,s]),_=y.useCallback(C=>{const L=d.current;!L||L.fired||Math.hypot(C.clientX-L.x,C.clientY-L.y)>o&&g()},[o,g]),S=y.useCallback(()=>{d.current&&!d.current.fired?g():m(!1)},[g]),v=y.useCallback(C=>{var L;if((L=d.current)!=null&&L.fired){d.current=null,C.preventDefault();return}if(!r){if(C.shiftKey){s();return}l()}},[r,l,s]),E=y.useCallback(C=>{C.preventDefault()},[]),T=y.useCallback(C=>{r||C.shiftKey&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),s())},[r,s]);return{holding:h,thresholdMs:c,handlers:{onPointerDown:x,onPointerMove:_,onPointerUp:S,onPointerCancel:S,onPointerLeave:S,onClick:v,onContextMenu:E,onKeyDown:T}}}const P0={height:0,offsetTop:0,offsetLeft:0};function Lb(){if(typeof window>"u")return P0;const s=window.visualViewport;return s?{height:s.height,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft}:{height:window.innerHeight,offsetTop:0,offsetLeft:0}}function ev(s){const[l,r]=y.useState(Lb);return y.useEffect(()=>{if(!s)return;const c=window.visualViewport,o=()=>{const d=Lb();r(h=>h.height===d.height&&h.offsetTop===d.offsetTop&&h.offsetLeft===d.offsetLeft?h:d)};return o(),c?(c.addEventListener("resize",o),c.addEventListener("scroll",o),()=>{c.removeEventListener("resize",o),c.removeEventListener("scroll",o)}):(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))},[s]),l}function bp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var hr=bp();function py(s){hr=s}var nr={exec:()=>null};function Wr(s){let l=[];return r=>{let c=Math.max(0,Math.min(3,r-1)),o=l[c];return o||(o=s(c),l[c]=o),o}}function gt(s,l=""){let r=typeof s=="string"?s:s.source,c={replace:(o,d)=>{let h=typeof d=="string"?d:d.source;return h=h.replace(cl.caret,"$1"),r=r.replace(o,h),c},getRegex:()=>new RegExp(r,l)};return c}var tv=((s="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+s)}catch{return!1}})(),cl={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:s=>new RegExp(`^( {0,3}${s})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Wr(s=>new RegExp(`^ {0,${s}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Wr(s=>new RegExp(`^ {0,${s}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Wr(s=>new RegExp(`^ {0,${s}}(?:\`\`\`|~~~)`)),headingBeginRegex:Wr(s=>new RegExp(`^ {0,${s}}#`)),htmlBeginRegex:Wr(s=>new RegExp(`^ {0,${s}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Wr(s=>new RegExp(`^ {0,${s}}>`))},nv=/^(?:[ \t]*(?:\n|$))+/,lv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,sv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,av=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xp=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,my=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,gy=gt(my).replace(/bull/g,xp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),iv=gt(my).replace(/bull/g,xp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),yp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,rv=/^[^\n]+/,_p=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cv=gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_p).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ov=gt(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,xp).getRegex(),Xf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",vp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,uv=gt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",vp).replace("tag",Xf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),by=s=>gt(yp).replace("hr",Yo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",s).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xf).getRegex(),fv=by(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),dv=by(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),hv=gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",dv).getRegex(),jp={blockquote:hv,code:lv,def:cv,fences:sv,heading:av,hr:Yo,html:uv,lheading:gy,list:ov,newline:nv,paragraph:fv,table:nr,text:rv},zb=gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xf).getRegex(),pv={...jp,lheading:iv,table:zb,paragraph:gt(yp).replace("hr",Yo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zb).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Xf).getRegex()},mv={...jp,html:gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vp).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:nr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:gt(yp).replace("hr",Yo).replace("heading",` *#{1,6} *[^
52
+ ]`).replace("lheading",gy).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xy=/^( {2,}|\\)\n(?!\s*$)/,xv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_c=/[\p{P}\p{S}]/u,Vf=/[\s\p{P}\p{S}]/u,Sp=/[^\s\p{P}\p{S}]/u,yv=gt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vf).getRegex(),yy=/(?!~)[\p{P}\p{S}]/u,_v=/(?!~)[\s\p{P}\p{S}]/u,vv=/(?:[^\s\p{P}\p{S}]|~)/u,jv=gt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",tv?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),_y=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Sv=gt(_y,"u").replace(/punct/g,_c).getRegex(),wv=gt(_y,"u").replace(/punct/g,yy).getRegex(),vy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",kv=gt(vy,"gu").replace(/notPunctSpace/g,Sp).replace(/punctSpace/g,Vf).replace(/punct/g,_c).getRegex(),Nv=gt(vy,"gu").replace(/notPunctSpace/g,vv).replace(/punctSpace/g,_v).replace(/punct/g,yy).getRegex(),Tv=gt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sp).replace(/punctSpace/g,Vf).replace(/punct/g,_c).getRegex(),Ev=gt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,_c).getRegex(),Cv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Av=gt(Cv,"gu").replace(/notPunctSpace/g,Sp).replace(/punctSpace/g,Vf).replace(/punct/g,_c).getRegex(),Mv=gt(/\\(punct)/,"gu").replace(/punct/g,_c).getRegex(),Rv=gt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Dv=gt(vp).replace("(?:-->|$)","-->").getRegex(),Ov=gt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Dv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Of=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Lv=gt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Of).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),jy=gt(/^!?\[(label)\]\[(ref)\]/).replace("label",Of).replace("ref",_p).getRegex(),Sy=gt(/^!?\[(ref)\](?:\[\])?/).replace("ref",_p).getRegex(),zv=gt("reflink|nolink(?!\\()","g").replace("reflink",jy).replace("nolink",Sy).getRegex(),Ub=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,wp={_backpedal:nr,anyPunctuation:Mv,autolink:Rv,blockSkip:jv,br:xy,code:bv,del:nr,delLDelim:nr,delRDelim:nr,emStrongLDelim:Sv,emStrongRDelimAst:kv,emStrongRDelimUnd:Tv,escape:gv,link:Lv,nolink:Sy,punctuation:yv,reflink:jy,reflinkSearch:zv,tag:Ov,text:xv,url:nr},Uv={...wp,link:gt(/^!?\[(label)\]\((.*?)\)/).replace("label",Of).getRegex(),reflink:gt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Of).getRegex()},sp={...wp,emStrongRDelimAst:Nv,emStrongLDelim:wv,delLDelim:Ev,delRDelim:Av,url:gt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ub).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:gt(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ub).getRegex()},Hv={...sp,br:gt(xy).replace("{2,}","*").getRegex(),text:gt(sp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},of={normal:jp,gfm:pv,pedantic:mv},To={normal:wp,gfm:sp,breaks:Hv,pedantic:Uv},Bv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Hb=s=>Bv[s];function Ps(s,l){if(l){if(cl.escapeTest.test(s))return s.replace(cl.escapeReplace,Hb)}else if(cl.escapeTestNoEncode.test(s))return s.replace(cl.escapeReplaceNoEncode,Hb);return s}function Bb(s){try{s=encodeURI(s).replace(cl.percentDecode,"%")}catch{return null}return s}function Ib(s,l){var d;let r=s.replace(cl.findPipe,(h,m,g)=>{let x=!1,_=m;for(;--_>=0&&g[_]==="\\";)x=!x;return x?"|":" |"}),c=r.split(cl.splitPipe),o=0;if(c[0].trim()||c.shift(),c.length>0&&!((d=c.at(-1))!=null&&d.trim())&&c.pop(),l)if(c.length>l)c.splice(l);else for(;c.length<l;)c.push("");for(;o<c.length;o++)c[o]=c[o].trim().replace(cl.slashPipe,"|");return c}function ji(s,l,r){let c=s.length;if(c===0)return"";let o=0;for(;o<c&&s.charAt(c-o-1)===l;)o++;return s.slice(0,c-o)}function qb(s){let l=s.split(`
53
+ `),r=l.length-1;for(;r>=0&&cl.blankLine.test(l[r]);)r--;return l.length-r<=2?s:l.slice(0,r+1).join(`
54
+ `)}function Iv(s,l){if(s.indexOf(l[1])===-1)return-1;let r=0;for(let c=0;c<s.length;c++)if(s[c]==="\\")c++;else if(s[c]===l[0])r++;else if(s[c]===l[1]&&(r--,r<0))return c;return r>0?-2:-1}function qv(s,l=0){let r=l,c="";for(let o of s)if(o===" "){let d=4-r%4;c+=" ".repeat(d),r+=d}else c+=o,r++;return c}function Gb(s,l,r,c,o){let d=l.href,h=l.title||null,m=s[1].replace(o.other.outputLinkReplace,"$1");c.state.inLink=!0;let g={type:s[0].charAt(0)==="!"?"image":"link",raw:r,href:d,title:h,text:m,tokens:c.inlineTokens(m)};return c.state.inLink=!1,g}function Gv(s,l,r){let c=s.match(r.other.indentCodeCompensation);if(c===null)return l;let o=c[1];return l.split(`
55
+ `).map(d=>{let h=d.match(r.other.beginningSpace);if(h===null)return d;let[m]=h;return m.length>=o.length?d.slice(o.length):d}).join(`
56
+ `)}var Lf=class{constructor(s){Ot(this,"options");Ot(this,"rules");Ot(this,"lexer");this.options=s||hr}space(s){let l=this.rules.block.newline.exec(s);if(l&&l[0].length>0)return{type:"space",raw:l[0]}}code(s){let l=this.rules.block.code.exec(s);if(l){let r=this.options.pedantic?l[0]:qb(l[0]),c=r.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r,codeBlockStyle:"indented",text:c}}}fences(s){let l=this.rules.block.fences.exec(s);if(l){let r=l[0],c=Gv(r,l[3]||"",this.rules);return{type:"code",raw:r,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:c}}}heading(s){let l=this.rules.block.heading.exec(s);if(l){let r=l[2].trim();if(this.rules.other.endingHash.test(r)){let c=ji(r,"#");(this.options.pedantic||!c||this.rules.other.endingSpaceChar.test(c))&&(r=c.trim())}return{type:"heading",raw:ji(l[0],`
57
+ `),depth:l[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(s){let l=this.rules.block.hr.exec(s);if(l)return{type:"hr",raw:ji(l[0],`
58
+ `)}}blockquote(s){let l=this.rules.block.blockquote.exec(s);if(l){let r=ji(l[0],`
59
+ `).split(`
60
+ `),c="",o="",d=[];for(;r.length>0;){let h=!1,m=[],g;for(g=0;g<r.length;g++)if(this.rules.other.blockquoteStart.test(r[g]))m.push(r[g]),h=!0;else if(!h)m.push(r[g]);else break;r=r.slice(g);let x=m.join(`
61
+ `),_=x.replace(this.rules.other.blockquoteSetextReplace,`
62
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");c=c?`${c}
63
+ ${x}`:x,o=o?`${o}
64
+ ${_}`:_;let S=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(_,d,!0),this.lexer.state.top=S,r.length===0)break;let v=d.at(-1);if((v==null?void 0:v.type)==="code")break;if((v==null?void 0:v.type)==="blockquote"){let E=v,T=E.raw+`
65
+ `+r.join(`
66
+ `),C=this.blockquote(T);d[d.length-1]=C,c=c.substring(0,c.length-E.raw.length)+C.raw,o=o.substring(0,o.length-E.text.length)+C.text;break}else if((v==null?void 0:v.type)==="list"){let E=v,T=E.raw+`
67
+ `+r.join(`
68
+ `),C=this.list(T);d[d.length-1]=C,c=c.substring(0,c.length-v.raw.length)+C.raw,o=o.substring(0,o.length-E.raw.length)+C.raw,r=T.substring(d.at(-1).raw.length).split(`
69
+ `);continue}}return{type:"blockquote",raw:c,tokens:d,text:o}}}list(s){let l=this.rules.block.list.exec(s);if(l){let r=l[1].trim(),c=r.length>1,o={type:"list",raw:"",ordered:c,start:c?+r.slice(0,-1):"",loose:!1,items:[]};r=c?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=c?r:"[*+-]");let d=this.rules.other.listItemRegex(r),h=!1;for(;s;){let g=!1,x="",_="";if(!(l=d.exec(s))||this.rules.block.hr.test(s))break;x=l[0],s=s.substring(x.length);let S=qv(l[2].split(`
70
+ `,1)[0],l[1].length),v=s.split(`
71
+ `,1)[0],E=!S.trim(),T=0;if(this.options.pedantic?(T=2,_=S.trimStart()):E?T=l[1].length+1:(T=S.search(this.rules.other.nonSpaceChar),T=T>4?1:T,_=S.slice(T),T+=l[1].length),E&&this.rules.other.blankLine.test(v)&&(x+=v+`
72
+ `,s=s.substring(v.length+1),g=!0),!g){let C=this.rules.other.nextBulletRegex(T),L=this.rules.other.hrRegex(T),X=this.rules.other.fencesBeginRegex(T),J=this.rules.other.headingBeginRegex(T),G=this.rules.other.htmlBeginRegex(T),O=this.rules.other.blockquoteBeginRegex(T);for(;s;){let Z=s.split(`
73
+ `,1)[0],M;if(v=Z,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),M=v):M=v.replace(this.rules.other.tabCharGlobal," "),X.test(v)||J.test(v)||G.test(v)||O.test(v)||C.test(v)||L.test(v))break;if(M.search(this.rules.other.nonSpaceChar)>=T||!v.trim())_+=`
74
+ `+M.slice(T);else{if(E||S.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||X.test(S)||J.test(S)||L.test(S))break;_+=`
75
+ `+v}E=!v.trim(),x+=Z+`
76
+ `,s=s.substring(Z.length+1),S=M.slice(T)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(h=!0)),o.items.push({type:"list_item",raw:x,task:!!this.options.gfm&&this.rules.other.listIsTask.test(_),loose:!1,text:_,tokens:[]}),o.raw+=x}let m=o.items.at(-1);if(m)m.raw=m.raw.trimEnd(),m.text=m.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let g of o.items){this.lexer.state.top=!1,g.tokens=this.lexer.blockTokens(g.text,[]);let x=g.tokens[0];if(g.task&&((x==null?void 0:x.type)==="text"||(x==null?void 0:x.type)==="paragraph")){g.text=g.text.replace(this.rules.other.listReplaceTask,""),x.raw=x.raw.replace(this.rules.other.listReplaceTask,""),x.text=x.text.replace(this.rules.other.listReplaceTask,"");for(let S=this.lexer.inlineQueue.length-1;S>=0;S--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[S].src)){this.lexer.inlineQueue[S].src=this.lexer.inlineQueue[S].src.replace(this.rules.other.listReplaceTask,"");break}let _=this.rules.other.listTaskCheckbox.exec(g.raw);if(_){let S={type:"checkbox",raw:_[0]+" ",checked:_[0]!=="[ ]"};g.checked=S.checked,o.loose?g.tokens[0]&&["paragraph","text"].includes(g.tokens[0].type)&&"tokens"in g.tokens[0]&&g.tokens[0].tokens?(g.tokens[0].raw=S.raw+g.tokens[0].raw,g.tokens[0].text=S.raw+g.tokens[0].text,g.tokens[0].tokens.unshift(S)):g.tokens.unshift({type:"paragraph",raw:S.raw,text:S.raw,tokens:[S]}):g.tokens.unshift(S)}}else g.task&&(g.task=!1);if(!o.loose){let _=g.tokens.filter(v=>v.type==="space"),S=_.length>0&&_.some(v=>this.rules.other.anyLine.test(v.raw));o.loose=S}}if(o.loose)for(let g of o.items){g.loose=!0;for(let x of g.tokens)x.type==="text"&&(x.type="paragraph")}return o}}html(s){let l=this.rules.block.html.exec(s);if(l){let r=qb(l[0]);return{type:"html",block:!0,raw:r,pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:r}}}def(s){let l=this.rules.block.def.exec(s);if(l){let r=l[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),c=l[2]?l[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=l[3]?l[3].substring(1,l[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):l[3];return{type:"def",tag:r,raw:ji(l[0],`
77
+ `),href:c,title:o}}}table(s){var h;let l=this.rules.block.table.exec(s);if(!l||!this.rules.other.tableDelimiter.test(l[2]))return;let r=Ib(l[1]),c=l[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=l[3])!=null&&h.trim()?l[3].replace(this.rules.other.tableRowBlankLine,"").split(`
78
+ `):[],d={type:"table",raw:ji(l[0],`
79
+ `),header:[],align:[],rows:[]};if(r.length===c.length){for(let m of c)this.rules.other.tableAlignRight.test(m)?d.align.push("right"):this.rules.other.tableAlignCenter.test(m)?d.align.push("center"):this.rules.other.tableAlignLeft.test(m)?d.align.push("left"):d.align.push(null);for(let m=0;m<r.length;m++)d.header.push({text:r[m],tokens:this.lexer.inline(r[m]),header:!0,align:d.align[m]});for(let m of o)d.rows.push(Ib(m,d.header.length).map((g,x)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:d.align[x]})));return d}}lheading(s){let l=this.rules.block.lheading.exec(s);if(l){let r=l[1].trim();return{type:"heading",raw:ji(l[0],`
80
+ `),depth:l[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(s){let l=this.rules.block.paragraph.exec(s);if(l){let r=l[1].charAt(l[1].length-1)===`
81
+ `?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:r,tokens:this.lexer.inline(r)}}}text(s){let l=this.rules.block.text.exec(s);if(l)return{type:"text",raw:l[0],text:l[0],tokens:this.lexer.inline(l[0])}}escape(s){let l=this.rules.inline.escape.exec(s);if(l)return{type:"escape",raw:l[0],text:l[1]}}tag(s){let l=this.rules.inline.tag.exec(s);if(l)return!this.lexer.state.inLink&&this.rules.other.startATag.test(l[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(l[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(l[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(l[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:l[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:l[0]}}link(s){let l=this.rules.inline.link.exec(s);if(l){let r=l[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let d=ji(r.slice(0,-1),"\\");if((r.length-d.length)%2===0)return}else{let d=Iv(l[2],"()");if(d===-2)return;if(d>-1){let h=(l[0].indexOf("!")===0?5:4)+l[1].length+d;l[2]=l[2].substring(0,d),l[0]=l[0].substring(0,h).trim(),l[3]=""}}let c=l[2],o="";if(this.options.pedantic){let d=this.rules.other.pedanticHrefTitle.exec(c);d&&(c=d[1],o=d[3])}else o=l[3]?l[3].slice(1,-1):"";return c=c.trim(),this.rules.other.startAngleBracket.test(c)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?c=c.slice(1):c=c.slice(1,-1)),Gb(l,{href:c&&c.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},l[0],this.lexer,this.rules)}}reflink(s,l){let r;if((r=this.rules.inline.reflink.exec(s))||(r=this.rules.inline.nolink.exec(s))){let c=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=l[c.toLowerCase()];if(!o){let d=r[0].charAt(0);return{type:"text",raw:d,text:d}}return Gb(r,o,r[0],this.lexer,this.rules)}}emStrong(s,l,r=""){let c=this.rules.inline.emStrongLDelim.exec(s);if(!(!c||!c[1]&&!c[2]&&!c[3]&&!c[4]||c[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(c[1]||c[3])||!r||this.rules.inline.punctuation.exec(r))){let o=[...c[0]].length-1,d,h,m=o,g=0,x=c[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(x.lastIndex=0,l=l.slice(-1*s.length+o);(c=x.exec(l))!==null;){if(d=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!d)continue;if(h=[...d].length,c[3]||c[4]){m+=h;continue}else if((c[5]||c[6])&&o%3&&!((o+h)%3)){g+=h;continue}if(m-=h,m>0)continue;h=Math.min(h,h+m+g);let _=[...c[0]][0].length,S=s.slice(0,o+c.index+_+h);if(Math.min(o,h)%2){let E=S.slice(1,-1);return{type:"em",raw:S,text:E,tokens:this.lexer.inlineTokens(E)}}let v=S.slice(2,-2);return{type:"strong",raw:S,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(s){let l=this.rules.inline.code.exec(s);if(l){let r=l[2].replace(this.rules.other.newLineCharGlobal," "),c=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return c&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:l[0],text:r}}}br(s){let l=this.rules.inline.br.exec(s);if(l)return{type:"br",raw:l[0]}}del(s,l,r=""){let c=this.rules.inline.delLDelim.exec(s);if(c&&(!c[1]||!r||this.rules.inline.punctuation.exec(r))){let o=[...c[0]].length-1,d,h,m=o,g=this.rules.inline.delRDelim;for(g.lastIndex=0,l=l.slice(-1*s.length+o);(c=g.exec(l))!==null;){if(d=c[1]||c[2]||c[3]||c[4]||c[5]||c[6],!d||(h=[...d].length,h!==o))continue;if(c[3]||c[4]){m+=h;continue}if(m-=h,m>0)continue;h=Math.min(h,h+m);let x=[...c[0]][0].length,_=s.slice(0,o+c.index+x+h),S=_.slice(o,-o);return{type:"del",raw:_,text:S,tokens:this.lexer.inlineTokens(S)}}}}autolink(s){let l=this.rules.inline.autolink.exec(s);if(l){let r,c;return l[2]==="@"?(r=l[1],c="mailto:"+r):(r=l[1],c=r),{type:"link",raw:l[0],text:r,href:c,tokens:[{type:"text",raw:r,text:r}]}}}url(s){var r;let l;if(l=this.rules.inline.url.exec(s)){let c,o;if(l[2]==="@")c=l[0],o="mailto:"+c;else{let d;do d=l[0],l[0]=((r=this.rules.inline._backpedal.exec(l[0]))==null?void 0:r[0])??"";while(d!==l[0]);c=l[0],l[1]==="www."?o="http://"+l[0]:o=l[0]}return{type:"link",raw:l[0],text:c,href:o,tokens:[{type:"text",raw:c,text:c}]}}}inlineText(s){let l=this.rules.inline.text.exec(s);if(l){let r=this.lexer.state.inRawBlock;return{type:"text",raw:l[0],text:l[0],escaped:r}}}},Cs=class ap{constructor(l){Ot(this,"tokens");Ot(this,"options");Ot(this,"state");Ot(this,"inlineQueue");Ot(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=l||hr,this.options.tokenizer=this.options.tokenizer||new Lf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:cl,block:of.normal,inline:To.normal};this.options.pedantic?(r.block=of.pedantic,r.inline=To.pedantic):this.options.gfm&&(r.block=of.gfm,this.options.breaks?r.inline=To.breaks:r.inline=To.gfm),this.tokenizer.rules=r}static get rules(){return{block:of,inline:To}}static lex(l,r){return new ap(r).lex(l)}static lexInline(l,r){return new ap(r).inlineTokens(l)}lex(l){l=l.replace(cl.carriageReturn,`
82
+ `),this.blockTokens(l,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let c=this.inlineQueue[r];this.inlineTokens(c.src,c.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(l,r=[],c=!1){var d,h,m;this.tokenizer.lexer=this,this.options.pedantic&&(l=l.replace(cl.tabCharGlobal," ").replace(cl.spaceLine,""));let o=1/0;for(;l;){if(l.length<o)o=l.length;else{this.infiniteLoopError(l.charCodeAt(0));break}let g;if((h=(d=this.options.extensions)==null?void 0:d.block)!=null&&h.some(_=>(g=_.call({lexer:this},l,r))?(l=l.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.space(l)){l=l.substring(g.raw.length);let _=r.at(-1);g.raw.length===1&&_!==void 0?_.raw+=`
83
+ `:r.push(g);continue}if(g=this.tokenizer.code(l)){l=l.substring(g.raw.length);let _=r.at(-1);(_==null?void 0:_.type)==="paragraph"||(_==null?void 0:_.type)==="text"?(_.raw+=(_.raw.endsWith(`
84
+ `)?"":`
85
+ `)+g.raw,_.text+=`
86
+ `+g.text,this.inlineQueue.at(-1).src=_.text):r.push(g);continue}if(g=this.tokenizer.fences(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.heading(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.hr(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.blockquote(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.list(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.html(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.def(l)){l=l.substring(g.raw.length);let _=r.at(-1);(_==null?void 0:_.type)==="paragraph"||(_==null?void 0:_.type)==="text"?(_.raw+=(_.raw.endsWith(`
87
+ `)?"":`
88
+ `)+g.raw,_.text+=`
89
+ `+g.raw,this.inlineQueue.at(-1).src=_.text):this.tokens.links[g.tag]||(this.tokens.links[g.tag]={href:g.href,title:g.title},r.push(g));continue}if(g=this.tokenizer.table(l)){l=l.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.lheading(l)){l=l.substring(g.raw.length),r.push(g);continue}let x=l;if((m=this.options.extensions)!=null&&m.startBlock){let _=1/0,S=l.slice(1),v;this.options.extensions.startBlock.forEach(E=>{v=E.call({lexer:this},S),typeof v=="number"&&v>=0&&(_=Math.min(_,v))}),_<1/0&&_>=0&&(x=l.substring(0,_+1))}if(this.state.top&&(g=this.tokenizer.paragraph(x))){let _=r.at(-1);c&&(_==null?void 0:_.type)==="paragraph"?(_.raw+=(_.raw.endsWith(`
90
+ `)?"":`
91
+ `)+g.raw,_.text+=`
92
+ `+g.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=_.text):r.push(g),c=x.length!==l.length,l=l.substring(g.raw.length);continue}if(g=this.tokenizer.text(l)){l=l.substring(g.raw.length);let _=r.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=(_.raw.endsWith(`
93
+ `)?"":`
94
+ `)+g.raw,_.text+=`
95
+ `+g.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=_.text):r.push(g);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return this.state.top=!0,r}inline(l,r=[]){return this.inlineQueue.push({src:l,tokens:r}),r}inlineTokens(l,r=[]){var m,g,x,_,S;this.tokenizer.lexer=this;let c=l;if(this.tokens.links){let v=Object.keys(this.tokens.links);v.length>0&&(c=c.replace(this.tokenizer.rules.inline.reflinkSearch,E=>v.includes(E.slice(E.lastIndexOf("[")+1,-1))?"["+"a".repeat(E.length-2)+"]":E))}c=c.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),c=c.replace(this.tokenizer.rules.inline.blockSkip,(v,E,T)=>{let C=T?T.length:0;return v.slice(0,C)+"["+"a".repeat(v.length-C-2)+"]"}),c=((g=(m=this.options.hooks)==null?void 0:m.emStrongMask)==null?void 0:g.call({lexer:this},c))??c;let o=!1,d="",h=1/0;for(;l;){if(l.length<h)h=l.length;else{this.infiniteLoopError(l.charCodeAt(0));break}o||(d=""),o=!1;let v;if((_=(x=this.options.extensions)==null?void 0:x.inline)!=null&&_.some(T=>(v=T.call({lexer:this},l,r))?(l=l.substring(v.raw.length),r.push(v),!0):!1))continue;if(v=this.tokenizer.escape(l)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.tag(l)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.link(l)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.reflink(l,this.tokens.links)){l=l.substring(v.raw.length);let T=r.at(-1);v.type==="text"&&(T==null?void 0:T.type)==="text"?(T.raw+=v.raw,T.text+=v.text):r.push(v);continue}if(v=this.tokenizer.emStrong(l,c,d)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.codespan(l)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.br(l)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.del(l,c,d)){l=l.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.autolink(l)){l=l.substring(v.raw.length),r.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(l))){l=l.substring(v.raw.length),r.push(v);continue}let E=l;if((S=this.options.extensions)!=null&&S.startInline){let T=1/0,C=l.slice(1),L;this.options.extensions.startInline.forEach(X=>{L=X.call({lexer:this},C),typeof L=="number"&&L>=0&&(T=Math.min(T,L))}),T<1/0&&T>=0&&(E=l.substring(0,T+1))}if(v=this.tokenizer.inlineText(E)){l=l.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(d=v.raw.slice(-1)),o=!0;let T=r.at(-1);(T==null?void 0:T.type)==="text"?(T.raw+=v.raw,T.text+=v.text):r.push(v);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return r}infiniteLoopError(l){let r="Infinite loop on byte: "+l;if(this.options.silent)console.error(r);else throw new Error(r)}},zf=class{constructor(s){Ot(this,"options");Ot(this,"parser");this.options=s||hr}space(s){return""}code({text:s,lang:l,escaped:r}){var d;let c=(d=(l||"").match(cl.notSpaceStart))==null?void 0:d[0],o=s.replace(cl.endingNewline,"")+`
96
+ `;return c?'<pre><code class="language-'+Ps(c)+'">'+(r?o:Ps(o,!0))+`</code></pre>
97
+ `:"<pre><code>"+(r?o:Ps(o,!0))+`</code></pre>
98
+ `}blockquote({tokens:s}){return`<blockquote>
99
+ ${this.parser.parse(s)}</blockquote>
100
+ `}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:l}){return`<h${l}>${this.parser.parseInline(s)}</h${l}>
101
+ `}hr(s){return`<hr>
102
+ `}list(s){let l=s.ordered,r=s.start,c="";for(let h=0;h<s.items.length;h++){let m=s.items[h];c+=this.listitem(m)}let o=l?"ol":"ul",d=l&&r!==1?' start="'+r+'"':"";return"<"+o+d+`>
103
+ `+c+"</"+o+`>
104
+ `}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
105
+ `}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
106
+ `}table(s){let l="",r="";for(let o=0;o<s.header.length;o++)r+=this.tablecell(s.header[o]);l+=this.tablerow({text:r});let c="";for(let o=0;o<s.rows.length;o++){let d=s.rows[o];r="";for(let h=0;h<d.length;h++)r+=this.tablecell(d[h]);c+=this.tablerow({text:r})}return c&&(c=`<tbody>${c}</tbody>`),`<table>
107
+ <thead>
108
+ `+l+`</thead>
109
+ `+c+`</table>
110
+ `}tablerow({text:s}){return`<tr>
111
+ ${s}</tr>
112
+ `}tablecell(s){let l=this.parser.parseInline(s.tokens),r=s.header?"th":"td";return(s.align?`<${r} align="${s.align}">`:`<${r}>`)+l+`</${r}>
113
+ `}strong({tokens:s}){return`<strong>${this.parser.parseInline(s)}</strong>`}em({tokens:s}){return`<em>${this.parser.parseInline(s)}</em>`}codespan({text:s}){return`<code>${Ps(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:l,tokens:r}){let c=this.parser.parseInline(r),o=Bb(s);if(o===null)return c;s=o;let d='<a href="'+s+'"';return l&&(d+=' title="'+Ps(l)+'"'),d+=">"+c+"</a>",d}image({href:s,title:l,text:r,tokens:c}){c&&(r=this.parser.parseInline(c,this.parser.textRenderer));let o=Bb(s);if(o===null)return Ps(r);s=o;let d=`<img src="${s}" alt="${Ps(r)}"`;return l&&(d+=` title="${Ps(l)}"`),d+=">",d}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:Ps(s.text)}},kp=class{strong({text:s}){return s}em({text:s}){return s}codespan({text:s}){return s}del({text:s}){return s}html({text:s}){return s}text({text:s}){return s}link({text:s}){return""+s}image({text:s}){return""+s}br(){return""}checkbox({raw:s}){return s}},As=class ip{constructor(l){Ot(this,"options");Ot(this,"renderer");Ot(this,"textRenderer");this.options=l||hr,this.options.renderer=this.options.renderer||new zf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new kp}static parse(l,r){return new ip(r).parse(l)}static parseInline(l,r){return new ip(r).parseInline(l)}parse(l){var c,o;this.renderer.parser=this;let r="";for(let d=0;d<l.length;d++){let h=l[d];if((o=(c=this.options.extensions)==null?void 0:c.renderers)!=null&&o[h.type]){let g=h,x=this.options.extensions.renderers[g.type].call({parser:this},g);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(g.type)){r+=x||"";continue}}let m=h;switch(m.type){case"space":{r+=this.renderer.space(m);break}case"hr":{r+=this.renderer.hr(m);break}case"heading":{r+=this.renderer.heading(m);break}case"code":{r+=this.renderer.code(m);break}case"table":{r+=this.renderer.table(m);break}case"blockquote":{r+=this.renderer.blockquote(m);break}case"list":{r+=this.renderer.list(m);break}case"checkbox":{r+=this.renderer.checkbox(m);break}case"html":{r+=this.renderer.html(m);break}case"def":{r+=this.renderer.def(m);break}case"paragraph":{r+=this.renderer.paragraph(m);break}case"text":{r+=this.renderer.text(m);break}default:{let g='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return r}parseInline(l,r=this.renderer){var o,d;this.renderer.parser=this;let c="";for(let h=0;h<l.length;h++){let m=l[h];if((d=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&d[m.type]){let x=this.options.extensions.renderers[m.type].call({parser:this},m);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(m.type)){c+=x||"";continue}}let g=m;switch(g.type){case"escape":{c+=r.text(g);break}case"html":{c+=r.html(g);break}case"link":{c+=r.link(g);break}case"image":{c+=r.image(g);break}case"checkbox":{c+=r.checkbox(g);break}case"strong":{c+=r.strong(g);break}case"em":{c+=r.em(g);break}case"codespan":{c+=r.codespan(g);break}case"br":{c+=r.br(g);break}case"del":{c+=r.del(g);break}case"text":{c+=r.text(g);break}default:{let x='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return c}},Ef,Lo=(Ef=class{constructor(s){Ot(this,"options");Ot(this,"block");this.options=s||hr}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(s=this.block){return s?Cs.lex:Cs.lexInline}provideParser(s=this.block){return s?As.parse:As.parseInline}},Ot(Ef,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ot(Ef,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Ef),Yv=class{constructor(...s){Ot(this,"defaults",bp());Ot(this,"options",this.setOptions);Ot(this,"parse",this.parseMarkdown(!0));Ot(this,"parseInline",this.parseMarkdown(!1));Ot(this,"Parser",As);Ot(this,"Renderer",zf);Ot(this,"TextRenderer",kp);Ot(this,"Lexer",Cs);Ot(this,"Tokenizer",Lf);Ot(this,"Hooks",Lo);this.use(...s)}walkTokens(s,l){var c,o;let r=[];for(let d of s)switch(r=r.concat(l.call(this,d)),d.type){case"table":{let h=d;for(let m of h.header)r=r.concat(this.walkTokens(m.tokens,l));for(let m of h.rows)for(let g of m)r=r.concat(this.walkTokens(g.tokens,l));break}case"list":{let h=d;r=r.concat(this.walkTokens(h.items,l));break}default:{let h=d;(o=(c=this.defaults.extensions)==null?void 0:c.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(m=>{let g=h[m].flat(1/0);r=r.concat(this.walkTokens(g,l))}):h.tokens&&(r=r.concat(this.walkTokens(h.tokens,l)))}}return r}use(...s){let l=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(r=>{let c={...r};if(c.async=this.defaults.async||c.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let d=l.renderers[o.name];d?l.renderers[o.name]=function(...h){let m=o.renderer.apply(this,h);return m===!1&&(m=d.apply(this,h)),m}:l.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let d=l[o.level];d?d.unshift(o.tokenizer):l[o.level]=[o.tokenizer],o.start&&(o.level==="block"?l.startBlock?l.startBlock.push(o.start):l.startBlock=[o.start]:o.level==="inline"&&(l.startInline?l.startInline.push(o.start):l.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(l.childTokens[o.name]=o.childTokens)}),c.extensions=l),r.renderer){let o=this.defaults.renderer||new zf(this.defaults);for(let d in r.renderer){if(!(d in o))throw new Error(`renderer '${d}' does not exist`);if(["options","parser"].includes(d))continue;let h=d,m=r.renderer[h],g=o[h];o[h]=(...x)=>{let _=m.apply(o,x);return _===!1&&(_=g.apply(o,x)),_||""}}c.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Lf(this.defaults);for(let d in r.tokenizer){if(!(d in o))throw new Error(`tokenizer '${d}' does not exist`);if(["options","rules","lexer"].includes(d))continue;let h=d,m=r.tokenizer[h],g=o[h];o[h]=(...x)=>{let _=m.apply(o,x);return _===!1&&(_=g.apply(o,x)),_}}c.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Lo;for(let d in r.hooks){if(!(d in o))throw new Error(`hook '${d}' does not exist`);if(["options","block"].includes(d))continue;let h=d,m=r.hooks[h],g=o[h];Lo.passThroughHooks.has(d)?o[h]=x=>{if(this.defaults.async&&Lo.passThroughHooksRespectAsync.has(d))return(async()=>{let S=await m.call(o,x);return g.call(o,S)})();let _=m.call(o,x);return g.call(o,_)}:o[h]=(...x)=>{if(this.defaults.async)return(async()=>{let S=await m.apply(o,x);return S===!1&&(S=await g.apply(o,x)),S})();let _=m.apply(o,x);return _===!1&&(_=g.apply(o,x)),_}}c.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,d=r.walkTokens;c.walkTokens=function(h){let m=[];return m.push(d.call(this,h)),o&&(m=m.concat(o.call(this,h))),m}}this.defaults={...this.defaults,...c}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,l){return Cs.lex(s,l??this.defaults)}parser(s,l){return As.parse(s,l??this.defaults)}parseMarkdown(s){return(l,r)=>{let c={...r},o={...this.defaults,...c},d=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&c.async===!1)return d(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof l>"u"||l===null)return d(new Error("marked(): input parameter is undefined or null"));if(typeof l!="string")return d(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(l)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=s),o.async)return(async()=>{let h=o.hooks?await o.hooks.preprocess(l):l,m=await(o.hooks?await o.hooks.provideLexer(s):s?Cs.lex:Cs.lexInline)(h,o),g=o.hooks?await o.hooks.processAllTokens(m):m;o.walkTokens&&await Promise.all(this.walkTokens(g,o.walkTokens));let x=await(o.hooks?await o.hooks.provideParser(s):s?As.parse:As.parseInline)(g,o);return o.hooks?await o.hooks.postprocess(x):x})().catch(d);try{o.hooks&&(l=o.hooks.preprocess(l));let h=(o.hooks?o.hooks.provideLexer(s):s?Cs.lex:Cs.lexInline)(l,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let m=(o.hooks?o.hooks.provideParser(s):s?As.parse:As.parseInline)(h,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(h){return d(h)}}}onError(s,l){return r=>{if(r.message+=`
114
+ Please report this to https://github.com/markedjs/marked.`,s){let c="<p>An error occurred:</p><pre>"+Ps(r.message+"",!0)+"</pre>";return l?Promise.resolve(c):c}if(l)return Promise.reject(r);throw r}}},dr=new Yv;function jt(s,l){return dr.parse(s,l)}jt.options=jt.setOptions=function(s){return dr.setOptions(s),jt.defaults=dr.defaults,py(jt.defaults),jt};jt.getDefaults=bp;jt.defaults=hr;jt.use=function(...s){return dr.use(...s),jt.defaults=dr.defaults,py(jt.defaults),jt};jt.walkTokens=function(s,l){return dr.walkTokens(s,l)};jt.parseInline=dr.parseInline;jt.Parser=As;jt.parser=As.parse;jt.Renderer=zf;jt.TextRenderer=kp;jt.Lexer=Cs;jt.lexer=Cs.lex;jt.Tokenizer=Lf;jt.Hooks=Lo;jt.parse=jt;jt.options;jt.setOptions;jt.use;jt.walkTokens;jt.parseInline;As.parse;Cs.lex;/*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */function Yb(s,l){(l==null||l>s.length)&&(l=s.length);for(var r=0,c=Array(l);r<l;r++)c[r]=s[r];return c}function Xv(s){if(Array.isArray(s))return s}function Vv(s,l){var r=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(r!=null){var c,o,d,h,m=[],g=!0,x=!1;try{if(d=(r=r.call(s)).next,l!==0)for(;!(g=(c=d.call(r)).done)&&(m.push(c.value),m.length!==l);g=!0);}catch(_){x=!0,o=_}finally{try{if(!g&&r.return!=null&&(h=r.return(),Object(h)!==h))return}finally{if(x)throw o}}return m}}function $v(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
115
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qv(s,l){return Xv(s)||Vv(s,l)||Kv(s,l)||$v()}function Kv(s,l){if(s){if(typeof s=="string")return Yb(s,l);var r={}.toString.call(s).slice(8,-1);return r==="Object"&&s.constructor&&(r=s.constructor.name),r==="Map"||r==="Set"?Array.from(s):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(s,l):void 0}}const wy=Object.entries,Xb=Object.setPrototypeOf,Zv=Object.isFrozen,Fv=Object.getPrototypeOf,Jv=Object.getOwnPropertyDescriptor;let tl=Object.freeze,nl=Object.seal,sc=Object.create,ky=typeof Reflect<"u"&&Reflect,rp=ky.apply,cp=ky.construct;tl||(tl=function(l){return l});nl||(nl=function(l){return l});rp||(rp=function(l,r){for(var c=arguments.length,o=new Array(c>2?c-2:0),d=2;d<c;d++)o[d-2]=arguments[d];return l.apply(r,o)});cp||(cp=function(l){for(var r=arguments.length,c=new Array(r>1?r-1:0),o=1;o<r;o++)c[o-1]=arguments[o];return new l(...c)});const Pr=Rn(Array.prototype.forEach),Wv=Rn(Array.prototype.lastIndexOf),Vb=Rn(Array.prototype.pop),ec=Rn(Array.prototype.push),Pv=Rn(Array.prototype.splice),Ei=Array.isArray,zo=Rn(String.prototype.toLowerCase),Hh=Rn(String.prototype.toString),$b=Rn(String.prototype.match),Eo=Rn(String.prototype.replace),Qb=Rn(String.prototype.indexOf),e1=Rn(String.prototype.trim),t1=Rn(Number.prototype.toString),n1=Rn(Boolean.prototype.toString),Kb=typeof BigInt>"u"?null:Rn(BigInt.prototype.toString),Zb=typeof Symbol>"u"?null:Rn(Symbol.prototype.toString),Kn=Rn(Object.prototype.hasOwnProperty),Co=Rn(Object.prototype.toString),Qn=Rn(RegExp.prototype.test),Wi=l1(TypeError);function Rn(s){return function(l){l instanceof RegExp&&(l.lastIndex=0);for(var r=arguments.length,c=new Array(r>1?r-1:0),o=1;o<r;o++)c[o-1]=arguments[o];return rp(s,l,c)}}function l1(s){return function(){for(var l=arguments.length,r=new Array(l),c=0;c<l;c++)r[c]=arguments[c];return cp(s,r)}}function mt(s,l){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zo;if(Xb&&Xb(s,null),!Ei(l))return s;let c=l.length;for(;c--;){let o=l[c];if(typeof o=="string"){const d=r(o);d!==o&&(Zv(l)||(l[c]=d),o=d)}s[o]=!0}return s}function s1(s){for(let l=0;l<s.length;l++)Kn(s,l)||(s[l]=null);return s}function vl(s){const l=sc(null);for(const c of wy(s)){var r=Qv(c,2);const o=r[0],d=r[1];Kn(s,o)&&(Ei(d)?l[o]=s1(d):d&&typeof d=="object"&&d.constructor===Object?l[o]=vl(d):l[o]=d)}return l}function a1(s){switch(typeof s){case"string":return s;case"number":return t1(s);case"boolean":return n1(s);case"bigint":return Kb?Kb(s):"0";case"symbol":return Zb?Zb(s):"Symbol()";case"undefined":return Co(s);case"function":case"object":{if(s===null)return Co(s);const l=s,r=ea(l,"toString");if(typeof r=="function"){const c=r(l);return typeof c=="string"?c:Co(c)}return Co(s)}default:return Co(s)}}function ea(s,l){for(;s!==null;){const c=Jv(s,l);if(c){if(c.get)return Rn(c.get);if(typeof c.value=="function")return Rn(c.value)}s=Fv(s)}function r(){return null}return r}function i1(s){try{return Qn(s,""),!0}catch{return!1}}const Fb=tl(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Bh=tl(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ih=tl(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),r1=tl(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),qh=tl(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),c1=tl(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jb=tl(["#text"]),Wb=tl(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gh=tl(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pb=tl(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),uf=tl(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o1=nl(/{{[\w\W]*|^[\w\W]*}}/g),u1=nl(/<%[\w\W]*|^[\w\W]*%>/g),f1=nl(/\${[\w\W]*/g),d1=nl(/^data-[\-\w.\u00B7-\uFFFF]+$/),h1=nl(/^aria-[\-\w]+$/),ex=nl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),p1=nl(/^(?:\w+script|data):/i),m1=nl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),g1=nl(/^html$/i),b1=nl(/^[a-z][.\w]*(-[.\w]+)+$/i),tx=nl(/<[/\w!]/g),nx=nl(/<[/\w]/g),x1=nl(/<\/no(script|embed|frames)/i),y1=nl(/\/>/i),Kl={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},_1=function(){return typeof window>"u"?null:window},v1=function(l,r){if(typeof l!="object"||typeof l.createPolicy!="function")return null;let c=null;const o="data-tt-policy-suffix";r&&r.hasAttribute(o)&&(c=r.getAttribute(o));const d="dompurify"+(c?"#"+c:"");try{return l.createPolicy(d,{createHTML(h){return h},createScriptURL(h){return h}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},lx=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Si=function(l,r,c,o){return Kn(l,r)&&Ei(l[r])?mt(o.base?vl(o.base):{},l[r],o.transform):c};function Ny(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_1();const l=pe=>Ny(pe);if(l.version="3.4.12",l.removed=[],!s||!s.document||s.document.nodeType!==Kl.document||!s.Element)return l.isSupported=!1,l;let r=s.document;const c=r,o=c.currentScript;s.DocumentFragment;const d=s.HTMLTemplateElement,h=s.Node,m=s.Element,g=s.NodeFilter,x=s.NamedNodeMap;x===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const _=s.DOMParser,S=s.trustedTypes,v=m.prototype,E=ea(v,"cloneNode"),T=ea(v,"remove"),C=ea(v,"nextSibling"),L=ea(v,"childNodes"),X=ea(v,"parentNode"),J=ea(v,"shadowRoot"),G=ea(v,"attributes"),O=h&&h.prototype?ea(h.prototype,"nodeType"):null,Z=h&&h.prototype?ea(h.prototype,"nodeName"):null;if(typeof d=="function"){const pe=r.createElement("template");pe.content&&pe.content.ownerDocument&&(r=pe.content.ownerDocument)}let M,D="",H,ne=!1,he=0;const W=function(){if(he>0)throw Wi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ue=function(k){W(),he++;try{return M.createHTML(k)}finally{he--}},je=function(k){W(),he++;try{return M.createScriptURL(k)}finally{he--}},Me=function(){return ne||(H=v1(S,o),ne=!0),H},Ce=r,A=Ce.implementation,ce=Ce.createNodeIterator,z=Ce.createDocumentFragment,be=Ce.getElementsByTagName,ye=c.importNode;let N=lx();l.isSupported=typeof wy=="function"&&typeof X=="function"&&A&&A.createHTMLDocument!==void 0;const V=o1,re=u1,me=f1,Ne=d1,ve=h1,De=p1,yt=m1,Xe=b1;let Ve=ex,$e=null;const It=mt({},[...Fb,...Bh,...Ih,...qh,...Jb]);let rt=null;const fn=mt({},[...Wb,...Gh,...Pb,...uf]);let ft=Object.seal(sc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),dn=null,jn=null;const bn=Object.seal(sc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Pt=!0,tt=!0,et=!1,en=!0,Xt=!1,nt=!0,St=!1,Vt=!1,rn=null,wt=null,xn=!1,qt=!1,hn=!1,Dn=!1,Gt=!0,ct=!1;const Ct="user-content-";let Pe=!0,Sl=!1,le={},ge=null;const He=mt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let B=null;const P=mt({},["audio","video","img","source","image","track"]);let _e=null;const Ie=mt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lt="http://www.w3.org/1998/Math/MathML",ul="http://www.w3.org/2000/svg",On="http://www.w3.org/1999/xhtml";let fl=On,ll=!1,Hl=null;const hs=mt({},[Lt,ul,On],Hh),dl=tl(["mi","mo","mn","ms","mtext"]);let sl=mt({},dl);const hl=tl(["annotation-xml"]);let Yt=mt({},hl);const $t=mt({},["title","style","font","a","script"]);let wl=null;const kt=["application/xhtml+xml","text/html"],Qt="text/html";let Oe=null,At=null;const qn=r.createElement("form"),tn=function(k){return k instanceof RegExp||k instanceof Function},Ln=function(){let k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(At&&At===k)return;(!k||typeof k!="object")&&(k={}),k=vl(k),wl=kt.indexOf(k.PARSER_MEDIA_TYPE)===-1?Qt:k.PARSER_MEDIA_TYPE,Oe=wl==="application/xhtml+xml"?Hh:zo,$e=Si(k,"ALLOWED_TAGS",It,{transform:Oe}),rt=Si(k,"ALLOWED_ATTR",fn,{transform:Oe}),Hl=Si(k,"ALLOWED_NAMESPACES",hs,{transform:Hh}),_e=Si(k,"ADD_URI_SAFE_ATTR",Ie,{transform:Oe,base:Ie}),B=Si(k,"ADD_DATA_URI_TAGS",P,{transform:Oe,base:P}),ge=Si(k,"FORBID_CONTENTS",He,{transform:Oe}),dn=Si(k,"FORBID_TAGS",vl({}),{transform:Oe}),jn=Si(k,"FORBID_ATTR",vl({}),{transform:Oe}),le=Kn(k,"USE_PROFILES")?k.USE_PROFILES&&typeof k.USE_PROFILES=="object"?vl(k.USE_PROFILES):k.USE_PROFILES:!1,Pt=k.ALLOW_ARIA_ATTR!==!1,tt=k.ALLOW_DATA_ATTR!==!1,et=k.ALLOW_UNKNOWN_PROTOCOLS||!1,en=k.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Xt=k.SAFE_FOR_TEMPLATES||!1,nt=k.SAFE_FOR_XML!==!1,St=k.WHOLE_DOCUMENT||!1,qt=k.RETURN_DOM||!1,hn=k.RETURN_DOM_FRAGMENT||!1,Dn=k.RETURN_TRUSTED_TYPE||!1,xn=k.FORCE_BODY||!1,Gt=k.SANITIZE_DOM!==!1,ct=k.SANITIZE_NAMED_PROPS||!1,Pe=k.KEEP_CONTENT!==!1,Sl=k.IN_PLACE||!1,Ve=i1(k.ALLOWED_URI_REGEXP)?k.ALLOWED_URI_REGEXP:ex,fl=typeof k.NAMESPACE=="string"?k.NAMESPACE:On,sl=Kn(k,"MATHML_TEXT_INTEGRATION_POINTS")&&k.MATHML_TEXT_INTEGRATION_POINTS&&typeof k.MATHML_TEXT_INTEGRATION_POINTS=="object"?vl(k.MATHML_TEXT_INTEGRATION_POINTS):mt({},dl),Yt=Kn(k,"HTML_INTEGRATION_POINTS")&&k.HTML_INTEGRATION_POINTS&&typeof k.HTML_INTEGRATION_POINTS=="object"?vl(k.HTML_INTEGRATION_POINTS):mt({},hl);const Y=Kn(k,"CUSTOM_ELEMENT_HANDLING")&&k.CUSTOM_ELEMENT_HANDLING&&typeof k.CUSTOM_ELEMENT_HANDLING=="object"?vl(k.CUSTOM_ELEMENT_HANDLING):sc(null);if(ft=sc(null),Kn(Y,"tagNameCheck")&&tn(Y.tagNameCheck)&&(ft.tagNameCheck=Y.tagNameCheck),Kn(Y,"attributeNameCheck")&&tn(Y.attributeNameCheck)&&(ft.attributeNameCheck=Y.attributeNameCheck),Kn(Y,"allowCustomizedBuiltInElements")&&typeof Y.allowCustomizedBuiltInElements=="boolean"&&(ft.allowCustomizedBuiltInElements=Y.allowCustomizedBuiltInElements),nl(ft),Xt&&(tt=!1),hn&&(qt=!0),le&&($e=mt({},Jb),rt=sc(null),le.html===!0&&(mt($e,Fb),mt(rt,Wb)),le.svg===!0&&(mt($e,Bh),mt(rt,Gh),mt(rt,uf)),le.svgFilters===!0&&(mt($e,Ih),mt(rt,Gh),mt(rt,uf)),le.mathMl===!0&&(mt($e,qh),mt(rt,Pb),mt(rt,uf))),bn.tagCheck=null,bn.attributeCheck=null,Kn(k,"ADD_TAGS")&&(typeof k.ADD_TAGS=="function"?bn.tagCheck=k.ADD_TAGS:Ei(k.ADD_TAGS)&&($e===It&&($e=vl($e)),mt($e,k.ADD_TAGS,Oe))),Kn(k,"ADD_ATTR")&&(typeof k.ADD_ATTR=="function"?bn.attributeCheck=k.ADD_ATTR:Ei(k.ADD_ATTR)&&(rt===fn&&(rt=vl(rt)),mt(rt,k.ADD_ATTR,Oe))),Kn(k,"ADD_URI_SAFE_ATTR")&&Ei(k.ADD_URI_SAFE_ATTR)&&mt(_e,k.ADD_URI_SAFE_ATTR,Oe),Kn(k,"FORBID_CONTENTS")&&Ei(k.FORBID_CONTENTS)&&(ge===He&&(ge=vl(ge)),mt(ge,k.FORBID_CONTENTS,Oe)),Kn(k,"ADD_FORBID_CONTENTS")&&Ei(k.ADD_FORBID_CONTENTS)&&(ge===He&&(ge=vl(ge)),mt(ge,k.ADD_FORBID_CONTENTS,Oe)),Pe&&($e["#text"]=!0),St&&mt($e,["html","head","body"]),$e.table&&(mt($e,["tbody"]),delete dn.tbody),k.TRUSTED_TYPES_POLICY){if(typeof k.TRUSTED_TYPES_POLICY.createHTML!="function")throw Wi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof k.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Wi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const fe=M;M=k.TRUSTED_TYPES_POLICY;try{D=ue("")}catch(we){throw M=fe,we}}else k.TRUSTED_TYPES_POLICY===null?(M=void 0,D=""):(M===void 0&&(M=Me()),M&&typeof D=="string"&&(D=ue("")));tl&&tl(k),At=k},al=mt({},[...Bh,...Ih,...r1]),Sn=mt({},[...qh,...c1]),Bl=function(k,Y,fe){return Y.namespaceURI===On?k==="svg":Y.namespaceURI===Lt?k==="svg"&&(fe==="annotation-xml"||sl[fe]):!!al[k]},il=function(k,Y,fe){return Y.namespaceURI===On?k==="math":Y.namespaceURI===ul?k==="math"&&Yt[fe]:!!Sn[k]},nn=function(k,Y,fe){return Y.namespaceURI===ul&&!Yt[fe]||Y.namespaceURI===Lt&&!sl[fe]?!1:!Sn[k]&&($t[k]||!al[k])},Kt=function(k){let Y=X(k);(!Y||!Y.tagName)&&(Y={namespaceURI:fl,tagName:"template"});const fe=zo(k.tagName),we=zo(Y.tagName);return Hl[k.namespaceURI]?k.namespaceURI===ul?Bl(fe,Y,we):k.namespaceURI===Lt?il(fe,Y,we):k.namespaceURI===On?nn(fe,Y,we):!!(wl==="application/xhtml+xml"&&Hl[k.namespaceURI]):!1},cn=function(k){ec(l.removed,{element:k});try{X(k).removeChild(k)}catch{if(T(k),!X(k))throw Wi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Fe=function(k){Gn(k);const Y=L(k);if(Y){const we=[];Pr(Y,Ae=>{ec(we,Ae)}),Pr(we,Ae=>{try{T(Ae)}catch{}})}const fe=G(k);if(fe)for(let we=fe.length-1;we>=0;--we){const Ae=fe[we],ze=Ae&&Ae.name;if(typeof ze=="string")try{k.removeAttribute(ze)}catch{}}},pl=function(k,Y){try{ec(l.removed,{attribute:Y.getAttributeNode(k),from:Y})}catch{ec(l.removed,{attribute:null,from:Y})}if(Y.removeAttribute(k),k==="is")if(qt||hn)try{cn(Y)}catch{}else try{Y.setAttribute(k,"")}catch{}},Ds=function(k){const Y=G(k);if(Y)for(let fe=Y.length-1;fe>=0;--fe){const we=Y[fe],Ae=we&&we.name;if(!(typeof Ae!="string"||rt[Oe(Ae)]))try{k.removeAttribute(Ae)}catch{}}},Gn=function(k){const Y=[k];for(;Y.length>0;){const fe=Y.pop();(O?O(fe):fe.nodeType)===Kl.element&&Ds(fe);const Ae=L(fe);if(Ae)for(let ze=Ae.length-1;ze>=0;--ze)Y.push(Ae[ze])}},Zl=function(k){if(!nt)return;const Y=[k];for(;Y.length>0;){const fe=Y.pop(),we=O?O(fe):fe.nodeType;if(we===Kl.processingInstruction||we===Kl.comment&&Qn(nx,fe.data)){try{T(fe)}catch{}continue}if(we===Kl.element){const ze=fe,dt=Oe(Z?Z(fe):fe.nodeName);try{ze.hasAttribute&&ze.hasAttribute("patchsrc")&&ze.removeAttribute("patchsrc"),ze.hasAttribute&&ze.hasAttribute("for")&&dt!=="label"&&dt!=="output"&&ze.removeAttribute("for")}catch{}}const Ae=L(fe);if(Ae)for(let ze=Ae.length-1;ze>=0;--ze)Y.push(Ae[ze])}},ps=function(k){let Y=null,fe=null;if(xn)k="<remove></remove>"+k;else{const ze=$b(k,/^[\r\n\t ]+/);fe=ze&&ze[0]}wl==="application/xhtml+xml"&&fl===On&&(k='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+k+"</body></html>");const we=M?ue(k):k;if(fl===On)try{Y=new _().parseFromString(we,wl)}catch{}if(!Y||!Y.documentElement){Y=A.createDocument(fl,"template",null);try{Y.documentElement.innerHTML=ll?D:we}catch{}}const Ae=Y.body||Y.documentElement;return k&&fe&&Ae.insertBefore(r.createTextNode(fe),Ae.childNodes[0]||null),fl===On?be.call(Y,St?"html":"body")[0]:St?Y.documentElement:Ae},ms=function(k){return ce.call(k.ownerDocument||k,k,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},pn=function(k){return k=Eo(k,V," "),k=Eo(k,re," "),k=Eo(k,me," "),k},Fl=function(k){var Y;k.normalize();const fe=ce.call(k.ownerDocument||k,k,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null);let we=fe.nextNode();for(;we;)we.data=pn(we.data),we=fe.nextNode();const Ae=(Y=k.querySelectorAll)===null||Y===void 0?void 0:Y.call(k,"template");Ae&&Pr(Ae,ze=>{zn(ze.content)&&Fl(ze.content)})},Zn=function(k){const Y=Z?Z(k):null;return typeof Y!="string"||Oe(Y)!=="form"?!1:typeof k.nodeName!="string"||typeof k.textContent!="string"||typeof k.removeChild!="function"||k.attributes!==G(k)||typeof k.removeAttribute!="function"||typeof k.setAttribute!="function"||typeof k.namespaceURI!="string"||typeof k.insertBefore!="function"||typeof k.hasChildNodes!="function"||k.nodeType!==O(k)||k.childNodes!==L(k)},zn=function(k){if(!O||typeof k!="object"||k===null)return!1;try{return O(k)===Kl.documentFragment}catch{return!1}},wn=function(k){if(!O||typeof k!="object"||k===null)return!1;try{return typeof O(k)=="number"}catch{return!1}};function zt(pe,k,Y){pe.length!==0&&Pr(pe,fe=>{fe.call(l,k,Y,At)})}const Os=function(k,Y){return!!(nt&&k.hasChildNodes()&&!wn(k.firstElementChild)&&Qn(tx,k.textContent)&&Qn(tx,k.innerHTML)||nt&&k.namespaceURI===On&&Y==="style"&&wn(k.firstElementChild)||k.nodeType===Kl.processingInstruction||nt&&k.nodeType===Kl.comment&&Qn(nx,k.data))},Ri=function(k,Y){if(!dn[Y]&&La(Y)&&(ft.tagNameCheck instanceof RegExp&&Qn(ft.tagNameCheck,Y)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(Y)))return!1;if(Pe&&!ge[Y]){const fe=X(k),we=L(k);if(we&&fe){const Ae=we.length;for(let ze=Ae-1;ze>=0;--ze){const dt=Sl?we[ze]:E(we[ze],!0);fe.insertBefore(dt,C(k))}}}return cn(k),!0},Ls=function(k,Y){if(zt(N.beforeSanitizeElements,k,null),k!==Y&&X(k)===null)return!0;if(Zn(k))return cn(k),!0;const fe=Oe(Z?Z(k):k.nodeName);if(zt(N.uponSanitizeElement,k,{tagName:fe,allowedTags:$e}),k!==Y&&X(k)===null)return!0;if(Os(k,fe))return cn(k),!0;if(dn[fe]||!(bn.tagCheck instanceof Function&&bn.tagCheck(fe))&&!$e[fe]){const Ae=Ri(k,fe);return Ae===!1&&zt(N.afterSanitizeElements,k,null),Ae}if((O?O(k):k.nodeType)===Kl.element&&!Kt(k)||(fe==="noscript"||fe==="noembed"||fe==="noframes")&&Qn(x1,k.innerHTML))return cn(k),!0;if(Xt&&k.nodeType===Kl.text){const Ae=pn(k.textContent);k.textContent!==Ae&&(ec(l.removed,{element:k.cloneNode()}),k.textContent=Ae)}return zt(N.afterSanitizeElements,k,null),!1},Yn=function(k,Y,fe){if(jn[Y]||nt&&Y==="patchsrc"||nt&&Y==="for"&&k!=="label"&&k!=="output"||Gt&&(Y==="id"||Y==="name")&&(fe in r||fe in qn))return!1;const we=rt[Y]||bn.attributeCheck instanceof Function&&bn.attributeCheck(Y,k);if(!(tt&&Qn(Ne,Y))){if(!(Pt&&Qn(ve,Y))){if(we){if(!_e[Y]){if(!Qn(Ve,Eo(fe,yt,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&k!=="script"&&Qb(fe,"data:")===0&&B[k])){if(!(et&&!Qn(De,Eo(fe,yt,"")))){if(fe)return!1}}}}}else if(!(La(k)&&(ft.tagNameCheck instanceof RegExp&&Qn(ft.tagNameCheck,k)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(k))&&(ft.attributeNameCheck instanceof RegExp&&Qn(ft.attributeNameCheck,Y)||ft.attributeNameCheck instanceof Function&&ft.attributeNameCheck(Y,k))||Y==="is"&&ft.allowCustomizedBuiltInElements&&(ft.tagNameCheck instanceof RegExp&&Qn(ft.tagNameCheck,fe)||ft.tagNameCheck instanceof Function&&ft.tagNameCheck(fe))))return!1}}return!0},kl=mt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),La=function(k){return!kl[zo(k)]&&Qn(Xe,k)},kn=function(k,Y,fe,we){if(M&&typeof S=="object"&&typeof S.getAttributeType=="function"&&!fe)switch(S.getAttributeType(k,Y)){case"TrustedHTML":return ue(we);case"TrustedScriptURL":return je(we)}return we},ln=function(k,Y,fe,we){try{fe?k.setAttributeNS(fe,Y,we):k.setAttribute(Y,we),Zn(k)?cn(k):Vb(l.removed)}catch{pl(Y,k)}},Jl=function(k){zt(N.beforeSanitizeAttributes,k,null);const Y=k.attributes;if(!Y||Zn(k))return;const fe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:rt,forceKeepAttr:void 0};let we=Y.length;const Ae=Oe(k.nodeName);for(;we--;){const ze=Y[we],dt=ze.name,w=ze.namespaceURI,se=ze.value,ke=Oe(dt),Je=se;let ht=dt==="value"?Je:e1(Je);if(fe.attrName=ke,fe.attrValue=ht,fe.keepAttr=!0,fe.forceKeepAttr=void 0,zt(N.uponSanitizeAttribute,k,fe),ht=fe.attrValue,ct&&(ke==="id"||ke==="name")&&Qb(ht,Ct)!==0&&(pl(dt,k),ht=Ct+ht),nt&&Qn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,ht)){pl(dt,k);continue}if(ke==="attributename"&&$b(ht,"href")){pl(dt,k);continue}if(!fe.forceKeepAttr){if(!fe.keepAttr){pl(dt,k);continue}if(!en&&Qn(y1,ht)){pl(dt,k);continue}if(Xt&&(ht=pn(ht)),!Yn(Ae,ke,ht)){pl(dt,k);continue}ht=kn(Ae,ke,w,ht),ht!==Je&&ln(k,dt,w,ht)}}zt(N.afterSanitizeAttributes,k,null)},lt=function(k){let Y=null;const fe=ms(k);for(zt(N.beforeSanitizeShadowDOM,k,null);Y=fe.nextNode();)if(zt(N.uponSanitizeShadowNode,Y,null),Ls(Y,k),Jl(Y),zn(Y.content)&&lt(Y.content),(O?O(Y):Y.nodeType)===Kl.element){const Ae=J(Y);zn(Ae)&&(Xn(Ae),lt(Ae))}zt(N.afterSanitizeShadowDOM,k,null)},Xn=function(k){const Y=[{node:k,shadow:null}];for(;Y.length>0;){const fe=Y.pop();if(fe.shadow){lt(fe.shadow);continue}const we=fe.node,ze=(O?O(we):we.nodeType)===Kl.element,dt=L(we);if(dt)for(let w=dt.length-1;w>=0;--w)Y.push({node:dt[w],shadow:null});if(ze){const w=Z?Z(we):null;if(typeof w=="string"&&Oe(w)==="template"){const se=we.content;zn(se)&&Y.push({node:se,shadow:null})}}if(ze){const w=J(we);zn(w)&&Y.push({node:null,shadow:w},{node:w,shadow:null})}}};return l.sanitize=function(pe){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,fe=null,we=null,Ae=null;if(ll=!pe,ll&&(pe="<!-->"),typeof pe!="string"&&!wn(pe)&&(pe=a1(pe),typeof pe!="string"))throw Wi("dirty is not a string, aborting");if(!l.isSupported)return pe;Vt?($e=rn,rt=wt):Ln(k),(N.uponSanitizeElement.length>0||N.uponSanitizeAttribute.length>0)&&($e=vl($e)),N.uponSanitizeAttribute.length>0&&(rt=vl(rt)),l.removed=[];const ze=Sl&&typeof pe!="string"&&wn(pe);if(ze){Zl(pe);const ke=Z?Z(pe):pe.nodeName;if(typeof ke=="string"){const Je=Oe(ke);if(!$e[Je]||dn[Je])throw Fe(pe),Wi("root node is forbidden and cannot be sanitized in-place")}if(Zn(pe))throw Fe(pe),Wi("root node is clobbered and cannot be sanitized in-place");try{Xn(pe)}catch(Je){throw Fe(pe),Je}}else if(wn(pe))Y=ps("<!---->"),fe=Y.ownerDocument.importNode(pe,!0),fe.nodeType===Kl.element&&fe.nodeName==="BODY"||fe.nodeName==="HTML"?Y=fe:Y.appendChild(fe),Xn(fe);else{if(!qt&&!Xt&&!St&&pe.indexOf("<")===-1)return M&&Dn?ue(pe):pe;if(Y=ps(pe),!Y)return qt?null:Dn?D:""}Y&&xn&&cn(Y.firstChild);const dt=ze?pe:Y,w=ms(dt);try{for(;we=w.nextNode();)Ls(we,dt),Jl(we),zn(we.content)&&lt(we.content)}catch(ke){throw ze&&(Fe(pe),Pr(l.removed,Je=>{Je.element&&Gn(Je.element)})),ke}if(ze)return Pr(l.removed,ke=>{ke.element&&Gn(ke.element)}),Xt&&Fl(pe),pe;if(qt){if(Xt&&Fl(Y),hn)for(Ae=z.call(Y.ownerDocument);Y.firstChild;)Ae.appendChild(Y.firstChild);else Ae=Y;return(rt.shadowroot||rt.shadowrootmode)&&(Ae=ye.call(c,Ae,!0)),Ae}let se=St?Y.outerHTML:Y.innerHTML;return St&&$e["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&Qn(g1,Y.ownerDocument.doctype.name)&&(se="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
116
+ `+se),Xt&&(se=pn(se)),M&&Dn?ue(se):se},l.setConfig=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ln(pe),Vt=!0,rn=$e,wt=rt},l.clearConfig=function(){At=null,Vt=!1,rn=null,wt=null,M=H,D=""},l.isValidAttribute=function(pe,k,Y){At||Ln({});const fe=Oe(pe),we=Oe(k);return Yn(fe,we,Y)},l.addHook=function(pe,k){typeof k=="function"&&Kn(N,pe)&&ec(N[pe],k)},l.removeHook=function(pe,k){if(Kn(N,pe)){if(k!==void 0){const Y=Wv(N[pe],k);return Y===-1?void 0:Pv(N[pe],Y,1)[0]}return Vb(N[pe])}},l.removeHooks=function(pe){Kn(N,pe)&&(N[pe]=[])},l.removeAllHooks=function(){N=lx()},l}var j1=Ny();const S1=1024;let w1=0;class ds{constructor(l,r){this.from=l,this.to=r}}class Wt{constructor(l={}){this.id=w1++,this.perNode=!!l.perNode,this.deserialize=l.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=l.combine||null}add(l){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof l!="function"&&(l=Rs.match(l)),r=>{let c=l(r);return c===void 0?null:[this,c]}}}Wt.closedBy=new Wt({deserialize:s=>s.split(" ")});Wt.openedBy=new Wt({deserialize:s=>s.split(" ")});Wt.group=new Wt({deserialize:s=>s.split(" ")});Wt.isolate=new Wt({deserialize:s=>{if(s&&s!="rtl"&&s!="ltr"&&s!="auto")throw new RangeError("Invalid value for isolate: "+s);return s||"auto"}});Wt.contextHash=new Wt({perNode:!0});Wt.lookAhead=new Wt({perNode:!0});Wt.mounted=new Wt({perNode:!0});class cc{constructor(l,r,c,o=!1){this.tree=l,this.overlay=r,this.parser=c,this.bracketed=o}static get(l){return l&&l.props&&l.props[Wt.mounted.id]}}const k1=Object.create(null);class Rs{constructor(l,r,c,o=0){this.name=l,this.props=r,this.id=c,this.flags=o}static define(l){let r=l.props&&l.props.length?Object.create(null):k1,c=(l.top?1:0)|(l.skipped?2:0)|(l.error?4:0)|(l.name==null?8:0),o=new Rs(l.name||"",r,l.id,c);if(l.props){for(let d of l.props)if(Array.isArray(d)||(d=d(o)),d){if(d[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");r[d[0].id]=d[1]}}return o}prop(l){return this.props[l.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(l){if(typeof l=="string"){if(this.name==l)return!0;let r=this.prop(Wt.group);return r?r.indexOf(l)>-1:!1}return this.id==l}static match(l){let r=Object.create(null);for(let c in l)for(let o of c.split(" "))r[o]=l[c];return c=>{for(let o=c.prop(Wt.group),d=-1;d<(o?o.length:0);d++){let h=r[d<0?c.name:o[d]];if(h)return h}}}}Rs.none=new Rs("",Object.create(null),0,8);class Ty{constructor(l){this.types=l;for(let r=0;r<l.length;r++)if(l[r].id!=r)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...l){let r=[];for(let c of this.types){let o=null;for(let d of l){let h=d(c);if(h){o||(o=Object.assign({},c.props));let m=h[1],g=h[0];g.combine&&g.id in o&&(m=g.combine(o[g.id],m)),o[g.id]=m}}r.push(o?new Rs(c.name,o,c.id,c.flags):c)}return new Ty(r)}}const ff=new WeakMap,sx=new WeakMap;var Ft;(function(s){s[s.ExcludeBuffers=1]="ExcludeBuffers",s[s.IncludeAnonymous=2]="IncludeAnonymous",s[s.IgnoreMounts=4]="IgnoreMounts",s[s.IgnoreOverlays=8]="IgnoreOverlays",s[s.EnterBracketed=16]="EnterBracketed"})(Ft||(Ft={}));class Ul{constructor(l,r,c,o,d){if(this.type=l,this.children=r,this.positions=c,this.length=o,this.props=null,d&&d.length){this.props=Object.create(null);for(let[h,m]of d)this.props[typeof h=="number"?h:h.id]=m}}toString(){let l=cc.get(this);if(l&&!l.overlay)return l.tree.toString();let r="";for(let c of this.children){let o=c.toString();o&&(r&&(r+=","),r+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(r.length?"("+r+")":""):r}cursor(l=0){return new Uf(this.topNode,l)}cursorAt(l,r=0,c=0){let o=ff.get(this)||this.topNode,d=new Uf(o);return d.moveTo(l,r),ff.set(this,d._tree),d}get topNode(){return new ol(this,0,0,null)}resolve(l,r=0){let c=Bo(ff.get(this)||this.topNode,l,r,!1);return ff.set(this,c),c}resolveInner(l,r=0){let c=Bo(sx.get(this)||this.topNode,l,r,!0);return sx.set(this,c),c}resolveStack(l,r=0){return E1(this,l,r)}iterate(l){let{enter:r,leave:c,from:o=0,to:d=this.length}=l,h=l.mode||0,m=(h&Ft.IncludeAnonymous)>0;for(let g=this.cursor(h|Ft.IncludeAnonymous);;){let x=!1;if(g.from<=d&&g.to>=o&&(!m&&g.type.isAnonymous||r(g)!==!1)){if(g.firstChild())continue;x=!0}for(;x&&c&&(m||!g.type.isAnonymous)&&c(g),!g.nextSibling();){if(!g.parent())return;x=!0}}}prop(l){return l.perNode?this.props?this.props[l.id]:void 0:this.type.prop(l)}get propValues(){let l=[];if(this.props)for(let r in this.props)l.push([+r,this.props[r]]);return l}balance(l={}){return this.children.length<=8?this:Ep(Rs.none,this.children,this.positions,0,this.children.length,0,this.length,(r,c,o)=>new Ul(this.type,r,c,o,this.propValues),l.makeTree||((r,c,o)=>new Ul(Rs.none,r,c,o)))}static build(l){return C1(l)}}Ul.empty=new Ul(Rs.none,[],[],0);class Np{constructor(l,r){this.buffer=l,this.index=r}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Np(this.buffer,this.index)}}class Mi{constructor(l,r,c){this.buffer=l,this.length=r,this.set=c}get type(){return Rs.none}toString(){let l=[];for(let r=0;r<this.buffer.length;)l.push(this.childString(r)),r=this.buffer[r+3];return l.join(",")}childString(l){let r=this.buffer[l],c=this.buffer[l+3],o=this.set.types[r],d=o.name;if(/\W/.test(d)&&!o.isError&&(d=JSON.stringify(d)),l+=4,c==l)return d;let h=[];for(;l<c;)h.push(this.childString(l)),l=this.buffer[l+3];return d+"("+h.join(",")+")"}findChild(l,r,c,o,d){let{buffer:h}=this,m=-1;for(let g=l;g!=r&&!(Ey(d,o,h[g+1],h[g+2])&&(m=g,c>0));g=h[g+3]);return m}slice(l,r,c){let o=this.buffer,d=new Uint16Array(r-l),h=0;for(let m=l,g=0;m<r;){d[g++]=o[m++],d[g++]=o[m++]-c;let x=d[g++]=o[m++]-c;d[g++]=o[m++]-l,h=Math.max(h,x)}return new Mi(d,h,this.set)}}function Ey(s,l,r,c){switch(s){case-2:return r<l;case-1:return c>=l&&r<l;case 0:return r<l&&c>l;case 1:return r<=l&&c>l;case 2:return c>l;case 4:return!0}}function Bo(s,l,r,c){for(var o;s.from==s.to||(r<1?s.from>=l:s.from>l)||(r>-1?s.to<=l:s.to<l);){let h=!c&&s instanceof ol&&s.index<0?null:s.parent;if(!h)return s;s=h}let d=c?0:Ft.IgnoreOverlays;if(c)for(let h=s,m=h.parent;m;h=m,m=h.parent)h instanceof ol&&h.index<0&&((o=m.enter(l,r,d))===null||o===void 0?void 0:o.from)!=h.from&&(s=m);for(;;){let h=s.enter(l,r,d);if(!h)return s;s=h}}class Cy{cursor(l=0){return new Uf(this,l)}getChild(l,r=null,c=null){let o=ax(this,l,r,c);return o.length?o[0]:null}getChildren(l,r=null,c=null){return ax(this,l,r,c)}resolve(l,r=0){return Bo(this,l,r,!1)}resolveInner(l,r=0){return Bo(this,l,r,!0)}matchContext(l){return op(this.parent,l)}enterUnfinishedNodesBefore(l){let r=this.childBefore(l),c=this;for(;r;){let o=r.lastChild;if(!o||o.to!=r.to)break;o.type.isError&&o.from==o.to?(c=r,r=o.prevSibling):r=o}return c}get node(){return this}get next(){return this.parent}}class ol extends Cy{constructor(l,r,c,o){super(),this._tree=l,this.from=r,this.index=c,this._parent=o}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(l,r,c,o,d=0){for(let h=this;;){for(let{children:m,positions:g}=h._tree,x=r>0?m.length:-1;l!=x;l+=r){let _=m[l],S=g[l]+h.from,v;if(!(!(d&Ft.EnterBracketed&&_ instanceof Ul&&(v=cc.get(_))&&!v.overlay&&v.bracketed&&c>=S&&c<=S+_.length)&&!Ey(o,c,S,S+_.length))){if(_ instanceof Mi){if(d&Ft.ExcludeBuffers)continue;let E=_.findChild(0,_.buffer.length,r,c-S,o);if(E>-1)return new aa(new N1(h,_,l,S),null,E)}else if(d&Ft.IncludeAnonymous||!_.type.isAnonymous||Tp(_)){let E;if(!(d&Ft.IgnoreMounts)&&(E=cc.get(_))&&!E.overlay)return new ol(E.tree,S,l,h);let T=new ol(_,S,l,h);return d&Ft.IncludeAnonymous||!T.type.isAnonymous?T:T.nextChild(r<0?_.children.length-1:0,r,c,o,d)}}}if(d&Ft.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?l=h.index+r:l=r<0?-1:h._parent._tree.children.length,h=h._parent,!h))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(l){return this.nextChild(0,1,l,2)}childBefore(l){return this.nextChild(this._tree.children.length-1,-1,l,-2)}prop(l){return this._tree.prop(l)}enter(l,r,c=0){let o;if(!(c&Ft.IgnoreOverlays)&&(o=cc.get(this._tree))&&o.overlay){let d=l-this.from,h=c&Ft.EnterBracketed&&o.bracketed;for(let{from:m,to:g}of o.overlay)if((r>0||h?m<=d:m<d)&&(r<0||h?g>=d:g>d))return new ol(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,l,r,c)}nextSignificantParent(){let l=this;for(;l.type.isAnonymous&&l._parent;)l=l._parent;return l}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function ax(s,l,r,c){let o=s.cursor(),d=[];if(!o.firstChild())return d;if(r!=null){for(let h=!1;!h;)if(h=o.type.is(r),!o.nextSibling())return d}for(;;){if(c!=null&&o.type.is(c))return d;if(o.type.is(l)&&d.push(o.node),!o.nextSibling())return c==null?d:[]}}function op(s,l,r=l.length-1){for(let c=s;r>=0;c=c.parent){if(!c)return!1;if(!c.type.isAnonymous){if(l[r]&&l[r]!=c.name)return!1;r--}}return!0}class N1{constructor(l,r,c,o){this.parent=l,this.buffer=r,this.index=c,this.start=o}}class aa extends Cy{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(l,r,c){super(),this.context=l,this._parent=r,this.index=c,this.type=l.buffer.set.types[l.buffer.buffer[c]]}child(l,r,c){let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],l,r-this.context.start,c);return d<0?null:new aa(this.context,this,d)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(l){return this.child(1,l,2)}childBefore(l){return this.child(-1,l,-2)}prop(l){return this.type.prop(l)}enter(l,r,c=0){if(c&Ft.ExcludeBuffers)return null;let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],r>0?1:-1,l-this.context.start,r);return d<0?null:new aa(this.context,this,d)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(l){return this._parent?null:this.context.parent.nextChild(this.context.index+l,l,0,4)}get nextSibling(){let{buffer:l}=this.context,r=l.buffer[this.index+3];return r<(this._parent?l.buffer[this._parent.index+3]:l.buffer.length)?new aa(this.context,this._parent,r):this.externalSibling(1)}get prevSibling(){let{buffer:l}=this.context,r=this._parent?this._parent.index+4:0;return this.index==r?this.externalSibling(-1):new aa(this.context,this._parent,l.findChild(r,this.index,-1,0,4))}get tree(){return null}toTree(){let l=[],r=[],{buffer:c}=this.context,o=this.index+4,d=c.buffer[this.index+3];if(d>o){let h=c.buffer[this.index+1];l.push(c.slice(o,d,h)),r.push(0)}return new Ul(this.type,l,r,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ay(s){if(!s.length)return null;let l=0,r=s[0];for(let d=1;d<s.length;d++){let h=s[d];(h.from>r.from||h.to<r.to)&&(r=h,l=d)}let c=r instanceof ol&&r.index<0?null:r.parent,o=s.slice();return c?o[l]=c:o.splice(l,1),new T1(o,r)}class T1{constructor(l,r){this.heads=l,this.node=r}get next(){return Ay(this.heads)}}function E1(s,l,r){let c=s.resolveInner(l,r),o=null;for(let d=c instanceof ol?c:c.context.parent;d;d=d.parent)if(d.index<0){let h=d.parent;(o||(o=[c])).push(h.resolve(l,r)),d=h}else{let h=cc.get(d.tree);if(h&&h.overlay&&h.overlay[0].from<=l&&h.overlay[h.overlay.length-1].to>=l){let m=new ol(h.tree,h.overlay[0].from+d.from,-1,d);(o||(o=[c])).push(Bo(m,l,r,!1))}}return o?Ay(o):c}class Uf{get name(){return this.type.name}constructor(l,r=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=r&~Ft.EnterBracketed,l instanceof ol)this.yieldNode(l);else{this._tree=l.context.parent,this.buffer=l.context;for(let c=l._parent;c;c=c._parent)this.stack.unshift(c.index);this.bufferNode=l,this.yieldBuf(l.index)}}yieldNode(l){return l?(this._tree=l,this.type=l.type,this.from=l.from,this.to=l.to,!0):!1}yieldBuf(l,r){this.index=l;let{start:c,buffer:o}=this.buffer;return this.type=r||o.set.types[o.buffer[l]],this.from=c+o.buffer[l+1],this.to=c+o.buffer[l+2],!0}yield(l){return l?l instanceof ol?(this.buffer=null,this.yieldNode(l)):(this.buffer=l.context,this.yieldBuf(l.index,l.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(l,r,c){if(!this.buffer)return this.yield(this._tree.nextChild(l<0?this._tree._tree.children.length-1:0,l,r,c,this.mode));let{buffer:o}=this.buffer,d=o.findChild(this.index+4,o.buffer[this.index+3],l,r-this.buffer.start,c);return d<0?!1:(this.stack.push(this.index),this.yieldBuf(d))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(l){return this.enterChild(1,l,2)}childBefore(l){return this.enterChild(-1,l,-2)}enter(l,r,c=this.mode){return this.buffer?c&Ft.ExcludeBuffers?!1:this.enterChild(1,l,r):this.yield(this._tree.enter(l,r,c))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ft.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let l=this.mode&Ft.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(l)}sibling(l){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+l,l,0,4,this.mode)):!1;let{buffer:r}=this.buffer,c=this.stack.length-1;if(l<0){let o=c<0?0:this.stack[c]+4;if(this.index!=o)return this.yieldBuf(r.findChild(o,this.index,-1,0,4))}else{let o=r.buffer[this.index+3];if(o<(c<0?r.buffer.length:r.buffer[this.stack[c]+3]))return this.yieldBuf(o)}return c<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+l,l,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(l){let r,c,{buffer:o}=this;if(o){if(l>0){if(this.index<o.buffer.buffer.length)return!1}else for(let d=0;d<this.index;d++)if(o.buffer.buffer[d+3]<this.index)return!1;({index:r,parent:c}=o)}else({index:r,_parent:c}=this._tree);for(;c;{index:r,_parent:c}=c)if(r>-1)for(let d=r+l,h=l<0?-1:c._tree.children.length;d!=h;d+=l){let m=c._tree.children[d];if(this.mode&Ft.IncludeAnonymous||m instanceof Mi||!m.type.isAnonymous||Tp(m))return!1}return!0}move(l,r){if(r&&this.enterChild(l,0,4))return!0;for(;;){if(this.sibling(l))return!0;if(this.atLastNode(l)||!this.parent())return!1}}next(l=!0){return this.move(1,l)}prev(l=!0){return this.move(-1,l)}moveTo(l,r=0){for(;(this.from==this.to||(r<1?this.from>=l:this.from>l)||(r>-1?this.to<=l:this.to<l))&&this.parent(););for(;this.enterChild(1,l,r););return this}get node(){if(!this.buffer)return this._tree;let l=this.bufferNode,r=null,c=0;if(l&&l.context==this.buffer)e:for(let o=this.index,d=this.stack.length;d>=0;){for(let h=l;h;h=h._parent)if(h.index==o){if(o==this.index)return h;r=h,c=d+1;break e}o=this.stack[--d]}for(let o=c;o<this.stack.length;o++)r=new aa(this.buffer,r,this.stack[o]);return this.bufferNode=new aa(this.buffer,r,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(l,r){for(let c=0;;){let o=!1;if(this.type.isAnonymous||l(this)!==!1){if(this.firstChild()){c++;continue}this.type.isAnonymous||(o=!0)}for(;;){if(o&&r&&r(this),o=this.type.isAnonymous,!c)return;if(this.nextSibling())break;this.parent(),c--,o=!0}}}matchContext(l){if(!this.buffer)return op(this.node.parent,l);let{buffer:r}=this.buffer,{types:c}=r.set;for(let o=l.length-1,d=this.stack.length-1;o>=0;d--){if(d<0)return op(this._tree,l,o);let h=c[r.buffer[this.stack[d]]];if(!h.isAnonymous){if(l[o]&&l[o]!=h.name)return!1;o--}}return!0}}function Tp(s){return s.children.some(l=>l instanceof Mi||!l.type.isAnonymous||Tp(l))}function C1(s){var l;let{buffer:r,nodeSet:c,maxBufferLength:o=S1,reused:d=[],minRepeatType:h=c.types.length}=s,m=Array.isArray(r)?new Np(r,r.length):r,g=c.types,x=0,_=0;function S(Z,M,D,H,ne,he){let{id:W,start:ue,end:je,size:Me}=m,Ce=_,A=x;if(Me<0)if(m.next(),Me==-1){let N=d[W];D.push(N),H.push(ue-Z);return}else if(Me==-3){x=W;return}else if(Me==-4){_=W;return}else throw new RangeError(`Unrecognized record size: ${Me}`);let ce=g[W],z,be,ye=ue-Z;if(je-ue<=o&&(be=L(m.pos-M,ne))){let N=new Uint16Array(be.size-be.skip),V=m.pos-be.size,re=N.length;for(;m.pos>V;)re=X(be.start,N,re);z=new Mi(N,je-be.start,c),ye=be.start-Z}else{let N=m.pos-Me;m.next();let V=[],re=[],me=W>=h?W:-1,Ne=0,ve=je;for(;m.pos>N;)me>=0&&m.id==me&&m.size>=0?(m.end<=ve-o&&(T(V,re,ue,Ne,m.end,ve,me,Ce,A),Ne=V.length,ve=m.end),m.next()):he>2500?v(ue,N,V,re):S(ue,N,V,re,me,he+1);if(me>=0&&Ne>0&&Ne<V.length&&T(V,re,ue,Ne,ue,ve,me,Ce,A),V.reverse(),re.reverse(),me>-1&&Ne>0){let De=E(ce,A);z=Ep(ce,V,re,0,V.length,0,je-ue,De,De)}else z=C(ce,V,re,je-ue,Ce-je,A)}D.push(z),H.push(ye)}function v(Z,M,D,H){let ne=[],he=0,W=-1;for(;m.pos>M;){let{id:ue,start:je,end:Me,size:Ce}=m;if(Ce>4)m.next();else{if(W>-1&&je<W)break;W<0&&(W=Me-o),ne.push(ue,je,Me),he++,m.next()}}if(he){let ue=new Uint16Array(he*4),je=ne[ne.length-2];for(let Me=ne.length-3,Ce=0;Me>=0;Me-=3)ue[Ce++]=ne[Me],ue[Ce++]=ne[Me+1]-je,ue[Ce++]=ne[Me+2]-je,ue[Ce++]=Ce;D.push(new Mi(ue,ne[2]-je,c)),H.push(je-Z)}}function E(Z,M){return(D,H,ne)=>{let he=0,W=D.length-1,ue,je;if(W>=0&&(ue=D[W])instanceof Ul){if(!W&&ue.type==Z&&ue.length==ne)return ue;(je=ue.prop(Wt.lookAhead))&&(he=H[W]+ue.length+je)}return C(Z,D,H,ne,he,M)}}function T(Z,M,D,H,ne,he,W,ue,je){let Me=[],Ce=[];for(;Z.length>H;)Me.push(Z.pop()),Ce.push(M.pop()+D-ne);Z.push(C(c.types[W],Me,Ce,he-ne,ue-he,je)),M.push(ne-D)}function C(Z,M,D,H,ne,he,W){if(he){let ue=[Wt.contextHash,he];W=W?[ue].concat(W):[ue]}if(ne>25){let ue=[Wt.lookAhead,ne];W=W?[ue].concat(W):[ue]}return new Ul(Z,M,D,H,W)}function L(Z,M){let D=m.fork(),H=0,ne=0,he=0,W=D.end-o,ue={size:0,start:0,skip:0};e:for(let je=D.pos-Z;D.pos>je;){let Me=D.size;if(D.id==M&&Me>=0){ue.size=H,ue.start=ne,ue.skip=he,he+=4,H+=4,D.next();continue}let Ce=D.pos-Me;if(Me<0||Ce<je||D.start<W)break;let A=D.id>=h?4:0,ce=D.start;for(D.next();D.pos>Ce;){if(D.size<0)if(D.size==-3||D.size==-4)A+=4;else break e;else D.id>=h&&(A+=4);D.next()}ne=ce,H+=Me,he+=A}return(M<0||H==Z)&&(ue.size=H,ue.start=ne,ue.skip=he),ue.size>4?ue:void 0}function X(Z,M,D){let{id:H,start:ne,end:he,size:W}=m;if(m.next(),W>=0&&H<h){let ue=D;if(W>4){let je=m.pos-(W-4);for(;m.pos>je;)D=X(Z,M,D)}M[--D]=ue,M[--D]=he-Z,M[--D]=ne-Z,M[--D]=H}else W==-3?x=H:W==-4&&(_=H);return D}let J=[],G=[];for(;m.pos>0;)S(s.start||0,s.bufferStart||0,J,G,-1,0);let O=(l=s.length)!==null&&l!==void 0?l:J.length?G[0]+J[0].length:0;return new Ul(g[s.topID],J.reverse(),G.reverse(),O)}const ix=new WeakMap;function Rf(s,l){if(!s.isAnonymous||l instanceof Mi||l.type!=s)return 1;let r=ix.get(l);if(r==null){r=1;for(let c of l.children){if(c.type!=s||!(c instanceof Ul)){r=1;break}r+=Rf(s,c)}ix.set(l,r)}return r}function Ep(s,l,r,c,o,d,h,m,g){let x=0;for(let T=c;T<o;T++)x+=Rf(s,l[T]);let _=Math.ceil(x*1.5/8),S=[],v=[];function E(T,C,L,X,J){for(let G=L;G<X;){let O=G,Z=C[G],M=Rf(s,T[G]);for(G++;G<X;G++){let D=Rf(s,T[G]);if(M+D>=_)break;M+=D}if(G==O+1){if(M>_){let D=T[O];E(D.children,D.positions,0,D.children.length,C[O]+J);continue}S.push(T[O])}else{let D=C[G-1]+T[G-1].length-Z;S.push(Ep(s,T,C,O,G,Z,D,null,g))}v.push(Z+J-d)}}return E(l,r,c,o,0),(m||g)(S,v,h)}class _N{constructor(){this.map=new WeakMap}setBuffer(l,r,c){let o=this.map.get(l);o||this.map.set(l,o=new Map),o.set(r,c)}getBuffer(l,r){let c=this.map.get(l);return c&&c.get(r)}set(l,r){l instanceof aa?this.setBuffer(l.context.buffer,l.index,r):l instanceof ol&&this.map.set(l.tree,r)}get(l){return l instanceof aa?this.getBuffer(l.context.buffer,l.index):l instanceof ol?this.map.get(l.tree):void 0}cursorSet(l,r){l.buffer?this.setBuffer(l.buffer.buffer,l.index,r):this.map.set(l.tree,r)}cursorGet(l){return l.buffer?this.getBuffer(l.buffer.buffer,l.index):this.map.get(l.tree)}}class Io{constructor(l,r,c,o,d=!1,h=!1){this.from=l,this.to=r,this.tree=c,this.offset=o,this.open=(d?1:0)|(h?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(l,r=[],c=!1){let o=[new Io(0,l.length,l,0,!1,c)];for(let d of r)d.to>l.length&&o.push(d);return o}static applyChanges(l,r,c=128){if(!r.length)return l;let o=[],d=1,h=l.length?l[0]:null;for(let m=0,g=0,x=0;;m++){let _=m<r.length?r[m]:null,S=_?_.fromA:1e9;if(S-g>=c)for(;h&&h.from<S;){let v=h;if(g>=v.from||S<=v.to||x){let E=Math.max(v.from,g)-x,T=Math.min(v.to,S)-x;v=E>=T?null:new Io(E,T,v.tree,v.offset+x,m>0,!!_)}if(v&&o.push(v),h.to>S)break;h=d<l.length?l[d++]:null}if(!_)break;g=_.toA,x=_.toA-_.toB}return o}}class vN{startParse(l,r,c){return typeof l=="string"&&(l=new A1(l)),c=c?c.length?c.map(o=>new ds(o.from,o.to)):[new ds(0,0)]:[new ds(0,l.length)],this.createParse(l,r||[],c)}parse(l,r,c){let o=this.startParse(l,r,c);for(;;){let d=o.advance();if(d)return d}}}class A1{constructor(l){this.string=l}get length(){return this.string.length}chunk(l){return this.string.slice(l)}get lineChunks(){return!1}read(l,r){return this.string.slice(l,r)}}function jN(s){return(l,r,c,o)=>new R1(l,s,r,c,o)}class rx{constructor(l,r,c,o,d,h){this.parser=l,this.parse=r,this.overlay=c,this.bracketed=o,this.target=d,this.from=h}}function cx(s){if(!s.length||s.some(l=>l.from>=l.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(s))}class M1{constructor(l,r,c,o,d,h,m,g){this.parser=l,this.predicate=r,this.mounts=c,this.index=o,this.start=d,this.bracketed=h,this.target=m,this.prev=g,this.depth=0,this.ranges=[]}}const up=new Wt({perNode:!0});class R1{constructor(l,r,c,o,d){this.nest=r,this.input=c,this.fragments=o,this.ranges=d,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=l}advance(){if(this.baseParse){let c=this.baseParse.advance();if(!c)return null;if(this.baseParse=null,this.baseTree=c,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let c=this.baseTree;return this.stoppedAt!=null&&(c=new Ul(c.type,c.children,c.positions,c.length,c.propValues.concat([[up,this.stoppedAt]]))),c}let l=this.inner[this.innerDone],r=l.parse.advance();if(r){this.innerDone++;let c=Object.assign(Object.create(null),l.target.props);c[Wt.mounted.id]=new cc(r,l.overlay,l.parser,l.bracketed),l.target.props=c}return null}get parsedPos(){if(this.baseParse)return 0;let l=this.input.length;for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].from<l&&(l=Math.min(l,this.inner[r].parse.parsedPos));return l}stopAt(l){if(this.stoppedAt=l,this.baseParse)this.baseParse.stopAt(l);else for(let r=this.innerDone;r<this.inner.length;r++)this.inner[r].parse.stopAt(l)}startInner(){let l=new L1(this.fragments),r=null,c=null,o=new Uf(new ol(this.baseTree,this.ranges[0].from,0,null),Ft.IncludeAnonymous|Ft.IgnoreMounts);e:for(let d,h;;){let m=!0,g;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)m=!1;else if(l.hasNode(o)){if(r){let x=r.mounts.find(_=>_.frag.from<=o.from&&_.frag.to>=o.to&&_.mount.overlay);if(x)for(let _ of x.mount.overlay){let S=_.from+x.pos,v=_.to+x.pos;S>=o.from&&v<=o.to&&!r.ranges.some(E=>E.from<v&&E.to>S)&&r.ranges.push({from:S,to:v})}}m=!1}else if(c&&(h=D1(c.ranges,o.from,o.to)))m=h!=2;else if(!o.type.isAnonymous&&(d=this.nest(o,this.input))&&(o.from<o.to||!d.overlay)){o.tree||(O1(o),r&&r.depth++,c&&c.depth++);let x=l.findMounts(o.from,d.parser);if(typeof d.overlay=="function")r=new M1(d.parser,d.overlay,x,this.inner.length,o.from,!!d.bracketed,o.tree,r);else{let _=fx(this.ranges,d.overlay||(o.from<o.to?[new ds(o.from,o.to)]:[]));_.length&&cx(_),(_.length||!d.overlay)&&this.inner.push(new rx(d.parser,_.length?d.parser.startParse(this.input,dx(x,_),_):d.parser.startParse(""),d.overlay?d.overlay.map(S=>new ds(S.from-o.from,S.to-o.from)):null,!!d.bracketed,o.tree,_.length?_[0].from:o.from)),d.overlay?_.length&&(c={ranges:_,depth:0,prev:c}):m=!1}}else if(r&&(g=r.predicate(o))&&(g===!0&&(g=new ds(o.from,o.to)),g.from<g.to)){let x=r.ranges.length-1;x>=0&&r.ranges[x].to==g.from?r.ranges[x]={from:r.ranges[x].from,to:g.to}:r.ranges.push(g)}if(m&&o.firstChild())r&&r.depth++,c&&c.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(r&&!--r.depth){let x=fx(this.ranges,r.ranges);x.length&&(cx(x),this.inner.splice(r.index,0,new rx(r.parser,r.parser.startParse(this.input,dx(r.mounts,x),x),r.ranges.map(_=>new ds(_.from-r.start,_.to-r.start)),r.bracketed,r.target,x[0].from))),r=r.prev}c&&!--c.depth&&(c=c.prev)}}}}function D1(s,l,r){for(let c of s){if(c.from>=r)break;if(c.to>l)return c.from<=l&&c.to>=r?2:1}return 0}function ox(s,l,r,c,o,d){if(l<r){let h=s.buffer[l+1];c.push(s.slice(l,r,h)),o.push(h-d)}}function O1(s){let{node:l}=s,r=[],c=l.context.buffer;do r.push(s.index),s.parent();while(!s.tree);let o=s.tree,d=o.children.indexOf(c),h=o.children[d],m=h.buffer,g=[d];function x(_,S,v,E,T,C){let L=r[C],X=[],J=[];ox(h,_,L,X,J,E);let G=m[L+1],O=m[L+2];g.push(X.length);let Z=C?x(L+4,m[L+3],h.set.types[m[L]],G,O-G,C-1):l.toTree();return X.push(Z),J.push(G-E),ox(h,m[L+3],S,X,J,E),new Ul(v,X,J,T)}o.children[d]=x(0,m.length,Rs.none,0,h.length,r.length-1);for(let _ of g){let S=s.tree.children[_],v=s.tree.positions[_];s.yield(new ol(S,v+s.from,_,s._tree))}}class ux{constructor(l,r){this.offset=r,this.done=!1,this.cursor=l.cursor(Ft.IncludeAnonymous|Ft.IgnoreMounts)}moveTo(l){let{cursor:r}=this,c=l-this.offset;for(;!this.done&&r.from<c;)if(!(r.to>=l&&r.enter(c,1,Ft.IgnoreOverlays|Ft.ExcludeBuffers)))if(r.to<=l)r.next(!1)||(this.done=!0);else break}hasNode(l){if(this.moveTo(l.from),!this.done&&this.cursor.from+this.offset==l.from&&this.cursor.tree)for(let r=this.cursor.tree;;){if(r==l.tree)return!0;if(r.children.length&&r.positions[0]==0&&r.children[0]instanceof Ul)r=r.children[0];else break}return!1}}class L1{constructor(l){var r;if(this.fragments=l,this.curTo=0,this.fragI=0,l.length){let c=this.curFrag=l[0];this.curTo=(r=c.tree.prop(up))!==null&&r!==void 0?r:c.to,this.inner=new ux(c.tree,-c.offset)}else this.curFrag=this.inner=null}hasNode(l){for(;this.curFrag&&l.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=l.from&&this.curTo>=l.to&&this.inner.hasNode(l)}nextFrag(){var l;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let r=this.curFrag=this.fragments[this.fragI];this.curTo=(l=r.tree.prop(up))!==null&&l!==void 0?l:r.to,this.inner=new ux(r.tree,-r.offset)}}findMounts(l,r){var c;let o=[];if(this.inner){this.inner.cursor.moveTo(l,1);for(let d=this.inner.cursor.node;d;d=d.parent){let h=(c=d.tree)===null||c===void 0?void 0:c.prop(Wt.mounted);if(h&&h.parser==r)for(let m=this.fragI;m<this.fragments.length;m++){let g=this.fragments[m];if(g.from>=d.to)break;g.tree==this.curFrag.tree&&o.push({frag:g,pos:d.from-g.offset,mount:h})}}}return o}}function fx(s,l){let r=null,c=l;for(let o=1,d=0;o<s.length;o++){let h=s[o-1].to,m=s[o].from;for(;d<c.length;d++){let g=c[d];if(g.from>=m)break;g.to<=h||(r||(c=r=l.slice()),g.from<h?(r[d]=new ds(g.from,h),g.to>m&&r.splice(d+1,0,new ds(m,g.to))):g.to>m?r[d--]=new ds(m,g.to):r.splice(d--,1))}}return c}function z1(s,l,r,c){let o=0,d=0,h=!1,m=!1,g=-1e9,x=[];for(;;){let _=o==s.length?1e9:h?s[o].to:s[o].from,S=d==l.length?1e9:m?l[d].to:l[d].from;if(h!=m){let v=Math.max(g,r),E=Math.min(_,S,c);v<E&&x.push(new ds(v,E))}if(g=Math.min(_,S),g==1e9)break;_==g&&(h?(h=!1,o++):h=!0),S==g&&(m?(m=!1,d++):m=!0)}return x}function dx(s,l){let r=[];for(let{pos:c,mount:o,frag:d}of s){let h=c+(o.overlay?o.overlay[0].from:0),m=h+o.tree.length,g=Math.max(d.from,h),x=Math.min(d.to,m);if(o.overlay){let _=o.overlay.map(v=>new ds(v.from+c,v.to+c)),S=z1(l,_,g,x);for(let v=0,E=g;;v++){let T=v==S.length,C=T?x:S[v].from;if(C>E&&r.push(new Io(E,C,o.tree,-h,d.from>=E||d.openStart,d.to<=C||d.openEnd)),T)break;E=S[v].to}}else r.push(new Io(g,x,o.tree,-h,d.from>=h||d.openStart,d.to<=m||d.openEnd))}return r}let U1=0;class fs{constructor(l,r,c,o){this.name=l,this.set=r,this.base=c,this.modified=o,this.id=U1++}toString(){let{name:l}=this;for(let r of this.modified)r.name&&(l=`${r.name}(${l})`);return l}static define(l,r){let c=typeof l=="string"?l:"?";if(l instanceof fs&&(r=l),r!=null&&r.base)throw new Error("Can not derive from a modified tag");let o=new fs(c,[],null,[]);if(o.set.push(o),r)for(let d of r.set)o.set.push(d);return o}static defineModifier(l){let r=new Hf(l);return c=>c.modified.indexOf(r)>-1?c:Hf.get(c.base||c,c.modified.concat(r).sort((o,d)=>o.id-d.id))}}let H1=0;class Hf{constructor(l){this.name=l,this.instances=[],this.id=H1++}static get(l,r){if(!r.length)return l;let c=r[0].instances.find(m=>m.base==l&&B1(r,m.modified));if(c)return c;let o=[],d=new fs(l.name,o,l,r);for(let m of r)m.instances.push(d);let h=I1(r);for(let m of l.set)if(!m.modified.length)for(let g of h)o.push(Hf.get(m,g));return d}}function B1(s,l){return s.length==l.length&&s.every((r,c)=>r==l[c])}function I1(s){let l=[[]];for(let r=0;r<s.length;r++)for(let c=0,o=l.length;c<o;c++)l.push(l[c].concat(s[r]));return l.sort((r,c)=>c.length-r.length)}function SN(s){let l=Object.create(null);for(let r in s){let c=s[r];Array.isArray(c)||(c=[c]);for(let o of r.split(" "))if(o){let d=[],h=2,m=o;for(let S=0;;){if(m=="..."&&S>0&&S+3==o.length){h=1;break}let v=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(m);if(!v)throw new RangeError("Invalid path: "+o);if(d.push(v[0]=="*"?"":v[0][0]=='"'?JSON.parse(v[0]):v[0]),S+=v[0].length,S==o.length)break;let E=o[S++];if(S==o.length&&E=="!"){h=0;break}if(E!="/")throw new RangeError("Invalid path: "+o);m=o.slice(S)}let g=d.length-1,x=d[g];if(!x)throw new RangeError("Invalid path: "+o);let _=new qo(c,h,g>0?d.slice(0,g):null);l[x]=_.sort(l[x])}}return My.add(l)}const My=new Wt({combine(s,l){let r,c,o;for(;s||l;){if(!s||l&&s.depth>=l.depth?(o=l,l=l.next):(o=s,s=s.next),r&&r.mode==o.mode&&!o.context&&!r.context)continue;let d=new qo(o.tags,o.mode,o.context);r?r.next=d:c=d,r=d}return c}});class qo{constructor(l,r,c,o){this.tags=l,this.mode=r,this.context=c,this.next=o}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(l){return!l||l.depth<this.depth?(this.next=l,this):(l.next=this.sort(l.next),l)}get depth(){return this.context?this.context.length:0}}qo.empty=new qo([],2,null);function Ry(s,l){let r=Object.create(null);for(let d of s)if(!Array.isArray(d.tag))r[d.tag.id]=d.class;else for(let h of d.tag)r[h.id]=d.class;let{scope:c,all:o=null}=l||{};return{style:d=>{let h=o;for(let m of d)for(let g of m.set){let x=r[g.id];if(x){h=h?h+" "+x:x;break}}return h},scope:c}}function q1(s,l){let r=null;for(let c of s){let o=c.style(l);o&&(r=r?r+" "+o:o)}return r}function G1(s,l,r,c=0,o=s.length){let d=new X1(c,Array.isArray(l)?l:[l],r);d.highlightRange(s.cursor(),c,o,"",d.highlighters),d.flush(o)}function Y1(s,l,r,c,o,d=0,h=s.length){let m=d;function g(x,_){if(!(x<=m)){for(let S=s.slice(m,x),v=0;;){let E=S.indexOf(`
117
+ `,v),T=E<0?S.length:E;if(T>v&&c(S.slice(v,T),_),E<0)break;o(),v=E+1}m=x}}G1(l,r,(x,_,S)=>{g(x,""),g(_,S)},d,h),g(h,"")}class X1{constructor(l,r,c){this.at=l,this.highlighters=r,this.span=c,this.class=""}startSpan(l,r){r!=this.class&&(this.flush(l),l>this.at&&(this.at=l),this.class=r)}flush(l){l>this.at&&this.class&&this.span(this.at,l,this.class)}highlightRange(l,r,c,o,d){let{type:h,from:m,to:g}=l;if(m>=c||g<=r)return;h.isTop&&(d=this.highlighters.filter(E=>!E.scope||E.scope(h)));let x=o,_=V1(l)||qo.empty,S=q1(d,_.tags);if(S&&(x&&(x+=" "),x+=S,_.mode==1&&(o+=(o?" ":"")+S)),this.startSpan(Math.max(r,m),x),_.opaque)return;let v=l.tree&&l.tree.prop(Wt.mounted);if(v&&v.overlay){let E=l.node.enter(v.overlay[0].from+m,1),T=this.highlighters.filter(L=>!L.scope||L.scope(v.tree.type)),C=l.firstChild();for(let L=0,X=m;;L++){let J=L<v.overlay.length?v.overlay[L]:null,G=J?J.from+m:g,O=Math.max(r,X),Z=Math.min(c,G);if(O<Z&&C)for(;l.from<Z&&(this.highlightRange(l,O,Z,o,d),this.startSpan(Math.min(Z,l.to),x),!(l.to>=G||!l.nextSibling())););if(!J||G>c)break;X=J.to+m,X>r&&(this.highlightRange(E.cursor(),Math.max(r,J.from+m),Math.min(c,X),"",T),this.startSpan(Math.min(c,X),x))}C&&l.parent()}else if(l.firstChild()){v&&(o="");do if(!(l.to<=r)){if(l.from>=c)break;this.highlightRange(l,r,c,o,d),this.startSpan(Math.min(c,l.to),x)}while(l.nextSibling());l.parent()}}}function V1(s){let l=s.type.prop(My);for(;l&&l.context&&!s.matchContext(l.context);)l=l.next;return l||null}const Se=fs.define,df=Se(),Ni=Se(),hx=Se(Ni),px=Se(Ni),Ti=Se(),hf=Se(Ti),Yh=Se(Ti),ta=Se(),Pi=Se(ta),Fs=Se(),Js=Se(),fp=Se(),Ao=Se(fp),pf=Se(),Ee={comment:df,lineComment:Se(df),blockComment:Se(df),docComment:Se(df),name:Ni,variableName:Se(Ni),typeName:hx,tagName:Se(hx),propertyName:px,attributeName:Se(px),className:Se(Ni),labelName:Se(Ni),namespace:Se(Ni),macroName:Se(Ni),literal:Ti,string:hf,docString:Se(hf),character:Se(hf),attributeValue:Se(hf),number:Yh,integer:Se(Yh),float:Se(Yh),bool:Se(Ti),regexp:Se(Ti),escape:Se(Ti),color:Se(Ti),url:Se(Ti),keyword:Fs,self:Se(Fs),null:Se(Fs),atom:Se(Fs),unit:Se(Fs),modifier:Se(Fs),operatorKeyword:Se(Fs),controlKeyword:Se(Fs),definitionKeyword:Se(Fs),moduleKeyword:Se(Fs),operator:Js,derefOperator:Se(Js),arithmeticOperator:Se(Js),logicOperator:Se(Js),bitwiseOperator:Se(Js),compareOperator:Se(Js),updateOperator:Se(Js),definitionOperator:Se(Js),typeOperator:Se(Js),controlOperator:Se(Js),punctuation:fp,separator:Se(fp),bracket:Ao,angleBracket:Se(Ao),squareBracket:Se(Ao),paren:Se(Ao),brace:Se(Ao),content:ta,heading:Pi,heading1:Se(Pi),heading2:Se(Pi),heading3:Se(Pi),heading4:Se(Pi),heading5:Se(Pi),heading6:Se(Pi),contentSeparator:Se(ta),list:Se(ta),quote:Se(ta),emphasis:Se(ta),strong:Se(ta),link:Se(ta),monospace:Se(ta),strikethrough:Se(ta),inserted:Se(),deleted:Se(),changed:Se(),invalid:Se(),meta:pf,documentMeta:Se(pf),annotation:Se(pf),processingInstruction:Se(pf),definition:fs.defineModifier("definition"),constant:fs.defineModifier("constant"),function:fs.defineModifier("function"),standard:fs.defineModifier("standard"),local:fs.defineModifier("local"),special:fs.defineModifier("special")};for(let s in Ee){let l=Ee[s];l instanceof fs&&(l.name=s)}Ry([{tag:Ee.link,class:"tok-link"},{tag:Ee.heading,class:"tok-heading"},{tag:Ee.emphasis,class:"tok-emphasis"},{tag:Ee.strong,class:"tok-strong"},{tag:Ee.keyword,class:"tok-keyword"},{tag:Ee.atom,class:"tok-atom"},{tag:Ee.bool,class:"tok-bool"},{tag:Ee.url,class:"tok-url"},{tag:Ee.labelName,class:"tok-labelName"},{tag:Ee.inserted,class:"tok-inserted"},{tag:Ee.deleted,class:"tok-deleted"},{tag:Ee.literal,class:"tok-literal"},{tag:Ee.string,class:"tok-string"},{tag:Ee.number,class:"tok-number"},{tag:[Ee.regexp,Ee.escape,Ee.special(Ee.string)],class:"tok-string2"},{tag:Ee.variableName,class:"tok-variableName"},{tag:Ee.local(Ee.variableName),class:"tok-variableName tok-local"},{tag:Ee.definition(Ee.variableName),class:"tok-variableName tok-definition"},{tag:Ee.special(Ee.variableName),class:"tok-variableName2"},{tag:Ee.definition(Ee.propertyName),class:"tok-propertyName tok-definition"},{tag:Ee.typeName,class:"tok-typeName"},{tag:Ee.namespace,class:"tok-namespace"},{tag:Ee.className,class:"tok-className"},{tag:Ee.macroName,class:"tok-macroName"},{tag:Ee.propertyName,class:"tok-propertyName"},{tag:Ee.operator,class:"tok-operator"},{tag:Ee.comment,class:"tok-comment"},{tag:Ee.meta,class:"tok-meta"},{tag:Ee.invalid,class:"tok-invalid"},{tag:Ee.punctuation,class:"tok-punctuation"}]);const $1="modulepreload",Q1=function(s,l){return new URL(s,l).href},mx={},Ke=function(l,r,c){let o=Promise.resolve();if(r&&r.length>0){let h=function(_){return Promise.all(_.map(S=>Promise.resolve(S).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const m=document.getElementsByTagName("link"),g=document.querySelector("meta[property=csp-nonce]"),x=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));o=h(r.map(_=>{if(_=Q1(_,c),_ in mx)return;mx[_]=!0;const S=_.endsWith(".css"),v=S?'[rel="stylesheet"]':"";if(!!c)for(let C=m.length-1;C>=0;C--){const L=m[C];if(L.href===_&&(!S||L.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${_}"]${v}`))return;const T=document.createElement("link");if(T.rel=S?"stylesheet":$1,S||(T.as="script"),T.crossOrigin="",T.href=_,x&&T.setAttribute("nonce",x),document.head.appendChild(T),S)return new Promise((C,L)=>{T.addEventListener("load",C),T.addEventListener("error",()=>L(new Error(`Unable to preload CSS for ${_}`)))})}))}function d(h){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=h,window.dispatchEvent(m),!m.defaultPrevented)throw h}return o.then(h=>{for(const m of h||[])m.status==="rejected"&&d(m.reason);return l().catch(d)})},Dy={js:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),cjs:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),mjs:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),jsx:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),ts:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),mts:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),cts:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),tsx:async()=>(await Ke(async()=>{const{javascript:s}=await import("./index-CanbdA5V.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0,jsx:!0}),json:async()=>(await Ke(async()=>{const{json:s}=await import("./index-0iOvZWuA.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),jsonc:async()=>(await Ke(async()=>{const{json:s}=await import("./index-0iOvZWuA.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),css:async()=>(await Ke(async()=>{const{css:s}=await import("./index-Bg6okyOc.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),scss:async()=>(await Ke(async()=>{const{css:s}=await import("./index-Bg6okyOc.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),less:async()=>(await Ke(async()=>{const{css:s}=await import("./index-Bg6okyOc.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),html:async()=>(await Ke(async()=>{const{html:s}=await import("./index-SxQ8qp4S.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),htm:async()=>(await Ke(async()=>{const{html:s}=await import("./index-SxQ8qp4S.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),vue:async()=>(await Ke(async()=>{const{html:s}=await import("./index-SxQ8qp4S.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),svelte:async()=>(await Ke(async()=>{const{html:s}=await import("./index-SxQ8qp4S.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),md:async()=>(await Ke(async()=>{const{markdown:s}=await import("./index-DMpA08Ie.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),markdown:async()=>(await Ke(async()=>{const{markdown:s}=await import("./index-DMpA08Ie.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),py:async()=>(await Ke(async()=>{const{python:s}=await import("./index-LHO2W5bU.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),pyi:async()=>(await Ke(async()=>{const{python:s}=await import("./index-LHO2W5bU.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),yaml:async()=>(await Ke(async()=>{const{yaml:s}=await import("./index-ZEjcSNDk.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),yml:async()=>(await Ke(async()=>{const{yaml:s}=await import("./index-ZEjcSNDk.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),rs:async()=>(await Ke(async()=>{const{rust:s}=await import("./index-CB6_9alP.js");return{rust:s}},__vite__mapDeps([12,1,2,3,4]),import.meta.url)).rust(),c:async()=>(await Ke(async()=>{const{cpp:s}=await import("./index-CrC2iAsw.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),h:async()=>(await Ke(async()=>{const{cpp:s}=await import("./index-CrC2iAsw.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cc:async()=>(await Ke(async()=>{const{cpp:s}=await import("./index-CrC2iAsw.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cpp:async()=>(await Ke(async()=>{const{cpp:s}=await import("./index-CrC2iAsw.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),hpp:async()=>(await Ke(async()=>{const{cpp:s}=await import("./index-CrC2iAsw.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),java:async()=>(await Ke(async()=>{const{java:s}=await import("./index-Bpw3TKRV.js");return{java:s}},__vite__mapDeps([14,1,2,3,4]),import.meta.url)).java(),go:async()=>(await Ke(async()=>{const{go:s}=await import("./index-CRyJJS40.js");return{go:s}},__vite__mapDeps([15,1,2,3,4,5]),import.meta.url)).go(),php:async()=>(await Ke(async()=>{const{php:s}=await import("./index-CTrrHYKx.js");return{php:s}},__vite__mapDeps([16,1,8,7,2,3,4,0,5]),import.meta.url)).php(),sql:async()=>(await Ke(async()=>{const{sql:s}=await import("./index-B96oAtZO.js");return{sql:s}},__vite__mapDeps([17,2,3,4,1,5]),import.meta.url)).sql(),xml:async()=>(await Ke(async()=>{const{xml:s}=await import("./index-CM3XoNnk.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml(),svg:async()=>(await Ke(async()=>{const{xml:s}=await import("./index-CM3XoNnk.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml()},K1={".mcp.json":"json",dockerfile:"yaml",makefile:"yaml"},Z1={javascript:"js",node:"js",typescript:"ts",python:"py",python3:"py",yml:"yaml",rust:"rs",golang:"go","c++":"cpp",cplusplus:"cpp"};async function F1(s){const l=Z1[s.toLowerCase()]??s.toLowerCase(),r=Dy[l];return r?r().catch(()=>null):null}async function J1(s){const l=(s.split("/").pop()??"").toLowerCase(),r=K1[l]??l.split(".").pop()??"",c=Dy[r];return c?c().catch(()=>null):null}const W1=Ry([{tag:[Ee.keyword,Ee.modifier,Ee.controlKeyword,Ee.moduleKeyword],class:"cmh-key"},{tag:[Ee.propertyName],class:"cmh-prop"},{tag:[Ee.function(Ee.variableName),Ee.labelName],class:"cmh-fn"},{tag:[Ee.color,Ee.constant(Ee.name),Ee.standard(Ee.name),Ee.bool],class:"cmh-const"},{tag:[Ee.typeName,Ee.className,Ee.changed,Ee.annotation,Ee.self,Ee.namespace],class:"cmh-type"},{tag:[Ee.number,Ee.integer,Ee.float],class:"cmh-num"},{tag:[Ee.string,Ee.special(Ee.string),Ee.regexp],class:"cmh-str"},{tag:[Ee.operator,Ee.operatorKeyword,Ee.escape],class:"cmh-op"},{tag:[Ee.meta,Ee.comment],class:"cmh-comment"},{tag:Ee.invalid,class:"cmh-invalid"}]);function mf(s){return s.replace(/[&<>]/g,l=>l==="&"?"&amp;":l==="<"?"&lt;":"&gt;")}async function P1(s,l){const r=l?await F1(l):null;if(!r)return mf(s);try{const c=r.language.parser.parse(s);let o="";return Y1(s,c,W1,(d,h)=>{o+=h?`<span class="${h}">${mf(d)}</span>`:mf(d)},()=>{o+=`
118
+ `}),o}catch{return mf(s)}}jt.setOptions({gfm:!0,breaks:!1});function Oy(s){var r;const l=(r=s.split(".").pop())==null?void 0:r.toLowerCase();return l==="md"||l==="markdown"}async function $f(s){const l=await jt.parse(s,{async:!0,walkTokens:async r=>{if(r.type!=="code")return;const c=r;c.text=await P1(c.text,c.lang??""),c.escaped=!0}});return j1.sanitize(l)}function gx(s,l){return{path:s.path,text:s.content,saved:s.content,eol:s.eol,encoding:s.encoding,mtime:s.mtime,size:s.size,binary:s.binary,tooLarge:s.tooLarge,mediaMime:s.mediaMime,mediaTooLarge:s.mediaTooLarge,stale:!1,revision:l,previewMode:Oy(s.path)}}function Ra(s){return!s.binary&&!s.tooLarge&&s.text!==s.saved}function ej(s){return s.split("/").pop()??s}function ur(s){const l=s.lastIndexOf("/");return l===-1?"":s.slice(0,l)}function Df(s){return s<1024?`${s} Б`:s<1024*1024?`${(s/1024).toFixed(1)} КБ`:`${(s/1024/1024).toFixed(1)} МБ`}function lr({x:s,y:l,items:r,note:c,onClose:o}){const d=y.useRef(null),[h,m]=y.useState({left:s,top:l}),[g,x]=y.useState(()=>{const v=r.findIndex(E=>!E.disabled);return v===-1?0:v});y.useLayoutEffect(()=>{const v=d.current;if(!v)return;const E=v.getBoundingClientRect(),T=8,C=Math.max(T,Math.min(s,window.innerWidth-E.width-T)),L=Math.max(T,Math.min(l,window.innerHeight-E.height-T));m({left:C,top:L})},[s,l]),y.useLayoutEffect(()=>{var v;(v=d.current)==null||v.focus()},[]),y.useLayoutEffect(()=>{function v(T){var C;(C=d.current)!=null&&C.contains(T.target)||o()}function E(){o()}return document.addEventListener("mousedown",v),document.addEventListener("scroll",E,!0),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("scroll",E,!0)}},[o]);function _(v){v.disabled||(v.onSelect(),o())}function S(v){if(v.key==="Escape"){v.preventDefault(),v.stopPropagation(),o();return}const E=r.map((T,C)=>({item:T,index:C})).filter(T=>!T.item.disabled);if(E.length!==0){if(v.key==="ArrowDown"||v.key==="ArrowUp"){v.preventDefault();const T=v.key==="ArrowDown"?1:-1,C=E.findIndex(X=>X.index===g),L=E[(((C===-1?0:C)+T)%E.length+E.length)%E.length];L&&x(L.index);return}if(v.key==="Enter"||v.key===" "){v.preventDefault();const T=r[g];T&&_(T)}}}return i.jsxs("div",{ref:d,className:"ctxmenu",style:{left:h.left,top:h.top},role:"menu",tabIndex:-1,onKeyDown:S,children:[c&&i.jsx("div",{className:"ctxmenu__note",children:c}),r.map((v,E)=>i.jsxs("button",{type:"button",role:"menuitem","aria-disabled":v.disabled,className:"ctxmenu__item"+(E===g?" is-cursor":""),onMouseEnter:()=>x(E),onClick:()=>_(v),children:[i.jsx("span",{className:"ctxmenu__label",children:v.label}),v.hint&&i.jsx("span",{className:"ctxmenu__hint",children:v.hint})]},v.id))]})}const tj=3500,nj=9e3,bx=220;function pr({result:s,onDismiss:l}){const[r,c]=y.useState(s),[o,d]=y.useState(!1);if(y.useEffect(()=>{if(!s){c(null),d(!1);return}if(c(s),d(!1),s.url)return;const m=s.ok?tj:nj,g=setTimeout(()=>d(!0),m),x=setTimeout(()=>c(null),m+bx);return()=>{clearTimeout(g),clearTimeout(x)}},[s]),!r)return null;const h=()=>{d(!0),setTimeout(()=>{c(null),l==null||l()},bx)};return i.jsxs("div",{className:"oplog "+(r.ok?"oplog--ok":"oplog--bad")+(o?" oplog--leaving":"")+(r.url?" oplog--dismissible":""),role:"status","aria-live":r.ok?"polite":"assertive",children:[r.message,r.url&&i.jsxs("a",{className:"oplog__link",href:r.url,target:"_blank",rel:"noreferrer",onClick:m=>m.stopPropagation(),children:[r.url.replace(/^https?:\/\//,"")," ↗"]}),r.url&&l&&i.jsx("button",{type:"button",className:"oplog__dismiss",title:"Закрыть","aria-label":"Закрыть сообщение",onClick:h,children:"✕"})]})}function sa({value:s,className:l,placeholder:r="Название сессии",onCommit:c,onCancel:o}){const[d,h]=y.useState(s),m=y.useRef(null);y.useEffect(()=>{var x;(x=m.current)==null||x.select()},[]);function g(){const x=d.trim();if(!x||x===s)return o();c(x)}return i.jsx("input",{ref:m,className:l?`rename ${l}`:"rename",value:d,autoFocus:!0,spellCheck:!1,placeholder:r,onChange:x=>h(x.target.value),onBlur:g,onKeyDown:x=>{x.stopPropagation(),x.key==="Enter"?(x.preventDefault(),g()):x.key==="Escape"&&(x.preventDefault(),o())}})}function vc({active:s}){return s?i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M2 5h3V2"}),i.jsx("path",{d:"M14 5h-3V2"}),i.jsx("path",{d:"M2 11h3v3"}),i.jsx("path",{d:"M14 11h-3v3"})]}):i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M5 2H2v3"}),i.jsx("path",{d:"M11 2h3v3"}),i.jsx("path",{d:"M2 11v3h3"}),i.jsx("path",{d:"M14 11v3h-3"})]})}const lj=500,er="application/x-ccv-fs-path",sj=200;function aj({open:s,tree:l,expanded:r,activePath:c,dirty:o,gitChanges:d,result:h,searchResult:m,onSearch:g,onReveal:x,onToggle:_,onOpen:S,onCreate:v,onRename:E,onMove:T,onCopy:C,onDelete:L,onRefresh:X,onClose:J,zoomed:G,onToggleZoom:O}){const[Z,M]=y.useState(""),[D,H]=y.useState(null),[ne,he]=y.useState(null),[W,ue]=y.useState(null),[je,Me]=y.useState(null),[Ce,A]=y.useState(null),[ce,z]=y.useState(null),be=Yf("(hover: hover)"),ye=y.useRef(null),N=y.useMemo(()=>cj(d),[d]);function V(le){return!(!W||le===W.path||W.kind==="dir"&&le.startsWith(`${W.path}/`)||le===ur(W.path))}function re(le){return!(!Ce||le===Ce.path||Ce.kind==="dir"&&le.startsWith(`${Ce.path}/`)||Ce.mode==="cut"&&le===ur(Ce.path))}function me(le){A({path:le.path,kind:le.kind,mode:"copy"})}function Ne(le){A({path:le.path,kind:le.kind,mode:"cut"})}function ve(le){!Ce||!re(le)||(le&&!r.has(le)&&_(le),Ce.mode==="cut"?(T(Ce.path,le),A(null)):C(Ce.path,le))}function De(le,ge){const He=le.touches[0];if(!He)return;const B={timer:0,x:He.clientX,y:He.clientY,el:le.currentTarget,fired:!1};B.timer=window.setTimeout(()=>{B.fired=!0,ge(B.x,B.y,B.el)},lj),ye.current=B}function yt(le){const ge=ye.current,He=le.touches[0];!ge||!He||Math.hypot(He.clientX-ge.x,He.clientY-ge.y)>10&&(window.clearTimeout(ge.timer),ye.current=null)}function Xe(le){const ge=ye.current;ge&&(window.clearTimeout(ge.timer),ge.fired&&le.preventDefault())}function Ve(){var le;return(le=ye.current)!=null&&le.fired?(ye.current=null,!0):!1}function $e(le,ge,He,B){M((B==null?void 0:B.path)??""),z({x:le,y:ge,opener:He,entry:B})}function It(){const le=ce==null?void 0:ce.opener;z(null),le!=null&&le.isConnected&&le.focus()}function rt(le){return{onContextMenu:ge=>{ge.preventDefault(),$e(ge.clientX,ge.clientY,ge.currentTarget,le)},onTouchStart:ge=>De(ge,(He,B,P)=>$e(He,B,P,le)),onTouchMove:yt,onTouchEnd:Xe,onTouchCancel:Xe}}function fn(le){le.target===le.currentTarget&&(le.preventDefault(),$e(le.clientX,le.clientY,le.currentTarget,null))}function ft(le){le.target===le.currentTarget&&De(le,(ge,He,B)=>$e(ge,He,B,null))}function dn(le){if(!(le.ctrlKey||le.metaKey)||le.target instanceof HTMLInputElement)return;const ge=le.key.toLowerCase();if(ge==="v"){le.preventDefault(),ve(Dn());return}if(!Z)return;const He=xx(l,Z);He&&(ge==="c"?(le.preventDefault(),me(He)):ge==="x"&&(le.preventDefault(),Ne(He)))}function jn(le){return ge=>{ge.dataTransfer.effectAllowed="move",ge.dataTransfer.setData(er,le.path),ue({path:le.path,kind:le.kind})}}function bn(){ue(null),Me(null)}function Pt(le){return ge=>{ge.dataTransfer.types.includes(er)&&(ge.stopPropagation(),!(le.kind!=="dir"||!V(le.path))&&(ge.preventDefault(),Me(le.path)))}}function tt(le){return ge=>{if(!ge.dataTransfer.types.includes(er)||(ge.stopPropagation(),le.kind!=="dir"||!V(le.path)))return;ge.preventDefault();const He=ge.dataTransfer.getData(er);Me(null),He&&T(He,le.path)}}function et(le){!le.dataTransfer.types.includes(er)||!V("")||(le.preventDefault(),Me(""))}function en(le){if(!le.dataTransfer.types.includes(er)||!V(""))return;le.preventDefault();const ge=le.dataTransfer.getData(er);Me(null),ge&&T(ge,"")}const[Xt,nt]=y.useState(""),St=Xt.trim(),Vt=St.length>0,rn=y.useRef(null),wt=y.useRef(g);wt.current=g;function xn(le){nt(le),rn.current&&clearTimeout(rn.current);const ge=le.trim();if(!ge){wt.current("");return}rn.current=setTimeout(()=>wt.current(ge),sj)}function qt(le){rn.current&&clearTimeout(rn.current),nt(""),wt.current(""),M(le.path),x(le)}const hn=Vt&&(m==null?void 0:m.query)===St?m:null;function Dn(){if(Z==="")return"";const le=xx(l,Z);if((le==null?void 0:le.kind)==="dir")return Z;const ge=Z.lastIndexOf("/");return ge===-1?"":Z.slice(0,ge)}function Gt(le,ge){const He=ge??Dn();He&&!r.has(He)&&_(He),he({parent:He,kind:le})}function ct(){if(!ce)return[];const le=B=>be?B:void 0;if(!ce.entry)return[{id:"paste",label:"Вставить в корень проекта",hint:le("Ctrl+V"),disabled:!re(""),onSelect:()=>ve("")},{id:"new-file",label:"Создать файл",onSelect:()=>Gt("file","")},{id:"new-dir",label:"Создать каталог",onSelect:()=>Gt("dir","")}];const ge=ce.entry,He=[ge.kind==="file"?{id:"open",label:"Открыть",onSelect:()=>S(ge.path)}:{id:"toggle",label:r.has(ge.path)?"Свернуть":"Развернуть",onSelect:()=>_(ge.path)},{id:"copy",label:"Копировать",hint:le("Ctrl+C"),onSelect:()=>me(ge)},{id:"cut",label:"Вырезать",hint:le("Ctrl+X"),onSelect:()=>Ne(ge)}];return ge.kind==="dir"&&(He.push({id:"paste",label:"Вставить",hint:le("Ctrl+V"),disabled:!re(ge.path),onSelect:()=>ve(ge.path)}),He.push({id:"new-file",label:"Создать файл",onSelect:()=>Gt("file",ge.path)}),He.push({id:"new-dir",label:"Создать каталог",onSelect:()=>Gt("dir",ge.path)})),He.push({id:"rename",label:"Переименовать",onSelect:()=>H(ge.path)}),He.push({id:"delete",label:"Удалить",onSelect:()=>L(ge)}),He}const Ct=Vt?[]:Pe("",0);function Pe(le,ge){const He=l[le],B=[];if(ne&&ne.parent===le&&B.push(i.jsxs("div",{className:"fsrow fsrow--draft",style:Da(ge),children:[i.jsx("span",{className:"fsrow__icon",children:ne.kind==="dir"?i.jsx(If,{}):i.jsx(qf,{})}),i.jsx(sa,{className:"rename--file",value:"",placeholder:ne.kind==="dir"?"имя каталога":"имя файла",onCommit:P=>{he(null),v(le,ne.kind,P)},onCancel:()=>he(null)})]},`draft:${le}`)),!He)return B.push(i.jsx("p",{className:"fsrow__pending",style:Da(ge),children:"читаем…"},`wait:${le}`)),B;He.length===0&&!ne&&B.push(i.jsx("p",{className:"fsrow__pending",style:Da(ge),children:"пусто"},`empty:${le}`));for(const P of He){const _e=P.kind==="dir"&&r.has(P.path);B.push(D===P.path?i.jsxs("div",{className:"fsrow fsrow--draft",style:Da(ge),children:[i.jsx("span",{className:"fsrow__icon",children:P.kind==="dir"?i.jsx(If,{open:_e}):i.jsx(qf,{})}),i.jsx(sa,{className:"rename--file",value:P.name,placeholder:"новое имя",onCommit:Ie=>{H(null),E(P.path,Ie)},onCancel:()=>H(null)})]},P.path):i.jsx(ij,{entry:P,depth:ge,open:_e,active:P.path===c,selected:P.path===Z,dirty:o.has(P.path),gitStatus:N.get(P.path),dragging:(W==null?void 0:W.path)===P.path,dropTarget:je===P.path,cut:(Ce==null?void 0:Ce.mode)==="cut"&&Ce.path===P.path,onClick:()=>{Ve()||(M(P.path),P.kind==="dir"?_(P.path):S(P.path))},onRename:()=>H(P.path),onDelete:()=>L(P),onDragStart:jn(P),onDragEnd:bn,onDragOver:Pt(P),onDrop:tt(P),...rt(P)},P.path)),_e&&B.push(...Pe(P.path,ge+1))}return B}function Sl(){if(!hn)return[i.jsx("p",{className:"fsrow__pending",style:Da(0),children:"ищем…"},"search:wait")];if(hn.entries.length===0)return[i.jsx("p",{className:"fsrow__pending",style:Da(0),children:"ничего не найдено"},"search:empty")];const le=hn.entries.map(ge=>i.jsx(rj,{entry:ge,gitStatus:N.get(ge.path),onClick:()=>qt(ge)},ge.path));return hn.truncated&&le.push(i.jsxs("p",{className:"fsrow__pending",style:Da(0),children:["показаны первые ",hn.entries.length," — уточните запрос"]},"search:truncated")),le}return i.jsxs("aside",{className:(s?"sidepane sidepane--files sidepane--open":"sidepane sidepane--files")+(G?" sidepane--zoomed":""),"aria-label":"Файлы проекта",onKeyDown:dn,children:[i.jsxs("div",{className:"sidepane__head",onDoubleClick:le=>{O&&(le.target.closest("button")||O())},children:[i.jsx(dj,{}),i.jsx("span",{className:"sidepane__title",children:"Файлы"}),i.jsx("button",{className:"sidepane__btn",title:"Новый файл","aria-label":"Новый файл",onClick:()=>Gt("file"),children:i.jsx(uj,{})}),i.jsx("button",{className:"sidepane__btn",title:"Новый каталог","aria-label":"Новый каталог",onClick:()=>Gt("dir"),children:i.jsx(fj,{})}),i.jsx("button",{className:"sidepane__btn",title:"Перечитать дерево","aria-label":"Перечитать дерево",onClick:X,children:"↻"}),O&&i.jsx("button",{className:"sidepane__btn",title:G?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":G?"Свернуть панель файлов":"Развернуть панель файлов на весь экран","aria-pressed":G,onClick:O,children:i.jsx(vc,{active:G})}),i.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель файлов",onClick:J,children:"✕"})]}),i.jsxs("div",{className:"fssearch",children:[i.jsx(hj,{}),i.jsx("input",{className:"fssearch__input",type:"text",value:Xt,spellCheck:!1,placeholder:"Поиск файлов и папок…","aria-label":"Поиск файлов и папок",onChange:le=>xn(le.target.value),onKeyDown:le=>{le.stopPropagation(),le.key==="Escape"&&(le.preventDefault(),Xt?xn(""):le.currentTarget.blur())}}),Xt&&i.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>xn(""),children:"✕"})]}),i.jsx("div",{className:"sidepane__scroll fstree"+(je===""?" fstree--drop-target":""),tabIndex:-1,onDragOver:et,onDrop:en,onContextMenu:fn,onTouchStart:ft,onTouchMove:yt,onTouchEnd:Xe,onTouchCancel:Xe,children:Vt?Sl():Ct}),i.jsx(pr,{result:h}),ce&&i.jsx(lr,{x:ce.x,y:ce.y,items:ct(),onClose:It})]})}function ij({entry:s,depth:l,open:r,active:c,selected:o,dirty:d,gitStatus:h,dragging:m,dropTarget:g,cut:x,onClick:_,onRename:S,onDelete:v,onDragStart:E,onDragEnd:T,onDragOver:C,onDrop:L,onContextMenu:X,onTouchStart:J,onTouchMove:G,onTouchEnd:O,onTouchCancel:Z}){const M="fsrow"+(c?" is-open":"")+(o&&!c?" is-selected":"")+(s.ignored?" fsrow--ignored":"")+(m?" fsrow--dragging":"")+(g?" fsrow--drop-target":"")+(x?" fsrow--cut":"");return i.jsxs("div",{className:M,style:Da(l),draggable:!0,onDragStart:E,onDragEnd:T,onDragOver:C,onDrop:L,onContextMenu:X,onTouchStart:J,onTouchMove:G,onTouchEnd:O,onTouchCancel:Z,children:[i.jsxs("button",{className:"fsrow__main",onClick:_,title:Ly(s),children:[i.jsx("span",{className:"fsrow__icon"+Bf("fsrow__icon",h),children:s.kind==="dir"?i.jsx(If,{open:r}):i.jsx(qf,{})}),i.jsx("span",{className:"fsrow__name"+Bf("fsrow__name",h),children:s.name}),s.ignored&&i.jsx("span",{className:"fsrow__tag",title:"Игнорируется git (.gitignore)",children:"git-ignore"}),d&&i.jsx("span",{className:"fsrow__dot",title:"Есть несохранённые правки"})]}),i.jsx("button",{className:"fsrow__act",title:"Переименовать","aria-label":`Переименовать ${s.name}`,onClick:S,children:"✎"}),i.jsx("button",{className:"fsrow__act",title:"Удалить","aria-label":`Удалить ${s.name}`,onClick:v,children:"✕"})]})}function rj({entry:s,gitStatus:l,onClick:r}){const c=s.path.slice(0,s.path.length-s.name.length-1);return i.jsxs("button",{className:"fsrow fsrow--search"+(s.ignored?" fsrow--ignored":""),style:Da(0),onClick:r,title:Ly(s),children:[i.jsx("span",{className:"fsrow__icon"+Bf("fsrow__icon",l),children:s.kind==="dir"?i.jsx(If,{}):i.jsx(qf,{})}),i.jsx("span",{className:"fsrow__name"+Bf("fsrow__name",l),children:s.name}),s.ignored&&i.jsx("span",{className:"fsrow__tag",children:"git-ignore"}),c&&i.jsx("span",{className:"fsrow__path",children:c})]})}function Ly(s){return s.ignored?`${s.path} — игнорируется git (.gitignore)`:s.path}function Da(s){return{"--depth":s}}function xx(s,l){var o;const r=l.lastIndexOf("/"),c=r===-1?"":l.slice(0,r);return((o=s[c])==null?void 0:o.find(d=>d.path===l))??null}function cj(s){const l=new Map,r={added:1,modified:2},c=(o,d)=>{const h=l.get(o);(!h||r[d]>r[h])&&l.set(o,d)};for(const o of s){const d=oj(o.status);if(!d)continue;c(o.path,d);let h=ur(o.path);for(;c(h,d),!!h;)h=ur(h)}return l}function oj(s){if(s==="??")return"added";const[l="",r=""]=s;return l==="A"||l==="R"||l==="C"?"added":l==="M"||r==="M"?"modified":null}function Bf(s,l){return l?` ${s}--git-${l}`:""}function If({open:s=!1}){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:s?i.jsx("path",{d:"M2 12.5V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h4.4a.7.7 0 0 1 .7.7v1.2M2 12.5l1.7-4.6a.7.7 0 0 1 .66-.46h9.2a.5.5 0 0 1 .47.66L12.4 12.5Z"}):i.jsx("path",{d:"M2 12.4V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h5.9a.7.7 0 0 1 .7.7v6.6a.7.7 0 0 1-.7.7H2.7a.7.7 0 0 1-.7-.7Z"})})}function qf(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M9 2H4.4a.7.7 0 0 0-.7.7v10.6a.7.7 0 0 0 .7.7h7.2a.7.7 0 0 0 .7-.7V5.2Z"}),i.jsx("path",{d:"M9 2v3.2h3.3"})]})}function uj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[i.jsxs("g",{transform:"translate(-1.3,-1.6) scale(0.78)",strokeLinejoin:"round",children:[i.jsx("path",{d:"M9 2H4.4a.7.7 0 0 0-.7.7v10.6a.7.7 0 0 0 .7.7h7.2a.7.7 0 0 0 .7-.7V5.2Z"}),i.jsx("path",{d:"M9 2v3.2h3.3"})]}),i.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function fj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[i.jsx("g",{transform:"translate(-1.3,-1.6) scale(0.78)",children:i.jsx("path",{d:"M2 12.4V4.2a.7.7 0 0 1 .7-.7h3.1l1.5 1.6h5.9a.7.7 0 0 1 .7.7v6.6a.7.7 0 0 1-.7.7H2.7a.7.7 0 0 1-.7-.7Z"})}),i.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function dj(){return i.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M2 4.1V3a.6.6 0 0 1 .6-.6h2.6l1.2 1.4h5a.6.6 0 0 1 .6.6v1.1"}),i.jsx("path",{d:"M2 12.6V5.7h11.4a.6.6 0 0 1 .58.75l-1.5 6.2a.6.6 0 0 1-.58.45H2.6a.6.6 0 0 1-.6-.5Z"})]})}function hj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[i.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),i.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}const pj=200;function mj({open:s,result:l,onSearch:r,onOpenMatch:c,onClose:o,zoomed:d,onToggleZoom:h}){const[m,g]=y.useState(""),x=m.trim(),_=x.length>0,S=y.useRef(null),v=y.useRef(r);v.current=r;function E(L){g(L),S.current&&clearTimeout(S.current);const X=L.trim();if(!X){v.current("");return}S.current=setTimeout(()=>v.current(X),pj)}const T=_&&(l==null?void 0:l.query)===x?l:null;function C(){if(!T)return[i.jsx("p",{className:"fsrow__pending",children:"ищем…"},"grep:wait")];if(T.matches.length===0)return[i.jsx("p",{className:"fsrow__pending",children:"ничего не найдено"},"grep:empty")];const L=[];let X="";for(const J of T.matches)J.path!==X&&(X=J.path,L.push(i.jsx("p",{className:"searchgroup__path",title:J.path,children:J.path},`path:${J.path}`))),L.push(i.jsx(gj,{match:J,onClick:()=>c(J)},`${J.path}:${J.line}:${J.column}`));return T.truncated&&L.push(i.jsxs("p",{className:"fsrow__pending",children:["показаны первые ",T.matches.length," — уточните запрос"]},"grep:truncated")),L}return i.jsxs("aside",{className:(s?"sidepane sidepane--search sidepane--open":"sidepane sidepane--search")+(d?" sidepane--zoomed":""),"aria-label":"Поиск по тексту в проекте",children:[i.jsxs("div",{className:"sidepane__head",onDoubleClick:L=>{h&&(L.target.closest("button")||h())},children:[i.jsx(bj,{}),i.jsx("span",{className:"sidepane__title",children:"Поиск по тексту"}),h&&i.jsx("button",{className:"sidepane__btn",title:d?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":d?"Свернуть панель поиска":"Развернуть панель поиска на весь экран","aria-pressed":d,onClick:h,children:i.jsx(vc,{active:d})}),i.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель поиска",onClick:o,children:"✕"})]}),i.jsxs("div",{className:"fssearch",children:[i.jsx(xj,{}),i.jsx("input",{className:"fssearch__input",type:"text",value:m,spellCheck:!1,placeholder:"Поиск по тексту во всех файлах…","aria-label":"Поиск по тексту во всех файлах",onChange:L=>E(L.target.value),onKeyDown:L=>{L.stopPropagation(),L.key==="Escape"&&(L.preventDefault(),m?E(""):L.currentTarget.blur())}}),m&&i.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>E(""),children:"✕"})]}),i.jsx("div",{className:"sidepane__scroll fstree",children:_?C():i.jsx("p",{className:"sidepane__empty",children:"Введите текст, чтобы найти его во всех файлах проекта."})})]})}function gj({match:s,onClick:l}){const r=s.lineText.slice(0,s.column-1),c=s.lineText.slice(s.column-1,s.column-1+s.matchLength),o=s.lineText.slice(s.column-1+s.matchLength);return i.jsxs("button",{className:"searchmatch",onClick:l,title:`${s.path}:${s.line}`,children:[i.jsx("span",{className:"searchmatch__line",children:s.line}),i.jsxs("span",{className:"searchmatch__text",children:[r,i.jsx("mark",{children:c}),o]})]})}function bj(){return i.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"6.8",cy:"6.8",r:"4.3"}),i.jsx("path",{d:"M13.2 13.2 10.1 10.1"})]})}function xj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[i.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),i.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}let gf=null;function yj(){return gf||(gf=Promise.all([Ke(()=>import("./index-D04xl5g2.js"),__vite__mapDeps([19,4,3,2,20,5]),import.meta.url),Ke(()=>import("./index-891wE-Rj.js").then(s=>s.v),__vite__mapDeps([4,3]),import.meta.url),Ke(()=>import("./index-BHot-lnj.js"),[],import.meta.url),Ke(()=>import("./index-DB0qYzJa.js"),__vite__mapDeps([20,3,4,2]),import.meta.url),Ke(()=>import("./codemirror-Dg4vvH8i.js"),__vite__mapDeps([21,2,3,4]),import.meta.url)]).then(([s,l,r,c,o])=>({EditorView:l.EditorView,EditorState:r.EditorState,Compartment:r.Compartment,EditorSelection:r.EditorSelection,Prec:r.Prec,keymap:l.keymap,indentWithTab:c.indentWithTab,basicSetup:s.basicSetup,editorTheme:o.editorTheme,editorHighlight:o.editorHighlight})).catch(s=>{throw gf=null,s})),gf}function _j({path:s,doc:l,revision:r,goto:c,onChange:o,onSave:d}){const h=y.useRef(null),m=y.useRef(null),g=y.useRef(null),x=y.useRef(new Map),_=y.useRef(new Map),S=y.useRef(new Set),v=y.useRef(null),E=y.useRef(o),T=y.useRef(d),C=y.useRef(s),L=y.useRef(r),X=y.useRef(l);E.current=o,T.current=d,C.current=s,L.current=r,X.current=l;const[J,G]=y.useState("loading"),[O,Z]=y.useState(!1);function M(H,ne,he,W,ue){const je=x.current.get(W),Me=_.current.get(W)===ue;if(je&&Me)he.setState(je);else{const A=H.EditorState.create({doc:X.current,extensions:[H.basicSetup,H.Prec.highest(H.keymap.of([{key:"Mod-s",preventDefault:!0,run:()=>(T.current(C.current),!0)}])),H.keymap.of([H.indentWithTab]),ne.of([]),H.editorTheme,H.editorHighlight,H.EditorView.updateListener.of(ce=>{ce.docChanged&&E.current(C.current,ce.state.doc.toString())})]});x.current.set(W,A),_.current.set(W,ue),he.setState(A),S.current.delete(W)}if(S.current.has(W))return()=>{};let Ce=!1;return J1(W).then(A=>{Ce||!A||C.current!==W||(he.dispatch({effects:ne.reconfigure(A)}),x.current.set(W,he.state),S.current.add(W))}),()=>{Ce=!0}}y.useEffect(()=>{if(!h.current)return;let ne=!1,he=null,W=null;G("loading"),Z(!1);const ue=window.setTimeout(()=>{ne||Z(!0)},200);return(async()=>{let je;try{je=await yj()}catch{window.clearTimeout(ue),ne||G("error");return}if(ne||!h.current)return;window.clearTimeout(ue);const Me=new je.Compartment;v.current=Me,g.current=je,W=new je.EditorView({parent:h.current}),m.current=W,he=M(je,Me,W,C.current,L.current),G("ready")})(),()=>{ne=!0,window.clearTimeout(ue),he==null||he(),W==null||W.destroy(),m.current===W&&(m.current=null),g.current=null,v.current=null}},[]),y.useEffect(()=>{const H=g.current,ne=m.current,he=v.current;if(!(!H||!ne||!he))return M(H,he,ne,s,r)},[s,r]);const D=y.useRef(0);return y.useEffect(()=>{const H=m.current,ne=g.current;if(!H||!ne||!c||c.token===D.current)return;D.current=c.token;const he=H.state.doc.lines,W=Math.min(Math.max(c.line,1),he),ue=H.state.doc.line(W),je=Math.min(ue.from+Math.max(c.column-1,0),ue.to);H.dispatch({selection:ne.EditorSelection.cursor(je),effects:ne.EditorView.scrollIntoView(je,{y:"center"})}),H.focus()},[c]),y.useEffect(()=>()=>{const H=m.current;H&&x.current.set(s,H.state)},[s]),i.jsxs("div",{className:"editor__code",children:[i.jsx("div",{ref:h,className:"editor__code-surface"+(J==="ready"?"":" is-hidden")}),J==="loading"&&O&&i.jsxs("div",{className:"editor__state work",role:"status",children:[i.jsxs("div",{className:"work__dots",children:[i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"})]}),i.jsx("span",{className:"work__label",children:"Загружается редактор…"})]}),J==="error"&&i.jsxs("div",{className:"editor__fallback",children:[i.jsxs("div",{className:"editor__fallback-banner",role:"alert",children:[i.jsx("span",{children:"Редактор не загрузился — ниже только просмотр, без сохранения правок."}),i.jsx("button",{className:"btn btn--sm btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]}),i.jsx("pre",{className:"editor__fallback-text",children:l})]})]})}function Ms({value:s,options:l,onChange:r,className:c,title:o,ariaLabel:d,placeholder:h="—"}){const[m,g]=y.useState(!1),[x,_]=y.useState(0),S=y.useRef(null),v=y.useRef(null),E=l.find(L=>L.value===s)??null;y.useEffect(()=>{if(!m)return;const L=l.findIndex(X=>X.value===s);_(L===-1?0:L)},[m]),y.useEffect(()=>{if(!m)return;function L(X){var J;(J=S.current)!=null&&J.contains(X.target)||g(!1)}return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[m]),y.useEffect(()=>{var L,X;m&&((X=(L=v.current)==null?void 0:L.querySelector(".is-cursor"))==null||X.scrollIntoView({block:"nearest"}))},[m,x]),y.useEffect(()=>{if(!m)return;const L=v.current,X=vj(S.current);if(!L||!X)return;const J=L.getBoundingClientRect().bottom-X.getBoundingClientRect().bottom;J>0&&(X.scrollTop+=Math.min(J+8,L.offsetHeight))},[m]);function T(L){g(!1),L.value!==s&&r(L.value)}function C(L){if(L.key==="Escape"){if(!m)return;L.preventDefault(),L.stopPropagation(),g(!1);return}if(L.key==="ArrowDown"||L.key==="ArrowUp"){if(L.preventDefault(),!m)return g(!0);const X=L.key==="ArrowDown"?1:l.length-1;return _(J=>(J+X)%l.length)}if(L.key==="Enter"||L.key===" "){if(L.preventDefault(),!m)return g(!0);const X=l[x];X&&T(X)}}return i.jsxs("div",{ref:S,className:"select"+(m?" select--open":"")+(c?` ${c}`:""),children:[i.jsxs("button",{type:"button",className:"select__trigger",title:o,"aria-label":d??o,"aria-haspopup":"listbox","aria-expanded":m,onClick:()=>g(L=>!L),onKeyDown:C,children:[i.jsx("span",{className:"select__value",children:(E==null?void 0:E.label)??h}),i.jsx(jj,{})]}),m&&i.jsx("div",{ref:v,className:"select__menu",role:"listbox","aria-label":d??o,children:l.map((L,X)=>i.jsxs("button",{type:"button",role:"option","aria-selected":L.value===s,className:"select__option"+(X===x?" is-cursor":"")+(L.value===s?" is-on":""),onMouseEnter:()=>_(X),onClick:()=>T(L),children:[i.jsx("span",{className:"select__check","aria-hidden":"true",children:L.value===s?"✓":""}),i.jsx("span",{className:"select__label",children:L.label}),L.hint&&i.jsx("span",{className:"select__hint",children:L.hint})]},L.value))})]})}function vj(s){let l=(s==null?void 0:s.parentElement)??null;for(;l;){if(l.scrollHeight>l.clientHeight&&getComputedStyle(l).overflowY!=="visible")return l;l=l.parentElement}return null}function jj(){return i.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Sj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"6.6",cy:"6.6",r:"4.3"}),i.jsx("path",{d:"M9.7 9.7 14 14"}),i.jsx("path",{d:"M6.6 4.6v4M4.6 6.6h4"})]})}function wj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"6.6",cy:"6.6",r:"4.3"}),i.jsx("path",{d:"M9.7 9.7 14 14"}),i.jsx("path",{d:"M4.6 6.6h4"})]})}function kj(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),i.jsx("path",{d:"M13 2.5v3.3h-3.3"})]})}function Nj({path:s,mime:l,base64:r,error:c,tooLarge:o,size:d,onRequestMedia:h}){y.useEffect(()=>{!o&&r===void 0&&c===void 0&&h(s)},[]);const m=Tj(r,l);return o?i.jsx("div",{className:"mediaview mediaview--message",children:i.jsxs("p",{className:"mediaview__error",children:["Файл слишком велик для просмотра (",Df(d),"). Лимит — 64 МБ."]})}):c?i.jsxs("div",{className:"mediaview mediaview--message",role:"alert",children:[i.jsx("p",{className:"mediaview__error",children:c}),i.jsx("button",{className:"btn btn--sm btn--primary",onClick:()=>h(s),children:"Повторить"})]}):m?l.startsWith("image/")?i.jsx(Cj,{url:m}):l.startsWith("video/")?i.jsx(Mj,{url:m}):null:i.jsxs("div",{className:"mediaview mediaview--message",role:"status",children:[i.jsx("div",{className:"mediaview__progress",children:i.jsx("div",{className:"mediaview__progress-fill"})}),i.jsx("span",{className:"mediaview__label",children:"Загружается…"})]})}function Tj(s,l){const[r,c]=y.useState(null);return y.useEffect(()=>{if(s===void 0){c(null);return}const o=atob(s),d=new Uint8Array(o.length);for(let m=0;m<o.length;m++)d[m]=o.charCodeAt(m);const h=URL.createObjectURL(new Blob([d],{type:l}));return c(h),()=>URL.revokeObjectURL(h)},[s,l]),r}const ki=1,zy=8,bf=1.25;function Ej(s){return Math.min(zy,Math.max(ki,s))}function Cj({url:s}){const[l,r]=y.useState({scale:ki,x:0,y:0}),[c,o]=y.useState(!1),d=y.useRef(null),h=y.useRef(null);function m(E,T,C){r(L=>{const X=Ej(L.scale*E);if(X===L.scale)return L;if(X<=ki)return{scale:ki,x:0,y:0};const J=(T-L.x)/L.scale,G=(C-L.y)/L.scale;return{scale:X,x:T-X*J,y:C-X*G}})}y.useEffect(()=>{const E=d.current;if(!E)return;function T(C){C.preventDefault();const L=E.getBoundingClientRect(),X=C.clientX-L.left-L.width/2,J=C.clientY-L.top-L.height/2;m(C.deltaY<0?bf:1/bf,X,J)}return E.addEventListener("wheel",T,{passive:!1}),()=>E.removeEventListener("wheel",T)},[]);function g(E){l.scale<=ki||(E.currentTarget.setPointerCapture(E.pointerId),h.current={pointerId:E.pointerId,startX:E.clientX,startY:E.clientY,origX:l.x,origY:l.y},o(!0))}function x(E){const T=h.current;!T||T.pointerId!==E.pointerId||r(C=>({...C,x:T.origX+(E.clientX-T.startX),y:T.origY+(E.clientY-T.startY)}))}function _(){h.current=null,o(!1)}const S=l.scale>ki,v=!S&&l.x===0&&l.y===0;return i.jsxs("div",{className:"mediaview mediaview--image",children:[i.jsx("div",{ref:d,className:"mediaview__stage"+(S?c?" is-dragging":" is-zoomed":""),onPointerDown:g,onPointerMove:x,onPointerUp:_,onPointerCancel:_,children:i.jsx("img",{src:s,alt:"",className:"mediaview__image",draggable:!1,style:{transform:`translate(${l.x}px, ${l.y}px) scale(${l.scale})`}})}),i.jsxs("div",{className:"mediaview__toolbar",children:[i.jsx("button",{className:"btn btn--sm",disabled:l.scale<=ki,title:"Уменьшить","aria-label":"Уменьшить",onClick:()=>m(1/bf,0,0),children:i.jsx(wj,{})}),i.jsxs("span",{className:"mediaview__zoomlabel",children:[Math.round(l.scale*100),"%"]}),i.jsx("button",{className:"btn btn--sm",disabled:l.scale>=zy,title:"Увеличить","aria-label":"Увеличить",onClick:()=>m(bf,0,0),children:i.jsx(Sj,{})}),i.jsx("button",{className:"btn btn--sm",disabled:v,title:"Вписать в окно","aria-label":"Сбросить масштаб — вписать в окно",onClick:()=>r({scale:ki,x:0,y:0}),children:i.jsx(kj,{})})]})]})}const Aj=[{value:"0.5",label:"0.5×"},{value:"0.75",label:"0.75×"},{value:"1",label:"1× — обычная"},{value:"1.25",label:"1.25×"},{value:"1.5",label:"1.5×"},{value:"2",label:"2×"}];function Mj({url:s}){const l=y.useRef(null),[r,c]=y.useState("1");return y.useEffect(()=>{l.current&&(l.current.playbackRate=Number(r))},[r]),i.jsxs("div",{className:"mediaview mediaview--video",children:[i.jsx("video",{ref:l,className:"mediaview__video",src:s,controls:!0}),i.jsxs("div",{className:"mediaview__speedbar",children:[i.jsx("span",{className:"mediaview__speedlabel",children:"Скорость"}),i.jsx(Ms,{className:"mediaview__speedselect",value:r,onChange:c,ariaLabel:"Скорость воспроизведения",options:Aj})]})]})}function Rj({file:s,goto:l,onChange:r,onSave:c,onReload:o,onOverwrite:d,onRequestMedia:h,onTogglePreview:m}){const g=Ra(s),x=Oy(s.path)&&!s.binary&&!s.tooLarge;return i.jsxs("div",{className:"editor",children:[i.jsxs("div",{className:"editor__bar",children:[i.jsx("span",{className:"editor__path",title:s.path,children:s.path}),i.jsxs("span",{className:"editor__meta",children:[Df(s.size),s.eol==="crlf"&&" · CRLF"]}),x&&i.jsxs("div",{className:"editor__viewtoggle",role:"tablist","aria-label":"Режим просмотра",children:[i.jsx("button",{className:"btn btn--sm"+(s.previewMode?" is-on":""),role:"tab","aria-selected":s.previewMode,onClick:()=>!s.previewMode&&m(s.path),children:"Просмотр"}),i.jsx("button",{className:"btn btn--sm"+(s.previewMode?"":" is-on"),role:"tab","aria-selected":!s.previewMode,onClick:()=>s.previewMode&&m(s.path),children:"Код"})]}),i.jsx("button",{className:"btn btn--sm",disabled:!g,title:"Сохранить (Ctrl+S)",onClick:()=>c(s.path),children:g?"Сохранить":"Сохранено"})]}),s.stale&&i.jsxs("div",{className:"editor__warn",children:[i.jsxs("span",{children:["Файл изменился на диске",g?" — а здесь есть несохранённые правки.":"."]}),i.jsx("button",{className:"btn btn--sm",onClick:()=>o(s.path),children:"Взять с диска"}),g&&i.jsx("button",{className:"btn btn--sm btn--danger",onClick:()=>d(s.path),children:"Сохранить поверх"})]}),s.binary&&s.mediaMime?i.jsx(Nj,{path:s.path,mime:s.mediaMime,base64:s.mediaBase64,error:s.mediaError,tooLarge:s.mediaTooLarge,size:s.size,onRequestMedia:h},s.path):s.binary?i.jsxs("p",{className:"editor__empty",children:["Это не текстовый файл — редактировать его здесь нечем. ",Df(s.size)," на диске."]}):s.tooLarge?i.jsxs("p",{className:"editor__empty",children:["Файл слишком велик для редактора (",Df(s.size),"). Такие правит агент, а не браузер."]}):x&&s.previewMode?i.jsx(Dj,{text:s.text}):i.jsx(_j,{path:s.path,doc:s.text,revision:s.revision,goto:l,onChange:r,onSave:c})]})}function Dj({text:s}){const[l,r]=y.useState("");return y.useEffect(()=>{let c=!1;return $f(s).then(o=>{c||r(o)}),()=>{c=!0}},[s]),i.jsx("div",{className:"markdown-preview",dangerouslySetInnerHTML:{__html:l}})}function Oj({files:s,activePath:l,busy:r,onSelect:c,onClose:o,zoomed:d,onToggleZoom:h}){return i.jsxs("div",{className:"worktabs",role:"tablist",onDoubleClick:m=>{h&&(m.target.closest("button")||h())},children:[i.jsxs("button",{className:"worktab"+(l===null?" is-on":""),role:"tab","aria-selected":l===null,onClick:()=>c(null),onDoubleClick:()=>h==null?void 0:h(),children:[i.jsx("span",{className:"worktab__name",children:"Разговор"}),r&&i.jsx("span",{className:"worktab__dot worktab__dot--busy",title:"Агент работает"})]}),s.map(m=>i.jsxs("div",{className:"worktab"+(m.path===l?" is-on":""),role:"tab","aria-selected":m.path===l,onDoubleClick:g=>{h&&(g.target.closest(".worktab__close, .worktab__dot")||h())},children:[i.jsx("button",{className:"worktab__name",title:m.path,onClick:()=>c(m.path),children:ej(m.path)}),Ra(m)?i.jsx("button",{className:"worktab__dot",title:"Не сохранено — закрыть","aria-label":`Закрыть ${m.path}`,onClick:()=>o(m.path)}):i.jsx("button",{className:"worktab__close",title:"Закрыть","aria-label":`Закрыть ${m.path}`,onClick:()=>o(m.path),children:"✕"})]},m.path)),i.jsx("div",{className:"worktabs__spacer"}),h&&i.jsx("button",{className:"worktabs__zoom",title:d?"Свернуть — то же самое, что двойной клик по вкладке":"Развернуть на весь экран — то же самое, что двойной клик по вкладке","aria-label":d?"Свернуть колонку разговора":"Развернуть колонку разговора на весь экран","aria-pressed":d,onClick:h,children:i.jsx(vc,{active:d})})]})}function us(s){return s.claudeSessionId??s.id}function xf(s,l,r,c){if(!l||l.length===0)return s;const o=new Map(l.map((m,g)=>[m,g])),d=[],h=[];for(const m of s)(o.has(r(m))?d:h).push(m);return d.sort((m,g)=>o.get(r(m))-o.get(r(g))),c==="top"?[...h,...d]:[...d,...h]}function yx(s){return s.state!=="closed"}function _x(s){return[...s.filter(yx),...s.filter(l=>!yx(l))]}function yf(s,l,r,c){if(l===r||!s.includes(l)||!s.includes(r))return null;const o=s.filter(m=>m!==l),d=o.indexOf(r)+(c==="after"?1:0),h=[...o.slice(0,d),l,...o.slice(d)];return h.every((m,g)=>m===s[g])?null:h}const Lj=""+new URL("antigravity-logo-DRKQga2U.png",import.meta.url).href;function Uy({className:s}){return i.jsx("img",{src:Lj,alt:"","aria-hidden":"true",className:s,style:{aspectRatio:"200 / 184"}})}const zj=450,Uj=6,_f=[{id:"claude",label:"Claude",hint:"Claude Code — как обычно"},{id:"antigravity",label:"Antigravity",hint:"Google agy, отдельная палитра и права"}];function Hj({disabled:s,onStart:l}){const[r,c]=y.useState(!1),[o,d]=y.useState(0),[h,m]=y.useState({left:0,top:0}),g=y.useRef(null),x=y.useRef(null),_=y.useRef(null);function S(){_.current&&window.clearTimeout(_.current.timer),_.current=null}function v(){S(),d(0),c(!0)}function E(M){var D;c(!1),M&&((D=g.current)==null||D.focus())}function T(M){if(s||M.button!==0)return;const D={timer:0,x:M.clientX,y:M.clientY,fired:!1};D.timer=window.setTimeout(()=>{D.fired=!0,v()},zj),_.current=D}function C(M){const D=_.current;!D||D.fired||Math.hypot(M.clientX-D.x,M.clientY-D.y)>Uj&&S()}function L(){_.current&&!_.current.fired&&S()}function X(M){var D;if((D=_.current)!=null&&D.fired){_.current=null,M.preventDefault();return}s||l("claude")}function J(M){M.preventDefault(),!s&&v()}function G(M){if(s)return;(M.key==="ArrowDown"||M.key==="ArrowUp"||M.key==="Enter"&&M.shiftKey)&&(M.preventDefault(),v())}y.useLayoutEffect(()=>{if(!r)return;const M=g.current,D=x.current;if(!M||!D)return;const H=M.getBoundingClientRect(),ne=D.getBoundingClientRect(),he=8,W=Math.max(he,Math.min(H.right-ne.width,window.innerWidth-ne.width-he));let ue=H.top-ne.height-8;ue<he&&(ue=Math.min(H.bottom+8,window.innerHeight-ne.height-he)),m({left:W,top:ue})},[r]),y.useLayoutEffect(()=>{var M;r&&((M=x.current)==null||M.focus())},[r]),y.useLayoutEffect(()=>{if(!r)return;function M(D){var ne,he;const H=D.target;!((ne=x.current)!=null&&ne.contains(H))&&!((he=g.current)!=null&&he.contains(H))&&E(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[r]);function O(M){E(!1),l(M.id)}function Z(M){if(M.key==="Escape"){M.preventDefault(),M.stopPropagation(),E(!0);return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){M.preventDefault();const D=M.key==="ArrowDown"?1:-1;d(H=>(H+D+_f.length)%_f.length);return}if(M.key==="Enter"||M.key===" "){M.preventDefault();const D=_f[o];D&&O(D);return}M.key==="Tab"&&E(!1)}return i.jsxs("div",{className:"newsession",children:[i.jsxs("button",{ref:g,type:"button",className:"btn btn--primary newsession__btn",disabled:s,title:"Удерживайте, чтобы выбрать агента","aria-haspopup":"menu","aria-expanded":r,onClick:X,onContextMenu:J,onPointerDown:T,onPointerMove:C,onPointerUp:L,onPointerCancel:L,onPointerLeave:L,onKeyDown:G,children:["+ Сессия",i.jsx(Bj,{})]}),r&&i.jsx("div",{ref:x,className:"newsession__menu",style:{left:h.left,top:h.top},role:"menu","aria-label":"Выбрать агента для новой сессии",tabIndex:-1,onKeyDown:Z,children:_f.map((M,D)=>i.jsxs("button",{type:"button",role:"menuitem",className:"newsession__item"+(D===o?" is-cursor":""),onMouseEnter:()=>d(D),onClick:()=>O(M),children:[i.jsx("span",{className:`newsession__mark newsession__mark--${M.id}`,"aria-hidden":"true",children:M.id==="antigravity"?i.jsx(Uy,{className:"newsession__mark-logo"}):i.jsx(Ij,{})}),i.jsxs("span",{className:"newsession__text",children:[i.jsx("span",{className:"newsession__label",children:M.label}),i.jsx("span",{className:"newsession__hint",children:M.hint})]})]},M.id))})]})}function Bj(){return i.jsx("svg",{className:"newsession__caret",viewBox:"0 0 10 6",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M1 1.2 5 5 9 1.2",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ij(){return i.jsx("svg",{viewBox:"0 0 16 16","aria-hidden":"true",children:i.jsx("circle",{cx:"8",cy:"8",r:"6",fill:"var(--accent)"})})}const Hy="ccv:sidebar.collapsed",By="ccv:sidebar.mode",Iy="ccv:sidebar.foldersCollapsed",qj=500,Xh="транскрипт остаётся на диске — сессию можно вернуть из архива в любой момент.";function Gj({open:s,connected:l,status:r,workspaces:c,archivedWorkspaces:o,workspaceFolders:d,sessionFolders:h,pinnedFolders:m,sessions:g,archived:x,pinned:_,live:S,listOrder:v,liveSessionsFirst:E,onReorder:T,activeWorkspaceId:C,activeSessionId:L,onSelectWorkspace:X,onSelectSession:J,onRenameSession:G,onStopSession:O,onPinSessions:Z,onSelectPinned:M,onCloseWorkspaces:D,onRestoreWorkspaces:H,onArchiveSessions:ne,onUnarchiveSessions:he,onCreateFolder:W,onRenameFolder:ue,onDeleteFolder:je,onAssignToFolder:Me,onOpenWorkspace:Ce,onNewSession:A,onOpenExtensions:ce,account:z,onOpenAccount:be,relay:ye,onOpenRelay:N,onOpenSettings:V,themeMode:re,onCycleTheme:me}){var dt;const[Ne,ve]=y.useState(null),[De,yt]=y.useState(null),[Xe,Ve]=y.useState(null),[$e,It]=y.useState(""),[rt,fn]=y.useState(nS),[ft,dn]=y.useState(lS),[jn,bn]=y.useState(sS);function Pt(w){bn(w);try{localStorage.setItem(By,w)}catch{}}const tt=$e.trim().toLowerCase(),et=tt!=="",en=y.useMemo(()=>xf(c,v==null?void 0:v.workspaces,w=>w.id,"bottom"),[c,v]),Xt=y.useMemo(()=>{const w=xf(g,C?v==null?void 0:v.sessions[C]:void 0,us,"top");return E?_x(w):w},[g,v,C,E]),nt=y.useMemo(()=>{const w=xf(_,v==null?void 0:v.pinned,us,"bottom");return E?_x(w):w},[_,v,E]),St=y.useMemo(()=>xf(S,v==null?void 0:v.live,us,"bottom"),[S,v]),Vt=y.useMemo(()=>et?en.filter(w=>w.name.toLowerCase().includes(tt)||w.path.toLowerCase().includes(tt)):en,[en,tt,et]),rn=y.useMemo(()=>et?o.filter(w=>w.name.toLowerCase().includes(tt)||w.path.toLowerCase().includes(tt)):o,[o,tt,et]),wt=y.useMemo(()=>et?Xt.filter(w=>(w.title??"").toLowerCase().includes(tt)):Xt,[Xt,tt,et]),xn=y.useMemo(()=>et?x.filter(w=>(w.title??"").toLowerCase().includes(tt)):x,[x,tt,et]),qt=w=>{var se;return((se=c.find(ke=>ke.id===w))==null?void 0:se.name)??"—"},hn=w=>{var se;return(se=c.find(ke=>ke.id===w))==null?void 0:se.path},Dn=y.useMemo(()=>et?nt.filter(w=>(w.title??"").toLowerCase().includes(tt)||qt(w.workspaceId).toLowerCase().includes(tt)):nt,[nt,c,tt,et]),Gt=y.useMemo(()=>et?St.filter(w=>(w.title??"").toLowerCase().includes(tt)||qt(w.workspaceId).toLowerCase().includes(tt)):St,[St,c,tt,et]),ct=!et;function Ct(w){fn(se=>{const ke=se.includes(w)?se.filter(Je=>Je!==w):[...se,w];try{localStorage.setItem(Hy,JSON.stringify(ke))}catch{}return ke})}const Pe=w=>!rt.includes(w);function Sl(w){dn(se=>{const ke=se.includes(w)?se.filter(Je=>Je!==w):[...se,w];try{localStorage.setItem(Iy,JSON.stringify(ke))}catch{}return ke})}const le=w=>!ft.includes(w),ge=y.useMemo(()=>Mo(Vt,d),[Vt,d]),He=y.useMemo(()=>Mo(rn,d),[rn,d]),B=y.useMemo(()=>Mo(wt,h),[wt,h]),P=y.useMemo(()=>Mo(xn,h),[xn,h]),_e=y.useMemo(()=>Mo(Dn,m,w=>w.pinnedFolderId),[Dn,m]),Ie=y.useMemo(()=>({groups:[],ungrouped:Gt}),[Gt]),Lt=((v==null?void 0:v.workspaces.length)??0)>0,ul=C?(((dt=v==null?void 0:v.sessions[C])==null?void 0:dt.length)??0)>0:!1,On=((v==null?void 0:v.pinned.length)??0)>0,fl=((v==null?void 0:v.live.length)??0)>0,ll=vf({enabled:ct,scope:"workspaces",itemKey:w=>w.id,groups:ge.groups,ungrouped:ge.ungrouped,onReorder:T}),Hl=vf({enabled:ct,scope:"sessions",workspaceId:C??void 0,itemKey:us,groups:B.groups,ungrouped:B.ungrouped,onReorder:T}),hs=vf({enabled:ct,scope:"pinned",itemKey:us,groups:_e.groups,ungrouped:_e.ungrouped,onReorder:T}),dl=vf({enabled:ct,scope:"live",itemKey:us,groups:Ie.groups,ungrouped:Ie.ungrouped,onReorder:T}),sl=$h(Vt),hl=$h(rn),Yt=$h(wt),[$t,wl]=y.useState(null),[kt,Qt]=y.useState(null),[Oe,At]=y.useState(null),[qn,tn]=y.useState(null),[Ln,al]=y.useState(null),Sn=y.useRef(null);function Bl(w,se){const ke=w.touches[0];if(!ke)return;const Je={timer:0,x:ke.clientX,y:ke.clientY,el:w.currentTarget,fired:!1};Je.timer=window.setTimeout(()=>{Je.fired=!0,se(Je.x,Je.y,Je.el)},qj),Sn.current=Je}function il(w){const se=Sn.current,ke=w.touches[0];!se||!ke||Math.hypot(ke.clientX-se.x,ke.clientY-se.y)>10&&(window.clearTimeout(se.timer),Sn.current=null)}function nn(w){const se=Sn.current;se&&(window.clearTimeout(se.timer),se.fired&&w.preventDefault())}function Kt(){var w;return(w=Sn.current)!=null&&w.fired?(Sn.current=null,!0):!1}function cn(){const w=$t==null?void 0:$t.opener;wl(null),w!=null&&w.isConnected&&w.focus()}function Fe(){const w=kt==null?void 0:kt.opener;Qt(null),w!=null&&w.isConnected&&w.focus()}function pl(){const w=Oe==null?void 0:Oe.opener;At(null),w!=null&&w.isConnected&&w.focus()}function Ds(){const w=qn==null?void 0:qn.opener;tn(null),w!=null&&w.isConnected&&w.focus()}function Gn(){const w=Ln==null?void 0:Ln.opener;al(null),w!=null&&w.isConnected&&w.focus()}function Zl(w){return{onContextMenu:se=>{se.preventDefault(),wl({x:se.clientX,y:se.clientY,opener:se.currentTarget,ids:sl.targetsFor(w)})},onTouchStart:se=>Bl(se,(ke,Je,ht)=>wl({x:ke,y:Je,opener:ht,ids:sl.targetsFor(w)})),onTouchMove:il,onTouchEnd:nn,onTouchCancel:nn}}function ps(w){return{onContextMenu:se=>{se.preventDefault(),Qt({x:se.clientX,y:se.clientY,opener:se.currentTarget,ids:hl.targetsFor(w)})},onTouchStart:se=>Bl(se,(ke,Je,ht)=>Qt({x:ke,y:Je,opener:ht,ids:hl.targetsFor(w)})),onTouchMove:il,onTouchEnd:nn,onTouchCancel:nn}}function ms(w){return{onContextMenu:se=>{se.preventDefault(),At({x:se.clientX,y:se.clientY,opener:se.currentTarget,ids:Yt.targetsFor(w)})},onTouchStart:se=>Bl(se,(ke,Je,ht)=>At({x:ke,y:Je,opener:ht,ids:Yt.targetsFor(w)})),onTouchMove:il,onTouchEnd:nn,onTouchCancel:nn}}function pn(w){return{onContextMenu:se=>{se.preventDefault(),tn({x:se.clientX,y:se.clientY,opener:se.currentTarget,ids:[w.id]})},onTouchStart:se=>Bl(se,(ke,Je,ht)=>tn({x:ke,y:Je,opener:ht,ids:[w.id]})),onTouchMove:il,onTouchEnd:nn,onTouchCancel:nn}}function Fl(w){return{onContextMenu:se=>{se.preventDefault(),al({x:se.clientX,y:se.clientY,opener:se.currentTarget,ids:[w.id]})},onTouchStart:se=>Bl(se,(ke,Je,ht)=>al({x:ke,y:Je,opener:ht,ids:[w.id]})),onTouchMove:il,onTouchEnd:nn,onTouchCancel:nn}}const Zn=g.filter(w=>w.state!=="closed").length,zn=$t?Vt.find(w=>w.id===$t.ids[0]):void 0,wn=$t?[{id:"close",label:$t.ids.length>1?`Закрыть проекты (${$t.ids.length})`:"Закрыть проект",onSelect:()=>{D($t.ids),sl.clear()}},...Ro({folders:d,ids:$t.ids,hasFolder:(zn==null?void 0:zn.folderId)!=null,assign:(w,se)=>Me("workspace",w,se),onClear:()=>sl.clear(),onNewFolder:()=>Ve("workspace")}),...$t.ids.length===1&&ct?ll.menuItems($t.ids[0],Lt):[]]:[],zt=$t?"закрытие не удаляет проект: каталог и история сессий остаются на диске — открыть его снова можно кнопкой «+ Проект»."+(C&&$t.ids.includes(C)&&Zn>0?` в нём сейчас незавершённых сессий: ${Zn} — при закрытии они остановятся на хосте.`:""):void 0,Os=kt?rn.find(w=>w.id===kt.ids[0]):void 0,Ri=kt?[{id:"restore",label:kt.ids.length>1?`Вернуть проекты (${kt.ids.length})`:"Вернуть проект",onSelect:()=>{H(kt.ids),hl.clear()}},...Ro({folders:d,ids:kt.ids,hasFolder:(Os==null?void 0:Os.folderId)!=null,assign:(w,se)=>Me("workspace",w,se),onClear:()=>hl.clear(),onNewFolder:()=>Ve("workspace")})]:[],Ls=kt?"каталог и история сессий всё это время оставались на диске — восстановление их не трогает.":void 0,Yn=Oe?wt.find(w=>w.id===Oe.ids[0]):void 0,kl=(Yn==null?void 0:Yn.pinned)!==!0,La=Oe?[...Oe.ids.length===1?[{id:"rename",label:"Переименовать",onSelect:()=>ve(Oe.ids[0])}]:[],{id:"pin",label:kl?Oe.ids.length>1?`Закрепить (${Oe.ids.length})`:"Закрепить":Oe.ids.length>1?`Открепить (${Oe.ids.length})`:"Открепить",onSelect:()=>{Yn&&Z(Yn.workspaceId,Oe.ids,kl),Yt.clear()}},{id:"archive",label:Oe.ids.length>1?`Убрать в архив (${Oe.ids.length})`:"Убрать в архив",onSelect:()=>{ne(C,Oe.ids),Yt.clear()}},...Ro({folders:h,ids:Oe.ids,hasFolder:(Yn==null?void 0:Yn.folderId)!=null,assign:(w,se)=>Me("session",w,se,C),onClear:()=>Yt.clear(),onNewFolder:()=>Ve("session")}),...Oe.ids.length===1&&ct&&Yn?Hl.menuItems(us(Yn),ul):[]]:[],kn=Oe?Xh:void 0,ln=qn?Dn.find(w=>w.id===qn.ids[0]):void 0,Jl=qn?[{id:"rename",label:"Переименовать",onSelect:()=>ve(qn.ids[0])},{id:"unpin",label:"Открепить",onSelect:()=>{ln&&Z(ln.workspaceId,[ln.id],!1)}},{id:"archive",label:"Убрать в архив",onSelect:()=>{ln&&ne(ln.workspaceId,[ln.id])}},...ln&&ln.workspaceId===C?Ro({folders:h,ids:[ln.id],hasFolder:ln.folderId!=null,assign:(w,se)=>Me("session",w,se,ln.workspaceId),onClear:()=>{},onNewFolder:()=>Ve("session")}):[],...$j(ln?Ro({folders:m,ids:[ln.id],hasFolder:ln.pinnedFolderId!=null,assign:(w,se)=>Me("pinned",w,se),onClear:()=>{},onNewFolder:()=>Ve("pinned")}):[]),...ct&&ln?hs.menuItems(us(ln),On):[]]:[],lt=Ln?Gt.find(w=>w.id===Ln.ids[0]):void 0,Xn=Ln?[{id:"stop",label:"Остановить",onSelect:()=>{lt&&O(lt)}},{id:"rename",label:"Переименовать",onSelect:()=>ve(Ln.ids[0])},{id:"pin",label:(lt==null?void 0:lt.pinned)===!0?"Открепить":"Закрепить",onSelect:()=>{lt&&Z(lt.workspaceId,[lt.id],lt.pinned!==!0)}},{id:"archive",label:"Убрать в архив",onSelect:()=>{lt&&ne(lt.workspaceId,[lt.id])}},...ct&&lt?dl.menuItems(us(lt),fl):[]]:[];function pe(w){return i.jsxs("div",{"data-row-key":w.id,className:tc(w.id===C,sl.selected.includes(w.id))+ll.dropClass(w.id),...Zl(w),children:[ct&&i.jsx("button",{type:"button",className:"row__grip",title:"Перетащить, чтобы изменить порядок","aria-label":"Перетащить проект, чтобы изменить порядок в списке",...ll.gripHandlers(w.id),children:i.jsx(jf,{})}),i.jsxs("button",{className:"row__main",onClick:se=>{Kt()||sl.click(se,w,()=>X(w.id))},onKeyDown:se=>ll.onKeyDown(w.id,se),children:[i.jsxs("span",{className:"row__title",children:[w.name,w.hasClaudeMd&&" ·"]}),i.jsx("span",{className:"row__meta",title:w.path,children:w.path})]})]},w.id)}function k(w){return i.jsxs("div",{className:tc(w.id===C,hl.selected.includes(w.id)),...ps(w),children:[i.jsxs("button",{className:"row__main",onClick:se=>{Kt()||hl.click(se,w,()=>X(w.id))},children:[i.jsxs("span",{className:"row__title",children:[w.name,w.hasClaudeMd&&" ·"]}),i.jsx("span",{className:"row__meta",children:fS(w)})]}),i.jsx("button",{className:"row__restore",title:"Вернуть проект из архива",onClick:()=>H([w.id]),children:"Вернуть"})]},w.id)}function Y(w){const se=us(w);return i.jsx("div",{"data-row-key":se,className:tc(w.id===L,Yt.selected.includes(w.id),w.provider==="antigravity")+Hl.dropClass(se),...Ne===w.id?{}:ms(w),children:Ne===w.id?i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:w.title??"",onCommit:ke=>{G(w,ke),ve(null)},onCancel:()=>ve(null)})}):i.jsxs(i.Fragment,{children:[ct&&i.jsx("button",{type:"button",className:"row__grip",title:"Перетащить, чтобы изменить порядок","aria-label":"Перетащить сессию, чтобы изменить порядок в списке",...Hl.gripHandlers(se),children:i.jsx(jf,{})}),i.jsxs("button",{className:"row__main",onClick:ke=>{Kt()||Yt.click(ke,w,()=>J(w))},onKeyDown:ke=>Hl.onKeyDown(se,ke),children:[i.jsx(Sf,{title:w.title??"Без названия",pinned:w.pinned===!0,provider:w.provider,projectName:qt(w.workspaceId),projectPath:hn(w.workspaceId)}),i.jsx(Qh,{session:w,tail:new Date(w.updatedAt).toLocaleString()})]}),i.jsx("button",{className:"row__edit",title:"Переименовать","aria-label":"Переименовать сессию",onClick:()=>{Kt()||ve(w.id)},children:"✎"})]})},w.id)}function fe(w){return i.jsxs("div",{className:tc(w.id===L,!1,w.provider==="antigravity"),children:[i.jsxs("button",{className:"row__main",onClick:()=>J(w),children:[i.jsx(Sf,{title:w.title??"Без названия",pinned:!1,provider:w.provider,projectName:qt(w.workspaceId),projectPath:hn(w.workspaceId)}),i.jsx("span",{className:"row__meta",children:uS(w)})]}),i.jsx("button",{className:"row__restore",title:"Вернуть сессию из архива",onClick:()=>he([w.id]),children:"Вернуть"})]},w.id)}function we(w){const se=us(w);return i.jsx("div",{"data-row-key":se,className:tc(w.id===L,!1,w.provider==="antigravity")+hs.dropClass(se),...Ne===w.id?{}:{title:"Действия со строкой — правый клик или долгое нажатие",...pn(w)},children:Ne===w.id?i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:w.title??"",onCommit:ke=>{G(w,ke),ve(null)},onCancel:()=>ve(null)})}):i.jsxs(i.Fragment,{children:[ct&&i.jsx("button",{type:"button",className:"row__grip",title:"Перетащить, чтобы изменить порядок","aria-label":"Перетащить сессию, чтобы изменить порядок в списке",...hs.gripHandlers(se),children:i.jsx(jf,{})}),i.jsxs("button",{className:"row__main",onClick:()=>{Kt()||M(w)},onKeyDown:ke=>hs.onKeyDown(se,ke),children:[i.jsx(Sf,{title:w.title??"Без названия",pinned:!1,provider:w.provider,projectName:qt(w.workspaceId),projectPath:hn(w.workspaceId)}),i.jsx(Qh,{session:w,tail:new Date(w.updatedAt).toLocaleString()})]})]})},w.id)}function Ae(w){const se=us(w);return i.jsx("div",{"data-row-key":se,className:tc(w.id===L,!1,w.provider==="antigravity")+dl.dropClass(se),...Ne===w.id?{}:{title:"Действия со строкой — правый клик или долгое нажатие",...Fl(w)},children:Ne===w.id?i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:w.title??"",onCommit:ke=>{G(w,ke),ve(null)},onCancel:()=>ve(null)})}):i.jsxs(i.Fragment,{children:[ct&&i.jsx("button",{type:"button",className:"row__grip",title:"Перетащить, чтобы изменить порядок","aria-label":"Перетащить сессию, чтобы изменить порядок в списке",...dl.gripHandlers(se),children:i.jsx(jf,{})}),i.jsxs("button",{className:"row__main",onClick:()=>{Kt()||M(w)},onKeyDown:ke=>dl.onKeyDown(se,ke),children:[i.jsx(Sf,{title:w.title??"Без названия",pinned:w.pinned===!0,provider:w.provider,projectName:qt(w.workspaceId),projectPath:hn(w.workspaceId)}),i.jsx(Qh,{session:w,tail:new Date(w.updatedAt).toLocaleString()})]}),i.jsx("button",{type:"button",className:"row__stop",title:"Остановить сессию","aria-label":"Остановить сессию",onClick:ke=>{ke.stopPropagation(),!Kt()&&O(w)},children:i.jsx(Wj,{})})]})},w.id)}function ze(w,se){return i.jsx(Jj,{folder:w,count:se,open:le(w.id),renaming:De===w.id,onToggle:()=>Sl(w.id),onStartRename:()=>yt(w.id),onCommitRename:ke=>{ue(w.id,ke),yt(null)},onCancelRename:()=>yt(null),onDelete:()=>je(w.id)},w.id)}return i.jsxs("aside",{className:s?"sidebar sidebar--open":"sidebar",children:[i.jsxs("div",{className:"sidebar__head",children:[i.jsx("span",{className:l?"dot dot--on":"dot",title:r}),i.jsx("span",{className:"brand",children:"Claude Code Visual"}),i.jsx("button",{className:"theme-btn",title:`Тема: ${jx[re]}`,"aria-label":`Тема: ${jx[re]}. Переключить`,onClick:me,children:i.jsx(aS,{mode:re})})]}),i.jsxs("div",{className:"sidebar__tabs",role:"tablist","aria-label":"Что показывать в списке",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":jn==="default",className:jn==="default"?"sidebar__tab is-active":"sidebar__tab",onClick:()=>Pt("default"),children:i.jsx("span",{className:"sidebar__tab-label",children:"Все"})}),i.jsx("button",{type:"button",role:"tab","aria-selected":jn==="pinned",className:jn==="pinned"?"sidebar__tab is-active":"sidebar__tab",onClick:()=>Pt("pinned"),children:i.jsx("span",{className:"sidebar__tab-label",children:"Закреплённые"})}),i.jsxs("button",{type:"button",role:"tab","aria-selected":jn==="live",className:jn==="live"?"sidebar__tab is-active":"sidebar__tab",onClick:()=>Pt("live"),children:[i.jsx("span",{className:"sidebar__tab-label",children:"Запущенные"}),S.length>0&&i.jsx("span",{className:"sidebar__tab-count",children:S.length})]})]}),i.jsxs("div",{className:"fssearch fssearch--sidebar",children:[i.jsx(eS,{}),i.jsx("input",{className:"fssearch__input",type:"text",value:$e,spellCheck:!1,placeholder:"Проект или сессия…","aria-label":"Поиск по проектам и сессиям",onChange:w=>It(w.target.value),onKeyDown:w=>{w.stopPropagation(),w.key==="Escape"&&(w.preventDefault(),$e?It(""):w.currentTarget.blur())}}),$e&&i.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>It(""),children:"✕"})]}),i.jsx("div",{className:"sidebar__scroll",children:jn==="pinned"?i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Закреплённые",count:Dn.length,open:Pe("pinned"),onToggle:()=>Ct("pinned"),action:{label:"Новая папка закреплённых",onClick:()=>{Ve("pinned"),Pe("pinned")||Ct("pinned")}}}),Pe("pinned")&&i.jsxs(i.Fragment,{children:[Xe==="pinned"&&i.jsx("div",{className:"row",children:i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:"",placeholder:"Название папки",onCommit:w=>{W("pinned",w),Ve(null)},onCancel:()=>Ve(null)})})}),Dn.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"закрепите сессию через её меню (правый клик или долгое нажатие) — она останется под рукой из любого проекта"})}),_e.groups.map(w=>i.jsxs(y.Fragment,{children:[ze(w.folder,w.items.length),le(w.folder.id)&&w.items.map(se=>we(se))]},w.folder.id)),_e.ungrouped.map(w=>we(w))]})]}):jn==="live"?i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Запущенные",count:Gt.length,open:Pe("live"),onToggle:()=>Ct("live")}),Pe("live")&&i.jsxs(i.Fragment,{children:[Gt.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"Нет запущенных сессий"})}),Gt.map(w=>Ae(w))]})]}):i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Проекты",count:Vt.length,open:Pe("workspaces"),onToggle:()=>Ct("workspaces"),action:{label:"Новая папка проектов",onClick:()=>{Ve("workspace"),Pe("workspaces")||Ct("workspaces")}}}),Pe("workspaces")&&i.jsxs(i.Fragment,{children:[Xe==="workspace"&&i.jsx("div",{className:"row",children:i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:"",placeholder:"Название папки",onCommit:w=>{W("workspace",w),Ve(null)},onCancel:()=>Ve(null)})})}),Vt.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"Пока ни одного"})}),ge.groups.map(w=>i.jsxs(y.Fragment,{children:[ze(w.folder,w.items.length),le(w.folder.id)&&w.items.map(se=>pe(se))]},w.folder.id)),ge.ungrouped.map(w=>pe(w))]}),o.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Архив проектов",count:rn.length,open:Pe("workspacesArchive"),onToggle:()=>Ct("workspacesArchive"),hint:"проект закрывают вручную; каталог и история сессий остаются на диске и открываются заново отсюда или через «+ Проект»"}),Pe("workspacesArchive")&&i.jsxs(i.Fragment,{children:[rn.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"Пока пусто"})}),He.groups.map(w=>i.jsxs(y.Fragment,{children:[ze(w.folder,w.items.length),le(w.folder.id)&&w.items.map(se=>k(se))]},w.folder.id)),He.ungrouped.map(w=>k(w))]})]}),C&&i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Сессии",count:wt.length,open:Pe("sessions"),onToggle:()=>Ct("sessions"),action:{label:"Новая папка сессий",onClick:()=>{Ve("session"),Pe("sessions")||Ct("sessions")}}}),Pe("sessions")&&i.jsxs(i.Fragment,{children:[Xe==="session"&&i.jsx("div",{className:"row",children:i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:"",placeholder:"Название папки",onCommit:w=>{W("session",w,C),Ve(null)},onCancel:()=>Ve(null)})})}),wt.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"Пока ни одной"})}),B.groups.map(w=>i.jsxs(y.Fragment,{children:[ze(w.folder,w.items.length),le(w.folder.id)&&w.items.map(se=>Y(se))]},w.folder.id)),B.ungrouped.map(w=>Y(w))]}),x.length>0&&i.jsxs(i.Fragment,{children:[i.jsx(nc,{title:"Архив",count:xn.length,open:Pe("archive"),onToggle:()=>Ct("archive"),hint:"сессии без обращения дольше двух суток уезжают сюда сами; ничего не удаляется"}),Pe("archive")&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:"сюда сами уезжают сессии без обращения дольше двух суток; транскрипт остаётся на диске, ничего не удаляется"})}),xn.length===0&&i.jsx("div",{className:"row",children:i.jsx("span",{className:"row__meta",children:et?"Ничего не найдено":"Пока пусто"})}),P.groups.map(w=>i.jsxs(y.Fragment,{children:[ze(w.folder,w.items.length),le(w.folder.id)&&w.items.map(se=>fe(se))]},w.folder.id)),P.ungrouped.map(w=>fe(w))]})]})]})]})}),i.jsxs("div",{className:"sidebar__foot",children:[i.jsxs("button",{className:"account-btn",title:"Аккаунт Claude",onClick:be,children:[i.jsx("span",{className:z!=null&&z.loggedIn?"dot dot--on":"dot"}),i.jsx("span",{className:"account-btn__id",children:z===null?"Аккаунт":z.loggedIn?z.email||"Вход выполнен":"Войти в аккаунт"}),(z==null?void 0:z.plan)&&i.jsx("span",{className:"chip",children:z.plan})]}),N&&i.jsxs("button",{className:"account-btn",title:"Доступ с телефона и из браузера",onClick:N,children:[i.jsx("span",{className:ye!=null&&ye.connected?"dot dot--on":"dot"}),i.jsx("span",{className:"account-btn__id",children:ye===null?"Удалённый доступ":ye.paired?ye.connected?ye.name||"Удалённый доступ включён":"Удалённый доступ · нет связи":"Удалённый доступ"}),(ye==null?void 0:ye.connected)&&ye.clients>0&&i.jsx("span",{className:"chip",children:ye.clients})]}),i.jsxs("div",{className:"sidebar__foot-row",children:[i.jsx("button",{className:"btn btn--ghost",disabled:!ce,title:"MCP-серверы и плагины",onClick:()=>ce==null?void 0:ce(),children:"Расширения"}),i.jsx("button",{className:"btn btn--ghost",title:"Настройки приложения",onClick:V,children:"Настройки"})]}),i.jsxs("div",{className:"sidebar__foot-row",children:[i.jsx("button",{className:"btn btn--ghost",onClick:Ce,children:"+ Проект"}),i.jsx(Hj,{disabled:!C,onStart:A})]})]}),$t&&i.jsx(lr,{x:$t.x,y:$t.y,items:wn,note:zt,onClose:cn}),kt&&i.jsx(lr,{x:kt.x,y:kt.y,items:Ri,note:Ls,onClose:Fe}),Oe&&i.jsx(lr,{x:Oe.x,y:Oe.y,items:La,note:kn,onClose:pl}),qn&&i.jsx(lr,{x:qn.x,y:qn.y,items:Jl,note:Xh,onClose:Ds}),Ln&&i.jsx(lr,{x:Ln.x,y:Ln.y,items:Xn,note:Xh,onClose:Gn})]})}function tc(s,l,r){const c=["row"];return s&&c.push("row--active"),l&&c.push("row--selected"),r&&c.push("row--antigravity"),c.join(" ")}function Mo(s,l,r=c=>c.folderId){const c=new Map(l.map(m=>[m.id,m])),o=new Map,d=[];for(const m of s){const g=r(m),x=g?c.get(g):void 0;if(!x){d.push(m);continue}const _=o.get(x.id);_?_.push(m):o.set(x.id,[m])}return{groups:[...o.entries()].map(([m,g])=>({folder:c.get(m),items:g})).sort((m,g)=>m.folder.name.localeCompare(g.folder.name,"ru")),ungrouped:d}}function Yj(s,l,r){return[...s.flatMap(c=>c.items.map(r)),...l.map(r)]}const Xj="\0ungrouped";function Vj(s,l,r){const c=new Map;for(const o of s)for(const d of o.items)c.set(r(d),o.folder.id);for(const o of l)c.set(r(o),Xj);return c}function Vh(s,l,r,c,o){const d=[...l.map(m=>m.items),r].find(m=>m.some(g=>c(g)===s));if(!d)return null;const h=d.findIndex(m=>c(m)===s);return o==="up"?h<=0?null:{target:c(d[h-1]),position:"before"}:h===-1||h>=d.length-1?null:{target:c(d[h+1]),position:"after"}}function vf(s){const[l,r]=y.useState(null),[c,o]=y.useState(null),d=y.useMemo(()=>Yj(s.groups,s.ungrouped,s.itemKey),[s.groups,s.ungrouped,s.itemKey]),h=y.useMemo(()=>Vj(s.groups,s.ungrouped,s.itemKey),[s.groups,s.ungrouped,s.itemKey]);function m(){r(null),o(null)}function g(X,J){s.enabled&&(J.preventDefault(),J.currentTarget.setPointerCapture(J.pointerId),r(X),o(null))}function x(X,J){var D;if(!l)return;const G=(D=document.elementFromPoint(X,J))==null?void 0:D.closest("[data-row-key]"),O=G==null?void 0:G.dataset.rowKey;if(!O||O===l||h.get(O)!==h.get(l)){o(null);return}const Z=G.getBoundingClientRect(),M=J-Z.top<Z.height/2?"before":"after";o(H=>(H==null?void 0:H.key)===O&&H.position===M?H:{key:O,position:M})}function _(X){x(X.clientX,X.clientY)}function S(){if(l&&c){const X=yf(d,l,c.key,c.position);X&&s.onReorder(s.scope,X,s.workspaceId)}m()}function v(X,J){if(!s.enabled)return;const G=Vh(X,s.groups,s.ungrouped,s.itemKey,J);if(!G)return;const O=yf(d,X,G.target,G.position);O&&s.onReorder(s.scope,O,s.workspaceId)}function E(X,J){const G=Vh(X,s.groups,s.ungrouped,s.itemKey,"up"),O=Vh(X,s.groups,s.ungrouped,s.itemKey,"down"),Z=[{id:"move-up",label:"Переместить выше",disabled:!G,onSelect:()=>{if(!G)return;const M=yf(d,X,G.target,G.position);M&&s.onReorder(s.scope,M,s.workspaceId)}},{id:"move-down",label:"Переместить ниже",disabled:!O,onSelect:()=>{if(!O)return;const M=yf(d,X,O.target,O.position);M&&s.onReorder(s.scope,M,s.workspaceId)}}];return J&&Z.push({id:"reset-order",label:"Сбросить порядок",onSelect:()=>s.onReorder(s.scope,null,s.workspaceId)}),Z}function T(X){return l===X?" row--dragging":(c==null?void 0:c.key)===X?c.position==="before"?" row--drop-before":" row--drop-after":""}function C(X){return{onPointerDown:J=>g(X,J),onPointerMove:_,onPointerUp:S,onPointerCancel:m}}function L(X,J){!J.altKey||J.key!=="ArrowUp"&&J.key!=="ArrowDown"||(J.preventDefault(),v(X,J.key==="ArrowUp"?"up":"down"))}return{dragging:l!==null,dropClass:T,gripHandlers:C,onKeyDown:L,menuItems:E}}function Ro(s){return[...[...s.folders].sort((r,c)=>r.name.localeCompare(c.name,"ru")).map(r=>({id:`folder:${r.id}`,label:`В папку «${r.name}»`,onSelect:()=>{s.ids.forEach(c=>s.assign(c,r.id)),s.onClear()}})),...s.hasFolder?[{id:"folder:none",label:"Без папки",onSelect:()=>{s.ids.forEach(r=>s.assign(r,null)),s.onClear()}}]:[],{id:"folder:new",label:"Новая папка…",onSelect:s.onNewFolder}]}function $j(s){return s.map(l=>({...l,id:`pinned:${l.id}`,label:l.id==="folder:new"?"Новая папка закреплённых…":l.id==="folder:none"?"Без папки закреплённых":l.label}))}function $h(s){const[l,r]=y.useState([]),c=y.useRef(null);function o(){r([]),c.current=null}function d(m,g,x){if(m.ctrlKey||m.metaKey){r(_=>_.includes(g.id)?_.filter(S=>S!==g.id):[..._,g.id]),c.current=g.id;return}if(m.shiftKey&&c.current){const _=s.findIndex(v=>v.id===c.current),S=s.findIndex(v=>v.id===g.id);if(_!==-1&&S!==-1){const[v,E]=_<S?[_,S]:[S,_];r(s.slice(v,E+1).map(T=>T.id));return}}o(),c.current=g.id,x()}function h(m){return l.includes(m.id)?l:(r([m.id]),c.current=m.id,[m.id])}return{selected:l,click:d,targetsFor:h,clear:o}}const Qj={display:"flex",alignItems:"center",gap:6,flex:1,minWidth:0,textAlign:"left"},Kj={width:22,height:22,borderRadius:6};function nc({title:s,count:l,open:r,onToggle:c,hint:o,action:d}){const h=r?`Свернуть «${s}»`:`Развернуть «${s}»`;return i.jsxs("div",{className:"sidebar__section",children:[i.jsxs("button",{className:"sidebar__section--btn",style:Qj,"aria-expanded":r,title:o?`${h} — ${o}`:h,onClick:c,children:[i.jsx(qy,{open:r}),i.jsx("span",{className:"sidebar__section-name",children:s}),i.jsx("span",{className:"sidebar__count",children:l})]}),d&&i.jsx("button",{className:"theme-btn",style:Kj,title:d.label,"aria-label":d.label,onClick:d.onClick,children:i.jsx(tS,{})})]})}const vx={paddingLeft:22},Zj={display:"flex",alignItems:"center",gap:6,width:"100%"},Fj={flex:1,minWidth:0,color:"var(--text-2)",fontWeight:500};function Jj({folder:s,count:l,open:r,renaming:c,onToggle:o,onStartRename:d,onCommitRename:h,onCancelRename:m,onDelete:g}){return c?i.jsx("div",{className:"row",style:vx,children:i.jsx("div",{className:"row__main",children:i.jsx(sa,{value:s.name,placeholder:"Название папки",onCommit:h,onCancel:m})})}):i.jsxs("div",{className:"row",style:vx,children:[i.jsxs("button",{className:"row__main",style:Zj,"aria-expanded":r,title:r?`Свернуть папку «${s.name}»`:`Развернуть папку «${s.name}»`,onClick:o,children:[i.jsx(qy,{open:r}),i.jsx("span",{style:Fj,children:s.name}),i.jsx("span",{className:"sidebar__count",children:l})]}),i.jsx("button",{className:"row__edit",title:"Переименовать папку","aria-label":`Переименовать папку «${s.name}»`,onClick:d,children:"✎"}),i.jsx("button",{className:"row__edit",title:"Удалить папку — содержимое останется, просто станет без папки","aria-label":`Удалить папку «${s.name}»`,onClick:g,children:"✕"})]})}function qy({open:s}){return i.jsx("svg",{className:s?"sidebar__chev sidebar__chev--open":"sidebar__chev",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}function jf(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[i.jsx("circle",{cx:"5.5",cy:"4",r:"1.15"}),i.jsx("circle",{cx:"5.5",cy:"8",r:"1.15"}),i.jsx("circle",{cx:"5.5",cy:"12",r:"1.15"}),i.jsx("circle",{cx:"10.5",cy:"4",r:"1.15"}),i.jsx("circle",{cx:"10.5",cy:"8",r:"1.15"}),i.jsx("circle",{cx:"10.5",cy:"12",r:"1.15"})]})}function Wj(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:i.jsx("rect",{x:"3.6",y:"3.6",width:"8.8",height:"8.8",rx:"1.8"})})}function Pj({className:s}){return i.jsxs("svg",{className:s,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"4.5",y:"2.4",width:"7",height:"4.2",rx:"1.6"}),i.jsx("path",{d:"M5.4 6.6 8 12.2 10.6 6.6"}),i.jsx("path",{d:"M8 12.2v1.4"})]})}function eS(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[i.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),i.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function tS(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round","aria-hidden":"true",children:i.jsx("path",{d:"M8 3.2v9.6M3.2 8h9.6"})})}function nS(){try{const s=localStorage.getItem(Hy);if(s===null)return["archive","workspacesArchive"];const l=JSON.parse(s);return Array.isArray(l)?l.filter(r=>r==="workspaces"||r==="workspacesArchive"||r==="sessions"||r==="archive"||r==="pinned"||r==="live"):["archive","workspacesArchive"]}catch{return["archive","workspacesArchive"]}}function lS(){try{const s=localStorage.getItem(Iy);if(s===null)return[];const l=JSON.parse(s);return Array.isArray(l)?l.filter(r=>typeof r=="string"):[]}catch{return[]}}function sS(){try{const s=localStorage.getItem(By);return s==="pinned"||s==="live"?s:"default"}catch{return"default"}}const jx={system:"как в системе",light:"светлая",dark:"тёмная"};function aS({mode:s}){const l={viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};return s==="dark"?i.jsx("svg",{...l,children:i.jsx("path",{d:"M13.2 9.7A5.4 5.4 0 0 1 6.3 2.8a5.6 5.6 0 1 0 6.9 6.9Z"})}):s==="light"?i.jsxs("svg",{...l,children:[i.jsx("circle",{cx:"8",cy:"8",r:"3.1"}),i.jsx("path",{d:"M8 1.4v1.4M8 13.2v1.4M2.4 8H1M15 8h-1.4M4 4l-1-1M13 13l-1-1M12 4l1-1M3 13l1-1"})]}):i.jsxs("svg",{...l,children:[i.jsx("rect",{x:"1.8",y:"2.6",width:"12.4",height:"8.4",rx:"1.4"}),i.jsx("path",{d:"M5.6 13.4h4.8"})]})}function iS(s){switch(s.state){case"running":return"работает";case"waiting_permission":return"ждёт разрешения";case"idle":return s.backgroundWork?"работает в фоне":rS(s.lastTurn);case"starting":return"запускается";case"reconnecting":return"переподключается";case"error":return"ошибка";case"closed":return"на диске"}}function rS(s){switch(s){case"interrupted":return"прервана";case"stopped":return"остановлена";case"failed":return"оборвалась";case"completed":return"готова";case null:return"ждёт задачу"}}function cS(s){switch(s.state){case"running":return"running";case"starting":return"starting";case"reconnecting":return"reconnecting";case"waiting_permission":return"waiting";case"idle":return s.backgroundWork?"background":oS(s.lastTurn);case"error":return"error";case"closed":return"closed"}}function oS(s){switch(s){case"interrupted":case"stopped":return"halted";case"failed":return"error";case"completed":return"ready";case null:return"fresh"}}function Qh({session:s,tail:l}){return i.jsxs("span",{className:"row__meta",children:[i.jsxs("span",{className:`row__state row__state--${cS(s)}`,children:[i.jsx("span",{className:"row__state-dot","aria-hidden":"true"}),iS(s)]})," · ",l]})}function Sf({title:s,pinned:l,provider:r,projectName:c,projectPath:o}){return i.jsxs("span",{className:"row__head",children:[i.jsxs("span",{className:"row__title",children:[l&&i.jsx(Pj,{className:"row__pin"}),r==="antigravity"&&i.jsx(Uy,{className:"row__provider"}),s]}),i.jsx("span",{className:"row__project",title:o,children:c})]})}function uS(s){const l=s.archivedAuto?"сама, по сроку молчания":"убрана вручную";return s.archivedAt?`${new Date(s.archivedAt).toLocaleString()} · ${l}`:l}function fS(s){return s.archivedAt?`закрыт ${new Date(s.archivedAt).toLocaleString()}`:"закрыт"}const Sx=3,dS=15e5;function Gy(s,l){if(!l||typeof l!="object")return null;const r=l,c=typeof r.file_path=="string"?r.file_path:"";if(!c)return null;if(s==="Write"){if(typeof r.content!="string")return null;const o=Kh(r.content).map(d=>({type:"add",text:d}));return{kind:"create",filePath:c,rows:o,added:o.length,removed:0,note:"файл записывается целиком"}}if(s==="Edit"){if(typeof r.old_string!="string"||typeof r.new_string!="string")return null;const o=gS(hS(Kh(r.old_string),Kh(r.new_string)));return{kind:"edit",filePath:c,rows:o,added:o.filter(d=>d.type==="add").length,removed:o.filter(d=>d.type==="del").length,note:r.replace_all===!0?"все вхождения":null}}return null}function Kh(s){if(s==="")return[];const l=s.split(/\r?\n/);return l.length>1&&l[l.length-1]===""&&l.pop(),l}function hS(s,l){let r=0;for(;r<s.length&&r<l.length&&s[r]===l[r];)r++;let c=s.length,o=l.length;for(;c>r&&o>r&&s[c-1]===l[o-1];)c--,o--;const d=h=>({type:"ctx",text:h});return[...s.slice(0,r).map(d),...pS(s.slice(r,c),l.slice(r,o)),...s.slice(c).map(d)]}function pS(s,l){if(s.length===0&&l.length===0)return[];if(s.length===0)return l.map(_=>({type:"add",text:_}));if(l.length===0)return s.map(_=>({type:"del",text:_}));if((s.length+1)*(l.length+1)>dS)return[...s.map(_=>({type:"del",text:_})),...l.map(_=>({type:"add",text:_}))];const r=s.length,c=l.length,o=c+1,d=new Uint32Array((r+1)*o),h=(_,S)=>d[_*o+S]??0;for(let _=r-1;_>=0;_--)for(let S=c-1;S>=0;S--)d[_*o+S]=s[_]===l[S]?h(_+1,S+1)+1:Math.max(h(_+1,S),h(_,S+1));const m=[];let g=0,x=0;for(;g<r&&x<c;){const _=s[g],S=l[x];_===S?(m.push({type:"ctx",text:_}),g++,x++):h(g+1,x)>=h(g,x+1)?(m.push({type:"del",text:_}),g++):(m.push({type:"add",text:S}),x++)}for(;g<r;)m.push({type:"del",text:s[g++]});for(;x<c;)m.push({type:"add",text:l[x++]});return mS(m)}function mS(s){const l=[];let r=[];function c(){l.push(...r.filter(o=>o.type==="del")),l.push(...r.filter(o=>o.type==="add")),r=[]}for(const o of s)o.type==="ctx"?(c(),l.push(o)):r.push(o);return c(),l}function gS(s){if(!s.some(d=>d.type!=="ctx"))return s;const l=s.map(()=>!1);s.forEach((d,h)=>{if(d.type!=="ctx")for(let m=Math.max(0,h-Sx);m<=Math.min(s.length-1,h+Sx);m++)l[m]=!0});const r=[];let c=[];function o(){c.length===1?r.push(...c):c.length>1&&r.push({type:"gap",text:`⋯ ${c.length} ${bS(c.length)} без изменений`}),c=[]}return s.forEach((d,h)=>{l[h]?(o(),r.push(d)):c.push(d)}),o(),r}function bS(s){const l=s%100;if(l>=11&&l<=14)return"строк";switch(s%10){case 1:return"строка";case 2:case 3:case 4:return"строки";default:return"строк"}}async function yc(s){try{return await navigator.clipboard.writeText(s),!0}catch{}const l=document.createElement("textarea");l.value=s,l.setAttribute("readonly",""),l.style.position="fixed",l.style.opacity="0",document.body.appendChild(l);try{return l.select(),document.execCommand("copy")}catch{return!1}finally{l.remove()}}async function dp(){try{return await navigator.clipboard.readText()}catch{return null}}const Cp=1600,fr="Копировать",oc="Скопировано";function Ap({text:s,hint:l,className:r}){const[c,o]=y.useState(!1);return y.useEffect(()=>{if(!c)return;const d=setTimeout(()=>o(!1),Cp);return()=>clearTimeout(d)},[c]),y.useEffect(()=>o(!1),[s]),i.jsx("button",{type:"button",className:"copybtn"+(c?" copybtn--done":"")+(r?` ${r}`:""),"aria-label":c?oc:`${fr} ${l}`,title:c?oc:`${fr} ${l}`,onClick:()=>{yc(s).then(d=>{d&&o(!0)})},children:c?oc:fr})}function Mp({diff:s}){return i.jsxs("div",{className:"diff",children:[i.jsxs("div",{className:"diff__head",children:[i.jsx("span",{className:"diff__path",title:s.filePath,children:s.filePath}),i.jsxs("span",{className:"diff__stat",children:[s.added>0&&i.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&i.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]})]}),s.note&&i.jsx("div",{className:"diff__note",children:s.note}),i.jsx("div",{className:"diff__body",children:s.rows.length===0?i.jsx("div",{className:"diff__row diff__row--gap",children:i.jsx("span",{className:"diff__text",children:"пустое содержимое"})}):s.rows.map((l,r)=>i.jsxs("div",{className:`diff__row diff__row--${l.type}`,children:[i.jsx("span",{className:"diff__mark","aria-hidden":"true",children:l.type==="add"?"+":l.type==="del"?"−":""}),i.jsx("span",{className:"diff__text",children:l.text===""?" ":l.text})]},r))})]})}function xS({waiting:s}){const[l,r]=y.useState(0);return y.useEffect(()=>{const c=window.setInterval(()=>r(o=>o+1),1e3);return()=>window.clearInterval(c)},[]),i.jsxs("div",{className:s?"work work--wait":"work",children:[i.jsxs("span",{className:"work__dots","aria-hidden":"true",children:[i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"})]}),i.jsx("span",{className:"work__label",children:s?"ждёт разрешения":"думает"}),!s&&i.jsxs("span",{className:"work__time",children:[l," с"]})]})}function Rp({items:s,busy:l,waiting:r,history:c=[],historyHasMore:o=!1,historyLoading:d=!1,onLoadHistory:h,sessionId:m,onEditMessage:g,empty:x="Сессия пуста. Опишите задачу — Claude Code работает в каталоге проекта с полным набором инструментов."}){const _=y.useRef(null),S=y.useRef(null),v=y.useRef(!0),E=y.useRef(null),T=y.useRef(null),C=y.useRef(!1);y.useEffect(()=>{v.current=!0,E.current=null,C.current=!1,T.current!==null&&(clearTimeout(T.current),T.current=null)},[m]),y.useEffect(()=>{const O=_.current,Z=S.current;if(!O||!Z)return;function M(ne){!O||ne===O.scrollTop||(C.current=!0,O.scrollTop=ne)}function D(){if(!O)return;const ne=E.current;if(ne){const he=kx(O,ne.id);if(he){const W=he.getBoundingClientRect().top-O.getBoundingClientRect().top;M(O.scrollTop+(W-ne.top))}T.current!==null&&clearTimeout(T.current),T.current=setTimeout(()=>{E.current=null},500);return}v.current&&M(O.scrollHeight)}const H=new ResizeObserver(D);return H.observe(Z),()=>{H.disconnect(),T.current!==null&&clearTimeout(T.current)}},[]);function L(){const O=_.current;if(O){if(C.current){C.current=!1;return}v.current=O.scrollHeight-O.scrollTop-O.clientHeight<80}}function X(){if(d)return;const O=_.current,Z=c[0];if(O&&Z){const M=kx(O,Z.id);M&&(E.current={id:Z.id,top:M.getBoundingClientRect().top-O.getBoundingClientRect().top})}h==null||h()}let J=0;function G(O){return O.kind==="user"?J++:-1}return i.jsx("div",{className:"transcript",ref:_,onScroll:L,children:i.jsxs("div",{className:"stream",ref:S,children:[o&&i.jsx("button",{type:"button",className:"transcript__more",onClick:X,disabled:d,children:d?"Загружаем…":"Показать более раннее"}),c.map(O=>i.jsx(wx,{item:O,userIndex:G(O),onEditMessage:g},O.id)),c.length>0&&s.length>0&&i.jsx("div",{className:"transcript__divider",children:i.jsx("span",{children:"дальше — сессия открыта заново"})}),c.length===0&&s.length===0&&i.jsx("p",{className:"empty",children:x}),s.map(O=>i.jsx(wx,{item:O,userIndex:G(O),onEditMessage:g},O.id)),l&&i.jsx(xS,{waiting:r})]})})}function wx({item:s,userIndex:l,onEditMessage:r}){switch(s.kind){case"user":return i.jsx(_S,{item:s,userIndex:l,onEditMessage:r});case"assistant":return i.jsxs("div",{className:"msg--assistant","data-item-id":s.id,children:[i.jsx(vS,{text:s.text}),s.streaming&&i.jsx("span",{className:"caret"}),s.text.trim()!==""&&i.jsx("div",{className:"msg--assistant__foot",children:i.jsx(Ap,{text:s.text,hint:"ответ целиком"})})]});case"thinking":return i.jsx("div",{className:"thinking","data-item-id":s.id,children:s.text});case"tool":return i.jsx(SS,{item:s});case"result":return i.jsxs("div",{className:"result-line","data-item-id":s.id,children:[i.jsx("span",{children:s.isError?"✗ "+s.subtype:"✓ готово"}),i.jsxs("span",{children:[(s.durationMs/1e3).toFixed(1)," с"]}),s.costUsd!==null&&i.jsxs("span",{children:["$",s.costUsd.toFixed(4)]}),i.jsxs("span",{children:["↑",Tx(s.inputTokens)," ↓",Tx(s.outputTokens)]})]});case"notice":return i.jsx("div",{className:s.tone==="error"?"notice notice--error":"notice","data-item-id":s.id,children:s.text})}}const yS=500;function _S({item:s,userIndex:l,onEditMessage:r}){const[c,o]=y.useState(null),[d,h]=y.useState(!1),[m,g]=y.useState(s.text),x=y.useRef(null),_=Yf("(max-width: 860px)"),S=y.useRef(null);function v(D,H){o({x:D,y:H})}function E(D){D.preventDefault(),v(D.clientX,D.clientY)}function T(D){const H=D.touches[0];if(!H)return;const ne={timer:0,x:H.clientX,y:H.clientY,fired:!1};ne.timer=window.setTimeout(()=>{ne.fired=!0,v(ne.x,ne.y)},yS),S.current=ne}function C(D){const H=S.current,ne=D.touches[0];!H||!ne||Math.hypot(ne.clientX-H.x,ne.clientY-H.y)>10&&(window.clearTimeout(H.timer),S.current=null)}function L(D){const H=S.current;H&&(window.clearTimeout(H.timer),H.fired&&D.preventDefault())}function X(){g(s.text),h(!0)}function J(){h(!1)}function G(){const D=m.trim();D===""&&!(s.images&&s.images.length>0)||(r==null||r(l,D,s.images),h(!1))}y.useEffect(()=>{const D=x.current;!D||!d||(D.style.height="auto",D.style.height=`${D.scrollHeight}px`)},[m,d]),y.useEffect(()=>{if(!d)return;const D=x.current;D&&(D.focus(),D.setSelectionRange(D.value.length,D.value.length))},[d]);function O(D){if(D.key==="Escape"){D.preventDefault(),D.stopPropagation(),J();return}D.key==="Enter"&&!D.shiftKey&&!_&&(D.preventDefault(),G())}const Z=s.images&&s.images.length>0&&i.jsx("div",{className:"msg--user__images",children:s.images.map((D,H)=>i.jsx("img",{className:"msg--user__image",src:`data:${D.mediaType};base64,${D.data}`,alt:"Вложение"},H))});if(d){const D=m.trim()!==""||!!(s.images&&s.images.length>0);return i.jsxs("div",{className:"msg--user msg--user--editing","data-item-id":s.id,children:[Z,i.jsxs("div",{className:"msg--user__edit",children:[i.jsx("textarea",{ref:x,className:"msg--user__edit-field",value:m,onChange:H=>g(H.target.value),onKeyDown:O,rows:1}),i.jsxs("div",{className:"msg--user__edit-actions",children:[i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",onClick:J,children:"Отмена"}),i.jsx("button",{type:"button",className:"btn btn--sm btn--primary",onClick:G,disabled:!D,children:"Сохранить"})]})]})]})}const M=[{id:"copy",label:"Копировать",onSelect:()=>void yc(s.text)},...r?[{id:"edit",label:"Изменить",onSelect:X}]:[]];return i.jsxs("div",{className:"msg--user","data-item-id":s.id,onContextMenu:E,onTouchStart:T,onTouchMove:C,onTouchEnd:L,onTouchCancel:L,children:[Z,s.text,c&&i.jsx(lr,{x:c.x,y:c.y,items:M,onClose:()=>o(null)})]})}function kx(s,l){const r=s.querySelectorAll("[data-item-id]");for(const c of r)if(c.dataset.itemId===l)return c;return null}function vS({text:s}){const[l,r]=y.useState(""),c=y.useRef([]);y.useEffect(()=>{let d=!1;return $f(s).then(h=>{d||r(jS(h))}),()=>{d=!0}},[s]),y.useEffect(()=>{const d=c.current;return()=>d.forEach(h=>clearTimeout(h))},[]);function o(d){var g,x;const h=d.target.closest(".codeblock__copy");if(!(h instanceof HTMLElement))return;const m=((x=(g=h.parentElement)==null?void 0:g.querySelector("pre"))==null?void 0:x.textContent)??"";m!==""&&yc(m).then(_=>{if(!_)return;h.textContent=oc,h.setAttribute("aria-label",oc),h.classList.add("copybtn--done");const S=window.setTimeout(()=>{h.isConnected&&(h.textContent=fr,h.setAttribute("aria-label",hp),h.classList.remove("copybtn--done"))},Cp);c.current.push(S)})}return i.jsx("div",{className:"markdown-preview msg--assistant__body",onClick:o,dangerouslySetInnerHTML:{__html:l}})}const hp=`${fr} блок кода`;function jS(s){if(!s.includes("<pre"))return s;const l=new DOMParser().parseFromString(s,"text/html");for(const r of l.body.querySelectorAll("pre")){const c=l.createElement("div");c.className="codeblock",r.replaceWith(c),c.append(r);const o=l.createElement("button");o.type="button",o.className="copybtn codeblock__copy",o.setAttribute("aria-label",hp),o.title=hp,o.textContent=fr,c.append(o)}return l.body.innerHTML}function SS({item:s}){const[l,r]=y.useState(!1),c=s.result===null,o=Gy(s.name,s.input),d=s.name==="AskUserQuestion"?NS(s.input):null;return i.jsxs("div",{className:"tool"+(s.isError?" tool--error":"")+(s.awaitingPermission?" tool--wait":""),"data-item-id":s.id,children:[i.jsxs("button",{className:"tool__head",onClick:()=>r(h=>!h),children:[i.jsx("span",{className:"tool__name",children:s.name}),i.jsx("span",{className:"tool__arg",children:d?kS(d):wS(s.input)}),i.jsx("span",{className:"tool__status",children:c?"…":s.isError?"ошибка":l?"▴":"▾"})]}),l&&i.jsxs("div",{className:"tool__body",children:[d?i.jsx(TS,{questions:d,answers:s.answers}):o?i.jsx(Mp,{diff:o}):i.jsx(Nx,{text:JSON.stringify(s.input,null,2),hint:"аргументы вызова"}),s.result!==null&&(!d||s.isError)&&i.jsx(Nx,{text:s.result,hint:"результат вызова",style:{marginTop:10}})]})]})}function Nx({text:s,hint:l,style:r}){return i.jsxs("div",{className:"codeblock",style:r,children:[i.jsx("pre",{className:"code",children:s}),i.jsx(Ap,{text:s,hint:l,className:"codeblock__copy"})]})}function wS(s){if(!s||typeof s!="object")return"";const l=s;for(const r of["file_path","command","pattern","path","url","prompt"]){const c=l[r];if(typeof c=="string")return c.replace(/\s+/g," ").slice(0,160)}return JSON.stringify(l).slice(0,160)}function kS(s){var r;const l=s.map(c=>c.header).filter(c=>c.length>0);return l.length===s.length?l.join(" · "):((r=s[0])==null?void 0:r.question.replace(/\s+/g," ").slice(0,160))??""}function NS(s){if(typeof s!="object"||s===null)return null;const l=s.questions;if(!Array.isArray(l)||l.length===0)return null;const r=[];for(const c of l){if(typeof c!="object"||c===null)return null;const{question:o,header:d,options:h,multiSelect:m}=c;if(typeof o!="string"||!Array.isArray(h)||h.length===0)return null;const g=[];for(const x of h){if(typeof x!="object"||x===null)return null;const{label:_,description:S,preview:v}=x;if(typeof _!="string"||typeof S!="string")return null;g.push({label:_,description:S,...typeof v=="string"?{preview:v}:{}})}r.push({question:o,header:typeof d=="string"?d:"",options:g,multiSelect:m===!0})}return r}function TS({questions:s,answers:l}){return i.jsx("div",{className:"tool__questions",children:s.map((r,c)=>i.jsxs("div",{className:"tool__question",children:[i.jsxs("div",{className:"tool__question-head",children:[r.header&&i.jsx("span",{className:"chip chip--accent",children:r.header}),i.jsx("span",{className:"tool__question-text",children:r.question})]}),i.jsx("div",{className:"tool__question-answer",children:l!=null&&l[r.question]?i.jsx("span",{className:"tool__answer-value",children:l[r.question]}):i.jsx("span",{className:"tool__answer-empty",children:"не отвечено"})})]},c))})}function Tx(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}const ES="ccv.dictation.lang",Ex="ru-RU";function CS(s){try{return Function.prototype.toString.call(s).includes("[native code]")}catch{return!1}}function Cx(){const s=window,l=[s.SpeechRecognition,s.webkitSpeechRecognition].filter(c=>typeof c=="function"),r=l.find(CS);return!r&&l.length>0&&Es("распознавание подменено: родной реализации в странице нет"),r??l[0]??null}function Yy(){var s;try{return((s=localStorage.getItem(ES))==null?void 0:s.trim())||Ex}catch{return Ex}}function Es(s,l){l===void 0?console.debug(`[dictation] ${s}`):console.debug(`[dictation] ${s}`,l)}const AS=3,MS=400,RS=5,DS=250,OS=2e3,LS=2e4;async function zS(){try{return(await navigator.permissions.query({name:"microphone"})).state==="granted"}catch{return!1}}const US={"not-allowed":"Браузер не дал доступ к микрофону","service-not-allowed":"Браузер не дал доступ к микрофону","audio-capture":"Микрофон не найден",network:"Сервис распознавания недоступен","language-not-supported":`Распознавание не знает языка ${Yy()}`};function HS(s){const[l]=y.useState(()=>Cx()!==null),[r,c]=y.useState(!1),[o,d]=y.useState(null),h=y.useRef(null),m=y.useRef(!1),g=y.useRef(!1),x=y.useRef(s),_=y.useRef({openedAt:0,audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1}),S=y.useRef(null),v=y.useRef(!1),E=y.useRef(null),T=y.useCallback(()=>{E.current&&clearTimeout(E.current),E.current=null},[]),C=y.useCallback(()=>{T();const O=async Z=>{if(E.current=null,!(!m.current||v.current)){if(!Z&&!await zS()){if(Es("ждём ответа на запрос доступа к микрофону"),!m.current||v.current)return;E.current=setTimeout(()=>void O(!0),LS);return}Es("движок не ответил на start()"),m.current=!1,c(!1),d("Распознавание не отвечает — проверьте расширения браузера и доступ к микрофону")}};E.current=setTimeout(()=>void O(!1),OS)},[T]);y.useEffect(()=>{x.current=s}),y.useEffect(()=>{const O=Cx();if(!O)return;const Z=new O;return Z.lang=Yy(),Z.continuous=!0,Z.interimResults=!0,Z.onstart=()=>{Es("сессия открыта"),v.current=!0,T(),c(!0)},Z.onaudiostart=()=>{Es("пошёл звук с микрофона"),_.current.audio=!0},Z.onresult=M=>{var he;if(g.current)return;let D="",H="";for(let W=M.resultIndex;W<M.results.length;W++){const ue=M.results[W];if(!ue)continue;const je=((he=ue[0])==null?void 0:he.transcript)??"";ue.isFinal?D+=je:H+=je}const ne=_.current;ne.heard=!0,ne.everHeard=!0,Es("распознано",{final:D,interim:H}),x.current(D,H)},Z.onerror=M=>{_.current.lastError=M.error,Es("ошибка движка",M.error),!(M.error==="no-speech"||M.error==="aborted")&&(m.current=!1,c(!1),d(US[M.error]??`Распознавание не работает: ${M.error}`))},Z.onend=()=>{g.current=!1,v.current=!1;const M=_.current,D=Date.now()-M.openedAt;if(Es("сессия закрыта",{мс:D,звук:M.audio,слова:M.heard,ошибка:M.lastError||null}),!m.current){c(!1);return}if(M.dead=!M.audio&&D<MS?M.dead+1:0,M.dead>=RS){m.current=!1,c(!1),d(M.lastError?`Распознавание не работает: ${M.lastError}`:"Распознавание закрывается сразу после запуска — проверьте доступ к микрофону в настройках сайта");return}M.silent=M.heard?0:M.silent+1,!M.everHeard&&!M.warned&&M.silent>=AS&&(M.warned=!0,d(M.audio?"Микрофон слушает, но речь не распознаётся — проверьте язык диктовки и уровень звука":"С микрофона не идёт звук — проверьте устройство ввода в настройках сайта в браузере")),S.current=setTimeout(()=>{if(S.current=null,!!m.current){M.openedAt=Date.now(),M.audio=!1,M.heard=!1,M.lastError="",C();try{Z.start()}catch{}}},DS)},h.current=Z,()=>{m.current=!1,S.current&&clearTimeout(S.current),S.current=null,T(),Z.onend=null,Z.onresult=null,Z.onerror=null,Z.onstart=null,Z.onaudiostart=null,Z.abort(),h.current=null}},[]);const L=y.useCallback(()=>{var O;if(m.current){if(m.current=!1,Es("выключение микрофона"),S.current&&clearTimeout(S.current),S.current=null,T(),!v.current){c(!1);return}(O=h.current)==null||O.stop()}},[]),X=y.useCallback(()=>{const O=h.current;if(O){if(!window.isSecureContext){d("Микрофон доступен только по https или с localhost");return}d(null),m.current=!0,g.current=!1,S.current&&clearTimeout(S.current),S.current=null,_.current={openedAt:Date.now(),audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1},c(!0),Es("включение микрофона",{язык:O.lang}),C();try{O.start()}catch(Z){Es("start() не прошёл",Z)}}},[C]),J=y.useCallback(()=>{m.current?L():X()},[X,L]),G=y.useCallback(()=>{var O;m.current&&v.current&&(g.current=!0,(O=h.current)==null||O.abort())},[]);return{supported:l,listening:r,error:o,toggle:J,stop:L,drop:G}}const BS="(max-width: 860px)",Ax=/^\/(\S*)$/,IS=new Set(["model","permissions"]);function qS(s){return IS.has(s.name)||s.name.startsWith("__")}const GS=new Set(["clear","rename"]),Mx=/(?:^|\s)@([^\s@]*)$/,YS=200,XS=100,VS=190,$S=5,QS=20*1024*1024,KS=1568,ZS=.85;let Rx=0;async function FS(s){var S,v;if(!s.type.startsWith("image/")||s.size>QS)return null;const l=await JS(s);if(!l)return null;const{width:r,height:c}=l;if(r<=0||c<=0)return null;const o=Math.min(1,KS/Math.max(r,c)),d=document.createElement("canvas");d.width=Math.max(1,Math.round(r*o)),d.height=Math.max(1,Math.round(c*o));const h=d.getContext("2d");if(!h)return null;h.drawImage(l.image,0,0,d.width,d.height),(v=(S=l.image).close)==null||v.call(S);const m=s.type==="image/png",g=m?"image/png":"image/jpeg",x=d.toDataURL(g,m?void 0:ZS),_=x.slice(x.indexOf(",")+1);return _?(Rx+=1,{id:`att${Rx}`,mediaType:g,data:_,previewUrl:x}):null}async function JS(s){if(typeof createImageBitmap=="function")try{const l=await createImageBitmap(s);return{image:l,width:l.width,height:l.height}}catch{}return new Promise(l=>{const r=URL.createObjectURL(s),c=new Image;c.onload=()=>{URL.revokeObjectURL(r),l({image:c,width:c.naturalWidth,height:c.naturalHeight})},c.onerror=()=>{URL.revokeObjectURL(r),l(null)},c.src=r})}function Xy({disabled:s,busy:l,commands:r,sessionTitle:c,contextResult:o,className:d,placeholder:h,draftKey:m,sendLabel:g="Отправить",autoFocus:x=!1,attachmentsEnabled:_=!0,onContextSearch:S,onCommand:v,onSend:E,onInterrupt:T,onEscape:C}){var He;const L=Yf(BS),[X,J]=y.useState(()=>m?Oh(m):""),[G,O]=y.useState(!1),[Z,M]=y.useState(0),D=y.useRef(null),H=y.useRef(null),ne=y.useRef(null),[he,W]=y.useState(()=>m?Oh(m).length:0),[ue,je]=y.useState([]),Me=y.useRef(null),Ce=y.useCallback(B=>{!_||B.length===0||Promise.all(B.map(FS)).then(P=>{const _e=P.filter(Ie=>Ie!==null);_e.length!==0&&je(Ie=>[...Ie,..._e].slice(0,$S))})},[_]);function A(B){je(P=>P.filter(_e=>_e.id!==B))}function ce(B){var Ie;if(!_)return;const P=(Ie=B.clipboardData)==null?void 0:Ie.items;if(!P)return;const _e=[];for(const Lt of P){if(!Lt.type.startsWith("image/"))continue;const ul=Lt.getAsFile();ul&&_e.push(ul)}_e.length!==0&&(B.preventDefault(),Ce(_e))}function z(B){const P=B.target.files?Array.from(B.target.files):[];B.target.value="",Ce(P)}y.useEffect(()=>{_||je([])},[_]);const[be,ye]=y.useState([]),[N,V]=y.useState(-1),re=y.useRef(""),[me,Ne]=y.useState(""),ve=HS(y.useCallback((B,P)=>{B&&J(_e=>Zh(_e,B)),Ne(P.trim())},[])),De=me?Zh(X,me):X;y.useEffect(()=>{ve.listening||me===""||(J(B=>Zh(B,me)),Ne(""))},[ve.listening,me]),y.useEffect(()=>{var B;x&&((B=D.current)==null||B.focus())},[x]);const yt=y.useRef(new Map),Xe=y.useRef(new Map),Ve=y.useRef(m),$e=y.useRef({text:X,caret:he});$e.current={text:X,caret:he};const It=y.useCallback((B,P,_e)=>{P===""?(yt.current.delete(B),Xe.current.delete(B)):(yt.current.set(B,P),Xe.current.set(B,_e)),ay(B,P)},[]),rt=ve.drop;y.useLayoutEffect(()=>{const B=Ve.current;if(B===m)return;Ve.current=m,B&&It(B,$e.current.text,$e.current.caret);const P=m?yt.current.get(m)??Oh(m):"",_e=m?Xe.current.get(m):void 0,Ie=Math.min(_e??P.length,P.length);J(P),W(Ie),ne.current=[Ie,Ie],Ne(""),M(0),O(!1),V(-1),re.current="",je([]),rt()},[m,It,rt]),y.useEffect(()=>{m&&It(m,X,he)},[m,X,he,It]);const fn=s?"Выберите сессию":h??"Опишите задачу… («/» — команды, «@» — файлы)",ft=y.useRef(0),dn=y.useCallback(B=>{const P=parseFloat(getComputedStyle(B).maxHeight),_e=Number.isFinite(P)&&P>0?P:VS;B.style.height="auto";const Ie=B.scrollHeight;B.style.height=`${Math.min(Ie,_e)}px`,B.style.overflowY=Ie>_e?"auto":"hidden"},[]);y.useEffect(()=>{const B=D.current;B&&dn(B)},[De,fn,s,dn]),y.useLayoutEffect(()=>{const B=D.current,P=ne.current;!B||!P||(ne.current=null,B.setSelectionRange(P[0],P[1]))}),y.useEffect(()=>{const B=D.current;if(!B)return;const P=new ResizeObserver(([_e])=>{const Ie=_e==null?void 0:_e.contentRect.width;Ie===void 0||Math.abs(Ie-ft.current)<1||(ft.current=Ie,dn(B))});return P.observe(B),()=>P.disconnect()},[dn]);const jn=ve.stop;y.useEffect(()=>{s&&jn()},[s,jn]);const bn=y.useMemo(()=>ve.error?{ok:!1,message:ve.error}:null,[ve.error]),Pt=y.useMemo(()=>{var _e;const B=(_e=Ax.exec(X))==null?void 0:_e[1];if(B===void 0)return[];const P=B.toLowerCase();return r.filter(Ie=>!qS(Ie)&&Fh(Ie,P)<Vy).sort((Ie,Lt)=>Fh(Ie,P)-Fh(Lt,P))},[X,r]),tt=!G&&Pt.length>0,et=Math.min(Z,Pt.length-1),en=G?null:((He=Mx.exec(De.slice(0,he)))==null?void 0:He[1])??null,Xt=y.useRef(S);Xt.current=S,y.useEffect(()=>{if(en===null||en===""||en.endsWith("/")){Xt.current(en);return}const B=setTimeout(()=>Xt.current(en),YS);return()=>clearTimeout(B)},[en]);const nt=en!==null&&(o==null?void 0:o.query)===en,St=nt?o.entries:[],Vt=en!==null,rn=Vt&&!nt,wt=Math.min(Z,Math.max(St.length-1,0));y.useEffect(()=>{var P,_e;if(!tt&&!Vt)return;const B=tt?et:wt;(_e=(P=H.current)==null?void 0:P.children[B])==null||_e.scrollIntoView({block:"nearest"})},[tt,Vt,et,wt]);function xn(B,P){var _e;J(B),W(P),ne.current=[P,P],M(0),O(!1),me!==""&&(Ne(""),ve.drop()),(_e=D.current)==null||_e.focus()}function qt(){J(""),Ne(""),M(0),W(0),O(!1),V(-1),re.current="",je([]),ve.drop(),m&&It(m,"",0)}function hn(B){const P=B.trim();P===""&&ue.length===0||s||(E(P,ue.length>0?ue.map(_e=>({mediaType:_e.mediaType,data:_e.data})):void 0),P!==""&&ye(_e=>[P,..._e.filter(Ie=>Ie!==P)].slice(0,XS)),qt())}function Dn(B){if(B<-1||B>=be.length)return;N===-1&&(re.current=X);const P=B===-1?re.current:be[B]??"";V(B),xn(P,P.length)}function Gt(){var Ie;const B=((Ie=D.current)==null?void 0:Ie.selectionStart)??De.length,_e=`${B>0&&!/\s$/.test(De.slice(0,B))?" ":""}@`;xn(De.slice(0,B)+_e+De.slice(B),B+_e.length)}function ct(B){var Lt;const P=(Lt=Mx.exec(De.slice(0,he)))==null?void 0:Lt[1];if(P===void 0)return;const _e=he-P.length-1,Ie=B.kind==="dir"?`@${B.path}/`:`@${B.path} `;xn(De.slice(0,_e)+Ie+De.slice(he),_e+Ie.length)}function Ct(){var P;const B=(P=Ax.exec(De.trim()))==null?void 0:P[1];if(B&&v(B)){qt();return}hn(De)}function Pe(B,P){J(B),W(P),M(0),O(!1),V(-1),me!==""&&(Ne(""),ve.drop())}function Sl(B){var Ie;const P=GS.has(B.name)?c:null,_e=`/${B.name} `;J(_e+(P??"")),W(_e.length+((P==null?void 0:P.length)??0)),P&&(ne.current=[_e.length,_e.length+P.length]),M(0),(Ie=D.current)==null||Ie.focus()}function le(B){if(v(B.name)){J(""),M(0),O(!1);return}B.argumentHint?Sl(B):hn(`/${B.name}`)}function ge(B){if(tt){if(B.key==="ArrowDown")return B.preventDefault(),M(P=>(Math.min(P,Pt.length-1)+1)%Pt.length);if(B.key==="ArrowUp"){B.preventDefault();const P=Pt.length-1;return M(_e=>(Math.min(_e,P)+P)%Pt.length)}if(B.key==="Enter"&&!B.shiftKey){B.preventDefault();const P=Pt[et];P&&le(P);return}if(B.key==="Tab"){B.preventDefault();const P=Pt[et];P&&Sl(P);return}if(B.key==="Escape"){B.preventDefault(),B.stopPropagation(),O(!0);return}}if(Vt){if(B.key==="ArrowDown"&&St.length>0)return B.preventDefault(),M(P=>(Math.min(P,St.length-1)+1)%St.length);if(B.key==="ArrowUp"&&St.length>0){B.preventDefault();const P=St.length-1;return M(_e=>(Math.min(_e,P)+P)%St.length)}if(B.key==="Enter"&&!B.shiftKey||B.key==="Tab"){const P=St[wt];if(P){B.preventDefault(),ct(P);return}if(B.key==="Tab")return}if(B.key==="Escape"){B.preventDefault(),B.stopPropagation(),O(!0);return}}if((B.key==="ArrowUp"||B.key==="ArrowDown")&&!B.shiftKey){const P=B.currentTarget,_e=P.selectionStart;if(P.selectionEnd===_e){const Lt=B.key==="ArrowUp"?N+1:N-1;Lt>=-1&&Lt<be.length&&requestAnimationFrame(()=>{P.selectionStart===_e&&P.selectionEnd===_e&&Dn(Lt)})}}if(B.key==="Escape"&&C){B.preventDefault(),B.stopPropagation(),C();return}B.key==="Enter"&&!B.shiftKey&&!L&&(B.preventDefault(),Ct())}return i.jsx("div",{className:d?`composer ${d}`:"composer",children:i.jsxs("div",{className:"composer__inner",children:[i.jsx(pr,{result:bn}),Vt&&!tt&&i.jsxs("div",{className:"cmdmenu",role:"listbox",ref:H,children:[St.map((B,P)=>i.jsxs("button",{role:"option","aria-selected":P===wt,className:P===wt?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>M(P),onMouseDown:_e=>{_e.preventDefault(),ct(B)},children:[i.jsxs("span",{className:"cmdmenu__name",children:[B.name,B.kind==="dir"?"/":""]}),i.jsx("span",{className:"cmdmenu__desc",children:B.path}),B.ignored&&i.jsx("span",{className:"cmdmenu__tag",children:"git-ignore"})]},B.path)),St.length===0&&i.jsx("div",{className:"cmdmenu__empty",children:rn?"ищем…":en?"Ничего не нашлось":"Наберите имя файла или каталога"})]}),tt&&i.jsx("div",{className:"cmdmenu",role:"listbox",ref:H,children:Pt.map((B,P)=>i.jsxs("button",{role:"option","aria-selected":P===et,className:P===et?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>M(P),onMouseDown:_e=>{_e.preventDefault(),le(B)},children:[i.jsxs("span",{className:"cmdmenu__name",children:["/",B.name]}),B.argumentHint&&i.jsx("span",{className:"cmdmenu__hint",children:B.argumentHint}),i.jsx("span",{className:"cmdmenu__desc",children:B.description})]},B.name))}),ue.length>0&&i.jsx("div",{className:"composer__attachments",children:ue.map(B=>i.jsxs("div",{className:"composer__thumb",children:[i.jsx("img",{src:B.previewUrl,alt:"Вложение"}),i.jsx("button",{type:"button",className:"composer__thumb-remove","aria-label":"Удалить вложение",onClick:()=>A(B.id),children:i.jsx(lw,{})})]},B.id))}),i.jsxs("div",{className:"composer__field",children:[i.jsx("button",{type:"button",className:"addbtn",title:"Добавить контекст — файл проекта («@»)","aria-label":"Добавить контекст",disabled:s,onClick:Gt,children:i.jsx(ew,{})}),_&&i.jsxs(i.Fragment,{children:[i.jsx("input",{ref:Me,type:"file",accept:"image/*",multiple:!0,className:"composer__fileinput",tabIndex:-1,"aria-hidden":"true",onChange:z}),i.jsx("button",{type:"button",className:"attachbtn",title:"Прикрепить изображение","aria-label":"Прикрепить изображение",disabled:s,onClick:()=>{var B;return(B=Me.current)==null?void 0:B.click()},children:i.jsx(nw,{})})]}),i.jsx("textarea",{ref:D,value:De,disabled:s,placeholder:fn,onChange:B=>Pe(B.target.value,B.target.selectionStart),onSelect:B=>W(B.currentTarget.selectionStart),onKeyDown:ge,onPaste:ce}),ve.supported&&i.jsx("button",{type:"button",className:ve.listening?"micbtn is-on":"micbtn",title:ve.listening?"Остановить диктовку":"Продиктовать промпт","aria-label":ve.listening?"Остановить диктовку":"Продиктовать промпт","aria-pressed":ve.listening,disabled:s,onClick:ve.toggle,children:i.jsx(sw,{on:ve.listening})}),l?i.jsx("button",{className:"btn",onClick:T,title:"Прервать (Esc)",children:"Стоп"}):i.jsxs("button",{className:"btn btn--primary sendbtn",onClick:Ct,disabled:s||De.trim()===""&&ue.length===0,"aria-label":g,title:g,children:[i.jsx("span",{className:"sendbtn__label",children:g}),i.jsx(tw,{})]})]})]})})}function Zh(s,l){const r=l.trim();if(r==="")return s;const c=pp(r).slice(WS(s,r)).join(" ");return c===""?s:s===""||/\s$/.test(s)?s+c:`${s} ${c}`}function WS(s,l){const r=pp(s),c=pp(l);for(let o=Math.min(r.length,c.length);o>0;o--)if(r.slice(r.length-o).every((d,h)=>PS(d,c[h]??"")))return o;return 0}function pp(s){return s.split(/\s+/).filter(l=>l!=="")}function PS(s,l){const r=c=>c.toLowerCase().replace(/[.,!?;:…]+$/u,"");return r(s)===r(l)}function ew(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round","aria-hidden":"true",children:i.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2"})})}function tw(){return i.jsx("svg",{className:"sendbtn__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M8 12.5V3.5M4 7.5 8 3.5l4 4"})})}function nw(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M10.8 4.2 5.9 9.1a2 2 0 0 0 2.8 2.8l4.6-4.6a3.3 3.3 0 0 0-4.7-4.7L3.9 7.3a4.6 4.6 0 0 0 6.5 6.5l4.4-4.4"})})}function lw(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round","aria-hidden":"true",children:i.jsx("path",{d:"M4 4l8 8M12 4l-8 8"})})}function sw({on:s}){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"5.9",y:"1.7",width:"4.2",height:"7.6",rx:"2.1",fill:s?"currentColor":"none"}),i.jsx("path",{d:"M3.3 7.3v.8a4.7 4.7 0 0 0 9.4 0v-.8"}),i.jsx("path",{d:"M8 12.8v1.5"})]})}const Vy=4;function Fh(s,l){const r=s.name.toLowerCase();return r===l?0:r.startsWith(l)?1:s.aliases.some(c=>c.toLowerCase().startsWith(l))?2:r.includes(l)?3:Vy}function aw({request:s,queued:l,onDecide:r}){const c=Gy(s.toolName,s.input);return i.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:i.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true",children:[i.jsxs("div",{className:"sheet__head",children:["Разрешить действие?",l>0&&` (ещё ${l} в очереди)`]}),i.jsxs("div",{className:"sheet__body",children:[i.jsx("div",{className:"sheet__tool",children:s.toolName}),s.reason&&i.jsx("p",{className:"sheet__reason",children:s.reason}),c?i.jsx(Mp,{diff:c}):i.jsx("pre",{className:"code",children:JSON.stringify(s.input,null,2)})]}),i.jsxs("div",{className:"sheet__actions",children:[i.jsx("button",{className:"btn",onClick:()=>r(s.requestId,"deny"),children:"Отклонить"}),i.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>r(s.requestId,"allow"),children:"Разрешить"})]})]})})}function iw({request:s,queued:l,onAnswer:r,onDecline:c}){const{questions:o}=s,[d,h]=y.useState(()=>o.map(()=>new Set)),[m,g]=y.useState(()=>o.map(()=>"")),[x,_]=y.useState(()=>Dx(o));y.useEffect(()=>{h(o.map(()=>new Set)),g(o.map(()=>"")),_(Dx(o))},[s.requestId]);const S=y.useMemo(()=>cw(o,d,m),[o,d,m]),v=S!==null;function E(G,O){var Z,M;(M=(Z=o[G])==null?void 0:Z.options[O])!=null&&M.preview&&_(D=>{const H=D.slice();return H[G]=O,H})}function T(G,O,Z){h(M=>{const D=M.slice(),H=new Set(D[G]);return Z?H.has(O)?H.delete(O):H.add(O):H.has(O)||(H.clear(),H.add(O)),D[G]=H,D}),O!=="other"&&E(G,O)}function C(G,O){g(Z=>{const M=Z.slice();return M[G]=O,M})}function L(){S&&r(s.requestId,S)}function X(G){G.key==="Enter"&&(G.target.closest("button")||v&&(G.preventDefault(),L()))}function J(G){var D;if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(G.key))return;const O=Array.from(G.currentTarget.querySelectorAll("button.qsheet__option")),Z=O.indexOf(document.activeElement);if(Z===-1)return;G.preventDefault();const M=G.key==="ArrowDown"||G.key==="ArrowRight"?1:-1;(D=O[(Z+M+O.length)%O.length])==null||D.focus()}return i.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:i.jsxs("div",{className:"qsheet",role:"dialog","aria-modal":"true","aria-label":"Вопрос от Claude",onKeyDown:X,children:[i.jsxs("div",{className:"qsheet__head",children:[i.jsx("span",{className:"qsheet__head-icon","aria-hidden":"true",children:"?"}),i.jsxs("span",{children:[o.length===1?"Уточняющий вопрос":`Уточняющие вопросы (${o.length})`,l>0&&` — ещё ${l} в очереди`]})]}),i.jsxs("div",{className:"qsheet__body",children:[s.reason&&i.jsx("p",{className:"qsheet__reason",children:s.reason}),o.map((G,O)=>i.jsx(rw,{q:G,qi:O,selected:d[O]??new Set,otherText:m[O]??"",previewIndex:x[O]??null,onToggle:T,onFocusOption:E,onOtherText:C,onOptionsKeyDown:J},O))]}),i.jsxs("div",{className:"qsheet__actions",children:[i.jsx("button",{className:"btn",onClick:()=>c(s.requestId),children:"Не отвечать"}),i.jsx("button",{className:"btn btn--primary",disabled:!v,onClick:L,children:"Ответить"})]})]})})}function rw({q:s,qi:l,selected:r,otherText:c,previewIndex:o,onToggle:d,onFocusOption:h,onOtherText:m,onOptionsKeyDown:g}){var E;const x=s.options.some(T=>T.preview),_=o!==null?(E=s.options[o])==null?void 0:E.preview:void 0,S=r.has("other"),v=s.multiSelect?"checkbox":"radio";return i.jsxs("div",{className:"qsheet__question",children:[i.jsxs("div",{className:"qsheet__qhead",children:[i.jsx("span",{className:"chip chip--accent",children:s.header}),i.jsx("span",{className:"qsheet__qtext",children:s.question})]}),i.jsxs("div",{className:"qsheet__options"+(s.multiSelect?"":" qsheet__options--radio"),role:s.multiSelect?"group":"radiogroup","aria-label":s.question,onKeyDown:g,children:[s.options.map((T,C)=>{const L=r.has(C);return i.jsxs("button",{type:"button",role:v,"aria-checked":L,className:"qsheet__option"+(L?" is-selected":""),onClick:()=>d(l,C,s.multiSelect),onFocus:()=>h(l,C),onMouseEnter:()=>h(l,C),children:[i.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),i.jsxs("span",{className:"qsheet__opt-body",children:[i.jsx("span",{className:"qsheet__opt-label",children:T.label}),i.jsx("span",{className:"qsheet__opt-desc",children:T.description})]})]},C)}),i.jsxs("div",{className:"qsheet__other",children:[i.jsxs("button",{type:"button",role:v,"aria-checked":S,className:"qsheet__option qsheet__option--other"+(S?" is-selected":""),onClick:()=>d(l,"other",s.multiSelect),children:[i.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),i.jsxs("span",{className:"qsheet__opt-body",children:[i.jsx("span",{className:"qsheet__opt-label",children:"Другое"}),i.jsx("span",{className:"qsheet__opt-desc",children:"Свой вариант ответа"})]})]}),S&&i.jsx("input",{type:"text",className:"qsheet__other-input",placeholder:"Впишите свой вариант…","aria-label":`Свой вариант ответа на вопрос «${s.question}»`,value:c,onChange:T=>m(l,T.target.value),autoFocus:!0})]})]}),x&&i.jsx("pre",{className:"qsheet__preview",children:_??""})]})}function Dx(s){return s.map(l=>{const r=l.options.findIndex(c=>c.preview);return r===-1?null:r})}function cw(s,l,r){const c={};for(let o=0;o<s.length;o++){const d=s[o];if(!d)continue;const h=l[o]??new Set,m=[];for(let g=0;g<d.options.length;g++){const x=d.options[g];x&&h.has(g)&&m.push(x.label)}if(h.has("other")){const g=(r[o]??"").trim();g&&m.push(g)}if(m.length===0)return null;c[d.question]=m.join(", ")}return c}function ow({request:s,plan:l,queued:r,onAccept:c,onDecline:o}){const[d,h]=y.useState(l),[m,g]=y.useState("preview");y.useEffect(()=>{h(l),g("preview")},[s.requestId,l]);const x=d.trim().length>0;function _(){x&&c(s.requestId,d)}return i.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:i.jsxs("div",{className:"plansheet",role:"dialog","aria-modal":"true","aria-label":"План агента",children:[i.jsxs("div",{className:"plansheet__head",children:[i.jsx("span",{className:"plansheet__head-icon","aria-hidden":"true",children:i.jsx(fw,{})}),i.jsxs("span",{className:"plansheet__head-text",children:["План на согласование",r>0&&` — ещё ${r} в очереди`]}),i.jsxs("div",{className:"plansheet__viewtoggle",role:"tablist","aria-label":"Режим просмотра",children:[i.jsx("button",{className:"btn btn--sm"+(m==="preview"?" is-on":""),role:"tab","aria-selected":m==="preview",onClick:()=>g("preview"),children:"Просмотр"}),i.jsx("button",{className:"btn btn--sm"+(m==="source"?" is-on":""),role:"tab","aria-selected":m==="source",onClick:()=>g("source"),children:"Код"})]})]}),i.jsxs("div",{className:"plansheet__body",children:[s.reason&&i.jsx("p",{className:"plansheet__reason",children:s.reason}),i.jsx("div",{className:"plansheet__content",children:m==="preview"?i.jsx(uw,{text:d}):i.jsx("textarea",{className:"plansheet__source",value:d,onChange:S=>h(S.target.value),spellCheck:!1,"aria-label":"Текст плана — можно отредактировать перед тем, как согласиться",autoFocus:!0})})]}),i.jsxs("div",{className:"plansheet__actions",children:[i.jsx("button",{className:"btn",onClick:()=>o(s.requestId),children:"Доработать"}),i.jsx("button",{className:"btn btn--ok",disabled:!x,autoFocus:!0,onClick:_,children:"Одобрить план"})]})]})})}function uw({text:s}){const[l,r]=y.useState("");return y.useEffect(()=>{let c=!1;return $f(s).then(o=>{c||r(o)}),()=>{c=!0}},[s]),i.jsx("div",{className:"markdown-preview plansheet__preview",dangerouslySetInnerHTML:{__html:l}})}function fw(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M4.4 2.5h5.6L13 5.5v7.4a.6.6 0 0 1-.6.6H4.4a.6.6 0 0 1-.6-.6V3.1a.6.6 0 0 1 .6-.6Z"}),i.jsx("path",{d:"M9.5 2.5v2.5a.5.5 0 0 0 .5.5h3"}),i.jsx("path",{d:"M5.6 8.6 7 10l3-3.2"})]})}function dw(s,l){if(s!=="ExitPlanMode"||!l||typeof l!="object")return null;const r=l.plan;return typeof r=="string"?r:null}function $y({path:s}){const[l,r]=y.useState(!1),[c,o]=y.useState(!1),d=y.useRef(null);y.useEffect(()=>{if(!l)return;function m(g){var x;(x=d.current)!=null&&x.contains(g.target)||r(!1)}return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[l]),y.useEffect(()=>{if(!c)return;const m=setTimeout(()=>o(!1),Cp);return()=>clearTimeout(m)},[c]),y.useEffect(()=>r(!1),[s]);async function h(){await yc(s)&&o(!0)}return i.jsxs("div",{ref:d,className:"cwd",children:[i.jsxs("button",{type:"button",className:"cwd__toggle","aria-expanded":l,title:l?"Свернуть путь":`Полный путь: ${s}`,onClick:()=>r(m=>!m),onKeyDown:m=>{m.key!=="Escape"||!l||(m.preventDefault(),m.stopPropagation(),r(!1))},children:[i.jsx(hw,{open:l}),i.jsx("span",{className:"cwd__short",children:s})]}),l&&i.jsxs("div",{className:"cwd__pop",children:[i.jsx("span",{className:"cwd__full",children:s}),i.jsx("button",{type:"button",className:"btn btn--ghost cwd__copy",onClick:()=>void h(),children:c?oc:fr})]})]})}function hw({open:s}){return i.jsx("svg",{className:s?"cwd__chev cwd__chev--open":"cwd__chev",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}const pw=["low","medium","high"];function Qy({models:s,value:l,effort:r,ultracode:c,thinking:o,switchOnFlag:d,showSwitchOnFlag:h=!0,className:m,onModel:g,onEffort:x,onUltracode:_,onThinking:S,onSwitchOnFlag:v}){const[E,T]=y.useState(!1),[C,L]=y.useState(0),X=y.useRef(null),J=y.useRef(null),G=s.find(H=>H.value===l)??null,O=G&&G.supportsEffort?G.effortLevels.length>0?G.effortLevels:pw:[],Z=O.includes("xhigh");y.useEffect(()=>{if(!E)return;const H=s.findIndex(ne=>ne.value===l);L(H===-1?0:H)},[E]),y.useEffect(()=>{if(!E)return;function H(ne){var he;(he=X.current)!=null&&he.contains(ne.target)||T(!1)}return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[E]),y.useEffect(()=>{var H,ne;E&&((ne=(H=J.current)==null?void 0:H.querySelector(".is-cursor"))==null||ne.scrollIntoView({block:"nearest"}))},[E,C]);function M(H){T(!1),H.value!==l&&g(H.value)}function D(H){if(H.key==="Escape"){if(!E)return;H.preventDefault(),H.stopPropagation(),T(!1);return}if(H.key==="ArrowDown"||H.key==="ArrowUp"){if(H.preventDefault(),!E)return T(!0);if(s.length===0)return;const ne=H.key==="ArrowDown"?1:s.length-1;return L(he=>(he+ne)%s.length)}if(H.key==="Enter"||H.key===" "){if(H.preventDefault(),!E)return T(!0);const ne=s[C];ne&&M(ne)}}return i.jsxs("div",{ref:X,className:"select"+(E?" select--open":"")+(m?` ${m}`:""),children:[i.jsxs("button",{type:"button",className:"select__trigger",title:"Модель, усилие и размышления","aria-label":"Модель, усилие и размышления","aria-haspopup":"menu","aria-expanded":E,onClick:()=>T(H=>!H),onKeyDown:D,children:[(G==null?void 0:G.displayName)??l?i.jsx("span",{className:"select__value",children:(G==null?void 0:G.displayName)??l}):i.jsx("span",{className:"select__value select__value--muted",children:"по умолчанию"}),c?i.jsx("span",{className:"select__suffix select__suffix--hot",children:"ultracode"}):O.length>0&&r&&i.jsx("span",{className:"select__suffix",children:r}),i.jsx(mw,{})]}),E&&i.jsxs("div",{ref:J,className:"select__menu modelmenu",role:"menu",children:[i.jsx("div",{className:"modelmenu__head",children:"Модель"}),s.map((H,ne)=>i.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":H.value===l,className:"select__option"+(ne===C?" is-cursor":"")+(H.value===l?" is-on":""),onMouseEnter:()=>L(ne),onClick:()=>M(H),children:[i.jsx("span",{className:"select__check","aria-hidden":"true",children:H.value===l?"✓":""}),i.jsx("span",{className:"select__label",children:H.displayName}),H.description&&i.jsx("span",{className:"select__hint",children:H.description})]},H.value)),O.length>0&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"modelmenu__sep",role:"separator"}),i.jsxs("div",{className:"modelmenu__row",children:[i.jsxs("span",{className:"modelmenu__label",children:["Усилие",i.jsx("span",{className:"modelmenu__desc",children:"насколько усердно модель думает"})]}),i.jsx("span",{className:"modelmenu__levels",children:O.map(H=>i.jsx("button",{type:"button",role:"menuitemradio","aria-checked":H===r,className:H===r?"modelmenu__level is-on":"modelmenu__level",onClick:()=>x(H),children:H},H))})]}),Z&&i.jsx(Jh,{label:"Ultracode",desc:"xhigh и постоянная оркестрация подагентами",on:c,onToggle:()=>_(!c)})]}),i.jsx("div",{className:"modelmenu__sep",role:"separator"}),(G==null?void 0:G.supportsThinking)!==!1&&i.jsx(Jh,{label:"Размышления",desc:"расширенное обдумывание перед ответом",on:o,onToggle:()=>S(!o)}),h&&i.jsx(Jh,{label:"Менять модель по флагу",desc:"иначе помеченный ход встаёт на паузу",on:d,onToggle:()=>v(!d)})]})]})}function Jh({label:s,desc:l,on:r,onToggle:c}){return i.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":r,className:"modelmenu__row modelmenu__row--btn",onClick:c,children:[i.jsxs("span",{className:"modelmenu__label",children:[s,i.jsx("span",{className:"modelmenu__desc",children:l})]}),i.jsx("span",{className:r?"switch is-on":"switch","aria-hidden":"true",children:i.jsx("span",{className:"switch__knob"})})]})}function mw(){return i.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:i.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function jl({title:s,children:l,actions:r,className:c,sheet:o=!1,onClose:d}){const h=y.useRef(null);return y.useEffect(()=>{function m(g){if(g.key==="Escape"){g.preventDefault(),g.stopPropagation(),d();return}if(g.key!=="Tab")return;const x=h.current;if(!x)return;const _=x.querySelectorAll('button, input, textarea, select, a[href], [tabindex]:not([tabindex="-1"])'),S=_[0],v=_[_.length-1];!S||!v||(g.shiftKey&&document.activeElement===S?(g.preventDefault(),v.focus()):!g.shiftKey&&document.activeElement===v&&(g.preventDefault(),S.focus()))}return document.addEventListener("keydown",m,!0),()=>document.removeEventListener("keydown",m,!0)},[d]),i.jsx("div",{className:o?"modal-backdrop modal-backdrop--sheet":"modal-backdrop",onMouseDown:m=>{m.target===m.currentTarget&&d()},children:i.jsxs("div",{ref:h,className:c?`modal ${c}`:"modal",role:"dialog","aria-modal":"true","aria-label":s,children:[i.jsxs("div",{className:"modal__head",children:[i.jsx("h2",{className:"modal__title",children:s}),i.jsx("button",{className:"modal__close","aria-label":"Закрыть",onClick:d,children:"✕"})]}),i.jsx("div",{className:"modal__body",children:l}),r&&i.jsx("div",{className:"modal__actions",children:r})]})})}function gw({candidates:s,searching:l,agentItems:r,agentBusy:c,error:o,roots:d,created:h,onSearch:m,onAskAgent:g,onInterrupt:x,onSubmit:_,onCreate:S,onClose:v}){const[E,T]=y.useState("open"),[C,L]=y.useState(""),[X,J]=y.useState(!1),[G,O]=y.useState(""),[Z,M]=y.useState(""),[D,H]=y.useState({git:!0,claudeMd:!0,readme:!0}),ne=C.trim(),he=ne!=="",W=G.trim(),ue=Z.trim(),je=W!==""&&ue!=="";y.useEffect(()=>{G===""&&d.length>0&&O(d[0])},[d]);const Me=y.useRef(m);Me.current=m,y.useEffect(()=>{if(E!=="open")return;const z=C.trim(),be=setTimeout(()=>Me.current(z),200);return()=>clearTimeout(be)},[C,E]);function Ce(){he&&_(ne)}function A(){je&&S(W,ue,D)}function ce(){he&&(J(!0),g(ne))}return h?i.jsxs(jl,{title:"Новый проект",onClose:v,actions:i.jsx("button",{className:"btn btn--primary",onClick:v,autoFocus:!0,children:"Понятно"}),children:[i.jsx("p",{className:"modal__text",children:"Каталог создан и открыт как проект, но часть шагов не удалась."}),i.jsx("p",{className:"newproj__preview",children:h.path}),i.jsx("div",{className:"modal__error",children:i.jsx("ul",{className:"newproj__warnings",children:h.warnings.map(z=>i.jsx("li",{children:z},z))})}),i.jsx("p",{className:"modal__text modal__text--dim",children:"Проект открыт и работает — недостающее можно добавить руками, в дереве файлов или из терминала."})]}):i.jsxs(jl,{title:"Новый проект",className:X&&E==="open"?"modal--wide":void 0,onClose:v,actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:v,children:"Отмена"}),E==="open"?i.jsxs(i.Fragment,{children:[c?i.jsx("button",{className:"btn",onClick:x,children:"Остановить"}):i.jsx("button",{className:"btn",disabled:!he,onClick:ce,title:"Найти по описанию",children:"Попросить агента"}),i.jsx("button",{className:"btn btn--primary",disabled:!he,onClick:Ce,children:"Открыть"})]}):i.jsx("button",{className:"btn btn--primary",disabled:!je,onClick:A,children:"Создать"})]}),children:[i.jsxs("div",{className:"tabs",children:[i.jsx(Ox,{label:"Открыть",on:E==="open",onClick:()=>T("open")}),i.jsx(Ox,{label:"Создать",on:E==="create",onClick:()=>T("create")})]}),E==="open"?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"modal__text",children:"Каталог, в котором будет работать агент. Введите путь или часть имени — подходящие каталоги появятся ниже."}),i.jsx("label",{className:"field",htmlFor:"workspace-path",children:"Путь или название"}),i.jsx("input",{id:"workspace-path",className:"input input--mono",value:C,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects\\my-app",onChange:z=>L(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),Ce())}}),o&&i.jsx("p",{className:"modal__error",children:o}),s.length>0&&i.jsx("ul",{className:"finds",children:s.map(z=>i.jsx("li",{children:i.jsxs("button",{className:"find",disabled:z.open,title:z.open?"Этот проект уже открыт":z.path,onClick:()=>L(z.path),onDoubleClick:()=>_(z.path),children:[i.jsx("span",{className:"find__name",children:z.name}),i.jsx("span",{className:"find__path",children:z.path}),i.jsx("span",{className:"find__note",children:yw(z)})]})},z.path))}),s.length===0&&he&&!l&&!X&&i.jsx("p",{className:"modal__text modal__text--dim",children:"Ничего похожего среди каталогов, где вы работали. Если помните не имя, а суть проекта — опишите его и нажмите «Попросить агента». Проекта ещё нет вовсе — рядом вкладка «Создать»."}),X&&i.jsx("div",{className:"finds__agent",children:i.jsx(Rp,{items:r,busy:c,waiting:!1,empty:"Агент ищет…"})})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"modal__text",children:"Пустой каталог для нового проекта. Дальше в нём работает агент — с первого промпта, без отдельной настройки."}),i.jsx("label",{className:"field",htmlFor:"workspace-parent",children:"Где создать"}),i.jsx("input",{id:"workspace-parent",className:"input input--mono",value:G,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects",onChange:z=>O(z.target.value)}),d.length>0&&i.jsx("div",{className:"newproj__roots",children:d.map(z=>i.jsx("button",{type:"button",className:z===W?"newproj__root is-on":"newproj__root",title:z,onClick:()=>O(z),children:xw(z)},z))}),i.jsx("label",{className:"field newproj__field",htmlFor:"workspace-name",children:"Имя проекта"}),i.jsx("input",{id:"workspace-name",className:"input input--mono",value:Z,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"my-app",onChange:z=>M(z.target.value),onKeyDown:z=>{z.key==="Enter"&&(z.preventDefault(),A())}}),i.jsx("p",{className:"newproj__preview",children:je?bw(W,ue):"Каталог появится здесь"}),o&&i.jsx("p",{className:"modal__error",children:o}),i.jsxs("div",{className:"newproj__opts",children:[i.jsx(Wh,{label:"git init",desc:"панель истории работает сразу",on:D.git,onToggle:()=>H(z=>({...z,git:!z.git}))}),i.jsx(Wh,{label:"CLAUDE.md",desc:"заготовка инструкций для агента",on:D.claudeMd,onToggle:()=>H(z=>({...z,claudeMd:!z.claudeMd}))}),i.jsx(Wh,{label:"README.md",desc:"по нему проект потом узнаёт поиск",on:D.readme,onToggle:()=>H(z=>({...z,readme:!z.readme}))})]})]})]})}function Ox({label:s,on:l,onClick:r}){return i.jsx("button",{type:"button",className:l?"tabs__tab is-on":"tabs__tab","aria-pressed":l,onClick:r,children:s})}function Wh({label:s,desc:l,on:r,onToggle:c}){return i.jsxs("button",{type:"button",role:"checkbox","aria-checked":r,className:"newproj__opt",onClick:c,children:[i.jsxs("span",{className:"newproj__optlabel",children:[s,i.jsx("span",{className:"newproj__optdesc",children:l})]}),i.jsx("span",{className:r?"switch is-on":"switch","aria-hidden":"true",children:i.jsx("span",{className:"switch__knob"})})]})}function bw(s,l){const r=s.includes("\\")?"\\":"/";return s.replace(/[\\/]+$/,"")+r+l}function xw(s){const l=s.includes("\\")?"\\":"/",r=s.split(/[\\/]/).filter(Boolean);return r.length<=2?s:`…${l}${r.slice(-2).join(l)}`}function yw(s){return s.open?"уже открыт":s.why?s.why:s.sessions===0?"рядом с вашими проектами":`${_w(s.sessions)}${vw(s.lastUsedAt)}`}function _w(s){const l=s%10,r=s%100;return r>=11&&r<=14?`${s} сессий`:l===1?`${s} сессия`:l>=2&&l<=4?`${s} сессии`:`${s} сессий`}function vw(s){if(!s)return"";const l=Math.floor((Date.now()-s)/864e5);return l<=0?" · сегодня":l===1?" · вчера":l<30?` · ${l} дн. назад`:` · ${new Date(s).toLocaleDateString("ru-RU")}`}const Dp=7;function jw(s){const l=[],r=[];let c=1;for(const o of s){const d=l.slice();let h=l.indexOf(o.hash);h===-1&&(h=Lx(l),l[h]=o.hash);const[m,...g]=o.parents;l[h]=m??null;const x=[];m!==void 0&&x.push({from:h,to:h});for(const v of g){let E=l.indexOf(v);E===-1&&(E=Lx(l),l[E]=v),x.push({from:h,to:E})}const _=[];for(let v=0;v<d.length;v++)d[v]===o.hash&&(_.push({from:v,to:h}),v!==h&&(l[v]=null));const S=[];for(let v=0;v<d.length;v++){const E=d[v];!E||E===o.hash||v===h||l[v]===E&&S.push(v)}Sw(l),c=Math.max(c,l.length,h+1),r.push({commit:o,col:h,up:_,down:x,through:S})}return{rows:r,columns:Math.min(c,Dp)}}function Lx(s){const l=s.indexOf(null);return l!==-1?l:(s.push(null),s.length-1)}function Sw(s){for(;s.length>0&&s[s.length-1]===null;)s.pop()}const Ky=1500;function ww(s){const l=[];let r=!1;for(const c of s.patch.split(`
119
+ `)){if(l.length>=Ky){r=!0;break}if(c.startsWith("@@"))l.push({type:"gap",text:kw(c)});else if(c.startsWith("+"))l.push({type:"add",text:c.slice(1)});else if(c.startsWith("-"))l.push({type:"del",text:c.slice(1)});else{if(c.startsWith("\\"))continue;(c!==""||l.length>0)&&l.push({type:"ctx",text:c.startsWith(" ")?c.slice(1):c})}}return{kind:"patch",filePath:s.path||s.oldPath,rows:l,added:s.added,removed:s.removed,note:Nw(s,r)}}function kw(s){const l=/^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@ ?(.*)$/.exec(s);if(!l)return s;const r=Number(l[1]),c=l[2]===void 0?1:Number(l[2]),o=(l[3]??"").trim(),d=c>1?`строки ${r}–${r+c-1}`:`строка ${r}`;return o?`⋯ ${d} · ${o}`:`⋯ ${d}`}function Nw(s,l){const r=[];return s.status==="added"&&r.push("новый файл"),s.status==="deleted"&&r.push("файл удалён"),s.status==="renamed"&&r.push(`переименован из ${s.oldPath}`),s.binary?r.push("двоичный файл"):s.patch===""&&r.push("содержимое не показано"),l&&r.push(`показаны первые ${Ky} строк`),r.length>0?r.join(" · "):null}function Tw({open:s,state:l,result:r,selected:c,busy:o,onRefresh:d,onShow:h,onCheckout:m,onPush:g,onPull:x,onPublish:_,onConnectRemote:S,onDismissResult:v,onClose:E,zoomed:T,onToggleZoom:C}){const L=jw((l==null?void 0:l.commits)??[]),X=[...l!=null&&l.detached?[{value:"",label:`отделён · ${l.head.slice(0,8)}`}]:[],...((l==null?void 0:l.branches)??[]).map(J=>({value:J.name,label:J.name,hint:J.hash.slice(0,8)}))];return i.jsxs("aside",{className:(s?"sidepane sidepane--git sidepane--open":"sidepane sidepane--git")+(T?" sidepane--zoomed":""),"aria-label":"История git",children:[i.jsxs("div",{className:"sidepane__head",onDoubleClick:J=>{C&&(J.target.closest("button")||C())},children:[i.jsx(Rw,{}),i.jsx("span",{className:"sidepane__title",children:"История"}),i.jsx("button",{className:"sidepane__btn",title:"Обновить","aria-label":"Обновить историю",onClick:d,children:"↻"}),C&&i.jsx("button",{className:"sidepane__btn",title:T?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":T?"Свернуть панель истории":"Развернуть панель истории на весь экран","aria-pressed":T,onClick:C,children:i.jsx(vc,{active:T})}),i.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель истории",onClick:E,children:"✕"})]}),l===null?i.jsx("p",{className:"sidepane__empty",children:"Читаем репозиторий…"}):l.available?i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"gitbar",children:i.jsx(Ms,{className:"gitbar__branch",title:"Ветка — выбрать значит переключиться",value:l.detached?"":l.branch,options:X,onChange:J=>{J&&m(J,`ветку ${J}`)}})}),l.detached&&i.jsx("p",{className:"gitbar__note",children:"HEAD отделён от ветки. Выберите ветку в списке, чтобы вернуться."}),i.jsx("div",{className:"gitbar__actions",children:o?i.jsxs("p",{className:"gitbar__busy",children:[i.jsx(zw,{}),o]}):l.hasRemote?i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",className:"btn btn--sm",title:"Отправить текущую ветку в origin",onClick:g,children:[i.jsx(Dw,{}),"Отправить",l.ahead>0&&i.jsx("span",{className:"gitbar__count",children:l.ahead})]}),i.jsxs("div",{className:"gitbar__group",children:[i.jsxs("button",{type:"button",className:"btn btn--sm",title:"Забрать с origin и перемотать вперёд (git pull --ff-only)",onClick:()=>x(!0),children:[i.jsx(Ow,{}),"Забрать",l.behind>0&&i.jsx("span",{className:"gitbar__count",children:l.behind})]}),i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost gitbar__check",title:"Только проверить — git fetch, рабочее дерево не меняется","aria-label":"Проверить, что нового на origin, без изменений на диске",onClick:()=>x(!1),children:i.jsx(Lw,{})})]})]}):i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",className:"btn btn--sm btn--primary",title:"Создать репозиторий на GitHub и отправить в него ветку",onClick:_,children:[i.jsx(Ux,{}),"Опубликовать на GitHub"]}),i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",title:"Прописать origin на уже существующий репозиторий",onClick:S,children:"уже есть репозиторий"})]})}),i.jsxs("div",{className:"sidepane__scroll",children:[i.jsx("button",{className:"gitrow gitrow--work"+(c===""?" is-on":""),onClick:()=>h(""),children:i.jsxs("span",{className:"gitrow__body",children:[i.jsx("span",{className:"gitrow__subject",children:l.changed.length>0?`Рабочее дерево · ${l.changed.length} ${Bw(l.changed.length)}`:"Рабочее дерево чистое"}),i.jsx("span",{className:"gitrow__meta",children:l.changed.length>0?l.changed.slice(0,4).map(J=>Hw(J.path)).join(", "):"незакоммиченных изменений нет"})]})}),L.rows.map(J=>i.jsx(Ew,{row:J,columns:L.columns,head:J.commit.hash===l.head,local:l.hasRemote&&!J.commit.pushed,active:c===J.commit.hash,onOpen:()=>h(J.commit.hash)},J.commit.hash)),L.rows.length===0&&i.jsx("p",{className:"sidepane__empty",children:"В репозитории ещё нет коммитов"})]})]}):i.jsxs("div",{className:"gitempty",children:[i.jsx("p",{className:"gitempty__text",children:l.message||"Это не git-репозиторий"}),l.noRepo&&i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",className:"btn btn--sm btn--primary gitempty__btn",onClick:_,children:[i.jsx(Ux,{}),"Опубликовать на GitHub"]}),i.jsx("p",{className:"gitempty__hint",children:"Заведёт репозиторий, сделает первый коммит и отправит его на GitHub."})]})]}),i.jsx(pr,{result:r,onDismiss:v})]})}const Do=50,zx=13;function Ew({row:s,columns:l,head:r,local:c,active:o,onOpen:d}){const{commit:h}=s,m=h.refs.map(Uw).filter(Boolean);return i.jsxs("button",{className:"gitrow"+(o?" is-on":""),title:c?"Коммит ещё не отправлен на удалённый репозиторий":void 0,onClick:d,children:[i.jsx(Cw,{row:s,columns:l,head:r,local:c}),i.jsxs("span",{className:"gitrow__body",children:[i.jsxs("span",{className:"gitrow__subject",children:[m.map(g=>i.jsx("span",{className:"gitrow__ref",children:g},g)),h.subject]}),i.jsxs("span",{className:"gitrow__meta",children:[h.shortHash," · ",h.author," · ",Iw(h.date),c&&i.jsx("span",{className:"gitrow__local",children:"· не отправлен"})]})]})]})}function Cw({row:s,columns:l,head:r,local:c}){const o=l*zx+6,d=Do/2,h=x=>8+Math.min(x,Dp-1)*zx,m=c?"3.5 2.5":void 0,g=wf(s.col);return i.jsxs("svg",{className:"gitgraph",width:o,height:Do,viewBox:`0 0 ${o} ${Do}`,"aria-hidden":"true",children:[s.through.map(x=>i.jsx("line",{x1:h(x),y1:0,x2:h(x),y2:Do,style:{stroke:wf(x)}},`t${x}`)),s.up.map((x,_)=>i.jsx("path",{d:`M${h(x.from)} 0 L${h(x.from)} ${d-12} L${h(x.to)} ${d}`,fill:"none",style:{stroke:wf(x.from),strokeDasharray:m}},`u${_}`)),s.down.map((x,_)=>i.jsx("path",{d:`M${h(x.from)} ${d} L${h(x.to)} ${d+12} L${h(x.to)} ${Do}`,fill:"none",style:{stroke:wf(x.to),strokeDasharray:m}},`d${_}`)),r&&i.jsx("circle",{className:"gitgraph__head",cx:h(s.col),cy:d,r:s.commit.parents.length>1?7.4:6.6}),i.jsx("circle",{className:"gitgraph__dot",cx:h(s.col),cy:d,r:s.commit.parents.length>1?4.6:3.6,style:{stroke:g,fill:c?void 0:g}})]})}function wf(s){return`var(--lane-${s%Dp})`}function Aw({detail:s,local:l,onCheckout:r,onClose:c}){const o=s.hash==="";return i.jsxs(jl,{className:"modal--wide",title:o?"Незакоммиченные изменения":`Коммит ${s.shortHash}`,onClose:c,actions:i.jsxs(i.Fragment,{children:[!o&&i.jsx("button",{className:"btn",onClick:()=>r(s.hash,`коммит ${s.shortHash} (HEAD отделится от ветки)`),children:"Переключиться сюда"}),i.jsx("button",{className:"btn btn--primary",onClick:c,children:"Закрыть"})]}),children:[!o&&i.jsxs("div",{className:"commit__head",children:[i.jsx("p",{className:"commit__subject",children:s.subject}),i.jsxs("p",{className:"commit__meta",children:[s.author,s.email&&` <${s.email}>`," · ",qw(s.date)," ·"," ",i.jsx("span",{className:"commit__hash",children:s.hash})]}),l&&i.jsx("p",{className:"commit__meta commit__meta--local",children:"Не отправлен: этого коммита нет ни в одной удалённой ветке."}),s.parents.length>0&&i.jsxs("p",{className:"commit__meta",children:[s.parents.length>1?"слияние: ":"родитель: ",s.parents.map(d=>d.slice(0,8)).join(", ")]}),s.body&&i.jsx("pre",{className:"commit__body",children:s.body})]}),s.truncated&&i.jsx("p",{className:"modal__text",children:"Изменения слишком велики — часть патча не показана."}),s.files.length===0?i.jsx("p",{className:"modal__text",children:"Изменений нет."}):s.files.map(d=>i.jsx(Mw,{file:d,defaultOpen:s.files.length<=3},d.path+d.oldPath))]})}function Mw({file:s,defaultOpen:l}){const[r,c]=y.useState(l);return i.jsxs("div",{className:"commit__file",children:[i.jsxs("button",{className:"commit__filehead",onClick:()=>c(o=>!o),children:[i.jsx("span",{className:"commit__filepath",children:s.path||s.oldPath}),i.jsxs("span",{className:"diff__stat",children:[s.added>0&&i.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&i.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]}),i.jsx("span",{className:"tool__status",children:r?"▴":"▾"})]}),r&&i.jsx(Mp,{diff:ww(s)})]})}function Rw(){return i.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),i.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),i.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),i.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function Dw(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M8 13V3M4.5 6.5 8 3l3.5 3.5"})})}function Ow(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:i.jsx("path",{d:"M8 3v10M4.5 9.5 8 13l3.5-3.5"})})}function Lw(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"7",cy:"7",r:"4"}),i.jsx("path",{d:"m13 13-2.6-2.6"})]})}function Ux(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:i.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8Z"})})}function zw(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),i.jsx("path",{d:"M14 2v3.33h-3.33"})]})}function Uw(s){return s.replace(/^HEAD -> /,"").replace(/^tag: /,"⌂ ").trim()}function Hw(s){const l=s.split("/");return l[l.length-1]??s}function Bw(s){const l=s%100;if(l>=11&&l<=14)return"файлов";switch(s%10){case 1:return"файл";case 2:case 3:case 4:return"файла";default:return"файлов"}}function Iw(s){const l=Date.parse(s);if(Number.isNaN(l))return s;const r=Math.round((Date.now()-l)/6e4);if(r<1)return"только что";if(r<60)return`${r} мин назад`;const c=Math.round(r/60);if(c<24)return`${c} ч назад`;const o=Math.round(c/24);return o<30?`${o} дн назад`:new Date(l).toLocaleDateString()}function qw(s){const l=Date.parse(s);return Number.isNaN(l)?s:new Date(l).toLocaleString()}function Hx(s){return s.replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"")}function Gw({status:s,owners:l,files:r,defaultName:c,hasCommits:o,busy:d,result:h,onRefreshStatus:m,onSaveToken:g,onPublish:x,onDismissResult:_,onClose:S}){var z;const[v,E]=y.useState(()=>Hx(c)),[T,C]=y.useState(""),[L,X]=y.useState(""),[J,G]=y.useState(!0),[O,Z]=y.useState("Первый коммит"),[M,D]=y.useState(null),[H,ne]=y.useState("");y.useEffect(()=>{!T&&l.length>0&&C(l[0].login)},[T,l]),y.useEffect(()=>{r&&M===null&&D(new Set(r.files))},[r,M]);const he=(s==null?void 0:s.connected)===!0,W=l.map(be=>({value:be.login,label:be.login,hint:be.kind==="org"?"организация":void 0})),ue=y.useMemo(()=>{if(!r)return[];const be=H.trim().toLowerCase();return be?r.files.filter(ye=>ye.toLowerCase().includes(be)):r.files},[r,H]),je=(M==null?void 0:M.size)??0,Me=he&&v.trim()!==""&&T!==""&&d===""&&(o||je>0);function Ce(be){D(ye=>{const N=new Set(ye??[]);return N.has(be)?N.delete(be):N.add(be),N})}function A(be){D(ye=>{const N=new Set(ye??[]);for(const V of ue)be?N.add(V):N.delete(V);return N})}function ce(){if(!Me)return;const be=(r==null?void 0:r.files)??[];x({owner:T,name:v.trim(),description:L.trim(),private:J,include:o?[]:be.filter(ye=>M==null?void 0:M.has(ye)),ignore:o?[]:be.filter(ye=>!(M!=null&&M.has(ye))),message:o?"":O.trim()||"Первый коммит"})}return i.jsxs(jl,{className:"modal--wide",title:"Опубликовать на GitHub",onClose:S,actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"btn",onClick:S,children:"Отмена"}),i.jsx("button",{type:"button",className:"btn btn--primary",disabled:!Me,onClick:ce,children:d||"Опубликовать"})]}),children:[i.jsx(Yw,{status:s,onRefreshStatus:m,onSaveToken:g}),i.jsxs("div",{className:"publish__section",children:[i.jsx("h3",{className:"publish__heading",children:"Репозиторий"}),i.jsxs("label",{className:"field publish__field",children:[i.jsx("span",{children:"Имя"}),i.jsx("input",{className:"input input--mono",value:v,spellCheck:!1,autoComplete:"off",onChange:be=>E(Hx(be.target.value))})]}),v.trim()===""&&i.jsx("p",{className:"modal__error",children:"Имя репозитория не может быть пустым."}),i.jsxs("label",{className:"field publish__field",children:[i.jsx("span",{children:"Владелец"}),l.length>1?i.jsx(Ms,{className:"settings__select",value:T,options:W,onChange:C,placeholder:"выберите владельца",ariaLabel:"Владелец репозитория"}):i.jsx("p",{className:"publish__static",children:((z=l[0])==null?void 0:z.login)??"—"})]}),i.jsxs("label",{className:"field publish__field",children:[i.jsx("span",{children:"Описание (необязательно)"}),i.jsx("input",{className:"input",value:L,placeholder:"о чём проект — одной строкой",onChange:be=>X(be.target.value)})]}),i.jsxs("div",{className:"field publish__field",children:[i.jsx("span",{children:"Видимость"}),i.jsxs("div",{className:"access",role:"radiogroup","aria-label":"Видимость репозитория",children:[i.jsx(Bx,{title:"Приватный",desc:"Виден только вам и тем, кого вы пригласите. Стоит по умолчанию: репозиторий с чужим кодом, случайно ставший публичным, потом не отозвать.",on:J,onClick:()=>G(!0)}),i.jsx(Bx,{title:"Публичный",desc:"Виден всем в интернете — код, история коммитов, всё содержимое.",risky:!0,on:!J,onClick:()=>G(!1)})]})]})]}),!o&&i.jsxs("div",{className:"publish__section",children:[i.jsx("h3",{className:"publish__heading",children:"Файлы первого коммита"}),r===null?i.jsx("p",{className:"modal__text",children:"Читаем файлы…"}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"publish__filehead",children:[i.jsxs("span",{className:"publish__filecount",children:[je," из ",r.files.length," файлов"]}),i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",onClick:()=>A(!0),children:"Отметить все"}),i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",onClick:()=>A(!1),children:"Снять все"})]}),r.files.length>8&&i.jsx("input",{className:"input publish__filter",value:H,placeholder:"Фильтр по пути…",spellCheck:!1,onChange:be=>ne(be.target.value)}),i.jsx("div",{className:"publish__filelist",children:ue.length===0?i.jsx("p",{className:"modal__text publish__filesempty",children:"Ничего не найдено по фильтру."}):ue.map(be=>i.jsxs("button",{type:"button",role:"checkbox","aria-checked":(M==null?void 0:M.has(be))===!0,className:"publish__file",onClick:()=>Ce(be),children:[i.jsx("span",{className:"publish__box"+(M!=null&&M.has(be)?" is-on":""),"aria-hidden":"true",children:(M==null?void 0:M.has(be))&&"✓"}),i.jsx("span",{className:"publish__filepath",children:be})]},be))}),r.truncated&&i.jsx("p",{className:"publish__truncated",children:"Каталог больше, чем показано здесь, — часть файлов в список не попала. Их всё равно можно закоммитить потом обычным образом."}),i.jsxs("label",{className:"field publish__field",children:[i.jsx("span",{children:"Сообщение коммита"}),i.jsx("input",{className:"input",value:O,onChange:be=>Z(be.target.value)})]})]})]}),i.jsx(pr,{result:h,onDismiss:_})]})}function Bx({title:s,desc:l,on:r,risky:c,onClick:o}){return i.jsxs("button",{type:"button",role:"radio","aria-checked":r,className:"access__card"+(r?" is-on":"")+(c?" access__card--risky":""),onClick:o,children:[i.jsx("span",{className:"access__radio","aria-hidden":"true"}),i.jsxs("span",{className:"access__body",children:[i.jsxs("span",{className:"access__title",children:[s,c&&i.jsx("span",{className:"access__risk",children:"видно всем"})]}),i.jsx("span",{className:"access__desc",children:l})]})]})}function Yw({status:s,onRefreshStatus:l,onSaveToken:r}){const[c,o]=y.useState(""),[d,h]=y.useState(!1);return i.jsxs("div",{className:"publish__section publish__section--first",children:[i.jsx("h3",{className:"publish__heading",children:"Учётная запись GitHub"}),s===null?i.jsx("p",{className:"modal__text",children:"Проверяем подключение…"}):s.connected?i.jsxs("div",{className:"publish__account",children:[i.jsx("span",{className:"chip chip--ok",children:s.login}),i.jsx("span",{className:"publish__accountvia",children:s.source==="gh"?"через GitHub CLI":"по личному токену"}),s.source==="token"&&i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",onClick:()=>r(""),children:"Отключить токен"})]}):i.jsxs("div",{className:"publish__connect",children:[s.ghInstalled&&i.jsxs("p",{className:"modal__text",children:["В системе установлен ",i.jsx("code",{children:"gh"}),", но вход в нём не выполнен. Можно вместо токена выполнить ",i.jsx("code",{children:"gh auth login"})," в панели терминала и нажать «Проверить снова» — либо ввести личный токен ниже."]}),i.jsxs("label",{className:"field publish__field",children:[i.jsx("span",{children:"Личный токен GitHub"}),i.jsx(Xw,{value:c,onChange:o,visible:d,onToggleVisible:()=>h(m=>!m),placeholder:"ghp_…"})]}),i.jsxs("p",{className:"publish__tokenhint",children:["Нужен токен с доступом ",i.jsx("code",{children:"repo"})," — им приложение создаст репозиторий и отправит в него код."," ",i.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo&description=Claude%20Code%20Visual",target:"_blank",rel:"noreferrer",children:"Создать токен на GitHub ↗"})]}),s.message&&i.jsx("p",{className:"modal__error",children:s.message}),i.jsxs("div",{className:"extbar",children:[i.jsx("button",{type:"button",className:"btn btn--sm btn--ghost",onClick:l,children:"Проверить снова"}),i.jsx("button",{type:"button",className:"btn btn--sm btn--primary",disabled:c.trim()==="",onClick:()=>r(c.trim()),children:"Сохранить токен"})]})]})]})}function Xw({value:s,onChange:l,visible:r,onToggleVisible:c,placeholder:o,autoFocus:d}){return i.jsxs("div",{className:"pwfield",children:[i.jsx("input",{className:"input input--mono pwfield__input",type:r?"text":"password",value:s,placeholder:o,spellCheck:!1,autoComplete:"off",autoFocus:d,onChange:h=>l(h.target.value)}),i.jsx("button",{type:"button",className:"pwfield__toggle","aria-label":r?"Скрыть токен":"Показать токен","aria-pressed":r,onClick:c,children:r?i.jsx($w,{}):i.jsx(Vw,{})})]})}function Vw(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5Z"}),i.jsx("circle",{cx:"8",cy:"8",r:"2.1"})]})}function $w(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5Z"}),i.jsx("circle",{cx:"8",cy:"8",r:"2.1"}),i.jsx("path",{d:"M2 14 14 2"})]})}function Qw({busy:s,result:l,onSubmit:r,onDismissResult:c,onClose:o}){const[d,h]=y.useState(""),m=/^(https?|ssh|git):\/\/\S+/i.test(d.trim())||/^[\w.-]+@[\w.-]+:.+/.test(d.trim());return i.jsxs(jl,{title:"Подключить существующий репозиторий",onClose:o,actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:"btn",onClick:o,children:"Отмена"}),i.jsx("button",{type:"button",className:"btn btn--primary",disabled:!m||s!=="",onClick:()=>r(d.trim()),children:s||"Подключить"})]}),children:[i.jsxs("p",{className:"modal__text",children:["Пропишет этот адрес как ",i.jsx("code",{children:"origin"})," текущего репозитория. Ничего не отправляется само — после этого в панели появятся обычные «Отправить» и «Забрать»."]}),i.jsxs("label",{className:"field",children:[i.jsx("span",{children:"Адрес репозитория"}),i.jsx("input",{className:"input input--mono",value:d,placeholder:"https://github.com/owner/name.git",spellCheck:!1,autoComplete:"off",autoFocus:!0,onChange:g=>h(g.target.value),onKeyDown:g=>{g.key==="Enter"&&m&&s===""&&r(d.trim())}})]}),i.jsxs("p",{className:"modal__text modal__text--dim",children:["Подходят адреса вида ",i.jsx("code",{children:"https://…"}),", ",i.jsx("code",{children:"ssh://…"}),", ",i.jsx("code",{children:"git://…"})," и"," ",i.jsx("code",{children:"git@host:path"}),"."]}),i.jsx(pr,{result:l,onDismiss:c})]})}function Kw({open:s,items:l,busy:r,ready:c,commands:o,contextResult:d,draftKey:h,models:m,model:g,effort:x,ultracode:_,thinking:S,switchOnFlag:v,onContextSearch:E,onCommand:T,onModel:C,onEffort:L,onUltracode:X,onThinking:J,onSwitchOnFlag:G,onAsk:O,onInterrupt:Z,onReset:M,onClose:D,zoomed:H,onToggleZoom:ne}){return i.jsxs("aside",{className:(s?"sidepane sidepane--ask sidepane--open":"sidepane sidepane--ask")+(H?" sidepane--zoomed":""),"aria-label":"Вопрос на полях",children:[i.jsxs("div",{className:"sidepane__head",onDoubleClick:he=>{ne&&(he.target.closest("button")||ne())},children:[i.jsx(Zw,{}),i.jsx("span",{className:"sidepane__title",children:"Вопрос на полях"}),i.jsx("button",{className:"sidepane__btn",title:"Начать заново — следующий вопрос возьмёт свежий контекст","aria-label":"Начать боковой разговор заново",disabled:l.length===0,onClick:M,children:"↻"}),ne&&i.jsx("button",{className:"sidepane__btn",title:H?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":H?"Свернуть панель вопроса":"Развернуть панель вопроса на весь экран","aria-pressed":H,onClick:ne,children:i.jsx(vc,{active:H})}),i.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель вопроса",onClick:D,children:"✕"})]}),m.length>0&&i.jsxs("div",{className:"sidepane__tools",children:[i.jsx(Qy,{className:"select--compact",models:m,value:g,effort:x,ultracode:_,thinking:S,switchOnFlag:v,onModel:C,onEffort:L,onUltracode:X,onThinking:J,onSwitchOnFlag:G}),i.jsx("span",{className:"sidepane__note",title:"Боковой вопрос работает только на чтение",children:"только чтение"})]}),i.jsx(Rp,{items:l,busy:r,waiting:!1,empty:c?"Спросите о том, что происходит: вопрос уйдёт в сторону от основного разговора и не попадёт в его контекст. Отвечающий видит сессию и проект, но ничего не меняет.":"Откройте сессию — вопрос задаётся о ней."}),i.jsx(Xy,{className:"composer--side",disabled:!c,busy:r,commands:o,sessionTitle:null,contextResult:d,draftKey:h?`side:${h}`:null,placeholder:"Спросить, не мешая работе…",sendLabel:"Спросить",autoFocus:s,attachmentsEnabled:!1,onContextSearch:E,onCommand:T,onSend:O,onInterrupt:Z,onEscape:r?Z:D})]})}function Zw(){return i.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M13.6 9.4a1.6 1.6 0 0 1-1.6 1.6H6.2L3.2 13.4V4.2a1.6 1.6 0 0 1 1.6-1.6h7.2a1.6 1.6 0 0 1 1.6 1.6Z"}),i.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}const Fw=75,Jw=90;function Zy({usage:s}){if(!(s!=null&&s.available))return null;const l=s.buckets??[],r=l.length>0?l.map(o=>({key:o.id,label:o.label,window:o.window})):[...s.fiveHour?[{key:"five",label:"5 ч",window:s.fiveHour}]:[],...s.sevenDay?[{key:"week",label:"нед",window:s.sevenDay}]:[]];if(r.length===0)return null;const c=l.length>0?"Квота Antigravity":`Расход лимитов плана${s.plan?` ${s.plan}`:""}`;return i.jsx("div",{className:"usage",title:ek(s,l),"aria-label":c,children:r.map(o=>i.jsx(Ww,{label:o.label,window:o.window},o.key))})}function Ww({label:s,window:l}){const r=Math.round(l.utilization),c=nk(l.resetsAt);return i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"usage__label",children:s}),i.jsx("span",{className:"usage__track",role:"progressbar","aria-label":s,"aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,children:i.jsx("span",{className:`usage__fill${Pw(r)}`,style:{width:`${r}%`}})}),i.jsxs("span",{className:"usage__pct",children:[r,"%"]}),i.jsx("span",{className:"usage__reset",title:Op(l.resetsAt)||void 0,children:c&&`↻ ${c}`})]})}function Pw(s){return s>=Jw?" usage__fill--over":s>=Fw?" usage__fill--warn":""}function ek(s,l){if(l.length>0)return tk(l);const r=[s.plan?`Лимиты плана ${s.plan}`:"Лимиты плана"],c=(o,d)=>{if(!d)return;const h=Op(d.resetsAt);r.push(`${o}: ${Math.round(d.utilization)}%${h?`, ${h}`:""}`)};return c("5 часов",s.fiveHour),c("Неделя",s.sevenDay),c("Неделя, Opus",s.sevenDayOpus),r.join(`
120
+ `)}function tk(s){const l=["Квота Antigravity"];for(const r of s){const c=Op(r.window.resetsAt),o=Math.round(r.window.utilization);l.push(`${r.title}: ${o}%${c?`, ${c}`:""}`),r.description&&l.push(r.description)}return l.join(`
121
+ `)}function Fy(s){if(!s)return null;const l=new Date(s);return Number.isNaN(l.getTime())?null:l}function Jy(s){return s.getTime()-Date.now()<1440*60*1e3}function nk(s){const l=Fy(s);return l?Jy(l)?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{day:"numeric",month:"short"}):""}function Op(s){const l=Fy(s);return l?`обнулится ${Jy(l)?`в ${l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:l.toLocaleDateString(void 0,{day:"numeric",month:"long"})}`:""}function Wy(){const[s,l]=y.useState(()=>new Date);return y.useEffect(()=>{let r=0;const c=()=>{const d=new Date;l(d),r=window.setTimeout(c,6e4-(d.getSeconds()*1e3+d.getMilliseconds()))};c();const o=()=>{document.hidden||(window.clearTimeout(r),c())};return document.addEventListener("visibilitychange",o),()=>{window.clearTimeout(r),document.removeEventListener("visibilitychange",o)}},[]),i.jsxs("time",{className:"clock",dateTime:s.toISOString(),title:lk(s),children:[i.jsx("span",{className:"clock__time",children:s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}),i.jsx("span",{className:"clock__date",children:s.toLocaleDateString(void 0,{weekday:"short",day:"numeric",month:"short"})})]})}function lk(s){return s.toLocaleDateString(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function sk({onClose:s,permission:l,model:r,usage:c,cwd:o,costLabel:d,onRefresh:h,refreshing:m,metersFetchedAt:g,onRename:x,onHandoff:_,onFreshSession:S,handoffWriting:v,onStop:E}){const T=hy({onLongPress:()=>S==null?void 0:S(),onClick:()=>_==null?void 0:_(),disabled:v});return i.jsx(jl,{title:"Настройки сессии",className:"modal--sheet",sheet:!0,onClose:s,children:i.jsxs("div",{className:"sessionmenu",children:[l&&i.jsx(lc,{label:"Режим прав",children:l}),i.jsx(lc,{label:"Модель",children:r}),(c==null?void 0:c.available)&&(c.fiveHour||c.sevenDay||c.buckets&&c.buckets.length>0)&&i.jsx(lc,{label:"Лимиты плана",children:i.jsx(Zy,{usage:c})}),i.jsxs("button",{type:"button",className:m?"sessionmenu__refresh is-busy":"sessionmenu__refresh","aria-busy":m,disabled:m,onClick:h,children:[i.jsx(ak,{}),i.jsxs("span",{className:"sessionmenu__refresh-text",children:["Обновить показания",g&&i.jsxs("span",{className:"sessionmenu__refresh-time",children:["обновлено в"," ",new Date(g).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})]})]})]}),i.jsx(lc,{label:"Время",children:i.jsx(Wy,{})}),d&&i.jsx(lc,{label:"Стоимость хода",children:i.jsx("span",{className:"badge badge--cost",children:d})}),o&&i.jsx(lc,{label:"Каталог проекта",children:i.jsx($y,{path:o})}),x&&i.jsx("button",{type:"button",className:"sessionmenu__rename",onClick:x,children:"Переименовать сессию"}),_&&i.jsxs("button",{type:"button",className:v?"sessionmenu__handoff is-busy":T.holding?"sessionmenu__handoff is-holding":"sessionmenu__handoff",style:{"--hold-ms":`${T.thresholdMs}ms`},"aria-busy":v,disabled:v,...T.handlers,children:[i.jsx("span",{className:"sessionmenu__handoff-hold","aria-hidden":"true"}),i.jsxs("span",{className:"sessionmenu__handoff-text",children:[v?"Пишется хэндофф…":"Хэндофф и новая сессия",!v&&i.jsx("span",{className:"sessionmenu__handoff-hint",children:"Зажмите — новая сессия без хэндоффа"})]})]}),E&&i.jsx("button",{type:"button",className:"sessionmenu__stop",onClick:E,children:"Остановить сессию"})]})})}function lc({label:s,children:l}){return i.jsxs("div",{className:"sessionmenu__row",children:[i.jsx("span",{className:"sessionmenu__label",children:s}),l]})}function ak(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),i.jsx("path",{d:"M14 2v3.33h-3.33"})]})}function ik({tab:s,servers:l,plugins:r,marketplaces:c,catalog:o,result:d,actions:h,onTab:m,onClose:g}){const x=[{id:"mcp",label:"MCP-серверы",count:l.length},{id:"plugins",label:"Плагины",count:r.length},{id:"catalog",label:"Каталог",count:o.length}];return i.jsxs(jl,{title:"Расширения",className:"modal--wide",onClose:g,children:[i.jsx("div",{className:"tabs",role:"tablist",children:x.map(_=>i.jsxs("button",{role:"tab","aria-selected":s===_.id,className:s===_.id?"tabs__tab is-on":"tabs__tab",onClick:()=>m(_.id),children:[_.label,i.jsx("span",{className:"tabs__count",children:_.count})]},_.id))}),s==="mcp"&&i.jsx(rk,{servers:l,actions:h}),s==="plugins"&&i.jsx(dk,{plugins:r,marketplaces:c,actions:h}),s==="catalog"&&i.jsx(hk,{catalog:o,hasMarketplaces:c.length>0,actions:h,onMarketplaces:()=>m("plugins")}),i.jsx(pr,{result:d})]})}function rk({servers:s,actions:l}){const[r,c]=y.useState(!1);return i.jsxs(i.Fragment,{children:[s.length===0&&!r&&i.jsxs("p",{className:"modal__text",children:["Ни одного MCP-сервера. Добавленный здесь попадёт в ",i.jsx("code",{children:".mcp.json"})," ","проекта — его увидит и консольный ",i.jsx("code",{children:"claude mcp list"}),"."]}),i.jsx("ul",{className:"extlist",children:s.map(o=>i.jsxs("li",{className:"extlist__row",children:[i.jsxs("div",{className:"extlist__head",children:[i.jsx("span",{className:"extlist__name",children:o.name}),i.jsx("span",{className:`chip chip--${ok(o.status)}`,children:ck[o.status]}),o.scope&&i.jsx("span",{className:"chip",children:o.scope}),o.transport&&i.jsx("span",{className:"chip",children:o.transport})]}),o.target&&i.jsx("div",{className:"extlist__meta",title:o.target,children:o.target}),o.error&&i.jsx("div",{className:"extlist__error",children:o.error}),o.tools.length>0&&i.jsxs("div",{className:"extlist__meta",children:["Инструментов: ",o.tools.length," · ",o.tools.slice(0,6).join(", "),o.tools.length>6&&"…"]}),i.jsxs("div",{className:"extlist__actions",children:[i.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"reconnect"),children:"Переподключить"}),o.status==="disabled"?i.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"enable"),children:"Включить"}):i.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"disable"),children:"Выключить"}),o.editable&&i.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>l.mcpRemove(o.name),children:"Удалить"})]})]},o.name))}),r?i.jsx(uk,{onCancel:()=>c(!1),onSubmit:(o,d)=>{l.mcpAdd(o,d),c(!1)}}):i.jsx("div",{className:"extbar",children:i.jsx("button",{className:"btn btn--primary",onClick:()=>c(!0),children:"+ Сервер"})})]})}const ck={connected:"подключён",failed:"ошибка","needs-auth":"нужна авторизация",pending:"подключается",disabled:"выключен",unknown:"неизвестно"};function ok(s){return s==="connected"?"ok":s==="failed"?"bad":s==="needs-auth"?"warn":"mute"}function uk({onSubmit:s,onCancel:l}){const[r,c]=y.useState(""),[o,d]=y.useState("stdio"),[h,m]=y.useState(""),[g,x]=y.useState(""),[_,S]=y.useState(""),v=o==="stdio",E=r.trim()!==""&&(v?h.trim()!=="":g.trim()!=="");function T(){if(E)if(v){const[C,...L]=fk(h);s(r.trim(),{transport:"stdio",command:C??"",args:L,env:Ix(_)})}else s(r.trim(),{transport:o,url:g.trim(),headers:Ix(_)})}return i.jsxs("div",{className:"extform extform--card",children:[i.jsx("label",{className:"field",htmlFor:"mcp-name",children:"Имя сервера"}),i.jsx("input",{id:"mcp-name",className:"input input--mono",value:r,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"context7",onChange:C=>c(C.target.value)}),i.jsx("label",{className:"field",children:"Транспорт"}),i.jsx(Ms,{title:"Транспорт",value:o,options:[{value:"stdio",label:"stdio",hint:"локальный процесс"},{value:"http",label:"http",hint:"удалённый сервер"},{value:"sse",label:"sse",hint:"удалённый, поток событий"}],onChange:C=>d(C)}),v?i.jsxs(i.Fragment,{children:[i.jsx("label",{className:"field",htmlFor:"mcp-command",children:"Команда с аргументами"}),i.jsx("input",{id:"mcp-command",className:"input input--mono",value:h,spellCheck:!1,autoComplete:"off",placeholder:"npx -y @upstash/context7-mcp",onChange:C=>m(C.target.value)})]}):i.jsxs(i.Fragment,{children:[i.jsx("label",{className:"field",htmlFor:"mcp-url",children:"URL"}),i.jsx("input",{id:"mcp-url",className:"input input--mono",value:g,spellCheck:!1,autoComplete:"off",placeholder:"https://mcp.example.dev/mcp",onChange:C=>x(C.target.value)})]}),i.jsxs("label",{className:"field",htmlFor:"mcp-pairs",children:[v?"Переменные окружения":"Заголовки"," — по одной на строку, необязательно"]}),i.jsx("textarea",{id:"mcp-pairs",className:"input input--mono input--area",value:_,spellCheck:!1,placeholder:v?"API_KEY=xxx":"Authorization: Bearer xxx",onChange:C=>S(C.target.value)}),i.jsxs("div",{className:"extbar",children:[i.jsx("button",{className:"btn",onClick:l,children:"Отмена"}),i.jsx("button",{className:"btn btn--primary",disabled:!E,onClick:T,children:"Подключить"})]})]})}function Ix(s){const l={};for(const r of s.split(`
122
+ `)){const c=r.trim();if(!c)continue;const o=c.indexOf("="),d=c.indexOf(":"),h=o===-1?d:d===-1?o:Math.min(o,d);h<=0||(l[c.slice(0,h).trim()]=c.slice(h+1).trim())}return l}function fk(s){return(s.trim().match(/"[^"]*"|'[^']*'|\S+/g)??[]).map(l=>l.replace(/^["']|["']$/g,""))}function dk({plugins:s,marketplaces:l,actions:r}){const[c,o]=y.useState("");return i.jsxs(i.Fragment,{children:[s.length===0&&i.jsx("p",{className:"modal__text",children:"Ни одного установленного плагина. Что можно поставить — на вкладке «Каталог»."}),i.jsx("ul",{className:"extlist",children:s.map(d=>i.jsxs("li",{className:"extlist__row",children:[i.jsxs("div",{className:"extlist__head",children:[i.jsx("span",{className:"extlist__name",children:d.name}),i.jsx("span",{className:d.enabled?"chip chip--ok":"chip chip--mute",children:d.enabled?"включён":"выключен"}),d.version&&d.version!=="unknown"&&i.jsx("span",{className:"chip",children:d.version}),d.scope&&i.jsx("span",{className:"chip",children:d.scope})]}),d.marketplace&&i.jsx("div",{className:"extlist__meta",children:d.marketplace}),d.mcpServers.length>0&&i.jsxs("div",{className:"extlist__meta",children:["MCP-серверы: ",d.mcpServers.join(", ")]}),i.jsxs("div",{className:"extlist__actions",children:[i.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>r.pluginToggle(d.id,!d.enabled),children:d.enabled?"Выключить":"Включить"}),i.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>r.pluginUninstall(d.id),children:"Удалить"})]})]},d.id))}),i.jsx("div",{className:"sidebar__section",children:"Маркетплейсы"}),i.jsx("ul",{className:"extlist",children:l.map(d=>i.jsxs("li",{className:"extlist__row",children:[i.jsx("div",{className:"extlist__head",children:i.jsx("span",{className:"extlist__name",children:d.name})}),d.source&&i.jsx("div",{className:"extlist__meta",children:d.source}),i.jsx("div",{className:"extlist__actions",children:i.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>r.marketplaceRemove(d.name),children:"Отключить"})})]},d.name))}),i.jsxs("div",{className:"extform__row",children:[i.jsx("input",{className:"input input--mono",value:c,spellCheck:!1,autoComplete:"off","aria-label":"Источник маркетплейса",placeholder:"owner/repo, URL или путь",onChange:d=>o(d.target.value),onKeyDown:d=>{d.key!=="Enter"||c.trim()===""||(d.preventDefault(),r.marketplaceAdd(c.trim()),o(""))}}),i.jsx("button",{className:"btn",disabled:c.trim()==="",onClick:()=>{r.marketplaceAdd(c.trim()),o("")},children:"Добавить"})]})]})}const Oo=30;function hk({catalog:s,hasMarketplaces:l,actions:r,onMarketplaces:c}){const[o,d]=y.useState(""),[h,m]=y.useState(""),[g,x]=y.useState(Oo),[_,S]=y.useState(""),v=y.useMemo(()=>[...new Set(s.map(C=>C.category).filter(Boolean))].sort(),[s]),E=y.useMemo(()=>{const T=o.trim().toLowerCase();return s.filter(C=>h&&C.category!==h?!1:T?`${C.name} ${C.displayName} ${C.description} ${C.author}`.toLowerCase().includes(T):!0)},[s,o,h]);return s.length===0?i.jsxs("p",{className:"modal__text",children:[l?"Маркетплейсы подключены, но их каталог ещё не выкачан. Попробуйте открыть окно ещё раз через минуту.":"Ни одного маркетплейса — ставить нечего."," ",i.jsx("button",{className:"linkish",onClick:c,children:"Подключить маркетплейс"})]}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"catalog__filters",children:[i.jsx("input",{className:"input",value:o,spellCheck:!1,autoComplete:"off","aria-label":"Поиск по каталогу",placeholder:"Поиск: имя, описание, автор",onChange:T=>{d(T.target.value),x(Oo)}}),i.jsx(Ms,{title:"Категория",value:h,options:[{value:"",label:"все категории"},...v.map(T=>({value:T,label:T}))],onChange:T=>{m(T),x(Oo)}})]}),E.length===0?i.jsx("p",{className:"modal__text",children:"Ничего не нашлось."}):i.jsx("ul",{className:"extlist",children:E.slice(0,g).map(T=>i.jsxs("li",{className:"extlist__row",children:[i.jsxs("div",{className:"extlist__head",children:[i.jsx("span",{className:"extlist__name",children:T.name}),T.installed&&i.jsx("span",{className:"chip chip--ok",children:"установлен"}),T.version&&i.jsx("span",{className:"chip",children:T.version}),T.category&&i.jsx("span",{className:"chip",children:T.category})]}),T.description&&i.jsx("div",{className:"catalog__desc",children:T.description}),i.jsxs("div",{className:"extlist__meta",children:[T.author&&`${T.author} · `,T.marketplace]}),i.jsxs("div",{className:"extlist__actions",children:[i.jsx("button",{className:"btn btn--ghost btn--sm",disabled:T.installed,onClick:()=>r.pluginInstall(T.id),children:T.installed?"Уже стоит":"Установить"}),T.homepage&&i.jsx("a",{className:"btn btn--ghost btn--sm",href:T.homepage,target:"_blank",rel:"noreferrer",children:"Страница"})]})]},T.id))}),E.length>g&&i.jsx("div",{className:"extbar",children:i.jsxs("button",{className:"btn",onClick:()=>x(T=>T+Oo),children:["Ещё ",Math.min(Oo,E.length-g)," из ",E.length-g]})}),i.jsxs("div",{className:"extform",children:[i.jsx("label",{className:"field",htmlFor:"plugin-spec",children:"Или установить по имени — если нужного в каталоге нет"}),i.jsxs("div",{className:"extform__row",children:[i.jsx("input",{id:"plugin-spec",className:"input input--mono",value:_,spellCheck:!1,autoComplete:"off",placeholder:"имя или имя@маркетплейс",onChange:T=>S(T.target.value),onKeyDown:T=>{T.key!=="Enter"||_.trim()===""||(T.preventDefault(),r.pluginInstall(_.trim()),S(""))}}),i.jsx("button",{className:"btn",disabled:_.trim()==="",onClick:()=>{r.pluginInstall(_.trim()),S("")},children:"Установить"})]})]})]})}function pk({status:s,login:l,actions:r,remote:c,runningSessions:o,onReconnect:d,reconnectBlocked:h,reconnectHint:m,onClose:g}){const[x,_]=y.useState(""),[S,v]=y.useState(!1),[E,T]=y.useState(!1),C=d!==null&&(s==null?void 0:s.loggedIn)===!0&&!E&&!S,L=y.useMemo(()=>{if(l.error)return{ok:!1,message:l.error};const G=l.output.trim();return G===""?null:{ok:!0,message:G}},[l.error,l.output]);function X(G=x){const O=G.trim();O!==""&&(r.submitCode(O),_(""))}function J(){if(o>0){v(!1),T(!0);return}r.login("claudeai",!0)}return i.jsxs(jl,{title:"Аккаунт",onClose:g,children:[s===null?i.jsx("p",{className:"modal__text",children:"Спрашиваем у хоста…"}):s.loggedIn?i.jsxs("div",{className:"account",children:[i.jsx("div",{className:"account__id",children:s.email||"Вход выполнен"}),i.jsxs("div",{className:"account__chips",children:[i.jsx("span",{className:"chip chip--ok",children:bk[s.method]??s.method}),s.plan&&i.jsx("span",{className:"chip",children:s.plan})]}),s.organization&&i.jsx("div",{className:"extlist__meta",children:s.organization})]}):i.jsxs("p",{className:"modal__text",children:["Вход не выполнен. Сессии не запустятся, пока аккаунт не подключён — или пока в окружении хоста нет ",i.jsx("code",{children:"ANTHROPIC_API_KEY"}),"."]}),l.active?i.jsx(xk,{login:l,remote:c,code:x,onCode:_,onSubmit:X,onCancel:r.cancel}):i.jsxs(i.Fragment,{children:[i.jsx(pr,{result:L}),E&&i.jsx("p",{className:"account__warn",role:"alert",children:mk(o)}),C&&h&&i.jsx("p",{className:"account__note",children:m}),i.jsx("div",{className:`extbar${s!=null&&s.loggedIn?" account__bar":""}`,children:s!=null&&s.loggedIn?i.jsxs(i.Fragment,{children:[C&&i.jsxs("button",{type:"button",className:"btn account__relink",title:`Переподключить сессию
123
+ ${m}`,"aria-label":"Переподключить сессию",disabled:h,onClick:d,children:[i.jsx(gk,{}),"Переподключить"]}),E?i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>T(!1),children:"Отмена"}),i.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>{T(!1),r.login("claudeai",!0)},children:"Всё равно сменить"})]}):i.jsx("button",{className:"btn",onClick:J,children:"Сменить аккаунт"}),S?i.jsx("button",{className:"btn btn--danger",autoFocus:!0,onClick:()=>{v(!1),r.logout()},children:"Точно выйти?"}):i.jsx("button",{className:"btn",onClick:()=>{T(!1),v(!0)},children:"Выйти"})]}):i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>r.login("console",!1),children:"Через Console"}),i.jsx("button",{className:"btn btn--primary",onClick:()=>r.login("claudeai",!1),children:"Войти"})]})})]})]})}function mk(s){const l=s%10,r=s%100,c=l===1&&r!==11,o=c?"сессия":l>=2&&l<=4&&(r<12||r>14)?"сессии":"сессий";return`${s} ${o} сейчас ${c?"работает":"работают"} — смена аккаунта может ${c?"её":"их"} прервать.`}function gk(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),i.jsx("path",{d:"M14 2v3.33h-3.33"})]})}const bk={"claude.ai":"подписка Claude",console:"Anthropic Console",apiKey:"API-ключ",none:"нет"};function xk({login:s,remote:l,code:r,onCode:c,onSubmit:o,onCancel:d}){var T;const[h,m]=y.useState(null),g=y.useRef(""),x=y.useRef({code:r,onCode:c,onSubmit:o});x.current={code:r,onCode:c,onSubmit:o};const _=y.useCallback(async C=>{const{code:L,onCode:X,onSubmit:J}=x.current;if(C&&L.trim()!=="")return;const G=await dp();if(G===null){C||m("Не получилось прочитать буфер — вставьте код в поле руками.");return}const O=G.trim();if(!qx(O)){C||m("В буфере не похоже на код: нужен он целиком, вместе с частью после «#». Подойдёт и адрес страницы, на которую увёл браузер, — его тоже разберём.");return}if(C){if(g.current===O)return;g.current=O}m(null),X(O),J(O)},[]);y.useEffect(()=>{if(!s.awaitingCode)return;const C=()=>{document.visibilityState==="visible"&&_(!0)};return document.addEventListener("visibilitychange",C),()=>document.removeEventListener("visibilitychange",C)},[s.awaitingCode,_]);const S=typeof((T=navigator.clipboard)==null?void 0:T.readText)=="function",v=r.trim()!==""&&!qx(r),E=h??(v?"Похоже, скопирована только часть кода — нужен он целиком, вместе с частью после «#».":null);return i.jsxs("div",{className:"account__flow",children:[s.url?l?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"field",children:"Подтвердите вход на странице Anthropic"}),i.jsx("a",{className:"btn btn--primary account__go",href:s.url,target:"_blank",rel:"noreferrer",children:"Открыть страницу входа"}),i.jsx("p",{className:"account__step",children:"После кнопки «Authorize» там появится код — скопируйте его и вернитесь сюда."}),i.jsxs("div",{className:"account__raw",children:[i.jsx("span",{className:"account__rawurl",children:s.url}),i.jsx(Ap,{text:s.url,hint:"ссылку входа"})]})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"field",children:"Подтвердите вход в открывшемся браузере"}),i.jsx("p",{className:"account__step",children:"Хост открыл страницу входа на этом же компьютере — там достаточно нажать «Authorize», остальное произойдёт само."}),i.jsxs("details",{className:"account__fallback",children:[i.jsx("summary",{children:"Браузер не открылся"}),i.jsx("p",{className:"account__step",children:"Тогда откройте ссылку сами: страница покажет код, и его нужно будет вставить ниже."}),i.jsx("a",{className:"account__link",href:s.url,target:"_blank",rel:"noreferrer",children:s.url})]})]}):i.jsx("p",{className:"modal__text",children:"Запускаем вход…"}),s.awaitingCode&&i.jsxs(i.Fragment,{children:[i.jsx("label",{className:"field",htmlFor:"auth-code",children:"Код со страницы авторизации"}),i.jsxs("div",{className:"extform__row account__coderow",children:[i.jsx("input",{id:"auth-code",className:"input input--mono",value:r,autoFocus:!l,spellCheck:!1,autoComplete:"off",placeholder:"код#state",onChange:C=>{m(null),c(C.target.value)},onKeyDown:C=>{C.key==="Enter"&&(C.preventDefault(),o())}}),S&&i.jsx("button",{type:"button",className:"btn",onClick:()=>void _(!1),children:"Вставить код"}),i.jsx("button",{type:"button",className:"btn btn--primary",disabled:r.trim()==="",onClick:()=>o(),children:"Готово"})]}),E&&i.jsx("p",{className:"account__note account__note--code",children:E})]}),s.output.trim()!==""&&i.jsx("pre",{className:"account__log",children:s.output.trim()}),i.jsx("div",{className:"extbar",children:i.jsx("button",{className:"btn",onClick:d,children:"Отменить вход"})})]})}function qx(s){const l=s.trim();if(/^https?:\/\//i.test(l))return/[?#&]code=/.test(l);const[r,c]=l.split("#");return!!r&&!!c&&!/\s/.test(l)}function yk({state:s,onPair:l,onUnpair:r,onClose:c}){const[o,d]=y.useState(""),[h,m]=y.useState(""),[g,x]=y.useState(!1),_=y.useRef(null),S=(s==null?void 0:s.paired)===!0;y.useEffect(()=>{var E;S||(E=_.current)==null||E.focus()},[S]),y.useEffect(()=>{x(!1),S&&d("")},[S,s==null?void 0:s.error]);const v=(s==null?void 0:s.url)??"https://claudevisual.com";return i.jsx(jl,{title:"Удалённый доступ",onClose:c,children:S?i.jsxs("div",{className:"relay",children:[i.jsxs("p",{className:"relay__lede",children:["Компьютер связан с аккаунтом на ",i.jsx("b",{children:Gx(v)}),". Открывайте его оттуда с любого устройства — с телефона в том числе."]}),i.jsxs("dl",{className:"relay__facts",children:[i.jsxs("div",{children:[i.jsx("dt",{children:"Имя"}),i.jsx("dd",{children:(s==null?void 0:s.name)??"—"})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Связь"}),i.jsxs("dd",{children:[i.jsx("span",{className:s!=null&&s.connected?"dot dot--on":"dot"})," ",s!=null&&s.connected?"на связи":"нет связи, пробуем переподключиться"]})]}),i.jsxs("div",{children:[i.jsx("dt",{children:"Подключено"}),i.jsxs("dd",{children:[(s==null?void 0:s.clients)??0," вкладок"]})]})]}),(s==null?void 0:s.error)&&i.jsx("p",{className:"relay__error",children:s.error}),i.jsx("p",{className:"relay__note",children:"Терминал с удалённых устройств настраивается в настройках приложения, раздел «Терминал»."}),i.jsx("p",{className:"relay__note",children:"Отвязка гасит токен этой машины: чтобы вернуть доступ, понадобится новый код. Сессии Claude Code это не трогает."}),i.jsx("button",{className:"btn btn--danger",onClick:r,children:"Отвязать компьютер"})]}):i.jsxs("div",{className:"relay",children:[i.jsx("p",{className:"relay__lede",children:"Чтобы работать с этим компьютером из браузера и с телефона, свяжите его с аккаунтом."}),i.jsxs("ol",{className:"relay__steps",children:[i.jsxs("li",{children:["Откройте ",i.jsx("b",{children:Gx(v)})," и войдите (или зарегистрируйтесь)."]}),i.jsxs("li",{children:["Нажмите ",i.jsx("b",{children:"«Подключить ПК»"})," — появится код из восьми знаков."]}),i.jsx("li",{children:"Введите его сюда."})]}),i.jsxs("form",{className:"relay__form",onSubmit:E=>{E.preventDefault(),o.trim()&&(x(!0),l(o.trim(),h.trim()))},children:[i.jsxs("label",{className:"field",children:[i.jsx("span",{children:"Код сопряжения"}),i.jsx("input",{ref:_,className:"input relay__code",value:o,onChange:E=>d(E.target.value.toUpperCase()),placeholder:"XXXX-XXXX",autoComplete:"off",spellCheck:!1,maxLength:12})]}),i.jsxs("label",{className:"field",children:[i.jsx("span",{children:"Как назвать этот компьютер"}),i.jsx("input",{className:"input",value:h,onChange:E=>m(E.target.value),placeholder:"имя машины",autoComplete:"off",maxLength:64})]}),(s==null?void 0:s.error)&&i.jsx("p",{className:"relay__error",children:s.error}),i.jsx("button",{className:"btn btn--primary",type:"submit",disabled:!o.trim()||g,children:g?"Связываем…":"Связать"})]})]})})}function Gx(s){try{return new URL(s).host}catch{return s}}const Ph="",_k=[{value:"opus",label:"Opus",hint:"полный список моделей виден, когда открыта сессия"},{value:"sonnet",label:"Sonnet",hint:"полный список моделей виден, когда открыта сессия"},{value:"haiku",label:"Haiku",hint:"полный список моделей виден, когда открыта сессия"}],vk=oy.map(s=>({value:s.value,label:s.value,hint:s.hint})),kf=3600*1e3,jk=[{value:"6h",label:"6 часов"},{value:"24h",label:"Сутки"},{value:"48h",label:"Двое суток"},{value:"168h",label:"Неделя"},{value:"never",label:"Никогда"}],ac={"6h":6*kf,"24h":24*kf,"48h":48*kf,"168h":168*kf,never:0};function Sk(s){return ac[s]??ac["48h"]}const wk=[{value:"5m",label:"5 минут"},{value:"10m",label:"10 минут"},{value:"30m",label:"30 минут"},{value:"60m",label:"Час"},{value:"never",label:"Никогда"}],Nf=60*1e3,ic={"5m":5*Nf,"10m":10*Nf,"30m":30*Nf,"60m":60*Nf,never:0};function kk(s){return ic[s]??ic["10m"]}function Nk(s){const l=Object.entries(ic).find(([,r])=>r===s);return l?l[0]:Object.keys(ic).reduce((r,c)=>Math.abs(ic[c]-s)<Math.abs(ic[r]-s)?c:r)}function Tk(s){const l=Object.entries(ac).find(([,r])=>r===s);return l?l[0]:Object.keys(ac).reduce((r,c)=>Math.abs(ac[c]-s)<Math.abs(ac[r]-s)?c:r)}const Ek=[{value:"off",label:"Выключено"},{value:"500",label:"0.5 с"},{value:"1500",label:"1.5 с"},{value:"3000",label:"3 с"},{value:"10000",label:"10 с"}],rc={off:0,500:500,1500:1500,3e3:3e3,1e4:1e4};function Ck(s){return rc[s]??rc.off}function Yx(s){return Number.isFinite(s)?Math.min(100,Math.max(0,Math.round(s))):0}function Ak(s){const l=Object.entries(rc).find(([,r])=>r===s);return l?l[0]:Object.keys(rc).reduce((r,c)=>Math.abs(rc[c]-s)<Math.abs(rc[r]-s)?c:r)}const Mk=[{value:"project",title:"Только текущий проект",description:"Агент молча пишет файлы в открытом проекте и в ~/.claude — настройках самого Claude Code. Чужой проект и любая новая папка — только с явного разрешения."},{value:"projects",title:"Папка с проектами",description:"То же плюс каталог, где лежат открытые проекты, — то есть и соседний проект тоже. Всё остальное — с разрешения."},{value:"all",title:"Все папки на компьютере",description:"Агент пишет файлы куда угодно на диске — вопросов про место записи не будет.",risky:!0}];function Rk({settings:s,models:l,relayState:r,local:c,onChange:o,onEnableShell:d,onDisableShell:h,onOpenRelay:m,onClose:g}){const x=s===null,_=!x&&s.terminalEnabled===!0,S=!x&&s.liveSessionsFirst===!0,v=!_,E=y.useMemo(()=>{const C=[{value:Ph,label:"Как в Claude Code",hint:"модель определят настройки самого Claude Code"},...l.length>0?l.map(L=>({value:L.value,label:L.displayName,hint:L.description})):_k];return s&&s.startModel!==null&&!C.some(L=>L.value===s.startModel)&&C.push({value:s.startModel,label:s.startModel}),C},[l,s]);function T(){var C,L;return(r==null?void 0:r.paired)!==!0?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"settings__hint",children:"Компьютер не связан с аккаунтом — включать удалённый доступ пока не к чему: без пары ни телефон, ни другое устройство этот компьютер вообще не видят."}),i.jsx("button",{type:"button",className:"btn",disabled:v,onClick:m,children:"Связать компьютер"})]}):(C=r.shell)!=null&&C.enabled?i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"settings__hint",children:["Разрешён: с телефона и любого другого устройства этого аккаунта можно открыть терминал и выполнить на этом компьютере что угодно — как если бы сидели за ним.",r.shell.confirmedAt&&` Включено ${new Date(r.shell.confirmedAt).toLocaleString()}.`]}),i.jsx("button",{type:"button",className:"btn btn--danger",disabled:v,onClick:h,children:"Запретить"})]}):(L=r.shell)!=null&&L.pending?i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"settings__hint",children:["Письмо ушло на ",i.jsx("b",{children:r.shell.email}),". Перейдите по ссылке из него — терминал заработает удалённо."]}),i.jsx("p",{className:"settings__hint",children:"Повторная отправка ограничена раз в минуту — если жали кнопку только что, письмо не придёт и от повторного нажатия тоже. Если сейчас доберётесь до самого компьютера, там разрешение включится сразу, без письма."}),i.jsx("button",{type:"button",className:"btn",disabled:v,onClick:d,children:"Отправить письмо ещё раз"})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"settings__hint",children:"Сейчас с телефона можно смотреть разговоры и файлы, но не запускать команды. Разрешение даёт полный доступ к терминалу этого компьютера: с телефона станет можно выполнить любую команду, как в обычной консоли за этой машиной."}),c?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"settings__hint",children:"Включится сразу — вы уже за этим компьютером, подтверждать доступ к нему нечем и незачем."}),i.jsx("button",{type:"button",className:"btn",disabled:v,onClick:d,children:"Разрешить с телефона"})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"settings__hint",children:"Отсюда мгновенно не включится: на почту аккаунта уйдёт письмо, и терминал заработает только после перехода по ссылке из него."}),i.jsx("button",{type:"button",className:"btn",disabled:v,onClick:d,children:"Прислать письмо"})]})]})}return i.jsx(jl,{title:"Настройки",onClose:g,children:i.jsxs("div",{className:"settings",children:[i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Архивация молчащих сессий"}),i.jsx("p",{className:"settings__hint",children:"Сессия, к которой долго не возвращались, сама уезжает в архив — на диске ничего не удаляется, транскрипт остаётся, и её можно вернуть обратно в любой момент."}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsx(Ms,{className:"settings__select",value:Tk(s.autoArchiveAfterMs),options:jk,onChange:C=>o({autoArchiveAfterMs:Sk(C)}),ariaLabel:"Через сколько молчащая сессия уезжает в архив"})]}),i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Останавливать простаивающие сессии через"}),i.jsx("p",{className:"settings__hint",children:"Простаивающая живая сессия сама отпускает процесс CLI — освобождает память компьютера, на котором стоит хост. Простой — это когда сессия ничего не делает (не работает, не ждёт разрешения, фоновых задач нет), в ней ничего не происходит и ни в одном открытом окне не висит недописанный черновик для неё. Разговор при этом никуда не девается: открытая заново сессия, как и отправленное в неё сообщение, продолжают с того же места."}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsx(Ms,{className:"settings__select",value:Nk(s.autoStopAfterMs),options:wk,onChange:C=>o({autoStopAfterMs:kk(C)}),ariaLabel:"Останавливать простаивающие сессии через"})]}),i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Остановка у лимита плана"}),i.jsx("p",{className:"settings__hint",children:"Когда расход окна лимита доходит до этого порога, хост прерывает все живые сессии Claude, сохраняет хэндофф у занятых и останавливает их — разговор остаётся на диске, а хэндофф показывается баннером в открытой сессии. Antigravity эта настройка не касается."}),i.jsxs("div",{className:"settings__field",children:[i.jsx("span",{className:"settings__field-label",children:"Остановка у 5-часового лимита, %"}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsxs("div",{className:"settings__pct",children:[i.jsx("input",{type:"number",className:"input settings__pct-input",min:0,max:100,step:1,value:s.limitStopFiveHourPct,onChange:C=>o({limitStopFiveHourPct:Yx(C.target.valueAsNumber)}),"aria-label":"Остановка у 5-часового лимита, %"}),i.jsx("span",{className:"settings__pct-suffix",children:"%"})]}),i.jsx("p",{className:"settings__hint",children:"0 — не останавливать."})]}),i.jsxs("div",{className:"settings__field",children:[i.jsx("span",{className:"settings__field-label",children:"Остановка у недельного лимита, %"}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsxs("div",{className:"settings__pct",children:[i.jsx("input",{type:"number",className:"input settings__pct-input",min:0,max:100,step:1,value:s.limitStopSevenDayPct,onChange:C=>o({limitStopSevenDayPct:Yx(C.target.valueAsNumber)}),"aria-label":"Остановка у недельного лимита, %"}),i.jsx("span",{className:"settings__pct-suffix",children:"%"})]}),i.jsx("p",{className:"settings__hint",children:"0 — не останавливать."})]})]}),i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Автосохранение"}),i.jsx("p",{className:"settings__hint",children:"Открытый файл сам уезжает на диск, если немного постоять без ввода — ручное сохранение, кнопкой или Ctrl+S, при этом всегда работает как обычно, независимо от этой настройки."}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsx(Ms,{className:"settings__select",value:Ak(s.autoSaveAfterPauseMs),options:Ek,onChange:C=>o({autoSaveAfterPauseMs:Ck(C)}),ariaLabel:"Пауза перед автосохранением открытого файла"})]}),i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Старт новой сессии"}),i.jsx("p",{className:"settings__hint",children:"Модель и режим прав, с которыми поднимается новая сессия. Уже открытую это не меняет — у неё свои переключатели в шапке."}),i.jsxs("div",{className:"settings__field",children:[i.jsx("span",{className:"settings__field-label",children:"Модель"}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsx(Ms,{className:"settings__select",value:s.startModel??Ph,options:E,onChange:C=>o({startModel:C===Ph?null:C}),ariaLabel:"Модель, с которой поднимается новая сессия"})]}),i.jsxs("div",{className:"settings__field",children:[i.jsx("span",{className:"settings__field-label",children:"Режим прав при старте"}),x?i.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):i.jsx(Ms,{className:"settings__select",value:s.startPermissionMode,options:vk,onChange:C=>o({startPermissionMode:C}),ariaLabel:"Режим прав, с которым поднимается новая сессия"})]})]}),i.jsx("section",{className:"settings__section",children:i.jsxs("div",{className:"settings__switch-row",children:[i.jsxs("div",{className:"settings__switch-copy",children:[i.jsx("h3",{className:"settings__heading",children:"Запущенные сессии сверху"}),i.jsx("p",{className:"settings__hint",children:"Сессии, поднятые в хосте прямо сейчас — работают, готовы, ждут разрешения, работают в фоне, переподключаются, — показываются выше остальных в списке сессий проекта и в панели закреплённых. Порядок внутри каждой из двух частей остаётся тем, что задан руками."})]}),x?i.jsx("div",{className:"settings__switch-skeleton","aria-hidden":"true"}):i.jsx("button",{type:"button",role:"switch","aria-checked":S,"aria-label":"Запущенные сессии сверху",className:S?"switch is-on":"switch",onClick:()=>o({liveSessionsFirst:!S}),children:i.jsx("span",{className:"switch__knob"})})]})}),i.jsxs("section",{className:"settings__section",children:[i.jsx("h3",{className:"settings__heading",children:"Доступ к папкам"}),i.jsx("p",{className:"settings__hint",children:"Это про то, где агент пишет файлы (Write, Edit, NotebookEdit), не спрашивая разрешения, — не про чтение: читает он в любом случае. Ничего не запрещается наглухо — выход за выбранную границу просто превращается в обычный запрос прав, который остаётся подтвердить или отклонить."}),i.jsx("div",{className:"access",role:"radiogroup","aria-label":"Доступ к папкам",children:Mk.map(C=>{const L=!x&&s.folderAccess===C.value;return i.jsxs("button",{type:"button",role:"radio","aria-checked":L,disabled:x,className:"access__card"+(L?" is-on":"")+(C.risky?" access__card--risky":""),onClick:()=>o({folderAccess:C.value}),children:[i.jsx("span",{className:"access__radio","aria-hidden":"true"}),i.jsxs("span",{className:"access__body",children:[i.jsxs("span",{className:"access__title",children:[C.title,C.risky&&i.jsx("span",{className:"access__risk",children:"самое широкое"})]}),i.jsx("span",{className:"access__desc",children:C.description})]})]},C.value)})})]}),i.jsxs("section",{className:"settings__section",children:[i.jsxs("div",{className:"settings__switch-row",children:[i.jsxs("div",{className:"settings__switch-copy",children:[i.jsx("h3",{className:"settings__heading",children:"Терминал"}),i.jsx("p",{className:"settings__hint",children:"Панель терминала под лентой разговора: команда, которую там набрали, выполняется прямо на этом компьютере с правами вашего пользователя — не в песочнице агента, как Bash-инструмент в разговоре. Выключите — и все открытые вкладки терминала закроются, а процессы в них не переживут закрытия."})]}),x?i.jsx("div",{className:"settings__switch-skeleton","aria-hidden":"true"}):i.jsx("button",{type:"button",role:"switch","aria-checked":_,"aria-label":"Терминал",className:_?"switch is-on":"switch",onClick:()=>o({terminalEnabled:!_}),children:i.jsx("span",{className:"switch__knob"})})]}),i.jsxs("div",{className:"settings__nested"+(v?" is-disabled":""),children:[i.jsx("h4",{className:"settings__nested-heading",children:"Удалённый доступ к терминалу"}),x?i.jsx("p",{className:"settings__hint",children:"Загрузка…"}):i.jsxs(i.Fragment,{children:[v&&i.jsx("p",{className:"settings__hint",children:"Сначала включите терминал выше — удалённый доступ выдаётся к тому, что на этой машине уже разрешено, а не поверх выключенного рубильника."}),T()]})]})]})]})})}const Dk={fiveHour:"5-часовой лимит",sevenDay:"недельный лимит"};function Ok(s){if(!s)return"срок неизвестен";const l=new Date(s);return Number.isNaN(l.getTime())?"срок неизвестен":l.toLocaleString()}function Lk({handoff:s,onContinue:l,onShow:r,onDismiss:c}){return i.jsxs("div",{className:"handoff",role:"status",children:[i.jsxs("div",{className:"handoff__msg",children:[i.jsx("span",{className:"handoff__dot","aria-hidden":"true"}),i.jsxs("span",{children:[s.limit===null?i.jsxs(i.Fragment,{children:["Хэндофф записан вручную ",new Date(s.stoppedAt).toLocaleString()," — сессия остановлена."]}):i.jsxs(i.Fragment,{children:[Dk[s.limit]," (",Math.round(s.utilization)," %) — работа прервана"," ",new Date(s.stoppedAt).toLocaleString(),". Окно сбросится: ",Ok(s.resetsAt),"."]}),s.source==="journal"&&" Хэндофф собран автоматически из журнала."]})]}),i.jsxs("div",{className:"handoff__actions",children:[i.jsx("button",{type:"button",className:"btn btn--sm btn--primary",onClick:l,children:"Продолжить в новой сессии"}),i.jsx("button",{type:"button",className:"btn btn--sm",onClick:r,children:"Показать хэндофф"}),i.jsx("button",{type:"button",className:"btn btn--sm",onClick:c,children:"Скрыть"})]})]})}function zk({handoff:s,onClose:l}){const[r,c]=y.useState("");return y.useEffect(()=>{let o=!1;return $f(s.text).then(d=>{o||c(d)}),()=>{o=!0}},[s.text]),i.jsx(jl,{title:"Хэндофф",className:"modal--wide",onClose:l,children:i.jsx("div",{className:"markdown-preview",dangerouslySetInnerHTML:{__html:r}})})}const Xx={fiveHour:"5-часовой лимит",sevenDay:"недельный лимит"},Uk=12e3;function Hk(s){const l=s%10,r=s%100;return l===1&&r!==11?"сессии":"сессиях"}function Bk({notices:s,onDismiss:l}){return s.length===0?null:i.jsx("div",{className:"limittoasts",children:s.map(r=>i.jsx(Ik,{notice:r,onDismiss:()=>l(r.id)},r.id))})}function Ik({notice:s,onDismiss:l}){return y.useEffect(()=>{const r=window.setTimeout(l,Uk);return()=>window.clearTimeout(r)},[l]),i.jsxs("div",{className:"limittoast",role:"status",children:[i.jsx("span",{className:"limittoast__dot","aria-hidden":"true"}),i.jsx("span",{className:"limittoast__body",children:s.stopped>0?i.jsxs(i.Fragment,{children:["Достигнут ",Xx[s.limit]," (",Math.round(s.utilization)," %): работа прервана в ",s.stopped," ",Hk(s.stopped),", хэндоффов —"," ",s.handoffs,". Сессии остаются запущенными."]}):i.jsxs(i.Fragment,{children:["Достигнут ",Xx[s.limit]," (",Math.round(s.utilization)," %): занятых сессий не было — ничего не прервано."]})}),i.jsx("button",{type:"button",className:"limittoast__dismiss","aria-label":"Закрыть уведомление",onClick:l,children:"✕"})]})}const qk=16;function Gk({pane:s,width:l,onResize:r,onReset:c}){const o=or[s],d=y.useRef(null);function h(_){if(_.button!==0)return;const S=document.querySelector(".main"),v=S?Math.max(0,S.getBoundingClientRect().width-V0):0;d.current={x:_.clientX,width:l,max:Math.min(o.max,l+v)},_.currentTarget.setPointerCapture(_.pointerId),document.body.classList.add("is-resizing"),_.preventDefault()}function m(_){const S=d.current;if(!S)return;const v=o.side==="left"?_.clientX-S.x:S.x-_.clientX;r(Math.min(S.max,S.width+v))}function g(_){d.current&&(d.current=null,_.currentTarget.hasPointerCapture(_.pointerId)&&_.currentTarget.releasePointerCapture(_.pointerId),document.body.classList.remove("is-resizing"))}function x(_){const S=_.key==="ArrowRight"?1:_.key==="ArrowLeft"?-1:0;S!==0&&(_.preventDefault(),r(l+S*qk*(o.side==="left"?1:-1)))}return i.jsx("div",{className:`pane-resizer pane-resizer--${s} pane-resizer--${o.side}`,role:"separator","aria-orientation":"vertical","aria-label":`Ширина панели ${o.label}`,"aria-valuenow":l,"aria-valuemin":o.min,"aria-valuemax":o.max,tabIndex:0,title:"Потяните, чтобы изменить ширину; двойной щелчок — ширина по умолчанию",onPointerDown:h,onPointerMove:m,onPointerUp:g,onPointerCancel:g,onDoubleClick:c,onKeyDown:x,children:i.jsx("span",{className:"pane-resizer__line","aria-hidden":"true"})})}const Yk=16;function Xk({height:s,onResize:l,onReset:r}){const c=y.useRef(null);function o(){const x=document.querySelector(".main .transcript, .main .editor");if(!x)return 1/0;const _=x.getBoundingClientRect().height-Z0;return Math.round(s+Math.max(0,_))}function d(x){x.button===0&&(c.current={y:x.clientY,height:s,max:o()},x.currentTarget.setPointerCapture(x.pointerId),document.body.classList.add("is-resizing-row"),x.preventDefault())}function h(x){const _=c.current;if(!_)return;const S=_.y-x.clientY;l(_.height+S,_.max)}function m(x){c.current&&(c.current=null,x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),document.body.classList.remove("is-resizing-row"))}function g(x){const _=x.key==="ArrowUp"?1:x.key==="ArrowDown"?-1:0;_!==0&&(x.preventDefault(),l(s+_*Yk,o()))}return i.jsx("div",{className:"term-resizer",role:"separator","aria-orientation":"horizontal","aria-label":"Высота панели терминала","aria-valuenow":s,"aria-valuemin":dy,tabIndex:0,title:"Потяните, чтобы изменить высоту; двойной щелчок — высота по умолчанию",onPointerDown:d,onPointerMove:h,onPointerUp:m,onPointerCancel:m,onDoubleClick:r,onKeyDown:g,children:i.jsx("span",{className:"term-resizer__line","aria-hidden":"true"})})}function Vx(){const s=document.documentElement,l=getComputedStyle(s),r=J=>l.getPropertyValue(J).trim(),c=r("--surface"),o=r("--text"),d=r("--text-2"),h=r("--muted"),m=r("--accent"),g=r("--accent-fg"),x=r("--select"),_=r("--danger"),S=r("--ok"),v=r("--warn"),E=r("--cm-fn"),T=r("--cm-key"),C=r("--cm-type"),L=$x(o,c,55),X=J=>$x(J,"#ffffff",25);return{background:c,foreground:o,cursor:m,cursorAccent:g,selectionBackground:x,black:L,brightBlack:h,red:_,brightRed:X(_),green:S,brightGreen:X(S),yellow:v,brightYellow:X(v),blue:E,brightBlue:X(E),magenta:T,brightMagenta:X(T),cyan:C,brightCyan:X(C),white:d,brightWhite:o}}function Vk(){return getComputedStyle(document.documentElement).getPropertyValue("--mono").trim()}let Ws=null;function $k(s){return Ws||(Ws=document.createElement("span"),Ws.style.position="fixed",Ws.style.width="0",Ws.style.height="0",Ws.style.opacity="0",Ws.style.pointerEvents="none",document.body.appendChild(Ws)),Ws.style.color=s,getComputedStyle(Ws).color}function $x(s,l,r){return $k(`color-mix(in srgb, ${s} ${100-r}%, ${l} ${r}%)`)}let Tf=null;function Qk(){return Tf||(Tf=Promise.all([Ke(()=>import("./xterm-D6Mng-DB.js").then(s=>s.x),__vite__mapDeps([22,23]),import.meta.url),Ke(()=>import("./addon-fit-CevVMrUA.js").then(s=>s.a),__vite__mapDeps([24,23]),import.meta.url),Ke(()=>import("./addon-web-links-CnB65OV_.js").then(s=>s.a),__vite__mapDeps([25,23]),import.meta.url),Ke(()=>Promise.resolve({}),__vite__mapDeps([26]),import.meta.url)]).then(([s,l,r])=>({Terminal:s.Terminal,FitAddon:l.FitAddon,WebLinksAddon:r.WebLinksAddon})).catch(s=>{throw Tf=null,s})),Tf}function Kk({terminals:s,activeId:l,blocked:r,error:c,onDismissError:o,height:d,offset:h,mobile:m=!1,zoomed:g,onToggleZoom:x,onSelect:_,onOpen:S,onClose:v,onInput:E,onResize:T,onAttach:C,onHide:L,registerSink:X}){const[J,G]=y.useState(()=>Vx());return y.useEffect(()=>{const O=new MutationObserver(()=>G(Vx()));return O.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>O.disconnect()},[]),i.jsxs("div",{className:"termpanel"+(m?" termpanel--mobile":"")+(!m&&g?" termpanel--zoomed":""),style:m?{height:d,top:(h==null?void 0:h.top)??0,left:(h==null?void 0:h.left)??0}:g?void 0:{height:d},children:[i.jsxs("div",{className:"termpanel__tabbar",onDoubleClick:O=>{x&&(O.target.closest("button")||x())},children:[i.jsx("div",{className:"termpanel__tabs",role:"tablist","aria-label":"Открытые терминалы",children:s.map(O=>i.jsxs("div",{role:"tab","aria-selected":O.id===l,className:"termtab"+(O.id===l?" is-on":"")+(O.exitCode!==null?" termtab--exited":""),onDoubleClick:Z=>{x&&(Z.target.closest(".termtab__close")||x())},children:[i.jsx("button",{className:"termtab__name",title:O.cwd,onClick:()=>_(O.id),children:O.title}),O.exitCode!==null&&i.jsx("span",{className:"termtab__code",title:`Оболочка завершилась с кодом ${O.exitCode}`,children:O.exitCode}),i.jsx("button",{className:"termtab__close",title:"Закрыть терминал","aria-label":`Закрыть терминал «${O.title}»`,onClick:()=>v(O.id),children:"✕"})]},O.id))}),i.jsx("button",{className:"termpanel__add",title:"Новый терминал","aria-label":"Новый терминал",disabled:r,onClick:S,children:"+"}),i.jsx("div",{className:"termpanel__spacer"}),x&&i.jsx("button",{className:"termpanel__zoom",title:g?"Свернуть терминал — то же самое, что двойной клик по вкладке":"Развернуть терминал на весь экран — то же самое, что двойной клик по вкладке","aria-label":g?"Свернуть терминал":"Развернуть терминал на весь экран","aria-pressed":g,onClick:x,children:i.jsx(vc,{active:g})}),i.jsx("button",{className:"termpanel__hide",title:"Скрыть панель","aria-label":"Скрыть панель терминала",onClick:L,children:"✕"})]}),c&&s.length>0&&i.jsx(Qx,{message:c,strip:!0,onRetry:null,onDismiss:o}),i.jsxs("div",{className:"termpanel__body",children:[c&&s.length===0?i.jsx(Qx,{message:c,onRetry:r?null:S,onDismiss:o}):r?i.jsxs("div",{className:"termpanel__empty",children:[i.jsx("p",{children:"Терминал с удалённых устройств выключен"}),i.jsx("p",{className:"termpanel__hint",children:"Откройте «Удалённый доступ» → «Прислать письмо»: на почту аккаунта придёт ссылка, и после перехода по ней терминал заработает прямо здесь. Если сейчас доберётесь до самого компьютера — там разрешение включается сразу, без письма."})]}):s.length===0&&i.jsxs("div",{className:"termpanel__empty",children:[i.jsx("p",{children:"Терминалов не открыто"}),i.jsx("button",{className:"btn btn--primary",onClick:S,children:"Открыть терминал"})]}),s.map(O=>i.jsx(Fk,{id:O.id,exitCode:O.exitCode,active:O.id===l,theme:J,mobile:m,onInput:E,onResize:T,onAttach:C,registerSink:X},O.id))]})]})}function Qx({message:s,strip:l=!1,onRetry:r,onDismiss:c}){const{lede:o,hint:d,details:h}=Zk(s);return i.jsxs("div",{className:l?"termfail termfail--strip":"termfail",role:"alert",children:[i.jsxs("div",{className:"termfail__text",children:[i.jsx("p",{className:"termfail__lede",children:o}),d&&i.jsx("p",{className:"termfail__hint",children:d}),h&&i.jsxs("details",{className:"termfail__details",children:[i.jsx("summary",{children:"Подробности"}),i.jsx("pre",{children:h})]})]}),i.jsxs("div",{className:"termfail__bar",children:[r&&i.jsx("button",{className:"btn btn--primary",onClick:r,children:"Открыть терминал"}),i.jsx("button",{className:"btn",onClick:c,children:"Понятно"})]})]})}function Zk(s){const[l="",...r]=s.trim().split(`
124
+
125
+ `),c=l.split(`
126
+ `).map(o=>o.trim()).filter(o=>o!=="");return{lede:c[0]??s.trim(),hint:c.slice(1).join(" "),details:r.join(`
127
+
128
+ `).trim()}}function Fk({id:s,exitCode:l,active:r,theme:c,mobile:o,onInput:d,onResize:h,onAttach:m,registerSink:g}){const x=y.useRef(null),_=y.useRef(null),S=y.useRef(!1),v=y.useRef(o);v.current=o;const E=y.useRef(c),T=y.useRef(l),[C,L]=y.useState("loading"),[X,J]=y.useState(!1);return y.useEffect(()=>{if(!x.current)return;let O=!1,Z=null;L("loading"),J(!1);const M=window.setTimeout(()=>{O||J(!0)},200);return(async()=>{var ye;let D;try{D=await Qk()}catch{window.clearTimeout(M),O||L("error");return}if(O||!x.current)return;window.clearTimeout(M);const{Terminal:H,FitAddon:ne,WebLinksAddon:he}=D,W=new H({fontFamily:Vk()||"monospace",fontSize:13,lineHeight:1.2,cursorBlink:!0,cursorStyle:"bar",scrollback:5e3,theme:E.current}),ue=new ne;W.loadAddon(ue),W.loadAddon(new he),W.open(x.current),_.current=W,W.attachCustomKeyEventHandler(N=>{if(N.type!=="keydown"||!(N.ctrlKey||N.metaKey))return!0;if(N.key==="`")return N.preventDefault(),!1;if(N.key==="c"||N.key==="C"){const re=W.getSelection();return re?(N.preventDefault(),yc(re),!1):!N.shiftKey}return N.key==="v"||N.key==="V"?(N.preventDefault(),dp().then(re=>{re&&W.paste(re)}),!1):!0});const je=N=>{N.preventDefault();const V=W.getSelection();if(V){yc(V),W.clearSelection();return}dp().then(re=>{re&&W.paste(re)})};(ye=W.element)==null||ye.addEventListener("contextmenu",je);const Me=W.onData(N=>d(s,N));let Ce={cols:W.cols,rows:W.rows},A=null;const ce=W.onResize(({cols:N,rows:V})=>{A!==null&&window.clearTimeout(A),A=window.setTimeout(()=>{A=null,!(N===Ce.cols&&V===Ce.rows)&&(Ce={cols:N,rows:V},h(s,N,V))},100)}),z=new ResizeObserver(()=>{try{ue.fit()}catch{return}v.current&&W.scrollToBottom()});z.observe(x.current);const be=g(s,N=>{N.kind==="buffer"&&W.reset(),W.write(N.data)});m(s),T.current!==null&&!S.current&&(S.current=!0,W.write(`\r
129
+ \x1B[2m— Процесс завершён (код ${T.current}) —\x1B[0m\r
130
+ `)),r&&W.focus(),Z=()=>{var N;A!==null&&window.clearTimeout(A),z.disconnect(),(N=W.element)==null||N.removeEventListener("contextmenu",je),Me.dispose(),ce.dispose(),be(),W.dispose(),_.current=null},L("ready")})(),()=>{O=!0,window.clearTimeout(M),Z==null||Z(),Z=null}},[s]),y.useEffect(()=>{if(!o)return;const G=x.current;if(!G)return;let O=null,Z=0,M=!1;const D=W=>{W.pointerType==="mouse"||O!==null||(O=W.pointerId,Z=W.clientY,M=!1)},H=W=>{if(W.pointerId!==O)return;const ue=Z-W.clientY;if(!M){if(Math.abs(ue)<4)return;M=!0,G.setPointerCapture(W.pointerId)}Z=W.clientY;const je=G.querySelector(".xterm-viewport");je&&(je.scrollTop+=ue)},ne=W=>{W.pointerId===O&&(G.hasPointerCapture(W.pointerId)&&G.releasePointerCapture(W.pointerId),O=null,M=!1)},he=W=>W.stopPropagation();return G.addEventListener("pointerdown",D),G.addEventListener("pointermove",H),G.addEventListener("pointerup",ne),G.addEventListener("pointercancel",ne),G.addEventListener("touchmove",he,{capture:!0}),()=>{G.removeEventListener("pointerdown",D),G.removeEventListener("pointermove",H),G.removeEventListener("pointerup",ne),G.removeEventListener("pointercancel",ne),G.removeEventListener("touchmove",he,{capture:!0}),O!==null&&G.hasPointerCapture(O)&&G.releasePointerCapture(O)}},[o]),y.useEffect(()=>{E.current=c,_.current&&(_.current.options.theme=c)},[c]),y.useEffect(()=>{var G;r&&((G=_.current)==null||G.focus())},[r]),y.useEffect(()=>{if(T.current=l,l===null){S.current=!1;return}if(S.current)return;const G=_.current;G&&(S.current=!0,G.write(`\r
131
+ \x1B[2m— Процесс завершён (код ${l}) —\x1B[0m\r
132
+ `))},[l]),i.jsxs("div",{className:"termview"+(r?" is-active":""),children:[i.jsx("div",{ref:x,className:"termview__surface"+(C==="ready"?"":" is-hidden")}),C==="loading"&&X&&i.jsxs("div",{className:"termview__state work",role:"status",children:[i.jsxs("div",{className:"work__dots",children:[i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"}),i.jsx("span",{className:"work__dot"})]}),i.jsx("span",{className:"work__label",children:"Загружается терминал…"})]}),C==="error"&&i.jsxs("div",{className:"termview__state termview__state--error",role:"alert",children:[i.jsx("p",{children:"Не удалось загрузить терминал"}),i.jsx("p",{className:"termpanel__hint",children:"Соединение оборвалось раньше, чем приехал нужный модуль — на мобильном relay это обычное дело на слабой сети. Ниже — перезагрузка страницы, а не тихий повтор: открытые терминалы и их содержимое приедут обратно с хоста, а вот черновик в поле ввода внизу — нет."}),i.jsx("button",{className:"btn btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]})]})}const Jk=2e5,Wk=75,Pk=90;function eN({tokens:s,maxTokens:l,fetchedAt:r}){if(s===null)return null;const c=l??Jk,o=Math.min(100,Math.round(s/c*100)),d=`${s.toLocaleString()} из ${c.toLocaleString()} токенов${r?`
133
+ обновлено в ${new Date(r).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:""}`;return i.jsxs("div",{className:"contextbar","aria-label":`Занято контекста: ${o}%`,title:d,children:[i.jsx("span",{className:"contextbar__label",children:"контекст"}),i.jsx("span",{className:"contextbar__track",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,children:i.jsx("span",{className:`contextbar__fill${tN(o)}`,style:{width:`${o}%`}})}),i.jsxs("span",{className:"contextbar__pct",children:[o,"%"]})]})}function tN(s){return s>=Pk?" contextbar__fill--over":s>=Wk?" contextbar__fill--warn":""}const Py="ccv:last-session",nN=300*1e3,lN=1e4;function sN(){try{const s=localStorage.getItem(Py);if(!s)return null;const l=JSON.parse(s);if(typeof l!="object"||l===null)return null;const{workspaceId:r,sessionId:c,claudeSessionId:o}=l;return typeof r!="string"||typeof c!="string"?null:{workspaceId:r,sessionId:c,claudeSessionId:typeof o=="string"?o:null}}catch{return null}}function aN(s,l){return s.id===l.sessionId?!0:l.claudeSessionId?s.id===l.claudeSessionId||s.claudeSessionId===l.claudeSessionId:!1}const iN={mcp:"mcp",plugins:"plugins",plugin:"plugins"},Kx=[{name:"login",description:"Войти в аккаунт Claude — окно приложения",argumentHint:"",aliases:["signin","вход"]},{name:"switch-account",description:"Сменить аккаунт: выйти и войти заново",argumentHint:"",aliases:["account","аккаунт"]},{name:"logout",description:"Выйти из аккаунта Claude",argumentHint:"",aliases:["signout","выход"]}],rN={active:!1,url:"",awaitingCode:!1,output:"",error:null};function Zx(s,l,r){if(s===null)return null;const c=s.lastIndexOf("/");if(c===-1&&s!=="")return l;const o=r[c===-1?"":s.slice(0,c)];if(!o)return null;const d=s.slice(c+1).toLowerCase();return d===""?{query:s,entries:o}:{query:s,entries:o.filter(h=>h.name.toLowerCase().includes(d)).sort((h,m)=>Fx(h.name,d)-Fx(m.name,d))}}function Fx(s,l){return s.toLowerCase().startsWith(l)?0:1}function Jx(s,l){const r=s.find(o=>o.value===l)??s.find(o=>o.resolvedModel===l),c=l&&!r?l:null;return{rows:[...c?[{value:c,resolvedModel:c,displayName:c,description:"задана в настройках",supportsEffort:!1,effortLevels:[],supportsThinking:!0,supportsAutoMode:!1}]:[],...s],selected:(r==null?void 0:r.value)??c??(s.some(o=>o.value==="default")?"default":"")}}function cN(){var Zc;const s=y.useRef(null),[l,r]=y.useState(!1),[c,o]=y.useState("Нет связи с хостом"),[d,h]=y.useState(null),[m,g]=y.useState(!1),x=y.useMemo(()=>Af()==="relay",[]),[_,S]=y.useState([]),[v,E]=y.useState([]),[T,C]=y.useState([]),[L,X]=y.useState([]),[J,G]=y.useState([]),[O,Z]=y.useState([]),[M,D]=y.useState([]),[H,ne]=y.useState([]),[he,W]=y.useState([]),[ue,je]=y.useState(null),[Me,Ce]=y.useState(null),[A,ce]=y.useState(null),[z,be]=y.useState(null),[ye,N]=y.useState(null),[V,re]=y.useState(_l),[me,Ne]=y.useState(Lh),[ve,De]=y.useState(!1),[yt,Xe]=y.useState(!1),Ve=Yf("(max-width: 860px)"),[$e,It]=y.useState(!1);y.useEffect(()=>{Ve||It(!1)},[Ve]);const[rt,fn]=y.useState(!1),[ft,dn]=y.useState([]),[jn,bn]=y.useState(!1),[Pt,tt]=y.useState(_l),[et,en]=y.useState(null),[Xt,nt]=y.useState(null),[St,Vt]=y.useState([]),[rn,wt]=y.useState(null),[xn,qt]=y.useState(null),[hn,Dn]=y.useState([]),[Gt,ct]=y.useState([]),[Ct,Pe]=y.useState([]),[Sl,le]=y.useState([]),[ge,He]=y.useState(null),[B,P]=y.useState({}),[_e,Ie]=y.useState(null),[Lt,ul]=y.useState({}),[On,fl]=y.useState(null),[ll,Hl]=y.useState([]),[hs,dl]=y.useState(!1),[sl,hl]=y.useState(null),[Yt,$t]=y.useState(null),[wl,kt]=y.useState(!1),[Qt,Oe]=y.useState(rN),[At,qn]=y.useState(null),[tn,Ln]=y.useState(null),[al,Sn]=y.useState(!1),[Bl,,il]=G0(),nn=K0(),[Kt,cn]=y.useState(!1),[Fe,pl]=y.useState(null),[Ds,Gn]=y.useState(null),[Zl,ps]=y.useState(null),[ms,pn]=y.useState(null),[Fl,Zn]=y.useState(null),[zn,wn]=y.useState(""),[zt,Os]=y.useState(null),[Ri,Ls]=y.useState([]),[Yn,kl]=y.useState(!1),[La,kn]=y.useState(null),[ln,Jl]=y.useState(!1),[lt,Xn]=y.useState(!1),[pe,k]=y.useState({}),[Y,fe]=y.useState([""]),[we,Ae]=y.useState([]),[ze,dt]=y.useState(null),[w,se]=y.useState(null),[ke,Je]=y.useState(null),[ht,gs]=y.useState(null),[za,mr]=y.useState(null),[Ua,jc]=y.useState({}),[zs,Wl]=y.useState({}),[bs,xs]=y.useState(!1),[Us,Di]=y.useState(null),[ia,gr]=y.useState(null),Oi=y.useRef(0),ra=y.useRef(null),[ca,Vn]=y.useState(!1),[Pl,Hs]=y.useState([]),[Li,br]=y.useState(null),[Sc,Ha]=y.useState(null),Bs=F0(),Ba=ev(Ve&&ca),Ia=y.useRef(new Map),oa=(Yt==null?void 0:Yt.terminalEnabled)===!0,xr=Af()==="relay"&&((Zc=d==null?void 0:d.shell)==null?void 0:Zc.enabled)!==!0,wc=y.useRef(!1),kc=y.useCallback((p,I)=>(Ia.current.set(p,I),()=>{Ia.current.get(p)===I&&Ia.current.delete(p)}),[]),[ua,yr]=y.useState(!1),[Xo,_r]=y.useState(null),[Vo,zi]=y.useState(_l),[ys,vr]=y.useState(null),[Ui,fa]=y.useState({}),da=y.useRef([]),[sn,Nc]=y.useState(null);function Qf(p){Nc(I=>I===p?null:p)}y.useEffect(()=>{(Ve||sn==="terminal"&&!ca||sn==="files"&&!lt||sn==="search"&&!bs||sn==="git"&&!Kt||sn==="ask"&&!ua||sn==="main"&&we.length===0)&&Nc(null)},[sn,Ve,ca,lt,bs,Kt,ua,we.length]);const[$o]=y.useState(sN),Qo=y.useRef($o),jr=y.useRef(!1),Un=y.useRef(null),Hi=y.useRef(null),Bi=y.useRef(null),Ko=y.useRef(0),Nn=y.useRef(null),Zo=y.useRef(0);Un.current=z,Nn.current=A,Zo.current=V.lastSeq;const Fo=y.useRef(me);Fo.current=me;const Il=y.useRef(null),qa=y.useRef(0);qa.current=Vo.lastSeq;const Sr=y.useRef(null),Ii=y.useRef(""),Ga=y.useRef(null),Is=y.useRef([]),Tc=y.useRef([""]);Is.current=we,Tc.current=Y;const Ya=y.useRef(new Map),_s=y.useRef(new Set),qi=y.useRef(null),Gi=y.useRef(null),Jo=y.useRef(0),Xa=y.useRef(new Set);y.useEffect(()=>{const p=A0();if(!p)return;s.current=p;const I=()=>{r(p.connected),o(p.statusText)};p.onStatus(I),p.onReconnect(()=>{I(),ul({});const Ht=Un.current;Ht&&p.send({type:"session.sync",sessionId:Ht,sinceSeq:Zo.current});const Tn=Il.current;Tn&&p.send({type:"session.sync",sessionId:Tn,sinceSeq:qa.current})});const de=p.on(Ht=>Wo(Ht));p.connect();const Be=window.setInterval(()=>{I(),p.connected&&p.send({type:"ping",nonce:Date.now()})},15e3);return()=>{de(),window.clearInterval(Be),p.close()}},[]);const Wo=y.useCallback(p=>{var I,de,Be,Ht,Tn,Bn,Gl,Fc,Jc;switch(p.type){case"hello.ok":r(!0);break;case"workspace.list":{S(p.workspaces),E(p.archived),ce(Ge=>{var is;if(Ge)return Ge;const pt=Qo.current,Nt=pt&&p.workspaces.find(ks=>ks.id===pt.workspaceId);return(Nt==null?void 0:Nt.id)??((is=p.workspaces[0])==null?void 0:is.id)??null});const xe=Ga.current;if(!xe)break;const Te=p.workspaces.find(Ge=>pN(Ge.path,xe));if(!Te)break;Ga.current=null,fn(!1),ce(Te.id);break}case"workspace.candidates":if(p.query.trim()!==Ii.current)break;dn(p.candidates),p.source==="host"&&bn(!1);break;case"finder.opened":Sr.current=p.sessionId;break;case"workspace.roots":Vt(p.roots);break;case"workspace.created":if(ce(p.workspace.id),p.warnings.length===0){fn(!1),nt(null);break}wt({path:p.workspace.path,warnings:p.warnings});break;case"session.list":if(p.workspaceId!==Nn.current)break;Z(p.sessions),D(p.archived);break;case"folder.list":C(p.workspaceFolders),X(p.sessionFolders),G(p.pinnedFolders??[]);break;case"session.pinned":ne(p.sessions);break;case"session.live":W(p.sessions);break;case"order.state":Ce(p.order);break;case"session.summary":if(p.session.id===Sr.current){en(p.session);break}if(p.session.parentSessionId){p.session.id===Il.current&&vr(p.session);break}if(W(xe=>{const Te=xe.findIndex(pt=>pt.id===p.session.id);if(p.session.state==="closed")return Te===-1?xe:xe.filter(pt=>pt.id!==p.session.id);if(Te===-1)return[...xe,p.session];const Ge=xe.slice();return Ge[Te]=p.session,Ge}),Z(xe=>{const Te=xe.findIndex(pt=>pt.id===p.session.id);if(Te===-1)return[p.session,...xe];const Ge=xe.slice();return Ge[Te]=p.session,Ge}),ne(xe=>{const Te=xe.findIndex(pt=>pt.id===p.session.id);if(Te===-1)return xe;const Ge=xe.slice();return Ge[Te]={...p.session,pinned:!0,...xe[Te].pinnedAt?{pinnedAt:xe[Te].pinnedAt}:{}},Ge}),Un.current===null&&Bi.current&&Bi.current.workspaceId===p.session.workspaceId&&(ay(p.session.id,Bi.current.text),Bi.current=null),be(xe=>xe??p.session.id),((I=Hi.current)==null?void 0:I.sessionId)===p.session.id){const xe=Hi.current;p.session.state==="error"?Hi.current=null:p.session.state!=="closed"&&(Hi.current=null,(de=s.current)==null||de.send({type:"prompt.send",sessionId:xe.sessionId,text:xe.text,images:xe.images}))}break;case"usage.state":p.sessionId===Un.current&&(qn(p.usage),Sn(!1));break;case"context.state":p.sessionId===Un.current&&(Ln(p.context),Sn(!1));break;case"session.capabilities":p.sessionId===Un.current&&N(p.capabilities);break;case"session.events":if(p.sessionId===Il.current){zi(xe=>Mf(xe,p.entries));break}if(p.sessionId===Sr.current){tt(xe=>Mf(xe,p.entries));break}if(p.sessionId!==Un.current)break;for(const xe of p.entries){if(xe.event.kind!=="rewound")continue;const Te=xe.event.toUserIndex,Ge=I0(Fo.current.entries,Te),pt=Ge.reduce((Nt,is)=>is.event.kind==="user.message"?Nt+1:Nt,0);Ne(Nt=>({...Nt,entries:Ge})),re(Nt=>({...Nt,items:q0(Nt.items,Te,pt)}))}re(xe=>Mf(xe,p.entries));break;case"session.history":if(p.sessionId!==Un.current)break;Ne(xe=>U0(xe,p));break;case"side.opened":{if(p.parentSessionId!==Un.current)break;Il.current=p.sessionId,_r(p.sessionId);const xe=da.current;da.current=[];for(const Te of xe)Te(p.sessionId);break}case"side.closed":if(p.parentSessionId!==Un.current)break;Il.current=null,_r(null),zi(_l),vr(null);break;case"git.state":if(p.workspaceId!==Nn.current)break;pl(p.state);break;case"git.commit":if(p.workspaceId!==Nn.current)break;Gn(p.detail);break;case"git.result":if(p.workspaceId!==Nn.current)break;pn({ok:p.ok,message:p.message,url:p.url}),p.ok&&(Gn(null),ps(null),kl(!1),Jl(!1));break;case"git.busy":if(p.workspaceId!==Nn.current)break;wn(p.label);break;case"git.files":if(p.workspaceId!==Nn.current)break;kn({files:p.files,truncated:p.truncated});break;case"github.status":Os(p.status);break;case"github.owners":Ls(p.owners);break;case"fs.dir":if(p.workspaceId!==Nn.current)break;k(xe=>({...xe,[p.path]:p.entries}));break;case"fs.search":if(p.workspaceId!==Nn.current)break;if(p.scope!=="tree"){const xe=p.scope;Wl(Te=>({...Te,[xe]:{query:p.query,entries:p.entries}}));break}mr({query:p.query,entries:p.entries,truncated:p.truncated});break;case"fs.grep":if(p.workspaceId!==Nn.current)break;Di({query:p.query,matches:p.matches,truncated:p.truncated});break;case"fs.file":{if(p.workspaceId!==Nn.current)break;const xe=_s.current.delete(p.file.path);Ae(Ge=>{const pt=Ge.findIndex(ks=>ks.path===p.file.path);if(pt===-1)return[...Ge,gx(p.file,++Jo.current)];const Nt=Ge[pt],is=Ge.slice();return is[pt]=Nt.saved===p.file.content&&!Ra(Nt)?{...Nt,mtime:p.file.mtime,size:p.file.size,stale:!1}:gx(p.file,++Jo.current),is}),xe&&dt(p.file.path);const Te=ra.current;Te&&Te.path===p.file.path&&(ra.current=null,gr({...Te,token:++Oi.current}));break}case"fs.media":{if(p.workspaceId!==Nn.current)break;Xa.current.delete(p.path),Ae(xe=>xe.map(Te=>Te.path===p.path?{...Te,mediaBase64:p.base64,mediaError:void 0}:Te));break}case"fs.mediaFailed":{if(p.workspaceId!==Nn.current)break;Xa.current.delete(p.path),Ae(xe=>xe.map(Te=>Te.path===p.path?{...Te,mediaError:p.message}:Te));break}case"fs.saved":{if(p.workspaceId!==Nn.current)break;const xe=Ya.current.get(p.path);Ya.current.delete(p.path);const Te=xe!==void 0;Ae(pt=>pt.map(Nt=>Nt.path!==p.path?Nt:Te?{...Nt,saved:xe,mtime:p.mtime,size:p.size,stale:!1}:{...Nt,stale:!0}));const Ge=Is.current.find(pt=>pt.path===p.path);!Te&&Ge&&!Ra(Ge)&&((Be=s.current)==null||Be.send({type:"fs.read",workspaceId:p.workspaceId,path:p.path})),(Ht=s.current)==null||Ht.send({type:"git.state",workspaceId:p.workspaceId});break}case"fs.result":{if(p.workspaceId!==Nn.current)break;if(se({ok:p.ok,message:p.message}),p.ok||Ya.current.delete(p.path),p.conflict&&Ae(Te=>Te.map(Ge=>Ge.path===p.path?{...Ge,stale:!0}:Ge)),Gi.current===p.path){const Te=Gi.current;Gi.current=null,p.ok&&(_s.current.add(Te),(Tn=s.current)==null||Tn.send({type:"fs.read",workspaceId:p.workspaceId,path:Te}))}const xe=qi.current;if(p.ok&&xe&&xe.to===p.path){qi.current=null;const Te=Ge=>Ge===xe.from?xe.to:Ge.startsWith(`${xe.from}/`)?xe.to+Ge.slice(xe.from.length):Ge;Ae(Ge=>Ge.map(pt=>({...pt,path:Te(pt.path)}))),dt(Ge=>Ge===null?null:Te(Ge)),fe(Ge=>Ge.map(Te)),k(Ge=>{const pt={};for(const[Nt,is]of Object.entries(Ge))Nt===xe.from||Nt.startsWith(`${xe.from}/`)||(pt[Nt]=is);return pt})}p.ok&&((Bn=s.current)==null||Bn.send({type:"git.state",workspaceId:p.workspaceId}));break}case"term.list":if(p.workspaceId!==Nn.current)break;Hs(p.terminals);break;case"term.opened":if(p.terminal.workspaceId!==Nn.current)break;Ha(null),Hs(xe=>{const Te=xe.findIndex(pt=>pt.id===p.terminal.id);if(Te===-1)return[...xe,p.terminal];const Ge=xe.slice();return Ge[Te]=p.terminal,Ge}),wc.current&&(wc.current=!1,br(p.terminal.id));break;case"term.buffer":(Gl=Ia.current.get(p.id))==null||Gl({kind:"buffer",data:p.data});break;case"term.data":(Fc=Ia.current.get(p.id))==null||Fc({kind:"data",data:p.data});break;case"term.exit":Hs(xe=>xe.map(Te=>Te.id===p.id?{...Te,exitCode:p.exitCode}:Te));break;case"term.closed":Hs(xe=>xe.filter(Te=>Te.id!==p.id));break;case"mcp.list":p.sessionId===Un.current&&Dn(p.servers);break;case"plugin.list":if(p.sessionId!==Un.current)break;ct(p.plugins),Pe(p.marketplaces),le(p.catalog);break;case"operation.result":p.sessionId===Un.current&&He(p.result);break;case"auth.status":hl(p.status);break;case"relay.state":h(p.state);break;case"settings.state":$t(p.settings);break;case"handoff.state":P(xe=>{if(!p.handoff){if(!(p.sessionId in xe))return xe;const Te={...xe};return delete Te[p.sessionId],Te}return{...xe,[p.sessionId]:p.handoff}});break;case"handoff.written":ul(xe=>{if(!(p.sessionId in xe))return xe;const Te={...xe};return delete Te[p.sessionId],Te}),p.handoff&&Un.current===p.sessionId?fl(p.handoff):p.handoff||console.warn("[handoff] хост не смог записать хэндофф",p.sessionId);break;case"limit.stopped":Ko.current+=1,Hl(xe=>[...xe,{id:Ko.current,limit:p.limit,utilization:p.utilization,stopped:p.stopped,handoffs:p.handoffs}]);break;case"auth.login":Oe(p.state),p.state.active&&dl(!0);break;case"session.closed":W(xe=>xe.filter(Te=>Te.id!==p.sessionId)),Z(xe=>xe.map(Te=>Te.id===p.sessionId?{...Te,state:"closed"}:Te));break;case"error":console.error("[host]",p.message,p.context??""),(p.context==="workspace.open"||p.context==="workspace.create")&&(Ga.current=null,nt(p.message)),(Jc=p.context)!=null&&Jc.startsWith("term.")&&Ha(p.message);break}},[]),ee=y.useCallback(p=>{var I;(I=s.current)==null||I.send(p)},[]);y.useEffect(()=>{A&&ee({type:"session.list",workspaceId:A})},[A,ee]),y.useEffect(()=>{l&&ee({type:"session.pins"})},[l,ee]),y.useEffect(()=>{l&&ee({type:"settings.get"})},[l,ee]),y.useEffect(()=>{if(l)return ee({type:"session.drafts",sessionIds:iy()}),O0(p=>ee({type:"session.drafts",sessionIds:p}))},[l,ee]),y.useEffect(()=>{if(jr.current)return;const p=Qo.current;if(!p||!A)return;if(A!==p.workspaceId){jr.current=!0;return}if(z){jr.current=!0;return}if(O.length===0)return;const I=O.find(de=>aN(de,p));jr.current=!0,I&&Yi(I)},[O,A,z]),y.useEffect(()=>{!A||xr||!oa||ee({type:"term.list",workspaceId:A})},[A,xr,oa,ee]),y.useEffect(()=>{br(p=>{var I;return p&&Pl.some(de=>de.id===p)?p:((I=Pl[0])==null?void 0:I.id)??null})},[Pl]),y.useEffect(()=>{rt&&ee({type:"workspace.roots"})},[rt,ee]);const es=y.useCallback(()=>{const p=Un.current;p&&(Sn(!0),ee({type:"usage.get",sessionId:p}),ee({type:"context.get",sessionId:p}))},[ee]);y.useEffect(()=>{if(!al)return;const p=window.setTimeout(()=>Sn(!1),lN);return()=>window.clearTimeout(p)},[al]);const Ec=y.useMemo(()=>{const p=Math.max((At==null?void 0:At.fetchedAt)??0,(tn==null?void 0:tn.fetchedAt)??0);return p>0?p:null},[At==null?void 0:At.fetchedAt,tn==null?void 0:tn.fetchedAt]);y.useEffect(()=>{if(Ln(null),!z)return;es();const p=()=>{document.hidden||es()},I=window.setInterval(p,nN),de=()=>{document.hidden||es()};return document.addEventListener("visibilitychange",de),()=>{window.clearInterval(I),document.removeEventListener("visibilitychange",de)}},[z,es]),y.useEffect(()=>{if(!z){Ne(Lh);return}Ne({...Lh,loading:!0}),ee({type:"session.history",sessionId:z})},[z,ee]);const wr=y.useCallback(()=>{!z||me.loading||!Rb(me)||(Ne(p=>({...p,loading:!0})),ee({type:"session.history",sessionId:z,before:cy(me)}))},[z,me,ee]),Po=y.useMemo(()=>H0(me.entries),[me.entries]),Q=y.useMemo(()=>O.find(p=>p.id===z)??null,[O,z]),ha=z?(Q==null?void 0:Q.claudeSessionId)??z:null,pa=ha?B[ha]??null:null;y.useEffect(()=>{ha&&ee({type:"handoff.get",sessionId:ha})},[ha,ee]),y.useEffect(()=>{_e&&!(_e.sessionId in B)&&Ie(null)},[B,_e]);const Cc=y.useMemo(()=>{var de;if(!At)return null;const p=(((de=At.buckets)==null?void 0:de.length)??0)>0,I=(Q==null?void 0:Q.provider)==="antigravity";return p===I?At:null},[At,Q==null?void 0:Q.provider]),Ac="Обновить лимиты и контекст",eu=Ac+(Ec?`
134
+ обновлено в ${new Date(Ec).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:"");y.useEffect(()=>{document.documentElement.dataset.provider=(Q==null?void 0:Q.provider)??"claude"},[Q==null?void 0:Q.provider]),y.useEffect(()=>{(Q==null?void 0:Q.provider)==="antigravity"&&yr(!1)},[Q==null?void 0:Q.provider]);const Va=_.find(p=>p.id===A)??v.find(p=>p.id===A)??null;y.useEffect(()=>{if(!A||!z)return;const p={workspaceId:A,sessionId:z,claudeSessionId:(Q==null?void 0:Q.claudeSessionId)??null};try{localStorage.setItem(Py,JSON.stringify(p))}catch{}},[A,z,Q==null?void 0:Q.claudeSessionId]);function Kf(p){Ga.current=p,nt(null),ee({type:"workspace.open",path:p})}function Zf(p,I,de){nt(null),ee({type:"workspace.create",parent:p,name:I,init:de})}function Ff(p){if(Ii.current=p,!p){dn([]),bn(!1);return}bn(!0),ee({type:"workspace.find",query:p})}function Jf(p){Ii.current=p,tt(_l),ee({type:"workspace.find.agent",query:p})}function ml(){fn(!1),nt(null),wt(null),dn([]),tt(_l),en(null),Ii.current="",Ga.current=null}function ts(){const p=Un.current;p&&Il.current&&ee({type:"side.reset",sessionId:p}),Il.current=null,_r(null),zi(_l),vr(null),fa({}),da.current=[]}function tu(p){ee({type:"workspace.close",workspaceIds:p}),!(!A||!p.includes(A))&&(ts(),ce(null),be(null),Z([]),D([]),re(_l),N(null),Xe(!1))}function nu(p,I){ee({type:"session.archive",workspaceId:p,sessionIds:I}),z&&(I.includes(z)||Q!=null&&Q.claudeSessionId&&I.includes(Q.claudeSessionId))&&(ts(),be(null),re(_l),N(null),Xe(!1))}function lu(p){ee({type:"workspace.restore",workspaceIds:p})}function su(p,I,de){ee({type:"folder.create",scope:p,name:I,workspaceId:de})}function Mc(p,I){ee({type:"folder.rename",folderId:p,name:I})}function Wf(p){ee({type:"folder.delete",folderId:p})}function $a(p,I,de,Be){ee({type:"folder.assign",scope:p,itemId:I,folderId:de,workspaceId:Be})}function Rc(p="claude"){A&&(ts(),be(null),N(null),re(_l),Xe(!1),ee({type:"session.start",workspaceId:A,provider:p}),De(!1))}function ma(p){ts(),Hn(),ce(p),be(null),re(_l),N(null),Xe(!1),pl(null),Gn(null),ps(null),pn(null),wn(""),kl(!1),kn(null),Jl(!1),Hs([]),br(null)}function Dc(p,I,de){ee({type:"session.pin",workspaceId:p,sessionIds:I,pinned:de})}function au(p){return p.state==="running"||p.state==="waiting_permission"||p.state==="reconnecting"||p.backgroundWork}function vs(p){if(au(p)){je(p);return}ee({type:"session.close",sessionId:p.id})}function Qa(p,I,de){Ce(Be=>{const Ht=Be??{workspaces:[],sessions:{},pinned:[],live:[]};if(p==="sessions"){if(!de)return Be;const Tn={...Ht.sessions};return I&&I.length>0?Tn[de]=I:delete Tn[de],{...Ht,sessions:Tn}}return{...Ht,[p]:I??[]}}),ee({type:"order.set",scope:p,ids:I,...de?{workspaceId:de}:{}})}function Oc(p){p.workspaceId!==A&&ma(p.workspaceId),Yi(p)}function Yi(p){if(De(!1),ts(),re(_l),N(null),Xe(!1),p.state==="closed"){be(null),ee({type:"session.start",workspaceId:p.workspaceId,resume:p.id});return}be(p.id),ee({type:"session.sync",sessionId:p.id,sinceSeq:0})}function ga(p,I){if(z){if((Q==null?void 0:Q.state)==="closed"){Hi.current={sessionId:Q.id,text:p,images:I},Yi(Q);return}ee({type:"prompt.send",sessionId:z,text:p,images:I})}}function Lc(p){const I=he.find(de=>(de.claudeSessionId??de.id)===p.sessionId&&de.state!=="closed");Uc(p.workspaceId,p.sessionId,p.text),I&&ee({type:"session.close",sessionId:I.id})}function zc(p){Uc(p.workspaceId,p.claudeSessionId??p.id,null)}function Uc(p,I,de){Bi.current=de===null?null:{workspaceId:p,text:de},p!==A?ma(p):(ts(),be(null),N(null),re(_l),Xe(!1)),ee({type:"session.start",workspaceId:p,provider:"claude",continuesFrom:I}),De(!1)}y.useEffect(()=>{On&&(fl(null),Lc(On))},[On]);function iu(p){Lt[p.id]||(ul(I=>({...I,[p.id]:!0})),ee({type:"session.handoff",sessionId:p.id}))}function Pf(p){ee({type:"handoff.dismiss",sessionId:p})}function ru(p,I){ee({type:"session.rename",sessionId:p.id,title:I,workspaceId:p.workspaceId}),Z(de=>de.map(Be=>Be.id===p.id?{...Be,title:I}:Be))}function Hc(p){z&&(De(!1),He(null),qt(p),ee({type:"mcp.list",sessionId:z}),ee({type:"plugin.list",sessionId:z}))}const cu={mcpAction:(p,I)=>{z&&(ee({type:"mcp.action",sessionId:z,name:p,action:I}),qt(null))},mcpAdd:(p,I)=>{z&&ee({type:"mcp.add",sessionId:z,name:p,draft:I})},mcpRemove:p=>{z&&ee({type:"mcp.remove",sessionId:z,name:p})},pluginInstall:p=>{z&&ee({type:"plugin.install",sessionId:z,spec:p})},pluginUninstall:p=>{z&&ee({type:"plugin.uninstall",sessionId:z,id:p})},pluginToggle:(p,I)=>{z&&ee({type:"plugin.toggle",sessionId:z,id:p,enabled:I})},marketplaceAdd:p=>{z&&ee({type:"marketplace.add",sessionId:z,source:p})},marketplaceRemove:p=>{z&&ee({type:"marketplace.remove",sessionId:z,name:p})}};function kr(){De(!1),dl(!0),ee({type:"auth.status"})}const gl={login:(p,I)=>ee({type:"auth.login",mode:p,switchAccount:I}),submitCode:p=>ee({type:"auth.code",code:p}),cancel:()=>ee({type:"auth.cancel"}),logout:()=>ee({type:"auth.logout"})};function Nr(){De(!1),kt(!0),ee({type:"settings.get"})}function Nl(p){$t(I=>I&&{...I,...p}),ee({type:"settings.update",settings:p})}function Ka(p){z&&ee({type:"side.ask",sessionId:z,text:p})}function Bc(){z&&(ee({type:"side.reset",sessionId:z}),Il.current=null,_r(null),zi(_l),vr(null),fa({}),da.current=[])}function qs(p){const I=Il.current;if(I){p(I);return}const de=Un.current;de&&(da.current.push(p),ee({type:"side.open",sessionId:de}))}function Xi(){A&&ee({type:"git.state",workspaceId:A})}function Ic(p){A&&(ps(p),ee({type:"git.show",workspaceId:A,ref:p}))}function Gs(p,I){pn(null),Zn({target:p,label:I})}function ou(){!A||!Fl||(ee({type:"git.checkout",workspaceId:A,target:Fl.target}),Zn(null))}function Tr(){A&&(pn(null),ee({type:"git.push",workspaceId:A}))}function Za(p){A&&(pn(null),ee({type:"git.pull",workspaceId:A,merge:p}))}function ed(){A&&(pn(null),kn(null),kl(!0),ee({type:"github.status"}),ee({type:"github.owners"}),ee({type:"git.files",workspaceId:A}))}function bl(p){A&&(pn(null),ee({type:"git.publish",workspaceId:A,...p}))}function qc(p){A&&(pn(null),ee({type:"git.remote",workspaceId:A,url:p}))}function js(){pn(null),Jl(!0)}function uu(p){ee({type:"github.token",token:p}),ee({type:"github.owners"})}function Er(){ee({type:"github.status"}),ee({type:"github.owners"})}y.useEffect(()=>{if(!(!lt||!A))for(const p of Y)p in pe||ee({type:"fs.list",workspaceId:A,path:p})},[lt,Y,pe,A,ee]);function ba(p){fe(I=>I.includes(p)?I.filter(de=>de!==p):[...I,p])}function Gc(p){if(!p){mr(null);return}A&&ee({type:"fs.search",workspaceId:A,query:p})}function fu(p){if(!p){Di(null);return}A&&ee({type:"fs.grep",workspaceId:A,query:p})}const Cr=y.useCallback((p,I)=>{jc(Ht=>({...Ht,[p]:I}));const de=Nn.current;if(I===null||!de)return;const Be=I.lastIndexOf("/");if(Be!==-1){ee({type:"fs.list",workspaceId:de,path:I.slice(0,Be)});return}if(I===""){ee({type:"fs.list",workspaceId:de,path:""});return}ee({type:"fs.search",workspaceId:de,query:I,scope:p})},[ee]),du=y.useMemo(()=>Zx(Ua.mention??null,zs.mention??null,pe),[Ua.mention,zs.mention,pe]),Tl=y.useMemo(()=>Zx(Ua.side??null,zs.side??null,pe),[Ua.side,zs.side,pe]);function Fa(p){Wa(p.path,{line:p.line,column:p.column})}function Ja(p){const I=[];let de=ur(p.path);for(;I.push(de),!!de;)de=ur(de);fe(Be=>{const Ht=new Set(Be);for(const Tn of I)Ht.add(Tn);return p.kind==="dir"&&Ht.add(p.path),[...Ht]}),p.kind==="file"&&Wa(p.path)}function Wa(p,I){if(Is.current.find(Be=>Be.path===p)){dt(p),I&&gr({path:p,...I,token:++Oi.current});return}A&&(I&&(ra.current={path:p,...I}),_s.current.add(p),ee({type:"fs.read",workspaceId:A,path:p}))}function xa(p,I=!1){const de=Is.current,Be=de.find(Bn=>Bn.path===p);if(Be&&Ra(Be)&&!I){gs(p);return}gs(null);const Ht=de.findIndex(Bn=>Bn.path===p),Tn=de.filter(Bn=>Bn.path!==p);Ae(Tn),dt(Bn=>{var Gl;return Bn===p?((Gl=Tn[Math.min(Ht,Tn.length-1)])==null?void 0:Gl.path)??null:Bn})}function Fn(p,I=!1){const de=Is.current.find(Be=>Be.path===p);!de||!A||!I&&!Ra(de)||(Ya.current.set(p,de.text),ee({type:"fs.write",workspaceId:A,path:p,content:de.text,eol:de.eol,encoding:de.encoding,baseMtime:de.mtime,...I?{force:!0}:{}}))}function El(p){A&&ee({type:"fs.read",workspaceId:A,path:p})}function Ys(p){A&&(Xa.current.has(p)||(Xa.current.add(p),ee({type:"fs.readMedia",workspaceId:A,path:p})))}const ns=y.useRef(new Map);function ls(p){const I=ns.current,de=I.get(p);de&&clearTimeout(de);const Be=(Yt==null?void 0:Yt.autoSaveAfterPauseMs)??0;Be<=0||I.set(p,setTimeout(()=>{I.delete(p);const Ht=Is.current.find(Tn=>Tn.path===p);Ht&&Ra(Ht)&&!Ht.stale&&Fn(p)},Be))}function Ss(p,I,de){if(!A)return;const Be=p?`${p}/${de}`:de;se(null),I==="file"&&(Gi.current=Be),ee({type:"fs.create",workspaceId:A,path:Be,kind:I})}function hu(p,I){if(!A)return;const de=ur(p),Be=de?`${de}/${I}`:I;se(null),qi.current={from:p,to:Be},ee({type:"fs.rename",workspaceId:A,path:p,to:Be})}function Yc(p,I){if(!A)return;const de=p.slice(p.lastIndexOf("/")+1),Be=I?`${I}/${de}`:de;Be!==p&&(se(null),qi.current={from:p,to:Be},ee({type:"fs.rename",workspaceId:A,path:p,to:Be}))}function Xc(p,I){A&&(se(null),ee({type:"fs.copy",workspaceId:A,path:p,toDir:I}))}function pu(p){A&&(se(null),Je(null),ee({type:"fs.delete",workspaceId:A,path:p.path}),Ae(I=>I.filter(de=>de.path!==p.path&&!de.path.startsWith(`${p.path}/`))),dt(I=>I&&(I===p.path||I.startsWith(`${p.path}/`))?null:I))}function Hn(){k({}),fe([""]),Ae([]),dt(null),se(null),mr(null),Di(null),jc({}),Wl({}),gr(null),_s.current.clear(),Ya.current.clear(),Xa.current.clear(),ra.current=null,qi.current=null,Gi.current=null}function Ut(){!A||xr||!oa||(Ha(null),wc.current=!0,ee({type:"term.open",workspaceId:A,cols:80,rows:24}))}function st(p){ee({type:"term.close",id:p})}function Xs(p,I){z&&ee({type:"permission.respond",sessionId:z,requestId:p,decision:I})}function Cl(p,I){z&&ee({type:"permission.respond",sessionId:z,requestId:p,decision:"allow",answers:I})}function Vc(p){z&&ee({type:"permission.respond",sessionId:z,requestId:p,decision:"deny",reason:"Пользователь не стал отвечать на вопросы"})}function Vs(p,I){z&&ee({type:"permission.respond",sessionId:z,requestId:p,decision:"allow",plan:I})}function mu(p){z&&ee({type:"permission.respond",sessionId:z,requestId:p,decision:"deny",reason:"Пользователь просит продолжить планирование"})}y.useEffect(()=>{function p(I){if(I.key!=="Escape")return;if(sn!==null){const Be=I.target;if(!(Be instanceof HTMLElement&&Be.closest(".termview, .editor, .sidepane"))){Nc(null);return}}if(!z||V.pending.length>0)return;const de=I.target;de instanceof HTMLElement&&de.closest(".sidepane, .editor")||ee({type:"control.interrupt",sessionId:z})}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[z,V.pending.length,ee,sn]),y.useEffect(()=>{function p(I){I.key!=="`"||!(I.ctrlKey||I.metaKey)||oa&&(I.preventDefault(),Vn(de=>!de))}return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[oa]);const $c=y.useMemo(()=>{const p=(ye==null?void 0:ye.commands)??[];return p.length===0||(Q==null?void 0:Q.provider)==="antigravity"?p:[...p,{name:"plugins",description:"Плагины и маркетплейсы — окно приложения",argumentHint:"",aliases:["plugin"]},...Kx]},[ye,Q==null?void 0:Q.provider]);function ya(p){const I=iN[p];return I&&(Q==null?void 0:Q.provider)!=="antigravity"?(Hc(I),!0):(Q==null?void 0:Q.provider)==="antigravity"||!Kx.some(de=>de.name===p)?!1:(kr(),p==="logout"&&gl.logout(),p==="switch-account"&&gl.login("claudeai",!0),!0)}const ss=(Q==null?void 0:Q.state)==="waiting_permission",xl=(Q==null?void 0:Q.state)==="reconnecting",Jn=(Q==null?void 0:Q.state)==="running"||xl||ss,Wn=V.pending[0]??null,$s=Wn?dw(Wn.toolName,Wn.input):null;y.useEffect(()=>{!Kt&&!lt||!A||Jn||ee({type:"git.state",workspaceId:A})},[Kt,lt,A,Jn,ee]),y.useEffect(()=>{if(!(Jn||!A)){lt&&k(p=>{const I={};for(const[de,Be]of Object.entries(p))Tc.current.includes(de)||(I[de]=Be);return I});for(const p of Is.current)Ra(p)||ee({type:"fs.read",workspaceId:A,path:p.path})}},[Jn,A,lt,ee]);const ql=(Q==null?void 0:Q.cwd)??(ye==null?void 0:ye.cwd)??null,ws=(ye==null?void 0:ye.models)??[],Al=(Q==null?void 0:Q.model)??(ye==null?void 0:ye.model)??null,{rows:Ar,selected:Qc}=Jx(ws,Al),as=ys?{model:ys.model,effort:ys.effort,ultracode:ys.ultracode,thinking:ys.thinking,switchOnFlag:ys.switchModelsOnFlag}:{model:Ui.model??Al,effort:Ui.effort??(Q==null?void 0:Q.effort)??null,ultracode:Ui.ultracode??(Q==null?void 0:Q.ultracode)??!1,thinking:Ui.thinking??(Q==null?void 0:Q.thinking)??!0,switchOnFlag:Ui.switchOnFlag??(Q==null?void 0:Q.switchModelsOnFlag)??!0},Vi=Jx(ws,as.model),_a=(ys==null?void 0:ys.state)==="running",yn=ze?we.find(p=>p.path===ze)??null:null,Mr=new Set(we.filter(Ra).map(p=>p.path)),Pa=p=>i.jsx(Gk,{pane:p,width:nn.widths[p],onResize:I=>nn.setWidth(p,I),onReset:()=>nn.reset(p)}),ei=p=>Ve?null:()=>Qf(p),td=(Q==null?void 0:Q.provider)==="antigravity"?X0:oy,gu=ye&&i.jsx(Ms,{title:"Режим прав",value:(Q==null?void 0:Q.permissionMode)??"default",options:td.map(p=>({value:p.value,label:p.value,hint:p.hint})),onChange:p=>{z&&ee({type:"control.set_mode",sessionId:z,mode:p})}}),on=Ar.length>0?i.jsx(Qy,{models:Ar,value:Qc,effort:(Q==null?void 0:Q.effort)??null,ultracode:(Q==null?void 0:Q.ultracode)??!1,thinking:(Q==null?void 0:Q.thinking)??!0,switchOnFlag:(Q==null?void 0:Q.switchModelsOnFlag)??!0,showSwitchOnFlag:(Q==null?void 0:Q.provider)!=="antigravity",onModel:p=>{!z||!p||ee({type:"control.set_model",sessionId:z,model:p})},onEffort:p=>{z&&ee({type:"control.set_effort",sessionId:z,effort:p})},onUltracode:p=>{z&&ee({type:"control.set_ultracode",sessionId:z,enabled:p})},onThinking:p=>{z&&ee({type:"control.set_thinking",sessionId:z,enabled:p})},onSwitchOnFlag:p=>{z&&ee({type:"control.set_flag_switch",sessionId:z,enabled:p})}}):Al&&i.jsx("span",{className:"badge",children:Al}),Kc=Jn&&i.jsx("span",{className:ss?"badge badge--wait":"badge badge--live",children:ss?"ждёт":xl?"переподключается":"работает"}),$i=(Q==null?void 0:Q.state)==="closed"&&i.jsx("span",{className:"badge",title:"Разговор сохранён — сессия поднимется заново, как только вы отправите сообщение",children:"остановлена"}),ti=Kc||$i,Rr=()=>{z&&ee({type:"session.reconnect",sessionId:z})},ni=xl?"Сессия уже поднимает новый процесс":Jn?"Недоступно, пока идёт ход":"Поднять сессии новый процесс — разговор сохранён",li=z&&(xl||(Q==null?void 0:Q.state)==="error")?i.jsxs("div",{className:xl?"relink":"relink relink--error",role:"status",children:[i.jsxs("span",{className:"relink__msg",children:[i.jsx("span",{className:"relink__dot","aria-hidden":"true"}),xl?"Связь оборвалась. Сессия поднимает новый процесс — разговор сохранён.":"Переподключиться не удалось. Разговор сохранён — сессия продолжит с этого места."]}),i.jsx("button",{className:"btn btn--sm",title:xl?"Не ждать паузы между попытками — попробовать сейчас":"Поднять сессии новый процесс и продолжить разговор",onClick:Rr,children:xl?"Переподключить сейчас":"Переподключить"})]}):null,nd=pa?i.jsx(Lk,{handoff:pa,onContinue:()=>Lc(pa),onShow:()=>Ie(pa),onDismiss:()=>Pf(pa.sessionId)}):null,Dr=Q&&Q.totalCostUsd>0?`$${Q.totalCostUsd.toFixed(3)}`:null,bu=(Q==null?void 0:Q.provider)!=="antigravity"&&i.jsx("button",{className:ua?"pane-btn is-on":"pane-btn",title:"Вопрос на полях — спросить, не мешая работе","aria-label":"Вопрос на полях","aria-pressed":ua,onClick:()=>yr(p=>!p),children:i.jsx(gN,{})}),xu=Q&&Q.state!=="closed"&&i.jsx("button",{type:"button",className:"pane-btn pane-btn--stop",title:"Остановить сессию — освобождает память хоста, разговор остаётся на диске","aria-label":"Остановить сессию",onClick:()=>vs(Q),children:i.jsx(dN,{})}),Ml=Q?Lt[Q.id]===!0:!1,Qi=hy({onLongPress:()=>{Q&&zc(Q)},onClick:()=>{Q&&iu(Q)},disabled:Ml}),Or=Q&&Q.state!=="closed"&&Q.provider!=="antigravity"&&i.jsxs("button",{type:"button",className:Ml?"pane-btn pane-btn--handoff is-busy":Qi.holding?"pane-btn pane-btn--handoff is-holding":"pane-btn pane-btn--handoff",style:{"--hold-ms":`${Qi.thresholdMs}ms`},title:Ml?"Пишется хэндофф…":"Клик — хэндофф и новая сессия: агент запишет сводку, сессия остановится, работа продолжится в новой. Зажать (или Shift+клик) — новая пустая сессия без хэндоффа: закрепление переходит, старая сессия продолжает работать.","aria-label":"Хэндофф и новая сессия","aria-busy":Ml,disabled:Ml,...Qi.handlers,children:[i.jsx("span",{className:"pane-btn__hold","aria-hidden":"true"}),i.jsx(hN,{})]});return i.jsxs("div",{className:"app",style:nn.style,children:[i.jsx(Gj,{open:ve,connected:l,status:c,workspaces:_,archivedWorkspaces:v,workspaceFolders:T,sessionFolders:L.filter(p=>p.workspaceId===A),pinnedFolders:J,sessions:O.filter(p=>p.workspaceId===A),archived:M.filter(p=>p.workspaceId===A),pinned:H,live:he,listOrder:Me,liveSessionsFirst:(Yt==null?void 0:Yt.liveSessionsFirst)===!0,onReorder:Qa,activeWorkspaceId:A,activeSessionId:z,onPinSessions:Dc,onSelectPinned:Oc,onCloseWorkspaces:tu,onRestoreWorkspaces:lu,onArchiveSessions:nu,onUnarchiveSessions:p=>{A&&ee({type:"session.unarchive",workspaceId:A,sessionIds:p})},onCreateFolder:su,onRenameFolder:Mc,onDeleteFolder:Wf,onAssignToFolder:$a,onSelectWorkspace:ma,onSelectSession:Yi,onRenameSession:ru,onStopSession:vs,onOpenWorkspace:()=>fn(!0),onNewSession:Rc,onOpenExtensions:z&&(Q==null?void 0:Q.provider)!=="antigravity"?()=>Hc("mcp"):null,account:sl,onOpenAccount:kr,relay:d,onOpenRelay:x?null:()=>g(!0),onOpenSettings:Nr,themeMode:Bl,onCycleTheme:il}),Pa("sidebar"),ve&&i.jsx("div",{className:"scrim",onClick:()=>De(!1)}),i.jsx(aj,{open:lt,tree:pe,expanded:new Set(Y),activePath:ze,dirty:Mr,gitChanges:(Fe==null?void 0:Fe.changed)??[],result:w,searchResult:za,onSearch:Gc,onReveal:Ja,onToggle:ba,onOpen:Wa,onCreate:Ss,onRename:hu,onMove:Yc,onCopy:Xc,onDelete:Je,onRefresh:()=>{se(null),k({}),Xi()},onClose:()=>Xn(!1),zoomed:sn==="files",onToggleZoom:ei("files")}),lt&&sn!=="files"&&Pa("files"),i.jsx(mj,{open:bs,result:Us,onSearch:fu,onOpenMatch:Fa,onClose:()=>xs(!1),zoomed:sn==="search",onToggleZoom:ei("search")}),bs&&sn!=="search"&&Pa("search"),i.jsx(Tw,{open:Kt,state:Fe,result:ms,selected:Zl,busy:zn,onRefresh:Xi,onShow:Ic,onCheckout:Gs,onPush:Tr,onPull:Za,onPublish:ed,onConnectRemote:js,onDismissResult:()=>pn(null),onClose:()=>cn(!1),zoomed:sn==="git",onToggleZoom:ei("git")}),Kt&&sn!=="git"&&Pa("git"),i.jsxs("main",{className:sn==="main"||sn==="terminal"?"main main--zoomed":"main",children:[i.jsxs("header",{className:"topbar",children:[i.jsx("button",{className:"btn btn--ghost menu-btn",onClick:()=>De(!0),children:"☰"}),i.jsx("button",{className:lt?"pane-btn is-on":"pane-btn",title:"Файлы проекта","aria-label":"Файлы проекта","aria-pressed":lt,onClick:()=>{Xn(p=>!p),cn(!1),xs(!1)},children:i.jsx(oN,{})}),i.jsx("button",{className:bs?"pane-btn is-on":"pane-btn",title:"Поиск по тексту в проекте","aria-label":"Поиск по тексту в проекте","aria-pressed":bs,onClick:()=>{xs(p=>!p),Xn(!1),cn(!1)},children:i.jsx(uN,{})}),i.jsx("button",{className:Kt?"pane-btn is-on":"pane-btn",title:"История git","aria-label":"История git","aria-pressed":Kt,onClick:()=>{cn(p=>!p),Xn(!1),xs(!1)},children:i.jsx(fN,{})}),oa&&i.jsx("button",{className:ca?"pane-btn is-on":"pane-btn",title:"Терминал (Ctrl+`)","aria-label":"Терминал","aria-pressed":ca,onClick:()=>Vn(p=>!p),children:i.jsx(mN,{})}),Ve&&bu,Ve&&i.jsx("button",{className:$e?"pane-btn is-on":"pane-btn",title:"Ещё","aria-label":"Ещё","aria-haspopup":"menu","aria-pressed":$e,onClick:()=>It(!0),children:i.jsx(bN,{})}),i.jsxs("div",{className:"topbar__id",children:[yt&&Q?i.jsx(sa,{className:"rename--title",value:Q.title??"",onCommit:p=>{ru(Q,p),Xe(!1)},onCancel:()=>Xe(!1)}):i.jsxs("div",{className:"topbar__head",children:[i.jsx("button",{className:"topbar__title",disabled:!Q||Ve,title:Q&&!Ve?"Переименовать сессию":void 0,onClick:()=>Xe(!0),children:(Q==null?void 0:Q.title)??"Claude Code Visual"}),Va&&i.jsx("span",{className:"topbar__project",title:Va.path,children:Va.name})]}),Ve?ti:ql&&i.jsx($y,{path:ql})]}),!Ve&&i.jsxs("div",{className:"topbar__tools",children:[i.jsx("button",{type:"button",className:al?"meters-refresh is-busy":"meters-refresh",title:eu,"aria-label":Ac,"aria-busy":al,disabled:!z||al,onClick:es,children:i.jsx(xN,{})}),i.jsx(Zy,{usage:Cc}),i.jsx(Wy,{}),gu,on,ti,Dr&&i.jsx("span",{className:"badge badge--cost",children:Dr}),Or,xu,bu]})]}),i.jsx(eN,{tokens:(tn==null?void 0:tn.tokens)??V.contextTokens,maxTokens:(tn==null?void 0:tn.maxTokens)??null,fetchedAt:(tn==null?void 0:tn.fetchedAt)??null}),Ve&&$e&&i.jsx(sk,{onClose:()=>It(!1),permission:gu,model:on,usage:Cc,cwd:ql,costLabel:Dr,onRefresh:es,refreshing:al,metersFetchedAt:Ec,onRename:Q?()=>{Xe(!0),It(!1)}:null,onHandoff:Q&&Q.state!=="closed"&&Q.provider!=="antigravity"?()=>{iu(Q),It(!1)}:null,onFreshSession:Q&&Q.state!=="closed"&&Q.provider!=="antigravity"?()=>{zc(Q),It(!1)}:null,handoffWriting:Ml,onStop:Q&&Q.state!=="closed"?()=>{vs(Q),It(!1)}:null}),we.length>0&&i.jsx(Oj,{files:we,activePath:ze,busy:Jn,onSelect:dt,onClose:p=>xa(p),zoomed:sn==="main",onToggleZoom:ei("main")}),yn?i.jsx(Rj,{file:yn,goto:(ia==null?void 0:ia.path)===yn.path?ia:null,onChange:(p,I)=>{Ae(de=>de.map(Be=>Be.path===p?{...Be,text:I}:Be)),ls(p)},onSave:p=>Fn(p),onReload:El,onOverwrite:p=>Fn(p,!0),onRequestMedia:Ys,onTogglePreview:p=>Ae(I=>I.map(de=>de.path===p?{...de,previewMode:!de.previewMode}:de))}):i.jsxs(i.Fragment,{children:[i.jsx(Rp,{items:V.items,busy:Jn&&!xl,waiting:ss,empty:(Q==null?void 0:Q.provider)==="antigravity"?"Сессия пуста. Опишите задачу — Antigravity работает в каталоге проекта.":void 0,history:Po,historyHasMore:Rb(me),historyLoading:me.loading,onLoadHistory:wr,sessionId:z??void 0,onEditMessage:(Q==null?void 0:Q.provider)==="antigravity"?void 0:(p,I,de)=>{z&&ee({type:"prompt.edit",sessionId:z,userIndex:p,text:I,images:de})}}),li,nd,i.jsx(Xy,{disabled:!z,busy:Jn&&!xl,placeholder:xl?"Промпт уйдёт, как только связь вернётся":(Q==null?void 0:Q.state)==="closed"?"Остановлена — отправьте сообщение, чтобы продолжить":void 0,commands:$c,sessionTitle:(Q==null?void 0:Q.title)??null,contextResult:du,draftKey:z,onContextSearch:p=>Cr("mention",p),onCommand:ya,onSend:ga,onInterrupt:()=>{z&&ee({type:"control.interrupt",sessionId:z})}})]}),ca&&oa&&i.jsxs(i.Fragment,{children:[!Ve&&sn!=="terminal"&&i.jsx(Xk,{height:Bs.height,onResize:Bs.setHeight,onReset:Bs.reset}),i.jsx(Kk,{mobile:Ve,zoomed:sn==="terminal",onToggleZoom:ei("terminal"),terminals:Pl,activeId:Li,blocked:xr,error:Sc,onDismissError:()=>Ha(null),height:Ve?Ba.height:Bs.height,offset:Ve?{top:Ba.offsetTop,left:Ba.offsetLeft}:void 0,onSelect:br,onOpen:Ut,onClose:st,onInput:(p,I)=>ee({type:"term.input",id:p,data:I}),onResize:(p,I,de)=>ee({type:"term.resize",id:p,cols:I,rows:de}),onAttach:p=>ee({type:"term.attach",id:p}),onHide:()=>Vn(!1),registerSink:kc})]})]}),i.jsx(Kw,{open:ua,items:Vo.items,busy:_a,ready:z!==null,commands:$c,contextResult:Tl,draftKey:z,models:Vi.rows,model:Vi.selected,effort:as.effort,ultracode:as.ultracode,thinking:as.thinking,switchOnFlag:as.switchOnFlag,onContextSearch:p=>Cr("side",p),onCommand:ya,onModel:p=>{p&&(fa(I=>({...I,model:p})),qs(I=>ee({type:"control.set_model",sessionId:I,model:p})))},onEffort:p=>{fa(I=>({...I,effort:p,ultracode:!1})),qs(I=>ee({type:"control.set_effort",sessionId:I,effort:p}))},onUltracode:p=>{fa(I=>({...I,ultracode:p,...p?{effort:"xhigh"}:{}})),qs(I=>ee({type:"control.set_ultracode",sessionId:I,enabled:p}))},onThinking:p=>{fa(I=>({...I,thinking:p})),qs(I=>ee({type:"control.set_thinking",sessionId:I,enabled:p}))},onSwitchOnFlag:p=>{fa(I=>({...I,switchOnFlag:p})),qs(I=>ee({type:"control.set_flag_switch",sessionId:I,enabled:p}))},onAsk:Ka,onInterrupt:()=>{Xo&&ee({type:"control.interrupt",sessionId:Xo})},onReset:Bc,onClose:()=>yr(!1),zoomed:sn==="ask",onToggleZoom:ei("ask")}),ua&&sn!=="ask"&&Pa("ask"),(Kt||ua||lt||bs)&&i.jsx("div",{className:"scrim scrim--pane",onClick:()=>{cn(!1),yr(!1),Xn(!1),xs(!1)}}),Ds&&i.jsx(Aw,{detail:Ds,local:((Fe==null?void 0:Fe.hasRemote)??!1)&&(Fe==null?void 0:Fe.commits.some(p=>p.hash===Ds.hash&&!p.pushed))===!0,onCheckout:Gs,onClose:()=>{Gn(null),ps(null)}}),ue&&i.jsx(jl,{title:"Остановить сессию?",onClose:()=>je(null),actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>je(null),children:"Отмена"}),i.jsx("button",{className:"btn btn--warn",onClick:()=>{ee({type:"session.close",sessionId:ue.id}),je(null)},children:"Остановить"})]}),children:i.jsx("p",{className:"modal__text",children:"Сессия сейчас работает — остановка прервёт текущий ход. Разговор останется на диске: открыть сессию заново или просто написать в неё снова можно в любой момент."})}),Fl&&i.jsxs(jl,{title:"Переключить рабочее дерево?",onClose:()=>Zn(null),actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>Zn(null),children:"Отмена"}),i.jsx("button",{className:"btn btn--warn",onClick:ou,children:"Переключиться"})]}),children:[i.jsxs("p",{className:"modal__text",children:["git переключится на ",Fl.label,". Файлы в каталоге проекта изменятся — это тот же каталог, в котором работает агент."]}),Jn&&i.jsx("p",{className:"modal__text",children:"Сейчас идёт ход агента: он читает и правит файлы прямо сейчас."}),Fe&&Fe.changed.length>0&&i.jsxs("p",{className:"modal__text",children:["Незакоммиченных изменений: ",Fe.changed.length,". Git откажется переключаться, если они будут затёрты."]})]}),Yn&&i.jsx(Gw,{status:zt,owners:Ri,files:La,defaultName:(Va==null?void 0:Va.name)??"",hasCommits:Fe===null||Fe.head!=="",busy:zn,result:ms,onRefreshStatus:Er,onSaveToken:uu,onPublish:bl,onDismissResult:()=>pn(null),onClose:()=>kl(!1)}),ln&&i.jsx(Qw,{busy:zn,result:ms,onSubmit:qc,onDismissResult:()=>pn(null),onClose:()=>Jl(!1)}),ke&&i.jsx(jl,{title:ke.kind==="dir"?"Удалить каталог?":"Удалить файл?",onClose:()=>Je(null),actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>Je(null),children:"Отмена"}),i.jsx("button",{className:"btn btn--warn",onClick:()=>pu(ke),children:"Удалить"})]}),children:i.jsxs("p",{className:"modal__text",children:[ke.path," будет удалён с диска",ke.kind==="dir"?" вместе со всем содержимым":"",". Корзины здесь нет: это тот же каталог, в котором работает агент."]})}),ht&&i.jsx(jl,{title:"Закрыть без сохранения?",onClose:()=>gs(null),actions:i.jsxs(i.Fragment,{children:[i.jsx("button",{className:"btn",onClick:()=>gs(null),children:"Отмена"}),i.jsx("button",{className:"btn btn--warn",onClick:()=>xa(ht,!0),children:"Закрыть"}),i.jsx("button",{className:"btn btn--primary",onClick:()=>{Fn(ht),xa(ht,!0)},children:"Сохранить и закрыть"})]}),children:i.jsxs("p",{className:"modal__text",children:["В ",ht," есть несохранённые правки."]})}),xn&&i.jsx(ik,{tab:xn,servers:hn,plugins:Gt,marketplaces:Ct,catalog:Sl,result:ge,actions:cu,onTab:qt,onClose:()=>qt(null)}),hs&&i.jsx(pk,{status:sl,login:Qt,actions:gl,remote:x,runningSessions:O.filter(p=>p.state==="running"||p.state==="waiting_permission").length,onReconnect:z?()=>{Rr(),dl(!1)}:null,reconnectBlocked:Jn,reconnectHint:ni,onClose:()=>dl(!1)}),m&&i.jsx(yk,{state:d,onPair:(p,I)=>ee({type:"relay.pair",code:p,...I?{name:I}:{}}),onUnpair:()=>ee({type:"relay.unpair"}),onClose:()=>g(!1)}),wl&&i.jsx(Rk,{settings:Yt,models:(ye==null?void 0:ye.models)??[],relayState:d,local:Af()==="local",onChange:Nl,onEnableShell:()=>ee({type:"relay.shell.enable"}),onDisableShell:()=>ee({type:"relay.shell.disable"}),onOpenRelay:()=>{kt(!1),g(!0)},onClose:()=>kt(!1)}),rt&&i.jsx(gw,{candidates:ft,searching:jn,agentItems:Pt.items,agentBusy:(et==null?void 0:et.state)==="running",error:Xt,roots:St,created:rn,onSearch:Ff,onAskAgent:Jf,onInterrupt:()=>{const p=Sr.current;p&&ee({type:"control.interrupt",sessionId:p})},onSubmit:Kf,onCreate:Zf,onClose:ml}),Wn!=null&&Wn.questions&&Wn.questions.length>0?i.jsx(iw,{request:{...Wn,questions:Wn.questions},queued:V.pending.length-1,onAnswer:Cl,onDecline:Vc}):Wn&&$s!==null?i.jsx(ow,{request:Wn,plan:$s,queued:V.pending.length-1,onAccept:Vs,onDecline:mu}):Wn&&i.jsx(aw,{request:Wn,queued:V.pending.length-1,onDecide:Xs}),_e&&i.jsx(zk,{handoff:_e,onClose:()=>Ie(null)}),i.jsx(Bk,{notices:ll,onDismiss:p=>Hl(I=>I.filter(de=>de.id!==p))})]})}function oN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M2 4.1V3a.6.6 0 0 1 .6-.6h2.6l1.2 1.4h5a.6.6 0 0 1 .6.6v1.1"}),i.jsx("path",{d:"M2 12.6V5.7h11.4a.6.6 0 0 1 .58.75l-1.5 6.2a.6.6 0 0 1-.58.45H2.6a.6.6 0 0 1-.6-.5Z"})]})}function uN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[i.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),i.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function fN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),i.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),i.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),i.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function dN(){return i.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:i.jsx("rect",{x:"3.6",y:"3.6",width:"8.8",height:"8.8",rx:"1.8"})})}function hN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"1.4",y:"4.6",width:"6",height:"6.8",rx:"1.3"}),i.jsx("rect",{x:"8.6",y:"4.6",width:"6",height:"6.8",rx:"1.3"}),i.jsx("path",{d:"M6.9 8h2.6M8 6.5 9.6 8 8 9.5"})]})}function pN(s,l){return Wx(s)===Wx(l)}function Wx(s){return s.replace(/[\\/]+/g,"/").replace(/\/+$/,"").toLowerCase()}function mN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("rect",{x:"1.6",y:"2.6",width:"12.8",height:"10.8",rx:"1.7"}),i.jsx("path",{d:"M4.3 6 6.6 8l-2.3 2"}),i.jsx("path",{d:"M8.2 10h3.1"})]})}function gN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M13.6 9.4a1.6 1.6 0 0 1-1.6 1.6H6.2L3.2 13.4V4.2a1.6 1.6 0 0 1 1.6-1.6h7.2a1.6 1.6 0 0 1 1.6 1.6Z"}),i.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}function bN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[i.jsx("circle",{cx:"3.2",cy:"8",r:"1.5"}),i.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),i.jsx("circle",{cx:"12.8",cy:"8",r:"1.5"})]})}function xN(){return i.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),i.jsx("path",{d:"M14 2v3.33h-3.33"})]})}const e_=document.getElementById("root");if(!e_)throw new Error("#root not found");S0.createRoot(e_).render(i.jsx(y.StrictMode,{children:i.jsx(cN,{})}));export{S1 as D,Ft as I,Wt as N,vN as P,fs as T,Rs as a,Ty as b,Ul as c,_N as d,Ry as e,Io as f,G1 as h,jN as p,SN as s,Ee as t};