@i14ks/ccv 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/ccv.mjs +263 -19
- package/package.json +1 -1
- package/web/assets/{codemirror-BWZxIjMU.js → codemirror-DILVW5V7.js} +1 -1
- package/web/assets/index-5NnNKmcv.js +129 -0
- package/web/assets/{index-Dbr7EU2n.js → index-BTNk6BN3.js} +1 -1
- package/web/assets/{index-qPJ6SIgP.js → index-BjUFOQlC.js} +1 -1
- package/web/assets/index-Brn_uUCW.css +1 -0
- package/web/assets/{index-BQi6QI7Z.js → index-C2x9TM0V.js} +1 -1
- package/web/assets/{index-BP5TdYoo.js → index-C41Hz81g.js} +1 -1
- package/web/assets/{index-9jmr6xz8.js → index-CC6apbYr.js} +1 -1
- package/web/assets/{index-hQhZ9dRw.js → index-CP6Bv1lU.js} +1 -1
- package/web/assets/{index-DGCeaXoo.js → index-CSzD2Fvc.js} +1 -1
- package/web/assets/{index-DdAPIomJ.js → index-CVhjeQrh.js} +1 -1
- package/web/assets/{index-By-XqFTs.js → index-Cp4y8ln8.js} +1 -1
- package/web/assets/{index-Y1vKLu9k.js → index-Cptzajqg.js} +1 -1
- package/web/assets/{index-CjAk3Yb0.js → index-D18_1PH5.js} +1 -1
- package/web/assets/{index-Dr8ovngt.js → index-D2sBuEGv.js} +1 -1
- package/web/assets/{index-C9yuVPI-.js → index-DJ1r3yCI.js} +1 -1
- package/web/assets/{index-DEFc0MJB.js → index-DJhubbAh.js} +1 -1
- package/web/assets/{index-AGqthGr9.js → index-Dr-2FTDh.js} +1 -1
- package/web/assets/{index-CqqEs8q5.js → index-DuJE332D.js} +1 -1
- package/web/assets/{index-C_UZRXvz.js → index-fBBR-7pG.js} +1 -1
- package/web/assets/{index-DYzVllNN.js → index-qQ4Nk5pP.js} +1 -1
- package/web/assets/{index-DkpH15La.js → index-zZliJVYN.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/index-DnC6QasI.js +0 -128
- package/web/assets/index-xkYUlK3R.css +0 -1
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DdAPIomJ.js","./index-DkpH15La.js","./index-hQhZ9dRw.js","./index-BHot-lnj.js","./index-891wE-Rj.js","./index-AGqthGr9.js","./index-qPJ6SIgP.js","./index-BQi6QI7Z.js","./index-CjAk3Yb0.js","./index-C9yuVPI-.js","./index-Y1vKLu9k.js","./index-DGCeaXoo.js","./index-Dbr7EU2n.js","./index-By-XqFTs.js","./index-DEFc0MJB.js","./index-CqqEs8q5.js","./index-C_UZRXvz.js","./index-DYzVllNN.js","./index-Dr8ovngt.js","./index-BP5TdYoo.js","./index-9jmr6xz8.js","./codemirror-BWZxIjMU.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 Nx=Object.defineProperty;var Yg=s=>{throw TypeError(s)};var Tx=(s,l,i)=>l in s?Nx(s,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[l]=i;var kt=(s,l,i)=>Tx(s,typeof l!="symbol"?l+"":l,i),Hd=(s,l,i)=>l.has(s)||Yg("Cannot "+i);var He=(s,l,i)=>(Hd(s,l,"read from private field"),i?i.call(s):l.get(s)),Kt=(s,l,i)=>l.has(s)?Yg("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(s):l.set(s,i),ft=(s,l,i,r)=>(Hd(s,l,"write to private field"),r?r.call(s,i):l.set(s,i),i),on=(s,l,i)=>(Hd(s,l,"access private method"),i);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(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"&&r(h)}).observe(document,{childList:!0,subtree:!0});function i(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 r(o){if(o.ep)return;o.ep=!0;const d=i(o);fetch(o.href,d)}})();var Bd={exports:{}},vc={};/**
|
|
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 Ig;function Ex(){if(Ig)return vc;Ig=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,d){var h=null;if(d!==void 0&&(h=""+d),o.key!==void 0&&(h=""+o.key),"key"in o){d={};for(var g in o)g!=="key"&&(d[g]=o[g])}else d=o;return o=d.ref,{$$typeof:s,type:r,key:h,ref:o!==void 0?o:null,props:d}}return vc.Fragment=l,vc.jsx=i,vc.jsxs=i,vc}var Xg;function Ax(){return Xg||(Xg=1,Bd.exports=Ex()),Bd.exports}var c=Ax(),qd={exports:{}},Ie={};/**
|
|
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 Vg;function Cx(){if(Vg)return Ie;Vg=1;var s=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),_=Symbol.iterator;function C(j){return j===null||typeof j!="object"?null:(j=_&&j[_]||j["@@iterator"],typeof j=="function"?j:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,B={};function K(j,V,ce){this.props=j,this.context=V,this.refs=B,this.updater=ce||N}K.prototype.isReactComponent={},K.prototype.setState=function(j,V){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,V,"setState")},K.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function O(){}O.prototype=K.prototype;function $(j,V,ce){this.props=j,this.context=V,this.refs=B,this.updater=ce||N}var A=$.prototype=new O;A.constructor=$,H(A,K.prototype),A.isPureReactComponent=!0;var Q=Array.isArray;function L(){}var M={H:null,A:null,T:null,S:null},W=Object.prototype.hasOwnProperty;function re(j,V,ce){var oe=ce.ref;return{$$typeof:s,type:j,key:V,ref:oe!==void 0?oe:null,props:ce}}function he(j,V){return re(j.type,V,j.props)}function F(j){return typeof j=="object"&&j!==null&&j.$$typeof===s}function ae(j){var V={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ce){return V[ce]})}var me=/\/+/g;function je(j,V){return typeof j=="object"&&j!==null&&j.key!=null?ae(""+j.key):V.toString(36)}function pe(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(L,L):(j.status="pending",j.then(function(V){j.status==="pending"&&(j.status="fulfilled",j.value=V)},function(V){j.status==="pending"&&(j.status="rejected",j.reason=V)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function z(j,V,ce,oe,_e){var Ne=typeof j;(Ne==="undefined"||Ne==="boolean")&&(j=null);var Re=!1;if(j===null)Re=!0;else switch(Ne){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(j.$$typeof){case s:case l:Re=!0;break;case x:return Re=j._init,z(Re(j._payload),V,ce,oe,_e)}}if(Re)return _e=_e(j),Re=oe===""?"."+je(j,0):oe,Q(_e)?(ce="",Re!=null&&(ce=Re.replace(me,"$&/")+"/"),z(_e,V,ce,"",function(st){return st})):_e!=null&&(F(_e)&&(_e=he(_e,ce+(_e.key==null||j&&j.key===_e.key?"":(""+_e.key).replace(me,"$&/")+"/")+Re)),V.push(_e)),1;Re=0;var it=oe===""?".":oe+":";if(Q(j))for(var Ze=0;Ze<j.length;Ze++)oe=j[Ze],Ne=it+je(oe,Ze),Re+=z(oe,V,ce,Ne,_e);else if(Ze=C(j),typeof Ze=="function")for(j=Ze.call(j),Ze=0;!(oe=j.next()).done;)oe=oe.value,Ne=it+je(oe,Ze++),Re+=z(oe,V,ce,Ne,_e);else if(Ne==="object"){if(typeof j.then=="function")return z(pe(j),V,ce,oe,_e);throw V=String(j),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Re}function P(j,V,ce){if(j==null)return j;var oe=[],_e=0;return z(j,oe,"","",function(Ne){return V.call(ce,Ne,_e++)}),oe}function te(j){if(j._status===-1){var V=j._result;V=V(),V.then(function(ce){(j._status===0||j._status===-1)&&(j._status=1,j._result=ce)},function(ce){(j._status===0||j._status===-1)&&(j._status=2,j._result=ce)}),j._status===-1&&(j._status=0,j._result=V)}if(j._status===1)return j._result.default;throw j._result}var be=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},we={map:P,forEach:function(j,V,ce){P(j,function(){V.apply(this,arguments)},ce)},count:function(j){var V=0;return P(j,function(){V++}),V},toArray:function(j){return P(j,function(V){return V})||[]},only:function(j){if(!F(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Ie.Activity=k,Ie.Children=we,Ie.Component=K,Ie.Fragment=i,Ie.Profiler=o,Ie.PureComponent=$,Ie.StrictMode=r,Ie.Suspense=m,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(j){return M.H.useMemoCache(j)}},Ie.cache=function(j){return function(){return j.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(j,V,ce){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var oe=H({},j.props),_e=j.key;if(V!=null)for(Ne in V.key!==void 0&&(_e=""+V.key),V)!W.call(V,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&V.ref===void 0||(oe[Ne]=V[Ne]);var Ne=arguments.length-2;if(Ne===1)oe.children=ce;else if(1<Ne){for(var Re=Array(Ne),it=0;it<Ne;it++)Re[it]=arguments[it+2];oe.children=Re}return re(j.type,_e,oe)},Ie.createContext=function(j){return j={$$typeof:h,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:d,_context:j},j},Ie.createElement=function(j,V,ce){var oe,_e={},Ne=null;if(V!=null)for(oe in V.key!==void 0&&(Ne=""+V.key),V)W.call(V,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(_e[oe]=V[oe]);var Re=arguments.length-2;if(Re===1)_e.children=ce;else if(1<Re){for(var it=Array(Re),Ze=0;Ze<Re;Ze++)it[Ze]=arguments[Ze+2];_e.children=it}if(j&&j.defaultProps)for(oe in Re=j.defaultProps,Re)_e[oe]===void 0&&(_e[oe]=Re[oe]);return re(j,Ne,_e)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(j){return{$$typeof:g,render:j}},Ie.isValidElement=F,Ie.lazy=function(j){return{$$typeof:x,_payload:{_status:-1,_result:j},_init:te}},Ie.memo=function(j,V){return{$$typeof:b,type:j,compare:V===void 0?null:V}},Ie.startTransition=function(j){var V=M.T,ce={};M.T=ce;try{var oe=j(),_e=M.S;_e!==null&&_e(ce,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(L,be)}catch(Ne){be(Ne)}finally{V!==null&&ce.types!==null&&(V.types=ce.types),M.T=V}},Ie.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},Ie.use=function(j){return M.H.use(j)},Ie.useActionState=function(j,V,ce){return M.H.useActionState(j,V,ce)},Ie.useCallback=function(j,V){return M.H.useCallback(j,V)},Ie.useContext=function(j){return M.H.useContext(j)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(j,V){return M.H.useDeferredValue(j,V)},Ie.useEffect=function(j,V){return M.H.useEffect(j,V)},Ie.useEffectEvent=function(j){return M.H.useEffectEvent(j)},Ie.useId=function(){return M.H.useId()},Ie.useImperativeHandle=function(j,V,ce){return M.H.useImperativeHandle(j,V,ce)},Ie.useInsertionEffect=function(j,V){return M.H.useInsertionEffect(j,V)},Ie.useLayoutEffect=function(j,V){return M.H.useLayoutEffect(j,V)},Ie.useMemo=function(j,V){return M.H.useMemo(j,V)},Ie.useOptimistic=function(j,V){return M.H.useOptimistic(j,V)},Ie.useReducer=function(j,V,ce){return M.H.useReducer(j,V,ce)},Ie.useRef=function(j){return M.H.useRef(j)},Ie.useState=function(j){return M.H.useState(j)},Ie.useSyncExternalStore=function(j,V,ce){return M.H.useSyncExternalStore(j,V,ce)},Ie.useTransition=function(){return M.H.useTransition()},Ie.version="19.2.8",Ie}var Qg;function Sh(){return Qg||(Qg=1,qd.exports=Cx()),qd.exports}var S=Sh(),Gd={exports:{}},Sc={},Yd={exports:{}},Id={};/**
|
|
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 $g;function Rx(){return $g||($g=1,(function(s){function l(z,P){var te=z.length;z.push(P);e:for(;0<te;){var be=te-1>>>1,we=z[be];if(0<o(we,P))z[be]=P,z[te]=we,te=be;else break e}}function i(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var P=z[0],te=z.pop();if(te!==P){z[0]=te;e:for(var be=0,we=z.length,j=we>>>1;be<j;){var V=2*(be+1)-1,ce=z[V],oe=V+1,_e=z[oe];if(0>o(ce,te))oe<we&&0>o(_e,ce)?(z[be]=_e,z[oe]=te,be=oe):(z[be]=ce,z[V]=te,be=V);else if(oe<we&&0>o(_e,te))z[be]=_e,z[oe]=te,be=oe;else break e}}return P}function o(z,P){var te=z.sortIndex-P.sortIndex;return te!==0?te:z.id-P.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,g=h.now();s.unstable_now=function(){return h.now()-g}}var m=[],b=[],x=1,k=null,_=3,C=!1,N=!1,H=!1,B=!1,K=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function A(z){for(var P=i(b);P!==null;){if(P.callback===null)r(b);else if(P.startTime<=z)r(b),P.sortIndex=P.expirationTime,l(m,P);else break;P=i(b)}}function Q(z){if(H=!1,A(z),!N)if(i(m)!==null)N=!0,L||(L=!0,ae());else{var P=i(b);P!==null&&pe(Q,P.startTime-z)}}var L=!1,M=-1,W=5,re=-1;function he(){return B?!0:!(s.unstable_now()-re<W)}function F(){if(B=!1,L){var z=s.unstable_now();re=z;var P=!0;try{e:{N=!1,H&&(H=!1,O(M),M=-1),C=!0;var te=_;try{t:{for(A(z),k=i(m);k!==null&&!(k.expirationTime>z&&he());){var be=k.callback;if(typeof be=="function"){k.callback=null,_=k.priorityLevel;var we=be(k.expirationTime<=z);if(z=s.unstable_now(),typeof we=="function"){k.callback=we,A(z),P=!0;break t}k===i(m)&&r(m),A(z)}else r(m);k=i(m)}if(k!==null)P=!0;else{var j=i(b);j!==null&&pe(Q,j.startTime-z),P=!1}}break e}finally{k=null,_=te,C=!1}P=void 0}}finally{P?ae():L=!1}}}var ae;if(typeof $=="function")ae=function(){$(F)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,je=me.port2;me.port1.onmessage=F,ae=function(){je.postMessage(null)}}else ae=function(){K(F,0)};function pe(z,P){M=K(function(){z(s.unstable_now())},P)}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(z){z.callback=null},s.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<z?Math.floor(1e3/z):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_next=function(z){switch(_){case 1:case 2:case 3:var P=3;break;default:P=_}var te=_;_=P;try{return z()}finally{_=te}},s.unstable_requestPaint=function(){B=!0},s.unstable_runWithPriority=function(z,P){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var te=_;_=z;try{return P()}finally{_=te}},s.unstable_scheduleCallback=function(z,P,te){var be=s.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?be+te:be):te=be,z){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=te+we,z={id:x++,callback:P,priorityLevel:z,startTime:te,expirationTime:we,sortIndex:-1},te>be?(z.sortIndex=te,l(b,z),i(m)===null&&z===i(b)&&(H?(O(M),M=-1):H=!0,pe(Q,te-be))):(z.sortIndex=we,l(m,z),N||C||(N=!0,L||(L=!0,ae()))),z},s.unstable_shouldYield=he,s.unstable_wrapCallback=function(z){var P=_;return function(){var te=_;_=P;try{return z.apply(this,arguments)}finally{_=te}}}})(Id)),Id}var Zg;function Mx(){return Zg||(Zg=1,Yd.exports=Rx()),Yd.exports}var Xd={exports:{}},Bn={};/**
|
|
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 Kg;function Ox(){if(Kg)return Bn;Kg=1;var s=Sh();function l(m){var b="https://react.dev/errors/"+m;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)b+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function d(m,b,x){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:k==null?null:""+k,children:m,containerInfo:b,implementation:x}}var h=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(m,b){if(m==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return Bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Bn.createPortal=function(m,b){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(l(299));return d(m,b,null,x)},Bn.flushSync=function(m){var b=h.T,x=r.p;try{if(h.T=null,r.p=2,m)return m()}finally{h.T=b,r.p=x,r.d.f()}},Bn.preconnect=function(m,b){typeof m=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,r.d.C(m,b))},Bn.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},Bn.preinit=function(m,b){if(typeof m=="string"&&b&&typeof b.as=="string"){var x=b.as,k=g(x,b.crossOrigin),_=typeof b.integrity=="string"?b.integrity:void 0,C=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;x==="style"?r.d.S(m,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:k,integrity:_,fetchPriority:C}):x==="script"&&r.d.X(m,{crossOrigin:k,integrity:_,fetchPriority:C,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},Bn.preinitModule=function(m,b){if(typeof m=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var x=g(b.as,b.crossOrigin);r.d.M(m,{crossOrigin:x,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&r.d.M(m)},Bn.preload=function(m,b){if(typeof m=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var x=b.as,k=g(x,b.crossOrigin);r.d.L(m,x,{crossOrigin:k,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},Bn.preloadModule=function(m,b){if(typeof m=="string")if(b){var x=g(b.as,b.crossOrigin);r.d.m(m,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:x,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else r.d.m(m)},Bn.requestFormReset=function(m){r.d.r(m)},Bn.unstable_batchedUpdates=function(m,b){return m(b)},Bn.useFormState=function(m,b,x){return h.H.useFormState(m,b,x)},Bn.useFormStatus=function(){return h.H.useHostTransitionStatus()},Bn.version="19.2.8",Bn}var Jg;function Dx(){if(Jg)return Xd.exports;Jg=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(),Xd.exports=Ox(),Xd.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 Fg;function zx(){if(Fg)return Sc;Fg=1;var s=Mx(),l=Sh(),i=Dx();function r(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 g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(r(188))}function b(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(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 m(u),e;if(f===a)return m(u),t;f=f.sibling}throw Error(r(188))}if(n.return!==a.return)n=u,a=f;else{for(var p=!1,v=u.child;v;){if(v===n){p=!0,n=u,a=f;break}if(v===a){p=!0,a=u,n=f;break}v=v.sibling}if(!p){for(v=f.child;v;){if(v===n){p=!0,n=f,a=u;break}if(v===a){p=!0,a=f,n=u;break}v=v.sibling}if(!p)throw Error(r(189))}}if(n.alternate!==a)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,_=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),$=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),he=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var me=Symbol.for("react.client.reference");function je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case K:return"Profiler";case B:return"StrictMode";case Q:return"Suspense";case L:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case $:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return t=e.displayName||null,t!==null?t:je(e.type)||"Memo";case W:t=e._payload,e=e._init;try{return je(e(t))}catch{}}return null}var pe=Array.isArray,z=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},be=[],we=-1;function j(e){return{current:e}}function V(e){0>we||(e.current=be[we],be[we]=null,we--)}function ce(e,t){we++,be[we]=e.current,e.current=t}var oe=j(null),_e=j(null),Ne=j(null),Re=j(null);function it(e,t){switch(ce(Ne,t),ce(_e,e),ce(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fg(t),e=dg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(oe),ce(oe,e)}function Ze(){V(oe),V(_e),V(Ne)}function st(e){e.memoizedState!==null&&ce(Re,e);var t=oe.current,n=dg(t,e.type);t!==n&&(ce(_e,e),ce(oe,n))}function qe(e){_e.current===e&&(V(oe),V(_e)),Re.current===e&&(V(Re),yc._currentValue=te)}var Rt,Je;function Ke(e){if(Rt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rt=t&&t[1]||"",Je=-1<n.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+Rt+e+Je}var Fe=!1;function dt(e,t){if(!e||Fe)return"";Fe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(Z){var I=Z}Reflect.construct(e,[],le)}else{try{le.call()}catch(Z){I=Z}e.call(le.prototype)}}else{try{throw Error()}catch(Z){I=Z}(le=e())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(Z){if(Z&&I&&typeof Z.stack=="string")return[Z.stack,I.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(),p=f[0],v=f[1];if(p&&v){var E=p.split(`
|
|
45
|
-
`),G=v.split(`
|
|
46
|
-
`);for(u=a=0;a<E.length&&!E[a].includes("DetermineComponentFrameRoot");)a++;for(;u<G.length&&!G[u].includes("DetermineComponentFrameRoot");)u++;if(a===E.length||u===G.length)for(a=E.length-1,u=G.length-1;1<=a&&0<=u&&E[a]!==G[u];)u--;for(;1<=a&&0<=u;a--,u--)if(E[a]!==G[u]){if(a!==1||u!==1)do if(a--,u--,0>u||E[a]!==G[u]){var ee=`
|
|
47
|
-
`+E[a].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=a&&0<=u);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ke(n):""}function Fn(e,t){switch(e.tag){case 26:case 27:case 5:return Ke(e.type);case 16:return Ke("Lazy");case 13:return e.child!==t&&t!==null?Ke("Suspense Fallback"):Ke("Suspense");case 19:return Ke("SuspenseList");case 0:case 15:return dt(e.type,!1);case 11:return dt(e.type.render,!1);case 1:return dt(e.type,!0);case 31:return Ke("Activity");default:return""}}function qt(e){try{var t="",n=null;do t+=Fn(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
48
|
-
Error generating stack: `+a.message+`
|
|
49
|
-
`+a.stack}}var Tn=Object.prototype.hasOwnProperty,xn=s.unstable_scheduleCallback,dn=s.unstable_cancelCallback,Un=s.unstable_shouldYield,Jt=s.unstable_requestPaint,ut=s.unstable_now,hn=s.unstable_getCurrentPriorityLevel,J=s.unstable_ImmediatePriority,fe=s.unstable_UserBlockingPriority,Te=s.unstable_NormalPriority,Qe=s.unstable_LowPriority,Nt=s.unstable_IdlePriority,Tt=s.log,_n=s.unstable_setDisableYieldValue,tn=null,Gt=null;function En(e){if(typeof Tt=="function"&&_n(e),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(tn,e)}catch{}}var pt=Math.clz32?Math.clz32:Y,vn=Math.log,T=Math.LN2;function Y(e){return e>>>=0,e===0?32:31-(vn(e)/T|0)|0}var xe=256,Me=262144,Ue=4194304;function An(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 Hl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var u=0,f=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var v=a&134217727;return v!==0?(a=v&~f,a!==0?u=An(a):(p&=v,p!==0?u=An(p):n||(n=v&~e,n!==0&&(u=An(n))))):(v=a&~f,v!==0?u=An(v):p!==0?u=An(p):n||(n=a&~e,n!==0&&(u=An(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 Yn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hn(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 pn(){var e=Ue;return Ue<<=1,(Ue&62914560)===0&&(Ue=4194304),e}function Yt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ka(e,t,n,a,u,f){var p=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 v=e.entanglements,E=e.expirationTimes,G=e.hiddenUpdates;for(n=p&~n;0<n;){var ee=31-pt(n),le=1<<ee;v[ee]=0,E[ee]=-1;var I=G[ee];if(I!==null)for(G[ee]=null,ee=0;ee<I.length;ee++){var Z=I[ee];Z!==null&&(Z.lane&=-536870913)}n&=~le}a!==0&&wa(e,a,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(p&~t))}function wa(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function qs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-pt(n),u=1<<a;u&t|e[a]&t&&(e[a]|=t),n&=~u}}function Bl(e,t){var n=t&-t;return n=(n&42)!==0?1:Pa(n),(n&(e.suspendedLanes|t))!==0?0:n}function Pa(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 ql(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ja(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:zg(e.type))}function cl(e,t){var n=P.p;try{return P.p=e,t()}finally{P.p=n}}var It=Math.random().toString(36).slice(2),Mt="__reactFiber$"+It,Ge="__reactProps$"+It,mn="__reactContainer$"+It,ea="__reactEvents$"+It,Na="__reactListeners$"+It,ul="__reactHandles$"+It,In="__reactResources$"+It,ol="__reactMarker$"+It;function fl(e){delete e[Mt],delete e[Ge],delete e[ea],delete e[Na],delete e[ul]}function ta(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mn]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xg(e);e!==null;){if(n=e[Mt])return n;e=xg(e)}return t}e=n,n=e.parentNode}return null}function Cn(e){if(e=e[Mt]||e[mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function nn(e){var t=e[In];return t||(t=e[In]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function mt(e){e[ol]=!0}var Xn=new Set,ji={};function Vn(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(ji[e]=t,e=0;e<t.length;e++)Xn.add(t[e])}var Gs=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]*$"),na={},la={};function pl(e){return Tn.call(la,e)?!0:Tn.call(na,e)?!1:Gs.test(e)?la[e]=!0:(na[e]=!0,!1)}function Qn(e,t,n){if(pl(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 ml(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 gn(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 xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function es(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ni(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(p){n=""+p,f.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gl(e){if(!e._valueTracker){var t=es(e)?"checked":"value";e._valueTracker=Ni(e,t,""+e[t])}}function jl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=es(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function aa(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 Ta=/[\n"\\]/g;function ln(e){return e.replace(Ta,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ys(e,t,n,a,u,f,p,v){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xt(t)):e.value!==""+xt(t)&&(e.value=""+xt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?gl(e,p,xt(t)):n!=null?gl(e,p,xt(n)):a!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+xt(v):e.removeAttribute("name")}function sa(e,t,n,a,u,f,p,v){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)){Gl(e);return}n=n!=null?""+xt(n):"",t=t!=null?""+xt(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}a=a??u,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=v?e.checked:!!a,e.defaultChecked=!!a,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),Gl(e)}function gl(e,t,n){t==="number"&&aa(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Wn(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=""+xt(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 ue(e,t,n){if(t!=null&&(t=""+xt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+xt(n):""}function w(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(r(92));if(pe(a)){if(1<a.length)throw Error(r(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=xt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Gl(e)}function U(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var se=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 ve(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||se.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(r(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&&ve(e,u,a)}else for(var f in t)t.hasOwnProperty(f)&&ve(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 wt=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"]]),Zt=/^[\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 yn(e){return Zt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function gt(){}var Ot=null;function Xt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nl=null,Pn=null;function ts(e){var t=Cn(e);if(t&&(e=t.stateNode)){var n=e[Ge]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ys(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="'+ln(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var u=a[Ge]||null;if(!u)throw Error(r(90));Ys(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&&jl(a)}break e;case"textarea":ue(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Wn(e,!!n.multiple,t,!1)}}}var Et=!1;function Ti(e,t,n){if(Et)return e(t,n);Et=!0;try{var a=e(t);return a}finally{if(Et=!1,(Nl!==null||Pn!==null)&&(Lu(),Nl&&(t=Nl,e=Pn,Pn=Nl=null,ts(t),e)))for(t=0;t<e.length;t++)ts(e[t])}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Ge]||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(r(231,t,typeof n));return n}var Yl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=!1;if(Yl)try{var ia={};Object.defineProperty(ia,"passive",{get:function(){Ei=!0}}),window.addEventListener("test",ia,ia),window.removeEventListener("test",ia,ia)}catch{Ei=!1}var Vt=null,Sn=null,Xs=null;function Tl(){if(Xs)return Xs;var e,t=Sn,n=t.length,a,u="value"in Vt?Vt.value:Vt.textContent,f=u.length;for(e=0;e<n&&t[e]===u[e];e++);var p=n-e;for(a=1;a<=p&&t[n-a]===u[f-a];a++);return Xs=u.slice(e,1<a?1-a:void 0)}function Vs(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 Ea(){return!0}function Qs(){return!1}function an(e){function t(n,a,u,f,p){this._reactName=n,this._targetInst=u,this.type=a,this.nativeEvent=f,this.target=p,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(f):f[v]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ea:Qs,this.isPropagationStopped=Qs,this}return k(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=Ea)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ea)},persist:function(){},isPersistent:Ea}),t}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$s=an($n),Il=k({},$n,{view:0,detail:0}),Ai=an(Il),Aa,Ca,ns,Ci=k({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ar,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!==ns&&(ns&&e.type==="mousemove"?(Aa=e.screenX-ns.screenX,Ca=e.screenY-ns.screenY):Ca=Aa=0,ns=e),Aa)},movementY:function(e){return"movementY"in e?e.movementY:Ca}}),ie=an(Ci),ls=k({},Ci,{dataTransfer:0}),Nr=an(ls),Oo=k({},Il,{relatedTarget:0}),Tr=an(Oo),Do=k({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),Se=an(Do),Er=k({},$n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zo=an(Er),Lo=k({},$n,{data:0}),Hc=an(Lo),Uo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ho={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"},Zs={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zs[e])?!!t[e]:!1}function Ar(){return Bo}var qo=k({},Il,{key:function(e){if(e.key){var t=Uo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ho[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ar,charCode:function(e){return e.type==="keypress"?Vs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bc=an(qo),Go=k({},Ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qc=an(Go),Cr=k({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ar}),Gc=an(Cr),Yc=k({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yo=an(Yc),Ic=k({},Ci,{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}),Rr=an(Ic),Io=k({},$n,{newState:0,oldState:0}),Xo=an(Io),Vo=[9,13,27,32],Mr=Yl&&"CompositionEvent"in window,Xl=null;Yl&&"documentMode"in document&&(Xl=document.documentMode);var Xc=Yl&&"TextEvent"in window&&!Xl,Vc=Yl&&(!Mr||Xl&&8<Xl&&11>=Xl),Or=" ",Qc=!1;function $c(e,t){switch(e){case"keyup":return Vo.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function Kc(e,t){switch(e){case"compositionend":return Zc(t);case"keypress":return t.which!==32?null:(Qc=!0,Or);case"textInput":return e=t.data,e===Or&&Qc?null:e;default:return null}}function Qo(e,t){if(as)return e==="compositionend"||!Mr&&$c(e,t)?(e=Tl(),Xs=Sn=Vt=null,as=!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 Vc&&t.locale!=="ko"?null:t.data;default:return null}}var $o={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 Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$o[e.type]:t==="textarea"}function Fc(e,t,n,a){Nl?Pn?Pn.push(a):Pn=[a]:Nl=a,t=Iu(t,"onChange"),0<t.length&&(n=new $s("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ra=null,Ma=null;function Ri(e){sg(e,0)}function Mi(e){var t=dl(e);if(jl(t))return e}function Wc(e,t){if(e==="change")return t}var Pc=!1;if(Yl){var Dr;if(Yl){var zr="oninput"in document;if(!zr){var eu=document.createElement("div");eu.setAttribute("oninput","return;"),zr=typeof eu.oninput=="function"}Dr=zr}else Dr=!1;Pc=Dr&&(!document.documentMode||9<document.documentMode)}function tu(){Ra&&(Ra.detachEvent("onpropertychange",nu),Ma=Ra=null)}function nu(e){if(e.propertyName==="value"&&Mi(Ma)){var t=[];Fc(t,Ma,e,Xt(e)),Ti(Ri,t)}}function Zo(e,t,n){e==="focusin"?(tu(),Ra=t,Ma=n,Ra.attachEvent("onpropertychange",nu)):e==="focusout"&&tu()}function Ko(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mi(Ma)}function Jo(e,t){if(e==="click")return Mi(t)}function Fo(e,t){if(e==="input"||e==="change")return Mi(t)}function Wo(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zn=typeof Object.is=="function"?Object.is:Wo;function ss(e,t){if(Zn(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(!Tn.call(t,u)||!Zn(e[u],t[u]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ks(e,t){var n=Lr(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=Lr(n)}}function El(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?El(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vl(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=aa(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=aa(e.document)}return t}function Js(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 lu=Yl&&"documentMode"in document&&11>=document.documentMode,Ql=null,Oi=null,Fs=null,Oa=!1;function Ur(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Oa||Ql==null||Ql!==aa(a)||(a=Ql,"selectionStart"in a&&Js(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}),Fs&&ss(Fs,a)||(Fs=a,a=Iu(Oi,"onSelect"),0<a.length&&(t=new $s("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ql)))}function Da(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ra={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionrun:Da("Transition","TransitionRun"),transitionstart:Da("Transition","TransitionStart"),transitioncancel:Da("Transition","TransitionCancel"),transitionend:Da("Transition","TransitionEnd")},Hr={},is={};Yl&&(is=document.createElement("div").style,"AnimationEvent"in window||(delete ra.animationend.animation,delete ra.animationiteration.animation,delete ra.animationstart.animation),"TransitionEvent"in window||delete ra.transitionend.transition);function el(e){if(Hr[e])return Hr[e];if(!ra[e])return e;var t=ra[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in is)return Hr[e]=t[n];return e}var Br=el("animationend"),qr=el("animationiteration"),Gr=el("animationstart"),Yr=el("transitionrun"),au=el("transitionstart"),su=el("transitioncancel"),y=el("transitionend"),X=new Map,de="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(" ");de.push("scrollEnd");function De(e,t){X.set(e,t),Vn(t,[e])}var Dt=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)},At=[],kn=0,Ce=0;function Be(){for(var e=kn,t=Ce=kn=0;t<e;){var n=At[t];At[t++]=null;var a=At[t];At[t++]=null;var u=At[t];At[t++]=null;var f=At[t];if(At[t++]=null,a!==null&&u!==null){var p=a.pending;p===null?u.next=u:(u.next=p.next,p.next=u),a.pending=u}f!==0&&ca(n,u,f)}}function Ye(e,t,n,a){At[kn++]=e,At[kn++]=t,At[kn++]=n,At[kn++]=a,Ce|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ct(e,t,n,a){return Ye(e,t,n,a),rs(e)}function Qt(e,t){return Ye(e,null,null,t),rs(e)}function ca(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-pt(n),e=f.hiddenUpdates,a=e[u],a===null?e[u]=[t]:a.push(t),t.lane=n|536870912),f):null}function rs(e){if(50<oc)throw oc=0,cd=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function u0(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 yl(e,t,n,a){return new u0(e,t,n,a)}function Po(e){return e=e.prototype,!(!e||!e.isReactComponent)}function za(e,t){var n=e.alternate;return n===null?(n=yl(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 Gh(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 iu(e,t,n,a,u,f){var p=0;if(a=e,typeof e=="function")Po(e)&&(p=1);else if(typeof e=="string")p=px(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=yl(31,n,t,u),e.elementType=re,e.lanes=f,e;case H:return Ws(n.children,u,f,t);case B:p=8,u|=24;break;case K:return e=yl(12,n,t,u|2),e.elementType=K,e.lanes=f,e;case Q:return e=yl(13,n,t,u),e.elementType=Q,e.lanes=f,e;case L:return e=yl(19,n,t,u),e.elementType=L,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:p=10;break e;case O:p=9;break e;case A:p=11;break e;case M:p=14;break e;case W:p=16,a=null;break e}p=29,n=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=yl(p,n,t,u),t.elementType=e,t.type=a,t.lanes=f,t}function Ws(e,t,n,a){return e=yl(7,e,a,t),e.lanes=n,e}function ef(e,t,n){return e=yl(6,e,null,t),e.lanes=n,e}function Yh(e){var t=yl(18,null,null,0);return t.stateNode=e,t}function tf(e,t,n){return t=yl(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ih=new WeakMap;function Al(e,t){if(typeof e=="object"&&e!==null){var n=Ih.get(e);return n!==void 0?n:(t={value:e,source:t,stack:qt(t)},Ih.set(e,t),t)}return{value:e,source:t,stack:qt(t)}}var zi=[],Li=0,ru=null,Ir=0,Cl=[],Rl=0,cs=null,ua=1,oa="";function La(e,t){zi[Li++]=Ir,zi[Li++]=ru,ru=e,Ir=t}function Xh(e,t,n){Cl[Rl++]=ua,Cl[Rl++]=oa,Cl[Rl++]=cs,cs=e;var a=ua;e=oa;var u=32-pt(a)-1;a&=~(1<<u),n+=1;var f=32-pt(t)+u;if(30<f){var p=u-u%5;f=(a&(1<<p)-1).toString(32),a>>=p,u-=p,ua=1<<32-pt(t)+u|n<<u|a,oa=f+e}else ua=1<<f|n<<u|a,oa=e}function nf(e){e.return!==null&&(La(e,1),Xh(e,1,0))}function lf(e){for(;e===ru;)ru=zi[--Li],zi[Li]=null,Ir=zi[--Li],zi[Li]=null;for(;e===cs;)cs=Cl[--Rl],Cl[Rl]=null,oa=Cl[--Rl],Cl[Rl]=null,ua=Cl[--Rl],Cl[Rl]=null}function Vh(e,t){Cl[Rl++]=ua,Cl[Rl++]=oa,Cl[Rl++]=cs,ua=t.id,oa=t.overflow,cs=e}var Rn=null,zt=null,nt=!1,us=null,Ml=!1,af=Error(r(519));function os(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xr(Al(t,e)),af}function Qh(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Mt]=e,t[Ge]=a,n){case"dialog":Pe("cancel",t),Pe("close",t);break;case"iframe":case"object":case"embed":Pe("load",t);break;case"video":case"audio":for(n=0;n<dc.length;n++)Pe(dc[n],t);break;case"source":Pe("error",t);break;case"img":case"image":case"link":Pe("error",t),Pe("load",t);break;case"details":Pe("toggle",t);break;case"input":Pe("invalid",t),sa(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Pe("invalid",t);break;case"textarea":Pe("invalid",t),w(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||ug(t.textContent,n)?(a.popover!=null&&(Pe("beforetoggle",t),Pe("toggle",t)),a.onScroll!=null&&Pe("scroll",t),a.onScrollEnd!=null&&Pe("scrollend",t),a.onClick!=null&&(t.onclick=gt),t=!0):t=!1,t||os(e,!0)}function $h(e){for(Rn=e.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Ml=!1;return;case 27:case 3:Ml=!0;return;default:Rn=Rn.return}}function Ui(e){if(e!==Rn)return!1;if(!nt)return $h(e),nt=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||kd(e.type,e.memoizedProps)),n=!n),n&&zt&&os(e),$h(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));zt=bg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));zt=bg(e)}else t===27?(t=zt,ws(e.type)?(e=Ed,Ed=null,zt=e):zt=t):zt=Rn?Dl(e.stateNode.nextSibling):null;return!0}function Ps(){zt=Rn=null,nt=!1}function sf(){var e=us;return e!==null&&(al===null?al=e:al.push.apply(al,e),us=null),e}function Xr(e){us===null?us=[e]:us.push(e)}var rf=j(null),ei=null,Ua=null;function fs(e,t,n){ce(rf,t._currentValue),t._currentValue=n}function Ha(e){e._currentValue=rf.current,V(rf)}function cf(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 uf(e,t,n,a){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var p=u.child;f=f.firstContext;e:for(;f!==null;){var v=f;f=u;for(var E=0;E<t.length;E++)if(v.context===t[E]){f.lanes|=n,v=f.alternate,v!==null&&(v.lanes|=n),cf(f.return,n,e),a||(p=null);break e}f=v.next}}else if(u.tag===18){if(p=u.return,p===null)throw Error(r(341));p.lanes|=n,f=p.alternate,f!==null&&(f.lanes|=n),cf(p,n,e),p=null}else p=u.child;if(p!==null)p.return=u;else for(p=u;p!==null;){if(p===e){p=null;break}if(u=p.sibling,u!==null){u.return=p.return,p=u;break}p=p.return}u=p}}function Hi(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 p=u.alternate;if(p===null)throw Error(r(387));if(p=p.memoizedProps,p!==null){var v=u.type;Zn(u.pendingProps.value,p.value)||(e!==null?e.push(v):e=[v])}}else if(u===Re.current){if(p=u.alternate,p===null)throw Error(r(387));p.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(yc):e=[yc])}u=u.return}e!==null&&uf(t,e,n,a),t.flags|=262144}function cu(e){for(e=e.firstContext;e!==null;){if(!Zn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ti(e){ei=e,Ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mn(e){return Zh(ei,e)}function uu(e,t){return ei===null&&ti(e),Zh(e,t)}function Zh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ua===null){if(e===null)throw Error(r(308));Ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ua=Ua.next=t;return n}var o0=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()})}},f0=s.unstable_scheduleCallback,d0=s.unstable_NormalPriority,sn={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function of(){return{controller:new o0,data:new Map,refCount:0}}function Vr(e){e.refCount--,e.refCount===0&&f0(d0,function(){e.controller.abort()})}var Qr=null,ff=0,Bi=0,qi=null;function h0(e,t){if(Qr===null){var n=Qr=[];ff=0,Bi=pd(),qi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ff++,t.then(Kh,Kh),t}function Kh(){if(--ff===0&&Qr!==null){qi!==null&&(qi.status="fulfilled");var e=Qr;Qr=null,Bi=0,qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function p0(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 Jh=z.S;z.S=function(e,t){Om=ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&h0(e,t),Jh!==null&&Jh(e,t)};var ni=j(null);function df(){var e=ni.current;return e!==null?e:jt.pooledCache}function ou(e,t){t===null?ce(ni,ni.current):ce(ni,t.pool)}function Fh(){var e=df();return e===null?null:{parent:sn._currentValue,pool:e}}var Gi=Error(r(460)),hf=Error(r(474)),fu=Error(r(542)),du={then:function(){}};function Wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ph(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gt,gt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tp(e),e;default:if(typeof t.status=="string")t.then(gt,gt);else{if(e=jt,e!==null&&100<e.shellSuspendCounter)throw Error(r(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,tp(e),e}throw ai=t,Gi}}function li(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ai=n,Gi):n}}var ai=null;function ep(){if(ai===null)throw Error(r(459));var e=ai;return ai=null,e}function tp(e){if(e===Gi||e===fu)throw Error(r(483))}var Yi=null,$r=0;function hu(e){var t=$r;return $r+=1,Yi===null&&(Yi=[]),Ph(Yi,e,t)}function Zr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pu(e,t){throw t.$$typeof===_?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function np(e){function t(D,R){if(e){var q=D.deletions;q===null?(D.deletions=[R],D.flags|=16):q.push(R)}}function n(D,R){if(!e)return null;for(;R!==null;)t(D,R),R=R.sibling;return null}function a(D){for(var R=new Map;D!==null;)D.key!==null?R.set(D.key,D):R.set(D.index,D),D=D.sibling;return R}function u(D,R){return D=za(D,R),D.index=0,D.sibling=null,D}function f(D,R,q){return D.index=q,e?(q=D.alternate,q!==null?(q=q.index,q<R?(D.flags|=67108866,R):q):(D.flags|=67108866,R)):(D.flags|=1048576,R)}function p(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function v(D,R,q,ne){return R===null||R.tag!==6?(R=ef(q,D.mode,ne),R.return=D,R):(R=u(R,q),R.return=D,R)}function E(D,R,q,ne){var Oe=q.type;return Oe===H?ee(D,R,q.props.children,ne,q.key):R!==null&&(R.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===W&&li(Oe)===R.type)?(R=u(R,q.props),Zr(R,q),R.return=D,R):(R=iu(q.type,q.key,q.props,null,D.mode,ne),Zr(R,q),R.return=D,R)}function G(D,R,q,ne){return R===null||R.tag!==4||R.stateNode.containerInfo!==q.containerInfo||R.stateNode.implementation!==q.implementation?(R=tf(q,D.mode,ne),R.return=D,R):(R=u(R,q.children||[]),R.return=D,R)}function ee(D,R,q,ne,Oe){return R===null||R.tag!==7?(R=Ws(q,D.mode,ne,Oe),R.return=D,R):(R=u(R,q),R.return=D,R)}function le(D,R,q){if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return R=ef(""+R,D.mode,q),R.return=D,R;if(typeof R=="object"&&R!==null){switch(R.$$typeof){case C:return q=iu(R.type,R.key,R.props,null,D.mode,q),Zr(q,R),q.return=D,q;case N:return R=tf(R,D.mode,q),R.return=D,R;case W:return R=li(R),le(D,R,q)}if(pe(R)||ae(R))return R=Ws(R,D.mode,q,null),R.return=D,R;if(typeof R.then=="function")return le(D,hu(R),q);if(R.$$typeof===$)return le(D,uu(D,R),q);pu(D,R)}return null}function I(D,R,q,ne){var Oe=R!==null?R.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return Oe!==null?null:v(D,R,""+q,ne);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case C:return q.key===Oe?E(D,R,q,ne):null;case N:return q.key===Oe?G(D,R,q,ne):null;case W:return q=li(q),I(D,R,q,ne)}if(pe(q)||ae(q))return Oe!==null?null:ee(D,R,q,ne,null);if(typeof q.then=="function")return I(D,R,hu(q),ne);if(q.$$typeof===$)return I(D,R,uu(D,q),ne);pu(D,q)}return null}function Z(D,R,q,ne,Oe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return D=D.get(q)||null,v(R,D,""+ne,Oe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case C:return D=D.get(ne.key===null?q:ne.key)||null,E(R,D,ne,Oe);case N:return D=D.get(ne.key===null?q:ne.key)||null,G(R,D,ne,Oe);case W:return ne=li(ne),Z(D,R,q,ne,Oe)}if(pe(ne)||ae(ne))return D=D.get(q)||null,ee(R,D,ne,Oe,null);if(typeof ne.then=="function")return Z(D,R,q,hu(ne),Oe);if(ne.$$typeof===$)return Z(D,R,q,uu(R,ne),Oe);pu(R,ne)}return null}function ke(D,R,q,ne){for(var Oe=null,rt=null,Ee=R,$e=R=0,tt=null;Ee!==null&&$e<q.length;$e++){Ee.index>$e?(tt=Ee,Ee=null):tt=Ee.sibling;var ct=I(D,Ee,q[$e],ne);if(ct===null){Ee===null&&(Ee=tt);break}e&&Ee&&ct.alternate===null&&t(D,Ee),R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct,Ee=tt}if($e===q.length)return n(D,Ee),nt&&La(D,$e),Oe;if(Ee===null){for(;$e<q.length;$e++)Ee=le(D,q[$e],ne),Ee!==null&&(R=f(Ee,R,$e),rt===null?Oe=Ee:rt.sibling=Ee,rt=Ee);return nt&&La(D,$e),Oe}for(Ee=a(Ee);$e<q.length;$e++)tt=Z(Ee,D,$e,q[$e],ne),tt!==null&&(e&&tt.alternate!==null&&Ee.delete(tt.key===null?$e:tt.key),R=f(tt,R,$e),rt===null?Oe=tt:rt.sibling=tt,rt=tt);return e&&Ee.forEach(function(As){return t(D,As)}),nt&&La(D,$e),Oe}function Le(D,R,q,ne){if(q==null)throw Error(r(151));for(var Oe=null,rt=null,Ee=R,$e=R=0,tt=null,ct=q.next();Ee!==null&&!ct.done;$e++,ct=q.next()){Ee.index>$e?(tt=Ee,Ee=null):tt=Ee.sibling;var As=I(D,Ee,ct.value,ne);if(As===null){Ee===null&&(Ee=tt);break}e&&Ee&&As.alternate===null&&t(D,Ee),R=f(As,R,$e),rt===null?Oe=As:rt.sibling=As,rt=As,Ee=tt}if(ct.done)return n(D,Ee),nt&&La(D,$e),Oe;if(Ee===null){for(;!ct.done;$e++,ct=q.next())ct=le(D,ct.value,ne),ct!==null&&(R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct);return nt&&La(D,$e),Oe}for(Ee=a(Ee);!ct.done;$e++,ct=q.next())ct=Z(Ee,D,$e,ct.value,ne),ct!==null&&(e&&ct.alternate!==null&&Ee.delete(ct.key===null?$e:ct.key),R=f(ct,R,$e),rt===null?Oe=ct:rt.sibling=ct,rt=ct);return e&&Ee.forEach(function(jx){return t(D,jx)}),nt&&La(D,$e),Oe}function St(D,R,q,ne){if(typeof q=="object"&&q!==null&&q.type===H&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case C:e:{for(var Oe=q.key;R!==null;){if(R.key===Oe){if(Oe=q.type,Oe===H){if(R.tag===7){n(D,R.sibling),ne=u(R,q.props.children),ne.return=D,D=ne;break e}}else if(R.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===W&&li(Oe)===R.type){n(D,R.sibling),ne=u(R,q.props),Zr(ne,q),ne.return=D,D=ne;break e}n(D,R);break}else t(D,R);R=R.sibling}q.type===H?(ne=Ws(q.props.children,D.mode,ne,q.key),ne.return=D,D=ne):(ne=iu(q.type,q.key,q.props,null,D.mode,ne),Zr(ne,q),ne.return=D,D=ne)}return p(D);case N:e:{for(Oe=q.key;R!==null;){if(R.key===Oe)if(R.tag===4&&R.stateNode.containerInfo===q.containerInfo&&R.stateNode.implementation===q.implementation){n(D,R.sibling),ne=u(R,q.children||[]),ne.return=D,D=ne;break e}else{n(D,R);break}else t(D,R);R=R.sibling}ne=tf(q,D.mode,ne),ne.return=D,D=ne}return p(D);case W:return q=li(q),St(D,R,q,ne)}if(pe(q))return ke(D,R,q,ne);if(ae(q)){if(Oe=ae(q),typeof Oe!="function")throw Error(r(150));return q=Oe.call(q),Le(D,R,q,ne)}if(typeof q.then=="function")return St(D,R,hu(q),ne);if(q.$$typeof===$)return St(D,R,uu(D,q),ne);pu(D,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,R!==null&&R.tag===6?(n(D,R.sibling),ne=u(R,q),ne.return=D,D=ne):(n(D,R),ne=ef(q,D.mode,ne),ne.return=D,D=ne),p(D)):n(D,R)}return function(D,R,q,ne){try{$r=0;var Oe=St(D,R,q,ne);return Yi=null,Oe}catch(Ee){if(Ee===Gi||Ee===fu)throw Ee;var rt=yl(29,Ee,null,D.mode);return rt.lanes=ne,rt.return=D,rt}finally{}}}var si=np(!0),lp=np(!1),ds=!1;function pf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mf(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 hs(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ps(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ot&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=rs(e),ca(e,null,n),t}return Ye(e,a,t,n),rs(e)}function Kr(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,qs(e,n)}}function gf(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 p={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};f===null?u=f=p:f=f.next=p,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 yf=!1;function Jr(){if(yf){var e=qi;if(e!==null)throw e}}function Fr(e,t,n,a){yf=!1;var u=e.updateQueue;ds=!1;var f=u.firstBaseUpdate,p=u.lastBaseUpdate,v=u.shared.pending;if(v!==null){u.shared.pending=null;var E=v,G=E.next;E.next=null,p===null?f=G:p.next=G,p=E;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,v=ee.lastBaseUpdate,v!==p&&(v===null?ee.firstBaseUpdate=G:v.next=G,ee.lastBaseUpdate=E))}if(f!==null){var le=u.baseState;p=0,ee=G=E=null,v=f;do{var I=v.lane&-536870913,Z=I!==v.lane;if(Z?(et&I)===I:(a&I)===I){I!==0&&I===Bi&&(yf=!0),ee!==null&&(ee=ee.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var ke=e,Le=v;I=t;var St=n;switch(Le.tag){case 1:if(ke=Le.payload,typeof ke=="function"){le=ke.call(St,le,I);break e}le=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Le.payload,I=typeof ke=="function"?ke.call(St,le,I):ke,I==null)break e;le=k({},le,I);break e;case 2:ds=!0}}I=v.callback,I!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[I]:Z.push(I))}else Z={lane:I,tag:v.tag,payload:v.payload,callback:v.callback,next:null},ee===null?(G=ee=Z,E=le):ee=ee.next=Z,p|=I;if(v=v.next,v===null){if(v=u.shared.pending,v===null)break;Z=v,v=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);ee===null&&(E=le),u.baseState=E,u.firstBaseUpdate=G,u.lastBaseUpdate=ee,f===null&&(u.shared.lanes=0),xs|=p,e.lanes=p,e.memoizedState=le}}function ap(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function sp(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ap(n[e],t)}var Ii=j(null),mu=j(0);function ip(e,t){e=$a,ce(mu,e),ce(Ii,t),$a=e|t.baseLanes}function bf(){ce(mu,$a),ce(Ii,Ii.current)}function xf(){$a=mu.current,V(Ii),V(mu)}var bl=j(null),Ol=null;function ms(e){var t=e.alternate;ce(Pt,Pt.current&1),ce(bl,e),Ol===null&&(t===null||Ii.current!==null||t.memoizedState!==null)&&(Ol=e)}function _f(e){ce(Pt,Pt.current),ce(bl,e),Ol===null&&(Ol=e)}function rp(e){e.tag===22?(ce(Pt,Pt.current),ce(bl,e),Ol===null&&(Ol=e)):gs()}function gs(){ce(Pt,Pt.current),ce(bl,bl.current)}function xl(e){V(bl),Ol===e&&(Ol=null),V(Pt)}var Pt=j(0);function gu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Nd(n)||Td(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 Ba=0,Ve=null,_t=null,rn=null,yu=!1,Xi=!1,ii=!1,bu=0,Wr=0,Vi=null,m0=0;function Ft(){throw Error(r(321))}function vf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zn(e[n],t[n]))return!1;return!0}function Sf(e,t,n,a,u,f){return Ba=f,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Xp:Uf,ii=!1,f=n(a,u),ii=!1,Xi&&(f=up(t,n,a,u)),cp(e),f}function cp(e){z.H=tc;var t=_t!==null&&_t.next!==null;if(Ba=0,rn=_t=Ve=null,yu=!1,Wr=0,Vi=null,t)throw Error(r(300));e===null||cn||(e=e.dependencies,e!==null&&cu(e)&&(cn=!0))}function up(e,t,n,a){Ve=e;var u=0;do{if(Xi&&(Vi=null),Wr=0,Xi=!1,25<=u)throw Error(r(301));if(u+=1,rn=_t=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}z.H=Vp,f=t(n,a)}while(Xi);return f}function g0(){var e=z.H,t=e.useState()[0];return t=typeof t.then=="function"?Pr(t):t,e=e.useState()[0],(_t!==null?_t.memoizedState:null)!==e&&(Ve.flags|=1024),t}function kf(){var e=bu!==0;return bu=0,e}function wf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function jf(e){if(yu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}yu=!1}Ba=0,rn=_t=Ve=null,Xi=!1,Wr=bu=0,Vi=null}function Kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Ve.memoizedState=rn=e:rn=rn.next=e,rn}function en(){if(_t===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=_t.next;var t=rn===null?Ve.memoizedState:rn.next;if(t!==null)rn=t,_t=e;else{if(e===null)throw Ve.alternate===null?Error(r(467)):Error(r(310));_t=e,e={memoizedState:_t.memoizedState,baseState:_t.baseState,baseQueue:_t.baseQueue,queue:_t.queue,next:null},rn===null?Ve.memoizedState=rn=e:rn=rn.next=e}return rn}function xu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pr(e){var t=Wr;return Wr+=1,Vi===null&&(Vi=[]),e=Ph(Vi,e,t),t=Ve,(rn===null?t.memoizedState:rn.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Xp:Uf),e}function _u(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pr(e);if(e.$$typeof===$)return Mn(e)}throw Error(r(438,String(e)))}function Nf(e){var t=null,n=Ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ve.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=xu(),Ve.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 qa(e,t){return typeof t=="function"?t(e):t}function vu(e){var t=en();return Tf(t,_t,e)}function Tf(e,t,n){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var u=e.baseQueue,f=a.pending;if(f!==null){if(u!==null){var p=u.next;u.next=f.next,f.next=p}t.baseQueue=u=f,a.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{t=u.next;var v=p=null,E=null,G=t,ee=!1;do{var le=G.lane&-536870913;if(le!==G.lane?(et&le)===le:(Ba&le)===le){var I=G.revertLane;if(I===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),le===Bi&&(ee=!0);else if((Ba&I)===I){G=G.next,I===Bi&&(ee=!0);continue}else le={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},E===null?(v=E=le,p=f):E=E.next=le,Ve.lanes|=I,xs|=I;le=G.action,ii&&n(f,le),f=G.hasEagerState?G.eagerState:n(f,le)}else I={lane:le,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},E===null?(v=E=I,p=f):E=E.next=I,Ve.lanes|=le,xs|=le;G=G.next}while(G!==null&&G!==t);if(E===null?p=f:E.next=v,!Zn(f,e.memoizedState)&&(cn=!0,ee&&(n=qi,n!==null)))throw n;e.memoizedState=f,e.baseState=p,e.baseQueue=E,a.lastRenderedState=f}return u===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ef(e){var t=en(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var a=n.dispatch,u=n.pending,f=t.memoizedState;if(u!==null){n.pending=null;var p=u=u.next;do f=e(f,p.action),p=p.next;while(p!==u);Zn(f,t.memoizedState)||(cn=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),n.lastRenderedState=f}return[f,a]}function op(e,t,n){var a=Ve,u=en(),f=nt;if(f){if(n===void 0)throw Error(r(407));n=n()}else n=t();var p=!Zn((_t||u).memoizedState,n);if(p&&(u.memoizedState=n,cn=!0),u=u.queue,Rf(hp.bind(null,a,u,e),[e]),u.getSnapshot!==t||p||rn!==null&&rn.memoizedState.tag&1){if(a.flags|=2048,Qi(9,{destroy:void 0},dp.bind(null,a,u,n,t),null),jt===null)throw Error(r(349));f||(Ba&127)!==0||fp(a,t,n)}return n}function fp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ve.updateQueue,t===null?(t=xu(),Ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dp(e,t,n,a){t.value=n,t.getSnapshot=a,pp(t)&&mp(e)}function hp(e,t,n){return n(function(){pp(t)&&mp(e)})}function pp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zn(e,n)}catch{return!0}}function mp(e){var t=Qt(e,2);t!==null&&sl(t,e,2)}function Af(e){var t=Kn();if(typeof e=="function"){var n=e;if(e=n(),ii){En(!0);try{n()}finally{En(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:e},t}function gp(e,t,n,a){return e.baseState=n,Tf(e,_t,typeof a=="function"?a:qa)}function y0(e,t,n,a,u){if(wu(e))throw Error(r(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(p){f.listeners.push(p)}};z.T!==null?n(!0):f.isTransition=!1,a(f),n=t.pending,n===null?(f.next=t.pending=f,yp(t,f)):(f.next=n.next,t.pending=n.next=f)}}function yp(e,t){var n=t.action,a=t.payload,u=e.state;if(t.isTransition){var f=z.T,p={};z.T=p;try{var v=n(u,a),E=z.S;E!==null&&E(p,v),bp(e,t,v)}catch(G){Cf(e,t,G)}finally{f!==null&&p.types!==null&&(f.types=p.types),z.T=f}}else try{f=n(u,a),bp(e,t,f)}catch(G){Cf(e,t,G)}}function bp(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){xp(e,t,a)},function(a){return Cf(e,t,a)}):xp(e,t,n)}function xp(e,t,n){t.status="fulfilled",t.value=n,_p(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,yp(e,n)))}function Cf(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,_p(t),t=t.next;while(t!==a)}e.action=null}function _p(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function vp(e,t){return t}function Sp(e,t){if(nt){var n=jt.formState;if(n!==null){e:{var a=Ve;if(nt){if(zt){t:{for(var u=zt,f=Ml;u.nodeType!==8;){if(!f){u=null;break t}if(u=Dl(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){zt=Dl(u.nextSibling),a=u.data==="F!";break e}}os(a)}a=!1}a&&(t=n[0])}}return n=Kn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vp,lastRenderedState:t},n.queue=a,n=Gp.bind(null,Ve,a),a.dispatch=n,a=Af(!1),f=Lf.bind(null,Ve,!1,a.queue),a=Kn(),u={state:t,dispatch:null,action:e,pending:null},a.queue=u,n=y0.bind(null,Ve,u,f,n),u.dispatch=n,a.memoizedState=e,[t,n,!1]}function kp(e){var t=en();return wp(t,_t,e)}function wp(e,t,n){if(t=Tf(e,t,vp)[0],e=vu(qa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Pr(t)}catch(p){throw p===Gi?fu:p}else a=t;t=en();var u=t.queue,f=u.dispatch;return n!==t.memoizedState&&(Ve.flags|=2048,Qi(9,{destroy:void 0},b0.bind(null,u,n),null)),[a,f,e]}function b0(e,t){e.action=t}function jp(e){var t=en(),n=_t;if(n!==null)return wp(t,n,e);en(),t=t.memoizedState,n=en();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Qi(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=xu(),Ve.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 Np(){return en().memoizedState}function Su(e,t,n,a){var u=Kn();Ve.flags|=e,u.memoizedState=Qi(1|t,{destroy:void 0},n,a===void 0?null:a)}function ku(e,t,n,a){var u=en();a=a===void 0?null:a;var f=u.memoizedState.inst;_t!==null&&a!==null&&vf(a,_t.memoizedState.deps)?u.memoizedState=Qi(t,f,n,a):(Ve.flags|=e,u.memoizedState=Qi(1|t,f,n,a))}function Tp(e,t){Su(8390656,8,e,t)}function Rf(e,t){ku(2048,8,e,t)}function x0(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=xu(),Ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ep(e){var t=en().memoizedState;return x0({ref:t,nextImpl:e}),function(){if((ot&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ap(e,t){return ku(4,2,e,t)}function Cp(e,t){return ku(4,4,e,t)}function Rp(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 Mp(e,t,n){n=n!=null?n.concat([e]):null,ku(4,4,Rp.bind(null,t,e),n)}function Mf(){}function Op(e,t){var n=en();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&vf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Dp(e,t){var n=en();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&vf(t,a[1]))return a[0];if(a=e(),ii){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[a,t],a}function Of(e,t,n){return n===void 0||(Ba&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=zm(),Ve.lanes|=e,xs|=e,n)}function zp(e,t,n,a){return Zn(n,t)?n:Ii.current!==null?(e=Of(e,n,a),Zn(e,t)||(cn=!0),e):(Ba&42)===0||(Ba&1073741824)!==0&&(et&261930)===0?(cn=!0,e.memoizedState=n):(e=zm(),Ve.lanes|=e,xs|=e,t)}function Lp(e,t,n,a,u){var f=P.p;P.p=f!==0&&8>f?f:8;var p=z.T,v={};z.T=v,Lf(e,!1,t,n);try{var E=u(),G=z.S;if(G!==null&&G(v,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var ee=p0(E,a);ec(e,t,ee,Sl(e))}else ec(e,t,a,Sl(e))}catch(le){ec(e,t,{then:function(){},status:"rejected",reason:le},Sl())}finally{P.p=f,p!==null&&v.types!==null&&(p.types=v.types),z.T=p}}function _0(){}function Df(e,t,n,a){if(e.tag!==5)throw Error(r(476));var u=Up(e).queue;Lp(e,u,t,te,n===null?_0:function(){return Hp(e),n(a)})}function Up(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hp(e){var t=Up(e);t.next===null&&(t=e.alternate.memoizedState),ec(e,t.next.queue,{},Sl())}function zf(){return Mn(yc)}function Bp(){return en().memoizedState}function qp(){return en().memoizedState}function v0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sl();e=hs(n);var a=ps(t,e,n);a!==null&&(sl(a,t,n),Kr(a,t,n)),t={cache:of()},e.payload=t;return}t=t.return}}function S0(e,t,n){var a=Sl();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},wu(e)?Yp(t,n):(n=Ct(e,t,n,a),n!==null&&(sl(n,e,a),Ip(n,t,a)))}function Gp(e,t,n){var a=Sl();ec(e,t,n,a)}function ec(e,t,n,a){var u={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(wu(e))Yp(t,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var p=t.lastRenderedState,v=f(p,n);if(u.hasEagerState=!0,u.eagerState=v,Zn(v,p))return Ye(e,t,u,0),jt===null&&Be(),!1}catch{}finally{}if(n=Ct(e,t,u,a),n!==null)return sl(n,e,a),Ip(n,t,a),!0}return!1}function Lf(e,t,n,a){if(a={lane:2,revertLane:pd(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},wu(e)){if(t)throw Error(r(479))}else t=Ct(e,n,a,2),t!==null&&sl(t,e,2)}function wu(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Yp(e,t){Xi=yu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ip(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,qs(e,n)}}var tc={readContext:Mn,use:_u,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft};tc.useEffectEvent=Ft;var Xp={readContext:Mn,use:_u,useCallback:function(e,t){return Kn().memoizedState=[e,t===void 0?null:t],e},useContext:Mn,useEffect:Tp,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Su(4194308,4,Rp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){Su(4,2,e,t)},useMemo:function(e,t){var n=Kn();t=t===void 0?null:t;var a=e();if(ii){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Kn();if(n!==void 0){var u=n(t);if(ii){En(!0);try{n(t)}finally{En(!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=S0.bind(null,Ve,e),[a.memoizedState,e]},useRef:function(e){var t=Kn();return e={current:e},t.memoizedState=e},useState:function(e){e=Af(e);var t=e.queue,n=Gp.bind(null,Ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Mf,useDeferredValue:function(e,t){var n=Kn();return Of(n,e,t)},useTransition:function(){var e=Af(!1);return e=Lp.bind(null,Ve,e.queue,!0,!1),Kn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ve,u=Kn();if(nt){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),jt===null)throw Error(r(349));(et&127)!==0||fp(a,t,n)}u.memoizedState=n;var f={value:n,getSnapshot:t};return u.queue=f,Tp(hp.bind(null,a,f,e),[e]),a.flags|=2048,Qi(9,{destroy:void 0},dp.bind(null,a,f,n,t),null),n},useId:function(){var e=Kn(),t=jt.identifierPrefix;if(nt){var n=oa,a=ua;n=(a&~(1<<32-pt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=bu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=m0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:zf,useFormState:Sp,useActionState:Sp,useOptimistic:function(e){var t=Kn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Lf.bind(null,Ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:Nf,useCacheRefresh:function(){return Kn().memoizedState=v0.bind(null,Ve)},useEffectEvent:function(e){var t=Kn(),n={impl:e};return t.memoizedState=n,function(){if((ot&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Uf={readContext:Mn,use:_u,useCallback:Op,useContext:Mn,useEffect:Rf,useImperativeHandle:Mp,useInsertionEffect:Ap,useLayoutEffect:Cp,useMemo:Dp,useReducer:vu,useRef:Np,useState:function(){return vu(qa)},useDebugValue:Mf,useDeferredValue:function(e,t){var n=en();return zp(n,_t.memoizedState,e,t)},useTransition:function(){var e=vu(qa)[0],t=en().memoizedState;return[typeof e=="boolean"?e:Pr(e),t]},useSyncExternalStore:op,useId:Bp,useHostTransitionStatus:zf,useFormState:kp,useActionState:kp,useOptimistic:function(e,t){var n=en();return gp(n,_t,e,t)},useMemoCache:Nf,useCacheRefresh:qp};Uf.useEffectEvent=Ep;var Vp={readContext:Mn,use:_u,useCallback:Op,useContext:Mn,useEffect:Rf,useImperativeHandle:Mp,useInsertionEffect:Ap,useLayoutEffect:Cp,useMemo:Dp,useReducer:Ef,useRef:Np,useState:function(){return Ef(qa)},useDebugValue:Mf,useDeferredValue:function(e,t){var n=en();return _t===null?Of(n,e,t):zp(n,_t.memoizedState,e,t)},useTransition:function(){var e=Ef(qa)[0],t=en().memoizedState;return[typeof e=="boolean"?e:Pr(e),t]},useSyncExternalStore:op,useId:Bp,useHostTransitionStatus:zf,useFormState:jp,useActionState:jp,useOptimistic:function(e,t){var n=en();return _t!==null?gp(n,_t,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Nf,useCacheRefresh:qp};Vp.useEffectEvent=Ep;function Hf(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:k({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Bf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Sl(),u=hs(a);u.payload=t,n!=null&&(u.callback=n),t=ps(e,u,a),t!==null&&(sl(t,e,a),Kr(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Sl(),u=hs(a);u.tag=1,u.payload=t,n!=null&&(u.callback=n),t=ps(e,u,a),t!==null&&(sl(t,e,a),Kr(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sl(),a=hs(n);a.tag=2,t!=null&&(a.callback=t),t=ps(e,a,n),t!==null&&(sl(t,e,n),Kr(t,e,n))}};function Qp(e,t,n,a,u,f,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,p):t.prototype&&t.prototype.isPureReactComponent?!ss(n,a)||!ss(u,f):!0}function $p(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&&Bf.enqueueReplaceState(t,t.state,null)}function ri(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=k({},n));for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n}function Zp(e){Dt(e)}function Kp(e){console.error(e)}function Jp(e){Dt(e)}function ju(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Fp(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 qf(e,t,n){return n=hs(n),n.tag=3,n.payload={element:null},n.callback=function(){ju(e,t)},n}function Wp(e){return e=hs(e),e.tag=3,e}function Pp(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(){Fp(t,n,a)}}var p=n.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Fp(t,n,a),typeof u!="function"&&(_s===null?_s=new Set([this]):_s.add(this));var v=a.stack;this.componentDidCatch(a.value,{componentStack:v!==null?v:""})})}function k0(e,t,n,a,u){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Hi(t,n,u,!0),n=bl.current,n!==null){switch(n.tag){case 31:case 13:return Ol===null?Uu():n.alternate===null&&Wt===0&&(Wt=3),n.flags&=-257,n.flags|=65536,n.lanes=u,a===du?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),fd(e,a,u)),!1;case 22:return n.flags|=65536,a===du?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)),fd(e,a,u)),!1}throw Error(r(435,n.tag))}return fd(e,a,u),Uu(),!1}if(nt)return t=bl.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,a!==af&&(e=Error(r(422),{cause:a}),Xr(Al(e,n)))):(a!==af&&(t=Error(r(423),{cause:a}),Xr(Al(t,n))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,a=Al(a,n),u=qf(e.stateNode,a,u),gf(e,u),Wt!==4&&(Wt=2)),!1;var f=Error(r(520),{cause:a});if(f=Al(f,n),uc===null?uc=[f]:uc.push(f),Wt!==4&&(Wt=2),t===null)return!0;a=Al(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=u&-u,n.lanes|=e,e=qf(n.stateNode,a,e),gf(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"&&(_s===null||!_s.has(f))))return n.flags|=65536,u&=-u,n.lanes|=u,u=Wp(u),Pp(u,e,n,a),gf(n,u),!1}n=n.return}while(n!==null);return!1}var Gf=Error(r(461)),cn=!1;function On(e,t,n,a){t.child=e===null?lp(t,null,n,a):si(t,e.child,n,a)}function em(e,t,n,a,u){n=n.render;var f=t.ref;if("ref"in a){var p={};for(var v in a)v!=="ref"&&(p[v]=a[v])}else p=a;return ti(t),a=Sf(e,t,n,p,f,u),v=kf(),e!==null&&!cn?(wf(e,t,u),Ga(e,t,u)):(nt&&v&&nf(t),t.flags|=1,On(e,t,a,u),t.child)}function tm(e,t,n,a,u){if(e===null){var f=n.type;return typeof f=="function"&&!Po(f)&&f.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=f,nm(e,t,f,a,u)):(e=iu(n.type,null,a,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Kf(e,u)){var p=f.memoizedProps;if(n=n.compare,n=n!==null?n:ss,n(p,a)&&e.ref===t.ref)return Ga(e,t,u)}return t.flags|=1,e=za(f,a),e.ref=t.ref,e.return=t,t.child=e}function nm(e,t,n,a,u){if(e!==null){var f=e.memoizedProps;if(ss(f,a)&&e.ref===t.ref)if(cn=!1,t.pendingProps=a=f,Kf(e,u))(e.flags&131072)!==0&&(cn=!0);else return t.lanes=e.lanes,Ga(e,t,u)}return Yf(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 am(e,t,f,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ou(t,f!==null?f.cachePool:null),f!==null?ip(t,f):bf(),rp(t);else return a=t.lanes=536870912,am(e,t,f!==null?f.baseLanes|n:n,n,a)}else f!==null?(ou(t,f.cachePool),ip(t,f),gs(),t.memoizedState=null):(e!==null&&ou(t,null),bf(),gs());return On(e,t,u,n),t.child}function nc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function am(e,t,n,a,u){var f=df();return f=f===null?null:{parent:sn._currentValue,pool:f},t.memoizedState={baseLanes:n,cachePool:f},e!==null&&ou(t,null),bf(),rp(t),e!==null&&Hi(e,t,a,!0),t.childLanes=u,null}function Nu(e,t){return t=Eu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sm(e,t,n){return si(t,e.child,null,n),e=Nu(t,t.pendingProps),e.flags|=2,xl(t),t.memoizedState=null,e}function w0(e,t,n){var a=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=Nu(t,a),t.lanes=536870912,nc(null,e);if(_f(t),(e=zt)?(e=yg(e,Ml),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cs!==null?{id:ua,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},n=Yh(e),n.return=t,t.child=n,Rn=t,zt=null)):e=null,e===null)throw os(t);return t.lanes=536870912,null}return Nu(t,a)}var f=e.memoizedState;if(f!==null){var p=f.dehydrated;if(_f(t),u)if(t.flags&256)t.flags&=-257,t=sm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(cn||Hi(e,t,n,!1),u=(n&e.childLanes)!==0,cn||u){if(a=jt,a!==null&&(p=Bl(a,n),p!==0&&p!==f.retryLane))throw f.retryLane=p,Qt(e,p),sl(a,e,p),Gf;Uu(),t=sm(e,t,n)}else e=f.treeContext,zt=Dl(p.nextSibling),Rn=t,nt=!0,us=null,Ml=!1,e!==null&&Vh(t,e),t=Nu(t,a),t.flags|=4096;return t}return e=za(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Tu(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(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Yf(e,t,n,a,u){return ti(t),n=Sf(e,t,n,a,void 0,u),a=kf(),e!==null&&!cn?(wf(e,t,u),Ga(e,t,u)):(nt&&a&&nf(t),t.flags|=1,On(e,t,n,u),t.child)}function im(e,t,n,a,u,f){return ti(t),t.updateQueue=null,n=up(t,a,n,u),cp(e),a=kf(),e!==null&&!cn?(wf(e,t,f),Ga(e,t,f)):(nt&&a&&nf(t),t.flags|=1,On(e,t,n,f),t.child)}function rm(e,t,n,a,u){if(ti(t),t.stateNode===null){var f=Di,p=n.contextType;typeof p=="object"&&p!==null&&(f=Mn(p)),f=new n(a,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Bf,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=a,f.state=t.memoizedState,f.refs={},pf(t),p=n.contextType,f.context=typeof p=="object"&&p!==null?Mn(p):Di,f.state=t.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Hf(t,n,p,a),f.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(p=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),p!==f.state&&Bf.enqueueReplaceState(f,f.state,null),Fr(t,a,f,u),Jr(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){f=t.stateNode;var v=t.memoizedProps,E=ri(n,v);f.props=E;var G=f.context,ee=n.contextType;p=Di,typeof ee=="object"&&ee!==null&&(p=Mn(ee));var le=n.getDerivedStateFromProps;ee=typeof le=="function"||typeof f.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,ee||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(v||G!==p)&&$p(t,f,a,p),ds=!1;var I=t.memoizedState;f.state=I,Fr(t,a,f,u),Jr(),G=t.memoizedState,v||I!==G||ds?(typeof le=="function"&&(Hf(t,n,le,a),G=t.memoizedState),(E=ds||Qp(t,n,E,a,I,G,p))?(ee||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=G),f.props=a,f.state=G,f.context=p,a=E):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,mf(e,t),p=t.memoizedProps,ee=ri(n,p),f.props=ee,le=t.pendingProps,I=f.context,G=n.contextType,E=Di,typeof G=="object"&&G!==null&&(E=Mn(G)),v=n.getDerivedStateFromProps,(G=typeof v=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(p!==le||I!==E)&&$p(t,f,a,E),ds=!1,I=t.memoizedState,f.state=I,Fr(t,a,f,u),Jr();var Z=t.memoizedState;p!==le||I!==Z||ds||e!==null&&e.dependencies!==null&&cu(e.dependencies)?(typeof v=="function"&&(Hf(t,n,v,a),Z=t.memoizedState),(ee=ds||Qp(t,n,ee,a,I,Z,E)||e!==null&&e.dependencies!==null&&cu(e.dependencies))?(G||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,Z,E),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,Z,E)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Z),f.props=a,f.state=Z,f.context=E,a=ee):(typeof f.componentDidUpdate!="function"||p===e.memoizedProps&&I===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&I===e.memoizedState||(t.flags|=1024),a=!1)}return f=a,Tu(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=si(t,e.child,null,u),t.child=si(t,null,n,u)):On(e,t,n,u),t.memoizedState=f.state,e=t.child):e=Ga(e,t,u),e}function cm(e,t,n,a){return Ps(),t.flags|=256,On(e,t,n,a),t.child}var If={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xf(e){return{baseLanes:e,cachePool:Fh()}}function Vf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=vl),e}function um(e,t,n){var a=t.pendingProps,u=!1,f=(t.flags&128)!==0,p;if((p=f)||(p=e!==null&&e.memoizedState===null?!1:(Pt.current&2)!==0),p&&(u=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(u?ms(t):gs(),(e=zt)?(e=yg(e,Ml),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cs!==null?{id:ua,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},n=Yh(e),n.return=t,t.child=n,Rn=t,zt=null)):e=null,e===null)throw os(t);return Td(e)?t.lanes=32:t.lanes=536870912,null}var v=a.children;return a=a.fallback,u?(gs(),u=t.mode,v=Eu({mode:"hidden",children:v},u),a=Ws(a,u,n,null),v.return=t,a.return=t,v.sibling=a,t.child=v,a=t.child,a.memoizedState=Xf(n),a.childLanes=Vf(e,p,n),t.memoizedState=If,nc(null,a)):(ms(t),Qf(t,v))}var E=e.memoizedState;if(E!==null&&(v=E.dehydrated,v!==null)){if(f)t.flags&256?(ms(t),t.flags&=-257,t=$f(e,t,n)):t.memoizedState!==null?(gs(),t.child=e.child,t.flags|=128,t=null):(gs(),v=a.fallback,u=t.mode,a=Eu({mode:"visible",children:a.children},u),v=Ws(v,u,n,null),v.flags|=2,a.return=t,v.return=t,a.sibling=v,t.child=a,si(t,e.child,null,n),a=t.child,a.memoizedState=Xf(n),a.childLanes=Vf(e,p,n),t.memoizedState=If,t=nc(null,a));else if(ms(t),Td(v)){if(p=v.nextSibling&&v.nextSibling.dataset,p)var G=p.dgst;p=G,a=Error(r(419)),a.stack="",a.digest=p,Xr({value:a,source:null,stack:null}),t=$f(e,t,n)}else if(cn||Hi(e,t,n,!1),p=(n&e.childLanes)!==0,cn||p){if(p=jt,p!==null&&(a=Bl(p,n),a!==0&&a!==E.retryLane))throw E.retryLane=a,Qt(e,a),sl(p,e,a),Gf;Nd(v)||Uu(),t=$f(e,t,n)}else Nd(v)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,zt=Dl(v.nextSibling),Rn=t,nt=!0,us=null,Ml=!1,e!==null&&Vh(t,e),t=Qf(t,a.children),t.flags|=4096);return t}return u?(gs(),v=a.fallback,u=t.mode,E=e.child,G=E.sibling,a=za(E,{mode:"hidden",children:a.children}),a.subtreeFlags=E.subtreeFlags&65011712,G!==null?v=za(G,v):(v=Ws(v,u,n,null),v.flags|=2),v.return=t,a.return=t,a.sibling=v,t.child=a,nc(null,a),a=t.child,v=e.child.memoizedState,v===null?v=Xf(n):(u=v.cachePool,u!==null?(E=sn._currentValue,u=u.parent!==E?{parent:E,pool:E}:u):u=Fh(),v={baseLanes:v.baseLanes|n,cachePool:u}),a.memoizedState=v,a.childLanes=Vf(e,p,n),t.memoizedState=If,nc(e.child,a)):(ms(t),n=e.child,e=n.sibling,n=za(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=n,t.memoizedState=null,n)}function Qf(e,t){return t=Eu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Eu(e,t){return e=yl(22,e,null,t),e.lanes=0,e}function $f(e,t,n){return si(t,e.child,null,n),e=Qf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function om(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),cf(e.return,t,n)}function Zf(e,t,n,a,u,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:u,treeForkCount:f}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=a,p.tail=n,p.tailMode=u,p.treeForkCount=f)}function fm(e,t,n){var a=t.pendingProps,u=a.revealOrder,f=a.tail;a=a.children;var p=Pt.current,v=(p&2)!==0;if(v?(p=p&1|2,t.flags|=128):p&=1,ce(Pt,p),On(e,t,a,n),a=nt?Ir:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&om(e,n,t);else if(e.tag===19)om(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&&gu(e)===null&&(u=n),n=n.sibling;n=u,n===null?(u=t.child,t.child=null):(u=n.sibling,n.sibling=null),Zf(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&&gu(e)===null){t.child=u;break}e=u.sibling,u.sibling=n,n=u,u=e}Zf(t,!0,n,null,f,a);break;case"together":Zf(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xs|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Hi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=za(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=za(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cu(e)))}function j0(e,t,n){switch(t.tag){case 3:it(t,t.stateNode.containerInfo),fs(t,sn,e.memoizedState.cache),Ps();break;case 27:case 5:st(t);break;case 4:it(t,t.stateNode.containerInfo);break;case 10:fs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_f(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ms(t),t.flags|=128,null):(n&t.child.childLanes)!==0?um(e,t,n):(ms(t),e=Ga(e,t,n),e!==null?e.sibling:null);ms(t);break;case 19:var u=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Hi(e,t,n,!1),a=(n&t.childLanes)!==0),u){if(a)return fm(e,t,n);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ce(Pt,Pt.current),a)break;return null;case 22:return t.lanes=0,lm(e,t,n,t.pendingProps);case 24:fs(t,sn,e.memoizedState.cache)}return Ga(e,t,n)}function dm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)cn=!0;else{if(!Kf(e,n)&&(t.flags&128)===0)return cn=!1,j0(e,t,n);cn=(e.flags&131072)!==0}else cn=!1,nt&&(t.flags&1048576)!==0&&Xh(t,Ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=li(t.elementType),t.type=e,typeof e=="function")Po(e)?(a=ri(e,a),t.tag=1,t=rm(null,t,e,a,n)):(t.tag=0,t=Yf(null,t,e,a,n));else{if(e!=null){var u=e.$$typeof;if(u===A){t.tag=11,t=em(null,t,e,a,n);break e}else if(u===M){t.tag=14,t=tm(null,t,e,a,n);break e}}throw t=je(e)||e,Error(r(306,t,""))}}return t;case 0:return Yf(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,u=ri(a,t.pendingProps),rm(e,t,a,u,n);case 3:e:{if(it(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var f=t.memoizedState;u=f.element,mf(e,t),Fr(t,a,null,n);var p=t.memoizedState;if(a=p.cache,fs(t,sn,a),a!==f.cache&&uf(t,[sn],n,!0),Jr(),a=p.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=cm(e,t,a,n);break e}else if(a!==u){u=Al(Error(r(424)),t),Xr(u),t=cm(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(zt=Dl(e.firstChild),Rn=t,nt=!0,us=null,Ml=!0,n=lp(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ps(),a===u){t=Ga(e,t,n);break e}On(e,t,a,n)}t=t.child}return t;case 26:return Tu(e,t),e===null?(n=kg(t.type,null,t.pendingProps,null))?t.memoizedState=n:nt||(n=t.type,e=t.pendingProps,a=Xu(Ne.current).createElement(n),a[Mt]=t,a[Ge]=e,Dn(a,n,e),mt(a),t.stateNode=a):t.memoizedState=kg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return st(t),e===null&&nt&&(a=t.stateNode=_g(t.type,t.pendingProps,Ne.current),Rn=t,Ml=!0,u=zt,ws(t.type)?(Ed=u,zt=Dl(a.firstChild)):zt=u),On(e,t,t.pendingProps.children,n),Tu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((u=a=zt)&&(a=tx(a,t.type,t.pendingProps,Ml),a!==null?(t.stateNode=a,Rn=t,zt=Dl(a.firstChild),Ml=!1,u=!0):u=!1),u||os(t)),st(t),u=t.type,f=t.pendingProps,p=e!==null?e.memoizedProps:null,a=f.children,kd(u,f)?a=null:p!==null&&kd(u,p)&&(t.flags|=32),t.memoizedState!==null&&(u=Sf(e,t,g0,null,null,n),yc._currentValue=u),Tu(e,t),On(e,t,a,n),t.child;case 6:return e===null&&nt&&((e=n=zt)&&(n=nx(n,t.pendingProps,Ml),n!==null?(t.stateNode=n,Rn=t,zt=null,e=!0):e=!1),e||os(t)),null;case 13:return um(e,t,n);case 4:return it(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=si(t,null,a,n):On(e,t,a,n),t.child;case 11:return em(e,t,t.type,t.pendingProps,n);case 7:return On(e,t,t.pendingProps,n),t.child;case 8:return On(e,t,t.pendingProps.children,n),t.child;case 12:return On(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,fs(t,t.type,a.value),On(e,t,a.children,n),t.child;case 9:return u=t.type._context,a=t.pendingProps.children,ti(t),u=Mn(u),a=a(u),t.flags|=1,On(e,t,a,n),t.child;case 14:return tm(e,t,t.type,t.pendingProps,n);case 15:return nm(e,t,t.type,t.pendingProps,n);case 19:return fm(e,t,n);case 31:return w0(e,t,n);case 22:return lm(e,t,n,t.pendingProps);case 24:return ti(t),a=Mn(sn),e===null?(u=df(),u===null&&(u=jt,f=of(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=n),u=f),t.memoizedState={parent:a,cache:u},pf(t),fs(t,sn,u)):((e.lanes&n)!==0&&(mf(e,t),Fr(t,null,null,n),Jr()),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),fs(t,sn,a)):(a=f.cache,fs(t,sn,a),a!==u.cache&&uf(t,[sn],n,!0))),On(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Ya(e){e.flags|=4}function Jf(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(Bm())e.flags|=8192;else throw ai=du,hf}else e.flags&=-16777217}function hm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Eg(t))if(Bm())e.flags|=8192;else throw ai=du,hf}function Au(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?pn():536870912,e.lanes|=t,Ji|=t)}function lc(e,t){if(!nt)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 Lt(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 N0(e,t,n){var a=t.pendingProps;switch(lf(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(t),null;case 1:return Lt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ha(sn),Ze(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sf())),Lt(t),null;case 26:var u=t.type,f=t.memoizedState;return e===null?(Ya(t),f!==null?(Lt(t),hm(t,f)):(Lt(t),Jf(t,u,null,a,n))):f?f!==e.memoizedState?(Ya(t),Lt(t),hm(t,f)):(Lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ya(t),Lt(t),Jf(t,u,e,a,n)),null;case 27:if(qe(t),n=Ne.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Lt(t),null}e=oe.current,Ui(t)?Qh(t):(e=_g(u,a,n),t.stateNode=e,Ya(t))}return Lt(t),null;case 5:if(qe(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Lt(t),null}if(f=oe.current,Ui(t))Qh(t);else{var p=Xu(Ne.current);switch(f){case 1:f=p.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=p.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=p.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=p.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is=="string"?p.createElement("select",{is:a.is}):p.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is=="string"?p.createElement(u,{is:a.is}):p.createElement(u)}}f[Mt]=t,f[Ge]=a;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)f.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=f;e:switch(Dn(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&&Ya(t)}}return Lt(t),Jf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ya(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=Ne.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,u=Rn,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||ug(e.nodeValue,n)),e||os(t,!0)}else e=Xu(e).createTextNode(a),e[Mt]=t,t.stateNode=e}return Lt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ui(t),n!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Mt]=t}else Ps(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Lt(t),e=!1}else n=sf(),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(r(558))}return Lt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ui(t),a!==null&&a.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[Mt]=t}else Ps(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Lt(t),u=!1}else u=sf(),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),Au(t,t.updateQueue),Lt(t),null);case 4:return Ze(),e===null&&bd(t.stateNode.containerInfo),Lt(t),null;case 10:return Ha(t.type),Lt(t),null;case 19:if(V(Pt),a=t.memoizedState,a===null)return Lt(t),null;if(u=(t.flags&128)!==0,f=a.rendering,f===null)if(u)lc(a,!1);else{if(Wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=gu(e),f!==null){for(t.flags|=128,lc(a,!1),e=f.updateQueue,t.updateQueue=e,Au(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Gh(n,e),n=n.sibling;return ce(Pt,Pt.current&1|2),nt&&La(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ut()>Du&&(t.flags|=128,u=!0,lc(a,!1),t.lanes=4194304)}else{if(!u)if(e=gu(f),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,Au(t,e),lc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!nt)return Lt(t),null}else 2*ut()-a.renderingStartTime>Du&&n!==536870912&&(t.flags|=128,u=!0,lc(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=ut(),e.sibling=null,n=Pt.current,ce(Pt,u?n&1|2:n&1),nt&&La(t,a.treeForkCount),e):(Lt(t),null);case 22:case 23:return xl(t),xf(),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&&(Lt(t),t.subtreeFlags&6&&(t.flags|=8192)):Lt(t),n=t.updateQueue,n!==null&&Au(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(ni),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ha(sn),Lt(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function T0(e,t){switch(lf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ha(sn),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return qe(t),null;case 31:if(t.memoizedState!==null){if(xl(t),t.alternate===null)throw Error(r(340));Ps()}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(r(340));Ps()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Pt),null;case 4:return Ze(),null;case 10:return Ha(t.type),null;case 22:case 23:return xl(t),xf(),e!==null&&V(ni),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ha(sn),null;case 25:return null;default:return null}}function pm(e,t){switch(lf(t),t.tag){case 3:Ha(sn),Ze();break;case 26:case 27:case 5:qe(t);break;case 4:Ze();break;case 31:t.memoizedState!==null&&xl(t);break;case 13:xl(t);break;case 19:V(Pt);break;case 10:Ha(t.type);break;case 22:case 23:xl(t),xf(),e!==null&&V(ni);break;case 24:Ha(sn)}}function ac(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,p=n.inst;a=f(),p.destroy=a}n=n.next}while(n!==u)}}catch(v){bt(t,t.return,v)}}function ys(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 p=a.inst,v=p.destroy;if(v!==void 0){p.destroy=void 0,u=t;var E=n,G=v;try{G()}catch(ee){bt(u,E,ee)}}}a=a.next}while(a!==f)}}catch(ee){bt(t,t.return,ee)}}function mm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{sp(t,n)}catch(a){bt(e,e.return,a)}}}function gm(e,t,n){n.props=ri(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){bt(e,t,a)}}function sc(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){bt(e,t,u)}}function fa(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(u){bt(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){bt(e,t,u)}else n.current=null}function ym(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){bt(e,e.return,u)}}function Ff(e,t,n){try{var a=e.stateNode;K0(a,e.type,n,t),a[Ge]=t}catch(u){bt(e,e.return,u)}}function bm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ws(e.type)||e.tag===4}function Wf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bm(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&&ws(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 Pf(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=gt));else if(a!==4&&(a===27&&ws(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Pf(e,t,n),e=e.sibling;e!==null;)Pf(e,t,n),e=e.sibling}function Cu(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&&ws(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Cu(e,t,n),e=e.sibling;e!==null;)Cu(e,t,n),e=e.sibling}function xm(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Dn(t,a,n),t[Mt]=e,t[Ge]=n}catch(f){bt(e,e.return,f)}}var Ia=!1,un=!1,ed=!1,_m=typeof WeakSet=="function"?WeakSet:Set,wn=null;function E0(e,t){if(e=e.containerInfo,vd=Fu,e=Vl(e),Js(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 p=0,v=-1,E=-1,G=0,ee=0,le=e,I=null;t:for(;;){for(var Z;le!==n||u!==0&&le.nodeType!==3||(v=p+u),le!==f||a!==0&&le.nodeType!==3||(E=p+a),le.nodeType===3&&(p+=le.nodeValue.length),(Z=le.firstChild)!==null;)I=le,le=Z;for(;;){if(le===e)break t;if(I===n&&++G===u&&(v=p),I===f&&++ee===a&&(E=p),(Z=le.nextSibling)!==null)break;le=I,I=le.parentNode}le=Z}n=v===-1||E===-1?null:{start:v,end:E}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sd={focusedElem:e,selectionRange:n},Fu=!1,wn=t;wn!==null;)if(t=wn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wn=e;else for(;wn!==null;){switch(t=wn,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 ke=ri(n.type,u);e=a.getSnapshotBeforeUpdate(ke,f),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){bt(n,n.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)jd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jd(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,wn=e;break}wn=t.return}}function vm(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Va(e,n),a&4&&ac(5,n);break;case 1:if(Va(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(p){bt(n,n.return,p)}else{var u=ri(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){bt(n,n.return,p)}}a&64&&mm(n),a&512&&sc(n,n.return);break;case 3:if(Va(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{sp(e,t)}catch(p){bt(n,n.return,p)}}break;case 27:t===null&&a&4&&xm(n);case 26:case 5:Va(e,n),t===null&&a&4&&ym(n),a&512&&sc(n,n.return);break;case 12:Va(e,n);break;case 31:Va(e,n),a&4&&wm(e,n);break;case 13:Va(e,n),a&4&&jm(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=U0.bind(null,n),lx(e,n))));break;case 22:if(a=n.memoizedState!==null||Ia,!a){t=t!==null&&t.memoizedState!==null||un,u=Ia;var f=un;Ia=a,(un=t)&&!f?Qa(e,n,(n.subtreeFlags&8772)!==0):Va(e,n),Ia=u,un=f}break;case 30:break;default:Va(e,n)}}function Sm(e){var t=e.alternate;t!==null&&(e.alternate=null,Sm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&fl(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 $t=null,tl=!1;function Xa(e,t,n){for(n=n.child;n!==null;)km(e,t,n),n=n.sibling}function km(e,t,n){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(tn,n)}catch{}switch(n.tag){case 26:un||fa(n,t),Xa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:un||fa(n,t);var a=$t,u=tl;ws(n.type)&&($t=n.stateNode,tl=!1),Xa(e,t,n),pc(n.stateNode),$t=a,tl=u;break;case 5:un||fa(n,t);case 6:if(a=$t,u=tl,$t=null,Xa(e,t,n),$t=a,tl=u,$t!==null)if(tl)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(n.stateNode)}catch(f){bt(n,t,f)}else try{$t.removeChild(n.stateNode)}catch(f){bt(n,t,f)}break;case 18:$t!==null&&(tl?(e=$t,mg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ar(e)):mg($t,n.stateNode));break;case 4:a=$t,u=tl,$t=n.stateNode.containerInfo,tl=!0,Xa(e,t,n),$t=a,tl=u;break;case 0:case 11:case 14:case 15:ys(2,n,t),un||ys(4,n,t),Xa(e,t,n);break;case 1:un||(fa(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&gm(n,t,a)),Xa(e,t,n);break;case 21:Xa(e,t,n);break;case 22:un=(a=un)||n.memoizedState!==null,Xa(e,t,n),un=a;break;default:Xa(e,t,n)}}function wm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ar(e)}catch(n){bt(t,t.return,n)}}}function jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ar(e)}catch(n){bt(t,t.return,n)}}function A0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _m),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _m),t;default:throw Error(r(435,e.tag))}}function Ru(e,t){var n=A0(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var u=H0.bind(null,e,a);a.then(u,u)}})}function nl(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var u=n[a],f=e,p=t,v=p;e:for(;v!==null;){switch(v.tag){case 27:if(ws(v.type)){$t=v.stateNode,tl=!1;break e}break;case 5:$t=v.stateNode,tl=!1;break e;case 3:case 4:$t=v.stateNode.containerInfo,tl=!0;break e}v=v.return}if($t===null)throw Error(r(160));km(f,p,u),$t=null,tl=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nm(t,e),t=t.sibling}var $l=null;function Nm(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nl(t,e),ll(e),a&4&&(ys(3,e,e.return),ac(3,e),ys(5,e,e.return));break;case 1:nl(t,e),ll(e),a&512&&(un||n===null||fa(n,n.return)),a&64&&Ia&&(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=$l;if(nl(t,e),ll(e),a&512&&(un||n===null||fa(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[ol]||f[Mt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(a),u.head.insertBefore(f,u.querySelector("head > title"))),Dn(f,a,n),f[Mt]=e,mt(f),a=f;break e;case"link":var p=Ng("link","href",u).get(a+(n.href||""));if(p){for(var v=0;v<p.length;v++)if(f=p[v],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)){p.splice(v,1);break t}}f=u.createElement(a),Dn(f,a,n),u.head.appendChild(f);break;case"meta":if(p=Ng("meta","content",u).get(a+(n.content||""))){for(v=0;v<p.length;v++)if(f=p[v],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)){p.splice(v,1);break t}}f=u.createElement(a),Dn(f,a,n),u.head.appendChild(f);break;default:throw Error(r(468,a))}f[Mt]=e,mt(f),a=f}e.stateNode=a}else Tg(u,e.type,e.stateNode);else e.stateNode=jg(u,a,e.memoizedProps);else f!==a?(f===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):f.count--,a===null?Tg(u,e.type,e.stateNode):jg(u,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ff(e,e.memoizedProps,n.memoizedProps)}break;case 27:nl(t,e),ll(e),a&512&&(un||n===null||fa(n,n.return)),n!==null&&a&4&&Ff(e,e.memoizedProps,n.memoizedProps);break;case 5:if(nl(t,e),ll(e),a&512&&(un||n===null||fa(n,n.return)),e.flags&32){u=e.stateNode;try{U(u,"")}catch(ke){bt(e,e.return,ke)}}a&4&&e.stateNode!=null&&(u=e.memoizedProps,Ff(e,u,n!==null?n.memoizedProps:u)),a&1024&&(ed=!0);break;case 6:if(nl(t,e),ll(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ke){bt(e,e.return,ke)}}break;case 3:if($u=null,u=$l,$l=Vu(t.containerInfo),nl(t,e),$l=u,ll(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ar(t.containerInfo)}catch(ke){bt(e,e.return,ke)}ed&&(ed=!1,Tm(e));break;case 4:a=$l,$l=Vu(e.stateNode.containerInfo),nl(t,e),ll(e),$l=a;break;case 12:nl(t,e),ll(e);break;case 31:nl(t,e),ll(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 13:nl(t,e),ll(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ou=ut()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 22:u=e.memoizedState!==null;var E=n!==null&&n.memoizedState!==null,G=Ia,ee=un;if(Ia=G||u,un=ee||E,nl(t,e),un=ee,Ia=G,ll(e),a&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(n===null||E||Ia||un||ci(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){E=n=t;try{if(f=E.stateNode,u)p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{v=E.stateNode;var le=E.memoizedProps.style,I=le!=null&&le.hasOwnProperty("display")?le.display:null;v.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(ke){bt(E,E.return,ke)}}}else if(t.tag===6){if(n===null){E=t;try{E.stateNode.nodeValue=u?"":E.memoizedProps}catch(ke){bt(E,E.return,ke)}}}else if(t.tag===18){if(n===null){E=t;try{var Z=E.stateNode;u?gg(Z,!0):gg(E.stateNode,!1)}catch(ke){bt(E,E.return,ke)}}}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,Ru(e,n))));break;case 19:nl(t,e),ll(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ru(e,a)));break;case 30:break;case 21:break;default:nl(t,e),ll(e)}}function ll(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(bm(a)){n=a;break}a=a.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var u=n.stateNode,f=Wf(e);Cu(e,f,u);break;case 5:var p=n.stateNode;n.flags&32&&(U(p,""),n.flags&=-33);var v=Wf(e);Cu(e,v,p);break;case 3:case 4:var E=n.stateNode.containerInfo,G=Wf(e);Pf(e,G,E);break;default:throw Error(r(161))}}catch(ee){bt(e,e.return,ee)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vm(e,t.alternate,t),t=t.sibling}function ci(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ys(4,t,t.return),ci(t);break;case 1:fa(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gm(t,t.return,n),ci(t);break;case 27:pc(t.stateNode);case 26:case 5:fa(t,t.return),ci(t);break;case 22:t.memoizedState===null&&ci(t);break;case 30:ci(t);break;default:ci(t)}e=e.sibling}}function Qa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,u=e,f=t,p=f.flags;switch(f.tag){case 0:case 11:case 15:Qa(u,f,n),ac(4,f);break;case 1:if(Qa(u,f,n),a=f,u=a.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(G){bt(a,a.return,G)}if(a=f,u=a.updateQueue,u!==null){var v=a.stateNode;try{var E=u.shared.hiddenCallbacks;if(E!==null)for(u.shared.hiddenCallbacks=null,u=0;u<E.length;u++)ap(E[u],v)}catch(G){bt(a,a.return,G)}}n&&p&64&&mm(f),sc(f,f.return);break;case 27:xm(f);case 26:case 5:Qa(u,f,n),n&&a===null&&p&4&&ym(f),sc(f,f.return);break;case 12:Qa(u,f,n);break;case 31:Qa(u,f,n),n&&p&4&&wm(u,f);break;case 13:Qa(u,f,n),n&&p&4&&jm(u,f);break;case 22:f.memoizedState===null&&Qa(u,f,n),sc(f,f.return);break;case 30:break;default:Qa(u,f,n)}t=t.sibling}}function td(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&&Vr(n))}function nd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vr(e))}function Zl(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Em(e,t,n,a),t=t.sibling}function Em(e,t,n,a){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Zl(e,t,n,a),u&2048&&ac(9,t);break;case 1:Zl(e,t,n,a);break;case 3:Zl(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&&Vr(e)));break;case 12:if(u&2048){Zl(e,t,n,a),e=t.stateNode;try{var f=t.memoizedProps,p=f.id,v=f.onPostCommit;typeof v=="function"&&v(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){bt(t,t.return,E)}}else Zl(e,t,n,a);break;case 31:Zl(e,t,n,a);break;case 13:Zl(e,t,n,a);break;case 23:break;case 22:f=t.stateNode,p=t.alternate,t.memoizedState!==null?f._visibility&2?Zl(e,t,n,a):ic(e,t):f._visibility&2?Zl(e,t,n,a):(f._visibility|=2,$i(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),u&2048&&td(p,t);break;case 24:Zl(e,t,n,a),u&2048&&nd(t.alternate,t);break;default:Zl(e,t,n,a)}}function $i(e,t,n,a,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,p=t,v=n,E=a,G=p.flags;switch(p.tag){case 0:case 11:case 15:$i(f,p,v,E,u),ac(8,p);break;case 23:break;case 22:var ee=p.stateNode;p.memoizedState!==null?ee._visibility&2?$i(f,p,v,E,u):ic(f,p):(ee._visibility|=2,$i(f,p,v,E,u)),u&&G&2048&&td(p.alternate,p);break;case 24:$i(f,p,v,E,u),u&&G&2048&&nd(p.alternate,p);break;default:$i(f,p,v,E,u)}t=t.sibling}}function ic(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:ic(n,a),u&2048&&td(a.alternate,a);break;case 24:ic(n,a),u&2048&&nd(a.alternate,a);break;default:ic(n,a)}t=t.sibling}}var rc=8192;function Zi(e,t,n){if(e.subtreeFlags&rc)for(e=e.child;e!==null;)Am(e,t,n),e=e.sibling}function Am(e,t,n){switch(e.tag){case 26:Zi(e,t,n),e.flags&rc&&e.memoizedState!==null&&mx(n,$l,e.memoizedState,e.memoizedProps);break;case 5:Zi(e,t,n);break;case 3:case 4:var a=$l;$l=Vu(e.stateNode.containerInfo),Zi(e,t,n),$l=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=rc,rc=16777216,Zi(e,t,n),rc=a):Zi(e,t,n));break;default:Zi(e,t,n)}}function Cm(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 cc(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];wn=a,Mm(a,e)}Cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rm(e),e=e.sibling}function Rm(e){switch(e.tag){case 0:case 11:case 15:cc(e),e.flags&2048&&ys(9,e,e.return);break;case 3:cc(e);break;case 12:cc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mu(e)):cc(e);break;default:cc(e)}}function Mu(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];wn=a,Mm(a,e)}Cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ys(8,t,t.return),Mu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Mu(t));break;default:Mu(t)}e=e.sibling}}function Mm(e,t){for(;wn!==null;){var n=wn;switch(n.tag){case 0:case 11:case 15:ys(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:Vr(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,wn=a;else e:for(n=e;wn!==null;){a=wn;var u=a.sibling,f=a.return;if(Sm(a),a===n){wn=null;break e}if(u!==null){u.return=f,wn=u;break e}wn=f}}}var C0={getCacheForType:function(e){var t=Mn(sn),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Mn(sn).controller.signal}},R0=typeof WeakMap=="function"?WeakMap:Map,ot=0,jt=null,We=null,et=0,yt=0,_l=null,bs=!1,Ki=!1,ld=!1,$a=0,Wt=0,xs=0,ui=0,ad=0,vl=0,Ji=0,uc=null,al=null,sd=!1,Ou=0,Om=0,Du=1/0,zu=null,_s=null,bn=0,vs=null,Fi=null,Za=0,id=0,rd=null,Dm=null,oc=0,cd=null;function Sl(){return(ot&2)!==0&&et!==0?et&-et:z.T!==null?pd():ja()}function zm(){if(vl===0)if((et&536870912)===0||nt){var e=Me;Me<<=1,(Me&3932160)===0&&(Me=262144),vl=e}else vl=536870912;return e=bl.current,e!==null&&(e.flags|=32),vl}function sl(e,t,n){(e===jt&&(yt===2||yt===9)||e.cancelPendingCommit!==null)&&(Wi(e,0),Ss(e,et,vl,!1)),wl(e,n),((ot&2)===0||e!==jt)&&(e===jt&&((ot&2)===0&&(ui|=n),Wt===4&&Ss(e,et,vl,!1)),da(e))}function Lm(e,t,n){if((ot&6)!==0)throw Error(r(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Yn(e,t),u=a?D0(e,t):od(e,t,!0),f=a;do{if(u===0){Ki&&!a&&Ss(e,t,0,!1);break}else{if(n=e.current.alternate,f&&!M0(n)){u=od(e,t,!1),f=!1;continue}if(u===2){if(f=t,e.errorRecoveryDisabledLanes&f)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var v=e;u=uc;var E=v.current.memoizedState.isDehydrated;if(E&&(Wi(v,p).flags|=256),p=od(v,p,!1),p!==2){if(ld&&!E){v.errorRecoveryDisabledLanes|=f,ui|=f,u=4;break e}f=al,al=u,f!==null&&(al===null?al=f:al.push.apply(al,f))}u=p}if(f=!1,u!==2)continue}}if(u===1){Wi(e,0),Ss(e,t,0,!0);break}e:{switch(a=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ss(a,t,vl,!bs);break e;case 2:al=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(u=Ou+300-ut(),10<u)){if(Ss(a,t,vl,!bs),Hl(a,0,!0)!==0)break e;Za=t,a.timeoutHandle=hg(Um.bind(null,a,n,al,zu,sd,t,vl,ui,Ji,bs,f,"Throttled",-0,0),u);break e}Um(a,n,al,zu,sd,t,vl,ui,Ji,bs,f,null,-0,0)}}break}while(!0);da(e)}function Um(e,t,n,a,u,f,p,v,E,G,ee,le,I,Z){if(e.timeoutHandle=-1,le=t.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gt},Am(t,f,le);var ke=(f&62914560)===f?Ou-ut():(f&4194048)===f?Om-ut():0;if(ke=gx(le,ke),ke!==null){Za=f,e.cancelPendingCommit=ke(Vm.bind(null,e,t,f,n,a,u,p,v,E,ee,le,null,I,Z)),Ss(e,f,p,!G);return}}Vm(e,t,f,n,a,u,p,v,E)}function M0(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(!Zn(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 Ss(e,t,n,a){t&=~ad,t&=~ui,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var u=t;0<u;){var f=31-pt(u),p=1<<f;a[f]=-1,u&=~p}n!==0&&wa(e,n,t)}function Lu(){return(ot&6)===0?(fc(0),!1):!0}function ud(){if(We!==null){if(yt===0)var e=We.return;else e=We,Ua=ei=null,jf(e),Yi=null,$r=0,e=We;for(;e!==null;)pm(e.alternate,e),e=e.return;We=null}}function Wi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,W0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Za=0,ud(),jt=e,We=n=za(e.current,null),et=t,yt=0,_l=null,bs=!1,Ki=Yn(e,t),ld=!1,Ji=vl=ad=ui=xs=Wt=0,al=uc=null,sd=!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-pt(a),f=1<<u;t|=e[u],a&=~f}return $a=t,Be(),n}function Hm(e,t){Ve=null,z.H=tc,t===Gi||t===fu?(t=ep(),yt=3):t===hf?(t=ep(),yt=4):yt=t===Gf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_l=t,We===null&&(Wt=1,ju(e,Al(t,e.current)))}function Bm(){var e=bl.current;return e===null?!0:(et&4194048)===et?Ol===null:(et&62914560)===et||(et&536870912)!==0?e===Ol:!1}function qm(){var e=z.H;return z.H=tc,e===null?tc:e}function Gm(){var e=z.A;return z.A=C0,e}function Uu(){Wt=4,bs||(et&4194048)!==et&&bl.current!==null||(Ki=!0),(xs&134217727)===0&&(ui&134217727)===0||jt===null||Ss(jt,et,vl,!1)}function od(e,t,n){var a=ot;ot|=2;var u=qm(),f=Gm();(jt!==e||et!==t)&&(zu=null,Wi(e,t)),t=!1;var p=Wt;e:do try{if(yt!==0&&We!==null){var v=We,E=_l;switch(yt){case 8:ud(),p=6;break e;case 3:case 2:case 9:case 6:bl.current===null&&(t=!0);var G=yt;if(yt=0,_l=null,Pi(e,v,E,G),n&&Ki){p=0;break e}break;default:G=yt,yt=0,_l=null,Pi(e,v,E,G)}}O0(),p=Wt;break}catch(ee){Hm(e,ee)}while(!0);return t&&e.shellSuspendCounter++,Ua=ei=null,ot=a,z.H=u,z.A=f,We===null&&(jt=null,et=0,Be()),p}function O0(){for(;We!==null;)Ym(We)}function D0(e,t){var n=ot;ot|=2;var a=qm(),u=Gm();jt!==e||et!==t?(zu=null,Du=ut()+500,Wi(e,t)):Ki=Yn(e,t);e:do try{if(yt!==0&&We!==null){t=We;var f=_l;t:switch(yt){case 1:yt=0,_l=null,Pi(e,t,f,1);break;case 2:case 9:if(Wh(f)){yt=0,_l=null,Im(t);break}t=function(){yt!==2&&yt!==9||jt!==e||(yt=7),da(e)},f.then(t,t);break e;case 3:yt=7;break e;case 4:yt=5;break e;case 7:Wh(f)?(yt=0,_l=null,Im(t)):(yt=0,_l=null,Pi(e,t,f,7));break;case 5:var p=null;switch(We.tag){case 26:p=We.memoizedState;case 5:case 27:var v=We;if(p?Eg(p):v.stateNode.complete){yt=0,_l=null;var E=v.sibling;if(E!==null)We=E;else{var G=v.return;G!==null?(We=G,Hu(G)):We=null}break t}}yt=0,_l=null,Pi(e,t,f,5);break;case 6:yt=0,_l=null,Pi(e,t,f,6);break;case 8:ud(),Wt=6;break e;default:throw Error(r(462))}}z0();break}catch(ee){Hm(e,ee)}while(!0);return Ua=ei=null,z.H=a,z.A=u,ot=n,We!==null?0:(jt=null,et=0,Be(),Wt)}function z0(){for(;We!==null&&!Un();)Ym(We)}function Ym(e){var t=dm(e.alternate,e,$a);e.memoizedProps=e.pendingProps,t===null?Hu(e):We=t}function Im(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=im(n,t,t.pendingProps,t.type,void 0,et);break;case 11:t=im(n,t,t.pendingProps,t.type.render,t.ref,et);break;case 5:jf(t);default:pm(n,t),t=We=Gh(t,$a),t=dm(n,t,$a)}e.memoizedProps=e.pendingProps,t===null?Hu(e):We=t}function Pi(e,t,n,a){Ua=ei=null,jf(t),Yi=null,$r=0;var u=t.return;try{if(k0(e,u,t,n,et)){Wt=1,ju(e,Al(n,e.current)),We=null;return}}catch(f){if(u!==null)throw We=u,f;Wt=1,ju(e,Al(n,e.current)),We=null;return}t.flags&32768?(nt||a===1?e=!0:Ki||(et&536870912)!==0?e=!1:(bs=e=!0,(a===2||a===9||a===3||a===6)&&(a=bl.current,a!==null&&a.tag===13&&(a.flags|=16384))),Xm(t,e)):Hu(t)}function Hu(e){var t=e;do{if((t.flags&32768)!==0){Xm(t,bs);return}e=t.return;var n=N0(t.alternate,t,$a);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Wt===0&&(Wt=5)}function Xm(e,t){do{var n=T0(e.alternate,e);if(n!==null){n.flags&=32767,We=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){We=e;return}We=e=n}while(e!==null);Wt=6,We=null}function Vm(e,t,n,a,u,f,p,v,E){e.cancelPendingCommit=null;do Bu();while(bn!==0);if((ot&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(f=t.lanes|t.childLanes,f|=Ce,ka(e,n,f,p,v,E),e===jt&&(We=jt=null,et=0),Fi=t,vs=e,Za=n,id=f,rd=u,Dm=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,B0(Te,function(){return Jm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,u=P.p,P.p=2,p=ot,ot|=4;try{E0(e,t,n)}finally{ot=p,P.p=u,z.T=a}}bn=1,Qm(),$m(),Zm()}}function Qm(){if(bn===1){bn=0;var e=vs,t=Fi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=z.T,z.T=null;var a=P.p;P.p=2;var u=ot;ot|=4;try{Nm(t,e);var f=Sd,p=Vl(e.containerInfo),v=f.focusedElem,E=f.selectionRange;if(p!==v&&v&&v.ownerDocument&&El(v.ownerDocument.documentElement,v)){if(E!==null&&Js(v)){var G=E.start,ee=E.end;if(ee===void 0&&(ee=G),"selectionStart"in v)v.selectionStart=G,v.selectionEnd=Math.min(ee,v.value.length);else{var le=v.ownerDocument||document,I=le&&le.defaultView||window;if(I.getSelection){var Z=I.getSelection(),ke=v.textContent.length,Le=Math.min(E.start,ke),St=E.end===void 0?Le:Math.min(E.end,ke);!Z.extend&&Le>St&&(p=St,St=Le,Le=p);var D=Ks(v,Le),R=Ks(v,St);if(D&&R&&(Z.rangeCount!==1||Z.anchorNode!==D.node||Z.anchorOffset!==D.offset||Z.focusNode!==R.node||Z.focusOffset!==R.offset)){var q=le.createRange();q.setStart(D.node,D.offset),Z.removeAllRanges(),Le>St?(Z.addRange(q),Z.extend(R.node,R.offset)):(q.setEnd(R.node,R.offset),Z.addRange(q))}}}}for(le=[],Z=v;Z=Z.parentNode;)Z.nodeType===1&&le.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<le.length;v++){var ne=le[v];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}Fu=!!vd,Sd=vd=null}finally{ot=u,P.p=a,z.T=n}}e.current=t,bn=2}}function $m(){if(bn===2){bn=0;var e=vs,t=Fi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=z.T,z.T=null;var a=P.p;P.p=2;var u=ot;ot|=4;try{vm(e,t.alternate,t)}finally{ot=u,P.p=a,z.T=n}}bn=3}}function Zm(){if(bn===4||bn===3){bn=0,Jt();var e=vs,t=Fi,n=Za,a=Dm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?bn=5:(bn=0,Fi=vs=null,Km(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(_s=null),ql(n),t=t.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(tn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=z.T,u=P.p,P.p=2,z.T=null;try{for(var f=e.onRecoverableError,p=0;p<a.length;p++){var v=a[p];f(v.value,{componentStack:v.stack})}}finally{z.T=t,P.p=u}}(Za&3)!==0&&Bu(),da(e),u=e.pendingLanes,(n&261930)!==0&&(u&42)!==0?e===cd?oc++:(oc=0,cd=e):oc=0,fc(0)}}function Km(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vr(t)))}function Bu(){return Qm(),$m(),Zm(),Jm()}function Jm(){if(bn!==5)return!1;var e=vs,t=id;id=0;var n=ql(Za),a=z.T,u=P.p;try{P.p=32>n?32:n,z.T=null,n=rd,rd=null;var f=vs,p=Za;if(bn=0,Fi=vs=null,Za=0,(ot&6)!==0)throw Error(r(331));var v=ot;if(ot|=4,Rm(f.current),Em(f,f.current,p,n),ot=v,fc(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(tn,f)}catch{}return!0}finally{P.p=u,z.T=a,Km(e,t)}}function Fm(e,t,n){t=Al(n,t),t=qf(e.stateNode,t,2),e=ps(e,t,2),e!==null&&(wl(e,2),da(e))}function bt(e,t,n){if(e.tag===3)Fm(e,e,n);else for(;t!==null;){if(t.tag===3){Fm(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_s===null||!_s.has(a))){e=Al(n,e),n=Wp(2),a=ps(t,n,2),a!==null&&(Pp(n,a,t,e),wl(a,2),da(a));break}}t=t.return}}function fd(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new R0;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)||(ld=!0,u.add(n),e=L0.bind(null,e,t,n),t.then(e,e))}function L0(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,jt===e&&(et&n)===n&&(Wt===4||Wt===3&&(et&62914560)===et&&300>ut()-Ou?(ot&2)===0&&Wi(e,0):ad|=n,Ji===et&&(Ji=0)),da(e)}function Wm(e,t){t===0&&(t=pn()),e=Qt(e,t),e!==null&&(wl(e,t),da(e))}function U0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wm(e,n)}function H0(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(r(314))}a!==null&&a.delete(t),Wm(e,n)}function B0(e,t){return xn(e,t)}var qu=null,er=null,dd=!1,Gu=!1,hd=!1,ks=0;function da(e){e!==er&&e.next===null&&(er===null?qu=er=e:er=er.next=e),Gu=!0,dd||(dd=!0,G0())}function fc(e,t){if(!hd&&Gu){hd=!0;do for(var n=!1,a=qu;a!==null;){if(e!==0){var u=a.pendingLanes;if(u===0)var f=0;else{var p=a.suspendedLanes,v=a.pingedLanes;f=(1<<31-pt(42|e)+1)-1,f&=u&~(p&~v),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(n=!0,ng(a,f))}else f=et,f=Hl(a,a===jt?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(f&3)===0||Yn(a,f)||(n=!0,ng(a,f));a=a.next}while(n);hd=!1}}function q0(){Pm()}function Pm(){Gu=dd=!1;var e=0;ks!==0&&F0()&&(e=ks);for(var t=ut(),n=null,a=qu;a!==null;){var u=a.next,f=eg(a,t);f===0?(a.next=null,n===null?qu=u:n.next=u,u===null&&(er=n)):(n=a,(e!==0||(f&3)!==0)&&(Gu=!0)),a=u}bn!==0&&bn!==5||fc(e),ks!==0&&(ks=0)}function eg(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var p=31-pt(f),v=1<<p,E=u[p];E===-1?((v&n)===0||(v&a)!==0)&&(u[p]=Hn(v,t)):E<=t&&(e.expiredLanes|=v),f&=~v}if(t=jt,n=et,n=Hl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(yt===2||yt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&dn(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Yn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&dn(a),ql(n)){case 2:case 8:n=fe;break;case 32:n=Te;break;case 268435456:n=Nt;break;default:n=Te}return a=tg.bind(null,e),n=xn(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&dn(a),e.callbackPriority=2,e.callbackNode=null,2}function tg(e,t){if(bn!==0&&bn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var a=et;return a=Hl(e,e===jt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Lm(e,a,t),eg(e,ut()),e.callbackNode!=null&&e.callbackNode===n?tg.bind(null,e):null)}function ng(e,t){if(Bu())return null;Lm(e,t,!0)}function G0(){P0(function(){(ot&6)!==0?xn(J,q0):Pm()})}function pd(){if(ks===0){var e=Bi;e===0&&(e=xe,xe<<=1,(xe&261888)===0&&(xe=256)),ks=e}return ks}function lg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:yn(""+e)}function ag(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 Y0(e,t,n,a,u){if(t==="submit"&&n&&n.stateNode===u){var f=lg((u[Ge]||null).action),p=a.submitter;p&&(t=(t=p[Ge]||null)?lg(t.formAction):p.getAttribute("formAction"),t!==null&&(f=t,p=null));var v=new $s("action","action",null,a,u);e.push({event:v,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ks!==0){var E=p?ag(u,p):new FormData(u);Df(n,{pending:!0,data:E,method:u.method,action:f},null,E)}}else typeof f=="function"&&(v.preventDefault(),E=p?ag(u,p):new FormData(u),Df(n,{pending:!0,data:E,method:u.method,action:f},f,E))},currentTarget:u}]})}}for(var md=0;md<de.length;md++){var gd=de[md],I0=gd.toLowerCase(),X0=gd[0].toUpperCase()+gd.slice(1);De(I0,"on"+X0)}De(Br,"onAnimationEnd"),De(qr,"onAnimationIteration"),De(Gr,"onAnimationStart"),De("dblclick","onDoubleClick"),De("focusin","onFocus"),De("focusout","onBlur"),De(Yr,"onTransitionRun"),De(au,"onTransitionStart"),De(su,"onTransitionCancel"),De(y,"onTransitionEnd"),hl("onMouseEnter",["mouseout","mouseover"]),hl("onMouseLeave",["mouseout","mouseover"]),hl("onPointerEnter",["pointerout","pointerover"]),hl("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dc="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(" "),V0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(dc));function sg(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 p=a.length-1;0<=p;p--){var v=a[p],E=v.instance,G=v.currentTarget;if(v=v.listener,E!==f&&u.isPropagationStopped())break e;f=v,u.currentTarget=G;try{f(u)}catch(ee){Dt(ee)}u.currentTarget=null,f=E}else for(p=0;p<a.length;p++){if(v=a[p],E=v.instance,G=v.currentTarget,v=v.listener,E!==f&&u.isPropagationStopped())break e;f=v,u.currentTarget=G;try{f(u)}catch(ee){Dt(ee)}u.currentTarget=null,f=E}}}}function Pe(e,t){var n=t[ea];n===void 0&&(n=t[ea]=new Set);var a=e+"__bubble";n.has(a)||(ig(t,e,2,!1),n.add(a))}function yd(e,t,n){var a=0;t&&(a|=4),ig(n,e,a,t)}var Yu="_reactListening"+Math.random().toString(36).slice(2);function bd(e){if(!e[Yu]){e[Yu]=!0,Xn.forEach(function(n){n!=="selectionchange"&&(V0.has(n)||yd(n,!1,e),yd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yu]||(t[Yu]=!0,yd("selectionchange",!1,t))}}function ig(e,t,n,a){switch(zg(t)){case 2:var u=xx;break;case 8:u=_x;break;default:u=Od}n=u.bind(null,t,n,e),u=void 0,!Ei||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 xd(e,t,n,a,u){var f=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var p=a.tag;if(p===3||p===4){var v=a.stateNode.containerInfo;if(v===u)break;if(p===4)for(p=a.return;p!==null;){var E=p.tag;if((E===3||E===4)&&p.stateNode.containerInfo===u)return;p=p.return}for(;v!==null;){if(p=ta(v),p===null)return;if(E=p.tag,E===5||E===6||E===26||E===27){a=f=p;continue e}v=v.parentNode}}a=a.return}Ti(function(){var G=f,ee=Xt(n),le=[];e:{var I=X.get(e);if(I!==void 0){var Z=$s,ke=e;switch(e){case"keypress":if(Vs(n)===0)break e;case"keydown":case"keyup":Z=Bc;break;case"focusin":ke="focus",Z=Tr;break;case"focusout":ke="blur",Z=Tr;break;case"beforeblur":case"afterblur":Z=Tr;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":Z=ie;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Nr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=Gc;break;case Br:case qr:case Gr:Z=Se;break;case y:Z=Yo;break;case"scroll":case"scrollend":Z=Ai;break;case"wheel":Z=Rr;break;case"copy":case"cut":case"paste":Z=zo;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=qc;break;case"toggle":case"beforetoggle":Z=Xo}var Le=(t&4)!==0,St=!Le&&(e==="scroll"||e==="scrollend"),D=Le?I!==null?I+"Capture":null:I;Le=[];for(var R=G,q;R!==null;){var ne=R;if(q=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||q===null||D===null||(ne=Is(R,D),ne!=null&&Le.push(hc(R,ne,q))),St)break;R=R.return}0<Le.length&&(I=new Z(I,ke,null,n,ee),le.push({event:I,listeners:Le}))}}if((t&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",I&&n!==Ot&&(ke=n.relatedTarget||n.fromElement)&&(ta(ke)||ke[mn]))break e;if((Z||I)&&(I=ee.window===ee?ee:(I=ee.ownerDocument)?I.defaultView||I.parentWindow:window,Z?(ke=n.relatedTarget||n.toElement,Z=G,ke=ke?ta(ke):null,ke!==null&&(St=d(ke),Le=ke.tag,ke!==St||Le!==5&&Le!==27&&Le!==6)&&(ke=null)):(Z=null,ke=G),Z!==ke)){if(Le=ie,ne="onMouseLeave",D="onMouseEnter",R="mouse",(e==="pointerout"||e==="pointerover")&&(Le=qc,ne="onPointerLeave",D="onPointerEnter",R="pointer"),St=Z==null?I:dl(Z),q=ke==null?I:dl(ke),I=new Le(ne,R+"leave",Z,n,ee),I.target=St,I.relatedTarget=q,ne=null,ta(ee)===G&&(Le=new Le(D,R+"enter",ke,n,ee),Le.target=q,Le.relatedTarget=St,ne=Le),St=ne,Z&&ke)t:{for(Le=Q0,D=Z,R=ke,q=0,ne=D;ne;ne=Le(ne))q++;ne=0;for(var Oe=R;Oe;Oe=Le(Oe))ne++;for(;0<q-ne;)D=Le(D),q--;for(;0<ne-q;)R=Le(R),ne--;for(;q--;){if(D===R||R!==null&&D===R.alternate){Le=D;break t}D=Le(D),R=Le(R)}Le=null}else Le=null;Z!==null&&rg(le,I,Z,Le,!1),ke!==null&&St!==null&&rg(le,St,ke,Le,!0)}}e:{if(I=G?dl(G):window,Z=I.nodeName&&I.nodeName.toLowerCase(),Z==="select"||Z==="input"&&I.type==="file")var rt=Wc;else if(Jc(I))if(Pc)rt=Fo;else{rt=Ko;var Ee=Zo}else Z=I.nodeName,!Z||Z.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?G&&ze(G.elementType)&&(rt=Wc):rt=Jo;if(rt&&(rt=rt(e,G))){Fc(le,rt,n,ee);break e}Ee&&Ee(e,I,G),e==="focusout"&&G&&I.type==="number"&&G.memoizedProps.value!=null&&gl(I,"number",I.value)}switch(Ee=G?dl(G):window,e){case"focusin":(Jc(Ee)||Ee.contentEditable==="true")&&(Ql=Ee,Oi=G,Fs=null);break;case"focusout":Fs=Oi=Ql=null;break;case"mousedown":Oa=!0;break;case"contextmenu":case"mouseup":case"dragend":Oa=!1,Ur(le,n,ee);break;case"selectionchange":if(lu)break;case"keydown":case"keyup":Ur(le,n,ee)}var $e;if(Mr)e:{switch(e){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else as?$c(e,n)&&(tt="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(tt="onCompositionStart");tt&&(Vc&&n.locale!=="ko"&&(as||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&as&&($e=Tl()):(Vt=ee,Sn="value"in Vt?Vt.value:Vt.textContent,as=!0)),Ee=Iu(G,tt),0<Ee.length&&(tt=new Hc(tt,e,null,n,ee),le.push({event:tt,listeners:Ee}),$e?tt.data=$e:($e=Zc(n),$e!==null&&(tt.data=$e)))),($e=Xc?Kc(e,n):Qo(e,n))&&(tt=Iu(G,"onBeforeInput"),0<tt.length&&(Ee=new Hc("onBeforeInput","beforeinput",null,n,ee),le.push({event:Ee,listeners:tt}),Ee.data=$e)),Y0(le,e,G,n,ee)}sg(le,t)})}function hc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Iu(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=Is(e,n),u!=null&&a.unshift(hc(e,u,f)),u=Is(e,t),u!=null&&a.push(hc(e,u,f))),e.tag===3)return a;e=e.return}return[]}function Q0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rg(e,t,n,a,u){for(var f=t._reactName,p=[];n!==null&&n!==a;){var v=n,E=v.alternate,G=v.stateNode;if(v=v.tag,E!==null&&E===a)break;v!==5&&v!==26&&v!==27||G===null||(E=G,u?(G=Is(n,f),G!=null&&p.unshift(hc(n,G,E))):u||(G=Is(n,f),G!=null&&p.push(hc(n,G,E)))),n=n.return}p.length!==0&&e.push({event:t,listeners:p})}var $0=/\r\n?/g,Z0=/\u0000|\uFFFD/g;function cg(e){return(typeof e=="string"?e:""+e).replace($0,`
|
|
50
|
-
`).replace(Z0,"")}function ug(e,t){return t=cg(t),cg(e)===t}function vt(e,t,n,a,u,f){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||U(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&U(e,""+a);break;case"className":ml(e,"class",a);break;case"tabIndex":ml(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(e,n,a);break;case"style":Ae(e,a,f);break;case"data":if(t!=="object"){ml(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=yn(""+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"&&vt(e,t,"name",u.name,u,null),vt(e,t,"formEncType",u.formEncType,u,null),vt(e,t,"formMethod",u.formMethod,u,null),vt(e,t,"formTarget",u.formTarget,u,null)):(vt(e,t,"encType",u.encType,u,null),vt(e,t,"method",u.method,u,null),vt(e,t,"target",u.target,u,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=yn(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=gt);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(r(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=yn(""+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":Pe("beforetoggle",e),Pe("toggle",e),Qn(e,"popover",a);break;case"xlinkActuate":gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":gn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":gn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":gn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":gn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Qn(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=wt.get(n)||n,Qn(e,n,a))}}function _d(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(r(61));if(n=a.__html,n!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof a=="string"?U(e,a):(typeof a=="number"||typeof a=="bigint")&&U(e,""+a);break;case"onScroll":a!=null&&Pe("scroll",e);break;case"onScrollEnd":a!=null&&Pe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=gt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ji.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[Ge]||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,""):Qn(e,n,a)}}}function Dn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Pe("error",e),Pe("load",e);var a=!1,u=!1,f;for(f in n)if(n.hasOwnProperty(f)){var p=n[f];if(p!=null)switch(f){case"src":a=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:vt(e,t,f,p,n,null)}}u&&vt(e,t,"srcSet",n.srcSet,n,null),a&&vt(e,t,"src",n.src,n,null);return;case"input":Pe("invalid",e);var v=f=p=u=null,E=null,G=null;for(a in n)if(n.hasOwnProperty(a)){var ee=n[a];if(ee!=null)switch(a){case"name":u=ee;break;case"type":p=ee;break;case"checked":E=ee;break;case"defaultChecked":G=ee;break;case"value":f=ee;break;case"defaultValue":v=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,t));break;default:vt(e,t,a,ee,n,null)}}sa(e,f,v,E,G,p,u,!1);return;case"select":Pe("invalid",e),a=p=f=null;for(u in n)if(n.hasOwnProperty(u)&&(v=n[u],v!=null))switch(u){case"value":f=v;break;case"defaultValue":p=v;break;case"multiple":a=v;default:vt(e,t,u,v,n,null)}t=f,n=p,e.multiple=!!a,t!=null?Wn(e,!!a,t,!1):n!=null&&Wn(e,!!a,n,!0);return;case"textarea":Pe("invalid",e),f=u=a=null;for(p in n)if(n.hasOwnProperty(p)&&(v=n[p],v!=null))switch(p){case"value":a=v;break;case"defaultValue":u=v;break;case"children":f=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:vt(e,t,p,v,n,null)}w(e,a,u,f);return;case"option":for(E in n)if(n.hasOwnProperty(E)&&(a=n[E],a!=null))switch(E){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:vt(e,t,E,a,n,null)}return;case"dialog":Pe("beforetoggle",e),Pe("toggle",e),Pe("cancel",e),Pe("close",e);break;case"iframe":case"object":Pe("load",e);break;case"video":case"audio":for(a=0;a<dc.length;a++)Pe(dc[a],e);break;case"image":Pe("error",e),Pe("load",e);break;case"details":Pe("toggle",e);break;case"embed":case"source":case"link":Pe("error",e),Pe("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(G in n)if(n.hasOwnProperty(G)&&(a=n[G],a!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:vt(e,t,G,a,n,null)}return;default:if(ze(t)){for(ee in n)n.hasOwnProperty(ee)&&(a=n[ee],a!==void 0&&_d(e,t,ee,a,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(a=n[v],a!=null&&vt(e,t,v,a,n,null))}function K0(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,p=null,v=null,E=null,G=null,ee=null;for(Z in n){var le=n[Z];if(n.hasOwnProperty(Z)&&le!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":E=le;default:a.hasOwnProperty(Z)||vt(e,t,Z,null,a,le)}}for(var I in a){var Z=a[I];if(le=n[I],a.hasOwnProperty(I)&&(Z!=null||le!=null))switch(I){case"type":f=Z;break;case"name":u=Z;break;case"checked":G=Z;break;case"defaultChecked":ee=Z;break;case"value":p=Z;break;case"defaultValue":v=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,t));break;default:Z!==le&&vt(e,t,I,Z,a,le)}}Ys(e,p,v,E,G,ee,f,u);return;case"select":Z=p=v=I=null;for(f in n)if(E=n[f],n.hasOwnProperty(f)&&E!=null)switch(f){case"value":break;case"multiple":Z=E;default:a.hasOwnProperty(f)||vt(e,t,f,null,a,E)}for(u in a)if(f=a[u],E=n[u],a.hasOwnProperty(u)&&(f!=null||E!=null))switch(u){case"value":I=f;break;case"defaultValue":v=f;break;case"multiple":p=f;default:f!==E&&vt(e,t,u,f,a,E)}t=v,n=p,a=Z,I!=null?Wn(e,!!n,I,!1):!!a!=!!n&&(t!=null?Wn(e,!!n,t,!0):Wn(e,!!n,n?[]:"",!1));return;case"textarea":Z=I=null;for(v in n)if(u=n[v],n.hasOwnProperty(v)&&u!=null&&!a.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:vt(e,t,v,null,a,u)}for(p in a)if(u=a[p],f=n[p],a.hasOwnProperty(p)&&(u!=null||f!=null))switch(p){case"value":I=u;break;case"defaultValue":Z=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&vt(e,t,p,u,a,f)}ue(e,I,Z);return;case"option":for(var ke in n)if(I=n[ke],n.hasOwnProperty(ke)&&I!=null&&!a.hasOwnProperty(ke))switch(ke){case"selected":e.selected=!1;break;default:vt(e,t,ke,null,a,I)}for(E in a)if(I=a[E],Z=n[E],a.hasOwnProperty(E)&&I!==Z&&(I!=null||Z!=null))switch(E){case"selected":e.selected=I&&typeof I!="function"&&typeof I!="symbol";break;default:vt(e,t,E,I,a,Z)}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 Le in n)I=n[Le],n.hasOwnProperty(Le)&&I!=null&&!a.hasOwnProperty(Le)&&vt(e,t,Le,null,a,I);for(G in a)if(I=a[G],Z=n[G],a.hasOwnProperty(G)&&I!==Z&&(I!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(r(137,t));break;default:vt(e,t,G,I,a,Z)}return;default:if(ze(t)){for(var St in n)I=n[St],n.hasOwnProperty(St)&&I!==void 0&&!a.hasOwnProperty(St)&&_d(e,t,St,void 0,a,I);for(ee in a)I=a[ee],Z=n[ee],!a.hasOwnProperty(ee)||I===Z||I===void 0&&Z===void 0||_d(e,t,ee,I,a,Z);return}}for(var D in n)I=n[D],n.hasOwnProperty(D)&&I!=null&&!a.hasOwnProperty(D)&&vt(e,t,D,null,a,I);for(le in a)I=a[le],Z=n[le],!a.hasOwnProperty(le)||I===Z||I==null&&Z==null||vt(e,t,le,I,a,Z)}function og(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function J0(){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,p=u.initiatorType,v=u.duration;if(f&&v&&og(p)){for(p=0,v=u.responseEnd,a+=1;a<n.length;a++){var E=n[a],G=E.startTime;if(G>v)break;var ee=E.transferSize,le=E.initiatorType;ee&&og(le)&&(E=E.responseEnd,p+=ee*(E<v?1:(v-G)/(E-G)))}if(--a,t+=8*(f+p)/(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 vd=null,Sd=null;function Xu(e){return e.nodeType===9?e:e.ownerDocument}function fg(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 dg(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 kd(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 wd=null;function F0(){var e=window.event;return e&&e.type==="popstate"?e===wd?!1:(wd=e,!0):(wd=null,!1)}var hg=typeof setTimeout=="function"?setTimeout:void 0,W0=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,P0=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(ex)}:hg;function ex(e){setTimeout(function(){throw e})}function ws(e){return e==="head"}function mg(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),ar(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")pc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,pc(n);for(var f=n.firstChild;f;){var p=f.nextSibling,v=f.nodeName;f[ol]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&f.rel.toLowerCase()==="stylesheet"||n.removeChild(f),f=p}}else n==="body"&&pc(e.ownerDocument.body);n=u}while(n);ar(t)}function gg(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 jd(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":jd(n),fl(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function tx(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[ol])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=Dl(e.nextSibling),e===null)break}return null}function nx(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dl(e.nextSibling),e===null))return null;return e}function yg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Dl(e.nextSibling),e===null))return null;return e}function Nd(e){return e.data==="$?"||e.data==="$~"}function Td(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lx(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 Dl(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 Ed=null;function bg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Dl(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function xg(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 _g(e,t,n){switch(t=Xu(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function pc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);fl(e)}var zl=new Map,vg=new Set;function Vu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ka=P.d;P.d={f:ax,r:sx,D:ix,C:rx,L:cx,m:ux,X:fx,S:ox,M:dx};function ax(){var e=Ka.f(),t=Lu();return e||t}function sx(e){var t=Cn(e);t!==null&&t.tag===5&&t.type==="form"?Hp(t):Ka.r(e)}var tr=typeof document>"u"?null:document;function Sg(e,t,n){var a=tr;if(a&&typeof t=="string"&&t){var u=ln(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),vg.has(u)||(vg.add(u),e={rel:e,crossOrigin:n,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Dn(t,"link",e),mt(t),a.head.appendChild(t)))}}function ix(e){Ka.D(e),Sg("dns-prefetch",e,null)}function rx(e,t){Ka.C(e,t),Sg("preconnect",e,t)}function cx(e,t,n){Ka.L(e,t,n);var a=tr;if(a&&e&&t){var u='link[rel="preload"][as="'+ln(t)+'"]';t==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+ln(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+ln(n.imageSizes)+'"]')):u+='[href="'+ln(e)+'"]';var f=u;switch(t){case"style":f=nr(e);break;case"script":f=lr(e)}zl.has(f)||(e=k({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zl.set(f,e),a.querySelector(u)!==null||t==="style"&&a.querySelector(mc(f))||t==="script"&&a.querySelector(gc(f))||(t=a.createElement("link"),Dn(t,"link",e),mt(t),a.head.appendChild(t)))}}function ux(e,t){Ka.m(e,t);var n=tr;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+ln(a)+'"][href="'+ln(e)+'"]',f=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=lr(e)}if(!zl.has(f)&&(e=k({rel:"modulepreload",href:e},t),zl.set(f,e),n.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gc(f)))return}a=n.createElement("link"),Dn(a,"link",e),mt(a),n.head.appendChild(a)}}}function ox(e,t,n){Ka.S(e,t,n);var a=tr;if(a&&e){var u=nn(a).hoistableStyles,f=nr(e);t=t||"default";var p=u.get(f);if(!p){var v={loading:0,preload:null};if(p=a.querySelector(mc(f)))v.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zl.get(f))&&Ad(e,n);var E=p=a.createElement("link");mt(E),Dn(E,"link",e),E._p=new Promise(function(G,ee){E.onload=G,E.onerror=ee}),E.addEventListener("load",function(){v.loading|=1}),E.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Qu(p,t,a)}p={type:"stylesheet",instance:p,count:1,state:v},u.set(f,p)}}}function fx(e,t){Ka.X(e,t);var n=tr;if(n&&e){var a=nn(n).hoistableScripts,u=lr(e),f=a.get(u);f||(f=n.querySelector(gc(u)),f||(e=k({src:e,async:!0},t),(t=zl.get(u))&&Cd(e,t),f=n.createElement("script"),mt(f),Dn(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function dx(e,t){Ka.M(e,t);var n=tr;if(n&&e){var a=nn(n).hoistableScripts,u=lr(e),f=a.get(u);f||(f=n.querySelector(gc(u)),f||(e=k({src:e,async:!0,type:"module"},t),(t=zl.get(u))&&Cd(e,t),f=n.createElement("script"),mt(f),Dn(f,"link",e),n.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(u,f))}}function kg(e,t,n,a){var u=(u=Ne.current)?Vu(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=nr(n.href),n=nn(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=nr(n.href);var f=nn(u).hoistableStyles,p=f.get(e);if(p||(u=u.ownerDocument||u,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,p),(f=u.querySelector(mc(e)))&&!f._p&&(p.instance=f,p.state.loading=5),zl.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},zl.set(e,n),f||hx(u,e,n,p.state))),t&&a===null)throw Error(r(528,""));return p}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=lr(n),n=nn(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(r(444,e))}}function nr(e){return'href="'+ln(e)+'"'}function mc(e){return'link[rel="stylesheet"]['+e+"]"}function wg(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function hx(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}),Dn(t,"link",n),mt(t),e.head.appendChild(t))}function lr(e){return'[src="'+ln(e)+'"]'}function gc(e){return"script[async]"+e}function jg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+ln(n.href)+'"]');if(a)return t.instance=a,mt(a),a;var u=k({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),mt(a),Dn(a,"style",u),Qu(a,n.precedence,e),t.instance=a;case"stylesheet":u=nr(n.href);var f=e.querySelector(mc(u));if(f)return t.state.loading|=4,t.instance=f,mt(f),f;a=wg(n),(u=zl.get(u))&&Ad(a,u),f=(e.ownerDocument||e).createElement("link"),mt(f);var p=f;return p._p=new Promise(function(v,E){p.onload=v,p.onerror=E}),Dn(f,"link",a),t.state.loading|=4,Qu(f,n.precedence,e),t.instance=f;case"script":return f=lr(n.src),(u=e.querySelector(gc(f)))?(t.instance=u,mt(u),u):(a=n,(u=zl.get(f))&&(a=k({},n),Cd(a,u)),e=e.ownerDocument||e,u=e.createElement("script"),mt(u),Dn(u,"link",a),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Qu(a,n.precedence,e));return t.instance}function Qu(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,p=0;p<a.length;p++){var v=a[p];if(v.dataset.precedence===t)f=v;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 Ad(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Cd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $u=null;function Ng(e,t,n){if($u===null){var a=new Map,u=$u=new Map;u.set(n,a)}else u=$u,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[ol]||f[Mt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var p=f.getAttribute(t)||"";p=e+p;var v=a.get(p);v?v.push(f):a.set(p,[f])}}return a}function Tg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function px(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 Eg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function mx(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=nr(a.href),f=t.querySelector(mc(u));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=f,mt(f);return}f=t.ownerDocument||t,a=wg(a),(u=zl.get(u))&&Ad(a,u),f=f.createElement("link"),mt(f);var p=f;p._p=new Promise(function(v,E){p.onload=v,p.onerror=E}),Dn(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=Zu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Rd=0;function gx(e,t){return e.stylesheets&&e.count===0&&Ju(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Ju(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Rd===0&&(Rd=62500*J0());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ju(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Rd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function Zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ju(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ku=null;function Ju(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ku=new Map,t.forEach(yx,e),Ku=null,Zu.call(e))}function yx(e,t){if(!(t.state.loading&4)){var n=Ku.get(e);if(n)var a=n.get(null);else{n=new Map,Ku.set(e,n);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var p=u[f];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(n.set(p.dataset.precedence,p),a=p)}a&&n.set(null,a)}u=t.instance,p=u.getAttribute("data-precedence"),f=n.get(p)||a,f===a&&n.set(null,u),n.set(p,u),this.count++,a=Zu.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 yc={$$typeof:$,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function bx(e,t,n,a,u,f,p,v,E){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=Yt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yt(0),this.hiddenUpdates=Yt(null),this.identifierPrefix=a,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function Ag(e,t,n,a,u,f,p,v,E,G,ee,le){return e=new bx(e,t,n,p,E,G,ee,le,v),t=1,f===!0&&(t|=24),f=yl(3,null,null,t),e.current=f,f.stateNode=e,t=of(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:a,isDehydrated:n,cache:t},pf(f),e}function Cg(e){return e?(e=Di,e):Di}function Rg(e,t,n,a,u,f){u=Cg(u),a.context===null?a.context=u:a.pendingContext=u,a=hs(t),a.payload={element:n},f=f===void 0?null:f,f!==null&&(a.callback=f),n=ps(e,a,t),n!==null&&(sl(n,e,t),Kr(n,e,t))}function Mg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Md(e,t){Mg(e,t),(e=e.alternate)&&Mg(e,t)}function Og(e){if(e.tag===13||e.tag===31){var t=Qt(e,67108864);t!==null&&sl(t,e,67108864),Md(e,67108864)}}function Dg(e){if(e.tag===13||e.tag===31){var t=Sl();t=Pa(t);var n=Qt(e,t);n!==null&&sl(n,e,t),Md(e,t)}}var Fu=!0;function xx(e,t,n,a){var u=z.T;z.T=null;var f=P.p;try{P.p=2,Od(e,t,n,a)}finally{P.p=f,z.T=u}}function _x(e,t,n,a){var u=z.T;z.T=null;var f=P.p;try{P.p=8,Od(e,t,n,a)}finally{P.p=f,z.T=u}}function Od(e,t,n,a){if(Fu){var u=Dd(a);if(u===null)xd(e,t,a,Wu,n),Lg(e,a);else if(Sx(u,e,t,n,a))a.stopPropagation();else if(Lg(e,a),t&4&&-1<vx.indexOf(e)){for(;u!==null;){var f=Cn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var p=An(f.pendingLanes);if(p!==0){var v=f;for(v.pendingLanes|=2,v.entangledLanes|=2;p;){var E=1<<31-pt(p);v.entanglements[1]|=E,p&=~E}da(f),(ot&6)===0&&(Du=ut()+500,fc(0))}}break;case 31:case 13:v=Qt(f,2),v!==null&&sl(v,f,2),Lu(),Md(f,2)}if(f=Dd(a),f===null&&xd(e,t,a,Wu,n),f===u)break;u=f}u!==null&&a.stopPropagation()}else xd(e,t,a,null,n)}}function Dd(e){return e=Xt(e),zd(e)}var Wu=null;function zd(e){if(Wu=null,e=ta(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=g(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 Wu=e,null}function zg(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(hn()){case J:return 2;case fe:return 8;case Te:case Qe:return 32;case Nt:return 268435456;default:return 32}default:return 32}}var Ld=!1,js=null,Ns=null,Ts=null,bc=new Map,xc=new Map,Es=[],vx="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 Lg(e,t){switch(e){case"focusin":case"focusout":js=null;break;case"dragenter":case"dragleave":Ns=null;break;case"mouseover":case"mouseout":Ts=null;break;case"pointerover":case"pointerout":bc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xc.delete(t.pointerId)}}function _c(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=Cn(t),t!==null&&Og(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Sx(e,t,n,a,u){switch(t){case"focusin":return js=_c(js,e,t,n,a,u),!0;case"dragenter":return Ns=_c(Ns,e,t,n,a,u),!0;case"mouseover":return Ts=_c(Ts,e,t,n,a,u),!0;case"pointerover":var f=u.pointerId;return bc.set(f,_c(bc.get(f)||null,e,t,n,a,u)),!0;case"gotpointercapture":return f=u.pointerId,xc.set(f,_c(xc.get(f)||null,e,t,n,a,u)),!0}return!1}function Ug(e){var t=ta(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,cl(e.priority,function(){Dg(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,cl(e.priority,function(){Dg(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 Pu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Ot=a,n.target.dispatchEvent(a),Ot=null}else return t=Cn(n),t!==null&&Og(t),e.blockedOn=n,!1;t.shift()}return!0}function Hg(e,t,n){Pu(e)&&n.delete(t)}function kx(){Ld=!1,js!==null&&Pu(js)&&(js=null),Ns!==null&&Pu(Ns)&&(Ns=null),Ts!==null&&Pu(Ts)&&(Ts=null),bc.forEach(Hg),xc.forEach(Hg)}function eo(e,t){e.blockedOn===t&&(e.blockedOn=null,Ld||(Ld=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,kx)))}var to=null;function Bg(e){to!==e&&(to=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){to===e&&(to=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(zd(a||n)===null)continue;break}var f=Cn(n);f!==null&&(e.splice(t,3),t-=3,Df(f,{pending:!0,data:u,method:n.method,action:a},a,u))}}))}function ar(e){function t(E){return eo(E,e)}js!==null&&eo(js,e),Ns!==null&&eo(Ns,e),Ts!==null&&eo(Ts,e),bc.forEach(t),xc.forEach(t);for(var n=0;n<Es.length;n++){var a=Es[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Es.length&&(n=Es[0],n.blockedOn===null);)Ug(n),n.blockedOn===null&&Es.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],p=u[Ge]||null;if(typeof f=="function")p||Bg(n);else if(p){var v=null;if(f&&f.hasAttribute("formAction")){if(u=f,p=f[Ge]||null)v=p.formAction;else if(zd(u)!==null)continue}else v=p.action;typeof v=="function"?n[a+1]=v:(n.splice(a,3),a-=3),Bg(n)}}}function qg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(p){return u=p})},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 Ud(e){this._internalRoot=e}no.prototype.render=Ud.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,a=Sl();Rg(n,a,e,t,null,null)},no.prototype.unmount=Ud.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rg(e.current,2,null,e,null,null),Lu(),t[mn]=null}};function no(e){this._internalRoot=e}no.prototype.unstable_scheduleHydration=function(e){if(e){var t=ja();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Es.length&&t!==0&&t<Es[n].priority;n++);Es.splice(n,0,e),n===0&&Ug(e)}};var Gg=l.version;if(Gg!=="19.2.8")throw Error(r(527,Gg,"19.2.8"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=b(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var wx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lo.isDisabled&&lo.supportsFiber)try{tn=lo.inject(wx),Gt=lo}catch{}}return Sc.createRoot=function(e,t){if(!o(e))throw Error(r(299));var n=!1,a="",u=Zp,f=Kp,p=Jp;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&&(p=t.onRecoverableError)),t=Ag(e,1,!1,null,null,n,a,null,u,f,p,qg),e[mn]=t.current,bd(e),new Ud(t)},Sc.hydrateRoot=function(e,t,n){if(!o(e))throw Error(r(299));var a=!1,u="",f=Zp,p=Kp,v=Jp,E=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&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(E=n.formState)),t=Ag(e,1,!0,t,n??null,a,u,E,f,p,v,qg),t.context=Cg(null),n=t.current,a=Sl(),a=Pa(a),u=hs(a),u.callback=null,ps(n,u,a),n=a,t.current.lanes=n,wl(t,n),da(t),e[mn]=t.current,bd(e),new no(t)},Sc.version="19.2.8",Sc}var Wg;function Lx(){if(Wg)return Gd.exports;Wg=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(),Gd.exports=zx(),Gd.exports}var Ux=Lx();const db=1;var Wa,mr,gr,yr,br,zc,xr,Co,hb;class Hx{constructor(l){Kt(this,Co);Kt(this,Wa,null);Kt(this,mr,new Set);Kt(this,gr,500);Kt(this,yr,null);Kt(this,br,!1);Kt(this,zc,null);Kt(this,xr,null);this.url=l}get statusText(){return this.connected?"Хост на связи":"Нет связи с хостом"}onStatus(l){ft(this,xr,l)}connect(){if(He(this,br))return;const l=new WebSocket(this.url);ft(this,Wa,l),l.addEventListener("open",()=>{var i,r;ft(this,gr,500),this.send({type:"hello",protocol:db,clientName:"ccv-web"}),(i=He(this,zc))==null||i.call(this),(r=He(this,xr))==null||r.call(this)}),l.addEventListener("message",i=>{let r;try{r=JSON.parse(String(i.data))}catch{return}for(const o of He(this,mr))o(r)}),l.addEventListener("close",()=>{var i;ft(this,Wa,null),(i=He(this,xr))==null||i.call(this),on(this,Co,hb).call(this)}),l.addEventListener("error",()=>l.close())}onReconnect(l){ft(this,zc,l)}on(l){return He(this,mr).add(l),()=>He(this,mr).delete(l)}send(l){var i;((i=He(this,Wa))==null?void 0:i.readyState)===WebSocket.OPEN&&He(this,Wa).send(JSON.stringify(l))}get connected(){var l;return((l=He(this,Wa))==null?void 0:l.readyState)===WebSocket.OPEN}close(){var l;ft(this,br,!0),(l=He(this,Wa))==null||l.close()}}Wa=new WeakMap,mr=new WeakMap,gr=new WeakMap,yr=new WeakMap,br=new WeakMap,zc=new WeakMap,xr=new WeakMap,Co=new WeakSet,hb=function(){if(He(this,br)||He(this,yr)!==null)return;const l=He(this,gr);ft(this,gr,Math.min(l*2,1e4)),ft(this,yr,window.setTimeout(()=>{ft(this,yr,null),this.connect()},l))};const Bx=1,pb="ccv:relay",yo="ccv:relay.host";function qx(){try{const s=localStorage.getItem(pb);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 mb(){localStorage.removeItem(pb)}var _a,_r,va,vr,Sr,Ls,mi,gi,Us,yi,kr,bi,xi,Ht,Ms,uh,gb,hi,oh;class Gx{constructor(l){Kt(this,Ht);Kt(this,_a,null);Kt(this,_r,new Set);Kt(this,va,null);Kt(this,vr,null);Kt(this,Sr,500);Kt(this,Ls,null);Kt(this,mi,!1);Kt(this,gi,!1);Kt(this,Us,!1);Kt(this,yi,null);Kt(this,kr,"Подключаемся…");Kt(this,bi,0);Kt(this,xi,[]);this.session=l}get connected(){return He(this,gi)&&He(this,Us)}get statusText(){return He(this,kr)}get hostId(){return He(this,yi)}on(l){return He(this,_r).add(l),()=>He(this,_r).delete(l)}onReconnect(l){ft(this,vr,l)}onStatus(l){ft(this,va,l)}connect(){He(this,mi)||on(this,Ht,uh).call(this)}send(l){if(!He(this,gi)){He(this,xi).length<64&&He(this,xi).push(l);return}on(this,Ht,hi).call(this,{t:"client.frame",body:l})}close(){var l;ft(this,mi,!0),He(this,Ls)!==null&&window.clearTimeout(He(this,Ls)),(l=He(this,_a))==null||l.close()}}_a=new WeakMap,_r=new WeakMap,va=new WeakMap,vr=new WeakMap,Sr=new WeakMap,Ls=new WeakMap,mi=new WeakMap,gi=new WeakMap,Us=new WeakMap,yi=new WeakMap,kr=new WeakMap,bi=new WeakMap,xi=new WeakMap,Ht=new WeakSet,Ms=function(l){var i;He(this,kr)!==l&&(ft(this,kr,l),(i=He(this,va))==null||i.call(this))},uh=async function(){if(He(this,_a))return;if(!He(this,yi))try{ft(this,yi,await Yx(this.session.token))}catch(r){on(this,Ht,Ms).call(this,r instanceof Error?r.message:String(r)),on(this,Ht,oh).call(this);return}const l=location.protocol==="https:"?"wss":"ws",i=new WebSocket(`${l}://${location.host}/relay/client`);ft(this,_a,i),i.addEventListener("open",()=>{on(this,Ht,hi).call(this,{t:"client.hello",protocol:Bx,token:this.session.token})}),i.addEventListener("message",r=>{let o;try{o=JSON.parse(String(r.data))}catch{return}on(this,Ht,gb).call(this,o)}),i.addEventListener("close",()=>{var r;ft(this,_a,null),ft(this,gi,!1),ft(this,Us,!1),on(this,Ht,Ms).call(this,"Нет связи с сервером"),(r=He(this,va))==null||r.call(this),on(this,Ht,oh).call(this)}),i.addEventListener("error",()=>i.close())},gb=function(l){var i,r,o,d,h,g,m;switch(l.t){case"client.ok":ft(this,Sr,500),on(this,Ht,hi).call(this,{t:"client.attach",hostId:He(this,yi)??"",...He(this,bi)>0?{sinceRseq:He(this,bi)}:{}});return;case"client.attached":ft(this,gi,!0),ft(this,Us,l.online),ft(this,bi,l.rseq),on(this,Ht,Ms).call(this,l.online?"Хост на связи":"Компьютер не на связи"),on(this,Ht,hi).call(this,{t:"client.frame",body:{type:"hello",protocol:db,clientName:"ccv-web-relay"}});const b=He(this,xi);ft(this,xi,[]);for(const x of b)on(this,Ht,hi).call(this,{t:"client.frame",body:x});(i=He(this,vr))==null||i.call(this),(r=He(this,va))==null||r.call(this);return;case"host.frame":{l.rseq>0&&ft(this,bi,l.rseq);const x=l.body;for(const k of He(this,_r))k(x);return}case"host.online":ft(this,Us,!0),on(this,Ht,Ms).call(this,"Хост на связи"),(o=He(this,vr))==null||o.call(this),(d=He(this,va))==null||d.call(this);return;case"host.offline":ft(this,Us,!1),on(this,Ht,Ms).call(this,"Компьютер не на связи"),(h=He(this,va))==null||h.call(this);return;case"ping":on(this,Ht,hi).call(this,{t:"pong",nonce:l.nonce});return;case"error":if(l.code==="auth"){mb(),location.href="/login";return}if(l.code==="not_found"){localStorage.removeItem(yo),on(this,Ht,Ms).call(this,"Этот компьютер отвязан от аккаунта"),ft(this,mi,!0),(g=He(this,_a))==null||g.close();return}l.code!=="offline"&&on(this,Ht,Ms).call(this,l.message),(m=He(this,va))==null||m.call(this);return}},hi=function(l){var i;((i=He(this,_a))==null?void 0:i.readyState)===WebSocket.OPEN&&He(this,_a).send(JSON.stringify(l))},oh=function(){if(He(this,mi)||He(this,Ls)!==null)return;const l=He(this,Sr);ft(this,Sr,Math.min(l*2,1e4)),ft(this,Ls,window.setTimeout(()=>{ft(this,Ls,null),on(this,Ht,uh).call(this)},l))};async function Yx(s){const l=new URLSearchParams(location.search).get("host");if(l)return localStorage.setItem(yo,l),l;const i=localStorage.getItem(yo);if(i)return i;const r=await fetch("/api/hosts",{headers:{authorization:`Bearer ${s}`}});if(r.status===401)throw mb(),location.href="/login",new Error("нужен вход");const d=(await r.json()).hosts??[];if(d.length===1&&d[0])return localStorage.setItem(yo,d[0].id),d[0].id;throw location.href="/hosts",new Error("выберите компьютер")}function bo(){return location.pathname==="/app"||location.pathname.startsWith("/app/")?"relay":"local"}const Ix=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws`;function Xx(){if(bo()==="local")return new Hx(Ix);const s=qx();return s?new Gx(s):(location.replace(`/login?next=${encodeURIComponent(location.pathname+location.search)}`),null)}const il={items:[],pending:[],lastSeq:0,contextTokens:null},Vd={entries:[],total:0,loading:!1};function yb(s){var l;return((l=s.entries[0])==null?void 0:l.seq)??1}function Pg(s){return s.total>0&&yb(s)>1}function Vx(s,l){const i=new Set(s.entries.map(o=>o.seq));return{entries:[...s.entries,...l.entries.filter(o=>!i.has(o.seq))].sort((o,d)=>o.seq-d.seq),total:l.total,loading:!1}}function Qx(s){return xo(il,s).items.map(l=>({...l,id:`h:${l.id}`}))}function xo(s,l){let i=s;for(const r of l)r.seq<=i.lastSeq||(i={...$x(i,r.event,r.seq),lastSeq:r.seq});return i}function $x(s,l,i){var o,d;const r=s.items;switch(l.kind){case"user.message":return ha(s,{id:`u${i}`,kind:"user",text:l.text});case"assistant.delta":{const h=r.findIndex(m=>m.id===l.blockId);if(h===-1)return ha(s,{id:l.blockId,kind:"assistant",text:l.text,streaming:!0});const g=r[h];return sr(s,h,{...g,text:g.text+l.text})}case"assistant.text":{const h=r.findIndex(m=>m.id===l.blockId),g={id:l.blockId,kind:"assistant",text:l.text,streaming:!1};return h===-1?ha(s,g):sr(s,h,g)}case"thinking.delta":{const h=r.findIndex(m=>m.id===l.blockId);if(h===-1)return ha(s,{id:l.blockId,kind:"thinking",text:l.text});const g=r[h];return sr(s,h,{...g,text:g.text+l.text})}case"assistant.thinking":{const h=r.findIndex(m=>m.id===l.blockId),g={id:l.blockId,kind:"thinking",text:l.text};return h===-1?ha(s,g):sr(s,h,g)}case"tool.use":return ha(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=r.findIndex(m=>m.kind==="tool"&&m.toolUseId===l.toolUseId);if(h===-1)return s;const g=r[h];return sr(s,h,{...g,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(m=>m.requestId===l.requestId),g=s.pending.filter(m=>m.requestId!==l.requestId);if(l.answers&&(h!=null&&h.toolUseId)){const m=r.findIndex(b=>b.kind==="tool"&&b.toolUseId===h.toolUseId);if(m!==-1){const b=r[m];return sr({...s,pending:g},m,{...b,answers:l.answers})}}return l.decision==="allow"?{...s,pending:g}:ha({...s,pending:g},{id:`p${i}`,kind:"notice",tone:"info",text:`Отклонено${l.reason?`: ${l.reason}`:""}`})}case"result":{const h=s.items.map(m=>m.kind==="assistant"&&m.streaming?{...m,streaming:!1}:m),g=l.contextTokens??s.contextTokens;return ha({...s,items:h,contextTokens:g},{id:`r${i}`,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:ha(s,{id:`s${i}`,kind:"notice",tone:"info",text:"Контекст сжат"});case"error":return ha(s,{id:`e${i}`,kind:"notice",tone:"error",text:l.message});case"state":return s;default:return s}}function ha(s,l){return{...s,items:[...s.items,l]}}function sr(s,l,i){const r=s.items.slice();return r[l]=i,{...s,items:r}}const fh="ccv:theme",Qd=["system","light","dark"];function Zx(){const[s,l]=S.useState(Kx);S.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 i=S.useCallback(o=>{try{localStorage.setItem(fh,o)}catch{}l(o)},[]),r=S.useCallback(()=>{l(o=>{const d=Qd[(Qd.indexOf(o)+1)%Qd.length];try{localStorage.setItem(fh,d)}catch{}return d})},[]);return[s,i,r]}function Kx(){try{const s=localStorage.getItem(fh);if(s==="light"||s==="dark"||s==="system")return s}catch{}return"system"}const bb=[{value:"default",hint:"спрашивать перед каждым действием"},{value:"acceptEdits",hint:"правки файлов без подтверждения"},{value:"plan",hint:"только чтение и план, без изменений"},{value:"auto",hint:"спрашивать только о рискованном — решает сам"},{value:"bypassPermissions",hint:"ничего не спрашивать"}],_i={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:"вопроса"}},Jx=320,xb="ccv:panes";function Fx(s){return`--${s}-w`}function _b(s,l){const i=_i[s];return Math.round(Math.min(i.max,Math.max(i.min,l)))}function Wx(){const s={};for(const l of Object.keys(_i))s[l]=_i[l].width;try{const l=localStorage.getItem(xb);if(l){const i=JSON.parse(l);for(const r of Object.keys(_i)){const o=i[r];typeof o=="number"&&Number.isFinite(o)&&(s[r]=_b(r,o))}}}catch{}return s}function Px(){const[s,l]=S.useState(Wx),i=S.useCallback(h=>{try{localStorage.setItem(xb,JSON.stringify(h))}catch{}},[]),r=S.useCallback((h,g)=>{l(m=>{const b=_b(h,g);if(m[h]===b)return m;const x={...m,[h]:b};return i(x),x})},[i]),o=S.useCallback(h=>{l(g=>{const m={...g,[h]:_i[h].width};return i(m),m})},[i]),d={};for(const h of Object.keys(_i))d[Fx(h)]=`${s[h]}px`;return{widths:s,style:d,setWidth:r,reset:o}}const $d=260,vb=120,e_=200,ey="ccv:terminal-h";function ty(s,l){return Math.round(Math.min(l,Math.max(vb,s)))}function t_(){const[s,l]=S.useState(()=>{try{const d=localStorage.getItem(ey);if(d){const h=Number(d);if(Number.isFinite(h))return ty(h,1/0)}}catch{}return $d}),i=S.useCallback(d=>{try{localStorage.setItem(ey,String(d))}catch{}},[]),r=S.useCallback((d,h)=>{const g=ty(d,h);l(m=>m===g?m:(i(g),g))},[i]),o=S.useCallback(()=>{l($d),i($d)},[i]);return{height:s,setHeight:r,reset:o}}function kh(s){const[l,i]=S.useState(()=>typeof window>"u"?!1:window.matchMedia(s).matches);return S.useEffect(()=>{const r=window.matchMedia(s),o=()=>i(r.matches);return o(),r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[s]),l}const n_={height:0,offsetTop:0,offsetLeft:0};function ny(){if(typeof window>"u")return n_;const s=window.visualViewport;return s?{height:s.height,offsetTop:s.offsetTop,offsetLeft:s.offsetLeft}:{height:window.innerHeight,offsetTop:0,offsetLeft:0}}function l_(s){const[l,i]=S.useState(ny);return S.useEffect(()=>{if(!s)return;const r=window.visualViewport,o=()=>{const d=ny();i(h=>h.height===d.height&&h.offsetTop===d.offsetTop&&h.offsetLeft===d.offsetLeft?h:d)};return o(),r?(r.addEventListener("resize",o),r.addEventListener("scroll",o),()=>{r.removeEventListener("resize",o),r.removeEventListener("scroll",o)}):(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o))},[s]),l}function wh(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wi=wh();function Sb(s){wi=s}var pi={exec:()=>null};function ir(s){let l=[];return i=>{let r=Math.max(0,Math.min(3,i-1)),o=l[r];return o||(o=s(r),l[r]=o),o}}function at(s,l=""){let i=typeof s=="string"?s:s.source,r={replace:(o,d)=>{let h=typeof d=="string"?d:d.source;return h=h.replace(qn.caret,"$1"),i=i.replace(o,h),r},getRegex:()=>new RegExp(i,l)};return r}var a_=((s="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+s)}catch{return!1}})(),qn={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:ir(s=>new RegExp(`^ {0,${s}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ir(s=>new RegExp(`^ {0,${s}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ir(s=>new RegExp(`^ {0,${s}}(?:\`\`\`|~~~)`)),headingBeginRegex:ir(s=>new RegExp(`^ {0,${s}}#`)),htmlBeginRegex:ir(s=>new RegExp(`^ {0,${s}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ir(s=>new RegExp(`^ {0,${s}}>`))},s_=/^(?:[ \t]*(?:\n|$))+/,i_=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,r_=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Lc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,c_=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jh=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,kb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,wb=at(kb).replace(/bull/g,jh).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(),u_=at(kb).replace(/bull/g,jh).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(),Nh=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,o_=/^[^\n]+/,Th=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,f_=at(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Th).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),d_=at(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,jh).getRegex(),Ro="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",Eh=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,h_=at("^ {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",Eh).replace("tag",Ro).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jb=s=>at(Nh).replace("hr",Lc).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",Ro).getRegex(),p_=jb(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),m_=jb(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),g_=at(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",m_).getRegex(),Ah={blockquote:g_,code:i_,def:f_,fences:r_,heading:c_,hr:Lc,html:h_,lheading:wb,list:d_,newline:s_,paragraph:p_,table:pi,text:o_},ly=at("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Lc).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",Ro).getRegex(),y_={...Ah,lheading:u_,table:ly,paragraph:at(Nh).replace("hr",Lc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ly).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",Ro).getRegex()},b_={...Ah,html:at(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Eh).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:pi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:at(Nh).replace("hr",Lc).replace("heading",` *#{1,6} *[^
|
|
51
|
-
]`).replace("lheading",wb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},x_=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,__=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Nb=/^( {2,}|\\)\n(?!\s*$)/,v_=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,wr=/[\p{P}\p{S}]/u,Mo=/[\s\p{P}\p{S}]/u,Ch=/[^\s\p{P}\p{S}]/u,S_=at(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Mo).getRegex(),Tb=/(?!~)[\p{P}\p{S}]/u,k_=/(?!~)[\s\p{P}\p{S}]/u,w_=/(?:[^\s\p{P}\p{S}]|~)/u,j_=at(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",a_?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Eb=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,N_=at(Eb,"u").replace(/punct/g,wr).getRegex(),T_=at(Eb,"u").replace(/punct/g,Tb).getRegex(),Ab="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",E_=at(Ab,"gu").replace(/notPunctSpace/g,Ch).replace(/punctSpace/g,Mo).replace(/punct/g,wr).getRegex(),A_=at(Ab,"gu").replace(/notPunctSpace/g,w_).replace(/punctSpace/g,k_).replace(/punct/g,Tb).getRegex(),C_=at("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ch).replace(/punctSpace/g,Mo).replace(/punct/g,wr).getRegex(),R_=at(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,wr).getRegex(),M_="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",O_=at(M_,"gu").replace(/notPunctSpace/g,Ch).replace(/punctSpace/g,Mo).replace(/punct/g,wr).getRegex(),D_=at(/\\(punct)/,"gu").replace(/punct/g,wr).getRegex(),z_=at(/^<(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(),L_=at(Eh).replace("(?:-->|$)","-->").getRegex(),U_=at("^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",L_).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),So=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,H_=at(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",So).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cb=at(/^!?\[(label)\]\[(ref)\]/).replace("label",So).replace("ref",Th).getRegex(),Rb=at(/^!?\[(ref)\](?:\[\])?/).replace("ref",Th).getRegex(),B_=at("reflink|nolink(?!\\()","g").replace("reflink",Cb).replace("nolink",Rb).getRegex(),ay=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Rh={_backpedal:pi,anyPunctuation:D_,autolink:z_,blockSkip:j_,br:Nb,code:__,del:pi,delLDelim:pi,delRDelim:pi,emStrongLDelim:N_,emStrongRDelimAst:E_,emStrongRDelimUnd:C_,escape:x_,link:H_,nolink:Rb,punctuation:S_,reflink:Cb,reflinkSearch:B_,tag:U_,text:v_,url:pi},q_={...Rh,link:at(/^!?\[(label)\]\((.*?)\)/).replace("label",So).getRegex(),reflink:at(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",So).getRegex()},dh={...Rh,emStrongRDelimAst:A_,emStrongLDelim:T_,delLDelim:R_,delRDelim:O_,url:at(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ay).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:at(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ay).getRegex()},G_={...dh,br:at(Nb).replace("{2,}","*").getRegex(),text:at(dh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ao={normal:Ah,gfm:y_,pedantic:b_},kc={normal:Rh,gfm:dh,breaks:G_,pedantic:q_},Y_={"&":"&","<":"<",">":">",'"':""","'":"'"},sy=s=>Y_[s];function ya(s,l){if(l){if(qn.escapeTest.test(s))return s.replace(qn.escapeReplace,sy)}else if(qn.escapeTestNoEncode.test(s))return s.replace(qn.escapeReplaceNoEncode,sy);return s}function iy(s){try{s=encodeURI(s).replace(qn.percentDecode,"%")}catch{return null}return s}function ry(s,l){var d;let i=s.replace(qn.findPipe,(h,g,m)=>{let b=!1,x=g;for(;--x>=0&&m[x]==="\\";)b=!b;return b?"|":" |"}),r=i.split(qn.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((d=r.at(-1))!=null&&d.trim())&&r.pop(),l)if(r.length>l)r.splice(l);else for(;r.length<l;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(qn.slashPipe,"|");return r}function Cs(s,l,i){let r=s.length;if(r===0)return"";let o=0;for(;o<r&&s.charAt(r-o-1)===l;)o++;return s.slice(0,r-o)}function cy(s){let l=s.split(`
|
|
52
|
-
`),i=l.length-1;for(;i>=0&&qn.blankLine.test(l[i]);)i--;return l.length-i<=2?s:l.slice(0,i+1).join(`
|
|
53
|
-
`)}function I_(s,l){if(s.indexOf(l[1])===-1)return-1;let i=0;for(let r=0;r<s.length;r++)if(s[r]==="\\")r++;else if(s[r]===l[0])i++;else if(s[r]===l[1]&&(i--,i<0))return r;return i>0?-2:-1}function X_(s,l=0){let i=l,r="";for(let o of s)if(o===" "){let d=4-i%4;r+=" ".repeat(d),i+=d}else r+=o,i++;return r}function uy(s,l,i,r,o){let d=l.href,h=l.title||null,g=s[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let m={type:s[0].charAt(0)==="!"?"image":"link",raw:i,href:d,title:h,text:g,tokens:r.inlineTokens(g)};return r.state.inLink=!1,m}function V_(s,l,i){let r=s.match(i.other.indentCodeCompensation);if(r===null)return l;let o=r[1];return l.split(`
|
|
54
|
-
`).map(d=>{let h=d.match(i.other.beginningSpace);if(h===null)return d;let[g]=h;return g.length>=o.length?d.slice(o.length):d}).join(`
|
|
55
|
-
`)}var ko=class{constructor(s){kt(this,"options");kt(this,"rules");kt(this,"lexer");this.options=s||wi}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 i=this.options.pedantic?l[0]:cy(l[0]),r=i.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i,codeBlockStyle:"indented",text:r}}}fences(s){let l=this.rules.block.fences.exec(s);if(l){let i=l[0],r=V_(i,l[3]||"",this.rules);return{type:"code",raw:i,lang:l[2]?l[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):l[2],text:r}}}heading(s){let l=this.rules.block.heading.exec(s);if(l){let i=l[2].trim();if(this.rules.other.endingHash.test(i)){let r=Cs(i,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(i=r.trim())}return{type:"heading",raw:Cs(l[0],`
|
|
56
|
-
`),depth:l[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(s){let l=this.rules.block.hr.exec(s);if(l)return{type:"hr",raw:Cs(l[0],`
|
|
57
|
-
`)}}blockquote(s){let l=this.rules.block.blockquote.exec(s);if(l){let i=Cs(l[0],`
|
|
58
|
-
`).split(`
|
|
59
|
-
`),r="",o="",d=[];for(;i.length>0;){let h=!1,g=[],m;for(m=0;m<i.length;m++)if(this.rules.other.blockquoteStart.test(i[m]))g.push(i[m]),h=!0;else if(!h)g.push(i[m]);else break;i=i.slice(m);let b=g.join(`
|
|
60
|
-
`),x=b.replace(this.rules.other.blockquoteSetextReplace,`
|
|
61
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
62
|
-
${b}`:b,o=o?`${o}
|
|
63
|
-
${x}`:x;let k=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(x,d,!0),this.lexer.state.top=k,i.length===0)break;let _=d.at(-1);if((_==null?void 0:_.type)==="code")break;if((_==null?void 0:_.type)==="blockquote"){let C=_,N=C.raw+`
|
|
64
|
-
`+i.join(`
|
|
65
|
-
`),H=this.blockquote(N);d[d.length-1]=H,r=r.substring(0,r.length-C.raw.length)+H.raw,o=o.substring(0,o.length-C.text.length)+H.text;break}else if((_==null?void 0:_.type)==="list"){let C=_,N=C.raw+`
|
|
66
|
-
`+i.join(`
|
|
67
|
-
`),H=this.list(N);d[d.length-1]=H,r=r.substring(0,r.length-_.raw.length)+H.raw,o=o.substring(0,o.length-C.raw.length)+H.raw,i=N.substring(d.at(-1).raw.length).split(`
|
|
68
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:d,text:o}}}list(s){let l=this.rules.block.list.exec(s);if(l){let i=l[1].trim(),r=i.length>1,o={type:"list",raw:"",ordered:r,start:r?+i.slice(0,-1):"",loose:!1,items:[]};i=r?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=r?i:"[*+-]");let d=this.rules.other.listItemRegex(i),h=!1;for(;s;){let m=!1,b="",x="";if(!(l=d.exec(s))||this.rules.block.hr.test(s))break;b=l[0],s=s.substring(b.length);let k=X_(l[2].split(`
|
|
69
|
-
`,1)[0],l[1].length),_=s.split(`
|
|
70
|
-
`,1)[0],C=!k.trim(),N=0;if(this.options.pedantic?(N=2,x=k.trimStart()):C?N=l[1].length+1:(N=k.search(this.rules.other.nonSpaceChar),N=N>4?1:N,x=k.slice(N),N+=l[1].length),C&&this.rules.other.blankLine.test(_)&&(b+=_+`
|
|
71
|
-
`,s=s.substring(_.length+1),m=!0),!m){let H=this.rules.other.nextBulletRegex(N),B=this.rules.other.hrRegex(N),K=this.rules.other.fencesBeginRegex(N),O=this.rules.other.headingBeginRegex(N),$=this.rules.other.htmlBeginRegex(N),A=this.rules.other.blockquoteBeginRegex(N);for(;s;){let Q=s.split(`
|
|
72
|
-
`,1)[0],L;if(_=Q,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),L=_):L=_.replace(this.rules.other.tabCharGlobal," "),K.test(_)||O.test(_)||$.test(_)||A.test(_)||H.test(_)||B.test(_))break;if(L.search(this.rules.other.nonSpaceChar)>=N||!_.trim())x+=`
|
|
73
|
-
`+L.slice(N);else{if(C||k.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||K.test(k)||O.test(k)||B.test(k))break;x+=`
|
|
74
|
-
`+_}C=!_.trim(),b+=Q+`
|
|
75
|
-
`,s=s.substring(Q.length+1),k=L.slice(N)}}o.loose||(h?o.loose=!0:this.rules.other.doubleBlankLine.test(b)&&(h=!0)),o.items.push({type:"list_item",raw:b,task:!!this.options.gfm&&this.rules.other.listIsTask.test(x),loose:!1,text:x,tokens:[]}),o.raw+=b}let g=o.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let m of o.items){this.lexer.state.top=!1,m.tokens=this.lexer.blockTokens(m.text,[]);let b=m.tokens[0];if(m.task&&((b==null?void 0:b.type)==="text"||(b==null?void 0:b.type)==="paragraph")){m.text=m.text.replace(this.rules.other.listReplaceTask,""),b.raw=b.raw.replace(this.rules.other.listReplaceTask,""),b.text=b.text.replace(this.rules.other.listReplaceTask,"");for(let k=this.lexer.inlineQueue.length-1;k>=0;k--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)){this.lexer.inlineQueue[k].src=this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask,"");break}let x=this.rules.other.listTaskCheckbox.exec(m.raw);if(x){let k={type:"checkbox",raw:x[0]+" ",checked:x[0]!=="[ ]"};m.checked=k.checked,o.loose?m.tokens[0]&&["paragraph","text"].includes(m.tokens[0].type)&&"tokens"in m.tokens[0]&&m.tokens[0].tokens?(m.tokens[0].raw=k.raw+m.tokens[0].raw,m.tokens[0].text=k.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(k)):m.tokens.unshift({type:"paragraph",raw:k.raw,text:k.raw,tokens:[k]}):m.tokens.unshift(k)}}else m.task&&(m.task=!1);if(!o.loose){let x=m.tokens.filter(_=>_.type==="space"),k=x.length>0&&x.some(_=>this.rules.other.anyLine.test(_.raw));o.loose=k}}if(o.loose)for(let m of o.items){m.loose=!0;for(let b of m.tokens)b.type==="text"&&(b.type="paragraph")}return o}}html(s){let l=this.rules.block.html.exec(s);if(l){let i=cy(l[0]);return{type:"html",block:!0,raw:i,pre:l[1]==="pre"||l[1]==="script"||l[1]==="style",text:i}}}def(s){let l=this.rules.block.def.exec(s);if(l){let i=l[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=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:i,raw:Cs(l[0],`
|
|
76
|
-
`),href:r,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 i=ry(l[1]),r=l[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(h=l[3])!=null&&h.trim()?l[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
77
|
-
`):[],d={type:"table",raw:Cs(l[0],`
|
|
78
|
-
`),header:[],align:[],rows:[]};if(i.length===r.length){for(let g of r)this.rules.other.tableAlignRight.test(g)?d.align.push("right"):this.rules.other.tableAlignCenter.test(g)?d.align.push("center"):this.rules.other.tableAlignLeft.test(g)?d.align.push("left"):d.align.push(null);for(let g=0;g<i.length;g++)d.header.push({text:i[g],tokens:this.lexer.inline(i[g]),header:!0,align:d.align[g]});for(let g of o)d.rows.push(ry(g,d.header.length).map((m,b)=>({text:m,tokens:this.lexer.inline(m),header:!1,align:d.align[b]})));return d}}lheading(s){let l=this.rules.block.lheading.exec(s);if(l){let i=l[1].trim();return{type:"heading",raw:Cs(l[0],`
|
|
79
|
-
`),depth:l[2].charAt(0)==="="?1:2,text:i,tokens:this.lexer.inline(i)}}}paragraph(s){let l=this.rules.block.paragraph.exec(s);if(l){let i=l[1].charAt(l[1].length-1)===`
|
|
80
|
-
`?l[1].slice(0,-1):l[1];return{type:"paragraph",raw:l[0],text:i,tokens:this.lexer.inline(i)}}}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 i=l[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let d=Cs(i.slice(0,-1),"\\");if((i.length-d.length)%2===0)return}else{let d=I_(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 r=l[2],o="";if(this.options.pedantic){let d=this.rules.other.pedanticHrefTitle.exec(r);d&&(r=d[1],o=d[3])}else o=l[3]?l[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?r=r.slice(1):r=r.slice(1,-1)),uy(l,{href:r&&r.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 i;if((i=this.rules.inline.reflink.exec(s))||(i=this.rules.inline.nolink.exec(s))){let r=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=l[r.toLowerCase()];if(!o){let d=i[0].charAt(0);return{type:"text",raw:d,text:d}}return uy(i,o,i[0],this.lexer,this.rules)}}emStrong(s,l,i=""){let r=this.rules.inline.emStrongLDelim.exec(s);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!i||this.rules.inline.punctuation.exec(i))){let o=[...r[0]].length-1,d,h,g=o,m=0,b=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(b.lastIndex=0,l=l.slice(-1*s.length+o);(r=b.exec(l))!==null;){if(d=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!d)continue;if(h=[...d].length,r[3]||r[4]){g+=h;continue}else if((r[5]||r[6])&&o%3&&!((o+h)%3)){m+=h;continue}if(g-=h,g>0)continue;h=Math.min(h,h+g+m);let x=[...r[0]][0].length,k=s.slice(0,o+r.index+x+h);if(Math.min(o,h)%2){let C=k.slice(1,-1);return{type:"em",raw:k,text:C,tokens:this.lexer.inlineTokens(C)}}let _=k.slice(2,-2);return{type:"strong",raw:k,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(s){let l=this.rules.inline.code.exec(s);if(l){let i=l[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return r&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:l[0],text:i}}}br(s){let l=this.rules.inline.br.exec(s);if(l)return{type:"br",raw:l[0]}}del(s,l,i=""){let r=this.rules.inline.delLDelim.exec(s);if(r&&(!r[1]||!i||this.rules.inline.punctuation.exec(i))){let o=[...r[0]].length-1,d,h,g=o,m=this.rules.inline.delRDelim;for(m.lastIndex=0,l=l.slice(-1*s.length+o);(r=m.exec(l))!==null;){if(d=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!d||(h=[...d].length,h!==o))continue;if(r[3]||r[4]){g+=h;continue}if(g-=h,g>0)continue;h=Math.min(h,h+g);let b=[...r[0]][0].length,x=s.slice(0,o+r.index+b+h),k=x.slice(o,-o);return{type:"del",raw:x,text:k,tokens:this.lexer.inlineTokens(k)}}}}autolink(s){let l=this.rules.inline.autolink.exec(s);if(l){let i,r;return l[2]==="@"?(i=l[1],r="mailto:"+i):(i=l[1],r=i),{type:"link",raw:l[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}url(s){var i;let l;if(l=this.rules.inline.url.exec(s)){let r,o;if(l[2]==="@")r=l[0],o="mailto:"+r;else{let d;do d=l[0],l[0]=((i=this.rules.inline._backpedal.exec(l[0]))==null?void 0:i[0])??"";while(d!==l[0]);r=l[0],l[1]==="www."?o="http://"+l[0]:o=l[0]}return{type:"link",raw:l[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(s){let l=this.rules.inline.text.exec(s);if(l){let i=this.lexer.state.inRawBlock;return{type:"text",raw:l[0],text:l[0],escaped:i}}}},Jl=class hh{constructor(l){kt(this,"tokens");kt(this,"options");kt(this,"state");kt(this,"inlineQueue");kt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=l||wi,this.options.tokenizer=this.options.tokenizer||new ko,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 i={other:qn,block:ao.normal,inline:kc.normal};this.options.pedantic?(i.block=ao.pedantic,i.inline=kc.pedantic):this.options.gfm&&(i.block=ao.gfm,this.options.breaks?i.inline=kc.breaks:i.inline=kc.gfm),this.tokenizer.rules=i}static get rules(){return{block:ao,inline:kc}}static lex(l,i){return new hh(i).lex(l)}static lexInline(l,i){return new hh(i).inlineTokens(l)}lex(l){l=l.replace(qn.carriageReturn,`
|
|
81
|
-
`),this.blockTokens(l,this.tokens);for(let i=0;i<this.inlineQueue.length;i++){let r=this.inlineQueue[i];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(l,i=[],r=!1){var d,h,g;this.tokenizer.lexer=this,this.options.pedantic&&(l=l.replace(qn.tabCharGlobal," ").replace(qn.spaceLine,""));let o=1/0;for(;l;){if(l.length<o)o=l.length;else{this.infiniteLoopError(l.charCodeAt(0));break}let m;if((h=(d=this.options.extensions)==null?void 0:d.block)!=null&&h.some(x=>(m=x.call({lexer:this},l,i))?(l=l.substring(m.raw.length),i.push(m),!0):!1))continue;if(m=this.tokenizer.space(l)){l=l.substring(m.raw.length);let x=i.at(-1);m.raw.length===1&&x!==void 0?x.raw+=`
|
|
82
|
-
`:i.push(m);continue}if(m=this.tokenizer.code(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
83
|
-
`)?"":`
|
|
84
|
-
`)+m.raw,x.text+=`
|
|
85
|
-
`+m.text,this.inlineQueue.at(-1).src=x.text):i.push(m);continue}if(m=this.tokenizer.fences(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.heading(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.hr(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.blockquote(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.list(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.html(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.def(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
86
|
-
`)?"":`
|
|
87
|
-
`)+m.raw,x.text+=`
|
|
88
|
-
`+m.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[m.tag]||(this.tokens.links[m.tag]={href:m.href,title:m.title},i.push(m));continue}if(m=this.tokenizer.table(l)){l=l.substring(m.raw.length),i.push(m);continue}if(m=this.tokenizer.lheading(l)){l=l.substring(m.raw.length),i.push(m);continue}let b=l;if((g=this.options.extensions)!=null&&g.startBlock){let x=1/0,k=l.slice(1),_;this.options.extensions.startBlock.forEach(C=>{_=C.call({lexer:this},k),typeof _=="number"&&_>=0&&(x=Math.min(x,_))}),x<1/0&&x>=0&&(b=l.substring(0,x+1))}if(this.state.top&&(m=this.tokenizer.paragraph(b))){let x=i.at(-1);r&&(x==null?void 0:x.type)==="paragraph"?(x.raw+=(x.raw.endsWith(`
|
|
89
|
-
`)?"":`
|
|
90
|
-
`)+m.raw,x.text+=`
|
|
91
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):i.push(m),r=b.length!==l.length,l=l.substring(m.raw.length);continue}if(m=this.tokenizer.text(l)){l=l.substring(m.raw.length);let x=i.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=(x.raw.endsWith(`
|
|
92
|
-
`)?"":`
|
|
93
|
-
`)+m.raw,x.text+=`
|
|
94
|
-
`+m.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):i.push(m);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return this.state.top=!0,i}inline(l,i=[]){return this.inlineQueue.push({src:l,tokens:i}),i}inlineTokens(l,i=[]){var g,m,b,x,k;this.tokenizer.lexer=this;let r=l;if(this.tokens.links){let _=Object.keys(this.tokens.links);_.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,C=>_.includes(C.slice(C.lastIndexOf("[")+1,-1))?"["+"a".repeat(C.length-2)+"]":C))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(_,C,N)=>{let H=N?N.length:0;return _.slice(0,H)+"["+"a".repeat(_.length-H-2)+"]"}),r=((m=(g=this.options.hooks)==null?void 0:g.emStrongMask)==null?void 0:m.call({lexer:this},r))??r;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 _;if((x=(b=this.options.extensions)==null?void 0:b.inline)!=null&&x.some(N=>(_=N.call({lexer:this},l,i))?(l=l.substring(_.raw.length),i.push(_),!0):!1))continue;if(_=this.tokenizer.escape(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.tag(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.link(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.reflink(l,this.tokens.links)){l=l.substring(_.raw.length);let N=i.at(-1);_.type==="text"&&(N==null?void 0:N.type)==="text"?(N.raw+=_.raw,N.text+=_.text):i.push(_);continue}if(_=this.tokenizer.emStrong(l,r,d)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.codespan(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.br(l)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.del(l,r,d)){l=l.substring(_.raw.length),i.push(_);continue}if(_=this.tokenizer.autolink(l)){l=l.substring(_.raw.length),i.push(_);continue}if(!this.state.inLink&&(_=this.tokenizer.url(l))){l=l.substring(_.raw.length),i.push(_);continue}let C=l;if((k=this.options.extensions)!=null&&k.startInline){let N=1/0,H=l.slice(1),B;this.options.extensions.startInline.forEach(K=>{B=K.call({lexer:this},H),typeof B=="number"&&B>=0&&(N=Math.min(N,B))}),N<1/0&&N>=0&&(C=l.substring(0,N+1))}if(_=this.tokenizer.inlineText(C)){l=l.substring(_.raw.length),_.raw.slice(-1)!=="_"&&(d=_.raw.slice(-1)),o=!0;let N=i.at(-1);(N==null?void 0:N.type)==="text"?(N.raw+=_.raw,N.text+=_.text):i.push(_);continue}if(l){this.infiniteLoopError(l.charCodeAt(0));break}}return i}infiniteLoopError(l){let i="Infinite loop on byte: "+l;if(this.options.silent)console.error(i);else throw new Error(i)}},wo=class{constructor(s){kt(this,"options");kt(this,"parser");this.options=s||wi}space(s){return""}code({text:s,lang:l,escaped:i}){var d;let r=(d=(l||"").match(qn.notSpaceStart))==null?void 0:d[0],o=s.replace(qn.endingNewline,"")+`
|
|
95
|
-
`;return r?'<pre><code class="language-'+ya(r)+'">'+(i?o:ya(o,!0))+`</code></pre>
|
|
96
|
-
`:"<pre><code>"+(i?o:ya(o,!0))+`</code></pre>
|
|
97
|
-
`}blockquote({tokens:s}){return`<blockquote>
|
|
98
|
-
${this.parser.parse(s)}</blockquote>
|
|
99
|
-
`}html({text:s}){return s}def(s){return""}heading({tokens:s,depth:l}){return`<h${l}>${this.parser.parseInline(s)}</h${l}>
|
|
100
|
-
`}hr(s){return`<hr>
|
|
101
|
-
`}list(s){let l=s.ordered,i=s.start,r="";for(let h=0;h<s.items.length;h++){let g=s.items[h];r+=this.listitem(g)}let o=l?"ol":"ul",d=l&&i!==1?' start="'+i+'"':"";return"<"+o+d+`>
|
|
102
|
-
`+r+"</"+o+`>
|
|
103
|
-
`}listitem(s){return`<li>${this.parser.parse(s.tokens)}</li>
|
|
104
|
-
`}checkbox({checked:s}){return"<input "+(s?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:s}){return`<p>${this.parser.parseInline(s)}</p>
|
|
105
|
-
`}table(s){let l="",i="";for(let o=0;o<s.header.length;o++)i+=this.tablecell(s.header[o]);l+=this.tablerow({text:i});let r="";for(let o=0;o<s.rows.length;o++){let d=s.rows[o];i="";for(let h=0;h<d.length;h++)i+=this.tablecell(d[h]);r+=this.tablerow({text:i})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
106
|
-
<thead>
|
|
107
|
-
`+l+`</thead>
|
|
108
|
-
`+r+`</table>
|
|
109
|
-
`}tablerow({text:s}){return`<tr>
|
|
110
|
-
${s}</tr>
|
|
111
|
-
`}tablecell(s){let l=this.parser.parseInline(s.tokens),i=s.header?"th":"td";return(s.align?`<${i} align="${s.align}">`:`<${i}>`)+l+`</${i}>
|
|
112
|
-
`}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>${ya(s,!0)}</code>`}br(s){return"<br>"}del({tokens:s}){return`<del>${this.parser.parseInline(s)}</del>`}link({href:s,title:l,tokens:i}){let r=this.parser.parseInline(i),o=iy(s);if(o===null)return r;s=o;let d='<a href="'+s+'"';return l&&(d+=' title="'+ya(l)+'"'),d+=">"+r+"</a>",d}image({href:s,title:l,text:i,tokens:r}){r&&(i=this.parser.parseInline(r,this.parser.textRenderer));let o=iy(s);if(o===null)return ya(i);s=o;let d=`<img src="${s}" alt="${ya(i)}"`;return l&&(d+=` title="${ya(l)}"`),d+=">",d}text(s){return"tokens"in s&&s.tokens?this.parser.parseInline(s.tokens):"escaped"in s&&s.escaped?s.text:ya(s.text)}},Mh=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}},Fl=class ph{constructor(l){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=l||wi,this.options.renderer=this.options.renderer||new wo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mh}static parse(l,i){return new ph(i).parse(l)}static parseInline(l,i){return new ph(i).parseInline(l)}parse(l){var r,o;this.renderer.parser=this;let i="";for(let d=0;d<l.length;d++){let h=l[d];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[h.type]){let m=h,b=this.options.extensions.renderers[m.type].call({parser:this},m);if(b!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(m.type)){i+=b||"";continue}}let g=h;switch(g.type){case"space":{i+=this.renderer.space(g);break}case"hr":{i+=this.renderer.hr(g);break}case"heading":{i+=this.renderer.heading(g);break}case"code":{i+=this.renderer.code(g);break}case"table":{i+=this.renderer.table(g);break}case"blockquote":{i+=this.renderer.blockquote(g);break}case"list":{i+=this.renderer.list(g);break}case"checkbox":{i+=this.renderer.checkbox(g);break}case"html":{i+=this.renderer.html(g);break}case"def":{i+=this.renderer.def(g);break}case"paragraph":{i+=this.renderer.paragraph(g);break}case"text":{i+=this.renderer.text(g);break}default:{let m='Token with "'+g.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}parseInline(l,i=this.renderer){var o,d;this.renderer.parser=this;let r="";for(let h=0;h<l.length;h++){let g=l[h];if((d=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&d[g.type]){let b=this.options.extensions.renderers[g.type].call({parser:this},g);if(b!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(g.type)){r+=b||"";continue}}let m=g;switch(m.type){case"escape":{r+=i.text(m);break}case"html":{r+=i.html(m);break}case"link":{r+=i.link(m);break}case"image":{r+=i.image(m);break}case"checkbox":{r+=i.checkbox(m);break}case"strong":{r+=i.strong(m);break}case"em":{r+=i.em(m);break}case"codespan":{r+=i.codespan(m);break}case"br":{r+=i.br(m);break}case"del":{r+=i.del(m);break}case"text":{r+=i.text(m);break}default:{let b='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(b),"";throw new Error(b)}}}return r}},go,Ac=(go=class{constructor(s){kt(this,"options");kt(this,"block");this.options=s||wi}preprocess(s){return s}postprocess(s){return s}processAllTokens(s){return s}emStrongMask(s){return s}provideLexer(s=this.block){return s?Jl.lex:Jl.lexInline}provideParser(s=this.block){return s?Fl.parse:Fl.parseInline}},kt(go,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),kt(go,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),go),Q_=class{constructor(...s){kt(this,"defaults",wh());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",Fl);kt(this,"Renderer",wo);kt(this,"TextRenderer",Mh);kt(this,"Lexer",Jl);kt(this,"Tokenizer",ko);kt(this,"Hooks",Ac);this.use(...s)}walkTokens(s,l){var r,o;let i=[];for(let d of s)switch(i=i.concat(l.call(this,d)),d.type){case"table":{let h=d;for(let g of h.header)i=i.concat(this.walkTokens(g.tokens,l));for(let g of h.rows)for(let m of g)i=i.concat(this.walkTokens(m.tokens,l));break}case"list":{let h=d;i=i.concat(this.walkTokens(h.items,l));break}default:{let h=d;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[h.type]?this.defaults.extensions.childTokens[h.type].forEach(g=>{let m=h[g].flat(1/0);i=i.concat(this.walkTokens(m,l))}):h.tokens&&(i=i.concat(this.walkTokens(h.tokens,l)))}}return i}use(...s){let l=this.defaults.extensions||{renderers:{},childTokens:{}};return s.forEach(i=>{let r={...i};if(r.async=this.defaults.async||r.async||!1,i.extensions&&(i.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 g=o.renderer.apply(this,h);return g===!1&&(g=d.apply(this,h)),g}: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)}),r.extensions=l),i.renderer){let o=this.defaults.renderer||new wo(this.defaults);for(let d in i.renderer){if(!(d in o))throw new Error(`renderer '${d}' does not exist`);if(["options","parser"].includes(d))continue;let h=d,g=i.renderer[h],m=o[h];o[h]=(...b)=>{let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x||""}}r.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new ko(this.defaults);for(let d in i.tokenizer){if(!(d in o))throw new Error(`tokenizer '${d}' does not exist`);if(["options","rules","lexer"].includes(d))continue;let h=d,g=i.tokenizer[h],m=o[h];o[h]=(...b)=>{let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x}}r.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ac;for(let d in i.hooks){if(!(d in o))throw new Error(`hook '${d}' does not exist`);if(["options","block"].includes(d))continue;let h=d,g=i.hooks[h],m=o[h];Ac.passThroughHooks.has(d)?o[h]=b=>{if(this.defaults.async&&Ac.passThroughHooksRespectAsync.has(d))return(async()=>{let k=await g.call(o,b);return m.call(o,k)})();let x=g.call(o,b);return m.call(o,x)}:o[h]=(...b)=>{if(this.defaults.async)return(async()=>{let k=await g.apply(o,b);return k===!1&&(k=await m.apply(o,b)),k})();let x=g.apply(o,b);return x===!1&&(x=m.apply(o,b)),x}}r.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,d=i.walkTokens;r.walkTokens=function(h){let g=[];return g.push(d.call(this,h)),o&&(g=g.concat(o.call(this,h))),g}}this.defaults={...this.defaults,...r}}),this}setOptions(s){return this.defaults={...this.defaults,...s},this}lexer(s,l){return Jl.lex(s,l??this.defaults)}parser(s,l){return Fl.parse(s,l??this.defaults)}parseMarkdown(s){return(l,i)=>{let r={...i},o={...this.defaults,...r},d=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.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,g=await(o.hooks?await o.hooks.provideLexer(s):s?Jl.lex:Jl.lexInline)(h,o),m=o.hooks?await o.hooks.processAllTokens(g):g;o.walkTokens&&await Promise.all(this.walkTokens(m,o.walkTokens));let b=await(o.hooks?await o.hooks.provideParser(s):s?Fl.parse:Fl.parseInline)(m,o);return o.hooks?await o.hooks.postprocess(b):b})().catch(d);try{o.hooks&&(l=o.hooks.preprocess(l));let h=(o.hooks?o.hooks.provideLexer(s):s?Jl.lex:Jl.lexInline)(l,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let g=(o.hooks?o.hooks.provideParser(s):s?Fl.parse:Fl.parseInline)(h,o);return o.hooks&&(g=o.hooks.postprocess(g)),g}catch(h){return d(h)}}}onError(s,l){return i=>{if(i.message+=`
|
|
113
|
-
Please report this to https://github.com/markedjs/marked.`,s){let r="<p>An error occurred:</p><pre>"+ya(i.message+"",!0)+"</pre>";return l?Promise.resolve(r):r}if(l)return Promise.reject(i);throw i}}},ki=new Q_;function ht(s,l){return ki.parse(s,l)}ht.options=ht.setOptions=function(s){return ki.setOptions(s),ht.defaults=ki.defaults,Sb(ht.defaults),ht};ht.getDefaults=wh;ht.defaults=wi;ht.use=function(...s){return ki.use(...s),ht.defaults=ki.defaults,Sb(ht.defaults),ht};ht.walkTokens=function(s,l){return ki.walkTokens(s,l)};ht.parseInline=ki.parseInline;ht.Parser=Fl;ht.parser=Fl.parse;ht.Renderer=wo;ht.TextRenderer=Mh;ht.Lexer=Jl;ht.lexer=Jl.lex;ht.Tokenizer=ko;ht.Hooks=Ac;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;Fl.parse;Jl.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 oy(s,l){(l==null||l>s.length)&&(l=s.length);for(var i=0,r=Array(l);i<l;i++)r[i]=s[i];return r}function $_(s){if(Array.isArray(s))return s}function Z_(s,l){var i=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(i!=null){var r,o,d,h,g=[],m=!0,b=!1;try{if(d=(i=i.call(s)).next,l!==0)for(;!(m=(r=d.call(i)).done)&&(g.push(r.value),g.length!==l);m=!0);}catch(x){b=!0,o=x}finally{try{if(!m&&i.return!=null&&(h=i.return(),Object(h)!==h))return}finally{if(b)throw o}}return g}}function K_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
114
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J_(s,l){return $_(s)||Z_(s,l)||F_(s,l)||K_()}function F_(s,l){if(s){if(typeof s=="string")return oy(s,l);var i={}.toString.call(s).slice(8,-1);return i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set"?Array.from(s):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?oy(s,l):void 0}}const Mb=Object.entries,fy=Object.setPrototypeOf,W_=Object.isFrozen,P_=Object.getPrototypeOf,ev=Object.getOwnPropertyDescriptor;let zn=Object.freeze,Ln=Object.seal,or=Object.create,Ob=typeof Reflect<"u"&&Reflect,mh=Ob.apply,gh=Ob.construct;zn||(zn=function(l){return l});Ln||(Ln=function(l){return l});mh||(mh=function(l,i){for(var r=arguments.length,o=new Array(r>2?r-2:0),d=2;d<r;d++)o[d-2]=arguments[d];return l.apply(i,o)});gh||(gh=function(l){for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return new l(...r)});const rr=fn(Array.prototype.forEach),tv=fn(Array.prototype.lastIndexOf),dy=fn(Array.prototype.pop),cr=fn(Array.prototype.push),nv=fn(Array.prototype.splice),zs=Array.isArray,Cc=fn(String.prototype.toLowerCase),Zd=fn(String.prototype.toString),hy=fn(String.prototype.match),wc=fn(String.prototype.replace),py=fn(String.prototype.indexOf),lv=fn(String.prototype.trim),av=fn(Number.prototype.toString),sv=fn(Boolean.prototype.toString),my=typeof BigInt>"u"?null:fn(BigInt.prototype.toString),gy=typeof Symbol>"u"?null:fn(Symbol.prototype.toString),Nn=fn(Object.prototype.hasOwnProperty),jc=fn(Object.prototype.toString),jn=fn(RegExp.prototype.test),oi=iv(TypeError);function fn(s){return function(l){l instanceof RegExp&&(l.lastIndex=0);for(var i=arguments.length,r=new Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];return mh(s,l,r)}}function iv(s){return function(){for(var l=arguments.length,i=new Array(l),r=0;r<l;r++)i[r]=arguments[r];return gh(s,i)}}function lt(s,l){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Cc;if(fy&&fy(s,null),!zs(l))return s;let r=l.length;for(;r--;){let o=l[r];if(typeof o=="string"){const d=i(o);d!==o&&(W_(l)||(l[r]=d),o=d)}s[o]=!0}return s}function rv(s){for(let l=0;l<s.length;l++)Nn(s,l)||(s[l]=null);return s}function Jn(s){const l=or(null);for(const r of Mb(s)){var i=J_(r,2);const o=i[0],d=i[1];Nn(s,o)&&(zs(d)?l[o]=rv(d):d&&typeof d=="object"&&d.constructor===Object?l[o]=Jn(d):l[o]=d)}return l}function cv(s){switch(typeof s){case"string":return s;case"number":return av(s);case"boolean":return sv(s);case"bigint":return my?my(s):"0";case"symbol":return gy?gy(s):"Symbol()";case"undefined":return jc(s);case"function":case"object":{if(s===null)return jc(s);const l=s,i=ba(l,"toString");if(typeof i=="function"){const r=i(l);return typeof r=="string"?r:jc(r)}return jc(s)}default:return jc(s)}}function ba(s,l){for(;s!==null;){const r=ev(s,l);if(r){if(r.get)return fn(r.get);if(typeof r.value=="function")return fn(r.value)}s=P_(s)}function i(){return null}return i}function uv(s){try{return jn(s,""),!0}catch{return!1}}const yy=zn(["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"]),Kd=zn(["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"]),Jd=zn(["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"]),ov=zn(["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"]),Fd=zn(["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"]),fv=zn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),by=zn(["#text"]),xy=zn(["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"]),Wd=zn(["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"]),_y=zn(["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"]),so=zn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dv=Ln(/{{[\w\W]*|^[\w\W]*}}/g),hv=Ln(/<%[\w\W]*|^[\w\W]*%>/g),pv=Ln(/\${[\w\W]*/g),mv=Ln(/^data-[\-\w.\u00B7-\uFFFF]+$/),gv=Ln(/^aria-[\-\w]+$/),vy=Ln(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yv=Ln(/^(?:\w+script|data):/i),bv=Ln(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xv=Ln(/^html$/i),_v=Ln(/^[a-z][.\w]*(-[.\w]+)+$/i),Sy=Ln(/<[/\w!]/g),ky=Ln(/<[/\w]/g),vv=Ln(/<\/no(script|embed|frames)/i),Sv=Ln(/\/>/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},kv=function(){return typeof window>"u"?null:window},wv=function(l,i){if(typeof l!="object"||typeof l.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";i&&i.hasAttribute(o)&&(r=i.getAttribute(o));const d="dompurify"+(r?"#"+r:"");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}},wy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Rs=function(l,i,r,o){return Nn(l,i)&&zs(l[i])?lt(o.base?Jn(o.base):{},l[i],o.transform):r};function Db(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kv();const l=ue=>Db(ue);if(l.version="3.4.12",l.removed=[],!s||!s.document||s.document.nodeType!==kl.document||!s.Element)return l.isSupported=!1,l;let i=s.document;const r=i,o=r.currentScript;s.DocumentFragment;const d=s.HTMLTemplateElement,h=s.Node,g=s.Element,m=s.NodeFilter,b=s.NamedNodeMap;b===void 0&&(s.NamedNodeMap||s.MozNamedAttrMap),s.HTMLFormElement;const x=s.DOMParser,k=s.trustedTypes,_=g.prototype,C=ba(_,"cloneNode"),N=ba(_,"remove"),H=ba(_,"nextSibling"),B=ba(_,"childNodes"),K=ba(_,"parentNode"),O=ba(_,"shadowRoot"),$=ba(_,"attributes"),A=h&&h.prototype?ba(h.prototype,"nodeType"):null,Q=h&&h.prototype?ba(h.prototype,"nodeName"):null;if(typeof d=="function"){const ue=i.createElement("template");ue.content&&ue.content.ownerDocument&&(i=ue.content.ownerDocument)}let L,M="",W,re=!1,he=0;const F=function(){if(he>0)throw oi('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.')},ae=function(w){F(),he++;try{return L.createHTML(w)}finally{he--}},me=function(w){F(),he++;try{return L.createScriptURL(w)}finally{he--}},je=function(){return re||(W=wv(k,o),re=!0),W},pe=i,z=pe.implementation,P=pe.createNodeIterator,te=pe.createDocumentFragment,be=pe.getElementsByTagName,we=r.importNode;let j=wy();l.isSupported=typeof Mb=="function"&&typeof K=="function"&&z&&z.createHTMLDocument!==void 0;const V=dv,ce=hv,oe=pv,_e=mv,Ne=gv,Re=yv,it=bv,Ze=_v;let st=vy,qe=null;const Rt=lt({},[...yy,...Kd,...Jd,...Fd,...by]);let Je=null;const Ke=lt({},[...xy,...Wd,..._y,...so]);let Fe=Object.seal(or(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}})),dt=null,Fn=null;const qt=Object.seal(or(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tn=!0,xn=!0,dn=!1,Un=!0,Jt=!1,ut=!0,hn=!1,J=!1,fe=null,Te=null,Qe=!1,Nt=!1,Tt=!1,_n=!1,tn=!0,Gt=!1;const En="user-content-";let pt=!0,vn=!1,T={},Y=null;const xe=lt({},["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 Me=null;const Ue=lt({},["audio","video","img","source","image","track"]);let An=null;const Hl=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Yn="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",pn="http://www.w3.org/1999/xhtml";let Yt=pn,wl=!1,ka=null;const wa=lt({},[Yn,Hn,pn],Zd),qs=zn(["mi","mo","mn","ms","mtext"]);let Bl=lt({},qs);const Pa=zn(["annotation-xml"]);let ql=lt({},Pa);const ja=lt({},["title","style","font","a","script"]);let cl=null;const It=["application/xhtml+xml","text/html"],Mt="text/html";let Ge=null,mn=null;const ea=i.createElement("form"),Na=function(w){return w instanceof RegExp||w instanceof Function},ul=function(){let w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(mn&&mn===w)return;(!w||typeof w!="object")&&(w={}),w=Jn(w),cl=It.indexOf(w.PARSER_MEDIA_TYPE)===-1?Mt:w.PARSER_MEDIA_TYPE,Ge=cl==="application/xhtml+xml"?Zd:Cc,qe=Rs(w,"ALLOWED_TAGS",Rt,{transform:Ge}),Je=Rs(w,"ALLOWED_ATTR",Ke,{transform:Ge}),ka=Rs(w,"ALLOWED_NAMESPACES",wa,{transform:Zd}),An=Rs(w,"ADD_URI_SAFE_ATTR",Hl,{transform:Ge,base:Hl}),Me=Rs(w,"ADD_DATA_URI_TAGS",Ue,{transform:Ge,base:Ue}),Y=Rs(w,"FORBID_CONTENTS",xe,{transform:Ge}),dt=Rs(w,"FORBID_TAGS",Jn({}),{transform:Ge}),Fn=Rs(w,"FORBID_ATTR",Jn({}),{transform:Ge}),T=Nn(w,"USE_PROFILES")?w.USE_PROFILES&&typeof w.USE_PROFILES=="object"?Jn(w.USE_PROFILES):w.USE_PROFILES:!1,Tn=w.ALLOW_ARIA_ATTR!==!1,xn=w.ALLOW_DATA_ATTR!==!1,dn=w.ALLOW_UNKNOWN_PROTOCOLS||!1,Un=w.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Jt=w.SAFE_FOR_TEMPLATES||!1,ut=w.SAFE_FOR_XML!==!1,hn=w.WHOLE_DOCUMENT||!1,Nt=w.RETURN_DOM||!1,Tt=w.RETURN_DOM_FRAGMENT||!1,_n=w.RETURN_TRUSTED_TYPE||!1,Qe=w.FORCE_BODY||!1,tn=w.SANITIZE_DOM!==!1,Gt=w.SANITIZE_NAMED_PROPS||!1,pt=w.KEEP_CONTENT!==!1,vn=w.IN_PLACE||!1,st=uv(w.ALLOWED_URI_REGEXP)?w.ALLOWED_URI_REGEXP:vy,Yt=typeof w.NAMESPACE=="string"?w.NAMESPACE:pn,Bl=Nn(w,"MATHML_TEXT_INTEGRATION_POINTS")&&w.MATHML_TEXT_INTEGRATION_POINTS&&typeof w.MATHML_TEXT_INTEGRATION_POINTS=="object"?Jn(w.MATHML_TEXT_INTEGRATION_POINTS):lt({},qs),ql=Nn(w,"HTML_INTEGRATION_POINTS")&&w.HTML_INTEGRATION_POINTS&&typeof w.HTML_INTEGRATION_POINTS=="object"?Jn(w.HTML_INTEGRATION_POINTS):lt({},Pa);const U=Nn(w,"CUSTOM_ELEMENT_HANDLING")&&w.CUSTOM_ELEMENT_HANDLING&&typeof w.CUSTOM_ELEMENT_HANDLING=="object"?Jn(w.CUSTOM_ELEMENT_HANDLING):or(null);if(Fe=or(null),Nn(U,"tagNameCheck")&&Na(U.tagNameCheck)&&(Fe.tagNameCheck=U.tagNameCheck),Nn(U,"attributeNameCheck")&&Na(U.attributeNameCheck)&&(Fe.attributeNameCheck=U.attributeNameCheck),Nn(U,"allowCustomizedBuiltInElements")&&typeof U.allowCustomizedBuiltInElements=="boolean"&&(Fe.allowCustomizedBuiltInElements=U.allowCustomizedBuiltInElements),Ln(Fe),Jt&&(xn=!1),Tt&&(Nt=!0),T&&(qe=lt({},by),Je=or(null),T.html===!0&&(lt(qe,yy),lt(Je,xy)),T.svg===!0&&(lt(qe,Kd),lt(Je,Wd),lt(Je,so)),T.svgFilters===!0&&(lt(qe,Jd),lt(Je,Wd),lt(Je,so)),T.mathMl===!0&&(lt(qe,Fd),lt(Je,_y),lt(Je,so))),qt.tagCheck=null,qt.attributeCheck=null,Nn(w,"ADD_TAGS")&&(typeof w.ADD_TAGS=="function"?qt.tagCheck=w.ADD_TAGS:zs(w.ADD_TAGS)&&(qe===Rt&&(qe=Jn(qe)),lt(qe,w.ADD_TAGS,Ge))),Nn(w,"ADD_ATTR")&&(typeof w.ADD_ATTR=="function"?qt.attributeCheck=w.ADD_ATTR:zs(w.ADD_ATTR)&&(Je===Ke&&(Je=Jn(Je)),lt(Je,w.ADD_ATTR,Ge))),Nn(w,"ADD_URI_SAFE_ATTR")&&zs(w.ADD_URI_SAFE_ATTR)&<(An,w.ADD_URI_SAFE_ATTR,Ge),Nn(w,"FORBID_CONTENTS")&&zs(w.FORBID_CONTENTS)&&(Y===xe&&(Y=Jn(Y)),lt(Y,w.FORBID_CONTENTS,Ge)),Nn(w,"ADD_FORBID_CONTENTS")&&zs(w.ADD_FORBID_CONTENTS)&&(Y===xe&&(Y=Jn(Y)),lt(Y,w.ADD_FORBID_CONTENTS,Ge)),pt&&(qe["#text"]=!0),hn&<(qe,["html","head","body"]),qe.table&&(lt(qe,["tbody"]),delete dt.tbody),w.TRUSTED_TYPES_POLICY){if(typeof w.TRUSTED_TYPES_POLICY.createHTML!="function")throw oi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof w.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw oi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const se=L;L=w.TRUSTED_TYPES_POLICY;try{M=ae("")}catch(ve){throw L=se,ve}}else w.TRUSTED_TYPES_POLICY===null?(L=void 0,M=""):(L===void 0&&(L=je()),L&&typeof M=="string"&&(M=ae("")));zn&&zn(w),mn=w},In=lt({},[...Kd,...Jd,...ov]),ol=lt({},[...Fd,...fv]),fl=function(w,U,se){return U.namespaceURI===pn?w==="svg":U.namespaceURI===Yn?w==="svg"&&(se==="annotation-xml"||Bl[se]):!!In[w]},ta=function(w,U,se){return U.namespaceURI===pn?w==="math":U.namespaceURI===Hn?w==="math"&&ql[se]:!!ol[w]},Cn=function(w,U,se){return U.namespaceURI===Hn&&!ql[se]||U.namespaceURI===Yn&&!Bl[se]?!1:!ol[w]&&(ja[w]||!In[w])},dl=function(w){let U=K(w);(!U||!U.tagName)&&(U={namespaceURI:Yt,tagName:"template"});const se=Cc(w.tagName),ve=Cc(U.tagName);return ka[w.namespaceURI]?w.namespaceURI===Hn?fl(se,U,ve):w.namespaceURI===Yn?ta(se,U,ve):w.namespaceURI===pn?Cn(se,U,ve):!!(cl==="application/xhtml+xml"&&ka[w.namespaceURI]):!1},nn=function(w){cr(l.removed,{element:w});try{K(w).removeChild(w)}catch{if(N(w),!K(w))throw oi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},mt=function(w){Vn(w);const U=B(w);if(U){const ve=[];rr(U,Ae=>{cr(ve,Ae)}),rr(ve,Ae=>{try{N(Ae)}catch{}})}const se=$(w);if(se)for(let ve=se.length-1;ve>=0;--ve){const Ae=se[ve],ze=Ae&&Ae.name;if(typeof ze=="string")try{w.removeAttribute(ze)}catch{}}},Xn=function(w,U){try{cr(l.removed,{attribute:U.getAttributeNode(w),from:U})}catch{cr(l.removed,{attribute:null,from:U})}if(U.removeAttribute(w),w==="is")if(Nt||Tt)try{nn(U)}catch{}else try{U.setAttribute(w,"")}catch{}},ji=function(w){const U=$(w);if(U)for(let se=U.length-1;se>=0;--se){const ve=U[se],Ae=ve&&ve.name;if(!(typeof Ae!="string"||Je[Ge(Ae)]))try{w.removeAttribute(Ae)}catch{}}},Vn=function(w){const U=[w];for(;U.length>0;){const se=U.pop();(A?A(se):se.nodeType)===kl.element&&ji(se);const Ae=B(se);if(Ae)for(let ze=Ae.length-1;ze>=0;--ze)U.push(Ae[ze])}},hl=function(w){if(!ut)return;const U=[w];for(;U.length>0;){const se=U.pop(),ve=A?A(se):se.nodeType;if(ve===kl.processingInstruction||ve===kl.comment&&jn(ky,se.data)){try{N(se)}catch{}continue}if(ve===kl.element){const ze=se,wt=Ge(Q?Q(se):se.nodeName);try{ze.hasAttribute&&ze.hasAttribute("patchsrc")&&ze.removeAttribute("patchsrc"),ze.hasAttribute&&ze.hasAttribute("for")&&wt!=="label"&&wt!=="output"&&ze.removeAttribute("for")}catch{}}const Ae=B(se);if(Ae)for(let ze=Ae.length-1;ze>=0;--ze)U.push(Ae[ze])}},Gs=function(w){let U=null,se=null;if(Qe)w="<remove></remove>"+w;else{const ze=hy(w,/^[\r\n\t ]+/);se=ze&&ze[0]}cl==="application/xhtml+xml"&&Yt===pn&&(w='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+w+"</body></html>");const ve=L?ae(w):w;if(Yt===pn)try{U=new x().parseFromString(ve,cl)}catch{}if(!U||!U.documentElement){U=z.createDocument(Yt,"template",null);try{U.documentElement.innerHTML=wl?M:ve}catch{}}const Ae=U.body||U.documentElement;return w&&se&&Ae.insertBefore(i.createTextNode(se),Ae.childNodes[0]||null),Yt===pn?be.call(U,hn?"html":"body")[0]:hn?U.documentElement:Ae},na=function(w){return P.call(w.ownerDocument||w,w,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT|m.SHOW_PROCESSING_INSTRUCTION|m.SHOW_CDATA_SECTION,null)},la=function(w){return w=wc(w,V," "),w=wc(w,ce," "),w=wc(w,oe," "),w},pl=function(w){var U;w.normalize();const se=P.call(w.ownerDocument||w,w,m.SHOW_TEXT|m.SHOW_COMMENT|m.SHOW_CDATA_SECTION|m.SHOW_PROCESSING_INSTRUCTION,null);let ve=se.nextNode();for(;ve;)ve.data=la(ve.data),ve=se.nextNode();const Ae=(U=w.querySelectorAll)===null||U===void 0?void 0:U.call(w,"template");Ae&&rr(Ae,ze=>{ml(ze.content)&&pl(ze.content)})},Qn=function(w){const U=Q?Q(w):null;return typeof U!="string"||Ge(U)!=="form"?!1:typeof w.nodeName!="string"||typeof w.textContent!="string"||typeof w.removeChild!="function"||w.attributes!==$(w)||typeof w.removeAttribute!="function"||typeof w.setAttribute!="function"||typeof w.namespaceURI!="string"||typeof w.insertBefore!="function"||typeof w.hasChildNodes!="function"||w.nodeType!==A(w)||w.childNodes!==B(w)},ml=function(w){if(!A||typeof w!="object"||w===null)return!1;try{return A(w)===kl.documentFragment}catch{return!1}},gn=function(w){if(!A||typeof w!="object"||w===null)return!1;try{return typeof A(w)=="number"}catch{return!1}};function xt(ue,w,U){ue.length!==0&&rr(ue,se=>{se.call(l,w,U,mn)})}const es=function(w,U){return!!(ut&&w.hasChildNodes()&&!gn(w.firstElementChild)&&jn(Sy,w.textContent)&&jn(Sy,w.innerHTML)||ut&&w.namespaceURI===pn&&U==="style"&&gn(w.firstElementChild)||w.nodeType===kl.processingInstruction||ut&&w.nodeType===kl.comment&&jn(ky,w.data))},Ni=function(w,U){if(!dt[U]&&Ta(U)&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,U)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(U)))return!1;if(pt&&!Y[U]){const se=K(w),ve=B(w);if(ve&&se){const Ae=ve.length;for(let ze=Ae-1;ze>=0;--ze){const wt=vn?ve[ze]:C(ve[ze],!0);se.insertBefore(wt,H(w))}}}return nn(w),!0},Gl=function(w,U){if(xt(j.beforeSanitizeElements,w,null),w!==U&&K(w)===null)return!0;if(Qn(w))return nn(w),!0;const se=Ge(Q?Q(w):w.nodeName);if(xt(j.uponSanitizeElement,w,{tagName:se,allowedTags:qe}),w!==U&&K(w)===null)return!0;if(es(w,se))return nn(w),!0;if(dt[se]||!(qt.tagCheck instanceof Function&&qt.tagCheck(se))&&!qe[se]){const Ae=Ni(w,se);return Ae===!1&&xt(j.afterSanitizeElements,w,null),Ae}if((A?A(w):w.nodeType)===kl.element&&!dl(w)||(se==="noscript"||se==="noembed"||se==="noframes")&&jn(vv,w.innerHTML))return nn(w),!0;if(Jt&&w.nodeType===kl.text){const Ae=la(w.textContent);w.textContent!==Ae&&(cr(l.removed,{element:w.cloneNode()}),w.textContent=Ae)}return xt(j.afterSanitizeElements,w,null),!1},jl=function(w,U,se){if(Fn[U]||ut&&U==="patchsrc"||ut&&U==="for"&&w!=="label"&&w!=="output"||tn&&(U==="id"||U==="name")&&(se in i||se in ea))return!1;const ve=Je[U]||qt.attributeCheck instanceof Function&&qt.attributeCheck(U,w);if(!(xn&&jn(_e,U))){if(!(Tn&&jn(Ne,U))){if(ve){if(!An[U]){if(!jn(st,wc(se,it,""))){if(!((U==="src"||U==="xlink:href"||U==="href")&&w!=="script"&&py(se,"data:")===0&&Me[w])){if(!(dn&&!jn(Re,wc(se,it,"")))){if(se)return!1}}}}}else if(!(Ta(w)&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,w)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(w))&&(Fe.attributeNameCheck instanceof RegExp&&jn(Fe.attributeNameCheck,U)||Fe.attributeNameCheck instanceof Function&&Fe.attributeNameCheck(U,w))||U==="is"&&Fe.allowCustomizedBuiltInElements&&(Fe.tagNameCheck instanceof RegExp&&jn(Fe.tagNameCheck,se)||Fe.tagNameCheck instanceof Function&&Fe.tagNameCheck(se))))return!1}}return!0},aa=lt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ta=function(w){return!aa[Cc(w)]&&jn(Ze,w)},ln=function(w,U,se,ve){if(L&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!se)switch(k.getAttributeType(w,U)){case"TrustedHTML":return ae(ve);case"TrustedScriptURL":return me(ve)}return ve},Ys=function(w,U,se,ve){try{se?w.setAttributeNS(se,U,ve):w.setAttribute(U,ve),Qn(w)?nn(w):dy(l.removed)}catch{Xn(U,w)}},sa=function(w){xt(j.beforeSanitizeAttributes,w,null);const U=w.attributes;if(!U||Qn(w))return;const se={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Je,forceKeepAttr:void 0};let ve=U.length;const Ae=Ge(w.nodeName);for(;ve--;){const ze=U[ve],wt=ze.name,Zt=ze.namespaceURI,yn=ze.value,gt=Ge(wt),Ot=yn;let Xt=wt==="value"?Ot:lv(Ot);if(se.attrName=gt,se.attrValue=Xt,se.keepAttr=!0,se.forceKeepAttr=void 0,xt(j.uponSanitizeAttribute,w,se),Xt=se.attrValue,Gt&&(gt==="id"||gt==="name")&&py(Xt,En)!==0&&(Xn(wt,w),Xt=En+Xt),ut&&jn(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Xt)){Xn(wt,w);continue}if(gt==="attributename"&&hy(Xt,"href")){Xn(wt,w);continue}if(!se.forceKeepAttr){if(!se.keepAttr){Xn(wt,w);continue}if(!Un&&jn(Sv,Xt)){Xn(wt,w);continue}if(Jt&&(Xt=la(Xt)),!jl(Ae,gt,Xt)){Xn(wt,w);continue}Xt=ln(Ae,gt,Zt,Xt),Xt!==Ot&&Ys(w,wt,Zt,Xt)}}xt(j.afterSanitizeAttributes,w,null)},gl=function(w){let U=null;const se=na(w);for(xt(j.beforeSanitizeShadowDOM,w,null);U=se.nextNode();)if(xt(j.uponSanitizeShadowNode,U,null),Gl(U,w),sa(U),ml(U.content)&&gl(U.content),(A?A(U):U.nodeType)===kl.element){const Ae=O(U);ml(Ae)&&(Wn(Ae),gl(Ae))}xt(j.afterSanitizeShadowDOM,w,null)},Wn=function(w){const U=[{node:w,shadow:null}];for(;U.length>0;){const se=U.pop();if(se.shadow){gl(se.shadow);continue}const ve=se.node,ze=(A?A(ve):ve.nodeType)===kl.element,wt=B(ve);if(wt)for(let Zt=wt.length-1;Zt>=0;--Zt)U.push({node:wt[Zt],shadow:null});if(ze){const Zt=Q?Q(ve):null;if(typeof Zt=="string"&&Ge(Zt)==="template"){const yn=ve.content;ml(yn)&&U.push({node:yn,shadow:null})}}if(ze){const Zt=O(ve);ml(Zt)&&U.push({node:null,shadow:Zt},{node:Zt,shadow:null})}}};return l.sanitize=function(ue){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},U=null,se=null,ve=null,Ae=null;if(wl=!ue,wl&&(ue="<!-->"),typeof ue!="string"&&!gn(ue)&&(ue=cv(ue),typeof ue!="string"))throw oi("dirty is not a string, aborting");if(!l.isSupported)return ue;J?(qe=fe,Je=Te):ul(w),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(qe=Jn(qe)),j.uponSanitizeAttribute.length>0&&(Je=Jn(Je)),l.removed=[];const ze=vn&&typeof ue!="string"&&gn(ue);if(ze){hl(ue);const gt=Q?Q(ue):ue.nodeName;if(typeof gt=="string"){const Ot=Ge(gt);if(!qe[Ot]||dt[Ot])throw mt(ue),oi("root node is forbidden and cannot be sanitized in-place")}if(Qn(ue))throw mt(ue),oi("root node is clobbered and cannot be sanitized in-place");try{Wn(ue)}catch(Ot){throw mt(ue),Ot}}else if(gn(ue))U=Gs("<!---->"),se=U.ownerDocument.importNode(ue,!0),se.nodeType===kl.element&&se.nodeName==="BODY"||se.nodeName==="HTML"?U=se:U.appendChild(se),Wn(se);else{if(!Nt&&!Jt&&!hn&&ue.indexOf("<")===-1)return L&&_n?ae(ue):ue;if(U=Gs(ue),!U)return Nt?null:_n?M:""}U&&Qe&&nn(U.firstChild);const wt=ze?ue:U,Zt=na(wt);try{for(;ve=Zt.nextNode();)Gl(ve,wt),sa(ve),ml(ve.content)&&gl(ve.content)}catch(gt){throw ze&&(mt(ue),rr(l.removed,Ot=>{Ot.element&&Vn(Ot.element)})),gt}if(ze)return rr(l.removed,gt=>{gt.element&&Vn(gt.element)}),Jt&&pl(ue),ue;if(Nt){if(Jt&&pl(U),Tt)for(Ae=te.call(U.ownerDocument);U.firstChild;)Ae.appendChild(U.firstChild);else Ae=U;return(Je.shadowroot||Je.shadowrootmode)&&(Ae=we.call(r,Ae,!0)),Ae}let yn=hn?U.outerHTML:U.innerHTML;return hn&&qe["!doctype"]&&U.ownerDocument&&U.ownerDocument.doctype&&U.ownerDocument.doctype.name&&jn(xv,U.ownerDocument.doctype.name)&&(yn="<!DOCTYPE "+U.ownerDocument.doctype.name+`>
|
|
115
|
-
`+yn),Jt&&(yn=la(yn)),L&&_n?ae(yn):yn},l.setConfig=function(){let ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ul(ue),J=!0,fe=qe,Te=Je},l.clearConfig=function(){mn=null,J=!1,fe=null,Te=null,L=W,M=""},l.isValidAttribute=function(ue,w,U){mn||ul({});const se=Ge(ue),ve=Ge(w);return jl(se,ve,U)},l.addHook=function(ue,w){typeof w=="function"&&Nn(j,ue)&&cr(j[ue],w)},l.removeHook=function(ue,w){if(Nn(j,ue)){if(w!==void 0){const U=tv(j[ue],w);return U===-1?void 0:nv(j[ue],U,1)[0]}return dy(j[ue])}},l.removeHooks=function(ue){Nn(j,ue)&&(j[ue]=[])},l.removeAllHooks=function(){j=wy()},l}var jv=Db();const Nv=1024;let Tv=0;class Ul{constructor(l,i){this.from=l,this.to=i}}class Bt{constructor(l={}){this.id=Tv++,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=Pl.match(l)),i=>{let r=l(i);return r===void 0?null:[this,r]}}}Bt.closedBy=new Bt({deserialize:s=>s.split(" ")});Bt.openedBy=new Bt({deserialize:s=>s.split(" ")});Bt.group=new Bt({deserialize:s=>s.split(" ")});Bt.isolate=new Bt({deserialize:s=>{if(s&&s!="rtl"&&s!="ltr"&&s!="auto")throw new RangeError("Invalid value for isolate: "+s);return s||"auto"}});Bt.contextHash=new Bt({perNode:!0});Bt.lookAhead=new Bt({perNode:!0});Bt.mounted=new Bt({perNode:!0});class hr{constructor(l,i,r,o=!1){this.tree=l,this.overlay=i,this.parser=r,this.bracketed=o}static get(l){return l&&l.props&&l.props[Bt.mounted.id]}}const Ev=Object.create(null);class Pl{constructor(l,i,r,o=0){this.name=l,this.props=i,this.id=r,this.flags=o}static define(l){let i=l.props&&l.props.length?Object.create(null):Ev,r=(l.top?1:0)|(l.skipped?2:0)|(l.error?4:0)|(l.name==null?8:0),o=new Pl(l.name||"",i,l.id,r);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");i[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 i=this.prop(Bt.group);return i?i.indexOf(l)>-1:!1}return this.id==l}static match(l){let i=Object.create(null);for(let r in l)for(let o of r.split(" "))i[o]=l[r];return r=>{for(let o=r.prop(Bt.group),d=-1;d<(o?o.length:0);d++){let h=i[d<0?r.name:o[d]];if(h)return h}}}}Pl.none=new Pl("",Object.create(null),0,8);class zb{constructor(l){this.types=l;for(let i=0;i<l.length;i++)if(l[i].id!=i)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...l){let i=[];for(let r of this.types){let o=null;for(let d of l){let h=d(r);if(h){o||(o=Object.assign({},r.props));let g=h[1],m=h[0];m.combine&&m.id in o&&(g=m.combine(o[m.id],g)),o[m.id]=g}}i.push(o?new Pl(r.name,o,r.id,r.flags):r)}return new zb(i)}}const io=new WeakMap,jy=new WeakMap;var Ut;(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"})(Ut||(Ut={}));class rl{constructor(l,i,r,o,d){if(this.type=l,this.children=i,this.positions=r,this.length=o,this.props=null,d&&d.length){this.props=Object.create(null);for(let[h,g]of d)this.props[typeof h=="number"?h:h.id]=g}}toString(){let l=hr.get(this);if(l&&!l.overlay)return l.tree.toString();let i="";for(let r of this.children){let o=r.toString();o&&(i&&(i+=","),i+=o)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(i.length?"("+i+")":""):i}cursor(l=0){return new jo(this.topNode,l)}cursorAt(l,i=0,r=0){let o=io.get(this)||this.topNode,d=new jo(o);return d.moveTo(l,i),io.set(this,d._tree),d}get topNode(){return new Gn(this,0,0,null)}resolve(l,i=0){let r=Rc(io.get(this)||this.topNode,l,i,!1);return io.set(this,r),r}resolveInner(l,i=0){let r=Rc(jy.get(this)||this.topNode,l,i,!0);return jy.set(this,r),r}resolveStack(l,i=0){return Rv(this,l,i)}iterate(l){let{enter:i,leave:r,from:o=0,to:d=this.length}=l,h=l.mode||0,g=(h&Ut.IncludeAnonymous)>0;for(let m=this.cursor(h|Ut.IncludeAnonymous);;){let b=!1;if(m.from<=d&&m.to>=o&&(!g&&m.type.isAnonymous||i(m)!==!1)){if(m.firstChild())continue;b=!0}for(;b&&r&&(g||!m.type.isAnonymous)&&r(m),!m.nextSibling();){if(!m.parent())return;b=!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 i in this.props)l.push([+i,this.props[i]]);return l}balance(l={}){return this.children.length<=8?this:zh(Pl.none,this.children,this.positions,0,this.children.length,0,this.length,(i,r,o)=>new rl(this.type,i,r,o,this.propValues),l.makeTree||((i,r,o)=>new rl(Pl.none,i,r,o)))}static build(l){return Mv(l)}}rl.empty=new rl(Pl.none,[],[],0);class Oh{constructor(l,i){this.buffer=l,this.index=i}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 Oh(this.buffer,this.index)}}class Bs{constructor(l,i,r){this.buffer=l,this.length=i,this.set=r}get type(){return Pl.none}toString(){let l=[];for(let i=0;i<this.buffer.length;)l.push(this.childString(i)),i=this.buffer[i+3];return l.join(",")}childString(l){let i=this.buffer[l],r=this.buffer[l+3],o=this.set.types[i],d=o.name;if(/\W/.test(d)&&!o.isError&&(d=JSON.stringify(d)),l+=4,r==l)return d;let h=[];for(;l<r;)h.push(this.childString(l)),l=this.buffer[l+3];return d+"("+h.join(",")+")"}findChild(l,i,r,o,d){let{buffer:h}=this,g=-1;for(let m=l;m!=i&&!(Lb(d,o,h[m+1],h[m+2])&&(g=m,r>0));m=h[m+3]);return g}slice(l,i,r){let o=this.buffer,d=new Uint16Array(i-l),h=0;for(let g=l,m=0;g<i;){d[m++]=o[g++],d[m++]=o[g++]-r;let b=d[m++]=o[g++]-r;d[m++]=o[g++]-l,h=Math.max(h,b)}return new Bs(d,h,this.set)}}function Lb(s,l,i,r){switch(s){case-2:return i<l;case-1:return r>=l&&i<l;case 0:return i<l&&r>l;case 1:return i<=l&&r>l;case 2:return r>l;case 4:return!0}}function Rc(s,l,i,r){for(var o;s.from==s.to||(i<1?s.from>=l:s.from>l)||(i>-1?s.to<=l:s.to<l);){let h=!r&&s instanceof Gn&&s.index<0?null:s.parent;if(!h)return s;s=h}let d=r?0:Ut.IgnoreOverlays;if(r)for(let h=s,g=h.parent;g;h=g,g=h.parent)h instanceof Gn&&h.index<0&&((o=g.enter(l,i,d))===null||o===void 0?void 0:o.from)!=h.from&&(s=g);for(;;){let h=s.enter(l,i,d);if(!h)return s;s=h}}class Ub{cursor(l=0){return new jo(this,l)}getChild(l,i=null,r=null){let o=Ny(this,l,i,r);return o.length?o[0]:null}getChildren(l,i=null,r=null){return Ny(this,l,i,r)}resolve(l,i=0){return Rc(this,l,i,!1)}resolveInner(l,i=0){return Rc(this,l,i,!0)}matchContext(l){return yh(this.parent,l)}enterUnfinishedNodesBefore(l){let i=this.childBefore(l),r=this;for(;i;){let o=i.lastChild;if(!o||o.to!=i.to)break;o.type.isError&&o.from==o.to?(r=i,i=o.prevSibling):i=o}return r}get node(){return this}get next(){return this.parent}}class Gn extends Ub{constructor(l,i,r,o){super(),this._tree=l,this.from=i,this.index=r,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,i,r,o,d=0){for(let h=this;;){for(let{children:g,positions:m}=h._tree,b=i>0?g.length:-1;l!=b;l+=i){let x=g[l],k=m[l]+h.from,_;if(!(!(d&Ut.EnterBracketed&&x instanceof rl&&(_=hr.get(x))&&!_.overlay&&_.bracketed&&r>=k&&r<=k+x.length)&&!Lb(o,r,k,k+x.length))){if(x instanceof Bs){if(d&Ut.ExcludeBuffers)continue;let C=x.findChild(0,x.buffer.length,i,r-k,o);if(C>-1)return new Sa(new Av(h,x,l,k),null,C)}else if(d&Ut.IncludeAnonymous||!x.type.isAnonymous||Dh(x)){let C;if(!(d&Ut.IgnoreMounts)&&(C=hr.get(x))&&!C.overlay)return new Gn(C.tree,k,l,h);let N=new Gn(x,k,l,h);return d&Ut.IncludeAnonymous||!N.type.isAnonymous?N:N.nextChild(i<0?x.children.length-1:0,i,r,o,d)}}}if(d&Ut.IncludeAnonymous||!h.type.isAnonymous||(h.index>=0?l=h.index+i:l=i<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,i,r=0){let o;if(!(r&Ut.IgnoreOverlays)&&(o=hr.get(this._tree))&&o.overlay){let d=l-this.from,h=r&Ut.EnterBracketed&&o.bracketed;for(let{from:g,to:m}of o.overlay)if((i>0||h?g<=d:g<d)&&(i<0||h?m>=d:m>d))return new Gn(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,l,i,r)}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 Ny(s,l,i,r){let o=s.cursor(),d=[];if(!o.firstChild())return d;if(i!=null){for(let h=!1;!h;)if(h=o.type.is(i),!o.nextSibling())return d}for(;;){if(r!=null&&o.type.is(r))return d;if(o.type.is(l)&&d.push(o.node),!o.nextSibling())return r==null?d:[]}}function yh(s,l,i=l.length-1){for(let r=s;i>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(l[i]&&l[i]!=r.name)return!1;i--}}return!0}class Av{constructor(l,i,r,o){this.parent=l,this.buffer=i,this.index=r,this.start=o}}class Sa extends Ub{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,i,r){super(),this.context=l,this._parent=i,this.index=r,this.type=l.buffer.set.types[l.buffer.buffer[r]]}child(l,i,r){let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],l,i-this.context.start,r);return d<0?null:new Sa(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,i,r=0){if(r&Ut.ExcludeBuffers)return null;let{buffer:o}=this.context,d=o.findChild(this.index+4,o.buffer[this.index+3],i>0?1:-1,l-this.context.start,i);return d<0?null:new Sa(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,i=l.buffer[this.index+3];return i<(this._parent?l.buffer[this._parent.index+3]:l.buffer.length)?new Sa(this.context,this._parent,i):this.externalSibling(1)}get prevSibling(){let{buffer:l}=this.context,i=this._parent?this._parent.index+4:0;return this.index==i?this.externalSibling(-1):new Sa(this.context,this._parent,l.findChild(i,this.index,-1,0,4))}get tree(){return null}toTree(){let l=[],i=[],{buffer:r}=this.context,o=this.index+4,d=r.buffer[this.index+3];if(d>o){let h=r.buffer[this.index+1];l.push(r.slice(o,d,h)),i.push(0)}return new rl(this.type,l,i,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Hb(s){if(!s.length)return null;let l=0,i=s[0];for(let d=1;d<s.length;d++){let h=s[d];(h.from>i.from||h.to<i.to)&&(i=h,l=d)}let r=i instanceof Gn&&i.index<0?null:i.parent,o=s.slice();return r?o[l]=r:o.splice(l,1),new Cv(o,i)}class Cv{constructor(l,i){this.heads=l,this.node=i}get next(){return Hb(this.heads)}}function Rv(s,l,i){let r=s.resolveInner(l,i),o=null;for(let d=r instanceof Gn?r:r.context.parent;d;d=d.parent)if(d.index<0){let h=d.parent;(o||(o=[r])).push(h.resolve(l,i)),d=h}else{let h=hr.get(d.tree);if(h&&h.overlay&&h.overlay[0].from<=l&&h.overlay[h.overlay.length-1].to>=l){let g=new Gn(h.tree,h.overlay[0].from+d.from,-1,d);(o||(o=[r])).push(Rc(g,l,i,!1))}}return o?Hb(o):r}class jo{get name(){return this.type.name}constructor(l,i=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=i&~Ut.EnterBracketed,l instanceof Gn)this.yieldNode(l);else{this._tree=l.context.parent,this.buffer=l.context;for(let r=l._parent;r;r=r._parent)this.stack.unshift(r.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,i){this.index=l;let{start:r,buffer:o}=this.buffer;return this.type=i||o.set.types[o.buffer[l]],this.from=r+o.buffer[l+1],this.to=r+o.buffer[l+2],!0}yield(l){return l?l instanceof Gn?(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,i,r){if(!this.buffer)return this.yield(this._tree.nextChild(l<0?this._tree._tree.children.length-1:0,l,i,r,this.mode));let{buffer:o}=this.buffer,d=o.findChild(this.index+4,o.buffer[this.index+3],l,i-this.buffer.start,r);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,i,r=this.mode){return this.buffer?r&Ut.ExcludeBuffers?!1:this.enterChild(1,l,i):this.yield(this._tree.enter(l,i,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Ut.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let l=this.mode&Ut.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:i}=this.buffer,r=this.stack.length-1;if(l<0){let o=r<0?0:this.stack[r]+4;if(this.index!=o)return this.yieldBuf(i.findChild(o,this.index,-1,0,4))}else{let o=i.buffer[this.index+3];if(o<(r<0?i.buffer.length:i.buffer[this.stack[r]+3]))return this.yieldBuf(o)}return r<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 i,r,{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:i,parent:r}=o)}else({index:i,_parent:r}=this._tree);for(;r;{index:i,_parent:r}=r)if(i>-1)for(let d=i+l,h=l<0?-1:r._tree.children.length;d!=h;d+=l){let g=r._tree.children[d];if(this.mode&Ut.IncludeAnonymous||g instanceof Bs||!g.type.isAnonymous||Dh(g))return!1}return!0}move(l,i){if(i&&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,i=0){for(;(this.from==this.to||(i<1?this.from>=l:this.from>l)||(i>-1?this.to<=l:this.to<l))&&this.parent(););for(;this.enterChild(1,l,i););return this}get node(){if(!this.buffer)return this._tree;let l=this.bufferNode,i=null,r=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;i=h,r=d+1;break e}o=this.stack[--d]}for(let o=r;o<this.stack.length;o++)i=new Sa(this.buffer,i,this.stack[o]);return this.bufferNode=new Sa(this.buffer,i,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(l,i){for(let r=0;;){let o=!1;if(this.type.isAnonymous||l(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(o=!0)}for(;;){if(o&&i&&i(this),o=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,o=!0}}}matchContext(l){if(!this.buffer)return yh(this.node.parent,l);let{buffer:i}=this.buffer,{types:r}=i.set;for(let o=l.length-1,d=this.stack.length-1;o>=0;d--){if(d<0)return yh(this._tree,l,o);let h=r[i.buffer[this.stack[d]]];if(!h.isAnonymous){if(l[o]&&l[o]!=h.name)return!1;o--}}return!0}}function Dh(s){return s.children.some(l=>l instanceof Bs||!l.type.isAnonymous||Dh(l))}function Mv(s){var l;let{buffer:i,nodeSet:r,maxBufferLength:o=Nv,reused:d=[],minRepeatType:h=r.types.length}=s,g=Array.isArray(i)?new Oh(i,i.length):i,m=r.types,b=0,x=0;function k(Q,L,M,W,re,he){let{id:F,start:ae,end:me,size:je}=g,pe=x,z=b;if(je<0)if(g.next(),je==-1){let j=d[F];M.push(j),W.push(ae-Q);return}else if(je==-3){b=F;return}else if(je==-4){x=F;return}else throw new RangeError(`Unrecognized record size: ${je}`);let P=m[F],te,be,we=ae-Q;if(me-ae<=o&&(be=B(g.pos-L,re))){let j=new Uint16Array(be.size-be.skip),V=g.pos-be.size,ce=j.length;for(;g.pos>V;)ce=K(be.start,j,ce);te=new Bs(j,me-be.start,r),we=be.start-Q}else{let j=g.pos-je;g.next();let V=[],ce=[],oe=F>=h?F:-1,_e=0,Ne=me;for(;g.pos>j;)oe>=0&&g.id==oe&&g.size>=0?(g.end<=Ne-o&&(N(V,ce,ae,_e,g.end,Ne,oe,pe,z),_e=V.length,Ne=g.end),g.next()):he>2500?_(ae,j,V,ce):k(ae,j,V,ce,oe,he+1);if(oe>=0&&_e>0&&_e<V.length&&N(V,ce,ae,_e,ae,Ne,oe,pe,z),V.reverse(),ce.reverse(),oe>-1&&_e>0){let Re=C(P,z);te=zh(P,V,ce,0,V.length,0,me-ae,Re,Re)}else te=H(P,V,ce,me-ae,pe-me,z)}M.push(te),W.push(we)}function _(Q,L,M,W){let re=[],he=0,F=-1;for(;g.pos>L;){let{id:ae,start:me,end:je,size:pe}=g;if(pe>4)g.next();else{if(F>-1&&me<F)break;F<0&&(F=je-o),re.push(ae,me,je),he++,g.next()}}if(he){let ae=new Uint16Array(he*4),me=re[re.length-2];for(let je=re.length-3,pe=0;je>=0;je-=3)ae[pe++]=re[je],ae[pe++]=re[je+1]-me,ae[pe++]=re[je+2]-me,ae[pe++]=pe;M.push(new Bs(ae,re[2]-me,r)),W.push(me-Q)}}function C(Q,L){return(M,W,re)=>{let he=0,F=M.length-1,ae,me;if(F>=0&&(ae=M[F])instanceof rl){if(!F&&ae.type==Q&&ae.length==re)return ae;(me=ae.prop(Bt.lookAhead))&&(he=W[F]+ae.length+me)}return H(Q,M,W,re,he,L)}}function N(Q,L,M,W,re,he,F,ae,me){let je=[],pe=[];for(;Q.length>W;)je.push(Q.pop()),pe.push(L.pop()+M-re);Q.push(H(r.types[F],je,pe,he-re,ae-he,me)),L.push(re-M)}function H(Q,L,M,W,re,he,F){if(he){let ae=[Bt.contextHash,he];F=F?[ae].concat(F):[ae]}if(re>25){let ae=[Bt.lookAhead,re];F=F?[ae].concat(F):[ae]}return new rl(Q,L,M,W,F)}function B(Q,L){let M=g.fork(),W=0,re=0,he=0,F=M.end-o,ae={size:0,start:0,skip:0};e:for(let me=M.pos-Q;M.pos>me;){let je=M.size;if(M.id==L&&je>=0){ae.size=W,ae.start=re,ae.skip=he,he+=4,W+=4,M.next();continue}let pe=M.pos-je;if(je<0||pe<me||M.start<F)break;let z=M.id>=h?4:0,P=M.start;for(M.next();M.pos>pe;){if(M.size<0)if(M.size==-3||M.size==-4)z+=4;else break e;else M.id>=h&&(z+=4);M.next()}re=P,W+=je,he+=z}return(L<0||W==Q)&&(ae.size=W,ae.start=re,ae.skip=he),ae.size>4?ae:void 0}function K(Q,L,M){let{id:W,start:re,end:he,size:F}=g;if(g.next(),F>=0&&W<h){let ae=M;if(F>4){let me=g.pos-(F-4);for(;g.pos>me;)M=K(Q,L,M)}L[--M]=ae,L[--M]=he-Q,L[--M]=re-Q,L[--M]=W}else F==-3?b=W:F==-4&&(x=W);return M}let O=[],$=[];for(;g.pos>0;)k(s.start||0,s.bufferStart||0,O,$,-1,0);let A=(l=s.length)!==null&&l!==void 0?l:O.length?$[0]+O[0].length:0;return new rl(m[s.topID],O.reverse(),$.reverse(),A)}const Ty=new WeakMap;function _o(s,l){if(!s.isAnonymous||l instanceof Bs||l.type!=s)return 1;let i=Ty.get(l);if(i==null){i=1;for(let r of l.children){if(r.type!=s||!(r instanceof rl)){i=1;break}i+=_o(s,r)}Ty.set(l,i)}return i}function zh(s,l,i,r,o,d,h,g,m){let b=0;for(let N=r;N<o;N++)b+=_o(s,l[N]);let x=Math.ceil(b*1.5/8),k=[],_=[];function C(N,H,B,K,O){for(let $=B;$<K;){let A=$,Q=H[$],L=_o(s,N[$]);for($++;$<K;$++){let M=_o(s,N[$]);if(L+M>=x)break;L+=M}if($==A+1){if(L>x){let M=N[A];C(M.children,M.positions,0,M.children.length,H[A]+O);continue}k.push(N[A])}else{let M=H[$-1]+N[$-1].length-Q;k.push(zh(s,N,H,A,$,Q,M,null,m))}_.push(Q+O-d)}}return C(l,i,r,o,0),(g||m)(k,_,h)}class ow{constructor(){this.map=new WeakMap}setBuffer(l,i,r){let o=this.map.get(l);o||this.map.set(l,o=new Map),o.set(i,r)}getBuffer(l,i){let r=this.map.get(l);return r&&r.get(i)}set(l,i){l instanceof Sa?this.setBuffer(l.context.buffer,l.index,i):l instanceof Gn&&this.map.set(l.tree,i)}get(l){return l instanceof Sa?this.getBuffer(l.context.buffer,l.index):l instanceof Gn?this.map.get(l.tree):void 0}cursorSet(l,i){l.buffer?this.setBuffer(l.buffer.buffer,l.index,i):this.map.set(l.tree,i)}cursorGet(l){return l.buffer?this.getBuffer(l.buffer.buffer,l.index):this.map.get(l.tree)}}class Mc{constructor(l,i,r,o,d=!1,h=!1){this.from=l,this.to=i,this.tree=r,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,i=[],r=!1){let o=[new Mc(0,l.length,l,0,!1,r)];for(let d of i)d.to>l.length&&o.push(d);return o}static applyChanges(l,i,r=128){if(!i.length)return l;let o=[],d=1,h=l.length?l[0]:null;for(let g=0,m=0,b=0;;g++){let x=g<i.length?i[g]:null,k=x?x.fromA:1e9;if(k-m>=r)for(;h&&h.from<k;){let _=h;if(m>=_.from||k<=_.to||b){let C=Math.max(_.from,m)-b,N=Math.min(_.to,k)-b;_=C>=N?null:new Mc(C,N,_.tree,_.offset+b,g>0,!!x)}if(_&&o.push(_),h.to>k)break;h=d<l.length?l[d++]:null}if(!x)break;m=x.toA,b=x.toA-x.toB}return o}}class fw{startParse(l,i,r){return typeof l=="string"&&(l=new Ov(l)),r=r?r.length?r.map(o=>new Ul(o.from,o.to)):[new Ul(0,0)]:[new Ul(0,l.length)],this.createParse(l,i||[],r)}parse(l,i,r){let o=this.startParse(l,i,r);for(;;){let d=o.advance();if(d)return d}}}class Ov{constructor(l){this.string=l}get length(){return this.string.length}chunk(l){return this.string.slice(l)}get lineChunks(){return!1}read(l,i){return this.string.slice(l,i)}}function dw(s){return(l,i,r,o)=>new zv(l,s,i,r,o)}class Ey{constructor(l,i,r,o,d,h){this.parser=l,this.parse=i,this.overlay=r,this.bracketed=o,this.target=d,this.from=h}}function Ay(s){if(!s.length||s.some(l=>l.from>=l.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(s))}class Dv{constructor(l,i,r,o,d,h,g,m){this.parser=l,this.predicate=i,this.mounts=r,this.index=o,this.start=d,this.bracketed=h,this.target=g,this.prev=m,this.depth=0,this.ranges=[]}}const bh=new Bt({perNode:!0});class zv{constructor(l,i,r,o,d){this.nest=i,this.input=r,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 r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let o of this.inner)o.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new rl(r.type,r.children,r.positions,r.length,r.propValues.concat([[bh,this.stoppedAt]]))),r}let l=this.inner[this.innerDone],i=l.parse.advance();if(i){this.innerDone++;let r=Object.assign(Object.create(null),l.target.props);r[Bt.mounted.id]=new hr(i,l.overlay,l.parser,l.bracketed),l.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let l=this.input.length;for(let i=this.innerDone;i<this.inner.length;i++)this.inner[i].from<l&&(l=Math.min(l,this.inner[i].parse.parsedPos));return l}stopAt(l){if(this.stoppedAt=l,this.baseParse)this.baseParse.stopAt(l);else for(let i=this.innerDone;i<this.inner.length;i++)this.inner[i].parse.stopAt(l)}startInner(){let l=new Hv(this.fragments),i=null,r=null,o=new jo(new Gn(this.baseTree,this.ranges[0].from,0,null),Ut.IncludeAnonymous|Ut.IgnoreMounts);e:for(let d,h;;){let g=!0,m;if(this.stoppedAt!=null&&o.from>=this.stoppedAt)g=!1;else if(l.hasNode(o)){if(i){let b=i.mounts.find(x=>x.frag.from<=o.from&&x.frag.to>=o.to&&x.mount.overlay);if(b)for(let x of b.mount.overlay){let k=x.from+b.pos,_=x.to+b.pos;k>=o.from&&_<=o.to&&!i.ranges.some(C=>C.from<_&&C.to>k)&&i.ranges.push({from:k,to:_})}}g=!1}else if(r&&(h=Lv(r.ranges,o.from,o.to)))g=h!=2;else if(!o.type.isAnonymous&&(d=this.nest(o,this.input))&&(o.from<o.to||!d.overlay)){o.tree||(Uv(o),i&&i.depth++,r&&r.depth++);let b=l.findMounts(o.from,d.parser);if(typeof d.overlay=="function")i=new Dv(d.parser,d.overlay,b,this.inner.length,o.from,!!d.bracketed,o.tree,i);else{let x=My(this.ranges,d.overlay||(o.from<o.to?[new Ul(o.from,o.to)]:[]));x.length&&Ay(x),(x.length||!d.overlay)&&this.inner.push(new Ey(d.parser,x.length?d.parser.startParse(this.input,Oy(b,x),x):d.parser.startParse(""),d.overlay?d.overlay.map(k=>new Ul(k.from-o.from,k.to-o.from)):null,!!d.bracketed,o.tree,x.length?x[0].from:o.from)),d.overlay?x.length&&(r={ranges:x,depth:0,prev:r}):g=!1}}else if(i&&(m=i.predicate(o))&&(m===!0&&(m=new Ul(o.from,o.to)),m.from<m.to)){let b=i.ranges.length-1;b>=0&&i.ranges[b].to==m.from?i.ranges[b]={from:i.ranges[b].from,to:m.to}:i.ranges.push(m)}if(g&&o.firstChild())i&&i.depth++,r&&r.depth++;else for(;!o.nextSibling();){if(!o.parent())break e;if(i&&!--i.depth){let b=My(this.ranges,i.ranges);b.length&&(Ay(b),this.inner.splice(i.index,0,new Ey(i.parser,i.parser.startParse(this.input,Oy(i.mounts,b),b),i.ranges.map(x=>new Ul(x.from-i.start,x.to-i.start)),i.bracketed,i.target,b[0].from))),i=i.prev}r&&!--r.depth&&(r=r.prev)}}}}function Lv(s,l,i){for(let r of s){if(r.from>=i)break;if(r.to>l)return r.from<=l&&r.to>=i?2:1}return 0}function Cy(s,l,i,r,o,d){if(l<i){let h=s.buffer[l+1];r.push(s.slice(l,i,h)),o.push(h-d)}}function Uv(s){let{node:l}=s,i=[],r=l.context.buffer;do i.push(s.index),s.parent();while(!s.tree);let o=s.tree,d=o.children.indexOf(r),h=o.children[d],g=h.buffer,m=[d];function b(x,k,_,C,N,H){let B=i[H],K=[],O=[];Cy(h,x,B,K,O,C);let $=g[B+1],A=g[B+2];m.push(K.length);let Q=H?b(B+4,g[B+3],h.set.types[g[B]],$,A-$,H-1):l.toTree();return K.push(Q),O.push($-C),Cy(h,g[B+3],k,K,O,C),new rl(_,K,O,N)}o.children[d]=b(0,g.length,Pl.none,0,h.length,i.length-1);for(let x of m){let k=s.tree.children[x],_=s.tree.positions[x];s.yield(new Gn(k,_+s.from,x,s._tree))}}class Ry{constructor(l,i){this.offset=i,this.done=!1,this.cursor=l.cursor(Ut.IncludeAnonymous|Ut.IgnoreMounts)}moveTo(l){let{cursor:i}=this,r=l-this.offset;for(;!this.done&&i.from<r;)if(!(i.to>=l&&i.enter(r,1,Ut.IgnoreOverlays|Ut.ExcludeBuffers)))if(i.to<=l)i.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 i=this.cursor.tree;;){if(i==l.tree)return!0;if(i.children.length&&i.positions[0]==0&&i.children[0]instanceof rl)i=i.children[0];else break}return!1}}class Hv{constructor(l){var i;if(this.fragments=l,this.curTo=0,this.fragI=0,l.length){let r=this.curFrag=l[0];this.curTo=(i=r.tree.prop(bh))!==null&&i!==void 0?i:r.to,this.inner=new Ry(r.tree,-r.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 i=this.curFrag=this.fragments[this.fragI];this.curTo=(l=i.tree.prop(bh))!==null&&l!==void 0?l:i.to,this.inner=new Ry(i.tree,-i.offset)}}findMounts(l,i){var r;let o=[];if(this.inner){this.inner.cursor.moveTo(l,1);for(let d=this.inner.cursor.node;d;d=d.parent){let h=(r=d.tree)===null||r===void 0?void 0:r.prop(Bt.mounted);if(h&&h.parser==i)for(let g=this.fragI;g<this.fragments.length;g++){let m=this.fragments[g];if(m.from>=d.to)break;m.tree==this.curFrag.tree&&o.push({frag:m,pos:d.from-m.offset,mount:h})}}}return o}}function My(s,l){let i=null,r=l;for(let o=1,d=0;o<s.length;o++){let h=s[o-1].to,g=s[o].from;for(;d<r.length;d++){let m=r[d];if(m.from>=g)break;m.to<=h||(i||(r=i=l.slice()),m.from<h?(i[d]=new Ul(m.from,h),m.to>g&&i.splice(d+1,0,new Ul(g,m.to))):m.to>g?i[d--]=new Ul(g,m.to):i.splice(d--,1))}}return r}function Bv(s,l,i,r){let o=0,d=0,h=!1,g=!1,m=-1e9,b=[];for(;;){let x=o==s.length?1e9:h?s[o].to:s[o].from,k=d==l.length?1e9:g?l[d].to:l[d].from;if(h!=g){let _=Math.max(m,i),C=Math.min(x,k,r);_<C&&b.push(new Ul(_,C))}if(m=Math.min(x,k),m==1e9)break;x==m&&(h?(h=!1,o++):h=!0),k==m&&(g?(g=!1,d++):g=!0)}return b}function Oy(s,l){let i=[];for(let{pos:r,mount:o,frag:d}of s){let h=r+(o.overlay?o.overlay[0].from:0),g=h+o.tree.length,m=Math.max(d.from,h),b=Math.min(d.to,g);if(o.overlay){let x=o.overlay.map(_=>new Ul(_.from+r,_.to+r)),k=Bv(l,x,m,b);for(let _=0,C=m;;_++){let N=_==k.length,H=N?b:k[_].from;if(H>C&&i.push(new Mc(C,H,o.tree,-h,d.from>=C||d.openStart,d.to<=H||d.openEnd)),N)break;C=k[_].to}}else i.push(new Mc(m,b,o.tree,-h,d.from>=h||d.openStart,d.to<=g||d.openEnd))}return i}let qv=0;class Ll{constructor(l,i,r,o){this.name=l,this.set=i,this.base=r,this.modified=o,this.id=qv++}toString(){let{name:l}=this;for(let i of this.modified)i.name&&(l=`${i.name}(${l})`);return l}static define(l,i){let r=typeof l=="string"?l:"?";if(l instanceof Ll&&(i=l),i!=null&&i.base)throw new Error("Can not derive from a modified tag");let o=new Ll(r,[],null,[]);if(o.set.push(o),i)for(let d of i.set)o.set.push(d);return o}static defineModifier(l){let i=new No(l);return r=>r.modified.indexOf(i)>-1?r:No.get(r.base||r,r.modified.concat(i).sort((o,d)=>o.id-d.id))}}let Gv=0;class No{constructor(l){this.name=l,this.instances=[],this.id=Gv++}static get(l,i){if(!i.length)return l;let r=i[0].instances.find(g=>g.base==l&&Yv(i,g.modified));if(r)return r;let o=[],d=new Ll(l.name,o,l,i);for(let g of i)g.instances.push(d);let h=Iv(i);for(let g of l.set)if(!g.modified.length)for(let m of h)o.push(No.get(g,m));return d}}function Yv(s,l){return s.length==l.length&&s.every((i,r)=>i==l[r])}function Iv(s){let l=[[]];for(let i=0;i<s.length;i++)for(let r=0,o=l.length;r<o;r++)l.push(l[r].concat(s[i]));return l.sort((i,r)=>r.length-i.length)}function hw(s){let l=Object.create(null);for(let i in s){let r=s[i];Array.isArray(r)||(r=[r]);for(let o of i.split(" "))if(o){let d=[],h=2,g=o;for(let k=0;;){if(g=="..."&&k>0&&k+3==o.length){h=1;break}let _=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(g);if(!_)throw new RangeError("Invalid path: "+o);if(d.push(_[0]=="*"?"":_[0][0]=='"'?JSON.parse(_[0]):_[0]),k+=_[0].length,k==o.length)break;let C=o[k++];if(k==o.length&&C=="!"){h=0;break}if(C!="/")throw new RangeError("Invalid path: "+o);g=o.slice(k)}let m=d.length-1,b=d[m];if(!b)throw new RangeError("Invalid path: "+o);let x=new Oc(r,h,m>0?d.slice(0,m):null);l[b]=x.sort(l[b])}}return Bb.add(l)}const Bb=new Bt({combine(s,l){let i,r,o;for(;s||l;){if(!s||l&&s.depth>=l.depth?(o=l,l=l.next):(o=s,s=s.next),i&&i.mode==o.mode&&!o.context&&!i.context)continue;let d=new Oc(o.tags,o.mode,o.context);i?i.next=d:r=d,i=d}return r}});class Oc{constructor(l,i,r,o){this.tags=l,this.mode=i,this.context=r,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}}Oc.empty=new Oc([],2,null);function qb(s,l){let i=Object.create(null);for(let d of s)if(!Array.isArray(d.tag))i[d.tag.id]=d.class;else for(let h of d.tag)i[h.id]=d.class;let{scope:r,all:o=null}=l||{};return{style:d=>{let h=o;for(let g of d)for(let m of g.set){let b=i[m.id];if(b){h=h?h+" "+b:b;break}}return h},scope:r}}function Xv(s,l){let i=null;for(let r of s){let o=r.style(l);o&&(i=i?i+" "+o:o)}return i}function Vv(s,l,i,r=0,o=s.length){let d=new $v(r,Array.isArray(l)?l:[l],i);d.highlightRange(s.cursor(),r,o,"",d.highlighters),d.flush(o)}function Qv(s,l,i,r,o,d=0,h=s.length){let g=d;function m(b,x){if(!(b<=g)){for(let k=s.slice(g,b),_=0;;){let C=k.indexOf(`
|
|
116
|
-
`,_),N=C<0?k.length:C;if(N>_&&r(k.slice(_,N),x),C<0)break;o(),_=C+1}g=b}}Vv(l,i,(b,x,k)=>{m(b,""),m(x,k)},d,h),m(h,"")}class $v{constructor(l,i,r){this.at=l,this.highlighters=i,this.span=r,this.class=""}startSpan(l,i){i!=this.class&&(this.flush(l),l>this.at&&(this.at=l),this.class=i)}flush(l){l>this.at&&this.class&&this.span(this.at,l,this.class)}highlightRange(l,i,r,o,d){let{type:h,from:g,to:m}=l;if(g>=r||m<=i)return;h.isTop&&(d=this.highlighters.filter(C=>!C.scope||C.scope(h)));let b=o,x=Zv(l)||Oc.empty,k=Xv(d,x.tags);if(k&&(b&&(b+=" "),b+=k,x.mode==1&&(o+=(o?" ":"")+k)),this.startSpan(Math.max(i,g),b),x.opaque)return;let _=l.tree&&l.tree.prop(Bt.mounted);if(_&&_.overlay){let C=l.node.enter(_.overlay[0].from+g,1),N=this.highlighters.filter(B=>!B.scope||B.scope(_.tree.type)),H=l.firstChild();for(let B=0,K=g;;B++){let O=B<_.overlay.length?_.overlay[B]:null,$=O?O.from+g:m,A=Math.max(i,K),Q=Math.min(r,$);if(A<Q&&H)for(;l.from<Q&&(this.highlightRange(l,A,Q,o,d),this.startSpan(Math.min(Q,l.to),b),!(l.to>=$||!l.nextSibling())););if(!O||$>r)break;K=O.to+g,K>i&&(this.highlightRange(C.cursor(),Math.max(i,O.from+g),Math.min(r,K),"",N),this.startSpan(Math.min(r,K),b))}H&&l.parent()}else if(l.firstChild()){_&&(o="");do if(!(l.to<=i)){if(l.from>=r)break;this.highlightRange(l,i,r,o,d),this.startSpan(Math.min(r,l.to),b)}while(l.nextSibling());l.parent()}}}function Zv(s){let l=s.type.prop(Bb);for(;l&&l.context&&!s.matchContext(l.context);)l=l.next;return l||null}const ge=Ll.define,ro=ge(),Os=ge(),Dy=ge(Os),zy=ge(Os),Ds=ge(),co=ge(Ds),Pd=ge(Ds),xa=ge(),fi=ge(xa),pa=ge(),ma=ge(),xh=ge(),Nc=ge(xh),uo=ge(),ye={comment:ro,lineComment:ge(ro),blockComment:ge(ro),docComment:ge(ro),name:Os,variableName:ge(Os),typeName:Dy,tagName:ge(Dy),propertyName:zy,attributeName:ge(zy),className:ge(Os),labelName:ge(Os),namespace:ge(Os),macroName:ge(Os),literal:Ds,string:co,docString:ge(co),character:ge(co),attributeValue:ge(co),number:Pd,integer:ge(Pd),float:ge(Pd),bool:ge(Ds),regexp:ge(Ds),escape:ge(Ds),color:ge(Ds),url:ge(Ds),keyword:pa,self:ge(pa),null:ge(pa),atom:ge(pa),unit:ge(pa),modifier:ge(pa),operatorKeyword:ge(pa),controlKeyword:ge(pa),definitionKeyword:ge(pa),moduleKeyword:ge(pa),operator:ma,derefOperator:ge(ma),arithmeticOperator:ge(ma),logicOperator:ge(ma),bitwiseOperator:ge(ma),compareOperator:ge(ma),updateOperator:ge(ma),definitionOperator:ge(ma),typeOperator:ge(ma),controlOperator:ge(ma),punctuation:xh,separator:ge(xh),bracket:Nc,angleBracket:ge(Nc),squareBracket:ge(Nc),paren:ge(Nc),brace:ge(Nc),content:xa,heading:fi,heading1:ge(fi),heading2:ge(fi),heading3:ge(fi),heading4:ge(fi),heading5:ge(fi),heading6:ge(fi),contentSeparator:ge(xa),list:ge(xa),quote:ge(xa),emphasis:ge(xa),strong:ge(xa),link:ge(xa),monospace:ge(xa),strikethrough:ge(xa),inserted:ge(),deleted:ge(),changed:ge(),invalid:ge(),meta:uo,documentMeta:ge(uo),annotation:ge(uo),processingInstruction:ge(uo),definition:Ll.defineModifier("definition"),constant:Ll.defineModifier("constant"),function:Ll.defineModifier("function"),standard:Ll.defineModifier("standard"),local:Ll.defineModifier("local"),special:Ll.defineModifier("special")};for(let s in ye){let l=ye[s];l instanceof Ll&&(l.name=s)}qb([{tag:ye.link,class:"tok-link"},{tag:ye.heading,class:"tok-heading"},{tag:ye.emphasis,class:"tok-emphasis"},{tag:ye.strong,class:"tok-strong"},{tag:ye.keyword,class:"tok-keyword"},{tag:ye.atom,class:"tok-atom"},{tag:ye.bool,class:"tok-bool"},{tag:ye.url,class:"tok-url"},{tag:ye.labelName,class:"tok-labelName"},{tag:ye.inserted,class:"tok-inserted"},{tag:ye.deleted,class:"tok-deleted"},{tag:ye.literal,class:"tok-literal"},{tag:ye.string,class:"tok-string"},{tag:ye.number,class:"tok-number"},{tag:[ye.regexp,ye.escape,ye.special(ye.string)],class:"tok-string2"},{tag:ye.variableName,class:"tok-variableName"},{tag:ye.local(ye.variableName),class:"tok-variableName tok-local"},{tag:ye.definition(ye.variableName),class:"tok-variableName tok-definition"},{tag:ye.special(ye.variableName),class:"tok-variableName2"},{tag:ye.definition(ye.propertyName),class:"tok-propertyName tok-definition"},{tag:ye.typeName,class:"tok-typeName"},{tag:ye.namespace,class:"tok-namespace"},{tag:ye.className,class:"tok-className"},{tag:ye.macroName,class:"tok-macroName"},{tag:ye.propertyName,class:"tok-propertyName"},{tag:ye.operator,class:"tok-operator"},{tag:ye.comment,class:"tok-comment"},{tag:ye.meta,class:"tok-meta"},{tag:ye.invalid,class:"tok-invalid"},{tag:ye.punctuation,class:"tok-punctuation"}]);const Kv="modulepreload",Jv=function(s,l){return new URL(s,l).href},Ly={},Xe=function(l,i,r){let o=Promise.resolve();if(i&&i.length>0){let h=function(x){return Promise.all(x.map(k=>Promise.resolve(k).then(_=>({status:"fulfilled",value:_}),_=>({status:"rejected",reason:_}))))};const g=document.getElementsByTagName("link"),m=document.querySelector("meta[property=csp-nonce]"),b=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=h(i.map(x=>{if(x=Jv(x,r),x in Ly)return;Ly[x]=!0;const k=x.endsWith(".css"),_=k?'[rel="stylesheet"]':"";if(!!r)for(let H=g.length-1;H>=0;H--){const B=g[H];if(B.href===x&&(!k||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${x}"]${_}`))return;const N=document.createElement("link");if(N.rel=k?"stylesheet":Kv,k||(N.as="script"),N.crossOrigin="",N.href=x,b&&N.setAttribute("nonce",b),document.head.appendChild(N),k)return new Promise((H,B)=>{N.addEventListener("load",H),N.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${x}`)))})}))}function d(h){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=h,window.dispatchEvent(g),!g.defaultPrevented)throw h}return o.then(h=>{for(const g of h||[])g.status==="rejected"&&d(g.reason);return l().catch(d)})},Gb={js:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),cjs:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),mjs:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript(),jsx:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({jsx:!0}),ts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),mts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),cts:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0}),tsx:async()=>(await Xe(async()=>{const{javascript:s}=await import("./index-DdAPIomJ.js");return{javascript:s}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).javascript({typescript:!0,jsx:!0}),json:async()=>(await Xe(async()=>{const{json:s}=await import("./index-qPJ6SIgP.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),jsonc:async()=>(await Xe(async()=>{const{json:s}=await import("./index-qPJ6SIgP.js");return{json:s}},__vite__mapDeps([6,1,2,3,4]),import.meta.url)).json(),css:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BQi6QI7Z.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),scss:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BQi6QI7Z.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),less:async()=>(await Xe(async()=>{const{css:s}=await import("./index-BQi6QI7Z.js");return{css:s}},__vite__mapDeps([7,1,2,3,4]),import.meta.url)).css(),html:async()=>(await Xe(async()=>{const{html:s}=await import("./index-CjAk3Yb0.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),htm:async()=>(await Xe(async()=>{const{html:s}=await import("./index-CjAk3Yb0.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),vue:async()=>(await Xe(async()=>{const{html:s}=await import("./index-CjAk3Yb0.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),svelte:async()=>(await Xe(async()=>{const{html:s}=await import("./index-CjAk3Yb0.js");return{html:s}},__vite__mapDeps([8,1,7,2,3,4,0,5]),import.meta.url)).html(),md:async()=>(await Xe(async()=>{const{markdown:s}=await import("./index-C9yuVPI-.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),markdown:async()=>(await Xe(async()=>{const{markdown:s}=await import("./index-C9yuVPI-.js");return{markdown:s}},__vite__mapDeps([9,3,4,2,5,8,1,7,0]),import.meta.url)).markdown(),py:async()=>(await Xe(async()=>{const{python:s}=await import("./index-Y1vKLu9k.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),pyi:async()=>(await Xe(async()=>{const{python:s}=await import("./index-Y1vKLu9k.js");return{python:s}},__vite__mapDeps([10,1,2,3,4,5]),import.meta.url)).python(),yaml:async()=>(await Xe(async()=>{const{yaml:s}=await import("./index-DGCeaXoo.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),yml:async()=>(await Xe(async()=>{const{yaml:s}=await import("./index-DGCeaXoo.js");return{yaml:s}},__vite__mapDeps([11,1,2,3,4]),import.meta.url)).yaml(),rs:async()=>(await Xe(async()=>{const{rust:s}=await import("./index-Dbr7EU2n.js");return{rust:s}},__vite__mapDeps([12,1,2,3,4]),import.meta.url)).rust(),c:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-By-XqFTs.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),h:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-By-XqFTs.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cc:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-By-XqFTs.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),cpp:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-By-XqFTs.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),hpp:async()=>(await Xe(async()=>{const{cpp:s}=await import("./index-By-XqFTs.js");return{cpp:s}},__vite__mapDeps([13,1,2,3,4]),import.meta.url)).cpp(),java:async()=>(await Xe(async()=>{const{java:s}=await import("./index-DEFc0MJB.js");return{java:s}},__vite__mapDeps([14,1,2,3,4]),import.meta.url)).java(),go:async()=>(await Xe(async()=>{const{go:s}=await import("./index-CqqEs8q5.js");return{go:s}},__vite__mapDeps([15,1,2,3,4,5]),import.meta.url)).go(),php:async()=>(await Xe(async()=>{const{php:s}=await import("./index-C_UZRXvz.js");return{php:s}},__vite__mapDeps([16,1,8,7,2,3,4,0,5]),import.meta.url)).php(),sql:async()=>(await Xe(async()=>{const{sql:s}=await import("./index-DYzVllNN.js");return{sql:s}},__vite__mapDeps([17,2,3,4,1,5]),import.meta.url)).sql(),xml:async()=>(await Xe(async()=>{const{xml:s}=await import("./index-Dr8ovngt.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml(),svg:async()=>(await Xe(async()=>{const{xml:s}=await import("./index-Dr8ovngt.js");return{xml:s}},__vite__mapDeps([18,1,2,3,4]),import.meta.url)).xml()},Fv={".mcp.json":"json",dockerfile:"yaml",makefile:"yaml"},Wv={javascript:"js",node:"js",typescript:"ts",python:"py",python3:"py",yml:"yaml",rust:"rs",golang:"go","c++":"cpp",cplusplus:"cpp"};async function Pv(s){const l=Wv[s.toLowerCase()]??s.toLowerCase(),i=Gb[l];return i?i().catch(()=>null):null}async function e1(s){const l=(s.split("/").pop()??"").toLowerCase(),i=Fv[l]??l.split(".").pop()??"",r=Gb[i];return r?r().catch(()=>null):null}const t1=qb([{tag:[ye.keyword,ye.modifier,ye.controlKeyword,ye.moduleKeyword],class:"cmh-key"},{tag:[ye.propertyName],class:"cmh-prop"},{tag:[ye.function(ye.variableName),ye.labelName],class:"cmh-fn"},{tag:[ye.color,ye.constant(ye.name),ye.standard(ye.name),ye.bool],class:"cmh-const"},{tag:[ye.typeName,ye.className,ye.changed,ye.annotation,ye.self,ye.namespace],class:"cmh-type"},{tag:[ye.number,ye.integer,ye.float],class:"cmh-num"},{tag:[ye.string,ye.special(ye.string),ye.regexp],class:"cmh-str"},{tag:[ye.operator,ye.operatorKeyword,ye.escape],class:"cmh-op"},{tag:[ye.meta,ye.comment],class:"cmh-comment"},{tag:ye.invalid,class:"cmh-invalid"}]);function oo(s){return s.replace(/[&<>]/g,l=>l==="&"?"&":l==="<"?"<":">")}async function n1(s,l){const i=l?await Pv(l):null;if(!i)return oo(s);try{const r=i.language.parser.parse(s);let o="";return Qv(s,r,t1,(d,h)=>{o+=h?`<span class="${h}">${oo(d)}</span>`:oo(d)},()=>{o+=`
|
|
117
|
-
`}),o}catch{return oo(s)}}ht.setOptions({gfm:!0,breaks:!1});function Yb(s){var i;const l=(i=s.split(".").pop())==null?void 0:i.toLowerCase();return l==="md"||l==="markdown"}async function Ib(s){const l=await ht.parse(s,{async:!0,walkTokens:async i=>{if(i.type!=="code")return;const r=i;r.text=await n1(r.text,r.lang??""),r.escaped=!0}});return jv.sanitize(l)}function Uy(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,stale:!1,revision:l,previewMode:Yb(s.path)}}function Ja(s){return!s.binary&&!s.tooLarge&&s.text!==s.saved}function l1(s){return s.split("/").pop()??s}function vi(s){const l=s.lastIndexOf("/");return l===-1?"":s.slice(0,l)}function eh(s){return s<1024?`${s} Б`:s<1024*1024?`${(s/1024).toFixed(1)} КБ`:`${(s/1024/1024).toFixed(1)} МБ`}function vo({x:s,y:l,items:i,note:r,onClose:o}){const d=S.useRef(null),[h,g]=S.useState({left:s,top:l}),[m,b]=S.useState(()=>{const _=i.findIndex(C=>!C.disabled);return _===-1?0:_});S.useLayoutEffect(()=>{const _=d.current;if(!_)return;const C=_.getBoundingClientRect(),N=8,H=Math.max(N,Math.min(s,window.innerWidth-C.width-N)),B=Math.max(N,Math.min(l,window.innerHeight-C.height-N));g({left:H,top:B})},[s,l]),S.useLayoutEffect(()=>{var _;(_=d.current)==null||_.focus()},[]),S.useLayoutEffect(()=>{function _(N){var H;(H=d.current)!=null&&H.contains(N.target)||o()}function C(){o()}return document.addEventListener("mousedown",_),document.addEventListener("scroll",C,!0),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("scroll",C,!0)}},[o]);function x(_){_.disabled||(_.onSelect(),o())}function k(_){if(_.key==="Escape"){_.preventDefault(),_.stopPropagation(),o();return}const C=i.map((N,H)=>({item:N,index:H})).filter(N=>!N.item.disabled);if(C.length!==0){if(_.key==="ArrowDown"||_.key==="ArrowUp"){_.preventDefault();const N=_.key==="ArrowDown"?1:-1,H=C.findIndex(K=>K.index===m),B=C[(((H===-1?0:H)+N)%C.length+C.length)%C.length];B&&b(B.index);return}if(_.key==="Enter"||_.key===" "){_.preventDefault();const N=i[m];N&&x(N)}}}return c.jsxs("div",{ref:d,className:"ctxmenu",style:{left:h.left,top:h.top},role:"menu",tabIndex:-1,onKeyDown:k,children:[r&&c.jsx("div",{className:"ctxmenu__note",children:r}),i.map((_,C)=>c.jsxs("button",{type:"button",role:"menuitem","aria-disabled":_.disabled,className:"ctxmenu__item"+(C===m?" is-cursor":""),onMouseEnter:()=>b(C),onClick:()=>x(_),children:[c.jsx("span",{className:"ctxmenu__label",children:_.label}),_.hint&&c.jsx("span",{className:"ctxmenu__hint",children:_.hint})]},_.id))]})}const a1=3500,s1=9e3,i1=220;function Uc({result:s}){const[l,i]=S.useState(s),[r,o]=S.useState(!1);return S.useEffect(()=>{if(!s){i(null),o(!1);return}i(s),o(!1);const d=s.ok?a1:s1,h=setTimeout(()=>o(!0),d),g=setTimeout(()=>i(null),d+i1);return()=>{clearTimeout(h),clearTimeout(g)}},[s]),l?c.jsx("div",{className:"oplog "+(l.ok?"oplog--ok":"oplog--bad")+(r?" oplog--leaving":""),role:"status","aria-live":l.ok?"polite":"assertive",children:l.message}):null}function Dc({value:s,className:l,placeholder:i="Название сессии",onCommit:r,onCancel:o}){const[d,h]=S.useState(s),g=S.useRef(null);S.useEffect(()=>{var b;(b=g.current)==null||b.select()},[]);function m(){const b=d.trim();if(!b||b===s)return o();r(b)}return c.jsx("input",{ref:g,className:l?`rename ${l}`:"rename",value:d,autoFocus:!0,spellCheck:!1,placeholder:i,onChange:b=>h(b.target.value),onBlur:m,onKeyDown:b=>{b.stopPropagation(),b.key==="Enter"?(b.preventDefault(),m()):b.key==="Escape"&&(b.preventDefault(),o())}})}function jr({active:s}){return s?c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M2 5h3V2"}),c.jsx("path",{d:"M14 5h-3V2"}),c.jsx("path",{d:"M2 11h3v3"}),c.jsx("path",{d:"M14 11h-3v3"})]}):c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M5 2H2v3"}),c.jsx("path",{d:"M11 2h3v3"}),c.jsx("path",{d:"M2 11v3h3"}),c.jsx("path",{d:"M14 11v3h-3"})]})}const r1=500,di="application/x-ccv-fs-path",c1=200;function u1({open:s,tree:l,expanded:i,activePath:r,dirty:o,gitChanges:d,result:h,searchResult:g,onSearch:m,onReveal:b,onToggle:x,onOpen:k,onCreate:_,onRename:C,onMove:N,onCopy:H,onDelete:B,onRefresh:K,onClose:O,zoomed:$,onToggleZoom:A}){const[Q,L]=S.useState(""),[M,W]=S.useState(null),[re,he]=S.useState(null),[F,ae]=S.useState(null),[me,je]=S.useState(null),[pe,z]=S.useState(null),[P,te]=S.useState(null),be=kh("(hover: hover)"),we=S.useRef(null),j=S.useMemo(()=>d1(d),[d]);function V(T){return!(!F||T===F.path||F.kind==="dir"&&T.startsWith(`${F.path}/`)||T===vi(F.path))}function ce(T){return!(!pe||T===pe.path||pe.kind==="dir"&&T.startsWith(`${pe.path}/`)||pe.mode==="cut"&&T===vi(pe.path))}function oe(T){z({path:T.path,kind:T.kind,mode:"copy"})}function _e(T){z({path:T.path,kind:T.kind,mode:"cut"})}function Ne(T){!pe||!ce(T)||(T&&!i.has(T)&&x(T),pe.mode==="cut"?(N(pe.path,T),z(null)):H(pe.path,T))}function Re(T,Y){const xe=T.touches[0];if(!xe)return;const Me={timer:0,x:xe.clientX,y:xe.clientY,el:T.currentTarget,fired:!1};Me.timer=window.setTimeout(()=>{Me.fired=!0,Y(Me.x,Me.y,Me.el)},r1),we.current=Me}function it(T){const Y=we.current,xe=T.touches[0];!Y||!xe||Math.hypot(xe.clientX-Y.x,xe.clientY-Y.y)>10&&(window.clearTimeout(Y.timer),we.current=null)}function Ze(T){const Y=we.current;Y&&(window.clearTimeout(Y.timer),Y.fired&&T.preventDefault())}function st(){var T;return(T=we.current)!=null&&T.fired?(we.current=null,!0):!1}function qe(T,Y,xe,Me){L((Me==null?void 0:Me.path)??""),te({x:T,y:Y,opener:xe,entry:Me})}function Rt(){const T=P==null?void 0:P.opener;te(null),T!=null&&T.isConnected&&T.focus()}function Je(T){return{onContextMenu:Y=>{Y.preventDefault(),qe(Y.clientX,Y.clientY,Y.currentTarget,T)},onTouchStart:Y=>Re(Y,(xe,Me,Ue)=>qe(xe,Me,Ue,T)),onTouchMove:it,onTouchEnd:Ze,onTouchCancel:Ze}}function Ke(T){T.target===T.currentTarget&&(T.preventDefault(),qe(T.clientX,T.clientY,T.currentTarget,null))}function Fe(T){T.target===T.currentTarget&&Re(T,(Y,xe,Me)=>qe(Y,xe,Me,null))}function dt(T){if(!(T.ctrlKey||T.metaKey)||T.target instanceof HTMLInputElement)return;const Y=T.key.toLowerCase();if(Y==="v"){T.preventDefault(),Ne(_n());return}if(!Q)return;const xe=Hy(l,Q);xe&&(Y==="c"?(T.preventDefault(),oe(xe)):Y==="x"&&(T.preventDefault(),_e(xe)))}function Fn(T){return Y=>{Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData(di,T.path),ae({path:T.path,kind:T.kind})}}function qt(){ae(null),je(null)}function Tn(T){return Y=>{Y.dataTransfer.types.includes(di)&&(Y.stopPropagation(),!(T.kind!=="dir"||!V(T.path))&&(Y.preventDefault(),je(T.path)))}}function xn(T){return Y=>{if(!Y.dataTransfer.types.includes(di)||(Y.stopPropagation(),T.kind!=="dir"||!V(T.path)))return;Y.preventDefault();const xe=Y.dataTransfer.getData(di);je(null),xe&&N(xe,T.path)}}function dn(T){!T.dataTransfer.types.includes(di)||!V("")||(T.preventDefault(),je(""))}function Un(T){if(!T.dataTransfer.types.includes(di)||!V(""))return;T.preventDefault();const Y=T.dataTransfer.getData(di);je(null),Y&&N(Y,"")}const[Jt,ut]=S.useState(""),hn=Jt.trim(),J=hn.length>0,fe=S.useRef(null),Te=S.useRef(m);Te.current=m;function Qe(T){ut(T),fe.current&&clearTimeout(fe.current);const Y=T.trim();if(!Y){Te.current("");return}fe.current=setTimeout(()=>Te.current(Y),c1)}function Nt(T){fe.current&&clearTimeout(fe.current),ut(""),Te.current(""),L(T.path),b(T)}const Tt=J&&(g==null?void 0:g.query)===hn?g:null;function _n(){if(Q==="")return"";const T=Hy(l,Q);if((T==null?void 0:T.kind)==="dir")return Q;const Y=Q.lastIndexOf("/");return Y===-1?"":Q.slice(0,Y)}function tn(T,Y){const xe=Y??_n();xe&&!i.has(xe)&&x(xe),he({parent:xe,kind:T})}function Gt(){if(!P)return[];const T=Me=>be?Me:void 0;if(!P.entry)return[{id:"paste",label:"Вставить в корень проекта",hint:T("Ctrl+V"),disabled:!ce(""),onSelect:()=>Ne("")},{id:"new-file",label:"Создать файл",onSelect:()=>tn("file","")},{id:"new-dir",label:"Создать каталог",onSelect:()=>tn("dir","")}];const Y=P.entry,xe=[Y.kind==="file"?{id:"open",label:"Открыть",onSelect:()=>k(Y.path)}:{id:"toggle",label:i.has(Y.path)?"Свернуть":"Развернуть",onSelect:()=>x(Y.path)},{id:"copy",label:"Копировать",hint:T("Ctrl+C"),onSelect:()=>oe(Y)},{id:"cut",label:"Вырезать",hint:T("Ctrl+X"),onSelect:()=>_e(Y)}];return Y.kind==="dir"&&(xe.push({id:"paste",label:"Вставить",hint:T("Ctrl+V"),disabled:!ce(Y.path),onSelect:()=>Ne(Y.path)}),xe.push({id:"new-file",label:"Создать файл",onSelect:()=>tn("file",Y.path)}),xe.push({id:"new-dir",label:"Создать каталог",onSelect:()=>tn("dir",Y.path)})),xe.push({id:"rename",label:"Переименовать",onSelect:()=>W(Y.path)}),xe.push({id:"delete",label:"Удалить",onSelect:()=>B(Y)}),xe}const En=J?[]:pt("",0);function pt(T,Y){const xe=l[T],Me=[];if(re&&re.parent===T&&Me.push(c.jsxs("div",{className:"fsrow fsrow--draft",style:Fa(Y),children:[c.jsx("span",{className:"fsrow__icon",children:re.kind==="dir"?c.jsx(Eo,{}):c.jsx(Ao,{})}),c.jsx(Dc,{className:"rename--file",value:"",placeholder:re.kind==="dir"?"имя каталога":"имя файла",onCommit:Ue=>{he(null),_(T,re.kind,Ue)},onCancel:()=>he(null)})]},`draft:${T}`)),!xe)return Me.push(c.jsx("p",{className:"fsrow__pending",style:Fa(Y),children:"читаем…"},`wait:${T}`)),Me;xe.length===0&&!re&&Me.push(c.jsx("p",{className:"fsrow__pending",style:Fa(Y),children:"пусто"},`empty:${T}`));for(const Ue of xe){const An=Ue.kind==="dir"&&i.has(Ue.path);Me.push(M===Ue.path?c.jsxs("div",{className:"fsrow fsrow--draft",style:Fa(Y),children:[c.jsx("span",{className:"fsrow__icon",children:Ue.kind==="dir"?c.jsx(Eo,{open:An}):c.jsx(Ao,{})}),c.jsx(Dc,{className:"rename--file",value:Ue.name,placeholder:"новое имя",onCommit:Hl=>{W(null),C(Ue.path,Hl)},onCancel:()=>W(null)})]},Ue.path):c.jsx(o1,{entry:Ue,depth:Y,open:An,active:Ue.path===r,selected:Ue.path===Q,dirty:o.has(Ue.path),gitStatus:j.get(Ue.path),dragging:(F==null?void 0:F.path)===Ue.path,dropTarget:me===Ue.path,cut:(pe==null?void 0:pe.mode)==="cut"&&pe.path===Ue.path,onClick:()=>{st()||(L(Ue.path),Ue.kind==="dir"?x(Ue.path):k(Ue.path))},onRename:()=>W(Ue.path),onDelete:()=>B(Ue),onDragStart:Fn(Ue),onDragEnd:qt,onDragOver:Tn(Ue),onDrop:xn(Ue),...Je(Ue)},Ue.path)),An&&Me.push(...pt(Ue.path,Y+1))}return Me}function vn(){if(!Tt)return[c.jsx("p",{className:"fsrow__pending",style:Fa(0),children:"ищем…"},"search:wait")];if(Tt.entries.length===0)return[c.jsx("p",{className:"fsrow__pending",style:Fa(0),children:"ничего не найдено"},"search:empty")];const T=Tt.entries.map(Y=>c.jsx(f1,{entry:Y,gitStatus:j.get(Y.path),onClick:()=>Nt(Y)},Y.path));return Tt.truncated&&T.push(c.jsxs("p",{className:"fsrow__pending",style:Fa(0),children:["показаны первые ",Tt.entries.length," — уточните запрос"]},"search:truncated")),T}return c.jsxs("aside",{className:(s?"sidepane sidepane--files sidepane--open":"sidepane sidepane--files")+($?" sidepane--zoomed":""),"aria-label":"Файлы проекта",onKeyDown:dt,children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:T=>{A&&(T.target.closest("button")||A())},children:[c.jsx(g1,{}),c.jsx("span",{className:"sidepane__title",children:"Файлы"}),c.jsx("button",{className:"sidepane__btn",title:"Новый файл","aria-label":"Новый файл",onClick:()=>tn("file"),children:c.jsx(p1,{})}),c.jsx("button",{className:"sidepane__btn",title:"Новый каталог","aria-label":"Новый каталог",onClick:()=>tn("dir"),children:c.jsx(m1,{})}),c.jsx("button",{className:"sidepane__btn",title:"Перечитать дерево","aria-label":"Перечитать дерево",onClick:K,children:"↻"}),A&&c.jsx("button",{className:"sidepane__btn",title:$?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":$?"Свернуть панель файлов":"Развернуть панель файлов на весь экран","aria-pressed":$,onClick:A,children:c.jsx(jr,{active:$})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель файлов",onClick:O,children:"✕"})]}),c.jsxs("div",{className:"fssearch",children:[c.jsx(y1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:Jt,spellCheck:!1,placeholder:"Поиск файлов и папок…","aria-label":"Поиск файлов и папок",onChange:T=>Qe(T.target.value),onKeyDown:T=>{T.stopPropagation(),T.key==="Escape"&&(T.preventDefault(),Jt?Qe(""):T.currentTarget.blur())}}),Jt&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>Qe(""),children:"✕"})]}),c.jsx("div",{className:"sidepane__scroll fstree"+(me===""?" fstree--drop-target":""),tabIndex:-1,onDragOver:dn,onDrop:Un,onContextMenu:Ke,onTouchStart:Fe,onTouchMove:it,onTouchEnd:Ze,onTouchCancel:Ze,children:J?vn():En}),c.jsx(Uc,{result:h}),P&&c.jsx(vo,{x:P.x,y:P.y,items:Gt(),onClose:Rt})]})}function o1({entry:s,depth:l,open:i,active:r,selected:o,dirty:d,gitStatus:h,dragging:g,dropTarget:m,cut:b,onClick:x,onRename:k,onDelete:_,onDragStart:C,onDragEnd:N,onDragOver:H,onDrop:B,onContextMenu:K,onTouchStart:O,onTouchMove:$,onTouchEnd:A,onTouchCancel:Q}){const L="fsrow"+(r?" is-open":"")+(o&&!r?" is-selected":"")+(s.ignored?" fsrow--ignored":"")+(g?" fsrow--dragging":"")+(m?" fsrow--drop-target":"")+(b?" fsrow--cut":"");return c.jsxs("div",{className:L,style:Fa(l),draggable:!0,onDragStart:C,onDragEnd:N,onDragOver:H,onDrop:B,onContextMenu:K,onTouchStart:O,onTouchMove:$,onTouchEnd:A,onTouchCancel:Q,children:[c.jsxs("button",{className:"fsrow__main",onClick:x,title:Xb(s),children:[c.jsx("span",{className:"fsrow__icon"+To("fsrow__icon",h),children:s.kind==="dir"?c.jsx(Eo,{open:i}):c.jsx(Ao,{})}),c.jsx("span",{className:"fsrow__name"+To("fsrow__name",h),children:s.name}),s.ignored&&c.jsx("span",{className:"fsrow__tag",title:"Игнорируется git (.gitignore)",children:"git-ignore"}),d&&c.jsx("span",{className:"fsrow__dot",title:"Есть несохранённые правки"})]}),c.jsx("button",{className:"fsrow__act",title:"Переименовать","aria-label":`Переименовать ${s.name}`,onClick:k,children:"✎"}),c.jsx("button",{className:"fsrow__act",title:"Удалить","aria-label":`Удалить ${s.name}`,onClick:_,children:"✕"})]})}function f1({entry:s,gitStatus:l,onClick:i}){const r=s.path.slice(0,s.path.length-s.name.length-1);return c.jsxs("button",{className:"fsrow fsrow--search"+(s.ignored?" fsrow--ignored":""),style:Fa(0),onClick:i,title:Xb(s),children:[c.jsx("span",{className:"fsrow__icon"+To("fsrow__icon",l),children:s.kind==="dir"?c.jsx(Eo,{}):c.jsx(Ao,{})}),c.jsx("span",{className:"fsrow__name"+To("fsrow__name",l),children:s.name}),s.ignored&&c.jsx("span",{className:"fsrow__tag",children:"git-ignore"}),r&&c.jsx("span",{className:"fsrow__path",children:r})]})}function Xb(s){return s.ignored?`${s.path} — игнорируется git (.gitignore)`:s.path}function Fa(s){return{"--depth":s}}function Hy(s,l){var o;const i=l.lastIndexOf("/"),r=i===-1?"":l.slice(0,i);return((o=s[r])==null?void 0:o.find(d=>d.path===l))??null}function d1(s){const l=new Map,i={added:1,modified:2},r=(o,d)=>{const h=l.get(o);(!h||i[d]>i[h])&&l.set(o,d)};for(const o of s){const d=h1(o.status);if(!d)continue;r(o.path,d);let h=vi(o.path);for(;r(h,d),!!h;)h=vi(h)}return l}function h1(s){if(s==="??")return"added";const[l="",i=""]=s;return l==="A"||l==="R"||l==="C"?"added":l==="M"||i==="M"?"modified":null}function To(s,l){return l?` ${s}--git-${l}`:""}function Eo({open:s=!1}){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:s?c.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"}):c.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 Ao(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,strokeLinejoin:"round","aria-hidden":"true",children:[c.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"}),c.jsx("path",{d:"M9 2v3.2h3.3"})]})}function p1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[c.jsxs("g",{transform:"translate(-1.3,-1.6) scale(0.78)",strokeLinejoin:"round",children:[c.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"}),c.jsx("path",{d:"M9 2v3.2h3.3"})]}),c.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function m1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.3,"aria-hidden":"true",children:[c.jsx("g",{transform:"translate(-1.3,-1.6) scale(0.78)",children:c.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"})}),c.jsx("path",{d:"M12.2 10.3v3.8M10.3 12.2h3.8",strokeLinecap:"round"})]})}function g1(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.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"}),c.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 y1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}const b1=200;function x1({open:s,result:l,onSearch:i,onOpenMatch:r,onClose:o,zoomed:d,onToggleZoom:h}){const[g,m]=S.useState(""),b=g.trim(),x=b.length>0,k=S.useRef(null),_=S.useRef(i);_.current=i;function C(B){m(B),k.current&&clearTimeout(k.current);const K=B.trim();if(!K){_.current("");return}k.current=setTimeout(()=>_.current(K),b1)}const N=x&&(l==null?void 0:l.query)===b?l:null;function H(){if(!N)return[c.jsx("p",{className:"fsrow__pending",children:"ищем…"},"grep:wait")];if(N.matches.length===0)return[c.jsx("p",{className:"fsrow__pending",children:"ничего не найдено"},"grep:empty")];const B=[];let K="";for(const O of N.matches)O.path!==K&&(K=O.path,B.push(c.jsx("p",{className:"searchgroup__path",title:O.path,children:O.path},`path:${O.path}`))),B.push(c.jsx(_1,{match:O,onClick:()=>r(O)},`${O.path}:${O.line}:${O.column}`));return N.truncated&&B.push(c.jsxs("p",{className:"fsrow__pending",children:["показаны первые ",N.matches.length," — уточните запрос"]},"grep:truncated")),B}return c.jsxs("aside",{className:(s?"sidepane sidepane--search sidepane--open":"sidepane sidepane--search")+(d?" sidepane--zoomed":""),"aria-label":"Поиск по тексту в проекте",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:B=>{h&&(B.target.closest("button")||h())},children:[c.jsx(v1,{}),c.jsx("span",{className:"sidepane__title",children:"Поиск по тексту"}),h&&c.jsx("button",{className:"sidepane__btn",title:d?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":d?"Свернуть панель поиска":"Развернуть панель поиска на весь экран","aria-pressed":d,onClick:h,children:c.jsx(jr,{active:d})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель поиска",onClick:o,children:"✕"})]}),c.jsxs("div",{className:"fssearch",children:[c.jsx(S1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:g,spellCheck:!1,placeholder:"Поиск по тексту во всех файлах…","aria-label":"Поиск по тексту во всех файлах",onChange:B=>C(B.target.value),onKeyDown:B=>{B.stopPropagation(),B.key==="Escape"&&(B.preventDefault(),g?C(""):B.currentTarget.blur())}}),g&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>C(""),children:"✕"})]}),c.jsx("div",{className:"sidepane__scroll fstree",children:x?H():c.jsx("p",{className:"sidepane__empty",children:"Введите текст, чтобы найти его во всех файлах проекта."})})]})}function _1({match:s,onClick:l}){const i=s.lineText.slice(0,s.column-1),r=s.lineText.slice(s.column-1,s.column-1+s.matchLength),o=s.lineText.slice(s.column-1+s.matchLength);return c.jsxs("button",{className:"searchmatch",onClick:l,title:`${s.path}:${s.line}`,children:[c.jsx("span",{className:"searchmatch__line",children:s.line}),c.jsxs("span",{className:"searchmatch__text",children:[i,c.jsx("mark",{children:r}),o]})]})}function v1(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"6.8",cy:"6.8",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1"})]})}function S1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}let fo=null;function k1(){return fo||(fo=Promise.all([Xe(()=>import("./index-BP5TdYoo.js"),__vite__mapDeps([19,4,3,2,20,5]),import.meta.url),Xe(()=>import("./index-891wE-Rj.js").then(s=>s.v),__vite__mapDeps([4,3]),import.meta.url),Xe(()=>import("./index-BHot-lnj.js"),[],import.meta.url),Xe(()=>import("./index-9jmr6xz8.js"),__vite__mapDeps([20,3,4,2]),import.meta.url),Xe(()=>import("./codemirror-BWZxIjMU.js"),__vite__mapDeps([21,2,3,4]),import.meta.url)]).then(([s,l,i,r,o])=>({EditorView:l.EditorView,EditorState:i.EditorState,Compartment:i.Compartment,EditorSelection:i.EditorSelection,Prec:i.Prec,keymap:l.keymap,indentWithTab:r.indentWithTab,basicSetup:s.basicSetup,editorTheme:o.editorTheme,editorHighlight:o.editorHighlight})).catch(s=>{throw fo=null,s})),fo}function w1({path:s,doc:l,revision:i,goto:r,onChange:o,onSave:d}){const h=S.useRef(null),g=S.useRef(null),m=S.useRef(null),b=S.useRef(new Map),x=S.useRef(new Map),k=S.useRef(new Set),_=S.useRef(null),C=S.useRef(o),N=S.useRef(d),H=S.useRef(s),B=S.useRef(i),K=S.useRef(l);C.current=o,N.current=d,H.current=s,B.current=i,K.current=l;const[O,$]=S.useState("loading"),[A,Q]=S.useState(!1);function L(W,re,he,F,ae){const me=b.current.get(F),je=x.current.get(F)===ae;if(me&&je)he.setState(me);else{const z=W.EditorState.create({doc:K.current,extensions:[W.basicSetup,W.Prec.highest(W.keymap.of([{key:"Mod-s",preventDefault:!0,run:()=>(N.current(H.current),!0)}])),W.keymap.of([W.indentWithTab]),re.of([]),W.editorTheme,W.editorHighlight,W.EditorView.updateListener.of(P=>{P.docChanged&&C.current(H.current,P.state.doc.toString())})]});b.current.set(F,z),x.current.set(F,ae),he.setState(z),k.current.delete(F)}if(k.current.has(F))return()=>{};let pe=!1;return e1(F).then(z=>{pe||!z||H.current!==F||(he.dispatch({effects:re.reconfigure(z)}),b.current.set(F,he.state),k.current.add(F))}),()=>{pe=!0}}S.useEffect(()=>{if(!h.current)return;let re=!1,he=null,F=null;$("loading"),Q(!1);const ae=window.setTimeout(()=>{re||Q(!0)},200);return(async()=>{let me;try{me=await k1()}catch{window.clearTimeout(ae),re||$("error");return}if(re||!h.current)return;window.clearTimeout(ae);const je=new me.Compartment;_.current=je,m.current=me,F=new me.EditorView({parent:h.current}),g.current=F,he=L(me,je,F,H.current,B.current),$("ready")})(),()=>{re=!0,window.clearTimeout(ae),he==null||he(),F==null||F.destroy(),g.current===F&&(g.current=null),m.current=null,_.current=null}},[]),S.useEffect(()=>{const W=m.current,re=g.current,he=_.current;if(!(!W||!re||!he))return L(W,he,re,s,i)},[s,i]);const M=S.useRef(0);return S.useEffect(()=>{const W=g.current,re=m.current;if(!W||!re||!r||r.token===M.current)return;M.current=r.token;const he=W.state.doc.lines,F=Math.min(Math.max(r.line,1),he),ae=W.state.doc.line(F),me=Math.min(ae.from+Math.max(r.column-1,0),ae.to);W.dispatch({selection:re.EditorSelection.cursor(me),effects:re.EditorView.scrollIntoView(me,{y:"center"})}),W.focus()},[r]),S.useEffect(()=>()=>{const W=g.current;W&&b.current.set(s,W.state)},[s]),c.jsxs("div",{className:"editor__code",children:[c.jsx("div",{ref:h,className:"editor__code-surface"+(O==="ready"?"":" is-hidden")}),O==="loading"&&A&&c.jsxs("div",{className:"editor__state work",role:"status",children:[c.jsxs("div",{className:"work__dots",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:"Загружается редактор…"})]}),O==="error"&&c.jsxs("div",{className:"editor__fallback",children:[c.jsxs("div",{className:"editor__fallback-banner",role:"alert",children:[c.jsx("span",{children:"Редактор не загрузился — ниже только просмотр, без сохранения правок."}),c.jsx("button",{className:"btn btn--sm btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]}),c.jsx("pre",{className:"editor__fallback-text",children:l})]})]})}function j1({file:s,goto:l,onChange:i,onSave:r,onReload:o,onOverwrite:d,onTogglePreview:h}){const g=Ja(s),m=Yb(s.path)&&!s.binary&&!s.tooLarge;return c.jsxs("div",{className:"editor",children:[c.jsxs("div",{className:"editor__bar",children:[c.jsx("span",{className:"editor__path",title:s.path,children:s.path}),c.jsxs("span",{className:"editor__meta",children:[eh(s.size),s.eol==="crlf"&&" · CRLF"]}),m&&c.jsxs("div",{className:"editor__viewtoggle",role:"tablist","aria-label":"Режим просмотра",children:[c.jsx("button",{className:"btn btn--sm"+(s.previewMode?" is-on":""),role:"tab","aria-selected":s.previewMode,onClick:()=>!s.previewMode&&h(s.path),children:"Просмотр"}),c.jsx("button",{className:"btn btn--sm"+(s.previewMode?"":" is-on"),role:"tab","aria-selected":!s.previewMode,onClick:()=>s.previewMode&&h(s.path),children:"Код"})]}),c.jsx("button",{className:"btn btn--sm",disabled:!g,title:"Сохранить (Ctrl+S)",onClick:()=>r(s.path),children:g?"Сохранить":"Сохранено"})]}),s.stale&&c.jsxs("div",{className:"editor__warn",children:[c.jsxs("span",{children:["Файл изменился на диске",g?" — а здесь есть несохранённые правки.":"."]}),c.jsx("button",{className:"btn btn--sm",onClick:()=>o(s.path),children:"Взять с диска"}),g&&c.jsx("button",{className:"btn btn--sm btn--danger",onClick:()=>d(s.path),children:"Сохранить поверх"})]}),s.binary?c.jsxs("p",{className:"editor__empty",children:["Это не текстовый файл — редактировать его здесь нечем. ",eh(s.size)," на диске."]}):s.tooLarge?c.jsxs("p",{className:"editor__empty",children:["Файл слишком велик для редактора (",eh(s.size),"). Такие правит агент, а не браузер."]}):m&&s.previewMode?c.jsx(N1,{text:s.text}):c.jsx(w1,{path:s.path,doc:s.text,revision:s.revision,goto:l,onChange:i,onSave:r})]})}function N1({text:s}){const[l,i]=S.useState("");return S.useEffect(()=>{let r=!1;return Ib(s).then(o=>{r||i(o)}),()=>{r=!0}},[s]),c.jsx("div",{className:"markdown-preview",dangerouslySetInnerHTML:{__html:l}})}function T1({files:s,activePath:l,busy:i,onSelect:r,onClose:o,zoomed:d,onToggleZoom:h}){return c.jsxs("div",{className:"worktabs",role:"tablist",onDoubleClick:g=>{h&&(g.target.closest("button")||h())},children:[c.jsxs("button",{className:"worktab"+(l===null?" is-on":""),role:"tab","aria-selected":l===null,onClick:()=>r(null),onDoubleClick:()=>h==null?void 0:h(),children:[c.jsx("span",{className:"worktab__name",children:"Разговор"}),i&&c.jsx("span",{className:"worktab__dot worktab__dot--busy",title:"Агент работает"})]}),s.map(g=>c.jsxs("div",{className:"worktab"+(g.path===l?" is-on":""),role:"tab","aria-selected":g.path===l,onDoubleClick:m=>{h&&(m.target.closest(".worktab__close, .worktab__dot")||h())},children:[c.jsx("button",{className:"worktab__name",title:g.path,onClick:()=>r(g.path),children:l1(g.path)}),Ja(g)?c.jsx("button",{className:"worktab__dot",title:"Не сохранено — закрыть","aria-label":`Закрыть ${g.path}`,onClick:()=>o(g.path)}):c.jsx("button",{className:"worktab__close",title:"Закрыть","aria-label":`Закрыть ${g.path}`,onClick:()=>o(g.path),children:"✕"})]},g.path)),c.jsx("div",{className:"worktabs__spacer"}),h&&c.jsx("button",{className:"worktabs__zoom",title:d?"Свернуть — то же самое, что двойной клик по вкладке":"Развернуть на весь экран — то же самое, что двойной клик по вкладке","aria-label":d?"Свернуть колонку разговора":"Развернуть колонку разговора на весь экран","aria-pressed":d,onClick:h,children:c.jsx(jr,{active:d})})]})}const Vb="ccv:sidebar.collapsed",Qb="ccv:sidebar.mode",E1=500,By="транскрипт остаётся на диске — сессию можно вернуть из архива в любой момент.";function A1({open:s,connected:l,status:i,workspaces:r,sessions:o,archived:d,pinned:h,activeWorkspaceId:g,activeSessionId:m,onSelectWorkspace:b,onSelectSession:x,onRenameSession:k,onPinSessions:_,onSelectPinned:C,onCloseWorkspaces:N,onArchiveSessions:H,onUnarchiveSessions:B,onOpenWorkspace:K,onNewSession:O,onOpenExtensions:$,account:A,onOpenAccount:Q,relay:L,onOpenRelay:M,onOpenSettings:W,themeMode:re,onCycleTheme:he}){const[F,ae]=S.useState(null),[me,je]=S.useState(""),[pe,z]=S.useState(M1),[P,te]=S.useState(O1);function be(){te(T=>{const Y=T==="pinned"?"default":"pinned";try{localStorage.setItem(Qb,Y)}catch{}return Y})}const we=me.trim().toLowerCase(),j=we!=="",V=S.useMemo(()=>j?r.filter(T=>T.name.toLowerCase().includes(we)||T.path.toLowerCase().includes(we)):r,[r,we,j]),ce=S.useMemo(()=>j?o.filter(T=>(T.title??"").toLowerCase().includes(we)):o,[o,we,j]),oe=S.useMemo(()=>j?d.filter(T=>(T.title??"").toLowerCase().includes(we)):d,[d,we,j]),_e=T=>{var Y;return((Y=r.find(xe=>xe.id===T))==null?void 0:Y.name)??"—"},Ne=T=>{var Y;return(Y=r.find(xe=>xe.id===T))==null?void 0:Y.path},Re=S.useMemo(()=>j?h.filter(T=>(T.title??"").toLowerCase().includes(we)||_e(T.workspaceId).toLowerCase().includes(we)):h,[h,r,we,j]);function it(T){z(Y=>{const xe=Y.includes(T)?Y.filter(Me=>Me!==T):[...Y,T];try{localStorage.setItem(Vb,JSON.stringify(xe))}catch{}return xe})}const Ze=T=>!pe.includes(T),st=Gy(V),qe=Gy(ce),[Rt,Je]=S.useState(null),[Ke,Fe]=S.useState(null),[dt,Fn]=S.useState(null),qt=S.useRef(null);function Tn(T,Y){const xe=T.touches[0];if(!xe)return;const Me={timer:0,x:xe.clientX,y:xe.clientY,el:T.currentTarget,fired:!1};Me.timer=window.setTimeout(()=>{Me.fired=!0,Y(Me.x,Me.y,Me.el)},E1),qt.current=Me}function xn(T){const Y=qt.current,xe=T.touches[0];!Y||!xe||Math.hypot(xe.clientX-Y.x,xe.clientY-Y.y)>10&&(window.clearTimeout(Y.timer),qt.current=null)}function dn(T){const Y=qt.current;Y&&(window.clearTimeout(Y.timer),Y.fired&&T.preventDefault())}function Un(){var T;return(T=qt.current)!=null&&T.fired?(qt.current=null,!0):!1}function Jt(){const T=Rt==null?void 0:Rt.opener;Je(null),T!=null&&T.isConnected&&T.focus()}function ut(){const T=Ke==null?void 0:Ke.opener;Fe(null),T!=null&&T.isConnected&&T.focus()}function hn(){const T=dt==null?void 0:dt.opener;Fn(null),T!=null&&T.isConnected&&T.focus()}function J(T){return{onContextMenu:Y=>{Y.preventDefault(),Je({x:Y.clientX,y:Y.clientY,opener:Y.currentTarget,ids:st.targetsFor(T)})},onTouchStart:Y=>Tn(Y,(xe,Me,Ue)=>Je({x:xe,y:Me,opener:Ue,ids:st.targetsFor(T)})),onTouchMove:xn,onTouchEnd:dn,onTouchCancel:dn}}function fe(T){return{onContextMenu:Y=>{Y.preventDefault(),Fe({x:Y.clientX,y:Y.clientY,opener:Y.currentTarget,ids:qe.targetsFor(T)})},onTouchStart:Y=>Tn(Y,(xe,Me,Ue)=>Fe({x:xe,y:Me,opener:Ue,ids:qe.targetsFor(T)})),onTouchMove:xn,onTouchEnd:dn,onTouchCancel:dn}}function Te(T){return{onContextMenu:Y=>{Y.preventDefault(),Fn({x:Y.clientX,y:Y.clientY,opener:Y.currentTarget,ids:[T.id]})},onTouchStart:Y=>Tn(Y,(xe,Me,Ue)=>Fn({x:xe,y:Me,opener:Ue,ids:[T.id]})),onTouchMove:xn,onTouchEnd:dn,onTouchCancel:dn}}const Qe=o.filter(T=>T.state!=="closed").length,Nt=Rt?[{id:"close",label:Rt.ids.length>1?`Закрыть проекты (${Rt.ids.length})`:"Закрыть проект",onSelect:()=>{N(Rt.ids),st.clear()}}]:[],Tt=Rt?"закрытие не удаляет проект: каталог и история сессий остаются на диске — открыть его снова можно кнопкой «+ Проект»."+(g&&Rt.ids.includes(g)&&Qe>0?` в нём сейчас незавершённых сессий: ${Qe} — при закрытии они остановятся на хосте.`:""):void 0,_n=Ke?ce.find(T=>T.id===Ke.ids[0]):void 0,tn=(_n==null?void 0:_n.pinned)!==!0,Gt=Ke?[...Ke.ids.length===1?[{id:"rename",label:"Переименовать",onSelect:()=>ae(Ke.ids[0])}]:[],{id:"pin",label:tn?Ke.ids.length>1?`Закрепить (${Ke.ids.length})`:"Закрепить":Ke.ids.length>1?`Открепить (${Ke.ids.length})`:"Открепить",onSelect:()=>{_n&&_(_n.workspaceId,Ke.ids,tn),qe.clear()}},{id:"archive",label:Ke.ids.length>1?`Убрать в архив (${Ke.ids.length})`:"Убрать в архив",onSelect:()=>{H(g,Ke.ids),qe.clear()}}]:[],En=Ke?By:void 0,pt=dt?Re.find(T=>T.id===dt.ids[0]):void 0,vn=dt?[{id:"rename",label:"Переименовать",onSelect:()=>ae(dt.ids[0])},{id:"unpin",label:"Открепить",onSelect:()=>{pt&&_(pt.workspaceId,[pt.id],!1)}},{id:"archive",label:"Убрать в архив",onSelect:()=>{pt&&H(pt.workspaceId,[pt.id])}}]:[];return c.jsxs("aside",{className:s?"sidebar sidebar--open":"sidebar",children:[c.jsxs("div",{className:"sidebar__head",children:[c.jsx("span",{className:l?"dot dot--on":"dot",title:i}),c.jsx("span",{className:"brand",children:"Claude Code Visual"}),c.jsx("button",{className:"theme-btn","aria-pressed":P==="pinned",title:P==="pinned"?"Показать все проекты и сессии":"Показать только закреплённые","aria-label":P==="pinned"?"Панель закреплённых сессий включена. Показать все проекты и сессии":"Показать только закреплённые сессии",onClick:be,children:c.jsx($b,{})}),c.jsx("button",{className:"theme-btn",title:`Тема: ${Yy[re]}`,"aria-label":`Тема: ${Yy[re]}. Переключить`,onClick:he,children:c.jsx(D1,{mode:re})})]}),c.jsxs("div",{className:"fssearch fssearch--sidebar",children:[c.jsx(R1,{}),c.jsx("input",{className:"fssearch__input",type:"text",value:me,spellCheck:!1,placeholder:"Проект или сессия…","aria-label":"Поиск по проектам и сессиям",onChange:T=>je(T.target.value),onKeyDown:T=>{T.stopPropagation(),T.key==="Escape"&&(T.preventDefault(),me?je(""):T.currentTarget.blur())}}),me&&c.jsx("button",{className:"fssearch__clear",title:"Очистить поиск","aria-label":"Очистить поиск",onClick:()=>je(""),children:"✕"})]}),c.jsx("div",{className:"sidebar__scroll",children:P==="pinned"?c.jsxs(c.Fragment,{children:[Re.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"закрепите сессию через её меню (правый клик или долгое нажатие) — она останется под рукой из любого проекта"})}),Re.map(T=>c.jsx("div",{className:T.id===m?"row row--active":"row",...F===T.id?{}:{title:"Действия со строкой — правый клик или долгое нажатие",...Te(T)},children:F===T.id?c.jsx("div",{className:"row__main",children:c.jsx(Dc,{value:T.title??"",onCommit:Y=>{k(T,Y),ae(null)},onCancel:()=>ae(null)})}):c.jsxs("button",{className:"row__main",onClick:()=>{Un()||C(T)},children:[c.jsx(nh,{title:T.title??"Без названия",pinned:!1,projectName:_e(T.workspaceId),projectPath:Ne(T.workspaceId)}),c.jsx(Iy,{session:T,tail:new Date(T.updatedAt).toLocaleString()})]})},T.id))]}):c.jsxs(c.Fragment,{children:[c.jsx(th,{title:"Проекты",count:V.length,open:Ze("workspaces"),onToggle:()=>it("workspaces")}),Ze("workspaces")&&c.jsxs(c.Fragment,{children:[V.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока ни одного"})}),V.map(T=>c.jsx("div",{className:qy(T.id===g,st.selected.includes(T.id)),...J(T),children:c.jsxs("button",{className:"row__main",onClick:Y=>{Un()||st.click(Y,T,()=>b(T.id))},children:[c.jsxs("span",{className:"row__title",children:[T.name,T.hasClaudeMd&&" ·"]}),c.jsx("span",{className:"row__meta",title:T.path,children:T.path})]})},T.id))]}),g&&c.jsxs(c.Fragment,{children:[c.jsx(th,{title:"Сессии",count:ce.length,open:Ze("sessions"),onToggle:()=>it("sessions")}),Ze("sessions")&&c.jsxs(c.Fragment,{children:[ce.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока ни одной"})}),ce.map(T=>c.jsx("div",{className:qy(T.id===m,qe.selected.includes(T.id)),...F===T.id?{}:fe(T),children:F===T.id?c.jsx("div",{className:"row__main",children:c.jsx(Dc,{value:T.title??"",onCommit:Y=>{k(T,Y),ae(null)},onCancel:()=>ae(null)})}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{className:"row__main",onClick:Y=>{Un()||qe.click(Y,T,()=>x(T))},children:[c.jsx(nh,{title:T.title??"Без названия",pinned:T.pinned===!0,projectName:_e(T.workspaceId),projectPath:Ne(T.workspaceId)}),c.jsx(Iy,{session:T,tail:new Date(T.updatedAt).toLocaleString()})]}),c.jsx("button",{className:"row__edit",title:"Переименовать","aria-label":"Переименовать сессию",onClick:()=>{Un()||ae(T.id)},children:"✎"})]})},T.id))]}),d.length>0&&c.jsxs(c.Fragment,{children:[c.jsx(th,{title:"Архив",count:oe.length,open:Ze("archive"),onToggle:()=>it("archive"),hint:"сессии без обращения дольше двух суток уезжают сюда сами; ничего не удаляется"}),Ze("archive")&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:"сюда сами уезжают сессии без обращения дольше двух суток; транскрипт остаётся на диске, ничего не удаляется"})}),oe.length===0&&c.jsx("div",{className:"row",children:c.jsx("span",{className:"row__meta",children:j?"Ничего не найдено":"Пока пусто"})}),oe.map(T=>c.jsxs("div",{className:T.id===m?"row row--active":"row",children:[c.jsxs("button",{className:"row__main",onClick:()=>x(T),children:[c.jsx(nh,{title:T.title??"Без названия",pinned:!1,projectName:_e(T.workspaceId),projectPath:Ne(T.workspaceId)}),c.jsx("span",{className:"row__meta",children:B1(T)})]}),c.jsx("button",{className:"row__restore",title:"Вернуть сессию из архива",onClick:()=>B([T.id]),children:"Вернуть"})]},T.id))]})]})]})]})}),c.jsxs("div",{className:"sidebar__foot",children:[c.jsxs("button",{className:"account-btn sidebar__wide",title:"Аккаунт Claude",onClick:Q,children:[c.jsx("span",{className:A!=null&&A.loggedIn?"dot dot--on":"dot"}),c.jsx("span",{className:"account-btn__id",children:A===null?"Аккаунт":A.loggedIn?A.email||"Вход выполнен":"Войти в аккаунт"}),(A==null?void 0:A.plan)&&c.jsx("span",{className:"chip",children:A.plan})]}),M&&c.jsxs("button",{className:"account-btn sidebar__wide",title:"Доступ с телефона и из браузера",onClick:M,children:[c.jsx("span",{className:L!=null&&L.connected?"dot dot--on":"dot"}),c.jsx("span",{className:"account-btn__id",children:L===null?"Удалённый доступ":L.paired?L.connected?L.name||"Удалённый доступ включён":"Удалённый доступ · нет связи":"Удалённый доступ"}),(L==null?void 0:L.connected)&&L.clients>0&&c.jsx("span",{className:"chip",children:L.clients})]}),c.jsx("button",{className:"btn btn--ghost sidebar__wide",disabled:!$,title:"MCP-серверы и плагины",onClick:()=>$==null?void 0:$(),children:"Расширения"}),c.jsx("button",{className:"btn btn--ghost sidebar__wide",title:"Настройки приложения",onClick:W,children:"Настройки"}),c.jsx("button",{className:"btn btn--ghost",onClick:K,children:"+ Проект"}),c.jsx("button",{className:"btn btn--primary",onClick:O,disabled:!g,children:"+ Сессия"})]}),Rt&&c.jsx(vo,{x:Rt.x,y:Rt.y,items:Nt,note:Tt,onClose:Jt}),Ke&&c.jsx(vo,{x:Ke.x,y:Ke.y,items:Gt,note:En,onClose:ut}),dt&&c.jsx(vo,{x:dt.x,y:dt.y,items:vn,note:By,onClose:hn})]})}function qy(s,l){const i=["row"];return s&&i.push("row--active"),l&&i.push("row--selected"),i.join(" ")}function Gy(s){const[l,i]=S.useState([]),r=S.useRef(null);function o(){i([]),r.current=null}function d(g,m,b){if(g.ctrlKey||g.metaKey){i(x=>x.includes(m.id)?x.filter(k=>k!==m.id):[...x,m.id]),r.current=m.id;return}if(g.shiftKey&&r.current){const x=s.findIndex(_=>_.id===r.current),k=s.findIndex(_=>_.id===m.id);if(x!==-1&&k!==-1){const[_,C]=x<k?[x,k]:[k,x];i(s.slice(_,C+1).map(N=>N.id));return}}o(),r.current=m.id,b()}function h(g){return l.includes(g.id)?l:(i([g.id]),r.current=g.id,[g.id])}return{selected:l,click:d,targetsFor:h,clear:o}}function th({title:s,count:l,open:i,onToggle:r,hint:o}){const d=i?`Свернуть «${s}»`:`Развернуть «${s}»`;return c.jsxs("button",{className:"sidebar__section sidebar__section--btn","aria-expanded":i,title:o?`${d} — ${o}`:d,onClick:r,children:[c.jsx(C1,{open:i}),c.jsx("span",{className:"sidebar__section-name",children:s}),c.jsx("span",{className:"sidebar__count",children:l})]})}function C1({open:s}){return c.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:c.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}function $b({className:s}){return c.jsxs("svg",{className:s,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"4.5",y:"2.4",width:"7",height:"4.2",rx:"1.6"}),c.jsx("path",{d:"M5.4 6.6 8 12.2 10.6 6.6"}),c.jsx("path",{d:"M8 12.2v1.4"})]})}function R1(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function M1(){try{const s=localStorage.getItem(Vb);if(s===null)return["archive"];const l=JSON.parse(s);return Array.isArray(l)?l.filter(i=>i==="workspaces"||i==="sessions"||i==="archive"):["archive"]}catch{return["archive"]}}function O1(){try{return localStorage.getItem(Qb)==="pinned"?"pinned":"default"}catch{return"default"}}const Yy={system:"как в системе",light:"светлая",dark:"тёмная"};function D1({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"?c.jsx("svg",{...l,children:c.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"?c.jsxs("svg",{...l,children:[c.jsx("circle",{cx:"8",cy:"8",r:"3.1"}),c.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"})]}):c.jsxs("svg",{...l,children:[c.jsx("rect",{x:"1.8",y:"2.6",width:"12.4",height:"8.4",rx:"1.4"}),c.jsx("path",{d:"M5.6 13.4h4.8"})]})}function z1(s){switch(s.state){case"running":return"работает";case"waiting_permission":return"ждёт разрешения";case"idle":return L1(s.lastTurn);case"starting":return"запускается";case"error":return"ошибка";case"closed":return"на диске"}}function L1(s){switch(s){case"interrupted":return"прервана";case"stopped":return"остановлена";case"failed":return"оборвалась";case"completed":return"готова";case null:return"ждёт задачу"}}function U1(s){switch(s.state){case"running":return"running";case"starting":return"starting";case"waiting_permission":return"waiting";case"idle":return H1(s.lastTurn);case"error":return"error";case"closed":return"closed"}}function H1(s){switch(s){case"interrupted":case"stopped":return"halted";case"failed":return"error";case"completed":return"ready";case null:return"fresh"}}function Iy({session:s,tail:l}){return c.jsxs("span",{className:"row__meta",children:[c.jsxs("span",{className:`row__state row__state--${U1(s)}`,children:[c.jsx("span",{className:"row__state-dot","aria-hidden":"true"}),z1(s)]})," · ",l]})}function nh({title:s,pinned:l,projectName:i,projectPath:r}){return c.jsxs("span",{className:"row__head",children:[c.jsxs("span",{className:"row__title",children:[l&&c.jsx($b,{className:"row__pin"}),s]}),c.jsx("span",{className:"row__project",title:r,children:i})]})}function B1(s){const l=s.archivedAuto?"сама, по сроку молчания":"убрана вручную";return s.archivedAt?`${new Date(s.archivedAt).toLocaleString()} · ${l}`:l}const Xy=3,q1=15e5;function Zb(s,l){if(!l||typeof l!="object")return null;const i=l,r=typeof i.file_path=="string"?i.file_path:"";if(!r)return null;if(s==="Write"){if(typeof i.content!="string")return null;const o=lh(i.content).map(d=>({type:"add",text:d}));return{kind:"create",filePath:r,rows:o,added:o.length,removed:0,note:"файл записывается целиком"}}if(s==="Edit"){if(typeof i.old_string!="string"||typeof i.new_string!="string")return null;const o=X1(G1(lh(i.old_string),lh(i.new_string)));return{kind:"edit",filePath:r,rows:o,added:o.filter(d=>d.type==="add").length,removed:o.filter(d=>d.type==="del").length,note:i.replace_all===!0?"все вхождения":null}}return null}function lh(s){if(s==="")return[];const l=s.split(/\r?\n/);return l.length>1&&l[l.length-1]===""&&l.pop(),l}function G1(s,l){let i=0;for(;i<s.length&&i<l.length&&s[i]===l[i];)i++;let r=s.length,o=l.length;for(;r>i&&o>i&&s[r-1]===l[o-1];)r--,o--;const d=h=>({type:"ctx",text:h});return[...s.slice(0,i).map(d),...Y1(s.slice(i,r),l.slice(i,o)),...s.slice(r).map(d)]}function Y1(s,l){if(s.length===0&&l.length===0)return[];if(s.length===0)return l.map(x=>({type:"add",text:x}));if(l.length===0)return s.map(x=>({type:"del",text:x}));if((s.length+1)*(l.length+1)>q1)return[...s.map(x=>({type:"del",text:x})),...l.map(x=>({type:"add",text:x}))];const i=s.length,r=l.length,o=r+1,d=new Uint32Array((i+1)*o),h=(x,k)=>d[x*o+k]??0;for(let x=i-1;x>=0;x--)for(let k=r-1;k>=0;k--)d[x*o+k]=s[x]===l[k]?h(x+1,k+1)+1:Math.max(h(x+1,k),h(x,k+1));const g=[];let m=0,b=0;for(;m<i&&b<r;){const x=s[m],k=l[b];x===k?(g.push({type:"ctx",text:x}),m++,b++):h(m+1,b)>=h(m,b+1)?(g.push({type:"del",text:x}),m++):(g.push({type:"add",text:k}),b++)}for(;m<i;)g.push({type:"del",text:s[m++]});for(;b<r;)g.push({type:"add",text:l[b++]});return I1(g)}function I1(s){const l=[];let i=[];function r(){l.push(...i.filter(o=>o.type==="del")),l.push(...i.filter(o=>o.type==="add")),i=[]}for(const o of s)o.type==="ctx"?(r(),l.push(o)):i.push(o);return r(),l}function X1(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 g=Math.max(0,h-Xy);g<=Math.min(s.length-1,h+Xy);g++)l[g]=!0});const i=[];let r=[];function o(){r.length===1?i.push(...r):r.length>1&&i.push({type:"gap",text:`⋯ ${r.length} ${V1(r.length)} без изменений`}),r=[]}return s.forEach((d,h)=>{l[h]?(o(),i.push(d)):r.push(d)}),o(),i}function V1(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 Lh(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()}}const Uh=1600,Si="Копировать",pr="Скопировано";function Kb({text:s,hint:l,className:i}){const[r,o]=S.useState(!1);return S.useEffect(()=>{if(!r)return;const d=setTimeout(()=>o(!1),Uh);return()=>clearTimeout(d)},[r]),S.useEffect(()=>o(!1),[s]),c.jsx("button",{type:"button",className:"copybtn"+(r?" copybtn--done":"")+(i?` ${i}`:""),"aria-label":r?pr:`${Si} ${l}`,title:r?pr:`${Si} ${l}`,onClick:()=>{Lh(s).then(d=>{d&&o(!0)})},children:r?pr:Si})}function Hh({diff:s}){return c.jsxs("div",{className:"diff",children:[c.jsxs("div",{className:"diff__head",children:[c.jsx("span",{className:"diff__path",title:s.filePath,children:s.filePath}),c.jsxs("span",{className:"diff__stat",children:[s.added>0&&c.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&c.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]})]}),s.note&&c.jsx("div",{className:"diff__note",children:s.note}),c.jsx("div",{className:"diff__body",children:s.rows.length===0?c.jsx("div",{className:"diff__row diff__row--gap",children:c.jsx("span",{className:"diff__text",children:"пустое содержимое"})}):s.rows.map((l,i)=>c.jsxs("div",{className:`diff__row diff__row--${l.type}`,children:[c.jsx("span",{className:"diff__mark","aria-hidden":"true",children:l.type==="add"?"+":l.type==="del"?"−":""}),c.jsx("span",{className:"diff__text",children:l.text===""?" ":l.text})]},i))})]})}function Q1({waiting:s}){const[l,i]=S.useState(0);return S.useEffect(()=>{const r=window.setInterval(()=>i(o=>o+1),1e3);return()=>window.clearInterval(r)},[]),c.jsxs("div",{className:s?"work work--wait":"work",children:[c.jsxs("span",{className:"work__dots","aria-hidden":"true",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:s?"ждёт разрешения":"думает"}),!s&&c.jsxs("span",{className:"work__time",children:[l," с"]})]})}function Bh({items:s,busy:l,waiting:i,history:r=[],historyHasMore:o=!1,historyLoading:d=!1,onLoadHistory:h,sessionId:g,empty:m="Сессия пуста. Опишите задачу — Claude Code работает в каталоге проекта с полным набором инструментов."}){const b=S.useRef(null),x=S.useRef(null),k=S.useRef(!0),_=S.useRef(null),C=S.useRef(null),N=S.useRef(!1);S.useEffect(()=>{k.current=!0,_.current=null,N.current=!1,C.current!==null&&(clearTimeout(C.current),C.current=null)},[g]),S.useEffect(()=>{const K=b.current,O=x.current;if(!K||!O)return;function $(L){!K||L===K.scrollTop||(N.current=!0,K.scrollTop=L)}function A(){if(!K)return;const L=_.current;if(L){const M=Qy(K,L.id);if(M){const W=M.getBoundingClientRect().top-K.getBoundingClientRect().top;$(K.scrollTop+(W-L.top))}C.current!==null&&clearTimeout(C.current),C.current=setTimeout(()=>{_.current=null},500);return}k.current&&$(K.scrollHeight)}const Q=new ResizeObserver(A);return Q.observe(O),()=>{Q.disconnect(),C.current!==null&&clearTimeout(C.current)}},[]);function H(){const K=b.current;if(K){if(N.current){N.current=!1;return}k.current=K.scrollHeight-K.scrollTop-K.clientHeight<80}}function B(){if(d)return;const K=b.current,O=r[0];if(K&&O){const $=Qy(K,O.id);$&&(_.current={id:O.id,top:$.getBoundingClientRect().top-K.getBoundingClientRect().top})}h==null||h()}return c.jsx("div",{className:"transcript",ref:b,onScroll:H,children:c.jsxs("div",{className:"stream",ref:x,children:[o&&c.jsx("button",{type:"button",className:"transcript__more",onClick:B,disabled:d,children:d?"Загружаем…":"Показать более раннее"}),r.map(K=>c.jsx(Vy,{item:K},K.id)),r.length>0&&s.length>0&&c.jsx("div",{className:"transcript__divider",children:c.jsx("span",{children:"дальше — сессия открыта заново"})}),r.length===0&&s.length===0&&c.jsx("p",{className:"empty",children:m}),s.map(K=>c.jsx(Vy,{item:K},K.id)),l&&c.jsx(Q1,{waiting:i})]})})}function Vy({item:s}){switch(s.kind){case"user":return c.jsx("div",{className:"msg--user","data-item-id":s.id,children:s.text});case"assistant":return c.jsxs("div",{className:"msg--assistant","data-item-id":s.id,children:[c.jsx($1,{text:s.text}),s.streaming&&c.jsx("span",{className:"caret"}),s.text.trim()!==""&&c.jsx("div",{className:"msg--assistant__foot",children:c.jsx(Kb,{text:s.text,hint:"ответ целиком"})})]});case"thinking":return c.jsx("div",{className:"thinking","data-item-id":s.id,children:s.text});case"tool":return c.jsx(K1,{item:s});case"result":return c.jsxs("div",{className:"result-line","data-item-id":s.id,children:[c.jsx("span",{children:s.isError?"✗ "+s.subtype:"✓ готово"}),c.jsxs("span",{children:[(s.durationMs/1e3).toFixed(1)," с"]}),s.costUsd!==null&&c.jsxs("span",{children:["$",s.costUsd.toFixed(4)]}),c.jsxs("span",{children:["↑",Zy(s.inputTokens)," ↓",Zy(s.outputTokens)]})]});case"notice":return c.jsx("div",{className:s.tone==="error"?"notice notice--error":"notice","data-item-id":s.id,children:s.text})}}function Qy(s,l){const i=s.querySelectorAll("[data-item-id]");for(const r of i)if(r.dataset.itemId===l)return r;return null}function $1({text:s}){const[l,i]=S.useState(""),r=S.useRef([]);S.useEffect(()=>{let d=!1;return Ib(s).then(h=>{d||i(Z1(h))}),()=>{d=!0}},[s]),S.useEffect(()=>{const d=r.current;return()=>d.forEach(h=>clearTimeout(h))},[]);function o(d){var m,b;const h=d.target.closest(".codeblock__copy");if(!(h instanceof HTMLElement))return;const g=((b=(m=h.parentElement)==null?void 0:m.querySelector("pre"))==null?void 0:b.textContent)??"";g!==""&&Lh(g).then(x=>{if(!x)return;h.textContent=pr,h.setAttribute("aria-label",pr),h.classList.add("copybtn--done");const k=window.setTimeout(()=>{h.isConnected&&(h.textContent=Si,h.setAttribute("aria-label",_h),h.classList.remove("copybtn--done"))},Uh);r.current.push(k)})}return c.jsx("div",{className:"markdown-preview msg--assistant__body",onClick:o,dangerouslySetInnerHTML:{__html:l}})}const _h=`${Si} блок кода`;function Z1(s){if(!s.includes("<pre"))return s;const l=new DOMParser().parseFromString(s,"text/html");for(const i of l.body.querySelectorAll("pre")){const r=l.createElement("div");r.className="codeblock",i.replaceWith(r),r.append(i);const o=l.createElement("button");o.type="button",o.className="copybtn codeblock__copy",o.setAttribute("aria-label",_h),o.title=_h,o.textContent=Si,r.append(o)}return l.body.innerHTML}function K1({item:s}){const[l,i]=S.useState(!1),r=s.result===null,o=Zb(s.name,s.input),d=s.name==="AskUserQuestion"?W1(s.input):null;return c.jsxs("div",{className:"tool"+(s.isError?" tool--error":"")+(s.awaitingPermission?" tool--wait":""),"data-item-id":s.id,children:[c.jsxs("button",{className:"tool__head",onClick:()=>i(h=>!h),children:[c.jsx("span",{className:"tool__name",children:s.name}),c.jsx("span",{className:"tool__arg",children:d?F1(d):J1(s.input)}),c.jsx("span",{className:"tool__status",children:r?"…":s.isError?"ошибка":l?"▴":"▾"})]}),l&&c.jsxs("div",{className:"tool__body",children:[d?c.jsx(P1,{questions:d,answers:s.answers}):o?c.jsx(Hh,{diff:o}):c.jsx($y,{text:JSON.stringify(s.input,null,2),hint:"аргументы вызова"}),s.result!==null&&(!d||s.isError)&&c.jsx($y,{text:s.result,hint:"результат вызова",style:{marginTop:10}})]})]})}function $y({text:s,hint:l,style:i}){return c.jsxs("div",{className:"codeblock",style:i,children:[c.jsx("pre",{className:"code",children:s}),c.jsx(Kb,{text:s,hint:l,className:"codeblock__copy"})]})}function J1(s){if(!s||typeof s!="object")return"";const l=s;for(const i of["file_path","command","pattern","path","url","prompt"]){const r=l[i];if(typeof r=="string")return r.replace(/\s+/g," ").slice(0,160)}return JSON.stringify(l).slice(0,160)}function F1(s){var i;const l=s.map(r=>r.header).filter(r=>r.length>0);return l.length===s.length?l.join(" · "):((i=s[0])==null?void 0:i.question.replace(/\s+/g," ").slice(0,160))??""}function W1(s){if(typeof s!="object"||s===null)return null;const l=s.questions;if(!Array.isArray(l)||l.length===0)return null;const i=[];for(const r of l){if(typeof r!="object"||r===null)return null;const{question:o,header:d,options:h,multiSelect:g}=r;if(typeof o!="string"||!Array.isArray(h)||h.length===0)return null;const m=[];for(const b of h){if(typeof b!="object"||b===null)return null;const{label:x,description:k,preview:_}=b;if(typeof x!="string"||typeof k!="string")return null;m.push({label:x,description:k,...typeof _=="string"?{preview:_}:{}})}i.push({question:o,header:typeof d=="string"?d:"",options:m,multiSelect:g===!0})}return i}function P1({questions:s,answers:l}){return c.jsx("div",{className:"tool__questions",children:s.map((i,r)=>c.jsxs("div",{className:"tool__question",children:[c.jsxs("div",{className:"tool__question-head",children:[i.header&&c.jsx("span",{className:"chip chip--accent",children:i.header}),c.jsx("span",{className:"tool__question-text",children:i.question})]}),c.jsx("div",{className:"tool__question-answer",children:l!=null&&l[i.question]?c.jsx("span",{className:"tool__answer-value",children:l[i.question]}):c.jsx("span",{className:"tool__answer-empty",children:"не отвечено"})})]},r))})}function Zy(s){return s>=1e3?`${(s/1e3).toFixed(1)}k`:String(s)}const eS="ccv.dictation.lang",Ky="ru-RU";function tS(s){try{return Function.prototype.toString.call(s).includes("[native code]")}catch{return!1}}function Jy(){const s=window,l=[s.SpeechRecognition,s.webkitSpeechRecognition].filter(r=>typeof r=="function"),i=l.find(tS);return!i&&l.length>0&&Kl("распознавание подменено: родной реализации в странице нет"),i??l[0]??null}function Jb(){var s;try{return((s=localStorage.getItem(eS))==null?void 0:s.trim())||Ky}catch{return Ky}}function Kl(s,l){l===void 0?console.debug(`[dictation] ${s}`):console.debug(`[dictation] ${s}`,l)}const nS=3,lS=400,aS=5,sS=250,iS=2e3,rS=2e4;async function cS(){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":`Распознавание не знает языка ${Jb()}`};function oS(s){const[l]=S.useState(()=>Jy()!==null),[i,r]=S.useState(!1),[o,d]=S.useState(null),h=S.useRef(null),g=S.useRef(!1),m=S.useRef(!1),b=S.useRef(s),x=S.useRef({openedAt:0,audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1}),k=S.useRef(null),_=S.useRef(!1),C=S.useRef(null),N=S.useCallback(()=>{C.current&&clearTimeout(C.current),C.current=null},[]),H=S.useCallback(()=>{N();const A=async Q=>{if(C.current=null,!(!g.current||_.current)){if(!Q&&!await cS()){if(Kl("ждём ответа на запрос доступа к микрофону"),!g.current||_.current)return;C.current=setTimeout(()=>void A(!0),rS);return}Kl("движок не ответил на start()"),g.current=!1,r(!1),d("Распознавание не отвечает — проверьте расширения браузера и доступ к микрофону")}};C.current=setTimeout(()=>void A(!1),iS)},[N]);S.useEffect(()=>{b.current=s}),S.useEffect(()=>{const A=Jy();if(!A)return;const Q=new A;return Q.lang=Jb(),Q.continuous=!0,Q.interimResults=!0,Q.onstart=()=>{Kl("сессия открыта"),_.current=!0,N(),r(!0)},Q.onaudiostart=()=>{Kl("пошёл звук с микрофона"),x.current.audio=!0},Q.onresult=L=>{var he;if(m.current)return;let M="",W="";for(let F=L.resultIndex;F<L.results.length;F++){const ae=L.results[F];if(!ae)continue;const me=((he=ae[0])==null?void 0:he.transcript)??"";ae.isFinal?M+=me:W+=me}const re=x.current;re.heard=!0,re.everHeard=!0,Kl("распознано",{final:M,interim:W}),b.current(M,W)},Q.onerror=L=>{x.current.lastError=L.error,Kl("ошибка движка",L.error),!(L.error==="no-speech"||L.error==="aborted")&&(g.current=!1,r(!1),d(uS[L.error]??`Распознавание не работает: ${L.error}`))},Q.onend=()=>{m.current=!1,_.current=!1;const L=x.current,M=Date.now()-L.openedAt;if(Kl("сессия закрыта",{мс:M,звук:L.audio,слова:L.heard,ошибка:L.lastError||null}),!g.current){r(!1);return}if(L.dead=!L.audio&&M<lS?L.dead+1:0,L.dead>=aS){g.current=!1,r(!1),d(L.lastError?`Распознавание не работает: ${L.lastError}`:"Распознавание закрывается сразу после запуска — проверьте доступ к микрофону в настройках сайта");return}L.silent=L.heard?0:L.silent+1,!L.everHeard&&!L.warned&&L.silent>=nS&&(L.warned=!0,d(L.audio?"Микрофон слушает, но речь не распознаётся — проверьте язык диктовки и уровень звука":"С микрофона не идёт звук — проверьте устройство ввода в настройках сайта в браузере")),k.current=setTimeout(()=>{if(k.current=null,!!g.current){L.openedAt=Date.now(),L.audio=!1,L.heard=!1,L.lastError="",H();try{Q.start()}catch{}}},sS)},h.current=Q,()=>{g.current=!1,k.current&&clearTimeout(k.current),k.current=null,N(),Q.onend=null,Q.onresult=null,Q.onerror=null,Q.onstart=null,Q.onaudiostart=null,Q.abort(),h.current=null}},[]);const B=S.useCallback(()=>{var A;if(g.current){if(g.current=!1,Kl("выключение микрофона"),k.current&&clearTimeout(k.current),k.current=null,N(),!_.current){r(!1);return}(A=h.current)==null||A.stop()}},[]),K=S.useCallback(()=>{const A=h.current;if(A){if(!window.isSecureContext){d("Микрофон доступен только по https или с localhost");return}d(null),g.current=!0,m.current=!1,k.current&&clearTimeout(k.current),k.current=null,x.current={openedAt:Date.now(),audio:!1,heard:!1,everHeard:!1,silent:0,dead:0,lastError:"",warned:!1},r(!0),Kl("включение микрофона",{язык:A.lang}),H();try{A.start()}catch(Q){Kl("start() не прошёл",Q)}}},[H]),O=S.useCallback(()=>{g.current?B():K()},[K,B]),$=S.useCallback(()=>{var A;g.current&&_.current&&(m.current=!0,(A=h.current)==null||A.abort())},[]);return{supported:l,listening:i,error:o,toggle:O,stop:B,drop:$}}const fS="(max-width: 860px)",Fy=/^\/(\S*)$/,dS=new Set(["model","permissions"]);function hS(s){return dS.has(s.name)||s.name.startsWith("__")}const pS=new Set(["clear","rename"]),Wy=/(?:^|\s)@([^\s@]*)$/,mS=200,gS=100,yS=190;function Fb({disabled:s,busy:l,commands:i,sessionTitle:r,contextResult:o,className:d,placeholder:h,sendLabel:g="Отправить",autoFocus:m=!1,onContextSearch:b,onCommand:x,onSend:k,onInterrupt:_,onEscape:C}){var hn;const N=kh(fS),[H,B]=S.useState(""),[K,O]=S.useState(!1),[$,A]=S.useState(0),Q=S.useRef(null),L=S.useRef(null),M=S.useRef(null),[W,re]=S.useState(0),[he,F]=S.useState([]),[ae,me]=S.useState(-1),je=S.useRef(""),[pe,z]=S.useState(""),P=oS(S.useCallback((J,fe)=>{J&&B(Te=>ah(Te,J)),z(fe.trim())},[])),te=pe?ah(H,pe):H;S.useEffect(()=>{P.listening||pe===""||(B(J=>ah(J,pe)),z(""))},[P.listening,pe]),S.useEffect(()=>{var J;m&&((J=Q.current)==null||J.focus())},[m]);const be=s?"Выберите сессию":h??"Опишите задачу… («/» — команды, «@» — файлы)",we=S.useRef(0),j=S.useCallback(J=>{const fe=parseFloat(getComputedStyle(J).maxHeight),Te=Number.isFinite(fe)&&fe>0?fe:yS;J.style.height="auto";const Qe=J.scrollHeight;J.style.height=`${Math.min(Qe,Te)}px`,J.style.overflowY=Qe>Te?"auto":"hidden";const Nt=M.current;Nt&&(M.current=null,J.setSelectionRange(Nt[0],Nt[1]))},[]);S.useEffect(()=>{const J=Q.current;J&&j(J)},[te,be,s,j]),S.useEffect(()=>{const J=Q.current;if(!J)return;const fe=new ResizeObserver(([Te])=>{const Qe=Te==null?void 0:Te.contentRect.width;Qe===void 0||Math.abs(Qe-we.current)<1||(we.current=Qe,j(J))});return fe.observe(J),()=>fe.disconnect()},[j]);const V=P.stop;S.useEffect(()=>{s&&V()},[s,V]);const ce=S.useMemo(()=>P.error?{ok:!1,message:P.error}:null,[P.error]),oe=S.useMemo(()=>{var Te;const J=(Te=Fy.exec(H))==null?void 0:Te[1];if(J===void 0)return[];const fe=J.toLowerCase();return i.filter(Qe=>!hS(Qe)&&sh(Qe,fe)<Wb).sort((Qe,Nt)=>sh(Qe,fe)-sh(Nt,fe))},[H,i]),_e=!K&&oe.length>0,Ne=Math.min($,oe.length-1),Re=K?null:((hn=Wy.exec(te.slice(0,W)))==null?void 0:hn[1])??null,it=S.useRef(b);it.current=b,S.useEffect(()=>{if(Re===null||Re===""||Re.endsWith("/")){it.current(Re);return}const J=setTimeout(()=>it.current(Re),mS);return()=>clearTimeout(J)},[Re]);const Ze=Re!==null&&(o==null?void 0:o.query)===Re,st=Ze?o.entries:[],qe=Re!==null,Rt=qe&&!Ze,Je=Math.min($,Math.max(st.length-1,0));S.useEffect(()=>{var fe,Te;if(!_e&&!qe)return;const J=_e?Ne:Je;(Te=(fe=L.current)==null?void 0:fe.children[J])==null||Te.scrollIntoView({block:"nearest"})},[_e,qe,Ne,Je]);function Ke(J,fe){var Te;B(J),re(fe),M.current=[fe,fe],A(0),O(!1),pe!==""&&(z(""),P.drop()),(Te=Q.current)==null||Te.focus()}function Fe(){B(""),z(""),A(0),re(0),O(!1),me(-1),je.current="",P.drop()}function dt(J){const fe=J.trim();!fe||s||(k(fe),F(Te=>[fe,...Te.filter(Qe=>Qe!==fe)].slice(0,gS)),Fe())}function Fn(J){if(J<-1||J>=he.length)return;ae===-1&&(je.current=H);const fe=J===-1?je.current:he[J]??"";me(J),Ke(fe,fe.length)}function qt(){var Qe;const J=((Qe=Q.current)==null?void 0:Qe.selectionStart)??te.length,Te=`${J>0&&!/\s$/.test(te.slice(0,J))?" ":""}@`;Ke(te.slice(0,J)+Te+te.slice(J),J+Te.length)}function Tn(J){var Nt;const fe=(Nt=Wy.exec(te.slice(0,W)))==null?void 0:Nt[1];if(fe===void 0)return;const Te=W-fe.length-1,Qe=J.kind==="dir"?`@${J.path}/`:`@${J.path} `;Ke(te.slice(0,Te)+Qe+te.slice(W),Te+Qe.length)}function xn(){var fe;const J=(fe=Fy.exec(te.trim()))==null?void 0:fe[1];if(J&&x(J)){Fe();return}dt(te)}function dn(J,fe){B(J),re(fe),A(0),O(!1),me(-1),pe!==""&&(z(""),P.drop())}function Un(J){var Qe;const fe=pS.has(J.name)?r:null,Te=`/${J.name} `;B(Te+(fe??"")),re(Te.length+((fe==null?void 0:fe.length)??0)),fe&&(M.current=[Te.length,Te.length+fe.length]),A(0),(Qe=Q.current)==null||Qe.focus()}function Jt(J){if(x(J.name)){B(""),A(0),O(!1);return}J.argumentHint?Un(J):dt(`/${J.name}`)}function ut(J){if(_e){if(J.key==="ArrowDown")return J.preventDefault(),A(fe=>(Math.min(fe,oe.length-1)+1)%oe.length);if(J.key==="ArrowUp"){J.preventDefault();const fe=oe.length-1;return A(Te=>(Math.min(Te,fe)+fe)%oe.length)}if(J.key==="Enter"&&!J.shiftKey){J.preventDefault();const fe=oe[Ne];fe&&Jt(fe);return}if(J.key==="Tab"){J.preventDefault();const fe=oe[Ne];fe&&Un(fe);return}if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),O(!0);return}}if(qe){if(J.key==="ArrowDown"&&st.length>0)return J.preventDefault(),A(fe=>(Math.min(fe,st.length-1)+1)%st.length);if(J.key==="ArrowUp"&&st.length>0){J.preventDefault();const fe=st.length-1;return A(Te=>(Math.min(Te,fe)+fe)%st.length)}if(J.key==="Enter"&&!J.shiftKey||J.key==="Tab"){const fe=st[Je];if(fe){J.preventDefault(),Tn(fe);return}if(J.key==="Tab")return}if(J.key==="Escape"){J.preventDefault(),J.stopPropagation(),O(!0);return}}if((J.key==="ArrowUp"||J.key==="ArrowDown")&&!J.shiftKey){const fe=J.currentTarget,Te=fe.selectionStart;if(fe.selectionEnd===Te){const Qe=J.key==="ArrowUp",Nt=Qe?!te.slice(0,Te).includes(`
|
|
118
|
-
`):!te.slice(Te).includes(`
|
|
119
|
-
`),Tt=Qe?ae+1:ae-1;if(Nt&&Tt>=-1&&Tt<he.length){J.preventDefault(),Fn(Tt);return}}}if(J.key==="Escape"&&C){J.preventDefault(),J.stopPropagation(),C();return}J.key==="Enter"&&!J.shiftKey&&!N&&(J.preventDefault(),xn())}return c.jsx("div",{className:d?`composer ${d}`:"composer",children:c.jsxs("div",{className:"composer__inner",children:[c.jsx(Uc,{result:ce}),qe&&!_e&&c.jsxs("div",{className:"cmdmenu",role:"listbox",ref:L,children:[st.map((J,fe)=>c.jsxs("button",{role:"option","aria-selected":fe===Je,className:fe===Je?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>A(fe),onMouseDown:Te=>{Te.preventDefault(),Tn(J)},children:[c.jsxs("span",{className:"cmdmenu__name",children:[J.name,J.kind==="dir"?"/":""]}),c.jsx("span",{className:"cmdmenu__desc",children:J.path}),J.ignored&&c.jsx("span",{className:"cmdmenu__tag",children:"git-ignore"})]},J.path)),st.length===0&&c.jsx("div",{className:"cmdmenu__empty",children:Rt?"ищем…":Re?"Ничего не нашлось":"Наберите имя файла или каталога"})]}),_e&&c.jsx("div",{className:"cmdmenu",role:"listbox",ref:L,children:oe.map((J,fe)=>c.jsxs("button",{role:"option","aria-selected":fe===Ne,className:fe===Ne?"cmdmenu__row is-on":"cmdmenu__row",onMouseEnter:()=>A(fe),onMouseDown:Te=>{Te.preventDefault(),Jt(J)},children:[c.jsxs("span",{className:"cmdmenu__name",children:["/",J.name]}),J.argumentHint&&c.jsx("span",{className:"cmdmenu__hint",children:J.argumentHint}),c.jsx("span",{className:"cmdmenu__desc",children:J.description})]},J.name))}),c.jsxs("div",{className:"composer__field",children:[c.jsx("button",{type:"button",className:"addbtn",title:"Добавить контекст — файл проекта («@»)","aria-label":"Добавить контекст",disabled:s,onClick:qt,children:c.jsx(_S,{})}),c.jsx("textarea",{ref:Q,value:te,disabled:s,placeholder:be,onChange:J=>dn(J.target.value,J.target.selectionStart),onSelect:J=>re(J.currentTarget.selectionStart),onKeyDown:ut}),P.supported&&c.jsx("button",{type:"button",className:P.listening?"micbtn is-on":"micbtn",title:P.listening?"Остановить диктовку":"Продиктовать промпт","aria-label":P.listening?"Остановить диктовку":"Продиктовать промпт","aria-pressed":P.listening,disabled:s,onClick:P.toggle,children:c.jsx(SS,{on:P.listening})}),l?c.jsx("button",{className:"btn",onClick:_,title:"Прервать (Esc)",children:"Стоп"}):c.jsxs("button",{className:"btn btn--primary sendbtn",onClick:xn,disabled:s||te.trim()==="","aria-label":g,title:g,children:[c.jsx("span",{className:"sendbtn__label",children:g}),c.jsx(vS,{})]})]})]})})}function ah(s,l){const i=l.trim();if(i==="")return s;const r=vh(i).slice(bS(s,i)).join(" ");return r===""?s:s===""||/\s$/.test(s)?s+r:`${s} ${r}`}function bS(s,l){const i=vh(s),r=vh(l);for(let o=Math.min(i.length,r.length);o>0;o--)if(i.slice(i.length-o).every((d,h)=>xS(d,r[h]??"")))return o;return 0}function vh(s){return s.split(/\s+/).filter(l=>l!=="")}function xS(s,l){const i=r=>r.toLowerCase().replace(/[.,!?;:…]+$/u,"");return i(s)===i(l)}function _S(){return c.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round","aria-hidden":"true",children:c.jsx("path",{d:"M8 3.4v9.2M3.4 8h9.2"})})}function vS(){return c.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:c.jsx("path",{d:"M8 12.5V3.5M4 7.5 8 3.5l4 4"})})}function SS({on:s}){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"5.9",y:"1.7",width:"4.2",height:"7.6",rx:"2.1",fill:s?"currentColor":"none"}),c.jsx("path",{d:"M3.3 7.3v.8a4.7 4.7 0 0 0 9.4 0v-.8"}),c.jsx("path",{d:"M8 12.8v1.5"})]})}const Wb=4;function sh(s,l){const i=s.name.toLowerCase();return i===l?0:i.startsWith(l)?1:s.aliases.some(r=>r.toLowerCase().startsWith(l))?2:i.includes(l)?3:Wb}function kS({request:s,queued:l,onDecide:i}){const r=Zb(s.toolName,s.input);return c.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:c.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true",children:[c.jsxs("div",{className:"sheet__head",children:["Разрешить действие?",l>0&&` (ещё ${l} в очереди)`]}),c.jsxs("div",{className:"sheet__body",children:[c.jsx("div",{className:"sheet__tool",children:s.toolName}),s.reason&&c.jsx("p",{className:"sheet__reason",children:s.reason}),r?c.jsx(Hh,{diff:r}):c.jsx("pre",{className:"code",children:JSON.stringify(s.input,null,2)})]}),c.jsxs("div",{className:"sheet__actions",children:[c.jsx("button",{className:"btn",onClick:()=>i(s.requestId,"deny"),children:"Отклонить"}),c.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>i(s.requestId,"allow"),children:"Разрешить"})]})]})})}function wS({request:s,queued:l,onAnswer:i,onDecline:r}){const{questions:o}=s,[d,h]=S.useState(()=>o.map(()=>new Set)),[g,m]=S.useState(()=>o.map(()=>"")),[b,x]=S.useState(()=>Py(o));S.useEffect(()=>{h(o.map(()=>new Set)),m(o.map(()=>"")),x(Py(o))},[s.requestId]);const k=S.useMemo(()=>NS(o,d,g),[o,d,g]),_=k!==null;function C($,A){var Q,L;(L=(Q=o[$])==null?void 0:Q.options[A])!=null&&L.preview&&x(M=>{const W=M.slice();return W[$]=A,W})}function N($,A,Q){h(L=>{const M=L.slice(),W=new Set(M[$]);return Q?W.has(A)?W.delete(A):W.add(A):W.has(A)||(W.clear(),W.add(A)),M[$]=W,M}),A!=="other"&&C($,A)}function H($,A){m(Q=>{const L=Q.slice();return L[$]=A,L})}function B(){k&&i(s.requestId,k)}function K($){$.key==="Enter"&&($.target.closest("button")||_&&($.preventDefault(),B()))}function O($){var M;if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes($.key))return;const A=Array.from($.currentTarget.querySelectorAll("button.qsheet__option")),Q=A.indexOf(document.activeElement);if(Q===-1)return;$.preventDefault();const L=$.key==="ArrowDown"||$.key==="ArrowRight"?1:-1;(M=A[(Q+L+A.length)%A.length])==null||M.focus()}return c.jsx("div",{className:"modal-backdrop modal-backdrop--sheet",children:c.jsxs("div",{className:"qsheet",role:"dialog","aria-modal":"true","aria-label":"Вопрос от Claude",onKeyDown:K,children:[c.jsxs("div",{className:"qsheet__head",children:[c.jsx("span",{className:"qsheet__head-icon","aria-hidden":"true",children:"?"}),c.jsxs("span",{children:[o.length===1?"Уточняющий вопрос":`Уточняющие вопросы (${o.length})`,l>0&&` — ещё ${l} в очереди`]})]}),c.jsxs("div",{className:"qsheet__body",children:[s.reason&&c.jsx("p",{className:"qsheet__reason",children:s.reason}),o.map(($,A)=>c.jsx(jS,{q:$,qi:A,selected:d[A]??new Set,otherText:g[A]??"",previewIndex:b[A]??null,onToggle:N,onFocusOption:C,onOtherText:H,onOptionsKeyDown:O},A))]}),c.jsxs("div",{className:"qsheet__actions",children:[c.jsx("button",{className:"btn",onClick:()=>r(s.requestId),children:"Не отвечать"}),c.jsx("button",{className:"btn btn--primary",disabled:!_,onClick:B,children:"Ответить"})]})]})})}function jS({q:s,qi:l,selected:i,otherText:r,previewIndex:o,onToggle:d,onFocusOption:h,onOtherText:g,onOptionsKeyDown:m}){var C;const b=s.options.some(N=>N.preview),x=o!==null?(C=s.options[o])==null?void 0:C.preview:void 0,k=i.has("other"),_=s.multiSelect?"checkbox":"radio";return c.jsxs("div",{className:"qsheet__question",children:[c.jsxs("div",{className:"qsheet__qhead",children:[c.jsx("span",{className:"chip chip--accent",children:s.header}),c.jsx("span",{className:"qsheet__qtext",children:s.question})]}),c.jsxs("div",{className:"qsheet__options"+(s.multiSelect?"":" qsheet__options--radio"),role:s.multiSelect?"group":"radiogroup","aria-label":s.question,onKeyDown:m,children:[s.options.map((N,H)=>{const B=i.has(H);return c.jsxs("button",{type:"button",role:_,"aria-checked":B,className:"qsheet__option"+(B?" is-selected":""),onClick:()=>d(l,H,s.multiSelect),onFocus:()=>h(l,H),onMouseEnter:()=>h(l,H),children:[c.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),c.jsxs("span",{className:"qsheet__opt-body",children:[c.jsx("span",{className:"qsheet__opt-label",children:N.label}),c.jsx("span",{className:"qsheet__opt-desc",children:N.description})]})]},H)}),c.jsxs("div",{className:"qsheet__other",children:[c.jsxs("button",{type:"button",role:_,"aria-checked":k,className:"qsheet__option qsheet__option--other"+(k?" is-selected":""),onClick:()=>d(l,"other",s.multiSelect),children:[c.jsx("span",{className:"qsheet__opt-mark","aria-hidden":"true"}),c.jsxs("span",{className:"qsheet__opt-body",children:[c.jsx("span",{className:"qsheet__opt-label",children:"Другое"}),c.jsx("span",{className:"qsheet__opt-desc",children:"Свой вариант ответа"})]})]}),k&&c.jsx("input",{type:"text",className:"qsheet__other-input",placeholder:"Впишите свой вариант…","aria-label":`Свой вариант ответа на вопрос «${s.question}»`,value:r,onChange:N=>g(l,N.target.value),autoFocus:!0})]})]}),b&&c.jsx("pre",{className:"qsheet__preview",children:x??""})]})}function Py(s){return s.map(l=>{const i=l.options.findIndex(r=>r.preview);return i===-1?null:i})}function NS(s,l,i){const r={};for(let o=0;o<s.length;o++){const d=s[o];if(!d)continue;const h=l[o]??new Set,g=[];for(let m=0;m<d.options.length;m++){const b=d.options[m];b&&h.has(m)&&g.push(b.label)}if(h.has("other")){const m=(i[o]??"").trim();m&&g.push(m)}if(g.length===0)return null;r[d.question]=g.join(", ")}return r}function Pb({path:s}){const[l,i]=S.useState(!1),[r,o]=S.useState(!1),d=S.useRef(null);S.useEffect(()=>{if(!l)return;function g(m){var b;(b=d.current)!=null&&b.contains(m.target)||i(!1)}return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[l]),S.useEffect(()=>{if(!r)return;const g=setTimeout(()=>o(!1),Uh);return()=>clearTimeout(g)},[r]),S.useEffect(()=>i(!1),[s]);async function h(){await Lh(s)&&o(!0)}return c.jsxs("div",{ref:d,className:"cwd",children:[c.jsxs("button",{type:"button",className:"cwd__toggle","aria-expanded":l,title:l?"Свернуть путь":`Полный путь: ${s}`,onClick:()=>i(g=>!g),onKeyDown:g=>{g.key!=="Escape"||!l||(g.preventDefault(),g.stopPropagation(),i(!1))},children:[c.jsx(TS,{open:l}),c.jsx("span",{className:"cwd__short",children:s})]}),l&&c.jsxs("div",{className:"cwd__pop",children:[c.jsx("span",{className:"cwd__full",children:s}),c.jsx("button",{type:"button",className:"btn btn--ghost cwd__copy",onClick:()=>void h(),children:r?pr:Si})]})]})}function TS({open:s}){return c.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:c.jsx("path",{d:"M6 3.5 10.5 8 6 12.5"})})}function Hs({value:s,options:l,onChange:i,className:r,title:o,ariaLabel:d,placeholder:h="—"}){const[g,m]=S.useState(!1),[b,x]=S.useState(0),k=S.useRef(null),_=S.useRef(null),C=l.find(B=>B.value===s)??null;S.useEffect(()=>{if(!g)return;const B=l.findIndex(K=>K.value===s);x(B===-1?0:B)},[g]),S.useEffect(()=>{if(!g)return;function B(K){var O;(O=k.current)!=null&&O.contains(K.target)||m(!1)}return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[g]),S.useEffect(()=>{var B,K;g&&((K=(B=_.current)==null?void 0:B.querySelector(".is-cursor"))==null||K.scrollIntoView({block:"nearest"}))},[g,b]),S.useEffect(()=>{if(!g)return;const B=_.current,K=ES(k.current);if(!B||!K)return;const O=B.getBoundingClientRect().bottom-K.getBoundingClientRect().bottom;O>0&&(K.scrollTop+=Math.min(O+8,B.offsetHeight))},[g]);function N(B){m(!1),B.value!==s&&i(B.value)}function H(B){if(B.key==="Escape"){if(!g)return;B.preventDefault(),B.stopPropagation(),m(!1);return}if(B.key==="ArrowDown"||B.key==="ArrowUp"){if(B.preventDefault(),!g)return m(!0);const K=B.key==="ArrowDown"?1:l.length-1;return x(O=>(O+K)%l.length)}if(B.key==="Enter"||B.key===" "){if(B.preventDefault(),!g)return m(!0);const K=l[b];K&&N(K)}}return c.jsxs("div",{ref:k,className:"select"+(g?" select--open":"")+(r?` ${r}`:""),children:[c.jsxs("button",{type:"button",className:"select__trigger",title:o,"aria-label":d??o,"aria-haspopup":"listbox","aria-expanded":g,onClick:()=>m(B=>!B),onKeyDown:H,children:[c.jsx("span",{className:"select__value",children:(C==null?void 0:C.label)??h}),c.jsx(AS,{})]}),g&&c.jsx("div",{ref:_,className:"select__menu",role:"listbox","aria-label":d??o,children:l.map((B,K)=>c.jsxs("button",{type:"button",role:"option","aria-selected":B.value===s,className:"select__option"+(K===b?" is-cursor":"")+(B.value===s?" is-on":""),onMouseEnter:()=>x(K),onClick:()=>N(B),children:[c.jsx("span",{className:"select__check","aria-hidden":"true",children:B.value===s?"✓":""}),c.jsx("span",{className:"select__label",children:B.label}),B.hint&&c.jsx("span",{className:"select__hint",children:B.hint})]},B.value))})]})}function ES(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 AS(){return c.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:c.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}const CS=["low","medium","high"];function e0({models:s,value:l,effort:i,ultracode:r,thinking:o,switchOnFlag:d,className:h,onModel:g,onEffort:m,onUltracode:b,onThinking:x,onSwitchOnFlag:k}){const[_,C]=S.useState(!1),[N,H]=S.useState(0),B=S.useRef(null),K=S.useRef(null),O=s.find(M=>M.value===l)??null,$=O&&O.supportsEffort?O.effortLevels.length>0?O.effortLevels:CS:[],A=$.includes("xhigh");S.useEffect(()=>{if(!_)return;const M=s.findIndex(W=>W.value===l);H(M===-1?0:M)},[_]),S.useEffect(()=>{if(!_)return;function M(W){var re;(re=B.current)!=null&&re.contains(W.target)||C(!1)}return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[_]),S.useEffect(()=>{var M,W;_&&((W=(M=K.current)==null?void 0:M.querySelector(".is-cursor"))==null||W.scrollIntoView({block:"nearest"}))},[_,N]);function Q(M){C(!1),M.value!==l&&g(M.value)}function L(M){if(M.key==="Escape"){if(!_)return;M.preventDefault(),M.stopPropagation(),C(!1);return}if(M.key==="ArrowDown"||M.key==="ArrowUp"){if(M.preventDefault(),!_)return C(!0);if(s.length===0)return;const W=M.key==="ArrowDown"?1:s.length-1;return H(re=>(re+W)%s.length)}if(M.key==="Enter"||M.key===" "){if(M.preventDefault(),!_)return C(!0);const W=s[N];W&&Q(W)}}return c.jsxs("div",{ref:B,className:"select"+(_?" select--open":"")+(h?` ${h}`:""),children:[c.jsxs("button",{type:"button",className:"select__trigger",title:"Модель, усилие и размышления","aria-label":"Модель, усилие и размышления","aria-haspopup":"menu","aria-expanded":_,onClick:()=>C(M=>!M),onKeyDown:L,children:[c.jsx("span",{className:"select__value",children:(O==null?void 0:O.displayName)??l??"—"}),r?c.jsx("span",{className:"select__suffix select__suffix--hot",children:"ultracode"}):$.length>0&&i&&c.jsx("span",{className:"select__suffix",children:i}),c.jsx(RS,{})]}),_&&c.jsxs("div",{ref:K,className:"select__menu modelmenu",role:"menu",children:[c.jsx("div",{className:"modelmenu__head",children:"Модель"}),s.map((M,W)=>c.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":M.value===l,className:"select__option"+(W===N?" is-cursor":"")+(M.value===l?" is-on":""),onMouseEnter:()=>H(W),onClick:()=>Q(M),children:[c.jsx("span",{className:"select__check","aria-hidden":"true",children:M.value===l?"✓":""}),c.jsx("span",{className:"select__label",children:M.displayName}),M.description&&c.jsx("span",{className:"select__hint",children:M.description})]},M.value)),$.length>0&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"modelmenu__sep",role:"separator"}),c.jsxs("div",{className:"modelmenu__row",children:[c.jsxs("span",{className:"modelmenu__label",children:["Усилие",c.jsx("span",{className:"modelmenu__desc",children:"насколько усердно модель думает"})]}),c.jsx("span",{className:"modelmenu__levels",children:$.map(M=>c.jsx("button",{type:"button",role:"menuitemradio","aria-checked":M===i,className:M===i?"modelmenu__level is-on":"modelmenu__level",onClick:()=>m(M),children:M},M))})]}),A&&c.jsx(ih,{label:"Ultracode",desc:"xhigh и постоянная оркестрация подагентами",on:r,onToggle:()=>b(!r)})]}),c.jsx("div",{className:"modelmenu__sep",role:"separator"}),(O==null?void 0:O.supportsThinking)!==!1&&c.jsx(ih,{label:"Размышления",desc:"расширенное обдумывание перед ответом",on:o,onToggle:()=>x(!o)}),c.jsx(ih,{label:"Менять модель по флагу",desc:"иначе помеченный ход встаёт на паузу",on:d,onToggle:()=>k(!d)})]})]})}function ih({label:s,desc:l,on:i,onToggle:r}){return c.jsxs("button",{type:"button",role:"menuitemcheckbox","aria-checked":i,className:"modelmenu__row modelmenu__row--btn",onClick:r,children:[c.jsxs("span",{className:"modelmenu__label",children:[s,c.jsx("span",{className:"modelmenu__desc",children:l})]}),c.jsx("span",{className:i?"switch is-on":"switch","aria-hidden":"true",children:c.jsx("span",{className:"switch__knob"})})]})}function RS(){return c.jsx("svg",{className:"select__chev",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:c.jsx("path",{d:"M3 4.5 6 7.5 9 4.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Wl({title:s,children:l,actions:i,className:r,sheet:o=!1,onClose:d}){const h=S.useRef(null);return S.useEffect(()=>{function g(m){if(m.key==="Escape"){m.preventDefault(),m.stopPropagation(),d();return}if(m.key!=="Tab")return;const b=h.current;if(!b)return;const x=b.querySelectorAll('button, input, textarea, select, a[href], [tabindex]:not([tabindex="-1"])'),k=x[0],_=x[x.length-1];!k||!_||(m.shiftKey&&document.activeElement===k?(m.preventDefault(),_.focus()):!m.shiftKey&&document.activeElement===_&&(m.preventDefault(),k.focus()))}return document.addEventListener("keydown",g,!0),()=>document.removeEventListener("keydown",g,!0)},[d]),c.jsx("div",{className:o?"modal-backdrop modal-backdrop--sheet":"modal-backdrop",onMouseDown:g=>{g.target===g.currentTarget&&d()},children:c.jsxs("div",{ref:h,className:r?`modal ${r}`:"modal",role:"dialog","aria-modal":"true","aria-label":s,children:[c.jsxs("div",{className:"modal__head",children:[c.jsx("h2",{className:"modal__title",children:s}),c.jsx("button",{className:"modal__close","aria-label":"Закрыть",onClick:d,children:"✕"})]}),c.jsx("div",{className:"modal__body",children:l}),i&&c.jsx("div",{className:"modal__actions",children:i})]})})}function MS({candidates:s,searching:l,agentItems:i,agentBusy:r,error:o,roots:d,created:h,onSearch:g,onAskAgent:m,onInterrupt:b,onSubmit:x,onCreate:k,onClose:_}){const[C,N]=S.useState("open"),[H,B]=S.useState(""),[K,O]=S.useState(!1),[$,A]=S.useState(""),[Q,L]=S.useState(""),[M,W]=S.useState({git:!0,claudeMd:!0,readme:!0}),re=H.trim(),he=re!=="",F=$.trim(),ae=Q.trim(),me=F!==""&&ae!=="";S.useEffect(()=>{$===""&&d.length>0&&A(d[0])},[d]);const je=S.useRef(g);je.current=g,S.useEffect(()=>{if(C!=="open")return;const te=H.trim(),be=setTimeout(()=>je.current(te),200);return()=>clearTimeout(be)},[H,C]);function pe(){he&&x(re)}function z(){me&&k(F,ae,M)}function P(){he&&(O(!0),m(re))}return h?c.jsxs(Wl,{title:"Новый проект",onClose:_,actions:c.jsx("button",{className:"btn btn--primary",onClick:_,autoFocus:!0,children:"Понятно"}),children:[c.jsx("p",{className:"modal__text",children:"Каталог создан и открыт как проект, но часть шагов не удалась."}),c.jsx("p",{className:"newproj__preview",children:h.path}),c.jsx("div",{className:"modal__error",children:c.jsx("ul",{className:"newproj__warnings",children:h.warnings.map(te=>c.jsx("li",{children:te},te))})}),c.jsx("p",{className:"modal__text modal__text--dim",children:"Проект открыт и работает — недостающее можно добавить руками, в дереве файлов или из терминала."})]}):c.jsxs(Wl,{title:"Новый проект",className:K&&C==="open"?"modal--wide":void 0,onClose:_,actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:_,children:"Отмена"}),C==="open"?c.jsxs(c.Fragment,{children:[r?c.jsx("button",{className:"btn",onClick:b,children:"Остановить"}):c.jsx("button",{className:"btn",disabled:!he,onClick:P,title:"Найти по описанию",children:"Попросить агента"}),c.jsx("button",{className:"btn btn--primary",disabled:!he,onClick:pe,children:"Открыть"})]}):c.jsx("button",{className:"btn btn--primary",disabled:!me,onClick:z,children:"Создать"})]}),children:[c.jsxs("div",{className:"tabs",children:[c.jsx(eb,{label:"Открыть",on:C==="open",onClick:()=>N("open")}),c.jsx(eb,{label:"Создать",on:C==="create",onClick:()=>N("create")})]}),C==="open"?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"modal__text",children:"Каталог, в котором будет работать агент. Введите путь или часть имени — подходящие каталоги появятся ниже."}),c.jsx("label",{className:"field",htmlFor:"workspace-path",children:"Путь или название"}),c.jsx("input",{id:"workspace-path",className:"input input--mono",value:H,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects\\my-app",onChange:te=>B(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),pe())}}),o&&c.jsx("p",{className:"modal__error",children:o}),s.length>0&&c.jsx("ul",{className:"finds",children:s.map(te=>c.jsx("li",{children:c.jsxs("button",{className:"find",disabled:te.open,title:te.open?"Этот проект уже открыт":te.path,onClick:()=>B(te.path),onDoubleClick:()=>x(te.path),children:[c.jsx("span",{className:"find__name",children:te.name}),c.jsx("span",{className:"find__path",children:te.path}),c.jsx("span",{className:"find__note",children:zS(te)})]})},te.path))}),s.length===0&&he&&!l&&!K&&c.jsx("p",{className:"modal__text modal__text--dim",children:"Ничего похожего среди каталогов, где вы работали. Если помните не имя, а суть проекта — опишите его и нажмите «Попросить агента». Проекта ещё нет вовсе — рядом вкладка «Создать»."}),K&&c.jsx("div",{className:"finds__agent",children:c.jsx(Bh,{items:i,busy:r,waiting:!1,empty:"Агент ищет…"})})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"modal__text",children:"Пустой каталог для нового проекта. Дальше в нём работает агент — с первого промпта, без отдельной настройки."}),c.jsx("label",{className:"field",htmlFor:"workspace-parent",children:"Где создать"}),c.jsx("input",{id:"workspace-parent",className:"input input--mono",value:$,spellCheck:!1,autoComplete:"off",placeholder:"C:\\Projects",onChange:te=>A(te.target.value)}),d.length>0&&c.jsx("div",{className:"newproj__roots",children:d.map(te=>c.jsx("button",{type:"button",className:te===F?"newproj__root is-on":"newproj__root",title:te,onClick:()=>A(te),children:DS(te)},te))}),c.jsx("label",{className:"field newproj__field",htmlFor:"workspace-name",children:"Имя проекта"}),c.jsx("input",{id:"workspace-name",className:"input input--mono",value:Q,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"my-app",onChange:te=>L(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),z())}}),c.jsx("p",{className:"newproj__preview",children:me?OS(F,ae):"Каталог появится здесь"}),o&&c.jsx("p",{className:"modal__error",children:o}),c.jsxs("div",{className:"newproj__opts",children:[c.jsx(rh,{label:"git init",desc:"панель истории работает сразу",on:M.git,onToggle:()=>W(te=>({...te,git:!te.git}))}),c.jsx(rh,{label:"CLAUDE.md",desc:"заготовка инструкций для агента",on:M.claudeMd,onToggle:()=>W(te=>({...te,claudeMd:!te.claudeMd}))}),c.jsx(rh,{label:"README.md",desc:"по нему проект потом узнаёт поиск",on:M.readme,onToggle:()=>W(te=>({...te,readme:!te.readme}))})]})]})]})}function eb({label:s,on:l,onClick:i}){return c.jsx("button",{type:"button",className:l?"tabs__tab is-on":"tabs__tab","aria-pressed":l,onClick:i,children:s})}function rh({label:s,desc:l,on:i,onToggle:r}){return c.jsxs("button",{type:"button",role:"checkbox","aria-checked":i,className:"newproj__opt",onClick:r,children:[c.jsxs("span",{className:"newproj__optlabel",children:[s,c.jsx("span",{className:"newproj__optdesc",children:l})]}),c.jsx("span",{className:i?"switch is-on":"switch","aria-hidden":"true",children:c.jsx("span",{className:"switch__knob"})})]})}function OS(s,l){const i=s.includes("\\")?"\\":"/";return s.replace(/[\\/]+$/,"")+i+l}function DS(s){const l=s.includes("\\")?"\\":"/",i=s.split(/[\\/]/).filter(Boolean);return i.length<=2?s:`…${l}${i.slice(-2).join(l)}`}function zS(s){return s.open?"уже открыт":s.why?s.why:s.sessions===0?"рядом с вашими проектами":`${LS(s.sessions)}${US(s.lastUsedAt)}`}function LS(s){const l=s%10,i=s%100;return i>=11&&i<=14?`${s} сессий`:l===1?`${s} сессия`:l>=2&&l<=4?`${s} сессии`:`${s} сессий`}function US(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 qh=7;function HS(s){const l=[],i=[];let r=1;for(const o of s){const d=l.slice();let h=l.indexOf(o.hash);h===-1&&(h=tb(l),l[h]=o.hash);const[g,...m]=o.parents;l[h]=g??null;const b=[];g!==void 0&&b.push({from:h,to:h});for(const _ of m){let C=l.indexOf(_);C===-1&&(C=tb(l),l[C]=_),b.push({from:h,to:C})}const x=[];for(let _=0;_<d.length;_++)d[_]===o.hash&&(x.push({from:_,to:h}),_!==h&&(l[_]=null));const k=[];for(let _=0;_<d.length;_++){const C=d[_];!C||C===o.hash||_===h||l[_]===C&&k.push(_)}BS(l),r=Math.max(r,l.length,h+1),i.push({commit:o,col:h,up:x,down:b,through:k})}return{rows:i,columns:Math.min(r,qh)}}function tb(s){const l=s.indexOf(null);return l!==-1?l:(s.push(null),s.length-1)}function BS(s){for(;s.length>0&&s[s.length-1]===null;)s.pop()}const t0=1500;function qS(s){const l=[];let i=!1;for(const r of s.patch.split(`
|
|
120
|
-
`)){if(l.length>=t0){i=!0;break}if(r.startsWith("@@"))l.push({type:"gap",text:GS(r)});else if(r.startsWith("+"))l.push({type:"add",text:r.slice(1)});else if(r.startsWith("-"))l.push({type:"del",text:r.slice(1)});else{if(r.startsWith("\\"))continue;(r!==""||l.length>0)&&l.push({type:"ctx",text:r.startsWith(" ")?r.slice(1):r})}}return{kind:"patch",filePath:s.path||s.oldPath,rows:l,added:s.added,removed:s.removed,note:YS(s,i)}}function GS(s){const l=/^@@ -\d+(?:,\d+)? \+(\d+)(?:,(\d+))? @@ ?(.*)$/.exec(s);if(!l)return s;const i=Number(l[1]),r=l[2]===void 0?1:Number(l[2]),o=(l[3]??"").trim(),d=r>1?`строки ${i}–${i+r-1}`:`строка ${i}`;return o?`⋯ ${d} · ${o}`:`⋯ ${d}`}function YS(s,l){const i=[];return s.status==="added"&&i.push("новый файл"),s.status==="deleted"&&i.push("файл удалён"),s.status==="renamed"&&i.push(`переименован из ${s.oldPath}`),s.binary?i.push("двоичный файл"):s.patch===""&&i.push("содержимое не показано"),l&&i.push(`показаны первые ${t0} строк`),i.length>0?i.join(" · "):null}function IS({open:s,state:l,result:i,selected:r,onRefresh:o,onShow:d,onCheckout:h,onClose:g,zoomed:m,onToggleZoom:b}){const x=HS((l==null?void 0:l.commits)??[]),k=[...l!=null&&l.detached?[{value:"",label:`отделён · ${l.head.slice(0,8)}`}]:[],...((l==null?void 0:l.branches)??[]).map(_=>({value:_.name,label:_.name,hint:_.hash.slice(0,8)}))];return c.jsxs("aside",{className:(s?"sidepane sidepane--git sidepane--open":"sidepane sidepane--git")+(m?" sidepane--zoomed":""),"aria-label":"История git",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:_=>{b&&(_.target.closest("button")||b())},children:[c.jsx(ZS,{}),c.jsx("span",{className:"sidepane__title",children:"История"}),c.jsx("button",{className:"sidepane__btn",title:"Обновить","aria-label":"Обновить историю",onClick:o,children:"↻"}),b&&c.jsx("button",{className:"sidepane__btn",title:m?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":m?"Свернуть панель истории":"Развернуть панель истории на весь экран","aria-pressed":m,onClick:b,children:c.jsx(jr,{active:m})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель истории",onClick:g,children:"✕"})]}),l===null?c.jsx("p",{className:"sidepane__empty",children:"Читаем репозиторий…"}):l.available?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"gitbar",children:[c.jsx(Hs,{className:"gitbar__branch",title:"Ветка — выбрать значит переключиться",value:l.detached?"":l.branch,options:k,onChange:_=>{_&&h(_,`ветку ${_}`)}}),l.ahead>0&&c.jsxs("span",{className:"chip",title:`${l.ahead} — столько коммитов не отправлено`,children:["↑",l.ahead]}),l.behind>0&&c.jsxs("span",{className:"chip",title:`${l.behind} — столько коммитов не забрано`,children:["↓",l.behind]})]}),l.detached&&c.jsx("p",{className:"gitbar__note",children:"HEAD отделён от ветки. Выберите ветку в списке, чтобы вернуться."}),c.jsxs("div",{className:"sidepane__scroll",children:[c.jsx("button",{className:"gitrow gitrow--work"+(r===""?" is-on":""),onClick:()=>d(""),children:c.jsxs("span",{className:"gitrow__body",children:[c.jsx("span",{className:"gitrow__subject",children:l.changed.length>0?`Рабочее дерево · ${l.changed.length} ${FS(l.changed.length)}`:"Рабочее дерево чистое"}),c.jsx("span",{className:"gitrow__meta",children:l.changed.length>0?l.changed.slice(0,4).map(_=>JS(_.path)).join(", "):"незакоммиченных изменений нет"})]})}),x.rows.map(_=>c.jsx(XS,{row:_,columns:x.columns,head:_.commit.hash===l.head,local:l.hasRemote&&!_.commit.pushed,active:r===_.commit.hash,onOpen:()=>d(_.commit.hash)},_.commit.hash)),x.rows.length===0&&c.jsx("p",{className:"sidepane__empty",children:"В репозитории ещё нет коммитов"})]})]}):c.jsx("p",{className:"sidepane__empty",children:l.message||"Это не git-репозиторий"}),c.jsx(Uc,{result:i})]})}const Tc=50,nb=13;function XS({row:s,columns:l,head:i,local:r,active:o,onOpen:d}){const{commit:h}=s,g=h.refs.map(KS).filter(Boolean);return c.jsxs("button",{className:"gitrow"+(o?" is-on":""),title:r?"Коммит ещё не отправлен на удалённый репозиторий":void 0,onClick:d,children:[c.jsx(VS,{row:s,columns:l,head:i,local:r}),c.jsxs("span",{className:"gitrow__body",children:[c.jsxs("span",{className:"gitrow__subject",children:[g.map(m=>c.jsx("span",{className:"gitrow__ref",children:m},m)),h.subject]}),c.jsxs("span",{className:"gitrow__meta",children:[h.shortHash," · ",h.author," · ",WS(h.date),r&&c.jsx("span",{className:"gitrow__local",children:"· не отправлен"})]})]})]})}function VS({row:s,columns:l,head:i,local:r}){const o=l*nb+6,d=Tc/2,h=b=>8+Math.min(b,qh-1)*nb,g=r?"3.5 2.5":void 0,m=ho(s.col);return c.jsxs("svg",{className:"gitgraph",width:o,height:Tc,viewBox:`0 0 ${o} ${Tc}`,"aria-hidden":"true",children:[s.through.map(b=>c.jsx("line",{x1:h(b),y1:0,x2:h(b),y2:Tc,style:{stroke:ho(b)}},`t${b}`)),s.up.map((b,x)=>c.jsx("path",{d:`M${h(b.from)} 0 L${h(b.from)} ${d-12} L${h(b.to)} ${d}`,fill:"none",style:{stroke:ho(b.from),strokeDasharray:g}},`u${x}`)),s.down.map((b,x)=>c.jsx("path",{d:`M${h(b.from)} ${d} L${h(b.to)} ${d+12} L${h(b.to)} ${Tc}`,fill:"none",style:{stroke:ho(b.to),strokeDasharray:g}},`d${x}`)),i&&c.jsx("circle",{className:"gitgraph__head",cx:h(s.col),cy:d,r:s.commit.parents.length>1?7.4:6.6}),c.jsx("circle",{className:"gitgraph__dot",cx:h(s.col),cy:d,r:s.commit.parents.length>1?4.6:3.6,style:{stroke:m,fill:r?void 0:m}})]})}function ho(s){return`var(--lane-${s%qh})`}function QS({detail:s,local:l,onCheckout:i,onClose:r}){const o=s.hash==="";return c.jsxs(Wl,{className:"modal--wide",title:o?"Незакоммиченные изменения":`Коммит ${s.shortHash}`,onClose:r,actions:c.jsxs(c.Fragment,{children:[!o&&c.jsx("button",{className:"btn",onClick:()=>i(s.hash,`коммит ${s.shortHash} (HEAD отделится от ветки)`),children:"Переключиться сюда"}),c.jsx("button",{className:"btn btn--primary",onClick:r,children:"Закрыть"})]}),children:[!o&&c.jsxs("div",{className:"commit__head",children:[c.jsx("p",{className:"commit__subject",children:s.subject}),c.jsxs("p",{className:"commit__meta",children:[s.author,s.email&&` <${s.email}>`," · ",PS(s.date)," ·"," ",c.jsx("span",{className:"commit__hash",children:s.hash})]}),l&&c.jsx("p",{className:"commit__meta commit__meta--local",children:"Не отправлен: этого коммита нет ни в одной удалённой ветке."}),s.parents.length>0&&c.jsxs("p",{className:"commit__meta",children:[s.parents.length>1?"слияние: ":"родитель: ",s.parents.map(d=>d.slice(0,8)).join(", ")]}),s.body&&c.jsx("pre",{className:"commit__body",children:s.body})]}),s.truncated&&c.jsx("p",{className:"modal__text",children:"Изменения слишком велики — часть патча не показана."}),s.files.length===0?c.jsx("p",{className:"modal__text",children:"Изменений нет."}):s.files.map(d=>c.jsx($S,{file:d,defaultOpen:s.files.length<=3},d.path+d.oldPath))]})}function $S({file:s,defaultOpen:l}){const[i,r]=S.useState(l);return c.jsxs("div",{className:"commit__file",children:[c.jsxs("button",{className:"commit__filehead",onClick:()=>r(o=>!o),children:[c.jsx("span",{className:"commit__filepath",children:s.path||s.oldPath}),c.jsxs("span",{className:"diff__stat",children:[s.added>0&&c.jsxs("span",{className:"diff__stat--add",children:["+",s.added]}),s.removed>0&&c.jsxs("span",{className:"diff__stat--del",children:["−",s.removed]})]}),c.jsx("span",{className:"tool__status",children:i?"▴":"▾"})]}),i&&c.jsx(Hh,{diff:qS(s)})]})}function ZS(){return c.jsxs("svg",{className:"sidepane__icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),c.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),c.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),c.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function KS(s){return s.replace(/^HEAD -> /,"").replace(/^tag: /,"⌂ ").trim()}function JS(s){const l=s.split("/");return l[l.length-1]??s}function FS(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 WS(s){const l=Date.parse(s);if(Number.isNaN(l))return s;const i=Math.round((Date.now()-l)/6e4);if(i<1)return"только что";if(i<60)return`${i} мин назад`;const r=Math.round(i/60);if(r<24)return`${r} ч назад`;const o=Math.round(r/24);return o<30?`${o} дн назад`:new Date(l).toLocaleDateString()}function PS(s){const l=Date.parse(s);return Number.isNaN(l)?s:new Date(l).toLocaleString()}function ek({open:s,items:l,busy:i,ready:r,commands:o,contextResult:d,models:h,model:g,effort:m,ultracode:b,thinking:x,switchOnFlag:k,onContextSearch:_,onCommand:C,onModel:N,onEffort:H,onUltracode:B,onThinking:K,onSwitchOnFlag:O,onAsk:$,onInterrupt:A,onReset:Q,onClose:L,zoomed:M,onToggleZoom:W}){return c.jsxs("aside",{className:(s?"sidepane sidepane--ask sidepane--open":"sidepane sidepane--ask")+(M?" sidepane--zoomed":""),"aria-label":"Вопрос на полях",children:[c.jsxs("div",{className:"sidepane__head",onDoubleClick:re=>{W&&(re.target.closest("button")||W())},children:[c.jsx(tk,{}),c.jsx("span",{className:"sidepane__title",children:"Вопрос на полях"}),c.jsx("button",{className:"sidepane__btn",title:"Начать заново — следующий вопрос возьмёт свежий контекст","aria-label":"Начать боковой разговор заново",disabled:l.length===0,onClick:Q,children:"↻"}),W&&c.jsx("button",{className:"sidepane__btn",title:M?"Свернуть панель — то же самое, что двойной клик по шапке":"Развернуть панель на весь экран — то же самое, что двойной клик по шапке","aria-label":M?"Свернуть панель вопроса":"Развернуть панель вопроса на весь экран","aria-pressed":M,onClick:W,children:c.jsx(jr,{active:M})}),c.jsx("button",{className:"sidepane__btn",title:"Закрыть панель","aria-label":"Закрыть панель вопроса",onClick:L,children:"✕"})]}),h.length>0&&c.jsxs("div",{className:"sidepane__tools",children:[c.jsx(e0,{className:"select--compact",models:h,value:g,effort:m,ultracode:b,thinking:x,switchOnFlag:k,onModel:N,onEffort:H,onUltracode:B,onThinking:K,onSwitchOnFlag:O}),c.jsx("span",{className:"sidepane__note",title:"Боковой вопрос работает только на чтение",children:"только чтение"})]}),c.jsx(Bh,{items:l,busy:i,waiting:!1,empty:r?"Спросите о том, что происходит: вопрос уйдёт в сторону от основного разговора и не попадёт в его контекст. Отвечающий видит сессию и проект, но ничего не меняет.":"Откройте сессию — вопрос задаётся о ней."}),c.jsx(Fb,{className:"composer--side",disabled:!r,busy:i,commands:o,sessionTitle:null,contextResult:d,placeholder:"Спросить, не мешая работе…",sendLabel:"Спросить",autoFocus:s,onContextSearch:_,onCommand:C,onSend:$,onInterrupt:A,onEscape:i?A:L})]})}function tk(){return c.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:[c.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"}),c.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}const nk=75,lk=90;function n0({usage:s}){if(!(s!=null&&s.available))return null;const l=[];return s.fiveHour&&l.push({key:"five",label:"5 ч",window:s.fiveHour}),s.sevenDay&&l.push({key:"week",label:"нед",window:s.sevenDay}),l.length===0?null:c.jsx("div",{className:"usage",title:ik(s),"aria-label":`Расход лимитов плана${s.plan?` ${s.plan}`:""}`,children:l.map(i=>c.jsx(ak,{label:i.label,window:i.window},i.key))})}function ak({label:s,window:l}){const i=Math.round(l.utilization),r=rk(l.resetsAt);return c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"usage__label",children:s}),c.jsx("span",{className:"usage__track",role:"progressbar","aria-label":s,"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:c.jsx("span",{className:`usage__fill${sk(i)}`,style:{width:`${i}%`}})}),c.jsxs("span",{className:"usage__pct",children:[i,"%"]}),c.jsx("span",{className:"usage__reset",title:s0(l.resetsAt)||void 0,children:r&&`↻ ${r}`})]})}function sk(s){return s>=lk?" usage__fill--over":s>=nk?" usage__fill--warn":""}function ik(s){const l=[s.plan?`Лимиты плана ${s.plan}`:"Лимиты плана"],i=(r,o)=>{if(!o)return;const d=s0(o.resetsAt);l.push(`${r}: ${Math.round(o.utilization)}%${d?`, ${d}`:""}`)};return i("5 часов",s.fiveHour),i("Неделя",s.sevenDay),i("Неделя, Opus",s.sevenDayOpus),l.join(`
|
|
121
|
-
`)}function l0(s){if(!s)return null;const l=new Date(s);return Number.isNaN(l.getTime())?null:l}function a0(s){return s.getTime()-Date.now()<1440*60*1e3}function rk(s){const l=l0(s);return l?a0(l)?l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"}):l.toLocaleDateString(void 0,{day:"numeric",month:"short"}):""}function s0(s){const l=l0(s);return l?`обнулится ${a0(l)?`в ${l.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:l.toLocaleDateString(void 0,{day:"numeric",month:"long"})}`:""}function i0(){const[s,l]=S.useState(()=>new Date);return S.useEffect(()=>{let i=0;const r=()=>{const d=new Date;l(d),i=window.setTimeout(r,6e4-(d.getSeconds()*1e3+d.getMilliseconds()))};r();const o=()=>{document.hidden||(window.clearTimeout(i),r())};return document.addEventListener("visibilitychange",o),()=>{window.clearTimeout(i),document.removeEventListener("visibilitychange",o)}},[]),c.jsxs("time",{className:"clock",dateTime:s.toISOString(),title:ck(s),children:[c.jsx("span",{className:"clock__time",children:s.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}),c.jsx("span",{className:"clock__date",children:s.toLocaleDateString(void 0,{weekday:"short",day:"numeric",month:"short"})})]})}function ck(s){return s.toLocaleDateString(void 0,{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function uk({onClose:s,permission:l,model:i,usage:r,cwd:o,costLabel:d,onRefresh:h,refreshing:g,metersFetchedAt:m,onRename:b}){return c.jsx(Wl,{title:"Настройки сессии",className:"modal--sheet",sheet:!0,onClose:s,children:c.jsxs("div",{className:"sessionmenu",children:[l&&c.jsx(ur,{label:"Режим прав",children:l}),c.jsx(ur,{label:"Модель",children:i}),(r==null?void 0:r.available)&&(r.fiveHour||r.sevenDay)&&c.jsx(ur,{label:"Лимиты плана",children:c.jsx(n0,{usage:r})}),c.jsxs("button",{type:"button",className:g?"sessionmenu__refresh is-busy":"sessionmenu__refresh","aria-busy":g,disabled:g,onClick:h,children:[c.jsx(ok,{}),c.jsxs("span",{className:"sessionmenu__refresh-text",children:["Обновить показания",m&&c.jsxs("span",{className:"sessionmenu__refresh-time",children:["обновлено в"," ",new Date(m).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})]})]})]}),c.jsx(ur,{label:"Время",children:c.jsx(i0,{})}),d&&c.jsx(ur,{label:"Стоимость хода",children:c.jsx("span",{className:"badge badge--cost",children:d})}),o&&c.jsx(ur,{label:"Каталог проекта",children:c.jsx(Pb,{path:o})}),b&&c.jsx("button",{type:"button",className:"sessionmenu__rename",onClick:b,children:"Переименовать сессию"})]})})}function ur({label:s,children:l}){return c.jsxs("div",{className:"sessionmenu__row",children:[c.jsx("span",{className:"sessionmenu__label",children:s}),l]})}function ok(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),c.jsx("path",{d:"M14 2v3.33h-3.33"})]})}function fk({tab:s,servers:l,plugins:i,marketplaces:r,catalog:o,result:d,actions:h,onTab:g,onClose:m}){const b=[{id:"mcp",label:"MCP-серверы",count:l.length},{id:"plugins",label:"Плагины",count:i.length},{id:"catalog",label:"Каталог",count:o.length}];return c.jsxs(Wl,{title:"Расширения",className:"modal--wide",onClose:m,children:[c.jsx("div",{className:"tabs",role:"tablist",children:b.map(x=>c.jsxs("button",{role:"tab","aria-selected":s===x.id,className:s===x.id?"tabs__tab is-on":"tabs__tab",onClick:()=>g(x.id),children:[x.label,c.jsx("span",{className:"tabs__count",children:x.count})]},x.id))}),s==="mcp"&&c.jsx(dk,{servers:l,actions:h}),s==="plugins"&&c.jsx(yk,{plugins:i,marketplaces:r,actions:h}),s==="catalog"&&c.jsx(bk,{catalog:o,hasMarketplaces:r.length>0,actions:h,onMarketplaces:()=>g("plugins")}),c.jsx(Uc,{result:d})]})}function dk({servers:s,actions:l}){const[i,r]=S.useState(!1);return c.jsxs(c.Fragment,{children:[s.length===0&&!i&&c.jsxs("p",{className:"modal__text",children:["Ни одного MCP-сервера. Добавленный здесь попадёт в ",c.jsx("code",{children:".mcp.json"})," ","проекта — его увидит и консольный ",c.jsx("code",{children:"claude mcp list"}),"."]}),c.jsx("ul",{className:"extlist",children:s.map(o=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:o.name}),c.jsx("span",{className:`chip chip--${pk(o.status)}`,children:hk[o.status]}),o.scope&&c.jsx("span",{className:"chip",children:o.scope}),o.transport&&c.jsx("span",{className:"chip",children:o.transport})]}),o.target&&c.jsx("div",{className:"extlist__meta",title:o.target,children:o.target}),o.error&&c.jsx("div",{className:"extlist__error",children:o.error}),o.tools.length>0&&c.jsxs("div",{className:"extlist__meta",children:["Инструментов: ",o.tools.length," · ",o.tools.slice(0,6).join(", "),o.tools.length>6&&"…"]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"reconnect"),children:"Переподключить"}),o.status==="disabled"?c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"enable"),children:"Включить"}):c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>l.mcpAction(o.name,"disable"),children:"Выключить"}),o.editable&&c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>l.mcpRemove(o.name),children:"Удалить"})]})]},o.name))}),i?c.jsx(mk,{onCancel:()=>r(!1),onSubmit:(o,d)=>{l.mcpAdd(o,d),r(!1)}}):c.jsx("div",{className:"extbar",children:c.jsx("button",{className:"btn btn--primary",onClick:()=>r(!0),children:"+ Сервер"})})]})}const hk={connected:"подключён",failed:"ошибка","needs-auth":"нужна авторизация",pending:"подключается",disabled:"выключен",unknown:"неизвестно"};function pk(s){return s==="connected"?"ok":s==="failed"?"bad":s==="needs-auth"?"warn":"mute"}function mk({onSubmit:s,onCancel:l}){const[i,r]=S.useState(""),[o,d]=S.useState("stdio"),[h,g]=S.useState(""),[m,b]=S.useState(""),[x,k]=S.useState(""),_=o==="stdio",C=i.trim()!==""&&(_?h.trim()!=="":m.trim()!=="");function N(){if(C)if(_){const[H,...B]=gk(h);s(i.trim(),{transport:"stdio",command:H??"",args:B,env:lb(x)})}else s(i.trim(),{transport:o,url:m.trim(),headers:lb(x)})}return c.jsxs("div",{className:"extform extform--card",children:[c.jsx("label",{className:"field",htmlFor:"mcp-name",children:"Имя сервера"}),c.jsx("input",{id:"mcp-name",className:"input input--mono",value:i,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"context7",onChange:H=>r(H.target.value)}),c.jsx("label",{className:"field",children:"Транспорт"}),c.jsx(Hs,{title:"Транспорт",value:o,options:[{value:"stdio",label:"stdio",hint:"локальный процесс"},{value:"http",label:"http",hint:"удалённый сервер"},{value:"sse",label:"sse",hint:"удалённый, поток событий"}],onChange:H=>d(H)}),_?c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"mcp-command",children:"Команда с аргументами"}),c.jsx("input",{id:"mcp-command",className:"input input--mono",value:h,spellCheck:!1,autoComplete:"off",placeholder:"npx -y @upstash/context7-mcp",onChange:H=>g(H.target.value)})]}):c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"mcp-url",children:"URL"}),c.jsx("input",{id:"mcp-url",className:"input input--mono",value:m,spellCheck:!1,autoComplete:"off",placeholder:"https://mcp.example.dev/mcp",onChange:H=>b(H.target.value)})]}),c.jsxs("label",{className:"field",htmlFor:"mcp-pairs",children:[_?"Переменные окружения":"Заголовки"," — по одной на строку, необязательно"]}),c.jsx("textarea",{id:"mcp-pairs",className:"input input--mono input--area",value:x,spellCheck:!1,placeholder:_?"API_KEY=xxx":"Authorization: Bearer xxx",onChange:H=>k(H.target.value)}),c.jsxs("div",{className:"extbar",children:[c.jsx("button",{className:"btn",onClick:l,children:"Отмена"}),c.jsx("button",{className:"btn btn--primary",disabled:!C,onClick:N,children:"Подключить"})]})]})}function lb(s){const l={};for(const i of s.split(`
|
|
122
|
-
`)){const r=i.trim();if(!r)continue;const o=r.indexOf("="),d=r.indexOf(":"),h=o===-1?d:d===-1?o:Math.min(o,d);h<=0||(l[r.slice(0,h).trim()]=r.slice(h+1).trim())}return l}function gk(s){return(s.trim().match(/"[^"]*"|'[^']*'|\S+/g)??[]).map(l=>l.replace(/^["']|["']$/g,""))}function yk({plugins:s,marketplaces:l,actions:i}){const[r,o]=S.useState("");return c.jsxs(c.Fragment,{children:[s.length===0&&c.jsx("p",{className:"modal__text",children:"Ни одного установленного плагина. Что можно поставить — на вкладке «Каталог»."}),c.jsx("ul",{className:"extlist",children:s.map(d=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:d.name}),c.jsx("span",{className:d.enabled?"chip chip--ok":"chip chip--mute",children:d.enabled?"включён":"выключен"}),d.version&&d.version!=="unknown"&&c.jsx("span",{className:"chip",children:d.version}),d.scope&&c.jsx("span",{className:"chip",children:d.scope})]}),d.marketplace&&c.jsx("div",{className:"extlist__meta",children:d.marketplace}),d.mcpServers.length>0&&c.jsxs("div",{className:"extlist__meta",children:["MCP-серверы: ",d.mcpServers.join(", ")]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",onClick:()=>i.pluginToggle(d.id,!d.enabled),children:d.enabled?"Выключить":"Включить"}),c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>i.pluginUninstall(d.id),children:"Удалить"})]})]},d.id))}),c.jsx("div",{className:"sidebar__section",children:"Маркетплейсы"}),c.jsx("ul",{className:"extlist",children:l.map(d=>c.jsxs("li",{className:"extlist__row",children:[c.jsx("div",{className:"extlist__head",children:c.jsx("span",{className:"extlist__name",children:d.name})}),d.source&&c.jsx("div",{className:"extlist__meta",children:d.source}),c.jsx("div",{className:"extlist__actions",children:c.jsx("button",{className:"btn btn--ghost btn--sm btn--danger",onClick:()=>i.marketplaceRemove(d.name),children:"Отключить"})})]},d.name))}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{className:"input input--mono",value:r,spellCheck:!1,autoComplete:"off","aria-label":"Источник маркетплейса",placeholder:"owner/repo, URL или путь",onChange:d=>o(d.target.value),onKeyDown:d=>{d.key!=="Enter"||r.trim()===""||(d.preventDefault(),i.marketplaceAdd(r.trim()),o(""))}}),c.jsx("button",{className:"btn",disabled:r.trim()==="",onClick:()=>{i.marketplaceAdd(r.trim()),o("")},children:"Добавить"})]})]})}const Ec=30;function bk({catalog:s,hasMarketplaces:l,actions:i,onMarketplaces:r}){const[o,d]=S.useState(""),[h,g]=S.useState(""),[m,b]=S.useState(Ec),[x,k]=S.useState(""),_=S.useMemo(()=>[...new Set(s.map(H=>H.category).filter(Boolean))].sort(),[s]),C=S.useMemo(()=>{const N=o.trim().toLowerCase();return s.filter(H=>h&&H.category!==h?!1:N?`${H.name} ${H.displayName} ${H.description} ${H.author}`.toLowerCase().includes(N):!0)},[s,o,h]);return s.length===0?c.jsxs("p",{className:"modal__text",children:[l?"Маркетплейсы подключены, но их каталог ещё не выкачан. Попробуйте открыть окно ещё раз через минуту.":"Ни одного маркетплейса — ставить нечего."," ",c.jsx("button",{className:"linkish",onClick:r,children:"Подключить маркетплейс"})]}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"catalog__filters",children:[c.jsx("input",{className:"input",value:o,spellCheck:!1,autoComplete:"off","aria-label":"Поиск по каталогу",placeholder:"Поиск: имя, описание, автор",onChange:N=>{d(N.target.value),b(Ec)}}),c.jsx(Hs,{title:"Категория",value:h,options:[{value:"",label:"все категории"},..._.map(N=>({value:N,label:N}))],onChange:N=>{g(N),b(Ec)}})]}),C.length===0?c.jsx("p",{className:"modal__text",children:"Ничего не нашлось."}):c.jsx("ul",{className:"extlist",children:C.slice(0,m).map(N=>c.jsxs("li",{className:"extlist__row",children:[c.jsxs("div",{className:"extlist__head",children:[c.jsx("span",{className:"extlist__name",children:N.name}),N.installed&&c.jsx("span",{className:"chip chip--ok",children:"установлен"}),N.version&&c.jsx("span",{className:"chip",children:N.version}),N.category&&c.jsx("span",{className:"chip",children:N.category})]}),N.description&&c.jsx("div",{className:"catalog__desc",children:N.description}),c.jsxs("div",{className:"extlist__meta",children:[N.author&&`${N.author} · `,N.marketplace]}),c.jsxs("div",{className:"extlist__actions",children:[c.jsx("button",{className:"btn btn--ghost btn--sm",disabled:N.installed,onClick:()=>i.pluginInstall(N.id),children:N.installed?"Уже стоит":"Установить"}),N.homepage&&c.jsx("a",{className:"btn btn--ghost btn--sm",href:N.homepage,target:"_blank",rel:"noreferrer",children:"Страница"})]})]},N.id))}),C.length>m&&c.jsx("div",{className:"extbar",children:c.jsxs("button",{className:"btn",onClick:()=>b(N=>N+Ec),children:["Ещё ",Math.min(Ec,C.length-m)," из ",C.length-m]})}),c.jsxs("div",{className:"extform",children:[c.jsx("label",{className:"field",htmlFor:"plugin-spec",children:"Или установить по имени — если нужного в каталоге нет"}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{id:"plugin-spec",className:"input input--mono",value:x,spellCheck:!1,autoComplete:"off",placeholder:"имя или имя@маркетплейс",onChange:N=>k(N.target.value),onKeyDown:N=>{N.key!=="Enter"||x.trim()===""||(N.preventDefault(),i.pluginInstall(x.trim()),k(""))}}),c.jsx("button",{className:"btn",disabled:x.trim()==="",onClick:()=>{i.pluginInstall(x.trim()),k("")},children:"Установить"})]})]})]})}function xk({status:s,login:l,actions:i,runningSessions:r,onClose:o}){const[d,h]=S.useState(""),[g,m]=S.useState(!1),[b,x]=S.useState(!1),k=S.useMemo(()=>{if(l.error)return{ok:!1,message:l.error};const N=l.output.trim();return N===""?null:{ok:!0,message:N}},[l.error,l.output]);function _(){d.trim()!==""&&(i.submitCode(d.trim()),h(""))}function C(){if(r>0){m(!1),x(!0);return}i.login("claudeai",!0)}return c.jsxs(Wl,{title:"Аккаунт",onClose:o,children:[s===null?c.jsx("p",{className:"modal__text",children:"Спрашиваем у хоста…"}):s.loggedIn?c.jsxs("div",{className:"account",children:[c.jsx("div",{className:"account__id",children:s.email||"Вход выполнен"}),c.jsxs("div",{className:"account__chips",children:[c.jsx("span",{className:"chip chip--ok",children:vk[s.method]??s.method}),s.plan&&c.jsx("span",{className:"chip",children:s.plan})]}),s.organization&&c.jsx("div",{className:"extlist__meta",children:s.organization})]}):c.jsxs("p",{className:"modal__text",children:["Вход не выполнен. Сессии не запустятся, пока аккаунт не подключён — или пока в окружении хоста нет ",c.jsx("code",{children:"ANTHROPIC_API_KEY"}),"."]}),l.active?c.jsx(Sk,{login:l,code:d,onCode:h,onSubmit:_,onCancel:i.cancel}):c.jsxs(c.Fragment,{children:[c.jsx(Uc,{result:k}),b&&c.jsx("p",{className:"account__warn",role:"alert",children:_k(r)}),c.jsx("div",{className:"extbar",children:s!=null&&s.loggedIn?c.jsxs(c.Fragment,{children:[b?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>x(!1),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",autoFocus:!0,onClick:()=>{x(!1),i.login("claudeai",!0)},children:"Всё равно сменить"})]}):c.jsx("button",{className:"btn",onClick:C,children:"Сменить аккаунт"}),g?c.jsx("button",{className:"btn btn--danger",autoFocus:!0,onClick:()=>{m(!1),i.logout()},children:"Точно выйти?"}):c.jsx("button",{className:"btn",onClick:()=>{x(!1),m(!0)},children:"Выйти"})]}):c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>i.login("console",!1),children:"Через Console"}),c.jsx("button",{className:"btn btn--primary",onClick:()=>i.login("claudeai",!1),children:"Войти"})]})})]})]})}function _k(s){const l=s%10,i=s%100,r=l===1&&i!==11,o=r?"сессия":l>=2&&l<=4&&(i<12||i>14)?"сессии":"сессий";return`${s} ${o} сейчас ${r?"работает":"работают"} — смена аккаунта может ${r?"её":"их"} прервать.`}const vk={"claude.ai":"подписка Claude",console:"Anthropic Console",apiKey:"API-ключ",none:"нет"};function Sk({login:s,code:l,onCode:i,onSubmit:r,onCancel:o}){return c.jsxs("div",{className:"account__flow",children:[s.url?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"field",children:"Откройте ссылку и подтвердите вход"}),c.jsx("a",{className:"account__link",href:s.url,target:"_blank",rel:"noreferrer",children:s.url})]}):c.jsx("p",{className:"modal__text",children:"Запускаем вход…"}),s.awaitingCode&&c.jsxs(c.Fragment,{children:[c.jsx("label",{className:"field",htmlFor:"auth-code",children:"Код со страницы авторизации"}),c.jsxs("div",{className:"extform__row",children:[c.jsx("input",{id:"auth-code",className:"input input--mono",value:l,autoFocus:!0,spellCheck:!1,autoComplete:"off",placeholder:"вставьте код",onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),r())}}),c.jsx("button",{className:"btn btn--primary",disabled:l.trim()==="",onClick:r,children:"Готово"})]})]}),s.output.trim()!==""&&c.jsx("pre",{className:"account__log",children:s.output.trim()}),c.jsx("div",{className:"extbar",children:c.jsx("button",{className:"btn",onClick:o,children:"Отменить вход"})})]})}function kk({state:s,onPair:l,onUnpair:i,onClose:r}){const[o,d]=S.useState(""),[h,g]=S.useState(""),[m,b]=S.useState(!1),x=S.useRef(null),k=(s==null?void 0:s.paired)===!0;S.useEffect(()=>{var C;k||(C=x.current)==null||C.focus()},[k]),S.useEffect(()=>{b(!1),k&&d("")},[k,s==null?void 0:s.error]);const _=(s==null?void 0:s.url)??"https://claudevisual.com";return c.jsx(Wl,{title:"Удалённый доступ",onClose:r,children:k?c.jsxs("div",{className:"relay",children:[c.jsxs("p",{className:"relay__lede",children:["Компьютер связан с аккаунтом на ",c.jsx("b",{children:ab(_)}),". Открывайте его оттуда с любого устройства — с телефона в том числе."]}),c.jsxs("dl",{className:"relay__facts",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Имя"}),c.jsx("dd",{children:(s==null?void 0:s.name)??"—"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Связь"}),c.jsxs("dd",{children:[c.jsx("span",{className:s!=null&&s.connected?"dot dot--on":"dot"})," ",s!=null&&s.connected?"на связи":"нет связи, пробуем переподключиться"]})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Подключено"}),c.jsxs("dd",{children:[(s==null?void 0:s.clients)??0," вкладок"]})]})]}),(s==null?void 0:s.error)&&c.jsx("p",{className:"relay__error",children:s.error}),c.jsx("p",{className:"relay__note",children:"Терминал с удалённых устройств настраивается в настройках приложения, раздел «Терминал»."}),c.jsx("p",{className:"relay__note",children:"Отвязка гасит токен этой машины: чтобы вернуть доступ, понадобится новый код. Сессии Claude Code это не трогает."}),c.jsx("button",{className:"btn btn--danger",onClick:i,children:"Отвязать компьютер"})]}):c.jsxs("div",{className:"relay",children:[c.jsx("p",{className:"relay__lede",children:"Чтобы работать с этим компьютером из браузера и с телефона, свяжите его с аккаунтом."}),c.jsxs("ol",{className:"relay__steps",children:[c.jsxs("li",{children:["Откройте ",c.jsx("b",{children:ab(_)})," и войдите (или зарегистрируйтесь)."]}),c.jsxs("li",{children:["Нажмите ",c.jsx("b",{children:"«Подключить ПК»"})," — появится код из восьми знаков."]}),c.jsx("li",{children:"Введите его сюда."})]}),c.jsxs("form",{className:"relay__form",onSubmit:C=>{C.preventDefault(),o.trim()&&(b(!0),l(o.trim(),h.trim()))},children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Код сопряжения"}),c.jsx("input",{ref:x,className:"input relay__code",value:o,onChange:C=>d(C.target.value.toUpperCase()),placeholder:"XXXX-XXXX",autoComplete:"off",spellCheck:!1,maxLength:12})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Как назвать этот компьютер"}),c.jsx("input",{className:"input",value:h,onChange:C=>g(C.target.value),placeholder:"имя машины",autoComplete:"off",maxLength:64})]}),(s==null?void 0:s.error)&&c.jsx("p",{className:"relay__error",children:s.error}),c.jsx("button",{className:"btn btn--primary",type:"submit",disabled:!o.trim()||m,children:m?"Связываем…":"Связать"})]})]})})}function ab(s){try{return new URL(s).host}catch{return s}}const ch="",wk=[{value:"opus",label:"Opus",hint:"полный список моделей виден, когда открыта сессия"},{value:"sonnet",label:"Sonnet",hint:"полный список моделей виден, когда открыта сессия"},{value:"haiku",label:"Haiku",hint:"полный список моделей виден, когда открыта сессия"}],jk=bb.map(s=>({value:s.value,label:s.value,hint:s.hint})),po=3600*1e3,Nk=[{value:"6h",label:"6 часов"},{value:"24h",label:"Сутки"},{value:"48h",label:"Двое суток"},{value:"168h",label:"Неделя"},{value:"never",label:"Никогда"}],fr={"6h":6*po,"24h":24*po,"48h":48*po,"168h":168*po,never:0};function Tk(s){return fr[s]??fr["48h"]}function Ek(s){const l=Object.entries(fr).find(([,i])=>i===s);return l?l[0]:Object.keys(fr).reduce((i,r)=>Math.abs(fr[r]-s)<Math.abs(fr[i]-s)?r:i)}const Ak=[{value:"off",label:"Выключено"},{value:"500",label:"0.5 с"},{value:"1500",label:"1.5 с"},{value:"3000",label:"3 с"},{value:"10000",label:"10 с"}],dr={off:0,500:500,1500:1500,3e3:3e3,1e4:1e4};function Ck(s){return dr[s]??dr.off}function Rk(s){const l=Object.entries(dr).find(([,i])=>i===s);return l?l[0]:Object.keys(dr).reduce((i,r)=>Math.abs(dr[r]-s)<Math.abs(dr[i]-s)?r:i)}const Mk=[{value:"project",title:"Только текущий проект",description:"Агент молча пишет файлы в открытом проекте и в ~/.claude — настройках самого Claude Code. Чужой проект и любая новая папка — только с явного разрешения."},{value:"projects",title:"Папка с проектами",description:"То же плюс каталог, где лежат открытые проекты, — то есть и соседний проект тоже. Всё остальное — с разрешения."},{value:"all",title:"Все папки на компьютере",description:"Агент пишет файлы куда угодно на диске — вопросов про место записи не будет.",risky:!0}];function Ok({settings:s,models:l,relayState:i,local:r,onChange:o,onEnableShell:d,onDisableShell:h,onOpenRelay:g,onClose:m}){const b=s===null,x=!b&&s.terminalEnabled===!0,k=!x,_=S.useMemo(()=>{const N=[{value:ch,label:"Как в Claude Code",hint:"модель определят настройки самого Claude Code"},...l.length>0?l.map(H=>({value:H.value,label:H.displayName,hint:H.description})):wk];return s&&s.startModel!==null&&!N.some(H=>H.value===s.startModel)&&N.push({value:s.startModel,label:s.startModel}),N},[l,s]);function C(){var N,H;return(i==null?void 0:i.paired)!==!0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Компьютер не связан с аккаунтом — включать удалённый доступ пока не к чему: без пары ни телефон, ни другое устройство этот компьютер вообще не видят."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:g,children:"Связать компьютер"})]}):(N=i.shell)!=null&&N.enabled?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"settings__hint",children:["Разрешён: с телефона и любого другого устройства этого аккаунта можно открыть терминал и выполнить на этом компьютере что угодно — как если бы сидели за ним.",i.shell.confirmedAt&&` Включено ${new Date(i.shell.confirmedAt).toLocaleString()}.`]}),c.jsx("button",{type:"button",className:"btn btn--danger",disabled:k,onClick:h,children:"Запретить"})]}):(H=i.shell)!=null&&H.pending?c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"settings__hint",children:["Письмо ушло на ",c.jsx("b",{children:i.shell.email}),". Перейдите по ссылке из него — терминал заработает удалённо."]}),c.jsx("p",{className:"settings__hint",children:"Повторная отправка ограничена раз в минуту — если жали кнопку только что, письмо не придёт и от повторного нажатия тоже. Если сейчас доберётесь до самого компьютера, там разрешение включится сразу, без письма."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Отправить письмо ещё раз"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Сейчас с телефона можно смотреть разговоры и файлы, но не запускать команды. Разрешение даёт полный доступ к терминалу этого компьютера: с телефона станет можно выполнить любую команду, как в обычной консоли за этой машиной."}),r?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Включится сразу — вы уже за этим компьютером, подтверждать доступ к нему нечем и незачем."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Разрешить с телефона"})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"settings__hint",children:"Отсюда мгновенно не включится: на почту аккаунта уйдёт письмо, и терминал заработает только после перехода по ссылке из него."}),c.jsx("button",{type:"button",className:"btn",disabled:k,onClick:d,children:"Прислать письмо"})]})]})}return c.jsx(Wl,{title:"Настройки",onClose:m,children:c.jsxs("div",{className:"settings",children:[c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Архивация молчащих сессий"}),c.jsx("p",{className:"settings__hint",children:"Сессия, к которой долго не возвращались, сама уезжает в архив — на диске ничего не удаляется, транскрипт остаётся, и её можно вернуть обратно в любой момент."}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(Hs,{className:"settings__select",value:Ek(s.autoArchiveAfterMs),options:Nk,onChange:N=>o({autoArchiveAfterMs:Tk(N)}),ariaLabel:"Через сколько молчащая сессия уезжает в архив"})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Автосохранение"}),c.jsx("p",{className:"settings__hint",children:"Открытый файл сам уезжает на диск, если немного постоять без ввода — ручное сохранение, кнопкой или Ctrl+S, при этом всегда работает как обычно, независимо от этой настройки."}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(Hs,{className:"settings__select",value:Rk(s.autoSaveAfterPauseMs),options:Ak,onChange:N=>o({autoSaveAfterPauseMs:Ck(N)}),ariaLabel:"Пауза перед автосохранением открытого файла"})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Старт новой сессии"}),c.jsx("p",{className:"settings__hint",children:"Модель и режим прав, с которыми поднимается новая сессия. Уже открытую это не меняет — у неё свои переключатели в шапке."}),c.jsxs("div",{className:"settings__field",children:[c.jsx("span",{className:"settings__field-label",children:"Модель"}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(Hs,{className:"settings__select",value:s.startModel??ch,options:_,onChange:N=>o({startModel:N===ch?null:N}),ariaLabel:"Модель, с которой поднимается новая сессия"})]}),c.jsxs("div",{className:"settings__field",children:[c.jsx("span",{className:"settings__field-label",children:"Режим прав при старте"}),b?c.jsx("div",{className:"settings__select-skeleton","aria-hidden":"true",children:"Загрузка…"}):c.jsx(Hs,{className:"settings__select",value:s.startPermissionMode,options:jk,onChange:N=>o({startPermissionMode:N}),ariaLabel:"Режим прав, с которым поднимается новая сессия"})]})]}),c.jsxs("section",{className:"settings__section",children:[c.jsx("h3",{className:"settings__heading",children:"Доступ к папкам"}),c.jsx("p",{className:"settings__hint",children:"Это про то, где агент пишет файлы (Write, Edit, NotebookEdit), не спрашивая разрешения, — не про чтение: читает он в любом случае. Ничего не запрещается наглухо — выход за выбранную границу просто превращается в обычный запрос прав, который остаётся подтвердить или отклонить."}),c.jsx("div",{className:"access",role:"radiogroup","aria-label":"Доступ к папкам",children:Mk.map(N=>{const H=!b&&s.folderAccess===N.value;return c.jsxs("button",{type:"button",role:"radio","aria-checked":H,disabled:b,className:"access__card"+(H?" is-on":"")+(N.risky?" access__card--risky":""),onClick:()=>o({folderAccess:N.value}),children:[c.jsx("span",{className:"access__radio","aria-hidden":"true"}),c.jsxs("span",{className:"access__body",children:[c.jsxs("span",{className:"access__title",children:[N.title,N.risky&&c.jsx("span",{className:"access__risk",children:"самое широкое"})]}),c.jsx("span",{className:"access__desc",children:N.description})]})]},N.value)})})]}),c.jsxs("section",{className:"settings__section",children:[c.jsxs("div",{className:"settings__switch-row",children:[c.jsxs("div",{className:"settings__switch-copy",children:[c.jsx("h3",{className:"settings__heading",children:"Терминал"}),c.jsx("p",{className:"settings__hint",children:"Панель терминала под лентой разговора: команда, которую там набрали, выполняется прямо на этом компьютере с правами вашего пользователя — не в песочнице агента, как Bash-инструмент в разговоре. Выключите — и все открытые вкладки терминала закроются, а процессы в них не переживут закрытия."})]}),b?c.jsx("div",{className:"settings__switch-skeleton","aria-hidden":"true"}):c.jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-label":"Терминал",className:x?"switch is-on":"switch",onClick:()=>o({terminalEnabled:!x}),children:c.jsx("span",{className:"switch__knob"})})]}),c.jsxs("div",{className:"settings__nested"+(k?" is-disabled":""),children:[c.jsx("h4",{className:"settings__nested-heading",children:"Удалённый доступ к терминалу"}),b?c.jsx("p",{className:"settings__hint",children:"Загрузка…"}):c.jsxs(c.Fragment,{children:[k&&c.jsx("p",{className:"settings__hint",children:"Сначала включите терминал выше — удалённый доступ выдаётся к тому, что на этой машине уже разрешено, а не поверх выключенного рубильника."}),C()]})]})]})]})})}const Dk=16;function zk({pane:s,width:l,onResize:i,onReset:r}){const o=_i[s],d=S.useRef(null);function h(x){if(x.button!==0)return;const k=document.querySelector(".main"),_=k?Math.max(0,k.getBoundingClientRect().width-Jx):0;d.current={x:x.clientX,width:l,max:Math.min(o.max,l+_)},x.currentTarget.setPointerCapture(x.pointerId),document.body.classList.add("is-resizing"),x.preventDefault()}function g(x){const k=d.current;if(!k)return;const _=o.side==="left"?x.clientX-k.x:k.x-x.clientX;i(Math.min(k.max,k.width+_))}function m(x){d.current&&(d.current=null,x.currentTarget.hasPointerCapture(x.pointerId)&&x.currentTarget.releasePointerCapture(x.pointerId),document.body.classList.remove("is-resizing"))}function b(x){const k=x.key==="ArrowRight"?1:x.key==="ArrowLeft"?-1:0;k!==0&&(x.preventDefault(),i(l+k*Dk*(o.side==="left"?1:-1)))}return c.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:g,onPointerUp:m,onPointerCancel:m,onDoubleClick:r,onKeyDown:b,children:c.jsx("span",{className:"pane-resizer__line","aria-hidden":"true"})})}const Lk=16;function Uk({height:s,onResize:l,onReset:i}){const r=S.useRef(null);function o(){const b=document.querySelector(".main .transcript, .main .editor");if(!b)return 1/0;const x=b.getBoundingClientRect().height-e_;return Math.round(s+Math.max(0,x))}function d(b){b.button===0&&(r.current={y:b.clientY,height:s,max:o()},b.currentTarget.setPointerCapture(b.pointerId),document.body.classList.add("is-resizing-row"),b.preventDefault())}function h(b){const x=r.current;if(!x)return;const k=x.y-b.clientY;l(x.height+k,x.max)}function g(b){r.current&&(r.current=null,b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.releasePointerCapture(b.pointerId),document.body.classList.remove("is-resizing-row"))}function m(b){const x=b.key==="ArrowUp"?1:b.key==="ArrowDown"?-1:0;x!==0&&(b.preventDefault(),l(s+x*Lk,o()))}return c.jsx("div",{className:"term-resizer",role:"separator","aria-orientation":"horizontal","aria-label":"Высота панели терминала","aria-valuenow":s,"aria-valuemin":vb,tabIndex:0,title:"Потяните, чтобы изменить высоту; двойной щелчок — высота по умолчанию",onPointerDown:d,onPointerMove:h,onPointerUp:g,onPointerCancel:g,onDoubleClick:i,onKeyDown:m,children:c.jsx("span",{className:"term-resizer__line","aria-hidden":"true"})})}function sb(){const s=document.documentElement,l=getComputedStyle(s),i=O=>l.getPropertyValue(O).trim(),r=i("--surface"),o=i("--text"),d=i("--text-2"),h=i("--muted"),g=i("--accent"),m=i("--accent-fg"),b=i("--select"),x=i("--danger"),k=i("--ok"),_=i("--warn"),C=i("--cm-fn"),N=i("--cm-key"),H=i("--cm-type"),B=ib(o,r,55),K=O=>ib(O,"#ffffff",25);return{background:r,foreground:o,cursor:g,cursorAccent:m,selectionBackground:b,black:B,brightBlack:h,red:x,brightRed:K(x),green:k,brightGreen:K(k),yellow:_,brightYellow:K(_),blue:C,brightBlue:K(C),magenta:N,brightMagenta:K(N),cyan:H,brightCyan:K(H),white:d,brightWhite:o}}function Hk(){return getComputedStyle(document.documentElement).getPropertyValue("--mono").trim()}let ga=null;function Bk(s){return ga||(ga=document.createElement("span"),ga.style.position="fixed",ga.style.width="0",ga.style.height="0",ga.style.opacity="0",ga.style.pointerEvents="none",document.body.appendChild(ga)),ga.style.color=s,getComputedStyle(ga).color}function ib(s,l,i){return Bk(`color-mix(in srgb, ${s} ${100-i}%, ${l} ${i}%)`)}let mo=null;function qk(){return mo||(mo=Promise.all([Xe(()=>import("./xterm-D6Mng-DB.js").then(s=>s.x),__vite__mapDeps([22,23]),import.meta.url),Xe(()=>import("./addon-fit-CevVMrUA.js").then(s=>s.a),__vite__mapDeps([24,23]),import.meta.url),Xe(()=>import("./addon-web-links-CnB65OV_.js").then(s=>s.a),__vite__mapDeps([25,23]),import.meta.url),Xe(()=>Promise.resolve({}),__vite__mapDeps([26]),import.meta.url)]).then(([s,l,i])=>({Terminal:s.Terminal,FitAddon:l.FitAddon,WebLinksAddon:i.WebLinksAddon})).catch(s=>{throw mo=null,s})),mo}function Gk({terminals:s,activeId:l,blocked:i,height:r,offset:o,mobile:d=!1,zoomed:h,onToggleZoom:g,onSelect:m,onOpen:b,onClose:x,onInput:k,onResize:_,onAttach:C,onHide:N,registerSink:H}){const[B,K]=S.useState(()=>sb());return S.useEffect(()=>{const O=new MutationObserver(()=>K(sb()));return O.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>O.disconnect()},[]),c.jsxs("div",{className:"termpanel"+(d?" termpanel--mobile":"")+(!d&&h?" termpanel--zoomed":""),style:d?{height:r,top:(o==null?void 0:o.top)??0,left:(o==null?void 0:o.left)??0}:h?void 0:{height:r},children:[c.jsxs("div",{className:"termpanel__tabbar",onDoubleClick:O=>{g&&(O.target.closest("button")||g())},children:[c.jsx("div",{className:"termpanel__tabs",role:"tablist","aria-label":"Открытые терминалы",children:s.map(O=>c.jsxs("div",{role:"tab","aria-selected":O.id===l,className:"termtab"+(O.id===l?" is-on":"")+(O.exitCode!==null?" termtab--exited":""),onDoubleClick:$=>{g&&($.target.closest(".termtab__close")||g())},children:[c.jsx("button",{className:"termtab__name",title:O.cwd,onClick:()=>m(O.id),children:O.title}),O.exitCode!==null&&c.jsx("span",{className:"termtab__code",title:`Оболочка завершилась с кодом ${O.exitCode}`,children:O.exitCode}),c.jsx("button",{className:"termtab__close",title:"Закрыть терминал","aria-label":`Закрыть терминал «${O.title}»`,onClick:()=>x(O.id),children:"✕"})]},O.id))}),c.jsx("button",{className:"termpanel__add",title:"Новый терминал","aria-label":"Новый терминал",disabled:i,onClick:b,children:"+"}),c.jsx("div",{className:"termpanel__spacer"}),g&&c.jsx("button",{className:"termpanel__zoom",title:h?"Свернуть терминал — то же самое, что двойной клик по вкладке":"Развернуть терминал на весь экран — то же самое, что двойной клик по вкладке","aria-label":h?"Свернуть терминал":"Развернуть терминал на весь экран","aria-pressed":h,onClick:g,children:c.jsx(jr,{active:h})}),c.jsx("button",{className:"termpanel__hide",title:"Скрыть панель","aria-label":"Скрыть панель терминала",onClick:N,children:"✕"})]}),c.jsxs("div",{className:"termpanel__body",children:[i?c.jsxs("div",{className:"termpanel__empty",children:[c.jsx("p",{children:"Терминал с удалённых устройств выключен"}),c.jsx("p",{className:"termpanel__hint",children:"Откройте «Удалённый доступ» → «Прислать письмо»: на почту аккаунта придёт ссылка, и после перехода по ней терминал заработает прямо здесь. Если сейчас доберётесь до самого компьютера — там разрешение включается сразу, без письма."})]}):s.length===0&&c.jsxs("div",{className:"termpanel__empty",children:[c.jsx("p",{children:"Терминалов не открыто"}),c.jsx("button",{className:"btn btn--primary",onClick:b,children:"Открыть терминал"})]}),s.map(O=>c.jsx(Yk,{id:O.id,exitCode:O.exitCode,active:O.id===l,theme:B,mobile:d,onInput:k,onResize:_,onAttach:C,registerSink:H},O.id))]})]})}function Yk({id:s,exitCode:l,active:i,theme:r,mobile:o,onInput:d,onResize:h,onAttach:g,registerSink:m}){const b=S.useRef(null),x=S.useRef(null),k=S.useRef(!1),_=S.useRef(o);_.current=o;const C=S.useRef(r),N=S.useRef(l),[H,B]=S.useState("loading"),[K,O]=S.useState(!1);return S.useEffect(()=>{if(!b.current)return;let A=!1,Q=null;B("loading"),O(!1);const L=window.setTimeout(()=>{A||O(!0)},200);return(async()=>{let M;try{M=await qk()}catch{window.clearTimeout(L),A||B("error");return}if(A||!b.current)return;window.clearTimeout(L);const{Terminal:W,FitAddon:re,WebLinksAddon:he}=M,F=new W({fontFamily:Hk()||"monospace",fontSize:13,lineHeight:1.2,cursorBlink:!0,cursorStyle:"bar",scrollback:5e3,theme:C.current}),ae=new re;F.loadAddon(ae),F.loadAddon(new he),F.open(b.current),x.current=F,F.attachCustomKeyEventHandler(be=>{if(be.type!=="keydown"||!(be.ctrlKey||be.metaKey))return!0;if(be.key==="`")return!1;if(be.key==="c"||be.key==="C"){const j=F.getSelection();return j?(navigator.clipboard.writeText(j),!1):!be.shiftKey}return be.shiftKey&&(be.key==="v"||be.key==="V")?(navigator.clipboard.readText().then(j=>{j&&F.paste(j)}),!1):!0});const me=F.onData(be=>d(s,be));let je={cols:F.cols,rows:F.rows},pe=null;const z=F.onResize(({cols:be,rows:we})=>{pe!==null&&window.clearTimeout(pe),pe=window.setTimeout(()=>{pe=null,!(be===je.cols&&we===je.rows)&&(je={cols:be,rows:we},h(s,be,we))},100)}),P=new ResizeObserver(()=>{try{ae.fit()}catch{return}_.current&&F.scrollToBottom()});P.observe(b.current);const te=m(s,be=>{be.kind==="buffer"&&F.reset(),F.write(be.data)});g(s),N.current!==null&&!k.current&&(k.current=!0,F.write(`\r
|
|
123
|
-
\x1B[2m— Процесс завершён (код ${N.current}) —\x1B[0m\r
|
|
124
|
-
`)),i&&F.focus(),Q=()=>{pe!==null&&window.clearTimeout(pe),P.disconnect(),me.dispose(),z.dispose(),te(),F.dispose(),x.current=null},B("ready")})(),()=>{A=!0,window.clearTimeout(L),Q==null||Q(),Q=null}},[s]),S.useEffect(()=>{if(!o)return;const $=b.current;if(!$)return;let A=null,Q=0,L=!1;const M=F=>{F.pointerType==="mouse"||A!==null||(A=F.pointerId,Q=F.clientY,L=!1)},W=F=>{if(F.pointerId!==A)return;const ae=Q-F.clientY;if(!L){if(Math.abs(ae)<4)return;L=!0,$.setPointerCapture(F.pointerId)}Q=F.clientY;const me=$.querySelector(".xterm-viewport");me&&(me.scrollTop+=ae)},re=F=>{F.pointerId===A&&($.hasPointerCapture(F.pointerId)&&$.releasePointerCapture(F.pointerId),A=null,L=!1)},he=F=>F.stopPropagation();return $.addEventListener("pointerdown",M),$.addEventListener("pointermove",W),$.addEventListener("pointerup",re),$.addEventListener("pointercancel",re),$.addEventListener("touchmove",he,{capture:!0}),()=>{$.removeEventListener("pointerdown",M),$.removeEventListener("pointermove",W),$.removeEventListener("pointerup",re),$.removeEventListener("pointercancel",re),$.removeEventListener("touchmove",he,{capture:!0}),A!==null&&$.hasPointerCapture(A)&&$.releasePointerCapture(A)}},[o]),S.useEffect(()=>{C.current=r,x.current&&(x.current.options.theme=r)},[r]),S.useEffect(()=>{var $;i&&(($=x.current)==null||$.focus())},[i]),S.useEffect(()=>{if(N.current=l,l===null){k.current=!1;return}if(k.current)return;const $=x.current;$&&(k.current=!0,$.write(`\r
|
|
125
|
-
\x1B[2m— Процесс завершён (код ${l}) —\x1B[0m\r
|
|
126
|
-
`))},[l]),c.jsxs("div",{className:"termview"+(i?" is-active":""),children:[c.jsx("div",{ref:b,className:"termview__surface"+(H==="ready"?"":" is-hidden")}),H==="loading"&&K&&c.jsxs("div",{className:"termview__state work",role:"status",children:[c.jsxs("div",{className:"work__dots",children:[c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"}),c.jsx("span",{className:"work__dot"})]}),c.jsx("span",{className:"work__label",children:"Загружается терминал…"})]}),H==="error"&&c.jsxs("div",{className:"termview__state termview__state--error",role:"alert",children:[c.jsx("p",{children:"Не удалось загрузить терминал"}),c.jsx("p",{className:"termpanel__hint",children:"Соединение оборвалось раньше, чем приехал нужный модуль — на мобильном relay это обычное дело на слабой сети. Ниже — перезагрузка страницы, а не тихий повтор: открытые терминалы и их содержимое приедут обратно с хоста, а вот черновик в поле ввода внизу — нет."}),c.jsx("button",{className:"btn btn--primary",onClick:()=>window.location.reload(),children:"Перезагрузить страницу"})]})]})}const Ik=2e5,Xk=75,Vk=90;function Qk({tokens:s,maxTokens:l,fetchedAt:i}){if(s===null)return null;const r=l??Ik,o=Math.min(100,Math.round(s/r*100)),d=`${s.toLocaleString()} из ${r.toLocaleString()} токенов${i?`
|
|
127
|
-
обновлено в ${new Date(i).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:""}`;return c.jsxs("div",{className:"contextbar","aria-label":`Занято контекста: ${o}%`,title:d,children:[c.jsx("span",{className:"contextbar__label",children:"контекст"}),c.jsx("span",{className:"contextbar__track",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,children:c.jsx("span",{className:`contextbar__fill${$k(o)}`,style:{width:`${o}%`}})}),c.jsxs("span",{className:"contextbar__pct",children:[o,"%"]})]})}function $k(s){return s>=Vk?" contextbar__fill--over":s>=Xk?" contextbar__fill--warn":""}const r0="ccv:last-session",Zk=300*1e3,Kk=1e4;function Jk(){try{const s=localStorage.getItem(r0);if(!s)return null;const l=JSON.parse(s);if(typeof l!="object"||l===null)return null;const{workspaceId:i,sessionId:r,claudeSessionId:o}=l;return typeof i!="string"||typeof r!="string"?null:{workspaceId:i,sessionId:r,claudeSessionId:typeof o=="string"?o:null}}catch{return null}}function Fk(s,l){return s.id===l.sessionId?!0:l.claudeSessionId?s.id===l.claudeSessionId||s.claudeSessionId===l.claudeSessionId:!1}const Wk={mcp:"mcp",plugins:"plugins",plugin:"plugins"},rb=[{name:"login",description:"Войти в аккаунт Claude — окно приложения",argumentHint:"",aliases:["signin","вход"]},{name:"switch-account",description:"Сменить аккаунт: выйти и войти заново",argumentHint:"",aliases:["account","аккаунт"]},{name:"logout",description:"Выйти из аккаунта Claude",argumentHint:"",aliases:["signout","выход"]}],Pk={active:!1,url:"",awaitingCode:!1,output:"",error:null};function cb(s,l,i){if(s===null)return null;const r=s.lastIndexOf("/");if(r===-1&&s!=="")return l;const o=i[r===-1?"":s.slice(0,r)];if(!o)return null;const d=s.slice(r+1).toLowerCase();return d===""?{query:s,entries:o}:{query:s,entries:o.filter(h=>h.name.toLowerCase().includes(d)).sort((h,g)=>ub(h.name,d)-ub(g.name,d))}}function ub(s,l){return s.toLowerCase().startsWith(l)?0:1}function ob(s,l){const i=s.find(o=>o.value===l)??s.find(o=>o.resolvedModel===l),r=l&&!i?l:null;return{rows:[...r?[{value:r,resolvedModel:r,displayName:r,description:"задана в настройках",supportsEffort:!1,effortLevels:[],supportsThinking:!0,supportsAutoMode:!1}]:[],...s],selected:(i==null?void 0:i.value)??r??(s.some(o=>o.value==="default")?"default":"")}}function ew(){var su;const s=S.useRef(null),[l,i]=S.useState(!1),[r,o]=S.useState("Нет связи с хостом"),[d,h]=S.useState(null),[g,m]=S.useState(!1),b=S.useMemo(()=>bo()==="relay",[]),[x,k]=S.useState([]),[_,C]=S.useState([]),[N,H]=S.useState([]),[B,K]=S.useState([]),[O,$]=S.useState(null),[A,Q]=S.useState(null),[L,M]=S.useState(null),[W,re]=S.useState(il),[he,F]=S.useState(Vd),[ae,me]=S.useState(!1),[je,pe]=S.useState(!1),z=kh("(max-width: 860px)"),[P,te]=S.useState(!1);S.useEffect(()=>{z||te(!1)},[z]);const[be,we]=S.useState(!1),[j,V]=S.useState([]),[ce,oe]=S.useState(!1),[_e,Ne]=S.useState(il),[Re,it]=S.useState(null),[Ze,st]=S.useState(null),[qe,Rt]=S.useState([]),[Je,Ke]=S.useState(null),[Fe,dt]=S.useState(null),[Fn,qt]=S.useState([]),[Tn,xn]=S.useState([]),[dn,Un]=S.useState([]),[Jt,ut]=S.useState([]),[hn,J]=S.useState(null),[fe,Te]=S.useState(!1),[Qe,Nt]=S.useState(null),[Tt,_n]=S.useState(null),[tn,Gt]=S.useState(!1),[En,pt]=S.useState(Pk),[vn,T]=S.useState(null),[Y,xe]=S.useState(null),[Me,Ue]=S.useState(!1),[An,,Hl]=Zx(),Yn=Px(),[Hn,pn]=S.useState(!1),[Yt,wl]=S.useState(null),[ka,wa]=S.useState(null),[qs,Bl]=S.useState(null),[Pa,ql]=S.useState(null),[ja,cl]=S.useState(null),[It,Mt]=S.useState(!1),[Ge,mn]=S.useState({}),[ea,Na]=S.useState([""]),[ul,In]=S.useState([]),[ol,fl]=S.useState(null),[ta,Cn]=S.useState(null),[dl,nn]=S.useState(null),[mt,Xn]=S.useState(null),[ji,Vn]=S.useState(null),[hl,Gs]=S.useState({}),[na,la]=S.useState({}),[pl,Qn]=S.useState(!1),[ml,gn]=S.useState(null),[xt,es]=S.useState(null),Ni=S.useRef(0),Gl=S.useRef(null),[jl,aa]=S.useState(!1),[Ta,ln]=S.useState([]),[Ys,sa]=S.useState(null),gl=t_(),Wn=l_(z&&jl),ue=S.useRef(new Map),w=(Tt==null?void 0:Tt.terminalEnabled)===!0,U=bo()==="relay"&&((su=d==null?void 0:d.shell)==null?void 0:su.enabled)!==!0,se=S.useRef(!1),ve=S.useCallback((y,X)=>(ue.current.set(y,X),()=>{ue.current.get(y)===X&&ue.current.delete(y)}),[]),[Ae,ze]=S.useState(!1),[wt,Zt]=S.useState(null),[yn,gt]=S.useState(il),[Ot,Xt]=S.useState(null),[Nl,Pn]=S.useState({}),ts=S.useRef([]),[Et,Ti]=S.useState(null);function Is(y){Ti(X=>X===y?null:y)}S.useEffect(()=>{(z||Et==="terminal"&&!jl||Et==="files"&&!It||Et==="search"&&!pl||Et==="git"&&!Hn||Et==="ask"&&!Ae||Et==="main"&&ul.length===0)&&Ti(null)},[Et,z,jl,It,pl,Hn,Ae,ul.length]);const[Yl]=S.useState(Jk),Ei=S.useRef(Yl),ia=S.useRef(!1),Vt=S.useRef(null),Sn=S.useRef(null),Xs=S.useRef(0);Vt.current=A,Sn.current=O,Xs.current=W.lastSeq;const Tl=S.useRef(null),Vs=S.useRef(0);Vs.current=yn.lastSeq;const Ea=S.useRef(null),Qs=S.useRef(""),an=S.useRef(null),$n=S.useRef([]),$s=S.useRef([""]);$n.current=ul,$s.current=ea;const Il=S.useRef(new Map),Ai=S.useRef(new Set),Aa=S.useRef(null),Ca=S.useRef(null),ns=S.useRef(0);S.useEffect(()=>{const y=Xx();if(!y)return;s.current=y;const X=()=>{i(y.connected),o(y.statusText)};y.onStatus(X),y.onReconnect(()=>{X();const Dt=Vt.current;Dt&&y.send({type:"session.sync",sessionId:Dt,sinceSeq:Xs.current});const At=Tl.current;At&&y.send({type:"session.sync",sessionId:At,sinceSeq:Vs.current})});const de=y.on(Dt=>Ci(Dt));y.connect();const De=window.setInterval(()=>{X(),y.connected&&y.send({type:"ping",nonce:Date.now()})},15e3);return()=>{de(),window.clearInterval(De),y.close()}},[]);const Ci=S.useCallback(y=>{var X,de,De,Dt,At,kn;switch(y.type){case"hello.ok":i(!0);break;case"workspace.list":{k(y.workspaces),$(Ye=>{var ca;if(Ye)return Ye;const Ct=Ei.current,Qt=Ct&&y.workspaces.find(rs=>rs.id===Ct.workspaceId);return(Qt==null?void 0:Qt.id)??((ca=y.workspaces[0])==null?void 0:ca.id)??null});const Ce=an.current;if(!Ce)break;const Be=y.workspaces.find(Ye=>aw(Ye.path,Ce));if(!Be)break;an.current=null,we(!1),$(Be.id);break}case"workspace.candidates":if(y.query.trim()!==Qs.current)break;V(y.candidates),y.source==="host"&&oe(!1);break;case"finder.opened":Ea.current=y.sessionId;break;case"workspace.roots":Rt(y.roots);break;case"workspace.created":if($(y.workspace.id),y.warnings.length===0){we(!1),st(null);break}Ke({path:y.workspace.path,warnings:y.warnings});break;case"session.list":if(y.workspaceId!==Sn.current)break;C(y.sessions),H(y.archived);break;case"session.pinned":K(y.sessions);break;case"session.summary":if(y.session.id===Ea.current){it(y.session);break}if(y.session.parentSessionId){y.session.id===Tl.current&&Xt(y.session);break}C(Ce=>{const Be=Ce.findIndex(Ct=>Ct.id===y.session.id);if(Be===-1)return[y.session,...Ce];const Ye=Ce.slice();return Ye[Be]=y.session,Ye}),K(Ce=>{const Be=Ce.findIndex(Ct=>Ct.id===y.session.id);if(Be===-1)return Ce;const Ye=Ce.slice();return Ye[Be]={...y.session,pinned:!0,...Ce[Be].pinnedAt?{pinnedAt:Ce[Be].pinnedAt}:{}},Ye}),Q(Ce=>Ce??y.session.id);break;case"usage.state":y.sessionId===Vt.current&&(T(y.usage),Ue(!1));break;case"context.state":y.sessionId===Vt.current&&(xe(y.context),Ue(!1));break;case"session.capabilities":y.sessionId===Vt.current&&M(y.capabilities);break;case"session.events":if(y.sessionId===Tl.current){gt(Ce=>xo(Ce,y.entries));break}if(y.sessionId===Ea.current){Ne(Ce=>xo(Ce,y.entries));break}if(y.sessionId!==Vt.current)break;re(Ce=>xo(Ce,y.entries));break;case"session.history":if(y.sessionId!==Vt.current)break;F(Ce=>Vx(Ce,y));break;case"side.opened":{if(y.parentSessionId!==Vt.current)break;Tl.current=y.sessionId,Zt(y.sessionId);const Ce=ts.current;ts.current=[];for(const Be of Ce)Be(y.sessionId);break}case"side.closed":if(y.parentSessionId!==Vt.current)break;Tl.current=null,Zt(null),gt(il),Xt(null);break;case"git.state":if(y.workspaceId!==Sn.current)break;wl(y.state);break;case"git.commit":if(y.workspaceId!==Sn.current)break;wa(y.detail);break;case"git.result":if(y.workspaceId!==Sn.current)break;ql({ok:y.ok,message:y.message}),y.ok&&(wa(null),Bl(null));break;case"fs.dir":if(y.workspaceId!==Sn.current)break;mn(Ce=>({...Ce,[y.path]:y.entries}));break;case"fs.search":if(y.workspaceId!==Sn.current)break;if(y.scope!=="tree"){const Ce=y.scope;la(Be=>({...Be,[Ce]:{query:y.query,entries:y.entries}}));break}Vn({query:y.query,entries:y.entries,truncated:y.truncated});break;case"fs.grep":if(y.workspaceId!==Sn.current)break;gn({query:y.query,matches:y.matches,truncated:y.truncated});break;case"fs.file":{if(y.workspaceId!==Sn.current)break;const Ce=Ai.current.delete(y.file.path);In(Ye=>{const Ct=Ye.findIndex(rs=>rs.path===y.file.path);if(Ct===-1)return[...Ye,Uy(y.file,++ns.current)];const Qt=Ye[Ct],ca=Ye.slice();return ca[Ct]=Qt.saved===y.file.content&&!Ja(Qt)?{...Qt,mtime:y.file.mtime,size:y.file.size,stale:!1}:Uy(y.file,++ns.current),ca}),Ce&&fl(y.file.path);const Be=Gl.current;Be&&Be.path===y.file.path&&(Gl.current=null,es({...Be,token:++Ni.current}));break}case"fs.saved":{if(y.workspaceId!==Sn.current)break;const Ce=Il.current.get(y.path);Il.current.delete(y.path);const Be=Ce!==void 0;In(Ct=>Ct.map(Qt=>Qt.path!==y.path?Qt:Be?{...Qt,saved:Ce,mtime:y.mtime,size:y.size,stale:!1}:{...Qt,stale:!0}));const Ye=$n.current.find(Ct=>Ct.path===y.path);!Be&&Ye&&!Ja(Ye)&&((X=s.current)==null||X.send({type:"fs.read",workspaceId:y.workspaceId,path:y.path})),(de=s.current)==null||de.send({type:"git.state",workspaceId:y.workspaceId});break}case"fs.result":{if(y.workspaceId!==Sn.current)break;if(Cn({ok:y.ok,message:y.message}),y.ok||Il.current.delete(y.path),y.conflict&&In(Be=>Be.map(Ye=>Ye.path===y.path?{...Ye,stale:!0}:Ye)),Ca.current===y.path){const Be=Ca.current;Ca.current=null,y.ok&&(Ai.current.add(Be),(De=s.current)==null||De.send({type:"fs.read",workspaceId:y.workspaceId,path:Be}))}const Ce=Aa.current;if(y.ok&&Ce&&Ce.to===y.path){Aa.current=null;const Be=Ye=>Ye===Ce.from?Ce.to:Ye.startsWith(`${Ce.from}/`)?Ce.to+Ye.slice(Ce.from.length):Ye;In(Ye=>Ye.map(Ct=>({...Ct,path:Be(Ct.path)}))),fl(Ye=>Ye===null?null:Be(Ye)),Na(Ye=>Ye.map(Be)),mn(Ye=>{const Ct={};for(const[Qt,ca]of Object.entries(Ye))Qt===Ce.from||Qt.startsWith(`${Ce.from}/`)||(Ct[Qt]=ca);return Ct})}y.ok&&((Dt=s.current)==null||Dt.send({type:"git.state",workspaceId:y.workspaceId}));break}case"term.list":if(y.workspaceId!==Sn.current)break;ln(y.terminals);break;case"term.opened":if(y.terminal.workspaceId!==Sn.current)break;ln(Ce=>{const Be=Ce.findIndex(Ct=>Ct.id===y.terminal.id);if(Be===-1)return[...Ce,y.terminal];const Ye=Ce.slice();return Ye[Be]=y.terminal,Ye}),se.current&&(se.current=!1,sa(y.terminal.id));break;case"term.buffer":(At=ue.current.get(y.id))==null||At({kind:"buffer",data:y.data});break;case"term.data":(kn=ue.current.get(y.id))==null||kn({kind:"data",data:y.data});break;case"term.exit":ln(Ce=>Ce.map(Be=>Be.id===y.id?{...Be,exitCode:y.exitCode}:Be));break;case"term.closed":ln(Ce=>Ce.filter(Be=>Be.id!==y.id));break;case"mcp.list":y.sessionId===Vt.current&&qt(y.servers);break;case"plugin.list":if(y.sessionId!==Vt.current)break;xn(y.plugins),Un(y.marketplaces),ut(y.catalog);break;case"operation.result":y.sessionId===Vt.current&&J(y.result);break;case"auth.status":Nt(y.status);break;case"relay.state":h(y.state);break;case"settings.state":_n(y.settings);break;case"auth.login":pt(y.state),y.state.active&&Te(!0);break;case"session.closed":C(Ce=>Ce.map(Be=>Be.id===y.sessionId?{...Be,state:"closed"}:Be));break;case"error":console.error("[host]",y.message,y.context??""),(y.context==="workspace.open"||y.context==="workspace.create")&&(an.current=null,st(y.message));break}},[]),ie=S.useCallback(y=>{var X;(X=s.current)==null||X.send(y)},[]);S.useEffect(()=>{O&&ie({type:"session.list",workspaceId:O})},[O,ie]),S.useEffect(()=>{l&&ie({type:"session.pins"})},[l,ie]),S.useEffect(()=>{l&&ie({type:"settings.get"})},[l,ie]),S.useEffect(()=>{if(ia.current)return;const y=Ei.current;if(!y||!O)return;if(O!==y.workspaceId){ia.current=!0;return}if(A){ia.current=!0;return}if(_.length===0)return;const X=_.find(de=>Fk(de,y));ia.current=!0,X&&Cr(X)},[_,O,A]),S.useEffect(()=>{!O||U||!w||ie({type:"term.list",workspaceId:O})},[O,U,w,ie]),S.useEffect(()=>{sa(y=>{var X;return y&&Ta.some(de=>de.id===y)?y:((X=Ta[0])==null?void 0:X.id)??null})},[Ta]),S.useEffect(()=>{be&&ie({type:"workspace.roots"})},[be,ie]);const ls=S.useCallback(()=>{const y=Vt.current;y&&(Ue(!0),ie({type:"usage.get",sessionId:y}),ie({type:"context.get",sessionId:y}))},[ie]);S.useEffect(()=>{if(!Me)return;const y=window.setTimeout(()=>Ue(!1),Kk);return()=>window.clearTimeout(y)},[Me]);const Nr=S.useMemo(()=>{const y=Math.max((vn==null?void 0:vn.fetchedAt)??0,(Y==null?void 0:Y.fetchedAt)??0);return y>0?y:null},[vn==null?void 0:vn.fetchedAt,Y==null?void 0:Y.fetchedAt]),Oo="Обновить лимиты и контекст"+(Nr?`
|
|
128
|
-
обновлено в ${new Date(Nr).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:"");S.useEffect(()=>{if(xe(null),!A)return;ls();const y=()=>{document.hidden||ls()},X=window.setInterval(y,Zk),de=()=>{document.hidden||ls()};return document.addEventListener("visibilitychange",de),()=>{window.clearInterval(X),document.removeEventListener("visibilitychange",de)}},[A,ls]),S.useEffect(()=>{if(!A){F(Vd);return}F({...Vd,loading:!0}),ie({type:"session.history",sessionId:A})},[A,ie]);const Tr=S.useCallback(()=>{!A||he.loading||!Pg(he)||(F(y=>({...y,loading:!0})),ie({type:"session.history",sessionId:A,before:yb(he)}))},[A,he,ie]),Do=S.useMemo(()=>Qx(he.entries),[he.entries]),Se=S.useMemo(()=>_.find(y=>y.id===A)??null,[_,A]),Er=x.find(y=>y.id===O)??null;S.useEffect(()=>{if(!O||!A)return;const y={workspaceId:O,sessionId:A,claudeSessionId:(Se==null?void 0:Se.claudeSessionId)??null};try{localStorage.setItem(r0,JSON.stringify(y))}catch{}},[O,A,Se==null?void 0:Se.claudeSessionId]);function zo(y){an.current=y,st(null),ie({type:"workspace.open",path:y})}function Lo(y,X,de){st(null),ie({type:"workspace.create",parent:y,name:X,init:de})}function Hc(y){if(Qs.current=y,!y){V([]),oe(!1);return}oe(!0),ie({type:"workspace.find",query:y})}function Uo(y){Qs.current=y,Ne(il),ie({type:"workspace.find.agent",query:y})}function Ho(){we(!1),st(null),Ke(null),V([]),Ne(il),it(null),Qs.current="",an.current=null}function Zs(){const y=Vt.current;y&&Tl.current&&ie({type:"side.reset",sessionId:y}),Tl.current=null,Zt(null),gt(il),Xt(null),Pn({}),ts.current=[]}function Bo(y){ie({type:"workspace.close",workspaceIds:y}),!(!O||!y.includes(O))&&(Zs(),$(null),Q(null),C([]),H([]),re(il),M(null),pe(!1))}function Ar(y,X){ie({type:"session.archive",workspaceId:y,sessionIds:X}),A&&(X.includes(A)||Se!=null&&Se.claudeSessionId&&X.includes(Se.claudeSessionId))&&(Zs(),Q(null),re(il),M(null),pe(!1))}function qo(){O&&(Zs(),Q(null),M(null),re(il),pe(!1),ie({type:"session.start",workspaceId:O}),me(!1))}function Bc(y){Zs(),Zo(),$(y),Q(null),re(il),M(null),pe(!1),wl(null),wa(null),Bl(null),ql(null),ln([]),sa(null)}function Go(y,X,de){ie({type:"session.pin",workspaceId:y,sessionIds:X,pinned:de})}function qc(y){y.workspaceId!==O&&Bc(y.workspaceId),Cr(y)}function Cr(y){if(me(!1),Zs(),re(il),M(null),pe(!1),y.state==="closed"){Q(null),ie({type:"session.start",workspaceId:y.workspaceId,resume:y.id});return}Q(y.id),ie({type:"session.sync",sessionId:y.id,sinceSeq:0})}function Gc(y,X){ie({type:"session.rename",sessionId:y.id,title:X,workspaceId:y.workspaceId}),C(de=>de.map(De=>De.id===y.id?{...De,title:X}:De))}function Yc(y){A&&(me(!1),J(null),dt(y),ie({type:"mcp.list",sessionId:A}),ie({type:"plugin.list",sessionId:A}))}const Yo={mcpAction:(y,X)=>{A&&(ie({type:"mcp.action",sessionId:A,name:y,action:X}),dt(null))},mcpAdd:(y,X)=>{A&&ie({type:"mcp.add",sessionId:A,name:y,draft:X})},mcpRemove:y=>{A&&ie({type:"mcp.remove",sessionId:A,name:y})},pluginInstall:y=>{A&&ie({type:"plugin.install",sessionId:A,spec:y})},pluginUninstall:y=>{A&&ie({type:"plugin.uninstall",sessionId:A,id:y})},pluginToggle:(y,X)=>{A&&ie({type:"plugin.toggle",sessionId:A,id:y,enabled:X})},marketplaceAdd:y=>{A&&ie({type:"marketplace.add",sessionId:A,source:y})},marketplaceRemove:y=>{A&&ie({type:"marketplace.remove",sessionId:A,name:y})}};function Ic(){me(!1),Te(!0),ie({type:"auth.status"})}const Rr={login:(y,X)=>ie({type:"auth.login",mode:y,switchAccount:X}),submitCode:y=>ie({type:"auth.code",code:y}),cancel:()=>ie({type:"auth.cancel"}),logout:()=>ie({type:"auth.logout"})};function Io(){me(!1),Gt(!0),ie({type:"settings.get"})}function Xo(y){_n(X=>X&&{...X,...y}),ie({type:"settings.update",settings:y})}function Vo(y){A&&ie({type:"side.ask",sessionId:A,text:y})}function Mr(){A&&(ie({type:"side.reset",sessionId:A}),Tl.current=null,Zt(null),gt(il),Xt(null),Pn({}),ts.current=[])}function Xl(y){const X=Tl.current;if(X){y(X);return}const de=Vt.current;de&&(ts.current.push(y),ie({type:"side.open",sessionId:de}))}function Xc(){O&&ie({type:"git.state",workspaceId:O})}function Vc(y){O&&(Bl(y),ie({type:"git.show",workspaceId:O,ref:y}))}function Or(y,X){ql(null),cl({target:y,label:X})}function Qc(){!O||!ja||(ie({type:"git.checkout",workspaceId:O,target:ja.target}),cl(null))}S.useEffect(()=>{if(!(!It||!O))for(const y of ea)y in Ge||ie({type:"fs.list",workspaceId:O,path:y})},[It,ea,Ge,O,ie]);function $c(y){Na(X=>X.includes(y)?X.filter(de=>de!==y):[...X,y])}function Zc(y){if(!y){Vn(null);return}O&&ie({type:"fs.search",workspaceId:O,query:y})}function as(y){if(!y){gn(null);return}O&&ie({type:"fs.grep",workspaceId:O,query:y})}const Kc=S.useCallback((y,X)=>{Gs(Dt=>({...Dt,[y]:X}));const de=Sn.current;if(X===null||!de)return;const De=X.lastIndexOf("/");if(De!==-1){ie({type:"fs.list",workspaceId:de,path:X.slice(0,De)});return}if(X===""){ie({type:"fs.list",workspaceId:de,path:""});return}ie({type:"fs.search",workspaceId:de,query:X,scope:y})},[ie]),Qo=S.useMemo(()=>cb(hl.mention??null,na.mention??null,Ge),[hl.mention,na.mention,Ge]),$o=S.useMemo(()=>cb(hl.side??null,na.side??null,Ge),[hl.side,na.side,Ge]);function Jc(y){Ra(y.path,{line:y.line,column:y.column})}function Fc(y){const X=[];let de=vi(y.path);for(;X.push(de),!!de;)de=vi(de);Na(De=>{const Dt=new Set(De);for(const At of X)Dt.add(At);return y.kind==="dir"&&Dt.add(y.path),[...Dt]}),y.kind==="file"&&Ra(y.path)}function Ra(y,X){if($n.current.find(De=>De.path===y)){fl(y),X&&es({path:y,...X,token:++Ni.current});return}O&&(X&&(Gl.current={path:y,...X}),Ai.current.add(y),ie({type:"fs.read",workspaceId:O,path:y}))}function Ma(y,X=!1){const de=$n.current,De=de.find(kn=>kn.path===y);if(De&&Ja(De)&&!X){Xn(y);return}Xn(null);const Dt=de.findIndex(kn=>kn.path===y),At=de.filter(kn=>kn.path!==y);In(At),fl(kn=>{var Ce;return kn===y?((Ce=At[Math.min(Dt,At.length-1)])==null?void 0:Ce.path)??null:kn})}function Ri(y,X=!1){const de=$n.current.find(De=>De.path===y);!de||!O||!X&&!Ja(de)||(Il.current.set(y,de.text),ie({type:"fs.write",workspaceId:O,path:y,content:de.text,eol:de.eol,encoding:de.encoding,baseMtime:de.mtime,...X?{force:!0}:{}}))}function Mi(y){O&&ie({type:"fs.read",workspaceId:O,path:y})}const Wc=S.useRef(new Map);function Pc(y){const X=Wc.current,de=X.get(y);de&&clearTimeout(de);const De=(Tt==null?void 0:Tt.autoSaveAfterPauseMs)??0;De<=0||X.set(y,setTimeout(()=>{X.delete(y);const Dt=$n.current.find(At=>At.path===y);Dt&&Ja(Dt)&&!Dt.stale&&Ri(y)},De))}function Dr(y,X,de){if(!O)return;const De=y?`${y}/${de}`:de;Cn(null),X==="file"&&(Ca.current=De),ie({type:"fs.create",workspaceId:O,path:De,kind:X})}function zr(y,X){if(!O)return;const de=vi(y),De=de?`${de}/${X}`:X;Cn(null),Aa.current={from:y,to:De},ie({type:"fs.rename",workspaceId:O,path:y,to:De})}function eu(y,X){if(!O)return;const de=y.slice(y.lastIndexOf("/")+1),De=X?`${X}/${de}`:de;De!==y&&(Cn(null),Aa.current={from:y,to:De},ie({type:"fs.rename",workspaceId:O,path:y,to:De}))}function tu(y,X){O&&(Cn(null),ie({type:"fs.copy",workspaceId:O,path:y,toDir:X}))}function nu(y){O&&(Cn(null),nn(null),ie({type:"fs.delete",workspaceId:O,path:y.path}),In(X=>X.filter(de=>de.path!==y.path&&!de.path.startsWith(`${y.path}/`))),fl(X=>X&&(X===y.path||X.startsWith(`${y.path}/`))?null:X))}function Zo(){mn({}),Na([""]),In([]),fl(null),Cn(null),Vn(null),gn(null),Gs({}),la({}),es(null),Ai.current.clear(),Il.current.clear(),Gl.current=null,Aa.current=null,Ca.current=null}function Ko(){!O||U||!w||(se.current=!0,ie({type:"term.open",workspaceId:O,cols:80,rows:24}))}function Jo(y){ie({type:"term.close",id:y})}function Fo(y,X){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:X})}function Wo(y,X){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:"allow",answers:X})}function Zn(y){A&&ie({type:"permission.respond",sessionId:A,requestId:y,decision:"deny",reason:"Пользователь не стал отвечать на вопросы"})}S.useEffect(()=>{function y(X){if(X.key!=="Escape")return;if(Et!==null){const De=X.target;if(!(De instanceof HTMLElement&&De.closest(".termview, .editor, .sidepane"))){Ti(null);return}}if(!A||W.pending.length>0)return;const de=X.target;de instanceof HTMLElement&&de.closest(".sidepane, .editor")||ie({type:"control.interrupt",sessionId:A})}return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[A,W.pending.length,ie,Et]),S.useEffect(()=>{function y(X){X.key!=="`"||!(X.ctrlKey||X.metaKey)||w&&(X.preventDefault(),aa(de=>!de))}return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[w]);const ss=S.useMemo(()=>{const y=(L==null?void 0:L.commands)??[];return y.length===0?y:[...y,{name:"plugins",description:"Плагины и маркетплейсы — окно приложения",argumentHint:"",aliases:["plugin"]},...rb]},[L]);function Lr(y){const X=Wk[y];return X?(Yc(X),!0):rb.some(de=>de.name===y)?(Ic(),y==="logout"&&Rr.logout(),y==="switch-account"&&Rr.login("claudeai",!0),!0):!1}const Ks=(Se==null?void 0:Se.state)==="waiting_permission",El=(Se==null?void 0:Se.state)==="running"||Ks,Vl=W.pending[0]??null;S.useEffect(()=>{!Hn&&!It||!O||El||ie({type:"git.state",workspaceId:O})},[Hn,It,O,El,ie]),S.useEffect(()=>{if(!(El||!O)){It&&mn(y=>{const X={};for(const[de,De]of Object.entries(y))$s.current.includes(de)||(X[de]=De);return X});for(const y of $n.current)Ja(y)||ie({type:"fs.read",workspaceId:O,path:y.path})}},[El,O,It,ie]);const Js=(Se==null?void 0:Se.cwd)??(L==null?void 0:L.cwd)??null,lu=(L==null?void 0:L.models)??[],Ql=(Se==null?void 0:Se.model)??(L==null?void 0:L.model)??null,{rows:Oi,selected:Fs}=ob(lu,Ql),Oa=Ot?{model:Ot.model,effort:Ot.effort,ultracode:Ot.ultracode,thinking:Ot.thinking,switchOnFlag:Ot.switchModelsOnFlag}:{model:Nl.model??Ql,effort:Nl.effort??(Se==null?void 0:Se.effort)??null,ultracode:Nl.ultracode??(Se==null?void 0:Se.ultracode)??!1,thinking:Nl.thinking??(Se==null?void 0:Se.thinking)??!0,switchOnFlag:Nl.switchOnFlag??(Se==null?void 0:Se.switchModelsOnFlag)??!0},Ur=ob(lu,Oa.model),Da=(Ot==null?void 0:Ot.state)==="running",ra=ol?ul.find(y=>y.path===ol)??null:null,Hr=new Set(ul.filter(Ja).map(y=>y.path)),is=y=>c.jsx(zk,{pane:y,width:Yn.widths[y],onResize:X=>Yn.setWidth(y,X),onReset:()=>Yn.reset(y)}),el=y=>z?null:()=>Is(y),Br=L&&c.jsx(Hs,{title:"Режим прав",value:(Se==null?void 0:Se.permissionMode)??"default",options:bb.map(y=>({value:y.value,label:y.value,hint:y.hint})),onChange:y=>{A&&ie({type:"control.set_mode",sessionId:A,mode:y})}}),qr=Oi.length>0?c.jsx(e0,{models:Oi,value:Fs,effort:(Se==null?void 0:Se.effort)??null,ultracode:(Se==null?void 0:Se.ultracode)??!1,thinking:(Se==null?void 0:Se.thinking)??!0,switchOnFlag:(Se==null?void 0:Se.switchModelsOnFlag)??!0,onModel:y=>{!A||!y||ie({type:"control.set_model",sessionId:A,model:y})},onEffort:y=>{A&&ie({type:"control.set_effort",sessionId:A,effort:y})},onUltracode:y=>{A&&ie({type:"control.set_ultracode",sessionId:A,enabled:y})},onThinking:y=>{A&&ie({type:"control.set_thinking",sessionId:A,enabled:y})},onSwitchOnFlag:y=>{A&&ie({type:"control.set_flag_switch",sessionId:A,enabled:y})}}):Ql&&c.jsx("span",{className:"badge",children:Ql}),Gr=El&&c.jsx("span",{className:Ks?"badge badge--wait":"badge badge--live",children:Ks?"ждёт":"работает"}),Yr=Se&&Se.totalCostUsd>0?`$${Se.totalCostUsd.toFixed(3)}`:null,au=c.jsx("button",{className:Ae?"pane-btn is-on":"pane-btn",title:"Вопрос на полях — спросить, не мешая работе","aria-label":"Вопрос на полях","aria-pressed":Ae,onClick:()=>ze(y=>!y),children:c.jsx(iw,{})});return c.jsxs("div",{className:"app",style:Yn.style,children:[c.jsx(A1,{open:ae,connected:l,status:r,workspaces:x,sessions:_.filter(y=>y.workspaceId===O),archived:N.filter(y=>y.workspaceId===O),pinned:B,activeWorkspaceId:O,activeSessionId:A,onPinSessions:Go,onSelectPinned:qc,onCloseWorkspaces:Bo,onArchiveSessions:Ar,onUnarchiveSessions:y=>{O&&ie({type:"session.unarchive",workspaceId:O,sessionIds:y})},onSelectWorkspace:Bc,onSelectSession:Cr,onRenameSession:Gc,onOpenWorkspace:()=>we(!0),onNewSession:qo,onOpenExtensions:A?()=>Yc("mcp"):null,account:Qe,onOpenAccount:Ic,relay:d,onOpenRelay:b?null:()=>m(!0),onOpenSettings:Io,themeMode:An,onCycleTheme:Hl}),is("sidebar"),ae&&c.jsx("div",{className:"scrim",onClick:()=>me(!1)}),c.jsx(u1,{open:It,tree:Ge,expanded:new Set(ea),activePath:ol,dirty:Hr,gitChanges:(Yt==null?void 0:Yt.changed)??[],result:ta,searchResult:ji,onSearch:Zc,onReveal:Fc,onToggle:$c,onOpen:Ra,onCreate:Dr,onRename:zr,onMove:eu,onCopy:tu,onDelete:nn,onRefresh:()=>{Cn(null),mn({}),Xc()},onClose:()=>Mt(!1),zoomed:Et==="files",onToggleZoom:el("files")}),It&&Et!=="files"&&is("files"),c.jsx(x1,{open:pl,result:ml,onSearch:as,onOpenMatch:Jc,onClose:()=>Qn(!1),zoomed:Et==="search",onToggleZoom:el("search")}),pl&&Et!=="search"&&is("search"),c.jsx(IS,{open:Hn,state:Yt,result:Pa,selected:qs,onRefresh:Xc,onShow:Vc,onCheckout:Or,onClose:()=>pn(!1),zoomed:Et==="git",onToggleZoom:el("git")}),Hn&&Et!=="git"&&is("git"),c.jsxs("main",{className:Et==="main"||Et==="terminal"?"main main--zoomed":"main",children:[c.jsxs("header",{className:"topbar",children:[c.jsx("button",{className:"btn btn--ghost menu-btn",onClick:()=>me(!0),children:"☰"}),c.jsx("button",{className:It?"pane-btn is-on":"pane-btn",title:"Файлы проекта","aria-label":"Файлы проекта","aria-pressed":It,onClick:()=>{Mt(y=>!y),pn(!1),Qn(!1)},children:c.jsx(tw,{})}),c.jsx("button",{className:pl?"pane-btn is-on":"pane-btn",title:"Поиск по тексту в проекте","aria-label":"Поиск по тексту в проекте","aria-pressed":pl,onClick:()=>{Qn(y=>!y),Mt(!1),pn(!1)},children:c.jsx(nw,{})}),c.jsx("button",{className:Hn?"pane-btn is-on":"pane-btn",title:"История git","aria-label":"История git","aria-pressed":Hn,onClick:()=>{pn(y=>!y),Mt(!1),Qn(!1)},children:c.jsx(lw,{})}),w&&c.jsx("button",{className:jl?"pane-btn is-on":"pane-btn",title:"Терминал (Ctrl+`)","aria-label":"Терминал","aria-pressed":jl,onClick:()=>aa(y=>!y),children:c.jsx(sw,{})}),z&&au,z&&c.jsx("button",{className:P?"pane-btn is-on":"pane-btn",title:"Ещё","aria-label":"Ещё","aria-haspopup":"menu","aria-pressed":P,onClick:()=>te(!0),children:c.jsx(rw,{})}),c.jsxs("div",{className:"topbar__id",children:[je&&Se?c.jsx(Dc,{className:"rename--title",value:Se.title??"",onCommit:y=>{Gc(Se,y),pe(!1)},onCancel:()=>pe(!1)}):c.jsxs("div",{className:"topbar__head",children:[c.jsx("button",{className:"topbar__title",disabled:!Se||z,title:Se&&!z?"Переименовать сессию":void 0,onClick:()=>pe(!0),children:(Se==null?void 0:Se.title)??"Claude Code Visual"}),Er&&c.jsx("span",{className:"topbar__project",title:Er.path,children:Er.name})]}),z?Gr:Js&&c.jsx(Pb,{path:Js})]}),!z&&c.jsxs("div",{className:"topbar__tools",children:[c.jsx("button",{type:"button",className:Me?"meters-refresh is-busy":"meters-refresh",title:Oo,"aria-label":"Обновить лимиты и контекст","aria-busy":Me,disabled:!A||Me,onClick:ls,children:c.jsx(cw,{})}),c.jsx(n0,{usage:vn}),c.jsx(i0,{}),Br,qr,Gr,Yr&&c.jsx("span",{className:"badge badge--cost",children:Yr}),au]})]}),c.jsx(Qk,{tokens:(Y==null?void 0:Y.tokens)??W.contextTokens,maxTokens:(Y==null?void 0:Y.maxTokens)??null,fetchedAt:(Y==null?void 0:Y.fetchedAt)??null}),z&&P&&c.jsx(uk,{onClose:()=>te(!1),permission:Br,model:qr,usage:vn,cwd:Js,costLabel:Yr,onRefresh:ls,refreshing:Me,metersFetchedAt:Nr,onRename:Se?()=>{pe(!0),te(!1)}:null}),ul.length>0&&c.jsx(T1,{files:ul,activePath:ol,busy:El,onSelect:fl,onClose:y=>Ma(y),zoomed:Et==="main",onToggleZoom:el("main")}),ra?c.jsx(j1,{file:ra,goto:(xt==null?void 0:xt.path)===ra.path?xt:null,onChange:(y,X)=>{In(de=>de.map(De=>De.path===y?{...De,text:X}:De)),Pc(y)},onSave:y=>Ri(y),onReload:Mi,onOverwrite:y=>Ri(y,!0),onTogglePreview:y=>In(X=>X.map(de=>de.path===y?{...de,previewMode:!de.previewMode}:de))}):c.jsxs(c.Fragment,{children:[c.jsx(Bh,{items:W.items,busy:El,waiting:Ks,history:Do,historyHasMore:Pg(he),historyLoading:he.loading,onLoadHistory:Tr,sessionId:A??void 0}),c.jsx(Fb,{disabled:!A,busy:El,commands:ss,sessionTitle:(Se==null?void 0:Se.title)??null,contextResult:Qo,onContextSearch:y=>Kc("mention",y),onCommand:Lr,onSend:y=>{A&&ie({type:"prompt.send",sessionId:A,text:y})},onInterrupt:()=>{A&&ie({type:"control.interrupt",sessionId:A})}})]}),jl&&w&&c.jsxs(c.Fragment,{children:[!z&&Et!=="terminal"&&c.jsx(Uk,{height:gl.height,onResize:gl.setHeight,onReset:gl.reset}),c.jsx(Gk,{mobile:z,zoomed:Et==="terminal",onToggleZoom:el("terminal"),terminals:Ta,activeId:Ys,blocked:U,height:z?Wn.height:gl.height,offset:z?{top:Wn.offsetTop,left:Wn.offsetLeft}:void 0,onSelect:sa,onOpen:Ko,onClose:Jo,onInput:(y,X)=>ie({type:"term.input",id:y,data:X}),onResize:(y,X,de)=>ie({type:"term.resize",id:y,cols:X,rows:de}),onAttach:y=>ie({type:"term.attach",id:y}),onHide:()=>aa(!1),registerSink:ve})]})]}),c.jsx(ek,{open:Ae,items:yn.items,busy:Da,ready:A!==null,commands:ss,contextResult:$o,models:Ur.rows,model:Ur.selected,effort:Oa.effort,ultracode:Oa.ultracode,thinking:Oa.thinking,switchOnFlag:Oa.switchOnFlag,onContextSearch:y=>Kc("side",y),onCommand:Lr,onModel:y=>{y&&(Pn(X=>({...X,model:y})),Xl(X=>ie({type:"control.set_model",sessionId:X,model:y})))},onEffort:y=>{Pn(X=>({...X,effort:y,ultracode:!1})),Xl(X=>ie({type:"control.set_effort",sessionId:X,effort:y}))},onUltracode:y=>{Pn(X=>({...X,ultracode:y,...y?{effort:"xhigh"}:{}})),Xl(X=>ie({type:"control.set_ultracode",sessionId:X,enabled:y}))},onThinking:y=>{Pn(X=>({...X,thinking:y})),Xl(X=>ie({type:"control.set_thinking",sessionId:X,enabled:y}))},onSwitchOnFlag:y=>{Pn(X=>({...X,switchOnFlag:y})),Xl(X=>ie({type:"control.set_flag_switch",sessionId:X,enabled:y}))},onAsk:Vo,onInterrupt:()=>{wt&&ie({type:"control.interrupt",sessionId:wt})},onReset:Mr,onClose:()=>ze(!1),zoomed:Et==="ask",onToggleZoom:el("ask")}),Ae&&Et!=="ask"&&is("ask"),(Hn||Ae||It||pl)&&c.jsx("div",{className:"scrim scrim--pane",onClick:()=>{pn(!1),ze(!1),Mt(!1),Qn(!1)}}),ka&&c.jsx(QS,{detail:ka,local:((Yt==null?void 0:Yt.hasRemote)??!1)&&(Yt==null?void 0:Yt.commits.some(y=>y.hash===ka.hash&&!y.pushed))===!0,onCheckout:Or,onClose:()=>{wa(null),Bl(null)}}),ja&&c.jsxs(Wl,{title:"Переключить рабочее дерево?",onClose:()=>cl(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>cl(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:Qc,children:"Переключиться"})]}),children:[c.jsxs("p",{className:"modal__text",children:["git переключится на ",ja.label,". Файлы в каталоге проекта изменятся — это тот же каталог, в котором работает агент."]}),El&&c.jsx("p",{className:"modal__text",children:"Сейчас идёт ход агента: он читает и правит файлы прямо сейчас."}),Yt&&Yt.changed.length>0&&c.jsxs("p",{className:"modal__text",children:["Незакоммиченных изменений: ",Yt.changed.length,". Git откажется переключаться, если они будут затёрты."]})]}),dl&&c.jsx(Wl,{title:dl.kind==="dir"?"Удалить каталог?":"Удалить файл?",onClose:()=>nn(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>nn(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:()=>nu(dl),children:"Удалить"})]}),children:c.jsxs("p",{className:"modal__text",children:[dl.path," будет удалён с диска",dl.kind==="dir"?" вместе со всем содержимым":"",". Корзины здесь нет: это тот же каталог, в котором работает агент."]})}),mt&&c.jsx(Wl,{title:"Закрыть без сохранения?",onClose:()=>Xn(null),actions:c.jsxs(c.Fragment,{children:[c.jsx("button",{className:"btn",onClick:()=>Xn(null),children:"Отмена"}),c.jsx("button",{className:"btn btn--warn",onClick:()=>Ma(mt,!0),children:"Закрыть"}),c.jsx("button",{className:"btn btn--primary",onClick:()=>{Ri(mt),Ma(mt,!0)},children:"Сохранить и закрыть"})]}),children:c.jsxs("p",{className:"modal__text",children:["В ",mt," есть несохранённые правки."]})}),Fe&&c.jsx(fk,{tab:Fe,servers:Fn,plugins:Tn,marketplaces:dn,catalog:Jt,result:hn,actions:Yo,onTab:dt,onClose:()=>dt(null)}),fe&&c.jsx(xk,{status:Qe,login:En,actions:Rr,runningSessions:_.filter(y=>y.state==="running"||y.state==="waiting_permission").length,onClose:()=>Te(!1)}),g&&c.jsx(kk,{state:d,onPair:(y,X)=>ie({type:"relay.pair",code:y,...X?{name:X}:{}}),onUnpair:()=>ie({type:"relay.unpair"}),onClose:()=>m(!1)}),tn&&c.jsx(Ok,{settings:Tt,models:(L==null?void 0:L.models)??[],relayState:d,local:bo()==="local",onChange:Xo,onEnableShell:()=>ie({type:"relay.shell.enable"}),onDisableShell:()=>ie({type:"relay.shell.disable"}),onOpenRelay:()=>{Gt(!1),m(!0)},onClose:()=>Gt(!1)}),be&&c.jsx(MS,{candidates:j,searching:ce,agentItems:_e.items,agentBusy:(Re==null?void 0:Re.state)==="running",error:Ze,roots:qe,created:Je,onSearch:Hc,onAskAgent:Uo,onInterrupt:()=>{const y=Ea.current;y&&ie({type:"control.interrupt",sessionId:y})},onSubmit:zo,onCreate:Lo,onClose:Ho}),Vl!=null&&Vl.questions&&Vl.questions.length>0?c.jsx(wS,{request:{...Vl,questions:Vl.questions},queued:W.pending.length-1,onAnswer:Wo,onDecline:Zn}):Vl&&c.jsx(kS,{request:Vl,queued:W.pending.length-1,onDecide:Fo})]})}function tw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.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"}),c.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 nw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[c.jsx("circle",{cx:"7",cy:"7",r:"4.3"}),c.jsx("path",{d:"M13.2 13.2 10.1 10.1",strokeLinecap:"round"})]})}function lw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round","aria-hidden":"true",children:[c.jsx("circle",{cx:"4.5",cy:"3.5",r:"1.9"}),c.jsx("circle",{cx:"4.5",cy:"12.5",r:"1.9"}),c.jsx("circle",{cx:"11.5",cy:"8",r:"1.9"}),c.jsx("path",{d:"M4.5 5.4v5.2M6.4 3.9h2.2a1.6 1.6 0 0 1 1.6 1.6v.8"})]})}function aw(s,l){return fb(s)===fb(l)}function fb(s){return s.replace(/[\\/]+/g,"/").replace(/\/+$/,"").toLowerCase()}function sw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("rect",{x:"1.6",y:"2.6",width:"12.8",height:"10.8",rx:"1.7"}),c.jsx("path",{d:"M4.3 6 6.6 8l-2.3 2"}),c.jsx("path",{d:"M8.2 10h3.1"})]})}function iw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.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"}),c.jsx("path",{d:"M8.4 8.5v-.3c0-.7.9-.9.9-1.7a1 1 0 0 0-1.9-.4"})]})}function rw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[c.jsx("circle",{cx:"3.2",cy:"8",r:"1.5"}),c.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),c.jsx("circle",{cx:"12.8",cy:"8",r:"1.5"})]})}function cw(){return c.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[c.jsx("path",{d:"M14 8a6 6 0 1 1-6-6c1.68 0 3.29.67 4.49 1.83L14 5.33"}),c.jsx("path",{d:"M14 2v3.33h-3.33"})]})}const c0=document.getElementById("root");if(!c0)throw new Error("#root not found");Ux.createRoot(c0).render(c.jsx(S.StrictMode,{children:c.jsx(ew,{})}));export{Nv as D,Ut as I,Bt as N,fw as P,Ll as T,Pl as a,zb as b,rl as c,ow as d,qb as e,Mc as f,Vv as h,dw as p,hw as s,ye as t};
|