31 lines
490 KiB
JavaScript
31 lines
490 KiB
JavaScript
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function ee(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function te(e,t){return ee(e.type,t,e.props)}function E(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function ie(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ae(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(E(o)&&(o=te(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+re(a,u),c+=ae(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+re(a,u++),c+=ae(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ae(ie(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var O=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},k={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!E(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=k,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ee(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ee(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=E,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,O)}catch(e){O(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,E());else{var t=n(l);t!==null&&re(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-T<w)}function te(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&re(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?E():S=!1}}}var E;if(typeof y==`function`)E=function(){y(te)};else if(typeof MessageChannel<`u`){var D=new MessageChannel,ne=D.port2;D.port1.onmessage=te,E=function(){ne.postMessage(null)}}else E=function(){_(te,0)};function re(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,re(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,E()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=f(),n=u(),r=m();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),ee=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),E=Symbol.for(`react.lazy`),D=Symbol.for(`react.activity`),ne=Symbol.for(`react.memo_cache_sentinel`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Symbol.for(`react.client.reference`);function oe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case ee:return`SuspenseList`;case D:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?oe(e.type)||`Memo`:t;case E:t=e._payload,e=e._init;try{return oe(e(t))}catch{}}return null}var se=Array.isArray,O=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function pe(e,t){ue++,le[ue]=e.current,e.current=t}var me=de(null),he=de(null),ge=de(null),_e=de(null);function ve(e,t){switch(pe(ge,t),pe(he,e),pe(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(me),pe(me,e)}function A(){fe(me),fe(he),fe(ge)}function ye(e){e.memoizedState!==null&&pe(_e,e);var t=me.current,n=Hd(t,e.type);t!==n&&(pe(he,e),pe(me,n))}function be(e){he.current===e&&(fe(me),fe(he)),_e.current===e&&(fe(_e),Qf._currentValue=ce)}var xe,Se;function Ce(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,Se=-1<e.stack.indexOf(`
|
||
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
||
`+xe+e+Se}var we=!1;function Te(e,t){if(!e||we)return``;we=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
||
`),l=s.split(`
|
||
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
||
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{we=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ce(n):``}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce(`Lazy`);case 13:return e.child!==t&&t!==null?Ce(`Suspense Fallback`):Ce(`Suspense`);case 19:return Ce(`SuspenseList`);case 0:case 15:return Te(e.type,!1);case 11:return Te(e.type.render,!1);case 1:return Te(e.type,!0);case 31:return Ce(`Activity`);default:return``}}function j(e){try{var t=``,n=null;do t+=Ee(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
||
Error generating stack: `+e.message+`
|
||
`+e.stack}}var De=Object.prototype.hasOwnProperty,Oe=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ae=t.unstable_shouldYield,je=t.unstable_requestPaint,Me=t.unstable_now,Ne=t.unstable_getCurrentPriorityLevel,Pe=t.unstable_ImmediatePriority,Fe=t.unstable_UserBlockingPriority,Ie=t.unstable_NormalPriority,Le=t.unstable_LowPriority,M=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(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 Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function N(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 $e(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ue(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&rt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function rt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ue(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function it(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ue(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function at(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(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 st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ct(){var e=k.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function lt(e,t){var n=k.p;try{return k.p=e,t()}finally{k.p=n}}var ut=Math.random().toString(36).slice(2),dt=`__reactFiber$`+ut,ft=`__reactProps$`+ut,pt=`__reactContainer$`+ut,mt=`__reactEvents$`+ut,ht=`__reactListeners$`+ut,gt=`__reactHandles$`+ut,_t=`__reactResources$`+ut,vt=`__reactMarker$`+ut;function yt(e){delete e[dt],delete e[ft],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[dt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[dt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[dt])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[dt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function P(e){e[vt]=!0}var wt=new Set,F={};function Tt(e,t){I(e,t),I(e+`Capture`,t)}function I(e,t){for(F[e]=t,e=0;e<t.length;e++)wt.add(t[e])}var Et=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]*$`),Dt={},Ot={};function kt(e){return De.call(Ot,e)?!0:De.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function jt(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 Mt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function L(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Nt(n)):Ht(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ht(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Nt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(se(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Jt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(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 Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[ft]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(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="`+L(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ft]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(vu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ft]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,`passive`,{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(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 vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},R=bn(xn),Sn=h({},xn,{view:0,detail:0}),Cn=bn(Sn),wn,Tn,z,En=h({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,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!==z&&(z&&e.type===`mousemove`?(wn=e.screenX-z.screenX,Tn=e.screenY-z.screenY):Tn=wn=0,z=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),Dn=bn(En),On=bn(h({},En,{dataTransfer:0})),kn=bn(h({},Sn,{relatedTarget:0})),An=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=bn(h({},xn,{data:0})),Nn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Pn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=bn(h({},Sn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=bn(h({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=bn(h({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=bn(h({},En,{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})),Un=bn(h({},xn,{newState:0,oldState:0})),Wn=[9,13,27,32],Gn=un&&`CompositionEvent`in window,Kn=null;un&&`documentMode`in document&&(Kn=document.documentMode);var qn=un&&`TextEvent`in window&&!Kn,Jn=un&&(!Gn||Kn&&8<Kn&&11>=Kn),Yn=` `,B=!1;function V(e,t){switch(e){case`keyup`:return Wn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Xn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Zn=!1;function Qn(e,t){switch(e){case`compositionend`:return Xn(t);case`keypress`:return t.which===32?(B=!0,Yn):null;case`textInput`:return e=t.data,e===Yn&&B?null:e;default:return null}}function $n(e,t){if(Zn)return e===`compositionend`||!Gn&&V(e,t)?(e=gn(),hn=mn=pn=null,Zn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Jn&&t.locale!==`ko`?null:t.data;default:return null}}var er={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!er[e.type]:t===`textarea`}function nr(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Td(t,`onChange`),0<t.length&&(n=new R(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var rr=null,ir=null;function H(e){vd(e,0)}function ar(e){if(Lt(St(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(un){var cr;if(un){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){rr&&(rr.detachEvent(`onpropertychange`,fr),ir=rr=null)}function fr(e){if(e.propertyName===`value`&&ar(ir)){var t=[];nr(t,ir,e,nn(e)),cn(H,t)}}function pr(e,t,n){e===`focusin`?(dr(),rr=t,ir=n,rr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(ir)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!De.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(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=Rt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=un&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Rt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Td(Dr,`onSelect`),0<r.length&&(t=new R(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};un&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),Tt(t,[e])}var Kr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ue(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function U(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function W(e,t,n,r){return new U(e,t,n,r)}function ri(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ii(e,t){var n=e.alternate;return n===null?(n=W(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 ai(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 oi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ri(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case D:return e=W(31,n,t,a),e.elementType=D,e.lanes=o,e;case y:return si(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=W(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=W(13,n,t,a),e.elementType=T,e.lanes=o,e;case ee:return e=W(19,n,t,a),e.elementType=ee,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case te:s=14;break a;case E:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=W(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function si(e,t,n,r){return e=W(7,e,r,t),e.lanes=n,e}function ci(e,t,n){return e=W(6,e,null,t),e.lanes=n,e}function li(e){var t=W(18,null,null,0);return t.stateNode=e,t}function ui(e,t,n){return t=W(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var di=new WeakMap;function fi(e,t){if(typeof e==`object`&&e){var n=di.get(e);return n===void 0?(t={value:e,source:t,stack:j(t)},di.set(e,t),t):n}return{value:e,source:t,stack:j(t)}}var pi=[],mi=0,hi=null,gi=0,_i=[],vi=0,yi=null,bi=1,xi=``;function Si(e,t){pi[mi++]=gi,pi[mi++]=hi,hi=e,gi=t}function Ci(e,t,n){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,yi=e;var r=bi;e=xi;var i=32-Ue(r)-1;r&=~(1<<i),n+=1;var a=32-Ue(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,bi=1<<32-Ue(t)+i|n<<i|r,xi=a+e}else bi=1<<a|n<<i|r,xi=e}function wi(e){e.return!==null&&(Si(e,1),Ci(e,1,0))}function Ti(e){for(;e===hi;)hi=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null;for(;e===yi;)yi=_i[--vi],_i[vi]=null,xi=_i[--vi],_i[vi]=null,bi=_i[--vi],_i[vi]=null}function Ei(e,t){_i[vi++]=bi,_i[vi++]=xi,_i[vi++]=yi,bi=t.id,xi=t.overflow,yi=e}var Di=null,Oi=null,ki=!1,Ai=null,ji=!1,Mi=Error(i(519));function Ni(e){throw zi(fi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Mi}function Pi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[dt]=e,t[ft]=r,n){case`dialog`:$(`cancel`,t),$(`close`,t);break;case`iframe`:case`object`:case`embed`:$(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)$(gd[n],t);break;case`source`:$(`error`,t);break;case`img`:case`image`:case`link`:$(`error`,t),$(`load`,t);break;case`details`:$(`toggle`,t);break;case`input`:$(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:$(`invalid`,t);break;case`textarea`:$(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||jd(t.textContent,n)?(r.popover!=null&&($(`beforetoggle`,t),$(`toggle`,t)),r.onScroll!=null&&$(`scroll`,t),r.onScrollEnd!=null&&$(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||Ni(e,!0)}function Fi(e){for(Di=e.return;Di;)switch(Di.tag){case 5:case 31:case 13:ji=!1;return;case 27:case 3:ji=!0;return;default:Di=Di.return}}function Ii(e){if(e!==Di)return!1;if(!ki)return Fi(e),ki=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Oi&&Ni(e),Fi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Oi=uf(e)}else t===27?(t=Oi,Zd(e.type)?(e=lf,lf=null,Oi=e):Oi=t):Oi=Di?cf(e.stateNode.nextSibling):null;return!0}function Li(){Oi=Di=null,ki=!1}function Ri(){var e=Ai;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ai=null),e}function zi(e){Ai===null?Ai=[e]:Ai.push(e)}var Bi=de(null),G=null,Vi=null;function Hi(e,t,n){pe(Bi,t._currentValue),t._currentValue=n}function Ui(e){e._currentValue=Bi.current,fe(Bi)}function Wi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Gi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Wi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Wi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Ki(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===_e.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Gi(t,e,n,r),t.flags|=262144}function qi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ji(e){G=e,Vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yi(e){return Zi(G,e)}function Xi(e,t){return G===null&&Ji(e),Zi(e,t)}function Zi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Vi===null){if(e===null)throw Error(i(308));Vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vi=Vi.next=t;return n}var Qi=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},$i=t.unstable_scheduleCallback,ea=t.unstable_NormalPriority,ta={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function K(){return{controller:new Qi,data:new Map,refCount:0}}function na(e){e.refCount--,e.refCount===0&&$i(ea,function(){e.controller.abort()})}var ra=null,ia=0,aa=0,oa=null;function sa(e,t){if(ra===null){var n=ra=[];ia=0,aa=ud(),oa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ia++,t.then(ca,ca),t}function ca(){if(--ia===0&&ra!==null){oa!==null&&(oa.status=`fulfilled`);var e=ra;ra=null,aa=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function la(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ua=O.S;O.S=function(e,t){Ql=Me(),typeof t==`object`&&t&&typeof t.then==`function`&&sa(e,t),ua!==null&&ua(e,t)};var da=de(null);function q(){var e=da.current;return e===null?Fl.pooledCache:e}function fa(e,t){t===null?pe(da,da.current):pe(da,t.pool)}function pa(){var e=q();return e===null?null:{parent:ta._currentValue,pool:e}}var ma=Error(i(460)),J=Error(i(474)),ha=Error(i(542)),ga={then:function(){}};function _a(e){return e=e.status,e===`fulfilled`||e===`rejected`}function va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Sa(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Fl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Sa(e),e}throw ba=t,ma}}function ya(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ba=e,ma):e}}var ba=null;function xa(){if(ba===null)throw Error(i(459));var e=ba;return ba=null,e}function Sa(e){if(e===ma||e===ha)throw Error(i(483))}var Ca=null,wa=0;function Ta(e){var t=wa;return wa+=1,Ca===null&&(Ca=[]),va(Ca,e,t)}function Ea(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Da(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Oa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ii(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ci(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===E&&ya(i)===t.type)?(t=a(t,n.props),Ea(t,n),t.return=e,t):(t=oi(n.type,n.key,n.props,null,e.mode,r),Ea(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=si(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ci(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=oi(t.type,t.key,t.props,null,e.mode,n),Ea(n,t),n.return=e,n;case v:return t=ui(t,e.mode,n),t.return=e,t;case E:return t=ya(t),f(e,t,n)}if(se(t)||ie(t))return t=si(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ta(t),n);if(t.$$typeof===C)return f(e,Xi(e,t),n);Da(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case E:return n=ya(n),p(e,t,n,r)}if(se(n)||ie(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ta(n),r);if(n.$$typeof===C)return p(e,t,Xi(e,n),r);Da(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case E:return r=ya(r),m(e,t,n,r,i)}if(se(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ta(r),i);if(r.$$typeof===C)return m(e,t,n,Xi(t,r),i);Da(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ki&&Si(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ki&&Si(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ki&&Si(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ki&&Si(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ki&&Si(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ea(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Ea(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ya(o),b(e,r,o,c)}if(se(o))return h(e,r,o,c);if(ie(o)){if(l=ie(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ta(o),c);if(o.$$typeof===C)return b(e,r,Xi(e,o),c);Da(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{wa=0;var i=b(e,t,n,r);return Ca=null,i}catch(t){if(t===ma||t===ha)throw t;var a=W(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ka=Oa(!0),Aa=Oa(!1),ja=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Na(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 Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Pl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ia(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function La(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ra=!1;function za(){if(Ra){var e=oa;if(e!==null)throw e}}function Ba(e,t,n,r){Ra=!1;var i=e.updateQueue;ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Q&f)===f:(r&f)===f){f!==0&&f===aa&&(Ra=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:ja=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Va(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ha(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Va(n[e],t)}var Ua=de(null),Wa=de(0);function Ga(e,t){e=Vl,pe(Wa,e),pe(Ua,t),Vl=e|t.baseLanes}function Ka(){pe(Wa,Vl),pe(Ua,Ua.current)}function qa(){Vl=Wa.current,fe(Ua),fe(Wa)}var Ja=de(null),Ya=null;function Xa(e){var t=e.alternate;pe(eo,eo.current&1),pe(Ja,e),Ya===null&&(t===null||Ua.current!==null||t.memoizedState!==null)&&(Ya=e)}function Za(e){pe(eo,eo.current),pe(Ja,e),Ya===null&&(Ya=e)}function Y(e){e.tag===22?(pe(eo,eo.current),pe(Ja,e),Ya===null&&(Ya=e)):Qa(e)}function Qa(){pe(eo,eo.current),pe(Ja,Ja.current)}function $a(e){fe(Ja),Ya===e&&(Ya=null),fe(eo)}var eo=de(0);function to(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var no=0,X=null,ro=null,io=null,ao=!1,oo=!1,so=!1,co=0,lo=0,uo=null,fo=0;function po(){throw Error(i(321))}function mo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function ho(e,t,n,r,i,a){return no=a,X=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Ms:Ns,so=!1,a=n(r,i),so=!1,oo&&(a=_o(t,n,r,i)),go(e),a}function go(e){O.H=js;var t=ro!==null&&ro.next!==null;if(no=0,io=ro=X=null,ao=!1,lo=0,uo=null,t)throw Error(i(300));e===null||Xs||(e=e.dependencies,e!==null&&qi(e)&&(Xs=!0))}function _o(e,t,n,r){X=e;var a=0;do{if(oo&&(uo=null),lo=0,oo=!1,25<=a)throw Error(i(301));if(a+=1,io=ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}O.H=Ps,o=t(n,r)}while(oo);return o}function vo(){var e=O.H,t=e.useState()[0];return t=typeof t.then==`function`?To(t):t,e=e.useState()[0],(ro===null?null:ro.memoizedState)!==e&&(X.flags|=1024),t}function yo(){var e=co!==0;return co=0,e}function bo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xo(e){if(ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ao=!1}no=0,io=ro=X=null,oo=!1,lo=co=0,uo=null}function So(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return io===null?X.memoizedState=io=e:io=io.next=e,io}function Co(){if(ro===null){var e=X.alternate;e=e===null?null:e.memoizedState}else e=ro.next;var t=io===null?X.memoizedState:io.next;if(t!==null)io=t,ro=e;else{if(e===null)throw X.alternate===null?Error(i(467)):Error(i(310));ro=e,e={memoizedState:ro.memoizedState,baseState:ro.baseState,baseQueue:ro.baseQueue,queue:ro.queue,next:null},io===null?X.memoizedState=io=e:io=io.next=e}return io}function wo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=lo;return lo+=1,uo===null&&(uo=[]),e=va(uo,e,t),t=X,(io===null?t.memoizedState:io.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Ms:Ns),e}function Eo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return To(e);if(e.$$typeof===C)return Yi(e)}throw Error(i(438,String(e)))}function Do(e){var t=null,n=X.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=X.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=wo(),X.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ne;return t.index++,n}function Oo(e,t){return typeof t==`function`?t(e):t}function ko(e){return Ao(Co(),ro,e)}function Ao(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(no&f)===f:(Q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===aa&&(d=!0);else if((no&p)===p){u=u.next,p===aa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,X.lanes|=p,Ul|=p;f=u.action,so&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,X.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(Xs=!0,d&&(n=oa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function jo(e){var t=Co(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);vr(o,t.memoizedState)||(Xs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Mo(e,t,n){var r=X,a=Co(),o=ki;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((ro||a).memoizedState,n);if(s&&(a.memoizedState=n,Xs=!0),a=a.queue,rs(Fo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||io!==null&&io.memoizedState.tag&1){if(r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,a,n,t),null),Fl===null)throw Error(i(349));o||no&127||No(r,t,n)}return n}function No(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=X.updateQueue,t===null?(t=wo(),X.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function Fo(e,t,n){return n(function(){Io(t)&&Lo(e)})}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Lo(e){var t=$r(e,2);t!==null&&pu(t,e,2)}function Ro(e){var t=So();if(typeof e==`function`){var n=e;if(e=n(),so){He(!0);try{n()}finally{He(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:e},t}function zo(e,t,n,r){return e.baseState=n,Ao(e,ro,typeof r==`function`?r:Oo)}function Bo(e,t,n,r,a){if(Os(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};O.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Vo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Vo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=O.T,o={};O.T=o;try{var s=n(i,r),c=O.S;c!==null&&c(o,s),Ho(e,t,s)}catch(n){Wo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),O.T=a}}else try{a=n(i,r),Ho(e,t,a)}catch(n){Wo(e,t,n)}}function Ho(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Uo(e,t,n)},function(n){return Wo(e,t,n)}):Uo(e,t,n)}function Uo(e,t,n){t.status=`fulfilled`,t.value=n,Go(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Vo(e,n)))}function Wo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Go(t),t=t.next;while(t!==r)}e.action=null}function Go(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function qo(e,t){if(ki){var n=Fl.formState;if(n!==null){a:{var r=X;if(ki){if(Oi){b:{for(var i=Oi,a=ji;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Oi=cf(i.nextSibling),r=i.data===`F!`;break a}}Ni(r)}r=!1}r&&(t=n[0])}}return n=So(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:t},n.queue=r,n=Ts.bind(null,X,r),r.dispatch=n,r=Ro(!1),a=Ds.bind(null,X,!1,r.queue),r=So(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Bo.bind(null,X,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Jo(e){return Yo(Co(),ro,e)}function Yo(e,t,n){if(t=Ao(e,t,Ko)[0],e=ko(Oo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=To(t)}catch(e){throw e===ma?ha:e}else r=t;t=Co();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(X.flags|=2048,Qo(9,{destroy:void 0},Xo.bind(null,i,n),null)),[r,a,e]}function Xo(e,t){e.action=t}function Zo(e){var t=Co(),n=ro;if(n!==null)return Yo(t,n,e);Co(),t=t.memoizedState,n=Co();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Qo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=X.updateQueue,t===null&&(t=wo(),X.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function $o(){return Co().memoizedState}function es(e,t,n,r){var i=So();X.flags|=e,i.memoizedState=Qo(1|t,{destroy:void 0},n,r===void 0?null:r)}function ts(e,t,n,r){var i=Co();r=r===void 0?null:r;var a=i.memoizedState.inst;ro!==null&&r!==null&&mo(r,ro.memoizedState.deps)?i.memoizedState=Qo(t,a,n,r):(X.flags|=e,i.memoizedState=Qo(1|t,a,n,r))}function ns(e,t){es(8390656,8,e,t)}function rs(e,t){ts(2048,8,e,t)}function is(e){X.flags|=4;var t=X.updateQueue;if(t===null)t=wo(),X.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function as(e){var t=Co().memoizedState;return is({ref:t,nextImpl:e}),function(){if(Pl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function os(e,t){return ts(4,2,e,t)}function ss(e,t){return ts(4,4,e,t)}function cs(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 ls(e,t,n){n=n==null?null:n.concat([e]),ts(4,4,cs.bind(null,t,e),n)}function us(){}function ds(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&mo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fs(e,t){var n=Co();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&mo(t,r[1]))return r[0];if(r=e(),so){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r}function ps(e,t,n){return n===void 0||no&1073741824&&!(Q&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),X.lanes|=e,Ul|=e,n)}function ms(e,t,n,r){return vr(n,t)?n:Ua.current===null?!(no&42)||no&1073741824&&!(Q&261930)?(Xs=!0,e.memoizedState=n):(e=fu(),X.lanes|=e,Ul|=e,t):(e=ps(e,n,r),vr(e,t)||(Xs=!0),e)}function hs(e,t,n,r,i){var a=k.p;k.p=a!==0&&8>a?a:8;var o=O.T,s={};O.T=s,Ds(e,!1,t,n);try{var c=i(),l=O.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Es(e,t,la(c,r),du(e)):Es(e,t,r,du(e))}catch(n){Es(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{k.p=a,o!==null&&s.types!==null&&(o.types=s.types),O.T=o}}function gs(){}function _s(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=vs(e).queue;hs(e,a,t,ce,n===null?gs:function(){return ys(e),n(r)})}function vs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:ce},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Oo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ys(e){var t=vs(e);t.next===null&&(t=e.alternate.memoizedState),Es(e,t.next.queue,{},du())}function bs(){return Yi(Qf)}function xs(){return Co().memoizedState}function Ss(){return Co().memoizedState}function Cs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=Pa(n);var r=Fa(t,e,n);r!==null&&(pu(r,t,n),Ia(r,t,n)),t={cache:K()},e.payload=t;return}t=t.return}}function ws(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Os(e)?ks(t,n):(n=Qr(e,t,n,r),n!==null&&(pu(n,e,r),As(n,t,r)))}function Ts(e,t,n){Es(e,t,n,du())}function Es(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Os(e))ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),Fl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return pu(n,e,r),As(n,t,r),!0}return!1}function Ds(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&pu(t,e,2)}function Os(e){var t=e.alternate;return e===X||t!==null&&t===X}function ks(e,t){oo=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function As(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var js={readContext:Yi,use:Eo,useCallback:po,useContext:po,useEffect:po,useImperativeHandle:po,useLayoutEffect:po,useInsertionEffect:po,useMemo:po,useReducer:po,useRef:po,useState:po,useDebugValue:po,useDeferredValue:po,useTransition:po,useSyncExternalStore:po,useId:po,useHostTransitionStatus:po,useFormState:po,useActionState:po,useOptimistic:po,useMemoCache:po,useCacheRefresh:po};js.useEffectEvent=po;var Ms={readContext:Yi,use:Eo,useCallback:function(e,t){return So().memoizedState=[e,t===void 0?null:t],e},useContext:Yi,useEffect:ns,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),es(4194308,4,cs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return es(4194308,4,e,t)},useInsertionEffect:function(e,t){es(4,2,e,t)},useMemo:function(e,t){var n=So();t=t===void 0?null:t;var r=e();if(so){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=So();if(n!==void 0){var i=n(t);if(so){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ws.bind(null,X,e),[r.memoizedState,e]},useRef:function(e){var t=So();return e={current:e},t.memoizedState=e},useState:function(e){e=Ro(e);var t=e.queue,n=Ts.bind(null,X,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:us,useDeferredValue:function(e,t){return ps(So(),e,t)},useTransition:function(){var e=Ro(!1);return e=hs.bind(null,X,e.queue,!0,!1),So().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=X,a=So();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Fl===null)throw Error(i(349));Q&127||No(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ns(Fo.bind(null,r,o,e),[e]),r.flags|=2048,Qo(9,{destroy:void 0},Po.bind(null,r,o,n,t),null),n},useId:function(){var e=So(),t=Fl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=fo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:bs,useFormState:qo,useActionState:qo,useOptimistic:function(e){var t=So();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ds.bind(null,X,!0,n),n.dispatch=t,[e,t]},useMemoCache:Do,useCacheRefresh:function(){return So().memoizedState=Cs.bind(null,X)},useEffectEvent:function(e){var t=So(),n={impl:e};return t.memoizedState=n,function(){if(Pl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ns={readContext:Yi,use:Eo,useCallback:ds,useContext:Yi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:ko,useRef:$o,useState:function(){return ko(Oo)},useDebugValue:us,useDeferredValue:function(e,t){return ms(Co(),ro.memoizedState,e,t)},useTransition:function(){var e=ko(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Jo,useActionState:Jo,useOptimistic:function(e,t){return zo(Co(),ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ns.useEffectEvent=as;var Ps={readContext:Yi,use:Eo,useCallback:ds,useContext:Yi,useEffect:rs,useImperativeHandle:ls,useInsertionEffect:os,useLayoutEffect:ss,useMemo:fs,useReducer:jo,useRef:$o,useState:function(){return jo(Oo)},useDebugValue:us,useDeferredValue:function(e,t){var n=Co();return ro===null?ps(n,e,t):ms(n,ro.memoizedState,e,t)},useTransition:function(){var e=jo(Oo)[0],t=Co().memoizedState;return[typeof e==`boolean`?e:To(e),t]},useSyncExternalStore:Mo,useId:xs,useHostTransitionStatus:bs,useFormState:Zo,useActionState:Zo,useOptimistic:function(e,t){var n=Co();return ro===null?(n.baseState=e,[e,n.queue.dispatch]):zo(n,ro,e,t)},useMemoCache:Do,useCacheRefresh:Ss};Ps.useEffectEvent=as;function Fs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Is={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=Pa(r);i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=Pa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Fa(e,i,r),t!==null&&(pu(t,e,r),Ia(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=Pa(n);r.tag=2,t!=null&&(r.callback=t),t=Fa(e,r,n),t!==null&&(pu(t,e,n),Ia(t,e,n))}};function Ls(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(i,a):!0}function Rs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Is.enqueueReplaceState(t,t.state,null)}function zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Bs(e){Kr(e)}function Vs(e){console.error(e)}function Hs(e){Kr(e)}function Us(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ws(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Gs(e,t,n){return n=Pa(n),n.tag=3,n.payload={element:null},n.callback=function(){Us(e,t)},n}function Ks(e){return e=Pa(e),e.tag=3,e}function qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ws(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ws(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Js(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ki(t,n,a,!0),n=Ja.current,n!==null){switch(n.tag){case 31:case 13:return Ya===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ga?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===ga?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(ki)return t=Ja.current,t===null?(r!==Mi&&(t=Error(i(423),{cause:r}),zi(fi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=fi(r,n),a=Gs(e.stateNode,r,a),La(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Mi&&(e=Error(i(422),{cause:r}),zi(fi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=fi(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=fi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Gs(n.stateNode,r,e),La(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ks(a),qs(a,e,n,r),La(n,a),!1}n=n.return}while(n!==null);return!1}var Ys=Error(i(461)),Xs=!1;function Zs(e,t,n,r){t.child=e===null?Aa(t,null,n,r):ka(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Ji(t),r=ho(e,t,n,o,a,i),s=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(ki&&s&&wi(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ri(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=oi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Cc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return Sc(e,t,i)}return t.flags|=1,e=ii(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref)if(Xs=!1,t.pendingProps=r=a,Cc(e,i))e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,Sc(e,t,i)}return cc(e,t,n,r,i)}function tc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fa(t,a===null?null:a.cachePool),a===null?Ka():Ga(t,a),Y(t);else return r=t.lanes=536870912,rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&fa(t,null),Ka(),Qa(t)):(fa(t,a.cachePool),Ga(t,a),Qa(t),t.memoizedState=null);return Zs(e,t,i,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 rc(e,t,n,r,i){var a=q();return a=a===null?null:{parent:ta._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&fa(t,null),Ka(),Y(t),e!==null&&Ki(e,t,r,!0),t.childLanes=i,null}function ic(e,t){return t=_c({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ac(e,t,n){return ka(t,e.child,null,n),e=ic(t,t.pendingProps),e.flags|=2,$a(t),t.memoizedState=null,e}function oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(ki){if(r.mode===`hidden`)return e=ic(t,r),t.lanes=536870912,nc(null,e);if(Za(t),(e=Oi)?(e=rf(e,ji),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Ni(t);return t.lanes=536870912,null}return ic(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Za(t),a)if(t.flags&256)t.flags&=-257,t=ac(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Xs||Ki(e,t,n,!1),a=(n&e.childLanes)!==0,Xs||a){if(r=Fl,r!==null&&(s=at(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),pu(r,e,s),Ys;Tu(),t=ac(e,t,n)}else e=o.treeContext,Oi=cf(s.nextSibling),Di=t,ki=!0,Ai=null,ji=!1,e!==null&&Ei(t,e),t=ic(t,r),t.flags|=4096;return t}return e=ii(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function cc(e,t,n,r,i){return Ji(t),n=ho(e,t,n,r,void 0,i),r=yo(),e!==null&&!Xs?(bo(e,t,i),Sc(e,t,i)):(ki&&r&&wi(t),t.flags|=1,Zs(e,t,n,i),t.child)}function lc(e,t,n,r,i,a){return Ji(t),t.updateQueue=null,n=_o(t,r,n,i),go(e),r=yo(),e!==null&&!Xs?(bo(e,t,a),Sc(e,t,a)):(ki&&r&&wi(t),t.flags|=1,Zs(e,t,n,a),t.child)}function uc(e,t,n,r,i){if(Ji(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Yi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Is,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ma(t),o=n.contextType,a.context=typeof o==`object`&&o?Yi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Fs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Is.enqueueReplaceState(a,a.state,null),Ba(t,r,a,i),za(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Yi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Rs(t,a,r,o),ja=!1;var f=t.memoizedState;a.state=f,Ba(t,r,a,i),za(),l=t.memoizedState,s||f!==l||ja?(typeof d==`function`&&(Fs(t,n,d,r),l=t.memoizedState),(c=ja||Ls(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Na(e,t),o=t.memoizedProps,u=zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Yi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Rs(t,a,r,c),ja=!1,f=t.memoizedState,a.state=f,Ba(t,r,a,i),za();var p=t.memoizedState;o!==d||f!==p||ja||e!==null&&e.dependencies!==null&&qi(e.dependencies)?(typeof s==`function`&&(Fs(t,n,s,r),p=t.memoizedState),(u=ja||Ls(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&qi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,sc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ka(t,e.child,null,i),t.child=ka(t,null,n,i)):Zs(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Sc(e,t,i),e}function dc(e,t,n,r){return Li(),t.flags|=256,Zs(e,t,n,r),t.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function pc(e){return{baseLanes:e,cachePool:pa()}}function mc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function hc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(eo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(ki){if(a?Xa(t):Qa(t),(e=Oi)?(e=rf(e,ji),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi===null?null:{id:bi,overflow:xi},retryLane:536870912,hydrationErrors:null},n=li(e),n.return=t,t.child=n,Di=t,Oi=null)):e=null,e===null)throw Ni(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Qa(t),a=t.mode,c=_c({mode:`hidden`,children:c},a),r=si(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(null,r)):(Xa(t),gc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=vc(e,t,n)):t.memoizedState===null?(Qa(t),c=r.fallback,a=t.mode,r=_c({mode:`visible`,children:r.children},a),c=si(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,ka(t,e.child,null,n),r=t.child,r.memoizedState=pc(n),r.childLanes=mc(e,s,n),t.memoizedState=fc,t=nc(null,r)):(Qa(t),t.child=e.child,t.flags|=128,t=null);else if(Xa(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,zi({value:r,source:null,stack:null}),t=vc(e,t,n)}else if(Xs||Ki(e,t,n,!1),s=(n&e.childLanes)!==0,Xs||s){if(s=Fl,s!==null&&(r=at(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),pu(s,e,r),Ys;af(c)||Tu(),t=vc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Oi=cf(c.nextSibling),Di=t,ki=!0,Ai=null,ji=!1,e!==null&&Ei(t,e),t=gc(t,r.children),t.flags|=4096);return t}return a?(Qa(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ii(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=si(c,a,n,null),c.flags|=2):c=ii(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,nc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=pc(n):(a=c.cachePool,a===null?a=pa():(l=ta._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=mc(e,s,n),t.memoizedState=fc,nc(e.child,r)):(Xa(t),n=e.child,e=n.sibling,n=ii(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function gc(e,t){return t=_c({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function _c(e,t){return e=W(22,e,null,t),e.lanes=0,e}function vc(e,t,n){return ka(t,e.child,null,n),e=gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Wi(e.return,t,n)}function bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function xc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=eo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,pe(eo,o),Zs(e,t,r,n),r=ki?gi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&yc(e,n,t);else if(e.tag===19)yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&to(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&to(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bc(t,!0,n,null,a,r);break;case`together`:bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Sc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ki(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ii(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ii(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Cc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&qi(e))):!0}function wc(e,t,n){switch(t.tag){case 3:ve(t,t.stateNode.containerInfo),Hi(t,ta,e.memoizedState.cache),Li();break;case 27:case 5:ye(t);break;case 4:ve(t,t.stateNode.containerInfo);break;case 10:Hi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Za(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Xa(t),e=Sc(e,t,n),e===null?null:e.sibling):hc(e,t,n):(Xa(t),t.flags|=128,null);Xa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Ki(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return xc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),pe(eo,eo.current),r)break;return null;case 22:return t.lanes=0,tc(e,t,n,t.pendingProps);case 24:Hi(t,ta,e.memoizedState.cache)}return Sc(e,t,n)}function Tc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Xs=!0;else{if(!Cc(e,n)&&!(t.flags&128))return Xs=!1,wc(e,t,n);Xs=!!(e.flags&131072)}else Xs=!1,ki&&t.flags&1048576&&Ci(t,gi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ya(t.elementType),t.type=e,typeof e==`function`)ri(e)?(r=zs(e,r),t.tag=1,t=uc(null,t,e,r,n)):(t.tag=0,t=cc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=Qs(null,t,e,r,n);break a}else if(a===te){t.tag=14,t=$s(null,t,e,r,n);break a}}throw t=oe(e)||e,Error(i(306,t,``))}}return t;case 0:return cc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=zs(r,t.pendingProps),uc(e,t,r,a,n);case 3:a:{if(ve(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Na(e,t),Ba(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Hi(t,ta,r),r!==o.cache&&Gi(t,[ta],n,!0),za(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=dc(e,t,r,n);break a}else if(r!==a){a=fi(Error(i(424)),t),zi(a),t=dc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Oi=cf(e.firstChild),Di=t,ki=!0,Ai=null,ji=!0,n=Aa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Li(),r===a){t=Sc(e,t,n);break a}Zs(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ki||(n=t.type,e=t.pendingProps,r=Bd(ge.current).createElement(n),r[dt]=t,r[ft]=e,Pd(r,n,e),P(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&ki&&(r=t.stateNode=ff(t.type,t.pendingProps,ge.current),Di=t,ji=!0,a=Oi,Zd(t.type)?(lf=a,Oi=cf(r.firstChild)):Oi=a),Zs(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ki&&((a=r=Oi)&&(r=tf(r,t.type,t.pendingProps,ji),r===null?a=!1:(t.stateNode=r,Di=t,Oi=cf(r.firstChild),ji=!1,a=!0)),a||Ni(t)),ye(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=ho(e,t,vo,null,null,n),Qf._currentValue=a),sc(e,t),Zs(e,t,r,n),t.child;case 6:return e===null&&ki&&((e=n=Oi)&&(n=nf(n,t.pendingProps,ji),n===null?e=!1:(t.stateNode=n,Di=t,Oi=null,e=!0)),e||Ni(t)),null;case 13:return hc(e,t,n);case 4:return ve(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ka(t,null,r,n):Zs(e,t,r,n),t.child;case 11:return Qs(e,t,t.type,t.pendingProps,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Hi(t,t.type,r.value),Zs(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ji(t),a=Yi(a),r=r(a),t.flags|=1,Zs(e,t,r,n),t.child;case 14:return $s(e,t,t.type,t.pendingProps,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 19:return xc(e,t,n);case 31:return oc(e,t,n);case 22:return tc(e,t,n,t.pendingProps);case 24:return Ji(t),r=Yi(ta),e===null?(a=q(),a===null&&(a=Fl,o=K(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ma(t),Hi(t,ta,a)):((e.lanes&n)!==0&&(Na(e,t),Ba(t,null,null,n),za()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Hi(t,ta,r),r!==a.cache&&Gi(t,[ta],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Hi(t,ta,r))),Zs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ec(e){e.flags|=4}function Dc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw ba=ga,J}else e.flags&=-16777217}function Oc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(Su())e.flags|=8192;else throw ba=ga,J}function kc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:$e(),e.lanes|=t,ql|=t)}function Ac(e,t){if(!ki)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function jc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Mc(e,t,n){var r=t.pendingProps;switch(Ti(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jc(t),null;case 1:return jc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ui(ta),A(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ii(t)?Ec(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri())),jc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Ec(t),o===null?(jc(t),Dc(t,a,null,r,n)):(jc(t),Oc(t,o))):o?o===e.memoizedState?(jc(t),t.flags&=-16777217):(Ec(t),jc(t),Oc(t,o)):(e=e.memoizedProps,e!==r&&Ec(t),jc(t),Dc(t,a,e,r,n)),null;case 27:if(be(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}e=me.current,Ii(t)?Pi(t,e):(e=ff(a,r,n),t.stateNode=e,Ec(t))}return jc(t),null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return jc(t),null}if(o=me.current,Ii(t))Pi(t,o);else{var s=Bd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ec(t)}}return jc(t),Dc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ec(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||jd(e.nodeValue,n)),e||Ni(t,!0)}else e=Bd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return jc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return jc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),kc(t,t.updateQueue),jc(t),null);case 4:return A(),e===null&&xd(t.stateNode.containerInfo),jc(t),null;case 10:return Ui(t.type),jc(t),null;case 19:if(fe(eo),r=t.memoizedState,r===null)return jc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Ac(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,Ac(r,!1),e=o.updateQueue,t.updateQueue=e,kc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return pe(eo,eo.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Me()>$l&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,kc(t,e),Ac(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return jc(t),null}else 2*Me()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Ac(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(jc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Me(),e.sibling=null,n=eo.current,pe(eo,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return $a(t),qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(jc(t),t.subtreeFlags&6&&(t.flags|=8192)):jc(t),n=t.updateQueue,n!==null&&kc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&fe(da),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ui(ta),jc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Nc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(ta),A(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(eo),null;case 4:return A(),null;case 10:return Ui(t.type),null;case 22:case 23:return $a(t),qa(),e!==null&&fe(da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui(ta),null;case 25:return null;default:return null}}function Pc(e,t){switch(Ti(t),t.tag){case 3:Ui(ta),A();break;case 26:case 27:case 5:be(t);break;case 4:A();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:fe(eo);break;case 10:Ui(t.type);break;case 22:case 23:$a(t),qa(),e!==null&&fe(da);break;case 24:Ui(ta)}}function Fc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Ic(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Lc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ha(t,n)}catch(t){Uu(e,e.return,t)}}}function Rc(e,t,n){n.props=zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Bc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}function Vc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Hc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ft]=t}catch(t){Uu(e,e.return,t)}}function Uc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Wc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Uc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Gc(e,t,n),e=e.sibling;e!==null;)Gc(e,t,n),e=e.sibling}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[dt]=e,t[ft]=n}catch(t){Uu(e,e.return,t)}}var Jc=!1,Yc=!1,Xc=!1,Zc=typeof WeakSet==`function`?WeakSet:Set,Qc=null;function $c(e,t){if(e=e.containerInfo,Rd=sp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,Qc=t;Qc!==null;)if(t=Qc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Qc=e;else for(;Qc!==null;){switch(t=Qc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Qc=e;break}Qc=t.return}}function el(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hl(e,n),r&4&&Fc(5,n);break;case 1:if(hl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&Lc(n),r&512&&zc(n,n.return);break;case 3:if(hl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ha(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&qc(n);case 26:case 5:hl(e,n),t===null&&r&4&&Vc(n),r&512&&zc(n,n.return);break;case 12:hl(e,n);break;case 31:hl(e,n),r&4&&ol(e,n);break;case 13:hl(e,n),r&4&&sl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||Jc,!r){t=t!==null&&t.memoizedState!==null||Yc,i=Jc;var a=Yc;Jc=r,(Yc=t)&&!a?_l(e,n,(n.subtreeFlags&8772)!=0):hl(e,n),Jc=i,Yc=a}break;case 30:break;default:hl(e,n)}}function tl(e){var t=e.alternate;t!==null&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(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 nl=null,rl=!1;function il(e,t,n){for(n=n.child;n!==null;)al(e,t,n),n=n.sibling}function al(e,t,n){if(Ve&&typeof Ve.onCommitFiberUnmount==`function`)try{Ve.onCommitFiberUnmount(Be,n)}catch{}switch(n.tag){case 26:Yc||Bc(n,t),il(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yc||Bc(n,t);var r=nl,i=rl;Zd(n.type)&&(nl=n.stateNode,rl=!1),il(e,t,n),pf(n.stateNode),nl=r,rl=i;break;case 5:Yc||Bc(n,t);case 6:if(r=nl,i=rl,nl=null,il(e,t,n),nl=r,rl=i,nl!==null)if(rl)try{(nl.nodeType===9?nl.body:nl.nodeName===`HTML`?nl.ownerDocument.body:nl).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{nl.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:nl!==null&&(rl?(e=nl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(nl,n.stateNode));break;case 4:r=nl,i=rl,nl=n.stateNode.containerInfo,rl=!0,il(e,t,n),nl=r,rl=i;break;case 0:case 11:case 14:case 15:Ic(2,n,t),Yc||Ic(4,n,t),il(e,t,n);break;case 1:Yc||(Bc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Rc(n,t,r)),il(e,t,n);break;case 21:il(e,t,n);break;case 22:Yc=(r=Yc)||n.memoizedState!==null,il(e,t,n),Yc=r;break;default:il(e,t,n)}}function ol(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function sl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function cl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zc),t;default:throw Error(i(435,e.tag))}}function ll(e,t){var n=cl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function ul(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){nl=c.stateNode,rl=!1;break a}break;case 5:nl=c.stateNode,rl=!1;break a;case 3:case 4:nl=c.stateNode.containerInfo,rl=!0;break a}c=c.return}if(nl===null)throw Error(i(160));al(o,s,a),nl=null,rl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)fl(t,e),t=t.sibling}var dl=null;function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ul(t,e),pl(e),r&4&&(Ic(3,e,e.return),Fc(3,e),Ic(5,e,e.return));break;case 1:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&64&&Jc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=dl;if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[dt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[dt]=e,P(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[dt]=e,P(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Hc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),n!==null&&r&4&&Hc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ul(t,e),pl(e),r&512&&(Yc||n===null||Bc(n,n.return)),e.flags&32){a=e.stateNode;try{Kt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Hc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Xc=!0);break;case 6:if(ul(t,e),pl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Bf=null,a=dl,dl=gf(t.containerInfo),ul(t,e),dl=a,pl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Xc&&(Xc=!1,ml(e));break;case 4:r=dl,dl=gf(e.stateNode.containerInfo),ul(t,e),pl(e),dl=r;break;case 12:ul(t,e),pl(e);break;case 31:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 13:ul(t,e),pl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=Me()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Jc,d=Yc;if(Jc=u||a,Yc=d||l,ul(t,e),Yc=d,Jc=u,pl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Jc||Yc||gl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ll(e,n))));break;case 19:ul(t,e),pl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ll(e,r)));break;case 30:break;case 21:break;default:ul(t,e),pl(e)}}function pl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Uc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Kc(e,Wc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Kc(e,Wc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Gc(e,Wc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ml(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ml(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)el(e,t.alternate,t),t=t.sibling}function gl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ic(4,t,t.return),gl(t);break;case 1:Bc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Rc(t,t.return,n),gl(t);break;case 27:pf(t.stateNode);case 26:case 5:Bc(t,t.return),gl(t);break;case 22:t.memoizedState===null&&gl(t);break;case 30:gl(t);break;default:gl(t)}e=e.sibling}}function _l(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:_l(i,a,n),Fc(4,a);break;case 1:if(_l(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Va(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Lc(a),zc(a,a.return);break;case 27:qc(a);case 26:case 5:_l(i,a,n),n&&r===null&&o&4&&Vc(a),zc(a,a.return);break;case 12:_l(i,a,n);break;case 31:_l(i,a,n),n&&o&4&&ol(i,a);break;case 13:_l(i,a,n),n&&o&4&&sl(i,a);break;case 22:a.memoizedState===null&&_l(i,a,n),zc(a,a.return);break;case 30:break;default:_l(i,a,n)}t=t.sibling}}function vl(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&&na(n))}function yl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e))}function bl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xl(e,t,n,r),t=t.sibling}function xl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:bl(e,t,n,r),i&2048&&Fc(9,t);break;case 1:bl(e,t,n,r);break;case 3:bl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&na(e)));break;case 12:if(i&2048){bl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else bl(e,t,n,r);break;case 31:bl(e,t,n,r);break;case 13:bl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?bl(e,t,n,r):(a._visibility|=2,Sl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?bl(e,t,n,r):Cl(e,t),i&2048&&vl(o,t);break;case 24:bl(e,t,n,r),i&2048&&yl(t.alternate,t);break;default:bl(e,t,n,r)}}function Sl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Sl(a,o,s,c,i),Fc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Sl(a,o,s,c,i)):u._visibility&2?Sl(a,o,s,c,i):Cl(a,o),i&&l&2048&&vl(o.alternate,o);break;case 24:Sl(a,o,s,c,i),i&&l&2048&&yl(o.alternate,o);break;default:Sl(a,o,s,c,i)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Cl(n,r),i&2048&&vl(r.alternate,r);break;case 24:Cl(n,r),i&2048&&yl(r.alternate,r);break;default:Cl(n,r)}t=t.sibling}}var wl=8192;function Tl(e,t,n){if(e.subtreeFlags&wl)for(e=e.child;e!==null;)El(e,t,n),e=e.sibling}function El(e,t,n){switch(e.tag){case 26:Tl(e,t,n),e.flags&wl&&e.memoizedState!==null&&Gf(n,dl,e.memoizedState,e.memoizedProps);break;case 5:Tl(e,t,n);break;case 3:case 4:var r=dl;dl=gf(e.stateNode.containerInfo),Tl(e,t,n),dl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=wl,wl=16777216,Tl(e,t,n),wl=r):Tl(e,t,n));break;default:Tl(e,t,n)}}function Dl(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 Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kl(e),e=e.sibling}function kl(e){switch(e.tag){case 0:case 11:case 15:Ol(e),e.flags&2048&&Ic(9,e,e.return);break;case 3:Ol(e);break;case 12:Ol(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Al(e)):Ol(e);break;default:Ol(e)}}function Al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Qc=r,jl(r,e)}Dl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ic(8,t,t.return),Al(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Al(t));break;default:Al(t)}e=e.sibling}}function jl(e,t){for(;Qc!==null;){var n=Qc;switch(n.tag){case 0:case 11:case 15:Ic(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:na(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Qc=r;else a:for(n=e;Qc!==null;){r=Qc;var i=r.sibling,a=r.return;if(tl(r),r===n){Qc=null;break a}if(i!==null){i.return=a,Qc=i;break a}Qc=a}}}var Ml={getCacheForType:function(e){var t=Yi(ta),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Yi(ta).controller.signal}},Nl=typeof WeakMap==`function`?WeakMap:Map,Pl=0,Fl=null,Z=null,Q=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Pl&2&&Q!==0?Q&-Q:O.T===null?ct():ud()}function fu(){if(Kl===0)if(!(Q&536870912)||ki){var e=Je;Je<<=1,!(Je&3932160)&&(Je=262144),Kl=e}else Kl=536870912;return e=Ja.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Fl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Q,Kl,!1)),tt(e,n),(!(Pl&2)||e!==Fl)&&(e===Fl&&(!(Pl&2)&&(Wl|=n),Hl===4&&_u(e,Q,Kl,!1)),nd(e))}function mu(e,t,n){if(Pl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Qe(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){a=Eu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-Me(),10<a)){if(_u(r,t,Kl,!Rl),Ze(r,0,!0)!==0)break a;au=t,r.timeoutHandle=Kd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},El(t,a,d);var m=(a&62914560)===a?Zl-Me():(a&4194048)===a?Ql-Me():0;if(m=qf(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ue(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&rt(e,n,t)}function vu(){return Pl&6?!0:(rd(0,!1),!1)}function yu(){if(Z!==null){if(Il===0)var e=Z.return;else e=Z,Vi=G=null,xo(e),Ca=null,wa=0,e=Z;for(;e!==null;)Pc(e.alternate,e),e=e.return;Z=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Fl=e,Z=n=ii(e.current,null),Q=t,Il=0,Ll=null,Rl=!1,zl=Qe(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ue(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Xr(),n}function xu(e,t){X=null,O.H=js,t===ma||t===ha?(t=xa(),Il=3):t===J?(t=xa(),Il=4):Il=t===Ys?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Z===null&&(Hl=1,Us(e,fi(t,e.current)))}function Su(){var e=Ja.current;return e===null?!0:(Q&4194048)===Q?Ya===null:(Q&62914560)===Q||Q&536870912?e===Ya:!1}function Cu(){var e=O.H;return O.H=js,e===null?js:e}function wu(){var e=O.A;return O.A=Ml,e}function Tu(){Hl=4,Rl||(Q&4194048)!==Q&&Ja.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Fl===null||_u(Fl,Q,Kl,!1)}function Eu(e,t,n){var r=Pl;Pl|=2;var i=Cu(),a=wu();(Fl!==e||Q!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Z!==null){var s=Z,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Ja.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Vi=G=null,Pl=r,O.H=i,O.A=a,Z===null&&(Fl=null,Q=0,Xr()),o}function Du(){for(;Z!==null;)Au(Z)}function Ou(e,t){var n=Pl;Pl|=2;var r=Cu(),a=wu();Fl!==e||Q!==t?(eu=null,$l=Me()+500,bu(e,t)):zl=Qe(e,t);a:do try{if(Il!==0&&Z!==null){t=Z;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(_a(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Fl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:_a(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var c=Z;if(s?Wf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Z=l;else{var u=c.return;u===null?Z=null:(Z=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Vi=G=null,O.H=r,O.A=a,Pl=n,Z===null?(Fl=null,Q=0,Xr(),Hl):0}function ku(){for(;Z!==null&&!Ae();)Au(Z)}function Au(e){var t=Tc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lc(n,t,t.pendingProps,t.type,void 0,Q);break;case 11:t=lc(n,t,t.pendingProps,t.type.render,t.ref,Q);break;case 5:xo(t);default:Pc(n,t),t=Z=ai(t,Vl),t=Tc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Z=t}function Mu(e,t,n,r){Vi=G=null,xo(t),Ca=null,wa=0;var i=t.return;try{if(Js(e,i,t,n,Q)){Hl=1,Us(e,fi(n,e.current)),Z=null;return}}catch(t){if(i!==null)throw Z=i,t;Hl=1,Us(e,fi(n,e.current)),Z=null;return}t.flags&32768?(ki||r===1?e=!0:zl||Q&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ja.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Mc(t.alternate,t,Vl);if(n!==null){Z=n;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=Nc(e.alternate,e);if(n!==null){n.flags&=32767,Z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=n}while(e!==null);Hl=6,Z=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Pl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,nt(e,n,o,s,c,l),e===Fl&&(Z=Fl=null,Q=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Ie,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=O.T,O.T=null,a=k.p,k.p=2,s=Pl,Pl|=4;try{$c(e,t,n)}finally{Pl=s,k.p=a,O.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=Pl;Pl|=4;try{fl(t,e);var a=zd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{Pl=i,k.p=r,O.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=O.T,O.T=null;var r=k.p;k.p=2;var i=Pl;Pl|=4;try{el(e,t.alternate,t)}finally{Pl=i,k.p=r,O.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,je();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),st(n),t=t.stateNode,Ve&&typeof Ve.onCommitFiberRoot==`function`)try{Ve.onCommitFiberRoot(Be,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=O.T,i=k.p,k.p=2,O.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{O.T=t,k.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,na(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=st(au),r=O.T,a=k.p;try{k.p=32>n?32:n,O.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Pl&6)throw Error(i(331));var c=Pl;if(Pl|=4,kl(o.current),xl(o,o.current,s,n),Pl=c,rd(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{k.p=a,O.T=r,zu(e,t)}}function Hu(e,t,n){t=fi(n,t),t=Gs(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(tt(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=fi(n,e),n=Ks(2),r=Fa(t,n,2),r!==null&&(qs(n,r,t,e),tt(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Fl===e&&(Q&n)===n&&(Hl===4||Hl===3&&(Q&62914560)===Q&&300>Me()-Zl?!(Pl&2)&&bu(e,0):Gl|=n,ql===Q&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=$e()),e=$r(e,t),e!==null&&(tt(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return Oe(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Q,a=Ze(r,r===Fl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Gd()&&(e=td);for(var t=Me(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ue(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=N(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Fl,n=Q,n=Ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ke(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ke(r),st(n)){case 2:case 8:n=Fe;break;case 32:n=Ie;break;case 268435456:n=M;break;default:n=Ie}return r=sd.bind(null,e),n=Oe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ke(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Q;return r=Ze(e,e===Fl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,Me()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Yd(function(){Pl&6?Oe(Pe,id):ad()})}function ud(){if(td===0){var e=aa;e===0&&(e=qe,qe<<=1,!(qe&261888)&&(qe=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function fd(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 pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[ft]||null).action),o=r.submitter;o&&(t=(t=o[ft]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new R(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);_s(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),_s(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Wr.length;md++){var hd=Wr[md];Gr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),I(`onMouseEnter`,[`mouseout`,`mouseover`]),I(`onMouseLeave`,[`mouseout`,`mouseover`]),I(`onPointerEnter`,[`pointerout`,`pointerover`]),I(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function $(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Sd(t,e,2,!1),n.add(r))}function yd(e,t,n){var r=0;t&&(r|=4),Sd(n,e,r,t)}var bd=`_reactListening`+Math.random().toString(36).slice(2);function xd(e){if(!e[bd]){e[bd]=!0,wt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||yd(t,!1,e),yd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bd]||(t[bd]=!0,yd(`selectionchange`,!1,t))}}function Sd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Cd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),s=[];a:{var c=Ur.get(e);if(c!==void 0){var l=R,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:l=Rn;break;case`focusin`:u=`focus`,l=kn;break;case`focusout`:u=`blur`,l=kn;break;case`beforeblur`:case`afterblur`:l=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Bn;break;case Ir:case Lr:case Rr:l=An;break;case Hr:l=Vn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Hn;break;case`copy`:case`cut`:case`paste`:l=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=zn;break;case`toggle`:case`beforetoggle`:l=Un}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(wd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[pt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Dn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=zn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ed,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Dd(s,c,l,d,!1),u!==null&&f!==null&&Dd(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=or;else if(tr(c))if(sr)v=gr;else{v=mr;var y=pr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Xt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){nr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(tr(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(s,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(s,n,i)}var b;if(Gn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Zn?V(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Jn&&n.locale!==`ko`&&(Zn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Zn&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,Zn=!0)),y=Td(r,x),0<y.length&&(x=new Mn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Xn(n),b!==null&&(x.data=b)))),(b=qn?Qn(e,n):$n(e,n))&&(x=Td(r,`onBeforeInput`),0<x.length&&(y=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function wd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Td(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(wd(e,i,a)),i=ln(e,t),i!=null&&r.push(wd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ed(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(wd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(wd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Od=/\r\n?/g,kd=/\u0000|\uFFFD/g;function Ad(e){return(typeof e==`string`?e:``+e).replace(Od,`
|
||
`).replace(kd,``)}function jd(e,t){return t=Ad(t),Ad(e)===t}function Md(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Md(e,t,`name`,a.name,a,null),Md(e,t,`formEncType`,a.formEncType,a,null),Md(e,t,`formMethod`,a.formMethod,a,null),Md(e,t,`formTarget`,a.formTarget,a,null)):(Md(e,t,`encType`,a.encType,a,null),Md(e,t,`method`,a.method,a,null),Md(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:$(`beforetoggle`,e),$(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,At(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&$(`scroll`,e);break;case`onScrollEnd`:r!=null&&$(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!F.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ft]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:$(`error`,e),$(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,o,s,n,null)}}a&&Md(e,t,`srcSet`,n.srcSet,n,null),r&&Md(e,t,`src`,n.src,n,null);return;case`input`:$(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Md(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in $(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Md(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in $(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Md(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Md(e,t,l,r,n,null)}return;case`dialog`:$(`beforetoggle`,e),$(`toggle`,e),$(`cancel`,e),$(`close`,e);break;case`iframe`:case`object`:$(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)$(gd[r],e);break;case`image`:$(`error`,e),$(`load`,e);break;case`details`:$(`toggle`,e);break;case`embed`:case`source`:case`link`:$(`error`,e),$(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Md(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Md(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Md(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Md(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Md(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Md(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Md(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Md(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Md(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Md(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Md(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Md(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Md(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Md(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(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`:ef(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(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 ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=k.d;k.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=vu();return e||t}function yf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?ys(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=L(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),P(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+L(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+L(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+L(n.imageSizes)+`"]`)):i+=`[href="`+L(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),P(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+L(r)+`"][href="`+L(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),P(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ct(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);P(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),P(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),P(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ge.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.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},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+L(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),P(t),e.head.appendChild(t))}function Pf(e){return`[src="`+L(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+L(n.href)+`"]`);if(r)return t.instance=r,P(r),r;var a=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),P(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,P(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),P(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,P(a),a):(r=n,(a=mf.get(o))&&(r=h({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),P(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[dt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,P(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),P(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=et(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=et(0),this.hiddenUpdates=et(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=W(3,null,null,t),e.current=a,a.stateNode=e,t=K(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ma(a),e}function tp(e){return e?(e=ni,e):ni}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Pa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Fa(e,r,t),n!==null&&(pu(n,e,t),Ia(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=ot(t);var n=$r(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=2,up(e,t,n,r)}finally{k.p=a,O.T=i}}function lp(e,t,n,r){var i=O.T;O.T=null;var a=k.p;try{k.p=8,up(e,t,n,r)}finally{k.p=a,O.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)Cd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Xe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ue(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Pl&6)&&($l=Me()+500,rd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&Cd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Cd(e,t,r,null,n)}}function dp(e){return e=nn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 fp=e,null}function mp(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(Ne()){case Pe:return 2;case Fe:return 8;case Ie:case Le:return 32;case M:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,lt(e.priority,function(){op(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=xt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,_s(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ft]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ft]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[pt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=ct();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:p(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:O,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Be=zp.inject(Rp),Ve=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Bs,s=Vs,c=Hs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[pt]=t.current,xd(e),new Fp(t)}})),g=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=c(u(),1),v=g(),y=class{baseUrl;actorUserId;constructor(e){this.baseUrl=e.baseUrl.replace(/\/$/,``),this.actorUserId=e.actorUserId.trim()}async login(e){return this.post(`/auth/login`,{email:e.email,password:e.password,device_fingerprint:T(),device_label:e.deviceLabel,trust_device:e.trustDevice})}async refresh(e){return this.post(`/auth/refresh`,{refresh_token:e.refreshToken})}async getInstallationStatus(){return(await this.request(`/installation/status`,{method:`GET`})).installation}async bootstrapOwner(e){return this.post(`/installation/bootstrap-owner`,{email:e.email,password:e.password,activation_payload:e.activationPayload,activation_signature:e.activationSignature||``})}async revokeAuthSession(e){await this.post(`/auth/sessions/revoke`,{user_id:e.userId,auth_session_id:e.authSessionId,reason:e.reason})}async listClusters(){return(await this.get(`/clusters`)).clusters??[]}async createCluster(e){return(await this.post(`/clusters/`,{actor_user_id:this.actorUserId,slug:e.slug,name:e.name,region:e.region||null,metadata:{}})).cluster}async updateCluster(e,t){return(await this.put(`/clusters/${e}`,{actor_user_id:this.actorUserId,name:t.name,status:t.status,region:t.region||null,metadata:t.metadata||{}})).cluster}async listClusterSummaries(){return(await this.get(`/cluster-admin-summaries`)).cluster_summaries??[]}async getClusterAuthority(e){return(await this.get(`/clusters/${e}/authority`)).authority_state}async updateClusterAuthority(e,t){return(await this.put(`/clusters/${e}/authority`,{actor_user_id:this.actorUserId,authority_state:t.authorityState,mutation_mode:t.mutationMode,notes:t.notes||null})).authority_state}async listNodes(e){return(await this.get(`/clusters/${e}/nodes`)).nodes??[]}async listNodeGroups(e){return(await this.get(`/clusters/${e}/node-groups`)).node_groups??[]}async createNodeGroup(e,t){return(await this.post(`/clusters/${e}/node-groups`,{actor_user_id:this.actorUserId,parent_group_id:t.parentGroupId||null,name:t.name,description:t.description||null,sort_order:t.sortOrder||0,metadata:{}})).node_group}async assignNodeGroup(e,t,n){return(await this.put(`/clusters/${e}/nodes/${t}/group`,{actor_user_id:this.actorUserId,group_id:n||null})).node}async disableMembership(e,t,n){await this.post(`/clusters/${e}/nodes/${t}/membership/disable`,{actor_user_id:this.actorUserId,reason:n})}async attachExistingNode(e,t,n){return(await this.post(`/clusters/${e}/nodes/${t}/membership/attach`,{actor_user_id:this.actorUserId,roles:n})).node}async revokeNodeIdentity(e,t,n){await this.post(`/clusters/${e}/nodes/${t}/identity/revoke`,{actor_user_id:this.actorUserId,reason:n})}async deleteClusterNode(e,t,n){await this.delete(`/clusters/${e}/nodes/${t}`,{actor_user_id:this.actorUserId,reason:n})}async listJoinRequests(e){return(await this.get(`/clusters/${e}/join-requests`)).join_requests??[]}async createJoinToken(e,t){let n=new Date(Date.now()+Math.max(t.ttlHours,1)*60*60*1e3).toISOString();return(await this.post(`/clusters/${e}/join-tokens`,{actor_user_id:this.actorUserId,scope:t.scope,expires_at:n,max_uses:Math.max(t.maxUses,1)})).join_token}async listJoinTokens(e){return(await this.get(`/clusters/${e}/join-tokens`)).join_tokens??[]}async revokeJoinToken(e,t){return(await this.post(`/clusters/${e}/join-tokens/${t}/revoke`,{actor_user_id:this.actorUserId})).join_token}async approveJoinRequest(e,t){await this.post(`/clusters/${e}/join-requests/${t}/approve`,{actor_user_id:this.actorUserId,ownership_type:`platform_managed`})}async rejectJoinRequest(e,t,n){await this.post(`/clusters/${e}/join-requests/${t}/reject`,{actor_user_id:this.actorUserId,reason:n})}async listNodeRoles(e,t){return(await this.get(`/clusters/${e}/nodes/${t}/roles`)).role_assignments??[]}async assignRole(e,t,n,r){await this.setRoleStatus(e,t,n,`active`,r)}async setRoleStatus(e,t,n,r,i){await this.post(`/clusters/${e}/nodes/${t}/roles`,{actor_user_id:this.actorUserId,organization_id:i||null,role:n,status:r,policy:{}})}async listWorkloadStatuses(e,t){return(await this.get(`/clusters/${e}/nodes/${t}/workloads/status`)).workload_statuses??[]}async listDesiredWorkloads(e,t){return(await this.get(`/clusters/${e}/nodes/${t}/workloads/desired`)).desired_workloads??[]}async listNodeHeartbeats(e,t,n=100){return(await this.get(`/clusters/${e}/nodes/${t}/heartbeats?limit=${n}`)).heartbeats??[]}async listNodeTelemetry(e,t,n=120){return(await this.get(`/clusters/${e}/nodes/${t}/telemetry?limit=${n}`)).telemetry??[]}async listReleaseVersions(e,t=`rap-node-agent`,n=`dev`){let r=new URLSearchParams({product:t,channel:n});return(await this.get(`/clusters/${e}/updates/releases?${r.toString()}`)).release_versions??[]}async createReleaseVersion(e,t){return(await this.post(`/clusters/${e}/updates/releases`,{actor_user_id:this.actorUserId,product:t.product,version:t.version,channel:t.channel||`stable`,status:t.status||`active`,compatibility:t.compatibility||{},changelog:t.changelog||``,artifacts:t.artifacts.map(e=>({os:e.os,arch:e.arch,install_type:e.installType,kind:e.kind,url:e.url,sha256:e.sha256,size_bytes:e.sizeBytes||0,metadata:e.metadata||{}}))})).release_version}async getStaleNodeRiskReport(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/updates/stale-node-risk-report?${t.toString()}`)).stale_node_risk_report}async getNodeUpdatePlan(e,t,n){let r=new URLSearchParams({product:n.product||`rap-node-agent`,current_version:n.currentVersion||``,os:n.os||`linux`,arch:n.arch||`amd64`,install_type:n.installType||`docker`,channel:n.channel||`dev`});return(await this.get(`/clusters/${e}/nodes/${t}/updates/plan?${r.toString()}`)).node_update_plan}async getNodeBridgeReplayPlan(e,t){let n=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/nodes/${t}/updates/bridge-replay-plan?${n.toString()}`)).node_bridge_replay_plan}async upsertNodeUpdatePolicy(e,t,n){return(await this.put(`/clusters/${e}/nodes/${t}/updates/policy`,{actor_user_id:this.actorUserId,product:n.product,channel:n.channel||`dev`,target_version:n.targetVersion??null,strategy:n.strategy||`rolling`,enabled:n.enabled??!0,rollback_allowed:n.rollbackAllowed??!0,health_window_seconds:n.healthWindowSeconds||180})).node_update_policy}async listNodeUpdateStatuses(e,t,n=80){let r=new URLSearchParams({actor_user_id:this.actorUserId,limit:String(n)});return(await this.get(`/clusters/${e}/nodes/${t}/updates/statuses?${r.toString()}`)).node_update_statuses??[]}async listFabricTestingFlags(){return(await this.get(`/fabric/testing-flags`)).testing_flags??[]}async updateFabricTestingFlag(e){return(await this.put(`/fabric/testing-flags`,{actor_user_id:this.actorUserId,scope_type:e.scopeType,scope_id:e.scopeId||null,cluster_id:e.clusterId||null,enabled:e.enabled,telemetry_enabled:e.telemetryEnabled,synthetic_links_enabled:e.syntheticLinksEnabled,history_retention_hours:e.historyRetentionHours,metadata:e.metadata||{}})).testing_flag}async setDesiredWorkload(e,t,n,r){await this.put(`/clusters/${e}/nodes/${t}/workloads/${n}/desired`,{actor_user_id:this.actorUserId,desired_state:r.desiredState,version:r.version||null,runtime_mode:r.runtimeMode,artifact_ref:null,config:r.config,environment:r.environment})}async listMeshLinks(e){return(await this.get(`/clusters/${e}/mesh/links`)).mesh_links??[]}async listRouteIntents(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/mesh/route-intents?${t.toString()}`)).route_intents??[]}async expireRouteIntent(e,t,n){return(await this.post(`/clusters/${e}/mesh/route-intents/${t}/expire`,{actor_user_id:this.actorUserId,reason:n})).route_intent}async disableRouteIntent(e,t,n){return(await this.post(`/clusters/${e}/mesh/route-intents/${t}/disable`,{actor_user_id:this.actorUserId,reason:n})).route_intent}async getNodeSyntheticMeshConfig(e,t){return(await this.get(`/clusters/${e}/nodes/${t}/mesh/synthetic-config`)).synthetic_mesh_config}async listFabricServiceChannelRouteFeedback(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.reporterNodeId&&n.set(`reporter_node_id`,t.reporterNodeId),t.routeId&&n.set(`route_id`,t.routeId),t.serviceClass&&n.set(`service_class`,t.serviceClass),t.feedbackStatus&&n.set(`feedback_status`,t.feedbackStatus),t.includeExpired&&n.set(`include_expired`,`true`),(await this.get(`/clusters/${e}/fabric/service-channels/route-feedback?${n.toString()}`)).route_feedback??[]}async expireFabricServiceChannelRouteFeedback(e,t){return(await this.post(`/clusters/${e}/fabric/service-channels/route-feedback/expire`,{actor_user_id:this.actorUserId,route_id:t.routeId,reporter_node_id:t.reporterNodeId||``,service_class:t.serviceClass||``,reason:t.reason||`expired from admin fabric diagnostics`})).route_feedback_expire}async listFabricServiceChannelRouteRebuildAttempts(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.reporterNodeId&&n.set(`reporter_node_id`,t.reporterNodeId),t.routeId&&n.set(`route_id`,t.routeId),t.replacementRouteId&&n.set(`replacement_route_id`,t.replacementRouteId),t.serviceClass&&n.set(`service_class`,t.serviceClass),t.rebuildStatus&&n.set(`rebuild_status`,t.rebuildStatus),t.rebuildRequestId&&n.set(`rebuild_request_id`,t.rebuildRequestId),t.generation&&n.set(`generation`,t.generation),t.feedbackSource&&n.set(`feedback_source`,t.feedbackSource),t.feedbackChannelId&&n.set(`feedback_channel_id`,t.feedbackChannelId),t.feedbackViolationStatus&&n.set(`feedback_violation_status`,t.feedbackViolationStatus),t.enrichment&&n.set(`enrichment`,t.enrichment),t.limit&&n.set(`limit`,String(t.limit)),t.offset&&n.set(`offset`,String(t.offset)),(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-attempts?${n.toString()}`)).rebuild_attempts??[]}async getFabricServiceChannelRouteRebuildHealthSummary(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-health?${n.toString()}`)).rebuild_health}async getFabricServiceChannelReadiness(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),(await this.get(`/clusters/${e}/fabric/service-channels/readiness?${n.toString()}`)).fabric_service_channel_readiness}async getFabricServiceChannelSchemaStatus(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/schema-status?${t.toString()}`)).fabric_service_channel_schema_status}async getFabricServiceChannelRebuildSnapshotMaintenanceHealth(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),t.minAgeSeconds&&n.set(`min_age_seconds`,String(t.minAgeSeconds)),t.heartbeatThreshold&&n.set(`heartbeat_threshold`,String(t.heartbeatThreshold)),(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-snapshots/health?${n.toString()}`)).rebuild_snapshot_health}async warmupFabricServiceChannelRebuildSnapshots(e,t={}){return(await this.post(`/clusters/${e}/fabric/service-channels/rebuild-snapshots/warmup`,{actor_user_id:this.actorUserId,limit:t.limit||10,stale_after_seconds:t.staleAfterSeconds||60})).rebuild_snapshot_warmup}async getFabricServiceChannelLeaseMaintenance(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),t.includeExpired&&n.set(`include_expired`,`true`),(await this.get(`/clusters/${e}/fabric/service-channels/leases?${n.toString()}`)).fabric_service_channel_lease_maintenance}async cleanupFabricServiceChannelLeases(e,t={}){return(await this.post(`/clusters/${e}/fabric/service-channels/leases/cleanup`,{actor_user_id:this.actorUserId,limit:t.limit||100})).fabric_service_channel_lease_maintenance}async getFabricServiceChannelAccessTelemetry(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),(await this.get(`/clusters/${e}/fabric/service-channels/access-telemetry?${n.toString()}`)).fabric_service_channel_access_telemetry}async listFabricServiceChannelRouteRebuildIncidents(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-incidents?${n.toString()}`)).rebuild_incidents??[]}async getFabricServiceChannelRebuildInvestigationBreadcrumbs(e,t={}){let n=new URLSearchParams({actor_user_id:this.actorUserId});return t.limit&&n.set(`limit`,String(t.limit)),t.currentWindowSeconds&&n.set(`current_window_seconds`,String(t.currentWindowSeconds)),t.historyWindowSeconds&&n.set(`history_window_seconds`,String(t.historyWindowSeconds)),(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-investigations/breadcrumbs?${n.toString()}`)).rebuild_investigation_breadcrumbs}async recordFabricServiceChannelRouteRebuildInvestigation(e,t){await this.post(`/clusters/${e}/fabric/service-channels/rebuild-incidents/investigations`,{actor_user_id:this.actorUserId,reporter_node_id:t.reporterNodeId,route_id:t.routeId,service_class:t.serviceClass||``,generation:t.generation||``,guard_status:t.guardStatus||``,incident_id:t.incidentId||``,feedback_source:t.feedbackSource||``,feedback_channel_id:t.feedbackChannelId||``,feedback_violation_status:t.feedbackViolationStatus||``,drilldown_source:t.drilldownSource||``,reason:t.reason||`operator opened deep rebuild ledger`})}async silenceFabricServiceChannelRouteRebuildAlert(e,t){return(await this.post(`/clusters/${e}/fabric/service-channels/rebuild-health/silences`,{actor_user_id:this.actorUserId,incident_source:t.incidentSource||``,channel_id:t.channelId||``,reporter_node_id:t.reporterNodeId,route_id:t.routeId,guard_status:t.guardStatus,generation:t.generation||``,reason:t.reason||`operator acknowledged rebuild alert`,ttl_seconds:t.ttlSeconds||21600})).rebuild_alert_silence}async listFabricServiceChannelRouteRebuildAlertSilences(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/rebuild-health/silences?${t.toString()}`)).rebuild_alert_silences??[]}async unsilenceFabricServiceChannelRouteRebuildAlert(e,t,n){return(await this.delete(`/clusters/${e}/fabric/service-channels/rebuild-health/silences/${encodeURIComponent(t)}`,{actor_user_id:this.actorUserId,reason:n||`operator removed rebuild alert silence`})).rebuild_alert_silence}async getFabricServiceChannelRecoveryPolicy(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/recovery-policy?${t.toString()}`)).fabric_service_channel_recovery_policy}async updateFabricServiceChannelRecoveryPolicy(e,t){return(await this.put(`/clusters/${e}/fabric/service-channels/recovery-policy`,{actor_user_id:this.actorUserId,hysteresis_penalty:t.hysteresisPenalty,promotion_min_samples:t.promotionMinSamples,demotion_failure_threshold:t.demotionFailureThreshold,demotion_drop_threshold:t.demotionDropThreshold,demotion_slow_threshold:t.demotionSlowThreshold,demotion_rebuild_enabled:t.demotionRebuildEnabled,demotion_fenced_enabled:t.demotionFencedEnabled})).fabric_service_channel_recovery_policy}async getFabricServiceChannelAdaptivePolicy(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/adaptive-policy?${t.toString()}`)).fabric_service_channel_adaptive_policy}async updateFabricServiceChannelAdaptivePolicy(e,t){return(await this.put(`/clusters/${e}/fabric/service-channels/adaptive-policy`,{actor_user_id:this.actorUserId,max_parallel_window:t.maxParallelWindow,bulk_pressure_channel_threshold:t.bulkPressureChannelThreshold,queue_pressure_high_watermark:t.queuePressureHighWatermark,queue_pressure_max_in_flight:t.queuePressureMaxInFlight,class_windows:t.classWindows})).fabric_service_channel_adaptive_policy}async getFabricServiceChannelPoolPolicy(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/pool-policy?${t.toString()}`)).fabric_service_channel_pool_policy}async updateFabricServiceChannelPoolPolicy(e,t){return(await this.put(`/clusters/${e}/fabric/service-channels/pool-policy`,{actor_user_id:this.actorUserId,entry_pool_node_ids:t.entryPoolNodeIds,exit_pool_node_ids:t.exitPoolNodeIds,preferred_entry_node_id:t.preferredEntryNodeId,preferred_exit_node_id:t.preferredExitNodeId,selection_strategy:t.selectionStrategy,route_rebuild:t.routeRebuild,entry_failover:t.entryFailover,exit_failover:t.exitFailover,backend_fallback_allowed:t.backendFallbackAllowed,sticky_session:t.stickySession})).fabric_service_channel_pool_policy}async getFabricServiceChannelBreadcrumbWindowPolicy(e){let t=new URLSearchParams({actor_user_id:this.actorUserId});return(await this.get(`/clusters/${e}/fabric/service-channels/breadcrumb-window-policy?${t.toString()}`)).fabric_service_channel_breadcrumb_window_policy}async updateFabricServiceChannelBreadcrumbWindowPolicy(e,t){return(await this.put(`/clusters/${e}/fabric/service-channels/breadcrumb-window-policy`,{actor_user_id:this.actorUserId,current_window_seconds:t.currentWindowSeconds,history_window_seconds:t.historyWindowSeconds})).fabric_service_channel_breadcrumb_window_policy}async listQoSPolicies(e){return(await this.get(`/clusters/${e}/mesh/qos-policies`)).qos_policies??[]}async listVPNConnections(e){return(await this.get(`/clusters/${e}/vpn-connections`)).vpn_connections??[]}async createVPNConnection(e,t){return(await this.post(`/clusters/${e}/vpn-connections`,{actor_user_id:this.actorUserId,organization_id:t.organizationId,name:t.name,target_endpoint:t.targetEndpoint,protocol_family:t.protocolFamily,credential_ref:t.credentialRef||null,mode:`single_active`,desired_state:t.desiredState,allowed_node_policy:t.allowedNodePolicy,routing_usage:t.routingUsage,route_policy:t.routePolicy,qos_policy:t.qosPolicy,placement_policy:t.placementPolicy,metadata:{}})).vpn_connection}async updateVPNConnectionDesiredState(e,t,n){return(await this.put(`/clusters/${e}/vpn-connections/${t}/desired-state`,{actor_user_id:this.actorUserId,desired_state:n})).vpn_connection}async getActiveVPNLease(e,t){try{return(await this.get(`/clusters/${e}/vpn-connections/${t}/leases/active`)).lease}catch{return null}}async getVPNPacketStats(e,t){return(await this.get(`/clusters/${e}/vpn-connections/${t}/tunnel/stats`)).vpn_packet_stats??{}}async getVPNClientDiagnosticStatus(e,t){if(!t.trim())return null;try{return(await this.get(`/clusters/${e}/vpn/client-diagnostics/${encodeURIComponent(t.trim())}/status`)).vpn_client_diagnostic_status??null}catch{return null}}async listVPNClientDiagnosticStatuses(e){return(await this.get(`/clusters/${e}/vpn/client-diagnostics`)).vpn_client_diagnostic_statuses??[]}async enqueueVPNClientDiagnosticCommand(e,t,n){return(await this.post(`/clusters/${e}/vpn/client-diagnostics/${encodeURIComponent(t.trim())}/commands`,n)).vpn_client_diagnostic_command}async expireStaleVPNLeases(e){return(await this.post(`/clusters/${e}/vpn-connection-leases/expire-stale`,{actor_user_id:this.actorUserId})).expired_leases??[]}async listAudit(e,t={}){return(await this.listAuditDetailed(e,t)).events}async listAuditDetailed(e,t={}){let n=new URLSearchParams({limit:String(t.limit||100)});for(let e of t.eventTypes||[])e&&n.append(`event_type`,e);for(let e of t.targetTypes||[])e&&n.append(`target_type`,e);t.correlation&&n.set(`correlation`,t.correlation);let r=await this.get(`/clusters/${e}/audit?${n.toString()}`);return{events:r.audit_events??[],summary:r.audit_summary}}clusterEventsURL(e){return`${this.baseUrl}/clusters/${encodeURIComponent(e)}/events?actor_user_id=${encodeURIComponent(this.actorUserId)}`}async getOrganizationAdminSummary(e){return(await this.get(`/organizations/${e}/admin-summary`)).admin_summary}async listOrganizations(){return(await this.request(`/organizations?user_id=${encodeURIComponent(this.actorUserId)}`,{method:`GET`})).organizations??[]}async createOrganization(e){return(await this.post(`/organizations/`,{actor_user_id:this.actorUserId,slug:e.slug,name:e.name,metadata:e.metadata||{}})).organization}async listUsers(){return(await this.get(`/users/`)).users??[]}async createUser(e){return(await this.post(`/users/`,{actor_user_id:this.actorUserId,email:e.email,password:e.password,platform_role:e.platformRole||`user`})).user}async listOrganizationMemberships(e){return(await this.request(`/organizations/${e}/memberships?user_id=${encodeURIComponent(this.actorUserId)}`,{method:`GET`})).memberships??[]}async addOrganizationMembership(e,t){return(await this.post(`/organizations/${e}/memberships`,{actor_user_id:this.actorUserId,user_id:t.userId,role_id:t.roleId})).membership}async listResources(e){let t=new URLSearchParams({user_id:this.actorUserId});return e&&t.set(`organization_id`,e),(await this.request(`/resources?${t.toString()}`,{method:`GET`})).resources??[]}async createResource(e){return(await this.post(`/resources/`,{actor_user_id:this.actorUserId,organization_id:e.organizationId,name:e.name,address:e.address,protocol:e.protocol||`rdp`,secret_ref:e.secretRef||null,certificate_verification_mode:e.certificateVerificationMode||`strict`,render_quality_profile:e.renderQualityProfile||`balanced`,clipboard_mode:e.clipboardMode||`disabled`,file_transfer_mode:e.fileTransferMode||`disabled`,metadata:e.metadata||{}})).resource}async upsertResourceSecret(e,t){await this.put(`/resources/${e}/secret`,{actor_user_id:this.actorUserId,payload:{username:t.username||``,password:t.password||``,domain:t.domain||``},metadata:{source:`web-admin`}})}async get(e){let t=e.includes(`?`)?`&`:`?`;return this.request(`${e}${t}actor_user_id=${encodeURIComponent(this.actorUserId)}`,{method:`GET`})}async post(e,t){return this.request(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}async put(e,t){return this.request(e,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}async delete(e,t){return this.request(e,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})}async request(e,t){let n=await fetch(`${this.baseUrl}${e}`,t);if(!n.ok){let e=`Запрос завершился ошибкой HTTP ${n.status}`;try{let t=await n.json();e=b(t,n.status)||t.error?.fallback_message||t.error?.code||e}catch{}throw Error(e)}return await n.json()}};function b(e,t){let n=e.error;if(!n)return``;if(t===409&&n.code===`conflict.legacy_compatibility_removal_is_blocked_while_stale_recovery_risk_nodes_remain`){let e=n.details||{},t=[`Compatibility cleanup заблокирован.`],r=x(e,`blocked_operation`);r&&t.push(`Операция: ${r}.`);let i=[S(e,`blocked_nodes`)?`blockers ${S(e,`blocked_nodes`)}`:``,S(e,`stale_nodes`)?`stale ${S(e,`stale_nodes`)}`:``,S(e,`artifact_gap_nodes`)?`artifact gap ${S(e,`artifact_gap_nodes`)}`:``,S(e,`unknown_profile_nodes`)?`profile unknown ${S(e,`unknown_profile_nodes`)}`:``,S(e,`waiting_update_status_nodes`)?`waiting status ${S(e,`waiting_update_status_nodes`)}`:``,S(e,`unknown_version_nodes`)?`version unknown ${S(e,`unknown_version_nodes`)}`:``,S(e,`legacy_recovery_contract_nodes`)?`legacy contract ${S(e,`legacy_recovery_contract_nodes`)}`:``,S(e,`recovery_bridge_required_nodes`)?`recovery bridge ${S(e,`recovery_bridge_required_nodes`)}`:``,S(e,`recovery_bridge_replay_ready_nodes`)?`bridge replay ready ${S(e,`recovery_bridge_replay_ready_nodes`)}`:``,S(e,`waiting_recovery_heartbeat_nodes`)?`waiting heartbeat ${S(e,`waiting_recovery_heartbeat_nodes`)}`:``].filter(Boolean);i.length>0&&t.push(i.join(` / `)+`.`);let a=w(e,`blocked_node_ids`);if(a.length>0&&t.push(`Blocked nodes: ${a.join(`, `)}.`),C(e,`bridge_hold_required`)){let n=w(e,`bridge_hold_reasons`),r=w(e,`bridge_hold_node_ids`),i=[];n.length>0&&i.push(`reasons ${n.join(`, `)}`),r.length>0&&i.push(`nodes ${r.join(`, `)}`),t.push(`Recovery bridge hold active${i.length>0?`: ${i.join(` / `)}`:``}.`)}let o=n.trace_id?.trim();return o&&t.push(`Trace: ${o}.`),t.join(` `)}return``}function x(e,t){let n=e[t];return typeof n==`string`?n.trim():``}function S(e,t){let n=e[t];return typeof n==`number`&&Number.isFinite(n)?n:0}function C(e,t){return e[t]===!0}function w(e,t){let n=e[t];return Array.isArray(n)?n.filter(e=>typeof e==`string`&&e.trim().length>0):[]}function T(){let e=`rap.webAdmin.deviceFingerprint`,t=localStorage.getItem(e);if(t)return t;let n=`web-admin-${ee()}`;return localStorage.setItem(e,n),n}function ee(){if(typeof globalThis.crypto?.randomUUID==`function`)return globalThis.crypto.randomUUID();if(typeof globalThis.crypto?.getRandomValues==`function`){let e=new Uint8Array(16);globalThis.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}var te=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),E=o(((e,t)=>{t.exports=te()}))(),D={baseUrl:`rap.webAdmin.baseUrl`,actorUserId:`rap.webAdmin.actorUserId`,auth:`rap.webAdmin.auth`,language:`rap.webAdmin.language`,vpnDiagnosticDeviceId:`rap.webAdmin.vpnDiagnosticDeviceId`},ne=`/api/v1`,re=`http://192.168.200.61:8080/api/v1`,ie={reporterNodeId:``,routeId:``,serviceClass:``,generation:``,feedbackSource:``,feedbackChannelId:``,feedbackViolationStatus:``,offset:0},ae=[`public-ingress`,`admin-ingress`,`global-admin-runtime`,`cluster-admin-runtime`,`organization-portal-runtime`,`user-portal-runtime`,`identity-runtime`,`policy-authority`,`audit-sink`,`entry-node`,`relay-node`,`core-mesh`,`rdp-worker`,`vnc-worker`,`vpn-exit`,`vpn-connector`,`vpn-client`,`ipv4-egress`,`file-storage-cache`,`update-cache`,`video-relay`],oe={"public-ingress":`Public HTTPS ingress`,"admin-ingress":`Admin HTTPS ingress`,"global-admin-runtime":`Global admin runtime`,"cluster-admin-runtime":`Cluster admin runtime`,"organization-portal-runtime":`Organization portal runtime`,"user-portal-runtime":`User portal runtime`,"identity-runtime":`Identity runtime`,"policy-authority":`Policy authority`,"audit-sink":`Audit sink`,"entry-node":`Entry node`,"relay-node":`Relay node`,"core-mesh":`Mesh core`,"rdp-worker":`RDP worker`,"vnc-worker":`VNC worker`,"vpn-exit":`VPN exit`,"vpn-connector":`VPN connector`,"vpn-client":`VPN client node`,"ipv4-egress":`IPv4 egress`,"file-storage-cache":`File/cache storage`,"update-cache":`Update cache`,"video-relay":`Video relay`},se={"public-ingress":[`can_accept_client_ingress`,`fabric_service_channel_runtime`],"admin-ingress":[`can_accept_client_ingress`,`fabric_service_channel_runtime`],"global-admin-runtime":[`can_run_admin_runtime`,`platform_owner_trusted_node`],"cluster-admin-runtime":[`can_run_admin_runtime`],"organization-portal-runtime":[`can_run_admin_runtime`],"user-portal-runtime":[`can_run_admin_runtime`],"identity-runtime":[`can_run_identity_runtime`],"policy-authority":[`can_run_policy_authority`,`platform_owner_trusted_node`],"audit-sink":[`can_run_audit_sink`,`platform_owner_trusted_node`],"entry-node":[`can_accept_client_ingress`],"relay-node":[`mesh_rendezvous_relay_control_contract`,`mesh_peer_connection_manager`],"core-mesh":[`native_node_agent`,`mesh_peer_connection_manager`,`mesh_listener_diagnostics`],"rdp-worker":[`can_run_rdp_worker`],"vnc-worker":[`can_run_vnc_worker`],"vpn-exit":[`can_run_vpn_exit`],"vpn-connector":[`can_run_vpn_connector`],"vpn-client":[`can_run_vpn_client`,`fabric_service_channel_required`],"ipv4-egress":[`can_egress_internet`,`fabric_service_channel_required`],"file-storage-cache":[`can_run_file_cache`],"update-cache":[`can_run_update_cache`],"video-relay":[`can_run_video_relay`]},O=[{id:`command`,ru:`Обзор`,en:`Command`},{id:`clusters`,ru:`Кластеры`,en:`Clusters`},{id:`cluster-settings`,ru:`Настройки кластера`,en:`Cluster Settings`},{id:`nodes`,ru:`Узлы`,en:`Nodes`},{id:`enrollment`,ru:`Новый узел`,en:`New Node`},{id:`roles`,ru:`Роли`,en:`Roles`},{id:`workloads`,ru:`Сервисы`,en:`Workloads`},{id:`fabric`,ru:`Связи Fabric`,en:`Fabric Links`},{id:`vpn`,ru:`VPN Control`,en:`VPN Control`},{id:`servers`,ru:`Серверы`,en:`Servers`},{id:`org-safe`,ru:`Организации`,en:`Organizations`},{id:`audit`,ru:`Аудит`,en:`Audit`}];function k(e){if(!e||typeof e!=`object`)return null;let t=e;return typeof t.userId!=`string`||typeof t.email!=`string`||typeof t.authSessionId!=`string`||typeof t.accessToken!=`string`||typeof t.refreshToken!=`string`||typeof t.accessTokenExpiresAt!=`string`||typeof t.refreshTokenExpiresAt!=`string`||!t.userId||!t.refreshToken?null:{userId:t.userId,email:t.email,authSessionId:t.authSessionId,accessToken:t.accessToken,refreshToken:t.refreshToken,accessTokenExpiresAt:t.accessTokenExpiresAt,refreshTokenExpiresAt:t.refreshTokenExpiresAt}}function ce(e){let t=Date.parse(e);return!Number.isFinite(t)||t<=Date.now()}function le(){try{let e=localStorage.getItem(D.auth);if(!e)return null;let t=k(JSON.parse(e));return!t||ce(t.refreshTokenExpiresAt)?null:t}catch{return null}}var ue={ttlHours:24,maxUses:1,roles:[`core-mesh`],nodeName:``,nodeGroupId:``,ownershipType:`platform_managed`,purpose:``,installMode:`docker`,dockerImage:`rap-node-agent:dev-enrollment-bootstrap-smoke`,dockerContainerName:``,dockerNetwork:`host`,windowsStartupMode:`auto`,windowsInstallDir:``,windowsNodeAgentSHA256:``,linuxInstallDir:``,linuxNodeAgentSHA256:``,meshListenAddr:``,meshListenPortMode:`auto`,meshListenAutoPortStart:19131,meshListenAutoPortEnd:19231,meshAdvertiseEndpoint:``,meshAdvertiseEndpoints:``,meshAdvertiseTransport:`direct_quic`,meshConnectivityMode:`private_lan`,meshNATType:`none`,meshRegion:`docker-test`,controlPlaneEndpoint:``,artifactEndpoints:``,dockerImageArtifactSHA256:``,pullImage:!1,replace:!0,syntheticRuntime:!1},de={ru:{productOwner:`Владелец продукта`,controlPlane:`Панель управления`,sideText:`Главная панель владельца платформы для кластеров, узлов, доверия, ролей и безопасного desired state.`,signInTitle:`Вход`,signInText:`Введите учетные данные.`,bootstrapTitle:`Первый владелец`,bootstrapText:`Пустая установка принимает только подписанную активацию продукта.`,activationPayload:`Activation manifest JSON`,activationSignature:`Подпись manifest`,createOwner:`Создать владельца`,creatingOwner:`Создание...`,ownerCreated:`Владелец создан. Теперь можно войти.`,installationLocked:`Установка уже активирована`,insecureBootstrapDisabled:`Insecure bootstrap выключен. Нужна strict-активация с ключом продукта.`,email:`Логин`,password:`Пароль`,backendApi:`Backend API`,useLocalProxy:`Использовать локальный /api/v1 proxy`,language:`Язык`,deviceLabel:`Устройство`,rememberMe:`Запомнить меня`,trustDevice:`Доверять этому устройству`,signIn:`Войти`,signingIn:`Вход...`,logout:`Выйти`,profile:`Профиль`,refresh:`Обновить`,refreshing:`Обновление...`,autoRefresh:`Автообновление`,lastRefresh:`Данные обновлены`,activeCluster:`Активный кластер`,slugLabel:`Технический код`,slugHelp:`Slug — постоянный короткий технический идентификатор кластера для URL, скриптов, логов и интеграций. Его лучше не менять после создания.`,clusterCatalog:`Каталог кластеров`,clusterCatalogText:`Список реальных кластеров из Control/API слоя. Выберите активный кластер или раскройте карточку для подробностей.`,makeActive:`Сделать активным`,openSettings:`Открыть настройки`,selected:`Выбран`,createCluster:`Создать кластер`,clusterDetails:`Подробнее`,consoleTitle:`Панель владельца платформы`,boundary:`WEB является только представлением. HTTP Control API управляет политикой, релизами и аудитом; межузловой transport Fabric остается QUIC/UDP.`,noLoginError:`Войдите как владелец продукта или администратор платформы, чтобы загрузить панель.`,accessDenied:`Доступ к этой панели запрещен.`,sessionMode:`Режим сессии`,sessionModeAdmin:`Админ`,sessionModeUser:`Пользователь`,sessionRefreshedAt:`Сессия обновлена`,emptyLiveTitle:`Кластер пока пустой`,emptyLiveText:`Это реальные данные, не заглушка: в выбранном кластере ещё нет одобренных node-agent узлов. Создайте join token, запустите rap-node-agent и подтвердите join request.`,realDataNote:`Показываются только данные из PostgreSQL и Control/API слоя. Если значения нулевые, значит соответствующих узлов, ролей или сервисов пока нет.`,signedInAs:`Вход выполнен`,actorUser:`Actor user`,testMode:`Тестирование`,testModeText:`Включает тестовую телеметрию и синтетические наблюдения связей. Это не production mesh runtime.`,platformTestFlag:`Тестирование сервера`,nodeTelemetry:`Телеметрия узла`,heartbeatHistory:`История heartbeat`,noTelemetry:`Телеметрии пока нет`,enableTelemetry:`Включить телеметрию`,enableSyntheticLinks:`Включить тестовые связи`,saveTestFlag:`Сохранить флаг`,nodeManagement:`Управление узлом`,nodeScope:`Область просмотра`,currentClusterNodes:`Узлы активного кластера`,allNodes:`Все узлы платформы`,showAllPlatformNodes:`Показать все узлы платформы`,currentClusterMembership:`Участие в активном кластере`,clusterMemberships:`Участие по кластерам`,notMemberOfActiveCluster:`не состоит`,nodeIdentity:`Физическая идентичность узла`,activeClusterScope:`Область активного кластера`,activeClusterScopeText:`Один физический узел может состоять в нескольких кластерах. Роли и desired-сервисы ниже относятся только к выбранному активному кластеру.`,capabilityConfirmed:`способность подтверждена heartbeat`,capabilityMissing:`способность не заявлена узлом`,capabilityUnknown:`способность не подтверждена: нет heartbeat`,nodeGlobalInventoryText:`Один физический узел показан один раз. Участие и роли остаются кластерными: в разных кластерах этот же узел может иметь разные назначения.`,nodeSearch:`Поиск узлов`,groupNodesBy:`Группировать`,groupByMembership:`по участию`,groupByHealth:`по здоровью`,groupByOwnership:`по владению`,groupByClusterCount:`по числу кластеров`,nodeGroups:`Группы узлов`,nodeGroupTree:`Дерево групп`,nodeGroupFilter:`Фильтр по группе`,allNodeGroups:`Все группы`,nodeGroupCreatePanel:`Создание группы`,nodeGroupName:`Название группы`,parentNodeGroup:`Родительская группа`,rootNodeGroup:`Корень`,ungroupedNodes:`Без группы`,createNodeGroup:`Создать группу`,createSubgroup:`Создать подгруппу`,collapseGroup:`Свернуть`,expandGroup:`Развернуть`,assignNodeGroup:`Переместить в группу`,removeFromNodeGroup:`Убрать из группы`,connectExistingNode:`Подключить к активному кластеру`,connectExistingNodeTitle:`Подключить существующий узел`,connectExistingNodeText:`Будет создано или повторно включено участие конкретного физического узла в активном кластере. Роли ниже назначаются только в этом кластере.`,connectWithRoles:`Подключить с ролями`,nodeDetails:`Сведения`,manageNode:`Настроить`,nodeFunctions:`Функции узла`,nodeFunctionsText:`Одна строка управляет функцией целиком: роль задает разрешение в активном кластере, desired-сервис задает запуск, observed показывает факт от node-agent.`,rolePermission:`Разрешение`,permissionGranted:`разрешено`,permissionDenied:`нет разрешения`,organizationScopeForEnable:`Область организации для новых включений, опционально`,clusterWideRolePlaceholder:`пусто = роль на весь кластер`,desiredRuntime:`Желаемое состояние`,observedRuntime:`Фактически`,enableFunction:`Включить функцию`,disableFunction:`Выключить функцию`,close:`Закрыть`,nodeBriefList:`Краткий список узлов`,noActiveClusterMembership:`Узел не входит в активный кластер`,nodeBriefListHelp:`Список сгруппирован деревом активного кластера. Полные сведения, управление, роли, сервисы и статистика открываются из строки узла.`,nodeSearchPlaceholder:`имя, ключ, кластер, статус`,nodeGroupInventoryText:`Группы — это кластерная инвентарная структура. Перенос узла в группу меняет только его размещение внутри активного кластера, не роли и не членство.`,nodeGroupCreated:`Группа узлов создана.`,noNodesTitle:`Нет узлов`,noNodesByFilter:`По текущему фильтру узлы не найдены.`,cancel:`Отмена`,alreadyMember:`Уже в активном кластере`,revokedMembership:`Участие отозвано`,addNode:`Подключить узел`,addNodeText:`Подключение существующего физического узла к активному кластеру выполняется из списка узлов: включите общий режим и нажмите «Подключить к активному кластеру».`,joinTokenTitle:`Создать новый Docker-узел`,joinTokenText:`Сначала создается одноразовый install token и Docker install profile. Затем команда запускается на Docker-хосте, агент отправляет заявку, а владелец платформы подтверждает ее.`,ttlHours:`Срок действия, часов`,ttlHelp:`Через это время token станет недействительным, даже если им никто не воспользовался. Для ручного подключения обычно достаточно 1–24 часов.`,maxUses:`Максимум использований`,maxUsesHelp:`Сколько node-agent смогут использовать этот token. Самый безопасный вариант — 1 token на 1 новый узел.`,tokenPurpose:`Назначение token`,nodeOwnership:`Тип владения узлом`,suggestedRoles:`Разрешенные/ожидаемые роли`,generatedScope:`Сгенерированная область действия`,generatedScopeHelp:`JSON формируется автоматически из настроек выше. Оператор не должен писать его руками, чтобы не ошибиться синтаксисом или областью доступа.`,manualApprovalRequired:`Подтверждение заявки вручную обязательно`,nodeRoles:`Роли узла`,desiredServices:`Желаемые сервисы`,observedServices:`Наблюдаемые сервисы`,noRoles:`Ролей пока нет`,noServices:`Сервисов пока нет`,manageInCluster:`Управлять в кластере`,rolesAndServices:`Роли и сервисы`,links:`Связи`,fabricMap:`Карта трафика Fabric`,fabricNodeLayer:`Узлы кластера`,observedPeerLinks:`Наблюдаемые связи`,placementIntent:`управляющее назначение`,endpointName:`Название`,publicEndpoint:`Публичный адрес`,endpointType:`Тип входа`,description:`Описание`,routeScope:`Область маршрутов JSON`,endpointNodes:`Назначенные узлы`,assignEndpointNode:`Назначить узел`,selectNode:`Выберите узел`,assignedNodesEmpty:`Узлы пока не назначены`,addressNotSet:`адрес не задан`,descriptionNotSet:`описание не задано`,servicePlacement:`Размещение сервисов`,trafficFlow:`Потоки между узлами`,organizationTestFlag:`Тестирование организации`,organizationId:`ID организации`,saveOrganizationFlag:`Сохранить флаг организации`,noLinks:`Связей пока нет`,recentHeartbeats:`Последние heartbeat`,memory:`Память`,cpu:`Процессор`,processes:`Процессы`},en:{productOwner:`Product Owner`,controlPlane:`Control API`,sideText:`Full platform-owner panel for clusters, nodes, trust, placement, and safe service desired state.`,signInTitle:`Sign in`,signInText:`Enter your credentials.`,bootstrapTitle:`First owner`,bootstrapText:`An empty installation accepts only a signed product activation.`,activationPayload:`Activation manifest JSON`,activationSignature:`Manifest signature`,createOwner:`Create owner`,creatingOwner:`Creating...`,ownerCreated:`Owner created. You can sign in now.`,installationLocked:`Installation is already active`,insecureBootstrapDisabled:`Insecure bootstrap is disabled. Strict product-key activation is required.`,email:`Login`,password:`Password`,backendApi:`Backend API`,useLocalProxy:`Use local /api/v1 proxy`,language:`Language`,deviceLabel:`Device`,rememberMe:`Remember me`,trustDevice:`Trust this device`,signIn:`Sign in`,signingIn:`Signing in...`,logout:`Logout`,profile:`Profile`,refresh:`Refresh`,refreshing:`Refreshing...`,autoRefresh:`Auto refresh`,lastRefresh:`Data refreshed`,activeCluster:`Active cluster`,slugLabel:`Technical code`,slugHelp:`Slug is a stable short technical identifier for URLs, scripts, logs, and integrations. It should generally not change after creation.`,clusterCatalog:`Cluster catalog`,clusterCatalogText:`Real clusters from the Control/API layer. Select the active cluster or expand a card for details.`,makeActive:`Make active`,openSettings:`Open settings`,selected:`Selected`,createCluster:`Create cluster`,clusterDetails:`Details`,consoleTitle:`Platform Owner Console`,boundary:`WEB is presentation only. The HTTP Control API handles policy, releases, and audit; inter-node Fabric transport remains QUIC/UDP.`,noLoginError:`Sign in as a product owner or platform administrator to load the panel.`,accessDenied:`Access to this panel is denied.`,sessionMode:`Session mode`,sessionModeAdmin:`Admin`,sessionModeUser:`User`,sessionRefreshedAt:`Session refreshed`,emptyLiveTitle:`Cluster has no live nodes yet`,emptyLiveText:`These are real values, not placeholders: the selected cluster has no approved node-agent nodes yet. Create a join token, run rap-node-agent, and approve the join request.`,realDataNote:`Only PostgreSQL and Control/API data is shown. Zero values mean the corresponding nodes, roles, or services do not exist yet.`,signedInAs:`Signed in`,actorUser:`Actor user`,testMode:`Testing`,testModeText:`Enables test telemetry and synthetic link observations. This is not production mesh runtime.`,platformTestFlag:`Server testing`,nodeTelemetry:`Node telemetry`,heartbeatHistory:`Heartbeat history`,noTelemetry:`No telemetry yet`,enableTelemetry:`Enable telemetry`,enableSyntheticLinks:`Enable test links`,saveTestFlag:`Save flag`,nodeManagement:`Node management`,nodeScope:`View scope`,currentClusterNodes:`Active cluster nodes`,allNodes:`All platform nodes`,showAllPlatformNodes:`Show all platform nodes`,currentClusterMembership:`Active cluster membership`,clusterMemberships:`Cluster memberships`,notMemberOfActiveCluster:`not a member`,nodeIdentity:`Physical node identity`,activeClusterScope:`Active cluster scope`,activeClusterScopeText:`One physical node may belong to multiple clusters. Roles and desired services below belong only to the selected active cluster.`,capabilityConfirmed:`capability confirmed by heartbeat`,capabilityMissing:`capability not reported by node`,capabilityUnknown:`capability unconfirmed: no heartbeat`,nodeGlobalInventoryText:`Each physical node is shown once. Membership and roles remain cluster-scoped, so the same node may have different assignments in different clusters.`,nodeSearch:`Node search`,groupNodesBy:`Group by`,groupByMembership:`membership`,groupByHealth:`health`,groupByOwnership:`ownership`,groupByClusterCount:`cluster count`,nodeGroups:`Node groups`,nodeGroupTree:`Group tree`,nodeGroupFilter:`Group filter`,allNodeGroups:`All groups`,nodeGroupCreatePanel:`Create group`,nodeGroupName:`Group name`,parentNodeGroup:`Parent group`,rootNodeGroup:`Root`,ungroupedNodes:`Ungrouped`,createNodeGroup:`Create group`,createSubgroup:`Create subgroup`,collapseGroup:`Collapse`,expandGroup:`Expand`,assignNodeGroup:`Move to group`,removeFromNodeGroup:`Remove from group`,connectExistingNode:`Connect to active cluster`,connectExistingNodeTitle:`Connect existing node`,connectExistingNodeText:`This creates or re-enables membership for one concrete physical node in the active cluster. Roles below are assigned only in this cluster.`,connectWithRoles:`Connect with roles`,nodeDetails:`Details`,manageNode:`Configure`,nodeFunctions:`Node functions`,nodeFunctionsText:`One row controls the whole function: role grants permission in the active cluster, desired service requests runtime start, observed state reports node-agent facts.`,rolePermission:`Permission`,permissionGranted:`granted`,permissionDenied:`not allowed`,organizationScopeForEnable:`Organization scope for new enables, optional`,clusterWideRolePlaceholder:`empty = cluster-wide role`,desiredRuntime:`Desired state`,observedRuntime:`Observed`,enableFunction:`Enable function`,disableFunction:`Disable function`,close:`Close`,nodeBriefList:`Compact node list`,noActiveClusterMembership:`Node is not a member of the active cluster`,nodeBriefListHelp:`The list is grouped as the active cluster tree. Full details, management, roles, services, and statistics open from the node row.`,nodeSearchPlaceholder:`name, key, cluster, status`,nodeGroupInventoryText:`Groups are a cluster inventory structure. Moving a node to a group changes only its placement inside the active cluster, not roles or membership.`,nodeGroupCreated:`Node group created.`,noNodesTitle:`No nodes`,noNodesByFilter:`No nodes match the current filter.`,cancel:`Cancel`,alreadyMember:`Already in active cluster`,revokedMembership:`Membership revoked`,addNode:`Add node`,addNodeText:`Connect an existing physical node to the active cluster from the node list: enable platform-wide view and click “Connect to active cluster”.`,joinTokenTitle:`Create new Docker node`,joinTokenText:`First create a one-time install token and Docker install profile. Then run the generated command on the Docker host; the agent submits a request and the platform owner approves it.`,ttlHours:`Lifetime, hours`,ttlHelp:`After this time the token becomes invalid even if unused. For manual enrollment, 1–24 hours is usually enough.`,maxUses:`Maximum uses`,maxUsesHelp:`How many node-agents may use this token. The safest default is one token for one new node.`,tokenPurpose:`Token purpose`,nodeOwnership:`Node ownership type`,suggestedRoles:`Allowed/expected roles`,generatedScope:`Generated scope`,generatedScopeHelp:`JSON is generated automatically from the settings above. Operators should not hand-write it and risk syntax or access-scope mistakes.`,manualApprovalRequired:`Manual request approval is required`,nodeRoles:`Node roles`,desiredServices:`Desired services`,observedServices:`Observed services`,noRoles:`No roles yet`,noServices:`No services yet`,manageInCluster:`Manage in cluster`,rolesAndServices:`Roles and services`,links:`Links`,fabricMap:`Fabric traffic map`,fabricNodeLayer:`Cluster nodes`,observedPeerLinks:`Observed links`,placementIntent:`control/API placement`,endpointName:`Name`,publicEndpoint:`Public endpoint`,endpointType:`Entry type`,description:`Description`,routeScope:`Route scope JSON`,endpointNodes:`Assigned nodes`,assignEndpointNode:`Assign node`,selectNode:`Select node`,assignedNodesEmpty:`No nodes assigned yet`,addressNotSet:`address not set`,descriptionNotSet:`description not set`,servicePlacement:`Service placement`,trafficFlow:`Node traffic flows`,organizationTestFlag:`Organization testing`,organizationId:`Organization ID`,saveOrganizationFlag:`Save organization flag`,noLinks:`No links yet`,recentHeartbeats:`Recent heartbeats`,memory:`Memory`,cpu:`CPU`,processes:`Processes`}};function fe(e){return{userId:e.user.id||e.user.ID||``,email:e.user.email||e.user.Email||``,authSessionId:e.auth_session.id||e.auth_session.ID||``,accessToken:e.tokens.access_token,refreshToken:e.tokens.refresh_token,accessTokenExpiresAt:e.tokens.access_token_expires_at,refreshTokenExpiresAt:e.tokens.refresh_token_expires_at}}async function pe(e){try{return await e.listClusterSummaries(),`admin`}catch{try{return await Promise.all([e.listOrganizations(),e.listResources()]),`user`}catch{return null}}}function me(){let[e,t]=(0,_.useState)(!1),[n,r]=(0,_.useState)(()=>!!le()),[i]=(0,_.useState)(()=>{let e=localStorage.getItem(D.baseUrl)?.trim();return!e||e.startsWith(re)?ne:e}),[a,o]=(0,_.useState)(()=>le()),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(()=>localStorage.getItem(D.language)===`en`?`en`:`ru`),[p,m]=(0,_.useState)(a?.userId??localStorage.getItem(D.actorUserId)??``),[h,g]=(0,_.useState)({email:``,password:``,deviceLabel:`Панель владельца платформы`,trustDevice:!0,rememberMe:!0,showPassword:!1}),[v,b]=(0,_.useState)(null),[x,S]=(0,_.useState)({email:``,password:``,activationPayload:``,activationSignature:``}),[C,w]=(0,_.useState)(`command`),[T,ee]=(0,_.useState)(``),[te,oe]=(0,_.useState)([]),[se,k]=(0,_.useState)([]),[me,xe]=(0,_.useState)(null),[j,De]=(0,_.useState)([]),[Oe,ke]=(0,_.useState)([]),[Ae,je]=(0,_.useState)({}),[Me,Ne]=(0,_.useState)([]),[Pe,Fe]=(0,_.useState)([]),[Ie,Le]=(0,_.useState)([]),[M,Re]=(0,_.useState)(null),[He,Ue]=(0,_.useState)({}),[We,Ge]=(0,_.useState)({}),[Ke,qe]=(0,_.useState)({}),[Je,Ye]=(0,_.useState)({}),[Xe,Ze]=(0,_.useState)({}),[nt,ot]=(0,_.useState)({}),[st,ct]=(0,_.useState)({}),[ut,_t]=(0,_.useState)({}),[bt,Ct]=(0,_.useState)([]),[P,wt]=(0,_.useState)([]),[Tt,Et]=(0,_.useState)({}),[Pt,Ft]=(0,_.useState)([]),[It,qt]=(0,_.useState)([]),[Jt,Xt]=(0,_.useState)(null),[$t,en]=(0,_.useState)([]),[dn,fn]=(0,_.useState)(null),[pn,mn]=(0,_.useState)(null),[hn,_n]=(0,_.useState)(null),[vn,yn]=(0,_.useState)(null),[bn,xn]=(0,_.useState)(null),[R,Sn]=(0,_.useState)(null),[Cn,wn]=(0,_.useState)([]),[Tn,z]=(0,_.useState)(!1),[En,Dn]=(0,_.useState)(ie),[jn,Mn]=(0,_.useState)(null),[Nn,Ln]=(0,_.useState)(null),[Rn,zn]=(0,_.useState)([]),[Bn,Vn]=(0,_.useState)([]),[Hn,Un]=(0,_.useState)([]),[Wn,Kn]=(0,_.useState)({}),[qn,$n]=(0,_.useState)({}),[ar,or]=(0,_.useState)(()=>localStorage.getItem(D.vpnDiagnosticDeviceId)||``),[sr,cr]=(0,_.useState)([]),[lr,ur]=(0,_.useState)(null),[dr,fr]=(0,_.useState)(`http://2ip.ru/`),[pr,mr]=(0,_.useState)(null),[hr,gr]=(0,_.useState)([]),[_r,vr]=(0,_.useState)([]),[yr,br]=(0,_.useState)([]),[xr,Sr]=(0,_.useState)({}),[Cr,wr]=(0,_.useState)([]),[Tr,Er]=(0,_.useState)(``),[Dr,Or]=(0,_.useState)(``),[kr,Ar]=(0,_.useState)([]),[jr,Mr]=(0,_.useState)(null),[Nr,Pr]=(0,_.useState)(``),[Fr,Ir]=(0,_.useState)(`poll`),[Lr,Rr]=(0,_.useState)(``),[zr,Br]=(0,_.useState)(null),[Vr,Hr]=(0,_.useState)(!1),[Ur,Wr]=(0,_.useState)(``),[Gr,Kr]=(0,_.useState)(``),[qr,Jr]=(0,_.useState)({slug:``,name:``,region:``}),[Yr,Xr]=(0,_.useState)({name:``,status:`active`,region:``,metadataJson:`{}`}),[Zr,Qr]=(0,_.useState)({name:``,parentGroupId:``}),[$r,ei]=(0,_.useState)({hysteresisPenalty:`150`,promotionMinSamples:`64`,demotionFailureThreshold:`1`,demotionDropThreshold:`1`,demotionSlowThreshold:`1`,demotionRebuildEnabled:!0,demotionFencedEnabled:!0}),[ti,ni]=(0,_.useState)({currentWindowSeconds:`1800`,historyWindowSeconds:`86400`}),[U,W]=(0,_.useState)(ue),[ri,ii]=(0,_.useState)(null),[ai,oi]=(0,_.useState)({authorityState:`authoritative`,mutationMode:`normal`,notes:``}),[si,ci]=(0,_.useState)(``),[li,ui]=(0,_.useState)(`cluster`),[di,fi]=(0,_.useState)(``),[pi,mi]=(0,_.useState)(``),[hi,gi]=(0,_.useState)([]),[_i,vi]=(0,_.useState)(`membership`),[yi,bi]=(0,_.useState)(null),[xi,Si]=(0,_.useState)([]),[Ci,wi]=(0,_.useState)(null),[Ti,Ei]=(0,_.useState)(`details`),[Di,Oi]=(0,_.useState)({}),[ki,Ai]=(0,_.useState)({}),[ji,Mi]=(0,_.useState)({}),[Ni,Pi]=(0,_.useState)({}),[Fi,Ii]=(0,_.useState)(``),[Li,Ri]=(0,_.useState)({telemetry:!0,links:!0}),[zi,Bi]=(0,_.useState)({nodeId:``,serviceType:`entry-node`,desiredState:`enabled`,runtimeMode:`container`,version:``,configJson:`{}`,environmentJson:`{}`}),[G,Vi]=(0,_.useState)({organizationId:``,name:``,protocolFamily:`generic`,desiredState:`disabled`,credentialRef:``,targetEndpointJson:`{}`,allowedNodePolicyJson:`{"mode":"explicit","node_ids":[]}`,routingUsageJson:`[]`,routePolicyJson:`{}`,qosPolicyJson:`{}`,placementPolicyJson:`{}`}),[Hi,Ui]=(0,_.useState)({slug:``,name:``}),[Wi,Gi]=(0,_.useState)({email:``,password:``,platformRole:`user`}),[Ki,qi]=(0,_.useState)({organizationId:``,userId:``,roleId:`org_member`}),[Ji,Yi]=(0,_.useState)(null),[Xi,Zi]=(0,_.useState)({username:``,password:``,domain:``}),[Qi,$i]=(0,_.useState)(``),[ea,ta]=(0,_.useState)(``),[K,na]=(0,_.useState)({organizationId:``,name:``,address:``,protocol:`rdp`,routeMode:`vpn_exit`,entryNode:``,exitNode:``,tags:``,username:``,password:``,domain:``}),[ra,ia]=(0,_.useState)(``),[aa,oa]=(0,_.useState)(``),[sa,ca]=(0,_.useState)(``),la=`rap-android-vpn-latest-release.apk`,[ua,da]=(0,_.useState)(la),q=(0,_.useMemo)(()=>new y({baseUrl:i,actorUserId:p}),[i,p]),fa=(0,_.useMemo)(()=>new y({baseUrl:i,actorUserId:``}),[i]),pa=(0,_.useRef)(0),ma=(0,_.useRef)(!1),J=de[d],ha=te.find(e=>e.id===T)||null,ga=se.find(e=>e.cluster_id===T)||null,_a=(0,_.useMemo)(()=>Yn(i),[i]),va=(0,_.useCallback)((e,t)=>{if(!e)return t;let n=e.trim();return n?/^https?:\/\//i.test(n)||n.startsWith(`/`)?n.startsWith(`/`)?n.substring(1):n:n.startsWith(`downloads/`)?n:`downloads/${n.replace(/^\.\/+/,``).replace(/^\/+/,``)}`:t},[]),ya=va(ua,la),ba=sa?va(sa,ya):ya,xa=sa?ba:ya,Sa=`${/^https?:\/\//i.test(xa)?xa:`${_a}/${xa}`}${aa?`?_v=${encodeURIComponent(aa)}`:``}`,Ca=(0,_.useMemo)(()=>Gt(U),[U]),wa=(0,_.useMemo)(()=>ri?Kt(ri.scope,U):U,[ri,U]),Ta=(0,_.useMemo)(()=>{let e=new Map;for(let t of te)for(let n of Ae[t.id]||[]){let r=e.get(n.id);r?(r.memberships.push({cluster:t,node:n}),(n.last_seen_at||``)>(r.node.last_seen_at||``)&&(r.node=n)):e.set(n.id,{node:n,memberships:[{cluster:t,node:n}]})}return Array.from(e.values()).sort((e,t)=>e.node.name.localeCompare(t.node.name))},[Ae,te]);(0,_.useMemo)(()=>kn(Ta,T,di,_i,d),[Ta,_i,di,d,T]);let Ea=(0,_.useMemo)(()=>Object.fromEntries(Ta.map(e=>[e.node.id,e])),[Ta]),Da=(0,_.useMemo)(()=>{let e=di.trim().toLowerCase(),t=pi?new Set([pi,...Ht(pi,Oe)]):null;return Ta.filter(n=>{let r=n.memberships.some(e=>e.cluster.id===T);if(li!==`all`&&!r)return!1;if(t){let e=n.memberships.find(e=>e.cluster.id===T);if(!e?.node.node_group_id||!t.has(e.node.node_group_id))return!1}return!e||An(n,e)})},[Ta,di,pi,Oe,li,T]),Oa=(0,_.useCallback)((e,t=!1)=>{if(e&&t){localStorage.setItem(D.auth,JSON.stringify(e)),localStorage.setItem(D.actorUserId,e.userId),r(!0);return}r(!1),localStorage.removeItem(D.auth),localStorage.removeItem(D.actorUserId)},[]),ka=(0,_.useCallback)(async()=>{try{let e=`${_a}/downloads/rap-android-vpn-build.json?_cb=${Date.now()}`,t=await fetch(e,{cache:`no-store`});if(!t.ok){ia(``),oa(new Date().toISOString()),ca(``),da(la);return}let n=await t.json();ia(n.version?.name||``),oa(n.published?.timestamp_utc||``),ca(n.release_paths?.versioned||``),da(n.published?.path||n.release_paths?.latest||la)}catch{ia(``),oa(new Date().toISOString()),ca(``),da(la)}},[_a]),Aa=(0,_.useMemo)(()=>Ut(Da,Oe,T,J,new Set(hi)),[hi,Oe,T,J,Da]),ja=(0,_.useMemo)(()=>Cr.filter(e=>e.event_type===`legacy_compatibility_removal.blocked`).slice(0,4),[Cr]),Ma=(0,_.useMemo)(()=>Tr?Cr.filter(e=>jt(e,Tr)):Cr,[Cr,Tr]),Na=(0,_.useCallback)((e,t)=>{let n=Ea[e];n&&(w(`nodes`),ui(`all`),mi(``),fi(n.node.name||n.node.node_key),wi(n),Ei(t))},[Ea]),Pa=(0,_.useCallback)(e=>{let t=Ea[e];Er(e),Or(t?.node.name||t?.node.node_key||e),w(`audit`)},[Ea]),Fa=(0,_.useMemo)(()=>kr.slice(0,8),[kr]);(0,_.useEffect)(()=>{if(e)return;t(!0);let n=le();if(n){if(ce(n.refreshTokenExpiresAt)){localStorage.removeItem(D.auth),localStorage.removeItem(D.actorUserId),r(!1);return}(async()=>{try{let e=fe(await fa.refresh({refreshToken:n.refreshToken}));if(!e.userId||!e.authSessionId)throw Error(`Не удалось восстановить сессию.`);let t=await pe(new y({baseUrl:i,actorUserId:e.userId}));if(!t)throw Error(`Доступ к этой панели запрещен.`);m(e.userId),Oa(e,!0),o(e),u(new Date().toISOString()),g(t=>({...t,email:e.email})),c(t)}catch{localStorage.removeItem(D.auth),localStorage.removeItem(D.actorUserId),r(!1),u(``),o(null),m(``),c(null)}})()}},[fa,e,i,Oa]),(0,_.useEffect)(()=>{let e=!1;return fa.getInstallationStatus().then(t=>{e||b(t)}).catch(t=>{e||Wr(t instanceof Error?t.message:`Не удалось загрузить статус установки.`)}),()=>{e=!0}},[fa]),(0,_.useEffect)(()=>{if(!ha){Xr({name:``,status:`active`,region:``,metadataJson:`{}`});return}Xr({name:ha.name,status:ha.status||`active`,region:ha.region||``,metadataJson:JSON.stringify(ha.metadata||{},null,2)})},[ha]),(0,_.useEffect)(()=>{mi(``),Qr({name:``,parentGroupId:``}),gi([])},[T]),(0,_.useEffect)(()=>{bi(null),Si([])},[T]),(0,_.useEffect)(()=>{localStorage.setItem(D.baseUrl,i),localStorage.setItem(D.language,d),a&&localStorage.setItem(`${D.language}.${a.userId}`,d),(!a||!n)&&(localStorage.removeItem(D.auth),localStorage.removeItem(D.actorUserId))},[i,d,n,a]),(0,_.useEffect)(()=>{if(!a)return;let e=localStorage.getItem(`${D.language}.${a.userId}`);(e===`ru`||e===`en`)&&f(e)},[a?.userId]),(0,_.useEffect)(()=>{a&&Ia()},[a?.userId]),(0,_.useEffect)(()=>{if(!a||s!==`admin`||!T)return;let e=!1,t=()=>{e||Vr||ma.current||document.visibilityState===`hidden`||(ma.current=!0,Ra(T).catch(t=>{e||Wr(t instanceof Error?t.message:`Не удалось автообновить данные панели.`)}).finally(()=>{ma.current=!1}))},n=null;typeof window.EventSource==`function`&&(n=new EventSource(q.clusterEventsURL(T)),n.onopen=()=>{e||Ir(`sse`)},n.onerror=()=>{e||Ir(`poll`)},n.addEventListener(`cluster.changed`,t));let r=window.setInterval(t,n?3e4:1e4);return()=>{e=!0,n?.close(),window.clearInterval(r)}},[q,s,Vr,T,a?.userId]);async function Ia(e=T){if(!p.trim()){Wr(J.noLoginError);return}if(s===`user`){await La();return}Hr(!0),Wr(``),Kr(``);try{let[t,n,r,i,a]=await Promise.all([q.listClusters(),q.listClusterSummaries(),q.listOrganizations(),q.listUsers(),q.listResources()]);oe(t),k(n),gr(r),vr(i),br(a),!Lr&&r[0]?.id&&Rr(r[0].id),qi(e=>({...e,organizationId:e.organizationId||r[0]?.id||``})),na(e=>({...e,organizationId:e.organizationId||r[0]?.id||``}));let o=await Promise.all(r.map(async e=>[e.id,await q.listOrganizationMemberships(e.id)]));Sr(Object.fromEntries(o));let s=await Promise.all(t.map(async e=>[e.id,await q.listNodes(e.id)]));je(Object.fromEntries(s));let c=e||t[0]?.id||``;ee(c),c&&await za(c),Pr(new Date().toISOString())}catch(e){Wr(e instanceof Error?e.message:`Неизвестная ошибка панели управления платформой.`)}finally{Hr(!1)}}async function La(){if(!p.trim()){Wr(`Войдите, чтобы загрузить личный кабинет.`);return}Hr(!0),Wr(``),Kr(``);try{await ka();let[e,t]=await Promise.all([q.listOrganizations(),q.listResources()]);gr(e),br(t),!Lr&&e[0]?.id&&Rr(e[0].id);let n=await Promise.all(e.map(async e=>[e.id,await q.listOrganizationMemberships(e.id)]));Sr(Object.fromEntries(n)),Pr(new Date().toISOString())}catch(e){Wr(e instanceof Error?e.message:`Не удалось загрузить личный кабинет.`)}finally{Hr(!1)}}async function Ra(e){if(!p.trim())return;let[t,n,r,i,a]=await Promise.all([q.listClusterSummaries(),q.listNodes(e),q.listOrganizations(),q.listUsers(),q.listResources()]);k(t),gr(r),vr(i),br(a),je(t=>({...t,[e]:n})),await za(e,{preserveEditableForms:!0}),Pr(new Date().toISOString())}async function za(e,t={}){let n=++pa.current,r=Tn?20:10,i=Tn?En.offset:0,a={reporterNodeId:En.reporterNodeId||void 0,routeId:En.routeId||void 0,serviceClass:En.serviceClass||void 0,generation:En.generation||void 0,feedbackSource:En.feedbackSource||void 0,feedbackChannelId:En.feedbackChannelId||void 0,feedbackViolationStatus:En.feedbackViolationStatus||void 0,limit:r,offset:i,enrichment:Tn?`deep`:`summary`},[o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,ee,te,E,ne,re,ie]=await Promise.all([q.listNodes(e),q.listNodeGroups(e),q.listJoinRequests(e),q.listJoinTokens(e),q.listReleaseVersions(e,`rap-node-agent`,`dev`),q.getStaleNodeRiskReport(e),q.getClusterAuthority(e),q.listAudit(e),q.getFabricServiceChannelRebuildInvestigationBreadcrumbs(e,{limit:20}),q.listMeshLinks(e),q.listRouteIntents(e),q.listFabricServiceChannelRouteFeedback(e,{includeExpired:!0}),q.listFabricServiceChannelRouteRebuildAttempts(e,a),q.getFabricServiceChannelRouteRebuildHealthSummary(e,{limit:5}),q.listFabricServiceChannelRouteRebuildAlertSilences(e),q.getFabricServiceChannelReadiness(e,{limit:5}),q.getFabricServiceChannelSchemaStatus(e),q.getFabricServiceChannelRebuildSnapshotMaintenanceHealth(e,{limit:50,minAgeSeconds:60,heartbeatThreshold:2}),q.getFabricServiceChannelLeaseMaintenance(e,{limit:20,includeExpired:!0}),q.getFabricServiceChannelAccessTelemetry(e,{limit:20}),q.listFabricServiceChannelRouteRebuildIncidents(e,{limit:5}),q.getFabricServiceChannelRecoveryPolicy(e),q.getFabricServiceChannelBreadcrumbWindowPolicy(e),q.listQoSPolicies(e),q.listVPNConnections(e),q.listFabricTestingFlags()]);if(n!==pa.current)return;De(o),ke(s),Ne(c),Fe(l),Le(u),Re(d),xe(f),t.preserveEditableForms||oi({authorityState:f.authority_state,mutationMode:f.mutation_mode,notes:f.notes||``}),wr(p),Ar(m.events),Mr(m.summary||null),Ct(h),wt(g),Ft(_),qt(v),Xt(y),en(b),fn(x),mn(S),_n(C),xn(w),Sn(T),wn(ee),Mn(te),Ln(E),t.preserveEditableForms||ni({currentWindowSeconds:String(E.current_window_seconds||1800),historyWindowSeconds:String(E.history_window_seconds||86400)}),ei({hysteresisPenalty:String(te.hysteresis_penalty),promotionMinSamples:String(te.promotion_min_samples),demotionFailureThreshold:String(te.demotion_failure_threshold),demotionDropThreshold:String(te.demotion_drop_threshold),demotionSlowThreshold:String(te.demotion_slow_threshold),demotionRebuildEnabled:te.demotion_rebuild_enabled,demotionFencedEnabled:te.demotion_fenced_enabled}),zn(ne),Un(re),Vn(ie);let ae=await q.listVPNClientDiagnosticStatuses(e);if(n!==pa.current)return;cr(ae);let oe=ae.find(e=>e.device_id===ar.trim())||ae[0]||null;ur(oe),!ar.trim()&&oe&&(or(oe.device_id),localStorage.setItem(D.vpnDiagnosticDeviceId,oe.device_id));let se=await Promise.all(o.map(async t=>[t.id,await q.listNodeRoles(e,t.id)]));if(n!==pa.current)return;Ye(Object.fromEntries(se));let O=await Promise.all(o.map(async t=>[t.id,await q.listDesiredWorkloads(e,t.id)]));if(n!==pa.current)return;Ze(Object.fromEntries(O));let k=await Promise.all(o.map(async t=>[t.id,await q.listWorkloadStatuses(e,t.id)]));if(n!==pa.current)return;ot(Object.fromEntries(k));let ce=await Promise.all(o.map(async t=>[t.id,await q.listNodeHeartbeats(e,t.id,60)]));if(n!==pa.current)return;ct(Object.fromEntries(ce));let le=d.nodes.filter(e=>e.recovery_bridge_replay_ready).map(e=>e.node_id);if(le.length>0){let t=await Promise.all(le.map(async t=>[t,await q.getNodeBridgeReplayPlan(e,t)]));if(n!==pa.current)return;Ue(Object.fromEntries(t))}else Ue({});let ue=await Promise.all(o.map(async t=>[t.id,await q.getNodeUpdatePlan(e,t.id,{currentVersion:t.reported_version})]));if(n!==pa.current)return;Ge(Object.fromEntries(ue));let de=await Promise.all(o.map(async t=>[t.id,await q.listNodeUpdateStatuses(e,t.id,80)]));if(n!==pa.current)return;qe(Object.fromEntries(de));let fe=await Promise.all(o.map(async t=>[t.id,await q.listNodeTelemetry(e,t.id,120)]));if(n!==pa.current)return;_t(Object.fromEntries(fe));let pe=await Promise.all(o.map(async t=>[t.id,await q.getNodeSyntheticMeshConfig(e,t.id)]));if(n!==pa.current)return;Et(Object.fromEntries(pe));let me=await Promise.all(re.map(async t=>[t.id,await q.getActiveVPNLease(e,t.id)]));if(n!==pa.current)return;Kn(Object.fromEntries(me));let he=await Promise.all(re.map(async t=>[t.id,await q.getVPNPacketStats(e,t.id)]));n===pa.current&&$n(Object.fromEntries(he))}async function Ba(e=Tn,t=En){if(T){Hr(!0),Wr(``),Kr(``);try{let n=await q.listFabricServiceChannelRouteRebuildAttempts(T,{reporterNodeId:t.reporterNodeId||void 0,routeId:t.routeId||void 0,serviceClass:t.serviceClass||void 0,generation:t.generation||void 0,feedbackSource:t.feedbackSource||void 0,feedbackChannelId:t.feedbackChannelId||void 0,feedbackViolationStatus:t.feedbackViolationStatus||void 0,limit:e?20:10,offset:e?t.offset:0,enrichment:e?`deep`:`summary`});z(e),Dn(t),qt(n),Kr(e?`Deep rebuild ledger loaded.`:`Fast rebuild ledger loaded.`)}catch(e){Wr(e instanceof Error?e.message:`Не удалось загрузить rebuild ledger.`)}finally{Hr(!1)}}}async function Va(){if(!T)return;let[e,t,n,r,i,a,o,s,c,l]=await Promise.all([q.getFabricServiceChannelRouteRebuildHealthSummary(T,{limit:5}),q.listFabricServiceChannelRouteRebuildAlertSilences(T),q.getFabricServiceChannelReadiness(T,{limit:5}),q.getFabricServiceChannelSchemaStatus(T),q.getFabricServiceChannelRebuildSnapshotMaintenanceHealth(T,{limit:50,minAgeSeconds:60,heartbeatThreshold:2}),q.getFabricServiceChannelLeaseMaintenance(T,{limit:20,includeExpired:!0}),q.getFabricServiceChannelAccessTelemetry(T,{limit:20}),q.listFabricServiceChannelRouteRebuildIncidents(T,{limit:5}),q.getFabricServiceChannelRebuildInvestigationBreadcrumbs(T,{limit:20}),q.getFabricServiceChannelBreadcrumbWindowPolicy(T)]);Xt(e),en(t),fn(n),mn(r),_n(i),xn(a),Sn(o),wn(s),Ar(c.events),Mr(c.summary||null),Ln(l),ni({currentWindowSeconds:String(l.current_window_seconds||1800),historyWindowSeconds:String(l.history_window_seconds||86400)})}async function Ha(){if(T)try{Hr(!0);let e=await q.warmupFabricServiceChannelRebuildSnapshots(T,{limit:10,staleAfterSeconds:60});yn(e),await Va(),Kr(`Snapshot warmup: warmed ${e.warmed_count}, fresh ${e.already_fresh_count}, errors ${e.error_count}.`)}catch(e){Wr(e instanceof Error?e.message:`Не удалось прогреть rebuild snapshots.`)}finally{Hr(!1)}}async function Ua(){if(T)try{Hr(!0);let e=await q.cleanupFabricServiceChannelLeases(T,{limit:100});xn(e),Kr(`Service-channel lease cleanup: deleted ${e.deleted_expired_count||0}, active ${e.active_count}, expired ${e.expired_count}.`)}catch(e){Wr(e instanceof Error?e.message:`Не удалось очистить service-channel leases.`)}finally{Hr(!1)}}async function Wa(e){let t={reporterNodeId:e.reporter_node_id,routeId:e.route_id,serviceClass:e.service_class,generation:e.generation||``,feedbackSource:``,feedbackChannelId:e.channel_id||``,feedbackViolationStatus:``,offset:0};await q.recordFabricServiceChannelRouteRebuildInvestigation(T,{reporterNodeId:e.reporter_node_id,routeId:e.route_id,serviceClass:e.service_class,generation:e.generation||``,guardStatus:e.guard_status,incidentId:e.fingerprint});let n=await q.getFabricServiceChannelRebuildInvestigationBreadcrumbs(T,{limit:20});Ar(n.events),Mr(n.summary||null),Dn(t),await Ba(!0,t)}function Ga(e){let t=new Set(e.affected_reporter_node_ids||[]),n=new Set(e.affected_route_ids||[]);return Cn.filter(r=>{let i=!e.feedback_channel_id||r.channel_id===e.feedback_channel_id,a=t.size===0||t.has(r.reporter_node_id),o=n.size===0||n.has(r.route_id);return i&&a&&o})}function Ka(e){let t=F(e.payload)||{},n=I(t,`feedback_source`,``),r=I(t,`feedback_channel_id`,``),i=I(t,`feedback_violation_status`,``),a=I(t,`reporter_node_id`,``),o=I(t,`route_id`,``);return!n&&!r&&!i?null:(Jt?.feedback_breakdowns||[]).find(e=>!(n&&e.feedback_source!==n||r&&e.feedback_channel_id!==r||i&&e.feedback_violation_status!==i||a&&!(e.affected_reporter_node_ids||[]).includes(a)||o&&!(e.affected_route_ids||[]).includes(o)))||null}function qa(e){let t=F(e.payload)||{},n=I(t,`reporter_node_id`,``),r=I(t,`route_id`,e.target_type===`fabric_service_channel_route_rebuild_incident`&&e.target_id||``),i=I(t,`service_class`,``),a=I(t,`generation`,``),o=I(t,`guard_status`,``);return Cn.find(e=>n&&e.reporter_node_id!==n||r&&e.route_id!==r||i&&e.service_class!==i||a&&e.generation!==a||o&&e.guard_status!==o?!1:!!(n||r||i||a||o))||null}async function Ja(e){let t={...ie,feedbackSource:e.feedback_source||``,feedbackChannelId:e.feedback_channel_id||``,feedbackViolationStatus:e.feedback_violation_status||``,offset:0};await q.recordFabricServiceChannelRouteRebuildInvestigation(T,{reporterNodeId:(e.affected_reporter_node_ids||[])[0]||``,routeId:(e.affected_route_ids||[])[0]||``,feedbackSource:e.feedback_source||``,feedbackChannelId:e.feedback_channel_id||``,feedbackViolationStatus:e.feedback_violation_status||``,drilldownSource:`rebuild_health_feedback_breakdown`,reason:`operator opened rebuild-health feedback breakdown ledger`});let n=await q.getFabricServiceChannelRebuildInvestigationBreadcrumbs(T,{limit:20});Ar(n.events),Mr(n.summary||null),w(`fabric`),Dn(t),await Ba(!0,t)}async function Ya(e){await q.silenceFabricServiceChannelRouteRebuildAlert(T,{incidentSource:e.incident_source||``,channelId:e.channel_id||``,reporterNodeId:e.reporter_node_id,routeId:e.route_id,guardStatus:e.guard_status||`unknown`,generation:e.generation||``,reason:`operator acknowledged rebuild incident`,ttlSeconds:21600}),await Va()}async function Xa(e){await q.unsilenceFabricServiceChannelRouteRebuildAlert(T,e.id,`operator removed rebuild alert silence`),await Va()}function Za(){De([]),ke([]),Ne([]),Fe([]),Le([]),Re(null),Ue({}),Ge({}),xe(null),Ye({}),Ze({}),ot({}),ct({}),qe({}),_t({}),Ct([]),wt([]),Et({}),Ft([]),qt([]),Xt(null),en([]),fn(null),mn(null),yn(null),wn([]),z(!1),Dn(ie),zn([]),Vn([]),Un([]),Kn({}),$n({}),cr([]),ur(null),gr([]),vr([]),br([]),Sr({}),wr([]),Ar([]),Mr(null)}async function Y(e,t){Hr(!0),Wr(``),Kr(``);try{await e(),Kr(t),await Ia()}catch(e){Wr(e instanceof Error?e.message:`Действие не выполнено.`)}finally{Hr(!1)}}async function Qa(){if(!T||!M||M.summary.blocked_nodes<1){$i(`Guard smoke сейчас недоступен: в отчете нет blocker-узлов для controlled blocked-check.`),ta(new Date().toISOString());return}Hr(!0),Wr(``),Kr(``),$i(``);try{let e=`0.2.402-guard-smoke-${Date.now()}`;await q.createReleaseVersion(T,{product:`rap-node-agent`,version:e,channel:`stable`,status:`active`,compatibility:{legacy_removal:!0},changelog:`UI smoke check for legacy removal guard`,artifacts:[{os:`linux`,arch:`amd64`,installType:`docker`,kind:`image`,url:`https://example.test/rap-node-agent.tar`,sha256:`sha256-guard-smoke`,sizeBytes:123,metadata:{}}]}),$i(`Smoke unexpectedly succeeded. Guard should have blocked breaking release creation while stale recovery-risk nodes remain.`)}catch(e){$i(e instanceof Error?e.message:`Guard smoke failed with a non-Error response.`)}finally{ta(new Date().toISOString()),Hr(!1)}}async function $a(){if(!T){ur(null);return}let e=await q.listVPNClientDiagnosticStatuses(T);cr(e);let t=ar.trim()||e[0]?.device_id||``;t&&(localStorage.setItem(D.vpnDiagnosticDeviceId,t),or(t));let n=e.find(e=>e.device_id===t)||(t?await q.getVPNClientDiagnosticStatus(T,t):null);ur(n),Kr(n?`Диагностика VPN-клиента обновлена.`:`Диагностика VPN-клиента не найдена.`)}async function eo(e,t){if(!T){Wr(`Выбери кластер перед отправкой команды.`);return}let n=ar.trim();if(!n){Wr(`Укажи Android device id или выбери найденный клиент.`);return}Hr(!0),Wr(``),Kr(``);try{mr(await q.enqueueVPNClientDiagnosticCommand(T,n,e)),Kr(`${t}: команда поставлена в очередь. Клиент заберет ее через диагностический канал.`),window.setTimeout(()=>{$a()},3500)}catch(e){Wr(e instanceof Error?e.message:`Команда VPN-клиенту не отправлена.`)}finally{Hr(!1)}}async function to(){Hr(!0),Wr(``),Kr(``);try{let e=fe(await fa.login({email:h.email,password:h.password,deviceLabel:h.deviceLabel,trustDevice:h.trustDevice}));if(!e.userId||!e.authSessionId)throw Error(`Ответ входа не содержит пользователя или сессию.`);let t=new y({baseUrl:i,actorUserId:e.userId}),n=`admin`;try{await t.listClusterSummaries(),n=`admin`}catch{try{let[e,r]=await Promise.all([t.listOrganizations(),t.listResources()]);gr(e),br(r),e[0]?.id&&Rr(e[0].id);let i=await Promise.all(e.map(async e=>[e.id,await t.listOrganizationMemberships(e.id)]));Sr(Object.fromEntries(i)),n=`user`}catch{try{await fa.revokeAuthSession({userId:e.userId,authSessionId:e.authSessionId,reason:`user_portal_access_denied`})}catch{}throw Error(J.accessDenied)}}r(h.rememberMe),Oa(e,h.rememberMe),o(e),m(e.userId),g(t=>({...t,email:e.email,password:``})),u(new Date().toISOString()),c(n),Kr(`${J.signedInAs}: ${e.email}`)}catch(e){Wr(e instanceof Error?e.message:`Вход не выполнен.`)}finally{Hr(!1)}}async function no(){Hr(!0),Wr(``),Kr(``);try{let e;if(v?.strict_authority){if(!x.activationPayload.trim()||!x.activationSignature.trim())throw Error(J.bootstrapText);e=JSON.parse(x.activationPayload)}b((await fa.bootstrapOwner({email:x.email,password:x.password,activationPayload:e,activationSignature:x.activationSignature})).installation),g({...h,email:x.email,password:x.password}),Kr(J.ownerCreated)}catch(e){Wr(e instanceof Error?e.message:`Создание владельца не выполнено.`)}finally{Hr(!1)}}async function X(){let e=a;if(o(null),r(!1),u(``),Oa(null),c(null),m(``),oe([]),k([]),Za(),je({}),ee(``),e?.userId&&e.authSessionId)try{await fa.revokeAuthSession({userId:e.userId,authSessionId:e.authSessionId,reason:`platform_owner_console_logout`})}catch{}}async function ro(e){ee(e),Za(),Hr(!0),Wr(``),Kr(``);try{await za(e)}catch(e){Wr(e instanceof Error?e.message:`Не удалось загрузить кластер.`)}finally{Hr(!1)}}let io=Me.filter(e=>e.status===`pending`).length,ao=j.filter(e=>e.health_status===`healthy`).length,oo=j.filter(e=>e.health_status!==`healthy`||e.membership_status!==`active`).length,so=Object.values(Je).flat().filter(e=>e.status===`active`).length,co=Bn.find(e=>e.scope_type===`platform`&&!e.scope_id)||null;Bn.find(e=>e.scope_type===`organization`&&e.scope_id===Fi&&(!e.cluster_id||e.cluster_id===T));let lo=Object.values(Tt),uo=lo.filter(e=>e.enabled).length,fo=lo.reduce((e,t)=>e+t.routes.length,0),po=lo.reduce((e,t)=>e+Object.keys(t.peer_endpoints||{}).length,0),mo=lo.reduce((e,t)=>e+Lt(t),0);lo.reduce((e,t)=>e+(t.peer_directory?.length??0),0),lo.reduce((e,t)=>e+(t.recovery_seeds?.length??0),0);let ho=lo.filter(e=>e.production_forwarding).length,go=Be(j,st),_o=P.filter(e=>pt(e)===`active`),vo=P.filter(e=>pt(e)===`expired`),yo=P.filter(e=>pt(e)===`disabled`),bo=Pt.filter(e=>{let t=Date.parse(e.expires_at||``),n=Date.parse(e.retry_cooldown_until||``);return Number.isFinite(t)&&t>Date.now()||Number.isFinite(n)&&n>Date.now()}),xo=bo.filter(e=>e.feedback_status===`fenced`),So=bo.filter(e=>e.feedback_status===`degraded`),Co=bo.filter(e=>e.feedback_status===`healthy`),wo=bo.filter(e=>e.recovery_state===`recovered`||e.recovery_hysteresis_active),To=bo.filter(e=>e.recovery_promoted),Eo=bo.filter(e=>e.recovery_demoted),Do=bo.filter(e=>e.feedback_status===`operator_retry_cooldown`||e.retry_cooldown_until),Oo=lo.flatMap(e=>e.route_path_decisions?.decisions||[]),ko=Oo.filter(e=>e.decision_source===`service_channel_feedback_no_alternate`),Ao=Oo.filter(e=>e.decision_source===`service_channel_feedback_replacement`),jo=Oo.filter(e=>e.rebuild_status),Mo=jo.filter(e=>e.rebuild_status===`applied`),No=It.filter(e=>e.rebuild_status===`applied`),Po=It.filter(e=>e.rebuild_status&&e.rebuild_status!==`applied`),Fo=It.filter(e=>e.guard_severity===`bad`),Io=Oo.filter(e=>(e.score_reasons||[]).includes(`service_channel_recovery_hysteresis`)),Lo=Oo.filter(e=>(e.score_reasons||[]).includes(`service_channel_recovery_promoted`)),Ro=Oo.filter(e=>(e.score_reasons||[]).includes(`service_channel_recovery_demoted`)),zo=v?.bootstrapped===!1,Bo=zo&&!v?.strict_authority&&!v?.insecure_bootstrap_allowed,Vo=s===`admin`?J.sessionModeAdmin:J.sessionModeUser;if(!a)return(0,E.jsxs)(`main`,{className:`loginShell`,children:[v&&(0,E.jsxs)(`section`,{className:`loginCard`,children:[(0,E.jsx)(`h1`,{children:v.bootstrapped?J.installationLocked:J.bootstrapTitle}),(0,E.jsx)(A,{label:`Authority`,value:`${v.authority_mode}/${v.authority_state}`}),(0,E.jsx)(A,{label:`Strict`,value:v.strict_authority?`enabled`:`legacy`}),v.root_fingerprint&&(0,E.jsx)(A,{label:`Root key`,value:B(v.root_fingerprint)})]}),zo?(0,E.jsxs)(`section`,{className:`loginCard`,children:[(0,E.jsx)(`h1`,{children:J.bootstrapTitle}),(0,E.jsx)(`p`,{className:`loginHint`,children:Bo?J.insecureBootstrapDisabled:J.bootstrapText}),(0,E.jsxs)(`label`,{children:[J.email,(0,E.jsx)(`input`,{value:x.email,onChange:e=>S({...x,email:e.target.value}),autoComplete:`username`})]}),(0,E.jsxs)(`label`,{children:[J.password,(0,E.jsx)(`input`,{value:x.password,onChange:e=>S({...x,password:e.target.value}),type:`password`,autoComplete:`new-password`})]}),v?.strict_authority&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`label`,{children:[J.activationPayload,(0,E.jsx)(`textarea`,{value:x.activationPayload,onChange:e=>S({...x,activationPayload:e.target.value}),spellCheck:!1})]}),(0,E.jsxs)(`label`,{children:[J.activationSignature,(0,E.jsx)(`input`,{value:x.activationSignature,onChange:e=>S({...x,activationSignature:e.target.value}),spellCheck:!1})]})]}),Ur&&(0,E.jsx)(`div`,{className:`errorPanel`,children:Ur}),Gr&&(0,E.jsx)(`div`,{className:`noticePanel`,children:Gr}),(0,E.jsx)(`button`,{className:`primary wide`,onClick:()=>void no(),disabled:Vr||Bo||!x.email||x.password.length<12||v?.strict_authority&&(!x.activationPayload||!x.activationSignature),children:Vr?J.creatingOwner:J.createOwner})]}):(0,E.jsxs)(`section`,{className:`loginCard`,children:[(0,E.jsx)(`h1`,{children:J.signInTitle}),(0,E.jsxs)(`label`,{children:[J.email,(0,E.jsx)(`input`,{value:h.email,onChange:e=>g({...h,email:e.target.value.trim()}),autoComplete:`username`,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1})]}),(0,E.jsxs)(`label`,{children:[J.password,(0,E.jsx)(`input`,{value:h.password,onChange:e=>g({...h,password:e.target.value}),type:h.showPassword?`text`:`password`,autoComplete:`current-password`,autoCapitalize:`none`,autoCorrect:`off`,spellCheck:!1,onKeyDown:e=>{e.key===`Enter`&&to()}})]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:h.showPassword,onChange:e=>g({...h,showPassword:e.target.checked})}),`Показать пароль`]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:h.trustDevice,onChange:e=>g({...h,trustDevice:e.target.checked})}),J.trustDevice]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:h.rememberMe,onChange:e=>g({...h,rememberMe:e.target.checked})}),J.rememberMe]}),Ur&&(0,E.jsx)(`div`,{className:`errorPanel`,children:Ur}),Gr&&(0,E.jsx)(`div`,{className:`noticePanel`,children:Gr}),(0,E.jsx)(`button`,{className:`primary wide`,onClick:()=>void to(),disabled:Vr||!h.email||!h.password,children:Vr?J.signingIn:J.signIn})]})]});if(a&&!s)return(0,E.jsx)(`main`,{className:`loginShell`,children:(0,E.jsx)(`section`,{className:`loginCard`,children:(0,E.jsx)(`p`,{children:Vr?J.lastRefresh:`Восстанавливаем сессию...`})})});if(s===`user`){let e=hr.find(e=>e.id===Lr)||hr[0]||null,t=e?yr.filter(t=>t.organization_id===e.id):yr,n=e?(xr[e.id]||[]).find(e=>e.user_id===a.userId):null,r=t.reduce((e,t)=>(e[t.protocol]=(e[t.protocol]||0)+1,e),{});return(0,E.jsxs)(`main`,{className:`portalShell`,children:[(0,E.jsxs)(`aside`,{className:`portalRail`,children:[(0,E.jsx)(`div`,{className:`brandMark`,children:`RAP`}),(0,E.jsx)(`p`,{className:`sideKicker`,children:`Личный кабинет`}),(0,E.jsx)(`h1`,{children:`Мой доступ`}),(0,E.jsx)(`p`,{className:`sideText`,children:`Установки, доступные серверы и состояние рабочей области пользователя.`}),(0,E.jsx)(A,{label:J.sessionMode,value:`${Vo} • ${l?Qn(l):`н/д`}`}),(0,E.jsx)(A,{label:J.actorUser,value:a.email}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void X(),disabled:Vr,children:J.logout})]}),(0,E.jsxs)(`section`,{className:`portalWorkspace`,children:[(0,E.jsxs)(`header`,{className:`portalTop`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`eyebrow`,children:`Secure Access Fabric`}),(0,E.jsx)(`h2`,{children:e?.name||`Личный кабинет`}),(0,E.jsx)(`p`,{className:`muted`,children:a.email})]}),(0,E.jsxs)(`label`,{children:[`Организация`,(0,E.jsx)(`select`,{value:e?.id||``,onChange:e=>Rr(e.target.value),children:hr.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),(0,E.jsx)(`button`,{className:`primary`,onClick:()=>void La(),disabled:Vr,children:Vr?J.refreshing:J.refresh})]}),Ur&&(0,E.jsx)(`div`,{className:`errorPanel`,children:Ur}),Gr&&(0,E.jsx)(`div`,{className:`noticePanel`,children:Gr}),(0,E.jsxs)(`section`,{className:`grid three`,children:[(0,E.jsx)(he,{label:`Организации`,value:hr.length,tone:`steel`}),(0,E.jsx)(he,{label:`Серверы`,value:t.length,tone:`green`}),(0,E.jsx)(he,{label:`Установки`,value:2,tone:`amber`})]}),(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Установки`}),(0,E.jsx)(`p`,{className:`muted`,children:ra?`Актуальная версия Android: ${ra}`:`Скачивайте актуальные клиенты только отсюда, чтобы не ловить старую сборку.`})]}),(0,E.jsx)(`span`,{className:`status active`,children:`latest`})]}),(0,E.jsxs)(`div`,{className:`portalInstallList`,children:[(0,E.jsxs)(`a`,{className:`installTile primaryInstall`,href:Sa,children:[(0,E.jsx)(`strong`,{children:`Android VPN`}),(0,E.jsx)(`span`,{children:`Последняя сборка RAP HOME VPN для телефона`}),(0,E.jsx)(`small`,{children:sa||xa})]}),(0,E.jsxs)(`a`,{className:`installTile`,href:`${_a}/downloads/rap-windows-rdp-client-latest-win-x64.zip`,children:[(0,E.jsx)(`strong`,{children:`Windows RDP клиент`}),(0,E.jsx)(`span`,{children:`Клиент удаленного рабочего стола, когда нужен доступ к серверам`}),(0,E.jsx)(`small`,{children:`latest win-x64`})]})]})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Профиль`}),(0,E.jsx)(A,{label:`Пользователь`,value:a.email}),(0,E.jsx)(A,{label:`Роль в организации`,value:n?.role_id||`участник`}),(0,E.jsx)(A,{label:`Организация`,value:e?.name||`нет`}),(0,E.jsx)(A,{label:`Последнее обновление`,value:Nr?V(Nr):`нет`})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsx)(`div`,{className:`cardHead`,children:(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Доступные серверы`}),(0,E.jsx)(`p`,{className:`muted`,children:`Список ресурсов, которые уже разрешены пользователю через организацию.`})]})}),(0,E.jsx)(N,{columns:[`имя`,`адрес`,`протокол`,`секрет`,`передача файлов`],rows:t.map(e=>[e.name,e.address,e.protocol,e.has_secret?`настроен`:`нет`,H(e.file_transfer_mode||`disabled`)])})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Сервисы`}),(0,E.jsx)(N,{columns:[`тип`,`количество`],rows:Object.entries(r).map(([e,t])=>[e,String(t)])})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Что здесь будет дальше`}),(0,E.jsxs)(`div`,{className:`portalRoadmap`,children:[(0,E.jsx)(`span`,{children:`Устройства и доверенные входы`}),(0,E.jsx)(`span`,{children:`Активные VPN-сессии`}),(0,E.jsx)(`span`,{children:`Обновление профиля VPN без ручных ключей`}),(0,E.jsx)(`span`,{children:`Самостоятельная смена пароля`})]})]})]})]})]})}return(0,E.jsxs)(`main`,{className:`consoleShell`,children:[(0,E.jsxs)(`aside`,{className:`sideRail`,children:[(0,E.jsx)(`div`,{className:`brandMark`,children:`SAF`}),(0,E.jsx)(`p`,{className:`sideKicker`,children:J.productOwner}),(0,E.jsx)(`h1`,{children:J.controlPlane}),(0,E.jsx)(`p`,{className:`sideText`,children:J.sideText}),(0,E.jsx)(`nav`,{className:`railNav`,children:O.filter(e=>e.id!==`roles`).map(e=>(0,E.jsx)(`button`,{className:C===e.id?`active`:``,onClick:()=>w(e.id),children:e[d]},e.id))})]}),(0,E.jsxs)(`section`,{className:`workspace`,children:[(0,E.jsxs)(`header`,{className:`topBar`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`eyebrow`,children:`Secure Access Fabric`}),(0,E.jsx)(`h2`,{children:ha?ha.name:J.consoleTitle}),(0,E.jsx)(`p`,{className:`muted`,children:J.boundary})]}),(0,E.jsxs)(`div`,{className:`clusterPicker`,children:[(0,E.jsxs)(`label`,{children:[J.activeCluster,(0,E.jsx)(`select`,{value:T,onChange:e=>void ro(e.target.value),children:te.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),(0,E.jsxs)(`span`,{children:[J.slugLabel,`: `,ha?.slug||`н/д`]})]}),(0,E.jsx)(`button`,{className:`primary`,onClick:()=>void Ia(),disabled:Vr,children:Vr?J.refreshing:J.refresh}),(0,E.jsxs)(`div`,{className:`refreshStatus`,children:[(0,E.jsx)(`strong`,{children:J.autoRefresh}),(0,E.jsx)(`span`,{children:Nr?`${J.lastRefresh}: ${Qn(Nr)} / ${Fr.toUpperCase()}`:Fr.toUpperCase()})]}),(0,E.jsxs)(`div`,{className:`profilePanel`,children:[(0,E.jsx)(`strong`,{children:J.profile}),(0,E.jsx)(`span`,{children:a.email}),(0,E.jsxs)(`span`,{children:[J.sessionMode,`: `,Vo,` | `,J.sessionRefreshedAt,`: `,l?Qn(l):`н/д`]}),(0,E.jsxs)(`label`,{children:[J.language,(0,E.jsxs)(`select`,{value:d,onChange:e=>f(e.target.value),children:[(0,E.jsx)(`option`,{value:`ru`,children:`Русский`}),(0,E.jsx)(`option`,{value:`en`,children:d===`ru`?`Английский`:`English`})]})]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void X(),disabled:Vr,children:J.logout})]})]}),Ur&&(0,E.jsx)(`div`,{className:`errorPanel`,children:Ur}),Gr&&(0,E.jsx)(`div`,{className:`noticePanel`,children:Gr}),ha&&j.length===0&&(0,E.jsxs)(`div`,{className:`noticePanel`,children:[(0,E.jsxs)(`strong`,{children:[J.emptyLiveTitle,`.`]}),` `,J.emptyLiveText]}),C===`command`&&(0,E.jsxs)(`section`,{className:`grid five`,children:[(0,E.jsx)(he,{label:`Кластеры`,value:te.length,tone:`steel`}),(0,E.jsx)(he,{label:`Узлы в области`,value:j.length,tone:`green`}),(0,E.jsx)(he,{label:`Здоровые узлы`,value:ao,tone:`green`}),(0,E.jsx)(he,{label:`Ожидают подключения`,value:io,tone:`amber`}),(0,E.jsx)(he,{label:`Рискованные состояния`,value:oo,tone:`red`}),(0,E.jsxs)(`article`,{className:`card span3`,children:[(0,E.jsx)(`h3`,{children:`Общее состояние кластеров`}),(0,E.jsx)(N,{columns:[`кластер`,`authority`,`ключ`,`режим изменений`,`узлы`,`заявки`,`роли`,`последний сигнал`],rows:se.map(e=>[e.name,e.authority_state,B(e.cluster_key_fingerprint),e.mutation_mode,`${e.healthy_node_count}/${e.node_count}`,String(e.pending_join_count),String(e.active_role_assignment_count),V(e.last_node_seen_at)])})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsx)(`h3`,{children:`Authority выбранного кластера`}),me?(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Authority`,value:me.authority_state}),(0,E.jsx)(A,{label:`Режим изменений`,value:me.mutation_mode}),(0,E.jsx)(A,{label:`Терм`,value:String(me.term)}),(0,E.jsx)(A,{label:`Cluster key`,value:B(ga?.cluster_key_fingerprint)}),(0,E.jsx)(A,{label:`Обновлено`,value:V(me.updated_at)})]}):(0,E.jsx)(ye,{title:`Нет состояния authority`,text:`Выберите кластер, чтобы загрузить состояние authority.`})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsx)(`h3`,{children:`Граница платформы`}),(0,E.jsx)(`p`,{className:`muted`,children:`Эта панель предназначена для владельца продукта / владельца платформы. Панели организаций должны использовать безопасные проекции и не раскрывать mesh internals, peer cache, route cache, секреты или данные других tenants.`})]}),(0,E.jsxs)(`article`,{className:`card span3`,children:[(0,E.jsx)(`h3`,{children:`Текущие сигналы кластера`}),(0,E.jsxs)(`div`,{className:`signalStrip`,children:[(0,E.jsx)(ge,{label:`Активные роли`,value:String(so)}),(0,E.jsx)(ge,{label:`Отчеты сервисов`,value:String(Object.values(nt).filter(e=>e.length>0).length)}),(0,E.jsx)(ge,{label:`Наблюдения связей`,value:String(bt.length)}),(0,E.jsx)(ge,{label:`Synthetic configs`,value:`${uo}/${j.length}`})]})]})]}),C===`clusters`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:J.clusterCatalog}),(0,E.jsx)(`p`,{className:`muted`,children:J.clusterCatalogText})]}),(0,E.jsx)(`span`,{className:`pill`,children:Gn(te.length,d)})]}),(0,E.jsxs)(`div`,{className:`clusterCatalog`,children:[te.map(e=>{let t=se.find(t=>t.cluster_id===e.id),n=e.id===T;return(0,E.jsxs)(`article`,{className:`clusterCard ${n?`selected`:``}`,children:[(0,E.jsxs)(`div`,{className:`clusterCardMain`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`eyebrow`,children:e.region||`регион не задан`}),(0,E.jsx)(`h4`,{children:e.name}),(0,E.jsxs)(`p`,{className:`muted`,children:[J.slugLabel,`: `,(0,E.jsx)(`strong`,{children:e.slug})]})]}),(0,E.jsxs)(`div`,{className:`clusterCardActions`,children:[(0,E.jsx)(_e,{value:e.status}),n?(0,E.jsx)(`span`,{className:`pill good`,children:J.selected}):(0,E.jsx)(`button`,{onClick:()=>void ro(e.id),children:J.makeActive}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{ro(e.id),w(`cluster-settings`)},children:J.openSettings})]})]}),(0,E.jsxs)(`div`,{className:`signalStrip compact`,children:[(0,E.jsx)(ge,{label:`Узлы`,value:t?`${t.healthy_node_count}/${t.node_count}`:`н/д`}),(0,E.jsx)(ge,{label:`Заявки`,value:String(t?.pending_join_count??`н/д`)}),(0,E.jsx)(ge,{label:`Роли`,value:String(t?.active_role_assignment_count??`н/д`)}),(0,E.jsx)(ge,{label:`Последний сигнал`,value:V(t?.last_node_seen_at)})]}),(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:J.clusterDetails}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`ID`,value:e.id}),(0,E.jsx)(A,{label:J.slugLabel,value:e.slug}),(0,E.jsx)(A,{label:`Статус`,value:H(e.status)}),(0,E.jsx)(A,{label:`Authority`,value:t?`${t.authority_state}/${t.mutation_mode}`:`неизвестно`}),(0,E.jsx)(A,{label:`Создан`,value:V(e.created_at)}),(0,E.jsx)(A,{label:`Обновлен`,value:V(e.updated_at||e.created_at)})]})]})]},e.id)}),te.length===0&&(0,E.jsx)(ye,{title:`Кластеров нет`,text:`Создайте первый кластер, затем подключите стартовый node-agent.`})]})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:J.createCluster}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[J.slugLabel,(0,E.jsx)(`input`,{value:qr.slug,onChange:e=>Jr({...qr,slug:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Название`,(0,E.jsx)(`input`,{value:qr.name,onChange:e=>Jr({...qr,name:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Регион`,(0,E.jsx)(`input`,{value:qr.region,onChange:e=>Jr({...qr,region:e.target.value})})]})]}),(0,E.jsx)(`p`,{className:`muted`,children:J.slugHelp}),(0,E.jsx)(`button`,{className:`primary`,disabled:!qr.slug||!qr.name,onClick:()=>void Y(async()=>{await q.createCluster({slug:qr.slug,name:qr.name,region:qr.region||null}),Jr({slug:``,name:``,region:``})},`Кластер создан.`),children:J.createCluster})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Что такое технический код?`}),(0,E.jsx)(`p`,{className:`muted`,children:J.slugHelp}),(0,E.jsx)(`p`,{className:`muted`,children:`Для человека основное поле — название. Для системы и операторов — технический код. Он нужен, чтобы сценарии, логи и будущие endpoint-адреса не зависели от переименования кластера.`})]})]}),C===`cluster-settings`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[!ha&&(0,E.jsx)(ye,{title:`Кластер не выбран`,text:`Выберите активный кластер, чтобы открыть настройки.`}),ha&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Identity кластера`}),(0,E.jsx)(`p`,{className:`muted`,children:`Базовые параметры хранятся в PostgreSQL. Slug остается неизменяемым идентификатором для операторов и скриптов.`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`ID`,(0,E.jsx)(`input`,{value:ha.id,readOnly:!0})]}),(0,E.jsxs)(`label`,{children:[`Slug`,(0,E.jsx)(`input`,{value:ha.slug,readOnly:!0})]}),(0,E.jsxs)(`label`,{children:[`Название`,(0,E.jsx)(`input`,{value:Yr.name,onChange:e=>Xr({...Yr,name:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Статус`,(0,E.jsxs)(`select`,{value:Yr.status,onChange:e=>Xr({...Yr,status:e.target.value}),children:[(0,E.jsx)(`option`,{value:`active`,children:`active, работает`}),(0,E.jsx)(`option`,{value:`disabled`,children:`disabled, отключен`})]})]}),(0,E.jsxs)(`label`,{children:[`Регион`,(0,E.jsx)(`input`,{value:Yr.region,onChange:e=>Xr({...Yr,region:e.target.value}),placeholder:`например ru-msk-1`})]}),(0,E.jsxs)(`label`,{children:[`Обновлен`,(0,E.jsx)(`input`,{value:V(ha.updated_at||ha.created_at),readOnly:!0})]})]}),(0,E.jsxs)(`label`,{className:`wideLabel`,children:[`Metadata JSON`,(0,E.jsx)(`textarea`,{value:Yr.metadataJson,onChange:e=>Xr({...Yr,metadataJson:e.target.value}),rows:8,spellCheck:!1})]}),(0,E.jsx)(`button`,{className:`primary`,disabled:!Yr.name.trim(),onClick:()=>Jn(`Сохранить базовые настройки кластера`)&&void Y(async()=>{let e=$e(Yr.metadataJson||`{}`,`Metadata JSON`);await q.updateCluster(ha.id,{name:Yr.name,status:Yr.status,region:Yr.region||null,metadata:e})},`Настройки кластера сохранены.`),children:`Сохранить настройки кластера`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Authority и режим изменений`}),(0,E.jsx)(`p`,{className:`muted`,children:`Эта секция защищает кластер от split-brain: minority/read-only сегменты не должны принимать изменения политик.`}),(0,E.jsxs)(`div`,{className:`stateGrid`,children:[(0,E.jsx)(A,{label:`Authority`,value:me?.authority_state||`неизвестно`}),(0,E.jsx)(A,{label:`Mutation mode`,value:me?.mutation_mode||`неизвестно`}),(0,E.jsx)(A,{label:`Term`,value:String(me?.term??`н/д`)}),(0,E.jsx)(A,{label:`Cluster key`,value:B(ga?.cluster_key_fingerprint)}),(0,E.jsx)(A,{label:`Последнее изменение`,value:V(me?.updated_at)})]}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Состояние authority`,(0,E.jsxs)(`select`,{value:ai.authorityState,onChange:e=>oi({...ai,authorityState:e.target.value}),children:[(0,E.jsx)(`option`,{value:`authoritative`,children:`authoritative, основной`}),(0,E.jsx)(`option`,{value:`minority`,children:`minority, меньшинство`}),(0,E.jsx)(`option`,{value:`isolated`,children:`isolated, изолирован`}),(0,E.jsx)(`option`,{value:`recovery`,children:`recovery, восстановление`})]})]}),(0,E.jsxs)(`label`,{children:[`Режим изменений`,(0,E.jsxs)(`select`,{value:ai.mutationMode,onChange:e=>oi({...ai,mutationMode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`normal`,children:`normal, обычный`}),(0,E.jsx)(`option`,{value:`read_only`,children:`read_only, только чтение`}),(0,E.jsx)(`option`,{value:`recovery_override`,children:`recovery_override, восстановление`})]})]}),(0,E.jsxs)(`label`,{children:[`Примечание`,(0,E.jsx)(`input`,{value:ai.notes,onChange:e=>oi({...ai,notes:e.target.value})})]})]}),(0,E.jsx)(`button`,{disabled:!T,onClick:()=>Jn(`Изменить authority state кластера`)&&void Y(()=>q.updateClusterAuthority(T,{authorityState:ai.authorityState,mutationMode:ai.mutationMode,notes:ai.notes}),`Authority кластера обновлен.`),children:`Обновить authority`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Safety / quorum`}),(0,E.jsxs)(`div`,{className:`stateGrid`,children:[(0,E.jsx)(A,{label:`Узлы`,value:String(ga?.node_count??j.length)}),(0,E.jsx)(A,{label:`Healthy`,value:String(ga?.healthy_node_count??ao)}),(0,E.jsx)(A,{label:`Pending join`,value:String(ga?.pending_join_count??Me.filter(e=>e.status===`pending`).length)}),(0,E.jsx)(A,{label:`Последний узел`,value:V(ga?.last_node_seen_at)})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Минимальный размер, quorum policy и split-brain rules пока не имеют отдельного runtime-переключателя. Сейчас защита выполняется через authority/mutation mode, explicit node approval и аудит.`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Telemetry / testing`}),(0,E.jsxs)(`div`,{className:`stateGrid`,children:[(0,E.jsx)(A,{label:`Telemetry flag`,value:co?.telemetry_enabled?`включен`:`выключен`}),(0,E.jsx)(A,{label:`Synthetic links`,value:co?.synthetic_links_enabled?`включены`:`выключены`}),(0,E.jsx)(A,{label:`Хранение истории, часов`,value:String(co?.history_retention_hours??`н/д`)})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Это тестовый контур наблюдаемости: heartbeat/telemetry реальные, а связи Fabric сейчас synthetic. Production mesh traffic здесь пока не отображается.`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Storage / updates`}),(0,E.jsxs)(`div`,{className:`stateGrid`,children:[(0,E.jsx)(A,{label:`Version Storage`,value:`архитектура зафиксирована, runtime не реализован`}),(0,E.jsx)(A,{label:`Update cache`,value:`${Wt(`update-cache`,Je).length} узл.`}),(0,E.jsx)(A,{label:`File/config cache`,value:`${Wt(`file-storage-cache`,Je).length} узл.`}),(0,E.jsx)(A,{label:`Legacy removal`,value:M?.legacy_removal_allowed?`разрешено`:M?`заблокировано`:`н/д`}),(0,E.jsx)(A,{label:`Stale nodes`,value:M?`${M.summary.stale_nodes} stale / ${M.summary.blocked_nodes} blockers`:`н/д`})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Version Storage и 409/HTTP ответы относятся к Control API. Межузловой runtime transport Fabric остается QUIC/UDP-only.`}),M&&(0,E.jsxs)(`div`,{className:`stack compact`,children:[(0,E.jsxs)(`div`,{className:`membershipList`,children:[(0,E.jsx)(`span`,{className:`pill ${M.legacy_removal_allowed?`good`:`bad`}`,children:M.legacy_removal_allowed?`legacy cleanup allowed`:`legacy cleanup blocked`}),(0,E.jsxs)(`span`,{className:`pill`,children:[`nodes `,M.summary.total_nodes]}),(0,E.jsxs)(`span`,{className:`pill ${M.summary.stale_nodes>0?`warn`:`good`}`,children:[`stale `,M.summary.stale_nodes]}),(0,E.jsxs)(`span`,{className:`pill ${M.summary.blocked_nodes>0?`bad`:`good`}`,children:[`blockers `,M.summary.blocked_nodes]}),M.bridge_hold_required&&(0,E.jsx)(`span`,{className:`pill bad`,children:`bridge hold active`}),(M.blocked_operations||[]).map(e=>(0,E.jsx)(`span`,{className:`pill bad`,children:e},e)),(M.summary.artifact_gap_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill bad`,children:[`artifact gap `,M.summary.artifact_gap_nodes]}),(M.summary.unknown_profile_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill warn`,children:[`profile unknown `,M.summary.unknown_profile_nodes]}),(M.summary.waiting_update_status_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill warn`,children:[`waiting status `,M.summary.waiting_update_status_nodes]}),(M.summary.unknown_version_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill warn`,children:[`version unknown `,M.summary.unknown_version_nodes]}),(M.summary.legacy_recovery_contract_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill bad`,children:[`legacy recovery contract `,M.summary.legacy_recovery_contract_nodes]}),(M.summary.recovery_bridge_required_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill bad`,children:[`recovery bridge `,M.summary.recovery_bridge_required_nodes]}),(M.summary.recovery_bridge_replay_ready_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill warn`,children:[`bridge replay ready `,M.summary.recovery_bridge_replay_ready_nodes]}),(M.summary.waiting_recovery_heartbeat_nodes||0)>0&&(0,E.jsxs)(`span`,{className:`pill info`,children:[`waiting heartbeat `,M.summary.waiting_recovery_heartbeat_nodes]})]}),M.summary.blocked_nodes>0?(0,E.jsxs)(`div`,{className:`stack compact`,children:[M.bridge_hold_required&&(0,E.jsx)(`p`,{className:`muted`,children:(()=>{let e=(M.bridge_hold_node_ids||[]).length||M.summary.recovery_bridge_required_nodes||0,t=M.bridge_hold_reasons||[];return(0,E.jsxs)(E.Fragment,{children:[`Recovery bridge hold active: compatibility overlap must remain enabled for`,` `,e,` node(s)`,t.length>0?` until ${t.join(`, `)} is cleared.`:`.`]})})()}),M.nodes.filter(e=>e.blocked).slice(0,4).map(e=>{let t=He[e.node_id],n=e.products.map(e=>{let t=e.compatible_artifact_found?e.matching_release_version||`ok`:`missing`;return`${e.product}: ${t}`}).join(` | `);return(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Blocker`,value:`${e.name} (${H(e.health_status)})`}),(0,E.jsx)(A,{label:`Last seen`,value:V(e.last_seen_at)}),(0,E.jsx)(A,{label:`Recovery readiness`,value:At(e)}),(0,E.jsx)(A,{label:`Recovery bridge`,value:e.recovery_bridge_required?`required`:`not required`}),(0,E.jsx)(A,{label:`Bridge replay`,value:e.recovery_bridge_replay_ready?`ready`:`not ready`}),(0,E.jsx)(A,{label:`Bridge hold`,value:e.recovery_bridge_required?`active: compatibility overlap must stay enabled`:`not active`}),(0,E.jsx)(A,{label:`Bridge actions`,value:(e.recovery_bridge_actions||[]).length>0?(e.recovery_bridge_actions||[]).join(`, `):`none`}),t&&t.products&&t.products.length>0&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(A,{label:`Replay plan`,value:`${t.products.length} product(s), ${t.bridge_hold_required?`hold active`:`hold cleared`}`}),t.products.map(t=>(0,E.jsx)(A,{label:`Replay ${t.product}`,value:`${t.update_plan.action} -> ${t.update_plan.target_version||`none`} / ${t.recovery_bridge_mode||`default`} / ${t.last_status_reason||`no reason`}`},`${e.node_id}-${t.product}`)),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{gn(JSON.stringify(t,null,2)),Kr(`Bridge replay plan copied: ${e.name}`)},children:`Copy replay plan`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{let n=t.products?.map(e=>e.update_plan.artifact?.url||``).filter(e=>e.length>0)||[];gn(n.join(`
|
||
`)),Kr(n.length>0?`Replay artifact URL copied: ${e.name}`:`Replay artifact URL is not available yet: ${e.name}`)},children:`Copy artifact URL`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{gn((t.products||[]).map(e=>{let t=e.update_plan;return[`product=${e.product}`,`action=${t.action}`,`target=${t.target_version||`none`}`,`mode=${e.recovery_bridge_mode||`default`}`,`reason=${e.last_status_reason||t.reason||`unknown`}`,`artifact=${t.artifact?.url||`n/a`}`].join(` | `)}).join(`
|
||
`)||`node=${e.name} | no replay products`),Kr(`Bridge replay summary copied: ${e.name}`)},children:`Copy replay summary`})]}),(0,E.jsx)(Ce,{title:`Raw bridge replay plan: ${e.name}`,value:t})]}),(0,E.jsx)(A,{label:`Risks`,value:e.risks.join(`, `)||`none`}),(0,E.jsx)(A,{label:`Recovery artifacts`,value:n||`н/д`}),(0,E.jsx)(A,{label:`Действие`,value:kt(e)}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>Na(e.node_id,`details`),children:`Последние статусы`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>Na(e.node_id,`manage`),children:`Policy / listener`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>Pa(e.node_id),children:`Показать update trail`})]})]},e.node_id)})]}):(0,E.jsx)(`p`,{className:`muted`,children:`Сейчас старых узлов-блокеров нет: compatibility overlap можно снимать только после отдельного решения оператора.`}),ja.length>0&&(0,E.jsxs)(`div`,{className:`stack compact`,children:[(0,E.jsx)(`p`,{className:`muted`,children:`Последние заблокированные попытки rollout`}),ja.map(e=>{let t=F(e.payload)||{},n=I(t,`blocked_operation`,``),r=Ot(t,`stale_nodes`),i=Ot(t,`blocked_nodes`),a=`${H(e.target_type)}${e.target_id?`:${B(e.target_id)}`:``}`,o=[Number.isFinite(r)?`stale ${r}`:``,Number.isFinite(i)?`blockers ${i}`:``].filter(Boolean).join(` / `);return(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Когда`,value:V(e.created_at)}),(0,E.jsx)(A,{label:`Операция`,value:n||e.event_type}),(0,E.jsx)(A,{label:`Цель`,value:a}),(0,E.jsx)(A,{label:`Причина`,value:o||`guard active`})]},e.id)})]}),(0,E.jsxs)(`div`,{className:`stack compact`,children:[(0,E.jsx)(`p`,{className:`muted`,children:"Operator smoke: этот action намеренно пытается создать breaking release через HTTP Control API и должен получить blocked `409`, пока stale recovery-risk узлы ещё есть. Это проверка guard и frontend error formatting, а не transport Fabric."}),(0,E.jsxs)(`div`,{className:`membershipList`,children:[(0,E.jsx)(`span`,{className:`pill`,children:`smoke`}),Qi?Qi.includes(`unexpectedly succeeded`)?(0,E.jsx)(`span`,{className:`pill bad`,children:`unexpected success`}):(0,E.jsxs)(`span`,{className:`pill good`,children:[`expected blocked 409`,ea?` · ${Zn(ea)}`:``]}):(0,E.jsx)(`span`,{className:`pill info`,children:`not checked`})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{className:`ghost`,disabled:!T||M.summary.blocked_nodes<1||Vr,onClick:()=>Jn(`Проверить legacy-removal guard через blocked release smoke`)&&void Qa(),children:`Проверить blocked 409`})}),Qi&&(0,E.jsxs)(`div`,{className:`noticePanel ${Qi.includes(`unexpectedly succeeded`)?`badPanel`:`warnPanel`}`,children:[(0,E.jsx)(`strong`,{children:`Guard smoke`}),(0,E.jsx)(`div`,{children:Qi}),ea&&(0,E.jsxs)(`div`,{className:`muted`,children:[`Проверено: `,V(ea)]})]})]})]})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Control/API access`}),(0,E.jsxs)(`div`,{className:`stateGrid`,children:[(0,E.jsx)(A,{label:`Entry nodes`,value:`${Wt(`entry-node`,Je).length} узл.`}),(0,E.jsx)(A,{label:`Relay nodes`,value:`${Wt(`relay-node`,Je).length} узл.`}),(0,E.jsx)(A,{label:`Core mesh`,value:`${Wt(`core-mesh`,Je).length} узл.`})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Это слой входа в Control/API, а не transport fabric. Панель кластера не переезжает автоматически на storage-узел: admin/runtime access назначается отдельной ролью на ingress/admin-capable узле.`})]})]})]}),C===`nodes`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:J.nodeManagement}),(0,E.jsx)(`p`,{className:`muted`,children:`Единый краткий список узлов. По умолчанию показан активный кластер; включите общий режим, чтобы увидеть весь инвентарь платформы.`})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:li===`all`,onChange:e=>ui(e.target.checked?`all`:`cluster`)}),J.showAllPlatformNodes]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{ui(`all`),fi(``)},children:J.showAllPlatformNodes})]})]}),(0,E.jsxs)(`div`,{className:`signalStrip compact`,children:[(0,E.jsx)(ge,{label:`Узлы активного кластера`,value:String(j.length)}),(0,E.jsx)(ge,{label:`Все узлы`,value:String(Ta.length)}),(0,E.jsx)(ge,{label:`Заявки`,value:String(io)}),(0,E.jsx)(ge,{label:`Активные роли`,value:String(so)})]}),(0,E.jsx)(`p`,{className:`muted`,children:J.addNodeText})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:J.nodeBriefList}),(0,E.jsx)(`p`,{className:`muted`,children:J.nodeBriefListHelp})]}),(0,E.jsx)(`span`,{className:`pill`,children:Da.length})]}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[J.nodeSearch,(0,E.jsx)(`input`,{value:di,onChange:e=>fi(e.target.value),placeholder:J.nodeSearchPlaceholder})]}),(0,E.jsxs)(`label`,{children:[J.nodeGroupFilter,(0,E.jsxs)(`select`,{value:pi,onChange:e=>mi(e.target.value),children:[(0,E.jsx)(`option`,{value:``,children:J.allNodeGroups}),Oe.map(e=>(0,E.jsx)(`option`,{value:e.id,children:Bt(e,Oe)},e.id))]})]})]}),(0,E.jsx)(`p`,{className:`muted`,children:J.nodeGroupInventoryText}),(0,E.jsx)(`h4`,{children:J.nodeGroupCreatePanel}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[J.nodeGroupName,(0,E.jsx)(`input`,{value:Zr.name,onChange:e=>Qr({...Zr,name:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[J.parentNodeGroup,(0,E.jsxs)(`select`,{value:Zr.parentGroupId,onChange:e=>Qr({...Zr,parentGroupId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:J.rootNodeGroup}),Oe.map(e=>(0,E.jsx)(`option`,{value:e.id,children:Bt(e,Oe)},e.id))]})]}),(0,E.jsxs)(`label`,{children:[J.createNodeGroup,(0,E.jsx)(`button`,{className:`primary`,disabled:!Zr.name.trim(),onClick:()=>void Y(async()=>{await q.createNodeGroup(T,{name:Zr.name,parentGroupId:Zr.parentGroupId||null}),Qr({name:``,parentGroupId:``})},J.nodeGroupCreated),children:J.createNodeGroup})]})]}),(0,E.jsxs)(`div`,{className:`nodeList`,children:[Aa.map(e=>{if(e.kind===`group`){let t=hi.includes(e.key);return(0,E.jsxs)(`div`,{className:`nodeListGroup`,style:{paddingLeft:`${e.depth*18}px`},children:[(0,E.jsxs)(`div`,{className:`nodeListMain`,children:[(0,E.jsx)(`strong`,{children:e.label}),e.groupId&&(0,E.jsx)(`span`,{children:Vt(e.groupId,Oe)})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`span`,{className:`pill`,children:e.count}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>gi(On(hi,e.key)),children:t?J.expandGroup:J.collapseGroup}),e.groupId&&(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>Qr({name:``,parentGroupId:e.groupId||``}),children:J.createSubgroup})]})]},e.key)}let t=e.entry,n=t.memberships.find(e=>e.cluster.id===T),r=n?.node||t.node,i=Dt(r,st[r.id]||[],bt),a=at(r,We[r.id],Ie),o=gt(Ke[r.id]||[]),s=n?.node.membership_status===`active`,c=n?.node.membership_status===`revoked`;return(0,E.jsxs)(`div`,{className:`nodeListRow`,style:{marginLeft:`${e.depth*18}px`},children:[(0,E.jsxs)(`div`,{className:`nodeListMain`,children:[(0,E.jsx)(`strong`,{children:r.name}),(0,E.jsx)(`span`,{children:r.node_key}),(0,E.jsx)(`small`,{className:`muted`,children:i.address})]}),(0,E.jsx)(_e,{value:r.health_status}),(0,E.jsx)(we,{runtime:i}),(0,E.jsxs)(`div`,{className:`nodeEndpointCell`,children:[(0,E.jsx)(`strong`,{children:r.reported_version||`версия неизвестна`}),(0,E.jsx)(`small`,{children:a.targetLabel})]}),(0,E.jsx)(_e,{value:a.status}),(0,E.jsxs)(`div`,{className:`nodeEndpointCell`,children:[(0,E.jsx)(`strong`,{className:`pill ${o.tone}`,children:o.label}),(0,E.jsx)(`small`,{children:o.detail})]}),(0,E.jsx)(`span`,{className:`muted`,children:V(r.last_seen_at)}),n?(0,E.jsx)(_e,{value:n.node.membership_status}):(0,E.jsx)(`span`,{className:`muted`,children:J.notMemberOfActiveCluster}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{onClick:()=>{wi(t),Ei(`details`)},children:J.nodeDetails}),s?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`button`,{className:`primary`,onClick:()=>{wi(t),Ei(`manage`)},children:J.manageNode}),(0,E.jsx)(`button`,{className:`danger`,onClick:()=>Jn(`Удалить узел ${r.name} из кластера`)&&void Y(()=>q.deleteClusterNode(T,r.id,`Удалено из списка узлов панели владельца платформы.`),`Узел удален из кластера.`),children:`Удалить`})]}):c?(0,E.jsx)(`span`,{className:`muted`,children:J.revokedMembership}):(0,E.jsx)(`button`,{className:`primary`,onClick:()=>{bi(t),Si([])},children:J.connectExistingNode})]})]},e.key)}),Aa.length===0&&(0,E.jsx)(ye,{title:J.noNodesTitle,text:J.noNodesByFilter})]})]}),yi&&(0,E.jsx)(`div`,{className:`modalBackdrop`,role:`presentation`,children:(0,E.jsxs)(`div`,{className:`modalCard`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`attach-node-title`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{id:`attach-node-title`,children:J.connectExistingNodeTitle}),(0,E.jsx)(`p`,{className:`muted`,children:J.connectExistingNodeText})]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>bi(null),children:J.cancel})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Узел`,value:yi.node.name}),(0,E.jsx)(A,{label:`Node key`,value:yi.node.node_key}),(0,E.jsx)(A,{label:J.activeCluster,value:ha?.name||T})]}),(0,E.jsx)(`div`,{className:`checkGrid`,children:ae.map(e=>(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:xi.includes(e),onChange:()=>Si(On(xi,e))}),rt(e)]},e))}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`primary`,onClick:()=>void Y(async()=>{await q.attachExistingNode(T,yi.node.id,xi),bi(null),Si([]),ui(`cluster`)},`Узел подключен к активному кластеру.`),children:J.connectWithRoles}),(0,E.jsx)(`button`,{onClick:()=>bi(null),children:J.cancel})]})]})}),Ci&&(()=>{let e=Ci.memberships.find(e=>e.cluster.id===T),t=e?.node||Ci.node,n=e?(st[t.id]||[])[0]:void 0,r=e?(Je[t.id]||[]).filter(e=>e.status===`active`):[],i=e&&Xe[t.id]||[],a=e&&nt[t.id]||[];return(0,E.jsx)(`div`,{className:`modalBackdrop`,role:`presentation`,children:(0,E.jsxs)(`div`,{className:`modalCard wide`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`node-info-title`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`h3`,{id:`node-info-title`,children:[Ti===`manage`?J.manageNode:J.nodeDetails,`: `,t.name]}),(0,E.jsx)(`p`,{className:`muted`,children:t.node_key})]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{wi(null),Ei(`details`)},children:J.close})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.nodeIdentity}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Node ID`,value:B(t.id)}),(0,E.jsx)(A,{label:`Ключ узла`,value:t.node_key}),(0,E.jsx)(A,{label:`Тип владения`,value:H(t.ownership_type)}),(0,E.jsx)(A,{label:`Owner org`,value:B(t.owner_organization_id)}),(0,E.jsx)(A,{label:`Регистрация`,value:H(t.registration_status)}),(0,E.jsx)(A,{label:`Здоровье`,value:H(t.health_status)}),(0,E.jsx)(A,{label:`Версия`,value:t.reported_version||`неизвестно`}),(0,E.jsx)(A,{label:`Последний сигнал`,value:V(t.last_seen_at)})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.clusterMemberships}),(0,E.jsx)(`div`,{className:`membershipList`,children:Ci.memberships.map(e=>(0,E.jsxs)(`span`,{className:e.cluster.id===T?`pill good`:`pill`,children:[e.cluster.name,`: `,H(e.node.membership_status)]},e.cluster.id))})]}),e?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.activeClusterScope}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Участие`,value:H(t.membership_status)}),(0,E.jsx)(A,{label:`Сегмент`,value:H(t.partition_state)}),(0,E.jsx)(A,{label:`Группа`,value:t.node_group_name||J.ungroupedNodes}),(0,E.jsx)(A,{label:`Ролей`,value:String(r.length)}),(0,E.jsx)(A,{label:`Desired-сервисов`,value:String(i.length)}),(0,E.jsx)(A,{label:`Observed-сервисов`,value:String(a.length)})]})]}),Ti===`details`&&(0,E.jsx)(Se,{node:t,memberships:Ci.memberships,activeRoles:r,desiredWorkloads:i,observedWorkloads:a,heartbeats:st[t.id]||[],telemetry:ut[t.id]||[],updatePlan:We[t.id],updateStatuses:Ke[t.id]||[],meshLinks:bt.filter(e=>e.source_node_id===t.id||e.target_node_id===t.id),syntheticConfig:Tt[t.id],allNodes:j,onSetUpdatePolicy:(e,t,n)=>void Y(async()=>{await q.upsertNodeUpdatePolicy(T,e.id,{product:t,channel:`dev`,targetVersion:n,strategy:`rolling`,enabled:!0,rollbackAllowed:!0,healthWindowSeconds:180})},n?`${t} поставлен в target ${n}.`:`${t} будет следовать latest dev.`),labels:J}),Ti===`manage`&&(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.nodeFunctions}),(0,E.jsx)(`p`,{className:`muted`,children:J.nodeFunctionsText}),(0,E.jsxs)(`label`,{className:`wideLabel`,children:[J.organizationScopeForEnable,(0,E.jsx)(`input`,{value:si,onChange:e=>ci(e.target.value),placeholder:J.clusterWideRolePlaceholder})]}),(0,E.jsx)(`div`,{className:`functionList`,children:ae.map(e=>{let o=r.find(t=>t.role===e),s=i.find(t=>t.service_type===e),c=a.find(t=>t.service_type===e),l=Pn(e,n),u=s?.desired_state||`not_configured`,f=c?.reported_state||`missing`,p=!!o&&u===`enabled`;return(0,E.jsxs)(`div`,{className:`functionRow`,children:[(0,E.jsxs)(`div`,{className:`nodeListMain`,children:[(0,E.jsx)(`strong`,{children:rt(e)}),(0,E.jsx)(`span`,{children:In(e,n,d)})]}),(0,E.jsx)(ve,{label:J.rolePermission,value:o?J.permissionGranted:J.permissionDenied,tone:o?`info`:``}),(0,E.jsx)(ve,{label:J.desiredRuntime,value:H(u),tone:u===`enabled`?`good`:``}),(0,E.jsx)(ve,{label:J.observedRuntime,value:H(f),tone:f===`running`?`good`:f===`missing`?`warn`:``}),(0,E.jsx)(`span`,{className:`pill ${l}`,children:Fn(e,n,J)}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:p?``:`primary`,disabled:p,onClick:()=>void Y(async()=>{o||await q.setRoleStatus(T,t.id,e,`active`,si||void 0),await q.setDesiredWorkload(T,t.id,e,{desiredState:`enabled`,runtimeMode:`container`,config:{},environment:{}})},`${e}: функция включена.`),children:J.enableFunction}),(0,E.jsx)(`button`,{disabled:!o&&u!==`enabled`,onClick:()=>void Y(async()=>{await q.setDesiredWorkload(T,t.id,e,{desiredState:`disabled`,runtimeMode:s?.runtime_mode||`container`,config:s?.config||{},environment:s?.environment||{}}),o&&await q.setRoleStatus(T,t.id,e,`disabled`,o.organization_id||void 0)},`${e}: функция выключена.`),children:J.disableFunction})]})]},e)})}),(()=>{let e=i.find(e=>e.service_type===`mesh-listener`)?.config||{},n=ji[t.id]||{listenAddr:String(e.listen_addr||``),mode:String(e.listen_port_mode||`auto`),autoRange:`${Number(e.auto_port_start||19131)}-${Number(e.auto_port_end||19231)}`,advertiseEndpoint:String(e.advertise_endpoint||``),endpointCandidates:Mt(e),advertiseTransport:String(e.advertise_transport||`direct_quic`),connectivity:String(e.connectivity_mode||`private_lan`),nat:String(e.nat_type||`none`),region:String(e.region||``)},r=e=>Mi({...ji,[t.id]:{...n,...e}});return(0,E.jsxs)(`section`,{className:`nodePanel nestedPanel`,children:[(0,E.jsx)(`h4`,{children:`Mesh listener`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Listen addr`,(0,E.jsx)(`input`,{value:n.listenAddr,onChange:e=>r({listenAddr:e.target.value}),placeholder:`0.0.0.0:19131 или :19131`})]}),(0,E.jsxs)(`label`,{children:[`Port mode`,(0,E.jsxs)(`select`,{value:n.mode,onChange:e=>r({mode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`auto`,children:`auto`}),(0,E.jsx)(`option`,{value:`manual`,children:`manual`}),(0,E.jsx)(`option`,{value:`disabled`,children:`disabled`})]})]}),(0,E.jsxs)(`label`,{children:[`Auto ports`,(0,E.jsx)(`input`,{value:n.autoRange,onChange:e=>r({autoRange:e.target.value}),placeholder:`19131-19231`})]}),(0,E.jsxs)(`label`,{children:[`Advertise endpoint`,(0,E.jsx)(`input`,{value:n.advertiseEndpoint,onChange:e=>r({advertiseEndpoint:e.target.value}),placeholder:`quic://192.168.200.85:18080`})]}),(0,E.jsxs)(`label`,{className:`wideLabel`,children:[`Endpoint candidates`,(0,E.jsx)(`textarea`,{value:n.endpointCandidates,onChange:e=>r({endpointCandidates:e.target.value}),rows:5,placeholder:`quic://192.168.200.85:18080 reachability=private connectivity=private_lan interface=lan
|
||
quic://94.141.118.222:19199 reachability=public connectivity=direct provider=isp1 maps_to=192.168.200.85:18080`}),(0,E.jsx)(`small`,{children:`Одна строка = один адрес узла. Можно указать provider, interface, maps_to, priority, reachability, connectivity, nat.`})]}),(0,E.jsxs)(`label`,{children:[`Advertise transport`,(0,E.jsxs)(`select`,{value:n.advertiseTransport,onChange:e=>r({advertiseTransport:e.target.value}),children:[(0,E.jsx)(`option`,{value:`direct_quic`,children:`direct_quic`}),(0,E.jsx)(`option`,{value:`relay_quic`,children:`relay_quic`}),(0,E.jsx)(`option`,{value:`outbound_reverse`,children:`outbound_reverse`})]})]}),(0,E.jsxs)(`label`,{children:[`Connectivity`,(0,E.jsxs)(`select`,{value:n.connectivity,onChange:e=>r({connectivity:e.target.value}),children:[(0,E.jsx)(`option`,{value:`private_lan`,children:`private_lan`}),(0,E.jsx)(`option`,{value:`direct`,children:`direct`}),(0,E.jsx)(`option`,{value:`outbound_only`,children:`outbound_only`}),(0,E.jsx)(`option`,{value:`relay_required`,children:`relay_required`})]})]}),(0,E.jsxs)(`label`,{children:[`NAT`,(0,E.jsxs)(`select`,{value:n.nat,onChange:e=>r({nat:e.target.value}),children:[(0,E.jsx)(`option`,{value:`none`,children:`none`}),(0,E.jsx)(`option`,{value:`unknown`,children:`unknown`}),(0,E.jsx)(`option`,{value:`port_restricted`,children:`port_restricted`}),(0,E.jsx)(`option`,{value:`symmetric`,children:`symmetric`})]})]}),(0,E.jsxs)(`label`,{children:[`Region/site`,(0,E.jsx)(`input`,{value:n.region,onChange:e=>r({region:e.target.value}),placeholder:`dc1, office, docker-test`})]})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{className:`primary`,onClick:()=>void Y(async()=>{let[e,r]=n.autoRange.split(`-`).map(e=>Number(e.trim())),i=Number.isFinite(e)?e:19131,a=Number.isFinite(r)?r:i,o=Nt(n,t.id),s=o.map(e=>String(e.address||``)).filter(Boolean),c=n.advertiseEndpoint.trim().replace(/\/$/,``)||s[0]||null;await q.setDesiredWorkload(T,t.id,`mesh-listener`,{desiredState:n.mode===`disabled`?`disabled`:`enabled`,version:`listener-${Date.now()}`,runtimeMode:`container`,config:{listen_addr:n.listenAddr,listen_port_mode:n.mode,auto_port_start:i,auto_port_end:a,advertise_endpoint:c,advertise_endpoints:s,endpoint_candidates:o,advertise_transport:n.advertiseTransport||`direct_quic`,connectivity_mode:n.connectivity,nat_type:n.nat,region:n.region||null},environment:{}})},`Mesh listener config обновлен.`),children:`Применить listener`})})]})})(),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsxs)(`select`,{value:t.node_group_id||``,onChange:e=>void Y(()=>q.assignNodeGroup(T,t.id,e.target.value||null),e.target.value?`Узел перемещен в группу.`:`Узел убран из группы.`),children:[(0,E.jsx)(`option`,{value:``,children:J.ungroupedNodes}),Oe.map(e=>(0,E.jsx)(`option`,{value:e.id,children:Bt(e,Oe)},e.id))]})}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{onClick:()=>Jn(`Отключить участие узла ${t.name}`)&&void Y(()=>q.disableMembership(T,t.id,`Отключено из панели владельца платформы.`),`Участие узла отключено.`),children:`Отключить участие`}),(0,E.jsx)(`button`,{className:`danger`,onClick:()=>Jn(`Отозвать identity узла ${t.name}`)&&void Y(()=>q.revokeNodeIdentity(T,t.id,`Отозвано из панели владельца платформы.`),`Identity узла отозван.`),children:`Отозвать identity`})]})]})]}):(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.noActiveClusterMembership}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{className:`primary`,onClick:()=>{bi(Ci),Si([]),wi(null)},children:J.connectExistingNode})})]})]})})})(),!1]}),C===`enrollment`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:J.joinTokenTitle}),(0,E.jsx)(`p`,{className:`muted`,children:J.joinTokenText}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[J.ttlHours,(0,E.jsx)(`input`,{type:`number`,min:1,max:720,value:U.ttlHours,onChange:e=>W({...U,ttlHours:Number(e.target.value)})}),(0,E.jsx)(`small`,{children:J.ttlHelp})]}),(0,E.jsxs)(`label`,{children:[J.maxUses,(0,E.jsx)(`input`,{type:`number`,min:1,max:100,value:U.maxUses,onChange:e=>W({...U,maxUses:Number(e.target.value)})}),(0,E.jsx)(`small`,{children:J.maxUsesHelp})]}),(0,E.jsxs)(`label`,{children:[J.nodeOwnership,(0,E.jsxs)(`select`,{value:U.ownershipType,onChange:e=>W({...U,ownershipType:e.target.value}),children:[(0,E.jsx)(`option`,{value:`platform_managed`,children:`platform_managed, управляется платформой`}),(0,E.jsx)(`option`,{value:`customer_managed`,children:`customer_managed, управляется клиентом`})]})]}),(0,E.jsxs)(`label`,{children:[J.tokenPurpose,(0,E.jsx)(`input`,{value:U.purpose,onChange:e=>W({...U,purpose:e.target.value}),placeholder:`например: стартовый entry-node в ru-msk-1`})]}),(0,E.jsxs)(`label`,{children:[`Имя нового узла`,(0,E.jsx)(`input`,{value:U.nodeName,onChange:e=>W({...U,nodeName:e.target.value}),placeholder:rn(U,ha)}),(0,E.jsx)(`small`,{children:`Если оставить пустым, панель подставит имя автоматически.`})]}),(0,E.jsxs)(`label`,{children:[`Группа узла`,(0,E.jsxs)(`select`,{value:U.nodeGroupId,onChange:e=>W({...U,nodeGroupId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Без группы`}),Oe.map(e=>(0,E.jsx)(`option`,{value:e.id,children:Bt(e,Oe)},e.id))]})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Install profile`}),(0,E.jsx)(`p`,{className:`muted`,children:`Эти поля попадут в install profile. Для Windows без админ-прав будет создан user startup task, с админ-правами - system startup task.`}),(0,E.jsx)(`div`,{className:`segmented`,children:[[`docker`,`Docker Linux`],[`linux_binary`,`Ubuntu service`],[`windows_service`,`Windows`]].map(([e,t])=>(0,E.jsx)(`button`,{type:`button`,className:U.installMode===e?`active`:``,onClick:()=>W({...U,installMode:e}),children:t},e))}),(0,E.jsx)(`div`,{className:`segmented`,children:[[`private_lan`,`LAN`],[`direct`,`Public`],[`nat_forward`,`NAT`],[`outbound_only`,`Outbound`]].map(([e,t])=>(0,E.jsx)(`button`,{type:`button`,className:tn(U)===e?`active`:``,onClick:()=>W(nn(U,e)),children:t},e))}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Control-plane endpoint`,(0,E.jsx)(`input`,{value:U.controlPlaneEndpoint,onChange:e=>W({...U,controlPlaneEndpoint:e.target.value}),placeholder:Zt()})]}),(0,E.jsxs)(`label`,{children:[U.installMode===`windows_service`?`Windows node-agent artifact`:U.installMode===`linux_binary`?`Linux node-agent artifact`:`Docker image`,(0,E.jsx)(`input`,{value:U.dockerImage,onChange:e=>W({...U,dockerImage:e.target.value})})]}),U.installMode===`windows_service`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`label`,{children:[`Windows startup`,(0,E.jsxs)(`select`,{value:U.windowsStartupMode,onChange:e=>W({...U,windowsStartupMode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`auto`,children:`auto: system task, fallback user task`}),(0,E.jsx)(`option`,{value:`system-task`,children:`system task, admin required`}),(0,E.jsx)(`option`,{value:`user-task`,children:`user task, no admin`}),(0,E.jsx)(`option`,{value:`none`,children:`none`})]})]}),(0,E.jsxs)(`label`,{children:[`Install dir`,(0,E.jsx)(`input`,{value:U.windowsInstallDir,onChange:e=>W({...U,windowsInstallDir:e.target.value}),placeholder:`C:\\\\Program Files\\\\RAP\\\\node-name`})]}),(0,E.jsxs)(`label`,{children:[`Windows node-agent SHA256`,(0,E.jsx)(`input`,{value:U.windowsNodeAgentSHA256,onChange:e=>W({...U,windowsNodeAgentSHA256:e.target.value}),placeholder:`опционально, но желательно для production`})]})]}),U.installMode===`linux_binary`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`label`,{children:[`Linux install dir`,(0,E.jsx)(`input`,{value:U.linuxInstallDir,onChange:e=>W({...U,linuxInstallDir:e.target.value}),placeholder:`/opt/rap/node-name`})]}),(0,E.jsxs)(`label`,{children:[`Linux node-agent SHA256`,(0,E.jsx)(`input`,{value:U.linuxNodeAgentSHA256,onChange:e=>W({...U,linuxNodeAgentSHA256:e.target.value}),placeholder:`опционально, но желательно для production`})]})]}),U.installMode===`docker`&&(0,E.jsxs)(`label`,{children:[`Container name`,(0,E.jsx)(`input`,{value:U.dockerContainerName,onChange:e=>W({...U,dockerContainerName:e.target.value}),placeholder:an(U,ha)})]}),(0,E.jsxs)(`label`,{children:[`Artifact endpoints`,(0,E.jsx)(`input`,{value:U.artifactEndpoints,onChange:e=>W({...U,artifactEndpoints:e.target.value}),placeholder:Qt()}),(0,E.jsx)(`small`,{children:`Через запятую: public/LAN/cache узлы, где host-agent сможет скачать image tar до входа в mesh.`})]}),U.installMode===`docker`&&(0,E.jsxs)(`label`,{children:[`Docker image tar SHA256`,(0,E.jsx)(`input`,{value:U.dockerImageArtifactSHA256,onChange:e=>W({...U,dockerImageArtifactSHA256:e.target.value}),placeholder:`опционально, но желательно для production`})]}),U.installMode===`docker`&&(0,E.jsxs)(`label`,{children:[`Docker network`,(0,E.jsxs)(`select`,{value:U.dockerNetwork,onChange:e=>W({...U,dockerNetwork:e.target.value}),children:[(0,E.jsx)(`option`,{value:`host`,children:`host`}),(0,E.jsx)(`option`,{value:`bridge`,children:`bridge`})]})]}),(0,E.jsxs)(`label`,{children:[`Listen addr`,(0,E.jsx)(`input`,{value:U.meshListenAddr,onChange:e=>W({...U,meshListenAddr:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Listen mode`,(0,E.jsxs)(`select`,{value:U.meshListenPortMode,onChange:e=>W({...U,meshListenPortMode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`auto`,children:`auto`}),(0,E.jsx)(`option`,{value:`manual`,children:`manual`}),(0,E.jsx)(`option`,{value:`disabled`,children:`disabled`})]})]}),(0,E.jsxs)(`label`,{children:[`Auto ports`,(0,E.jsx)(`input`,{value:`${U.meshListenAutoPortStart}-${U.meshListenAutoPortEnd}`,onChange:e=>{let[t,n]=e.target.value.split(`-`).map(e=>Number(e.trim()));W({...U,meshListenAutoPortStart:Number.isFinite(t)?t:U.meshListenAutoPortStart,meshListenAutoPortEnd:Number.isFinite(n)?n:U.meshListenAutoPortEnd})}})]}),(0,E.jsxs)(`label`,{children:[`Advertise endpoint`,(0,E.jsx)(`input`,{value:U.meshAdvertiseEndpoint,onChange:e=>W({...U,meshAdvertiseEndpoint:e.target.value}),placeholder:`quic://192.168.200.85:18080`})]}),(0,E.jsxs)(`label`,{className:`wideLabel`,children:[`Endpoint candidates`,(0,E.jsx)(`textarea`,{value:U.meshAdvertiseEndpoints,onChange:e=>W({...U,meshAdvertiseEndpoints:e.target.value}),rows:5,placeholder:`quic://192.168.200.85:18080 reachability=private connectivity=private_lan nat=none interface=lan priority=1
|
||
quic://94.141.118.222:19199 reachability=public connectivity=direct nat=port_restricted provider=isp1 maps_to=192.168.200.85:18080 priority=2`}),(0,E.jsx)(`small`,{children:`Сюда вносим все реальные адреса узла: LAN, разные адаптеры, публичные UDP NAT-пробросы разных провайдеров.`})]}),(0,E.jsxs)(`label`,{children:[`Advertise transport`,(0,E.jsxs)(`select`,{value:U.meshAdvertiseTransport,onChange:e=>W({...U,meshAdvertiseTransport:e.target.value}),children:[(0,E.jsx)(`option`,{value:`direct_quic`,children:`direct_quic`}),(0,E.jsx)(`option`,{value:`relay_quic`,children:`relay_quic`}),(0,E.jsx)(`option`,{value:`outbound_reverse`,children:`outbound_reverse`})]})]}),(0,E.jsxs)(`label`,{children:[`Connectivity`,(0,E.jsxs)(`select`,{value:U.meshConnectivityMode,onChange:e=>W({...U,meshConnectivityMode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`direct`,children:`direct`}),(0,E.jsx)(`option`,{value:`private_lan`,children:`private_lan`}),(0,E.jsx)(`option`,{value:`outbound_only`,children:`outbound_only`}),(0,E.jsx)(`option`,{value:`relay_required`,children:`relay_required`})]})]}),(0,E.jsxs)(`label`,{children:[`NAT`,(0,E.jsxs)(`select`,{value:U.meshNATType,onChange:e=>W({...U,meshNATType:e.target.value}),children:[(0,E.jsx)(`option`,{value:`none`,children:`none`}),(0,E.jsx)(`option`,{value:`unknown`,children:`unknown`}),(0,E.jsx)(`option`,{value:`full_cone`,children:`full_cone`}),(0,E.jsx)(`option`,{value:`port_restricted`,children:`port_restricted`}),(0,E.jsx)(`option`,{value:`symmetric`,children:`symmetric`})]})]}),(0,E.jsxs)(`label`,{children:[`Region/site`,(0,E.jsx)(`input`,{value:U.meshRegion,onChange:e=>W({...U,meshRegion:e.target.value})})]}),U.installMode===`docker`&&(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:U.pullImage,onChange:e=>W({...U,pullImage:e.target.checked})}),`Pull image`]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:U.replace,onChange:e=>W({...U,replace:e.target.checked})}),`Replace existing install`]})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:J.suggestedRoles}),(0,E.jsx)(`p`,{className:`muted`,children:`Роли записываются в install token и автоматически назначаются узлу при approval. После создания token изменение чекбоксов не меняет уже выданный token.`}),(0,E.jsx)(`div`,{className:`checkGrid`,children:ae.map(e=>(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:U.roles.includes(e),onChange:()=>W({...U,roles:On(U.roles,e)})}),rt(e)]},e))})]}),(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:J.generatedScope}),(0,E.jsx)(`p`,{className:`muted`,children:J.generatedScopeHelp}),(0,E.jsx)(`pre`,{className:`codePreview`,children:JSON.stringify(Ca,null,2)})]}),(0,E.jsxs)(`p`,{className:`muted`,children:[J.manualApprovalRequired,`.`]}),(0,E.jsx)(`button`,{className:`primary`,disabled:!T,onClick:()=>void Y(async()=>{ii(await q.createJoinToken(T,{ttlHours:U.ttlHours,maxUses:U.maxUses,scope:Ca}))},`Join token создан.`),children:`Создать install token`}),ri&&(0,E.jsxs)(`div`,{className:`secretOnce`,children:[(0,E.jsx)(`strong`,{children:`Исходный token, возвращается один раз`}),(0,E.jsx)(`code`,{children:ri.token}),(0,E.jsxs)(`span`,{className:`muted`,children:[`Authority key: `,B(ri.authority_signature?.key_fingerprint)]}),(0,E.jsx)(`strong`,{children:`Scope выданного token`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:JSON.stringify(ri.scope,null,2)}),(0,E.jsx)(`strong`,{children:`Docker host-agent install`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:on(ri,ha,wa)}),(0,E.jsx)(`strong`,{children:`Profile-based Docker install`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:sn(ri,ha,wa)}),(0,E.jsx)(`strong`,{children:`Profile-based Ubuntu service install`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:cn(ri,ha,wa)}),(0,E.jsx)(`strong`,{children:`Profile-based Windows PowerShell install`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:ln(ri,ha,wa)}),(0,E.jsx)(`strong`,{children:`Profile-based Windows CMD install`}),(0,E.jsx)(`pre`,{className:`codePreview`,children:un(ri,ha,wa)})]})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Как добавить узел`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsxs)(`div`,{className:`stateLine`,children:[(0,E.jsx)(`span`,{children:`1`}),(0,E.jsx)(`strong`,{children:`Заполните Docker install profile слева.`})]}),(0,E.jsxs)(`div`,{className:`stateLine`,children:[(0,E.jsx)(`span`,{children:`2`}),(0,E.jsx)(`strong`,{children:`Нажмите “Создать install token”.`})]}),(0,E.jsxs)(`div`,{className:`stateLine`,children:[(0,E.jsx)(`span`,{children:`3`}),(0,E.jsx)(`strong`,{children:`Скопируйте “Profile-based Docker install” и выполните на Docker-хосте.`})]}),(0,E.jsxs)(`div`,{className:`stateLine`,children:[(0,E.jsx)(`span`,{children:`4`}),(0,E.jsx)(`strong`,{children:`Подтвердите join request в этой же вкладке.`})]})]})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Install tokens`}),(0,E.jsx)(N,{columns:[`scope`,`status`,`uses`,`expires`,`created`,`action`],rows:Pe.map(e=>[vt(e),H(e.status),`${e.used_count}/${e.max_uses}`,V(e.expires_at),V(e.created_at),e.status===`active`?(0,E.jsx)(`button`,{className:`danger`,onClick:()=>Jn(`Отозвать install token ${B(e.id)}`)&&void Y(()=>q.revokeJoinToken(T,e.id),`Install token отозван.`),children:`Отозвать`}):(0,E.jsx)(`span`,{className:`muted`,children:H(e.status)})])})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Заявки на подключение`}),(0,E.jsxs)(`div`,{className:`stack`,children:[Me.map(e=>(0,E.jsxs)(`div`,{className:`requestCard`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:e.node_name}),(0,E.jsx)(`p`,{children:e.node_fingerprint}),(0,E.jsx)(_e,{value:e.status}),e.approval_signature?.key_fingerprint&&(0,E.jsxs)(`small`,{className:`muted`,children:[`approval key `,B(e.approval_signature.key_fingerprint)]})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{disabled:e.status!==`pending`,onClick:()=>void Y(()=>q.approveJoinRequest(T,e.id),`Заявка одобрена.`),children:`Одобрить`}),(0,E.jsx)(`button`,{disabled:e.status!==`pending`,onClick:()=>void Y(()=>q.rejectJoinRequest(T,e.id,`Отклонено из панели владельца платформы.`),`Заявка отклонена.`),children:`Отклонить`})]})]},e.id)),Me.length===0&&(0,E.jsx)(ye,{title:`Нет заявок`,text:`Новые подключения node-agent появятся здесь.`})]})]})]}),C===`roles`&&(0,E.jsxs)(`section`,{className:`stack`,children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Область ролей`}),(0,E.jsx)(`p`,{className:`muted`,children:`Capabilities — технические факты. Роли — явные разрешения. Область организации может ограничивать сервисные роли.`}),(0,E.jsxs)(`label`,{children:[`UUID организации для новых назначений ролей, опционально`,(0,E.jsx)(`input`,{value:si,onChange:e=>ci(e.target.value),placeholder:`пусто = роль на весь кластер`})]})]}),j.map(e=>(0,E.jsxs)(`article`,{className:`card roleRow`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:e.name}),(0,E.jsx)(`p`,{children:tt(Je[e.id]||[])})]}),(0,E.jsxs)(`select`,{defaultValue:``,onChange:t=>{let n=t.target.value;t.currentTarget.value=``,n&&Y(()=>q.assignRole(T,e.id,n,si||void 0),`${n} назначена узлу ${e.name}.`)},children:[(0,E.jsx)(`option`,{value:``,children:`Назначить роль...`}),ae.map(e=>(0,E.jsx)(`option`,{value:e,children:rt(e)},e))]})]},e.id))]}),C===`workloads`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Желаемое состояние сервиса`}),(0,E.jsx)(`p`,{className:`muted`,children:`Здесь задается только желаемое состояние. Runtime-исполнение остается под контролем node-agent и политик.`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Узел`,(0,E.jsxs)(`select`,{value:zi.nodeId,onChange:e=>Bi({...zi,nodeId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Выберите узел...`}),j.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Сервис`,(0,E.jsx)(`select`,{value:zi.serviceType,onChange:e=>Bi({...zi,serviceType:e.target.value}),children:ae.map(e=>(0,E.jsx)(`option`,{value:e,children:rt(e)},e))})]}),(0,E.jsxs)(`label`,{children:[`Желаемое состояние`,(0,E.jsxs)(`select`,{value:zi.desiredState,onChange:e=>Bi({...zi,desiredState:e.target.value}),children:[(0,E.jsx)(`option`,{value:`enabled`,children:`включено`}),(0,E.jsx)(`option`,{value:`disabled`,children:`выключено`})]})]}),(0,E.jsxs)(`label`,{children:[`Режим runtime`,(0,E.jsxs)(`select`,{value:zi.runtimeMode,onChange:e=>Bi({...zi,runtimeMode:e.target.value}),children:[(0,E.jsx)(`option`,{value:`container`,children:`контейнер`}),(0,E.jsx)(`option`,{value:`native`,children:`нативно`})]})]}),(0,E.jsxs)(`label`,{children:[`Версия`,(0,E.jsx)(`input`,{value:zi.version,onChange:e=>Bi({...zi,version:e.target.value})})]})]}),(0,E.jsxs)(`label`,{children:[`Config JSON`,(0,E.jsx)(`textarea`,{value:zi.configJson,onChange:e=>Bi({...zi,configJson:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Environment JSON`,(0,E.jsx)(`textarea`,{value:zi.environmentJson,onChange:e=>Bi({...zi,environmentJson:e.target.value})})]}),(0,E.jsx)(`button`,{className:`primary`,disabled:!zi.nodeId||!T,onClick:()=>void Y(()=>q.setDesiredWorkload(T,zi.nodeId,zi.serviceType,{desiredState:zi.desiredState,runtimeMode:zi.runtimeMode,version:zi.version,config:$e(zi.configJson,`config сервиса`),environment:$e(zi.environmentJson,`environment сервиса`)}),`Желаемое состояние сервиса обновлено.`),children:`Задать желаемое состояние`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Отчеты сервисов`}),(0,E.jsx)(`div`,{className:`stack`,children:j.map(e=>(0,E.jsxs)(`div`,{className:`workloadBlock`,children:[(0,E.jsx)(`strong`,{children:e.name}),(nt[e.id]||[]).length===0?(0,E.jsx)(`p`,{className:`muted`,children:`Статус пока не получен.`}):(0,E.jsx)(N,{columns:[`сервис`,`состояние`,`runtime`,`наблюдение`],rows:(nt[e.id]||[]).map(e=>[e.service_type,e.reported_state,e.runtime_mode,V(e.observed_at)])})]},e.id))})]})]}),C===`fabric`&&(0,E.jsxs)(`section`,{className:`fabricTransportView`,children:[(0,E.jsxs)(`article`,{className:`card fabricMapCard`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Транспортный слой Fabric`}),(0,E.jsx)(`p`,{className:`muted`,children:`Карта показывает реальные свежие QUIC-соседства и проверенные relay/route-health маршруты. Прямые связи рисуются сплошной линией, relay и route-health отделены пунктиром, чтобы не смешивать физического соседа и достижимый маршрут.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsxs)(`span`,{className:`pill good`,children:[`direct `,bt.length]}),(0,E.jsx)(`span`,{className:`pill`,children:go.label}),(0,E.jsx)(_e,{value:co?.synthetic_links_enabled?`enabled`:`disabled`})]})]}),(0,E.jsx)(Ee,{nodes:j,links:bt,heartbeatsByNode:st,rolesByNode:Je,workloadsByNode:nt,labels:J,emptyText:J.noLinks}),(0,E.jsxs)(`details`,{className:`sectionBlock fabricDiagnostics`,children:[(0,E.jsx)(`summary`,{children:`Диагностика transport/runtime receivers`}),(0,E.jsxs)(`div`,{className:`signalStrip compact`,children:[(0,E.jsx)(ge,{label:`Synthetic configs`,value:`${uo}/${j.length}`}),(0,E.jsx)(ge,{label:`Routes`,value:String(fo)}),(0,E.jsx)(ge,{label:`Endpoints / candidates`,value:`${po}/${mo}`}),(0,E.jsx)(ge,{label:`Scoped production`,value:ho===0?`false`:`true:${ho}`})]}),(0,E.jsx)(N,{columns:[`узел`,`status`,`reason`,`trusted keys`,`service classes`,`QUIC addr`,`ошибка`],rows:j.map(e=>{let t=F(st[e.id]?.[0]?.metadata?.web_ingress_runtime_receiver_report),n=ze(st[e.id]?.[0]),r=t?Yt(t.service_classes):[],i=Ve(Je[e.id]||[]),a=i.length>0&&!i.every(e=>r.includes(e));return[e.name,(0,E.jsx)(`span`,{className:`pill ${n===`ready`?`good`:n===`degraded`?`warn`:n===`blocked`?`bad`:``}`,children:n}),t?I(t,`reason`,`н/д`):`no report`,t?String(Ot(t,`trusted_key_count`)):`0`,(0,E.jsx)(`span`,{className:a?`pill warn`:``,children:t&&r.join(`, `)||`н/д`}),t?I(t,`quic_fabric_listen_addr`,`н/д`):`н/д`,a?`expected: ${i.join(`, `)}`:t&&(I(t,`quic_fabric_error`,``)||I(t,`error`,``))||`—`]})})]})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Synthetic mesh config`}),(0,E.jsx)(`p`,{className:`muted`,children:`Node-scoped config from the Control/API layer. Endpoint candidates and scoring inputs are visible to the platform owner only; production forwarding for service traffic must remain disabled here.`})]}),(0,E.jsxs)(`span`,{className:ho===0?`pill good`:`pill bad`,children:[`production_forwarding=`,ho===0?`false`:`true`]})]}),(0,E.jsx)(N,{columns:[`узел`,`config`,`routes`,`peer endpoints`,`candidates`,`peer dir`,`recovery seeds`,`rendezvous leases`,`relay policy`,`path decisions`,`authority`,`scoped production`],rows:j.map(e=>{let t=Tt[e.id];return[e.name,t?t.enabled?`enabled`:`disabled`:`не загружен`,String(t?.routes.length??0),String(Object.keys(t?.peer_endpoints||{}).length),String(t?Lt(t):0),String(t?.peer_directory?.length??0),String(t?.recovery_seeds?.length??0),String(t?.rendezvous_leases?.length??0),Rt(t),zt(t),t?.authority_required?B(t.authority_signature?.key_fingerprint):`не требуется`,t?.production_forwarding?`true`:`false`]})}),(0,E.jsx)(`p`,{className:`muted`,children:`Health-aware scoring не выбирает service route и не открывает service-соединения. C17Z19 показывает управляющий route/path decisions, route generation status, synthetic route-health effective path и relay feedback scoring, но не переносит RDP/VPN/file/video/service payload.`})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Route intents lifecycle`}),(0,E.jsx)(`p`,{className:`muted`,children:`Operator view for temporary fabric routes. Expired and disabled intents are not emitted into node-scoped synthetic config.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsxs)(`span`,{className:`pill good`,children:[`active `,_o.length]}),(0,E.jsxs)(`span`,{className:vo.length>0?`pill warn`:`pill`,children:[`expired `,vo.length]}),(0,E.jsxs)(`span`,{className:`pill`,children:[`disabled `,yo.length]})]})]}),(0,E.jsx)(N,{columns:[`route`,`life`,`service`,`priority`,`source`,`destination`,`expires`,`updated`,`actions`],rows:P.slice(0,120).map(e=>{let t=pt(e);return[B(e.id),(0,E.jsx)(`span`,{className:`pill ${mt(e)}`,children:t}),e.service_class,String(e.priority),ht(e.source_selector||{}),ht(e.destination_selector||{}),e.policy_expires_at?V(e.policy_expires_at):`нет`,V(e.updated_at),(0,E.jsxs)(`div`,{className:`inlineActions`,children:[t===`active`?(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>q.expireRouteIntent(T,e.id,`operator expired stale route intent`),`Route intent expired.`),children:`expire`}):(0,E.jsx)(`span`,{className:`muted`,children:`expire`}),t===`disabled`?(0,E.jsx)(`span`,{className:`muted`,children:`disable`}):(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>q.disableRouteIntent(T,e.id,`operator disabled route intent`),`Route intent disabled.`),children:`disable`})]})]})}),P.length===0&&(0,E.jsx)(ye,{title:`Route intents отсутствуют`,text:`Нет настроенных fabric route intents для текущего кластера.`})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Service-channel route feedback`}),(0,E.jsx)(`p`,{className:`muted`,children:`Cluster-level runtime feedback from the shared fabric channel. Fenced and no-alternate cases affect route selection for any service class.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsxs)(`span`,{className:xo.length>0?`pill bad`:`pill good`,children:[`fenced `,xo.length]}),(0,E.jsxs)(`span`,{className:So.length>0?`pill warn`:`pill`,children:[`degraded `,So.length]}),(0,E.jsxs)(`span`,{className:Do.length>0?`pill warn`:`pill`,children:[`retry `,Do.length]}),(0,E.jsxs)(`span`,{className:wo.length>0?`pill warn`:`pill`,children:[`recovered `,wo.length]}),(0,E.jsxs)(`span`,{className:To.length>0?`pill good`:`pill`,children:[`promoted `,To.length]}),(0,E.jsxs)(`span`,{className:Eo.length>0?`pill bad`:`pill`,children:[`demoted `,Eo.length]}),(0,E.jsxs)(`span`,{className:`pill good`,children:[`healthy `,Co.length]}),(0,E.jsxs)(`span`,{className:ko.length>0?`pill bad`:`pill`,children:[`no alternate `,ko.length]}),(0,E.jsxs)(`span`,{className:Io.length>0?`pill warn`:`pill`,children:[`hysteresis `,Io.length]}),(0,E.jsxs)(`span`,{className:Lo.length>0?`pill good`:`pill`,children:[`promoted paths `,Lo.length]}),(0,E.jsxs)(`span`,{className:Ro.length>0?`pill bad`:`pill`,children:[`demoted paths `,Ro.length]}),(0,E.jsxs)(`span`,{className:(jn?.fingerprint||``).length>0?`pill good`:`pill warn`,children:[`policy fp `,jn?.fingerprint?B(jn.fingerprint):`нет`]}),(0,E.jsxs)(`span`,{className:jo.length>Mo.length?`pill warn`:`pill good`,children:[`rebuild `,Mo.length,`/`,jo.length]}),(0,E.jsxs)(`span`,{className:Po.length>0?`pill warn`:`pill good`,children:[`ledger `,No.length,`/`,It.length]}),(0,E.jsxs)(`span`,{className:Fo.length>0?`pill bad`:`pill good`,children:[`guard `,Fo.length]}),(0,E.jsx)(`span`,{className:Tn?`pill info`:`pill`,children:Tn?`deep ledger`:`fast ledger`})]})]}),ko.length>0&&(0,E.jsx)(`div`,{className:`noticePanel`,children:`Есть service-channel route без unfenced alternate. Для production-сервиса это означает деградацию: fabric не нашел безопасную замену и будет ждать нового маршрута или операторского решения.`}),pn&&(0,E.jsxs)(`div`,{className:`noticePanel ${pn.status===`blocked`?`badPanel`:`goodPanel`}`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Fabric schema preflight`}),(0,E.jsx)(`p`,{className:`muted`,children:`Backend/runtime compatibility check for manual deploys before diagnostics or service channels depend on new DB fields.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${pn.status===`blocked`?`bad`:`good`}`,children:H(pn.status)}),(0,E.jsxs)(`span`,{className:pn.missing_check_count>0?`pill bad`:`pill good`,children:[pn.passed_check_count,`/`,pn.required_check_count]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void Ha(),disabled:Vr,children:`warm snapshots`})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`reason`,value:H(pn.reason)}),(0,E.jsx)(A,{label:`required`,value:pn.required_migration}),(0,E.jsx)(A,{label:`missing`,value:(pn.missing_checks||[]).map(e=>e.check_id).slice(0,4).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`action`,value:pn.recommended_operator_action||`schema is compatible`}),vn&&(0,E.jsx)(A,{label:`warmup`,value:`warmed ${vn.warmed_count}, fresh ${vn.already_fresh_count}, missing ${vn.missing_snapshot_count}, stale ${vn.stale_snapshot_count}, deferred ${vn.deferred_stale_count}, errors ${vn.error_count}`})]})]}),hn&&(0,E.jsxs)(`div`,{className:`noticePanel ${hn.status===`degraded`?`warnPanel`:`goodPanel`}`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Snapshot maintenance`}),(0,E.jsx)(`p`,{className:`muted`,children:`Auto-warmup visibility for rebuild snapshot cache after node heartbeats.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${hn.status===`degraded`?`warn`:`good`}`,children:H(hn.status)}),(0,E.jsxs)(`span`,{className:hn.overdue_missing_snapshot_count>0?`pill bad`:`pill good`,children:[`overdue `,hn.overdue_missing_snapshot_count]}),(0,E.jsxs)(`span`,{className:hn.auto_warmup_error_count>0?`pill bad`:`pill good`,children:[`auto errors `,hn.auto_warmup_error_count]})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`reason`,value:H(hn.reason)}),(0,E.jsx)(A,{label:`snapshots`,value:`valid ${hn.valid_snapshot_count}, missing ${hn.missing_snapshot_count}, attempts ${hn.recent_attempt_count}`}),(0,E.jsx)(A,{label:`auto-warmup`,value:`events ${hn.auto_warmup_event_count}, warmed ${hn.auto_warmup_warmed_count}, fresh ${hn.auto_warmup_already_fresh_count}, latest ${V(hn.latest_auto_warmup_at)}`}),(0,E.jsx)(A,{label:`guard`,value:`age ${hn.min_age_seconds}s, heartbeats ${hn.heartbeat_threshold}`}),(0,E.jsx)(A,{label:`action`,value:hn.recommended_operator_action||`snapshot maintenance is current`})]}),(hn.nodes||[]).length>0&&(0,E.jsx)(N,{columns:[`node`,`snapshots`,`heartbeat`,`auto-warmup`,`latest`],rows:(hn.nodes||[]).slice(0,6).map(e=>[L(j,e.node_id),(0,E.jsxs)(`span`,{className:e.overdue_missing_snapshot_count>0?`pill bad`:e.missing_snapshot_count>0?`pill warn`:`pill good`,children:[e.valid_snapshot_count,`/`,e.recent_attempt_count,` overdue `,e.overdue_missing_snapshot_count]}),e.heartbeat_after_attempt_count,`${e.auto_warmup_warmed_count}/${e.auto_warmup_event_count} errors ${e.auto_warmup_error_count}`,V(e.latest_auto_warmup_at||e.last_heartbeat_at)])})]}),bn&&(0,E.jsxs)(`div`,{className:`noticePanel ${bn.status===`degraded`?`warnPanel`:`goodPanel`}`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Service-channel leases`}),(0,E.jsx)(`p`,{className:`muted`,children:`Durable compatibility lease records for introspection after backend restarts.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${bn.status===`degraded`?`warn`:`good`}`,children:H(bn.status)}),(0,E.jsxs)(`span`,{className:`pill good`,children:[`active `,bn.active_count]}),(0,E.jsxs)(`span`,{className:bn.expired_count>0?`pill warn`:`pill`,children:[`expired `,bn.expired_count]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void Ua(),disabled:Vr,children:`cleanup`})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`reason`,value:H(bn.reason)}),(0,E.jsx)(A,{label:`scanned`,value:`${bn.scanned_count}/${bn.window_limit}`}),(0,E.jsx)(A,{label:`deleted`,value:String(bn.deleted_expired_count||0)}),(0,E.jsx)(A,{label:`action`,value:bn.recommended_operator_action||`lease maintenance is current`})]}),(bn.leases||[]).length>0&&(0,E.jsx)(N,{columns:[`expires`,`resource`,`entry`,`exit`,`route`,`data plane`,`state`],rows:(bn.leases||[]).slice(0,8).map(e=>[V(e.expires_at),e.resource_id||B(e.channel_id),L(j,e.selected_entry_node_id||``),L(j,e.selected_exit_node_id||``),e.primary_route_id?`${B(e.primary_route_id)} / ${H(e.primary_route_status||``)}`:`backend fallback`,`${H(e.data_plane?.working_data_transport||`unknown`)} / ${H(e.data_plane?.backend_relay_policy||`unknown`)}`,(0,E.jsx)(`span`,{className:`pill ${e.expired||e.force_backend_fallback?`warn`:`good`}`,children:e.expired?`expired`:e.force_backend_fallback?`fallback`:H(e.status)})])})]}),R&&(0,E.jsxs)(`div`,{className:`noticePanel ${R.status===`degraded`?`warnPanel`:`goodPanel`}`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Service-channel access`}),(0,E.jsx)(`p`,{className:`muted`,children:`Live accepted_by visibility from node telemetry and heartbeat metadata.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${R.status===`degraded`?`warn`:`good`}`,children:H(R.status)}),(0,E.jsxs)(`span`,{className:`pill good`,children:[`accepted `,R.total_accepted]}),(0,E.jsxs)(`span`,{className:R.backend_fallback_count>0?`pill warn`:`pill`,children:[`backend `,R.backend_fallback_count]}),(0,E.jsxs)(`span`,{className:(R.backend_fallback_blocked_count||0)>0?`pill bad`:`pill`,children:[`blocked `,R.backend_fallback_blocked_count||0]}),(0,E.jsxs)(`span`,{className:`pill ${R.last_working_data_transport===`fabric_service_channel`?`good`:R.data_plane_contract_count?`warn`:``}`,children:[`data-plane `,R.data_plane_contract_count||0]}),(0,E.jsxs)(`span`,{className:`pill ${R.last_backend_relay_policy===`disabled`?`good`:R.last_backend_relay_policy===`degraded_fallback_only`?`info`:``}`,children:[`relay `,H(R.last_backend_relay_policy||`unknown`)]}),(0,E.jsxs)(`span`,{className:R.degraded_fallback_channel_count>0||R.degraded_route_count>0?`pill warn`:`pill good`,children:[`channels `,R.active_channel_count]}),(0,E.jsxs)(`span`,{className:R.no_safe_recovery_decision_count?`pill warn`:R.route_decision_channel_count?`pill info`:`pill`,children:[`decisions `,R.route_decision_channel_count||0,R.replacement_decision_count?` / repl ${R.replacement_decision_count}`:``,R.applied_rebuild_decision_count?` / applied ${R.applied_rebuild_decision_count}`:``,R.recovery_decision_count?` / recovery ${R.recovery_decision_count}`:``,R.no_safe_recovery_decision_count?` / no-safe ${R.no_safe_recovery_decision_count}`:``]}),(0,E.jsx)(`span`,{className:`pill ${nr(R.flow_health_status,R.flow_dropped)}`,children:er(R.traffic_class_counts)}),(0,E.jsxs)(`span`,{className:`pill ${nr(R.flow_health_status,R.flow_dropped)}`,children:[`flow `,H(R.flow_health_status||`healthy`)]}),(0,E.jsxs)(`span`,{className:`pill ${R.adaptive_backpressure_active?`info`:`good`}`,children:[`windows `,tr(R.recommended_parallel_windows)]})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`reason`,value:H(R.reason)}),(0,E.jsx)(A,{label:`reporting nodes`,value:`${R.reporting_node_count}/${R.node_count}`}),(0,E.jsx)(A,{label:`accepted by`,value:`signed ${R.signed_accepted}, introspection ${R.introspection_accepted}, legacy ${R.legacy_unsigned_accepted}`}),(0,E.jsx)(A,{label:`data plane`,value:`${R.data_plane_contract_count||0} contracts, mode ${H(R.last_data_plane_mode||`unknown`)}, working ${H(R.last_working_data_transport||`unknown`)}, steady ${H(R.last_steady_state_transport||`unknown`)}, relay ${H(R.last_backend_relay_policy||`unknown`)}, flows ${H(R.last_logical_flow_mode||`unknown`)}, blocked ${R.backend_fallback_blocked_count||0}, route failures ${R.fabric_route_send_failure_count||0}`}),(0,E.jsx)(A,{label:`data-plane violation`,value:R.last_data_plane_violation_status?`${H(R.last_data_plane_violation_status)} / ${R.last_data_plane_violation_reason||`n/a`}`:`none`}),(0,E.jsx)(A,{label:`active channels`,value:`${R.active_channel_count||0}, fallback ${R.degraded_fallback_channel_count||0}, correlated routes ${R.correlated_route_count||0}, degraded routes ${R.degraded_route_count||0}`}),(0,E.jsx)(A,{label:`route decisions`,value:`channels ${R.route_decision_channel_count||0}, replacement ${R.replacement_decision_count||0}, applied ${R.applied_rebuild_decision_count||0}, recovery ${R.recovery_decision_count||0}, no-safe ${R.no_safe_recovery_decision_count||0}`}),(0,E.jsx)(A,{label:`flow QoS`,value:`${H(R.flow_health_status||`healthy`)} / ${H(R.flow_health_reason||`flow_health_ready`)}, ${er(R.traffic_class_counts)}, flows ${R.flow_channel_count||0}, in-flight ${R.flow_max_in_flight||0}, dropped ${R.flow_dropped||0}`}),(0,E.jsx)(A,{label:`adaptive windows`,value:`${R.adaptive_backpressure_active?H(R.adaptive_backpressure_reason||`adaptive`):`off`}, ${tr(R.recommended_parallel_windows)}, policy ${R.adaptive_policy_fingerprint?B(R.adaptive_policy_fingerprint):`n/a`}`}),(0,E.jsx)(A,{label:`latest accepted`,value:V(R.latest_accepted_at)}),(0,E.jsx)(A,{label:`action`,value:R.recommended_operator_action||`access telemetry is current`})]}),(R.active_channels||[]).length>0&&(0,E.jsx)(N,{columns:[`resource`,`entry -> exit`,`route`,`decision`,`entry access`,`data plane`,`flow health`,`windows`,`flow QoS`,`route quality`,`remediation`,`guard`,`execution`,`expires`],rows:(R.active_channels||[]).slice(0,10).map(e=>[e.resource_id||B(e.channel_id),`${L(j,e.selected_entry_node_id||``)} -> ${L(j,e.selected_exit_node_id||``)}`,e.primary_route_id?`${B(e.primary_route_id)} / ${H(e.primary_route_status||``)}`:`backend fallback`,(0,E.jsx)(`span`,{className:`pill ${ir(e.route_decision_source,e.route_decision_rebuild_status,e.route_decision_score_reasons)}`,children:e.route_decision_source?`${H(e.route_decision_source)}${e.route_decision_route_id?` ${B(e.route_decision_route_id)}`:``}${e.route_decision_replacement_route_id?` -> ${B(e.route_decision_replacement_route_id)}`:``}${e.route_decision_rebuild_status?` / ${H(e.route_decision_rebuild_status)}`:``}`:`n/a`}),`accepted ${e.entry_node_total_accepted}, introspection ${e.entry_node_introspection_accepted}, backend ${e.entry_node_backend_fallback_count}`,(0,E.jsx)(`span`,{className:`pill ${e.entry_node_last_working_data_transport===`fabric_service_channel`?`good`:e.entry_node_data_plane_contract_count?`warn`:``}`,children:`${e.entry_node_data_plane_contract_count||0} / ${H(e.entry_node_last_working_data_transport||`unknown`)} / ${H(e.entry_node_last_backend_relay_policy||`unknown`)}${e.entry_node_backend_fallback_blocked_count?` / blocked ${e.entry_node_backend_fallback_blocked_count}`:``}`}),(0,E.jsxs)(`span`,{className:`pill ${nr(e.entry_node_flow_health_status,e.entry_node_flow_dropped)}`,children:[H(e.entry_node_flow_health_status||`healthy`),e.entry_node_flow_health_reason?` / ${H(e.entry_node_flow_health_reason)}`:``]}),(0,E.jsx)(`span`,{className:`pill ${e.entry_node_adaptive_backpressure_active?`info`:`good`}`,children:tr(e.entry_node_recommended_parallel_windows)}),(0,E.jsxs)(`span`,{className:`pill ${nr(e.entry_node_flow_health_status,e.entry_node_flow_dropped)}`,children:[er(e.entry_node_traffic_class_counts),` / flows ${e.entry_node_flow_channel_count||0} / in ${e.entry_node_flow_max_in_flight||0}`]}),(0,E.jsx)(`span`,{className:`pill ${e.force_backend_fallback||e.route_feedback_status===`degraded`||e.route_feedback_status===`fenced`?`warn`:e.route_feedback_status?`good`:``}`,children:e.force_backend_fallback?`backend fallback`:e.route_feedback_status?`${H(e.route_feedback_status)} / ${e.last_send_duration_ms||0}ms / q ${e.route_quality_window_sample_count||0}`:`no route feedback`}),(0,E.jsx)(`span`,{className:`pill ${e.remediation_action===`none`?`good`:e.remediation_action===`prefer_alternate_route`?`warn`:e.remediation_action?`bad`:``}`,children:e.remediation_action?`${e.remediation_command?`cmd `:``}${H(e.remediation_action)}${e.remediation_command?.replacement_route_id?` -> ${B(e.remediation_command.replacement_route_id)}`:e.remediation_route_id?` -> ${B(e.remediation_route_id)}`:``}`:`n/a`}),(0,E.jsxs)(`span`,{className:`pill ${e.remediation_guard_status===`rejected`?`bad`:e.pool_policy_fingerprint?`good`:``}`,children:[e.remediation_guard_status?H(e.remediation_guard_status):e.pool_policy_fingerprint?`pool policy`:`n/a`,e.remediation_guard_reason?` / ${H(e.remediation_guard_reason)}`:``]}),(0,E.jsxs)(`span`,{className:`pill ${rr(e.remediation_execution_status)}`,children:[e.remediation_execution_status?H(e.remediation_execution_status):`n/a`,e.remediation_execution_generation?` / ${B(e.remediation_execution_generation)}`:``,e.remediation_execution_reason?` / ${H(e.remediation_execution_reason)}`:``]}),V(e.expires_at)])}),(R.nodes||[]).length>0&&(0,E.jsx)(N,{columns:[`node`,`accepted`,`signed`,`introspection`,`legacy`,`backend`,`data plane`,`flow health`,`windows`,`flow QoS`,`latest`],rows:(R.nodes||[]).slice(0,10).map(e=>[L(j,e.node_id)||e.node_name||B(e.node_id),e.total_accepted,e.signed_accepted,e.introspection_accepted,e.legacy_unsigned_accepted,(0,E.jsx)(`span`,{className:e.backend_fallback_count>0?`pill warn`:`pill`,children:e.backend_fallback_count}),(0,E.jsx)(`span`,{className:`pill ${e.last_working_data_transport===`fabric_service_channel`?`good`:e.data_plane_contract_count?`warn`:``}`,children:`${e.data_plane_contract_count||0} / ${H(e.last_working_data_transport||`unknown`)} / ${H(e.last_backend_relay_policy||`unknown`)}${e.backend_fallback_blocked_count?` / blocked ${e.backend_fallback_blocked_count}`:``}`}),(0,E.jsxs)(`span`,{className:`pill ${nr(e.flow_health_status,e.flow_dropped)}`,children:[H(e.flow_health_status||`healthy`),e.flow_health_reason?` / ${H(e.flow_health_reason)}`:``]}),(0,E.jsx)(`span`,{className:`pill ${e.adaptive_backpressure_active?`info`:`good`}`,children:tr(e.recommended_parallel_windows)}),(0,E.jsxs)(`span`,{className:`pill ${nr(e.flow_health_status,e.flow_dropped)}`,children:[er(e.traffic_class_counts),` / flows ${e.flow_channel_count||0} / in ${e.flow_max_in_flight||0}`]}),V(e.last_accepted_at||e.observed_at)])})]}),dn&&(0,E.jsxs)(`div`,{className:`noticePanel ${dn.status===`blocked`?`badPanel`:dn.status===`degraded`?`warnPanel`:`goodPanel`}`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Fabric service-channel readiness`}),(0,E.jsx)(`p`,{className:`muted`,children:`Verdict for production service-channel use. Working service payloads should not depend on this fabric while the gate is blocked.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${dn.status===`blocked`?`bad`:dn.status===`degraded`?`warn`:`good`}`,children:H(dn.status)}),(0,E.jsxs)(`span`,{className:dn.active_alert_count>0?`pill bad`:`pill`,children:[`active `,dn.active_alert_count]}),(0,E.jsxs)(`span`,{className:dn.resurfaced_count>0?`pill bad`:`pill`,children:[`resurfaced `,dn.resurfaced_count]})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`reason`,value:H(dn.reason)}),(0,E.jsx)(A,{label:`blocking`,value:(dn.blocking_reasons||[]).map(H).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`degraded`,value:(dn.degraded_reasons||[]).map(H).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`missing/post`,value:`transition ${dn.missing_transition_count}, route-gen ${dn.missing_route_generation_count}, traffic ${dn.missing_post_rebuild_traffic_count}`})]})]}),Cn.length>0&&(0,E.jsxs)(`div`,{className:`subPanel`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Rebuild incidents`}),(0,E.jsx)(`p`,{className:`muted`,children:`Grouped recent rebuild attempts by reporter, route, service, generation, and guard. Open an incident to load the exact deep ledger slice.`})]}),(0,E.jsx)(`span`,{className:`pill`,children:Cn.length})]}),(0,E.jsx)(N,{columns:[`last`,`source`,`reporter`,`route`,`service`,`guard`,`count`,`replacement`,`action`],rows:Cn.slice(0,10).map(e=>[V(e.last_seen_at),e.incident_source?H(e.incident_source):`ledger`,L(j,e.reporter_node_id),B(e.route_id),e.service_class,(0,E.jsxs)(`span`,{className:`pill ${e.alert_resurfaced||e.guard_severity===`bad`?`bad`:e.guard_severity===`warn`?`warn`:`good`}`,children:[H(e.guard_status),e.alert_silenced?` / silenced`:e.alert_resurfaced?` / resurfaced`:``]}),String(e.attempt_count),e.latest_replacement_route_id?B(e.latest_replacement_route_id):`нет`,(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsxs)(`span`,{children:[H(e.recommended_operator_action||`inspect`),e.alert_resurfaced&&e.alert_resurfaced_cause?` (${H(e.alert_resurfaced_cause)})`:``,e.alert_resurfaced&&e.alert_resurfaced_previous_generation?` from ${B(e.alert_resurfaced_previous_generation)} until ${V(e.alert_resurfaced_previous_until)}`:``]}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Wa(e),`Deep rebuild investigation opened.`),children:`open deep`}),e.alert_silenced?(0,E.jsx)(`span`,{className:`muted`,children:`silenced`}):(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Ya(e),`Rebuild incident silenced for 6 hours.`),children:`silence 6h`})]})])})]}),(Nn||Fa.length>0)&&(0,E.jsxs)(`div`,{className:`subPanel`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Recent investigations`}),(0,E.jsx)(`p`,{className:`muted`,children:`Recent operator drilldowns opened from rebuild incidents or feedback breakdown rows.`})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill info`,children:jr?.total_count||Fa.length}),(0,E.jsxs)(`span`,{className:`pill good`,children:[`linked `,jr?.correlated_count||0]}),(0,E.jsxs)(`span`,{className:(jr?.not_visible_count||0)>0?`pill warn`:`pill`,children:[`not visible `,jr?.not_visible_count||0]}),Object.entries(jr?.counts_by_breadcrumb_status||{}).map(([e,t])=>(0,E.jsxs)(`span`,{className:e===`current`?`pill good`:e===`stale`?`pill warn`:`pill bad`,children:[H(e),` `,t]},e)),Object.entries(jr?.counts_by_current_diagnostic_status||{}).slice(0,3).map(([e,t])=>(0,E.jsxs)(`span`,{className:e===`breakdown_active`||e===`incident_visible`?`pill good`:e===`not_visible`?`pill warn`:`pill`,children:[H(e),` `,t]},e))]})]}),Nn&&(0,E.jsxs)(`div`,{className:`inlineForm`,children:[(0,E.jsxs)(`label`,{children:[`current window, sec`,(0,E.jsx)(`input`,{type:`number`,min:`60`,value:ti.currentWindowSeconds,onChange:e=>ni(t=>({...t,currentWindowSeconds:e.target.value}))})]}),(0,E.jsxs)(`label`,{children:[`history window, sec`,(0,E.jsx)(`input`,{type:`number`,min:`60`,value:ti.historyWindowSeconds,onChange:e=>ni(t=>({...t,historyWindowSeconds:e.target.value}))})]}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(async()=>{Ln(await q.updateFabricServiceChannelBreadcrumbWindowPolicy(T,{currentWindowSeconds:Number(ti.currentWindowSeconds),historyWindowSeconds:Number(ti.historyWindowSeconds)}));let e=await q.getFabricServiceChannelRebuildInvestigationBreadcrumbs(T,{limit:20});Ar(e.events),Mr(e.summary||null)},`Breadcrumb window policy updated.`),children:`apply windows`}),(0,E.jsxs)(`span`,{className:`muted`,children:[`source `,Nn.source,`, fp `,B(Nn.fingerprint||``)]})]}),jr&&(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`latest`,value:V(jr.latest_at)}),(0,E.jsx)(A,{label:`windows`,value:`${Nn?.current_window_seconds||`n/a`}s current / ${Nn?.history_window_seconds||`n/a`}s history`}),(0,E.jsx)(A,{label:`sources`,value:Object.entries(jr.counts_by_feedback_source||{}).slice(0,3).map(([e,t])=>`${H(e)} ${t}`).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`violations`,value:Object.entries(jr.counts_by_feedback_violation_status||{}).slice(0,3).map(([e,t])=>`${H(e)} ${t}`).join(`, `)||`нет`})]}),(0,E.jsx)(N,{columns:[`time`,`freshness`,`source`,`feedback`,`target`,`current`,`actor`,`reason`],rows:Fa.map(e=>{let t=F(e.payload)||{},n=I(t,`feedback_channel_id`,``),r=I(t,`feedback_violation_status`,``),i=I(t,`feedback_source`,``),a=I(t,`reporter_node_id`,``),o=I(t,`route_id`,``),s=I(t,`drilldown_source`,``),c=e.correlation_hints?.current_diagnostic_status||``,l=e.correlation_hints?.breadcrumb_status||`current`,u=e.correlation_hints?.breadcrumb_age_seconds,d=e.correlation_hints?.feedback_breakdown||Ka(e),f=e.correlation_hints?.rebuild_incident||qa(e);return[V(e.created_at),(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{className:l===`current`?`pill good`:l===`stale`?`pill warn`:`pill bad`,children:H(l)}),(0,E.jsx)(`span`,{className:`muted`,children:Xn(u)})]}),(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:e.event_type.includes(`feedback_breakdown`)?`feedback breakdown`:`incident`}),(0,E.jsx)(`span`,{className:`muted`,children:H(s||e.target_type)})]}),i||n||r?(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:H(i||`feedback`)}),(0,E.jsx)(`span`,{className:`muted`,children:n?`ch ${B(n)}`:`any channel`}),(0,E.jsx)(`span`,{className:`muted`,children:H(r||`any violation`)})]}):(0,E.jsx)(`span`,{className:`muted`,children:`нет`}),(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:a?L(j,a):`any reporter`}),(0,E.jsx)(`span`,{className:`muted`,children:o?B(o):e.target_id?B(e.target_id):`any route`})]}),d?(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsx)(`span`,{className:d.active_bad_count?`pill bad`:d.active_warn_count?`pill warn`:`pill good`,children:H(c||`breakdown_active`)}),(0,E.jsxs)(`span`,{className:`muted`,children:[`bad `,d.active_bad_count||0,` / warn `,d.active_warn_count||0]}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Ja(d),`Rebuild ledger opened for current feedback breakdown.`),children:`open`})]}):f?(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsx)(`span`,{className:`pill ${f.guard_severity===`bad`?`bad`:f.guard_severity===`warn`?`warn`:`good`}`,children:H(c||`incident_visible`)}),(0,E.jsx)(`span`,{className:`muted`,children:H(f.guard_status)}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Wa(f),`Deep rebuild investigation opened for current incident.`),children:`open`})]}):(0,E.jsx)(`span`,{className:`muted`,children:H(c||`not_visible`)}),e.actor_user_id?B(e.actor_user_id):`system`,I(t,`reason`,`operator opened investigation`)]})})]}),$t.length>0&&(0,E.jsxs)(`div`,{className:`subPanel`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Active rebuild silences`}),(0,E.jsx)(`p`,{className:`muted`,children:`Operator acknowledgements currently suppressing rebuild/access-decision alerts. Remove a silence to let the incident become active again.`})]}),(0,E.jsx)(`span`,{className:`pill info`,children:$t.length})]}),(0,E.jsx)(N,{columns:[`until`,`source`,`channel`,`reporter`,`route`,`guard`,`reason`,`action`],rows:$t.slice(0,10).map(e=>[V(e.expires_at),e.incident_source?H(e.incident_source):`ledger`,e.channel_id?B(e.channel_id):`нет`,L(j,e.reporter_node_id),B(e.display_route_id||e.route_id),H(e.guard_status),e.reason||`acknowledged`,(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Xa(e),`Rebuild alert silence removed.`),children:`unsilence`})])})]}),Jt&&(0,E.jsxs)(`div`,{className:`subPanel`,children:[(0,E.jsxs)(`div`,{className:`cardHead compact`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h4`,{children:`Rebuild health`}),(0,E.jsxs)(`p`,{className:`muted`,children:[`Сводка по последним `,Jt.total_attempts,` rebuild попыткам. Данные помогают быстро увидеть, где backend уже принял решение, но node-agent или post-rebuild traffic не подтвердили результат.`]})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsxs)(`span`,{className:`pill good`,children:[`ok `,Jt.good_count]}),(0,E.jsxs)(`span`,{className:Jt.active_warn_count>0?`pill warn`:`pill`,children:[`warn `,Jt.active_warn_count,`/`,Jt.warn_count]}),(0,E.jsxs)(`span`,{className:Jt.active_bad_count>0?`pill bad`:`pill`,children:[`bad `,Jt.active_bad_count,`/`,Jt.bad_count]}),(0,E.jsxs)(`span`,{className:Jt.resurfaced_count>0?`pill bad`:`pill`,children:[`resurfaced `,Jt.resurfaced_count]}),(0,E.jsxs)(`span`,{className:Jt.silenced_count>0?`pill info`:`pill`,children:[`silenced `,Jt.silenced_count]}),(0,E.jsxs)(`span`,{className:`pill`,children:[`applied `,Jt.applied_count]}),(0,E.jsxs)(`span`,{className:Jt.access_no_safe_count?`pill bad`:Jt.access_route_decision_count?`pill info`:`pill`,children:[`access `,Jt.access_route_decision_count||0,Jt.access_no_safe_count?` / no-safe ${Jt.access_no_safe_count}`:``]})]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`observed`,value:V(Jt.observed_at)}),(0,E.jsx)(A,{label:`affected nodes`,value:(Jt.affected_reporter_node_ids||[]).map(e=>L(j,e)).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`affected routes`,value:(Jt.affected_route_ids||[]).map(B).join(`, `)||`нет`}),(0,E.jsx)(A,{label:`action`,value:H(Jt.recommended_operator_action||`no_operator_action_required`)})]}),(Jt.feedback_breakdowns||[]).length>0&&(0,E.jsx)(N,{columns:[`feedback`,`active`,`total`,`affected`,`incidents`,`latest`,`action`],rows:(Jt.feedback_breakdowns||[]).slice(0,8).map(e=>{let t=Ga(e);return[(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:H(e.feedback_source||`feedback`)}),(0,E.jsx)(`span`,{className:`muted`,children:e.feedback_channel_id?`ch ${B(e.feedback_channel_id)}`:`any channel`}),(0,E.jsx)(`span`,{className:`muted`,children:H(e.feedback_violation_status||`unknown`)})]}),(0,E.jsxs)(`span`,{className:e.active_bad_count?`pill bad`:e.active_warn_count?`pill warn`:`pill`,children:[`bad `,e.active_bad_count||0,` / warn `,e.active_warn_count||0]}),`total ${e.total_count} / bad ${e.bad_count||0} / warn ${e.warn_count||0} / silenced ${e.silenced_count||0}`,(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:(e.affected_reporter_node_ids||[]).map(e=>L(j,e)).join(`, `)||`нет узлов`}),(0,E.jsx)(`span`,{className:`muted`,children:(e.affected_route_ids||[]).map(B).join(`, `)||`нет routes`})]}),t.length>0?(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{className:`pill warn`,children:t.length}),(0,E.jsx)(`span`,{className:`muted`,children:t.slice(0,2).map(e=>H(e.guard_status)).join(`, `)})]}):(0,E.jsx)(`span`,{className:`muted`,children:`нет`}),V(e.latest_observed_at),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>Ja(e),`Rebuild ledger opened for feedback breakdown.`),children:`open ledger`})]})}),(Jt.most_recent_bad_attempts||[]).length>0&&(0,E.jsx)(N,{columns:[`time`,`reporter`,`route`,`guard`,`reason`],rows:(Jt.most_recent_bad_attempts||[]).slice(0,5).map(e=>[V(e.updated_at),L(j,e.reporter_node_id),B(e.route_id),(0,E.jsx)(`span`,{className:`pill bad`,children:H(e.guard_status||`bad`)}),(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsx)(`span`,{children:H(e.guard_reason||`unknown`)}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>q.silenceFabricServiceChannelRouteRebuildAlert(T,{reporterNodeId:e.reporter_node_id,routeId:e.route_id,guardStatus:e.guard_status||`unknown`,generation:e.generation||``,reason:`operator acknowledged known rebuild alert`,ttlSeconds:21600}),`Rebuild alert silenced for this route generation.`),children:`silence 6h`})]})])}),(Jt.resurfaced_attempts||[]).length>0&&(0,E.jsx)(N,{columns:[`time`,`reporter`,`route`,`guard`,`previous`,`action`],rows:(Jt.resurfaced_attempts||[]).slice(0,5).map(e=>[V(e.updated_at),L(j,e.reporter_node_id),B(e.route_id),(0,E.jsx)(`span`,{className:`pill bad`,children:H(e.guard_status||`bad`)}),`${B(e.alert_resurfaced_previous_generation)} until ${V(e.alert_resurfaced_previous_until)}`,(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsx)(`span`,{children:H(e.guard_reason||`unknown`)}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>q.silenceFabricServiceChannelRouteRebuildAlert(T,{reporterNodeId:e.reporter_node_id,routeId:e.route_id,guardStatus:e.guard_status||`unknown`,generation:e.generation||``,reason:`operator acknowledged resurfaced rebuild alert`,ttlSeconds:21600}),`Resurfaced rebuild alert silenced for this generation.`),children:`silence 6h`})]})])})]}),jn&&(0,E.jsxs)(`div`,{className:`inlineForm`,children:[(0,E.jsxs)(`label`,{children:[`penalty`,(0,E.jsx)(`input`,{type:`number`,min:`0`,value:$r.hysteresisPenalty,onChange:e=>ei(t=>({...t,hysteresisPenalty:e.target.value}))})]}),(0,E.jsxs)(`label`,{children:[`promote samples`,(0,E.jsx)(`input`,{type:`number`,min:`1`,value:$r.promotionMinSamples,onChange:e=>ei(t=>({...t,promotionMinSamples:e.target.value}))})]}),(0,E.jsxs)(`label`,{children:[`fail`,(0,E.jsx)(`input`,{type:`number`,min:`1`,value:$r.demotionFailureThreshold,onChange:e=>ei(t=>({...t,demotionFailureThreshold:e.target.value}))})]}),(0,E.jsxs)(`label`,{children:[`drop`,(0,E.jsx)(`input`,{type:`number`,min:`1`,value:$r.demotionDropThreshold,onChange:e=>ei(t=>({...t,demotionDropThreshold:e.target.value}))})]}),(0,E.jsxs)(`label`,{children:[`slow`,(0,E.jsx)(`input`,{type:`number`,min:`1`,value:$r.demotionSlowThreshold,onChange:e=>ei(t=>({...t,demotionSlowThreshold:e.target.value}))})]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:$r.demotionRebuildEnabled,onChange:e=>ei(t=>({...t,demotionRebuildEnabled:e.target.checked}))}),`rebuild`]}),(0,E.jsxs)(`label`,{className:`checkLine`,children:[(0,E.jsx)(`input`,{type:`checkbox`,checked:$r.demotionFencedEnabled,onChange:e=>ei(t=>({...t,demotionFencedEnabled:e.target.checked}))}),`fenced`]}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(async()=>{Mn(await q.updateFabricServiceChannelRecoveryPolicy(T,{hysteresisPenalty:Number($r.hysteresisPenalty),promotionMinSamples:Number($r.promotionMinSamples),demotionFailureThreshold:Number($r.demotionFailureThreshold),demotionDropThreshold:Number($r.demotionDropThreshold),demotionSlowThreshold:Number($r.demotionSlowThreshold),demotionRebuildEnabled:$r.demotionRebuildEnabled,demotionFencedEnabled:$r.demotionFencedEnabled}))},`Recovery policy updated.`),children:`apply policy`}),(0,E.jsxs)(`span`,{className:`muted`,children:[`source `,jn.source]})]}),(0,E.jsx)(N,{columns:[`route`,`reporter`,`service`,`status`,`recovery`,`score`,`reasons`,`failures`,`retry/cooldown`,`expires`,`action`],rows:bo.slice(0,80).map(e=>[B(e.route_id),L(j,e.reporter_node_id),e.service_class,(0,E.jsx)(`span`,{className:`pill ${dt(e.feedback_status)}`,children:H(e.feedback_status)}),e.recovery_state?(0,E.jsxs)(`span`,{className:`pill ${ft(e.recovery_state)}`,children:[e.recovery_demoted?`demoted ${e.recovery_reason?H(e.recovery_reason):``}`:e.recovery_promoted?`promoted`:H(e.recovery_state),e.recovery_hysteresis_penalty?` -${e.recovery_hysteresis_penalty}`:``]}):e.stale_policy||e.stale_generation?(0,E.jsx)(`span`,{className:`pill warn`,children:H(e.stale_reason||`stale`)}):e.provenance_missing?(0,E.jsx)(`span`,{className:`pill warn`,children:`provenance missing`}):`нет`,String(e.score_adjustment),(e.reasons||[]).join(`, `)||`нет`,String(e.consecutive_failures||0),e.retry_cooldown_until?V(e.retry_cooldown_until):`нет`,V(e.expires_at),e.feedback_status===`healthy`||e.feedback_status===`operator_retry_cooldown`?(0,E.jsx)(`span`,{className:`muted`,children:`нет`}):(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Y(()=>q.expireFabricServiceChannelRouteFeedback(T,{routeId:e.route_id,reporterNodeId:e.reporter_node_id,serviceClass:e.service_class,reason:`operator expired stale service-channel feedback`}),`Service-channel feedback expired.`),children:`expire`})])}),bo.length===0&&(0,E.jsx)(ye,{title:`Feedback отсутствует`,text:`Нет свежих route feedback наблюдений от fabric service-channel runtime.`}),(0,E.jsx)(N,{columns:[`local node`,`route`,`replacement`,`rebuild`,`attempt`,`feedback`,`source`,`destination`,`decision`,`score`,`expires`],rows:[...Ao,...ko,...jo].filter((e,t,n)=>n.findIndex(t=>t.decision_id===e.decision_id)===t).slice(0,80).map(e=>[L(j,e.local_node_id),B(e.route_id),e.replacement_route_id?B(e.replacement_route_id):`нет`,e.rebuild_status||`нет`,e.rebuild_attempt==null?`н/д`:String(e.rebuild_attempt),e.feedback_observation_id?(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:H(e.feedback_source||`feedback`)}),(0,E.jsxs)(`span`,{className:`muted`,children:[B(e.feedback_observation_id),` `,e.feedback_channel_id?`ch ${B(e.feedback_channel_id)}`:``]}),(0,E.jsx)(`span`,{className:`muted`,children:H(e.feedback_violation_status||``)})]}):`нет`,L(j,e.source_node_id),L(j,e.destination_node_id),e.decision_source,e.path_score==null?`н/д`:String(e.path_score),V(e.expires_at)])}),(0,E.jsxs)(`div`,{className:`inlineForm`,children:[(0,E.jsxs)(`label`,{children:[`reporter`,(0,E.jsxs)(`select`,{value:En.reporterNodeId,onChange:e=>Dn(t=>({...t,reporterNodeId:e.target.value,offset:0})),children:[(0,E.jsx)(`option`,{value:``,children:`all`}),j.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`route`,(0,E.jsx)(`input`,{value:En.routeId,onChange:e=>Dn(t=>({...t,routeId:e.target.value.trim(),offset:0})),placeholder:`route id`})]}),(0,E.jsxs)(`label`,{children:[`generation`,(0,E.jsx)(`input`,{value:En.generation,onChange:e=>Dn(t=>({...t,generation:e.target.value.trim(),offset:0})),placeholder:`route generation`})]}),(0,E.jsxs)(`label`,{children:[`service`,(0,E.jsx)(`input`,{value:En.serviceClass,onChange:e=>Dn(t=>({...t,serviceClass:e.target.value.trim(),offset:0})),placeholder:`vpn_packets`})]}),(0,E.jsxs)(`label`,{children:[`feedback source`,(0,E.jsx)(`input`,{value:En.feedbackSource,onChange:e=>Dn(t=>({...t,feedbackSource:e.target.value.trim(),offset:0})),placeholder:`fabric_service_channel_access_report`})]}),(0,E.jsxs)(`label`,{children:[`channel`,(0,E.jsx)(`input`,{value:En.feedbackChannelId,onChange:e=>Dn(t=>({...t,feedbackChannelId:e.target.value.trim(),offset:0})),placeholder:`feedback channel id`})]}),(0,E.jsxs)(`label`,{children:[`violation`,(0,E.jsx)(`input`,{value:En.feedbackViolationStatus,onChange:e=>Dn(t=>({...t,feedbackViolationStatus:e.target.value.trim(),offset:0})),placeholder:`fabric_route_send_failed_backend_fallback_blocked`})]}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Ba(Tn,{...En,offset:0}),children:`apply`}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>{let e={...ie};Dn(e),Ba(!1,e)},children:`clear`})]}),(0,E.jsx)(N,{columns:[`time`,`reporter`,`route`,`replacement`,`feedback`,`guard`,`outcome`,`backend`,`agent`,`route-gen`,`traffic`,`policy`,`hops`],rows:It.slice(0,80).map(e=>[V(e.updated_at),L(j,e.reporter_node_id),B(e.route_id),e.replacement_route_id?B(e.replacement_route_id):`нет`,e.feedback_observation_id?(0,E.jsxs)(`div`,{className:`stackedText`,children:[(0,E.jsx)(`span`,{children:H(e.feedback_source||`feedback`)}),(0,E.jsxs)(`span`,{className:`muted`,children:[B(e.feedback_observation_id),` `,e.feedback_channel_id?`ch ${B(e.feedback_channel_id)}`:``]}),(0,E.jsx)(`span`,{className:`muted`,children:H(e.feedback_violation_status||``)})]}):e.feedback_status?H(e.feedback_status):`нет`,Tn?(0,E.jsxs)(`span`,{className:`pill ${e.guard_severity===`bad`?`bad`:e.guard_severity===`warn`?`warn`:`good`}`,children:[H(e.guard_status||`unknown`),e.alert_silenced?` / silenced`:e.alert_resurfaced?` / resurfaced`:``]}):(0,E.jsx)(`span`,{className:`pill info`,children:`summary`}),H(e.outcome),(0,E.jsx)(`span`,{className:`pill ${e.rebuild_status===`applied`?`good`:`warn`}`,children:H(e.rebuild_status)}),Tn?e.node_transition_matched?(0,E.jsx)(`span`,{className:`pill ${e.node_transition_status===`applied_rebuild`?`good`:`warn`}`,children:H(e.node_transition_status||`matched`)}):(0,E.jsx)(`span`,{className:`pill warn`,children:`not seen`}):(0,E.jsx)(`span`,{className:`pill info`,children:`deep only`}),Tn?e.node_route_generation_matched?(0,E.jsx)(`span`,{className:`pill good`,children:H(e.node_route_generation_status||`seen`)}):(0,E.jsx)(`span`,{className:`pill warn`,children:`not seen`}):(0,E.jsx)(`span`,{className:`pill info`,children:`deep only`}),Tn?e.post_rebuild_selected_route_id?`${B(e.post_rebuild_selected_route_id)} packets ${e.post_rebuild_send_flow_packets||e.post_rebuild_send_packets||0} drop ${e.post_rebuild_send_flow_dropped||0}`:`нет`:`deep only`,e.policy_fingerprint?B(e.policy_fingerprint):`нет`,`${(e.old_hops||[]).map(e=>L(j,e)).join(` -> `)||`нет`} => ${(e.replacement_hops||[]).map(e=>L(j,e)).join(` -> `)||`нет`}`])}),(0,E.jsxs)(`div`,{className:`inlineActions`,children:[(0,E.jsx)(`button`,{type:`button`,className:`ghost`,onClick:()=>void Ba(!Tn,{...En,offset:0}),children:Tn?`fast ledger`:`deep ledger`}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,disabled:!Tn||En.offset<=0,onClick:()=>void Ba(!0,{...En,offset:Math.max(0,En.offset-20)}),children:`prev`}),(0,E.jsx)(`button`,{type:`button`,className:`ghost`,disabled:!Tn||It.length<20,onClick:()=>void Ba(!0,{...En,offset:En.offset+20}),children:`next`}),(0,E.jsxs)(`span`,{className:`pill`,children:[`offset `,Tn?En.offset:0]}),(0,E.jsx)(`span`,{className:`muted`,children:`Deep ledger correlates heartbeat timeline and can be slower; default refresh stays fast.`})]}),It.length===0&&(0,E.jsx)(ye,{title:`Rebuild ledger пуст`,text:`Пока нет долговечной истории service-channel route rebuild решений.`})]}),(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsx)(`h3`,{children:J.servicePlacement}),(0,E.jsx)(N,{columns:[`узел`,`runtime`,`адрес`,`здоровье`,`роли`,`желаемые / reported сервисы`,`последний heartbeat`],rows:j.map(e=>{let t=Dt(e,st[e.id]||[],bt);return[e.name,(0,E.jsx)(we,{runtime:t}),t.address,e.health_status,tt(Je[e.id]||[]),it(nt[e.id]||[]),V((st[e.id]||[])[0]?.observed_at||e.last_seen_at)]})})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:J.trafficFlow}),(0,E.jsx)(N,{columns:[`источник`,`цель`,`тип`,`route/path`,`статус`,`задержка`,`качество`,`наблюдение`],rows:yt(bt).filter(e=>e.source_node_id!==e.target_node_id).map(e=>{let t=j.find(t=>t.id===e.source_node_id),n=j.find(t=>t.id===e.target_node_id);return[(0,E.jsx)(Te,{node:t,fallback:L(j,e.source_node_id),heartbeatsByNode:st,meshLinks:bt}),(0,E.jsx)(Te,{node:n,fallback:L(j,e.target_node_id),heartbeatsByNode:st,meshLinks:bt}),xt(e),St(e,j),e.link_status,e.latency_ms==null?`н/д`:`${e.latency_ms} мс`,e.quality_score==null?`н/д`:`${e.quality_score}/100`,V(e.observed_at)]})})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Политики QoS`}),(0,E.jsx)(N,{columns:[`класс`,`приоритет`,`надежность`,`политика сброса`],rows:Rn.map(e=>[e.service_class,String(e.priority),e.reliability_mode,e.drop_policy])})]})]}),C===`vpn`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Создать желаемое состояние VPN-подключения`}),(0,E.jsx)(`p`,{className:`muted`,children:`Только Control/API слой. Здесь не выполняются TUN/TAP, маршруты, DNS, firewall, QoS или packet forwarding.`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`ID организации`,(0,E.jsx)(`input`,{value:G.organizationId,onChange:e=>Vi({...G,organizationId:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Название`,(0,E.jsx)(`input`,{value:G.name,onChange:e=>Vi({...G,name:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Протокол`,(0,E.jsxs)(`select`,{value:G.protocolFamily,onChange:e=>Vi({...G,protocolFamily:e.target.value}),children:[(0,E.jsx)(`option`,{value:`generic`,children:`generic`}),(0,E.jsx)(`option`,{value:`wireguard`,children:`wireguard`}),(0,E.jsx)(`option`,{value:`ipsec`,children:`ipsec`}),(0,E.jsx)(`option`,{value:`openvpn`,children:`openvpn`})]})]}),(0,E.jsxs)(`label`,{children:[`Желаемое состояние`,(0,E.jsxs)(`select`,{value:G.desiredState,onChange:e=>Vi({...G,desiredState:e.target.value}),children:[(0,E.jsx)(`option`,{value:`disabled`,children:`выключено`}),(0,E.jsx)(`option`,{value:`enabled`,children:`включено`})]})]}),(0,E.jsxs)(`label`,{children:[`Ссылка на credential`,(0,E.jsx)(`input`,{value:G.credentialRef,onChange:e=>Vi({...G,credentialRef:e.target.value})})]})]}),(0,E.jsxs)(`label`,{children:[`Целевой endpoint JSON`,(0,E.jsx)(`textarea`,{value:G.targetEndpointJson,onChange:e=>Vi({...G,targetEndpointJson:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Политика разрешенных узлов JSON`,(0,E.jsx)(`textarea`,{value:G.allowedNodePolicyJson,onChange:e=>Vi({...G,allowedNodePolicyJson:e.target.value})})]}),(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:`Расширенные routing / QoS / placement JSON`}),(0,E.jsxs)(`label`,{children:[`Использование маршрутизации JSON`,(0,E.jsx)(`textarea`,{value:G.routingUsageJson,onChange:e=>Vi({...G,routingUsageJson:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Политика маршрута JSON`,(0,E.jsx)(`textarea`,{value:G.routePolicyJson,onChange:e=>Vi({...G,routePolicyJson:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Политика QoS JSON`,(0,E.jsx)(`textarea`,{value:G.qosPolicyJson,onChange:e=>Vi({...G,qosPolicyJson:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Политика размещения JSON`,(0,E.jsx)(`textarea`,{value:G.placementPolicyJson,onChange:e=>Vi({...G,placementPolicyJson:e.target.value})})]})]}),(0,E.jsx)(`button`,{className:`primary`,disabled:!T||!G.organizationId||!G.name,onClick:()=>void Y(()=>q.createVPNConnection(T,{organizationId:G.organizationId,name:G.name,protocolFamily:G.protocolFamily,credentialRef:G.credentialRef||null,desiredState:G.desiredState,targetEndpoint:$e(G.targetEndpointJson,`target endpoint`),allowedNodePolicy:$e(G.allowedNodePolicyJson,`allowed node policy`),routingUsage:et(G.routingUsageJson,`routing usage`),routePolicy:$e(G.routePolicyJson,`route policy`),qosPolicy:$e(G.qosPolicyJson,`qos policy`),placementPolicy:$e(G.placementPolicyJson,`placement policy`)}),`Желаемое состояние VPN создано.`),children:`Создать желаемое состояние VPN`})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`VPN-подключения`}),(0,E.jsx)(`p`,{className:`muted`,children:`Cluster-managed состояние, gateway packet stats и диагностика Android-клиента.`})]}),(0,E.jsxs)(`div`,{className:`actions compactActions`,children:[(0,E.jsx)(`button`,{onClick:()=>void Y(async()=>{Kr(`Истекшие VPN lease: ${(await q.expireStaleVPNLeases(T)).length}.`)},`Stale VPN lease проверены.`),children:`Проверить stale lease`}),(0,E.jsx)(`button`,{onClick:()=>void $a(),children:`Обновить клиент`})]})]}),(0,E.jsxs)(`div`,{className:`inlineForm`,children:[(0,E.jsxs)(`label`,{children:[`Android device id`,(0,E.jsx)(`input`,{value:ar,placeholder:`0315f630-...`,onChange:e=>or(e.target.value),onBlur:()=>localStorage.setItem(D.vpnDiagnosticDeviceId,ar.trim())})]}),sr.length>0&&(0,E.jsxs)(`label`,{children:[`Найденные клиенты`,(0,E.jsx)(`select`,{value:ar,onChange:e=>{let t=e.target.value;or(t),localStorage.setItem(D.vpnDiagnosticDeviceId,t),ur(sr.find(e=>e.device_id===t)||null)},children:sr.map(e=>{let t=F(e.payload)||{};return(0,E.jsxs)(`option`,{value:e.device_id,children:[B(e.device_id),` / `,I(t,`app_version`,`н/д`),` / `,V(e.observed_at)]},e.device_id)})})]})]}),(0,E.jsxs)(`div`,{className:`diagnosticCommandPanel`,children:[(0,E.jsxs)(`label`,{children:[`URL для теста`,(0,E.jsx)(`input`,{value:dr,onChange:e=>fr(e.target.value)})]}),(0,E.jsxs)(`div`,{className:`actions compactActions`,children:[(0,E.jsx)(`button`,{onClick:()=>void eo({type:`refresh_profile`},`Профиль`),children:`Обновить профиль`}),(0,E.jsx)(`button`,{onClick:()=>void eo({type:`start_vpn`},`VPN`),children:`Старт VPN`}),(0,E.jsx)(`button`,{onClick:()=>void eo({type:`stop_vpn`},`VPN`),children:`Стоп VPN`}),(0,E.jsx)(`button`,{onClick:()=>void eo({type:`vpn_stats`},`Stats`),children:`Stats`}),(0,E.jsx)(`button`,{onClick:()=>void eo({type:`vpn_http_get`,url:dr},`VPN HTTP`),children:`VPN HTTP`}),(0,E.jsx)(`button`,{onClick:()=>void eo({type:`open_url`,url:dr},`Открыть URL`),children:`Открыть URL`}),(0,E.jsx)(`button`,{className:`primary`,onClick:()=>void eo({type:`full_vpn_test`,url:dr,watch_seconds:45},`Полный VPN test`),children:`Полный тест`})]}),pr&&(0,E.jsxs)(`p`,{className:`muted`,children:[`Последняя команда: `,I(pr.payload,`type`,`н/д`),` / `,V(pr.created_at)]})]}),be(lr),(0,E.jsxs)(`div`,{className:`stack`,children:[Hn.map(e=>{let t=F(e.metadata?.client_config),n=F(t?.vpn_fabric_route),r=Yt(n?.entry_pool_node_ids||e.placement_policy?.entry_node_ids),i=Yt(n?.exit_pool_node_ids||e.placement_policy?.exit_node_ids),a=String(n?.selected_entry_node_id||r[0]||``),o=String(n?.selected_exit_node_id||Wn[e.id]?.owner_node_id||e.placement_policy?.exit_node_id||i[0]||``),s=qn[e.id]||{};return(0,E.jsxs)(`div`,{className:`vpnCard`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`strong`,{children:e.name}),(0,E.jsxs)(`p`,{className:`muted`,children:[e.protocol_family,` / `,e.mode,` / организация `,B(e.organization_id)]}),(0,E.jsx)(_e,{value:e.desired_state}),(0,E.jsx)(_e,{value:e.status}),(0,E.jsx)(`span`,{className:`pill ${t?.packet_forwarding?`good`:`warn`}`,children:t?.packet_forwarding?`gateway packet relay active`:`gateway packet relay inactive`}),(0,E.jsxs)(`span`,{className:`pill`,children:[String(n?.preferred_data_plane||`backend_relay`),` / fallback `,String(n?.fallback_data_plane||`н/д`)]})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Секрет`,value:e.credential_ref?`задан`:`не задан`}),(0,E.jsx)(A,{label:`Активный lease`,value:Wn[e.id]?B(Wn[e.id]?.owner_node_id):`нет`}),(0,E.jsx)(A,{label:`Fabric route`,value:`${a?L(j,a):`entry auto`} -> ${o?L(j,o):`exit auto`}`}),(0,E.jsx)(A,{label:`Entry pool`,value:r.map(e=>L(j,e)).join(`, `)||`н/д`}),(0,E.jsx)(A,{label:`Exit pool`,value:i.map(e=>L(j,e)).join(`, `)||`н/д`}),(0,E.jsx)(A,{label:`Runtime`,value:String(t?.runtime_status||`н/д`)}),(0,E.jsx)(A,{label:`Gateway`,value:String(t?.gateway_assignment_status||`н/д`)}),(0,E.jsx)(A,{label:`Client -> gateway`,value:lt(s.client_to_gateway)}),(0,E.jsx)(A,{label:`Gateway -> client`,value:lt(s.gateway_to_client)}),(0,E.jsx)(A,{label:`Обновлено`,value:V(e.updated_at)})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{disabled:e.desired_state===`enabled`,onClick:()=>void Y(()=>q.updateVPNConnectionDesiredState(T,e.id,`enabled`),`Желаемое состояние VPN включено.`),children:`Включить`}),(0,E.jsx)(`button`,{disabled:e.desired_state===`disabled`,onClick:()=>void Y(()=>q.updateVPNConnectionDesiredState(T,e.id,`disabled`),`Желаемое состояние VPN выключено.`),children:`Выключить`})]})]},e.id)}),Hn.length===0&&(0,E.jsx)(ye,{title:`Нет желаемого состояния VPN`,text:`Control-plane записи C18 появятся здесь.`})]})]})]}),C===`org-safe`&&(0,E.jsxs)(`section`,{className:`grid two`,children:[(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Организации и пользователи`}),(0,E.jsx)(`p`,{className:`muted`,children:`Операционный слой для владельца платформы: tenant scope, роли участников и безопасная сводка без раскрытия core mesh.`})]}),(0,E.jsx)(`span`,{className:`pill`,children:hr.length})]}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Slug`,(0,E.jsx)(`input`,{value:Hi.slug,onChange:e=>Ui({...Hi,slug:e.target.value}),placeholder:`home`})]}),(0,E.jsxs)(`label`,{children:[`Название`,(0,E.jsx)(`input`,{value:Hi.name,onChange:e=>Ui({...Hi,name:e.target.value}),placeholder:`HOME`})]})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{className:`primary`,disabled:!Hi.slug.trim()||!Hi.name.trim(),onClick:()=>void Y(async()=>{let e=await q.createOrganization(Hi);Ui({slug:``,name:``}),Rr(e.id),qi(t=>({...t,organizationId:e.id})),na(t=>({...t,organizationId:e.id}))},`Организация создана.`),children:`Создать организацию`})}),(0,E.jsx)(N,{columns:[`организация`,`slug`,`статус`,`ресурсы`,`участники`,`действие`],rows:hr.map(e=>{let t=yr.filter(t=>t.organization_id===e.id),n=xr[e.id]||[];return[e.name,e.slug,(0,E.jsx)(_e,{value:e.status}),String(t.length),String(n.length),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{onClick:()=>void Y(async()=>{Rr(e.id),Br(await q.getOrganizationAdminSummary(e.id))},`Сводка организации загружена.`),children:`Открыть`})},e.id)]})})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Пользователь`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Email / логин`,(0,E.jsx)(`input`,{value:Wi.email,onChange:e=>Gi({...Wi,email:e.target.value}),placeholder:`user@example.com`})]}),(0,E.jsxs)(`label`,{children:[`Пароль`,(0,E.jsx)(`input`,{type:`password`,value:Wi.password,onChange:e=>Gi({...Wi,password:e.target.value}),placeholder:`минимум 8 символов`})]}),(0,E.jsxs)(`label`,{children:[`Роль платформы`,(0,E.jsxs)(`select`,{value:Wi.platformRole,onChange:e=>Gi({...Wi,platformRole:e.target.value}),children:[(0,E.jsx)(`option`,{value:`user`,children:`user`}),(0,E.jsx)(`option`,{value:`platform_admin`,children:`platform_admin`}),(0,E.jsx)(`option`,{value:`platform_recovery_admin`,children:`platform_recovery_admin`})]})]})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{disabled:!Wi.email.trim()||Wi.password.length<8,onClick:()=>void Y(async()=>{let e=await q.createUser(Wi);vr(await q.listUsers()),Gi({email:``,password:``,platformRole:`user`}),qi(t=>({...t,userId:e.id}))},`Пользователь создан.`),children:`Создать пользователя`})}),(0,E.jsx)(N,{columns:[`пользователь`,`роль платформы`,`id`],rows:_r.map(e=>[e.email,(0,E.jsx)(_e,{value:e.platform_role||`user`}),(0,E.jsx)(`code`,{children:e.id})])})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Участник организации`}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Организация`,(0,E.jsxs)(`select`,{value:Ki.organizationId,onChange:e=>qi({...Ki,organizationId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Выберите организацию`}),hr.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Пользователь`,(0,E.jsxs)(`select`,{value:Ki.userId,onChange:e=>qi({...Ki,userId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Выберите пользователя`}),_r.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.email},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Роль`,(0,E.jsxs)(`select`,{value:Ki.roleId,onChange:e=>qi({...Ki,roleId:e.target.value}),children:[(0,E.jsx)(`option`,{value:`org_owner`,children:`org_owner`}),(0,E.jsx)(`option`,{value:`org_admin`,children:`org_admin`}),(0,E.jsx)(`option`,{value:`org_operator`,children:`org_operator`}),(0,E.jsx)(`option`,{value:`org_member`,children:`org_member`}),(0,E.jsx)(`option`,{value:`org_viewer`,children:`org_viewer`})]})]})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{disabled:!Ki.organizationId||!Ki.userId.trim(),onClick:()=>void Y(()=>q.addOrganizationMembership(Ki.organizationId,{userId:Ki.userId,roleId:Ki.roleId}),`Участник организации сохранен.`),children:`Сохранить участника`})})]}),(0,E.jsxs)(`article`,{className:`card`,children:[(0,E.jsx)(`h3`,{children:`Безопасная сводка`}),(0,E.jsxs)(`div`,{className:`inlineForm`,children:[(0,E.jsxs)(`select`,{value:Lr,onChange:e=>Rr(e.target.value),children:[(0,E.jsx)(`option`,{value:``,children:`Выберите организацию`}),hr.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,E.jsx)(`button`,{disabled:!Lr,onClick:()=>void Y(async()=>{Br(await q.getOrganizationAdminSummary(Lr))},`Сводка организации загружена.`),children:`Обновить`})]}),zr?(0,E.jsxs)(`div`,{className:`stack`,children:[(0,E.jsx)(he,{label:`Ресурсы`,value:zr.resource_count,tone:`steel`}),(0,E.jsx)(he,{label:`Активные сессии`,value:zr.active_session_count,tone:`green`}),(0,E.jsx)(A,{label:`Topology exposure`,value:zr.topology_exposure}),(0,E.jsx)(N,{columns:[`контур`,`состояние`],rows:Object.entries(zr.connector_status||{}).map(([e,t])=>[e,typeof t==`string`?H(t):JSON.stringify(t)])}),(0,E.jsx)(N,{columns:[`протокол`,`количество`],rows:zr.service_endpoints.map(e=>[e.protocol,String(e.count)])})]}):(0,E.jsx)(ye,{title:`Сводка не выбрана`,text:`Выберите организацию, чтобы проверить tenant-safe состояние.`})]})]}),C===`servers`&&(0,E.jsx)(`section`,{className:`grid two`,children:(0,E.jsxs)(`article`,{className:`card span2`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Справочник серверов`}),(0,E.jsx)(`p`,{className:`muted`,children:`Единый каталог целей для RDP/VPN: адрес сервера, организация, протокол и предпочтительный вход/выход маршрута.`})]}),(0,E.jsx)(`span`,{className:`pill`,children:yr.length})]}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Организация`,(0,E.jsxs)(`select`,{value:K.organizationId,onChange:e=>na({...K,organizationId:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Выберите организацию`}),hr.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Имя сервера`,(0,E.jsx)(`input`,{value:K.name,onChange:e=>na({...K,name:e.target.value}),placeholder:`Office RDP`})]}),(0,E.jsxs)(`label`,{children:[`Адрес`,(0,E.jsx)(`input`,{value:K.address,onChange:e=>na({...K,address:e.target.value}),placeholder:`192.168.1.10:3389`})]}),(0,E.jsxs)(`label`,{children:[`Протокол`,(0,E.jsxs)(`select`,{value:K.protocol,onChange:e=>na({...K,protocol:e.target.value}),children:[(0,E.jsx)(`option`,{value:`rdp`,children:`RDP`}),(0,E.jsx)(`option`,{value:`vpn`,children:`VPN`}),(0,E.jsx)(`option`,{value:`ssh`,children:`SSH`}),(0,E.jsx)(`option`,{value:`http`,children:`HTTP`})]})]}),(0,E.jsxs)(`label`,{children:[`Вход`,(0,E.jsxs)(`select`,{value:K.entryNode,onChange:e=>na({...K,entryNode:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Автоматически`}),j.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Выход`,(0,E.jsxs)(`select`,{value:K.exitNode,onChange:e=>na({...K,exitNode:e.target.value}),children:[(0,E.jsx)(`option`,{value:``,children:`Автоматически`}),j.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,E.jsxs)(`label`,{children:[`Теги`,(0,E.jsx)(`input`,{value:K.tags,onChange:e=>na({...K,tags:e.target.value}),placeholder:`home, accounting`})]}),(0,E.jsxs)(`label`,{children:[`RDP пользователь`,(0,E.jsx)(`input`,{value:K.username,onChange:e=>na({...K,username:e.target.value}),placeholder:`user или DOMAIN\\\\user`})]}),(0,E.jsxs)(`label`,{children:[`RDP пароль`,(0,E.jsx)(`input`,{type:`password`,value:K.password,onChange:e=>na({...K,password:e.target.value}),placeholder:`хранится как secret`})]}),(0,E.jsxs)(`label`,{children:[`Домен`,(0,E.jsx)(`input`,{value:K.domain,onChange:e=>na({...K,domain:e.target.value}),placeholder:`опционально`})]})]}),(0,E.jsx)(`div`,{className:`actions`,children:(0,E.jsx)(`button`,{className:`primary`,disabled:!K.organizationId||!K.name.trim()||!K.address.trim(),onClick:()=>void Y(async()=>{let e=[`rdp`,`vnc`,`ssh`].includes(K.protocol)?`rap-secret://org/${K.organizationId}/resources/${crypto.randomUUID()}/primary`:null,t=await q.createResource({organizationId:K.organizationId,name:K.name,address:K.address,protocol:K.protocol,secretRef:e,certificateVerificationMode:K.protocol===`rdp`?`ignore`:`strict`,clipboardMode:K.protocol===`rdp`?`bidirectional`:`disabled`,fileTransferMode:K.protocol===`rdp`?`bidirectional`:`disabled`,metadata:{route_mode:K.routeMode,preferred_entry_node_id:K.entryNode||null,preferred_exit_node_id:K.exitNode||null,tags:K.tags.split(`,`).map(e=>e.trim()).filter(Boolean)}});[`rdp`,`vnc`,`ssh`].includes(K.protocol)&&(K.username.trim()||K.password)&&await q.upsertResourceSecret(t.id,{username:K.username.trim(),password:K.password,domain:K.domain.trim()}),na({...K,name:``,address:``,tags:``,username:``,password:``,domain:``})},`Сервер добавлен в справочник.`),children:`Добавить сервер`})}),(0,E.jsx)(N,{columns:[`сервер`,`адрес`,`протокол`,`секрет`,`организация`,`маршрут`,`создано`,`действия`],rows:yr.map(e=>{let t=e.metadata||{},n=hr.find(t=>t.id===e.organization_id);return[e.name,e.address,e.protocol,e.has_secret?`сохранен`:e.secret_ref?`нужен payload`:`нет`,n?.name||B(e.organization_id),`${B(String(t.preferred_entry_node_id||``))||`auto`} -> ${B(String(t.preferred_exit_node_id||``))||`auto`}`,V(e.created_at),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{Yi(e),Zi({username:``,password:``,domain:``})},children:`Обновить secret`})]})}),Ji&&(0,E.jsx)(`div`,{className:`modalBackdrop`,role:`presentation`,children:(0,E.jsxs)(`div`,{className:`modalCard`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`resource-secret-title`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{id:`resource-secret-title`,children:`Учетные данные RDP`}),(0,E.jsxs)(`p`,{className:`muted`,children:[Ji.name,` · `,Ji.address]})]}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>Yi(null),children:`Закрыть`})]}),(0,E.jsxs)(Qe,{children:[(0,E.jsxs)(`label`,{children:[`Пользователь`,(0,E.jsx)(`input`,{value:Xi.username,onChange:e=>Zi({...Xi,username:e.target.value}),placeholder:`user или DOMAIN\\\\user`})]}),(0,E.jsxs)(`label`,{children:[`Пароль`,(0,E.jsx)(`input`,{type:`password`,value:Xi.password,onChange:e=>Zi({...Xi,password:e.target.value})})]}),(0,E.jsxs)(`label`,{children:[`Домен`,(0,E.jsx)(`input`,{value:Xi.domain,onChange:e=>Zi({...Xi,domain:e.target.value}),placeholder:`опционально`})]})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Пароль сохраняется как encrypted resource secret. В metadata ресурса он не попадет.`}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`primary`,disabled:!Xi.username.trim()||!Xi.password,onClick:()=>void Y(async()=>{await q.upsertResourceSecret(Ji.id,{username:Xi.username.trim(),password:Xi.password,domain:Xi.domain.trim()}),Yi(null),Zi({username:``,password:``,domain:``})},`Secret ресурса обновлен.`),children:`Сохранить secret`}),(0,E.jsx)(`button`,{onClick:()=>Yi(null),children:`Отмена`})]})]})})]})}),C===`audit`&&(0,E.jsxs)(`section`,{className:`card`,children:[(0,E.jsxs)(`div`,{className:`cardHead`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h3`,{children:`Аудит кластера`}),Tr&&(0,E.jsxs)(`p`,{className:`muted`,children:[`Фильтр по узлу: `,(0,E.jsx)(`strong`,{children:Dr||B(Tr)})]})]}),Tr&&(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>{Er(``),Or(``)},children:`Сбросить фильтр`})]}),(0,E.jsx)(N,{columns:[`событие`,`цель`,`actor`,`создано`],rows:Ma.map(e=>[e.event_type,`${e.target_type}${e.target_id?`:${B(e.target_id)}`:``}`,e.actor_user_id?B(e.actor_user_id):`system`,V(e.created_at)])})]})]})]})}function he({label:e,value:t,tone:n}){return(0,E.jsxs)(`article`,{className:`metric ${n}`,children:[(0,E.jsx)(`span`,{children:e}),(0,E.jsx)(`strong`,{children:t})]})}function ge({label:e,value:t}){return(0,E.jsxs)(`div`,{className:`signal`,children:[(0,E.jsx)(`span`,{children:e}),(0,E.jsx)(`strong`,{children:t})]})}function _e({value:e}){return(0,E.jsx)(`span`,{className:`status ${e.replace(/_/g,`-`)}`,children:H(e)})}function ve({label:e,value:t,tone:n}){return(0,E.jsxs)(`span`,{className:`functionState ${n||``}`,children:[(0,E.jsx)(`small`,{children:e}),(0,E.jsx)(`strong`,{children:t})]})}function A({label:e,value:t}){return(0,E.jsxs)(`div`,{className:`stateLine`,children:[(0,E.jsx)(`span`,{children:e}),(0,E.jsx)(`strong`,{children:t})]})}function ye({title:e,text:t}){return(0,E.jsxs)(`article`,{className:`empty`,children:[(0,E.jsx)(`h3`,{children:e}),(0,E.jsx)(`p`,{children:t})]})}function be(e){if(!e)return(0,E.jsx)(`p`,{className:`muted`,children:`Диагностика Android-клиента не загружена. Укажи device id из приложения и нажми “Обновить клиент”.`});let t=F(e.payload)||{},n=F(t.runtime),r=F(t.vpn_config),i=I(t,`app_version`,`н/д`),a=I(t,`service_state`,`н/д`),o=I(t,`control_network_mode`,`н/д`),s=I(r,`packet_relay_active_base_url`)||I(r,`packet_relay_base_url`,`н/д`),c=I(r,`packet_relay_profile_base_url`,`н/д`),l=I(r,`packet_relay_candidate_urls`,`н/д`),u=Ot(n,`uplink_read_total`),d=Ot(n,`uplink_sent_total`),f=Ot(n,`downlink_received_total`),p=Ot(n,`uplink_dropped_packets`)+Ot(n,`downlink_dropped_packets`),m=Ot(n,`uplink_bypassed_control_packets`),h=Ot(n,`downlink_received_bytes`),g=Ot(n,`uplink_sent_bytes`),_=I(n,`state`,`н/д`),v=I(n,`message`,``),y=Ot(n,`uplink_sent_mbps`),b=Ot(n,`downlink_received_mbps`),x=I(t,`last_command_type`,`н/д`),S=I(t,`last_command_result`,`н/д`);return(0,E.jsxs)(`div`,{className:`vpnCard diagnosticCard`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`strong`,{children:[`Android client `,B(e.device_id)]}),(0,E.jsxs)(`p`,{className:`muted`,children:[i,` / `,a,` / `,V(e.observed_at)]}),(0,E.jsx)(_e,{value:Date.now()-new Date(e.observed_at).getTime()<3e4?`active`:`degraded`}),(0,E.jsx)(`span`,{className:`pill`,children:o})]}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Relay active`,value:s}),(0,E.jsx)(A,{label:`Relay profile`,value:c}),(0,E.jsx)(A,{label:`Relay candidates`,value:l}),(0,E.jsx)(A,{label:`Packets read/sent/down`,value:`${u} / ${d} / ${f}`}),(0,E.jsx)(A,{label:`Drops / control bypass`,value:`${p} / ${m}`}),(0,E.jsx)(A,{label:`Bytes up/down`,value:`${$n(g)} / ${$n(h)}`}),(0,E.jsx)(A,{label:`Rate up/down`,value:`${y.toFixed(2)} / ${b.toFixed(2)} Mbps`}),(0,E.jsx)(A,{label:`Runtime`,value:v?`${_}: ${v}`:_}),(0,E.jsx)(A,{label:`Last command`,value:`${x}: ${S}`})]})]})}function xe({items:e,emptyText:t}){if(e.length===0)return(0,E.jsx)(ye,{title:t,text:`Тестовая телеметрия появится здесь после отчета node-agent.`});let n=[...e].reverse().slice(-24),r=e[0],i=Math.max(...n.map(e=>e.memory_used_bytes||0),1);return(0,E.jsxs)(`div`,{className:`telemetryBox`,children:[(0,E.jsxs)(`div`,{className:`signalStrip compact`,children:[(0,E.jsx)(ge,{label:`Память`,value:`${$n(r.memory_used_bytes)} / ${$n(r.memory_total_bytes)}`}),(0,E.jsx)(ge,{label:`Процессор`,value:r.cpu_percent==null?`н/д`:`${r.cpu_percent.toFixed(1)}%`}),(0,E.jsx)(ge,{label:`Процессы`,value:r.process_count==null?`н/д`:String(r.process_count)}),(0,E.jsx)(ge,{label:`Обновлено`,value:V(r.observed_at)})]}),(0,E.jsx)(`div`,{className:`sparkline`,"aria-label":`memory telemetry`,children:n.map(e=>(0,E.jsx)(`span`,{style:{height:`${Math.max(8,Math.round((e.memory_used_bytes||0)/i*100))}%`}},e.id))})]})}function Se({node:e,memberships:t,activeRoles:n,desiredWorkloads:r,observedWorkloads:i,heartbeats:a,telemetry:o,meshLinks:s,syntheticConfig:c,allNodes:l,onSetUpdatePolicy:u,updatePlan:d,updateStatuses:f,labels:p}){let m=a[0],h=o[0],g=F(m?.metadata?.mesh_listener_report),v=F(m?.metadata?.mesh_endpoint_report),y=F(m?.metadata?.mesh_outbound_session_report),b=c?.mesh_listener,x=F(m?.metadata?.mesh_peer_recovery_report),S=F(m?.metadata?.mesh_peer_connection_intent_report),C=F(m?.metadata?.mesh_peer_connection_manager_report),w=F(m?.metadata?.mesh_rendezvous_lease_report),T=F(m?.metadata?.mesh_route_path_decision_report),ee=F(m?.metadata?.mesh_route_generation_report),te=F(m?.metadata?.mesh_route_health_config_report),D=c?.service_channel_route_feedback,ne=D?.observations||[],re=c?.service_channel_remediation_commands||[],ie=yt(s).filter(e=>e.source_node_id!==e.target_node_id),ae=ie.filter(e=>e.link_status===`reachable`),oe=ie.filter(e=>e.link_status!==`reachable`),se=Object.entries(m?.capabilities||{}).sort(([e],[t])=>e.localeCompare(t)),O=Tt(C?.probe_results),[k,ce]=(0,_.useState)(`network`),le=ot(f,`rap-node-agent`),ue=ot(f,`rap-host-agent`),de=f[0],fe=gt(f),pe=t.find(t=>t.node.id===e.id)?.cluster.id||t[0]?.cluster.id||``,me=Tt(v?.endpoint_candidates),he=me[0],ve=Et(v,[`peer_endpoint`,`advertised_endpoint`,`endpoint`])||I(he,`address`,``)||``,ye=Et(v,[`transport`,`advertise_transport`])||I(he,`transport`,``)||`н/д`,be=Et(v,[`connectivity_mode`,`connectivity`])||I(he,`connectivity_mode`,``)||I(g,`inbound_reachability`,``)||`н/д`,Se=I(v,`nat_type`,I(he,`nat_type`,`н/д`)),we=I(v,`region`,I(g,`region`,I(he,`region`,`н/д`))),Te=I(v,`observed_at`,I(g,`observed_at`,m?.observed_at||`н/д`)),Ee=I(g,`status`,``)||(ve?`нет listener report, есть advertised endpoint`:`report отсутствует`),j=I(g,`effective_listen_addr`,``)||`н/д`,De=I(g,`configured_listen_addr`,``)||`н/д`,Oe=me.length>0?me:ve?[{endpoint_id:`${e.id}-reported`,address:ve,transport:ye,reachability:be,connectivity_mode:be,nat_type:Se,priority:`н/д`,last_verified_at:Te}]:[],ke=Tt(b?.endpoint_candidates),Ae=Object.entries(c?.peer_endpoints||{}),je=Object.entries(c?.peer_endpoint_candidates||{}).flatMap(([e,t])=>t.map(t=>({peerID:e,candidate:t}))),Me=new Set(ae.map(t=>t.source_node_id===e.id?t.target_node_id:t.source_node_id)),Ne=je.filter(({peerID:e})=>!Me.has(e)),Pe=[g?`listener report: есть`:`listener report: не прислан агентом`,v?`endpoint report: есть`:`endpoint report: не прислан агентом`,y?`outbound session: есть`:`outbound session: не прислан агентом`,c?`scoped config: ${c.enabled?`enabled`:`disabled`}`:`scoped config: не загружен`,D?`service-channel feedback: ${D.observation_count}`:`service-channel feedback: не загружен`,`active links: ${ae.length}/${ie.length}`];return(0,E.jsxs)(`div`,{className:`nodeDetails`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Сводка runtime`}),(0,E.jsxs)(`div`,{className:`signalStrip compact nodeMetricGrid`,children:[(0,E.jsx)(ge,{label:`Heartbeat`,value:m?V(m.observed_at):`н/д`}),(0,E.jsx)(ge,{label:`Health`,value:H(m?.health_status||e.health_status)}),(0,E.jsx)(ge,{label:`Listener`,value:Wn(m)}),(0,E.jsx)(ge,{label:`Mesh links`,value:`${ae.length}/${ie.length}`}),(0,E.jsx)(ge,{label:`Web ingress`,value:Re(m)}),(0,E.jsx)(ge,{label:`Update`,value:st(de,d)})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(_e,{value:e.registration_status}),(0,E.jsx)(_e,{value:e.membership_status}),(0,E.jsx)(_e,{value:e.partition_state}),(0,E.jsx)(`span`,{className:`pill`,children:e.reported_version||m?.reported_version||`версия неизвестна`}),g?.one_way_connectivity===!0&&(0,E.jsx)(`span`,{className:`pill warn`,children:`one-way`}),g?.port_conflict===!0&&(0,E.jsx)(`span`,{className:`pill bad`,children:`port conflict`})]})]}),(0,E.jsx)(`div`,{className:`nodeTabs`,role:`tablist`,"aria-label":`Node analysis sheets`,children:[[`overview`,`Обзор`],[`network`,`Сеть и адреса`],[`mesh`,`Mesh`],[`services`,`Роли и сервисы`],[`telemetry`,`Телеметрия`],[`updates`,`Обновления`],[`raw`,`Raw`]].map(([e,t])=>(0,E.jsx)(`button`,{className:k===e?`active`:``,onClick:()=>ce(e),type:`button`,children:t},e))}),k===`overview`&&(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Идентичность и размещение`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Node ID`,value:e.id}),(0,E.jsx)(A,{label:`Node key`,value:e.node_key}),(0,E.jsx)(A,{label:`Имя`,value:e.name}),(0,E.jsx)(A,{label:`Владение`,value:H(e.ownership_type)}),(0,E.jsx)(A,{label:`Owner org`,value:B(e.owner_organization_id)}),(0,E.jsx)(A,{label:`Группа`,value:e.node_group_name||p.ungroupedNodes}),(0,E.jsx)(A,{label:`Создан`,value:V(e.created_at)}),(0,E.jsx)(A,{label:`Обновлен`,value:V(e.updated_at)})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Участие в кластерах`}),(0,E.jsx)(`div`,{className:`membershipList`,children:t.map(t=>(0,E.jsxs)(`span`,{className:t.node.id===e.id&&t.node.membership_status===`active`?`pill good`:`pill`,children:[t.cluster.name,`: `,H(t.node.membership_status)]},t.cluster.id))}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Активных ролей`,value:String(n.length)}),(0,E.jsx)(A,{label:`Desired workloads`,value:String(r.length)}),(0,E.jsx)(A,{label:`Observed workloads`,value:String(i.length)}),(0,E.jsx)(A,{label:`Последний сигнал`,value:V(e.last_seen_at||m?.observed_at)})]})]})]}),k===`network`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Локальный listener`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Статус`,value:Ee}),(0,E.jsx)(A,{label:`Режим порта`,value:I(g,`listen_port_mode`,`н/д`)}),(0,E.jsx)(A,{label:`Configured addr`,value:De}),(0,E.jsx)(A,{label:`Effective addr`,value:j}),(0,E.jsx)(A,{label:`Inbound`,value:I(g,`inbound_reachability`,be)}),(0,E.jsx)(A,{label:`One-way`,value:I(g,`one_way_connectivity`,`н/д`)}),(0,E.jsx)(A,{label:`Port conflict`,value:I(g,`port_conflict`,`false`)}),(0,E.jsx)(A,{label:`Failure`,value:I(g,`failure_error`,I(g,`failure_reason`,`нет`))})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Desired listener`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Состояние`,value:b?.desired_state||`н/д`}),(0,E.jsx)(A,{label:`Режим порта`,value:b?.listen_port_mode||`н/д`}),(0,E.jsx)(A,{label:`Listen addr`,value:b?.listen_addr||`н/д`}),(0,E.jsx)(A,{label:`Auto range`,value:b?`${b.auto_port_start||`н/д`}-${b.auto_port_end||`н/д`}`:`н/д`}),(0,E.jsx)(A,{label:`Advertise endpoint`,value:b?.advertise_endpoint||`auto-discovery`}),(0,E.jsx)(A,{label:`Endpoint candidates`,value:ke.length>0?String(ke.length):`auto-discovery`}),(0,E.jsx)(A,{label:`Advertise transport`,value:b?.advertise_transport||`н/д`}),(0,E.jsx)(A,{label:`Connectivity`,value:b?.connectivity_mode||`н/д`}),(0,E.jsx)(A,{label:`NAT`,value:b?.nat_type||`н/д`}),(0,E.jsx)(A,{label:`Region/site`,value:b?.region||`н/д`}),(0,E.jsx)(A,{label:`Version`,value:b?.config_version||`н/д`})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Что узел сообщает кластеру`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Advertised endpoint`,value:ve||`не прислан`}),(0,E.jsx)(A,{label:`Transport`,value:ye}),(0,E.jsx)(A,{label:`Connectivity`,value:be}),(0,E.jsx)(A,{label:`NAT`,value:Se}),(0,E.jsx)(A,{label:`Region/site`,value:we}),(0,E.jsx)(A,{label:`Observed`,value:Te})]})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Исходящий control-channel`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Status`,value:I(y,`status`,`не прислан`)}),(0,E.jsx)(A,{label:`Direction`,value:I(y,`direction`,`н/д`)}),(0,E.jsx)(A,{label:`Transport`,value:I(y,`transport`,`н/д`)}),(0,E.jsx)(A,{label:`Control API endpoint`,value:I(y,`control_plane_url`,`н/д`)}),(0,E.jsx)(A,{label:`Reverse usable`,value:I(y,`usable_for_inbound_control`,`н/д`)}),(0,E.jsx)(A,{label:`Inbound required`,value:I(y,`inbound_listener_required`,`н/д`)}),(0,E.jsx)(A,{label:`Relay ready`,value:I(y,`peer_connection_relay_ready`,`0`)}),(0,E.jsx)(A,{label:`Waiting rendezvous`,value:I(y,`peer_connection_waiting`,`0`)}),(0,E.jsx)(A,{label:`Rendezvous leases`,value:I(y,`rendezvous_lease_count`,`0`)}),(0,E.jsx)(A,{label:`Listener conflict`,value:I(y,`listener_port_conflict`,`false`)})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Наличие сетевых отчетов`}),(0,E.jsx)(`div`,{className:`summaryChips`,children:Pe.map(e=>(0,E.jsx)(`span`,{className:e.includes(`не прислан`)||e.includes(`не загружен`)?`pill warn`:`pill good`,children:e},e))}),!v&&!g&&(0,E.jsx)(`p`,{className:`muted`,children:`У этого узла есть heartbeat/mesh manager данные, но агент не передал адресный отчет. До обновления агента или включения endpoint/listener report панель может показать связи и config peers, но не может достоверно назвать локальный listen address.`})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Endpoint candidates узла`}),(0,E.jsx)(N,{columns:[`id`,`address`,`transport`,`reachability`,`mode`,`nat`,`priority`,`verified`],rows:Oe.map(e=>[I(e,`endpoint_id`,`н/д`),I(e,`address`,`н/д`),I(e,`transport`,`н/д`),I(e,`reachability`,`н/д`),I(e,`connectivity_mode`,`н/д`),I(e,`nat_type`,`н/д`),I(e,`priority`,`н/д`),I(e,`last_verified_at`,`н/д`)])})]}),(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Рабочие peer endpoints из config`}),(0,E.jsx)(N,{columns:[`peer`,`endpoint`],rows:Ae.map(([e,t])=>[L(l,e),t])})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Резервные кандидаты peer`}),(0,E.jsx)(N,{columns:[`peer`,`address`,`transport`,`reachability`,`mode`,`priority`],rows:Ne.slice(0,20).map(({peerID:e,candidate:t})=>[L(l,e),t.address,t.transport,t.reachability,t.connectivity_mode,String(t.priority)])})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Активные связи этого узла`}),(0,E.jsx)(N,{columns:[`peer`,`направление`,`тип`,`статус`,`latency`,`quality`,`путь`,`наблюдение`],rows:ie.slice(0,20).map(t=>[L(l,t.source_node_id===e.id?t.target_node_id:t.source_node_id),t.source_node_id===e.id?`out`:`in`,xt(t),t.link_status,t.latency_ms==null?`н/д`:`${t.latency_ms}мс`,t.quality_score==null?`н/д`:String(t.quality_score),St(t,l),V(t.observed_at)])}),oe.length>0&&(0,E.jsxs)(`p`,{className:`muted`,children:[`Проблемных связей: `,oe.length,`. Их статус виден в таблице выше.`]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Проверка адресов peer-to-peer`}),(0,E.jsx)(N,{columns:[`peer`,`status`,`selected endpoint`,`candidate`,`latency`,`attempts`,`failure`],rows:O.slice(0,20).map(e=>[L(l,I(e,`node_id`,``)),I(e,`link_status`,`н/д`),I(e,`selected_endpoint`,I(e,`endpoint`,`н/д`)),I(e,`selected_candidate_id`,`н/д`),I(e,`latency_ms`,`н/д`),It(e),I(e,`failure_reason`,`нет`)])})]})]}),k===`mesh`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Mesh control authority`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Recovery`,value:Ln(m)}),(0,E.jsx)(A,{label:`Intents`,value:Rn(m)}),(0,E.jsx)(A,{label:`Manager`,value:Un(m)}),(0,E.jsx)(A,{label:`Rendezvous`,value:zn(m)}),(0,E.jsx)(A,{label:`Path decisions`,value:Bn(m)}),(0,E.jsx)(A,{label:`Route generation`,value:Vn(m)}),(0,E.jsx)(A,{label:`Route health`,value:Hn(m)}),(0,E.jsx)(A,{label:`Service-channel feedback`,value:D?`${D.healthy_route_count} healthy / ${D.degraded_route_count} degraded / ${D.fenced_route_count} fenced`:`н/д`}),(0,E.jsx)(A,{label:`Recovery policy`,value:D?.recovery_policy?`${D.recovery_policy.source} p${D.recovery_policy.hysteresis_penalty} promote ${D.recovery_policy.promotion_min_samples}`:`н/д`}),(0,E.jsx)(A,{label:`Route policy`,value:c?.route_path_decisions?.recovery_policy?`${c.route_path_decisions.recovery_policy.source} fail/drop/slow ${c.route_path_decisions.recovery_policy.demotion_failure_threshold}/${c.route_path_decisions.recovery_policy.demotion_drop_threshold}/${c.route_path_decisions.recovery_policy.demotion_slow_threshold}`:`н/д`}),(0,E.jsx)(A,{label:`Config version`,value:c?.config_version||`н/д`})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Scoped config counts`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Peer endpoints`,value:String(Ae.length)}),(0,E.jsx)(A,{label:`Endpoint candidates`,value:String(je.length)}),(0,E.jsx)(A,{label:`Peer directory`,value:String(c?.peer_directory?.length||0)}),(0,E.jsx)(A,{label:`Recovery seeds`,value:String(c?.recovery_seeds?.length||0)}),(0,E.jsx)(A,{label:`Rendezvous leases`,value:String(c?.rendezvous_leases?.length||0)}),(0,E.jsx)(A,{label:`Routes`,value:String(c?.routes?.length||0)}),(0,E.jsx)(A,{label:`Fenced routes`,value:String(D?.fenced_route_count||0)}),(0,E.jsx)(A,{label:`Remediation commands`,value:String(re.length)}),(0,E.jsx)(A,{label:`Feedback provenance`,value:D?`missing ${D.missing_provenance_count||0} / stale policy ${D.stale_policy_count||0} / stale gen ${D.stale_generation_count||0}`:`н/д`})]})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Route decisions`}),(0,E.jsx)(N,{columns:[`route`,`replacement`,`source`,`destination`,`effective hops`,`decision`,`score`,`expires`],rows:(c?.route_path_decisions?.decisions||[]).map(e=>[B(e.route_id),e.replacement_route_id?B(e.replacement_route_id):`нет`,L(l,e.source_node_id),L(l,e.destination_node_id),e.effective_hops.map(e=>qn(L(l,e))).join(` > `),e.decision_source||(e.selected_relay_id?L(l,e.selected_relay_id):`direct`),e.path_score==null?`н/д`:String(e.path_score),V(e.expires_at)])})]}),re.length>0&&(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Service-channel remediation commands`}),(0,E.jsx)(N,{columns:[`channel`,`action`,`primary`,`replacement`,`guard`,`execution`,`reason`,`expires`],rows:re.slice(0,20).map(e=>[B(e?.channel_id||``),(0,E.jsx)(`span`,{className:`pill warn`,children:H(e?.action||``)}),e?.primary_route_id?B(e.primary_route_id):`н/д`,e?.replacement_route_id?B(e.replacement_route_id):`н/д`,(0,E.jsx)(`span`,{className:`pill ${e?.guard_status===`rejected`?`bad`:e?.guard_status===`allowed`?`good`:``}`,children:e?.guard_status?H(e.guard_status):`н/д`}),(0,E.jsxs)(`span`,{className:`pill ${rr(e?.execution_status)}`,children:[e?.execution_status?H(e.execution_status):`н/д`,e?.execution_reason?` / ${H(e.execution_reason)}`:``]}),e?.reason||`н/д`,e?.expires_at?V(e.expires_at):`н/д`])})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Service-channel route feedback`}),(0,E.jsx)(N,{columns:[`route`,`service`,`status`,`recovery`,`score`,`reasons`,`failures`,`duration`,`expires`],rows:ne.slice(0,40).map(e=>[B(e.route_id),e.service_class,(0,E.jsx)(`span`,{className:`pill ${dt(e.feedback_status)}`,children:H(e.feedback_status)}),e.recovery_state?(0,E.jsxs)(`span`,{className:`pill ${ft(e.recovery_state)}`,children:[e.recovery_demoted?`demoted ${e.recovery_reason?H(e.recovery_reason):``}`:e.recovery_promoted?`promoted`:H(e.recovery_state),e.recovery_hysteresis_penalty?` -${e.recovery_hysteresis_penalty}`:``]}):e.stale_policy||e.stale_generation?(0,E.jsx)(`span`,{className:`pill warn`,children:H(e.stale_reason||`stale`)}):e.provenance_missing?(0,E.jsx)(`span`,{className:`pill warn`,children:`provenance missing`}):`нет`,String(e.score_adjustment),(e.reasons||[]).join(`, `)||`нет`,String(e.consecutive_failures||0),e.last_send_duration_ms==null?`н/д`:`${e.last_send_duration_ms}мс`,V(e.expires_at)])}),ne.length===0&&(0,E.jsx)(`p`,{className:`muted`,children:`Пока нет свежих наблюдений. Узел будет присылать их после реального traffic через service-channel runtime.`})]})]}),k===`services`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:p.nodeRoles}),(0,E.jsxs)(`div`,{className:`serviceTags`,children:[n.length===0&&(0,E.jsx)(`p`,{className:`muted`,children:p.noRoles}),n.map(e=>(0,E.jsxs)(`div`,{className:`serviceTag`,children:[(0,E.jsx)(`strong`,{children:rt(e.role)}),(0,E.jsx)(`span`,{children:e.organization_id?`organization: ${B(e.organization_id)}`:`cluster-wide`}),(0,E.jsx)(`small`,{children:V(e.assigned_at)}),(0,E.jsx)(`span`,{className:`pill ${Pn(e.role,m)}`,children:Fn(e.role,m,p)})]},e.id))]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Capabilities`}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[se.length===0&&(0,E.jsx)(`span`,{className:`muted`,children:`Нет capability heartbeat.`}),se.slice(0,40).map(([e,t])=>(0,E.jsx)(`span`,{className:t===!0?`pill good`:`pill`,children:e},e))]})]})]}),(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:p.desiredServices}),(0,E.jsx)(N,{columns:[`service`,`desired`,`runtime`,`version`,`updated`],rows:r.map(e=>[e.service_type,H(e.desired_state),e.runtime_mode,e.version||`не закреплена`,V(e.updated_at)])})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:p.observedServices}),(0,E.jsx)(N,{columns:[`service`,`reported`,`runtime`,`version`,`observed`],rows:i.map(e=>[e.service_type,H(e.reported_state),e.runtime_mode,e.version||`н/д`,V(e.observed_at)])})]})]})]}),k===`telemetry`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:p.nodeTelemetry}),(0,E.jsx)(xe,{items:o,emptyText:p.noTelemetry}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Disk`,value:`${$n(h?.disk_used_bytes)} / ${$n(h?.disk_total_bytes)}`}),(0,E.jsx)(A,{label:`Network RX/TX`,value:`${$n(h?.network_rx_bytes)} / ${$n(h?.network_tx_bytes)}`}),(0,E.jsx)(A,{label:`Payload`,value:h?.payload?Ft(h.payload):`н/д`})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:p.recentHeartbeats}),(0,E.jsx)(N,{columns:[`состояние`,`версия`,`listener`,`mesh recovery`,`mesh intents`,`rv leases`,`path decisions`,`route gen`,`route health`,`наблюдение`],rows:a.slice(0,10).map(e=>[e.health_status,e.reported_version||`неизвестно`,Wn(e),Ln(e),Rn(e),zn(e),Bn(e),Vn(e),Hn(e),V(e.observed_at)])})]})]}),k===`updates`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:`nodeDetailGrid`,children:[(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Текущая сборка`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Node-agent version`,value:e.reported_version||m?.reported_version||`неизвестно`}),(0,E.jsx)(A,{label:`План`,value:d?`${d.action}: ${d.reason}`:`не загружен`}),(0,E.jsx)(A,{label:`Product`,value:d?.product||`rap-node-agent`}),(0,E.jsx)(A,{label:`Target`,value:d?.target_version||`н/д`}),(0,E.jsx)(A,{label:`Strategy`,value:d?.strategy||`н/д`}),(0,E.jsx)(A,{label:`Rollback`,value:d?.rollback_allowed?`разрешен`:`нет`}),(0,E.jsx)(A,{label:`Artifact`,value:d?.artifact?`${d.artifact.kind} ${d.artifact.os}/${d.artifact.arch}`:`н/д`})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`primary`,disabled:!u,onClick:()=>u?.(e,`rap-node-agent`,null),children:`Node-agent latest`}),(0,E.jsx)(`button`,{className:`ghost`,disabled:!u||!d?.target_version,onClick:()=>u?.(e,`rap-node-agent`,d?.target_version||null),children:`Повторить target`}),(0,E.jsx)(`button`,{className:`ghost`,disabled:!u,onClick:()=>u?.(e,`rap-host-agent`,null),children:`Host-agent latest`})]}),(0,E.jsx)(`p`,{className:`muted`,children:`Latest означает policy без закрепленной версии: updater будет брать свежий active release своего канала при следующем цикле или heartbeat hint.`})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Последние отчеты updater`}),(0,E.jsxs)(`div`,{className:`stateList`,children:[(0,E.jsx)(A,{label:`Updater health`,value:`${fe.label}: ${fe.detail}`}),(0,E.jsx)(A,{label:`rap-node-agent`,value:ct(le)}),(0,E.jsx)(A,{label:`rap-host-agent`,value:ct(ue)}),(0,E.jsx)(A,{label:`Всего отчетов`,value:String(f.length)}),(0,E.jsx)(A,{label:`Последний отчет`,value:V(de?.observed_at)})]}),(0,E.jsxs)(`div`,{className:`summaryChips`,children:[(0,E.jsx)(`span`,{className:`pill ${fe.tone}`,children:fe.label}),le&&(0,E.jsxs)(`span`,{className:`pill ${ut(le)}`,children:[`node-agent: `,le.status]}),ue&&(0,E.jsxs)(`span`,{className:`pill ${ut(ue)}`,children:[`host-agent: `,ue.status]}),!le&&!ue&&(0,E.jsx)(`span`,{className:`pill warn`,children:`updater пока не отчитался`})]})]})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`История обновлений`}),(0,E.jsx)(N,{columns:[`product`,`current`,`target`,`phase`,`status`,`attempt`,`error`,`observed`],rows:f.slice(0,40).map(e=>[e.product,e.current_version||`н/д`,e.target_version||`н/д`,e.phase,(0,E.jsx)(`span`,{className:`pill ${ut(e)}`,children:e.status}),e.attempt_id?B(e.attempt_id):`н/д`,e.error_message||`нет`,V(e.observed_at)])})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Windows repair/update command`}),(0,E.jsx)(`p`,{className:`muted`,children:`Для существующего Windows-узла эта команда переустанавливает wrapper updater без нового join-token, сохраняет local state и запускает обновление до актуальной сборки.`}),(0,E.jsxs)(`div`,{className:`stateList compact`,children:[(0,E.jsx)(A,{label:`Когда выполнять`,value:`если updater stale, host-agent не отчитался или Windows-узел не доходит до target version`}),(0,E.jsx)(A,{label:`Control API endpoint`,value:R()}),(0,E.jsx)(A,{label:`Join-token`,value:`не нужен для repair существующего узла`})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`primary`,onClick:()=>hn(fn(e),dn(e,pe)),children:`Скачать repair .cmd`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void gn(dn(e,pe)),children:`Скопировать команду`})]}),(0,E.jsx)(`pre`,{className:`codePreview`,children:dn(e,pe)})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Linux repair/update command`}),(0,E.jsx)(`p`,{className:`muted`,children:`Для существующего Ubuntu/Linux-узла эта команда восстанавливает systemd updater без нового join-token, сохраняет local state и делает одноразовую проверку обновления.`}),(0,E.jsxs)(`div`,{className:`stateList compact`,children:[(0,E.jsx)(A,{label:`Когда выполнять`,value:`если host-agent не отчитался, updater stale или Linux-узел не доходит до target version`}),(0,E.jsx)(A,{label:`Control API endpoint`,value:R()}),(0,E.jsx)(A,{label:`Join-token`,value:`не нужен для repair существующего узла`})]}),(0,E.jsxs)(`div`,{className:`actions`,children:[(0,E.jsx)(`button`,{className:`primary`,onClick:()=>hn(mn(e),pn(e,pe)),children:`Скачать repair .sh`}),(0,E.jsx)(`button`,{className:`ghost`,onClick:()=>void gn(pn(e,pe)),children:`Скопировать команду`})]}),(0,E.jsx)(`pre`,{className:`codePreview`,children:pn(e,pe)})]}),(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Payload последнего отчета`}),(0,E.jsxs)(`div`,{className:`rawDetailsGrid`,children:[(0,E.jsx)(Ce,{title:`rap-node-agent update status`,value:le}),(0,E.jsx)(Ce,{title:`rap-host-agent update status`,value:ue}),(0,E.jsx)(Ce,{title:`Update plan`,value:d})]})]})]}),k===`raw`&&(0,E.jsxs)(`section`,{className:`nodePanel`,children:[(0,E.jsx)(`h4`,{children:`Raw данные узла`}),(0,E.jsxs)(`div`,{className:`rawDetailsGrid`,children:[(0,E.jsx)(Ce,{title:`Последний heartbeat metadata`,value:m?.metadata}),(0,E.jsx)(Ce,{title:`Heartbeat capabilities`,value:m?.capabilities}),(0,E.jsx)(Ce,{title:`Heartbeat service states`,value:m?.service_states}),(0,E.jsx)(Ce,{title:`Synthetic mesh config`,value:c}),(0,E.jsx)(Ce,{title:`Listener report`,value:g}),(0,E.jsx)(Ce,{title:`Endpoint report`,value:v}),(0,E.jsx)(Ce,{title:`Peer recovery report`,value:x}),(0,E.jsx)(Ce,{title:`Connection intent report`,value:S}),(0,E.jsx)(Ce,{title:`Connection manager report`,value:C}),(0,E.jsx)(Ce,{title:`Rendezvous lease report`,value:w}),(0,E.jsx)(Ce,{title:`Route decision report`,value:T}),(0,E.jsx)(Ce,{title:`Route generation report`,value:ee}),(0,E.jsx)(Ce,{title:`Route health report`,value:te})]})]})]})}function Ce({title:e,value:t}){return(0,E.jsxs)(`details`,{className:`rawBlock`,children:[(0,E.jsx)(`summary`,{children:e}),(0,E.jsx)(`pre`,{children:t==null?`н/д`:JSON.stringify(t,null,2)})]})}function we({runtime:e}){return(0,E.jsxs)(`div`,{className:`runtimeBadges`,children:[(0,E.jsx)(`span`,{className:`pill ${e.agentTone}`,children:e.agentLabel}),(0,E.jsx)(`span`,{className:`pill ${e.clientTone}`,children:e.clientLabel}),(0,E.jsx)(`span`,{className:`pill ${e.outboundTone}`,children:e.outboundLabel}),(0,E.jsx)(`span`,{className:`pill ${e.inboundTone}`,children:e.inboundLabel})]})}function Te({node:e,fallback:t,heartbeatsByNode:n,meshLinks:r}){if(!e)return t;let i=Dt(e,n[e.id]||[],r);return(0,E.jsxs)(`div`,{className:`nodeEndpointCell`,children:[(0,E.jsx)(`strong`,{children:e.name}),(0,E.jsx)(we,{runtime:i}),(0,E.jsx)(`small`,{children:i.address})]})}function Ee({nodes:e,links:t,heartbeatsByNode:n,rolesByNode:r,workloadsByNode:i,labels:a,emptyText:o}){let[s,c]=(0,_.useState)(null);if(e.length===0)return(0,E.jsx)(ye,{title:`Нет узлов`,text:`Одобренные node-agent появятся на карте после первого heartbeat.`});let l=yt(t).filter(e=>e.source_node_id!==e.target_node_id),u=new Map(e.map(e=>[e.id,e])),d=l.filter(e=>Fe(e)&&!He(e,u)).map(e=>({link:e,status:Pe(e,l,u),kind:`direct`})).filter(e=>e.status===`reachable`||e.status===`one_way`),f=l.filter(e=>Ie(e)&&!He(e,u)).map(e=>({link:e,status:Pe(e,l,u),kind:`relay`})).filter(e=>e.status===`reachable`||e.status===`one_way`),p=l.filter(e=>P(e,`observation_type`)===`synthetic_route_health`&&!He(e,u)&&e.link_status===`reachable`).map(e=>({link:e,status:`reachable`,kind:`route`})),m=j(d,f,p),h=l.filter(e=>He(e,u)),g=l.filter(e=>!He(e,u)&&e.link_status!==`reachable`),v=Le(m.map(e=>e.link)),y=new Map(e.map(e=>[e.id,M(n[e.id]?.[0])])),b=[...y.values()].filter(e=>e.mode===`active`).length,x=[...y.values()].filter(e=>e.mode===`passive`).length,S=[...y.values()].filter(e=>e.mode===`mixed`).length,C=Ue(e.length),w=We(e.length),T=Ke(e,C.height,w),ee=new Map(e.map(e=>[e.id,De(e.id,m)]));return(0,E.jsxs)(`div`,{className:`topologyShell`,children:[(0,E.jsxs)(`svg`,{className:`topologySvg`,viewBox:`0 0 ${C.width} ${C.height}`,role:`img`,"aria-label":`Карта трафика узлов Fabric`,children:[(0,E.jsx)(`defs`,{children:(0,E.jsx)(`marker`,{id:`arrow`,markerHeight:`8`,markerWidth:`8`,orient:`auto`,refX:`7`,refY:`4`,children:(0,E.jsx)(`path`,{d:`M0,0 L8,4 L0,8 Z`,fill:`currentColor`})})}),m.map(({link:t,status:n,kind:r})=>{let i=T.get(t.source_node_id),a=T.get(t.target_node_id);if(!i||!a)return null;let o=m.some(e=>e.link.source_node_id===t.target_node_id&&e.link.target_node_id===t.source_node_id),s=Xe(t.source_node_id,t.target_node_id,r),l=Ze({source:i,target:a,sourceNodeID:t.source_node_id,targetNodeID:t.target_node_id,positions:T,nodeRadius:w,endpointOffset:w+8,laneOffset:o?9:0,laneSign:s,routeKind:r}),u=ke(Me(t,e,n)),d=Ae(l.labelX,l.labelY,C.width,C.height);return(0,E.jsxs)(`g`,{className:`topologyLinkGroup`,onMouseEnter:()=>c({...u,...d}),onMouseLeave:()=>c(null),children:[(0,E.jsx)(`title`,{children:[u.title,...u.lines].join(`
|
||
`)}),(0,E.jsx)(`path`,{d:l.d,className:`topologyLink ${Kn(t,n)} ${r}`,markerEnd:`url(#arrow)`}),m.length<=Math.max(6,e.length)&&(0,E.jsx)(`text`,{x:l.labelX,y:l.labelY-8,className:`topologyLinkLabel`,children:Ne(t,n,r)})]},`${r}-${t.id||`${t.source_node_id}-${t.target_node_id}`}`)}),e.map(t=>{let a=T.get(t.id),o=Ge(e.length),s=ee.get(t.id)||`isolated`,l=y.get(t.id)||{mode:`unknown`,detail:`no heartbeat`},u=ze(n[t.id]?.[0]),d=ke(je(t,l,s,u,n[t.id]?.[0],r[t.id]||[],i[t.id]||[])),f=Ae(a.x,a.y+w+12,C.width,C.height);return(0,E.jsxs)(`g`,{className:`topologyNode`,onMouseEnter:()=>c({...d,...f}),onMouseLeave:()=>c(null),children:[(0,E.jsx)(`title`,{children:[d.title,...d.lines].join(`
|
||
`)}),(0,E.jsx)(`circle`,{cx:a.x,cy:a.y,r:w,className:`topologyNodeCircle ${t.health_status} ${l.mode} web-${u}`}),(0,E.jsx)(`text`,{x:a.x,y:a.y-o.nameOffset,className:`topologyNodeName`,style:{fontSize:o.name},children:qn(t.name,o.maxChars)}),(0,E.jsx)(`text`,{x:a.x,y:a.y+o.metaOffset,className:`topologyNodeMeta`,style:{fontSize:o.meta},children:Oe(l.mode,s)})]},t.id)}),m.length===0&&(0,E.jsx)(`text`,{x:C.width/2,y:C.height-34,className:`topologyEmpty`,children:o}),s&&(0,E.jsx)(`foreignObject`,{x:s.x,y:s.y,width:`360`,height:`190`,className:`topologyTooltipObject`,children:(0,E.jsxs)(`div`,{className:`topologyTooltip`,children:[(0,E.jsx)(`strong`,{children:s.title}),s.lines.slice(0,6).map(e=>(0,E.jsx)(`span`,{children:e},e))]})})]}),(0,E.jsxs)(`div`,{className:`topologyLegend`,children:[(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendLine observed`}),` direct: `,d.length]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendLine relay`}),` relay: `,f.length]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendLine route`}),` route-health: `,p.length]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendLine observed`}),` bidirectional pairs: `,v]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendLine stale`}),` stale/problem: `,h.length,`/`,g.length]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendDot webReady`}),` web ready`]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendDot webDegraded`}),` web degraded`]}),(0,E.jsxs)(`span`,{children:[(0,E.jsx)(`i`,{className:`legendDot webBlocked`}),` web blocked`]}),(0,E.jsxs)(`span`,{children:[`active/passive/mixed: `,b,`/`,x,`/`,S]})]}),(0,E.jsxs)(`details`,{className:`sectionBlock fabricNodeDiagnostics`,children:[(0,E.jsxs)(`summary`,{children:[`Диагностика узлов (`,e.length,`)`]}),(0,E.jsx)(`div`,{className:`serviceTags`,children:e.map(e=>(0,E.jsxs)(`div`,{className:`serviceTag`,children:[(0,E.jsx)(`strong`,{children:e.name}),(0,E.jsxs)(`span`,{children:[H(e.health_status),` / `,H(y.get(e.id)?.mode||`unknown`),` / mesh `,H(ee.get(e.id)||`isolated`)]}),(0,E.jsx)(`small`,{children:Re(n[e.id]?.[0])}),(0,E.jsx)(`small`,{children:tt(r[e.id]||[])}),(0,E.jsx)(`small`,{children:it(i[e.id]||[])})]},e.id))})]})]})}function j(e,t,n){let r=[],i=new Set,a=e=>{let t=`${e.link.source_node_id}->${e.link.target_node_id}`;i.has(t)||(i.add(t),r.push(e))};return e.forEach(a),t.forEach(a),n.forEach(a),r}function De(e,t){let n=t.filter(t=>t.link.source_node_id!==t.link.target_node_id&&(t.link.source_node_id===e||t.link.target_node_id===e));return n.some(e=>e.status===`reachable`||e.status===`one_way`)?`connected`:n.some(e=>e.status!==`stale`)?`degraded`:`isolated`}function Oe(e,t){return`${e===`active`?`A`:e===`passive`?`P`:e===`mixed`?`M`:`?`} / ${t===`connected`?`mesh`:t===`degraded`?`degr`:`iso`}`}function ke(e){let[t,...n]=e.split(`
|
||
`).filter(Boolean);return{title:t||`Fabric`,lines:n}}function Ae(e,t,n,r){return{x:Math.min(Math.max(18,e+16),Math.max(18,n-360-18)),y:Math.min(Math.max(18,t+12),Math.max(18,r-190-18))}}function je(e,t,n,r,i,a,o){return[e.name,`health: ${H(e.health_status)}`,`mode: ${H(t.mode)} (${t.detail})`,`mesh: ${H(n)}`,`web ingress: ${H(r)} - ${Re(i)}`,`roles: ${tt(a)}`,`services: ${it(o)}`].join(`
|
||
`)}function Me(e,t,n){let r=L(t,e.source_node_id),i=L(t,e.target_node_id),a=V(e.observed_at),o=P(e,`observation_type`)||`link`,s=P(e,`transport_mode`)||`direct`,c=St(e,t),l=e.latency_ms==null?`н/д`:`${e.latency_ms}мс`;return[`${r} -> ${i}`,`status: ${Ct(e,t,n)}`,`type: ${o}`,`mode: ${s}`,`latency: ${l}`,`path: ${c}`,`observed: ${a}`].join(`
|
||
`)}function Ne(e,t,n=`direct`){return t===`one_way`?`1w`:n===`relay`?`relay`:n===`route`?`route`:e.latency_ms!=null&&e.latency_ms>0?`${e.latency_ms}мс`:``}function Pe(e,t,n){if(He(e,n))return`stale`;if(e.link_status!==`reachable`)return e.link_status===`degraded`||e.link_status===`unreachable`?e.link_status:`unknown`;let r=t.find(t=>t.source_node_id===e.target_node_id&&t.target_node_id===e.source_node_id&&!He(t,n));return!r||r.link_status!==`reachable`?`one_way`:`reachable`}function Fe(e){if(e.link_status!==`reachable`||P(e,`observation_type`)!==`peer_connection_manager`)return!1;let t=P(e,`transport_mode`);return t===`relay_control`||P(e,`relay_node_id`)?!1:e.metadata?.direct_candidate===!0||t===`direct_quic`||t===`private_lan`}function Ie(e){return P(e,`observation_type`)===`peer_connection_manager`?P(e,`transport_mode`)===`relay_control`||!!P(e,`relay_node_id`):!1}function Le(e){let t=new Set(e.map(e=>`${e.source_node_id}->${e.target_node_id}`)),n=new Set;for(let r of e){if(!t.has(`${r.target_node_id}->${r.source_node_id}`))continue;let e=[r.source_node_id,r.target_node_id].sort().join(`<->`);n.add(e)}return n.size}function M(e){if(!e)return{mode:`unknown`,detail:`no heartbeat`};let t=e.metadata||{},n=F(t.mesh_endpoint_report),r=F(t.mesh_listener_report),i=F(t.mesh_peer_connection_manager_report),a=Ot(i,`peer_connection_ready`),o=Ot(i,`peer_connection_relay_ready`),s=Ot(i,`peer_connection_waiting_rendezvous`),c=I(r,`status`,``),l=I(n,`connectivity_mode`,``),u=Et(n,[`peer_endpoint`,`advertised_endpoint`,`endpoint`]),d=c===`listening`||c===`auto_rebound`,f=l===`outbound_only`||s>0||o>a,p=[d?`listen`:`no-listen`,a?`direct${a}`:``,o?`relay${o}`:``,u?u.replace(/^quic:\/\//,``):``].filter(Boolean);return f&&a>0?{mode:`mixed`,detail:p.join(` `)||`mixed`}:f?{mode:`passive`,detail:p.join(` `)||`outbound/relay`}:d||a>0?{mode:`active`,detail:p.join(` `)||`direct`}:{mode:`unknown`,detail:p.join(` `)||`no runtime`}}function Re(e){let t=F(e?.metadata?.web_ingress_runtime_receiver_report);if(!t)return`web ingress: no report`;let n=t.enabled===!0||t.handler_installed===!0,r=Ot(t,`trusted_key_count`),i=Yt(t.service_classes),a=I(t,`status`,``),o=t.quic_fabric_ready===!0||a===`ready`,s=I(t,`reason`,n?`ready`:`blocked`),c=I(t,`quic_fabric_error`,``),l=i.length>0?i.join(`,`):`no classes`;return n?`web ingress: ${o?`ready`:a||s||`handler`} / keys ${r} / ${c||l}`:`web ingress: ${s}`}function ze(e){let t=F(e?.metadata?.web_ingress_runtime_receiver_report);if(!t)return`missing`;let n=I(t,`status`,``);return n===`ready`||n===`degraded`||n===`blocked`?n:t.handler_installed===!0?`degraded`:`blocked`}function Be(e,t){let n={ready:0,degraded:0,blocked:0,missing:0};for(let r of e){let e=ze(t[r.id]?.[0]);e===`ready`?n.ready+=1:e===`blocked`?n.blocked+=1:e===`degraded`?n.degraded+=1:n.missing+=1}return{...n,label:`${n.ready}/${e.length} ready, ${n.degraded} degraded, ${n.blocked} blocked`}}function Ve(e){let t=new Set;for(let n of nt(e))switch(n.role){case`global-admin-runtime`:t.add(`platform_admin`);break;case`cluster-admin-runtime`:t.add(`cluster_admin`);break;case`organization-portal-runtime`:t.add(`organization_portal`);break;case`user-portal-runtime`:t.add(`user_portal`);break}return[...t]}function He(e,t){if(e.link_status===`stale`||e.metadata?.derived_link_stale===!0)return!0;let n=new Date(e.observed_at).getTime();if(!Number.isFinite(n)||Date.now()-n>900*1e3)return!0;if(!t)return!1;let r=t.get(e.source_node_id),i=t.get(e.target_node_id);return r?.health_status!==`healthy`||i?.health_status!==`healthy`}function Ue(e){let t=qe(e),n=Math.max(Math.ceil(e/t),1);return{width:1280,height:Math.max(720,220+n*148)}}function We(e){return e>48?22:e>24?26:e>12?32:e>6?40:46}function Ge(e){return e>48?{name:11,meta:8,nameOffset:5,metaOffset:10,memoryOffset:0,maxChars:9}:e>24?{name:13,meta:9,nameOffset:6,metaOffset:12,memoryOffset:0,maxChars:11}:e>12?{name:15,meta:10,nameOffset:7,metaOffset:14,memoryOffset:0,maxChars:13}:e>6?{name:18,meta:12,nameOffset:8,metaOffset:15,memoryOffset:0,maxChars:15}:{name:20,meta:13,nameOffset:9,metaOffset:16,memoryOffset:0,maxChars:18}}function Ke(e,t,n){let r=qe(e.length),i=Math.max(1,Math.ceil(e.length/r)),a=n+98,o=1280-n-98,s=r===1?0:(o-a)/(r-1),c=n+88,l=t-n-88,u=i===1?0:(l-c)/(i-1);return new Map(e.map((e,t)=>{let n=t%r,o=Math.floor(t/r);return[e.id,{x:Math.round(r===1?560:a+s*n),y:Math.round(i===1?(c+l)/2:c+u*o)}]}))}function qe(e){return e>48?8:e>24?6:e>12?5:e>6?4:e>3?3:Math.max(1,e)}function Je(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=Math.max(Math.sqrt(r*r+i*i),1),o=r/a*n,s=i/a*n;return{x1:e.x+o,y1:e.y+s,x2:t.x-o,y2:t.y-s}}function Ye(e,t,n,r,i){let a=Je(e,t,n);if(r===0)return a;let o=t.x-e.x,s=t.y-e.y,c=Math.max(Math.sqrt(o*o+s*s),1),l=-s/c*r*i,u=o/c*r*i;return{x1:a.x1+l,y1:a.y1+u,x2:a.x2+l,y2:a.y2+u}}function Xe(e,t,n){let r=`${e}:${t}:${n}`,i=0;for(let e=0;e<r.length;e++)i=i*31+r.charCodeAt(e)|0;return i%2==0?1:-1}function Ze({source:e,target:t,sourceNodeID:n,targetNodeID:r,positions:i,nodeRadius:a,endpointOffset:o,laneOffset:s,laneSign:c,routeKind:l}){let u=Ye(e,t,o,s,c),d=u.x2-u.x1,f=u.y2-u.y1,p=Math.max(Math.sqrt(d*d+f*f),1),m=-f/p,h=d/p,g=0,_=1/0;for(let[e,t]of i){if(e===n||e===r)continue;let i=((t.x-u.x1)*d+(t.y-u.y1)*f)/(p*p);if(i<=.06||i>=.94)continue;let o=u.x1+i*d,s=u.y1+i*f,c=Math.sqrt((t.x-o)**2+(t.y-s)**2);c<a+34&&(g+=1,_=Math.min(_,c))}let v=l===`relay`?28:l===`route`?44:0,y=g>0?Math.max(72,a+34-_+g*28):0,b=(s+v+y)*c;if(Math.abs(b)<1)return{d:`M ${u.x1} ${u.y1} L ${u.x2} ${u.y2}`,labelX:(u.x1+u.x2)/2,labelY:(u.y1+u.y2)/2};let x=(u.x1+u.x2)/2,S=(u.y1+u.y2)/2,C=x+m*b,w=S+h*b;return{d:`M ${u.x1} ${u.y1} Q ${C} ${w} ${u.x2} ${u.y2}`,labelX:(u.x1+2*C+u.x2)/4,labelY:(u.y1+2*w+u.y2)/4}}function Qe({children:e}){return(0,E.jsx)(`div`,{className:`formGrid`,children:e})}function N({columns:e,rows:t}){return t.length===0?(0,E.jsx)(ye,{title:`Нет данных`,text:`В текущей области пока нечего показать.`}):(0,E.jsx)(`div`,{className:`tableWrap`,children:(0,E.jsxs)(`table`,{children:[(0,E.jsx)(`thead`,{children:(0,E.jsx)(`tr`,{children:e.map(e=>(0,E.jsx)(`th`,{children:e},e))})}),(0,E.jsx)(`tbody`,{children:t.map((e,t)=>(0,E.jsx)(`tr`,{children:e.map((e,n)=>(0,E.jsx)(`td`,{children:e},`${t}-${n}`))},t))})]})})}function $e(e,t){let n=JSON.parse(e||`{}`);if(!n||Array.isArray(n)||typeof n!=`object`)throw Error(`${t}: требуется JSON object.`);return n}function et(e,t){let n=JSON.parse(e||`[]`);if(!Array.isArray(n))throw Error(`${t}: требуется JSON array.`);return n}function tt(e){let t=nt(e);return t.length===0?`активные роли не назначены`:t.map(e=>`${rt(e.role)}${e.organization_id?` @ ${B(e.organization_id)}`:``}`).join(`, `)}function nt(e){return e.filter(e=>e.status===`active`)}function rt(e){let t=oe[e];return t?`${t} (${e})`:e}function it(e){return e.length===0?`нет сервисов`:e.map(e=>`${e.service_type}:${e.reported_state}`).join(`, `)}function at(e,t,n){let r=n.find(e=>e.product===`rap-node-agent`&&e.channel===`stable`&&e.status===`active`)||n.find(e=>e.product===`rap-node-agent`&&e.status===`active`),i=e.reported_version||``,a=t?.target_version||r?.version||``;return e.version_state&&e.version_state!==`unknown`?{status:e.version_state,targetLabel:a?`target ${a}`:`policy target unknown`}:i?t?.action===`update`?{status:`outdated`,targetLabel:`target ${t.target_version||a}`}:a&&i!==a?{status:`outdated`,targetLabel:`latest ${a}`}:a&&i===a?{status:`current`,targetLabel:`latest ${a}`}:{status:t?.reason===`no_update_policy`?`no_policy`:`unknown`,targetLabel:t?.reason||`release policy unknown`}:{status:`unknown`,targetLabel:a?`target ${a}`:`target unknown`}}function ot(e,t){return e.find(e=>e.product===t)}function st(e,t){return e?`${e.product}: ${e.phase}/${e.status}`:t?`${t.action}: ${t.reason}`:`нет отчета`}function ct(e){if(!e)return`нет отчета`;let t=e.target_version?` -> ${e.target_version}`:``,n=e.error_message?`, ошибка: ${e.error_message}`:``;return`${e.current_version||`н/д`}${t}, ${e.phase}/${e.status}, ${V(e.observed_at)}${n}`}function lt(e){return e?`push ${e.pushed||0} / pop ${e.popped||0} / q ${e.queue_depth||0} / drop ${e.dropped||0}`:`нет данных`}function ut(e){if(!e)return`warn`;let t=`${e.phase}:${e.status}`.toLowerCase();return t.includes(`error`)||t.includes(`failed`)||t.includes(`rollback`)?`bad`:t.includes(`success`)||t.includes(`updated`)||t.includes(`noop`)||t.includes(`already_current`)?`good`:t.includes(`download`)||t.includes(`replace`)||t.includes(`plan`)||t.includes(`apply`)?`warn`:``}function dt(e){let t=e.toLowerCase();return t===`healthy`?`good`:t===`fenced`?`bad`:t===`degraded`||t===`operator_retry_cooldown`?`warn`:``}function ft(e){let t=e.toLowerCase();return t===`healthy`?`good`:t===`recovered`||t===`cooldown`||t===`degraded`?`warn`:t===`fenced`||t===`demoted`?`bad`:``}function pt(e){if(e.status===`disabled`||e.lifecycle_status===`disabled`)return`disabled`;if(e.is_expired||e.lifecycle_status===`expired`)return`expired`;let t=Date.parse(e.policy_expires_at||``);return Number.isFinite(t)&&t<=Date.now()?`expired`:e.lifecycle_status||e.status||`active`}function mt(e){let t=pt(e);return t===`active`?`good`:t===`expired`?`warn`:t===`disabled`?``:`warn`}function ht(e){let t=typeof e.node_id==`string`?e.node_id:``;if(t)return B(t);let n=Array.isArray(e.node_ids)?e.node_ids.filter(e=>typeof e==`string`):[];return n.length>0?n.map(B).join(`, `):`selector`}function gt(e){let t=ot(e,`rap-node-agent`),n=ot(e,`rap-host-agent`);if(!t&&!n)return{label:`updater: нет отчета`,detail:`repair/update task не отчитался`,tone:`bad`};let r=[t,n].some(e=>e&&_t(e)),i=!n,a=n?.phase===`apply`&&n?.status===`staged`,o=[t,n].some(e=>e&&ut(e)===`bad`),s=t?`${t.current_version||`?`}->${t.target_version||`?`}`:`node ?`,c=n?`${n.current_version||`?`}->${n.target_version||`?`}`:`host ?`,l=V((n||t)?.observed_at);return o?{label:`updater: ошибка`,detail:`${s}; ${c}; ${l}`,tone:`bad`}:i?{label:`repair updater`,detail:`host-agent не отчитался; ${s}; ${l}`,tone:`warn`}:a?{label:`host-agent staged`,detail:`${c}; нужен следующий запуск updater`,tone:`warn`}:r?{label:`updater: stale`,detail:`${s}; ${c}; ${l}`,tone:`warn`}:{label:`updater: ok`,detail:`${s}; ${c}; ${l}`,tone:`good`}}function _t(e){let t=new Date(e.observed_at).getTime();return!Number.isFinite(t)||Date.now()-t>900*1e3}function vt(e){let t=typeof e.scope?.node_name==`string`?e.scope.node_name:``,n=typeof e.scope?.purpose==`string`?e.scope.purpose:``;return t||n||B(e.id)}function yt(e){let t=new Map;for(let n of e){let e=`${n.source_node_id}->${n.target_node_id}:${bt(n)}`,r=t.get(e);(!r||new Date(n.observed_at).getTime()>new Date(r.observed_at).getTime())&&t.set(e,n)}return[...t.values()]}function bt(e){let t=P(e,`observation_type`)||`default`;return t===`synthetic_route_health`?`${t}:${P(e,`route_id`)||e.id}`:t===`peer_connection_manager`?`${t}:${P(e,`transport_mode`)}:${P(e,`relay_node_id`)}`:t}function xt(e){let t=P(e,`observation_type`);if(t===`synthetic_route_health`){let t=e.metadata?.route_path_drift_detected===!0?`drift`:`ok`;return`route-health ${e.metadata?.route_path_decision_applied===!0?`decision`:`route`} ${t}`}if(t===`peer_connection_manager`){let t=P(e,`transport_mode`)||`manager`,n=P(e,`connection_state`);return n?`${t} ${n}`:t}return t||`link`}function St(e,t){let n=P(e,`route_id`),r=P(e,`route_path_decision_selected_relay_id`)||P(e,`relay_node_id`),i=wt(e,`expected_effective_hops`),a=wt(e,`observed_ack_path`),o=i.length>0?i:a,s=[];return n&&s.push(B(n)),r&&s.push(`via ${B(r)}`),o.length>0&&s.push(o.map(e=>qn(L(t,e))).join(` > `)),s.length>0?s.join(` / `):`н/д`}function Ct(e,t,n=e.link_status===`reachable`?`reachable`:`unknown`){if(n===`stale`)return`stale`;if(n===`one_way`)return`one-way`;let r=P(e,`observation_type`);if(r===`synthetic_route_health`){let n=P(e,`route_path_decision_selected_relay_id`);return n?`relay ${qn(L(t,n),10)}`:e.metadata?.route_path_drift_detected===!0?`drift`:`route`}if(r===`peer_connection_manager`){let n=P(e,`transport_mode`),r=P(e,`relay_node_id`);if(n===`relay_control`||r)return r?`relay ${qn(L(t,r),10)}`:`relay`;if(n===`direct_quic`||n===`private_lan`||P(e,`direct_candidate`)===`true`)return e.latency_ms==null?`direct`:`${e.latency_ms}мс`;if(n)return H(n)}return e.latency_ms==null?`связь`:`${e.latency_ms}мс`}function P(e,t){let n=e.metadata?.[t];return typeof n==`string`?n:``}function wt(e,t){let n=e.metadata?.[t];return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}function F(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:void 0}function Tt(e){return Array.isArray(e)?e.map(e=>F(e)).filter(e=>!!e):[]}function I(e,t,n=``){let r=e?.[t];return typeof r==`string`?r:typeof r==`number`||typeof r==`boolean`?String(r):n}function Et(e,t){for(let n of t){let t=I(e,n,``);if(t)return t}return``}function Dt(e,t,n){let r=t[0],i=r?.metadata||{},a=F(i.mesh_listener_report),o=F(i.mesh_endpoint_report),s=F(i.mesh_outbound_session_report),c=F(i.mesh_peer_connection_manager_report),l=F(i.mesh_peer_recovery_report),u=Tt(o?.endpoint_candidates)[0],d=Et(o,[`peer_endpoint`,`advertised_endpoint`,`endpoint`])||I(u,`address`,``)||I(a,`effective_listen_addr`,``)||`адрес не прислан`;if(!r&&!e.last_seen_at)return{agentLabel:`agent: no heartbeat`,agentTone:`bad`,clientLabel:`client: unknown`,clientTone:`warn`,outboundLabel:`outbound: no heartbeat`,outboundTone:`bad`,inboundLabel:`inbound: unknown`,inboundTone:`warn`,address:d,detail:`Узел создан/одобрен, но node-agent еще ни разу не прислал heartbeat.`};let f=Ot(c,`peer_connection_ready`)||Ot(l,`peer_connection_ready`)||yt(n).filter(t=>(t.source_node_id===e.id||t.target_node_id===e.id)&&t.link_status===`reachable`).length,p=Ot(c,`peer_connection_total`)||Ot(l,`peer_connection_total`)||yt(n).filter(t=>t.source_node_id===e.id||t.target_node_id===e.id).length,m=Ot(c,`failed`),h=I(a,`status`,``),g=a?.port_conflict===!0,_=a?.one_way_connectivity===!0||I(o,`connectivity_mode`,``)===`outbound_only`||Ot(c,`peer_connection_relay_ready`)>0,v=`inbound: no report`,y=`warn`;h===`listening`||h===`auto_rebound`?(v=h===`auto_rebound`?`inbound: auto port`:`inbound: listening`,y=`good`):h===`listen_failed`?(v=g?`inbound: port busy`:`inbound: failed`,y=`bad`):h===`disabled`?(v=`inbound: disabled`,y=_?`warn`:`bad`):o&&(v=`inbound: advertised`,y=`good`);let b=`client: no peers`,x=`warn`;f>0?(b=`client: ready ${f}/${Math.max(p,f)}`,x=`good`):(m>0||p>0)&&(b=`client: backoff ${f}/${Math.max(p,m)}`,x=`bad`);let S=I(s,`status`,``),C=s?.usable_for_inbound_control===!0,w=Ot(s,`peer_connection_relay_ready`),T=Ot(s,`rendezvous_lease_count`),ee=`outbound: no report`,te=`warn`;S===`ready`?(ee=C?`outbound: ready reverse`:`outbound: ready`,te=`good`):S===`backoff`||S===`failed`?(ee=`outbound: ${S}`,te=`bad`):(_||w>0||T>0)&&(ee=`outbound: inferred`,te=`warn`);let E=e.health_status===`healthy`?`good`:e.health_status===`unknown`?`warn`:`bad`;return{agentLabel:r?`agent: heartbeat`:`agent: stale`,agentTone:E,clientLabel:_&&f>0?`${b} one-way`:b,clientTone:x,outboundLabel:ee,outboundTone:te,inboundLabel:v,inboundTone:y,address:d,detail:I(a,`failure_error`,I(a,`failure_reason`,``))}}function Ot(e,t,n=0){let r=e?.[t];return typeof r==`number`&&Number.isFinite(r)?r:n}function kt(e){let t=e.products.filter(e=>!e.compatible_artifact_found).map(e=>e.product);if(t.length>0)return`Добавить recovery artifacts для ${t.join(`, `)} и не снимать compatibility overlap.`;let n=e.risks.filter(e=>e.startsWith(`stale_node_legacy_recovery_contract_`)).map(e=>e.replace(`stale_node_legacy_recovery_contract_`,``));if(n.length>0)return e.recovery_bridge_replay_ready?`Узел застрял на старом recovery-контракте (${n.join(`, `)}): bridge replay уже готов, держать recovery bridge / compatibility aliases / overlap и ждать следующий recovery-цикл узла.`:`Узел застрял на старом recovery-контракте (${n.join(`, `)}): держать recovery bridge / compatibility aliases / overlap и не удалять старые recovery-форматы до возврата heartbeat.`;let r=e.risks.filter(e=>e.startsWith(`stale_node_unknown_profile_`)).map(e=>e.replace(`stale_node_unknown_profile_`,``));if(r.length>0)return`Неизвестен update profile (${r.join(`, `)}): нужен heartbeat/update-status или fallback-profile alias.`;let i=e.risks.filter(e=>e.startsWith(`stale_node_unknown_`)&&e.endsWith(`_version`)).map(e=>e.replace(`stale_node_unknown_`,``).replace(`_version`,``));if(i.length>0)return`Нет подтвержденной версии (${i.join(`, `)}): сохранить overlap и проверить last known good release mapping.`;let a=e.risks.filter(e=>e.startsWith(`stale_node_no_`)&&e.endsWith(`_update_status`)).map(e=>e.replace(`stale_node_no_`,``).replace(`_update_status`,``));return a.length>0?`Узел молчит и не прислал update-status (${a.join(`, `)}): держать compatibility и чинить recovery channel.`:e.risks.includes(`stale_heartbeat`)?`Узел stale, но recovery artifacts уже есть: не удалять совместимость, ждать исходящий recovery heartbeat и проверить bootstrap/registry gossip.`:`Риск под контролем: можно наблюдать heartbeat и готовить controlled cleanup после отдельной проверки.`}function At(e){let t=e.products.filter(e=>!e.compatible_artifact_found).map(e=>e.product);if(t.length>0)return`artifact gap: ${t.join(`, `)}`;let n=e.risks.filter(e=>e.startsWith(`stale_node_legacy_recovery_contract_`)).map(e=>e.replace(`stale_node_legacy_recovery_contract_`,``));if(n.length>0)return e.recovery_bridge_replay_ready?`bridge replay ready: ${n.join(`, `)}`:`recovery bridge required: ${n.join(`, `)}`;let r=e.risks.filter(e=>e.startsWith(`stale_node_unknown_profile_`)).map(e=>e.replace(`stale_node_unknown_profile_`,``));if(r.length>0)return`profile unknown: ${r.join(`, `)}`;let i=e.risks.filter(e=>e.startsWith(`stale_node_no_`)&&e.endsWith(`_update_status`)).map(e=>e.replace(`stale_node_no_`,``).replace(`_update_status`,``));if(i.length>0)return`waiting update status: ${i.join(`, `)}`;let a=e.risks.filter(e=>e.startsWith(`stale_node_unknown_`)&&e.endsWith(`_version`)).map(e=>e.replace(`stale_node_unknown_`,``).replace(`_version`,``));return a.length>0?`version unknown: ${a.join(`, `)}`:e.heartbeat_stale?`artifacts ready, waiting recovery heartbeat`:`recovery ready`}function jt(e,t){if(!t||e.target_id===t)return!0;let n=F(e.payload);return[`node_id`,`target_node_id`,`reporter_node_id`,`entry_node_id`,`exit_node_id`,`selected_node_id`].some(e=>I(n,e,``)===t)}function Mt(e){let t=Tt(e.endpoint_candidates);if(t.length>0)return t.map(e=>{let t=I(e,`address`,``);if(!t)return``;let n=[t];for(let t of[`reachability`,`connectivity_mode`,`nat_type`,`region`,`priority`]){let r=I(e,t,``);r&&n.push(`${t.replace(`_mode`,``).replace(`_type`,``)}=${r}`)}let r=F(e.metadata);for(let e of[`provider`,`interface`,`maps_to`]){let t=I(r,e,``);t&&n.push(`${e}=${t}`)}return n.join(` `)}).filter(Boolean).join(`
|
||
`);let n=Array.isArray(e.advertise_endpoints)?e.advertise_endpoints:[];return n.length>0?n.map(e=>String(e||``).trim()).filter(Boolean).join(`
|
||
`):I(e,`advertise_endpoint`,``)}function Nt(e,t){let n=e.endpointCandidates.split(/\r?\n/).map(e=>e.trim()).filter(e=>e&&!e.startsWith(`#`));n.length===0&&e.advertiseEndpoint.trim()&&n.push(e.advertiseEndpoint.trim());let r=new Set;return n.flatMap((n,i)=>{let a=n.split(/\s+/).filter(Boolean),o=(a.shift()||``).replace(/\/$/,``);if(!o||r.has(o))return[];r.add(o);let s={};for(let e of a){let t=e.indexOf(`=`);t>0?s[e.slice(0,t).trim().toLowerCase()]=e.slice(t+1).trim():[`public`,`private`,`relay`,`outbound_only`,`unknown`].includes(e)?s.reachability=e:[`direct`,`private_lan`,`relay_required`].includes(e)?s.connectivity=e:[`none`,`full_cone`,`restricted`,`port_restricted`,`symmetric`,`blocked`].includes(e)&&(s.nat=e)}let c=s.connectivity||s.connectivity_mode||e.connectivity||`direct`,l=s.reachability||Pt(o,c),u=s.nat||s.nat_type||e.nat||`unknown`,d=Object.fromEntries(Object.entries(s).filter(([e])=>![`reachability`,`connectivity`,`connectivity_mode`,`nat`,`nat_type`,`priority`,`region`,`transport`].includes(e)));return[{endpoint_id:`${t}-operator-${i+1}`,node_id:t,address:o,transport:s.transport||e.advertiseTransport||`direct_quic`,reachability:l,connectivity_mode:c,nat_type:u,region:s.region||e.region||void 0,priority:Number.isFinite(Number(s.priority))?Number(s.priority):i+1,policy_tags:[`operator-configured`,`desired-mesh-listener`],metadata:{source:`web-admin.mesh-listener`,verification_scope:l===`public`?`external-network-required`:`local-or-peer-probe`,...d}}]})}function Pt(e,t){if(t===`relay_required`)return`relay`;if(t===`outbound_only`)return`outbound_only`;let n=e.replace(/^[a-z][a-z0-9+.-]*:\/\//i,``).split(/[/:?#]/)[0]||``;return n===`localhost`||n.startsWith(`127.`)||n.startsWith(`10.`)||n.startsWith(`192.168.`)||/^172\.(1[6-9]|2\d|3[0-1])\./.test(n)?`private`:`public`}function Ft(e){if(e==null)return`н/д`;let t=JSON.stringify(e);return t.length>140?`${t.slice(0,137)}...`:t}function It(e){let t=Tt(e.candidate_results);return t.length===0?`н/д`:t.slice(0,4).map(e=>{let t=I(e,`candidate_id`,`candidate`),n=I(e,`link_status`,`unknown`),r=I(e,`latency_ms`,``);return r&&r!==`0`?`${t}:${n}:${r}мс`:`${t}:${n}`}).join(`, `)}function Lt(e){return Object.values(e.peer_endpoint_candidates||{}).reduce((e,t)=>e+t.length,0)}function Rt(e){let t=e?.rendezvous_relay_policy;if(!t)return`none`;let n=[`stale${t.stale_relay_count}`,`wd${t.withdrawn_lease_count}`,`repl${t.replacement_lease_count}`];t.scoring_mode.includes(`synthetic_route_health_feedback`)&&n.push(`rh feedback`);let r=t.decisions?.find(e=>e.selected_relay_id);return r?.selected_relay_id&&n.push(`via ${B(r.selected_relay_id)}`),n.join(` `)}function zt(e){let t=e?.route_path_decisions;if(!t)return`none`;let n=[`path${t.decision_count}`,`repl${t.replacement_decision_count}`];(t.degraded_decision_count||0)>0&&n.push(`degr${t.degraded_decision_count}`);let r=t.decisions?.find(e=>e.selected_relay_id||e.next_hop_id);return r?.selected_relay_id?n.push(`via ${B(r.selected_relay_id)}`):r?.next_hop_id&&n.push(`next ${B(r.next_hop_id)}`),n.join(` `)}function L(e,t){return e.find(e=>e.id===t)?.name||B(t)}function Bt(e,t){let n=new Map(t.map(e=>[e.id,e])),r=[e.name],i=e.parent_group_id,a=new Set([e.id]);for(;i&&!a.has(i);){a.add(i);let e=n.get(i);if(!e)break;r.unshift(e.name),i=e.parent_group_id}return r.join(` / `)}function Vt(e,t){let n=t.find(t=>t.id===e);return n?Bt(n,t):e}function Ht(e,t){let n=[],r=new Map;for(let e of t){let t=e.parent_group_id||``;r.set(t,[...r.get(t)||[],e])}let i=e=>{for(let t of r.get(e)||[])n.push(t.id),i(t.id)};return i(e),n}function Ut(e,t,n,r,i){let a=[],o=new Map,s=[],c=[];for(let t of e){let e=t.memberships.find(e=>e.cluster.id===n);if(!e){c.push(t);continue}let r=e.node.node_group_id;if(!r){s.push(t);continue}o.set(r,[...o.get(r)||[],t])}let l=new Map;for(let e of t){let t=e.parent_group_id||``;l.set(t,[...l.get(t)||[],e])}for(let e of l.values())e.sort((e,t)=>e.sort_order-t.sort_order||e.name.localeCompare(t.name));let u=new Map,d=e=>{let t=u.get(e.id);if(t!=null)return t;let n=o.get(e.id)?.length||0;for(let t of l.get(e.id)||[])n+=d(t);return u.set(e.id,n),n},f=(e,t)=>{let n=[...o.get(e.id)||[]].sort((e,t)=>e.node.name.localeCompare(t.node.name)),r=l.get(e.id)||[],s=`group-${e.id}`,c=d(e);if(a.push({kind:`group`,key:s,label:e.name,depth:t,count:c,groupId:e.id}),!i.has(s)){for(let r of n)a.push({kind:`node`,key:`node-${e.id}-${r.node.id}`,entry:r,depth:t+1});for(let e of r)f(e,t+1)}return c};for(let e of l.get(``)||[])f(e,0);if(s.length>0){let e=`group-ungrouped`;if(a.push({kind:`group`,key:e,label:r.ungroupedNodes,depth:0,count:s.length}),!i.has(e))for(let e of s.sort((e,t)=>e.node.name.localeCompare(t.node.name)))a.push({kind:`node`,key:`node-ungrouped-${e.node.id}`,entry:e,depth:1})}if(c.length>0){let e=`group-outside-active-cluster`;if(a.push({kind:`group`,key:e,label:r.notMemberOfActiveCluster,depth:0,count:c.length}),!i.has(e))for(let e of c.sort((e,t)=>e.node.name.localeCompare(t.node.name)))a.push({kind:`node`,key:`node-outside-${e.node.id}`,entry:e,depth:1})}return a}function Wt(e,t){return Object.entries(t).filter(([,t])=>t.some(t=>t.role===e&&t.status===`active`)).map(([e])=>e)}function Gt(e){let t=Jt(e),n=t.map(e=>String(e.address||``)).filter(Boolean),r=e.meshAdvertiseEndpoint.trim().replace(/\/$/,``)||n[0]||``,i={roles:e.roles,node_name:e.nodeName.trim()||null,node_group_id:e.nodeGroupId||null,ownership_type:e.ownershipType,purpose:e.purpose.trim()||null,approval:{mode:`manual`,auto_approve:!1,role_assignment:`manual_after_approval`},source:`platform_owner_console`};if(e.installMode===`docker`){let n=(e.controlPlaneEndpoint||Zt()).trim().replace(/\/$/,``);i.install_profile=`docker`,i.backend_url=n,i.control_plane_endpoints=[n],i.image=e.dockerImage||`rap-node-agent:latest`,e.dockerContainerName.trim()&&(i.container_name=e.dockerContainerName.trim()),i.artifact_endpoints=$t(e.artifactEndpoints||Qt()),e.dockerImageArtifactSHA256.trim()&&(i.docker_image_artifact_sha256=e.dockerImageArtifactSHA256.trim()),i.network=e.dockerNetwork||`host`,i.restart_policy=`unless-stopped`,i.pull_image=!!e.pullImage,i.replace=e.replace!==!1,i.mesh_synthetic_runtime_enabled=e.syntheticRuntime===!0,i.mesh_production_forwarding_enabled=!1,i.mesh_listen_addr=e.meshListenAddr||``,i.mesh_listen_port_mode=e.meshListenPortMode||`auto`,i.mesh_listen_auto_port_start=e.meshListenAutoPortStart||19131,i.mesh_listen_auto_port_end=e.meshListenAutoPortEnd||19231,r&&(i.mesh_advertise_endpoint=r),t.length>0&&(i.mesh_advertise_endpoints_json=JSON.stringify(t)),i.mesh_advertise_transport=e.meshAdvertiseTransport||`direct_quic`,i.mesh_connectivity_mode=e.meshConnectivityMode||`private_lan`,i.mesh_nat_type=e.meshNATType||`unknown`,i.mesh_region=e.meshRegion||null}if(e.installMode===`windows_service`){let n=(e.controlPlaneEndpoint||Zt()).trim().replace(/\/$/,``);i.install_profile=`windows_service`,i.backend_url=n,i.control_plane_endpoints=[n],i.artifact_endpoints=$t(e.artifactEndpoints||Qt()),i.startup_mode=e.windowsStartupMode||`auto`,e.windowsInstallDir.trim()&&(i.install_dir=e.windowsInstallDir.trim()),e.windowsNodeAgentSHA256.trim()&&(i.node_agent_artifact_sha256=e.windowsNodeAgentSHA256.trim()),i.mesh_synthetic_runtime_enabled=e.syntheticRuntime===!0,i.mesh_production_forwarding_enabled=!1,i.mesh_listen_addr=e.meshListenAddr||``,i.mesh_listen_port_mode=e.meshListenPortMode||`auto`,i.mesh_listen_auto_port_start=e.meshListenAutoPortStart||19131,i.mesh_listen_auto_port_end=e.meshListenAutoPortEnd||19231,r&&(i.mesh_advertise_endpoint=r),t.length>0&&(i.mesh_advertise_endpoints_json=JSON.stringify(t)),i.mesh_advertise_transport=e.meshAdvertiseTransport||`direct_quic`,i.mesh_connectivity_mode=e.meshConnectivityMode||`outbound_only`,i.mesh_nat_type=e.meshNATType||`unknown`,i.mesh_region=e.meshRegion||`windows`}if(e.installMode===`linux_binary`){let n=(e.controlPlaneEndpoint||Zt()).trim().replace(/\/$/,``);i.install_profile=`linux_binary`,i.backend_url=n,i.control_plane_endpoints=[n],i.artifact_endpoints=$t(e.artifactEndpoints||Qt()),i.startup_mode=`systemd`,e.linuxInstallDir.trim()&&(i.install_dir=e.linuxInstallDir.trim()),e.linuxNodeAgentSHA256.trim()&&(i.node_agent_artifact_sha256=e.linuxNodeAgentSHA256.trim()),i.replace=e.replace!==!1,i.mesh_synthetic_runtime_enabled=e.syntheticRuntime===!0,i.mesh_production_forwarding_enabled=!1,i.mesh_listen_addr=e.meshListenAddr||``,i.mesh_listen_port_mode=e.meshListenPortMode||`auto`,i.mesh_listen_auto_port_start=e.meshListenAutoPortStart||19131,i.mesh_listen_auto_port_end=e.meshListenAutoPortEnd||19231,r&&(i.mesh_advertise_endpoint=r),t.length>0&&(i.mesh_advertise_endpoints_json=JSON.stringify(t)),i.mesh_advertise_transport=e.meshAdvertiseTransport||`direct_quic`,i.mesh_connectivity_mode=e.meshConnectivityMode||`outbound_only`,i.mesh_nat_type=e.meshNATType||`unknown`,i.mesh_region=e.meshRegion||`linux`}return i}function Kt(e,t){let n=Yt(e.roles),r=Yt(e.artifact_endpoints).join(`, `);return{...t,roles:n.length>0?n:t.roles,nodeName:I(e,`node_name`,``)||t.nodeName,nodeGroupId:I(e,`node_group_id`,``)||t.nodeGroupId,ownershipType:I(e,`ownership_type`,t.ownershipType),purpose:I(e,`purpose`,``)||t.purpose,installMode:I(e,`install_profile`,t.installMode),dockerImage:I(e,`image`,t.dockerImage),dockerContainerName:I(e,`container_name`,``)||t.dockerContainerName,dockerNetwork:I(e,`network`,t.dockerNetwork),windowsStartupMode:I(e,`startup_mode`,t.windowsStartupMode),windowsInstallDir:I(e,`install_dir`,``)||t.windowsInstallDir,windowsNodeAgentSHA256:I(e,`node_agent_artifact_sha256`,``)||t.windowsNodeAgentSHA256,linuxInstallDir:I(e,`install_dir`,``)||t.linuxInstallDir,linuxNodeAgentSHA256:I(e,`node_agent_artifact_sha256`,``)||t.linuxNodeAgentSHA256,meshListenAddr:I(e,`mesh_listen_addr`,t.meshListenAddr),meshListenPortMode:I(e,`mesh_listen_port_mode`,t.meshListenPortMode),meshListenAutoPortStart:Ot(e,`mesh_listen_auto_port_start`,t.meshListenAutoPortStart),meshListenAutoPortEnd:Ot(e,`mesh_listen_auto_port_end`,t.meshListenAutoPortEnd),meshAdvertiseEndpoint:I(e,`mesh_advertise_endpoint`,``)||t.meshAdvertiseEndpoint,meshAdvertiseEndpoints:qt(e)||t.meshAdvertiseEndpoints,meshAdvertiseTransport:I(e,`mesh_advertise_transport`,t.meshAdvertiseTransport),meshConnectivityMode:I(e,`mesh_connectivity_mode`,t.meshConnectivityMode),meshNATType:I(e,`mesh_nat_type`,t.meshNATType),meshRegion:I(e,`mesh_region`,``)||t.meshRegion,controlPlaneEndpoint:Yt(e.control_plane_endpoints)[0]||I(e,`backend_url`,``)||t.controlPlaneEndpoint,artifactEndpoints:r||t.artifactEndpoints,dockerImageArtifactSHA256:I(e,`docker_image_artifact_sha256`,``)||t.dockerImageArtifactSHA256,pullImage:Xt(e,`pull_image`,t.pullImage),replace:Xt(e,`replace`,t.replace),syntheticRuntime:Xt(e,`mesh_synthetic_runtime_enabled`,t.syntheticRuntime)}}function qt(e){let t=I(e,`mesh_advertise_endpoints_json`,``);if(!t)return``;try{let e=JSON.parse(t);return Array.isArray(e)?e.map(e=>{let t=F(e);if(!t)return``;let n=I(t,`address`,``);if(!n)return``;let r=[n];for(let e of[`reachability`,`connectivity_mode`,`nat_type`,`region`,`priority`]){let n=I(t,e,``);n&&r.push(`${e.replace(`_mode`,``).replace(`_type`,``)}=${n}`)}let i=F(t.metadata);for(let e of[`provider`,`interface`,`maps_to`]){let t=I(i,e,``);t&&r.push(`${e}=${t}`)}return r.join(` `)}).filter(Boolean).join(`
|
||
`):``}catch{return``}}function Jt(e){return Nt({endpointCandidates:e.meshAdvertiseEndpoints,advertiseEndpoint:e.meshAdvertiseEndpoint,advertiseTransport:e.meshAdvertiseTransport||`direct_quic`,connectivity:e.meshConnectivityMode,nat:e.meshNATType,region:e.meshRegion},e.nodeName.trim()||`install-node`)}function Yt(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`).map(e=>e.trim()).filter(Boolean):[]}function Xt(e,t,n){let r=e[t];return typeof r==`boolean`?r:n}function Zt(){return typeof window>`u`||!window.location?.origin?`http://<control-api-host>:18080/api/v1`:`${window.location.origin.replace(/\/$/,``)}/api/v1`}function Qt(){return typeof window>`u`||!window.location?.origin?`http://<bootstrap-host>:18080/downloads`:`${window.location.origin.replace(/\/$/,``)}/downloads`}function $t(e){return e.split(`,`).map(e=>e.trim().replace(/\/$/,``)).filter(Boolean)}function en(e){return $t(e.artifactEndpoints||Qt()).map(e=>`${e}/rap-node-agent-dev-enrollment-bootstrap-smoke.tar`)}function tn(e){return e.meshConnectivityMode===`outbound_only`?`outbound_only`:e.meshConnectivityMode===`private_lan`?`private_lan`:e.meshNATType!==`none`&&e.meshAdvertiseEndpoint.trim()?`nat_forward`:`direct`}function nn(e,t){let n={...e};return t===`private_lan`?(n.meshConnectivityMode=`private_lan`,n.meshNATType=`none`):t===`direct`?(n.meshConnectivityMode=`direct`,n.meshNATType=`none`):t===`nat_forward`?(n.meshConnectivityMode=`direct`,n.meshNATType=`port_restricted`):(n.meshConnectivityMode=`outbound_only`,n.meshNATType=`symmetric`,n.meshAdvertiseEndpoint=``),n}function rn(e,t){return e.nodeName.trim()?e.nodeName.trim():`${Tn(t?.slug||t?.name||`rap-node`)}-node-1`}function an(e,t){return e.dockerContainerName.trim()?e.dockerContainerName.trim():`rap-node-agent-${Tn(rn(e,t))}`}function on(e,t,n=ue){let r=t?.id||e.cluster_id,i=rn(n,t),a=an(n,t),o=Tn(i),s=[`rap-host-agent install`,`--backend-url ${z(xn(n))}`,`--cluster-id ${z(r)}`,`--join-token ${z(e.token)}`,`--node-name ${z(i)}`,`--image ${z(n.dockerImage||`rap-node-agent:latest`)}`,`--container-name ${z(a)}`,`--state-dir ${z(`/var/lib/rap/nodes/${o}`)}`,`--network host`,`--replace`];for(let e of en(n))s.push(`--image-artifact-url ${z(e)}`);return n.dockerImageArtifactSHA256.trim()&&s.push(`--image-artifact-sha256 ${z(n.dockerImageArtifactSHA256.trim())}`),s.join(` \\
|
||
`)}function sn(e,t,n=ue){let r=t?.id||e.cluster_id,i=rn(n,t),a=[`sudo "$rap_host_agent" install`,`--profile-url ${z(xn(n))}`,`--cluster-id ${z(r)}`,`--install-token ${z(e.token)}`,`--node-name ${z(i)}`].join(` \\
|
||
`);return[`rap_host_agent="$(mktemp /tmp/rap-host-agent.XXXXXX)"`,`curl -fL --retry 3 --retry-delay 1 ${z(Cn(n))} -o "$rap_host_agent"`,`chmod +x "$rap_host_agent"`,a].join(` && \\
|
||
`)}function cn(e,t,n=ue){let r=t?.id||e.cluster_id,i=rn(n,t),a=[`sudo "$rap_host_agent" install-linux`,`--profile-url ${z(xn(n))}`,`--cluster-id ${z(r)}`,`--install-token ${z(e.token)}`,`--node-name ${z(i)}`].join(` \\
|
||
`);return[`rap_host_agent="$(mktemp /tmp/rap-host-agent.XXXXXX)"`,`curl -fL --retry 3 --retry-delay 1 ${z(Cn(n))} -o "$rap_host_agent"`,`chmod +x "$rap_host_agent"`,a].join(` && \\
|
||
`)}function ln(e,t,n=ue){let r=t?.id||e.cluster_id,i=rn(n,t),a=xn(n);return[`$rapHostAgent = Join-Path $env:TEMP "rap-host-agent.exe"`,`Invoke-WebRequest -UseBasicParsing ${En(wn(n))} -OutFile $rapHostAgent`,`& $rapHostAgent install-windows --profile-url ${En(a)} --cluster-id ${En(r)} --install-token ${En(e.token)} --node-name ${En(i)} --startup-mode ${En(n.windowsStartupMode||`auto`)}`].join(`\r
|
||
`)}function un(e,t,n=ue){let r=t?.id||e.cluster_id,i=rn(n,t),a=xn(n),o=wn(n),s=n.windowsStartupMode||`auto`;return[`powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing '${o}' -OutFile $env:TEMP\\rap-host-agent.exe"`,`%TEMP%\\rap-host-agent.exe install-windows --profile-url "${a}" --cluster-id "${r}" --install-token "${e.token}" --node-name "${i}" --startup-mode "${s}"`].join(`\r
|
||
`)}function dn(e,t){let n=R(),r=n.replace(/\/api\/v1$/i,``).replace(/\/api$/i,``).replace(/\/$/,``),i=e.name||e.node_key||e.id,a=vn(i),o=`%ProgramFiles%\\RAP\\${a}`,s=`%ProgramData%\\RAP\\nodes\\${a}`,c=`RAP Node Agent ${a}`,l=`RAP Host Agent Updater ${a}`,u=`${o}\\rap-host-agent.exe`,d=`${u}.next`;return[`@echo off`,`echo === RAP Windows updater repair: ${Dn(i)} ===`,`echo Node ID: ${e.id}`,`echo Control API endpoint: ${n}`,`echo.`,`echo === Before repair: scheduled tasks ===`,`schtasks /Query /TN "${c}" /V /FO LIST`,`schtasks /Query /TN "${l}" /V /FO LIST`,`echo.`,`echo === Before repair: binaries ===`,`dir "${o}\\rap-*.exe*"`,`echo.`,`powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing '${r}/downloads/rap-host-agent-windows-amd64.exe' -OutFile $env:TEMP\\rap-host-agent.exe"`,`%TEMP%\\rap-host-agent.exe install-windows --backend-url "${n}" --cluster-id "${t||`<cluster-id>`}" --node-id "${e.id}" --node-name "${Dn(i)}" --replace --startup-mode "auto" --auto-update-current-version "0.0.0" --auto-update-initial-delay-seconds 1`,`"${u}" update-loop --backend-url "${n}" --cluster-id "${t||`<cluster-id>`}" --node-id "${e.id}" --state-dir "${s}" --current-version "0.0.0" --os windows --arch amd64 --install-type windows_service --binary-path "${o}\\rap-node-agent.exe" --windows-task-name "${c}" --health-timeout-seconds 30 --interval-seconds 0 --initial-delay-seconds 0 --max-runs 1 --host-agent-update-status-enabled --host-agent-current-version "0.0.0" --host-agent-binary-path "${u}"`,`echo.`,`echo === Applying staged host-agent if present ===`,`if exist "${d}" copy /Y "${d}" "${u}"`,`if exist "${d}" del /F /Q "${d}"`,`schtasks /End /TN "${l}"`,`schtasks /Run /TN "${l}"`,`echo.`,`echo === After repair: binaries ===`,`dir "${o}\\rap-*.exe*"`,`echo.`,`echo === After repair: updater task ===`,`schtasks /Query /TN "${l}" /V /FO LIST`,`echo.`,`echo Repair command finished. Check the admin panel for rap-node-agent and rap-host-agent plan/noop reports.`].join(`\r
|
||
`)}function fn(e){return`rap-repair-updater-${_n(e.name||e.node_key||e.id||`node`)}.cmd`}function pn(e,t){let n=R(),r=n.replace(/\/api\/v1$/i,``).replace(/\/api$/i,``).replace(/\/$/,``),i=e.name||e.node_key||e.id,a=yn(i),o=`/opt/rap/${a}`,s=`/var/lib/rap/nodes/${a}`,c=`rap-node-agent-${a}.service`,l=`rap-host-agent-updater-${a}.service`,u=`${o}/rap-host-agent`;return[`#!/usr/bin/env bash`,`set -euo pipefail`,`echo "=== RAP Linux updater repair: ${bn(i)} ==="`,`echo "Node ID: ${e.id}"`,`echo "Control API endpoint: ${n}"`,`echo`,`echo "=== Before repair: systemd units ==="`,`systemctl status ${z(c)} --no-pager || true`,`systemctl status ${z(l)} --no-pager || true`,`echo`,`echo "=== Before repair: binaries ==="`,`ls -la ${z(o)} || true`,`echo`,`rap_host_agent="$(mktemp /tmp/rap-host-agent.XXXXXX)"`,`curl -fL --retry 3 --retry-delay 1 ${z(`${r}/downloads/rap-host-agent-linux-amd64`)} -o "$rap_host_agent"`,`chmod +x "$rap_host_agent"`,`sudo "$rap_host_agent" install-linux --backend-url ${z(n)} --cluster-id ${z(t||`<cluster-id>`)} --node-id ${z(e.id)} --node-name ${z(i)} --replace --startup-mode systemd --auto-update-current-version 0.0.0 --auto-update-initial-delay-seconds 1`,`sudo ${z(u)} update-loop --backend-url ${z(n)} --cluster-id ${z(t||`<cluster-id>`)} --node-id ${z(e.id)} --state-dir ${z(s)} --current-version 0.0.0 --os linux --arch amd64 --install-type linux_binary --binary-path ${z(`${o}/rap-node-agent`)} --systemd-unit ${z(c)} --health-timeout-seconds 30 --interval-seconds 0 --initial-delay-seconds 0 --max-runs 1 --host-agent-update-status-enabled --host-agent-current-version 0.0.0 --host-agent-binary-path ${z(u)}`,`sudo systemctl daemon-reload`,`sudo systemctl restart ${z(l)}`,`echo`,`echo "=== After repair: systemd updater ==="`,`systemctl status ${z(l)} --no-pager || true`,`echo "Repair command finished. Check the admin panel for rap-node-agent and rap-host-agent plan/noop reports."`].join(`
|
||
`)}function mn(e){return`rap-repair-updater-${_n(e.name||e.node_key||e.id||`node`)}.sh`}function hn(e,t){if(typeof document>`u`)return;let n=new Blob([t.endsWith(`\r
|
||
`)?t:`${t}\r\n`],{type:`text/plain;charset=utf-8`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=e,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}async function gn(e){await navigator.clipboard.writeText(e)}function _n(e){return e.trim().replace(/[\\/:*?"<>|]+/g,`-`).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``).slice(0,80)||`node`}function vn(e){return e.trim().replace(/[\\/:*?"<>|]+/g,`-`).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)||`node`}function yn(e){return vn(e).slice(0,48)||`node`}function bn(e){return e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`).replace(/\$/g,`\\$`).replace(/`/g,"\\`")}function xn(e=ue){return(e.controlPlaneEndpoint||Zt()).trim().replace(/\/$/,``)}function R(){let e=typeof window>`u`?``:window.location?.origin||``;return/^(http:\/\/)?(192\.168\.200\.61|docker-test\.cin\.su)(:18080)?$/i.test(e.replace(/\/$/,``))?`https://vpn.cin.su/api/v1`:`${e.replace(/\/$/,``)}/api/v1`}function Sn(e=ue){let t=$t(e.artifactEndpoints)[0];return t?t.replace(/\/downloads$/i,``).replace(/\/$/,``):xn(e).replace(/\/api\/v1$/i,``).replace(/\/api$/i,``).replace(/\/$/,``)}function Cn(e=ue){return`${typeof window>`u`&&!e.controlPlaneEndpoint?`http://<control-api-host>:18080`:Sn(e)}/downloads/rap-host-agent-linux-amd64`}function wn(e=ue){return`${typeof window>`u`&&!e.controlPlaneEndpoint?`http://<control-api-host>:18080`:Sn(e)}/downloads/rap-host-agent-windows-amd64.exe`}function Tn(e){return e.trim().toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,42)||`rap-node`}function z(e){return`'${e.replace(/'/g,`'\\''`)}'`}function En(e){return`'${e.replace(/'/g,`''`)}'`}function Dn(e){return e.replace(/"/g,`""`)}function On(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function kn(e,t,n,r,i){let a=n.trim().toLowerCase(),o=new Map;for(let n of e){if(a&&!An(n,a))continue;let e=jn(n,t,r,i);o.set(e,[...o.get(e)||[],n])}return Array.from(o.entries()).map(([e,t])=>({label:e,items:t.sort((e,t)=>e.node.name.localeCompare(t.node.name))})).sort((e,t)=>e.label.localeCompare(t.label))}function An(e,t){return[e.node.name,e.node.node_key,e.node.health_status,e.node.ownership_type,e.node.reported_version||``,...e.memberships.flatMap(e=>[e.cluster.name,e.cluster.slug,e.node.membership_status])].some(e=>e.toLowerCase().includes(t))}function jn(e,t,n,r){if(n===`health`)return H(e.node.health_status);if(n===`ownership`)return H(e.node.ownership_type);if(n===`cluster_count`)return Gn(e.memberships.length,r);let i=e.memberships.find(e=>e.cluster.id===t);return i?i.node.membership_status===`active`?r===`en`?`In active cluster`:`В активном кластере`:`${r===`en`?`Membership`:`Участие`}: ${H(i.node.membership_status)}`:r===`en`?`Not in active cluster`:`Не в активном кластере`}function Mn(e,t){let n=se[e]||[];if(n.length===0||!t)return`unknown`;if(Nn(t))return`stale`;let r=t.capabilities||{};return n.some(e=>!!r[e])?`confirmed`:`missing`}function Nn(e){if(!e?.observed_at)return!0;let t=new Date(e.observed_at).getTime();return!Number.isFinite(t)||Date.now()-t>60*1e3}function Pn(e,t){let n=Mn(e,t);return n===`confirmed`?`good`:n===`missing`?`bad`:n===`stale`?`warn`:``}function Fn(e,t,n){let r=Mn(e,t);return r===`confirmed`?n.capabilityConfirmed:r===`missing`?n.capabilityMissing:r===`stale`?`heartbeat устарел`:n.capabilityUnknown}function In(e,t,n){let r=Mn(e,t);return n===`en`?r===`confirmed`?`capable`:r===`missing`?`not reported`:r===`stale`?`stale heartbeat`:`unknown`:r===`confirmed`?`подходит`:r===`missing`?`не заявлено`:r===`stale`?`heartbeat устарел`:`неизвестно`}function Ln(e){let t=e?.metadata?.mesh_peer_recovery_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=typeof n.mode==`string`?n.mode:`unknown`,i=typeof n.ready_peer_count==`number`?n.ready_peer_count:null,a=typeof n.target_ready_peers==`number`?n.target_ready_peers:null,o=typeof n.deficit==`number`?n.deficit:0,s=i==null||a==null?r:`${r} ${i}/${a}`;return o>0?`${s} deficit ${o}`:s}function Rn(e){let t=e?.metadata?.mesh_peer_connection_intent_report;if(!t||typeof t!=`object`||Array.isArray(t))return Un(e);let n=t,r=typeof n.intent_count==`number`?n.intent_count:0,i=typeof n.maintain_count==`number`?n.maintain_count:0,a=typeof n.recover_count==`number`?n.recover_count:0,o=typeof n.rendezvous_required_count==`number`?n.rendezvous_required_count:0,s=typeof n.rendezvous_resolved_count==`number`?n.rendezvous_resolved_count:0,c=typeof n.relay_control_count==`number`?n.relay_control_count:0,l=[`rv${o}`];s>0&&l.push(`ok${s}`),c>0&&l.push(`relay${c}`);let u=o>0||s>0||c>0?`${r} intents m${i}/r${a} ${l.join(`/`)}`:`${r} intents m${i}/r${a}`,d=Un(e);return d===`н/д`?u:`${u}; ${d}`}function zn(e){let t=e?.metadata?.mesh_rendezvous_lease_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=typeof n.lease_count==`number`?n.lease_count:0,i=typeof n.active_count==`number`?n.active_count:0,a=typeof n.admitted_as_relay_count==`number`?n.admitted_as_relay_count:0,o=typeof n.admitted_as_peer_count==`number`?n.admitted_as_peer_count:0,s=typeof n.renewal_needed_count==`number`?n.renewal_needed_count:0,c=typeof n.relay_control_ready_count==`number`?n.relay_control_ready_count:0,l=typeof n.stale_relay_count==`number`?n.stale_relay_count:0,u=typeof n.refresh_attempt_count==`number`?n.refresh_attempt_count:0,d=typeof n.refresh_success_count==`number`?n.refresh_success_count:0,f=[`lease ${i}/${r}`];return a>0&&f.push(`relay${a}`),o>0&&f.push(`peer${o}`),s>0&&f.push(`renew${s}`),l>0&&f.push(`stale${l}`),c>0&&f.push(`ready${c}`),u>0&&f.push(`ref${d}/${u}`),f.join(` `)}function Bn(e){let t=e?.metadata?.mesh_route_path_decision_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=typeof n.decision_count==`number`?n.decision_count:0,i=typeof n.replacement_decision_count==`number`?n.replacement_decision_count:0,a=typeof n.degraded_decision_count==`number`?n.degraded_decision_count:0,o=typeof n.recovery_hysteresis_count==`number`?n.recovery_hysteresis_count:0,s=typeof n.recovery_promoted_count==`number`?n.recovery_promoted_count:0,c=typeof n.recovery_demoted_count==`number`?n.recovery_demoted_count:0,l=typeof n.local_effective_path_count==`number`?n.local_effective_path_count:0,u=typeof n.next_hop_available_count==`number`?n.next_hop_available_count:0,d=typeof n.withdrawn_local_relay_count==`number`?n.withdrawn_local_relay_count:0,f=[`path ${l}/${r}`];return i>0&&f.push(`repl${i}`),a>0&&f.push(`degr${a}`),o>0&&f.push(`rec${o}`),s>0&&f.push(`prom${s}`),c>0&&f.push(`dem${c}`),u>0&&f.push(`next${u}`),d>0&&f.push(`wd${d}`),f.join(` `)}function Vn(e){let t=e?.metadata?.mesh_route_generation_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=typeof n.active_decision_count==`number`?n.active_decision_count:0,i=typeof n.applied_decision_count==`number`?n.applied_decision_count:0,a=typeof n.withdrawn_decision_count==`number`?n.withdrawn_decision_count:0,o=n.generation_changed===!0,s=[`gen ${r}`];return i>0&&s.push(`ap${i}`),a>0&&s.push(`wd${a}`),o&&s.push(`chg`),s.join(` `)}function Hn(e){let t=e?.metadata?.mesh_route_health_config_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=e?.metadata?.mesh_route_health_feedback_refresh_report,i=r&&typeof r==`object`&&!Array.isArray(r)?r:{},a=typeof n.route_health_route_count==`number`?n.route_health_route_count:0,o=typeof n.route_path_decision_applied_count==`number`?n.route_path_decision_applied_count:0,s=typeof n.replacement_route_health_route_count==`number`?n.replacement_route_health_route_count:0,c=typeof n.route_health_decision_drift_candidate_count==`number`?n.route_health_decision_drift_candidate_count:0,l=typeof i.feedback_refresh_attempt_count==`number`?i.feedback_refresh_attempt_count:typeof n.feedback_refresh_attempt_count==`number`?n.feedback_refresh_attempt_count:0,u=typeof i.feedback_refresh_success_count==`number`?i.feedback_refresh_success_count:typeof n.feedback_refresh_success_count==`number`?n.feedback_refresh_success_count:0,d=typeof i.feedback_refresh_suppressed_count==`number`?i.feedback_refresh_suppressed_count:typeof n.feedback_refresh_suppressed_count==`number`?n.feedback_refresh_suppressed_count:0,f=[`rh ${o}/${a}`];return s>0&&f.push(`repl${s}`),c>0&&f.push(`drift${c}`),(l>0||d>0)&&f.push(`fb${u}/${l}`),d>0&&f.push(`sup${d}`),f.join(` `)}function Un(e){let t=e?.metadata?.mesh_peer_connection_manager_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t;if(n.enabled===!1)return`manager off`;let r=typeof n.attempted==`number`?n.attempted:0,i=typeof n.succeeded==`number`?n.succeeded:0,a=typeof n.deferred==`number`?n.deferred:0,o=typeof n.relay_control_count==`number`?n.relay_control_count:0,s=o>0?`mgr ${i}/${r} relay${o}`:`mgr ${i}/${r}`;return a>0?`${s} def${a}`:s}function Wn(e){let t=e?.metadata?.mesh_listener_report;if(!t||typeof t!=`object`||Array.isArray(t))return`н/д`;let n=t,r=typeof n.status==`string`?n.status:`unknown`,i=typeof n.listen_port_mode==`string`?n.listen_port_mode:`manual`,a=typeof n.effective_listen_addr==`string`?n.effective_listen_addr:``,o=typeof n.failure_reason==`string`?n.failure_reason:``;return r===`listening`?a?`listen ${a}`:`listen`:r===`auto_rebound`?a?`auto ${a}`:`auto rebound`:r===`listen_failed`?o?`${i} failed: ${o}`:`${i} failed`:r===`disabled`?i===`disabled`?`inbound off`:`inbound unavailable`:r}function Gn(e,t){if(t===`en`)return e===1?`1 cluster`:`${e} clusters`;let n=e%10,r=e%100;return n===1&&r!==11?`${e} кластер`:n>=2&&n<=4&&(r<12||r>14)?`${e} кластера`:`${e} кластеров`}function Kn(e,t=e.link_status===`reachable`?`reachable`:`unknown`){return t===`stale`?`stale`:t===`one_way`?`oneWay`:t!==`reachable`||e.link_status!==`reachable`?`bad`:e.quality_score!=null&&e.quality_score<70||e.latency_ms!=null&&e.latency_ms>80?`weak`:`good`}function qn(e,t=16){return e.length>t?`${e.slice(0,Math.max(1,t-2))}…`:e}function Jn(e){return window.confirm(`${e}?\n\nЭто высокорисковая операция владельца платформы. Действие будет записано в аудит.`)}function Yn(e){let t=(e||``).replace(/\/$/,``);return!t||t===`/api/v1`?window.location.origin:t.endsWith(`/api/v1`)?t.slice(0,-7):t}function B(e){return e?e.length>12?`${e.slice(0,8)}...${e.slice(-4)}`:e:`нет`}function V(e){return e?new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e)):`никогда`}function Xn(e){return e==null||Number.isNaN(e)?`age n/a`:e<60?`${Math.max(0,Math.round(e))}s ago`:e<3600?`${Math.round(e/60)}m ago`:e<86400?`${Math.round(e/3600)}h ago`:`${Math.round(e/86400)}d ago`}function Zn(e){if(!e)return`time n/a`;let t=Date.parse(e);return Number.isNaN(t)?`time n/a`:Xn(Math.max(0,Math.round((Date.now()-t)/1e3)))}function Qn(e){return e?new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).format(new Date(e)):`н/д`}function $n(e){if(e==null||Number.isNaN(e))return`н/д`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(r===0?0:1)} ${t[r]}`}function er(e){return!e||Object.keys(e).length===0?`qos none`:[`control`,`interactive`,`reliable`,`bulk`,`droppable`].filter(t=>(e[t]||0)>0).map(t=>`${t[0]}:${e[t]}`).join(` `)||`qos none`}function tr(e){return!e||Object.keys(e).length===0?`n/a`:[`control`,`interactive`,`reliable`,`bulk`,`droppable`].filter(t=>(e[t]||0)>0).map(t=>`${t[0]}:${e[t]}`).join(` `)||`n/a`}function nr(e,t){return(t||0)>0||e===`critical`?`bad`:e===`degraded`?`warn`:e===`watch`?`info`:`good`}function rr(e){switch(e){case`applied`:case`rebuild_request_applied`:return`good`;case`waiting_node_apply`:case`pending_rebuild_request`:case`pending_degraded_fallback`:case`rebuild_request_recorded`:case`rebuild_request_recorded_node_pending`:case`rebuild_request_no_alternate`:case`rebuild_request_deferred_by_policy`:case`route_rebuild_no_safe_recovery`:return`warn`;case`expired`:case`rejected_by_policy_guard`:case`rebuild_request_rejected`:case`rebuild_request_expired`:return`bad`;default:return e?`bad`:``}}function ir(e,t,n){return e===`service_channel_feedback_no_alternate`||t===`pending_degraded_fallback`||(n||[]).includes(`no_unfenced_alternate_route`)?`warn`:t===`applied`||(n||[]).includes(`service_channel_rebuild_applied`)?`good`:e?.includes(`replacement`)||e||t?`info`:``}function H(e){return{active:`активно`,approved:`одобрено`,authoritative:`authoritative`,connecting:`подключается`,connected:`связан`,critical:`критично`,current:`актуальна`,degraded:`degraded`,disabled:`выключено`,enabled:`включено`,failed:`ошибка`,healthy:`здоров`,watch:`наблюдение`,flow_health_ready:`flow ready`,flow_drops_reported:`flow drops`,route_quality_window_drops_reported:`route drops`,backend_fallback_observed:`backend fallback`,route_quality_window_failures_reported:`route failures`,route_quality_window_slow_samples_reported:`slow samples`,route_send_latency_high:`high latency`,flow_queue_pressure_high:`queue pressure high`,bulk_pressure_with_interactive_qos_observed:`bulk+interactive`,bulk_pressure_observed:`bulk pressure`,flow_queue_pressure_observed:`queue pressure`,flow_health_degraded:`flow degraded`,bulk_window_reduced_to_protect_interactive:`bulk reduced`,rebuild_request_applied:`planner applied`,rebuild_request_recorded:`rebuild recorded`,rebuild_request_recorded_node_pending:`node pending`,rebuild_request_no_alternate:`no alternate`,rebuild_request_deferred_by_policy:`deferred by policy`,rebuild_request_rejected:`rebuild rejected`,rebuild_request_expired:`rebuild expired`,route_rebuild_no_safe_recovery:`no safe recovery`,access_decision:`access decision`,access_no_safe_recovery:`access no-safe`,access_recovery_selected:`access recovery`,access_rebuild_applied:`access applied`,access_replacement_selected:`access replacement`,inspect_access_no_safe_recovery_route_pool_and_signed_policy:`inspect no-safe route pool`,watch_recovery_route_quality_and_confirm_post_recovery_traffic:`watch recovery traffic`,confirm_applied_rebuild_runtime_traffic_stays_on_replacement:`confirm applied traffic`,watch_replacement_route_quality_until_applied_or_recovered:`watch replacement`,pending_degraded_fallback:`pending fallback`,service_channel_feedback_no_alternate:`no safe route`,service_channel_feedback_replacement:`replacement`,service_channel_feedback_exit_pool_replacement:`exit replacement`,service_channel_feedback_entry_pool_replacement:`entry replacement`,service_channel_feedback_entry_exit_pool_replacement:`pool replacement`,service_channel_remediation_command:`remediation`,service_channel_feedback_rebuild_requested:`rebuild requested`,remediation_rebuild_applied_to_alternate:`planner selected alternate`,no_unfenced_alternate_route:`no safe alternate`,active_lease_not_found_for_rebuild_resolution:`lease missing`,remediation_command_ttl_expired:`command expired`,durable_rebuild_route_request_recorded:`rebuild recorded`,durable_rebuild_route_request_rejected:`request rejected`,durable_rebuild_route_request_applied:`request applied`,durable_rebuild_route_no_alternate:`no alternate`,durable_rebuild_route_deferred_by_policy:`deferred by policy`,durable_rebuild_route_expired:`request expired`,isolated:`изолирован`,offline:`нет связи`,one_way:`односторонняя`,outdated:`обновить`,pending:`ожидает`,platform_managed:`платформенный`,promoted:`promoted`,rejected:`отклонено`,ready:`готово`,revoked:`отозвано`,running:`работает`,customer_managed:`клиентский`,no_policy:`нет политики`,not_configured:`не задано`,missing:`нет отчета`,service_channel_recovery_demoted:`demoted`,service_channel_recovery_demoted_degraded:`degraded`,service_channel_recovery_demoted_degraded_fallback:`fallback`,service_channel_recovery_demoted_failure:`failure`,service_channel_recovery_demoted_fenced:`fenced`,service_channel_recovery_demoted_rebuild:`rebuild`,service_channel_recovery_demoted_slow:`slow`,service_channel_feedback_provenance_missing:`provenance missing`,service_channel_feedback_stale:`stale feedback`,service_channel_feedback_stale_generation:`stale generation`,service_channel_feedback_stale_policy:`stale policy`,service_channel_feedback_stale_policy_and_generation:`stale policy+generation`,schema_ready:`schema ready`,schema_migration_required:`schema migration required`,snapshots_warmed:`snapshots warmed`,missing_snapshots_warmed_stale_deferred:`missing warmed, stale deferred`,snapshot_warmup_partial:`warmup partial`,stopped:`остановлено`,stale:`устарело`,unknown:`неизвестно`}[e]||e}(0,v.createRoot)(document.getElementById(`root`)).render((0,E.jsx)(_.StrictMode,{children:(0,E.jsx)(me,{})})); |