easy-devops 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/index-GEcisbty.js +453 -0
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
- package/src/core/deploy/apps.js +17 -6
- package/src/core/deploy/engine.js +257 -5
- package/src/core/deploy/ezfile.js +87 -5
- package/src/core/deploy/hubCommands.js +6 -2
- package/src/core/deploy/store.js +29 -3
- package/src/core/probeCache.js +5 -1
- package/src/dashboard/controllers/deploymentsController.js +10 -2
- package/dist/ui/assets/index-DEouL3IK.js +0 -452
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&u(p)}).observe(document,{childList:!0,subtree:!0});function c(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(d){if(d.ep)return;d.ep=!0;const m=c(d);fetch(d.href,m)}})();var bd={exports:{}},Di={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var qp;function U0(){if(qp)return Di;qp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function c(u,d,m){var p=null;if(m!==void 0&&(p=""+m),d.key!==void 0&&(p=""+d.key),"key"in d){m={};for(var h in d)h!=="key"&&(m[h]=d[h])}else m=d;return d=m.ref,{$$typeof:s,type:u,key:p,ref:d!==void 0?d:null,props:m}}return Di.Fragment=o,Di.jsx=c,Di.jsxs=c,Di}var Gp;function H0(){return Gp||(Gp=1,bd.exports=U0()),bd.exports}var a=H0(),jd={exports:{}},Te={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Yp;function B0(){if(Yp)return Te;Yp=1;var s=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),N=Symbol.for("react.view_transition"),E=Symbol.iterator;function H(T){return T===null||typeof T!="object"?null:(T=E&&T[E]||T["@@iterator"],typeof T=="function"?T:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function R(T,I,Q){this.props=T,this.context=I,this.refs=_,this.updater=Q||S}R.prototype.isReactComponent={},R.prototype.setState=function(T,I){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,I,"setState")},R.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function X(){}X.prototype=R.prototype;function z(T,I,Q){this.props=T,this.context=I,this.refs=_,this.updater=Q||S}var G=z.prototype=new X;G.constructor=z,k(G,R.prototype),G.isPureReactComponent=!0;var ne=Array.isArray;function U(){}var J={H:null,A:null,T:null,S:null},ce=Object.prototype.hasOwnProperty;function P(T,I,Q){var W=Q.ref;return{$$typeof:s,type:T,key:I,ref:W!==void 0?W:null,props:Q}}function ae(T,I){return P(T.type,I,T.props)}function M(T){return typeof T=="object"&&T!==null&&T.$$typeof===s}function A(T){var I={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(Q){return I[Q]})}var le=/\/+/g;function F(T,I){return typeof T=="object"&&T!==null&&T.key!=null?A(""+T.key):I.toString(36)}function ee(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(U,U):(T.status="pending",T.then(function(I){T.status==="pending"&&(T.status="fulfilled",T.value=I)},function(I){T.status==="pending"&&(T.status="rejected",T.reason=I)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function de(T,I,Q,W,je){var Ce=typeof T;(Ce==="undefined"||Ce==="boolean")&&(T=null);var De=!1;if(T===null)De=!0;else switch(Ce){case"bigint":case"string":case"number":De=!0;break;case"object":switch(T.$$typeof){case s:case o:De=!0;break;case j:return De=T._init,de(De(T._payload),I,Q,W,je)}}if(De)return je=je(T),De=W===""?"."+F(T,0):W,ne(je)?(Q="",De!=null&&(Q=De.replace(le,"$&/")+"/"),de(je,I,Q,"",function(Gt){return Gt})):je!=null&&(M(je)&&(je=ae(je,Q+(je.key==null||T&&T.key===je.key?"":(""+je.key).replace(le,"$&/")+"/")+De)),I.push(je)),1;De=0;var fe=W===""?".":W+":";if(ne(T))for(var ye=0;ye<T.length;ye++)W=T[ye],Ce=fe+F(W,ye),De+=de(W,I,Q,Ce,je);else if(ye=H(T),typeof ye=="function")for(T=ye.call(T),ye=0;!(W=T.next()).done;)W=W.value,Ce=fe+F(W,ye++),De+=de(W,I,Q,Ce,je);else if(Ce==="object"){if(typeof T.then=="function")return de(ee(T),I,Q,W,je);throw I=String(T),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return De}function $(T,I,Q){if(T==null)return T;var W=[],je=0;return de(T,W,"","",function(Ce){return I.call(Q,Ce,je++)}),W}function ie(T){if(T._status===-1){var I=T._result,Q=I();Q.then(function(W){(T._status===0||T._status===-1)&&(T._status=1,T._result=W,Q.status===void 0&&(Q.status="fulfilled",Q.value=W))},function(W){(T._status===0||T._status===-1)&&(T._status=2,T._result=W,Q.status===void 0&&(Q.status="rejected",Q.reason=W))}),T._status===-1&&(T._status=0,T._result=Q)}if(T._status===1)return T._result.default;throw T._result}var Se=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)};function ke(T){var I=J.T,Q={};Q.types=I!==null?I.types:null,J.T=Q;try{var W=T(),je=J.S;je!==null&&je(Q,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(U,Se)}catch(Ce){Se(Ce)}finally{I!==null&&Q.types!==null&&(I.types=Q.types),J.T=I}}function $e(T){var I=J.T;if(I!==null){var Q=I.types;Q===null?I.types=[T]:Q.indexOf(T)===-1&&Q.push(T)}else ke($e.bind(null,T))}var Ge={map:$,forEach:function(T,I,Q){$(T,function(){I.apply(this,arguments)},Q)},count:function(T){var I=0;return $(T,function(){I++}),I},toArray:function(T){return $(T,function(I){return I})||[]},only:function(T){if(!M(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Te.Activity=y,Te.Children=Ge,Te.Component=R,Te.Fragment=c,Te.Profiler=d,Te.PureComponent=z,Te.StrictMode=u,Te.Suspense=x,Te.ViewTransition=N,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,Te.__COMPILER_RUNTIME={__proto__:null,c:function(T){return J.H.useMemoCache(T)}},Te.addTransitionType=$e,Te.cache=function(T){return function(){return T.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(T,I,Q){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var W=k({},T.props),je=T.key;if(I!=null)for(Ce in I.key!==void 0&&(je=""+I.key),I)!ce.call(I,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&I.ref===void 0||(W[Ce]=I[Ce]);var Ce=arguments.length-2;if(Ce===1)W.children=Q;else if(1<Ce){for(var De=Array(Ce),fe=0;fe<Ce;fe++)De[fe]=arguments[fe+2];W.children=De}return P(T.type,je,W)},Te.createContext=function(T){return T={$$typeof:p,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:m,_context:T},T},Te.createElement=function(T,I,Q){var W,je={},Ce=null;if(I!=null)for(W in I.key!==void 0&&(Ce=""+I.key),I)ce.call(I,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(je[W]=I[W]);var De=arguments.length-2;if(De===1)je.children=Q;else if(1<De){for(var fe=Array(De),ye=0;ye<De;ye++)fe[ye]=arguments[ye+2];je.children=fe}if(T&&T.defaultProps)for(W in De=T.defaultProps,De)je[W]===void 0&&(je[W]=De[W]);return P(T,Ce,je)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(T){return{$$typeof:h,render:T}},Te.isValidElement=M,Te.lazy=function(T){return{$$typeof:j,_payload:{_status:-1,_result:T},_init:ie}},Te.memo=function(T,I){return{$$typeof:b,type:T,compare:I===void 0?null:I}},Te.startTransition=ke,Te.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},Te.use=function(T){return J.H.use(T)},Te.useActionState=function(T,I,Q){return J.H.useActionState(T,I,Q)},Te.useCallback=function(T,I){return J.H.useCallback(T,I)},Te.useContext=function(T){return J.H.useContext(T)},Te.useDebugValue=function(){},Te.useDeferredValue=function(T,I){return J.H.useDeferredValue(T,I)},Te.useEffect=function(T,I){return J.H.useEffect(T,I)},Te.useEffectEvent=function(T){return J.H.useEffectEvent(T)},Te.useId=function(){return J.H.useId()},Te.useImperativeHandle=function(T,I,Q){return J.H.useImperativeHandle(T,I,Q)},Te.useInsertionEffect=function(T,I){return J.H.useInsertionEffect(T,I)},Te.useLayoutEffect=function(T,I){return J.H.useLayoutEffect(T,I)},Te.useMemo=function(T,I){return J.H.useMemo(T,I)},Te.useOptimistic=function(T,I){return J.H.useOptimistic(T,I)},Te.useReducer=function(T,I,Q){return J.H.useReducer(T,I,Q)},Te.useRef=function(T){return J.H.useRef(T)},Te.useState=function(T){return J.H.useState(T)},Te.useSyncExternalStore=function(T,I,Q){return J.H.useSyncExternalStore(T,I,Q)},Te.useTransition=function(){return J.H.useTransition()},Te.version="19.3.1",Te}var $p;function Jd(){return $p||($p=1,jd.exports=B0()),jd.exports}var g=Jd(),Nd={exports:{}},_i={},wd={exports:{}},Sd={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Vp;function q0(){return Vp||(Vp=1,(function(s){function o(ee,de){var $=ee.length;ee.push(de);e:for(;0<$;){var ie=$-1>>>1,Se=ee[ie];if(0<d(Se,de))ee[ie]=de,ee[$]=Se,$=ie;else break e}}function c(ee){return ee.length===0?null:ee[0]}function u(ee){if(ee.length===0)return null;var de=ee[0],$=ee.pop();if($!==de){ee[0]=$;e:for(var ie=0,Se=ee.length,ke=Se>>>1;ie<ke;){var $e=2*(ie+1)-1,Ge=ee[$e],T=$e+1,I=ee[T];if(0>d(Ge,$))T<Se&&0>d(I,Ge)?(ee[ie]=I,ee[T]=$,ie=T):(ee[ie]=Ge,ee[$e]=$,ie=$e);else if(T<Se&&0>d(I,$))ee[ie]=I,ee[T]=$,ie=T;else break e}}return de}function d(ee,de){var $=ee.sortIndex-de.sortIndex;return $!==0?$:ee.id-de.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;s.unstable_now=function(){return m.now()}}else{var p=Date,h=p.now();s.unstable_now=function(){return p.now()-h}}var x=[],b=[],j=1,y=null,N=3,E=!1,H=!1,S=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,X=typeof setImmediate<"u"?setImmediate:null;function z(ee){for(var de=c(b);de!==null;){if(de.callback===null)u(b);else if(de.startTime<=ee)u(b),de.sortIndex=de.expirationTime,o(x,de);else break;de=c(b)}}function G(ee){if(S=!1,z(ee),!H)if(c(x)!==null)H=!0,ne||(ne=!0,M());else{var de=c(b);de!==null&&F(G,de.startTime-ee)}}var ne=!1,U=-1,J=5,ce=-1;function P(){return k?!0:!(s.unstable_now()-ce<J)}function ae(){if(k=!1,ne){var ee=s.unstable_now();ce=ee;var de=!0;try{e:{H=!1,S&&(S=!1,R(U),U=-1),E=!0;var $=N;try{t:{for(z(ee),y=c(x);y!==null&&!(y.expirationTime>ee&&P());){var ie=y.callback;if(typeof ie=="function"){y.callback=null,N=y.priorityLevel;var Se=ie(y.expirationTime<=ee);if(ee=s.unstable_now(),typeof Se=="function"){y.callback=Se,z(ee),de=!0;break t}y===c(x)&&u(x),z(ee)}else u(x);y=c(x)}if(y!==null)de=!0;else{var ke=c(b);ke!==null&&F(G,ke.startTime-ee),de=!1}}break e}finally{y=null,N=$,E=!1}de=void 0}}finally{de?M():ne=!1}}}var M;if(typeof X=="function")M=function(){X(ae)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,le=A.port2;A.port1.onmessage=ae,M=function(){le.postMessage(null)}}else M=function(){_(ae,0)};function F(ee,de){U=_(function(){ee(s.unstable_now())},de)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(ee){ee.callback=null},s.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<ee?Math.floor(1e3/ee):5},s.unstable_getCurrentPriorityLevel=function(){return N},s.unstable_next=function(ee){switch(N){case 1:case 2:case 3:var de=3;break;default:de=N}var $=N;N=de;try{return ee()}finally{N=$}},s.unstable_requestPaint=function(){k=!0},s.unstable_runWithPriority=function(ee,de){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var $=N;N=ee;try{return de()}finally{N=$}},s.unstable_scheduleCallback=function(ee,de,$){var ie=s.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ie+$:ie):$=ie,ee){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=$+Se,ee={id:j++,callback:de,priorityLevel:ee,startTime:$,expirationTime:Se,sortIndex:-1},$>ie?(ee.sortIndex=$,o(b,ee),c(x)===null&&ee===c(b)&&(S?(R(U),U=-1):S=!0,F(G,$-ie))):(ee.sortIndex=Se,o(x,ee),H||E||(H=!0,ne||(ne=!0,M()))),ee},s.unstable_shouldYield=P,s.unstable_wrapCallback=function(ee){var de=N;return function(){var $=N;N=de;try{return ee.apply(this,arguments)}finally{N=$}}}})(Sd)),Sd}var Xp;function G0(){return Xp||(Xp=1,wd.exports=q0()),wd.exports}var kd={exports:{}},Ot={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Zp;function Y0(){if(Zp)return Ot;Zp=1;var s=Jd();function o(j){var y="https://react.dev/errors/"+j;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var N=2;N<arguments.length;N++)y+="&args[]="+encodeURIComponent(arguments[N])}return"Minified React error #"+j+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var u={d:{f:c,r:function(){throw Error(o(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},d=Symbol.for("react.portal"),m=Symbol.for("react.recoverable"),p=Symbol.for("react.optimistic_key");function h(j,y,N){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:E==null?null:E===p?p:""+E,children:j,containerInfo:y,implementation:N}}var x=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(j,y){if(j==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ot.browser=function(j){return{$$typeof:m,_reason:j}},Ot.createPortal=function(j,y){var N=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(o(299));return h(j,y,null,N)},Ot.flushSync=function(j){var y=x.T,N=u.p;try{if(x.T=null,u.p=2,j)return j()}finally{x.T=y,u.p=N,u.d.f()}},Ot.preconnect=function(j,y){typeof j=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,u.d.C(j,y))},Ot.prefetchDNS=function(j){typeof j=="string"&&u.d.D(j)},Ot.preinit=function(j,y){if(typeof j=="string"&&y&&typeof y.as=="string"){var N=y.as,E=b(N,y.crossOrigin),H=typeof y.integrity=="string"?y.integrity:void 0,S=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;N==="style"?u.d.S(j,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:E,integrity:H,fetchPriority:S}):N==="script"&&u.d.X(j,{crossOrigin:E,integrity:H,fetchPriority:S,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Ot.preinitModule=function(j,y){if(typeof j=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var N=b(y.as,y.crossOrigin);u.d.M(j,{crossOrigin:N,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&u.d.M(j)},Ot.preload=function(j,y){if(typeof j=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var N=y.as,E=b(N,y.crossOrigin);u.d.L(j,N,{crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Ot.preloadModule=function(j,y){if(typeof j=="string")if(y){var N=b(y.as,y.crossOrigin);u.d.m(j,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:N,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else u.d.m(j)},Ot.requestFormReset=function(j){u.d.r(j)},Ot.unstable_batchedUpdates=function(j,y){return j(y)},Ot.useFormState=function(j,y,N){return x.H.useFormState(j,y,N)},Ot.useFormStatus=function(){return x.H.useHostTransitionStatus()},Ot.version="19.3.1",Ot}var Qp;function Ug(){if(Qp)return kd.exports;Qp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),kd.exports=Y0(),kd.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Kp;function $0(){if(Kp)return _i;Kp=1;var s=G0(),o=Jd(),c=Ug();function u(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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(m(e)!==e)throw Error(u(188))}function b(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return x(i),e;if(r===l)return x(i),t;r=r.sibling}throw Error(u(188))}if(n.return!==l.return)n=i,l=r;else{for(var f=!1,v=i.child;v;){if(v===n){f=!0,n=i,l=r;break}if(v===l){f=!0,l=i,n=r;break}v=v.sibling}if(!f){for(v=r.child;v;){if(v===n){f=!0,n=r,l=i;break}if(v===l){f=!0,l=r,n=i;break}v=v.sibling}if(!f)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}function y(e,t,n,l,i,r){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,l,i,r)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&y(e.child,t,n,l,i,r))return!0;e=e.sibling}return!1}function N(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function E(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function H(e){var t=[null,null],n=N(e);return n===null||S(t,e,n.child,{foundSelf:!1}),t}function S(e,t,n,l){for(;n!==null;){if(n===t)l.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(l.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&S(e,t,n.child,l))return!0;n=n.sibling}return!1}function k(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(u(559))}}var _=null,R=null;function X(e,t,n){return e===n?!0:e===t?(_=e,!0):!1}function z(e,t,n){return e===n?(R=e,!1):e===t?(R!==null&&(_=e),!0):!1}function G(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function ne(e,t,n){for(var l=0,i=e;i;i=n(i))l++;i=0;for(var r=t;r;r=n(r))i++;for(;0<l-i;)e=n(e),l--;for(;0<i-l;)t=n(t),i--;for(;l--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var U=Object.assign,J=Symbol.for("react.element"),ce=Symbol.for("react.transitional.element"),P=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),F=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Se=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),$e=Symbol.for("react.legacy_hidden"),Ge=Symbol.for("react.memo_cache_sentinel"),T=Symbol.for("react.view_transition"),I=Symbol.for("react.recoverable"),Q=Symbol.iterator;function W(e){return e===null||typeof e!="object"?null:(e=Q&&e[Q]||e["@@iterator"],typeof e=="function"?e:null)}var je=Symbol.for("react.client.reference");function Ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===je?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ae:return"Fragment";case A:return"Profiler";case M:return"StrictMode";case de:return"Suspense";case $:return"SuspenseList";case ke:return"Activity";case T:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case P:return"Portal";case F:return e.displayName||"Context";case le:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case Se:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}var De=Array.isArray,fe=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ye=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gt={pending:!1,data:null,method:null,action:null},Zn=[],an=-1;function Yt(e){return{current:e}}function rt(e){0>an||(e.current=Zn[an],Zn[an]=null,an--)}function Le(e,t){an++,Zn[an]=e.current,e.current=t}var Ut=Yt(null),jn=Yt(null),Kt=Yt(null),oa=Yt(null);function Qn(e,t){switch(Le(Kt,t),Le(jn,e),Le(Ut,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jx(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jx(t),e=Px(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}rt(Ut),Le(Ut,e)}function ln(){rt(Ut),rt(jn),rt(Kt)}function V(e){var t=e.memoizedState;t!==null&&(Ns._currentValue=t.memoizedState,Le(oa,e)),t=Ut.current;var n=Px(t,e.type);t!==n&&(Le(jn,e),Le(Ut,n))}function pe(e){jn.current===e&&(rt(Ut),rt(jn)),oa.current===e&&(rt(oa),Ns._currentValue=Gt)}var Ae,Jt;function wt(e){if(Ae===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||"",Jt=-1<n.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ae+e+Jt}var We=!1;function rl(e,t){if(!e||We)return"";We=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(se){var D=se}Reflect.construct(e,[],K)}else{try{K.call()}catch(se){D=se}K=!1;try{var q=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),K=!0,new e}finally{K&&(q!==void 0?Object.defineProperty(e.prototype,"props",q):delete e.prototype.props)}}}else{try{throw Error()}catch(se){D=se}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(se){if(se&&D&&typeof se.stack=="string")return[se.stack,D.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),f=r[0],v=r[1];if(f&&v){var w=f.split(`
|
|
44
|
-
`),L=v.split(`
|
|
45
|
-
`);for(i=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;i<L.length&&!L[i].includes("DetermineComponentFrameRoot");)i++;if(l===w.length||i===L.length)for(l=w.length-1,i=L.length-1;1<=l&&0<=i&&w[l]!==L[i];)i--;for(;1<=l&&0<=i;l--,i--)if(w[l]!==L[i]){if(l!==1||i!==1)do if(l--,i--,0>i||w[l]!==L[i]){var Y=`
|
|
46
|
-
`+w[l].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=l&&0<=i);break}}}finally{We=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?wt(n):""}function Zo(e,t){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==t&&t!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return rl(e.type,!1);case 11:return rl(e.type.render,!1);case 1:return rl(e.type,!0);case 31:return wt("Activity");case 30:return wt("ViewTransition");default:return""}}function be(e){try{var t="",n=null;do t+=Zo(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var ot=Object.prototype.hasOwnProperty,Ht=s.unstable_scheduleCallback,ft=s.unstable_cancelCallback,ct=s.unstable_shouldYield,sn=s.unstable_requestPaint,rn=s.unstable_now,Vy=s.unstable_getCurrentPriorityLevel,yf=s.unstable_ImmediatePriority,vf=s.unstable_UserBlockingPriority,Fi=s.unstable_NormalPriority,Xy=s.unstable_LowPriority,bf=s.unstable_IdlePriority,Zy=s.log,Qy=s.unstable_setDisableYieldValue,Bs=null,on=null;function Aa(e){if(typeof Zy=="function"&&Qy(e),on&&typeof on.setStrictMode=="function")try{on.setStrictMode(Bs,e)}catch{}}var cn=Math.clz32?Math.clz32:Py,Ky=Math.log,Jy=Math.LN2;function Py(e){return e>>>=0,e===0?32:31-(Ky(e)/Jy|0)|0}var Ii=256,Wi=262144,er=4194304;function ol(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tr(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,r=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var v=l&134217727;return v!==0?(l=v&~r,l!==0?i=ol(l):(f&=v,f!==0?i=ol(f):n||(n=v&~e,n!==0&&(i=ol(n))))):(v=l&~r,v!==0?i=ol(v):f!==0?i=ol(f):n||(n=l&~e,n!==0&&(i=ol(n)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:i}function qs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jf(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-cn(n),i=1<<l;t|=e[l],n&=~i}return t}function Fy(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 Nf(){var e=er;return er<<=1,(er&62914560)===0&&(er=4194304),e}function Qo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Iy(e,t,n,l,i,r){var f=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var v=e.entanglements,w=e.expirationTimes,L=e.hiddenUpdates;for(n=f&~n;0<n;){var Y=31-cn(n),K=1<<Y;v[Y]=0,w[Y]=-1;var D=L[Y];if(D!==null)for(L[Y]=null,Y=0;Y<D.length;Y++){var q=D[Y];q!==null&&(q.lane&=-536870913)}n&=~K}l!==0&&wf(e,l,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(f&~t))}function wf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-cn(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Sf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-cn(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function kf(e,t){var n=t&-t;return n=(n&42)!==0?1:Ko(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ko(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 Jo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Tf(){var e=ye.p;return e!==0?e:(e=window.event,e===void 0?32:_p(e.type))}function Cf(e,t){var n=ye.p;try{return ye.p=e,t()}finally{ye.p=n}}var ca=Math.random().toString(36).slice(2),zt="__reactFiber$"+ca,Pt="__reactProps$"+ca,Ll="__reactContainer$"+ca,Ef="__reactEvents$"+ca,Wy="__reactListeners$"+ca,ev="__reactHandles$"+ca,zf="__reactResources$"+ca,Ys="__reactMarker$"+ca,nr="__reactLoad$"+ca;function ar(e){delete e[zt],delete e[Pt],delete e[Wy],delete e[ev]}function cl(e){var t;if(t=e[zt])return t;for(var n=e.parentNode;n;){if(t=n[Ll]||n[zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hp(e);e!==null;){if(n=e[zt])return n;e=hp(e)}return t}e=n,n=e.parentNode}return null}function Ul(e){if(e=e[zt]||e[Ll]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $s(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Hl(e){var t=e[zf];return t||(t=e[zf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[Ys]=!0}function Rf(e){e[nr]=void 0}var Af=new Set,Df={};function ul(e,t){Bl(e,t),Bl(e+"Capture",t)}function Bl(e,t){for(Df[e]=t,e=0;e<t.length;e++)Af.add(t[e])}var tv=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]*$"),_f={},Mf={};function nv(e){return ot.call(Mf,e)?!0:ot.call(_f,e)?!1:tv.test(e)?Mf[e]=!0:(_f[e]=!0,!1)}var Ye=!1;function Of(){var e=Ye;return Ye=!1,e}function lr(e,t,n){if(nv(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function sr(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 ua(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,l)}}function un(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function av(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){n=""+f,r.call(this,f)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Po(e){if(!e._valueTracker){var t=Lf(e)?"checked":"value";e._valueTracker=av(e,t,""+e[t])}}function Uf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Lf(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}var lv=/[\n"\\]/g;function Nn(e){return e.replace(lv,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Fo(e,t,n,l,i,r,f,v){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+un(t)):e.value!==""+un(t)&&(e.value=""+un(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?f==="number"&&e.value==t?Io(e,un(e.value)):Io(e,un(t)):n!=null?Io(e,un(n)):l!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+un(v):e.removeAttribute("name")}function Hf(e,t,n,l,i,r,f,v){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Po(e);return}n=n!=null?""+un(n):"",t=t!=null?""+un(t):n,v||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=v?e.checked:!!l,e.defaultChecked=!!l,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),Po(e)}function Io(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function ql(e,t,n,l){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&&l&&(e[n].defaultSelected=!0)}else{for(n=""+un(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bf(e,t,n){if(t!=null&&(t=""+un(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+un(n):""}function qf(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(De(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=un(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Po(e)}function Gl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sv=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 Gf(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||sv.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Yf(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="",Ye=!0);for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&(Gf(e,i,l),Ye=!0)}else for(var r in t)t.hasOwnProperty(r)&&Gf(e,r,t[r])}function Wo(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 iv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rv=/^[\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 ir(e){return rv.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var ec=null;function tc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,$l=null;function $f(e){var t=Ul(e);if(t&&(e=t.stateNode)){var n=e[Pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Fo(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="'+Nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[Pt]||null;if(!i)throw Error(u(90));Fo(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&Uf(l)}break e;case"textarea":Bf(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ql(e,!!n.multiple,t,!1)}}}var nc=!1;function Vf(e,t,n){if(nc)return e(t,n);nc=!0;try{var l=e(t);return l}finally{if(nc=!1,(Yl!==null||$l!==null)&&(io(),Yl&&(t=Yl,e=$l,$l=Yl=null,$f(t),e)))for(t=0;t<e.length;t++)$f(e[t])}}function Vs(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Pt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ac=!1;if(da)try{var Xs={};Object.defineProperty(Xs,"passive",{get:function(){ac=!0}}),window.addEventListener("test",Xs,Xs),window.removeEventListener("test",Xs,Xs)}catch{ac=!1}var Da=null,lc=null,rr=null;function Xf(){if(rr)return rr;var e,t=lc,n=t.length,l,i="value"in Da?Da.value:Da.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var f=n-e;for(l=1;l<=f&&t[n-l]===i[r-l];l++);return rr=i.slice(e,1<l?1-l:void 0)}function or(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 cr(){return!0}function Zf(){return!1}function $t(e){function t(n,l,i,r,f){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=r,this.target=f,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(n=e[v],this[v]=n?n(r):r[v]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?cr:Zf,this.isPropagationStopped=Zf,this}return U(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=cr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cr)},persist:function(){},isPersistent:cr}),t}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=$t(_a),Zs=U({},_a,{view:0,detail:0}),ov=$t(Zs),sc,ic,Qs,dr=U({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oc,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!==Qs&&(Qs&&e.type==="mousemove"?(sc=e.screenX-Qs.screenX,ic=e.screenY-Qs.screenY):ic=sc=0,Qs=e),sc)},movementY:function(e){return"movementY"in e?e.movementY:ic}}),Qf=$t(dr),cv=U({},dr,{dataTransfer:0}),uv=$t(cv),dv=U({},Zs,{relatedTarget:0}),rc=$t(dv),fv=U({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),hv=$t(fv),mv=U({},_a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xv=$t(mv),pv=U({},_a,{data:0}),Kf=$t(pv),gv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yv={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"},vv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vv[e])?!!t[e]:!1}function oc(){return bv}var jv=U({},Zs,{key:function(e){if(e.key){var t=gv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=or(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oc,charCode:function(e){return e.type==="keypress"?or(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?or(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Nv=$t(jv),wv=U({},dr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jf=$t(wv),Sv=U({},_a,{submitter:0}),kv=$t(Sv),Tv=U({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oc}),Cv=$t(Tv),Ev=U({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),zv=$t(Ev),Rv=U({},dr,{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}),Av=$t(Rv),Dv=U({},_a,{newState:0,oldState:0,source:0}),_v=$t(Dv),Mv=[9,13,27,32],cc=da&&"CompositionEvent"in window,Ks=null;da&&"documentMode"in document&&(Ks=document.documentMode);var Ov=da&&"TextEvent"in window&&!Ks,Pf=da&&(!cc||Ks&&8<Ks&&11>=Ks),Ff=" ",If=!1;function Wf(e,t){switch(e){case"keyup":return Mv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vl=!1;function Lv(e,t){switch(e){case"compositionend":return eh(t);case"keypress":return t.which!==32?null:(If=!0,Ff);case"textInput":return e=t.data,e===Ff&&If?null:e;default:return null}}function Uv(e,t){if(Vl)return e==="compositionend"||!cc&&Wf(e,t)?(e=Xf(),rr=lc=Da=null,Vl=!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 Pf&&t.locale!=="ko"?null:t.data;default:return null}}var Hv={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 th(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hv[e.type]:t==="textarea"}function nh(e,t,n,l){Yl?$l?$l.push(l):$l=[l]:Yl=l,t=ho(t,"onChange"),0<t.length&&(n=new ur("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Js=null,Ps=null;function Bv(e){$x(e,0)}function fr(e){var t=$s(e);if(Uf(t))return e}function ah(e,t){if(e==="change")return t}var lh=!1;if(da){var uc;if(da){var dc="oninput"in document;if(!dc){var sh=document.createElement("div");sh.setAttribute("oninput","return;"),dc=typeof sh.oninput=="function"}uc=dc}else uc=!1;lh=uc&&(!document.documentMode||9<document.documentMode)}function ih(){Js&&(Js.detachEvent("onpropertychange",rh),Ps=Js=null)}function rh(e){if(e.propertyName==="value"&&fr(Ps)){var t=[];nh(t,Ps,e,tc(e)),Vf(Bv,t)}}function qv(e,t,n){e==="focusin"?(ih(),Js=t,Ps=n,Js.attachEvent("onpropertychange",rh)):e==="focusout"&&ih()}function Gv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fr(Ps)}function Yv(e,t){if(e==="click")return fr(t)}function $v(e,t){if(e==="input"||e==="change")return fr(t)}function Vv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:Vv;function Fs(e,t){if(dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!ot.call(t,i)||!dn(e[i],t[i]))return!1}return!0}function fc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function oh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ch(e,t){var n=oh(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=oh(n)}}function uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fc(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=fc(e.document)}return t}function hc(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 Xv=da&&"documentMode"in document&&11>=document.documentMode,Xl=null,mc=null,Is=null,xc=!1;function fh(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;xc||Xl==null||Xl!==fc(l)||(l=Xl,"selectionStart"in l&&hc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Is&&Fs(Is,l)||(Is=l,l=ho(mc,"onSelect"),0<l.length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Xl)))}function dl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zl={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},pc={},hh={};da&&(hh=document.createElement("div").style,"AnimationEvent"in window||(delete Zl.animationend.animation,delete Zl.animationiteration.animation,delete Zl.animationstart.animation),"TransitionEvent"in window||delete Zl.transitionend.transition);function fl(e){if(pc[e])return pc[e];if(!Zl[e])return e;var t=Zl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in hh)return pc[e]=t[n];return e}var mh=fl("animationend"),xh=fl("animationiteration"),ph=fl("animationstart"),Zv=fl("transitionrun"),Qv=fl("transitionstart"),Kv=fl("transitioncancel"),gh=fl("transitionend"),yh=new Map,gc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");gc.push("scrollEnd");function Un(e,t){yh.set(e,t),ul(t,[e])}var Jv=0;function fa(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Gn.identifierPrefix;var n=Jv++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function vh(e){if(e==null||typeof e=="string")return e;var t=null,n=fs;if(n!==null)for(var l=0;l<n.length;l++){var i=e[n[l]];if(i!=null){if(i==="none")return"none";t=t==null?i:t+(" "+i)}}return t??e.default}function ha(e,t){return e=vh(e),t=vh(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var hr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wn=[],Ql=0,yc=0;function mr(){for(var e=Ql,t=yc=Ql=0;t<e;){var n=wn[t];wn[t++]=null;var l=wn[t];wn[t++]=null;var i=wn[t];wn[t++]=null;var r=wn[t];if(wn[t++]=null,l!==null&&i!==null){var f=l.pending;f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i}r!==0&&bh(n,i,r)}}function xr(e,t,n,l){wn[Ql++]=e,wn[Ql++]=t,wn[Ql++]=n,wn[Ql++]=l,yc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function vc(e,t,n,l){return xr(e,t,n,l),pr(e)}function hl(e,t){return xr(e,null,null,t),pr(e)}function bh(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-cn(n),e=r.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),r):null}function pr(e){if(50<bi)throw bi=0,so=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kl={};function Pv(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(e,t,n,l){return new Pv(e,t,n,l)}function bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ma(e,t){var n=e.alternate;return n===null?(n=Ft(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&1206910976,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 jh(e,t){e.flags&=1206910978;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 gr(e,t,n,l,i,r){var f=0;if(l=e,typeof l=="function")bc(l)&&(f=1);else if(typeof l=="string")f=S0(e,n,Ut.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(l){case ke:return e=Ft(31,n,t,i),e.elementType=ke,e.lanes=r,e;case ae:return ml(n.children,i,r,t);case M:f=8,i|=24;break;case A:return e=Ft(12,n,t,i|2),e.elementType=A,e.lanes=r,e;case de:return e=Ft(13,n,t,i),e.elementType=de,e.lanes=r,e;case $:return e=Ft(19,n,t,i),e.elementType=$,e.lanes=r,e;case $e:case T:return e=i|32,e=Ft(30,n,t,e),e.elementType=T,e.lanes=r,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case F:f=10;break e;case le:f=9;break e;case ee:f=11;break e;case ie:f=14;break e;case Se:f=16,l=null;break e}f=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Ft(f,n,t,i),t.elementType=e,t.type=l,t.lanes=r,t}function ml(e,t,n,l){return e=Ft(7,e,l,t),e.lanes=n,e}function jc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Nh(e){var t=Ft(18,null,null,0);return t.stateNode=e,t}function Nc(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var wh=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var n=wh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:be(t)},wh.set(e,t),t)}return{value:e,source:t,stack:be(t)}}var Jl=[],Pl=0,yr=null,Ws=0,kn=[],Tn=0,Ma=null,Jn=1,Pn="";function xa(e,t){Jl[Pl++]=Ws,Jl[Pl++]=yr,yr=e,Ws=t}function Sh(e,t,n){kn[Tn++]=Jn,kn[Tn++]=Pn,kn[Tn++]=Ma,Ma=e;var l=Jn;e=Pn;var i=32-cn(l)-1;l&=~(1<<i),n+=1;var r=32-cn(t)+i;if(30<r){var f=i-i%5;r=(l&(1<<f)-1).toString(32),l>>=f,i-=f,Jn=1<<32-cn(t)+i|n<<i|l,Pn=r+e}else Jn=1<<r|n<<i|l,Pn=e}function vr(e){e.return!==null&&(xa(e,1),Sh(e,1,0))}function wc(e){for(;e===yr;)yr=Jl[--Pl],Jl[Pl]=null,Ws=Jl[--Pl],Jl[Pl]=null;for(;e===Ma;)Ma=kn[--Tn],kn[Tn]=null,Pn=kn[--Tn],kn[Tn]=null,Jn=kn[--Tn],kn[Tn]=null}function kh(e,t){kn[Tn++]=Jn,kn[Tn++]=Pn,kn[Tn++]=Ma,Jn=t.id,Pn=t.overflow,Ma=e}var kt=null,tt=null,_e=!1,Oa=null,Cn=!1,Sc=Error(u(519));function La(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ei(Sn(t,e)),Sc}function Th(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[zt]=e,t[Pt]=l,n){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(n=0;n<Ni.length;n++)Oe(Ni[n],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),Hf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),qf(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||Qx(t.textContent,n)?(l.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),l.onScroll!=null&&Oe("scroll",t),l.onScrollEnd!=null&&Oe("scrollend",t),l.onClick!=null&&(t.onclick=Kn),t=!0):t=!1,t||La(e,!0)}function br(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:kt=kt.return}}function Fl(e){if(e!==kt)return!1;if(!_e)return br(e),_e=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ed(e.type,e.memoizedProps)),n=!n),n&&tt&&La(e),br(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fp(e)}else t===27?(t=tt,Ia(e.type)?(e=cd,cd=null,tt=e):tt=t):tt=kt?zn(e.stateNode.nextSibling):null;return!0}function xl(){tt=kt=null,_e=!1}function kc(){var e=Oa;return e!==null&&(en===null?en=e:en.push.apply(en,e),Oa=null),e}function ei(e){Oa===null?Oa=[e]:Oa.push(e)}var Tc=Yt(null),pl=null,pa=null;function Ua(e,t,n){Le(Tc,t._currentValue),t._currentValue=n}function ga(e){e._currentValue=Tc.current,rt(Tc)}function jr(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Cc(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var f=i.child;r=r.firstContext;e:for(;r!==null;){var v=r;r=i;for(var w=0;w<t.length;w++)if(v.context===t[w]){r.lanes|=n,v=r.alternate,v!==null&&(v.lanes|=n),jr(r.return,n,e),l||(f=null);break e}r=v.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(u(341));f.lanes|=n,r=f.alternate,r!==null&&(r.lanes|=n),jr(f,n,e),f=null}else i.tag===13&&i.memoizedState!==null&&i.memoizedState.dehydrated===null?(i.lanes|=n,f=i.alternate,f!==null&&(f.lanes|=n),jr(i.return,n,e),f=i.child,f=f!==null?f.sibling:null):f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function gl(e,t,n,l){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(u(387));if(f=f.memoizedProps,f!==null){var v=i.type;dn(i.pendingProps.value,f.value)||(e!==null?e.push(v):e=[v])}}else if(i===oa.current){if(f=i.alternate,f===null)throw Error(u(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ns):e=[Ns])}i=i.return}return e!==null&&Cc(t,e,n,l),t.flags|=262144,e!==null}function Nr(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yl(e){pl=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return Ch(pl,e)}function wr(e,t){return pl===null&&yl(e),Ch(e,t)}function Ch(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pa===null){if(e===null)throw Error(u(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return n}var Fv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Iv=s.unstable_scheduleCallback,Wv=s.unstable_NormalPriority,mt={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new Fv,data:new Map,refCount:0}}function ti(e){e.refCount--,e.refCount===0&&Iv(Wv,function(){e.controller.abort()})}function Eh(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var l=t[e];n.indexOf(l)===-1&&n.push(l)}}}var ni=null;function eb(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var ai=null,zc=0,vl=0,Il=null;function tb(e,t){if(ai===null){var n=ai=[];zc=0,vl=Xu(),Il={status:"pending",value:void 0,then:function(l){n.push(l)}}}return zc++,t.then(zh,zh),t}function zh(){if(--zc===0&&(ni=null,ai!==null)){Il!==null&&(Il.status="fulfilled");var e=ai;ai=null,vl=0,Il=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function nb(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var Rh=fe.S;fe.S=function(e,t){if(Nx=rn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tb(e,t),ni!==null)for(var n=ps;n!==null;)Eh(n,ni),n=n.next;if(n=e.types,n!==null){for(var l=ps;l!==null;)Eh(l,n),l=l.next;if(vl!==0){l=ni,l===null&&(l=ni=[]);for(var i=0;i<n.length;i++){var r=n[i];l.indexOf(r)===-1&&l.push(r)}}}Rh!==null&&Rh(e,t)};var bl=Yt(null);function Rc(){var e=bl.current;return e!==null?e:et.pooledCache}function Sr(e,t){t===null?Le(bl,bl.current):Le(bl,t.pool)}function Ah(){var e=Rc();return e===null?null:{parent:mt._currentValue,pool:e}}var Wl=Error(u(460)),Ac=Error(u(474)),kr=Error(u(542)),Tr={then:function(){}};function Dh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function _h(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kn,Kn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e===void 0&&!("reason"in t)?Error(u(600)):e;default:if(typeof t.status=="string")t.then(Kn,Kn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e}throw Nl=t,Wl}}function jl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Nl=n,Wl):n}}var Nl=null;function Mh(){if(Nl===null)throw Error(u(459));var e=Nl;return Nl=null,e}function Oh(e){if(e===Wl||e===kr)throw Error(u(483))}var es=null,li=0;function Cr(e){var t=li;return li+=1,es===null&&(es=[]),_h(es,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Er(e,t){throw t.$$typeof===J?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Lh(e){function t(O,C){if(e){var B=O.deletions;B===null?(O.deletions=[C],O.flags|=16):B.push(C)}}function n(O,C){if(!e)return null;for(;C!==null;)t(O,C),C=C.sibling;return null}function l(O){for(var C=new Map;O!==null;)O.key===null?C.set(O.index,O):C.set(O.key,O),O=O.sibling;return C}function i(O,C){return O=ma(O,C),O.index=0,O.sibling=null,O}function r(O,C,B){return O.index=B,e?(B=O.alternate,B!==null?(B=B.index,B<C?(O.flags|=2,C):B):(O.flags|=134217730,C)):(O.flags|=1048576,C)}function f(O){return e&&O.alternate===null&&(O.flags|=134217730),O}function v(O,C,B,Z){return C===null||C.tag!==6?(C=jc(B,O.mode,Z),C.return=O,C):(C=i(C,B),C.return=O,C)}function w(O,C,B,Z){var me=B.type;return me===ae?(O=Y(O,C,B.props.children,Z,B.key),Ha(O,B),O):C!==null&&(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Se&&jl(me)===C.type)?(C=i(C,B.props),Ha(C,B),C.return=O,C):(C=gr(B.type,B.key,B.props,null,O.mode,Z),Ha(C,B),C.return=O,C)}function L(O,C,B,Z){return C===null||C.tag!==4||C.stateNode.containerInfo!==B.containerInfo||C.stateNode.implementation!==B.implementation?(C=Nc(B,O.mode,Z),C.return=O,C):(C=i(C,B.children||[]),C.return=O,C)}function Y(O,C,B,Z,me){return C===null||C.tag!==7?(C=ml(B,O.mode,Z,me),C.return=O,C):(C=i(C,B),C.return=O,C)}function K(O,C,B){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=jc(""+C,O.mode,B),C.return=O,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case ce:return B=gr(C.type,C.key,C.props,null,O.mode,B),Ha(B,C),B.return=O,B;case P:return C=Nc(C,O.mode,B),C.return=O,C;case Se:return C=jl(C),K(O,C,B)}if(De(C)||W(C))return C=ml(C,O.mode,B,null),C.return=O,C;if(typeof C.then=="function")return K(O,Cr(C),B);if(C.$$typeof===F)return K(O,wr(O,C),B);Er(O,C)}return null}function D(O,C,B,Z){var me=C!==null?C.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return me!==null?null:v(O,C,""+B,Z);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case ce:return B.key===me?w(O,C,B,Z):null;case P:return B.key===me?L(O,C,B,Z):null;case Se:return B=jl(B),D(O,C,B,Z)}if(De(B)||W(B))return me!==null?null:Y(O,C,B,Z,null);if(typeof B.then=="function")return D(O,C,Cr(B),Z);if(B.$$typeof===F)return D(O,C,wr(O,B),Z);Er(O,B)}return null}function q(O,C,B,Z,me){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return O=O.get(B)||null,v(C,O,""+Z,me);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case ce:return O=O.get(Z.key===null?B:Z.key)||null,w(C,O,Z,me);case P:return O=O.get(Z.key===null?B:Z.key)||null,L(C,O,Z,me);case Se:return Z=jl(Z),q(O,C,B,Z,me)}if(De(Z)||W(Z))return O=O.get(B)||null,Y(C,O,Z,me,null);if(typeof Z.then=="function")return q(O,C,B,Cr(Z),me);if(Z.$$typeof===F)return q(O,C,B,wr(C,Z),me);Er(C,Z)}return null}function se(O,C,B,Z){for(var me=null,He=null,ge=C,Ne=C=0,gt=null;ge!==null&&Ne<B.length;Ne++){ge.index>Ne?(gt=ge,ge=null):gt=ge.sibling;var qe=D(O,ge,B[Ne],Z);if(qe===null){ge===null&&(ge=gt);break}e&&ge&&qe.alternate===null&&t(O,ge),C=r(qe,C,Ne),He===null?me=qe:He.sibling=qe,He=qe,ge=gt}if(Ne===B.length)return n(O,ge),_e&&xa(O,Ne),me;if(ge===null){for(;Ne<B.length;Ne++)ge=K(O,B[Ne],Z),ge!==null&&(C=r(ge,C,Ne),He===null?me=ge:He.sibling=ge,He=ge);return _e&&xa(O,Ne),me}for(ge=l(ge);Ne<B.length;Ne++)gt=q(ge,O,Ne,B[Ne],Z),gt!==null&&(e&&(qe=gt.alternate,qe!==null&&ge.delete(qe.key===null?Ne:qe.key)),C=r(gt,C,Ne),He===null?me=gt:He.sibling=gt,He=gt);return e&&ge.forEach(function(al){return t(O,al)}),_e&&xa(O,Ne),me}function xe(O,C,B,Z){if(B==null)throw Error(u(151));for(var me=null,He=null,ge=C,Ne=C=0,gt=null,qe=B.next();ge!==null&&!qe.done;Ne++,qe=B.next()){ge.index>Ne?(gt=ge,ge=null):gt=ge.sibling;var al=D(O,ge,qe.value,Z);if(al===null){ge===null&&(ge=gt);break}e&&ge&&al.alternate===null&&t(O,ge),C=r(al,C,Ne),He===null?me=al:He.sibling=al,He=al,ge=gt}if(qe.done)return n(O,ge),_e&&xa(O,Ne),me;if(ge===null){for(;!qe.done;Ne++,qe=B.next())qe=K(O,qe.value,Z),qe!==null&&(C=r(qe,C,Ne),He===null?me=qe:He.sibling=qe,He=qe);return _e&&xa(O,Ne),me}for(ge=l(ge);!qe.done;Ne++,qe=B.next())qe=q(ge,O,Ne,qe.value,Z),qe!==null&&(e&&(gt=qe.alternate,gt!==null&&ge.delete(gt.key===null?Ne:gt.key)),C=r(qe,C,Ne),He===null?me=qe:He.sibling=qe,He=qe);return e&&ge.forEach(function(L0){return t(O,L0)}),_e&&xa(O,Ne),me}function Re(O,C,B,Z){if(typeof B=="object"&&B!==null&&B.type===ae&&B.key===null&&B.props.ref===void 0&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case ce:e:{for(var me=B.key;C!==null;){if(C.key===me){if(me=B.type,me===ae){if(C.tag===7){n(O,C.sibling),Z=i(C,B.props.children),Ha(Z,B),Z.return=O,O=Z;break e}}else if(C.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===Se&&jl(me)===C.type){n(O,C.sibling),Z=i(C,B.props),Ha(Z,B),Z.return=O,O=Z;break e}n(O,C);break}else t(O,C);C=C.sibling}B.type===ae?(Z=ml(B.props.children,O.mode,Z,B.key),Ha(Z,B),Z.return=O,O=Z):(Z=gr(B.type,B.key,B.props,null,O.mode,Z),Ha(Z,B),Z.return=O,O=Z)}return f(O);case P:e:{for(me=B.key;C!==null;){if(C.key===me)if(C.tag===4&&C.stateNode.containerInfo===B.containerInfo&&C.stateNode.implementation===B.implementation){n(O,C.sibling),Z=i(C,B.children||[]),Z.return=O,O=Z;break e}else{n(O,C);break}else t(O,C);C=C.sibling}Z=Nc(B,O.mode,Z),Z.return=O,O=Z}return f(O);case Se:return B=jl(B),Re(O,C,B,Z)}if(De(B))return se(O,C,B,Z);if(W(B)){if(me=W(B),typeof me!="function")throw Error(u(150));return B=me.call(B),xe(O,C,B,Z)}if(typeof B.then=="function")return Re(O,C,Cr(B),Z);if(B.$$typeof===F)return Re(O,C,wr(O,B),Z);Er(O,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,C!==null&&C.tag===6?(n(O,C.sibling),Z=i(C,B),Z.return=O,O=Z):(n(O,C),Z=jc(B,O.mode,Z),Z.return=O,O=Z),f(O)):n(O,C)}return function(O,C,B,Z){try{li=0;var me=Re(O,C,B,Z);return es=null,me}catch(ge){if(ge===Wl||ge===kr)throw ge;var He=Ft(29,ge,null,O.mode);return He.lanes=Z,He.return=O,He}finally{}}}var wl=Lh(!0),Uh=Lh(!1),Ba=!1;function Dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _c(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ve&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=pr(e),bh(e,null,n),t}return xr(e,l,t,n),pr(e)}function si(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Sf(e,n)}}function Mc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=f:r=r.next=f,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Oc=!1;function ii(){if(Oc){var e=Il;if(e!==null)throw e}}function ri(e,t,n,l){Oc=!1;var i=e.updateQueue;Ba=!1;var r=i.firstBaseUpdate,f=i.lastBaseUpdate,v=i.shared.pending;if(v!==null){i.shared.pending=null;var w=v,L=w.next;w.next=null,f===null?r=L:f.next=L,f=w;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,v=Y.lastBaseUpdate,v!==f&&(v===null?Y.firstBaseUpdate=L:v.next=L,Y.lastBaseUpdate=w))}if(r!==null){var K=i.baseState;f=0,Y=L=w=null,v=r;do{var D=v.lane&-536870913,q=D!==v.lane;if(q?(Ue&D)===D:(l&D)===D){D!==0&&D===vl&&(Oc=!0),Y!==null&&(Y=Y.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var se=e,xe=v;D=t;var Re=n;switch(xe.tag){case 1:if(se=xe.payload,typeof se=="function"){K=se.call(Re,K,D);break e}K=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=xe.payload,D=typeof se=="function"?se.call(Re,K,D):se,D==null)break e;K=U({},K,D);break e;case 2:Ba=!0}}D=v.callback,D!==null&&(e.flags|=64,q&&(e.flags|=8192),q=i.callbacks,q===null?i.callbacks=[D]:q.push(D))}else q={lane:D,tag:v.tag,payload:v.payload,callback:v.callback,next:null},Y===null?(L=Y=q,w=K):Y=Y.next=q,f|=D;if(v=v.next,v===null){if(v=i.shared.pending,v===null)break;q=v,v=q.next,q.next=null,i.lastBaseUpdate=q,i.shared.pending=null}}while(!0);Y===null&&(w=K),i.baseState=w,i.firstBaseUpdate=L,i.lastBaseUpdate=Y,r===null&&(i.shared.lanes=0),Ka|=f,e.lanes=f,e.memoizedState=K}}function Hh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Bh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Hh(n[e],t)}var Ya=Yt(null),zr=Yt(0);function qh(e,t){e=Na,Le(zr,e),Le(Ya,t),Na=e|t.baseLanes}function Lc(){Le(zr,Na),Le(Ya,Ya.current)}function Uc(){Na=zr.current,rt(Ya),rt(zr)}var At=Yt(null),Bt=null;function $a(e){var t=e.alternate;Le(Dt,Dt.current&1),Le(At,e),Bt===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(Bt=e)}function Hc(e){Le(Dt,Dt.current),Le(At,e),Bt===null&&(Bt=e)}function Gh(e){e.tag===22?(Le(Dt,Dt.current),Le(At,e),Bt===null&&(Bt=e)):Va()}function Va(){Le(Dt,Dt.current),Le(At,At.current)}function fn(e){rt(At),Bt===e&&(Bt=null),rt(Dt)}var Dt=Yt(0);function oi(e,t){Le(At,At.current),Le(Dt,t)}function Bc(e){rt(Dt),rt(At),Bt===e&&(Bt=null)}function Rr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||rd(n)||od(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ya=0,ze=null,Ie=null,xt=null,Ar=!1,ts=!1,Sl=!1,Dr=0,ci=0,ns=null,ab=0;function ut(){throw Error(u(321))}function qc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dn(e[n],t[n]))return!1;return!0}function Gc(e,t,n,l,i,r){return ya=r,ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fe.H=e===null||e.memoizedState===null?Sm:km,Sl=!1,r=n(l,i),Sl=!1,ts&&(r=$h(t,n,l,i)),Yh(e),r}function Yh(e){fe.H=Br;var t=Ie!==null&&Ie.next!==null;if(ya=0,xt=Ie=ze=null,Ar=!1,ci=0,ns=null,t)throw Error(u(300));e===null||pt||(e=e.dependencies,e!==null&&Nr(e)&&(pt=!0))}function $h(e,t,n,l){ze=e;var i=0;do{if(ts&&(ns=null),ci=0,ts=!1,25<=i)throw Error(u(301));if(i+=1,xt=Ie=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}fe.H=db,r=t(n,l)}while(ts);return r}function lb(){var e=fe.H,t=e.useState()[0];return t=typeof t.then=="function"?ui(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(ze.flags|=1024),t}function Yc(){var e=Dr!==0;return Dr=0,e}function $c(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Vc(e){if(Ar){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ar=!1}ya=0,xt=Ie=ze=null,ts=!1,ci=Dr=0,ns=null}function Vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=e:xt=xt.next=e,xt}function ht(){if(Ie===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=xt===null?ze.memoizedState:xt.next;if(t!==null)xt=t,Ie=e;else{if(e===null)throw ze.alternate===null?Error(u(467)):Error(u(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},xt===null?ze.memoizedState=xt=e:xt=xt.next=e}return xt}function _r(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ui(e){var t=ci;return ci+=1,ns===null&&(ns=[]),e=_h(ns,e,t),t=ze,(xt===null?t.memoizedState:xt.next)===null&&(t=t.alternate,fe.H=t===null||t.memoizedState===null?Sm:km),e}function Mr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ui(e);if(e.$$typeof===I)return;if(e.$$typeof===F)return Rt(e)}throw Error(u(438,String(e)))}function Xc(e){var t=null,n=ze.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ze.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=_r(),ze.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ge;return t.index++,n}function va(e,t){return typeof t=="function"?t(e):t}function Or(e){var t=ht();return Zc(t,Ie,e)}function Zc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var i=e.baseQueue,r=l.pending;if(r!==null){if(i!==null){var f=i.next;i.next=r.next,r.next=f}t.baseQueue=i=r,l.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var v=f=null,w=null,L=t,Y=!1;do{var K=L.lane&-536870913;if(K!==L.lane?(Ue&K)===K:(ya&K)===K){var D=L.revertLane;if(D===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),K===vl&&(Y=!0);else if((ya&D)===D){L=L.next,D===vl&&(Y=!0);continue}else K={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(v=w=K,f=r):w=w.next=K,ze.lanes|=D,Ka|=D;K=L.action,Sl&&n(r,K),r=L.hasEagerState?L.eagerState:n(r,K)}else D={lane:K,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},w===null?(v=w=D,f=r):w=w.next=D,ze.lanes|=K,Ka|=K;L=L.next}while(L!==null&&L!==t);if(w===null?f=r:w.next=v,!dn(r,e.memoizedState)&&(pt=!0,Y&&(n=Il,n!==null)))throw n;e.memoizedState=r,e.baseState=f,e.baseQueue=w,l.lastRenderedState=r}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Qc(e){var t=ht(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var f=i=i.next;do r=e(r,f.action),f=f.next;while(f!==i);dn(r,t.memoizedState)||(pt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Vh(e,t,n){var l=ze,i=ht(),r=_e;if(r){if(n===void 0)throw Error(u(407));n=n()}else n=t();var f=!dn((Ie||i).memoizedState,n);if(f&&(i.memoizedState=n,pt=!0),i=i.queue,Pc(Qh.bind(null,l,i,e),[e]),e=i.getSnapshot!==t||f||xt!==null&&(xt.memoizedState.tag&1)!==0,as(e?9:8,{destroy:void 0},Zh.bind(null,l,i,n,t),null),e){if(l.flags|=2048,et===null)throw Error(u(349));r||(ya&127)!==0||Xh(l,t,n)}return n}function Xh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ze.updateQueue,t===null?(t=_r(),ze.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zh(e,t,n,l){t.value=n,t.getSnapshot=l,Kh(t)&&Jh(e)}function Qh(e,t,n){return n(function(){Kh(t)&&Jh(e)})}function Kh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dn(e,n)}catch{return!0}}function Jh(e){var t=hl(e,2);t!==null&&tn(t,e,2)}function Kc(e){var t=Vt();if(typeof e=="function"){var n=e;if(e=n(),Sl){Aa(!0);try{n()}finally{Aa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function Ph(e,t,n,l){return e.baseState=n,Zc(e,Ie,typeof l=="function"?l:va)}function sb(e,t,n,l,i){if(Hr(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){r.listeners.push(f)}};fe.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,Fh(t,r)):(r.next=n.next,t.pending=n.next=r)}}function Fh(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var r=fe.T,f={};f.types=r!==null?r.types:null,fe.T=f;try{var v=n(i,l),w=fe.S;w!==null&&w(f,v),Ih(e,t,v)}catch(L){Jc(e,t,L)}finally{r!==null&&f.types!==null&&(r.types=f.types),fe.T=r}}else try{r=n(i,l),Ih(e,t,r)}catch(L){Jc(e,t,L)}}function Ih(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Wh(e,t,l)},function(l){return Jc(e,t,l)}):Wh(e,t,n)}function Wh(e,t,n){t.status="fulfilled",t.value=n,em(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Fh(e,n)))}function Jc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,em(t),t=t.next;while(t!==l)}e.action=null}function em(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tm(e,t){return t}function nm(e,t){if(_e){var n=et.formState;if(n!==null){e:{var l=ze;if(_e){if(tt){t:{for(var i=tt,r=Cn;i.nodeType!==8;){if(!r){i=null;break t}if(i=zn(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){tt=zn(i.nextSibling),l=i.data==="F!";break e}}La(l)}l=!1}l&&(t=n[0])}}return n=Vt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tm,lastRenderedState:t},n.queue=l,n=jm.bind(null,ze,l),l.dispatch=n,l=Kc(!1),r=tu.bind(null,ze,!1,l.queue),l=Vt(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=sb.bind(null,ze,i,r,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function am(e){var t=ht();return lm(t,Ie,e)}function lm(e,t,n){if(t=Zc(e,t,tm)[0],e=Or(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ui(t)}catch(f){throw f===Wl?kr:f}else l=t;t=ht();var i=t.queue,r=i.dispatch;return n!==t.memoizedState&&(ze.flags|=2048,as(9,{destroy:void 0},ib.bind(null,i,n),null)),[l,r,e]}function ib(e,t){e.action=t}function sm(e){var t=ht(),n=Ie;if(n!==null)return lm(t,n,e);ht(),t=t.memoizedState,n=ht();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function as(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ze.updateQueue,t===null&&(t=_r(),ze.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function im(){return ht().memoizedState}function Lr(e,t,n,l){var i=Vt();ze.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,l===void 0?null:l)}function Ur(e,t,n,l){var i=ht();l=l===void 0?null:l;var r=i.memoizedState.inst;Ie!==null&&l!==null&&qc(l,Ie.memoizedState.deps)?i.memoizedState=as(t,r,n,l):(ze.flags|=e,i.memoizedState=as(1|t,r,n,l))}function rm(e,t){Lr(8390656,8,e,t)}function Pc(e,t){Ur(2048,8,e,t)}function rb(e){ze.flags|=4;var t=ze.updateQueue;if(t===null)t=_r(),ze.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function om(e){var t=ht().memoizedState;return rb({ref:t,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function cm(e,t){return Ur(4,2,e,t)}function um(e,t){return Ur(4,4,e,t)}function dm(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 fm(e,t,n){n=n!=null?n.concat([e]):null,Ur(4,4,dm.bind(null,t,e),n)}function Fc(){}function hm(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&qc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function mm(e,t){var n=ht();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&qc(t,l[1]))return l[0];if(l=e(),Sl){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[l,t],l}function Ic(e,t,n){return n===void 0||(ya&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Sx(),ze.lanes|=e,Ka|=e,n)}function xm(e,t,n,l){return dn(n,t)?n:Ya.current!==null?(e=Ic(e,n,l),dn(e,t)||(pt=!0),e):(ya&106)===0||(ya&1073741824)!==0&&(Ue&261930)===0?(pt=!0,e.memoizedState=n):(e=Sx(),ze.lanes|=e,Ka|=e,t)}function pm(e,t,n,l,i){var r=ye.p;ye.p=r!==0&&8>r?r:8;var f=fe.T,v={};v.types=f!==null?f.types:null,fe.T=v,tu(e,!1,t,n);try{var w=i(),L=fe.S;if(L!==null&&L(v,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=nb(w,l);di(e,t,Y,pn(e))}else di(e,t,l,pn(e))}catch(K){di(e,t,{then:function(){},status:"rejected",reason:K},pn())}finally{ye.p=r,f!==null&&v.types!==null&&(f.types=v.types),fe.T=f}}function ob(){}function Wc(e,t,n,l){if(e.tag!==5)throw Error(u(476));var i=gm(e).queue;pm(e,i,t,Gt,n===null?ob:function(){return ym(e),n(l)})}function gm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gt,baseState:Gt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:Gt},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ym(e){var t=gm(e);t.next===null&&(t=e.alternate.memoizedState),di(e,t.next.queue,{},pn())}function eu(){return Rt(Ns)}function vm(){return ht().memoizedState}function bm(){return ht().memoizedState}function cb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pn();e=qa(n);var l=Ga(t,e,n);l!==null&&(tn(l,t,n),si(l,t,n)),t={cache:Ec()},e.payload=t;return}t=t.return}}function ub(e,t,n){var l=pn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hr(e)?Nm(t,n):(n=vc(e,t,n,l),n!==null&&(tn(n,e,l),wm(n,t,l)))}function jm(e,t,n){var l=pn();di(e,t,n,l)}function di(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hr(e))Nm(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var f=t.lastRenderedState,v=r(f,n);if(i.hasEagerState=!0,i.eagerState=v,dn(v,f))return xr(e,t,i,0),et===null&&mr(),!1}catch{}finally{}if(n=vc(e,t,i,l),n!==null)return tn(n,e,l),wm(n,t,l),!0}return!1}function tu(e,t,n,l){if(l={lane:2,revertLane:Xu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Hr(e)){if(t)throw Error(u(479))}else t=vc(e,n,l,2),t!==null&&tn(t,e,2)}function Hr(e){var t=e.alternate;return e===ze||t!==null&&t===ze}function Nm(e,t){ts=Ar=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wm(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Sf(e,n)}}var Br={readContext:Rt,use:Mr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut,useEffectEvent:ut},Sm={readContext:Rt,use:Mr,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:rm,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Lr(4194308,4,dm.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lr(4194308,4,e,t)},useInsertionEffect:function(e,t){Lr(4,2,e,t)},useMemo:function(e,t){var n=Vt();t=t===void 0?null:t;var l=e();if(Sl){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Vt();if(n!==void 0){var i=n(t);if(Sl){Aa(!0);try{n(t)}finally{Aa(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=ub.bind(null,ze,e),[l.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:function(e){e=Kc(e);var t=e.queue,n=jm.bind(null,ze,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Fc,useDeferredValue:function(e,t){var n=Vt();return Ic(n,e,t)},useTransition:function(){var e=Kc(!1);return e=pm.bind(null,ze,e.queue,!0,!1),Vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ze,i=Vt();if(_e){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),et===null)throw Error(u(349));(Ue&127)!==0||Xh(l,t,n)}i.memoizedState=n;var r={value:n,getSnapshot:t};return i.queue=r,rm(Qh.bind(null,l,r,e),[e]),l.flags|=2048,as(9,{destroy:void 0},Zh.bind(null,l,r,n,t),null),n},useId:function(){var e=Vt(),t=et.identifierPrefix;if(_e){var n=Pn,l=Jn;n=(l&~(1<<32-cn(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Dr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ab++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:eu,useFormState:nm,useActionState:nm,useOptimistic:function(e){var t=Vt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=tu.bind(null,ze,!0,n),n.dispatch=t,[e,t]},useMemoCache:Xc,useCacheRefresh:function(){return Vt().memoizedState=cb.bind(null,ze)},useEffectEvent:function(e){var t=Vt(),n={impl:e};return t.memoizedState=n,function(){if((Ve&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},km={readContext:Rt,use:Mr,useCallback:hm,useContext:Rt,useEffect:Pc,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:mm,useReducer:Or,useRef:im,useState:function(){return Or(va)},useDebugValue:Fc,useDeferredValue:function(e,t){var n=ht();return xm(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Or(va)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:Vh,useId:vm,useHostTransitionStatus:eu,useFormState:am,useActionState:am,useOptimistic:function(e,t){var n=ht();return Ph(n,Ie,e,t)},useMemoCache:Xc,useCacheRefresh:bm,useEffectEvent:om},db={readContext:Rt,use:Mr,useCallback:hm,useContext:Rt,useEffect:Pc,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:mm,useReducer:Qc,useRef:im,useState:function(){return Qc(va)},useDebugValue:Fc,useDeferredValue:function(e,t){var n=ht();return Ie===null?Ic(n,e,t):xm(n,Ie.memoizedState,e,t)},useTransition:function(){var e=Qc(va)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:Vh,useId:vm,useHostTransitionStatus:eu,useFormState:sm,useActionState:sm,useOptimistic:function(e,t){var n=ht();return Ie!==null?Ph(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Xc,useCacheRefresh:bm,useEffectEvent:om};function nu(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:U({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var au={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=pn(),i=qa(l);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,l),t!==null&&(tn(t,e,l),si(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=pn(),i=qa(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,l),t!==null&&(tn(t,e,l),si(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pn(),l=qa(n);l.tag=2,t!=null&&(l.callback=t),t=Ga(e,l,n),t!==null&&(tn(t,e,n),si(t,e,n))}};function Tm(e,t,n,l,i,r,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,f):t.prototype&&t.prototype.isPureReactComponent?!Fs(n,l)||!Fs(i,r):!0}function Cm(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&au.enqueueReplaceState(t,t.state,null)}function kl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=U({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Em(e){hr(e)}function zm(e){console.error(e)}function Rm(e){hr(e)}function qr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Am(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function lu(e,t,n){return n=qa(n),n.tag=3,n.payload={element:null},n.callback=function(){qr(e,t)},n}function Dm(e){return e=qa(e),e.tag=3,e}function _m(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=l.value;e.payload=function(){return i(r)},e.callback=function(){Am(t,n,l)}}var f=n.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Am(t,n,l),typeof i!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var v=l.stack;this.componentDidCatch(l.value,{componentStack:v!==null?v:""})})}function fb(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&gl(t,n,i,!0),n=At.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Bt===null?ro():n.alternate===null&&dt===0&&(dt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===Tr?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Yu(e,l,i)),!1;case 22:return n.flags|=65536,l===Tr?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Yu(e,l,i)),!1}throw Error(u(435,n.tag))}return Yu(e,l,i),ro(),!1}if(_e)return t=At.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Sc&&(e=Error(u(422),{cause:l}),ei(Sn(e,n)))):(l!==Sc&&(t=Error(u(423),{cause:l}),ei(Sn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=Sn(l,n),i=lu(e.stateNode,l,i),Mc(e,i),dt!==4&&(dt=2)),!1;var r=Error(u(520),{cause:l});if(r=Sn(r,n),vi===null?vi=[r]:vi.push(r),dt!==4&&(dt=2),t===null)return!0;l=Sn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=lu(n.stateNode,l,e),Mc(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Ja===null||!Ja.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Dm(i),_m(i,e,n,l),Mc(n,i),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var su=Error(u(461)),pt=!1;function vt(e,t,n,l){t.child=e===null?Uh(t,null,n,l):wl(t,e.child,n,l)}function Mm(e,t,n,l,i){n=n.render;var r=t.ref;if("ref"in l){var f={};for(var v in l)v!=="ref"&&(f[v]=l[v])}else f=l;return yl(t),l=Gc(e,t,n,f,r,i),v=Yc(),e!==null&&!pt?($c(e,t,i),ba(e,t,i)):(_e&&v&&vr(t),t.flags|=1,vt(e,t,l,i),t.child)}function Om(e,t,n,l,i){if(e===null){var r=n.type;return typeof r=="function"&&!bc(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Lm(e,t,r,l,i)):(e=gr(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!hu(e,i)){var f=r.memoizedProps;if(n=n.compare,n=n!==null?n:Fs,n(f,l)&&e.ref===t.ref)return ba(e,t,i)}return t.flags|=1,e=ma(r,l),e.ref=t.ref,e.return=t,t.child=e}function Lm(e,t,n,l,i){if(e!==null){var r=e.memoizedProps;if(Fs(r,l)&&e.ref===t.ref)if(pt=!1,t.pendingProps=l=r,hu(e,i))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,ba(e,t,i)}return iu(e,t,n,l,i)}function Um(e,t,n,l){var i=l.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~r}else l=0,t.child=null;return Hm(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sr(t,r!==null?r.cachePool:null),r!==null?qh(t,r):Lc(),Gh(t);else return l=t.lanes=536870912,Hm(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(Sr(t,r.cachePool),qh(t,r),Va(),t.memoizedState=null):(e!==null&&Sr(t,null),Lc(),Va());return vt(e,t,i,n),t.child}function fi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hm(e,t,n,l,i){var r=Rc();return r=r===null?null:{parent:mt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Sr(t,null),Lc(),Gh(t),e!==null&&gl(e,t,l,!0),t.childLanes=i,null}function Gr(e,t){return t=Yr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bm(e,t,n){return wl(t,e.child,null,n),e=Gr(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function hb(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(l.mode==="hidden")return e=Gr(t,l),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},fi(null,e);if(Hc(t),(e=tt)?(e=dp(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Jn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Nh(e),n.return=t,t.child=n,kt=t,tt=null)):e=null,e===null)throw La(t);return t.lanes=536870912,null}return Gr(t,l)}var r=e.memoizedState;if(r!==null){var f=r.dehydrated;if(Hc(t),i)if(t.flags&256)t.flags&=-257,t=Bm(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(pt||gl(e,t,n,!1),i=(n&e.childLanes)!==0,pt||i){if(Ya.current===null){if(l=et,l!==null&&(f=kf(l,n),f!==0&&f!==r.retryLane))throw r.retryLane=f,hl(e,f),tn(l,e,f),su;ro()}t=Bm(e,t,n)}else e=r.treeContext,tt=zn(f.nextSibling),kt=t,_e=!0,Oa=null,Cn=!1,e!==null&&kh(t,e),t=Gr(t,l),t.flags|=134221824;return t}return e=ma(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ls(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(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function iu(e,t,n,l,i){return yl(t),n=Gc(e,t,n,l,void 0,i),l=Yc(),e!==null&&!pt?($c(e,t,i),ba(e,t,i)):(_e&&l&&vr(t),t.flags|=1,vt(e,t,n,i),t.child)}function qm(e,t,n,l,i,r){return yl(t),t.updateQueue=null,n=$h(t,l,n,i),Yh(e),l=Yc(),e!==null&&!pt?($c(e,t,r),ba(e,t,r)):(_e&&l&&vr(t),t.flags|=1,vt(e,t,n,r),t.child)}function Gm(e,t,n,l,i){if(yl(t),t.stateNode===null){var r=Kl,f=n.contextType;typeof f=="object"&&f!==null&&(r=Rt(f)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=au,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},Dc(t),f=n.contextType,r.context=typeof f=="object"&&f!==null?Rt(f):Kl,r.state=t.memoizedState,f=n.getDerivedStateFromProps,typeof f=="function"&&(nu(t,n,f,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(f=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),f!==r.state&&au.enqueueReplaceState(r,r.state,null),ri(t,l,r,i),ii(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var v=t.memoizedProps,w=kl(n,v);r.props=w;var L=r.context,Y=n.contextType;f=Kl,typeof Y=="object"&&Y!==null&&(f=Rt(Y));var K=n.getDerivedStateFromProps;Y=typeof K=="function"||typeof r.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,Y||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(v||L!==f)&&Cm(t,r,l,f),Ba=!1;var D=t.memoizedState;r.state=D,ri(t,l,r,i),ii(),L=t.memoizedState,v||D!==L||Ba?(typeof K=="function"&&(nu(t,n,K,l),L=t.memoizedState),(w=Ba||Tm(t,n,w,l,D,L,f))?(Y||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=L),r.props=l,r.state=L,r.context=f,l=w):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,_c(e,t),f=t.memoizedProps,Y=kl(n,f),r.props=Y,K=t.pendingProps,D=r.context,L=n.contextType,w=Kl,typeof L=="object"&&L!==null&&(w=Rt(L)),v=n.getDerivedStateFromProps,(L=typeof v=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(f!==K||D!==w)&&Cm(t,r,l,w),Ba=!1,D=t.memoizedState,r.state=D,ri(t,l,r,i),ii();var q=t.memoizedState;f!==K||D!==q||Ba||e!==null&&e.dependencies!==null&&Nr(e.dependencies)?(typeof v=="function"&&(nu(t,n,v,l),q=t.memoizedState),(Y=Ba||Tm(t,n,Y,l,D,q,w)||e!==null&&e.dependencies!==null&&Nr(e.dependencies))?(L||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,q,w),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,q,w)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=q),r.props=l,r.state=q,r.context=w,l=Y):(typeof r.componentDidUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,ls(e,t),l=(t.flags&128)!==0,r||l?(r=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&l?(t.child=wl(t,e.child,null,i),t.child=wl(t,null,n,i)):vt(e,t,n,i),t.memoizedState=r.state,e=t.child):e=ba(e,t,i),e}function Ym(e,t,n,l){return xl(),t.flags|=256,vt(e,t,n,l),t.child}var ru={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ou(e){return{baseLanes:e,cachePool:Ah()}}function cu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function $m(e,t,n){var l=t.pendingProps,i=!1,r=(t.flags&128)!==0,f;if((f=r)||(f=e!==null&&e.memoizedState===null?!1:(Dt.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(i?$a(t):Va(),(e=tt)?(e=dp(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ma!==null?{id:Jn,overflow:Pn}:null,retryLane:536870912,hydrationErrors:null},n=Nh(e),n.return=t,t.child=n,kt=t,tt=null)):e=null,e===null)throw La(t);return od(e)?t.lanes=32:t.lanes=536870912,null}return r=l.children,l=l.fallback,i?(Va(),i=t.mode,r=Yr({mode:"hidden",children:r},i),l=ml(l,i,n,null),r.return=t,l.return=t,r.sibling=l,t.child=r,l=t.child,l.memoizedState=ou(n),l.childLanes=cu(e,f,n),t.memoizedState=ru,fi(null,l)):($a(t),uu(t,r))}var v=e.memoizedState;if(v!==null){var w=v.dehydrated;if(w!==null)return mb(e,t,r,f,l,w,v,n)}return i?(Va(),i=l.fallback,r=t.mode,v=e.child,w=v.sibling,l=ma(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&1206910976,w!==null?i=ma(w,i):(i=ml(i,r,n,null),i.flags|=2),i.return=t,l.return=t,l.sibling=i,t.child=l,fi(null,l),l=t.child,i=e.child.memoizedState,i===null?i=ou(n):(r=i.cachePool,r!==null?(v=mt._currentValue,r=r.parent!==v?{parent:v,pool:v}:r):r=Ah(),i={baseLanes:i.baseLanes|n,cachePool:r}),l.memoizedState=i,l.childLanes=cu(e,f,n),t.memoizedState=ru,fi(e.child,l)):($a(t),n=e.child,e=n.sibling,n=ma(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=n,t.memoizedState=null,n)}function uu(e,t){return t=Yr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yr(e,t){return e=Ft(22,e,null,t),e.lanes=0,e}function $r(e,t,n){return wl(t,e.child,null,n),e=uu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mb(e,t,n,l,i,r,f,v){if(n)return t.flags&256?($a(t),t.flags&=-257,$r(e,t,v)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,null):(Va(),r=i.fallback,f=t.mode,i=Yr({mode:"visible",children:i.children},f),r=ml(r,f,v,null),r.flags|=2,i.return=t,r.return=t,i.sibling=r,t.child=i,wl(t,e.child,null,v),i=t.child,i.memoizedState=ou(v),i.childLanes=cu(e,l,v),t.memoizedState=ru,fi(null,i));if($a(t),od(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var w=l.dgst;return l=w,l!==""&&(i=Error(u(419)),i.stack="",i.digest=l,ei({value:i,source:null,stack:null})),$r(e,t,v)}if(pt||gl(e,t,v,!1),l=(v&e.childLanes)!==0,pt||l){if(Ya.current!==null)return $r(e,t,v);if(l=et,l!==null&&(i=kf(l,v),i!==0&&i!==f.retryLane))throw f.retryLane=i,hl(e,i),tn(l,e,i),su;return rd(r)||ro(),$r(e,t,v)}return rd(r)?(t.flags|=192,t.child=e.child,null):(e=f.treeContext,tt=zn(r.nextSibling),kt=t,_e=!0,Oa=null,Cn=!1,e!==null&&kh(t,e),t=uu(t,i.children),t.flags|=134221824,t)}function Vm(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),jr(e.return,t,n)}function Xm(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Rr(n)===null&&(t=e),e=e.sibling}return t}function Vr(e,t,n,l,i,r){var f=e.memoizedState;f===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:r}:(f.isBackwards=t,f.rendering=null,f.renderingStartTime=0,f.last=l,f.tail=n,f.tailMode=i,f.treeForkCount=r)}function du(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function fu(e,t,n){var l=t.pendingProps,i=l.revealOrder,r=l.tail;l=l.children;var f=Dt.current;if(t.flags&128)return oi(t,f),null;var v=(f&2)!==0;if(v?(f=f&1|2,t.flags|=128):f&=1,oi(t,f),i==="backwards"&&e!==null?(du(e),vt(e,t,l,n),du(e)):vt(e,t,l,n),l=_e?Ws:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Vm(e,n,t);else if(e.tag===19)Vm(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"backwards":n=Xm(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,du(t)),Vr(t,!0,i,null,r,l);break;case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Rr(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Vr(t,!0,n,null,r,l);break;case"together":Vr(t,!1,null,null,void 0,l);break;case"independent":t.memoizedState=null;break;default:n=Xm(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Vr(t,!1,i,n,r,l)}return t.child}function Zm(e,t,n){var l=t.pendingProps;return Ua(t,t.type,l.value),vt(e,t,l.children,n),t.child}function ba(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(gl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=ma(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ma(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Nr(e)))}function xb(e,t,n){switch(t.tag){case 3:Qn(t,t.stateNode.containerInfo),Ua(t,mt,e.memoizedState.cache),xl();break;case 27:case 5:V(t);break;case 4:Qn(t,t.stateNode.containerInfo);break;case 10:Ua(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hc(t),null;break;case 13:var l=t.memoizedState;if(l!==null){if(l.dehydrated!==null)return $a(t),t.flags|=128,null;l=gl(e,t,n,!1);var i=t.child.childLanes;return l||(n&i)!==0?$m(e,t,n):($a(t),e=ba(e,t,n),e!==null?e.sibling:null)}$a(t);break;case 19:if(t.flags&128)return fu(e,t,n);if(i=(e.flags&128)!==0,l=(n&t.childLanes)!==0,l||(gl(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return fu(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oi(t,Dt.current),l)break;return null;case 22:return t.lanes=0,Um(e,t,n,t.pendingProps);case 24:Ua(t,mt,e.memoizedState.cache)}return ba(e,t,n)}function Qm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!hu(e,n)&&(t.flags&128)===0)return pt=!1,xb(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,_e&&(t.flags&1048576)!==0&&Sh(t,Ws,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=jl(t.elementType),t.type=e,typeof e=="function")bc(e)?(l=kl(e,l),t.tag=1,t=Gm(null,t,e,l,n)):(t.tag=0,t=iu(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=Mm(null,t,e,l,n);break e}else if(i===ie){t.tag=14,t=Om(null,t,e,l,n);break e}else if(i===F){t.tag=10,t.type=e,t=Zm(null,t,n);break e}}throw t=Ce(e)||e,Error(u(306,t,""))}}return t;case 0:return iu(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=kl(l,t.pendingProps),Gm(e,t,l,i,n);case 3:e:{if(Qn(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var r=t.memoizedState;i=r.element,_c(e,t),ri(t,l,null,n);var f=t.memoizedState;if(l=f.cache,Ua(t,mt,l),l!==r.cache&&Cc(t,[mt],n,!0),ii(),l=f.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Ym(e,t,l,n);break e}else if(l!==i){i=Sn(Error(u(424)),t),ei(i),t=Ym(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(tt=zn(e.firstChild),kt=t,_e=!0,Oa=null,Cn=!0,n=Uh(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(xl(),l===i){t=ba(e,t,n);break e}vt(e,t,l,n)}t=t.child}return t;case 26:return ls(e,t),e===null?(n=yp(t.type,null,t.pendingProps,null))?t.memoizedState=n:_e||(t.stateNode=Fx(t.type,t.pendingProps,Kt.current,t)):t.memoizedState=yp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return V(t),e===null&&_e&&(l=t.stateNode=mp(t.type,t.pendingProps,Kt.current),kt=t,Cn=!0,i=tt,Ia(t.type)?(cd=i,tt=zn(l.firstChild)):tt=i),vt(e,t,t.pendingProps.children,n),ls(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((i=l=tt)&&(l=c0(l,t.type,t.pendingProps,Cn),l!==null?(t.stateNode=l,kt=t,tt=zn(l.firstChild),Cn=!1,i=!0):i=!1),i||La(t)),V(t),i=t.type,r=t.pendingProps,f=e!==null?e.memoizedProps:null,l=r.children,ed(i,r)?l=null:f!==null&&ed(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Gc(e,t,lb,null,null,n),Ns._currentValue=i),ls(e,t),vt(e,t,l,n),t.child;case 6:return e===null&&_e&&((e=n=tt)&&(n=u0(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,kt=t,tt=null,e=!0):e=!1),e||La(t)),null;case 13:return $m(e,t,n);case 4:return Qn(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=wl(t,null,l,n):vt(e,t,l,n),t.child;case 11:return Mm(e,t,t.type,t.pendingProps,n);case 7:return l=t.pendingProps,ls(e,t),vt(e,t,l,n),t.child;case 8:return vt(e,t,t.pendingProps.children,n),t.child;case 12:return vt(e,t,t.pendingProps.children,n),t.child;case 10:return Zm(e,t,n);case 9:return i=t.type._context,l=t.pendingProps.children,yl(t),i=Rt(i),l=l(i),t.flags|=1,vt(e,t,l,n),t.child;case 14:return Om(e,t,t.type,t.pendingProps,n);case 15:return Lm(e,t,t.type,t.pendingProps,n);case 19:return fu(e,t,n);case 31:return hb(e,t,n);case 22:return Um(e,t,n,t.pendingProps);case 24:return yl(t),l=Rt(mt),e===null?(i=Rc(),i===null&&(i=et,r=Ec(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),t.memoizedState={parent:l,cache:i},Dc(t),Ua(t,mt,i)):((e.lanes&n)!==0&&(_c(e,t),ri(t,null,null,n),ii()),i=e.memoizedState,r=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ua(t,mt,l)):(l=r.cache,Ua(t,mt,l),l!==i.cache&&Cc(t,[mt],n,!0))),vt(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),l=t.pendingProps,l.name!=null&&l.name!=="auto"?t.flags|=e===null?18882560:18874368:_e&&vr(t),e!==null&&e.memoizedProps.name!==l.name?t.flags|=4194816:ls(e,t),vt(e,t,l.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function ja(e){e.flags|=4}function mu(e,t,n,l,i){var r;if((r=(e.mode&32)!==0)&&(r=n===null?Np(t,l):Np(t,l)&&(l.src!==n.src||l.srcSet!==n.srcSet)),r){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Ex())e.flags|=8192;else throw Nl=Tr,Ac}else e.flags&=-16777217}function Km(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!wp(t))if(Ex())e.flags|=8192;else throw Nl=Tr,Ac}function Xr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Nf():536870912,e.lanes|=t,cs|=t)}function hi(e,t){if(!_e)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&1206910976,l|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function pb(e,t,n){var l=t.pendingProps;switch(wc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ga(mt),ln(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?ja(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,kc())),nt(t),null;case 26:var i=t.type,r=t.memoizedState;return e===null?(ja(t),r!==null?(nt(t),Km(t,r)):(nt(t),mu(t,i,null,l,n))):r?r!==e.memoizedState?(ja(t),nt(t),Km(t,r)):(nt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ja(t),nt(t),mu(t,i,e,l,n)),null;case 27:if(pe(t),n=Kt.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ja(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return nt(t),t.subtreeFlags&=-33554433,null}e=Ut.current,Fl(t)?Th(t):(e=mp(i,l,n),t.stateNode=e,ja(t))}return nt(t),t.subtreeFlags&=-33554433,null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ja(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return nt(t),t.subtreeFlags&=-33554433,null}if(r=Ut.current,Fl(t))Th(t);else{var f=Si(Kt.current);switch(r){case 1:r=f.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:r=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":r=f.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":r=f.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":r=f.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?f.createElement(i,{is:l.is}):f.createElement(i)}}r[zt]=t,r[Pt]=l;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)r.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=r;e:switch(Mt(r,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ja(t)}}return nt(t),t.subtreeFlags&=-33554433,mu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ja(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Kt.current,Fl(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=kt,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[zt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Qx(e.nodeValue,n)),e||La(t,!0)}else e=Si(e).createTextNode(l),e[zt]=t,t.stateNode=e}return nt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Fl(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[zt]=t}else xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),e=!1}else n=kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return nt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Fl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[zt]=t}else xl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),i=!1}else i=kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Xr(t,t.updateQueue),nt(t),null);case 4:return ln(),e===null&&Ju(t.stateNode.containerInfo),t.flags|=67108864,nt(t),null;case 10:return ga(t.type),nt(t),null;case 19:if(Bc(t),l=t.memoizedState,l===null)return nt(t),null;if(i=(t.flags&128)!==0,r=l.rendering,r===null)if(i)hi(l,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Rr(e),r!==null){for(t.flags|=128,hi(l,!1),e=r.updateQueue,t.updateQueue=e,Xr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)jh(n,e),n=n.sibling;return oi(t,Dt.current&1|2),_e&&xa(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&rn()>ao&&(t.flags|=128,i=!0,hi(l,!1),t.lanes=4194304)}else{if(!i)if(e=Rr(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Xr(t,e),hi(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!r.alternate&&!_e)return nt(t),null}else 2*rn()-l.renderingStartTime>ao&&n!==536870912&&(t.flags|=128,i=!0,hi(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}if(l.tail!==null){e=l.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return l.rendering=e,l.tail=e.sibling,l.renderingStartTime=rn(),e.sibling=null,r=Dt.current,r=i?r&1|2:r&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||_e?oi(t,r):(n=r,Le(At,t),Le(Dt,n),Bt===null&&(Bt=t)),_e&&xa(t,l.treeForkCount),e}return nt(t),null;case 22:case 23:return fn(t),Uc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),n=t.updateQueue,n!==null&&Xr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&rt(bl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ga(mt),nt(t),null;case 25:return null;case 30:return t.flags|=33554432,nt(t),null}throw Error(u(156,t.tag))}function gb(e,t){switch(wc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(mt),ln(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(u(340));xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Bc(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ln(),null;case 10:return ga(t.type),null;case 22:case 23:return fn(t),Uc(),e!==null&&rt(bl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(mt),null;case 25:return null;default:return null}}function Jm(e,t){switch(wc(t),t.tag){case 3:ga(mt),ln();break;case 26:case 27:case 5:pe(t);break;case 4:ln();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:Bc(t);break;case 10:ga(t.type);break;case 22:case 23:fn(t),Uc(),e!==null&&rt(bl);break;case 24:ga(mt)}}function mi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var r=n.create,f=n.inst;l=r(),f.destroy=l}n=n.next}while(n!==i)}}catch(v){Je(t,t.return,v)}}function Xa(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var r=i.next;l=r;do{if((l.tag&e)===e){var f=l.inst,v=f.destroy;if(v!==void 0){f.destroy=void 0,i=t;var w=n,L=v;try{L()}catch(Y){Je(i,w,Y)}}}l=l.next}while(l!==r)}}catch(Y){Je(t,t.return,Y)}}function Pm(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Bh(t,n)}catch(l){Je(e,e.return,l)}}}function Fm(e,t,n){n.props=kl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Je(e,t,l)}}function Fn(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:var i=e.stateNode,r=fa(e.memoizedProps,i);(i.ref===null||i.ref.name!==r)&&(i.ref=lp(r)),l=i.ref;break;case 7:if(e.stateNode===null){var f=new gn(e);y(e.child,!1,r0,f,void 0,void 0),e.stateNode=f}l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(v){Je(e,t,v)}}function _t(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Je(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Je(e,t,i)}else n.current=null}function Zr(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)up(e.stateNode,t[n])}function Im(e){for(var t=e.return;t!==null&&(pu(t)&&up(e.stateNode,t.stateNode),!xu(t));)t=t.return}function xi(e){for(var t=e.return;t!==null&&(pu(t)&&o0(e.stateNode,t.stateNode),!xu(t));)t=t.return}function xu(e){return e.tag===5||e.tag===3||e.tag===27}function pu(e){return e&&e.tag===7&&e.stateNode!==null}function gu(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Je(e,e.return,i)}}function yu(e,t,n){try{var l=e.stateNode;$b(l,e.type,n,t),l[Pt]=t}catch(i){Je(e,e.return,i)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ia(e.type)||e.tag===4}function vu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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&&Ia(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bu(e,t,n,l){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kn)),Zr(e,l),Ye=!0;else if(i!==4&&(i===27&&(Zr(e,l),l=null,Ia(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(bu(e,t,n,l),e=e.sibling;e!==null;)bu(e,t,n,l),e=e.sibling}function Qr(e,t,n,l){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Zr(e,l),Ye=!0;else if(i!==4&&(i===27&&(Zr(e,l),l=null,Ia(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Qr(e,t,n,l),e=e.sibling;e!==null;)Qr(e,t,n,l),e=e.sibling}function ex(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Mt(t,l,n),t[zt]=e,t[Pt]=n}catch(r){Je(e,e.return,r)}}var Kr=!1,hn=null;function tx(e){(e.tag===30||(e.subtreeFlags&33554432)!==0)&&(Kr=!0)}var In=null;function nx(){var e=In;return In=null,e}var It=0;function ss(e,t,n,l,i){return It=0,ax(e.child,t,n,l,i)}function ax(e,t,n,l,i){for(var r=!1;e!==null;){if(e.tag===5){var f=e.stateNode;if(l!==null){var v=ad(f);l.push(v),v.view&&(r=!0)}else r||ad(f).view&&(r=!0);Kr=!0,np(f,It===0?t:t+"_"+It,n),It++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||ax(e.child,t,n,l,i)&&(r=!0));e=e.sibling}return r}function Wn(e,t){for(;e!==null;)e.tag===5?ap(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Wn(e.child,t)),e=e.sibling}function Jr(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Jr(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(u(544));var n=t.name;t=ha(t.default,t.share),t!=="none"&&(ss(e,n,t,null,!1)||Wn(e.child,!1))}e=e.sibling}}function ju(e,t){if(e.tag===30){var n=e.stateNode,l=e.memoizedProps,i=fa(l,n),r=ha(l.default,n.paired?l.share:l.enter);r!=="none"?ss(e,i,r,null,!1)?(Jr(e),n.paired||t||hs(e,l.onEnter)):Wn(e.child,!1):Jr(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)ju(e,t),e=e.sibling;else Jr(e)}function Nu(e){if(hn!==null&&hn.size!==0){var t=hn;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,l=n.name;if(l!=null&&l!=="auto"){var i=t.get(l);if(i!==void 0){var r=ha(n.default,n.share);if(r!=="none"&&(ss(e,l,r,null,!1)?(r=e.stateNode,i.paired=r,r.paired=i,hs(e,n.onShare)):Wn(e.child,!1)),t.delete(l),t.size===0)break}}}Nu(e)}e=e.sibling}}}function wu(e){if(e.tag===30){var t=e.memoizedProps,n=fa(t,e.stateNode),l=hn!==null?hn.get(n):void 0,i=ha(t.default,l!==void 0?t.share:t.exit);i!=="none"&&(ss(e,n,i,null,!1)?l!==void 0?(i=e.stateNode,l.paired=i,i.paired=l,hn.delete(n),hs(e,t.onShare)):hs(e,t.onExit):Wn(e.child,!1)),hn!==null&&Nu(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)wu(e),e=e.sibling;else hn!==null&&Nu(e)}function lx(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=fa(t,e.stateNode);t=ha(t.default,t.update),e.flags&=-5,t!=="none"&&ss(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&lx(e);e=e.sibling}}function Su(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wn(e.child,!1))}Su(e)}e=e.sibling}}function Pr(e){if(e.tag===30)e.stateNode.paired=null,Wn(e.child,!1),Su(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Pr(e),e=e.sibling;else Su(e)}function sx(e){for(e=e.child;e!==null;)e.tag===30?Wn(e.child,!1):(e.subtreeFlags&33554432)!==0&&sx(e),e=e.sibling}function ku(e,t,n,l,i,r,f){for(var v=!1;t!==null;){if(t.tag===5){var w=t.stateNode;if(r!==null&&It<r.length){var L=r[It],Y=ad(w);(L.view||Y.view)&&(v=!0);var K;if(K=(e.flags&4)===0)if(Y.clip)K=!0;else{K=L.rect;var D=Y.rect;K=K.y!==D.y||K.x!==D.x||K.height!==D.height||K.width!==D.width}K&&(e.flags|=4),Y.abs?Y=!L.abs:(L=L.rect,Y=Y.rect,Y=L.height!==Y.height||L.width!==Y.width),Y&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&np(w,It===0?n:n+"_"+It,i),v&&(e.flags&4)!==0||(In===null&&(In=[]),In.push(w,It===0?l:l+"_"+It,t.memoizedProps)),It++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&f?e.flags|=t.flags&32:ku(e,t.child,n,l,i,r,f)&&(v=!0));t=t.sibling}return v}function ix(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,l=e.stateNode,i=fa(n,l),r=ha(n.default,n.update),f;f=e.memoizedState,e.memoizedState=null,l=e;var v=e.child;It=0,i=ku(l,v,i,i,r,f,!1),(e.flags&4)!==0&&i&&hs(e,n.onUpdate)}else(e.subtreeFlags&33554432)!==0&&ix(e);e=e.sibling}}var Tt=!1,Xe=!1,ea=!1,Tu=!1,rx=typeof WeakSet=="function"?WeakSet:Set,Ct=null,ta=!1,pi=!1,Fr=!1,Cu=!1;function yb(e,t,n){if(e=e.containerInfo,Iu=ws,e=dh(e),hc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var i=l.getSelection&&l.getSelection();if(i&&i.rangeCount!==0){l=i.anchorNode;var r=i.anchorOffset,f=i.focusNode;i=i.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var v=0,w=-1,L=-1,Y=0,K=0,D=e,q=null;t:for(;;){for(var se;D!==l||r!==0&&D.nodeType!==3||(w=v+r),D!==f||i!==0&&D.nodeType!==3||(L=v+i),D.nodeType===3&&(v+=D.nodeValue.length),(se=D.firstChild)!==null;)q=D,D=se;for(;;){if(D===e)break t;if(q===l&&++Y===r&&(w=v),q===f&&++K===i&&(L=v),(se=D.nextSibling)!==null)break;D=q,q=D.parentNode}D=se}l=w===-1||L===-1?null:{start:w,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(Wu={focusedElem:e,selectionRange:l},ws=!1,n=(n&335544064)===n,Ct=t,t=n?9270:1024;Ct!==null;){if(e=Ct,n&&(l=e.deletions,l!==null))for(r=0;r<l.length;r++)n&&wu(l[r]);if(e.alternate===null&&(e.flags&2)!==0)n&&tx(e),Ir(n);else{if(e.tag===22){if(l=e.alternate,e.memoizedState!==null){l!==null&&l.memoizedState===null&&n&&wu(l),Ir(n);continue}else if(l!==null&&l.memoizedState!==null){n&&tx(e),Ir(n);continue}}l=e.child,(e.subtreeFlags&t)!==0&&l!==null?(l.return=e,Ct=l):(n&&lx(e),Ir(n))}}hn=null}function Ir(e){for(;Ct!==null;){var t=Ct,n=e,l=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if((i&1024)!==0&&l!==null){n=void 0,i=l.memoizedProps,l=l.memoizedState;var r=t.stateNode;try{var f=kl(t.type,i);n=r.getSnapshotBeforeUpdate(f,l),r.__reactInternalSnapshotBeforeUpdate=n}catch(v){Je(t,t.return,v)}}break;case 3:if((i&1024)!==0){if(l=t.stateNode.containerInfo,n=l.nodeType,n===9)id(l);else if(n===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":id(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&l!==null&&(n=fa(l.memoizedProps,l.stateNode),i=t.memoizedProps,i=ha(i.default,i.update),i!=="none"&&ss(l,n,i,l.memoizedState=[],!0));break;default:if((i&1024)!==0)throw Error(u(163))}if(l=t.sibling,l!==null){l.return=t.return,Ct=l;break}Ct=t.return}}function ox(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:na(e,n),l&4&&mi(5,n);break;case 1:if(na(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(f){Je(n,n.return,f)}else{var i=kl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Je(n,n.return,f)}}l&64&&Pm(n),l&512&&Fn(n,n.return);break;case 3:if(na(e,n),l&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{Bh(e,t)}catch(f){Je(n,n.return,f)}}break;case 27:t===null&&l&4&&ex(n);case 26:case 5:na(e,n),t===null&&l&4&&gu(n),l&512&&Fn(n,n.return);break;case 12:na(e,n);break;case 31:na(e,n),l&4&&fx(e,n);break;case 13:na(e,n),l&4&&hx(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Rb.bind(null,n),d0(e,n))));break;case 22:if(l=n.memoizedState!==null||Tt,!l){var r=t!==null&&t.memoizedState!==null||Xe;t=Tt,i=Xe,Tt=l,(Xe=r)&&!i?(l=2,(n.subtreeFlags&8772)!==0&&(l|=1),qn(e,n,l)):na(e,n),Tt=t,Xe=i}break;case 30:na(e,n),l&512&&Fn(n,n.return);break;case 7:l&512&&Fn(n,n.return);default:na(e,n)}}function Eu(e,t){for(e=e.child;e!==null;)cx(e,t),e=e.sibling}function cx(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var l=n.style;typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none"}else{var i=e.stateNode,r=e.memoizedProps.style,f=r!=null&&r.hasOwnProperty("display")?r.display:null;i.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(w){Je(e,e.return,w)}zu(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ye=!0}catch(w){Je(e,e.return,w)}break;case 18:try{var v=e.stateNode;t?tp(v,!0):tp(e.stateNode,!1)}catch(w){Je(e,e.return,w)}break;case 22:case 23:e.memoizedState===null&&Eu(e,t);break;default:Eu(e,t)}}function zu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,l=t;switch(n.tag){case 4:cx(n,l);break e;case 22:n.memoizedState===null&&zu(n,l);break e;default:zu(n,l)}}e=e.sibling}}function ux(e){var t=e.alternate;t!==null&&(e.alternate=null,ux(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ar(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 lt=null,Wt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)dx(e,t,n),n=n.sibling}function dx(e,t,n){if(on&&typeof on.onCommitFiberUnmount=="function")try{on.onCommitFiberUnmount(Bs,n)}catch{}switch(n.tag){case 26:Xe||_t(n,t),Hn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Xe&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Xe||_t(n,t),xi(n);var l=lt,i=Wt;Ia(n.type)&&(lt=n.stateNode,Wt=!1),Hn(e,t,n),xp(n.stateNode,n.type,n.memoizedProps),lt=l,Wt=i;break;case 5:Xe||_t(n,t),xi(n);case 6:if(n.tag===6&&xi(n),l=lt,i=Wt,lt=null,Hn(e,t,n),lt=l,Wt=i,lt!==null)if(Wt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(n.stateNode),Ye=!0}catch(r){Je(n,t,r)}else try{lt.removeChild(n.stateNode),Ye=!0}catch(r){Je(n,t,r)}break;case 18:lt!==null&&(Wt?(e=lt,ep(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ss(e)):ep(lt,n.stateNode));break;case 4:l=lt,i=Wt,lt=n.stateNode.containerInfo,Wt=!0,Hn(e,t,n),lt=l,Wt=i;break;case 0:case 11:case 14:case 15:Xa(2,n,t),Xe||Xa(4,n,t),Hn(e,t,n);break;case 1:Xe||(_t(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Fm(n,t,l)),Hn(e,t,n);break;case 21:Hn(e,t,n);break;case 22:Xe=(l=Xe)||n.memoizedState!==null,Hn(e,t,n),Xe=l;break;case 30:_t(n,t),Hn(e,t,n);break;case 7:Xe||_t(n,t),Hn(e,t,n);break;default:Hn(e,t,n)}}function fx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ss(e)}catch(n){Je(t,t.return,n)}}}function hx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ss(e)}catch(n){Je(t,t.return,n)}}function vb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rx),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rx),t;default:throw Error(u(435,e.tag))}}function Wr(e,t){var n=vb(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=Ab.bind(null,e,l);l.then(i,i)}})}function Xt(e,t,n){var l=t.deletions;if(l!==null)for(var i=0;i<l.length;i++){var r=l[i],f=e,v=t,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Ia(w.type)){lt=w.stateNode,Wt=!1;break e}break;case 5:lt=w.stateNode,Wt=!1;break e;case 3:case 4:lt=w.stateNode.containerInfo,Wt=!0;break e}w=w.return}if(lt===null)throw Error(u(160));dx(f,v,r),lt=null,Wt=!1,f=r.alternate,f!==null&&(f.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mx(t,e,n),t=t.sibling}var Bn=null;function mx(e,t,n){var l=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(i&4&&(l=e.updateQueue,l=l!==null?l.events:null,l!==null))for(var r=0;r<l.length;r++){var f=l[r];f.ref.impl=f.nextImpl}Xt(t,e,n),Zt(e),i&4&&(Xa(3,e,e.return),mi(3,e),Xa(5,e,e.return));break;case 1:Xt(t,e,n),Zt(e),i&512&&(Xe||l===null||_t(l,l.return)),i&64&&Tt&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(r=Bn,Xt(t,e,n),Zt(e),i&512&&(Xe||l===null||_t(l,l.return)),i&4)if(i=l!==null?l.memoizedState:null,n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null)if(Tt)e.stateNode=Fx(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,i=r.ownerDocument||r;t:switch(t){case"title":l=i.getElementsByTagName("title")[0],(!l||l[Ys]||l[zt]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))&&(l=i.createElement(t),i.head.insertBefore(l,i.querySelector("head > title"))),Mt(l,t,n),l[zt]=e,St(l),t=l;break e;case"link":if(r=jp("link","href",i).get(t+(n.href||""))){for(f=0;f<r.length;f++)if(l=r[f],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(f,1);break t}}l=i.createElement(t),Mt(l,t,n),i.head.appendChild(l);break;case"meta":if(r=jp("meta","content",i).get(t+(n.content||""))){for(f=0;f<r.length;f++)if(l=r[f],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(f,1);break t}}l=i.createElement(t),Mt(l,t,n),i.head.appendChild(l);break;default:throw Error(u(468,t))}l[zt]=e,St(l),t=l}e.stateNode=t}else Tt||hd(r,e.type,e.stateNode);else e.stateNode=bp(r,n,e.memoizedProps);else i!==n?(i===null?(t=l.stateNode,t===null||Xe||t.parentNode.removeChild(t)):i.count--,n===null?Tt||hd(r,e.type,e.stateNode):bp(r,n,e.memoizedProps)):n===null&&e.stateNode!==null&&yu(e,e.memoizedProps,l.memoizedProps);break;case 27:Xt(t,e,n),Zt(e),i&512&&(Xe||l===null||_t(l,l.return)),l!==null&&i&4&&yu(e,e.memoizedProps,l.memoizedProps);break;case 5:if(r=ea,ea=!1,Xt(t,e,n),ea=r,Zt(e),i&512&&(Xe||l===null||_t(l,l.return)),e.flags&32){t=e.stateNode;try{Gl(t,""),Ye=!0}catch(Y){Je(e,e.return,Y)}}i&4&&e.stateNode!=null&&(t=e.memoizedProps,yu(e,t,l!==null?l.memoizedProps:t)),i&1024&&(Tu=!0);break;case 6:if(Xt(t,e,n),Zt(e),i&4){if(e.stateNode===null)throw Error(u(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ye=!0}catch(Y){Je(e,e.return,Y)}}break;case 3:if(Ye=!1,xo=null,r=Bn,Bn=ki(t.containerInfo),Xt(t,e,n),Bn=r,Zt(e),i&4&&l!==null&&l.memoizedState.isDehydrated)try{Ss(t.containerInfo)}catch(Y){Je(e,e.return,Y)}Tu&&(Tu=!1,xx(e)),Ye=!1;break;case 4:i=ea,ea=Tt,l=Of(),r=Bn,Bn=ki(e.stateNode.containerInfo),Xt(t,e,n),Zt(e),Bn=r,Ye&&pi&&(Fr=!0),Ye=l,ea=i;break;case 12:Xt(t,e,n),Zt(e);break;case 31:Xt(t,e,n),Zt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wr(e,t)));break;case 13:Xt(t,e,n),Zt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(no=rn()),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wr(e,t)));break;case 22:r=e.memoizedState!==null,f=l!==null&&l.memoizedState!==null;var v=Tt,w=Xe,L=ea;Tt=v||r,ea=L||r,Xe=w||f,Xt(t,e,n),Xe=w,ea=L,Tt=v,Zt(e),i&8192&&(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,!r||l===null||f||Tt||Xe||(t=f||Xe,n=Tt,l=Xe,Tt=r||Tt,Xe=t,Za(e,2),Tt=n,Xe=l),!r&&ea||Eu(e,r)),i&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Wr(e,n))));break;case 19:Xt(t,e,n),Zt(e),i&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Wr(e,t)));break;case 30:i&512&&(Xe||l===null||_t(l,l.return)),i=Of(),r=pi,f=(n&335544064)===n,v=e.memoizedProps,pi=f&&ha(v.default,v.update)!=="none",Xt(t,e,n),Zt(e),f&&l!==null&&Ye&&(e.flags|=4),pi=r,Ye=i;break;case 21:break;case 7:i&512&&(Xe||l===null||_t(l,l.return)),l&&l.stateNode!==null&&(l.stateNode._fragmentFiber=e);default:Xt(t,e,n),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Wm(l)){n=l;break}l=l.return}l=null;for(var i=e.return;i!==null;){if(pu(i)){var r=i.stateNode;l===null?l=[r]:l.push(r)}if(xu(i))break;i=i.return}var f=l;if(n==null)throw Error(u(160));switch(n.tag){case 27:var v=n.stateNode,w=vu(e);Qr(e,w,v,f);break;case 5:var L=n.stateNode;n.flags&32&&(Gl(L,""),n.flags&=-33);var Y=vu(e);Qr(e,Y,L,f);break;case 3:case 4:var K=n.stateNode.containerInfo,D=vu(e);bu(e,D,K,f);break;default:throw Error(u(161))}}catch(q){Je(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xx(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ws=!0,t.reset(),ws=!1),e=e.sibling}}function is(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)px(t,e),t=t.sibling;else ix(t)}function px(e,t){var n=e.alternate;if(n===null)ju(e,!1);else switch(e.tag){case 3:if(Cu=ta=!1,nx(),is(t,e),!ta&&!Fr){if(e=In,e!==null)for(var l=0;l<e.length;l+=3){n=e[l];var i=e[l+1];ap(n,e[l+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+i+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Cu=!0}In=null;break;case 5:is(t,e);break;case 4:l=ta,ta=!1,is(t,e),ta&&(Fr=!0),ta=l;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?ju(e,!1):is(t,e));break;case 30:l=ta,i=nx(),ta=!1,is(t,e),ta&&(e.flags|=4);var r=e.memoizedProps,f=e.stateNode;t=fa(r,f),f=fa(n.memoizedProps,f);var v=ha(r.default,r.update);v==="none"?t=!1:(r=n.memoizedState,n.memoizedState=null,n=e.child,It=0,t=ku(e,n,t,f,v,r,!0),It!==(r===null?0:r.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(hs(e,e.memoizedProps.onUpdate),In=i):i!==null&&(i.push.apply(i,In),In=i),ta=(e.flags&32)!==0?!0:l;break;default:is(t,e)}}function na(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ox(e,t.alternate,t),t=t.sibling}function Za(e,t){for(e=e.child;e!==null;){var n=e,l=t;switch(n.tag){case 0:case 11:case 14:case 15:Xa(4,n,n.return),Za(n,l);break;case 1:_t(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Fm(n,n.return,i),Za(n,l);break;case 27:(l&2)!==0&&xp(n.stateNode,n.type,n.memoizedProps);case 5:_t(n,n.return),n.tag!==5&&n.tag!==27||xi(n),Za(n,l);break;case 6:xi(n);break;case 26:_t(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||Xe||i.parentNode.removeChild(i),Za(n,l);break;case 22:n.memoizedState===null&&Za(n,l);break;case 30:_t(n,n.return),Za(n,l);break;case 7:_t(n,n.return);default:Za(n,l)}e=e.sibling}}function qn(e,t,n){for(n=(t.subtreeFlags&8772)!==0?n:n&-2,t=t.child;t!==null;){var l=t.alternate,i=e,r=t,f=r.flags,v=(n&1)!==0;switch(r.tag){case 0:case 11:case 15:qn(i,r,n),mi(4,r);break;case 1:if(qn(i,r,n),l=r,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(Y){Je(l,l.return,Y)}if(l=r,i=l.updateQueue,i!==null){var w=l.stateNode;try{var L=i.shared.hiddenCallbacks;if(L!==null)for(i.shared.hiddenCallbacks=null,i=0;i<L.length;i++)Hh(L[i],w)}catch(Y){Je(l,l.return,Y)}}v&&f&64&&Pm(r),Fn(r,r.return);break;case 27:(n&2)!==0&&ex(r);case 5:r.tag!==5&&r.tag!==27||Im(r),qn(i,r,n),v&&l===null&&f&4&&gu(r),Fn(r,r.return);break;case 6:Im(r);break;case 26:w=r.stateNode,r.memoizedState!==null||w===null||Tt||hd(ki(w.ownerDocument),r.type,w),qn(i,r,n),v&&l===null&&f&4&&gu(r),Fn(r,r.return);break;case 12:qn(i,r,n);break;case 31:qn(i,r,n),v&&f&4&&fx(i,r);break;case 13:qn(i,r,n),v&&f&4&&hx(i,r);break;case 22:r.memoizedState===null&&qn(i,r,n),Fn(r,r.return);break;case 30:qn(i,r,n),Fn(r,r.return);break;case 7:Fn(r,r.return);default:qn(i,r,n)}t=t.sibling}}function Ru(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&&ti(n))}function Au(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ti(e))}function En(e,t,n,l){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)gx(e,t,n,l),t=t.sibling;else i&&sx(t)}function gx(e,t,n,l){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Pr(t);var r=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,n,l),r&2048&&mi(9,t);break;case 1:En(e,t,n,l);break;case 3:En(e,t,n,l),i&&Cu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),r&2048&&(r=null,t.alternate!==null&&(r=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==r&&(t.refCount++,r!=null&&ti(r)));break;case 12:if(r&2048){En(e,t,n,l),r=t.stateNode;try{var f=t.memoizedProps,v=f.id,w=f.onPostCommit;typeof w=="function"&&w(v,t.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(L){Je(t,t.return,L)}}else En(e,t,n,l);break;case 31:En(e,t,n,l);break;case 13:En(e,t,n,l);break;case 23:break;case 22:f=t.stateNode,v=t.alternate,t.memoizedState!==null?(i&&v!==null&&v.memoizedState===null&&Pr(v),f._visibility&2?En(e,t,n,l):gi(e,t)):(i&&v!==null&&v.memoizedState!==null&&Pr(t),f._visibility&2?En(e,t,n,l):(f._visibility|=2,rs(e,t,n,l,(t.subtreeFlags&10256)!==0||!1))),r&2048&&Ru(v,t);break;case 24:En(e,t,n,l),r&2048&&Au(t.alternate,t);break;case 30:i&&(r=t.alternate,r!==null&&(Wn(r.child,!0),Wn(t.child,!0))),En(e,t,n,l);break;default:En(e,t,n,l)}}function rs(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,f=t,v=n,w=l,L=f.flags;switch(f.tag){case 0:case 11:case 15:rs(r,f,v,w,i),mi(8,f);break;case 23:break;case 22:var Y=f.stateNode;f.memoizedState!==null?Y._visibility&2?rs(r,f,v,w,i):gi(r,f):(Y._visibility|=2,rs(r,f,v,w,i)),i&&L&2048&&Ru(f.alternate,f);break;case 24:rs(r,f,v,w,i),i&&L&2048&&Au(f.alternate,f);break;default:rs(r,f,v,w,i)}t=t.sibling}}function gi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:gi(n,l),i&2048&&Ru(l.alternate,l);break;case 24:gi(n,l),i&2048&&Au(l.alternate,l);break;default:gi(n,l)}t=t.sibling}}var Tl=8192;function Cl(e,t,n){if(e.subtreeFlags&Tl)for(e=e.child;e!==null;)yx(e,t,n),e=e.sibling}function yx(e,t,n){switch(e.tag){case 26:Cl(e,t,n),e.flags&Tl&&(e.memoizedState!==null?k0(n,Bn,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&kp(n,e)));break;case 5:Cl(e,t,n),e.flags&Tl&&(e=e.stateNode,(t&335544128)===t&&kp(n,e));break;case 3:case 4:var l=Bn;Bn=ki(e.stateNode.containerInfo),Cl(e,t,n),Bn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Tl,Tl=16777216,Cl(e,t,n),Tl=l):Cl(e,t,n));break;case 30:if((e.flags&Tl)!==0&&(l=e.memoizedProps.name,l!=null&&l!=="auto")){var i=e.stateNode;i.paired=null,hn===null&&(hn=new Map),hn.set(l,i)}Cl(e,t,n);break;default:Cl(e,t,n)}}function vx(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 yi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,jx(l,e)}vx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bx(e),e=e.sibling}function bx(e){switch(e.tag){case 0:case 11:case 15:yi(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:yi(e);break;case 12:yi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,eo(e)):yi(e);break;default:yi(e)}}function eo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ct=l,jx(l,e)}vx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xa(8,t,t.return),eo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,eo(t));break;default:eo(t)}e=e.sibling}}function jx(e,t){for(;Ct!==null;){var n=Ct;switch(n.tag){case 0:case 11:case 15:Xa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ti(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ct=l;else e:for(n=e;Ct!==null;){l=Ct;var i=l.sibling,r=l.return;if(ux(l),l===n){Ct=null;break e}if(i!==null){i.return=r,Ct=i;break e}Ct=r}}}var bb={getCacheForType:function(e){var t=Rt(mt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(mt).controller.signal}},jb=typeof WeakMap=="function"?WeakMap:Map,Ve=0,et=null,Me=null,Ue=0,Ke=0,mn=null,Qa=!1,os=!1,Du=!1,Na=0,dt=0,Ka=0,El=0,to=0,xn=0,cs=0,vi=null,en=null,_u=!1,no=0,Nx=0,ao=1/0,lo=null,Ja=null,st=0,Gn=null,zl=null,aa=0,Mu=0,Ou=null,wx=null,us=null,ds=null,fs=null,bi=0,so=null;function pn(){return(Ve&2)!==0&&Ue!==0?Ue&-Ue:fe.T!==null?Xu():Tf()}function Sx(){if(xn===0)if((Ue&536870912)===0||_e){var e=Wi;Wi<<=1,(Wi&3932160)===0&&(Wi=262144),xn=e}else xn=536870912;return e=At.current,e!==null&&(e.flags|=32),xn}function hs(e,t){if(t!=null){var n=e.stateNode,l=n.ref;l===null&&(l=n.ref=lp(fa(e.memoizedProps,n))),ds===null&&(ds=[]),ds.push(t.bind(null,l))}}function tn(e,t,n){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(ms(e,0),Pa(e,Ue,xn,!1)),Gs(e,n),((Ve&2)===0||e!==et)&&(e===et&&((Ve&2)===0&&(El|=n),dt===4&&Pa(e,Ue,xn,!1)),la(e))}function kx(e,t,n){if((Ve&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||qs(e,t),i=l?Sb(e,t):Uu(e,t,!0),r=l;do{if(i===0){os&&!l&&Pa(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!Nb(n)){i=Uu(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var v=e;i=vi;var w=v.current.memoizedState.isDehydrated;if(w&&(ms(v,f).flags|=256),f=Uu(v,f,!1),f!==2&&f!==6){if(Du&&!w){v.errorRecoveryDisabledLanes|=r,El|=r,i=4;break e}r=en,en=i,r!==null&&(en===null?en=r:en.push.apply(en,r))}i=f}if(r=!1,i!==2)continue}}if(i===1){ms(e,0),Pa(e,t,0,!0);break}e:{switch(l=e,r=i,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Pa(l,t,xn,!Qa);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=no+300-rn(),10<i)){if(Pa(l,t,xn,!Qa),tr(l,0,!0)!==0)break e;aa=t,l.timeoutHandle=nd(Tx.bind(null,l,n,en,lo,_u,t,xn,El,cs,Qa,r,"Throttled",-0,0),i);break e}Tx(l,n,en,lo,_u,t,xn,El,cs,Qa,r,null,-0,0)}}break}while(!0);la(e)}function Tx(e,t,n,l,i,r,f,v,w,L,Y,K,D,q){e.timeoutHandle=-1;var se=t.subtreeFlags,xe=(r&335544064)===r;if(K=null,(xe||se&8192||(se&16785408)===16785408)&&(K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},hn=null,yx(t,r,K),xe&&(se=K,xe=e.containerInfo,xe=(xe.nodeType===9?xe:xe.ownerDocument).__reactViewTransition,xe!=null&&(se.count++,se.waitingForViewTransition=!0,se=Ei.bind(se),xe.finished.then(se,se))),se=(r&62914560)===r?no-rn():(r&4194048)===r?Nx-rn():0,se=T0(K,se),se!==null)){aa=r,e.cancelPendingCommit=se(Mx.bind(null,e,t,r,n,l,i,f,v,w,L,Y,K,null,D,q)),Pa(e,r,f,!L);return}Mx(e,t,r,n,l,i,f,v,w,L,Y,K)}function Nb(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 l=0;l<n.length;l++){var i=n[l],r=i.getSnapshot;i=i.value;try{if(!dn(r(),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 Pa(e,t,n,l){t=jf(e,t),t&=~to,t&=~El,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var r=31-cn(i),f=1<<r;l[r]=-1,i&=~f}n!==0&&wf(e,n,t)}function io(){return(Ve&6)===0?(ji(0),!1):!0}function Lu(){if(Me!==null){if(Ke===0)var e=Me.return;else e=Me,pa=pl=null,Vc(e),es=null,li=0,e=Me;for(;e!==null;)Jm(e.alternate,e),e=e.return;Me=null}}function ms(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Zb(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),aa=0,Lu(),et=e,Me=n=ma(e.current,null),Ue=t,Ke=0,mn=null,Qa=!1,os=qs(e,t),Du=!1,cs=xn=to=El=Ka=dt=0,en=vi=null,_u=!1,Na=jf(e,t),mr(),n}function Cx(e,t){ze=null,fe.H=Br,t===Wl||t===kr?(t=Mh(),Ke=3):t===Ac?(t=Mh(),Ke=4):Ke=t===su?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Me===null&&(dt=1,qr(e,Sn(t,e.current)))}function Ex(){var e=At.current;return e===null?!0:(Ue&4194048)===Ue?Bt===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Bt:!1}function zx(){var e=fe.H;return fe.H=Br,e===null?Br:e}function Rx(){var e=fe.A;return fe.A=bb,e}function ro(){dt=4,Qa||(Ue&4194048)!==Ue&&At.current!==null||(os=!0),(Ka&134217727)===0&&(El&134217727)===0||et===null||Pa(et,Ue,xn,!1)}function Uu(e,t,n){var l=Ve;Ve|=2;var i=zx(),r=Rx();(et!==e||Ue!==t)&&(lo=null,ms(e,t)),t=!1;var f=dt;e:do try{if(Ke!==0&&Me!==null){var v=Me,w=mn;switch(Ke){case 8:Lu(),f=6;break e;case 3:case 2:case 9:case 6:At.current===null&&(t=!0);var L=Ke;if(Ke=0,mn=null,xs(e,v,w,L),n&&os){f=0;break e}break;default:L=Ke,Ke=0,mn=null,xs(e,v,w,L)}}wb(),f=dt;break}catch(Y){Cx(e,Y)}while(!0);return t&&e.shellSuspendCounter++,pa=pl=null,Ve=l,fe.H=i,fe.A=r,Me===null&&(et=null,Ue=0,mr()),f}function wb(){for(;Me!==null;)Ax(Me)}function Sb(e,t){var n=Ve;Ve|=2;var l=zx(),i=Rx();et!==e||Ue!==t?(lo=null,ao=rn()+500,ms(e,t)):os=qs(e,t);e:do try{if(Ke!==0&&Me!==null){t=Me;var r=mn;t:switch(Ke){case 1:Ke=0,mn=null,xs(e,t,r,1);break;case 2:case 9:if(Dh(r)){Ke=0,mn=null,Dx(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),la(e)},r.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Dh(r)?(Ke=0,mn=null,Dx(t)):(Ke=0,mn=null,xs(e,t,r,7));break;case 5:var f=null;switch(Me.tag){case 26:f=Me.memoizedState;case 5:case 27:var v=Me;if(f?wp(f):v.stateNode.complete){Ke=0,mn=null;var w=v.sibling;if(w!==null)Me=w;else{var L=v.return;L!==null?(Me=L,oo(L)):Me=null}break t}}Ke=0,mn=null,xs(e,t,r,5);break;case 6:Ke=0,mn=null,xs(e,t,r,6);break;case 8:Lu(),dt=6;break e;default:throw Error(u(462))}}kb();break}catch(Y){Cx(e,Y)}while(!0);return pa=pl=null,fe.H=l,fe.A=i,Ve=n,Me!==null?0:(et=null,Ue=0,mr(),dt)}function kb(){for(;Me!==null&&!ct();)Ax(Me)}function Ax(e){var t=Qm(e.alternate,e,Na);e.memoizedProps=e.pendingProps,t===null?oo(e):Me=t}function Dx(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=qm(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=qm(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Vc(t);var l=t;l===kt&&(_e?(br(l),l.tag===5&&l.stateNode!=null&&(tt=l.stateNode)):(br(l),_e=!0));default:Jm(n,t),t=Me=jh(t,Na),t=Qm(n,t,Na)}e.memoizedProps=e.pendingProps,t===null?oo(e):Me=t}function xs(e,t,n,l){pa=pl=null,Vc(t),es=null,li=0;var i=t.return;try{if(fb(e,i,t,n,Ue)){dt=1,qr(e,Sn(n,e.current)),Me=null;return}}catch(r){if(i!==null)throw Me=i,r;dt=1,qr(e,Sn(n,e.current)),Me=null;return}t.flags&32768?(_e||l===1?e=!0:os||(Ue&536870912)!==0?e=!1:(Qa=e=!0,(l===2||l===9||l===3||l===6)&&(l=At.current,l!==null&&l.tag===13&&(l.flags|=16384))),_x(t,e)):oo(t)}function oo(e){var t=e;do{if((t.flags&32768)!==0){_x(t,Qa);return}e=t.return;var n=pb(t.alternate,t,Na);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);dt===0&&(dt=5)}function _x(e,t){do{var n=gb(e.alternate,e);if(n!==null){n.flags&=32767,Me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=n}while(e!==null);dt=6,Me=null}function Mx(e,t,n,l,i,r,f,v,w,L,Y,K){e.cancelPendingCommit=null;do co();while(st!==0);if((Ve&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));e===et&&(Me=et=null,Ue=0),zl=t,Gn=e,aa=n,Ou=i,wx=l,Tb(e,t,n,f,v,w,K)}}function Tb(e,t,n,l,i,r,f){var v=t.lanes|t.childLanes;if(Mu=v,v|=yc,Iy(e,n,v,l,i,r),ds=null,(n&335544064)===n?(fs=eb(e),l=10262):(fs=null,l=10256),(t.subtreeFlags&l)!==0||(t.flags&l)!==0?(e.callbackNode=null,e.callbackPriority=0,Db(Fi,function(){return Gu(),null})):(e.callbackNode=null,e.callbackPriority=0),Kr=!1,l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=fe.T,fe.T=null,i=ye.p,ye.p=2,r=Ve,Ve|=4;try{yb(e,t,n)}finally{Ve=r,ye.p=i,fe.T=l}}st=1,Kr?us=Ib(f,e.containerInfo,fs,Hu,Bu,Eb,qu,Gu,Cb):(Hu(),Bu(),qu())}function Cb(e){if(st!==0){var t=Gn.onRecoverableError;t(e,{componentStack:null})}}function Eb(){st===3&&(st=0,px(zl,Gn),st=4)}function Hu(){if(st===1){st=0;var e=Gn,t=zl,n=aa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=fe.T,fe.T=null;var i=ye.p;ye.p=2;var r=Ve;Ve|=4;try{pi=Fr=!1,mx(t,e,n),n=Wu;var f=dh(e.containerInfo),v=n.focusedElem,w=n.selectionRange;if(f!==v&&v&&v.ownerDocument&&uh(v.ownerDocument.documentElement,v)){if(w!==null&&hc(v)){var L=w.start,Y=w.end;if(Y===void 0&&(Y=L),"selectionStart"in v)v.selectionStart=L,v.selectionEnd=Math.min(Y,v.value.length);else{var K=v.ownerDocument||document,D=K&&K.defaultView||window;if(D.getSelection){var q=D.getSelection(),se=v.textContent.length,xe=Math.min(w.start,se),Re=w.end===void 0?xe:Math.min(w.end,se);!q.extend&&xe>Re&&(f=Re,Re=xe,xe=f);var O=ch(v,xe),C=ch(v,Re);if(O&&C&&(q.rangeCount!==1||q.anchorNode!==O.node||q.anchorOffset!==O.offset||q.focusNode!==C.node||q.focusOffset!==C.offset)){var B=K.createRange();B.setStart(O.node,O.offset),q.removeAllRanges(),xe>Re?(q.addRange(B),q.extend(C.node,C.offset)):(B.setEnd(C.node,C.offset),q.addRange(B))}}}}for(K=[],q=v;q=q.parentNode;)q.nodeType===1&&K.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<K.length;v++){var Z=K[v];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}ws=!!Iu,Wu=Iu=null}finally{Ve=r,ye.p=i,fe.T=l}}e.current=t,st=2}}function Bu(){if(st===2){st=0;var e=Gn,t=zl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=fe.T,fe.T=null;var l=ye.p;ye.p=2;var i=Ve;Ve|=4;try{ox(e,t.alternate,t)}finally{Ve=i,ye.p=l,fe.T=n}}st=3}}function qu(){if(st===4||st===3){st=0;var e=us;us=null,sn();var t=Gn,n=zl,l=aa,i=wx,r=(l&335544064)===l?10262:10256;if((n.subtreeFlags&r)!==0||(n.flags&r)!==0?st=5:(st=0,zl=Gn=null,Ox(t,t.pendingLanes)),r=t.pendingLanes,r===0&&(Ja=null),Jo(l),n=n.stateNode,on&&typeof on.onCommitFiberRoot=="function")try{on.onCommitFiberRoot(Bs,n,void 0,(n.current.flags&128)===128)}catch{}if(i!==null){n=fe.T,r=ye.p,ye.p=2,fe.T=null;try{for(var f=t.onRecoverableError,v=0;v<i.length;v++){var w=i[v];f(w.value,{componentStack:w.stack})}}finally{fe.T=n,ye.p=r}}if(i=ds,f=fs,fs=null,i!==null&&(ds=null,f===null&&(f=[]),e!==null))for(w=0;w<i.length;w++)n=(0,i[w])(f),n!==void 0&&e.finished.finally(n);(aa&3)!==0&&co(),la(t),r=t.pendingLanes,(l&261930)!==0&&(r&42)!==0?t===so?bi++:(bi=0,so=t):(bi=0,so=null),ji(0)}}function Ox(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ti(t)))}function co(){return us!==null&&(us.skipTransition(),us=null),Hu(),Bu(),qu(),Gu()}function Gu(){if(st!==5)return!1;var e=Gn,t=Mu;Mu=0;var n=Jo(aa),l=fe.T,i=ye.p;try{ye.p=32>n?32:n,fe.T=null,n=Ou,Ou=null;var r=Gn,f=aa;if(st=0,zl=Gn=null,aa=0,(Ve&6)!==0)throw Error(u(331));var v=Ve;if(Ve|=4,bx(r.current),gx(r,r.current,f,n),Ve=v,ji(0,!1),on&&typeof on.onPostCommitFiberRoot=="function")try{on.onPostCommitFiberRoot(Bs,r)}catch{}return!0}finally{ye.p=i,fe.T=l,Ox(e,t)}}function Lx(e,t,n){t=Sn(n,t),t=lu(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Gs(e,2),la(e))}function Je(e,t,n){if(e.tag===3)Lx(e,e,n);else for(;t!==null;){if(t.tag===3){Lx(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ja===null||!Ja.has(l))){e=Sn(n,e),n=Dm(2),l=Ga(t,n,2),l!==null&&(_m(n,l,t,e),Gs(l,2),la(l));break}}t=t.return}}function Yu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new jb;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(Du=!0,i.add(n),e=zb.bind(null,e,t,n),t.then(e,e))}function zb(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,et===e&&(Ue&n)===n&&((dt===4||dt===3&&(Ue&62914560)===Ue&&300>rn()-no)&&(Ve&2)===0?ms(e,0):to|=n,cs===Ue&&(cs=0)),la(e)}function Ux(e,t){t===0&&(t=Nf()),e=hl(e,t),e!==null&&(Gs(e,t),la(e))}function Rb(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ux(e,n)}function Ab(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Ux(e,n)}function Db(e,t){return Ht(e,t)}var ps=null,gs=null,$u=!1,uo=!1,Vu=!1,Fa=0;function la(e){e!==gs&&e.next===null&&(gs===null?ps=gs=e:gs=gs.next=e),uo=!0,$u||($u=!0,Mb())}function ji(e,t){if(!Vu&&uo){Vu=!0;do for(var n=!1,l=ps;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var r=0;else{var f=l.suspendedLanes,v=l.pingedLanes;r=(1<<31-cn(42|e)+1)-1,r&=i&~(f&~v),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Gx(l,r))}else r=Ue,r=tr(l,l===et?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||qs(l,r)||(n=!0,Gx(l,r));l=l.next}while(n);Vu=!1}}function _b(){Hx()}function Hx(){uo=$u=!1;var e=0;Fa!==0&&Xb()&&(e=Fa);for(var t=rn(),n=null,l=ps;l!==null;){var i=l.next,r=Bx(l,t);r===0?(l.next=null,n===null?ps=i:n.next=i,i===null&&(gs=n)):(n=l,(e!==0||(r&3)!==0)&&(uo=!0)),l=i}st!==0&&st!==5||ji(e),Fa!==0&&(Fa=0)}function Bx(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var f=31-cn(r),v=1<<f,w=i[f];w===-1?((v&n)===0||(v&l)!==0)&&(i[f]=Fy(v,t)):w<=t&&(e.expiredLanes|=v),r&=~v}if(t=et,n=Ue,n=tr(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&ft(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||qs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&ft(l),Jo(n)){case 2:case 8:n=vf;break;case 32:n=Fi;break;case 268435456:n=bf;break;default:n=Fi}return l=qx.bind(null,e),n=Ht(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&ft(l),e.callbackPriority=2,e.callbackNode=null,2}function qx(e,t){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(co()&&e.callbackNode!==n)return null;var l=Ue;return l=tr(e,e===et?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(kx(e,l,t),Bx(e,rn()),e.callbackNode!=null&&e.callbackNode===n?qx.bind(null,e):null)}function Gx(e,t){if(co())return null;kx(e,t,!0)}function Mb(){Qb(function(){(Ve&6)!==0?Ht(yf,_b):Hx()})}function Xu(){if(Fa===0){var e=vl;e===0&&(e=Ii,Ii<<=1,(Ii&261888)===0&&(Ii=256)),Fa=e}return Fa}function Yx(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ir(e)}function Ob(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var r=Yx((i[Pt]||null).action),f=l.submitter;f&&(t=(t=f[Pt]||null)?Yx(t.formAction):f.getAttribute("formAction"),t!==null&&(r=t,f=null));var v=new ur("action","action",null,l,i);e.push({event:v,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fa!==0){var w=new FormData(i,f);Wc(n,{pending:!0,data:w,method:i.method,action:r},null,w)}}else typeof r=="function"&&(v.preventDefault(),w=new FormData(i,f),Wc(n,{pending:!0,data:w,method:i.method,action:r},r,w))},currentTarget:i}]})}}for(var Zu=0;Zu<gc.length;Zu++){var Qu=gc[Zu],Lb=Qu.toLowerCase(),Ub=Qu[0].toUpperCase()+Qu.slice(1);Un(Lb,"on"+Ub)}Un(mh,"onAnimationEnd"),Un(xh,"onAnimationIteration"),Un(ph,"onAnimationStart"),Un("dblclick","onDoubleClick"),Un("focusin","onFocus"),Un("focusout","onBlur"),Un(Zv,"onTransitionRun"),Un(Qv,"onTransitionStart"),Un(Kv,"onTransitionCancel"),Un(gh,"onTransitionEnd"),Bl("onMouseEnter",["mouseout","mouseover"]),Bl("onMouseLeave",["mouseout","mouseover"]),Bl("onPointerEnter",["pointerout","pointerover"]),Bl("onPointerLeave",["pointerout","pointerover"]),ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ni="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(" "),Hb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ni));function $x(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var f=l.length-1;0<=f;f--){var v=l[f],w=v.instance,L=v.currentTarget;if(v=v.listener,w!==r&&i.isPropagationStopped())break e;r=v,i.currentTarget=L;try{r(i)}catch(Y){hr(Y)}i.currentTarget=null,r=w}else for(f=0;f<l.length;f++){if(v=l[f],w=v.instance,L=v.currentTarget,v=v.listener,w!==r&&i.isPropagationStopped())break e;r=v,i.currentTarget=L;try{r(i)}catch(Y){hr(Y)}i.currentTarget=null,r=w}}}}function Oe(e,t){var n=t[Ef];n===void 0&&(n=t[Ef]=new Set);var l=e+"__bubble";n.has(l)||(Vx(t,e,2,!1),n.add(l))}function Ku(e,t,n){var l=0;t&&(l|=4),Vx(n,e,l,t)}var fo="_reactListening"+Math.random().toString(36).slice(2);function Ju(e){if(!e[fo]){e[fo]=!0,Af.forEach(function(n){n!=="selectionchange"&&(Hb.has(n)||Ku(n,!1,e),Ku(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fo]||(t[fo]=!0,Ku("selectionchange",!1,t))}}function Vx(e,t,n,l){switch(_p(t)){case 2:var i=R0;break;case 8:i=A0;break;default:i=xd}n=i.bind(null,t,n,e),i=void 0,!ac||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Pu(e,t,n,l,i){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var f=l.tag;if(f===3||f===4){var v=l.stateNode.containerInfo;if(v===i)break;if(f===4)for(f=l.return;f!==null;){var w=f.tag;if((w===3||w===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;v!==null;){if(f=cl(v),f===null)return;if(w=f.tag,w===5||w===6||w===26||w===27){l=r=f;continue e}v=v.parentNode}}l=l.return}Vf(function(){var L=r,Y=tc(n),K=[];e:{var D=yh.get(e);if(D!==void 0){var q=ur,se=e;switch(e){case"keypress":if(or(n)===0)break e;case"keydown":case"keyup":q=Nv;break;case"focusin":se="focus",q=rc;break;case"focusout":se="blur",q=rc;break;case"beforeblur":case"afterblur":q=rc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=Qf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=uv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=Cv;break;case mh:case xh:case ph:q=hv;break;case gh:q=zv;break;case"scroll":case"scrollend":q=ov;break;case"wheel":q=Av;break;case"copy":case"cut":case"paste":q=xv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Jf;break;case"submit":q=kv;break;case"toggle":case"beforetoggle":q=_v}var xe=(t&4)!==0,Re=!xe&&(e==="scroll"||e==="scrollend"),O=xe?D!==null?D+"Capture":null:D;xe=[];for(var C=L,B;C!==null;){var Z=C;if(B=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||B===null||O===null||(Z=Vs(C,O),Z!=null&&xe.push(wi(C,Z,B))),Re)break;C=C.return}0<xe.length&&(D=new q(D,se,null,n,Y),K.push({event:D,listeners:xe}))}}if((t&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",q&&n!==ec&&(se=n.relatedTarget||n.fromElement)&&(cl(se)||se[Ll]))break e;(D||q)&&(se=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,D?(q=n.relatedTarget||n.toElement,D=L,q=q?cl(q):null,q!==null&&(Re=m(q),xe=q.tag,q!==Re||xe!==5&&xe!==27&&xe!==6)&&(q=null)):(D=null,q=L),D!==q&&(xe=Qf,Z="onMouseLeave",O="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(xe=Jf,Z="onPointerLeave",O="onPointerEnter",C="pointer"),Re=D==null?se:$s(D),B=q==null?se:$s(q),se=new xe(Z,C+"leave",D,n,Y),se.target=Re,se.relatedTarget=B,Z=null,cl(Y)===L&&(xe=new xe(O,C+"enter",q,n,Y),xe.target=B,xe.relatedTarget=Re,Z=xe),Re=Z,xe=D&&q?ne(D,q,Bb):null,D!==null&&Xx(K,se,D,xe,!1),q!==null&&Re!==null&&Xx(K,Re,q,xe,!0)))}e:{if(D=L?$s(L):window,q=D.nodeName&&D.nodeName.toLowerCase(),q==="select"||q==="input"&&D.type==="file")var me=ah;else if(th(D))if(lh)me=$v;else{me=Gv;var He=qv}else q=D.nodeName,!q||q.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?L&&Wo(L.elementType)&&(me=ah):me=Yv;if(me&&(me=me(e,L))){nh(K,me,n,Y);break e}He&&He(e,D,L)}switch(He=L?$s(L):window,e){case"focusin":(th(He)||He.contentEditable==="true")&&(Xl=He,mc=L,Is=null);break;case"focusout":Is=mc=Xl=null;break;case"mousedown":xc=!0;break;case"contextmenu":case"mouseup":case"dragend":xc=!1,fh(K,n,Y);break;case"selectionchange":if(Xv)break;case"keydown":case"keyup":fh(K,n,Y)}var ge;if(cc)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Vl?Wf(e,n)&&(Ne="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ne="onCompositionStart");Ne&&(Pf&&n.locale!=="ko"&&(Vl||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Vl&&(ge=Xf()):(Da=Y,lc="value"in Da?Da.value:Da.textContent,Vl=!0)),He=ho(L,Ne),0<He.length&&(Ne=new Kf(Ne,e,null,n,Y),K.push({event:Ne,listeners:He}),ge?Ne.data=ge:(ge=eh(n),ge!==null&&(Ne.data=ge)))),(ge=Ov?Lv(e,n):Uv(e,n))&&(Ne=ho(L,"onBeforeInput"),0<Ne.length&&(He=new Kf("onBeforeInput","beforeinput",null,n,Y),K.push({event:He,listeners:Ne}),He.data=ge)),Ob(K,e,L,n,Y)}$x(K,t)})}function wi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ho(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Vs(e,n),i!=null&&l.unshift(wi(e,i,r)),i=Vs(e,t),i!=null&&l.push(wi(e,i,r))),e.tag===3)return l;e=e.return}return[]}function Bb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xx(e,t,n,l,i){for(var r=t._reactName,f=[];n!==null&&n!==l;){var v=n,w=v.alternate,L=v.stateNode;if(v=v.tag,w!==null&&w===l)break;v!==5&&v!==26&&v!==27||L===null||(w=L,i?(L=Vs(n,r),L!=null&&f.unshift(wi(n,L,w))):i||(L=Vs(n,r),L!=null&&f.push(wi(n,L,w)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var qb=/\r\n?/g,Gb=/\u0000|\uFFFD/g;function Zx(e){return(typeof e=="string"?e:""+e).replace(qb,`
|
|
49
|
-
`).replace(Gb,"")}function Qx(e,t){return t=Zx(t),Zx(e)===t}function Pe(e,t,n,l,i,r){switch(n){case"children":if(typeof l=="string")t==="body"||t==="textarea"&&l===""||Gl(e,l);else if(typeof l=="number"||typeof l=="bigint")t!=="body"&&Gl(e,""+l);else return;break;case"className":sr(e,"class",l);break;case"tabIndex":sr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":sr(e,n,l);break;case"style":Yf(e,l,r);return;case"data":if(t!=="object"){sr(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ir(l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="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 r=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",i.name,i,null),Pe(e,t,"formEncType",i.formEncType,i,null),Pe(e,t,"formMethod",i.formMethod,i,null),Pe(e,t,"formTarget",i.formTarget,i,null)):(Pe(e,t,"encType",i.encType,i,null),Pe(e,t,"method",i.method,i,null),Pe(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=ir(l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Kn);return;case"onScroll":l!=null&&Oe("scroll",e);return;case"onScrollEnd":l!=null&&Oe("scrollend",e);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));r?.__html!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=ir(l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),lr(e,"popover",l);break;case"xlinkActuate":ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":ua(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":ua(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":ua(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":ua(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":lr(e,"is",l);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=iv.get(n)||n,lr(e,n,l);else return}Ye=!0}function Fu(e,t,n,l,i,r){switch(n){case"style":Yf(e,l,r);return;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));r?.__html!==n&&(e.innerHTML=n)}}break;case"children":if(typeof l=="string")Gl(e,l);else if(typeof l=="number"||typeof l=="bigint")Gl(e,""+l);else return;break;case"onScroll":l!=null&&Oe("scroll",e);return;case"onScrollEnd":l!=null&&Oe("scrollend",e);return;case"onClick":l!=null&&(e.onclick=Kn);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Df.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),r=n.slice(2,i?n.length-7:void 0),t=e[Pt]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(r,t,i),typeof l=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(r,l,i);break e}Ye=!0,n in e?e[n]=l:l===!0?e.setAttribute(n,""):lr(e,n,l)}return}Ye=!0}function Mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var l=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Pe(e,t,r,f,n,null)}}i&&Pe(e,t,"srcSet",n.srcSet,n,null),l&&Pe(e,t,"src",n.src,n,null);return;case"input":Oe("invalid",e);var v=r=f=i=null,w=null,L=null;for(l in n)if(n.hasOwnProperty(l)){var Y=n[l];if(Y!=null)switch(l){case"name":i=Y;break;case"type":f=Y;break;case"checked":w=Y;break;case"defaultChecked":L=Y;break;case"value":r=Y;break;case"defaultValue":v=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,t));break;default:Pe(e,t,l,Y,n,null)}}Hf(e,r,v,w,L,f,i,!1);return;case"select":Oe("invalid",e),l=f=r=null;for(i in n)if(n.hasOwnProperty(i)&&(v=n[i],v!=null))switch(i){case"value":r=v;break;case"defaultValue":f=v;break;case"multiple":l=v;default:Pe(e,t,i,v,n,null)}t=r,n=f,e.multiple=!!l,t!=null?ql(e,!!l,t,!1):n!=null&&ql(e,!!l,n,!0);return;case"textarea":Oe("invalid",e),r=i=l=null;for(f in n)if(n.hasOwnProperty(f)&&(v=n[f],v!=null))switch(f){case"value":l=v;break;case"defaultValue":i=v;break;case"children":r=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(u(91));break;default:Pe(e,t,f,v,n,null)}qf(e,l,i,r);return;case"option":for(w in n)if(n.hasOwnProperty(w)&&(l=n[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Pe(e,t,w,l,n,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(l=0;l<Ni.length;l++)Oe(Ni[l],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("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(L in n)if(n.hasOwnProperty(L)&&(l=n[L],l!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Pe(e,t,L,l,n,null)}return;default:if(Wo(t)){for(Y in n)n.hasOwnProperty(Y)&&(l=n[Y],l!==void 0&&Fu(e,t,Y,l,n,void 0));return}}for(v in n)n.hasOwnProperty(v)&&(l=n[v],l!=null&&Pe(e,t,v,l,n,null))}var Yb={};function $b(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,f=null,v=null,w=null,L=null,Y=null;for(q in n){var K=n[q];if(n.hasOwnProperty(q)&&K!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":w=K;default:l.hasOwnProperty(q)||Pe(e,t,q,null,l,K)}}for(var D in l){var q=l[D];if(K=n[D],l.hasOwnProperty(D)&&(q!=null||K!=null))switch(D){case"type":q!==K&&(Ye=!0),r=q;break;case"name":q!==K&&(Ye=!0),i=q;break;case"checked":q!==K&&(Ye=!0),L=q;break;case"defaultChecked":q!==K&&(Ye=!0),Y=q;break;case"value":q!==K&&(Ye=!0),f=q;break;case"defaultValue":q!==K&&(Ye=!0),v=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(u(137,t));break;default:q!==K&&Pe(e,t,D,q,l,K)}}Fo(e,f,v,w,L,Y,r,i);return;case"select":q=f=v=D=null;for(r in n)if(w=n[r],n.hasOwnProperty(r)&&w!=null)switch(r){case"value":break;case"multiple":q=w;default:l.hasOwnProperty(r)||Pe(e,t,r,null,l,w)}for(i in l)if(r=l[i],w=n[i],l.hasOwnProperty(i)&&(r!=null||w!=null))switch(i){case"value":r!==w&&(Ye=!0),D=r;break;case"defaultValue":r!==w&&(Ye=!0),v=r;break;case"multiple":r!==w&&(Ye=!0),f=r;default:r!==w&&Pe(e,t,i,r,l,w)}t=v,n=f,l=q,D!=null?ql(e,!!n,D,!1):!!l!=!!n&&(t!=null?ql(e,!!n,t,!0):ql(e,!!n,n?[]:"",!1));return;case"textarea":q=D=null;for(v in n)if(i=n[v],n.hasOwnProperty(v)&&i!=null&&!l.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:Pe(e,t,v,null,l,i)}for(f in l)if(i=l[f],r=n[f],l.hasOwnProperty(f)&&(i!=null||r!=null))switch(f){case"value":i!==r&&(Ye=!0),D=i;break;case"defaultValue":i!==r&&(Ye=!0),q=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==r&&Pe(e,t,f,i,l,r)}Bf(e,D,q);return;case"option":for(var se in n)if(D=n[se],n.hasOwnProperty(se)&&D!=null&&!l.hasOwnProperty(se))switch(se){case"selected":e.selected=!1;break;default:Pe(e,t,se,null,l,D)}for(w in l)if(D=l[w],q=n[w],l.hasOwnProperty(w)&&D!==q&&(D!=null||q!=null))switch(w){case"selected":D!==q&&(Ye=!0),e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Pe(e,t,w,D,l,q)}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 xe in n)D=n[xe],n.hasOwnProperty(xe)&&D!=null&&!l.hasOwnProperty(xe)&&Pe(e,t,xe,null,l,D);for(L in l)if(D=l[L],q=n[L],l.hasOwnProperty(L)&&D!==q&&(D!=null||q!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:Pe(e,t,L,D,l,q)}return;default:if(Wo(t)){for(var Re in n)D=n[Re],n.hasOwnProperty(Re)&&D!==void 0&&!l.hasOwnProperty(Re)&&Fu(e,t,Re,void 0,l,D);for(Y in l)D=l[Y],q=n[Y],!l.hasOwnProperty(Y)||D===q||D===void 0&&q===void 0||Fu(e,t,Y,D,l,q);return}}for(var O in n)D=n[O],n.hasOwnProperty(O)&&D!=null&&!l.hasOwnProperty(O)&&Pe(e,t,O,null,l,D);for(K in l)D=l[K],q=n[K],!l.hasOwnProperty(K)||D===q||D==null&&q==null||Pe(e,t,K,D,l,q)}function Kx(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Vb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],r=i.transferSize,f=i.initiatorType,v=i.duration;if(r&&v&&Kx(f)){for(f=0,v=i.responseEnd,l+=1;l<n.length;l++){var w=n[l],L=w.startTime;if(L>v)break;var Y=w.transferSize,K=w.initiatorType;Y&&Kx(K)&&(w=w.responseEnd,f+=Y*(w<v?1:(v-L)/(w-L)))}if(--l,t+=8*(r+f)/(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 Iu=null,Wu=null;function Si(e){return e.nodeType===9?e:e.ownerDocument}function Jx(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 Px(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 Fx(e,t,n,l){return n=Si(n).createElement(e),n[zt]=l,n[Pt]=t,Mt(n,e,t),St(n),n}function ed(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 td=null;function Xb(){var e=window.event;return e&&e.type==="popstate"?e===td?!1:(td=e,!0):(td=null,!1)}var nd=typeof setTimeout=="function"?setTimeout:void 0,Zb=typeof clearTimeout=="function"?clearTimeout:void 0,Ix=typeof Promise=="function"?Promise:void 0,Wx=typeof requestAnimationFrame=="function"?requestAnimationFrame:nd,Qb=typeof queueMicrotask=="function"?queueMicrotask:typeof Ix<"u"?function(e){return Ix.resolve(null).then(e).catch(Kb)}:nd;function Kb(e){setTimeout(function(){throw e})}function Ia(e){return e==="head"}function ep(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),Ss(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")ud(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ud(n);for(var r=n.firstChild;r;){var f=r.nextSibling,v=r.nodeName;r[Ys]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=f}}else n==="body"&&ud(e.ownerDocument.body);n=i}while(n);Ss(t)}function tp(e,t){var n=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function np(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var l=1;else for(var i=l=0;i<t.length;i++){var r=t[i];0<r.width&&0<r.height&&l++}l===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function ap(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function Jb(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function ad(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return Jb(t,n,e)}function Pb(e){return e.documentElement.clientHeight}function Fb(e){this.addEventListener("load",e),this.addEventListener("error",e)}function Ib(e,t,n,l,i,r,f,v,w){var L=t.nodeType===9?t:t.ownerDocument;try{var Y=L.startViewTransition({update:function(){var D=L.defaultView,q=D.navigation&&D.navigation.transition,se=L.fonts.status;l();var xe=[];if(se==="loaded"&&(Pb(L),L.fonts.status==="loading"&&xe.push(L.fonts.ready)),se=xe.length,e!==null)for(var Re=e.suspenseyImages,O=0,C=0;C<Re.length;C++){var B=Re[C];if(!B.complete){var Z=B.getBoundingClientRect();if(0<Z.bottom&&0<Z.right&&Z.top<D.innerHeight&&Z.left<D.innerWidth){if(O+=Sp(B),O>po){xe.length=se;break}B=new Promise(Fb.bind(B)),xe.push(B)}}}if(0<xe.length)return D=Promise.race([Promise.all(xe),new Promise(function(me){return setTimeout(me,500)})]).then(i,i),(q?Promise.allSettled([q.finished,D]):D).then(r,r);if(i(),q)return q.finished.then(r,r);r()},types:n});L.__reactViewTransition=Y;var K=[];return Y.ready.then(function(){for(var D=L.documentElement.getAnimations({subtree:!0}),q=0;q<D.length;q++){var se=D[q],xe=se.effect,Re=xe.pseudoElement;if(Re!=null&&Re.startsWith("::view-transition")){K.push(se),se=xe.getKeyframes();for(var O=Re=void 0,C=!0,B=0;B<se.length;B++){var Z=se[B],me=Z.width;if(Re===void 0)Re=me;else if(Re!==me){C=!1;break}if(me=Z.height,O===void 0)O=me;else if(O!==me){C=!1;break}delete Z.width,delete Z.height,Z.transform==="none"&&delete Z.transform}C&&Re!==void 0&&O!==void 0&&(xe.setKeyframes(se),C=getComputedStyle(xe.target,xe.pseudoElement),C.width!==Re||C.height!==O)&&(C=se[0],C.width=Re,C.height=O,C=se[se.length-1],C.width=Re,C.height=O,xe.setKeyframes(se))}}f()},function(D){L.__reactViewTransition===Y&&(L.__reactViewTransition=null);try{if(typeof D=="object"&&D!==null)switch(D.name){case"InvalidStateError":(D.message==="View transition was skipped because document visibility state is hidden."||D.message==="Skipping view transition because document visibility state has become hidden."||D.message==="Skipping view transition because viewport size changed."||D.message==="Transition was aborted because of invalid state")&&(D=null)}D!==null&&w(D)}finally{l(),i(),f()}}),Y.finished.finally(function(){for(var D=0;D<K.length;D++)K[D].cancel();L.__reactViewTransition===Y&&(L.__reactViewTransition=null),v()}),Y}catch{return l(),i(),f(),null}}function Rl(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Rl.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:U({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Rl.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),l=[],i=0;i<n.length;i++){var r=n[i].effect;r!==null&&r.target===e&&r.pseudoElement===t&&l.push(n[i])}return l},Rl.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function lp(e){return{name:e,group:new Rl("group",e),imagePair:new Rl("image-pair",e),old:new Rl("old",e),new:new Rl("new",e)}}function gn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}gn.prototype.addEventListener=function(e,t,n){var l=null,i=null;if(!(n!=null&&typeof n!="boolean"&&(l=n.signal||null,l!==null&&l.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var r=this._eventListeners;if(ip(r,e,t,n)===-1){var f=this,v=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(v=function(w){f.removeEventListener(e,t,n),typeof t=="function"?t.call(this,w):t.handleEvent(w)}),l!==null&&(i=f.removeEventListener.bind(f,e,t,n),l.addEventListener("abort",i,{once:!0}),i=l.removeEventListener.bind(l,"abort",i)),l=ys(n),r.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:v,cleanup:i}),y(this._fragmentFiber.child,!1,Wb,e,v,l)}this._eventListeners=r}};function Wb(e,t,n,l){return k(e).addEventListener(t,n,l),!1}gn.prototype.removeEventListener=function(e,t,n){var l=this._eventListeners;if(l!==null&&(t=ip(l,e,t,n),t!==-1)){var i=l[t];n=i.attachedListener;var r=i.cleanup;i=ys(i.optionsOrUseCapture),y(this._fragmentFiber.child,!1,e0,e,n,i),l.splice(t,1),r!==null&&r()}};function e0(e,t,n,l){return k(e).removeEventListener(t,n,l),!1}function ys(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function sp(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function ip(e,t,n,l){if(e.length===0)return-1;l=sp(l);for(var i=0;i<e.length;i++){var r=e[i];if(r.type===t&&r.listener===n&&sp(r.optionsOrUseCapture)===l)return i}return-1}gn.prototype.dispatchEvent=function(e){var t=N(this._fragmentFiber);if(t===null)return!0;t=k(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var l=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var i=0;i<n.length;i++){var r=n[i];l.addEventListener(r.type,r.attachedListener,ys(r.optionsOrUseCapture))}if(t.appendChild(l),e=l.dispatchEvent(e),n)for(i=0;i<n.length;i++)r=n[i],l.removeEventListener(r.type,r.attachedListener,ys(r.optionsOrUseCapture));return t.removeChild(l),e}return t.dispatchEvent(e)},gn.prototype.focus=function(e){y(this._fragmentFiber.child,!0,rp,e,void 0,void 0)};function rp(e,t){return e.tag===6?!1:(e=k(e),f0(e,t))}gn.prototype.focusLast=function(e){var t=[];y(this._fragmentFiber.child,!0,ld,t,void 0,void 0);for(var n=t.length-1;0<=n&&!rp(t[n],e);n--);};function ld(e,t){return t.push(e),!1}gn.prototype.blur=function(){var e=N(this._fragmentFiber);e!==null&&(e=k(e),e=Si(e).activeElement,e!==null&&y(this._fragmentFiber.child,!1,t0,e,void 0,void 0))};function t0(e,t){return e.tag===6?!1:(e=k(e),e===t||e.contains(t)?(t.blur(),!0):!1)}gn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),y(this._fragmentFiber.child,!1,n0,e,void 0,void 0)};function n0(e,t){return e.tag===6||(e=k(e),t.observe(e)),!1}gn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),y(this._fragmentFiber.child,!1,a0,e,void 0,void 0);for(var n=t=0;n<Yn.length;n++){var l=Yn[n];l.fragmentInstance===this&&l.observer===e?e.unobserve(l.instance):Yn[t++]=l}Yn.length=t}};function a0(e,t){return e.tag===6||(e=k(e),t.unobserve(e)),!1}var Yn=[],sd=!1;function l0(e,t,n){Yn.push({fragmentInstance:e,observer:t,instance:n}),sd||(sd=!0,h0(function(){sd=!1;var l=Yn;Yn=[];for(var i=0;i<l.length;i++){var r=l[i];r.observer.unobserve(r.instance)}}))}gn.prototype.getClientRects=function(){var e=[];return y(this._fragmentFiber.child,!1,s0,e,void 0,void 0),e};function s0(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=k(e),t.push.apply(t,e.getClientRects());return!1}gn.prototype.getRootNode=function(e){var t=N(this._fragmentFiber);return t===null?this:k(t).getRootNode(e)},gn.prototype.compareDocumentPosition=function(e){var t=N(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];y(this._fragmentFiber.child,!1,ld,n,void 0,void 0);var l=k(t);if(n.length===0){if(n=l,E(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=l=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:l&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=H(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=k(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=k(n[0]),i=k(n[n.length-1]);var r=E(this._fragmentFiber)?t.parentElement:l;if(r==null)return Node.DOCUMENT_POSITION_DISCONNECTED;l=r.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,r=r.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var f=t.compareDocumentPosition(e),v=i.compareDocumentPosition(e),w=f&Node.DOCUMENT_POSITION_CONTAINED_BY||v&Node.DOCUMENT_POSITION_CONTAINED_BY;return v=l&&r&&f&Node.DOCUMENT_POSITION_FOLLOWING&&v&Node.DOCUMENT_POSITION_PRECEDING,t=l&&t===e||r&&i===e||w||v?Node.DOCUMENT_POSITION_CONTAINED_BY:!l&&t===e||!r&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:f,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||i0(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function i0(e,t,n,l,i){var r=cl(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!r)e:{for(;r!==null;){if(r.tag===7&&(r===t||r.alternate===t)){n=!0;break e}r=r.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(r===null)return r=i.ownerDocument,i===r||i===r.documentElement||i===r.body;e:{for(r=t,t=N(t);r!==null;){if(!(r.tag!==5&&r.tag!==3&&r.tag!==27||r!==t&&r.alternate!==t)){r=!0;break e}r=r.return}r=!1}return r}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!r)&&!(t=r===n)&&(t=ne(n,r,G),t===null?t=!1:(y(t,!0,X,r,n),r=_,_=null,t=r!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!r)&&!(t=r===l)&&(t=ne(l,r,G),t===null?t=!1:(y(t,!0,z,r,l),r=_,R=_=null,t=r!==null)),t):!1}function op(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}gn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(u(566));var t=[];y(this._fragmentFiber.child,!1,ld,t,void 0,void 0);var n=e!==!1;if(t.length===0){var l=H(this._fragmentFiber);if(l=n?l[1]||l[0]||N(this._fragmentFiber):l[0]||l[1],l===null)return;if(l.tag===6){e=k(l),op(e,n);return}if(l=k(l),l.nodeType!==9){if(l.nodeType===11){n="host"in l?l.host:null,n!==null&&n.scrollIntoView(e);return}l.scrollIntoView(e)}}for(l=n?t.length-1:0;l!==(n?-1:t.length);){var i=t[l];i.tag===6?(i=k(i),op(i,n)):k(i).scrollIntoView(e),l+=n?-1:1}};function r0(e,t){return e=k(e),cp(e,t),!1}function cp(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function up(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l];e.addEventListener(i.type,i.attachedListener,ys(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){for(var f=0,v=0;v<Yn.length;v++){var w=Yn[v];(w.fragmentInstance!==t||w.observer!==r||w.instance!==e)&&(Yn[f++]=w)}Yn.length=f,r.observe(e)}),cp(e,t))}function o0(e,t){var n=t._eventListeners;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l];e.removeEventListener(i.type,i.attachedListener,ys(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(r){typeof r.rootMargin=="string"?l0(t,r,e):r.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function id(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":id(n),ar(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function c0(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ys])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==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(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=zn(e.nextSibling),e===null)break}return null}function u0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=zn(e.nextSibling),e===null))return null;return e}function dp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zn(e.nextSibling),e===null))return null;return e}function rd(e){return e.data==="$?"||e.data==="$~"}function od(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function d0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function zn(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 cd=null;function fp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return zn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function hp(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 f0(e,t){function n(){l=!0}if(e.ownerDocument.activeElement===e)return!0;var l=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return l}function h0(e){Wx(function(){Wx(function(t){return e(t)})})}function mp(e,t,n){switch(t=Si(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function xp(e,t,n){for(var l in n){var i=n[l];n.hasOwnProperty(l)&&i!=null&&Pe(e,t,l,null,Yb,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Kn&&(e.onclick=null),ar(e)}function ud(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ar(e)}var Rn=new Map,pp=new Set;function ki(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wa=ye.d;ye.d={f:m0,r:x0,D:p0,C:g0,L:y0,m:v0,X:j0,S:b0,M:N0};function m0(){var e=wa.f(),t=io();return e||t}function x0(e){var t=Ul(e);t!==null&&t.tag===5&&t.type==="form"?ym(t):wa.r(e)}var vs=typeof document>"u"?null:document;function gp(e,t,n){var l=vs;if(l&&typeof t=="string"&&t){var i=Nn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),pp.has(i)||(pp.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Mt(t,"link",e),St(t),l.head.appendChild(t)))}}function p0(e){wa.D(e),gp("dns-prefetch",e,null)}function g0(e,t){wa.C(e,t),gp("preconnect",e,t)}function y0(e,t,n){wa.L(e,t,n);var l=vs;if(l&&e&&t){var i='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Nn(n.imageSizes)+'"]')):i+='[href="'+Nn(e)+'"]';var r=i;switch(t){case"style":r=bs(e);break;case"script":r=js(e)}if(!(Rn.has(r)||(e=U({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rn.set(r,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Ti(r))||t==="script"&&l.querySelector(Ci(r))))){var f=l.createElement("link");Mt(f,"link",e),t==="style"&&(f[nr]=!0,f.onload=f.onerror=function(){Rf(f)}),St(f),l.head.appendChild(f)}}}function v0(e,t){wa.m(e,t);var n=vs;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Nn(l)+'"][href="'+Nn(e)+'"]',r=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=js(e)}if(!Rn.has(r)&&(e=U({rel:"modulepreload",href:e},t),Rn.set(r,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ci(r)))return}l=n.createElement("link"),Mt(l,"link",e),St(l),n.head.appendChild(l)}}}function b0(e,t,n){wa.S(e,t,n);var l=vs;if(l&&e){var i=Hl(l).hoistableStyles,r=bs(e);t=t||"default";var f=i.get(r);if(!f){var v={loading:0,preload:null};if(f=l.querySelector(Ti(r)))v.loading=5;else{e=U({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rn.get(r))&&dd(e,n);var w=f=l.createElement("link");St(w),Mt(w,"link",e),w._p=new Promise(function(L,Y){w.onload=L,w.onerror=Y}),w.addEventListener("load",function(){v.loading|=1}),w.addEventListener("error",function(){v.loading|=2}),v.loading|=4,mo(f,t,l)}f={type:"stylesheet",instance:f,count:1,state:v},i.set(r,f)}}}function j0(e,t){wa.X(e,t);var n=vs;if(n&&e){var l=Hl(n).hoistableScripts,i=js(e),r=l.get(i);r||(r=n.querySelector(Ci(i)),r||(e=U({src:e,async:!0},t),(t=Rn.get(i))&&fd(e,t),r=n.createElement("script"),St(r),Mt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function N0(e,t){wa.M(e,t);var n=vs;if(n&&e){var l=Hl(n).hoistableScripts,i=js(e),r=l.get(i);r||(r=n.querySelector(Ci(i)),r||(e=U({src:e,async:!0,type:"module"},t),(t=Rn.get(i))&&fd(e,t),r=n.createElement("script"),St(r),Mt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function yp(e,t,n,l){var i=(i=Kt.current)?ki(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=bs(n.href),t=Hl(i).hoistableStyles,l=t.get(n),l||(l={type:"style",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=bs(n.href);var r=Hl(i).hoistableStyles,f=r.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,f),(r=i.querySelector(Ti(e)))?r._p||(f.instance=r,f.state.loading=5):(r=Rn.get(e),r||(r={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rn.set(e,r)),w0(i,e,r,f.state))),t&&l===null)throw Error(u(528,""));return f}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=js(n),t=Hl(i).hoistableScripts,l=t.get(n),l||(l={type:"script",instance:null,count:0,state:null},t.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function bs(e){return'href="'+Nn(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function vp(e){return U({},e,{"data-precedence":e.precedence,precedence:null})}function w0(e,t,n,l){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[nr]!==!0){l.loading=1;return}}else t=e.createElement("link"),t[nr]=!0,t.onload=t.onerror=Rf.bind(null,t),Mt(t,"link",n),St(t),e.head.appendChild(t);l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2})}function js(e){return'[src="'+Nn(e)+'"]'}function Ci(e){return"script[async]"+e}function bp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Nn(n.href)+'"]');if(l)return t.instance=l,St(l),l;var i=U({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),St(l),Mt(l,"style",i),mo(l,n.precedence,e),t.instance=l;case"stylesheet":i=bs(n.href);var r=e.querySelector(Ti(i));if(r)return t.state.loading|=4,t.instance=r,St(r),r;l=vp(n),(i=Rn.get(i))&&dd(l,i),r=(e.ownerDocument||e).createElement("link"),St(r);var f=r;return f._p=new Promise(function(v,w){f.onload=v,f.onerror=w}),Mt(r,"link",l),t.state.loading|=4,mo(r,n.precedence,e),t.instance=r;case"script":return r=js(n.src),(i=e.querySelector(Ci(r)))?(t.instance=i,St(i),i):(l=n,(i=Rn.get(r))&&(l=U({},n),fd(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),St(i),Mt(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,mo(l,n.precedence,e));return t.instance}function mo(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,r=i,f=0;f<l.length;f++){var v=l[f];if(v.dataset.precedence===t)r=v;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function dd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xo=null;function jp(e,t,n){if(xo===null){var l=new Map,i=xo=new Map;i.set(n,l)}else i=xo,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var r=n[i];if(!(r[Ys]||r[zt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var f=r.getAttribute(t)||"";f=e+f;var v=l.get(f);v?v.push(r):l.set(f,[r])}}return l}function hd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function S0(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 Np(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function wp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sp(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function kp(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=Sp(t),e.suspenseyImages.push(t)),e=C0.bind(e),t.decode().then(e,e))}function k0(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=bs(l.href),r=t.querySelector(Ti(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ei.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,St(r);return}r=t.ownerDocument||t,l=vp(l),(i=Rn.get(i))&&dd(l,i),r=r.createElement("link"),St(r);var f=r;f._p=new Promise(function(v,w){f.onload=v,f.onerror=w}),Mt(r,"link",l),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Ei.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var po=0;function T0(e,t){return e.stylesheets&&e.count===0&&yo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&yo(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&po===0&&(po=62500*Vb());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yo(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>po?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function Tp(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)yo(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Ei(){this.count--,Tp(this)}function C0(){this.imgCount--,Tp(this)}var go=null;function yo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,go=new Map,t.forEach(E0,e),go=null,Ei.call(e))}function E0(e,t){if(!(t.state.loading&4)){var n=go.get(e);if(n)var l=n.get(null);else{n=new Map,go.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var f=i[r];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(n.set(f.dataset.precedence,f),l=f)}l&&n.set(null,l)}i=t.instance,f=i.getAttribute("data-precedence"),r=n.get(f)||l,r===l&&n.set(null,i),n.set(f,i),this.count++,l=Ei.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Ns={$$typeof:F,Provider:null,Consumer:null,_currentValue:Gt,_currentValue2:Gt,_threadCount:0};function z0(e,t,n,l,i,r,f,v,w){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=Qo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qo(0),this.hiddenUpdates=Qo(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.transitionTypes=null,this.incompleteTransitions=new Map}function Cp(e,t,n,l,i,r,f,v,w,L,Y,K){return e=new z0(e,t,n,f,w,L,Y,K,v),t=1,r===!0&&(t|=24),r=Ft(3,null,null,t),e.current=r,r.stateNode=e,t=Ec(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},Dc(r),e}function Ep(e){return e?(e=Kl,e):Kl}function zp(e,t,n,l,i,r){i=Ep(i),l.context===null?l.context=i:l.pendingContext=i,l=qa(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=Ga(e,l,t),n!==null&&(tn(n,e,t),si(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 md(e,t){Rp(e,t),(e=e.alternate)&&Rp(e,t)}function Ap(e){if(e.tag===13||e.tag===31){var t=hl(e,67108864);t!==null&&tn(t,e,67108864),md(e,67108864)}}function Dp(e){if(e.tag===13||e.tag===31){var t=pn();t=Ko(t);var n=hl(e,t);n!==null&&tn(n,e,t),md(e,t)}}var ws=!0;function R0(e,t,n,l){var i=fe.T;fe.T=null;var r=ye.p;try{ye.p=2,xd(e,t,n,l)}finally{ye.p=r,fe.T=i}}function A0(e,t,n,l){var i=fe.T;fe.T=null;var r=ye.p;try{ye.p=8,xd(e,t,n,l)}finally{ye.p=r,fe.T=i}}function xd(e,t,n,l){if(ws){var i=pd(l);if(i===null)Pu(e,t,l,vo,n),Mp(e,l);else if(_0(i,e,t,n,l))l.stopPropagation();else if(Mp(e,l),t&4&&-1<D0.indexOf(e)){for(;i!==null;){var r=Ul(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var f=ol(r.pendingLanes);if(f!==0){var v=r;for(v.pendingLanes|=2,v.entangledLanes|=2;f;){var w=1<<31-cn(f);v.entanglements[1]|=w,f&=~w}la(r),(Ve&6)===0&&(ao=rn()+500,ji(0))}}break;case 31:case 13:v=hl(r,2),v!==null&&tn(v,r,2),io(),md(r,2)}if(r=pd(l),r===null&&Pu(e,t,l,vo,n),r===i)break;i=r}i!==null&&l.stopPropagation()}else Pu(e,t,l,null,n)}}function pd(e){return e=tc(e),gd(e)}var vo=null;function gd(e){if(vo=null,e=cl(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=p(t),e!==null)return e;e=null}else if(n===31){if(e=h(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 vo=e,null}function _p(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Vy()){case yf:return 2;case vf:return 8;case Fi:case Xy:return 32;case bf:return 268435456;default:return 32}default:return 32}}var yd=!1,Wa=null,el=null,tl=null,zi=new Map,Ri=new Map,nl=[],D0="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 Mp(e,t){switch(e){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":zi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ri.delete(t.pointerId)}}function Ai(e,t,n,l,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[i]},t!==null&&(t=Ul(t),t!==null&&Ap(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function _0(e,t,n,l,i){switch(t){case"focusin":return Wa=Ai(Wa,e,t,n,l,i),!0;case"dragenter":return el=Ai(el,e,t,n,l,i),!0;case"mouseover":return tl=Ai(tl,e,t,n,l,i),!0;case"pointerover":var r=i.pointerId;return zi.set(r,Ai(zi.get(r)||null,e,t,n,l,i)),!0;case"gotpointercapture":return r=i.pointerId,Ri.set(r,Ai(Ri.get(r)||null,e,t,n,l,i)),!0}return!1}function Op(e){var t=cl(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=p(n),t!==null){e.blockedOn=t,Cf(e.priority,function(){Dp(n)});return}}else if(t===31){if(t=h(n),t!==null){e.blockedOn=t,Cf(e.priority,function(){Dp(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 bo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=pd(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ec=l,n.target.dispatchEvent(l),ec=null}else return t=Ul(n),t!==null&&Ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){bo(e)&&n.delete(t)}function M0(){yd=!1,Wa!==null&&bo(Wa)&&(Wa=null),el!==null&&bo(el)&&(el=null),tl!==null&&bo(tl)&&(tl=null),zi.forEach(Lp),Ri.forEach(Lp)}function jo(e,t){e.blockedOn===t&&(e.blockedOn=null,yd||(yd=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,M0)))}var No=null;function Up(e){No!==e&&(No=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){No===e&&(No=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(gd(l||n)===null)continue;break}var r=Ul(n);r!==null&&(e.splice(t,3),t-=3,Wc(r,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Ss(e){function t(w){return jo(w,e)}Wa!==null&&jo(Wa,e),el!==null&&jo(el,e),tl!==null&&jo(tl,e),zi.forEach(t),Ri.forEach(t);for(var n=0;n<nl.length;n++){var l=nl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)Op(n),n.blockedOn===null&&nl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],r=n[l+1],f=i[Pt]||null;if(typeof r=="function")f||Up(n);else if(f){var v=null;if(r&&r.hasAttribute("formAction")){if(i=r,f=r[Pt]||null)v=f.formAction;else if(gd(i)!==null)continue}else v=f.action;typeof v=="function"?n[l+1]=v:(n.splice(l,3),l-=3),Up(n)}}}function Hp(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(f){return i=f})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function vd(e){this._internalRoot=e}wo.prototype.render=vd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=pn();zp(n,l,e,t,null,null)},wo.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zp(e.current,2,null,e,null,null),io(),t[Ll]=null}};function wo(e){this._internalRoot=e}wo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tf();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.splice(n,0,e),n===0&&Op(e)}};var Bp=o.version;if(Bp!=="19.3.1")throw Error(u(527,Bp,"19.3.1"));ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=b(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:fe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var So=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!So.isDisabled&&So.supportsFiber)try{Bs=So.inject(O0),on=So}catch{}}return _i.createRoot=function(e,t){if(!d(e))throw Error(u(299));var n=!1,l="",i=Em,r=zm,f=Rm;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError)),t=Cp(e,1,!1,null,null,n,l,null,i,r,f,Hp),e[Ll]=t.current,Ju(e),new vd(t)},_i.hydrateRoot=function(e,t,n){if(!d(e))throw Error(u(299));var l=!1,i="",r=Em,f=zm,v=Rm,w=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError),n.formState!==void 0&&(w=n.formState)),t=Cp(e,1,!0,t,n??null,l,i,w,r,f,v,Hp),t.context=Ep(null),n=t.current,l=pn(),l=Ko(l),i=qa(l),i.callback=null,Ga(n,i,l),n=l,t.current.lanes=n,Gs(t,n),la(t),e[Ll]=t.current,Ju(e),new wo(t)},_i.version="19.3.1",_i}var Jp;function V0(){if(Jp)return Nd.exports;Jp=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),Nd.exports=$0(),Nd.exports}var X0=V0();/**
|
|
50
|
-
* react-router v7.18.5
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var Pd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Hg=/^[\\/]{2}/;function Z0(s,o){return o+s.replace(/\\/g,"/")}var Pp="popstate";function Fp(s){return typeof s=="object"&&s!=null&&"pathname"in s&&"search"in s&&"hash"in s&&"state"in s&&"key"in s}function Q0(s={}){function o(d,m){let{pathname:p="/",search:h="",hash:x=""}=Ml(d.location.hash.substring(1));return!p.startsWith("/")&&!p.startsWith(".")&&(p="/"+p),Ld("",{pathname:p,search:h,hash:x},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function c(d,m){let p=d.document.querySelector("base"),h="";if(p&&p.getAttribute("href")){let x=d.location.href,b=x.indexOf("#");h=b===-1?x:x.slice(0,b)}return h+"#"+(typeof m=="string"?m:Cs(m))}function u(d,m){Mn(d.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return J0(o,c,u,s)}function it(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function Mn(s,o){if(!s){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function K0(){return Math.random().toString(36).substring(2,10)}function Ip(s,o){return{usr:s.state,key:s.key,idx:o,masked:s.mask?{pathname:s.pathname,search:s.search,hash:s.hash}:void 0}}function Ld(s,o,c=null,u,d){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof o=="string"?Ml(o):o,state:c,key:o&&o.key||u||K0(),mask:d}}function Cs({pathname:s="/",search:o="",hash:c=""}){return o&&o!=="?"&&(s+=o.charAt(0)==="?"?o:"?"+o),c&&c!=="#"&&(s+=c.charAt(0)==="#"?c:"#"+c),s}function Ml(s){let o={};if(s){let c=s.indexOf("#");c>=0&&(o.hash=s.substring(c),s=s.substring(0,c));let u=s.indexOf("?");u>=0&&(o.search=s.substring(u),s=s.substring(0,u)),s&&(o.pathname=s)}return o}function J0(s,o,c,u={}){let{window:d=document.defaultView,v5Compat:m=!1}=u,p=d.history,h="POP",x=null,b=j();b==null&&(b=0,p.replaceState({...p.state,idx:b},""));function j(){return(p.state||{idx:null}).idx}function y(){h="POP";let k=j(),_=k==null?null:k-b;b=k,x&&x({action:h,location:S.location,delta:_})}function N(k,_){h="PUSH";let R=Fp(k)?k:Ld(S.location,k,_);c&&c(R,k),b=j()+1;let X=Ip(R,b),z=S.createHref(R.mask||R);try{p.pushState(X,"",z)}catch(G){if(G instanceof DOMException&&G.name==="DataCloneError")throw G;d.location.assign(z)}m&&x&&x({action:h,location:S.location,delta:1})}function E(k,_){h="REPLACE";let R=Fp(k)?k:Ld(S.location,k,_);c&&c(R,k),b=j();let X=Ip(R,b),z=S.createHref(R.mask||R);p.replaceState(X,"",z),m&&x&&x({action:h,location:S.location,delta:0})}function H(k){return P0(d,k)}let S={get action(){return h},get location(){return s(d,p)},listen(k){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(Pp,y),x=k,()=>{d.removeEventListener(Pp,y),x=null}},createHref(k){return o(d,k)},createURL:H,encodeLocation(k){let _=H(k);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:N,replace:E,go(k){return p.go(k)}};return S}function P0(s,o,c=!1){let u="http://localhost";s&&(u=s.location.origin!=="null"?s.location.origin:s.location.href),it(u,"No window.location.(origin|href) available to create URL");let d=typeof o=="string"?o:Cs(o);return d=d.replace(/ $/,"%20"),!c&&Hg.test(d)&&(d=u+d),new URL(d,u)}function Bg(s,o,c="/"){return F0(s,o,c,!1)}function F0(s,o,c,u,d){let m=typeof o=="string"?Ml(o):o,p=Ta(m.pathname||"/",c);if(p==null)return null;let h=I0(s),x=null,b=c1(p);for(let j=0;x==null&&j<h.length;++j)x=o1(h[j],b,u);return x}function I0(s){let o=qg(s);return W0(o),o}function qg(s,o=[],c=[],u="",d=!1){let m=(p,h,x=d,b)=>{let j={relativePath:b===void 0?p.path||"":b,caseSensitive:p.caseSensitive===!0,childrenIndex:h,route:p};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(u)&&x)return;it(j.relativePath.startsWith(u),`Absolute route path "${j.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(u.length)}let y=$n([u,j.relativePath]),N=c.concat(j);p.children&&p.children.length>0&&(it(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),qg(p.children,o,N,y,x)),!(p.path==null&&!p.index)&&o.push({path:y,score:i1(y,p.index),routesMeta:N.map((E,H)=>{let[S,k]=$g(E.relativePath,E.caseSensitive,H===N.length-1);return{...E,matcher:S,compiledParams:k}})})};return s.forEach((p,h)=>{if(p.path===""||!p.path?.includes("?"))m(p,h);else for(let x of Gg(p.path))m(p,h,!0,x)}),o}function Gg(s){let o=s.split("/");if(o.length===0)return[];let[c,...u]=o,d=c.endsWith("?"),m=c.replace(/\?$/,"");if(u.length===0)return d?[m,""]:[m];let p=Gg(u.join("/")),h=[];return h.push(...p.map(x=>x===""?m:[m,x].join("/"))),d&&h.push(...p),h.map(x=>s.startsWith("/")&&x===""?"/":x)}function W0(s){s.sort((o,c)=>o.score!==c.score?c.score-o.score:r1(o.routesMeta.map(u=>u.childrenIndex),c.routesMeta.map(u=>u.childrenIndex)))}var e1=/^:[\w-]+$/,t1=3,n1=2,a1=1,l1=10,s1=-2,Wp=s=>s==="*";function i1(s,o){let c=s.split("/"),u=c.length;return c.some(Wp)&&(u+=s1),o&&(u+=n1),c.filter(d=>!Wp(d)).reduce((d,m)=>d+(e1.test(m)?t1:m===""?a1:l1),u)}function r1(s,o){return s.length===o.length&&s.slice(0,-1).every((u,d)=>u===o[d])?s[s.length-1]-o[o.length-1]:0}function o1(s,o,c=!1){let{routesMeta:u}=s,d={},m="/",p=[];for(let h=0;h<u.length;++h){let x=u[h],b=h===u.length-1,j=m==="/"?o:o.slice(m.length)||"/",y={path:x.relativePath,caseSensitive:x.caseSensitive,end:b},N=x.matcher&&x.compiledParams?Yg(y,j,x.matcher,x.compiledParams):_o(y,j),E=x.route;if(!N&&b&&c&&!u[u.length-1].route.index&&(N=_o({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},j)),!N)return null;Object.assign(d,N.params),p.push({params:d,pathname:$n([m,N.pathname]),pathnameBase:f1($n([m,N.pathnameBase])),route:E}),N.pathnameBase!=="/"&&(m=$n([m,N.pathnameBase]))}return p}function _o(s,o){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[c,u]=$g(s.path,s.caseSensitive,s.end);return Yg(s,o,c,u)}function Yg(s,o,c,u){let d=o.match(c);if(!d)return null;let m=d[0],p=Es(m,1),h=d.slice(1);return{params:u.reduce((b,{paramName:j,isOptional:y},N)=>{if(j==="*"){let H=h[N]||"";p=Es(m.slice(0,m.length-H.length),1)}const E=h[N];return y&&!E?b[j]=void 0:b[j]=(E||"").replace(/%2F/g,"/"),b},{}),pathname:m,pathnameBase:p,pattern:s}}function $g(s,o=!1,c=!0){Mn(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let u=[],d="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,h,x,b,j)=>{if(u.push({paramName:h,isOptional:x!=null}),x){let y=j.charAt(b+p.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(u.push({paramName:"*"}),d+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?d+="\\/*$":s!==""&&s!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),u]}function c1(s){try{return s.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Mn(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),s}}function Ta(s,o){if(o==="/")return s;if(!s.toLowerCase().startsWith(o.toLowerCase()))return null;let c=o.endsWith("/")?o.length-1:o.length,u=s.charAt(c);return u&&u!=="/"?null:s.slice(c)||"/"}function u1(s,o="/"){let{pathname:c,search:u="",hash:d=""}=typeof s=="string"?Ml(s):s,m;return c?(c=Xg(c),c.startsWith("/")||c.startsWith("\\")?m=eg(c.substring(1),"/"):m=eg(c,o)):m=o,{pathname:m,search:h1(u),hash:m1(d)}}function eg(s,o){let c=Es(o).split("/");return s.split("/").forEach(d=>{d===".."?c.length>1&&c.pop():d!=="."&&c.push(d)}),c.length>1?c.join("/"):"/"}function Td(s,o,c,u){return`Cannot include a '${s}' character in a manually specified \`to.${o}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function d1(s){return s.filter((o,c)=>c===0||o.route.path&&o.route.path.length>0)}function Vg(s){let o=d1(s);return o.map((c,u)=>u===o.length-1?c.pathname:c.pathnameBase)}function Fd(s,o,c,u=!1){let d;typeof s=="string"?d=Ml(s):(d={...s},it(!d.pathname||!d.pathname.includes("?"),Td("?","pathname","search",d)),it(!d.pathname||!d.pathname.includes("#"),Td("#","pathname","hash",d)),it(!d.search||!d.search.includes("#"),Td("#","search","hash",d)));let m=s===""||d.pathname==="",p=m?"/":d.pathname,h;if(p==null)h=c;else{let y=o.length-1;if(!u&&p.startsWith("..")){let N=p.split("/");for(;N[0]==="..";)N.shift(),y-=1;d.pathname=N.join("/")}h=y>=0?o[y]:"/"}let x=u1(d,h),b=p&&p!=="/"&&p.endsWith("/"),j=(m||p===".")&&c.endsWith("/");return!x.pathname.endsWith("/")&&(b||j)&&(x.pathname+="/"),x}var Xg=s=>s.replace(/[\\/]{2,}/g,"/"),$n=s=>Xg(s.join("/"));function Es(s,o=0){let c=s.length;for(;c>o&&s.charCodeAt(c-1)===47;)c--;return c===s.length?s:s.slice(0,c)}var f1=s=>Es(s).replace(/^\/*/,"/"),h1=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,m1=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,x1=class{constructor(s,o,c,u=!1){this.status=s,this.statusText=o||"",this.internal=u,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function p1(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function g1(s){let o=s.map(c=>c.route.path).filter(Boolean);return $n(o)||"/"}var Zg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qg(s,o){let c=s;if(typeof c!="string"||!Pd.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let u=c,d=!1;if(Zg)try{let m=new URL(window.location.href),p=Hg.test(c)?new URL(Z0(c,m.protocol)):new URL(c),h=Ta(p.pathname,o);p.origin===m.origin&&h!=null?c=h+p.search+p.hash:d=!0}catch{Mn(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:d,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var tg=new URL("http://localhost");function Kg(s){if(s.createURL)return s.createURL("/");try{return new URL(s.createHref("/"),tg)}catch{return tg}}function Cd(s,o){return s.origin===o.origin&&(s.origin!=="null"||s.protocol===o.protocol&&s.host===o.host)}function y1(s,o){if(s.startsWith("//"))return!0;let c=o.protocol.toLowerCase();return s.toLowerCase().startsWith(c)?o.host===""||s.slice(c.length).startsWith("//"):!1}function Jg(s,o,c,u){let d=null;try{d=s==null?null:new URL(s,c)}catch{}let m=new URL(o,c),p=d!=null&&!Cd(d,c),h=!Cd(m,c);if(u==="reject"){if(p||h)throw new Error("External navigation is not allowed")}else if(h&&(d==null||!y1(s,d)||!Cd(d,m)))throw new Error("External navigation is not allowed")}var Pg=["POST","PUT","PATCH","DELETE"];new Set(Pg);var v1=["GET",...Pg];new Set(v1);var b1=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function j1(s){try{return b1.includes(new URL(s).protocol)}catch{return!1}}var Ms=g.createContext(null);Ms.displayName="DataRouter";var Bo=g.createContext(null);Bo.displayName="DataRouterState";var Fg=g.createContext(!1);function N1(){return g.useContext(Fg)}var Ig=g.createContext({isTransitioning:!1});Ig.displayName="ViewTransition";var w1=g.createContext(new Map);w1.displayName="Fetchers";var S1=g.createContext(null);S1.displayName="Await";var Ln=g.createContext(null);Ln.displayName="Navigation";var Gi=g.createContext(null);Gi.displayName="Location";var sa=g.createContext({outlet:null,matches:[],isDataRoute:!1});sa.displayName="Route";var Id=g.createContext(null);Id.displayName="RouteError";var Wg="REACT_ROUTER_ERROR",k1="REDIRECT",T1="ROUTE_ERROR_RESPONSE";function C1(s){if(s.startsWith(`${Wg}:${k1}:{`))try{let o=JSON.parse(s.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function E1(s){if(s.startsWith(`${Wg}:${T1}:{`))try{let o=JSON.parse(s.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new x1(o.status,o.statusText,o.data)}catch{}}function z1(s,{relative:o}={}){it(Yi(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:u}=g.useContext(Ln),{hash:d,pathname:m,search:p}=Vi(s,{relative:o}),h=m;return c!=="/"&&(h=m==="/"?c:$n([c,m])),u.createHref({pathname:h,search:p,hash:d})}function Yi(){return g.useContext(Gi)!=null}function vn(){return it(Yi(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Gi).location}var ey="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ty(s){g.useContext(Ln).static||g.useLayoutEffect(s)}function $i(){let{isDataRoute:s}=g.useContext(sa);return s?V1():R1()}function R1(){it(Yi(),"useNavigate() may be used only in the context of a <Router> component.");let s=g.useContext(Ms),{basename:o,navigator:c}=g.useContext(Ln),{matches:u}=g.useContext(sa),{pathname:d}=vn(),m=JSON.stringify(Vg(u)),p=g.useRef(!1);return ty(()=>{p.current=!0}),g.useCallback((x,b={})=>{if(Mn(p.current,ey),!p.current)return;if(typeof x=="number"){c.go(x);return}let j=Fd(x,JSON.parse(m),d,b.relative==="path");s==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:$n([o,j.pathname])),Jg(typeof x=="string"?x:Cs(x),c.createHref(j),Kg(c),"reject"),(b.replace?c.replace:c.push)(j,b.state,b)},[o,c,m,d,s])}var A1=g.createContext(null);function D1(s){let o=g.useContext(sa).outlet;return g.useMemo(()=>o&&g.createElement(A1.Provider,{value:s},o),[o,s])}function Vi(s,{relative:o}={}){let{matches:c}=g.useContext(sa),{pathname:u}=vn(),d=JSON.stringify(Vg(c));return g.useMemo(()=>Fd(s,JSON.parse(d),u,o==="path"),[s,d,u,o])}function _1(s,o){return ny(s,o)}function ny(s,o,c){it(Yi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=g.useContext(Ln),{matches:d}=g.useContext(sa),m=d[d.length-1],p=m?m.params:{},h=m?m.pathname:"/",x=m?m.pathnameBase:"/",b=m&&m.route;{let k=b&&b.path||"";ly(h,!b||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let j=vn(),y;if(o){let k=typeof o=="string"?Ml(o):o;it(x==="/"||k.pathname?.startsWith(x),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${k.pathname}" was given in the \`location\` prop.`),y=k}else y=j;let N=y.pathname||"/",E=N;if(x!=="/"){let k=x.replace(/^\//,"").split("/");E="/"+N.replace(/^\//,"").split("/").slice(k.length).join("/")}let H=c&&c.state.matches.length?c.state.matches.map(k=>Object.assign(k,{route:c.manifest[k.route.id]||k.route})):Bg(s,{pathname:E});Mn(b||H!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Mn(H==null||H[H.length-1].route.element!==void 0||H[H.length-1].route.Component!==void 0||H[H.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let S=H1(H&&H.map(k=>Object.assign({},k,{params:Object.assign({},p,k.params),pathname:$n([x,u.encodeLocation?u.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?x:$n([x,u.encodeLocation?u.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),d,c);return o&&S?g.createElement(Gi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...y},navigationType:"POP"}},S):S}function M1(){let s=$1(),o=p1(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),c=s instanceof Error?s.stack:null,u="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:u},m={padding:"2px 4px",backgroundColor:u},p=null;return console.error("Error handled by React Router default ErrorBoundary:",s),p=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:m},"ErrorBoundary")," or"," ",g.createElement("code",{style:m},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},o),c?g.createElement("pre",{style:d},c):null,p)}var O1=g.createElement(M1,null),ay=class extends g.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,o){return o.location!==s.location||o.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:o.error,location:o.location,revalidation:s.revalidation||o.revalidation}}componentDidCatch(s,o){this.props.onError?this.props.onError(s,o):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const c=E1(s.digest);c&&(s=c)}let o=s!==void 0?g.createElement(sa.Provider,{value:this.props.routeContext},g.createElement(Id.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?g.createElement(L1,{error:s},o):o}};ay.contextType=Fg;var Ed=new WeakMap;function L1({children:s,error:o}){let{basename:c,navigator:u}=g.useContext(Ln);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let d=C1(o.digest);if(d){let m=Ed.get(o);if(m)throw m;let p=Qg(d.location,c),h=p.absoluteURL||p.to;if(Jg(d.location,h,Kg(u),"allow-explicit"),j1(h))throw new Error("Invalid redirect location");if(Zg&&!Ed.get(o))if(p.isExternal||d.reloadDocument)window.location.href=h;else{const x=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:d.replace}));throw Ed.set(o,x),x}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return s}function U1({routeContext:s,match:o,children:c}){let u=g.useContext(Ms);return u&&u.static&&u.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=o.route.id),g.createElement(sa.Provider,{value:s},c)}function H1(s,o=[],c){let u=c?.state;if(s==null){if(!u)return null;if(u.errors)s=u.matches;else if(o.length===0&&!u.initialized&&u.matches.length>0)s=u.matches;else return null}let d=s,m=u?.errors;if(m!=null){let j=d.findIndex(y=>y.route.id&&m?.[y.route.id]!==void 0);it(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),d=d.slice(0,Math.min(d.length,j+1))}let p=!1,h=-1;if(c&&u){p=u.renderFallback;for(let j=0;j<d.length;j++){let y=d[j];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(h=j),y.route.id){let{loaderData:N,errors:E}=u,H=y.route.loader&&!N.hasOwnProperty(y.route.id)&&(!E||E[y.route.id]===void 0);if(y.route.lazy||H){c.isStatic&&(p=!0),h>=0?d=d.slice(0,h+1):d=[d[0]];break}}}}let x=c?.onError,b=u&&x?(j,y)=>{x(j,{location:u.location,params:u.matches?.[0]?.params??{},pattern:g1(u.matches),errorInfo:y})}:void 0;return d.reduceRight((j,y,N)=>{let E,H=!1,S=null,k=null;u&&(E=m&&y.route.id?m[y.route.id]:void 0,S=y.route.errorElement||O1,p&&(h<0&&N===0?(ly("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),H=!0,k=null):h===N&&(H=!0,k=y.route.hydrateFallbackElement||null)));let _=o.concat(d.slice(0,N+1)),R=()=>{let X;return E?X=S:H?X=k:y.route.Component?X=g.createElement(y.route.Component,null):y.route.element?X=y.route.element:X=j,g.createElement(U1,{match:y,routeContext:{outlet:j,matches:_,isDataRoute:u!=null},children:X})};return u&&(y.route.ErrorBoundary||y.route.errorElement||N===0)?g.createElement(ay,{location:u.location,revalidation:u.revalidation,component:S,error:E,children:R(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:b}):R()},null)}function Wd(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B1(s){let o=g.useContext(Ms);return it(o,Wd(s)),o}function q1(s){let o=g.useContext(Bo);return it(o,Wd(s)),o}function G1(s){let o=g.useContext(sa);return it(o,Wd(s)),o}function ef(s){let o=G1(s),c=o.matches[o.matches.length-1];return it(c.route.id,`${s} can only be used on routes that contain a unique "id"`),c.route.id}function Y1(){return ef("useRouteId")}function $1(){let s=g.useContext(Id),o=q1("useRouteError"),c=ef("useRouteError");return s!==void 0?s:o.errors?.[c]}function V1(){let{router:s}=B1("useNavigate"),o=ef("useNavigate"),c=g.useRef(!1);return ty(()=>{c.current=!0}),g.useCallback(async(d,m={})=>{Mn(c.current,ey),c.current&&(typeof d=="number"?await s.navigate(d):await s.navigate(d,{fromRouteId:o,...m}))},[s,o])}var ng={};function ly(s,o,c){!o&&!ng[s]&&(ng[s]=!0,Mn(!1,c))}g.memo(X1);function X1({routes:s,manifest:o,future:c,state:u,isStatic:d,onError:m}){return ny(s,void 0,{manifest:o,state:u,isStatic:d,onError:m})}function Z1(s){return D1(s.context)}function An(s){it(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Q1({basename:s="/",children:o=null,location:c,navigationType:u="POP",navigator:d,static:m=!1,useTransitions:p}){it(!Yi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=s.replace(/^\/*/,"/"),x=g.useMemo(()=>({basename:h,navigator:d,static:m,useTransitions:p,future:{}}),[h,d,m,p]);typeof c=="string"&&(c=Ml(c));let{pathname:b="/",search:j="",hash:y="",state:N=null,key:E="default",mask:H}=c,S=g.useMemo(()=>{let k=Ta(b,h);return k==null?null:{location:{pathname:k,search:j,hash:y,state:N,key:E,mask:H},navigationType:u}},[h,b,j,y,N,E,u,H]);return Mn(S!=null,`<Router basename="${h}"> is not able to match the URL "${b}${j}${y}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:g.createElement(Ln.Provider,{value:x},g.createElement(Gi.Provider,{children:o,value:S}))}function K1({children:s,location:o}){return _1(Ud(s),o)}function Ud(s,o=[]){let c=[];return g.Children.forEach(s,(u,d)=>{if(!g.isValidElement(u))return;let m=[...o,d];if(u.type===g.Fragment){c.push.apply(c,Ud(u.props.children,m));return}it(u.type===An,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!u.props.index||!u.props.children,"An index route cannot have child routes.");let p={id:u.props.id||m.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(p.children=Ud(u.props.children,m)),c.push(p)}),c}var zo="get",Ro="application/x-www-form-urlencoded";function qo(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function J1(s){return qo(s)&&s.tagName.toLowerCase()==="button"}function P1(s){return qo(s)&&s.tagName.toLowerCase()==="form"}function F1(s){return qo(s)&&s.tagName.toLowerCase()==="input"}function I1(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function W1(s,o){return s.button===0&&(!o||o==="_self")&&!I1(s)}function Hd(s=""){return new URLSearchParams(typeof s=="string"||Array.isArray(s)||s instanceof URLSearchParams?s:Object.keys(s).reduce((o,c)=>{let u=s[c];return o.concat(Array.isArray(u)?u.map(d=>[c,d]):[[c,u]])},[]))}function ej(s,o){let c=Hd(s);return o&&o.forEach((u,d)=>{c.has(d)||o.getAll(d).forEach(m=>{c.append(d,m)})}),c}var ko=null;function tj(){if(ko===null)try{new FormData(document.createElement("form"),0),ko=!1}catch{ko=!0}return ko}var nj=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zd(s){return s!=null&&!nj.has(s)?(Mn(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ro}"`),null):s}function aj(s,o){let c,u,d,m,p;if(P1(s)){let h=s.getAttribute("action");u=h?Ta(h,o):null,c=s.getAttribute("method")||zo,d=zd(s.getAttribute("enctype"))||Ro,m=new FormData(s)}else if(J1(s)||F1(s)&&(s.type==="submit"||s.type==="image")){let h=s.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=s.getAttribute("formaction")||h.getAttribute("action");if(u=x?Ta(x,o):null,c=s.getAttribute("formmethod")||h.getAttribute("method")||zo,d=zd(s.getAttribute("formenctype"))||zd(h.getAttribute("enctype"))||Ro,m=new FormData(h,s),!tj()){let{name:b,type:j,value:y}=s;if(j==="image"){let N=b?`${b}.`:"";m.append(`${N}x`,"0"),m.append(`${N}y`,"0")}else b&&m.append(b,y)}}else{if(qo(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=zo,u=null,d=Ro,p=s}return m&&d==="text/plain"&&(p=m,m=void 0),{action:u,method:c.toLowerCase(),encType:d,formData:m,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function tf(s,o){if(s===!1||s===null||typeof s>"u")throw new Error(o)}function sy(s,o,c,u){let d=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return c?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${u}`:d.pathname=`${d.pathname}.${u}`:d.pathname==="/"?d.pathname=`_root.${u}`:o&&Ta(d.pathname,o)==="/"?d.pathname=`${Es(o)}/_root.${u}`:d.pathname=`${Es(d.pathname)}.${u}`,d}async function lj(s,o){if(s.id in o)return o[s.id];try{let c=await import(s.module);return o[s.id]=c,c}catch(c){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sj(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function ij(s,o,c){let u=await Promise.all(s.map(async d=>{let m=o.routes[d.route.id];if(m){let p=await lj(m,c);return p.links?p.links():[]}return[]}));return uj(u.flat(1).filter(sj).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function ag(s,o,c,u,d,m){let p=(x,b)=>c[b]?x.route.id!==c[b].route.id:!0,h=(x,b)=>c[b].pathname!==x.pathname||c[b].route.path?.endsWith("*")&&c[b].params["*"]!==x.params["*"];return m==="assets"?o.filter((x,b)=>p(x,b)||h(x,b)):m==="data"?o.filter((x,b)=>{let j=u.routes[x.route.id];if(!j||!j.hasLoader)return!1;if(p(x,b)||h(x,b))return!0;if(x.route.shouldRevalidate){let y=x.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:c[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function rj(s,o,{includeHydrateFallback:c}={}){return oj(s.map(u=>{let d=o.routes[u.route.id];if(!d)return[];let m=[d.module];return d.clientActionModule&&(m=m.concat(d.clientActionModule)),d.clientLoaderModule&&(m=m.concat(d.clientLoaderModule)),c&&d.hydrateFallbackModule&&(m=m.concat(d.hydrateFallbackModule)),d.imports&&(m=m.concat(d.imports)),m}).flat(1))}function oj(s){return[...new Set(s)]}function cj(s){let o={},c=Object.keys(s).sort();for(let u of c)o[u]=s[u];return o}function uj(s,o){let c=new Set;return new Set(o),s.reduce((u,d)=>{let m=JSON.stringify(cj(d));return c.has(m)||(c.add(m),u.push({key:m,link:d})),u},[])}function nf(){let s=g.useContext(Ms);return tf(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function dj(){let s=g.useContext(Bo);return tf(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var af=g.createContext(void 0);af.displayName="FrameworkContext";function Go(){let s=g.useContext(af);return tf(s,"You must render this element inside a <HydratedRouter> element"),s}function fj(s,o){let c=g.useContext(af),[u,d]=g.useState(!1),[m,p]=g.useState(!1),{onFocus:h,onBlur:x,onMouseEnter:b,onMouseLeave:j,onTouchStart:y}=o,N=g.useRef(null);g.useEffect(()=>{if(s==="render"&&p(!0),s==="viewport"){let S=_=>{_.forEach(R=>{p(R.isIntersecting)})},k=new IntersectionObserver(S,{threshold:.5});return N.current&&k.observe(N.current),()=>{k.disconnect()}}},[s]),g.useEffect(()=>{if(u){let S=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(S)}}},[u]);let E=()=>{d(!0)},H=()=>{d(!1),p(!1)};return c?s!=="intent"?[m,N,{}]:[m,N,{onFocus:Mi(h,E),onBlur:Mi(x,H),onMouseEnter:Mi(b,E),onMouseLeave:Mi(j,H),onTouchStart:Mi(y,E)}]:[!1,N,{}]}function Mi(s,o){return c=>{s&&s(c),c.defaultPrevented||o(c)}}function hj({page:s,...o}){let c=N1(),{nonce:u}=Go(),{router:d}=nf(),m=g.useMemo(()=>Bg(d.routes,s,d.basename),[d.routes,s,d.basename]);return m?(o.nonce==null&&u&&(o={...o,nonce:u}),c?g.createElement(xj,{page:s,matches:m,...o}):g.createElement(pj,{page:s,matches:m,...o})):null}function mj(s){let{manifest:o,routeModules:c}=Go(),[u,d]=g.useState([]);return g.useEffect(()=>{let m=!1;return ij(s,o,c).then(p=>{m||d(p)}),()=>{m=!0}},[s,o,c]),u}function xj({page:s,matches:o,...c}){let u=vn(),{future:d}=Go(),{basename:m}=nf(),p=g.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let h=sy(s,m,d.v8_trailingSlashAwareDataRequests,"rsc"),x=!1,b=[];for(let j of o)typeof j.route.shouldRevalidate=="function"?x=!0:b.push(j.route.id);return x&&b.length>0&&h.searchParams.set("_routes",b.join(",")),[h.pathname+h.search]},[m,d.v8_trailingSlashAwareDataRequests,s,u,o]);return g.createElement(g.Fragment,null,p.map(h=>g.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...c})))}function pj({page:s,matches:o,...c}){let u=vn(),{future:d,manifest:m,routeModules:p}=Go(),{basename:h}=nf(),{loaderData:x,matches:b}=dj(),j=g.useMemo(()=>ag(s,o,b,m,u,"data"),[s,o,b,m,u]),y=g.useMemo(()=>ag(s,o,b,m,u,"assets"),[s,o,b,m,u]),N=g.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let S=new Set,k=!1;if(o.forEach(R=>{let X=m.routes[R.route.id];!X||!X.hasLoader||(!j.some(z=>z.route.id===R.route.id)&&R.route.id in x&&p[R.route.id]?.shouldRevalidate||X.hasClientLoader?k=!0:S.add(R.route.id))}),S.size===0)return[];let _=sy(s,h,d.v8_trailingSlashAwareDataRequests,"data");return k&&S.size>0&&_.searchParams.set("_routes",o.filter(R=>S.has(R.route.id)).map(R=>R.route.id).join(",")),[_.pathname+_.search]},[h,d.v8_trailingSlashAwareDataRequests,x,u,m,j,o,s,p]),E=g.useMemo(()=>rj(y,m),[y,m]),H=mj(y);return g.createElement(g.Fragment,null,N.map(S=>g.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...c})),E.map(S=>g.createElement("link",{key:S,rel:"modulepreload",href:S,...c})),H.map(({key:S,link:k})=>g.createElement("link",{key:S,nonce:c.nonce,...k,crossOrigin:k.crossOrigin??c.crossOrigin})))}function gj(...s){return o=>{s.forEach(c=>{typeof c=="function"?c(o):c!=null&&(c.current=o)})}}var yj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{yj&&(window.__reactRouterVersion="7.18.5")}catch{}function vj({basename:s,children:o,useTransitions:c,window:u}){let d=g.useRef();d.current==null&&(d.current=Q0({window:u,v5Compat:!0}));let m=d.current,[p,h]=g.useState({action:m.action,location:m.location}),x=g.useCallback(b=>{c===!1?h(b):g.startTransition(()=>h(b))},[c]);return g.useLayoutEffect(()=>m.listen(x),[m,x]),g.createElement(Q1,{basename:s,children:o,location:p.location,navigationType:p.action,navigator:m,useTransitions:c})}var bt=g.forwardRef(function({onClick:o,discover:c="render",prefetch:u="none",relative:d,reloadDocument:m,replace:p,mask:h,state:x,target:b,to:j,preventScrollReset:y,viewTransition:N,defaultShouldRevalidate:E,...H},S){let{basename:k,navigator:_,useTransitions:R}=g.useContext(Ln),X=typeof j=="string"&&Pd.test(j),z=Qg(j,k);j=z.to;let G=z1(j,{relative:d}),ne=vn(),U=null;if(h){let F=Fd(h,[],ne.mask?ne.mask.pathname:"/",!0);k!=="/"&&(F.pathname=F.pathname==="/"?k:$n([k,F.pathname])),U=_.createHref(F)}let[J,ce,P]=fj(u,H),ae=Nj(j,{replace:p,mask:h,state:x,target:b,preventScrollReset:y,relative:d,viewTransition:N,defaultShouldRevalidate:E,useTransitions:R});function M(F){o&&o(F),F.defaultPrevented||ae(F)}let A=!(z.isExternal||m),le=g.createElement("a",{...H,...P,href:(A?U:void 0)||z.absoluteURL||G,onClick:A?M:o,ref:gj(S,ce),target:b,"data-discover":!X&&c==="render"?"true":void 0});return J&&!X?g.createElement(g.Fragment,null,le,g.createElement(hj,{page:G})):le});bt.displayName="Link";var iy=g.forwardRef(function({"aria-current":o="page",caseSensitive:c=!1,className:u="",end:d=!1,style:m,to:p,viewTransition:h,children:x,...b},j){let y=Vi(p,{relative:b.relative}),N=vn(),E=g.useContext(Bo),{navigator:H,basename:S}=g.useContext(Ln),k=E!=null&&Cj(y)&&h===!0,_=H.encodeLocation?H.encodeLocation(y).pathname:y.pathname,R=N.pathname,X=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;c||(R=R.toLowerCase(),X=X?X.toLowerCase():null,_=_.toLowerCase()),X&&S&&(X=Ta(X,S)||X);const z=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let G=R===_||!d&&R.startsWith(_)&&R.charAt(z)==="/",ne=X!=null&&(X===_||!d&&X.startsWith(_)&&X.charAt(_.length)==="/"),U={isActive:G,isPending:ne,isTransitioning:k},J=G?o:void 0,ce;typeof u=="function"?ce=u(U):ce=[u,G?"active":null,ne?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let P=typeof m=="function"?m(U):m;return g.createElement(bt,{...b,"aria-current":J,className:ce,ref:j,style:P,to:p,viewTransition:h},typeof x=="function"?x(U):x)});iy.displayName="NavLink";var bj=g.forwardRef(({discover:s="render",fetcherKey:o,navigate:c,reloadDocument:u,replace:d,state:m,method:p=zo,action:h,onSubmit:x,relative:b,preventScrollReset:j,viewTransition:y,defaultShouldRevalidate:N,...E},H)=>{let{useTransitions:S}=g.useContext(Ln),k=kj(),_=Tj(h,{relative:b}),R=p.toLowerCase()==="get"?"get":"post",X=typeof h=="string"&&Pd.test(h),z=G=>{if(x&&x(G),G.defaultPrevented)return;G.preventDefault();let ne=G.nativeEvent.submitter,U=ne?.getAttribute("formmethod")||p,J=()=>k(ne||G.currentTarget,{fetcherKey:o,method:U,navigate:c,replace:d,state:m,relative:b,preventScrollReset:j,viewTransition:y,defaultShouldRevalidate:N});S&&c!==!1?g.startTransition(()=>J()):J()};return g.createElement("form",{ref:H,method:R,action:_,onSubmit:u?x:z,...E,"data-discover":!X&&s==="render"?"true":void 0})});bj.displayName="Form";function jj(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ry(s){let o=g.useContext(Ms);return it(o,jj(s)),o}function Nj(s,{target:o,replace:c,mask:u,state:d,preventScrollReset:m,relative:p,viewTransition:h,defaultShouldRevalidate:x,useTransitions:b}={}){let j=$i(),y=vn(),N=Vi(s,{relative:p});return g.useCallback(E=>{if(W1(E,o)){E.preventDefault();let H=c!==void 0?c:Cs(y)===Cs(N),S=()=>j(s,{replace:H,mask:u,state:d,preventScrollReset:m,relative:p,viewTransition:h,defaultShouldRevalidate:x});b?g.startTransition(()=>S()):S()}},[y,j,N,c,u,d,o,s,m,p,h,x,b])}function Yo(s){Mn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let o=g.useRef(Hd(s)),c=g.useRef(!1),u=vn(),d=g.useMemo(()=>ej(u.search,c.current?null:o.current),[u.search]),m=$i(),p=g.useCallback((h,x)=>{const b=Hd(typeof h=="function"?h(new URLSearchParams(d)):h);c.current=!0,m("?"+b,x)},[m,d]);return[d,p]}var wj=0,Sj=()=>`__${String(++wj)}__`;function kj(){let{router:s}=ry("useSubmit"),{basename:o}=g.useContext(Ln),c=Y1(),u=s.fetch,d=s.navigate;return g.useCallback(async(m,p={})=>{let{action:h,method:x,encType:b,formData:j,body:y}=aj(m,o);if(p.navigate===!1){let N=p.fetcherKey||Sj();await u(N,c,p.action||h,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:j,body:y,formMethod:p.method||x,formEncType:p.encType||b,flushSync:p.flushSync})}else await d(p.action||h,{defaultShouldRevalidate:p.defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:j,body:y,formMethod:p.method||x,formEncType:p.encType||b,replace:p.replace,state:p.state,fromRouteId:c,flushSync:p.flushSync,viewTransition:p.viewTransition})},[u,d,o,c])}function Tj(s,{relative:o}={}){let{basename:c}=g.useContext(Ln),u=g.useContext(sa);it(u,"useFormAction must be used inside a RouteContext");let[d]=u.matches.slice(-1),m={...Vi(s||".",{relative:o})},p=vn();if(s==null){m.search=p.search;let h=new URLSearchParams(m.search),x=h.getAll("index");if(x.some(j=>j==="")){h.delete("index"),x.filter(y=>y).forEach(y=>h.append("index",y));let j=h.toString();m.search=j?`?${j}`:""}}return(!s||s===".")&&d.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(m.pathname=m.pathname==="/"?c:$n([c,m.pathname])),Cs(m)}function Cj(s,{relative:o}={}){let c=g.useContext(Ig);it(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=ry("useViewTransitionState"),d=Vi(s,{relative:o});if(!c.isTransitioning)return!1;let m=Ta(c.currentLocation.pathname,u)||c.currentLocation.pathname,p=Ta(c.nextLocation.pathname,u)||c.nextLocation.pathname;return _o(d.pathname,p)!=null||_o(d.pathname,m)!=null}var Ej=Ug();const oy="ez-theme",cy=g.createContext(null);function zj(){try{const s=localStorage.getItem(oy);if(s==="light"||s==="dark")return s}catch{}return"dark"}function Rj({children:s}){const[o,c]=g.useState(zj);g.useEffect(()=>{document.documentElement.dataset.theme=o;try{localStorage.setItem(oy,o)}catch{}},[o]);const u=g.useCallback(()=>{c(m=>m==="dark"?"light":"dark")},[]),d=g.useMemo(()=>({theme:o,setTheme:c,toggleTheme:u}),[o,u]);return a.jsx(cy.Provider,{value:d,children:s})}function uy(){const s=g.useContext(cy);if(!s)throw new Error("useTheme must be used inside ThemeProvider");return s}/**
|
|
61
|
-
* @license lucide-react v0.511.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const Aj=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dj=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,c,u)=>u?u.toUpperCase():c.toLowerCase()),lg=s=>{const o=Dj(s);return o.charAt(0).toUpperCase()+o.slice(1)},dy=(...s)=>s.filter((o,c,u)=>!!o&&o.trim()!==""&&u.indexOf(o)===c).join(" ").trim(),_j=s=>{for(const o in s)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};/**
|
|
66
|
-
* @license lucide-react v0.511.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/var Mj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
71
|
-
* @license lucide-react v0.511.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const Oj=g.forwardRef(({color:s="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:d="",children:m,iconNode:p,...h},x)=>g.createElement("svg",{ref:x,...Mj,width:o,height:o,stroke:s,strokeWidth:u?Number(c)*24/Number(o):c,className:dy("lucide",d),...!m&&!_j(h)&&{"aria-hidden":"true"},...h},[...p.map(([b,j])=>g.createElement(b,j)),...Array.isArray(m)?m:[m]]));/**
|
|
76
|
-
* @license lucide-react v0.511.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const ue=(s,o)=>{const c=g.forwardRef(({className:u,...d},m)=>g.createElement(Oj,{ref:m,iconNode:o,className:dy(`lucide-${Aj(lg(s))}`,`lucide-${s}`,u),...d}));return c.displayName=lg(s),c};/**
|
|
81
|
-
* @license lucide-react v0.511.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const Lj=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Mo=ue("activity",Lj);/**
|
|
86
|
-
* @license lucide-react v0.511.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const Uj=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Hj=ue("arrow-down",Uj);/**
|
|
91
|
-
* @license lucide-react v0.511.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const Bj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],qj=ue("arrow-left",Bj);/**
|
|
96
|
-
* @license lucide-react v0.511.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Gj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Os=ue("arrow-right",Gj);/**
|
|
101
|
-
* @license lucide-react v0.511.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Yj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]],$j=ue("bell-off",Yj);/**
|
|
106
|
-
* @license lucide-react v0.511.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const Vj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}]],sg=ue("bell-ring",Vj);/**
|
|
111
|
-
* @license lucide-react v0.511.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const Xj=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],lf=ue("bell",Xj);/**
|
|
116
|
-
* @license lucide-react v0.511.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const Zj=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],fy=ue("boxes",Zj);/**
|
|
121
|
-
* @license lucide-react v0.511.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const Qj=[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]],Kj=ue("cable",Qj);/**
|
|
126
|
-
* @license lucide-react v0.511.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Jj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],hy=ue("check",Jj);/**
|
|
131
|
-
* @license lucide-react v0.511.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const Pj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fj=ue("chevron-down",Pj);/**
|
|
136
|
-
* @license lucide-react v0.511.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const Ij=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Wj=ue("chevron-right",Ij);/**
|
|
141
|
-
* @license lucide-react v0.511.0 - ISC
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the ISC license.
|
|
144
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/const e2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],t2=ue("circle-alert",e2);/**
|
|
146
|
-
* @license lucide-react v0.511.0 - ISC
|
|
147
|
-
*
|
|
148
|
-
* This source code is licensed under the ISC license.
|
|
149
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const n2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dl=ue("circle-check",n2);/**
|
|
151
|
-
* @license lucide-react v0.511.0 - ISC
|
|
152
|
-
*
|
|
153
|
-
* This source code is licensed under the ISC license.
|
|
154
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const a2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Bd=ue("circle-x",a2);/**
|
|
156
|
-
* @license lucide-react v0.511.0 - ISC
|
|
157
|
-
*
|
|
158
|
-
* This source code is licensed under the ISC license.
|
|
159
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
-
*/const l2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],s2=ue("code-xml",l2);/**
|
|
161
|
-
* @license lucide-react v0.511.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*/const i2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],r2=ue("copy",i2);/**
|
|
166
|
-
* @license lucide-react v0.511.0 - ISC
|
|
167
|
-
*
|
|
168
|
-
* This source code is licensed under the ISC license.
|
|
169
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const o2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],qd=ue("download",o2);/**
|
|
171
|
-
* @license lucide-react v0.511.0 - ISC
|
|
172
|
-
*
|
|
173
|
-
* This source code is licensed under the ISC license.
|
|
174
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const c2=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_l=ue("earth",c2);/**
|
|
176
|
-
* @license lucide-react v0.511.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* This source code is licensed under the ISC license.
|
|
179
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
-
*/const u2=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],d2=ue("eye-off",u2);/**
|
|
181
|
-
* @license lucide-react v0.511.0 - ISC
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the ISC license.
|
|
184
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
-
*/const f2=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],h2=ue("eye",f2);/**
|
|
186
|
-
* @license lucide-react v0.511.0 - ISC
|
|
187
|
-
*
|
|
188
|
-
* This source code is licensed under the ISC license.
|
|
189
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const m2=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],x2=ue("flask-conical",m2);/**
|
|
191
|
-
* @license lucide-react v0.511.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const p2=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],g2=ue("folder-input",p2);/**
|
|
196
|
-
* @license lucide-react v0.511.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const y2=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],v2=ue("gauge",y2);/**
|
|
201
|
-
* @license lucide-react v0.511.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const b2=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],j2=ue("git-branch",b2);/**
|
|
206
|
-
* @license lucide-react v0.511.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const N2=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],w2=ue("history",N2);/**
|
|
211
|
-
* @license lucide-react v0.511.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const S2=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],k2=ue("inbox",S2);/**
|
|
216
|
-
* @license lucide-react v0.511.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const T2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],my=ue("info",T2);/**
|
|
221
|
-
* @license lucide-react v0.511.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const C2=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Xi=ue("key-round",C2);/**
|
|
226
|
-
* @license lucide-react v0.511.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/const E2=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],z2=ue("layout-dashboard",E2);/**
|
|
231
|
-
* @license lucide-react v0.511.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const R2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],A2=ue("link-2-off",R2);/**
|
|
236
|
-
* @license lucide-react v0.511.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/const D2=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],_2=ue("link-2",D2);/**
|
|
241
|
-
* @license lucide-react v0.511.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const M2=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],O2=ue("list",M2);/**
|
|
246
|
-
* @license lucide-react v0.511.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const L2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],sl=ue("loader-circle",L2);/**
|
|
251
|
-
* @license lucide-react v0.511.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const U2=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],sf=ue("lock",U2);/**
|
|
256
|
-
* @license lucide-react v0.511.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const H2=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],B2=ue("log-out",H2);/**
|
|
261
|
-
* @license lucide-react v0.511.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const q2=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],G2=ue("menu",q2);/**
|
|
266
|
-
* @license lucide-react v0.511.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const Y2=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],xy=ue("moon",Y2);/**
|
|
271
|
-
* @license lucide-react v0.511.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const $2=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],py=ue("pause",$2);/**
|
|
276
|
-
* @license lucide-react v0.511.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const V2=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],rf=ue("pencil",V2);/**
|
|
281
|
-
* @license lucide-react v0.511.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const X2=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Zi=ue("play",X2);/**
|
|
286
|
-
* @license lucide-react v0.511.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const Z2=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],Q2=ue("plug-zap",Z2);/**
|
|
291
|
-
* @license lucide-react v0.511.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const K2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ca=ue("plus",K2);/**
|
|
296
|
-
* @license lucide-react v0.511.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const J2=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],P2=ue("power-off",J2);/**
|
|
301
|
-
* @license lucide-react v0.511.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const F2=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],I2=ue("power",F2);/**
|
|
306
|
-
* @license lucide-react v0.511.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const W2=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Lt=ue("refresh-cw",W2);/**
|
|
311
|
-
* @license lucide-react v0.511.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const eN=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],Bi=ue("rocket",eN);/**
|
|
316
|
-
* @license lucide-react v0.511.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const tN=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],nN=ue("rotate-ccw",tN);/**
|
|
321
|
-
* @license lucide-react v0.511.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const aN=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],of=ue("rotate-cw",aN);/**
|
|
326
|
-
* @license lucide-react v0.511.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const lN=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Gd=ue("save",lN);/**
|
|
331
|
-
* @license lucide-react v0.511.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const sN=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],qi=ue("scroll-text",sN);/**
|
|
336
|
-
* @license lucide-react v0.511.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const iN=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rN=ue("search",iN);/**
|
|
341
|
-
* @license lucide-react v0.511.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const oN=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],gy=ue("send",oN);/**
|
|
346
|
-
* @license lucide-react v0.511.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const cN=[["path",{d:"m10.852 14.772-.383.923",key:"11vil6"}],["path",{d:"M13.148 14.772a3 3 0 1 0-2.296-5.544l-.383-.923",key:"1v3clb"}],["path",{d:"m13.148 9.228.383-.923",key:"t2zzyc"}],["path",{d:"m13.53 15.696-.382-.924a3 3 0 1 1-2.296-5.544",key:"1bxfiv"}],["path",{d:"m14.772 10.852.923-.383",key:"k9m8cz"}],["path",{d:"m14.772 13.148.923.383",key:"1xvhww"}],["path",{d:"M4.5 10H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-.5",key:"tn8das"}],["path",{d:"M4.5 14H4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2h-.5",key:"1g2pve"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M6 6h.01",key:"1utrut"}],["path",{d:"m9.228 10.852-.923-.383",key:"1wtb30"}],["path",{d:"m9.228 13.148-.923.383",key:"1a830x"}]],yy=ue("server-cog",cN);/**
|
|
351
|
-
* @license lucide-react v0.511.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const uN=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],cf=ue("settings-2",uN);/**
|
|
356
|
-
* @license lucide-react v0.511.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const dN=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Ls=ue("server",dN);/**
|
|
361
|
-
* @license lucide-react v0.511.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const fN=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],hN=ue("settings",fN);/**
|
|
366
|
-
* @license lucide-react v0.511.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const mN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Ra=ue("shield-alert",mN);/**
|
|
371
|
-
* @license lucide-react v0.511.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const xN=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ea=ue("shield-check",xN);/**
|
|
376
|
-
* @license lucide-react v0.511.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const pN=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],gN=ue("shield-off",pN);/**
|
|
381
|
-
* @license lucide-react v0.511.0 - ISC
|
|
382
|
-
*
|
|
383
|
-
* This source code is licensed under the ISC license.
|
|
384
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
385
|
-
*/const yN=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],vy=ue("sparkles",yN);/**
|
|
386
|
-
* @license lucide-react v0.511.0 - ISC
|
|
387
|
-
*
|
|
388
|
-
* This source code is licensed under the ISC license.
|
|
389
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
390
|
-
*/const vN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],uf=ue("square",vN);/**
|
|
391
|
-
* @license lucide-react v0.511.0 - ISC
|
|
392
|
-
*
|
|
393
|
-
* This source code is licensed under the ISC license.
|
|
394
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
395
|
-
*/const bN=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],by=ue("sun",bN);/**
|
|
396
|
-
* @license lucide-react v0.511.0 - ISC
|
|
397
|
-
*
|
|
398
|
-
* This source code is licensed under the ISC license.
|
|
399
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
400
|
-
*/const jN=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]],NN=ue("table-2",jN);/**
|
|
401
|
-
* @license lucide-react v0.511.0 - ISC
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the ISC license.
|
|
404
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/const wN=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Us=ue("trash-2",wN);/**
|
|
406
|
-
* @license lucide-react v0.511.0 - ISC
|
|
407
|
-
*
|
|
408
|
-
* This source code is licensed under the ISC license.
|
|
409
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
410
|
-
*/const SN=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],zs=ue("triangle-alert",SN);/**
|
|
411
|
-
* @license lucide-react v0.511.0 - ISC
|
|
412
|
-
*
|
|
413
|
-
* This source code is licensed under the ISC license.
|
|
414
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
415
|
-
*/const kN=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],TN=ue("undo-2",kN);/**
|
|
416
|
-
* @license lucide-react v0.511.0 - ISC
|
|
417
|
-
*
|
|
418
|
-
* This source code is licensed under the ISC license.
|
|
419
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
420
|
-
*/const CN=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],EN=ue("unplug",CN);/**
|
|
421
|
-
* @license lucide-react v0.511.0 - ISC
|
|
422
|
-
*
|
|
423
|
-
* This source code is licensed under the ISC license.
|
|
424
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/const zN=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],RN=ue("upload",zN);/**
|
|
426
|
-
* @license lucide-react v0.511.0 - ISC
|
|
427
|
-
*
|
|
428
|
-
* This source code is licensed under the ISC license.
|
|
429
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
-
*/const AN=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],DN=ue("wand-sparkles",AN);/**
|
|
431
|
-
* @license lucide-react v0.511.0 - ISC
|
|
432
|
-
*
|
|
433
|
-
* This source code is licensed under the ISC license.
|
|
434
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/const _N=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],Oo=ue("webhook",_N);/**
|
|
436
|
-
* @license lucide-react v0.511.0 - ISC
|
|
437
|
-
*
|
|
438
|
-
* This source code is licensed under the ISC license.
|
|
439
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
-
*/const MN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Qi=ue("x",MN);function re(...s){return s.filter(Boolean).join(" ")}const jy=g.createContext(null),ON={success:{icon:Dl,iconClass:"text-ok"},error:{icon:t2,iconClass:"text-bad"},warning:{icon:zs,iconClass:"text-warn"},info:{icon:my,iconClass:"text-info"}},LN=6e3;let ig=0;function UN(){return ig+=1,`toast-${Date.now().toString(36)}-${ig}`}function HN({children:s}){const[o,c]=g.useState([]),u=g.useRef(new Map),d=h=>{const x=u.current.get(h);x&&clearTimeout(x),u.current.delete(h),c(b=>b.filter(j=>j.id!==h))},m=h=>{const x=UN(),b={id:x,title:h.title,description:h.description,tone:h.tone??"info"};c(y=>{const N=[...y,b];return N.length>5?N.slice(N.length-5):N});const j=setTimeout(()=>d(x),h.durationMs??LN);return u.current.set(x,j),x},p=g.useMemo(()=>({push:m,dismiss:d,success:(h,x)=>m({title:h,description:x,tone:"success"}),error:(h,x)=>m({title:h,description:x,tone:"error"}),warning:(h,x)=>m({title:h,description:x,tone:"warning"}),info:(h,x)=>m({title:h,description:x,tone:"info"})}),[]);return g.useEffect(()=>{const h=u.current;return()=>{for(const x of h.values())clearTimeout(x);h.clear()}},[]),a.jsxs(jy.Provider,{value:p,children:[s,a.jsx("div",{className:"pointer-events-none fixed inset-x-3 bottom-3 z-[70] flex flex-col items-end gap-2 sm:inset-x-auto sm:right-4 sm:bottom-4 sm:w-[380px]","aria-live":"polite","aria-atomic":"false",children:o.map(h=>{const{icon:x,iconClass:b}=ON[h.tone];return a.jsxs("div",{role:h.tone==="error"?"alert":"status",className:"toast-enter pointer-events-auto flex w-full items-start gap-3 rounded-md border border-line bg-raised px-3.5 py-3 shadow-pop",children:[a.jsx(x,{className:re("mt-0.5 size-4 shrink-0",b),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:h.title}),h.description&&a.jsx("div",{className:"mt-0.5 break-words text-xs text-muted",children:h.description})]}),a.jsx("button",{type:"button",onClick:()=>d(h.id),"aria-label":"Dismiss notification",className:"-mr-1 -mt-1 rounded-sm p-1 text-faint transition-colors hover:bg-inset hover:text-ink",children:a.jsx(Qi,{className:"size-3.5","aria-hidden":"true"})})]},h.id)})})]})}function Nt(){const s=g.useContext(jy);if(!s)throw new Error("useToast must be used inside ToastProvider");return s}const BN={primary:"bg-accent text-accent-ink border border-transparent hover:bg-accent-hover shadow-sm",secondary:"bg-raised text-ink border border-line hover:border-line-strong hover:bg-inset",ghost:"bg-transparent text-muted border border-transparent hover:text-ink hover:bg-inset",danger:"bg-bad text-white border border-transparent hover:opacity-90 shadow-sm",dangerGhost:"bg-bad-soft text-bad border border-transparent hover:border-bad/40 hover:bg-bad/15"},qN={sm:"h-8 px-3 text-xs gap-1.5 rounded-sm",md:"h-9 px-4 text-sm gap-2 rounded-md",lg:"h-10 px-5 text-sm gap-2 rounded-md"};function ka(s="secondary",o="md",c){return re("inline-flex select-none items-center justify-center whitespace-nowrap font-medium transition-colors duration-[var(--ez-motion-fast)] disabled:pointer-events-none disabled:opacity-50",BN[s],qN[o],c)}const te=g.forwardRef(function({variant:o="secondary",size:c="md",loading:u=!1,icon:d,className:m,children:p,disabled:h,...x},b){return a.jsxs("button",{ref:b,type:"button",className:ka(o,c,m),disabled:h||u,"aria-busy":u||void 0,...x,children:[u?a.jsx(sl,{className:"spin size-4","aria-hidden":"true"}):d,p]})}),at=g.forwardRef(function({label:o,variant:c="ghost",size:u="md",className:d,children:m,...p},h){return a.jsx("button",{ref:h,type:"button","aria-label":o,title:o,className:ka(c,u==="sm"?"sm":"md",re("!px-0",u==="sm"?"size-8":"size-9",d)),...p,children:m})}),GN={sm:"sm:max-w-sm",md:"sm:max-w-lg",lg:"sm:max-w-2xl",xl:"sm:max-w-4xl"},YN='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function yn({open:s,onClose:o,title:c,description:u,children:d,footer:m,size:p="md",preventClose:h=!1,bodyClassName:x}){const b=g.useId(),j=g.useId(),y=g.useRef(null),N=g.useRef(null),E=g.useRef(o);E.current=o;const H=g.useRef(h);return H.current=h,g.useEffect(()=>{if(!s)return;N.current=document.activeElement;const S=document.body.style.overflow;document.body.style.overflow="hidden";const k=window.setTimeout(()=>{const R=y.current;if(!R)return;(R.querySelector("[data-autofocus]")??R).focus()},0),_=R=>{if(R.key==="Escape"&&!H.current){R.stopPropagation(),E.current();return}if(R.key!=="Tab")return;const X=y.current;if(!X)return;const z=Array.from(X.querySelectorAll(YN)).filter(J=>J.offsetParent!==null);if(z.length===0){R.preventDefault(),X.focus();return}const G=z[0],ne=z[z.length-1],U=document.activeElement;R.shiftKey&&(U===G||U===X)?(R.preventDefault(),ne.focus()):!R.shiftKey&&U===ne&&(R.preventDefault(),G.focus())};return document.addEventListener("keydown",_,!0),()=>{window.clearTimeout(k),document.removeEventListener("keydown",_,!0),document.body.style.overflow=S,N.current?.focus()}},[s]),s?Ej.createPortal(a.jsx("div",{className:"fade-enter fixed inset-0 z-[60] flex items-end justify-center bg-[var(--ez-overlay)] p-0 backdrop-blur-[2px] sm:items-center sm:p-6",onMouseDown:S=>{S.target===S.currentTarget&&!h&&o()},children:a.jsxs("div",{ref:y,role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":u?j:void 0,tabIndex:-1,className:re("panel-enter flex max-h-[92vh] w-full flex-col overflow-hidden rounded-t-xl border border-line bg-surface shadow-pop outline-none sm:rounded-xl",GN[p]),children:[a.jsxs("div",{className:"flex items-start justify-between gap-4 border-b border-line px-5 py-4",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("h2",{id:b,className:"text-base font-semibold text-ink",children:c}),u&&a.jsx("p",{id:j,className:"mt-1 text-sm text-muted",children:u})]}),a.jsx(at,{label:"Close",size:"sm",onClick:o,disabled:h,className:"-mr-1 -mt-1",children:a.jsx(Qi,{className:"size-4","aria-hidden":"true"})})]}),d&&a.jsx("div",{className:re("min-h-0 flex-1 overflow-y-auto px-5 py-4",x),children:d}),m&&a.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line bg-raised/40 px-5 py-3",children:m})]})}),document.body):null}class Be extends Error{status;payload;constructor(o,c,u){super(u??$N(o,c)),this.name="ApiError",this.status=o,this.payload=c}get code(){const{error:o}=this.payload;if(typeof o=="string")return o;if(o&&typeof o=="object")return o.step}get blockedReason(){return this.status!==403?null:this.payload.reason??null}}function $N(s,o){const{error:c}=o;return typeof c=="string"&&c&&c!=="Forbidden"?c:c&&typeof c=="object"?c.cause||c.consequence||"The request failed.":s===403?"Request blocked by the dashboard.":s===401?"Your session ended. Please sign in again.":s===0?"Cannot reach the dashboard.":`Request failed (HTTP ${s}).`}function VN(s){if(s instanceof Be)return s;const o=s instanceof Error?s.message:"Something went wrong.";return new Be(0,{error:o})}function yt(s,o=[],c={}){const u=c.enabled??!0,d=g.useRef(s);d.current=s;const[m,p]=g.useState(0),[h,x]=g.useState({data:null,error:null,loading:u});g.useEffect(()=>{if(!u){x({data:null,error:null,loading:!1});return}const y=new AbortController;return x(N=>({...N,loading:!0,error:null})),d.current(y.signal).then(N=>{y.signal.aborted||x({data:N,error:null,loading:!1})}).catch(N=>{y.signal.aborted||N?.name!=="AbortError"&&x(E=>({...E,error:VN(N),loading:!1}))}),()=>y.abort()},[...o,u,m]);const b=g.useCallback(()=>p(y=>y+1),[]),j=g.useCallback(y=>{x(N=>({...N,data:typeof y=="function"?y(N.data):y}))},[]);return{data:h.data,error:h.error,loading:h.loading,reload:b,setData:j}}function Rs(s,o,c=!0){const u=g.useRef(s);u.current=s,g.useEffect(()=>{if(!c)return;const d=setInterval(()=>u.current(),o);return()=>clearInterval(d)},[o,c])}function Ol(s){const o=g.useRef(s);o.current=s,g.useEffect(()=>{const c=()=>{document.visibilityState==="visible"&&o.current()};return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)},[])}function Vn(s){g.useEffect(()=>{document.title=s?`${s} · Easy DevOps`:"Easy DevOps"},[s])}let Yd=null;function rg(s){Yd=s}function bn(){return g.useCallback(s=>Yd?Yd(s):Promise.resolve(!1),[])}function XN({children:s}){const[o,c]=g.useState(null),u=g.useRef(null),d=g.useCallback(h=>(u.current?.resolve(!1),new Promise(x=>{u.current={resolve:x},c(h)})),[]);g.useEffect(()=>(rg(d),()=>rg(null)),[d]);const m=g.useCallback(h=>{c(null);const x=u.current;u.current=null,x?.resolve(h)},[]),p=o?.tone==="danger";return a.jsxs(a.Fragment,{children:[s,a.jsx(yn,{open:o!==null,onClose:()=>m(!1),title:o?.title??"",size:"sm",bodyClassName:"px-5 py-4",footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"ghost",onClick:()=>m(!1),"data-autofocus":!0,children:o?.cancelLabel??"Cancel"}),a.jsx(te,{variant:p?"danger":"primary",onClick:()=>m(!0),children:o?.confirmLabel??"Confirm"})]}),children:a.jsx("div",{className:"text-sm text-muted",children:o?.body})})]})}const ZN="modulepreload",QN=function(s,o){return new URL(s,o).href},og={},KN=function(o,c,u){let d=Promise.resolve();if(c&&c.length>0){let p=function(j){return Promise.all(j.map(y=>Promise.resolve(y).then(N=>({status:"fulfilled",value:N}),N=>({status:"rejected",reason:N}))))};const h=document.getElementsByTagName("link"),x=document.querySelector("meta[property=csp-nonce]"),b=x?.nonce||x?.getAttribute("nonce");d=p(c.map(j=>{if(j=QN(j,u),j in og)return;og[j]=!0;const y=j.endsWith(".css"),N=y?'[rel="stylesheet"]':"";if(!!u)for(let S=h.length-1;S>=0;S--){const k=h[S];if(k.href===j&&(!y||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${j}"]${N}`))return;const H=document.createElement("link");if(H.rel=y?"stylesheet":ZN,y||(H.as="script"),H.crossOrigin="",H.href=j,b&&H.setAttribute("nonce",b),document.head.appendChild(H),y)return new Promise((S,k)=>{H.addEventListener("load",S),H.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${j}`)))})}))}function m(p){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=p,window.dispatchEvent(h),!h.defaultPrevented)throw p}return d.then(p=>{for(const h of p||[])h.status==="rejected"&&m(h.reason);return o().catch(m)})},JN="/api",PN=new Set(["POST","PUT","PATCH","DELETE"]),FN=!1,IN="Your session ended. Please sign in again.",$d=new Set,Vd=new Set;function WN(s){return $d.add(s),()=>$d.delete(s)}function ew(s){return Vd.add(s),()=>Vd.delete(s)}function tw(s){if(!s)return"";const o=new URLSearchParams;for(const[u,d]of Object.entries(s))d!=null&&o.set(u,String(d));const c=o.toString();return c?`?${c}`:""}async function nw(s){const o=await s.text();if(!o)return{};try{const c=JSON.parse(o);return c&&typeof c=="object"?c:{error:String(c)}}catch{return{error:o.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim().slice(0,240)}}}async function he(s,o={}){const c=o.method??"GET",u={Accept:"application/json"};let d;o.body!==void 0&&(u["Content-Type"]="application/json",d=JSON.stringify(o.body)),PN.has(c)&&(u["X-EZ-Request"]="1");let m;try{m=await fetch(`${JN}${s}${tw(o.query)}`,{method:c,headers:u,body:d,credentials:"same-origin",signal:o.signal})}catch(h){throw h?.name==="AbortError"?h:new Be(0,{error:"Cannot reach the dashboard."})}if(m.status===204)return;if(!m.ok){const h=await nw(m),x=new Be(m.status,h);if(!o.skipAuthEvents){if(m.status===401)for(const b of $d)b(IN);else if(m.status===403)for(const b of Vd)b(x)}throw x}const p=await m.text();if(p)return JSON.parse(p)}function Ze(s){return encodeURIComponent(s)}const oe={auth:{status:s=>he("/auth",{signal:s}),login:s=>he("/login",{method:"POST",body:{password:s},skipAuthEvents:!0}),setup:s=>he("/setup",{method:"POST",body:s,skipAuthEvents:!0}),logout:()=>he("/logout",{method:"POST"})},domains:{list:s=>he("/domains",{signal:s}),create:s=>he("/domains",{method:"POST",body:s}),update:(s,o)=>he(`/domains/${Ze(s)}`,{method:"PUT",body:o}),remove:(s,o)=>he(`/domains/${Ze(s)}`,{method:"DELETE",query:{deleteCert:o}}),toggle:s=>he(`/domains/${Ze(s)}/toggle`,{method:"PUT"}),reload:s=>he(`/domains/${Ze(s)}/reload`,{method:"POST"}),notifications:(s,o)=>he(`/domains/${Ze(s)}/notifications`,{signal:o}),saveNotifications:(s,o)=>he(`/domains/${Ze(s)}/notifications`,{method:"PUT",body:o})},ssl:{list:s=>he("/ssl",{signal:s}),create:s=>he("/ssl/create",{method:"POST",body:s}),confirmDns:s=>he("/ssl/create-confirm",{method:"POST",body:{domain:s}}),cancelDns:s=>he("/ssl/create-cancel",{method:"POST",body:{domain:s}}),renew:s=>he(`/ssl/renew/${Ze(s)}`,{method:"POST"}),renewAll:()=>he("/ssl/renew-all",{method:"POST"}),remove:s=>he(`/ssl/${Ze(s)}`,{method:"DELETE"})},nginx:{status:s=>he("/nginx/status",{signal:s}),reload:()=>he("/nginx/reload",{method:"POST"}),restart:()=>he("/nginx/restart",{method:"POST"}),start:()=>he("/nginx/start",{method:"POST"}),stop:()=>he("/nginx/stop",{method:"POST"}),test:()=>he("/nginx/test",{method:"POST"}),configs:s=>he("/nginx/configs",{signal:s}),getConfig:(s,o)=>he(`/nginx/config/${Ze(s)}`,{signal:o}),saveConfig:(s,o)=>he(`/nginx/config/${Ze(s)}`,{method:"POST",body:{content:o}}),logs:s=>he("/nginx/logs",{signal:s})},processes:{list:s=>he("/processes",{signal:s}),action:(s,o)=>he(`/processes/${Ze(s)}/${o}`,{method:"POST"}),logs:(s,o=200,c)=>he(`/processes/${Ze(s)}/logs`,{signal:c,query:{lines:o}})},deployments:{list:s=>he("/deployments",{signal:s}),get:(s,o)=>he(`/deployments/${Ze(s)}`,{signal:o}),create:s=>he("/deployments",{method:"POST",body:s}),update:(s,o)=>he(`/deployments/${Ze(s)}`,{method:"PUT",body:o}),remove:(s,o=!1)=>he(`/deployments/${Ze(s)}`,{method:"DELETE",query:o?{deleteDomain:1}:void 0}),linkDomain:(s,o,c=!1)=>he(`/deployments/${Ze(s)}/domain`,{method:"PUT",body:{domain:o,ssl:c}}),unlinkDomain:s=>he(`/deployments/${Ze(s)}/domain`,{method:"DELETE"}),move:(s,o)=>he(`/deployments/${Ze(s)}/move`,{method:"POST",body:{path:o}}),deploy:(s,o)=>he(`/deployments/${Ze(s)}/deploy`,{method:"POST",body:o?{ref:o}:{}}),rollback:(s,o)=>he(`/deployments/${Ze(s)}/rollback`,{method:"POST",body:o?{releaseId:o}:{}}),run:(s,o,c)=>he(`/deployments/${Ze(s)}/runs/${Ze(o)}`,{signal:c}),issueHookToken:s=>he(`/deployments/${Ze(s)}/hook-token`,{method:"POST"}),revokeHookToken:s=>he(`/deployments/${Ze(s)}/hook-token`,{method:"DELETE"}),generateDeployKey:s=>he(`/deployments/${Ze(s)}/deploy-key`,{method:"POST"}),github:(s,o)=>he(`/deployments/${Ze(s)}/github`,{signal:o}),applyGithub:(s,o)=>he(`/deployments/${Ze(s)}/github/apply`,{method:"POST",body:o}),hook:s=>he("/deployments/hook",{signal:s}),updateHook:s=>he("/deployments/hook",{method:"PUT",body:s})},service:{status:s=>he("/service",{signal:s}),start:()=>he("/service/start",{method:"POST"}),stop:()=>he("/service/stop",{method:"POST"}),restart:()=>he("/service/restart",{method:"POST"})},settings:{get:s=>he("/settings",{signal:s}),update:s=>he("/settings",{method:"POST",body:s}),permissions:s=>he("/settings/permissions",{signal:s}),setupPermissions:s=>he("/settings/permissions/setup",{method:"POST",body:{password:s},skipAuthEvents:!0}),backup:s=>he("/settings/backup",{signal:s}),restore:s=>he("/settings/restore",{method:"POST",body:s}),channels:{list:s=>he("/settings/channels",{signal:s}),create:s=>he("/settings/channels",{method:"POST",body:s}),update:(s,o)=>he(`/settings/channels/${Ze(s)}`,{method:"PUT",body:o}),remove:s=>he(`/settings/channels/${Ze(s)}`,{method:"DELETE"}),test:s=>he(`/settings/channels/${Ze(s)}/test`,{method:"POST"})}},hub:{status:s=>he("/hub/status",{signal:s}),connect:s=>he("/hub/connect",{method:"POST",body:{connectionString:s}}),unlink:()=>he("/hub/link",{method:"DELETE"}),updatePermissions:s=>he("/hub/permissions",{method:"PUT",body:s})}},Ny=g.createContext(null);function aw(s){if(s instanceof Be)return s;const o=s instanceof Error?s.message:"Cannot reach the dashboard.";return new Be(0,{error:o})}function lw({children:s}){const[o,c]=g.useState("loading"),[u,d]=g.useState(null),[m,p]=g.useState(null),[h,x]=g.useState(null),[b,j]=g.useState(null),y=g.useRef("loading");y.current=o;const N=g.useCallback(G=>{d(G),p(null),c(G.authenticated?"authenticated":"unauthenticated")},[]),E=g.useCallback(async()=>{c("loading");try{N(await oe.auth.status())}catch(G){p(aw(G)),c("error")}},[N]);g.useEffect(()=>{E()},[E]);const H=g.useCallback(G=>{x(G??"Your session ended. Please sign in again."),j(null),d(ne=>ne&&{...ne,authenticated:!1}),c("unauthenticated")},[]);g.useEffect(()=>{const G=WN(U=>{y.current==="authenticated"&&H(U)}),ne=ew(U=>j(U));return()=>{G(),ne()}},[H]);const S=g.useCallback(async()=>{try{N(await oe.auth.status())}catch{d(G=>G&&{...G,authenticated:!0}),c("authenticated")}x(null),j(null)},[N]),k=g.useCallback(async G=>{await oe.auth.login(G),await S()},[S]),_=g.useCallback(async G=>{await oe.auth.setup(G),await S()},[S]),R=g.useCallback(async()=>{try{await oe.auth.logout()}catch{}d(G=>G&&{...G,authenticated:!1}),x(null),j(null),c("unauthenticated")},[]),X=g.useCallback(()=>j(null),[]),z=g.useMemo(()=>({phase:o,auth:u,bootError:m,sessionMessage:h,blocked:b,login:k,setup:_,logout:R,retryBoot:E,dismissBlocked:X,reportUnauthorized:H}),[o,u,m,h,b,k,_,R,E,X,H]);return a.jsx(Ny.Provider,{value:z,children:s})}function Xn(){const s=g.useContext(Ny);if(!s)throw new Error("useAuth must be used inside AuthProvider");return s}const cg=50,wy=g.createContext(null);function sw({children:s}){const{phase:o,reportUnauthorized:c}=Xn(),u=o==="authenticated",[d,m]=g.useState(null),[p,h]=g.useState(!1),[x,b]=g.useState(null),[j,y]=g.useState(null),[N,E]=g.useState(null),[H,S]=g.useState([]),[k,_]=g.useState(0),[R,X]=g.useState(null),[z,G]=g.useState(0),ne=g.useCallback(()=>_(0),[]),U=g.useCallback(()=>{S([]),_(0)},[]);g.useEffect(()=>{if(!u){m(null),h(!1),b(null),y(null),E(null),S([]),_(0),X(null);return}let ce=!1,P=null;const ae=()=>{h(!0),b(null)},M=()=>h(!1),A=$=>{h(!1);const ie=$.data;if($.message==="UNAUTHORIZED"||ie?.reason==="unauthorized"){c();return}if($.message==="FORBIDDEN"||ie?.reason){b(ie?.detail??"Live updates were blocked by the dashboard.");return}b("Live updates are unavailable. Data still refreshes on the page.")},le=$=>y($),F=$=>E($),ee=$=>{S(ie=>{const Se=ie.filter($e=>$e.id!==$.id),ke=[$,...Se];return ke.length>cg?ke.slice(0,cg):ke}),_(ie=>Math.min(ie+1,99))},de=$=>{X($),G(ie=>ie+1)};return(async()=>{try{if(!FN){const{createRealtimeClient:$}=await KN(async()=>{const{createRealtimeClient:ie}=await import("./socket-DwLPrgsr.js");return{createRealtimeClient:ie}},[],import.meta.url);P=$()}if(ce){P.disconnect();return}P.on("connect",ae),P.on("disconnect",M),P.on("connect_error",A),P.on("nginx:status",le),P.on("domain:health",F),P.on("notification:new",ee),P.on("local:changed",de),m(P),P.connect()}catch{ce||b("Could not start the live connection.")}})(),()=>{ce=!0,P&&(P.off("connect",ae),P.off("disconnect",M),P.off("connect_error",A),P.off("nginx:status",le),P.off("domain:health",F),P.off("notification:new",ee),P.off("local:changed",de),P.disconnect()),h(!1)}},[u,c]);const J=g.useMemo(()=>({client:d,connected:p,connectionError:x,nginxStatus:j,domainHealth:N,notifications:H,unread:k,markAllRead:ne,clearNotifications:U,lastChange:R,changeSeq:z}),[d,p,x,j,N,H,k,ne,U,R,z]);return a.jsx(wy.Provider,{value:J,children:s})}function ia(){const s=g.useContext(wy);if(!s)throw new Error("useRealtime must be used inside RealtimeProvider");return s}const Sy=g.createContext(null);function iw({children:s}){const{phase:o}=Xn(),c=o==="authenticated",{client:u,connected:d}=ia(),m=yt(k=>oe.service.status(k),[c],{enabled:c}),{setData:p,reload:h}=m;Rs(h,6e4,c);const x=g.useCallback(k=>{p(_=>_&&{..._,backgroundService:{..._.backgroundService,...k}})},[p]),b=g.useRef(null),j=g.useRef(!1),y=g.useRef(!1);y.current=m.loading;const N=g.useCallback(()=>{b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{if(b.current=null,y.current){j.current=!0;return}h()},250)},[h]);g.useEffect(()=>{!m.loading&&j.current&&(j.current=!1,h())},[m.loading,h]),g.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]),g.useEffect(()=>{if(!c||!u)return;const k=_=>{x(_),N()};return u.on("service:changed",k),()=>u.off("service:changed",k)},[c,u,x,N]);const E=g.useRef(!1),H=g.useRef(!1);g.useEffect(()=>{if(!c){E.current=!1,H.current=!1;return}d&&!E.current&&(H.current&&N(),H.current=!0),E.current=d},[c,d,N]);const S=g.useMemo(()=>({service:m.data,loading:m.loading,error:m.error,reload:m.reload,applyBackgroundService:x}),[m.data,m.loading,m.error,m.reload,x]);return a.jsx(Sy.Provider,{value:S,children:s})}function Ki(){const s=g.useContext(Sy);if(!s)throw new Error("useService must be used inside ServiceProvider");return s}const ky=[{label:"Manage",items:[{to:"/",label:"Overview",title:"Overview",description:"The state of nginx, your domains and their certificates at a glance.",icon:z2},{to:"/domains",label:"Domains",title:"Domains",description:"Reverse-proxy hosts, their backends and their nginx configuration.",icon:_l},{to:"/ssl",label:"SSL certificates",title:"SSL certificates",description:"Issue and renew Let’s Encrypt certificates for your domains.",icon:Ea},{to:"/nginx",label:"Nginx",title:"Nginx",description:"Service status, configuration files and live logs.",icon:Ls},{to:"/deployments",label:"Deployments",title:"Deployments",description:"Put a project from a git repository on this server and keep it deployed.",icon:Bi}]},{label:"Monitor",items:[{to:"/notifications",label:"Notifications",title:"Notifications",description:"Delivery channels, test messages and recent events.",icon:lf},{to:"/processes",label:"Processes",title:"Processes",description:"The Easy DevOps background service and your own PM2 apps.",icon:fy},{to:"/logs",label:"Logs",title:"Logs",description:"nginx access and error output as it is written.",icon:qi}]},{label:"System",items:[{to:"/settings",label:"Settings",title:"Settings",description:"Access, authentication, Hub pairing and backup.",icon:hN}]}],rw=ky.flatMap(s=>s.items);function Ty(s){return rw.find(o=>o.to==="/"?s==="/":s===o.to||s.startsWith(`${o.to}/`))}function Cy({className:s}){return a.jsxs("span",{className:re("inline-flex shrink-0 items-center",s),"aria-hidden":"true",children:[a.jsx("img",{src:"/brand/mark-dark.png",alt:"",className:"brand-logo-dark h-full w-auto"}),a.jsx("img",{src:"/brand/mark-light.png",alt:"",className:"brand-logo-light h-full w-auto"})]})}const ow=new Intl.DateTimeFormat(void 0,{day:"numeric",month:"short",year:"numeric"}),cw=new Intl.DateTimeFormat(void 0,{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit"});function Ey(s){if(s==null||s==="")return"—";const o=typeof s=="number"?new Date(s):new Date(s);return Number.isNaN(o.getTime())?"—":ow.format(o)}function df(s){if(s==null||s==="")return"—";const o=typeof s=="number"?new Date(s):new Date(s);return Number.isNaN(o.getTime())?"—":cw.format(o)}function Ji(s){const o=Math.max(0,Math.round((Date.now()-s)/1e3));if(o<10)return"just now";if(o<60)return`${o}s ago`;const c=Math.floor(o/60);if(c<60)return`${c}m ago`;const u=Math.floor(c/60);return u<24?`${u}h ago`:`${Math.floor(u/24)}d ago`}function zy(s){if(s==null)return"—";if(s<1024)return`${s} B`;const o=["KB","MB","GB","TB"];let c=s/1024,u=0;for(;c>=1024&&u<o.length-1;)c/=1024,u+=1;return`${c.toFixed(c<10?1:0)} ${o[u]}`}function $o(s){if(s==null||s<0)return"—";const o=Math.floor(s/6e4);if(o<1)return"<1m";if(o<60)return`${o}m`;const c=Math.floor(o/60);return c<24?`${c}h ${o%60}m`:`${Math.floor(c/24)}d ${c%24}h`}function As(s){return s===null?"Unknown":s<0?`Expired ${Math.abs(s)} day${Math.abs(s)===1?"":"s"} ago`:s===0?"Expires today":`${s} day${s===1?"":"s"} left`}function uw(s){return s==null?"—":`${s.toFixed(1)}%`}function _n(s,o,c=`${o}s`){return`${s} ${s===1?o:c}`}function dw(s,o=48){if(s.length<=o)return s;const c=Math.ceil((o-1)/2),u=Math.floor((o-1)/2);return`${s.slice(0,c)}…${s.slice(-u)}`}const fw={personal:"Personal","windows-service":"Windows service",systemd:"systemd",unknown:"Unknown"},hw={personal:"Startup supervisor · runs as you, starts at logon","windows-service":"WinSW service · NT SERVICE\\EasyDevOps",systemd:"systemd unit · starts at boot",unknown:"Not reported by this API"},mw={personal:"No administrator needed — run it in a normal PowerShell. Personal mode starts at logon and stops when you sign out.","windows-service":"Run it in an Administrator PowerShell. It creates a Windows service that runs as NT SERVICE\\EasyDevOps and never asks for an account password.",systemd:"Run it once with sudo; the unit then starts at boot.",unknown:"Run it in a terminal with the rights your platform requires."};function xw(s){switch(s.backgroundService.mechanism){case"startup-supervisor":return"personal";case"winsw":return"windows-service";case"systemd":return"systemd";default:return"unknown"}}function pw(s){return s==="logon"?"At logon":s==="boot"?"At boot":"Unknown"}function gw(s){return s.jobsRunningHere?"This dashboard":s.jobsOwnerRole==="daemon"?"Background service":s.jobsOwnerRole==="dashboard"?"Another dashboard process":s.running?"Background service":"Paused — no owner"}function Pi(s){if(!s)return null;const o=s.backgroundService,c=xw(s),u=o.startsAt==="logon"||o.startsAt==="boot"?o.startsAt:"unknown",d=o.runtime??null,m=o.stoppedAt??null,p=Array.from(new Set([...o.warnings??[],...d?.warnings??[]]));return{running:o.running,connected:o.connected,jobsRunningHere:o.jobsRunningHere,jobsOwnerLabel:gw(o),pid:o.pid,version:o.version,startedAt:o.startedAt,uptimeMs:o.startedAt?Math.max(0,Date.now()-o.startedAt):null,heartbeatAgeMs:o.heartbeatAgeMs??null,mechanism:c,mechanismLabel:fw[c],mechanismDetail:hw[c],startsAt:u,startsAtLabel:pw(u),installed:o.installed===!0,stoppedByUser:o.stoppedByUser===!0,stoppedAt:m,stoppedAtLabel:m?df(m):null,state:o.state??null,detail:o.detail??null,enabledOnBoot:o.enabledOnBoot??null,restarts:o.restarts??0,crashLooping:o.crashLooping===!0,dataDir:o.dataDir,installCommand:s.install.command,installGuidance:mw[c],runtime:d,warnings:p}}function Lo(s){return s?s.running?"Running":s.stoppedByUser?"Stopped by you":s.installed?"Not running":"Not installed":"Unknown"}function yw(s){if(!s)return null;const o=s.pinned,c=o?.version??null,u=s.systemNode.version??null,d=!!(o&&o.kind!=="none"&&o.exists!==!1),m=d&&!!(c&&u)&&c===u&&!o?.differsFromSystem;return{serviceVersion:c,servicePath:o?.path??null,systemVersion:u,systemPath:s.systemNode.path??null,sameAsSystem:m,broken:o?.broken===!0,pinned:d,kind:o?.kind??null,manager:s.manager?.managed?s.manager.manager??null:null}}const vw={neutral:"bg-inset text-muted",accent:"bg-accent-soft text-accent-text",ok:"bg-ok-soft text-ok",warn:"bg-warn-soft text-warn",bad:"bg-bad-soft text-bad",info:"bg-info-soft text-info"},Ry={neutral:"bg-faint",accent:"bg-accent",ok:"bg-ok",warn:"bg-warn",bad:"bg-bad",info:"bg-info"};function ve({tone:s="neutral",children:o,className:c,dot:u=!1}){return a.jsxs("span",{className:re("inline-flex items-center gap-1.5 rounded-pill px-2 py-0.5 text-2xs font-medium tracking-wide",vw[s],c),children:[u&&a.jsx("span",{className:re("size-1.5 rounded-full",Ry[s]),"aria-hidden":"true"}),o]})}function Qt({tone:s="ok",pulse:o=!1,className:c}){return a.jsx("span",{className:re("inline-block size-2 shrink-0 rounded-full",Ry[s],o&&"live-dot",c),"aria-hidden":"true"})}const bw='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function ug({onNavigate:s}){const{service:o}=Ki(),c=Pi(o),u=c?c.running?{tone:"ok",label:"Service running"}:c.stoppedByUser?{tone:"warn",label:"Service stopped by you"}:{tone:"warn",label:"Service stopped"}:{tone:"neutral",label:"Checking service…"};return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:re("flex h-[var(--ez-topbar-height)] shrink-0 items-center gap-2.5 border-b border-line px-4",s&&"pr-12"),children:[a.jsx(Cy,{className:"h-5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate text-sm font-semibold tracking-tight text-ink",children:"Easy DevOps"}),a.jsx("div",{className:"text-2xs text-faint",children:"Server control plane"})]})]}),a.jsx("nav",{"aria-label":"Main navigation",className:"flex-1 overflow-y-auto px-3 py-4",children:ky.map((d,m)=>a.jsxs("div",{className:re(m>0&&"mt-5"),children:[a.jsx("div",{className:"mb-1.5 px-2 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:d.label}),a.jsx("div",{className:"space-y-0.5",children:d.items.map(p=>{const h=p.icon;return a.jsx(iy,{to:p.to,end:p.to==="/",onClick:s,className:({isActive:x})=>re("group relative flex items-center gap-2.5 rounded-md px-2.5 py-2 text-[13px] font-medium transition-colors duration-[var(--ez-motion-fast)]",x?"bg-accent-soft text-ink":"text-muted hover:bg-inset hover:text-ink"),children:({isActive:x})=>a.jsxs(a.Fragment,{children:[a.jsx("span",{className:re("absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-pill bg-accent transition-opacity duration-[var(--ez-motion-fast)]",x?"opacity-100":"opacity-0"),"aria-hidden":"true"}),a.jsx(h,{className:re("size-4 shrink-0 transition-colors",x?"text-accent-text":"text-faint group-hover:text-muted"),"aria-hidden":"true"}),p.label]})},p.to)})})]},d.label))}),a.jsx("div",{className:"border-t border-line p-3",children:a.jsxs(bt,{to:"/processes",onClick:s,className:"flex items-center gap-2.5 rounded-md border border-line bg-raised/60 px-2.5 py-2 transition-colors hover:border-line-strong hover:bg-inset","aria-label":`Background service: ${u.label}. Open Processes.`,children:[a.jsx(Qt,{tone:u.tone,pulse:u.tone==="ok"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-2xs font-medium text-ink",children:"Background service"}),a.jsx("div",{className:"truncate text-2xs text-faint",children:u.label})]})]})})]})}function jw({open:s,onClose:o}){const c=g.useRef(null),u=g.useRef(null);return g.useEffect(()=>{if(!s)return;const d=document.activeElement,m=document.body.style.overflow;document.body.style.overflow="hidden";const p=window.setTimeout(()=>u.current?.focus(),0),h=x=>{if(x.key==="Escape"){x.preventDefault(),o();return}if(x.key!=="Tab")return;const b=c.current;if(!b)return;const j=Array.from(b.querySelectorAll(bw)).filter(H=>H.offsetParent!==null);if(j.length===0)return;const y=j[0],N=j[j.length-1],E=document.activeElement;x.shiftKey&&(E===y||E===b)?(x.preventDefault(),N.focus()):!x.shiftKey&&E===N&&(x.preventDefault(),y.focus())};return document.addEventListener("keydown",h,!0),()=>{window.clearTimeout(p),document.removeEventListener("keydown",h,!0),document.body.style.overflow=m,d?.focus()}},[s,o]),a.jsxs(a.Fragment,{children:[a.jsx("aside",{className:"hidden w-[var(--ez-sidebar-width)] shrink-0 flex-col border-r border-line bg-surface lg:flex",children:a.jsx(ug,{})}),s&&a.jsxs("div",{className:"fixed inset-0 z-50 lg:hidden",children:[a.jsx("div",{className:"fade-enter absolute inset-0 bg-[var(--ez-overlay)] backdrop-blur-[1px]",onClick:o,"aria-hidden":"true"}),a.jsxs("aside",{ref:c,role:"dialog","aria-modal":"true","aria-label":"Main navigation",tabIndex:-1,className:"drawer-enter absolute inset-y-0 left-0 flex w-[276px] flex-col border-r border-line bg-surface shadow-pop outline-none",children:[a.jsx(at,{ref:u,label:"Close navigation",size:"sm",onClick:o,className:"absolute right-2 top-2 z-10",children:a.jsx(Qi,{className:"size-4","aria-hidden":"true"})}),a.jsx(ug,{onNavigate:o})]})]})]})}function Nw(s){return s.type==="nginx_down"?Ls:s.type==="cert_expiry"?Ra:s.type==="domain_health"?Mo:s.type==="deploy"?Bi:vy}function ww(s){return s==="danger"?"text-bad":s==="warning"?"text-warn":s==="success"?"text-ok":s==="info"?"text-info":"text-muted"}function Sw(){const{notifications:s,unread:o,markAllRead:c,clearNotifications:u}=ia(),[d,m]=g.useState(!1),[,p]=g.useState(0),h=g.useRef(null),x=g.useRef(null);g.useEffect(()=>{if(!d)return;c();const j=N=>{h.current&&!h.current.contains(N.target)&&m(!1)},y=N=>{N.key==="Escape"&&(m(!1),x.current?.focus())};return document.addEventListener("pointerdown",j),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",j),document.removeEventListener("keydown",y)}},[d,c]),g.useEffect(()=>{d&&c()},[d,s.length,c]),g.useEffect(()=>{if(!d)return;const j=setInterval(()=>p(y=>y+1),3e4);return()=>clearInterval(j)},[d]);const b=o>0?`Notifications, ${o} unread`:"Notifications";return a.jsxs("div",{ref:h,className:"sm:relative",children:[a.jsxs("div",{className:"relative",children:[a.jsx(at,{ref:x,label:b,onClick:()=>m(j=>!j),"aria-expanded":d,"aria-haspopup":"dialog","aria-controls":"notifications-panel",className:re(d&&"bg-inset text-ink"),children:a.jsx(lf,{className:"size-4.5","aria-hidden":"true"})}),o>0&&a.jsx("span",{className:"pointer-events-none absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-pill bg-accent px-1 text-[10px] font-semibold leading-none text-accent-ink","aria-hidden":"true",children:o>9?"9+":o})]}),d&&a.jsxs("div",{id:"notifications-panel",role:"dialog","aria-label":"Notifications",className:"panel-enter absolute right-3 top-[calc(100%+10px)] z-50 w-[min(92vw,360px)] overflow-hidden rounded-lg border border-line bg-surface shadow-pop sm:right-0",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-2.5",children:[a.jsx("span",{className:"text-sm font-semibold text-ink",children:"Notifications"}),s.length>0&&a.jsx("button",{type:"button",onClick:u,className:"text-2xs text-muted transition-colors hover:text-ink",children:"Clear all"})]}),a.jsx("div",{className:"max-h-[min(60vh,320px)] overflow-y-auto",children:s.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[a.jsx($j,{className:"size-5 text-faint","aria-hidden":"true"}),a.jsx("div",{className:"text-xs text-muted",children:"All clear — no notifications yet."})]}):s.map(j=>{const y=Nw(j);return a.jsxs("div",{className:"flex items-start gap-2.5 border-b border-line/70 px-4 py-2.5 last:border-0",children:[a.jsx(y,{className:re("mt-0.5 size-4 shrink-0",ww(j.severity)),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs leading-snug text-ink",children:j.message}),a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:Ji(j.timestamp)})]})]},j.id)})}),a.jsx("div",{className:"border-t border-line bg-raised/50 px-4 py-2",children:a.jsx(bt,{to:"/notifications",onClick:()=>m(!1),className:"text-2xs font-medium text-muted transition-colors hover:text-ink",children:"Open notification settings"})})]})]})}function kw({onMenu:s}){const{pathname:o}=vn(),{theme:c,toggleTheme:u}=uy(),{nginxStatus:d,connected:m,connectionError:p}=ia(),{logout:h}=Xn(),x=Nt(),[b,j]=g.useState(!1),y=Ty(o)?.title??"Easy DevOps",N=d?.running===!0,E=d===null?"Unknown":N?"Running":"Stopped",H=async()=>{if(!b){j(!0);try{await h(),x.success("Signed out","Your dashboard session has ended.")}finally{j(!1)}}};return a.jsxs("header",{className:"sticky top-0 z-30 flex h-[var(--ez-topbar-height)] shrink-0 items-center justify-between gap-3 border-b border-line bg-canvas/85 px-3 backdrop-blur sm:px-5",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsx(at,{label:"Open navigation",size:"sm",onClick:s,className:"lg:hidden",children:a.jsx(G2,{className:"size-4.5","aria-hidden":"true"})}),a.jsx("div",{className:"truncate text-sm font-semibold text-ink",children:y})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1 sm:gap-1.5",children:[a.jsxs(bt,{to:"/nginx","aria-label":`Nginx is ${E.toLowerCase()}. Open Nginx.`,className:"hidden items-center gap-1.5 rounded-pill border border-line bg-raised px-2.5 py-1 text-2xs transition-colors hover:border-line-strong hover:bg-inset sm:inline-flex",children:[a.jsx(Qt,{tone:d===null?"neutral":N?"ok":"bad",pulse:N&&m}),a.jsx("span",{className:"font-medium text-ink",children:"nginx"}),a.jsx("span",{className:"text-faint",children:E})]}),a.jsx(bt,{to:"/nginx","aria-label":`Nginx is ${E.toLowerCase()}. Open Nginx.`,className:"flex size-9 items-center justify-center rounded-md transition-colors hover:bg-inset sm:hidden",children:a.jsx(Qt,{tone:d===null?"neutral":N?"ok":"bad",pulse:N&&m})}),a.jsxs("span",{className:"hidden items-center gap-1.5 pl-1 pr-2 text-2xs text-faint md:flex",title:p??(m?"Live updates are connected.":"Reconnecting to live updates…"),children:[a.jsx("span",{className:re("size-1.5 rounded-full",p?"bg-bad":m?"bg-ok live-dot":"bg-faint"),"aria-hidden":"true"}),p?"Live blocked":m?"Live":"Connecting"]}),a.jsx(Sw,{}),a.jsx(at,{label:c==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u,children:c==="dark"?a.jsx(by,{className:"size-4.5","aria-hidden":"true"}):a.jsx(xy,{className:"size-4.5","aria-hidden":"true"})}),a.jsx(at,{label:"Sign out",onClick:H,disabled:b,className:"hover:text-bad",children:a.jsx(B2,{className:"size-4.5","aria-hidden":"true"})})]})]})}function Qe({className:s,children:o,...c}){return a.jsx("div",{className:re("rounded-lg border border-line bg-surface shadow-card",s),...c,children:o})}function nn({title:s,description:o,actions:c,className:u,icon:d}){return a.jsxs("div",{className:re("flex flex-wrap items-start justify-between gap-3 border-b border-line px-4 py-3.5 sm:px-5",u),children:[a.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[d&&a.jsx("div",{className:"mt-0.5 text-muted",children:d}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:s}),o&&a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:o})]})]}),c&&a.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:c})]})}function Dn({className:s,children:o,...c}){return a.jsx("div",{className:re("px-4 py-4 sm:px-5",s),...c,children:o})}function Rd({className:s,children:o}){return a.jsx("div",{className:re("flex flex-wrap items-center justify-between gap-2 border-t border-line bg-raised/50 px-4 py-3 sm:px-5",s),children:o})}function Ds({className:s}){return a.jsx(sl,{className:re("spin size-4 text-muted",s),"aria-hidden":"true"})}function Fe({className:s}){return a.jsx("div",{className:re("skeleton",s),"aria-hidden":"true"})}function za({children:s}){return a.jsx("div",{className:"page-enter space-y-5","aria-busy":"true","aria-label":"Loading",children:s})}function Tw(){return a.jsx("div",{className:"flex min-h-full items-center justify-center bg-canvas",children:a.jsxs("div",{className:"flex items-center gap-3 text-muted",children:[a.jsx(sl,{className:"spin size-5 text-accent-text","aria-hidden":"true"}),a.jsx("span",{className:"text-sm",children:"Loading Easy DevOps…"})]})})}function On({title:s,description:o,action:c,icon:u,className:d}){return a.jsxs("div",{className:re("flex flex-col items-center justify-center px-6 py-12 text-center",d),children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-inset text-faint",children:u??a.jsx(k2,{className:"size-5","aria-hidden":"true"})}),a.jsx("h3",{className:"text-sm font-medium text-ink",children:s}),o&&a.jsx("p",{className:"mt-1 max-w-md text-xs text-muted",children:o}),c&&a.jsx("div",{className:"mt-4",children:c})]})}function we({tone:s="info",title:o,children:c,action:u,className:d}){const m={info:"border-info/25 bg-info-soft text-info",warning:"border-warn/30 bg-warn-soft text-warn",danger:"border-bad/30 bg-bad-soft text-bad",success:"border-ok/30 bg-ok-soft text-ok"}[s],p={info:my,warning:zs,danger:zs,success:Dl}[s];return a.jsx("div",{className:re("rounded-md border px-3.5 py-3 text-xs",m,d),role:"status",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(p,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1 text-muted",children:[o&&a.jsx("div",{className:"font-medium text-ink",children:o}),c&&a.jsx("div",{className:re(o?"mt-0.5":void 0,"break-words"),children:c})]}),u&&a.jsx("div",{className:"shrink-0",children:u})]})})}function Et({error:s,onRetry:o,title:c,className:u}){const d=s instanceof Be?s:null,m=d?.status===403,p=typeof d?.payload?.detail=="string"?d.payload.detail:void 0,h=d?.message??(s instanceof Error?s.message:"Something went wrong while loading this section.");return a.jsx(Qe,{className:re("border-bad/25",u),children:a.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-10 text-center",children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:m?a.jsx(Ra,{className:"size-5","aria-hidden":"true"}):a.jsx(zs,{className:"size-5","aria-hidden":"true"})}),a.jsx("h3",{className:"text-sm font-semibold text-ink",children:c??(m?"Request blocked":"Could not load this section")}),a.jsx("p",{className:"mt-1 max-w-md text-xs text-muted",children:h}),p&&a.jsx("p",{className:"mt-1 max-w-md break-all font-mono text-2xs text-faint",children:p}),d&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["HTTP ",d.status,d.code?` · ${d.code}`:""]}),o&&a.jsx(te,{className:"mt-4",variant:"secondary",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:o,children:"Try again"})]})})}const dg="ez-service-banner-dismissed";function Ad({children:s}){return a.jsx("code",{className:"font-mono text-ink",children:s})}function Cw(s){return s.startsAt==="logon"?"at your next logon":s.startsAt==="boot"?"at the next boot":"when the service starts"}function Ew(s){return s.running?{code:"running",tone:"info",title:"Background service is running",body:"This dashboard is the interface only.",action:"Open Processes"}:s.stoppedByUser?{code:"stopped_by_user",tone:"warning",title:"The background service is stopped",body:a.jsxs(a.Fragment,{children:["You stopped it",s.stoppedAtLabel?` on ${s.stoppedAtLabel}`:"",", so monitoring and notifications are paused. It starts again ",Cw(s),", or run"," ",a.jsx(Ad,{children:"ezz service start"})," to start it now."]}),action:"Open Processes"}:{code:"not_running",tone:"warning",title:"The background service is not running",body:s.installed?a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Start the service with ",a.jsx(Ad,{children:"ezz service start"}),"."]}):a.jsxs(a.Fragment,{children:["Monitoring and notifications would run in this dashboard and stop when it closes. Set up the service with ",a.jsx(Ad,{children:s.installCommand}),"."]}),action:"Open Processes"}}function zw(){const{service:s}=Ki(),{pathname:o}=vn(),[c,u]=g.useState(()=>{try{return sessionStorage.getItem(dg)}catch{return null}}),d=Pi(s),m=d?Ew(d):null,p=o!=="/processes",h=g.useMemo(()=>!d||!m?"":[m.code,d.pid,d.startedAt,d.stoppedByUser,d.stoppedAt,d.startsAt,d.installed].join("|"),[d,m]);if(!d||!m||c===h)return null;const x=()=>{u(h);try{sessionStorage.setItem(dg,h)}catch{}};return a.jsx("div",{className:"fade-enter mb-5",children:a.jsx(we,{tone:m.tone,title:m.title,action:a.jsxs("div",{className:"flex items-center gap-1",children:[p&&a.jsxs(bt,{to:"/processes",className:re("inline-flex items-center gap-1 rounded-sm px-2 py-1 text-xs font-medium text-ink","border border-line bg-raised transition-colors hover:border-line-strong hover:bg-inset"),children:[m.action,a.jsx(Os,{className:"size-3","aria-hidden":"true"})]}),a.jsx(at,{label:"Dismiss banner",size:"sm",onClick:x,children:a.jsx(Qi,{className:"size-3.5","aria-hidden":"true"})})]}),children:m.body})})}const Rw={host_missing:"The request arrived without a Host header.",host_port_mismatch:"The request was addressed to a different port.",host_not_local:"The request hostname does not mean this machine.",origin_malformed:"The request carried an unreadable Origin.",origin_port_mismatch:"The request came from a different port.",origin_not_local:"The request came from another site.",origin_cross_site:"The request came from another site.",missing_request_header:"The request was missing the dashboard’s safety header."};function Aw(){const{blocked:s,dismissBlocked:o}=Xn();if(!s)return null;const c=s.blockedReason,u=typeof s.payload.detail=="string"?s.payload.detail:void 0;return a.jsx("div",{className:"fade-enter mb-5 rounded-md border border-bad/30 bg-bad-soft px-3.5 py-3 text-xs",role:"alert",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(Ra,{className:"mt-0.5 size-4 shrink-0 text-bad","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"font-medium text-ink",children:"Request blocked"}),a.jsx("div",{className:"mt-0.5 text-muted",children:c?Rw[c]??"The dashboard refused this request.":s.message}),u&&a.jsx("div",{className:"mt-1 break-all font-mono text-2xs text-faint",children:u}),a.jsx("div",{className:"mt-1.5 text-2xs text-faint",children:"This happens when a request comes from another site or through a different port. Try reloading the dashboard from its own address."})]}),a.jsx(te,{variant:"ghost",size:"sm",onClick:o,className:"-mr-1 -mt-1 shrink-0",children:"Dismiss"})]})})}class Dw extends g.Component{state={error:null};static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,c){console.error(`[ui] ${this.props.area??"page"} crashed`,o,c.componentStack)}render(){return this.state.error?a.jsx(Qe,{className:"border-bad/30",children:a.jsxs("div",{className:"flex flex-col items-center justify-center px-6 py-12 text-center",children:[a.jsx("div",{className:"mb-3 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:a.jsx(Ra,{className:"size-5","aria-hidden":"true"})}),a.jsx("h2",{className:"text-sm font-semibold text-ink",children:this.props.area?`${this.props.area} hit an error`:"This page hit an error"}),a.jsx("p",{className:"mt-1 max-w-lg text-xs text-muted",children:"The rest of the dashboard still works. Try again, or reload the page if it keeps happening."}),a.jsx("p",{className:"mt-2 max-w-lg break-all font-mono text-2xs text-faint",children:this.state.error.message}),a.jsx(te,{className:"mt-4",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>this.setState({error:null}),children:"Try again"})]})}):this.props.children}}function _w(){const[s,o]=g.useState(!1),{pathname:c}=vn(),u=g.useRef(null),d=g.useCallback(()=>o(!1),[]);g.useEffect(()=>{o(!1),u.current?.scrollTo({top:0}),u.current?.focus({preventScroll:!0})},[c]),g.useEffect(()=>{const p=window.matchMedia("(min-width: 1024px)"),h=()=>{p.matches&&o(!1)};return p.addEventListener("change",h),()=>p.removeEventListener("change",h)},[]);const m=Ty(c);return a.jsxs("div",{className:"flex h-full min-h-0 bg-canvas",children:[a.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:left-3 focus:top-3 focus:z-[80] focus:rounded-md focus:border focus:border-line focus:bg-surface focus:px-3 focus:py-2 focus:text-sm focus:text-ink focus:shadow-pop",children:"Skip to content"}),a.jsx(jw,{open:s,onClose:d}),a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[a.jsx(kw,{onMenu:()=>o(!0)}),a.jsx("main",{ref:u,id:"main-content",tabIndex:-1,className:"min-h-0 flex-1 overflow-y-auto outline-none",children:a.jsxs("div",{className:"mx-auto w-full max-w-[var(--ez-content-max)] px-3 py-4 sm:px-5 sm:py-5 lg:px-7 lg:py-6",children:[a.jsx(zw,{}),a.jsx(Aw,{}),a.jsx("div",{className:"page-enter",children:a.jsx(Dw,{area:m?.title,children:a.jsx(Z1,{})})},c)]})})]})]})}function Mw(){const{bootError:s,retryBoot:o}=Xn(),[c,u]=g.useState(!1),d=async()=>{u(!0),await o(),u(!1)};return a.jsx("div",{className:"flex min-h-full items-center justify-center bg-canvas px-4 py-10",children:a.jsxs("div",{className:"w-full max-w-md rounded-xl border border-line bg-surface p-6 shadow-card",children:[a.jsx("div",{className:"mb-4 flex size-10 items-center justify-center rounded-full bg-bad-soft text-bad",children:a.jsx(Q2,{className:"size-5","aria-hidden":"true"})}),a.jsx("h1",{className:"text-lg font-semibold text-ink",children:"Cannot reach the dashboard"}),a.jsxs("p",{className:"mt-1 text-sm text-muted",children:[s?.message??"The dashboard did not answer."," Check that Easy DevOps is running, then try again."]}),s&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["HTTP ",s.status===0?"connection failed":s.status]}),a.jsx(te,{variant:"primary",loading:c,onClick:d,icon:a.jsx(Lt,{className:"size-4","aria-hidden":"true"}),className:"mt-5",children:"Try again"})]})})}const ff="w-full rounded-md border border-line bg-canvas px-3 text-sm text-ink placeholder:text-faint transition-colors duration-[var(--ez-motion-fast)] hover:border-line-strong focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/25 disabled:opacity-60",hf="border-bad/60 hover:border-bad focus:border-bad focus:ring-bad/25";function mf({htmlFor:s,children:o,optional:c}){return a.jsxs("label",{htmlFor:s,className:"mb-1.5 flex items-baseline gap-2 text-xs font-medium text-muted",children:[a.jsx("span",{children:o}),c&&a.jsx("span",{className:"text-2xs font-normal text-faint",children:"Optional"})]})}function xf({id:s,children:o}){return a.jsx("p",{id:s,className:"mt-1.5 text-xs text-bad",role:"alert",children:o})}function _s({id:s,children:o}){return a.jsx("p",{id:s,className:"mt-1.5 text-xs text-faint",children:o})}function Ee({label:s,hint:o,error:c,optional:u,trailing:d,id:m,className:p,...h}){const x=g.useId(),b=m??x,j=`${b}-error`,y=`${b}-hint`;return a.jsxs("div",{className:p,children:[s&&a.jsx(mf,{htmlFor:b,optional:u,children:s}),a.jsxs("div",{className:"relative",children:[a.jsx("input",{id:b,className:re(ff,"h-9",!!d&&"pr-10",c&&hf),"aria-invalid":c?!0:void 0,"aria-describedby":c?j:o?y:void 0,...h}),d&&a.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-1.5",children:d})]}),c?a.jsx(xf,{id:j,children:c}):o?a.jsx(_s,{id:y,children:o}):null]})}function Uo({label:s,hint:o,error:c,optional:u,id:d,className:m,...p}){const h=g.useId(),x=d??h,b=`${x}-error`,j=`${x}-hint`;return a.jsxs("div",{className:m,children:[s&&a.jsx(mf,{htmlFor:x,optional:u,children:s}),a.jsx("textarea",{id:x,className:re(ff,"min-h-24 py-2 leading-relaxed",c&&hf),"aria-invalid":c?!0:void 0,"aria-describedby":c?b:o?j:void 0,...p}),c?a.jsx(xf,{id:b,children:c}):o?a.jsx(_s,{id:j,children:o}):null]})}function il({label:s,hint:o,error:c,optional:u,id:d,className:m,children:p,...h}){const x=g.useId(),b=d??x,j=`${b}-error`,y=`${b}-hint`;return a.jsxs("div",{className:m,children:[s&&a.jsx(mf,{htmlFor:b,optional:u,children:s}),a.jsx("select",{id:b,className:re(ff,"h-9 cursor-pointer pr-8",c&&hf),"aria-invalid":c?!0:void 0,"aria-describedby":c?j:o?y:void 0,...h,children:p}),c?a.jsx(xf,{id:j,children:c}):o?a.jsx(_s,{id:y,children:o}):null]})}function Al({label:s,hint:o,checked:c,onChange:u,disabled:d,className:m,id:p}){const h=g.useId(),x=p??h;return a.jsxs("div",{className:re("flex items-start gap-2.5",m),children:[a.jsx("input",{id:x,type:"checkbox",checked:c,disabled:d,onChange:b=>u(b.target.checked),className:"mt-0.5 size-4 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("label",{htmlFor:x,className:re("cursor-pointer text-sm text-ink",d&&"cursor-not-allowed opacity-60"),children:s}),o&&a.jsx("p",{className:"mt-0.5 text-xs text-faint",children:o})]})]})}function qt({checked:s,onChange:o,label:c,description:u,disabled:d,className:m}){const p=g.useId();return a.jsxs("div",{className:re("flex items-start justify-between gap-4",m),children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{id:p,className:"text-sm text-ink",children:c}),u&&a.jsx("div",{className:"mt-0.5 text-xs text-faint",children:u})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":s,"aria-labelledby":p,disabled:d,onClick:()=>o(!s),className:re("relative mt-0.5 inline-flex h-5 w-9 shrink-0 items-center rounded-pill border transition-colors duration-[var(--ez-motion-fast)] disabled:opacity-50",s?"border-accent bg-accent":"border-line-strong bg-inset","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"),children:a.jsx("span",{className:re("inline-block size-3.5 rounded-full bg-white shadow-sm transition-transform duration-[var(--ez-motion-fast)]",s?"translate-x-[18px]":"translate-x-[3px]")})})]})}function Sa({children:s,className:o}){return a.jsx("div",{className:re("grid gap-4 sm:grid-cols-2",o),children:s})}const Ow=["Domains, certificates and nginx configs in one flow","Live nginx status, health checks and log tails","Processes, notifications and Hub pairing built in","Local-first: no Docker, no cloud account"],Lw="This code has expired. Get a new one with: ezz dashboard setup-code";function fg(s){return s?.setupCodeRequired!==!0?!1:s.setupCodeExpiresAt===null||s.setupCodeExpiresAt<=Date.now()}function hg({compact:s=!1}){return a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx(Cy,{className:"h-6"}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-semibold tracking-tight text-ink",children:"Easy DevOps"}),!s&&a.jsx("div",{className:"text-2xs text-faint",children:"Server control plane"})]})]})}function Uw({children:s}){const{theme:o,toggleTheme:c}=uy();return a.jsxs("div",{className:"relative flex min-h-full items-center justify-center overflow-hidden bg-canvas px-4 py-8 sm:py-12",children:[a.jsxs("div",{className:"pointer-events-none absolute inset-0","aria-hidden":"true",children:[a.jsx("div",{className:"absolute -top-48 left-1/2 h-[420px] w-[760px] -translate-x-1/2 rounded-full bg-accent-soft blur-3xl"}),a.jsx("div",{className:"absolute -bottom-56 right-[-120px] h-[380px] w-[520px] rounded-full bg-info-soft blur-3xl"})]}),a.jsxs("div",{className:"relative grid w-full max-w-4xl overflow-hidden rounded-xl border border-line bg-surface shadow-card lg:grid-cols-[1.02fr_1fr]",children:[a.jsxs("aside",{className:"hidden flex-col justify-between gap-8 border-r border-line bg-raised/40 p-8 lg:flex",children:[a.jsx(hg,{}),a.jsxs("div",{children:[a.jsx("h2",{className:"max-w-sm text-2xl font-semibold leading-snug tracking-tight text-ink",children:"nginx, certificates and processes — one calm console."}),a.jsx("ul",{className:"mt-6 space-y-3",children:Ow.map(u=>a.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-muted",children:[a.jsx("span",{className:"mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full bg-ok-soft text-ok",children:a.jsx(hy,{className:"size-2.5","aria-hidden":"true"})}),u]},u))})]}),a.jsxs("div",{className:"flex items-center gap-2 text-2xs text-faint",children:[a.jsx(sf,{className:"size-3.5","aria-hidden":"true"}),"Runs on this server. Nothing leaves it."]})]}),a.jsxs("section",{className:"relative p-6 sm:p-8",children:[a.jsxs("div",{className:"mb-6 flex items-start justify-between gap-4 lg:justify-end",children:[a.jsx("div",{className:"lg:hidden",children:a.jsx(hg,{compact:!0})}),a.jsx(at,{label:o==="dark"?"Switch to light theme":"Switch to dark theme",onClick:c,children:o==="dark"?a.jsx(by,{className:"size-4.5","aria-hidden":"true"}):a.jsx(xy,{className:"size-4.5","aria-hidden":"true"})})]}),s]})]})]})}function Ay({show:s,onToggle:o}){return a.jsx(at,{label:s?"Hide password":"Show password",size:"sm",onClick:o,className:"text-faint hover:text-ink",children:s?a.jsx(d2,{className:"size-4","aria-hidden":"true"}):a.jsx(h2,{className:"size-4","aria-hidden":"true"})})}function Dy({error:s}){if(!s)return null;const o=typeof s.payload.hint=="string"?s.payload.hint:void 0;return a.jsx(we,{tone:"danger",title:s.message,className:"mb-4",children:o??(s.status===429?"Wait a moment before trying again.":void 0)})}function Hw(){const{login:s,retryBoot:o,sessionMessage:c}=Xn(),[u,d]=g.useState(""),[m,p]=g.useState(!1),[h,x]=g.useState(null),[b,j]=g.useState(null),[y,N]=g.useState(!1),E=async H=>{if(H.preventDefault(),!u){x("Enter your password.");return}x(null),j(null),N(!0);try{await s(u)}catch(S){const k=S instanceof Be?S:null;if(k?.payload.needsSetup){await o();return}if(k?.status===409){await o();return}j(k)}finally{N(!1)}};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"Dashboard"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Welcome back"}),a.jsx("p",{className:"mt-1 text-sm text-muted",children:"Sign in to manage this server."})]}),c&&a.jsx(we,{tone:"info",title:"You were signed out",className:"mb-4",children:c}),a.jsx(Dy,{error:b}),a.jsxs("form",{onSubmit:E,noValidate:!0,children:[a.jsx(Ee,{label:"Password",type:m?"text":"password",value:u,onChange:H=>{d(H.target.value),h&&x(null)},error:h,autoComplete:"current-password",autoFocus:!0,trailing:a.jsx(Ay,{show:m,onToggle:()=>p(H=>!H)})}),a.jsxs(te,{type:"submit",variant:"primary",size:"lg",loading:y,className:"mt-5 w-full",children:["Sign in",!y&&a.jsx(Os,{className:"size-4","aria-hidden":"true"})]})]})]})}function Bw(){const{auth:s,setup:o,retryBoot:c}=Xn(),u=s?.minPasswordLength??8,d=s?.canUseNoPassword===!0,m=s?.setupCodeRequired===!0,p=fg(s),[h,x]=g.useState("password"),[b,j]=g.useState(""),[y,N]=g.useState(""),[E,H]=g.useState(""),[S,k]=g.useState(!1),[_,R]=g.useState({}),[X,z]=g.useState(null),[G,ne]=g.useState(!1),U=async J=>{J.preventDefault();const ce={};if(m&&!b.trim()&&(ce.code="Enter the setup code shown by the server."),h==="password"&&(y.length<u&&(ce.password=`Use at least ${u} characters.`),E!==y&&(ce.confirm="The two passwords do not match.")),R(ce),!(Object.keys(ce).length>0)){z(null),ne(!0);try{if(h==="none")await o({mode:"none"});else{const P=b.trim();await o({password:y,mode:"password",...P?{setupCode:P}:{}})}}catch(P){const ae=P instanceof Be?P:null;if(ae?.status===409){await c();return}if(ae?.status===400&&fg(s)){z(null);return}z(ae)}finally{ne(!1)}}};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"First run"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Set up this dashboard"}),a.jsx("p",{className:"mt-1 text-sm text-muted",children:"Choose how Easy DevOps protects itself. You can change this later in Settings."})]}),a.jsx(Dy,{error:X}),a.jsxs("form",{onSubmit:U,noValidate:!0,children:[a.jsxs("div",{className:re("grid gap-2",d&&"grid-cols-2"),role:"group","aria-label":"Authentication method",children:[a.jsxs("button",{type:"button","aria-pressed":h==="password",onClick:()=>x("password"),className:re("rounded-md border p-3 text-left transition-colors duration-[var(--ez-motion-fast)]",h==="password"?"border-accent bg-accent-soft":"border-line bg-raised hover:border-line-strong hover:bg-inset"),children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(Xi,{className:"size-3.5 text-accent-text","aria-hidden":"true"}),"Password"]}),a.jsx("span",{className:"mt-1 block text-2xs text-muted",children:"Required to sign in from any browser."})]}),d&&a.jsxs("button",{type:"button","aria-pressed":h==="none",onClick:()=>x("none"),className:re("rounded-md border p-3 text-left transition-colors duration-[var(--ez-motion-fast)]",h==="none"?"border-accent bg-accent-soft":"border-line bg-raised hover:border-line-strong hover:bg-inset"),children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(gN,{className:"size-3.5 text-warn","aria-hidden":"true"}),"No password"]}),a.jsx("span",{className:"mt-1 block text-2xs text-muted",children:"Only from this machine, while bound to loopback."})]})]}),m&&p&&a.jsx(we,{tone:"warning",title:Lw,className:"mt-4",children:"Run that on the server, then reload this page to enter the new code."}),m&&a.jsx(Ee,{className:"mt-4",label:"Setup code",value:b,onChange:J=>{j(J.target.value),_.code&&R(ce=>({...ce,code:void 0}))},error:_.code,hint:"Printed in the terminal where the dashboard was started.",autoComplete:"one-time-code"}),h==="password"?a.jsxs(a.Fragment,{children:[a.jsx(Ee,{className:"mt-4",label:"Password",type:S?"text":"password",value:y,onChange:J=>{N(J.target.value),_.password&&R(ce=>({...ce,password:void 0}))},error:_.password,hint:`At least ${u} characters. Stored as a scrypt hash on this server.`,autoComplete:"new-password",autoFocus:!m,trailing:a.jsx(Ay,{show:S,onToggle:()=>k(J=>!J)})}),a.jsx(Ee,{className:"mt-4",label:"Confirm password",type:S?"text":"password",value:E,onChange:J=>{H(J.target.value),_.confirm&&R(ce=>({...ce,confirm:void 0}))},error:_.confirm,autoComplete:"new-password"})]}):a.jsxs(we,{tone:"warning",title:"The dashboard will have no password",className:"mt-4",children:["Anyone who can reach ",s?.bindAddress??"this machine"," can manage nginx, domains and certificates. Keep the dashboard bound to 127.0.0.1. Adding a password later in Settings is recommended if you ever expose it."]}),a.jsxs(te,{type:"submit",variant:"primary",size:"lg",loading:G,className:"mt-5 w-full",children:[h==="password"?"Save password and sign in":"Start without a password",!G&&a.jsx(Os,{className:"size-4","aria-hidden":"true"})]})]})]})}function qw(){const{auth:s,retryBoot:o}=Xn(),[c,u]=g.useState(!1),d=async()=>{u(!0),await o(),u(!1)};return a.jsxs("div",{className:"mx-auto w-full max-w-sm",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"No password"}),a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:"Open the dashboard"}),a.jsxs("p",{className:"mt-1 text-sm text-muted",children:["This dashboard is configured without a password. It only accepts requests from"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-2xs text-ink",children:s?.bindAddress??"this machine"}),"."]})]}),a.jsxs(te,{variant:"primary",size:"lg",loading:c,onClick:d,className:"w-full",children:["Continue to dashboard",!c&&a.jsx(Os,{className:"size-4","aria-hidden":"true"})]})]})}function Gw(){const{auth:s}=Xn();return Vn(s?.needsSetup?"Set up this dashboard":s?.authMode==="none"?"Open the dashboard":"Sign in"),a.jsxs(Uw,{children:[s?.needsSetup?a.jsx(Bw,{}):s?.authMode==="none"?a.jsx(qw,{}):a.jsx(Hw,{}),a.jsxs("div",{className:"mx-auto mt-6 w-full max-w-sm border-t border-line pt-4 text-2xs text-faint",children:[a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[a.jsx(sf,{className:"size-3 shrink-0","aria-hidden":"true"}),a.jsxs("span",{className:"truncate",children:["Listening on"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-2xs text-muted",children:s?.bindAddress??"…"})]})]}),a.jsx("span",{children:"Easy DevOps"})]}),!1]})]})}function Hs(s,o){const{lastChange:c,changeSeq:u}=ia(),d=g.useRef(o);d.current=o,g.useEffect(()=>{if(!c)return;(Array.isArray(s)?s:[s]).includes(c.section)&&d.current()},[u])}function ra({title:s,description:o,actions:c,meta:u,eyebrow:d}){return a.jsxs("div",{className:"mb-5 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-6",children:[a.jsxs("div",{className:"min-w-0",children:[d&&a.jsx("div",{className:"mb-1 text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:d}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx("h1",{className:"text-xl font-semibold tracking-tight text-ink",children:s}),u]}),o&&a.jsx("p",{className:"mt-1 max-w-2xl text-sm text-muted",children:o})]}),c&&a.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:c})]})}function Yw(s){return Promise.all([oe.domains.list(s),oe.ssl.list(s),oe.nginx.status(s)]).then(([o,c,u])=>({domains:o,certs:c,nginx:u}))}const $w={neutral:"text-muted",accent:"text-accent-text",ok:"text-ok",warn:"text-warn",bad:"text-bad",info:"text-info"};function To({label:s,value:o,hint:c,icon:u,tone:d="neutral",pulse:m=!1,to:p}){return a.jsx(bt,{to:p,className:"group block rounded-lg",children:a.jsxs(Qe,{className:"h-full px-4 py-3.5 transition-colors duration-[var(--ez-motion-fast)] group-hover:border-line-strong",children:[a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-2xs font-semibold uppercase tracking-[0.12em] text-faint",children:s}),a.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[a.jsx("span",{className:re("text-xl font-semibold tracking-tight",$w[d]),children:o}),(d==="ok"||d==="bad"||d==="warn")&&a.jsx(Qt,{tone:d,pulse:m})]})]}),a.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-md bg-inset text-muted transition-colors group-hover:text-ink",children:a.jsx(u,{className:"size-4","aria-hidden":"true"})})]}),a.jsx("div",{className:"mt-2 truncate text-2xs text-muted",children:c})]})})}function Vw(s,o,c,u){const d=[];s&&!s.running&&d.push({id:"nginx-down",tone:"bad",title:"nginx is not running",detail:"No domain is being proxied until nginx is started.",to:"/nginx"});for(const m of c)m.status==="error"?d.push({id:`cert-error-${m.domain}`,tone:"bad",title:`Certificate for ${m.domain} cannot be read`,detail:"The certificate files are missing or unreadable.",to:"/ssl"}):m.status==="expired"||m.daysLeft!==null&&m.daysLeft<0?d.push({id:`cert-expired-${m.domain}`,tone:"bad",title:`Certificate for ${m.domain} has expired`,detail:As(m.daysLeft),to:"/ssl"}):m.status==="expiring"&&d.push({id:`cert-expiring-${m.domain}`,tone:"warn",title:`Certificate for ${m.domain} expires soon`,detail:As(m.daysLeft),to:"/ssl"});for(const m of o)u.get(m.name)?.up===!1&&d.push({id:`domain-down-${m.name}`,tone:"bad",title:`${m.name} is not responding`,detail:`The backend ${m.backendHost}:${m.port} did not answer a health check.`,to:"/domains"});return d}function Xw({entry:s}){return s?s.up===null?a.jsx(ve,{tone:"neutral",dot:!0,children:"External"}):s.up?a.jsx(ve,{tone:"ok",dot:!0,children:"Up"}):a.jsx(ve,{tone:"bad",dot:!0,children:"Down"}):a.jsx("span",{className:"text-2xs text-faint",children:"Awaiting check"})}function Zw(s){return s.type==="nginx_down"?{icon:Ls,tone:"text-muted"}:s.type==="cert_expiry"?{icon:Ra,tone:"text-warn"}:s.type==="domain_health"?{icon:Mo,tone:"text-info"}:{icon:Mo,tone:"text-muted"}}function Qw(){Vn("Overview");const s=Nt(),o=bn(),{nginxStatus:c,domainHealth:u,notifications:d}=ia(),{service:m}=Ki(),p=Pi(m),h=yt(Yw),[x,b]=g.useState(!1);Ol(h.reload),Hs(["domains","ssl","nginx"],h.reload);const j=h.data,y=c??j?.nginx??null,N=j?.domains??[],E=j?.certs??[],H=new Map((u??[]).map(U=>[U.name,U])),S=N.filter(U=>U.enabled).length,k=E.filter(U=>U.status==="expiring"),_=E.filter(U=>U.status==="expired"||U.status==="error"),R=j?Vw(y,N,E,H):[],X=R.filter(U=>U.tone==="bad").length,z=j!==null&&y?.running===!0&&R.length===0,G=_.length>0?`${_n(_.length,"certificate")} expired or unreadable`:k.length>0?`${k.length} expiring within 30 days`:E.length>0?"All certificates healthy":"No certificates yet",ne=async()=>{if(await o({title:"Reload nginx?",body:"Reloading applies configuration changes. Existing connections are kept open.",confirmLabel:"Reload nginx"})){b(!0);try{const J=await oe.nginx.reload();J.success?(s.success("Nginx reloaded",J.output.trim()||"Configuration reloaded."),h.reload()):s.error("Nginx reload failed",J.output.trim()||"nginx refused the reload.")}catch(J){s.error("Nginx reload failed",J instanceof Be?J.message:"The dashboard could not complete the reload.")}finally{b(!1)}}};return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Overview",description:"The state of nginx, your domains and their certificates, live.",actions:a.jsx(te,{variant:"secondary",size:"sm",loading:h.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:h.reload,children:"Refresh"})}),h.error&&!j?a.jsx(Et,{error:h.error,onRetry:h.reload}):j?a.jsxs("div",{className:"space-y-4",children:[h.error&&a.jsx(we,{tone:"warning",title:"Showing the last known state",action:a.jsx(te,{variant:"ghost",size:"sm",onClick:h.reload,children:"Try again"}),children:h.error.message}),a.jsxs(Qe,{className:"relative overflow-hidden",children:[a.jsx("div",{className:"status-sheen pointer-events-none absolute inset-x-0 top-0 h-px overflow-hidden","aria-hidden":"true"}),a.jsxs("div",{className:"flex flex-col gap-5 px-5 py-5 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"flex items-start gap-4",children:[a.jsxs("div",{className:re("relative mt-0.5 flex size-11 shrink-0 items-center justify-center rounded-full border",X>0?"border-bad/30 bg-bad-soft text-bad":R.length>0?"border-warn/30 bg-warn-soft text-warn":"border-ok/30 bg-ok-soft text-ok"),children:[X>0||R.length>0?a.jsx(zs,{className:"size-5","aria-hidden":"true"}):a.jsx(Dl,{className:"size-5","aria-hidden":"true"}),a.jsx("span",{className:re("absolute -inset-px rounded-full border",X>0?"border-bad/20":R.length>0?"border-warn/20":"border-ok/20"),"aria-hidden":"true"})]}),a.jsxs("div",{"aria-live":"polite",children:[a.jsx("div",{className:"text-2xs font-semibold uppercase tracking-[0.14em] text-faint",children:"System status"}),a.jsx("div",{className:"mt-0.5 text-lg font-semibold tracking-tight text-ink",children:X>0?"Attention needed":R.length>0?"A few things to check":"All systems healthy"}),a.jsxs("div",{className:"mt-0.5 text-xs text-muted",children:[y?.running?"nginx running":"nginx stopped"," · ",_n(N.length,"domain")," · ",_n(E.length,"certificate"),R.length>0&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("span",{className:X>0?"text-bad":"text-warn",children:[_n(R.length,"item")," need attention"]})]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3 sm:flex-col sm:items-end",children:[a.jsx(ve,{tone:z?"ok":X>0?"bad":"warn",dot:!0,children:z?"Healthy":X>0?"Degraded":"Check"}),a.jsxs("span",{className:"text-2xs text-faint",children:["Checked ",j.nginx?"live":"—",y?.version?` · ${y.version}`:""]})]})]})]}),a.jsxs("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[a.jsx(To,{label:"Nginx",value:y?y.running?"Active":"Offline":"Unknown",hint:y?.running?`PID ${y.pid??"—"}${y.version?` · ${y.version}`:""}`:"Traffic is not being proxied.",icon:Ls,tone:y?y.running?"ok":"bad":"neutral",pulse:y?.running===!0,to:"/nginx"}),a.jsx(To,{label:"Domains",value:`${S}/${N.length}`,hint:N.length===0?"No domains configured yet.":S===N.length?"All domains enabled.":`${N.length-S} disabled.`,icon:_l,tone:N.length===0?"neutral":S>0?"accent":"warn",to:"/domains"}),a.jsx(To,{label:"Certificates",value:String(E.length),hint:G,icon:Ea,tone:_.length>0?"bad":k.length>0?"warn":E.length>0?"ok":"neutral",to:"/ssl"}),a.jsx(To,{label:"Background service",value:p?p.running?"Running":"Stopped":"Unknown",hint:p?p.running?p.startsAt==="unknown"?p.mechanismDetail:`${p.mechanismLabel} · starts ${p.startsAtLabel.toLowerCase()}`:p.stoppedByUser?p.installed?`You stopped it${p.stoppedAtLabel?` on ${p.stoppedAtLabel}`:""}; it starts again automatically.`:"You stopped it; start it to resume monitoring.":p.installed?"Monitoring runs in this window.":"Not installed; monitoring runs in this window.":"Checking…",icon:fy,tone:p?p.running?"ok":"warn":"neutral",pulse:p?.running===!0,to:"/processes"})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs(bt,{to:"/domains?new=1",className:ka("primary","sm"),children:[a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),"Add domain"]}),a.jsxs(bt,{to:"/ssl?new=1",className:ka("secondary","sm"),children:[a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),"Issue certificate"]}),a.jsx(te,{variant:"secondary",size:"sm",loading:x,disabled:!y?.running,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:ne,children:"Reload nginx"})]}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-3",children:[a.jsxs(Qe,{className:"xl:col-span-2",children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3 sm:px-5",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Domain health"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Backends are checked on connect and every 60 seconds."})]}),a.jsx(bt,{to:"/domains",className:"text-2xs font-medium text-muted hover:text-ink",children:"Manage"})]}),N.length===0?a.jsxs("div",{className:"flex flex-col items-center gap-3 px-5 py-10 text-center",children:[a.jsx(_l,{className:"size-5 text-faint","aria-hidden":"true"}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"No domains yet"}),a.jsx("p",{className:"mt-1 text-xs text-muted",children:"Add a domain to put a backend behind nginx."})]}),a.jsx(bt,{to:"/domains?new=1",className:ka("primary","sm"),children:"Add your first domain"})]}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-xs",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-line text-left text-2xs uppercase tracking-wider text-faint",children:[a.jsx("th",{className:"px-4 py-2 font-medium sm:px-5",children:"Domain"}),a.jsx("th",{className:"hidden px-3 py-2 font-medium sm:table-cell",children:"Target"}),a.jsx("th",{className:"px-3 py-2 font-medium",children:"Health"}),a.jsx("th",{className:"hidden px-3 py-2 font-medium md:table-cell",children:"Certificate"})]})}),a.jsx("tbody",{children:N.map(U=>{const J=H.get(U.name);return a.jsxs("tr",{className:"border-b border-line/60 last:border-0 hover:bg-raised/40",children:[a.jsx("td",{className:"px-4 py-2.5 sm:px-5",children:a.jsxs(bt,{to:`/domains?domain=${encodeURIComponent(U.name)}`,className:"flex items-center gap-2 font-medium text-ink hover:text-accent-text",children:[a.jsx("span",{className:"truncate",children:U.name}),!U.enabled&&a.jsx(ve,{tone:"neutral",children:"Disabled"})]})}),a.jsxs("td",{className:"hidden px-3 py-2.5 font-mono text-2xs text-muted sm:table-cell",children:[U.backendHost,":",U.port]}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Xw,{entry:J})}),a.jsx("td",{className:"hidden px-3 py-2.5 text-2xs md:table-cell",children:U.ssl.enabled?a.jsx("span",{className:re(U.daysLeft!==null&&U.daysLeft<30?"text-warn":"text-muted"),children:U.daysLeft!==null?As(U.daysLeft):"Unknown"}):a.jsx("span",{className:"text-faint",children:"Not enabled"})})]},U.name)})})]})}),u===null&&N.length>0&&a.jsx("div",{className:"border-t border-line px-4 py-2 text-2xs text-faint sm:px-5",children:"Waiting for the first health check…"})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs(Qe,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Needs attention"}),a.jsx("span",{className:"text-2xs text-faint",children:R.length})]}),R.length===0?a.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-5 text-xs text-muted",children:[a.jsx(Dl,{className:"size-4 text-ok","aria-hidden":"true"}),"Nothing needs attention right now."]}):a.jsx("div",{className:"max-h-[280px] overflow-y-auto",children:R.map(U=>a.jsxs(bt,{to:U.to,className:"group flex items-start gap-2.5 border-b border-line/60 px-4 py-2.5 last:border-0 hover:bg-raised/50",children:[a.jsx(Qt,{tone:U.tone,className:"mt-1"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs font-medium text-ink",children:U.title}),a.jsx("div",{className:"mt-0.5 text-2xs text-muted",children:U.detail})]}),a.jsx(Wj,{className:"mt-0.5 size-3.5 shrink-0 text-faint transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]},U.id))})]}),a.jsxs(Qe,{children:[a.jsxs("div",{className:"flex items-center justify-between border-b border-line px-4 py-3",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Recent events"}),a.jsx(bt,{to:"/notifications",className:"text-2xs font-medium text-muted hover:text-ink",children:"All events"})]}),d.length===0?a.jsx("div",{className:"px-4 py-5 text-xs text-muted",children:"No events since this tab opened. Alerts from nginx, certificates and domain health appear here live."}):a.jsx("div",{children:d.slice(0,6).map(U=>{const{icon:J,tone:ce}=Zw(U);return a.jsxs("div",{className:"flex items-start gap-2.5 border-b border-line/60 px-4 py-2.5 last:border-0",children:[a.jsx(J,{className:re("mt-0.5 size-3.5 shrink-0",ce),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"text-xs leading-snug text-ink",children:U.message}),a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:Ji(U.timestamp)})]})]},U.id)})})]})]})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-28 w-full rounded-lg"}),a.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-4",children:[0,1,2,3].map(U=>a.jsx(Fe,{className:"h-[92px] rounded-lg"},U))}),a.jsxs("div",{className:"grid gap-4 xl:grid-cols-3",children:[a.jsx(Fe,{className:"h-64 rounded-lg xl:col-span-2"}),a.jsx(Fe,{className:"h-64 rounded-lg"})]})]})]})}function pf(s){if(!s||!s.trim())return"A domain name is required.";const c=(s.startsWith("*.")?s.slice(2):s).split(".");if(c.length<2)return"Use at least two labels, for example example.com.";const u=/^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$/;return c.some(d=>!d||!u.test(d))?"Use letters, digits and hyphens only; each label must start and end with a letter or digit.":null}function Vo(s){const o=Number(s);return!Number.isInteger(o)||o<1||o>65535?"Port must be a whole number between 1 and 65535.":null}function _y(s){return s&&(!s.includes("@")||s.trim()!==s)?"Enter a valid email address.":null}function Kw(s){return s?/^\d+[kmgKMG]?$/.test(s)?null:"Use a size like 10m, 1g or 512k.":null}function Oi(s,o){const c=Number(s);return!Number.isInteger(c)||c<1?`${o} must be a positive whole number.`:null}function mg(s,o){return s?s.length<o?`Use at least ${o} characters.`:null:"Enter a password."}const Jw=2048,xg=/^[A-Za-z0-9._~-]{1,200}$/;function Pw(s){if(!s)return"The Hub URL is missing.";if(s!==s.trim())return"The Hub URL must not have spaces around it.";if(s.includes("://")&&!/^https?:\/\//i.test(s))return"The Hub URL must use http or https.";const o=/^https?:\/\//i.test(s)?s:`https://${s}`;let c;try{c=new URL(o)}catch{return"The Hub URL is not valid."}return c.protocol!=="http:"&&c.protocol!=="https:"?"The Hub URL must use http or https.":c.hostname?c.username||c.password?"The Hub URL must not contain credentials.":null:"The Hub URL is missing a host."}function Fw(s){const o=s.trim();if(!o)return"Paste the connection string the Hub gave you.";if(o.length>Jw)return"That connection string is too long.";if(!o.toLowerCase().startsWith("ezops://"))return"The connection string must start with ezops://.";const c=o.slice(8).split("|");if(c.length!==3)return"Expected the form ezops://hubUrl|serverId|secret.";const[u,d,m]=c.map(h=>h.trim()),p=Pw(u);return p||(d?m?xg.test(d)?xg.test(m)?null:"The secret has characters the Hub does not use.":"The server ID has characters the Hub does not use.":"The secret is missing.":"The server ID is missing.")}function Iw(s){const o=document.activeElement,c=document.getSelection(),u=[];if(c)for(let p=0;p<c.rangeCount;p+=1)u.push(c.getRangeAt(p));const d=document.createElement("textarea");d.value=s,d.setAttribute("readonly",""),d.style.position="fixed",d.style.top="0",d.style.left="0",d.style.opacity="0",d.style.pointerEvents="none",document.body.appendChild(d);let m;try{d.select(),d.setSelectionRange(0,s.length),m=document.execCommand("copy")}catch{m=!1}finally{if(d.remove(),c){c.removeAllRanges();for(const p of u)c.addRange(p)}o?.focus({preventScroll:!0})}return m}async function Ww(s){if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(s),!0}catch{}return Iw(s)}function jt({value:s,label:o="Copy",withText:c=!1,className:u}){const[d,m]=g.useState("idle"),p=g.useRef(null),h=Nt();g.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const x=async()=>{const y=await Ww(s);m(y?"copied":"failed"),y||h.error("Could not copy","The browser blocked clipboard access. Select the text and copy it manually."),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>m("idle"),1600)},b=d==="copied"?a.jsx(hy,{className:"size-3.5 text-ok","aria-hidden":"true"}):d==="failed"?a.jsx(zs,{className:"size-3.5 text-bad","aria-hidden":"true"}):a.jsx(r2,{className:"size-3.5","aria-hidden":"true"}),j=d==="copied"?"Copied":d==="failed"?"Copy failed":o;return c?a.jsx(te,{size:"sm",variant:"secondary",icon:b,onClick:x,className:u,children:a.jsx("span",{"aria-live":"polite",children:j})}):a.jsx(at,{label:j,size:"sm",variant:"ghost",onClick:x,className:re(d==="copied"&&"text-ok",d==="failed"&&"text-bad",u),children:b})}const eS="text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript",My=[{id:"domain_health",label:"Port / health check",description:"The backend stops answering its health check."},{id:"cert_expiry",label:"SSL / certificate expiry",description:"A certificate is expired or close to expiry."},{id:"nginx_down",label:"nginx stopped",description:"nginx itself is not serving requests."}],Oy=()=>({domain_health:{enabled:!0,channelIds:[]},cert_expiry:{enabled:!0,channelIds:[]},nginx_down:{enabled:!0,channelIds:[]}});function tS(){return{name:"",port:3e3,backendHost:"127.0.0.1",upstreamType:"http",www:!1,wildcard:!1,enabled:!0,ssl:{enabled:!1,certPath:"",keyPath:"",redirect:!0,hsts:!1,hstsMaxAge:31536e3},performance:{maxBodySize:"10m",readTimeout:60,connectTimeout:10,proxyBuffers:!1,gzip:!0,gzipTypes:eS},security:{rateLimit:!1,rateLimitRate:10,rateLimitBurst:20,securityHeaders:!1,custom404:!1,custom50x:!1},advanced:{accessLog:!0,customLocations:""},notifications:Oy()}}function nS(s){const o=Oy();for(const c of My){const u=s.notifications?.[c.id];u&&(o[c.id]={enabled:u.enabled,channelIds:[...u.channelIds??[]]})}return{name:s.name,port:s.port,backendHost:s.backendHost||"127.0.0.1",upstreamType:s.upstreamType||"http",www:s.www,wildcard:s.wildcard,enabled:s.enabled,ssl:{enabled:!!s.ssl?.enabled,certPath:s.ssl?.certPath??"",keyPath:s.ssl?.keyPath??"",redirect:s.ssl?.redirect??!0,hsts:s.ssl?.hsts??!1,hstsMaxAge:s.ssl?.hstsMaxAge||31536e3},performance:{...s.performance},security:{...s.security},advanced:{...s.advanced},notifications:o}}const pg={http:"HTTP",https:"HTTPS",ws:"WebSocket"};function Xd(s){return s.trim().replace(/^\*\./,"")}function aS(s){return"status"in s&&s.status==="waiting_dns"}function lS(s,o){const c={};if(o){const h=pf(Xd(s.name));h&&(c["domain-name"]=h)}if(s.backendHost.trim()||(c["backend-host"]="A backend host or URL is required."),!/^https?:\/\//i.test(s.backendHost.trim())){const h=Vo(s.port);h&&(c["backend-port"]=h)}const d=Kw(s.performance.maxBodySize);d&&(c["max-body"]=d);const m=Oi(s.performance.readTimeout,"Read timeout");m&&(c["read-timeout"]=m);const p=Oi(s.performance.connectTimeout,"Connect timeout");if(p&&(c["connect-timeout"]=p),s.ssl.enabled&&s.ssl.hsts){const h=Oi(s.ssl.hstsMaxAge,"HSTS max-age");h&&(c["hsts-max-age"]=h)}if(s.security.rateLimit){const h=Oi(s.security.rateLimitRate,"Rate");h&&(c["rate-limit-rate"]=h);const x=Oi(s.security.rateLimitBurst,"Burst");x&&(c["rate-limit-burst"]=x)}return c}function gg(s){if(s instanceof Be){const o=s.payload.error;if(o&&typeof o=="object")return{message:"Certificate creation failed",detail:[o.step?`Step: ${o.step}`:"",o.cause?`Cause: ${o.cause}`:"",o.consequence?`Note: ${o.consequence}`:""].filter(Boolean).join(`
|
|
441
|
-
`)||"The certificate authority did not issue a certificate.",hint:"nginx is left as it was."};const c=s.code==="email_required"?"Set the ACME email in Settings → General, then try again.":typeof s.payload.hint=="string"?s.payload.hint:void 0;return{message:"Certificate creation failed",detail:(typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.output=="string"?s.payload.output:void 0)??s.message,hint:c}}return{message:"Certificate creation failed",detail:s instanceof Error?s.message:"The request could not be completed."}}function ks({id:s,title:o,description:c,icon:u,open:d,onToggle:m,children:p}){return a.jsxs("section",{className:"border-b border-line last:border-b-0",children:[a.jsx("h3",{children:a.jsxs("button",{type:"button","aria-expanded":d,"aria-controls":`section-${s}`,onClick:m,className:"group flex w-full items-center gap-3 px-5 py-3.5 text-left transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/50",children:[a.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-inset text-muted transition-colors group-hover:text-ink",children:a.jsx(u,{className:"size-3.5","aria-hidden":"true"})}),a.jsxs("span",{className:"min-w-0 flex-1",children:[a.jsx("span",{className:"block text-sm font-medium text-ink",children:o}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:c})]}),a.jsx(Fj,{className:re("size-4 shrink-0 text-faint transition-transform duration-[var(--ez-motion-fast)]",d&&"rotate-180"),"aria-hidden":"true"})]})}),d&&a.jsx("div",{id:`section-${s}`,className:"px-5 pb-5 pt-1",children:p})]})}function sS({channel:s,checked:o,onChange:c}){return a.jsxs("label",{className:re("flex cursor-pointer items-center gap-2 rounded-md border px-2.5 py-1.5 text-xs transition-colors duration-[var(--ez-motion-fast)]",o?"border-accent/50 bg-accent-soft/50 text-ink":"border-line text-muted hover:border-line-strong hover:text-ink"),children:[a.jsx("input",{type:"checkbox",checked:o,onChange:u=>c(u.target.checked),className:"size-3.5 shrink-0 accent-[var(--ez-accent)]"}),a.jsx("span",{className:"font-medium",children:s.name}),a.jsx("span",{className:"text-2xs text-faint",children:s.type})]})}const Ts=s=>Number.isFinite(s)&&s!==0?s:"";function yg({wildcard:s,certMethod:o,onMethodChange:c,certFailure:u,dnsPending:d,certAction:m,onCreate:p,onConfirmDns:h,onCancelDns:x,disabledReason:b,extraActions:j}){const y=m!==null;return a.jsxs("div",{className:"space-y-3",children:[u&&a.jsxs(we,{tone:"danger",title:u.message,children:[u.hint&&a.jsx("div",{children:u.hint}),u.detail&&a.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs",children:u.detail})]}),d?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"Add this DNS TXT record, then continue"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:d.hint??"The certificate authority checks this record before issuing the certificate."})]}),a.jsxs("div",{className:"space-y-2 rounded-md border border-line bg-canvas p-3 font-mono text-2xs",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"font-sans text-2xs uppercase tracking-wider text-faint",children:"Name"}),a.jsx("div",{className:"mt-0.5 break-all text-ink",children:d.txtName})]}),a.jsx(jt,{value:d.txtName,label:"Copy record name"})]}),a.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-line pt-2",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"font-sans text-2xs uppercase tracking-wider text-faint",children:"Value"}),a.jsx("div",{className:"mt-0.5 break-all text-ink",children:d.txtValue})]}),a.jsx(jt,{value:d.txtValue,label:"Copy record value"})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(te,{variant:"primary",size:"sm",loading:m==="confirm",onClick:h,children:"I added the record, continue"}),a.jsx(te,{variant:"secondary",size:"sm",onClick:x,disabled:y,children:"Cancel issuance"})]})]}):a.jsxs("div",{className:"space-y-3",children:[a.jsxs("fieldset",{children:[a.jsx("legend",{className:"mb-2 text-xs font-medium text-muted",children:"Validation method"}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("label",{className:re("flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-xs",o==="http"?"border-accent/50 bg-accent-soft/40":"border-line hover:border-line-strong",s&&"cursor-not-allowed opacity-50"),children:[a.jsx("input",{type:"radio",name:"cert-method",value:"http",checked:o==="http",disabled:s||y,onChange:()=>c("http"),className:"mt-0.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{children:[a.jsx("span",{className:"block font-medium text-ink",children:"HTTP challenge"}),a.jsx("span",{className:"block text-2xs text-faint",children:"DNS already points here"})]})]}),a.jsxs("label",{className:re("flex cursor-pointer items-start gap-2 rounded-md border px-3 py-2 text-xs",o==="dns"?"border-accent/50 bg-accent-soft/40":"border-line hover:border-line-strong"),children:[a.jsx("input",{type:"radio",name:"cert-method",value:"dns",checked:o==="dns",disabled:y,onChange:()=>c("dns"),className:"mt-0.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{children:[a.jsx("span",{className:"block font-medium text-ink",children:"DNS challenge"}),a.jsx("span",{className:"block text-2xs text-faint",children:"Add a TXT record"})]})]})]}),s&&a.jsx("p",{className:"mt-2 text-2xs text-warn",children:"Wildcard certificates require the DNS challenge."})]}),b&&a.jsx("p",{className:"text-2xs text-warn",children:b}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx(te,{variant:"primary",size:"sm",loading:m==="issue",onClick:p,disabled:!!b,icon:a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),children:"Create certificate"}),j]})]})]})}function iS({editor:s,onClose:o,onSaved:c}){const u=s.mode==="edit"?s.domain:null,d=Nt(),m=bn(),p=$i(),h=g.useId(),[x,b]=g.useState(()=>u?nS(u):tS()),j=g.useRef(JSON.stringify(x)),y=JSON.stringify(x)!==j.current,[N,E]=g.useState(()=>u?{basic:!0,ssl:!0,performance:!0,security:!0,advanced:!0,notifications:!0}:{basic:!0,ssl:!0,performance:!1,security:!1,advanced:!1,notifications:!1}),[H,S]=g.useState({}),[k,_]=g.useState(null),[R,X]=g.useState(!1),[z,G]=g.useState(null),[ne,U]=g.useState("http"),[J,ce]=g.useState(null),[P,ae]=g.useState(null),[M,A]=g.useState(null),le=yt(V=>oe.settings.channels.list(V),[],{enabled:!!u}),F=yt(V=>oe.ssl.list(V),[],{enabled:x.ssl.enabled});g.useEffect(()=>{if(!y)return;const V=pe=>{pe.preventDefault(),pe.returnValue=""};return window.addEventListener("beforeunload",V),()=>window.removeEventListener("beforeunload",V)},[y]),g.useEffect(()=>{z&&x.wildcard&&U("dns")},[z,x.wildcard]);const ee=/^https?:\/\//i.test(x.backendHost.trim()),de=u?u.name:Xd(x.name),$=pf(de),ie=x.ssl.certPath.trim()===""&&x.ssl.keyPath.trim()==="",Se=F.data?.some(V=>V.domain===de)??!1,ke=x.ssl.enabled&&ie&&!F.loading&&!Se&&!z;function $e(V,pe){b(Ae=>({...Ae,[V]:pe}))}function Ge(V,pe){b(Ae=>({...Ae,ssl:{...Ae.ssl,[V]:pe}}))}function T(V,pe){b(Ae=>({...Ae,performance:{...Ae.performance,[V]:pe}}))}function I(V,pe){b(Ae=>({...Ae,security:{...Ae.security,[V]:pe}}))}function Q(V,pe){b(Ae=>({...Ae,advanced:{...Ae.advanced,[V]:pe}}))}function W(V,pe){b(Ae=>({...Ae,notifications:{...Ae.notifications,[V]:{...Ae.notifications[V],...pe}}}))}function je(V,pe,Ae){b(Jt=>{const wt=Jt.notifications[V],We=Ae?Array.from(new Set([...wt.channelIds,pe])):wt.channelIds.filter(rl=>rl!==pe);return{...Jt,notifications:{...Jt.notifications,[V]:{...wt,channelIds:We}}}})}const Ce=V=>E(pe=>({...pe,[V]:!0})),De=V=>({...x,...V,ssl:{...x.ssl,...V?.ssl??{}},name:u?u.name:Xd(x.name)}),fe=V=>{const pe=lS(V,!u);if(Object.keys(pe).length===0)return!0;S(pe),_({message:"Check the highlighted fields before saving."}),(pe["domain-name"]||pe["backend-host"]||pe["backend-port"])&&Ce("basic"),(pe["max-body"]||pe["read-timeout"]||pe["connect-timeout"])&&Ce("performance"),(pe["rate-limit-rate"]||pe["rate-limit-burst"])&&Ce("security"),pe["hsts-max-age"]&&Ce("ssl");const Ae=Object.keys(pe)[0];return queueMicrotask(()=>document.getElementById(Ae)?.focus()),!1},ye=async V=>{const pe=De(V);if(!fe(pe))return;const Ae=u?.name??pe.name;S({}),_(null),X(!0);let Jt;try{Jt=u?await oe.domains.update(u.name,pe):await oe.domains.create(pe)}catch(wt){const We=wt instanceof Be?wt:null;if(!We){G(null),ae(null),ce(null),d.warning("The dashboard’s reply could not be read","The domain list was reloaded. Check that the change is there before saving again."),c();return}We.status===422&&We.code==="cert_missing"?(G({certPath:typeof We.payload.certPath=="string"?We.payload.certPath:"",keyPath:typeof We.payload.keyPath=="string"?We.payload.keyPath:"",hint:typeof We.payload.hint=="string"?We.payload.hint:"The SSL certificate files do not exist at the configured paths."}),ce(null),ae(null),_(null),U(x.wildcard?"dns":"http"),Ce("ssl")):We.status===0?(_({message:"The dashboard did not answer.",detail:We.message,hint:"Saving may still have worked: check the domain list before trying again."}),d.error("The dashboard did not answer","The change may already have been saved.")):(_({message:We.message??"The domain could not be saved.",detail:typeof We.payload.detail=="string"?We.payload.detail:typeof We.payload.output=="string"?We.payload.output:void 0,hint:typeof We.payload.hint=="string"?We.payload.hint:void 0}),d.error("Could not save the domain",We.message??void 0));return}finally{X(!1)}G(null),ae(null),ce(null),d.success(u?"Domain saved":"Domain created",u?`${Jt?.name??Ae} was updated and its nginx config regenerated.`:`${Jt?.name??Ae} is configured; nginx will start serving it on the next reload.`),c()},Gt=async()=>{if(fe(De({ssl:{...x.ssl,enabled:!0}}))){A("issue"),ce(null);try{const V=await oe.ssl.create({domain:de,www:x.www,validationMethod:x.wildcard?"dns":ne});if(aS(V)){ae(V);return}const pe={...x.ssl,enabled:!0,certPath:V.certPath,keyPath:V.keyPath};b(Ae=>({...Ae,ssl:pe})),G(null),ae(null),await ye({ssl:pe})}catch(V){ce(gg(V))}finally{A(null)}}},Zn=async()=>{if(P){A("confirm"),ce(null);try{const V=await oe.ssl.confirmDns(P.domain),pe={...x.ssl,enabled:!0,certPath:V.certPath,keyPath:V.keyPath};b(Ae=>({...Ae,ssl:pe})),ae(null),G(null),await ye({ssl:pe})}catch(V){ce(gg(V)),ae(null)}finally{A(null)}}},an=async()=>{if(P){A("confirm");try{await oe.ssl.cancelDns(P.domain),d.info("DNS challenge cancelled","No certificate was requested.")}catch{d.warning("Could not cancel the DNS challenge")}finally{ae(null),A(null)}}},Yt=()=>{const V={...x.ssl,enabled:!1};b(pe=>({...pe,ssl:V})),G(null),ce(null),ae(null),ye({ssl:V})},rt=()=>{G(null),ce(null),ae(null)},Le=R||M!==null,Ut=async()=>y?m({title:"Discard changes?",body:"The changes to this domain have not been saved.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}):!0,jn=()=>{P&&oe.ssl.cancelDns(P.domain).catch(()=>{})},Kt=async()=>{Le||await Ut()&&(jn(),o())},oa=g.useRef(Kt);oa.current=Kt;const Qn=g.useCallback(()=>{oa.current()},[]),ln=async()=>{Le||await Ut()&&(jn(),o(),p("/settings"))};return a.jsxs(yn,{open:!0,onClose:Qn,title:u?`Edit ${u.name}`:"New domain",description:"Changes are written to nginx, tested, and rolled back automatically if nginx rejects them.",size:"xl",preventClose:Le,bodyClassName:"px-0 py-0",footer:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"mr-auto hidden text-2xs text-faint sm:block",children:u?"The domain name cannot change after creation.":"The domain is enabled as soon as it is created."}),a.jsx(te,{variant:"ghost",onClick:Qn,disabled:Le,children:"Cancel"}),a.jsx(te,{variant:"primary",type:"submit",form:h,loading:R,disabled:M!==null,children:u?"Save changes":"Create domain"})]}),children:[(k||z)&&a.jsxs("div",{className:"space-y-3 border-b border-line px-5 py-4",children:[k&&!z&&a.jsxs(we,{tone:"danger",title:k.message,children:[k.hint&&a.jsx("div",{children:k.hint}),k.detail&&a.jsx("pre",{className:"mt-2 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:k.detail})]}),z&&a.jsxs(a.Fragment,{children:[a.jsx(we,{tone:"warning",title:"SSL certificate not found",action:a.jsx(te,{variant:"ghost",size:"sm",onClick:rt,disabled:Le,children:"Keep editing"}),children:a.jsxs("div",{className:"space-y-1",children:[a.jsx("div",{className:"break-all font-mono text-2xs",children:z.certPath||z.keyPath}),a.jsx("div",{children:z.hint}),a.jsx("div",{children:"Issue a certificate now, disable SSL for this domain, or point the paths at files that already exist."})]})}),a.jsx("div",{className:"rounded-md border border-line bg-raised/40 p-3",children:a.jsx(yg,{wildcard:x.wildcard,certMethod:ne,onMethodChange:U,certFailure:J,dnsPending:P,certAction:M,onCreate:Gt,onConfirmDns:Zn,onCancelDns:an,extraActions:a.jsx(te,{variant:"dangerGhost",size:"sm",onClick:Yt,disabled:M!==null,children:"Disable SSL and save"})})})]})]}),a.jsxs("form",{id:h,onSubmit:V=>{V.preventDefault(),Le||ye()},children:[a.jsx(ks,{id:"basic",title:"Basic configuration",description:"What nginx serves and where traffic goes.",icon:_l,open:N.basic??!1,onToggle:()=>E(V=>({...V,basic:!V.basic})),children:a.jsxs(Sa,{children:[a.jsx(Ee,{id:"domain-name",className:"sm:col-span-2",label:"Domain name",placeholder:"api.example.com",value:x.name,disabled:!!u,onChange:V=>$e("name",V.target.value),error:H["domain-name"],hint:x.wildcard?"Enter the bare domain — the *. prefix is added automatically.":u?"The domain name cannot be changed after creation.":void 0,autoComplete:"off",spellCheck:!1}),a.jsx(Ee,{id:"backend-host",className:"sm:col-span-2",label:"Backend host or URL",placeholder:"127.0.0.1 or https://app.vercel.app",value:x.backendHost,onChange:V=>$e("backendHost",V.target.value),error:H["backend-host"],hint:"A host and port, or a full http(s) URL to proxy to.",autoComplete:"off",spellCheck:!1}),a.jsx(Ee,{id:"backend-port",label:"Backend port",type:"number",inputMode:"numeric",min:1,max:65535,value:Ts(x.port),disabled:ee,onChange:V=>$e("port",Number(V.target.value)),error:H["backend-port"],hint:ee?"Taken from the URL.":void 0}),a.jsx(il,{label:"Upstream type",value:x.upstreamType,onChange:V=>$e("upstreamType",V.target.value),children:Object.keys(pg).map(V=>a.jsx("option",{value:V,children:pg[V]},V))}),a.jsxs("div",{className:"sm:col-span-2 space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:x.wildcard,onChange:V=>b(pe=>({...pe,wildcard:V,www:V?!1:pe.www})),label:"Wildcard domain",description:"Serve *.example.com. Requires a DNS-01 certificate."}),!x.wildcard&&a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:x.www,onChange:V=>$e("www",V),label:"Include www subdomain",description:"Adds www.example.com to server_name."})})]})]})}),a.jsx(ks,{id:"ssl",title:"SSL",description:"Serve this domain over HTTPS.",icon:Ea,open:N.ssl??!1,onToggle:()=>E(V=>({...V,ssl:!V.ssl})),children:a.jsxs("div",{className:"space-y-4",children:[x.ssl.enabled?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[a.jsx(Ee,{label:"Certificate path",value:x.ssl.certPath,onChange:V=>Ge("certPath",V.target.value),placeholder:"fullchain.pem",hint:"Leave blank to use the dashboard's certificate directory.",autoComplete:"off",spellCheck:!1,className:"font-mono"}),a.jsx(Ee,{label:"Private key path",value:x.ssl.keyPath,onChange:V=>Ge("keyPath",V.target.value),placeholder:"privkey.pem",hint:"Leave blank to use the dashboard's certificate directory.",autoComplete:"off",spellCheck:!1,className:"font-mono"})]}),ke&&a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-ink",children:"No certificate paths set"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["Create a certificate for ",de||"this domain"," now. On success, the certificate and key paths are filled in automatically."]})]}),a.jsx(yg,{wildcard:x.wildcard,certMethod:ne,onMethodChange:U,certFailure:J,dnsPending:P,certAction:M,onCreate:Gt,onConfirmDns:Zn,onCancelDns:an,disabledReason:de?$??null:"Enter the domain name above to create a certificate."})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:x.ssl.redirect,onChange:V=>Ge("redirect",V),label:"Redirect HTTP to HTTPS",description:"Port 80 requests are sent to the HTTPS address."}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:x.ssl.hsts,onChange:V=>Ge("hsts",V),label:"Enable HSTS",description:"Tells browsers to use HTTPS for this domain only."})}),x.ssl.hsts&&a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(Ee,{id:"hsts-max-age",label:"HSTS max-age",type:"number",inputMode:"numeric",min:1,value:Ts(x.ssl.hstsMaxAge),onChange:V=>Ge("hstsMaxAge",Number(V.target.value)),error:H["hsts-max-age"],hint:"Seconds. 31536000 is one year.",className:"max-w-56"})})]})]}):a.jsx(qt,{checked:x.ssl.enabled,onChange:V=>Ge("enabled",V),label:"Enable SSL / HTTPS",description:"Adds a 443 server block with the certificate below."}),x.ssl.enabled&&a.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted",children:[a.jsx(Ra,{className:"mt-0.5 size-3.5 shrink-0 text-warn","aria-hidden":"true"}),a.jsx("span",{children:"The certificate files must exist before this domain can be saved. If they are missing, you will be offered to issue one."})]})]})}),a.jsx(ks,{id:"performance",title:"Performance",description:"Request limits, timeouts and compression.",icon:v2,open:N.performance??!1,onToggle:()=>E(V=>({...V,performance:!V.performance})),children:a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[a.jsx(Ee,{id:"max-body",label:"Max body size",value:x.performance.maxBodySize,onChange:V=>T("maxBodySize",V.target.value),error:H["max-body"],placeholder:"10m",hint:"For uploads: 10m, 512k or 1g.",autoComplete:"off"}),a.jsx(Ee,{id:"read-timeout",label:"Read timeout",type:"number",inputMode:"numeric",min:1,value:Ts(x.performance.readTimeout),onChange:V=>T("readTimeout",Number(V.target.value)),error:H["read-timeout"],hint:"Seconds."}),a.jsx(Ee,{id:"connect-timeout",label:"Connect timeout",type:"number",inputMode:"numeric",min:1,value:Ts(x.performance.connectTimeout),onChange:V=>T("connectTimeout",Number(V.target.value)),error:H["connect-timeout"],hint:"Seconds."})]}),a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:x.performance.proxyBuffers,onChange:V=>T("proxyBuffers",V),label:"Proxy buffering",description:"Buffer upstream responses on disk for slow clients."}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:x.performance.gzip,onChange:V=>T("gzip",V),label:"Gzip compression",description:"Compress text responses before sending them."})}),x.performance.gzip&&a.jsxs("div",{className:"border-t border-line pt-3",children:[a.jsx(Uo,{label:"Gzip MIME types",value:x.performance.gzipTypes,onChange:V=>T("gzipTypes",V.target.value),rows:3,spellCheck:!1,className:"font-mono"}),a.jsx(_s,{children:"Space-separated list of content types."})]})]})]})}),a.jsx(ks,{id:"security",title:"Security",description:"Rate limiting and response headers.",icon:sf,open:N.security??!1,onToggle:()=>E(V=>({...V,security:!V.security})),children:a.jsxs("div",{className:"space-y-3 rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:x.security.rateLimit,onChange:V=>I("rateLimit",V),label:"Rate limiting",description:"Limit requests per IP address."}),x.security.rateLimit&&a.jsxs("div",{className:"grid gap-4 border-t border-line pt-3 sm:grid-cols-2",children:[a.jsx(Ee,{id:"rate-limit-rate",label:"Requests per second",type:"number",inputMode:"numeric",min:1,value:Ts(x.security.rateLimitRate),onChange:V=>I("rateLimitRate",Number(V.target.value)),error:H["rate-limit-rate"]}),a.jsx(Ee,{id:"rate-limit-burst",label:"Burst",type:"number",inputMode:"numeric",min:1,value:Ts(x.security.rateLimitBurst),onChange:V=>I("rateLimitBurst",Number(V.target.value)),error:H["rate-limit-burst"],hint:"Requests allowed to exceed the rate briefly."})]}),a.jsx("div",{className:"border-t border-line pt-3",children:a.jsx(qt,{checked:x.security.securityHeaders,onChange:V=>I("securityHeaders",V),label:"Security headers",description:"Adds X-Frame-Options and X-Content-Type-Options."})}),a.jsxs("div",{className:"grid gap-3 border-t border-line pt-3 sm:grid-cols-2",children:[a.jsx(qt,{checked:x.security.custom404,onChange:V=>I("custom404",V),label:"Custom 404 form",description:"Return the dashboard's 404 page."}),a.jsx(qt,{checked:x.security.custom50x,onChange:V=>I("custom50x",V),label:"Custom 50x page",description:"Return the dashboard's error page when the backend fails."})]})]})}),a.jsx(ks,{id:"advanced",title:"Advanced",description:"Raw nginx additions for this domain.",icon:s2,open:N.advanced??!1,onToggle:()=>E(V=>({...V,advanced:!V.advanced})),children:a.jsxs("div",{className:"space-y-4",children:[a.jsx(qt,{checked:x.advanced.accessLog,onChange:V=>Q("accessLog",V),label:"Domain-specific access log",description:"Writes this domain's requests to its own log file."}),a.jsx(Uo,{label:"Custom location blocks",value:x.advanced.customLocations,onChange:V=>Q("customLocations",V.target.value),rows:6,spellCheck:!1,placeholder:`location /api/v2 {
|
|
442
|
-
proxy_pass http://localhost:8080;
|
|
443
|
-
}`,className:"font-mono"}),a.jsx(_s,{children:"Appended verbatim inside the server block. nginx tests the result before it is kept."})]})}),u&&a.jsx(ks,{id:"notifications",title:"Notifications",description:"Which channels hear about this domain.",icon:lf,open:N.notifications??!1,onToggle:()=>E(V=>({...V,notifications:!V.notifications})),children:le.loading&&!le.data?a.jsxs("div",{className:"space-y-2",children:[a.jsx(Fe,{className:"h-14 rounded-md"}),a.jsx(Fe,{className:"h-14 rounded-md"}),a.jsx(Fe,{className:"h-14 rounded-md"})]}):le.error&&!le.data?a.jsx(we,{tone:"warning",title:"Could not load notification channels",action:a.jsx(te,{variant:"ghost",size:"sm",onClick:le.reload,children:"Retry"}),children:le.error.message}):(le.data??[]).length===0?a.jsxs(we,{tone:"info",title:"No notification channels configured",children:["Add a Discord or Telegram channel in Settings first; this domain's alerts are recorded either way.",a.jsx("div",{className:"mt-2",children:a.jsx(te,{variant:"secondary",size:"sm",icon:a.jsx(cf,{className:"size-3.5","aria-hidden":"true"}),onClick:ln,children:"Open settings"})})]}):a.jsx("div",{className:"space-y-3",children:My.map(V=>{const pe=x.notifications[V.id];return a.jsxs("div",{className:"rounded-md border border-line bg-raised/30 p-3.5",children:[a.jsx(qt,{checked:pe.enabled,onChange:Ae=>W(V.id,{enabled:Ae}),label:V.label,description:V.description}),pe.enabled&&a.jsx("div",{className:"mt-3 flex flex-wrap gap-1.5 border-t border-line pt-3",children:(le.data??[]).map(Ae=>a.jsx(sS,{channel:Ae,checked:pe.channelIds.includes(Ae.id),onChange:Jt=>je(V.id,Ae.id,Jt)},Ae.id))}),pe.enabled&&pe.channelIds.length===0&&a.jsx("p",{className:"mt-2 text-2xs text-faint",children:"No channels selected — the event is recorded but not delivered."})]},V.id)})})})]})]})}function rS(s){return/^https?:\/\//i.test(s.backendHost||"")?s.backendHost:`${s.upstreamType||"http"}://${s.backendHost||"127.0.0.1"}:${s.port}`}function oS({domain:s}){if(!s.ssl?.enabled)return a.jsx(ve,{tone:"neutral",children:"HTTP only"});const o=s.daysLeft;return o==null?a.jsx(ve,{tone:"neutral",children:"SSL"}):o<0?a.jsx(ve,{tone:"bad",children:"SSL expired"}):o<30?a.jsx(ve,{tone:"warn",children:As(o)}):a.jsx(ve,{tone:"ok",children:As(o)})}function cS({entry:s}){return s?s.up===null?a.jsx(ve,{tone:"neutral",dot:!0,children:"External"}):s.up?a.jsx(ve,{tone:"ok",dot:!0,children:"Up"}):a.jsx(ve,{tone:"bad",dot:!0,children:"Down"}):null}function uS(){Vn("Domains");const s=Nt(),o=bn(),{domainHealth:c}=ia(),u=yt($=>oe.domains.list($)),[d,m]=Yo(),[p,h]=g.useState(""),[x,b]=g.useState("all"),[j,y]=g.useState(null),[N,E]=g.useState(null),[H,S]=g.useState(!1),[k,_]=g.useState(!1);Ol(u.reload),Hs("domains",u.reload);const R=u.data,X=g.useMemo(()=>new Map((c??[]).map($=>[$.name,$])),[c]),z=d.get("new")==="1",G=d.get("domain"),ne=G?(R??[]).find($=>$.name===G):void 0,U=z?{mode:"create"}:ne?{mode:"edit",domain:ne}:null,J=g.useRef(null);g.useEffect(()=>{if(!R||!G){J.current=null;return}if(ne){J.current=null;return}J.current!==G&&(J.current=G,s.error("Domain not found",G),m({},{replace:!0}))},[R,G,ne,m,s]);const ce=()=>m({new:"1"}),P=$=>m({domain:$}),ae=()=>m({},{replace:!0}),M=g.useMemo(()=>{const $=R??[];return{all:$.length,enabled:$.filter(ie=>ie.enabled).length,disabled:$.filter(ie=>!ie.enabled).length}},[R]),A=g.useMemo(()=>{const $=p.trim().toLowerCase();return(R??[]).filter(ie=>x==="enabled"&&!ie.enabled||x==="disabled"&&ie.enabled?!1:$?[ie.name,ie.backendHost,String(ie.port)].join(" ").toLowerCase().includes($):!0)},[R,x,p]),le=async $=>{const ie=!$.enabled;if(await o({title:`${ie?"Enable":"Disable"} "${$.name}"?`,body:ie?"nginx resumes serving this domain with its saved configuration.":"nginx stops serving this domain until you enable it again. The config file is kept.",confirmLabel:ie?"Enable":"Disable",tone:ie?"accent":"danger"})){y({name:$.name,action:"toggle"});try{const ke=await oe.domains.toggle($.name);u.setData($e=>$e&&$e.map(Ge=>Ge.name===$.name?{...Ge,enabled:ke.enabled}:Ge)),s.success(ke.enabled?"Domain enabled":"Domain disabled",ke.enabled?`${$.name} is being served again.`:`${$.name} is no longer served by nginx.`)}catch(ke){s.error(`Could not ${ie?"enable":"disable"} the domain`,ke instanceof Be?ke.message:void 0)}finally{y(null)}}},F=async $=>{y({name:$.name,action:"reload"});try{const ie=await oe.domains.reload($.name);s.success("nginx reloaded",ie.message||`${$.name} is live with its current configuration.`)}catch(ie){s.error("Could not reload nginx",ie instanceof Be?ie.message:void 0)}finally{y(null)}},ee=$=>{S(!1),E($)},de=async()=>{if(N){_(!0);try{const $=await oe.domains.remove(N.name,N.ssl.enabled&&H);s.success("Domain deleted",$.certDeleted?`${N.name}, its nginx config and its certificate files were removed.`:`${N.name} and its nginx config were removed. The certificate files were kept.`),E(null),u.reload()}catch($){s.error("Could not delete the domain",$ instanceof Be?$.message:void 0)}finally{_(!1)}}};return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Domains",description:"Reverse-proxy hosts, their backends and their nginx configuration.",meta:R?a.jsxs("span",{className:"text-2xs text-faint",children:[M.all," total · ",M.enabled," enabled"]}):void 0,actions:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",size:"sm",loading:u.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:u.reload,children:"Refresh"}),a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:ce,children:"Add domain"})]})}),u.error&&!R?a.jsx(Et,{error:u.error,onRetry:u.reload}):R?R.length===0?a.jsx(Qe,{children:a.jsx(On,{icon:a.jsx(_l,{className:"size-5","aria-hidden":"true"}),title:"No domains yet",description:"Add a domain and Easy DevOps writes its nginx config, tests it, and reloads nginx.",action:a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:ce,children:"Add your first domain"})})}):a.jsxs("div",{className:"space-y-3",children:[u.error&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known list. ",u.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:u.reload,children:"Try again"})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-col gap-3 border-b border-line p-3 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"relative w-full sm:max-w-xs",children:[a.jsx(rN,{className:"pointer-events-none absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-faint","aria-hidden":"true"}),a.jsx("input",{type:"search","aria-label":"Search domains",placeholder:"Search domain or backend…",value:p,onChange:$=>h($.target.value),className:"h-9 w-full rounded-md border border-line bg-canvas pl-8 pr-3 text-sm text-ink placeholder:text-faint transition-colors duration-[var(--ez-motion-fast)] hover:border-line-strong focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/25"})]}),a.jsx("div",{role:"group","aria-label":"Filter domains",className:"flex flex-wrap gap-1.5",children:[["all","All",M.all],["enabled","Enabled",M.enabled],["disabled","Disabled",M.disabled]].map(([$,ie,Se])=>a.jsxs("button",{type:"button","aria-pressed":x===$,onClick:()=>b($),className:re("inline-flex items-center gap-1.5 rounded-pill border px-2.5 py-1 text-xs transition-colors duration-[var(--ez-motion-fast)]",x===$?"border-accent/50 bg-accent-soft text-accent-text":"border-line text-muted hover:border-line-strong hover:text-ink"),children:[ie,a.jsx("span",{className:re("rounded-pill px-1 text-2xs",x===$?"bg-accent/15":"bg-inset text-faint"),children:Se})]},$))})]}),A.length===0?a.jsx(On,{title:"No domains match",description:"Try a different search or show all domains.",action:a.jsx(te,{variant:"secondary",size:"sm",onClick:()=>{h(""),b("all")},children:"Clear filters"})}):a.jsx("ul",{className:"divide-y divide-line",children:A.map($=>{const ie=X.get($.name),Se=ie?.up===!1,ke=j?.name===$.name,$e=ke?j?.action:null;return a.jsxs("li",{className:re("group flex flex-col gap-2.5 px-4 py-3 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 sm:flex-row sm:items-center sm:gap-4",!$.enabled&&"opacity-60"),children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[a.jsx(Qt,{tone:$.enabled?Se?"bad":"ok":"neutral",pulse:$.enabled&&!Se,className:"mt-1.5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[a.jsx("button",{type:"button",onClick:()=>P($.name),className:"max-w-full truncate text-left font-mono text-sm font-semibold text-ink transition-colors hover:text-accent-text",children:$.name}),$.wildcard&&a.jsx(ve,{tone:"accent",children:"wildcard"}),$.www&&a.jsx(ve,{tone:"neutral",children:"www"}),!$.enabled&&a.jsx(ve,{tone:"neutral",children:"disabled"}),$.sslPathWarning&&a.jsx("span",{className:"inline-flex",title:"Certificate paths contain backslashes, which nginx on Windows can fail to load. Open and save this domain to regenerate them with forward slashes.",children:a.jsxs(ve,{tone:"warn",children:[a.jsx(Ra,{className:"size-3","aria-hidden":"true"}),"Backslash cert paths"]})})]}),a.jsxs("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-muted",children:[a.jsx("span",{className:"max-w-full truncate font-mono",children:rS($)}),$.ssl.enabled&&$.ssl.redirect&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{children:"HTTP redirects to HTTPS"})]})]})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-7 sm:w-52 sm:shrink-0 sm:pl-0",children:[a.jsx(oS,{domain:$}),a.jsx(cS,{entry:ie})]}),a.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-1 pl-7 sm:pl-0",children:[a.jsx(at,{label:$.enabled?`Disable ${$.name}`:`Enable ${$.name}`,size:"sm",disabled:ke,onClick:()=>le($),className:"text-muted hover:text-ink",children:$e==="toggle"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):$.enabled?a.jsx(P2,{className:"size-3.5","aria-hidden":"true"}):a.jsx(I2,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Reload nginx for ${$.name}`,size:"sm",disabled:ke,onClick:()=>F($),className:"text-muted hover:text-ink",children:$e==="reload"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Edit ${$.name}`,size:"sm",onClick:()=>P($.name),className:"text-muted hover:text-accent-text",children:a.jsx(rf,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`Delete ${$.name}`,size:"sm",onClick:()=>ee($),className:"text-muted hover:text-bad",children:a.jsx(Us,{className:"size-3.5","aria-hidden":"true"})})]})]},$.name)})})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-14 rounded-lg"}),a.jsx(Fe,{className:"h-[320px] rounded-lg"})]}),U&&a.jsx(iS,{editor:U,onClose:ae,onSaved:()=>{ae(),u.reload()}},U.mode==="edit"?`edit:${U.domain.name}`:"create"),a.jsx(yn,{open:N!==null,onClose:()=>{k||E(null)},title:N?`Delete "${N.name}"?`:"Delete domain",description:"This also removes the domain's nginx config. It cannot be undone.",size:"sm",preventClose:k,footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"ghost",onClick:()=>E(null),disabled:k,children:"Cancel"}),a.jsx(te,{variant:"danger",loading:k,onClick:de,children:"Delete domain"})]}),children:N&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("p",{className:"text-sm text-muted",children:["nginx stops serving ",a.jsx("span",{className:"font-mono text-ink",children:N.name})," ","as soon as the config is removed."]}),N.ssl.enabled&&a.jsx("div",{className:"rounded-md border border-line bg-raised/40 p-3",children:a.jsx(Al,{checked:H,onChange:S,label:"Also delete the SSL certificate files",hint:`Otherwise ${N.name}'s certificate stays on disk and can be reused.`})})]})})]})}function dS(s,o){if(s instanceof Be){const c=s.payload.error;if(c&&typeof c=="object")return{title:o,step:c.step,cause:c.cause,consequence:c.consequence,nginxRunning:c.nginxRunning};const u=s.code==="email_required"?"Set the ACME email in Settings → General, or provide an email with this request.":typeof s.payload.hint=="string"?s.payload.hint:void 0,d=typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.output=="string"?s.payload.output:s.message;return{title:o,summary:u,detail:d}}if(s&&typeof s=="object"){const c=s;return{title:c.step==="email configuration"?"ACME email is not configured":o,step:c.step,cause:c.cause,consequence:c.consequence,nginxRunning:c.nginxRunning}}return typeof s=="string"&&s?{title:o,detail:s}:{title:o,summary:"No certificate was issued."}}function Ly(s){return s==null?"unknown":s<1e3?`${Math.round(s)} ms`:s<6e4?`${(s/1e3).toFixed(1)} s`:`${Math.round(s/6e4)} min`}function fS(s){return s?s==="proxy"?"The HTTP-01 challenge was answered through nginx, so nginx stayed running.":s==="standalone"?"The challenge ran in standalone mode.":s==="dns"?"Validated with a DNS TXT record.":`Validation mode: ${s}.`:null}function Zd({value:s,title:o="Certificate issuance failed"}){const c=dS(s,o),u=!!(c.step||c.cause||c.consequence);return a.jsxs(we,{tone:"danger",title:c.title,children:[c.summary&&a.jsx("p",{children:c.summary}),u&&a.jsxs("dl",{className:"mt-2 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-2xs",children:[c.step&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Step"}),a.jsx("dd",{className:"text-muted",children:c.step})]}),c.cause&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Cause"}),a.jsx("dd",{className:"text-muted",children:c.cause})]}),c.consequence&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{className:"text-faint",children:"Note"}),a.jsx("dd",{className:"text-muted",children:c.consequence})]})]}),c.nginxRunning===!1&&a.jsx("p",{className:"mt-2 text-2xs",children:"nginx is not running right now."}),c.detail&&a.jsx("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:c.detail})]})}function hS({result:s,title:o="Certificate issued"}){const c=fS(s.mode);return a.jsxs("div",{className:"rounded-md border border-ok/30 bg-ok-soft/40 px-3.5 py-3",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-ink",children:[a.jsx(Dl,{className:"size-4 shrink-0 text-ok","aria-hidden":"true"}),o]}),s.summary&&a.jsx("p",{className:"mt-1 text-xs text-muted",children:s.summary}),s.fellBack&&a.jsxs(we,{tone:"warning",className:"mt-2.5",children:["The HTTP challenge could not be answered through nginx, so the standalone challenge was used. nginx was stopped for ",Ly(s.nginxDownMs),"."]}),s.staging&&a.jsx(we,{tone:"warning",className:"mt-2.5",children:"This is a staging certificate. Browsers will not trust it; issue again against production before relying on it."}),a.jsxs("dl",{className:"mt-2.5 space-y-1.5",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Certificate"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-2xs text-muted",children:s.certPath}),a.jsx(jt,{value:s.certPath,label:"Copy certificate path"})]}),a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Private key"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-2xs text-muted",children:s.keyPath}),a.jsx(jt,{value:s.keyPath,label:"Copy private key path"})]})]}),c&&a.jsx("p",{className:"mt-2 text-2xs text-faint",children:c})]})}const vg="ssl-known-domains";function mS(s){return"status"in s&&s.status==="waiting_dns"}function xS({error:s}){const o=Array.isArray(s.payload.found)?s.payload.found.filter(u=>typeof u=="string"):[],c=typeof s.payload.hint=="string"?s.payload.hint:s.message;return a.jsxs(we,{tone:"warning",title:"The TXT record was not found yet",children:[a.jsx("p",{children:c}),o.length>0&&a.jsxs("p",{className:"mt-1.5 break-all",children:["Records currently visible:"," ",a.jsx("span",{className:"font-mono text-ink",children:o.join(" · ")})]})]})}function pS({domains:s,initialDomain:o="",onClose:c,onIssued:u}){const d=Nt(),m=bn(),p=$i(),[h,x]=g.useState(o),[b,j]=g.useState(""),[y,N]=g.useState(!1),[E,H]=g.useState("http"),[S,k]=g.useState("form"),[_,R]=g.useState({}),[X,z]=g.useState(null),[G,ne]=g.useState(!1),[U,J]=g.useState(null),[ce,P]=g.useState(!1),[ae,M]=g.useState(null),[A,le]=g.useState(null),F=h.trim().startsWith("*.");g.useEffect(()=>{F&&(H("dns"),N(!1))},[F]);const ee=h.trim()!==o||b.trim()!==""||y||E!=="http",de=async()=>{const W={},je=pf(h.trim());je&&(W.domain=je);const Ce=_y(b.trim());if(Ce&&(W.email=Ce),W.domain||W.email){R(W),queueMicrotask(()=>document.getElementById(W.domain?"ssl-domain":"ssl-email")?.focus());return}R({}),z(null),M(null),ne(!0);const De=h.trim();try{const fe=await oe.ssl.create({domain:De,www:F?!1:y,validationMethod:F?"dns":E,email:b.trim()||void 0});if(mS(fe)){J(fe),k("dns");return}le({result:fe,domain:De}),k("success"),u(fe,De)}catch(fe){z(fe)}finally{ne(!1)}},$=async()=>{if(U){M(null),P(!0);try{const W=await oe.ssl.confirmDns(U.domain),je=U.domain;J(null),le({result:W,domain:je}),k("success"),u(W,je)}catch(W){W instanceof Be&&(W.code==="dns_not_propagated"||W.code==="dns_lookup_failed")?M(W):(J(null),k("form"),z(W))}finally{P(!1)}}},ie=async()=>{if(U){P(!0);try{await oe.ssl.cancelDns(U.domain),d.info("DNS challenge cancelled","No certificate was issued.")}catch{d.warning("Could not cancel the DNS challenge","It will expire on its own after ten minutes.")}finally{J(null),M(null),k("form"),P(!1)}}},Se=()=>{x(""),j(""),N(!1),H("http"),R({}),z(null),M(null),le(null),k("form")},ke=G||ce,$e=async()=>{if(!ke){if(S==="dns"&&U){if(!await m({title:"Cancel the pending DNS challenge?",body:`No certificate will be issued for ${U.domain}. The TXT record can be removed afterwards.`,confirmLabel:"Cancel challenge",cancelLabel:"Keep waiting",tone:"danger"}))return;oe.ssl.cancelDns(U.domain).catch(()=>{}),c();return}S==="form"&&ee&&!await m({title:"Discard this certificate request?",body:"The form has not been submitted, so nothing has been issued.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"})||c()}},Ge=g.useRef($e);Ge.current=$e;const T=g.useCallback(()=>{Ge.current()},[]),I=X instanceof Be&&X.code==="email_required",Q=S==="success"?"Certificate issued":S==="dns"?"DNS validation":"New certificate";return a.jsxs(yn,{open:!0,onClose:T,title:Q,description:S==="form"?"Let’s Encrypt issues 90-day certificates. nginx keeps running unless the HTTP challenge has to fall back to standalone mode.":void 0,size:"lg",preventClose:ke,footer:S==="form"?a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"ghost",onClick:T,disabled:ke,children:"Cancel"}),a.jsx(te,{variant:"primary",loading:G,icon:a.jsx(Ea,{className:"size-3.5","aria-hidden":"true"}),onClick:de,children:"Issue certificate"})]}):S==="dns"?a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"ghost",onClick:ie,disabled:ke,children:"Cancel challenge"}),a.jsx(te,{variant:"primary",loading:ce,onClick:$,children:"I’ve added the record"})]}):a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"ghost",onClick:Se,children:"Issue another"}),a.jsx(te,{variant:"primary",onClick:T,children:"Done"})]}),children:[S==="form"&&a.jsxs("div",{className:"space-y-4",children:[X!=null&&a.jsxs("div",{className:"space-y-2",children:[a.jsx(Zd,{value:X}),I&&a.jsx(te,{variant:"secondary",size:"sm",onClick:()=>{c(),p("/settings")},children:"Open settings"})]}),a.jsx(Ee,{id:"ssl-domain",label:"Domain name",placeholder:"example.com",value:h,onChange:W=>x(W.target.value),error:_.domain,hint:"An A or AAAA record for this name must point at this server for an HTTP challenge.",list:vg,autoComplete:"off",spellCheck:!1,disabled:ke}),a.jsx("datalist",{id:vg,children:s.map(W=>a.jsx("option",{value:W.name},W.name))}),a.jsx(Ee,{id:"ssl-email",label:"ACME email",optional:!0,type:"email",placeholder:"admin@example.com",value:b,onChange:W=>j(W.target.value),error:_.email,hint:"Used by Let’s Encrypt for expiry notices. Falls back to the email saved in Settings.",autoComplete:"email",disabled:ke}),F&&a.jsxs(we,{tone:"info",title:"Wildcard certificate",children:["Wildcard names like ",a.jsx("span",{className:"font-mono",children:"*.example.com"})," can only be validated with a DNS TXT record, so the DNS challenge is selected."]}),a.jsxs("fieldset",{className:"rounded-md border border-line p-3.5",disabled:ke,children:[a.jsx("legend",{className:"px-1 text-xs font-medium text-muted",children:"Challenge method"}),a.jsxs("div",{className:"mt-1 space-y-2",children:[a.jsxs("label",{className:re("flex cursor-pointer items-start gap-3 rounded-md border px-3.5 py-3 transition-colors",E==="http"&&!F?"border-accent/60 bg-accent-soft":"border-line hover:border-line-strong",(F||ke)&&"cursor-not-allowed opacity-60"),children:[a.jsx("input",{type:"radio",name:"ssl-method",value:"http",checked:E==="http"&&!F,disabled:F||ke,onChange:()=>H("http"),className:"mt-0.5 size-4 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm text-ink",children:"HTTP challenge"}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:"nginx answers the ACME challenge on port 80, so it can keep running."})]})]}),a.jsxs("label",{className:re("flex cursor-pointer items-start gap-3 rounded-md border px-3.5 py-3 transition-colors",E==="dns"?"border-accent/60 bg-accent-soft":"border-line hover:border-line-strong",ke&&"cursor-not-allowed opacity-60"),children:[a.jsx("input",{type:"radio",name:"ssl-method",value:"dns",checked:E==="dns",disabled:ke,onChange:()=>H("dns"),className:"mt-0.5 size-4 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm text-ink",children:"DNS challenge"}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:"You add a TXT record at your DNS provider. Works for names that do not point at this server yet."})]})]})]})]}),a.jsx(Al,{checked:y&&!F,onChange:N,disabled:F||ke,label:h.trim()?`Also cover www.${h.trim().replace(/^\*\./,"")}`:"Also cover the www subdomain",hint:F?"A wildcard certificate already covers every subdomain.":"Both names are added to the same certificate."})]}),S==="dns"&&U&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(we,{tone:"warning",title:"Add this DNS TXT record",children:"Create the record at your DNS provider, then confirm. The challenge waits up to ten minutes; nothing is written to nginx while it waits."}),a.jsxs("dl",{className:"space-y-2.5 rounded-md border border-line bg-raised/40 p-3.5",children:[a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Name"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-xs text-ink",children:U.txtName}),a.jsx(jt,{value:U.txtName,label:"Copy record name"})]}),a.jsxs("div",{className:"flex items-start gap-2 border-t border-line pt-2.5",children:[a.jsx("dt",{className:"w-16 shrink-0 pt-0.5 text-2xs text-faint",children:"Value"}),a.jsx("dd",{className:"min-w-0 flex-1 break-all font-mono text-xs text-ink",children:U.txtValue}),a.jsx(jt,{value:U.txtValue,label:"Copy record value"})]})]}),a.jsx("p",{className:"text-xs text-faint",children:"DNS changes can take a few minutes to propagate. Confirming checks that the value is publicly visible before Let’s Encrypt does."}),ae&&a.jsx(xS,{error:ae})]}),S==="success"&&A&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(hS,{result:A.result,title:`Certificate issued for ${A.domain}`}),a.jsxs("div",{className:"flex items-start gap-2 text-xs text-muted",children:[a.jsx(Os,{className:"mt-0.5 size-3.5 shrink-0 text-faint","aria-hidden":"true"}),a.jsx("p",{children:"The files are on disk. To serve them, edit a domain, enable SSL and use these paths."})]}),a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-line bg-raised/40 px-3.5 py-2.5 text-xs text-muted",children:[a.jsx(Xi,{className:"size-3.5 shrink-0 text-faint","aria-hidden":"true"}),"Rename or move these files only after updating the domain config; nginx reads them by path."]})]})]})}const gS={valid:{label:"Valid",tone:"ok"},expiring:{label:"Expiring",tone:"warn"},expired:{label:"Expired",tone:"bad"},error:{label:"Unreadable",tone:"bad"}};function yS(s){return s===null?"text-faint":s<0?"text-bad":s<30?"text-warn":"text-ink"}function bg(s){const o=[];return s.summary&&o.push(s.summary),s.fellBack&&o.push(`nginx was stopped for ${Ly(s.nginxDownMs)} while the challenge ran.`),s.staging&&o.push("This is a staging certificate that browsers will not trust."),o.join(" ")||"The certificate was renewed."}function vS(s){return s.error&&typeof s.error=="object"?s.error:typeof s.error=="string"?{step:s.error,cause:s.detail}:s.detail??"No certificate was issued."}function bS(){Vn("SSL certificates");const s=Nt(),o=bn(),c=$i(),u=yt(A=>oe.ssl.list(A)),[d,m]=Yo(),p=d.get("new")==="1"||!!d.get("domain"),h=d.get("domain")??"",x=yt(A=>oe.domains.list(A),[],{enabled:p}),[b,j]=g.useState(null),[y,N]=g.useState(null),[E,H]=g.useState(null),[S,k]=g.useState(null),[_,R]=g.useState(null);Ol(u.reload),Hs(["ssl","domains"],u.reload);const X=u.data,z=g.useMemo(()=>{const A=X??[];return{total:A.length,valid:A.filter(le=>le.status==="valid").length,expiring:A.filter(le=>le.status==="expiring"||le.daysLeft!==null&&le.daysLeft>=0&&le.daysLeft<30).length,expired:A.filter(le=>le.status==="expired"||le.daysLeft!==null&&le.daysLeft<0).length,error:A.filter(le=>le.status==="error").length}},[X]),G=g.useMemo(()=>(X??[]).filter(A=>A.daysLeft!==null&&A.daysLeft<30),[X]),ne=z.expiring>0||z.expired>0||z.error>0,U=()=>m({},{replace:!0}),J=()=>m({new:"1"}),ce=async A=>{if(!(b||y)){j(A.domain);try{const le=await oe.ssl.renew(A.domain);s.success(`${A.domain} renewed`,bg(le)),u.reload()}catch(le){H({domain:A.domain,error:le})}finally{j(null)}}},P=async A=>{if(!(b||y||!await o({title:`Delete the certificate for ${A.domain}?`,body:"Its files are removed from disk and this cannot be undone. The deletion is refused if any nginx configuration still references the certificate.",confirmLabel:"Delete certificate",tone:"danger"}))){N(A.domain);try{const F=await oe.ssl.remove(A.domain);s.success(`${A.domain} deleted`,`Removed ${F.directory}.`),u.reload()}catch(F){if(F instanceof Be&&F.code==="cert_in_use")R({domain:A.domain,directory:typeof F.payload.directory=="string"?F.payload.directory:null,references:Array.isArray(F.payload.references)?F.payload.references:[]});else{const ee=F instanceof Be&&typeof F.payload.detail=="string"?F.payload.detail:F instanceof Error?F.message:void 0;s.error(`Could not delete ${A.domain}`,ee)}}finally{N(null)}}},ae=async()=>{if(!(b||y||G.length===0||!await o({title:`Renew ${_n(G.length,"certificate")}?`,body:"Every certificate expiring within 30 days is renewed one at a time. nginx keeps running unless a challenge has to fall back to standalone mode, which stops it briefly.",confirmLabel:"Renew now",tone:"accent"}))){j("all");try{const le=await oe.ssl.renewAll();k(le);const F=le.filter(ee=>!ee.success).length;le.length===0?s.info("Nothing to renew","No certificate expires within 30 days."):F===0?s.success(`${_n(le.length,"certificate")} renewed`,"The new certificates are already on disk."):s.warning("Some certificates were not renewed",`${le.length-F} renewed, ${F} failed.`),u.reload()}catch(le){H({domain:null,error:le})}finally{j(null)}}},M=E?.error instanceof Be&&E.error.code==="email_required";return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"SSL certificates",description:"Let’s Encrypt certificates managed by this installation. Renewals keep nginx running where possible.",meta:X?a.jsxs("span",{className:"text-2xs text-faint",children:[_n(z.total,"certificate")," · ",z.valid," valid"]}):void 0,actions:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",size:"sm",loading:u.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:u.reload,children:"Refresh"}),a.jsxs(te,{variant:"secondary",size:"sm",disabled:G.length===0||b!==null||y!==null,loading:b==="all",onClick:ae,children:["Renew expiring",G.length>0?` (${G.length})`:""]}),a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:J,children:"New certificate"})]})}),ne&&a.jsxs(we,{tone:z.expired>0||z.error>0?"danger":"warning",title:"Certificates need attention",className:"mb-4",children:[[z.expired>0?`${z.expired} expired`:null,z.expiring>0?`${z.expiring} expiring within 30 days`:null,z.error>0?`${z.error} unreadable`:null].filter(Boolean).join(" · "),". Renewing uses the same domain; an unreadable certificate is replaced by a freshly issued one."]}),u.error&&!X?a.jsx(Et,{error:u.error,onRetry:u.reload}):X?X.length===0?a.jsx(Qe,{children:a.jsx(On,{icon:a.jsx(Ea,{className:"size-5","aria-hidden":"true"}),title:"No certificates yet",description:"Issue a Let’s Encrypt certificate for a domain, then point the domain’s SSL settings at its files.",action:a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:J,children:"Issue a certificate"})})}):a.jsxs("div",{className:"space-y-3",children:[u.error&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known list. ",u.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:u.reload,children:"Try again"})]}),a.jsx(Qe,{className:"overflow-hidden",children:a.jsx("ul",{className:"divide-y divide-line",children:X.map(A=>{const le=gS[A.status]??{label:A.status,tone:"neutral"},F=b===A.domain;return a.jsxs("li",{className:"flex flex-col gap-2.5 px-4 py-3 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 sm:flex-row sm:items-center sm:gap-4",children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[a.jsx(Qt,{tone:le.tone,pulse:A.status==="valid",className:"mt-1.5"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate font-mono text-sm font-semibold text-ink",children:A.domain}),a.jsx("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-muted",children:A.status==="error"?a.jsx("span",{children:"Certificate files are missing or unreadable"}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:["Expires ",Ey(A.expiry)]}),a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{className:re("font-mono font-medium",yS(A.daysLeft)),children:A.daysLeft!==null?A.daysLeft<0?`${Math.abs(A.daysLeft)}d overdue`:`${A.daysLeft}d`:As(A.daysLeft)}),A.autoRenew&&A.autoRenew!=="off"&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-faint","aria-hidden":"true",children:"·"}),a.jsx("span",{title:A.autoRenew==="auto"?"The background service renews this certificate on its own.":A.autoRenew==="manual"?"DNS-validated (wildcard) certificates need a TXT record added by hand, so they are not renewed automatically.":"No enabled domain serves this certificate, so it is not renewed automatically.",className:A.autoRenew==="manual"?"text-warn":void 0,children:A.autoRenew==="auto"?`Auto-renews ${A.autoRenewDays??7}d before expiry`:A.autoRenew==="manual"?"Manual renewal (DNS)":"Not in use"})]})]})})]})]}),a.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pl-7 sm:w-28 sm:shrink-0 sm:pl-0",children:a.jsx(ve,{tone:le.tone,dot:!0,children:le.label})}),a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-1.5 pl-7 sm:pl-0",children:[a.jsx(te,{variant:"secondary",size:"sm",loading:F,disabled:b!==null||y!==null,onClick:()=>ce(A),children:"Renew"}),A.status==="error"&&a.jsx(te,{variant:"dangerGhost",size:"sm",icon:a.jsx(Us,{className:"size-3.5","aria-hidden":"true"}),loading:y===A.domain,disabled:b!==null||y!==null,onClick:()=>P(A),children:"Delete"})]})]},A.domain)})})})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-14 rounded-lg"}),a.jsx(Fe,{className:"h-[280px] rounded-lg"})]}),p&&a.jsx(pS,{domains:x.data??[],initialDomain:h,onClose:U,onIssued:()=>u.reload()},h||"new"),a.jsx(yn,{open:E!==null,onClose:()=>H(null),title:E?.domain?`${E.domain} was not renewed`:"Renewal failed",description:"The certificate already on disk was not replaced.",size:"md",footer:a.jsxs(a.Fragment,{children:[M&&a.jsx(te,{variant:"secondary",onClick:()=>{H(null),c("/settings")},children:"Open settings"}),a.jsx(te,{variant:"primary",onClick:()=>H(null),children:"Close"})]}),children:E&&a.jsx(Zd,{value:E.error,title:"The certificate could not be renewed"})}),a.jsx(yn,{open:S!==null,onClose:()=>k(null),title:"Renewal results",description:S?`${S.filter(A=>A.success).length} of ${S.length} certificates renewed.`:void 0,size:"lg",footer:a.jsx(te,{variant:"secondary",onClick:()=>k(null),children:"Close"}),children:S&&S.length===0?a.jsx(On,{icon:a.jsx(Ea,{className:"size-5","aria-hidden":"true"}),title:"Nothing to renew",description:"No certificate expires within 30 days."}):a.jsx("ul",{className:"space-y-2.5",children:(S??[]).map(A=>a.jsx("li",{className:"rounded-md border border-line bg-raised/30 px-3.5 py-3",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[A.success?a.jsx(Dl,{className:"mt-0.5 size-4 shrink-0 text-ok","aria-hidden":"true"}):a.jsx(Bd,{className:"mt-0.5 size-4 shrink-0 text-bad","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("div",{className:"truncate font-mono text-sm font-medium text-ink",children:A.domain}),A.success?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:bg(A)}),A.configRegenerated&&a.jsx("p",{className:"mt-1 text-2xs text-faint",children:"The nginx config was regenerated so it can answer the ACME challenge."})]}):a.jsx("div",{className:"mt-2",children:a.jsx(Zd,{value:vS(A),title:`${A.domain} was not renewed`})})]})]})},A.domain))})}),a.jsx(yn,{open:_!==null,onClose:()=>R(null),title:_?`${_.domain} is still referenced`:"Certificate is still referenced",description:"Nothing was deleted. At least one nginx configuration file still points at this certificate.",size:"md",footer:a.jsx(te,{variant:"secondary",onClick:()=>R(null),children:"Close"}),children:_&&a.jsxs("div",{className:"space-y-3",children:[a.jsx("p",{className:"text-xs text-muted",children:"Disable SSL on the domain that uses this certificate — or remove the matching lines — then try deleting it again."}),_.directory&&a.jsx("p",{className:"break-all font-mono text-2xs text-faint",children:_.directory}),_.references.length>0&&a.jsx("ul",{className:"space-y-2",children:_.references.map(A=>a.jsxs("li",{className:"rounded-md border border-line bg-raised/30 px-3 py-2",children:[a.jsxs("div",{className:"break-all font-mono text-2xs font-medium text-ink",children:[A.file,":",A.line]}),a.jsx("pre",{className:"mt-1 whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:A.text})]},`${A.file}:${A.line}`))})]})})]})}function Uy(s,o={}){const{client:c,connected:u}=ia(),d=o.enabled??!0,m=o.limit??500,[p,h]=g.useState([]),[x,b]=g.useState(!1),[j,y]=g.useState(0),N=g.useRef(x);N.current=x,g.useEffect(()=>{if(!c||!d)return;const k=_=>{if(_.logFile===s){if(N.current){y(R=>Math.min(R+1,999));return}h(R=>{const X=[...R,_.line];return X.length>m?X.slice(X.length-m):X})}};return c.on("logs:line",k),()=>c.off("logs:line",k)},[c,d,m,s]),g.useEffect(()=>{h([]),y(0)},[d,s]),g.useEffect(()=>{if(!(!c||!d||!u))return h([]),y(0),c.emit("logs:subscribe",{logFile:s}),()=>c.emit("logs:unsubscribe")},[c,u,d,s]);const E=g.useCallback(()=>{h([]),y(0)},[]),H=g.useCallback(()=>{h([]),y(0),!(!c||!d)&&(c.emit("logs:unsubscribe"),c.emit("logs:subscribe",{logFile:s}))},[c,d,s]),S=g.useCallback(k=>{b(k),k||y(0)},[]);return{lines:p,paused:x,missed:j,connected:u,clear:E,restart:H,setPaused:S}}const Co={start:"Start nginx",stop:"Stop nginx",restart:"Restart nginx",reload:"Reload nginx",test:"Test configuration"},jS={start:()=>oe.nginx.start(),stop:()=>oe.nginx.stop(),restart:()=>oe.nginx.restart(),reload:()=>oe.nginx.reload(),test:()=>oe.nginx.test()};function jg(s){return s instanceof Be?typeof s.payload.output=="string"&&s.payload.output?s.payload.output:typeof s.payload.error=="string"&&s.payload.error?s.payload.error:s.message:s instanceof Error?s.message:"The action failed."}function NS(s){return/\[(error|crit|emerg|alert)\]/i.test(s)?"text-bad":/\[warn(ing)?\]/i.test(s)?"text-warn":"text-muted"}function wS(){Vn("Nginx");const s=Nt(),o=bn(),{nginxStatus:c,connectionError:u}=ia(),d=yt(Q=>oe.nginx.status(Q)),m=yt(Q=>oe.nginx.configs(Q)),[p,h]=g.useState(null),[x,b]=g.useState(null),[j,y]=g.useState(null),[N,E]=g.useState(null),[H,S]=g.useState(""),[k,_]=g.useState(""),[R,X]=g.useState(!1),[z,G]=g.useState(!1),[ne,U]=g.useState(null),[J,ce]=g.useState(null),P=g.useRef(null),ae=g.useRef(null),M=Uy("error",{limit:300}),A=g.useRef(null),[le,F]=g.useState(!0);g.useEffect(()=>{d.data&&h(d.data)},[d.data]),g.useEffect(()=>{c&&h(c)},[c]),g.useEffect(()=>{const Q=A.current;Q&&le&&(Q.scrollTop=Q.scrollHeight)},[M.lines,le]);const ee=N!==null&&H!==k;g.useEffect(()=>{if(!ee)return;const Q=W=>{W.preventDefault(),W.returnValue=""};return window.addEventListener("beforeunload",Q),()=>window.removeEventListener("beforeunload",Q)},[ee]);const de=()=>{d.reload(),m.reload()};Ol(de),Hs("nginx",de);async function $(Q){if(!(!Q||Q===N||R||z)&&!(ee&&!await o({title:"Discard unsaved changes?",body:`${N} has edits that were not saved.`,confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}))){E(Q),X(!0),U(null),ce(null);try{const W=await oe.nginx.getConfig(Q);S(W.content),_(W.content)}catch(W){U(W),S(""),_("")}finally{X(!1)}}}g.useEffect(()=>{N||!m.data?.length||$(m.data[0])},[m.data,N]);const ie=async Q=>{if(!x&&!((Q==="stop"||Q==="restart")&&!await o({title:Q==="stop"?"Stop nginx?":"Restart nginx?",body:Q==="stop"?"Every site nginx serves goes offline until it is started again.":"Open connections are dropped for a moment while nginx restarts.",confirmLabel:Q==="stop"?"Stop nginx":"Restart nginx",tone:"danger"}))){b(Q),y(null);try{const W=await jS[Q]();y({action:Q,ok:W.success,output:W.output}),W.success?(s.success(`${Co[Q]} succeeded`,Q==="test"?"nginx -t accepted the configuration.":void 0),Q!=="test"&&d.reload()):s.error(`${Co[Q]} failed`,W.output||void 0)}catch(W){const je=jg(W);y({action:Q,ok:!1,output:je}),s.error(`${Co[Q]} failed`,je)}finally{b(null)}}},Se=async()=>{if(!(!N||z||R||!ee)){G(!0),ce(null);try{const Q=await oe.nginx.saveConfig(N,H);_(H),ce({ok:!0,output:Q.output||"Saved and tested successfully."}),s.success("Configuration saved","nginx -t passed. Reload nginx to apply it.")}catch(Q){ce({ok:!1,output:jg(Q)}),s.error("Configuration rejected","The previous file was restored.")}finally{G(!1)}}},ke=()=>{S(k),ce(null)},$e=g.useMemo(()=>{const Q=H.split(`
|
|
444
|
-
`).length;return Array.from({length:Math.max(Q,1)},(W,je)=>je+1)},[H]),Ge=!!p?.running,T=!p&&(d.loading||!!d.error),I=M.lines.join(`
|
|
445
|
-
`);return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Nginx",description:"Service controls, configuration files and the error log, without leaving the dashboard.",actions:a.jsx(te,{variant:"secondary",size:"sm",loading:d.loading||m.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>{de(),M.restart()},children:"Refresh"})}),d.error&&!p?a.jsx(Et,{error:d.error,onRetry:d.reload}):T?a.jsxs(za,{children:[a.jsx(Fe,{className:"h-24 rounded-lg"}),a.jsx(Fe,{className:"h-[380px] rounded-lg"})]}):a.jsxs("div",{className:"space-y-5",children:[d.error&&p&&a.jsxs("div",{className:"rounded-md border border-warn/30 bg-warn-soft px-3.5 py-2.5 text-xs text-muted",children:["Showing the last known status. ",d.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:d.reload,children:"Try again"})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:re("h-0.5 w-full",Ge?"bg-ok/60":"bg-bad/60"),"aria-hidden":"true"}),a.jsxs(Dn,{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3.5",children:[a.jsxs("div",{className:"relative flex size-11 shrink-0 items-center justify-center rounded-lg border border-line bg-raised",children:[a.jsx(Ls,{className:"size-5 text-ink","aria-hidden":"true"}),a.jsx(Qt,{tone:Ge?"ok":"bad",pulse:Ge,className:"absolute -right-0.5 -top-0.5 ring-2 ring-surface"})]}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-base font-semibold text-ink",children:Ge?"nginx is running":"nginx is stopped"}),p?.pid!==null&&p?.pid!==void 0&&Ge&&a.jsxs(ve,{tone:"neutral",children:["pid ",p.pid]})]}),a.jsx("p",{className:"mt-0.5 font-mono text-xs text-muted",children:p?.version??"Version unavailable"}),p?.error&&a.jsx("p",{className:"mt-1 text-xs text-bad",children:p.error})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Ge?a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",size:"sm",loading:x==="reload",disabled:x!==null&&x!=="reload",onClick:()=>ie("reload"),children:"Reload"}),a.jsx(te,{variant:"secondary",size:"sm",loading:x==="restart",disabled:x!==null&&x!=="restart",onClick:()=>ie("restart"),children:"Restart"}),a.jsx(te,{variant:"danger",size:"sm",loading:x==="stop",disabled:x!==null&&x!=="stop",onClick:()=>ie("stop"),children:"Stop"})]}):a.jsx(te,{variant:"primary",size:"sm",loading:x==="start",disabled:x!==null&&x!=="start",onClick:()=>ie("start"),children:"Start nginx"}),a.jsx("span",{className:"mx-0.5 hidden h-6 w-px bg-line sm:block","aria-hidden":"true"}),a.jsx(te,{variant:"secondary",size:"sm",loading:x==="test",disabled:x!==null&&x!=="test",onClick:()=>ie("test"),children:"Test config"})]})]}),j&&a.jsx("div",{className:"border-t border-line px-4 py-3 sm:px-5",children:a.jsx(we,{tone:j.ok?"success":"danger",title:`${Co[j.action]} ${j.ok?"succeeded":"failed"}`,children:j.output&&a.jsx("pre",{className:"mt-1 max-h-48 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs",children:j.output})})})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-col gap-3 border-b border-line px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Configuration"}),ee&&a.jsx(ve,{tone:"warn",children:"Unsaved changes"})]}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Every save is written, tested with nginx -t, and rolled back if nginx rejects it."})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs(il,{"aria-label":"Configuration file",value:N??"",disabled:z||R||!m.data?.length,onChange:Q=>void $(Q.target.value),className:"w-full sm:w-60",children:[a.jsx("option",{value:"",disabled:!0,children:"Select a config file…"}),(m.data??[]).map(Q=>a.jsx("option",{value:Q,children:Q},Q))]}),a.jsx(te,{variant:"ghost",size:"sm",disabled:!ee||z,icon:a.jsx(TN,{className:"size-3.5","aria-hidden":"true"}),onClick:ke,children:"Revert"}),a.jsx(te,{variant:"primary",size:"sm",disabled:!N||!ee,loading:z,icon:a.jsx(Gd,{className:"size-3.5","aria-hidden":"true"}),onClick:Se,children:"Save"})]})]}),m.error&&!m.data?a.jsx("div",{className:"p-4 sm:p-5",children:a.jsx(Et,{error:m.error,onRetry:m.reload})}):m.data?m.data.length===0?a.jsx("div",{className:"px-4 py-14 text-center text-sm text-muted sm:px-5",children:"No configuration files were found."}):R?a.jsxs("div",{className:"flex h-[360px] items-center justify-center gap-2 text-sm text-muted",children:[a.jsx(Lt,{className:"spin size-4","aria-hidden":"true"}),"Loading configuration…"]}):ne?a.jsx("div",{className:"p-4 sm:p-5",children:a.jsx(Et,{error:ne,title:"Could not load this configuration",onRetry:()=>N?void $(N):void 0})}):N?a.jsxs("div",{className:"relative flex h-[min(56vh,520px)] min-h-[280px] overflow-hidden bg-canvas",children:[a.jsx("div",{ref:ae,"aria-hidden":"true",className:"config-editor pointer-events-none w-12 shrink-0 overflow-hidden border-r border-line bg-inset/40 py-3 pr-2 text-right text-faint",children:$e.map(Q=>a.jsx("div",{children:Q},Q))}),a.jsx("textarea",{ref:P,value:H,onChange:Q=>S(Q.target.value),onScroll:()=>{ae.current&&P.current&&(ae.current.scrollTop=P.current.scrollTop)},onKeyDown:Q=>{(Q.metaKey||Q.ctrlKey)&&Q.key.toLowerCase()==="s"&&(Q.preventDefault(),Se())},wrap:"off",spellCheck:!1,"aria-label":N?`${N} contents`:"nginx configuration",className:"config-editor h-full w-full resize-none bg-transparent py-3 pl-4 pr-4 text-ink caret-accent outline-none"})]}):a.jsx("div",{className:"px-4 py-14 text-center text-sm text-muted sm:px-5",children:"Select a configuration file to start editing."}):a.jsxs("div",{className:"space-y-2 p-4 sm:p-5",children:[a.jsx(Fe,{className:"h-5 w-48"}),a.jsx(Fe,{className:"h-[300px]"})]}),J&&a.jsxs("div",{className:re("border-t px-4 py-3 sm:px-5",J.ok?"border-ok/25 bg-ok-soft":"border-bad/25 bg-bad-soft"),children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("p",{className:re("text-xs font-medium",J.ok?"text-ok":"text-bad"),children:J.ok?"Saved — nginx test passed":"Save rejected — the previous file was restored"}),J.ok&&a.jsx(te,{variant:"secondary",size:"sm",loading:x==="reload",disabled:x!==null&&x!=="reload",onClick:()=>ie("reload"),children:"Reload nginx"})]}),J.output&&a.jsx("pre",{className:"mt-1.5 max-h-40 overflow-auto whitespace-pre-wrap break-all font-mono text-2xs text-muted",children:J.output})]})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line px-4 py-3 sm:px-5",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("h2",{className:"text-sm font-semibold text-ink",children:"Error log"}),a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs text-faint",children:[a.jsx(Qt,{tone:M.paused?"warn":M.connected?"ok":"neutral",pulse:!M.paused&&M.connected}),M.paused?"Paused":M.connected?"Live":"Connecting…"]}),M.paused&&M.missed>0&&a.jsxs(ve,{tone:"warn",children:[M.missed," new"]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[I&&a.jsx(jt,{value:I,label:"Copy lines",withText:!0}),a.jsx(at,{label:M.paused?"Resume the log stream":"Pause the log stream",size:"sm",onClick:()=>M.setPaused(!M.paused),children:M.paused?a.jsx(Zi,{className:"size-3.5","aria-hidden":"true"}):a.jsx(py,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:"Clear the log view",size:"sm",onClick:M.clear,disabled:M.lines.length===0,children:a.jsx(Lt,{className:"size-3.5 rotate-45","aria-hidden":"true"})})]})]}),a.jsx("div",{ref:A,"aria-label":"Recent nginx error log",onScroll:Q=>{const W=Q.currentTarget;F(W.scrollHeight-W.scrollTop-W.clientHeight<40)},className:"h-64 overflow-y-auto bg-canvas px-4 py-3 font-mono text-2xs leading-relaxed sm:px-5",children:!M.connected&&M.lines.length===0?a.jsx("p",{className:"text-faint",children:"Waiting for the live stream…"}):M.lines.length===0?a.jsx("p",{className:"text-faint",children:"No errors logged."}):M.lines.map((Q,W)=>a.jsx("div",{className:re("whitespace-pre-wrap break-all py-0.5",NS(Q)),children:Q},W))}),u&&a.jsxs("div",{className:"border-t border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["The live log stream is disconnected. New lines appear once the dashboard socket reconnects."," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:M.restart,children:"Try again"})]})]})]})]})}const SS=[{value:"discord",label:"Discord",description:"Post alerts to a channel through a webhook URL.",icon:Oo},{value:"telegram",label:"Telegram",description:"Send alerts through a bot to a chat or group.",icon:gy}];function kS(s){return{name:s?.name??"",type:s?.type??"discord",webhookUrl:s?.webhookUrl??"",botToken:s?.botToken??"",chatId:s?.chatId??"",message:s?.message??""}}function TS(s){if(s instanceof Be){const o=typeof s.payload.detail=="string"?s.payload.detail:null;return o||s.message}return s instanceof Error?s.message:"The channel could not be saved."}function CS({channel:s,onClose:o,onSaved:c}){const u=bn(),d=s!==null,m=g.useRef(kS(s)),[p,h]=g.useState(m.current),[x,b]=g.useState({}),[j,y]=g.useState(null),[N,E]=g.useState(!1),H=Object.keys(p).some(R=>p[R]!==m.current[R]),S=(R,X)=>{h(z=>({...z,[R]:X})),b(z=>({...z,[R]:void 0})),y(null)},k=()=>{if(!N){if(!H){o();return}u({title:d?"Discard channel changes?":"Discard this channel?",body:"Nothing has been sent to the server yet.",confirmLabel:"Discard",cancelLabel:"Keep editing",tone:"danger"}).then(R=>{R&&o()})}},_=async()=>{if(N)return;const R={};if(p.name.trim()||(R.name="Give the channel a name."),p.type==="discord"){const z=p.webhookUrl.trim();z?/^https:\/\/\S+$/i.test(z)||(R.webhookUrl="Enter an https:// URL without spaces."):R.webhookUrl="A Discord webhook URL is required."}else p.botToken.trim()||(R.botToken="The bot token is required."),p.chatId.trim()||(R.chatId="The chat ID is required.");if(b(R),Object.keys(R).length>0)return;const X={name:p.name.trim(),type:p.type,...p.type==="discord"?{webhookUrl:p.webhookUrl.trim(),message:p.message.trim()}:{botToken:p.botToken.trim(),chatId:p.chatId.trim()}};E(!0),y(null);try{const z=s?await oe.settings.channels.update(s.id,X):await oe.settings.channels.create(X);c(z,!d)}catch(z){y(TS(z))}finally{E(!1)}};return a.jsx(yn,{open:!0,onClose:k,title:d?`Edit ${s.name}`:"New notification channel",description:d?"Change where this channel delivers, or how its messages look.":"Add a Discord webhook or a Telegram bot. Domains choose their channels per event.",preventClose:N,footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",onClick:k,disabled:N,children:"Cancel"}),a.jsx(te,{variant:"primary",type:"submit",form:"channel-form",loading:N,children:d?"Save channel":"Create channel"})]}),children:a.jsxs("form",{id:"channel-form",onSubmit:R=>{R.preventDefault(),_()},className:"space-y-4",children:[j&&a.jsx(we,{tone:"danger",title:"Could not save the channel",children:j}),a.jsx(Ee,{label:"Name",value:p.name,onChange:R=>S("name",R.target.value),placeholder:"Production Discord",error:x.name,autoFocus:!0}),a.jsxs("fieldset",{disabled:d||N,children:[a.jsx("legend",{className:"mb-1.5 text-xs font-medium text-muted",children:"Type"}),a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:SS.map(R=>{const X=p.type===R.value;return a.jsxs("label",{className:re("flex cursor-pointer items-start gap-2.5 rounded-md border p-3 transition-colors duration-[var(--ez-motion-fast)]",X?"border-accent bg-accent-soft":"border-line bg-canvas hover:border-line-strong",(d||N)&&"cursor-not-allowed opacity-70"),children:[a.jsx("input",{type:"radio",name:"channel-type",value:R.value,checked:X,onChange:()=>S("type",R.value),className:"mt-0.5 size-3.5 accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium text-ink",children:[a.jsx(R.icon,{className:"size-3.5 text-muted","aria-hidden":"true"}),R.label]}),a.jsx("span",{className:"mt-0.5 block text-2xs text-faint",children:R.description})]})]},R.value)})}),d&&a.jsx(_s,{children:"The channel type cannot be changed after it is created."})]}),p.type==="discord"?a.jsxs(a.Fragment,{children:[a.jsx(Ee,{label:"Webhook URL",value:p.webhookUrl,onChange:R=>S("webhookUrl",R.target.value),placeholder:"https://discord.com/api/webhooks/…",error:x.webhookUrl,hint:"Create one in Discord under Channel settings → Integrations → Webhooks.",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsxs("div",{children:[a.jsx(Ee,{label:"Message prefix",optional:!0,value:p.message,onChange:R=>S("message",R.target.value),placeholder:"<@&1280907071813976196> or @team",hint:"Prepended to every alert in this channel.",spellCheck:!1}),a.jsxs("div",{className:"mt-2 rounded-md border border-info/25 bg-info-soft px-3 py-2 text-2xs text-muted",children:["Tip: to ping a Discord role, paste its mention as"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-[10px] text-ink",children:"<@&RoleId>"})," ","— for example"," ",a.jsx("code",{className:"rounded bg-inset px-1 py-0.5 font-mono text-[10px] text-ink",children:"<@&1280907071813976196>"}),". The role is mentioned on every alert."]})]})]}):a.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[a.jsx(Ee,{label:"Bot token",value:p.botToken,onChange:R=>S("botToken",R.target.value),placeholder:"123456:ABC…",error:x.botToken,hint:"From @BotFather.",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(Ee,{label:"Chat ID",value:p.chatId,onChange:R=>S("chatId",R.target.value),placeholder:"-1001234567890",error:x.chatId,hint:"Groups start with a minus sign.",className:"font-mono",spellCheck:!1,autoComplete:"off"})]})]})})}const ES={nginx_down:"nginx",cert_expiry:"Certificate",domain_health:"Health check",test:"Test message"};function zS(s){return s.type==="nginx_down"?Ls:s.type==="cert_expiry"?Ra:s.type==="domain_health"?Mo:vy}function RS(s){return s==="danger"?"text-bad":s==="warning"?"text-warn":s==="success"?"text-ok":s==="info"?"text-info":"text-muted"}function Ng(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function AS(s){if(!s)return"Webhook URL not set";try{const o=new URL(s),c=o.pathname.split("/").filter(Boolean).pop()??"";return`${o.host}/…${c.slice(-4)}`}catch{return"Webhook URL configured"}}function DS(s){return s.type==="discord"?AS(s.webhookUrl):`Chat ${s.chatId??"—"} · bot token saved`}function _S(){Vn("Notifications");const s=Nt(),o=bn(),{notifications:c,clearNotifications:u,connected:d,connectionError:m}=ia(),p=yt(z=>oe.settings.channels.list(z)),h=yt(z=>oe.domains.list(z)),[x,b]=g.useState(null),[j,y]=g.useState(null),[N,E]=g.useState(null),[,H]=g.useState(0);g.useEffect(()=>{const z=setInterval(()=>H(G=>G+1),3e4);return()=>clearInterval(z)},[]);const S=()=>{p.reload(),h.reload()};Ol(S),Hs(["settings","domains"],S);const k=g.useMemo(()=>{const z=new Map;for(const G of h.data??[]){if(!G.enabled)continue;const ne=new Map;for(const U of Object.values(G.notifications))if(U.enabled)for(const J of U.channelIds)ne.set(J,(ne.get(J)??0)+1);for(const[U,J]of ne){const ce=z.get(U)??{domains:0,rules:0};ce.domains+=1,ce.rules+=J,z.set(U,ce)}}return z},[h.data]),_=async z=>{if(!j){y(z.id);try{await oe.settings.channels.test(z.id),s.success(`Test sent to ${z.name}`,"Check the channel to confirm the message arrived.")}catch(G){s.error(`Test failed for ${z.name}`,Ng(G,"The test message could not be delivered."))}finally{y(null)}}},R=async z=>{if(!(N||!await o({title:`Delete ${z.name}?`,body:"Domains routed to this channel stop delivering alerts there. The domains themselves are not changed.",confirmLabel:"Delete channel",tone:"danger"}))){E(z.id);try{await oe.settings.channels.remove(z.id),s.success("Channel deleted",`${z.name} will no longer receive alerts.`),p.reload()}catch(ne){s.error("Could not delete the channel",Ng(ne,"The channel is still configured."))}finally{E(null)}}},X=p.data;return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Notifications",description:"Delivery channels for alerts, and the events received in this session.",actions:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",size:"sm",loading:p.loading||h.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:S,children:"Refresh"}),a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:null}),children:"New channel"})]})}),p.error&&!X?a.jsx(Et,{error:p.error,onRetry:p.reload}):X?a.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[minmax(0,1fr)_380px]",children:[a.jsx("div",{className:"space-y-5",children:a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{title:"Channels",description:"Named Discord and Telegram destinations. Domains choose which channels receive their events.",actions:X.length>0?a.jsx(ve,{tone:"neutral",children:_n(X.length,"channel")}):void 0}),p.error&&a.jsxs("div",{className:"border-b border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["Showing the last known list. ",p.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:p.reload,children:"Try again"})]}),X.length===0?a.jsx(On,{icon:a.jsx(Oo,{className:"size-5","aria-hidden":"true"}),title:"No channels yet",description:"Add a Discord webhook or a Telegram bot, then route domain events to it. Until then, alerts stay in the dashboard only.",action:a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Ca,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:null}),children:"New channel"})}):a.jsx("ul",{className:"divide-y divide-line/70",children:X.map(z=>{const G=z.type==="discord"?Oo:gy,ne=k.get(z.id),U=N===z.id;return a.jsxs("li",{className:"flex flex-col gap-3 px-4 py-3.5 sm:flex-row sm:items-center sm:justify-between sm:px-5",children:[a.jsxs("div",{className:"flex min-w-0 items-start gap-3",children:[a.jsx("div",{className:re("flex size-9 shrink-0 items-center justify-center rounded-md border border-line",z.type==="discord"?"bg-info-soft text-info":"bg-accent-soft text-accent-text"),children:a.jsx(G,{className:"size-4","aria-hidden":"true"})}),a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:z.name}),a.jsx(ve,{tone:"neutral",children:z.type==="discord"?"Discord":"Telegram"}),h.data&&(ne?a.jsxs(ve,{tone:"ok",dot:!0,className:"cursor-default",children:[ne.domains," ",ne.domains===1?"domain":"domains"]}):a.jsx(ve,{tone:"neutral",children:"Not routed yet"}))]}),a.jsx("p",{className:"mt-0.5 truncate font-mono text-xs text-muted",children:DS(z)}),z.type==="discord"&&z.message&&a.jsxs("p",{className:"mt-0.5 truncate text-2xs text-faint",children:["Prefix: ",z.message]})]})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-1.5 pl-12 sm:pl-0",children:[a.jsx(te,{variant:"secondary",size:"sm",loading:j===z.id,disabled:j!==null&&j!==z.id,icon:a.jsx(x2,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void _(z),children:"Test"}),a.jsx(te,{variant:"ghost",size:"sm",disabled:U,icon:a.jsx(rf,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>b({channel:z}),children:"Edit"}),a.jsx(at,{label:`Delete ${z.name}`,size:"sm",disabled:U,className:"hover:text-bad",onClick:()=>void R(z),children:a.jsx(Us,{className:"size-3.5","aria-hidden":"true"})})]})]},z.id)})}),X.length>0&&a.jsx("div",{className:"border-t border-line bg-raised/40 px-4 py-2.5 text-2xs text-faint sm:px-5",children:h.error?"Domain routing could not be loaded, so usage counts are hidden.":"Counts include enabled domains that route at least one event to a channel."})]})}),a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(sg,{className:"size-4","aria-hidden":"true"}),title:"Recent events",description:"Received live while this page is open.",actions:a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs text-faint",children:[a.jsx(Qt,{tone:d?"ok":"warn",pulse:d}),d?"Live":"Reconnecting…"]})}),m&&a.jsx("div",{className:"border-b border-line px-4 py-2.5 sm:px-5",children:a.jsx(we,{tone:"warning",children:m})}),c.length===0?a.jsx(On,{icon:a.jsx(sg,{className:"size-5","aria-hidden":"true"}),title:"No events yet",description:"Alerts appear here as they happen. The bell in the header keeps the same list between pages.",className:"py-9"}):a.jsxs(a.Fragment,{children:[a.jsx("ul",{className:"max-h-[420px] divide-y divide-line/70 overflow-y-auto",children:c.map(z=>{const G=zS(z);return a.jsxs("li",{className:"flex items-start gap-2.5 px-4 py-2.5 sm:px-5",children:[a.jsx(G,{className:re("mt-0.5 size-4 shrink-0",RS(z.severity)),"aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-xs leading-snug text-ink",children:z.message}),a.jsxs("p",{className:"mt-0.5 flex flex-wrap items-center gap-x-1.5 text-2xs text-faint",children:[a.jsx("span",{children:ES[z.type]??"Notification"}),z.domain&&a.jsxs("span",{children:["· ",z.domain]}),a.jsxs("span",{children:["· ",Ji(z.timestamp)]})]})]})]},z.id)})}),a.jsx("div",{className:"border-t border-line bg-raised/40 px-4 py-2 sm:px-5",children:a.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-muted transition-colors hover:text-ink",children:"Clear all events"})})]})]}),a.jsxs(Qe,{children:[a.jsx(nn,{title:"How routing works",description:"Channels do nothing until a domain sends to them."}),a.jsxs(Dn,{className:"space-y-3",children:[a.jsx("ol",{className:"space-y-2.5",children:["Create a channel here and send it a test message.","Open a domain and pick channels for nginx downtime, certificate expiry and health events.","Toggle each event separately — turning one off keeps the others delivering."].map((z,G)=>a.jsxs("li",{className:"flex gap-2.5 text-xs text-muted",children:[a.jsx("span",{className:"mt-0.5 flex size-4.5 shrink-0 items-center justify-center rounded-full bg-inset text-2xs font-semibold text-muted",children:G+1}),a.jsx("span",{children:z})]},z))}),a.jsxs(bt,{to:"/domains",className:ka("secondary","sm","w-full"),children:["Open domains",a.jsx(Os,{className:"size-3.5","aria-hidden":"true"})]})]})]})]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-40 rounded-lg"}),a.jsx(Fe,{className:"h-64 rounded-lg"})]}),x&&a.jsx(CS,{channel:x.channel,onClose:()=>b(null),onSaved:(z,G)=>{b(null),p.reload(),s.success(G?"Channel created":"Channel updated",G?`${z.name} is ready to receive alerts.`:`${z.name} was saved.`)}},x.channel?.id??"new")]})}function wg(s,o){return s instanceof Be?typeof s.payload.detail=="string"?s.payload.detail:typeof s.payload.message=="string"?s.payload.message:s.message:s instanceof Error?s.message:o}function Ho(s){return s==="online"?"ok":s==="errored"?"bad":s==="stopping"||s==="launching"?"warn":"neutral"}function Hy(s){return s===null||s===0?"—":uw(s)}function By(s){return s===null||s===0?"—":zy(s)}function Sg(s,o){const c=o?.replace(/\\/g,"/").replace(/\/+$/,"").toLowerCase()??null;return[s.execPath,s.cwd].some(u=>{if(!u)return!1;const d=u.replace(/\\/g,"/").toLowerCase();return c&&d.startsWith(`${c}/modules/`)?!0:/(^|\/)(\.pm2|pm2)\/modules\//.test(d)})}function Eo({label:s,value:o}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:s}),a.jsx("div",{className:"mt-0.5 text-xs tabular-nums text-muted",children:o})]})}function ll({label:s,value:o,detail:c,tone:u}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:s}),a.jsx("div",{className:re("mt-0.5 text-sm font-medium",u??"text-ink"),children:o}),c&&a.jsx("div",{className:"mt-0.5 text-2xs text-faint",children:c})]})}function MS({command:s,guidance:o}){return a.jsxs("div",{className:"rounded-md border border-line bg-canvas p-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("code",{className:"break-all font-mono text-xs text-ink",children:s}),a.jsx(jt,{value:s,label:"Copy command",withText:!0})]}),a.jsx("p",{className:"mt-2 text-2xs leading-relaxed text-muted",children:o})]})}function kg({label:s,version:o,path:c,broken:u=!1,emptyLabel:d="Unknown"}){return a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs text-faint",children:s}),a.jsx("div",{className:re("text-xs font-medium",u?"text-warn":"text-ink"),children:o??(u?"Missing":d)}),a.jsx("div",{className:"break-all font-mono text-2xs text-faint",children:c??"—"})]})}function OS({runtime:s}){const o=yw(s);return o?a.jsxs("div",{className:"rounded-md border border-line bg-canvas/40 px-3.5 py-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Node runtime"}),o.broken?a.jsx(ve,{tone:"warn",children:"service runtime missing"}):o.pinned?o.sameAsSystem?a.jsx(ve,{tone:"neutral",children:"same as system"}):a.jsx(ve,{tone:"info",children:"pinned copy"}):a.jsx(ve,{tone:"warn",children:"not pinned"})]}),a.jsxs("div",{className:"mt-2 grid gap-3 sm:grid-cols-2",children:[a.jsx(kg,{label:"Service Node",version:o.serviceVersion,path:o.servicePath,broken:o.broken,emptyLabel:o.pinned?"Unknown":"Not pinned"}),a.jsx(kg,{label:"System Node",version:o.systemVersion,path:o.systemPath})]}),o.manager&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["The system Node is managed by ",o.manager,". The service uses its own pinned binary so switching versions cannot break it."]}),!o.pinned&&!o.broken&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["No pinned Node was found. The service will start with whatever"," ",a.jsx("code",{className:"font-mono",children:"node"})," its launcher resolves;"," ",a.jsx("code",{className:"font-mono",children:"ezz service repair"})," pins one."]}),o.pinned&&!o.sameAsSystem&&!o.broken&&o.serviceVersion&&a.jsxs("p",{className:"mt-2 text-2xs text-faint",children:["The service is pinned to a different Node than this dashboard. That is normal after an upgrade; ",a.jsx("code",{className:"font-mono",children:"ezz service repair"})," re-pins it."]})]}):null}function LS({app:s,onClose:o}){const c=yt(d=>oe.processes.logs(s.name,200,d)),u=(c.data?.lines??[]).join(`
|
|
446
|
-
`);return a.jsx(yn,{open:!0,onClose:o,title:`Logs — ${s.name}`,description:"The last 200 lines PM2 has written for this process.",size:"lg",footer:a.jsxs(a.Fragment,{children:[u.trim()&&a.jsx(jt,{value:u,label:"Copy logs",withText:!0}),a.jsx(te,{variant:"secondary",onClick:o,children:"Close"})]}),children:c.error&&!c.data?a.jsx(Et,{error:c.error,title:"Could not read the logs",onRetry:c.reload,className:"border-0"}):c.data?a.jsx("pre",{className:"max-h-[55vh] overflow-auto whitespace-pre-wrap break-all rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted",children:u.trim()?u:"(no output)"}):a.jsxs("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-muted",children:[a.jsx(Ds,{}),"Reading logs…"]})})}function Tg({app:s,isModule:o,busy:c,currentUser:u,onAction:d,onLogs:m}){const p=c?.name===s.name,h=!!(s.user&&u&&s.user!==u);return a.jsxs("li",{className:"px-4 py-3.5 sm:px-5",children:[a.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(Qt,{tone:Ho(s.status),pulse:s.status==="online"}),a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:s.name}),a.jsx(ve,{tone:Ho(s.status),children:s.status}),o&&a.jsx(ve,{tone:"info",children:"module"}),h&&a.jsx(ve,{tone:"warn",children:s.user})]}),(s.execPath||s.cwd)&&a.jsx("p",{className:"mt-0.5 truncate font-mono text-2xs text-faint",children:s.execPath??s.cwd})]}),a.jsxs("div",{className:"flex shrink-0 flex-wrap items-center gap-1.5",children:[s.status==="online"?a.jsx(te,{variant:"secondary",size:"sm",loading:p&&c?.action==="stop",disabled:p||h,icon:a.jsx(uf,{className:"size-3","aria-hidden":"true"}),onClick:()=>d(s,"stop",o),children:"Stop"}):a.jsx(te,{variant:"secondary",size:"sm",loading:p&&c?.action==="start",disabled:p||h,icon:a.jsx(Zi,{className:"size-3","aria-hidden":"true"}),onClick:()=>d(s,"start",o),children:"Start"}),a.jsx(te,{variant:"ghost",size:"sm",loading:p&&c?.action==="restart",disabled:p||h,icon:a.jsx(of,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>d(s,"restart",o),children:"Restart"}),a.jsx(te,{variant:"ghost",size:"sm",disabled:p,icon:a.jsx(qi,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>m(s),children:"Logs"})]})]}),a.jsxs("div",{className:"mt-3 grid grid-cols-2 gap-3 sm:grid-cols-4",children:[a.jsx(Eo,{label:"CPU",value:Hy(s.cpu)}),a.jsx(Eo,{label:"Memory",value:By(s.memoryBytes)}),a.jsx(Eo,{label:"Uptime",value:$o(s.uptimeMs)}),a.jsx(Eo,{label:"Restarts",value:s.unstableRestarts>0?`${s.restarts} · ${s.unstableRestarts} unstable`:String(s.restarts)})]})]})}const qy="ez.processes.view";function US(){try{return localStorage.getItem(qy)==="table"?"table":"list"}catch{return"list"}}function HS({view:s,onChange:o}){const c=[{id:"list",label:"List view",icon:O2},{id:"table",label:"Table view",icon:NN}];return a.jsx("div",{role:"group","aria-label":"Process layout",className:"inline-flex items-center gap-0.5 rounded-md border border-line bg-raised p-0.5",children:c.map(({id:u,label:d,icon:m})=>a.jsxs("button",{type:"button","aria-pressed":s===u,title:d,onClick:()=>o(u),className:re("inline-flex size-7 items-center justify-center rounded-sm transition-colors duration-[var(--ez-motion-fast)]",s===u?"bg-surface text-ink shadow-sm":"text-faint hover:text-ink"),children:[a.jsx(m,{className:"size-3.5","aria-hidden":"true"}),a.jsx("span",{className:"sr-only",children:d})]},u))})}function BS({app:s}){return s.unstableRestarts>0?`${s.restarts} · ${s.unstableRestarts} unstable`:String(s.restarts)}function Cg({apps:s,isModule:o,busy:c,currentUser:u,onAction:d,onLogs:m}){return a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full min-w-[42rem] text-left text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-line text-2xs uppercase tracking-wider text-faint",children:[a.jsx("th",{scope:"col",className:"px-4 py-2 font-medium sm:px-5",children:"Process"}),a.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"CPU"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"Memory"}),a.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Uptime"}),a.jsx("th",{scope:"col",className:"px-3 py-2 text-right font-medium",children:"Restarts"}),a.jsx("th",{scope:"col",className:"px-4 py-2 text-right font-medium sm:px-5",children:a.jsx("span",{className:"sr-only",children:"Actions"})})]})}),a.jsx("tbody",{children:s.map(p=>{const h=c?.name===p.name,x=!!(p.user&&u&&p.user!==u);return a.jsxs("tr",{className:"border-b border-line/70 last:border-0",children:[a.jsx("td",{className:"px-4 py-2 sm:px-5",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Qt,{tone:Ho(p.status),pulse:p.status==="online"}),a.jsx("span",{className:"truncate text-sm font-medium text-ink",children:p.name}),o&&a.jsx(ve,{tone:"info",children:"module"}),x&&a.jsx(ve,{tone:"warn",children:p.user})]})}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2",children:a.jsx(ve,{tone:Ho(p.status),children:p.status})}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:Hy(p.cpu)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:By(p.memoryBytes)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 tabular-nums text-muted",children:$o(p.uptimeMs)}),a.jsx("td",{className:"whitespace-nowrap px-3 py-2 text-right tabular-nums text-muted",children:a.jsx(BS,{app:p})}),a.jsx("td",{className:"px-4 py-2 sm:px-5",children:a.jsxs("div",{className:"flex items-center justify-end gap-1",children:[p.status==="online"?a.jsx(at,{label:`Stop ${p.name}`,size:"sm",disabled:h||x,onClick:()=>d(p,"stop",o),children:h&&c?.action==="stop"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(uf,{className:"size-3","aria-hidden":"true"})}):a.jsx(at,{label:`Start ${p.name}`,size:"sm",disabled:h||x,onClick:()=>d(p,"start",o),children:h&&c?.action==="start"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(Zi,{className:"size-3","aria-hidden":"true"})}),a.jsx(at,{label:`Restart ${p.name}`,size:"sm",disabled:h||x,onClick:()=>d(p,"restart",o),children:h&&c?.action==="restart"?a.jsx(sl,{className:"spin size-3.5","aria-hidden":"true"}):a.jsx(of,{className:"size-3.5","aria-hidden":"true"})}),a.jsx(at,{label:`View logs for ${p.name}`,size:"sm",disabled:h,onClick:()=>m(p),children:a.jsx(qi,{className:"size-3.5","aria-hidden":"true"})})]})})]},`${p.name}-${p.pmId??"x"}`)})})]})})}function qS(){Vn("Processes");const s=Nt(),o=bn(),{service:c,loading:u,error:d,reload:m,applyBackgroundService:p}=Ki(),h=Pi(c),x=yt(M=>oe.processes.list(M)),[b,j]=g.useState(null),[y,N]=g.useState(null),[E,H]=g.useState(null),[S,k]=g.useState(null),[_,R]=g.useState(US),X=M=>{R(M);try{localStorage.setItem(qy,M)}catch{}},z=()=>{x.reload(),m()};Rs(x.reload,15e3),Rs(()=>{u||m()},15e3),Ol(z);const G=async(M,A,le)=>{if(!b){if(A==="stop"||A==="restart"){const F=le?A==="stop"?M.name.toLowerCase().includes("logrotate")?`${M.name} rotates PM2's logs. Stopping it lets PM2 logs grow without limit until you start it again. It is a PM2 module, not one of your apps.`:`${M.name} is a PM2 module, not one of your apps. Stopping it changes how PM2 itself behaves.`:`${M.name} is a PM2 module. Restarting it briefly stops the behaviour it adds to PM2.`:`${M.name} is one of your own PM2 apps. ${A==="stop"?"Stopping":"Restarting"} it affects whatever else relies on it.`;if(!await o({title:`${A==="stop"?"Stop":"Restart"} ${M.name}?`,body:F,confirmLabel:le&&A==="stop"?"Stop module anyway":`${A==="stop"?"Stop":"Restart"} anyway`,tone:"danger"}))return}j({name:M.name,action:A});try{const F=await oe.processes.action(M.name,A);s.success(`${M.name}: ${A} done`,F.output||void 0),z()}catch(F){s.error(`Could not ${A} ${M.name}`,wg(F,"PM2 refused the action. Check the PM2 log for details."))}finally{j(null)}}},ne=async M=>{if(!h||E)return;const A=h.startsAt==="logon"?"at your next logon":h.startsAt==="boot"?"at the next boot":"when the service starts";if(await o(M==="start"?{title:"Start the background service?",body:h.installed?`Monitoring and notifications keep running after this dashboard closes. From now on it also starts ${A}.`:"The service is not installed; if it cannot start, the exact install command is shown instead.",confirmLabel:"Start service"}:M==="stop"?{title:"Stop the background service?",body:h.installed?`Monitoring and notifications pause while it is down. It returns ${A} or as soon as you start it again.`:"Monitoring and notifications pause while it is down. It will not restart until you start it, because it is not installed.",confirmLabel:"Stop service",tone:"danger"}:{title:"Restart the background service?",body:"Monitoring pauses for a moment while the service restarts. Jobs resume when it is back up.",confirmLabel:"Restart service",tone:"danger"})){H(M),k(null);try{const F=await oe.service[M]();p(F.backgroundService),s.success(M==="start"?"Background service started":M==="stop"?"Background service stopped":"Background service restarted",F.output?.trim()||void 0),m()}catch(F){if(F instanceof Be){if(F.payload.backgroundService&&p(F.payload.backgroundService),F.status===403&&F.code==="elevation_required"){k({kind:"elevation",action:M,command:typeof F.payload.command=="string"?F.payload.command:`ezz service ${M}`,shell:typeof F.payload.shell=="string"?F.payload.shell:null,message:typeof F.payload.message=="string"?F.payload.message:null});return}if(F.status===409&&F.code==="not_installed"){k({kind:"install",action:M,command:typeof F.payload.command=="string"?F.payload.command:c?.install.command??"ezz service install",shell:c?.install.shell??null,message:typeof F.payload.message=="string"?F.payload.message:null});return}if(F.status===409&&F.code==="already_running"){s.info("The background service is already running.",typeof F.payload.message=="string"?F.payload.message:void 0),m();return}s.error(`Could not ${M} the background service`,wg(F,"The service manager refused the action.")),m();return}s.error(`Could not ${M} the background service`,F instanceof Error?F.message:"The dashboard could not complete the action.")}finally{H(null)}}},U=(x.data?.apps??[]).filter(M=>!M.managed),J=x.data?.currentUser??null,ce=x.data?.pm2Home??null,P=U.filter(M=>Sg(M,ce)),ae=U.filter(M=>!Sg(M,ce));return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Processes",description:"The Easy DevOps background service, plus every PM2 app you run for yourself.",actions:a.jsx(te,{variant:"secondary",size:"sm",loading:x.loading||u,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:z,children:"Refresh"})}),x.error&&!x.data?a.jsx(Et,{error:x.error,onRetry:x.reload}):x.data?a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:re("h-0.5 w-full",h?.running?"bg-ok/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(yy,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Background service",h&&a.jsx(ve,{tone:h.running?"ok":"warn",dot:!0,children:Lo(h)}),c?.dev&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Runs monitoring and notifications in the background, independent of this dashboard.",actions:h?h.running?a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",size:"sm",loading:E==="stop",disabled:E!==null,icon:a.jsx(uf,{className:"size-3","aria-hidden":"true"}),onClick:()=>void ne("stop"),children:"Stop"}),a.jsx(te,{variant:"secondary",size:"sm",loading:E==="restart",disabled:E!==null,icon:a.jsx(of,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void ne("restart"),children:"Restart"})]}):a.jsx(te,{variant:"primary",size:"sm",loading:E==="start",disabled:E!==null,icon:a.jsx(Zi,{className:"size-3","aria-hidden":"true"}),onClick:()=>void ne("start"),children:"Start"}):void 0}),a.jsxs(Dn,{className:"space-y-4",children:[S&&a.jsxs(we,{tone:"warning",title:S.kind==="install"?"The background service is not installed":`${S.action==="start"?"Starting":S.action==="stop"?"Stopping":"Restarting"} needs ${S.shell??"a terminal with extra rights"}`,action:a.jsx(at,{label:"Dismiss",size:"sm",onClick:()=>k(null),children:a.jsx(Qi,{className:"size-3.5","aria-hidden":"true"})}),children:[S.message&&a.jsx("p",{children:S.message}),a.jsxs("div",{className:"mt-2 rounded-md border border-line bg-canvas p-2.5",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("code",{className:"break-all font-mono text-xs text-ink",children:S.command}),a.jsx(jt,{value:S.command,label:"Copy command",withText:!0})]}),S.shell&&a.jsxs("p",{className:"mt-1.5 text-2xs text-faint",children:["Run it in ",S.shell,"."]})]}),a.jsx("p",{className:"mt-2 text-2xs text-faint",children:S.kind==="elevation"?"The dashboard cannot elevate itself or ask for a password. Run the command in a terminal you control.":"The command is run in a terminal, not from this dashboard."})]}),d&&!c?a.jsx(Et,{error:d,title:"Could not read the service state",onRetry:m,className:"border-0"}):h?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-5 sm:grid-cols-4",children:[a.jsx(ll,{label:"Status",value:Lo(h),tone:h.running?"text-ok":"text-warn",detail:h.stoppedByUser&&h.stoppedAtLabel?`Stopped ${h.stoppedAtLabel}`:h.detail??void 0}),a.jsx(ll,{label:"PID",value:h.pid===null?"—":String(h.pid)}),a.jsx(ll,{label:"Uptime",value:$o(h.uptimeMs)}),a.jsx(ll,{label:"Installed",value:h.installed?"Yes":"No"}),a.jsx(ll,{label:"Mode",value:h.mechanismLabel,detail:h.mechanismDetail}),a.jsx(ll,{label:"Starts",value:h.startsAtLabel}),a.jsx(ll,{label:"Monitoring runs in",value:h.jobsOwnerLabel}),a.jsx(ll,{label:"Live channel",value:h.connected?"Connected":"Not connected"})]}),a.jsxs("div",{className:"flex flex-wrap gap-x-5 gap-y-1 text-2xs text-faint",children:[a.jsxs("span",{className:"min-w-0",children:["Data directory"," ",a.jsx("code",{className:"break-all font-mono text-muted",children:c?.dataDir??"—"})]}),h.version&&a.jsxs("span",{children:["Daemon ",a.jsx("code",{className:"font-mono text-muted",children:h.version})]})]}),h.runtime?a.jsx(OS,{runtime:h.runtime}):a.jsx("p",{className:"text-2xs text-faint",children:"The service and system Node versions are not available for this install."}),h.warnings.map(M=>a.jsx(we,{tone:"warning",children:a.jsx("span",{className:"whitespace-pre-line",children:M})},M)),!h.running&&a.jsx(we,{tone:"warning",title:h.stoppedByUser?"The background service is stopped":h.installed?"The background service is not running":"The background service is not set up",children:h.stoppedByUser?a.jsxs(a.Fragment,{children:["You stopped it",h.stoppedAtLabel?` on ${h.stoppedAtLabel}`:"",". Monitoring and notifications are paused until it starts again"," ",h.startsAt==="logon"?"at your next logon":h.startsAt==="boot"?"at the next boot":"when the service starts",". Use Start above, or run"," ",a.jsx("code",{className:"font-mono",children:"ezz service start"}),"."]}):h.installed?a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Start the service with ",a.jsx("code",{className:"font-mono",children:"ezz service start"}),", or use Start above."]}):a.jsxs(a.Fragment,{children:["Monitoring and notifications run in this dashboard and stop when it closes. Set up the service with"," ",a.jsx("code",{className:"font-mono",children:h.installCommand}),"."]})}),a.jsxs("details",{className:"rounded-md border border-line bg-canvas/40 px-3.5 py-3",children:[a.jsx("summary",{className:"cursor-pointer select-none text-xs font-medium text-ink",children:"Install or repair the service"}),a.jsxs("div",{className:"mt-3 space-y-2.5",children:[a.jsx(MS,{command:h.installCommand,guidance:h.installGuidance}),a.jsxs("p",{className:"text-2xs text-faint",children:["The command is run in a terminal, not from this dashboard."," ",h.startsAt==="logon"?"It starts the service at logon.":h.startsAt==="boot"?"It starts the service at boot.":"It sets the service up to start automatically."," ","It never asks for an account password."]})]})]})]}):a.jsxs("div",{className:"flex items-center gap-2 py-6 text-sm text-muted",children:[a.jsx(Ds,{}),"Checking the background service…"]})]})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Your PM2 apps",ae.length>0&&a.jsx(ve,{tone:"neutral",children:_n(ae.length,"app")})]}),description:J?`Apps PM2 is supervising for ${J}. Easy DevOps itself is not one of them.`:"Apps PM2 is supervising for you. Easy DevOps itself is not one of them.",actions:ae.length>0||P.length>0?a.jsx(HS,{view:_,onChange:X}):void 0}),x.data.pm2.installed&&x.data.hint&&a.jsx("div",{className:"border-b border-line px-4 py-2.5 sm:px-5",children:a.jsx(we,{tone:"warning",children:x.data.hint})}),x.error&&a.jsxs("div",{className:"border-b border-line px-4 py-2 text-2xs text-muted sm:px-5",children:["Showing the last known list. ",x.error.message," ",a.jsx("button",{type:"button",className:"font-medium text-ink underline-offset-2 hover:underline",onClick:x.reload,children:"Try again"})]}),x.data.pm2.installed?ae.length===0?a.jsx(On,{icon:a.jsx(qi,{className:"size-5","aria-hidden":"true"}),title:"No PM2 apps of your own",description:"Start an app with PM2 and it will appear here. Easy DevOps does not run itself under PM2."}):a.jsx("div",{className:"panel-enter",children:_==="table"?a.jsx(Cg,{apps:ae,isModule:!1,busy:b,currentUser:J,onAction:G,onLogs:N}):a.jsx("ul",{className:"divide-y divide-line/70",children:ae.map(M=>a.jsx(Tg,{app:M,isModule:!1,busy:b,currentUser:J,onAction:G,onLogs:N},`${M.name}-${M.pmId??"x"}`))})},_):a.jsx(On,{icon:a.jsx(qi,{className:"size-5","aria-hidden":"true"}),title:"PM2 is not installed",description:"PM2 is optional. It is only for apps you run yourself; Easy DevOps uses its own background service."})]}),P.length>0&&a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["PM2 modules",a.jsx(ve,{tone:"neutral",children:_n(P.length,"module")})]}),description:"Modules extend PM2 itself and are not your apps. Stopping pm2-logrotate lets PM2 logs grow without limit."}),a.jsx("div",{className:"panel-enter",children:_==="table"?a.jsx(Cg,{apps:P,isModule:!0,busy:b,currentUser:J,onAction:G,onLogs:N}):a.jsx("ul",{className:"divide-y divide-line/70",children:P.map(M=>a.jsx(Tg,{app:M,isModule:!0,busy:b,currentUser:J,onAction:G,onLogs:N},`${M.name}-${M.pmId??"x"}`))})},_)]})]}):a.jsxs(za,{children:[a.jsx(Fe,{className:"h-56 rounded-lg"}),a.jsx(Fe,{className:"h-72 rounded-lg"})]}),y&&a.jsx(LS,{app:y,onClose:()=>N(null)})]})}function GS(s){return s?!/^[a-z0-9][a-z0-9-]{0,39}$/.test(s)||s.endsWith("-")?"Lower-case letters, digits and dashes, up to 40 characters.":null:"A name is required."}function YS(s){return/^ssh:\/\//.test(s)||/^[A-Za-z0-9._-]+@[A-Za-z0-9.-]+:/.test(s)}function $S(s){const o={},c=s.split(/\r?\n/);for(let u=0;u<c.length;u++){const d=c[u];if(!d.trim()||d.trim().startsWith("#"))continue;const m=d.indexOf("=");if(m===-1)return{env:o,error:`Line ${u+1}: expected NAME=value.`};const p=d.slice(0,m).trim().replace(/^export\s+/,"");if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(p))return{env:o,error:`Line ${u+1}: "${p}" is not a valid variable name.`};let h=d.slice(m+1).trim();h.length>=2&&(h.startsWith('"')&&h.endsWith('"')||h.startsWith("'")&&h.endsWith("'"))&&(h=h.slice(1,-1)),o[p]=h}return{env:o,error:null}}function VS(s){return Object.keys(s).sort().map(o=>`${o}=${s[o]}`).join(`
|
|
447
|
-
`)}function Eg(s){return s===void 0||s===!1?"":Array.isArray(s)?s.join(" && "):s}function Gy(s){return{install:Eg(s.install),build:Eg(s.build),start:s.start??"",port:s.port?String(s.port):"",healthPath:s.healthPath??"",skipInstall:s.install===!1||Array.isArray(s.install)&&s.install.length===0,skipBuild:s.build===!1||Array.isArray(s.build)&&s.build.length===0}}function XS(s){const o={};return s.skipInstall?o.install=!1:s.install.trim()&&(o.install=s.install.trim()),s.skipBuild?o.build=!1:s.build.trim()&&(o.build=s.build.trim()),s.start.trim()&&(o.start=s.start.trim()),s.port.trim()&&(o.port=Number(s.port)),s.healthPath.trim()&&(o.healthPath=s.healthPath.trim()),o}const Yy={running:{label:"Deploying",tone:"info"},success:{label:"Succeeded",tone:"ok"},failed:{label:"Failed",tone:"bad"},rolled_back:{label:"Rolled back",tone:"warn"}},ZS={fetch:"Fetching the code",settings:"Reading project settings",pre:"Pre-deploy hook",install:"Installing",build:"Building",start:"Starting",health:"Health check",post:"Post-deploy hook",finish:"Finishing",done:"Done"};function gf(s){return ZS[s]??s}const QS={manual:"Dashboard",webhook:"GitHub Actions",hub:"Hub",rollback:"Rollback"};function Xo(s){return s?s.slice(0,7):"—"}function KS(s){const o=s.finishedAt??Date.now(),c=Math.max(0,Math.round((o-s.startedAt)/1e3));return c<60?`${c}s`:`${Math.floor(c/60)}m ${c%60}s`}function JS(s){return s==="online"?"ok":s==="errored"?"bad":s==="stopped"||s==="stopping"?"warn":"neutral"}function PS(s){const o=(m,p)=>m===!1?!1:Array.isArray(m)?m.length===0?!1:m.length===1?m[0]:m:m&&m.trim()?m:p,c={install:o(s.install,"npm ci"),build:o(s.build,"npm run build"),start:s.start?.trim()||"npm start",port:s.port??3e3,health:s.healthPath?.trim()||"/"},u=o(s.pre,""),d=o(s.post,"");return(u&&u!==""||d&&d!=="")&&(c.hooks={...u&&u!==""?{pre:u}:{},...d&&d!==""?{post:d}:{}}),`${JSON.stringify(c,null,2)}
|
|
448
|
-
`}const FS=`${JSON.stringify({install:"pip install -r requirements.txt",build:!1,start:"python app.py",port:8e3,health:"/health"},null,2)}
|
|
449
|
-
`,IS=[{name:"install",meaning:"Run first, in a fresh checkout. A command, a list of commands, or false to skip.",without:"npm ci (yarn and pnpm are detected from the lockfile)"},{name:"build",meaning:"Run after install. Same forms.",without:'the "build" script, if package.json has one'},{name:"start",meaning:"The long-running process. One command, any language.",without:'the "start" script, else node <main>'},{name:"port",meaning:"The port the app listens on. Passed to it as PORT and used for the health check.",without:"no HTTP check; the process only has to stay up"},{name:"health",meaning:'A path that must answer before the deployment counts: "/healthz", or { "path": "/healthz", "timeout": 60 }.',without:'"/" with a 60-second limit'},{name:"hooks.pre",meaning:"Run before install — check the environment, fetch something.",without:"nothing"},{name:"hooks.post",meaning:"Run once the new release is live — warm a cache, notify someone. A failure is a warning; the release stays.",without:"nothing"}];function WS({items:s,value:o,onChange:c,ariaLabel:u,className:d}){const m=g.useRef(new Map),p=x=>{const b=s[x];b&&(c(b.id),m.current.get(b.id)?.focus())},h=(x,b)=>{x.key==="ArrowRight"?(x.preventDefault(),p((b+1)%s.length)):x.key==="ArrowLeft"?(x.preventDefault(),p((b-1+s.length)%s.length)):x.key==="Home"?(x.preventDefault(),p(0)):x.key==="End"&&(x.preventDefault(),p(s.length-1))};return a.jsx("div",{role:"tablist","aria-label":u,className:re("flex gap-1 overflow-x-auto border-b border-line",d),children:s.map((x,b)=>{const j=x.id===o;return a.jsxs("button",{ref:y=>{y?m.current.set(x.id,y):m.current.delete(x.id)},id:`tab-${x.id}`,role:"tab",type:"button","aria-selected":j,"aria-controls":`panel-${x.id}`,tabIndex:j?0:-1,onClick:()=>c(x.id),onKeyDown:y=>h(y,b),className:re("relative -mb-px flex items-center gap-1.5 whitespace-nowrap border-b-2 px-3 py-2.5 text-sm font-medium transition-colors duration-[var(--ez-motion-fast)]",j?"border-accent text-ink":"border-transparent text-muted hover:border-line-strong hover:text-ink"),children:[x.label,x.count!==void 0&&a.jsx("span",{className:re("rounded-pill px-1.5 py-0.5 text-2xs",j?"bg-accent-soft text-accent-text":"bg-inset text-faint"),children:x.count})]},x.id)})})}function Li({id:s,value:o,children:c}){return s!==o?null:a.jsx("div",{role:"tabpanel",id:`panel-${s}`,"aria-labelledby":`tab-${s}`,className:"page-enter",children:c})}function Ao(s,o){return s instanceof Be||s instanceof Error?s.message:o}function e5({app:s,onClose:o,onDeleted:c}){const u=Nt(),[d,m]=g.useState(!1),[p,h]=g.useState(!1);g.useEffect(()=>{s&&m(!1)},[s]);const x=async()=>{if(!(!s||p)){h(!0);try{const b=await oe.deployments.remove(s.id,d&&!!s.domain);b.warning?u.warning(`${s.id} deleted`,b.warning):u.success(`${s.id} deleted`,b.domainDeleted?`${s.domain} was removed too.`:void 0),c()}catch(b){u.error(`Could not delete ${s.id}`,Ao(b,"Nothing was changed."))}finally{h(!1)}}};return a.jsx(yn,{open:s!==null,onClose:o,preventClose:p,size:"sm",title:`Delete ${s?.id??""}?`,footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",onClick:o,disabled:p,children:"Cancel"}),a.jsx(te,{variant:"danger",onClick:()=>void x(),loading:p,children:"Delete app"})]}),children:a.jsxs("div",{className:"space-y-4 text-sm text-muted",children:[a.jsx("p",{children:"Its process is stopped and removed from PM2, and every release, log and its deploy key are deleted from this server. The repository is not touched."}),s?.dir&&a.jsx("p",{className:"break-all font-mono text-2xs text-faint",children:s.dir}),s?.domain&&a.jsx(Al,{label:a.jsxs(a.Fragment,{children:["Also delete the domain ",a.jsx("span",{className:"font-mono text-ink",children:s.domain})]}),hint:"Its nginx config is removed and the site stops answering. Leave this off to keep the domain.",checked:d,onChange:m})]})})}function t5({app:s,meta:o,onChanged:c,onDelete:u}){const d=Nt(),[m,p]=g.useState(""),[h,x]=g.useState(!1),[b,j]=g.useState(!1),[y,N]=g.useState(""),[E,H]=g.useState(!1),S=m.trim().toLowerCase(),k=o.domains.find(G=>G.name===S),_=s.settings.port??null,R=async()=>{if(!(!S||b)){j(!0);try{const G=await oe.deployments.linkDomain(s.id,S,h&&!k?.ssl),ne=G.created?`${G.domain} was created and proxies to port ${G.port}.`:`${G.domain} now proxies to port ${G.port}.`;G.ssl&&!G.ssl.ok?d.warning("Linked, without a certificate",`${ne} ${G.ssl.detail}`):G.nginxReloaded?d.success("Domain linked",G.ssl?.ok?`${ne} ${G.ssl.detail}`:ne):d.warning("Linked, but nginx was not reloaded",`${ne} Reload nginx for it to take effect.`),p(""),x(!1),c()}catch(G){d.error("Could not link the domain",Ao(G,"Nothing was changed."))}finally{j(!1)}}},X=async()=>{try{await oe.deployments.unlinkDomain(s.id),d.success("Link removed",`${s.domain} is still configured; only the link is gone.`),c()}catch(G){d.error("Could not remove the link",Ao(G,"Nothing was changed."))}},z=async()=>{if(!(!y.trim()||E)){H(!0);try{const G=await oe.deployments.move(s.id,y.trim());G.warning?d.warning("Moved",G.warning):d.success("App moved",`${G.to}${G.restarted?" — and started again.":""}`),N(""),c()}catch(G){d.error("Could not move the app",Ao(G,"It is still where it was."))}finally{H(!1)}}};return a.jsxs("div",{className:"space-y-7",children:[a.jsxs("section",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(_l,{className:"mt-0.5 size-4 shrink-0 text-muted","aria-hidden":"true"}),a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Domain"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Point a domain at this app. nginx proxies it to the app’s port, and a deployment that changes the port takes the domain with it."})]})]}),s.domain?a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-line bg-inset/40 px-3.5 py-2.5",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"truncate font-mono text-sm text-ink",children:s.domain}),a.jsxs("div",{className:"text-2xs text-faint",children:[_?`Proxies to port ${_}.`:"Proxies to the app’s port."," Edit it on the Domains page."]})]}),a.jsx(te,{size:"sm",icon:a.jsx(A2,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void X(),children:"Remove link"})]}):null,a.jsxs("div",{className:"space-y-2.5",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:s.domain?"Link a different domain":"Domain name",value:m,onChange:G=>p(G.target.value),placeholder:"app.example.com",list:"deploy-domain-options","aria-describedby":"deploy-domain-hint",className:"min-w-56 flex-1 font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(te,{variant:"primary",onClick:()=>void R(),loading:b,disabled:!S,children:"Link domain"})]}),a.jsx("p",{id:"deploy-domain-hint",className:"mt-1.5 text-xs text-faint",children:S?k?"This domain exists. It will be re-pointed at this app.":"This domain will be created.":"Type a new name, or pick one of your domains."})]}),a.jsx("datalist",{id:"deploy-domain-options",children:o.domains.map(G=>a.jsx("option",{value:G.name},G.name))}),S&&!k?.ssl&&a.jsx(Al,{label:"Request an SSL certificate",hint:"Over HTTP-01, so the domain’s DNS must already point at this server. If it cannot be issued the domain still works over HTTP, and you can issue it later from the SSL page.",checked:h,onChange:x}),!_&&!s.currentRelease&&a.jsxs(we,{tone:"info",children:["The app needs a port first: set one in Edit, or put ",a.jsx("code",{className:"font-mono",children:"port"})," ","in ez.json and deploy once."]})]})]}),a.jsxs("section",{className:"space-y-3 border-t border-line pt-6",children:[a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(g2,{className:"mt-0.5 size-4 shrink-0 text-muted","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Folder"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Where this app’s releases, logs and deploy key live. It stays here even if the deployments folder in Settings changes."}),a.jsx("p",{className:"mt-1.5 break-all font-mono text-2xs text-ink",children:s.dir??"—"})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:"Move to",value:y,onChange:G=>N(G.target.value),placeholder:o.deployDir??"/srv/ez_deploys","aria-describedby":"deploy-move-hint",className:"min-w-56 flex-1 font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(te,{onClick:()=>void z(),loading:E,disabled:!y.trim()||!!s.deploying,children:"Move app"})]}),a.jsx("p",{id:"deploy-move-hint",className:"mt-1.5 text-xs text-faint",children:y.trim()?`The app will be in ${y.trim().replace(/[\\/]+$/,"")}/${s.id}`:"A folder on this server. The app goes into a subfolder named after it."})]}),a.jsx("p",{className:"text-2xs text-faint",children:"The app is stopped, its folder is moved, and it is started again from the new place. To another disk this copies every release, and can take a while."})]}),a.jsxs("section",{className:"flex flex-wrap items-center justify-between gap-3 border-t border-line pt-6",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-semibold text-ink",children:"Delete this app"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Stops it and removes its folder. You are asked what to do with its domain."})]}),a.jsx(te,{variant:"danger",icon:a.jsx(Us,{className:"size-4","aria-hidden":"true"}),onClick:u,disabled:!!s.deploying,children:"Delete app"})]})]})}function n5(s,o){const c=URL.createObjectURL(new Blob([o],{type:"application/json"})),u=document.createElement("a");u.href=c,u.download=s,document.body.appendChild(u),u.click(),u.remove(),URL.revokeObjectURL(c)}function a5({app:s,locations:o}){const c=PS(s.settings);return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"space-y-2 text-xs text-muted",children:[a.jsxs("p",{children:[a.jsx("code",{className:"font-mono text-ink",children:"ez.json"})," is an optional file in your repository that says how the project is installed, built and started. Keeping it with the code means the commands are reviewed and versioned like everything else, and a new server needs no setup."]}),a.jsxs("p",{children:[a.jsx("strong",{className:"font-medium text-ink",children:"You do not need one for a Node project"})," — without it, the scripts in ",a.jsx("code",{className:"font-mono",children:"package.json"})," are used. You do need one for any other language."]})]}),a.jsxs("ol",{className:"space-y-5",children:[a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"1. Create the file"}),a.jsxs("p",{className:"text-xs text-muted",children:["This is what ",a.jsx("span",{className:"font-mono",children:s.id})," deploys with today. Change the commands to match your project."]}),a.jsx("pre",{className:"overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-ink",children:c}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(jt,{value:c,label:"Copy ez.json",withText:!0}),a.jsx(te,{size:"sm",icon:a.jsx(qd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>n5("ez.json",c),children:"Download ez.json"})]})]}),a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"2. Put it in the repository"}),a.jsxs("p",{className:"text-xs text-muted",children:["At the top of the repository, next to ",a.jsx("code",{className:"font-mono",children:"package.json"}),". It is looked for in this order:"," ",o.map((u,d)=>a.jsxs("span",{children:[a.jsx("code",{className:"font-mono text-ink",children:u}),d<o.length-1?", ":"."]},u))]})]}),a.jsxs("li",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"3. Commit, push, deploy"}),a.jsxs("p",{className:"text-xs text-muted",children:["The next deployment reads it. Its log shows where each value came from —"," ",a.jsx("code",{className:"font-mono",children:"[ez.json]"}),", ",a.jsx("code",{className:"font-mono",children:"[package.json]"})," ","or ",a.jsx("code",{className:"font-mono",children:"[override]"})," — so you can see that it was picked up."]})]})]}),a.jsxs("div",{children:[a.jsx("h4",{className:"mb-2 text-sm font-medium text-ink",children:"What each field means"}),a.jsx("div",{className:"overflow-x-auto rounded-md border border-line",children:a.jsxs("table",{className:"w-full text-left text-2xs",children:[a.jsx("thead",{className:"border-b border-line bg-inset/50 text-faint",children:a.jsxs("tr",{children:[a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"Field"}),a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"Meaning"}),a.jsx("th",{className:"px-3 py-2 font-semibold uppercase tracking-wider",children:"If you leave it out"})]})}),a.jsx("tbody",{className:"divide-y divide-line",children:IS.map(u=>a.jsxs("tr",{children:[a.jsx("td",{className:"whitespace-nowrap px-3 py-2 align-top font-mono text-ink",children:u.name}),a.jsx("td",{className:"px-3 py-2 align-top text-muted",children:u.meaning}),a.jsx("td",{className:"px-3 py-2 align-top text-muted",children:u.without})]},u.name))})]})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"Not a Node project?"}),a.jsx("p",{className:"text-xs text-muted",children:"The commands are run exactly as written, so any language works. A Python app:"}),a.jsx("pre",{className:"overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-ink",children:FS})]}),a.jsxs(we,{tone:"info",title:"Which one wins",children:["A value set on the app (Edit) overrides ",a.jsx("code",{className:"font-mono",children:"ez.json"}),", which overrides ",a.jsx("code",{className:"font-mono",children:"package.json"}),". To let the file decide, leave that field empty in Edit. A mistake in the file stops the deployment before anything that is running is touched."]})]})}function Qd(s,o){return s instanceof Be||s instanceof Error?s.message:o}function l5({appId:s,run:o}){const c=yt(x=>oe.deployments.run(s,o.id,x),[s,o.id]),u=(c.data?.status??o.status)==="running";Rs(c.reload,1500,u);const d=g.useRef(null),m=g.useRef(!0),p=c.data?.log??"";g.useEffect(()=>{const x=d.current;x&&m.current&&(x.scrollTop=x.scrollHeight)},[p]);const h=c.data??o;return a.jsxs("div",{className:"space-y-2.5",children:[h.error&&a.jsx(we,{tone:h.status==="rolled_back"?"warning":"danger",title:h.status==="rolled_back"?"The new release was not healthy — the previous one is running again":`Failed while: ${gf(h.step).toLowerCase()}`,children:h.error}),h.warnings?.map(x=>a.jsx(we,{tone:"warning",children:x},x)),c.error&&!c.data?a.jsx(Et,{error:c.error,onRetry:c.reload,title:"Could not load the log"}):a.jsxs("pre",{ref:d,onScroll:x=>{const b=x.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<24},className:"h-[42vh] overflow-auto whitespace-pre-wrap break-all rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted","aria-label":"Deployment log","aria-busy":u,children:[c.data?.logTruncated&&`… earlier output is not shown …
|
|
450
|
-
`,p||(c.loading?"Loading…":"No output yet.")]})]})}function s5({app:s,initialRunId:o}){const[c,u]=g.useState(o);if(g.useEffect(()=>{s.activeRunId&&u(s.activeRunId)},[s.activeRunId]),s.runs.length===0)return a.jsx(On,{icon:a.jsx(w2,{className:"size-5","aria-hidden":"true"}),title:"No deployments yet",description:"Press Deploy to build and start this app for the first time."});const d=s.runs.find(m=>m.id===c)??s.runs[0];return a.jsxs("div",{className:"grid gap-4 lg:grid-cols-[17rem_minmax(0,1fr)]",children:[a.jsx("ul",{className:"max-h-[52vh] space-y-1 overflow-y-auto pr-1","aria-label":"Deployments",children:s.runs.map(m=>{const p=Yy[m.status],h=m.id===d.id;return a.jsx("li",{children:a.jsxs("button",{type:"button",onClick:()=>u(m.id),"aria-current":h?"true":void 0,className:re("w-full rounded-md border px-3 py-2 text-left transition-colors duration-[var(--ez-motion-fast)]",h?"border-accent/40 bg-accent-soft":"border-transparent hover:bg-inset"),children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx(ve,{tone:p.tone,dot:!0,children:m.status==="running"?gf(m.step):p.label}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:Xo(m.sha)})]}),a.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2 text-2xs text-muted",children:[a.jsx("span",{children:QS[m.trigger]??m.trigger}),a.jsxs("span",{title:df(m.startedAt),children:[Ji(m.startedAt)," · ",KS(m)]})]})]})},m.id)})}),a.jsx(l5,{appId:s.id,run:d},d.id)]})}function i5({app:s,onRollback:o,busy:c}){return s.releases.length===0?a.jsx(On,{title:"No releases on disk",description:"Each successful deployment leaves a release here to roll back to."}):a.jsxs("div",{className:"space-y-3",children:[a.jsxs("p",{className:"text-xs text-muted",children:["A rollback starts an earlier release exactly as it was built — nothing is fetched or rebuilt. The newest ",s.keepReleases," are kept."]}),a.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:s.releases.map(u=>a.jsxs("li",{className:"flex flex-wrap items-center gap-3 px-3.5 py-2.5",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"font-mono text-xs text-ink",children:u.id}),u.current&&a.jsx(ve,{tone:"ok",children:"Live"}),u.previous&&a.jsx(ve,{tone:"neutral",children:"Previous"})]}),a.jsxs("div",{className:"mt-0.5 font-mono text-2xs text-faint",children:[Xo(u.sha),u.ref?` · ${u.ref}`:""]})]}),!u.current&&a.jsx(te,{size:"sm",icon:a.jsx(nN,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>o(u),disabled:c||!u.startable,title:u.startable?void 0:"This release never got as far as starting.",children:"Roll back to this"})]},u.id))})]})}function Ui({n:s,title:o,children:c}){return a.jsxs("li",{className:"flex gap-3",children:[a.jsx("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-pill bg-inset font-mono text-2xs font-semibold text-muted","aria-hidden":"true",children:s}),a.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:o}),c]})]})}function zg({name:s,value:o,note:c}){return a.jsxs("div",{className:"rounded-md border border-line bg-inset/50 p-2.5",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("code",{className:"font-mono text-xs font-semibold text-ink",children:s}),a.jsx(jt,{value:s,label:`Copy the name ${s}`})]}),o?a.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs text-muted",children:o}),a.jsx(jt,{value:o,label:`Copy the value of ${s}`,withText:!0})]}):c&&a.jsx("p",{className:"mt-1.5 text-2xs text-faint",children:c})]})}function r5({app:s,hook:o,onConfigureHook:c,onChanged:u}){const d=Nt(),m=bn(),p=yt(A=>oe.deployments.github(s.id,A),[s.id,o.enabled,o.domain,o.bind,o.port,s.branch]),[h,x]=g.useState(null),[b,j]=g.useState(!1),[y,N]=g.useState(null),[E,H]=g.useState(""),[S,k]=g.useState(!1),[_,R]=g.useState(null),X=async()=>{if(!b&&!(s.hook.hasToken&&!await m({title:"Replace the deploy token?",body:"The current token stops working immediately. The repository’s EZ_DEPLOY_TOKEN secret has to be updated before the next push can deploy.",confirmLabel:"Replace token",tone:"danger"}))){j(!0);try{const A=await oe.deployments.issueHookToken(s.id);x(A.token),u()}catch(A){d.error("Could not create the token",Qd(A,"Try again."))}finally{j(!1)}}};if(p.error&&!p.data)return a.jsx(Et,{error:p.error,onRetry:p.reload});if(!p.data)return a.jsx(Fe,{className:"h-64 rounded-lg"});const z=p.data,G=s.hook.hasToken||h!==null,ne=z.targets??[{id:"hook",label:"This server’s deploy hook",url:z.hookUrl,secure:z.hookSecure,note:z.hookNote}],U=A=>!!A.url&&(A.id!=="hub"||A.ready!==!1),J=ne.find(A=>A.id===y)??ne.find(U)??ne[0],ce=U(J),P=/github\.com[:/]/.test(s.repoUrl),ae=s.authType==="deployKey"?1:0,M=async()=>{if(!S&&!(s.hook.hasToken&&!await m({title:"Set up GitHub automatically?",body:"A new deploy token is created and stored straight into the repository’s secrets; the current one stops working. The workflow file is committed to the branch, which starts a deployment.",confirmLabel:"Set up",tone:"accent"}))){k(!0),R(null);try{const A=await oe.deployments.applyGithub(s.id,{target:J.id,...E.trim()?{token:E.trim()}:{}});R(A),H(""),x(null),u(),A.ok?d.success("GitHub is set up",`${A.repo} deploys on every push to ${s.branch}.`):d.warning("Partly set up","Some steps need a token with more access. They are listed below.")}catch(A){const le=A instanceof Be?A.payload:null;le&&Array.isArray(le.steps)&&R(le),d.error("Could not set up GitHub",Qd(A,"Nothing was changed on GitHub."))}finally{k(!1)}}};return a.jsxs("div",{className:"space-y-5",children:[a.jsxs("div",{className:"rounded-md border border-line bg-inset/40 p-3.5",children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"How it works"}),a.jsxs("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-xs text-muted",children:[a.jsxs("li",{children:["You push to ",a.jsx("code",{className:"font-mono text-ink",children:s.branch}),"."]}),a.jsx("li",{children:"GitHub runs the workflow file in your repository. It makes one request: “deploy this commit”, with the app’s deploy token."}),a.jsx("li",{children:"This server fetches that commit, builds it and starts it — the same steps as the Deploy button, with the log in the Deployments tab."}),a.jsx("li",{children:"The workflow waits for the result. A green check means the new version is live; a red one means it failed, and the previous version is still running."})]}),a.jsx("p",{className:"mt-2 text-xs text-muted",children:"GitHub never gets access to the server: it holds a URL and a token that can start a deployment of this one app, and nothing else."})]}),ne.length>1&&a.jsx(il,{label:"How GitHub reaches this server",value:J.id,onChange:A=>N(A.target.value),hint:J.note,children:ne.map(A=>a.jsxs("option",{value:A.id,children:[A.label,U(A)?"":" — not available yet"]},A.id))}),ce?!J.secure&&a.jsx(we,{tone:"warning",title:"The deploy token would be sent unencrypted",action:J.id==="hook"?a.jsx(te,{size:"sm",onClick:c,children:"Change"}):void 0,children:J.note}):a.jsx(we,{tone:"warning",title:J.id==="hub"?"Not available through the Hub yet":"GitHub cannot reach this server yet",action:J.id==="hook"?a.jsx(te,{size:"sm",onClick:c,children:"Set up the deploy hook"}):void 0,children:J.note}),P&&a.jsx("div",{className:"rounded-md border border-line bg-inset/40 p-3.5",children:a.jsxs("div",{className:"flex items-start gap-2.5",children:[a.jsx(DN,{className:"mt-0.5 size-4 shrink-0 text-accent-text","aria-hidden":"true"}),a.jsxs("div",{className:"min-w-0 flex-1 space-y-2.5",children:[a.jsxs("div",{children:[a.jsx("h4",{className:"text-sm font-medium text-ink",children:"Do it for me"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["Stores both secrets, commits the workflow file",s.authType==="deployKey"?" and adds the deploy key":"",". Needs a GitHub token that may write this repository’s ",a.jsx("em",{children:"secrets"}),", ",a.jsx("em",{children:"contents"})," and"," ",a.jsx("em",{children:"workflows"}),s.authType==="deployKey"?", and administer it (for the deploy key)":"",". A token typed here is used once and not stored."]})]}),a.jsxs("div",{className:"flex flex-wrap items-end gap-2",children:[a.jsx(Ee,{label:"GitHub token",optional:s.authType==="token"&&s.hasToken,type:"password",value:E,onChange:A=>H(A.target.value),placeholder:s.authType==="token"&&s.hasToken?"leave empty to try the app’s token":"github_pat_…",autoComplete:"off",spellCheck:!1,className:"min-w-56 flex-1"}),a.jsx(te,{variant:"primary",onClick:()=>void M(),loading:S,disabled:!ce||!E.trim()&&!(s.authType==="token"&&s.hasToken),children:"Set up on GitHub"})]}),_&&a.jsxs("ul",{className:"space-y-1.5","aria-label":"Setup result",children:[_.error&&a.jsxs("li",{className:"flex items-start gap-2 text-xs text-bad",children:[a.jsx(Bd,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{children:_.error})]}),_.steps.map(A=>a.jsxs("li",{className:re("flex items-start gap-2 text-xs",A.ok?"text-muted":"text-bad"),children:[A.ok?a.jsx(Dl,{className:"mt-0.5 size-3.5 shrink-0 text-ok","aria-hidden":"true"}):a.jsx(Bd,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":"true"}),a.jsx("span",{children:A.detail})]},A.id))]})]})]})}),a.jsx("h4",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-faint",children:P?"Or by hand":"Steps"}),a.jsxs("ol",{className:"space-y-5",children:[z.deployKey!==null&&a.jsxs(Ui,{n:1,title:"Let this server read the repository",children:[a.jsx("p",{className:"text-xs text-muted",children:"In the repository: Settings → Deploy keys → Add deploy key. Paste this, and leave “Allow write access” off."}),a.jsxs("div",{className:"flex items-start justify-between gap-2 rounded-md border border-line bg-inset/50 p-2.5",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs text-muted",children:z.deployKey}),a.jsx(jt,{value:z.deployKey,label:"Copy the deploy key",withText:!0})]})]}),s.authType==="deployKey"&&z.deployKey===null&&a.jsx(Ui,{n:1,title:"Let this server read the repository",children:a.jsx(we,{tone:"warning",children:"This app uses a deploy key but none has been generated. Open Edit and press “Generate key”."})}),a.jsxs(Ui,{n:ae+1,title:"Create the deploy token",children:[a.jsx("p",{className:"text-xs text-muted",children:"It can start a deployment of this app and nothing else. Only a hash of it is stored here, so it is shown once."}),h?a.jsx(we,{tone:"success",title:"Copy it now — it will not be shown again",children:a.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[a.jsx("code",{className:"min-w-0 break-all font-mono text-2xs",children:h}),a.jsx(jt,{value:h,label:"Copy the deploy token",withText:!0})]})}):a.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx(te,{size:"sm",icon:a.jsx(Xi,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void X(),loading:b,children:s.hook.hasToken?"Replace the token":"Create token"}),s.hook.hasToken&&a.jsxs("span",{className:"text-2xs text-faint",children:["One exists, ending in"," ",a.jsx("code",{className:"font-mono",children:s.hook.tokenHint}),s.hook.createdAt?`, created ${df(s.hook.createdAt)}`:"","."]})]})]}),a.jsxs(Ui,{n:ae+2,title:"Add two repository secrets",children:[a.jsx("p",{className:"text-xs text-muted",children:"In the repository: Settings → Secrets and variables → Actions → New repository secret."}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(zg,{name:"EZ_DEPLOY_URL",value:ce?J.url:null,note:"Available once GitHub can reach this server (see above)."}),a.jsx(zg,{name:"EZ_DEPLOY_TOKEN",value:h,note:G?"The token from the step above. If you no longer have it, replace it.":"Create the token in the step above first."})]})]}),a.jsxs(Ui,{n:ae+3,title:"Add the workflow file",children:[a.jsxs("p",{className:"text-xs text-muted",children:["Commit this to the repository as"," ",a.jsx("code",{className:"break-all font-mono text-ink",children:z.workflowPath}),". It contains no secrets, and it is the same file whichever way GitHub reaches the server."]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsx(jt,{value:z.workflowPath,label:"Copy the file path",withText:!0}),a.jsx(jt,{value:z.workflow,label:"Copy the workflow",withText:!0})]}),a.jsx("pre",{className:"max-h-64 overflow-auto rounded-md border border-line bg-canvas p-3.5 font-mono text-2xs leading-relaxed text-muted",children:z.workflow})]})]}),a.jsxs(we,{tone:"info",title:"Optional: ez.json",children:["To keep the install, build and start commands with the code, add an"," ",a.jsx("code",{className:"font-mono",children:"ez.json"})," to the repository. Without one, a Node project is deployed from its ",a.jsx("code",{className:"font-mono",children:"package.json"})," scripts."]})]})}function o5({appId:s,hook:o,meta:c,initialTab:u="activity",onClose:d,onConfigureHook:m,onChanged:p,onDelete:h}){const x=Nt(),b=bn(),j=s!==null,[y,N]=g.useState(u),[E,H]=g.useState(!1),S=yt(R=>oe.deployments.get(s??"",R),[s],{enabled:j}),k=S.data&&S.data.id===s?S.data:null;g.useEffect(()=>{j&&N(u)},[j,s,u]),Rs(S.reload,2e3,j&&!!k?.deploying);const _=async R=>{if(!(!k||E||!await b({title:`Roll back ${k.id}?`,body:`Release ${R.id} (${Xo(R.sha)}) will be started in place of the live one. The app restarts.`,confirmLabel:"Roll back",tone:"danger"}))){H(!0);try{await oe.deployments.rollback(k.id,R.id),x.info("Rollback started"),N("activity"),S.reload(),p()}catch(z){x.error("Could not roll back",Qd(z,"Nothing was changed."))}finally{H(!1)}}};return a.jsx(yn,{open:j,onClose:d,size:"xl",title:a.jsxs("span",{className:"flex flex-wrap items-center gap-2.5",children:[a.jsx("span",{className:"font-mono",children:s}),k?.deploying&&a.jsx(ve,{tone:"info",dot:!0,children:"Deploying"})]}),description:k?`${k.repoUrl} · ${k.branch}`:void 0,children:S.error&&!k?a.jsx(Et,{error:S.error,onRetry:S.reload}):k?a.jsxs("div",{className:"space-y-4",children:[a.jsx(WS,{ariaLabel:"App sections",value:y,onChange:N,items:[{id:"activity",label:"Deployments",count:k.runs.length},{id:"releases",label:"Releases",count:k.releases.length},{id:"setup",label:"Domain & folder"},{id:"github",label:"GitHub Actions"},{id:"ezjson",label:"ez.json"}]}),a.jsx(Li,{id:"activity",value:y,children:a.jsx(s5,{app:k,initialRunId:k.activeRunId??null})}),a.jsx(Li,{id:"releases",value:y,children:a.jsx(i5,{app:k,onRollback:R=>void _(R),busy:E||!!k.deploying})}),a.jsx(Li,{id:"setup",value:y,children:a.jsx(t5,{app:k,meta:c,onChanged:()=>{S.reload(),p()},onDelete:()=>h(k)})}),a.jsx(Li,{id:"ezjson",value:y,children:a.jsx(a5,{app:k,locations:c.ezFileLocations})}),a.jsx(Li,{id:"github",value:y,children:a.jsx(r5,{app:k,hook:o,onConfigureHook:m,onChanged:()=>{S.reload(),p()}})}),!o.enabled&&y!=="github"&&k.hook.hasToken&&a.jsx(we,{tone:"warning",title:"The deploy hook is switched off",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[a.jsx(Ra,{className:"size-3.5","aria-hidden":"true"}),"This app has a deploy token, but nothing is listening for it."]})})]}):a.jsxs("div",{className:"flex items-center gap-2.5 py-10 text-sm text-muted",children:[a.jsx(Ds,{})," Loading…"]})})}function Rg(s){return{id:"",repoUrl:"",branch:"main",authType:"none",token:"",settings:Gy({}),envText:"",keepReleases:String(s),autoRollback:!0,notifyChannelIds:[]}}function c5(s){return{id:s.id,repoUrl:s.repoUrl,branch:s.branch,authType:s.authType,token:"",settings:Gy(s.settings),envText:VS(s.env),keepReleases:String(s.keepReleases),autoRollback:s.autoRollback,notifyChannelIds:s.notifyChannelIds}}function Ag(s,o){return s instanceof Be||s instanceof Error?s.message:o}function u5({open:s,app:o,meta:c,onClose:u,onSaved:d}){const m=Nt(),p=o!==null,[h,x]=g.useState(()=>Rg(c.limits.keepReleasesDefault)),[b,j]=g.useState(!1),[y,N]=g.useState(!1),[E,H]=g.useState(null),[S,k]=g.useState(!1);g.useEffect(()=>{s&&(x(o?c5(o):Rg(c.limits.keepReleasesDefault)),H(o?.deployKey??null),j(!1))},[s,o?.id]);const _=M=>x(A=>({...A,...M})),R=M=>x(A=>({...A,settings:{...A.settings,...M}})),X=h.repoUrl.trim(),z=YS(X),G=$S(h.envText),ne=Number(h.keepReleases),U={id:p?null:GS(h.id.trim()),repoUrl:X?h.authType==="token"&&z?"Token access needs an https:// URL.":h.authType==="deployKey"&&!z?"A deploy key needs an SSH URL, like git@github.com:owner/repo.git.":null:"A repository URL is required.",token:h.authType==="token"&&!h.token.trim()&&!(p&&o?.hasToken)?"A token is required.":null,port:h.settings.port.trim()?Vo(h.settings.port):null,healthPath:h.settings.healthPath.trim()&&!h.settings.healthPath.trim().startsWith("/")?'Must start with "/".':null,env:G.error,keepReleases:!Number.isInteger(ne)||ne<c.limits.keepReleasesMin||ne>c.limits.keepReleasesMax?`A whole number from ${c.limits.keepReleasesMin} to ${c.limits.keepReleasesMax}.`:null},J=Object.values(U).some(Boolean),ce=async()=>{if(y||(j(!0),J))return;const M={repoUrl:X,branch:h.branch.trim()||"main",authType:h.authType,settings:XS(h.settings),env:G.env,keepReleases:ne,autoRollback:h.autoRollback,notifyChannelIds:h.notifyChannelIds};h.token.trim()&&(M.token=h.token.trim()),N(!0);try{const A=p?await oe.deployments.update(o.id,M):await oe.deployments.create({...M,id:h.id.trim()});d(A,!p)}catch(A){m.error(p?"Could not save the app":"Could not create the app",Ag(A,"Nothing was changed."))}finally{N(!1)}},P=async()=>{if(!(!o||S)){k(!0);try{const M=await oe.deployments.generateDeployKey(o.id);H(M.publicKey),m.success("Deploy key generated","Add the public key to the repository, read-only.")}catch(M){m.error("Could not generate the key",Ag(M,"Try again."))}finally{k(!1)}}},ae=M=>b?U[M]:null;return a.jsx(yn,{open:s,onClose:u,preventClose:y,size:"lg",title:p?`Edit ${o.id}`:"New app",description:p?"Changes apply to the next deployment. The running release is not touched.":"Where the code lives and how this server may read it. Everything else can be left to the project.",footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",onClick:u,disabled:y,children:"Cancel"}),a.jsx(te,{variant:"primary",type:"submit",form:"deploy-app-form",loading:y,children:p?"Save app":"Create app"})]}),children:a.jsxs("form",{id:"deploy-app-form",className:"space-y-6",onSubmit:M=>{M.preventDefault(),ce()},noValidate:!0,children:[a.jsxs("section",{className:"space-y-4",children:[a.jsxs(Sa,{children:[a.jsx(Ee,{label:"Name",value:h.id,onChange:M=>_({id:M.target.value.toLowerCase()}),disabled:p,error:ae("id"),hint:p?"The name cannot be changed.":"Used for its folder and its PM2 process (ez-<name>).",placeholder:"my-api",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsx(Ee,{label:"Branch",value:h.branch,onChange:M=>_({branch:M.target.value}),hint:"Deployed when no specific commit is named.",placeholder:"main",className:"font-mono",spellCheck:!1})]}),a.jsx(Ee,{label:"Repository URL",value:h.repoUrl,onChange:M=>_({repoUrl:M.target.value}),error:ae("repoUrl"),hint:"https://github.com/owner/repo.git, or git@github.com:owner/repo.git for a deploy key.",placeholder:"https://github.com/owner/repo.git",className:"font-mono",spellCheck:!1,autoComplete:"off"}),a.jsxs(il,{label:"Repository access",value:h.authType,onChange:M=>_({authType:M.target.value}),hint:h.authType==="none"?"For a public repository.":h.authType==="deployKey"?"An SSH key generated here; you add its public half to the repository. Nothing secret leaves this server.":"A personal access token stored on this server and sent only to the repository host.",children:[a.jsx("option",{value:"none",children:"Public — no credentials"}),a.jsx("option",{value:"deployKey",children:"Private — deploy key (SSH)"}),a.jsx("option",{value:"token",children:"Private — access token (HTTPS)"})]}),h.authType==="token"&&a.jsx(Ee,{label:"Access token",type:"password",value:h.token,onChange:M=>_({token:M.target.value}),error:ae("token"),hint:p&&o.hasToken?"A token is stored. Leave this empty to keep it.":"Read-only access to this one repository is enough.",placeholder:p&&o.hasToken?"••••••••":"github_pat_…",autoComplete:"off",spellCheck:!1}),h.authType==="deployKey"&&(p?a.jsxs("div",{className:"rounded-md border border-line bg-inset/50 p-3.5",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[a.jsx("div",{className:"text-xs font-medium text-ink",children:"Deploy key"}),a.jsx(te,{size:"sm",icon:a.jsx(Xi,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void P(),loading:S,children:E?"Generate a new key":"Generate key"})]}),E?a.jsxs(a.Fragment,{children:[a.jsx("pre",{className:"mt-2.5 max-h-24 overflow-auto whitespace-pre-wrap break-all rounded border border-line bg-canvas p-2.5 font-mono text-2xs text-muted",children:E}),a.jsxs("div",{className:"mt-2 flex flex-wrap items-center justify-between gap-2",children:[a.jsx("p",{className:"text-2xs text-faint",children:"Add it under the repository’s Settings → Deploy keys. Leave “Allow write access” off."}),a.jsx(jt,{value:E,label:"Copy public key",withText:!0})]})]}):a.jsx("p",{className:"mt-2 text-2xs text-faint",children:"No key yet. The private half stays on this server and is never shown."})]}):a.jsx(we,{tone:"info",children:"Create the app first; the key is generated from its settings afterwards."}))]}),a.jsxs("section",{className:"space-y-4 border-t border-line pt-5",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-ink",children:"How it runs"}),a.jsxs("p",{className:"mt-0.5 text-xs text-muted",children:["All optional. An empty field is read from the repository’s"," ",a.jsx("code",{className:"font-mono",children:"ez.json"}),", and failing that from"," ",a.jsx("code",{className:"font-mono",children:"package.json"}),"."]})]}),a.jsxs(Sa,{children:[a.jsx(Ee,{label:"Port",optional:!0,type:"number",min:1,max:65535,inputMode:"numeric",value:h.settings.port,onChange:M=>R({port:M.target.value}),error:ae("port"),hint:"The port the app listens on. Passed to it as PORT, and used for the health check.",placeholder:"3000"}),a.jsx(Ee,{label:"Health check path",optional:!0,value:h.settings.healthPath,onChange:M=>R({healthPath:M.target.value}),error:ae("healthPath"),hint:"Must answer before a deployment counts. Defaults to /.",placeholder:"/healthz",className:"font-mono",spellCheck:!1})]}),a.jsx(Ee,{label:"Start command",optional:!0,value:h.settings.start,onChange:M=>R({start:M.target.value}),hint:"The long-running process. Any language: node server.js, python app.py, ./server.",placeholder:"from ez.json, or npm start",className:"font-mono",spellCheck:!1}),a.jsxs(Sa,{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ee,{label:"Install command",optional:!0,value:h.settings.install,onChange:M=>R({install:M.target.value}),disabled:h.settings.skipInstall,placeholder:"from ez.json, or npm ci",className:"font-mono",spellCheck:!1}),a.jsx(Al,{label:"Skip the install step",checked:h.settings.skipInstall,onChange:M=>R({skipInstall:M})})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Ee,{label:"Build command",optional:!0,value:h.settings.build,onChange:M=>R({build:M.target.value}),disabled:h.settings.skipBuild,placeholder:"from ez.json, or npm run build",className:"font-mono",spellCheck:!1}),a.jsx(Al,{label:"Skip the build step",checked:h.settings.skipBuild,onChange:M=>R({skipBuild:M})})]})]})]}),a.jsx("section",{className:"space-y-4 border-t border-line pt-5",children:a.jsx(Uo,{label:"Environment variables",optional:!0,rows:5,value:h.envText,onChange:M=>_({envText:M.target.value}),error:ae("env"),hint:"One NAME=value per line; a pasted .env file works. Stored on this server only, and available to the build and the running app.",placeholder:`DATABASE_URL=postgres://…
|
|
451
|
-
NODE_ENV=production`,className:"font-mono",spellCheck:!1})}),a.jsxs("section",{className:"space-y-4 border-t border-line pt-5",children:[a.jsx(qt,{checked:h.autoRollback,onChange:M=>_({autoRollback:M}),label:"Roll back automatically",description:"If a new release starts but fails its health check, the previous release is started again."}),a.jsx(Sa,{children:a.jsx(Ee,{label:"Releases to keep",type:"number",min:c.limits.keepReleasesMin,max:c.limits.keepReleasesMax,inputMode:"numeric",value:h.keepReleases,onChange:M=>_({keepReleases:M.target.value}),error:ae("keepReleases"),hint:"Older ones are deleted. The live release and the one before it are always kept."})}),c.channels.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"mb-1.5 text-xs font-medium text-ink",children:"Notify on every deployment"}),a.jsx("div",{className:"space-y-1.5",children:c.channels.map(M=>a.jsx(Al,{label:`${M.name} (${M.type})`,checked:h.notifyChannelIds.includes(M.id),onChange:A=>_({notifyChannelIds:A?[...h.notifyChannelIds,M.id]:h.notifyChannelIds.filter(le=>le!==M.id)})},M.id))})]})]})]})})}function Dg(s){return s.domain?"domain":s.bind==="0.0.0.0"?"direct":"local"}function d5({open:s,hook:o,domains:c,onClose:u,onSaved:d}){const m=Nt(),[p,h]=g.useState(o.enabled),[x,b]=g.useState(Dg(o)),[j,y]=g.useState(o.domain??""),[N,E]=g.useState(String(o.port)),[H,S]=g.useState(!1),[k,_]=g.useState(!1);g.useEffect(()=>{s&&(h(o.enabled),b(Dg(o)),y(o.domain??""),E(String(o.port)),_(!1))},[s]);const R=c.filter(U=>U.enabled),X=R.find(U=>U.name===j),z=Vo(N),G=p&&x==="domain"&&!X?"Choose a domain.":null,ne=async()=>{if(!H&&(_(!0),!(z||G))){S(!0);try{const U=await oe.deployments.updateHook({enabled:p,port:Number(N),bind:x==="direct"?"0.0.0.0":"127.0.0.1",domain:x==="domain"?j:null});U.nginxReloaded===!1?m.warning("Saved, but nginx was not reloaded","The domain’s config was written. Reload nginx for the deploy hook to be reachable."):m.success("Deploy hook saved",p?`The background service picks it up within ${U.appliesWithinSeconds??10} seconds.`:"Nothing is listening for deployments now."),d(U)}catch(U){const J=U instanceof Be&&typeof U.payload.detail=="string"?U.payload.detail:null;m.error("Could not save the deploy hook",J??(U instanceof Error?U.message:"Nothing was changed."))}finally{S(!1)}}};return a.jsx(yn,{open:s,onClose:u,preventClose:H,size:"md",title:"Deploy hook",description:"Lets a GitHub Action tell this server to deploy. Each app has its own token; the hook can do nothing else.",footer:a.jsxs(a.Fragment,{children:[a.jsx(te,{variant:"secondary",onClick:u,disabled:H,children:"Cancel"}),a.jsx(te,{variant:"primary",onClick:()=>void ne(),loading:H,children:"Save"})]}),children:a.jsxs("div",{className:"space-y-5",children:[a.jsx(qt,{checked:p,onChange:h,label:"Accept deployments from CI",description:"Off by default. While it is off nothing listens, and apps can only be deployed from this dashboard."}),p&&a.jsxs(a.Fragment,{children:[a.jsxs(il,{label:"How CI reaches it",value:x,onChange:U=>b(U.target.value),children:[a.jsx("option",{value:"domain",children:"Through one of my domains (recommended)"}),a.jsx("option",{value:"direct",children:"Directly, on its own port"}),a.jsx("option",{value:"local",children:"This machine only"})]}),x==="domain"&&a.jsxs(a.Fragment,{children:[a.jsxs(il,{label:"Domain",value:j,onChange:U=>y(U.target.value),error:k?G:null,hint:"One path, /.ez-deploy/, is added to this domain’s nginx config. Nothing else becomes reachable.",children:[a.jsx("option",{value:"",children:"Choose a domain…"}),R.map(U=>a.jsxs("option",{value:U.name,children:[U.name,U.ssl?"":" — no SSL"]},U.name))]}),R.length===0&&a.jsx(we,{tone:"warning",children:"There is no enabled domain yet. Add one on the Domains page, or reach the hook directly."}),X&&!X.ssl&&a.jsx(we,{tone:"warning",title:"This domain has no certificate",children:"The deploy token would travel over plain HTTP. Issue a certificate for it on the SSL page first."})]}),x==="direct"&&a.jsx(we,{tone:"warning",title:"Plain HTTP, on every network interface",children:"The deploy token is sent unencrypted, and the port has to be opened in your firewall. Use a domain with SSL unless this server sits on a private network."}),x==="local"&&a.jsx(we,{tone:"info",children:"Only programs on this server can call the hook — useful with your own tunnel or reverse proxy. GitHub cannot reach it."}),a.jsx(Sa,{children:a.jsx(Ee,{label:"Listener port",type:"number",min:1,max:65535,inputMode:"numeric",value:N,onChange:U=>E(U.target.value),error:k?z:null,hint:x==="direct"?"The port CI connects to.":"Internal. nginx forwards to it; it is not opened to the network."})})]})]})})}function f5(s,o){return s instanceof Be||s instanceof Error?s.message:o}function h5({data:s,onConfigure:o}){const{hook:c}=s,u=c.enabled&&(c.domain!==null||c.bind==="0.0.0.0"),m=!!(c.domain?s.domains.find(b=>b.name===c.domain):void 0)?.ssl;let p="neutral",h="Off",x="Apps are deployed from this dashboard only. Turn it on to deploy from GitHub Actions.";return c.enabled&&!c.listening?(p="warn",h="Not listening",x="It is switched on, but nothing answers on its port yet. The background service starts it within a few seconds; if it stays like this, check that the service is running."):c.enabled&&!u?(p="neutral",h="This machine only",x="Listening, but only programs on this server can call it. GitHub cannot reach it."):c.enabled&&c.domain?(p=m?"ok":"warn",h=m?"On":"On — no SSL",x=m?`Reached through https://${c.domain}${c.path}`:`Reached through http://${c.domain}${c.path} — the deploy token travels unencrypted. Issue a certificate for that domain.`):c.enabled&&(p="warn",h="On — plain HTTP",x=`Listening on every interface, port ${c.port}. The deploy token travels unencrypted; prefer a domain with SSL.`),a.jsx(Qe,{children:a.jsx(nn,{icon:a.jsx(Oo,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"flex flex-wrap items-center gap-2",children:["Deploy hook",a.jsx(ve,{tone:p,dot:!0,children:h})]}),description:x,actions:a.jsx(te,{size:"sm",icon:a.jsx(cf,{className:"size-3.5","aria-hidden":"true"}),onClick:o,children:"Configure"})})})}function m5({app:s,canDeploy:o,busy:c,onDeploy:u,onOpen:d,onEdit:m,onDelete:p}){const h=s.lastRun??null,x=s.process??null,b=h?Yy[h.status]:null;return a.jsxs("li",{className:"flex flex-col gap-3 px-4 py-3.5 transition-colors duration-[var(--ez-motion-fast)] hover:bg-raised/40 lg:flex-row lg:items-center lg:gap-4",children:[a.jsxs("button",{type:"button",onClick:()=>d("activity"),className:"flex min-w-0 flex-1 items-start gap-3 rounded text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent",children:[a.jsx(Qt,{tone:x?JS(x.status):"neutral",pulse:x?.status==="online",className:"mt-1.5"}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block truncate font-mono text-sm font-semibold text-ink",children:s.id}),a.jsxs("span",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-2xs text-muted",children:[a.jsx("span",{className:"truncate font-mono",title:s.repoUrl,children:dw(s.repoUrl,44)}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(j2,{className:"size-3","aria-hidden":"true"}),s.branch]}),s.domain&&a.jsxs("span",{className:"inline-flex items-center gap-1 text-accent-text",children:[a.jsx(_l,{className:"size-3","aria-hidden":"true"}),s.domain]})]}),a.jsx("span",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-2xs text-faint",children:x?a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[x.status,x.status==="online"&&x.uptimeMs!==null?` · up ${$o(x.uptimeMs)}`:""]}),x.memoryBytes!==null&&a.jsxs("span",{children:["· ",zy(x.memoryBytes)]}),x.restarts>0&&a.jsxs("span",{children:["· ",_n(x.restarts,"restart")]})]}):a.jsx("span",{children:s.currentRelease?"Not running":"Never deployed"})})]})]}),a.jsx("div",{className:"flex flex-wrap items-center gap-2 pl-7 lg:w-56 lg:shrink-0 lg:pl-0",children:s.deploying?a.jsx(ve,{tone:"info",dot:!0,children:h?.status==="running"?gf(h.step):"Deploying"}):b&&h?a.jsxs(a.Fragment,{children:[a.jsx(ve,{tone:b.tone,dot:!0,children:b.label}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:Xo(h.sha)}),a.jsx("span",{className:"text-2xs text-faint",children:Ji(h.finishedAt??h.startedAt)})]}):a.jsx("span",{className:"text-2xs text-faint",children:"No deployments yet"})}),a.jsxs("div",{className:"flex shrink-0 items-center justify-end gap-1.5 pl-7 lg:pl-0",children:[a.jsx(te,{variant:"primary",size:"sm",icon:a.jsx(Bi,{className:"size-3.5","aria-hidden":"true"}),onClick:u,loading:c,disabled:!o||!!s.deploying,children:"Deploy"}),a.jsx(te,{size:"sm",onClick:()=>d("setup"),children:"Domain"}),a.jsx(te,{size:"sm",onClick:()=>d("github"),children:"GitHub"}),a.jsx(at,{label:`Edit ${s.id}`,size:"sm",onClick:m,children:a.jsx(rf,{className:"size-4","aria-hidden":"true"})}),a.jsx(at,{label:`Delete ${s.id}`,size:"sm",variant:"dangerGhost",onClick:p,disabled:!!s.deploying,children:a.jsx(Us,{className:"size-4","aria-hidden":"true"})})]})]})}function x5(){Vn("Deployments");const s=Nt(),o=yt(z=>oe.deployments.list(z),[]),c=o.data,u=!!c?.apps.some(z=>z.deploying);Ol(o.reload),Rs(o.reload,u?2e3:15e3);const[d,m]=g.useState(!1),[p,h]=g.useState(null),[x,b]=g.useState(!1),[j,y]=g.useState(null),[N,E]=g.useState(null),[H,S]=g.useState(null),k=()=>{h(null),m(!0)},_=async z=>{if(!N){E(z.id);try{await oe.deployments.deploy(z.id),y({id:z.id,tab:"activity"}),o.reload()}catch(G){s.error(`Could not deploy ${z.id}`,f5(G,"Nothing was started."))}finally{E(null)}}},R=a.jsx(ra,{title:"Deployments",description:"Put a project from a git repository on this server: fetched, built and started here, with earlier releases kept to roll back to.",actions:a.jsxs(a.Fragment,{children:[a.jsx(at,{label:"Refresh",onClick:o.reload,children:a.jsx(Lt,{className:"size-4","aria-hidden":"true"})}),a.jsx(te,{variant:"primary",icon:a.jsx(Ca,{className:"size-4","aria-hidden":"true"}),onClick:k,disabled:!c,children:"New app"})]})});if(o.error&&!c)return a.jsxs(a.Fragment,{children:[R,a.jsx(Et,{error:o.error,onRetry:o.reload})]});if(!c)return a.jsxs(a.Fragment,{children:[R,a.jsxs(za,{children:[a.jsx(Fe,{className:"h-20 rounded-lg"}),a.jsx(Fe,{className:"h-56 rounded-lg"})]})]});const X=c.requirements.git&&c.requirements.pm2;return a.jsxs(a.Fragment,{children:[R,a.jsxs("div",{className:"space-y-5",children:[!c.requirements.git&&a.jsx(we,{tone:"danger",title:"git is not installed on this server",children:"Deployments fetch the code with git. Install it, and make sure it is on the PATH of the Easy DevOps service."}),!c.requirements.pm2&&a.jsxs(we,{tone:"warning",title:"PM2 is not installed",action:a.jsx(bt,{to:"/processes",className:ka("secondary","sm"),children:"Open Processes"}),children:["Deployed apps are kept running by PM2. Install it from the Processes page, or with"," ",a.jsx("code",{className:"font-mono",children:"npm install -g pm2"}),"."]}),a.jsx(h5,{data:c,onConfigure:()=>b(!0)}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(Bi,{className:"size-4","aria-hidden":"true"}),title:"Apps",description:c.apps.length===0?"Nothing is deployed from here yet.":`${_n(c.apps.length,"app")}. Each runs under PM2 as ez-<name>.`}),c.apps.length===0?a.jsx(Dn,{children:a.jsx(On,{icon:a.jsx(Bi,{className:"size-5","aria-hidden":"true"}),title:"Deploy your first app",description:a.jsxs(a.Fragment,{children:["Give it a repository. A Node project needs nothing else; for any other language, add an ",a.jsx("code",{className:"font-mono",children:"ez.json"})," with its install, build and start commands."]}),action:a.jsx(te,{variant:"primary",icon:a.jsx(Ca,{className:"size-4","aria-hidden":"true"}),onClick:k,children:"New app"})})}):a.jsx("ul",{className:"divide-y divide-line",children:c.apps.map(z=>a.jsx(m5,{app:z,canDeploy:X,busy:N===z.id,onDeploy:()=>void _(z),onOpen:G=>y({id:z.id,tab:G}),onEdit:()=>{h(z),m(!0)},onDelete:()=>S(z)},z.id))})]})]}),a.jsx(u5,{open:d,app:p,meta:c,onClose:()=>m(!1),onSaved:(z,G)=>{m(!1),o.reload(),G?(s.success(`${z.id} created`,"Press Deploy to build and start it."),z.authType==="deployKey"&&(h(z),m(!0))):s.success(`${z.id} saved`,"It applies to the next deployment.")}}),a.jsx(d5,{open:x,hook:c.hook,domains:c.domains,onClose:()=>b(!1),onSaved:()=>{b(!1),o.reload()}}),a.jsx(o5,{appId:j?.id??null,initialTab:j?.tab,hook:c.hook,meta:c,onClose:()=>y(null),onConfigureHook:()=>b(!0),onChanged:o.reload,onDelete:z=>S(z)}),a.jsx(e5,{app:H,onClose:()=>S(null),onDeleted:()=>{S(null),y(null),o.reload()}})]})}const _g=[{id:"error",label:"Error",fileName:"error.log"},{id:"access",label:"Access",fileName:"access.log"}];function p5(s){return/\[(error|crit|emerg|alert)\]/.test(s)?"text-bad":/\[(warn|warning)\]/.test(s)?"text-warn":/\s(2\d\d|3\d\d)\s/.test(s)?"text-ok":"text-muted"}function g5(){Vn("Logs");const{connectionError:s}=ia(),[o,c]=Yo(),d=o.get("file")==="access"?"access":"error",m=_g.find(E=>E.id===d),p=E=>{const H=new URLSearchParams(o);E==="error"?H.delete("file"):H.set("file",E),c(H,{replace:!0})},h=Uy(d,{limit:500}),x=g.useRef(null),[b,j]=g.useState(!0);g.useEffect(()=>{const E=x.current;E&&b&&(E.scrollTop=E.scrollHeight)},[h.lines,b]);const y=h.paused,N=h.connected&&!y;return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Logs",description:"nginx output as it is written. The stream follows the file; switching tabs does not restart nginx.",meta:a.jsx(ve,{tone:y?"warn":h.connected?"ok":"bad",dot:!0,children:y?"Paused":h.connected?"Live":"Reconnecting"}),actions:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex items-center gap-1 rounded-md border border-line bg-raised/60 p-1",role:"group","aria-label":"Log file",children:_g.map(E=>a.jsx("button",{type:"button","aria-pressed":d===E.id,onClick:()=>p(E.id),className:re("rounded-sm px-3 py-1 text-xs font-medium transition-colors duration-[var(--ez-motion-fast)]",d===E.id?"bg-surface text-ink shadow-sm":"text-muted hover:text-ink"),children:E.label},E.id))}),a.jsx(te,{variant:"secondary",size:"sm",icon:y?a.jsx(Zi,{className:"size-3.5","aria-hidden":"true"}):a.jsx(py,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>h.setPaused(!y),children:y?"Resume":"Pause"}),a.jsx(te,{variant:"ghost",size:"sm",icon:a.jsx(Us,{className:"size-3.5","aria-hidden":"true"}),onClick:h.clear,disabled:h.lines.length===0,children:"Clear"}),a.jsx(te,{variant:"ghost",size:"sm",icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:h.restart,disabled:!h.connected,children:"Reload tail"}),a.jsx(jt,{value:h.lines.join(`
|
|
452
|
-
`),label:"Copy logs",withText:!0})]})}),s&&a.jsx(we,{tone:"warning",title:"The live stream is disconnected",className:"mb-4",children:"New lines appear once the dashboard socket reconnects. nginx itself is unaffected."}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1.5 border-b border-line bg-raised/40 px-4 py-2 sm:px-5",children:[a.jsxs("span",{className:"inline-flex items-center gap-2 font-mono text-2xs text-muted",children:[a.jsx(Qt,{tone:y?"warn":h.connected?"ok":"bad",pulse:N}),y?"Paused":h.connected?"Live":"Reconnecting"]}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:m.fileName}),a.jsx("span",{className:"font-mono text-2xs text-faint",children:h.lines.length===1?"1 line":`${h.lines.length} lines`}),y&&h.missed>0&&a.jsxs(ve,{tone:"warn",children:[h.missed===999?"999+":h.missed," new while paused"]}),a.jsx("span",{className:"ml-auto text-2xs text-faint",children:b?"Following the tail":"Scrolled back"})]}),a.jsxs("div",{className:"relative",children:[a.jsx("div",{ref:x,role:"log","aria-label":`nginx ${m.label.toLowerCase()} log`,"aria-live":"off",onScroll:()=>{const E=x.current;E&&j(E.scrollHeight-E.scrollTop-E.clientHeight<40)},className:"h-[calc(100dvh-20rem)] min-h-72 overflow-y-auto bg-canvas p-4 font-mono text-xs leading-relaxed",children:h.lines.length===0?a.jsx("p",{className:"italic text-faint",children:h.connected?d==="access"?"No access lines yet. They appear here as nginx writes them.":"No error lines yet.":"Waiting for the live stream…"}):h.lines.map((E,H)=>a.jsx("div",{className:re("whitespace-pre-wrap break-all py-0.5",p5(E)),children:E},`${H}-${E}`))}),!b&&a.jsxs("button",{type:"button",onClick:()=>{const E=x.current;E&&(E.scrollTop=E.scrollHeight),j(!0)},className:"absolute bottom-3 right-3 inline-flex items-center gap-1.5 rounded-pill border border-line bg-surface px-3 py-1.5 text-2xs font-medium text-ink shadow-pop transition-colors hover:bg-inset",children:[a.jsx(Hj,{className:"size-3","aria-hidden":"true"}),"Jump to latest"]})]})]}),a.jsx("p",{className:"mt-3 text-2xs text-faint",children:"The dashboard keeps the last 500 lines in memory for this tab. Pausing only stops the display — lines keep being written to disk."})]})}const Mg={not_linked:"Not linked",connecting:"Connecting…",connected:"Online",rejected:"Rejected by the Hub",unreachable:"Hub unreachable"},Og={connected:"ok",connecting:"warn",unreachable:"warn",rejected:"bad",not_linked:"neutral"};function Dd(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function y5({checked:s,indeterminate:o,disabled:c,label:u,onChange:d}){const m=g.useRef(null);return g.useEffect(()=>{m.current&&(m.current.indeterminate=o)},[o]),a.jsx("input",{ref:m,type:"checkbox","aria-label":`All ${u} permissions`,checked:s,disabled:c,onChange:p=>d(p.target.checked),className:"mt-0.5 size-4 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"})}function _d(s,o){return!!s.comingSoon||o.includes(s.id)}function v5(){const s=Nt(),o=bn(),c=yt(P=>oe.hub.status(P)),[u,d]=g.useState(""),[m,p]=g.useState(null),[h,x]=g.useState(!1),[b,j]=g.useState(!1),[y,N]=g.useState(!1),E=c.data?.status??"not_linked";g.useEffect(()=>{const P=E==="connecting"?2e3:E==="unreachable"?15e3:0;if(!P)return;const ae=window.setTimeout(c.reload,P);return()=>window.clearTimeout(ae)},[c.data,c.reload,E]);const H=async()=>{if(h)return;const P=Fw(u);if(P){p(P);return}p(null),x(!0);try{const ae=await oe.hub.connect(u.trim());c.setData(ae.status),d(""),s.success("Connection string saved",ae.status.status==="connecting"?"Connecting to the Hub…":"This server is now linked to the Hub.")}catch(ae){p(Dd(ae,"The Hub did not accept that connection string."))}finally{x(!1)}},S=async()=>{if(!(b||!await o({title:"Unlink this server from the Hub?",body:"The Hub stops receiving data from this server. Domains and certificates are not affected.",confirmLabel:"Unlink",tone:"danger"}))){j(!0);try{await oe.hub.unlink(),c.setData(ae=>ae&&{...ae,linked:!1,hubUrl:null,serverId:null,connected:!1,status:"not_linked",permissions:{},lastError:null,attempts:0}),d(""),p(null),s.success("Unlinked from the Hub")}catch(ae){s.error("Could not unlink",Dd(ae,"The link is still in place."))}finally{j(!1)}}},k=c.data?.permissions??{},_=c.data?.tree??[],R=c.data?.comingSoon??[],X=async(P,ae)=>{if(!y){N(!0),c.setData(M=>{if(!M)return M;const A={...M.permissions};for(const le of P)A[le]=ae;return{...M,permissions:A}});try{const M={};for(const le of P)M[le]=ae;const A=await oe.hub.updatePermissions(M);c.setData(le=>le&&{...le,permissions:A.permissions,tree:A.tree,comingSoon:A.comingSoon})}catch(M){s.error("Could not save permissions",Dd(M,"The change was not kept.")),c.reload()}finally{N(!1)}}},z=P=>{const ae=P.children.filter(A=>!_d(A,R));if(ae.length===0)return"off";const M=ae.filter(A=>k[A.id]===!0).length;return M===0?"off":M===ae.length?"on":"partial"},G=(P,ae)=>{const M=P.children.filter(A=>!_d(A,R)).map(A=>A.id);M.length!==0&&X(M,ae)},ne=Object.values(k).filter(Boolean).length,U=P=>a.jsxs("div",{className:"w-full max-w-md space-y-3",children:[a.jsx(Uo,{label:"Connection string",value:u,onChange:ae=>{d(ae.target.value),m&&p(null)},placeholder:"ezops://https://hub.example.com|server-id|secret",hint:"Shown only once by the Hub. Treat it like a password.",error:m,className:"font-mono",spellCheck:!1,autoComplete:"off",rows:3}),a.jsx(te,{variant:"primary",loading:h,disabled:!u.trim(),icon:a.jsx(_2,{className:"size-4","aria-hidden":"true"}),onClick:()=>void H(),children:P})]}),J=Og[E]??"neutral",ce=(()=>{if(c.error&&!c.data)return a.jsx(Dn,{children:a.jsx(Et,{error:c.error,title:"Could not read the Hub status",onRetry:c.reload,className:"border-0"})});if(!c.data)return a.jsxs(Dn,{className:"space-y-3",children:[a.jsx(Fe,{className:"h-5 w-48"}),a.jsx(Fe,{className:"h-24 rounded-md"}),a.jsx(Fe,{className:"h-40 rounded-md"})]});const P=c.data,ae=Mg[P.status]??"Unknown state",M=Og[P.status]??"neutral";return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 border-b border-line bg-raised/40 px-4 py-3 sm:px-5",children:[a.jsx(Qt,{tone:M,pulse:P.status==="connecting"}),a.jsx("span",{className:"text-sm font-medium text-ink",children:ae}),P.hubUrl&&a.jsx("code",{className:"break-all font-mono text-xs text-muted",children:P.hubUrl}),P.serverId&&a.jsxs("span",{className:"text-2xs text-faint",children:["Server ID ",a.jsx("code",{className:"font-mono text-muted",children:P.serverId})]}),P.status==="unreachable"&&P.attempts>0&&a.jsxs("span",{className:"text-2xs text-faint",children:[P.attempts," reconnect attempt",P.attempts===1?"":"s"]})]}),a.jsxs("div",{className:"flex flex-wrap items-start gap-x-2 gap-y-1 border-b border-line px-4 py-2.5 text-2xs sm:px-5",children:[a.jsx("span",{className:"font-medium uppercase tracking-wider text-faint",children:"Data directory"}),a.jsx("code",{className:"break-all font-mono text-muted",children:P.dataDir}),P.devDataDir&&a.jsx(ve,{tone:"warn",children:"dev override"}),P.devDataDir&&a.jsx("span",{className:"w-full text-faint",children:"This is not the normal data directory. The CLI must run with the same override, or it reads and writes a different domain list."})]}),a.jsxs(Dn,{className:"space-y-5",children:[P.lastError&&a.jsx(we,{tone:P.status==="rejected"?"danger":"warning",title:P.status==="rejected"?"The Hub rejected this server":"The Hub cannot be reached right now",children:P.lastError}),P.linked?a.jsxs(a.Fragment,{children:[P.status==="rejected"&&a.jsxs("div",{className:"space-y-3 border-t border-line pt-4",children:[a.jsx("p",{className:"text-sm text-muted",children:"This link cannot recover by itself. Paste a fresh connection string from the Hub to replace it."}),U("Reconnect")]}),a.jsxs("section",{className:"space-y-3","aria-labelledby":"hub-permissions-heading",children:[a.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-2",children:[a.jsxs("div",{children:[a.jsx("h3",{id:"hub-permissions-heading",className:"text-sm font-semibold text-ink",children:"Allow the Hub to"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Monitoring — metrics, nginx status, domains and certificate expiry — is always on. These toggles are enforced on this server; the Hub cannot grant itself anything."})]}),a.jsxs(ve,{tone:ne>0?"accent":"neutral",children:[ne," granted"]})]}),a.jsx("div",{className:"space-y-2.5",children:_.map(A=>{const le=z(A);return a.jsxs("div",{className:"overflow-hidden rounded-md border border-line",children:[a.jsxs("label",{className:"flex cursor-pointer items-start gap-3 bg-raised/60 px-3.5 py-2.5",children:[a.jsx(y5,{checked:le==="on",indeterminate:le==="partial",disabled:y,label:A.label,onChange:F=>G(A,F)}),a.jsxs("span",{className:"min-w-0",children:[a.jsx("span",{className:"block text-sm font-medium text-ink",children:A.label}),a.jsx("span",{className:"mt-0.5 block text-xs text-muted",children:A.description})]})]}),a.jsx("ul",{className:"divide-y divide-line/60",children:A.children.map(F=>{const ee=_d(F,R),de=k[F.id]===!0;return a.jsx("li",{children:a.jsxs("label",{className:re("flex items-start gap-3 px-3.5 py-2.5 pl-8",ee?"cursor-not-allowed opacity-60":"cursor-pointer hover:bg-inset/60"),children:[a.jsx("input",{type:"checkbox",checked:de,disabled:ee||y,onChange:()=>void X([F.id],!de),className:"mt-0.5 size-3.5 shrink-0 cursor-pointer rounded border-line accent-[var(--ez-accent)]"}),a.jsxs("span",{className:"min-w-0",children:[a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2 text-sm text-ink",children:[F.label,ee&&a.jsx(ve,{tone:"warn",children:"Coming soon"})]}),a.jsx("span",{className:"mt-0.5 block text-xs text-faint",children:F.description})]})]})},F.id)})})]},A.id)})})]}),a.jsx("div",{className:"border-t border-line pt-4",children:a.jsx(te,{variant:"dangerGhost",loading:b,icon:a.jsx(EN,{className:"size-4","aria-hidden":"true"}),onClick:()=>void S(),children:"Unlink from Hub"})})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-sm text-muted",children:"Add this server in the Hub first, then paste the connection string it gives you."}),a.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted",children:[a.jsxs("li",{children:["Open your Hub dashboard → ",a.jsx("span",{className:"text-ink",children:"Add Server"})]}),a.jsx("li",{children:"Enter a display name and submit"}),a.jsx("li",{children:"Copy the connection string the Hub shows you"}),a.jsx("li",{children:"Paste it below and click Connect"})]})]}),U("Connect")]})]})]})})();return a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:re("h-0.5 w-full",J==="ok"?"bg-ok/60":J==="bad"?"bg-bad/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Kj,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Easy DevOps Hub",c.data&&a.jsx(ve,{tone:J,dot:!0,children:Mg[c.data.status]??"Unknown"}),c.data?.devDataDir&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Monitor and control this server from a central dashboard.",actions:a.jsx(te,{variant:"secondary",size:"sm",loading:c.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:c.reload,children:"Refresh"})}),ce,c.loading&&c.data&&a.jsxs("div",{className:"flex items-center gap-2 border-t border-line px-4 py-2 text-2xs text-faint sm:px-5",children:[a.jsx(Ds,{}),"Refreshing the Hub state…"]})]})}const Lg=[{id:"general",label:"General"},{id:"access",label:"Access"},{id:"hub",label:"Hub"},{id:"backup",label:"Backup"}],Kd=[{value:"127.0.0.1",label:"This machine only (127.0.0.1)"},{value:"0.0.0.0",label:"All interfaces (0.0.0.0)"}];function b5(s){return s==="::1"?"This machine only (::1)":Kd.find(o=>o.value===s)?.label??s}const Do={days:7,min:1,max:30};function Md(s){return{port:String(s.dashboardPort),nginxDir:s.nginxDir,sslDir:s.sslDir,acmeEmail:s.acmeEmail,autoRenew:s.sslAutoRenew??!0,autoRenewDays:String(s.sslAutoRenewDays??Do.days),deployDir:s.deployDir??""}}function Od(s){return{bind:s.dashboardBindAddress,auth:s.dashboardAuth,password:"",confirm:""}}function Hi(s,o){return s instanceof Be?(typeof s.payload.detail=="string"?s.payload.detail:null)??s.message:s instanceof Error?s.message:o}function j5(s){if(s instanceof Be){const o=s.payload.reason;if(o==="no_auth_requires_loopback")return"Running without a password requires the dashboard to listen on this machine only.";if(o==="bind_requires_password")return"Set a password before opening the dashboard to the network.";if(o==="no_auth_requires_local_request")return"Turning the password off is only allowed from this machine itself."}return Hi(s,"The previous access settings are still in force.")}function N5(){Vn("Settings");const s=Nt(),o=bn(),{auth:c}=Xn(),u=c?.minPasswordLength??8,[d,m]=Yo(),p=d.get("tab"),h=Lg.some(be=>be.id===p)?p:"general",x=be=>{const ot=new URLSearchParams(d);be==="general"?ot.delete("tab"):ot.set("tab",be),m(ot,{replace:!0})},b=yt(be=>oe.settings.get(be)),j=yt(be=>oe.settings.permissions(be),[],{enabled:!!b.data&&b.data?.platform!=="win32"}),{service:y,error:N,reload:E}=Ki(),H=Pi(y);Hs("settings",()=>{b.reload(),j.reload()});const[S,k]=g.useState(null),[_,R]=g.useState(null),[X,z]=g.useState(!1),[G,ne]=g.useState(!1),[U,J]=g.useState(!1),[ce,P]=g.useState(!1),[ae,M]=g.useState(!1),[A,le]=g.useState(null),[F,ee]=g.useState(null);g.useEffect(()=>{b.data&&!S&&k(Md(b.data))},[b.data,S]),g.useEffect(()=>{b.data&&!_&&R(Od(b.data))},[b.data,_]);const de=S?Vo(S.port):null,$=S?_y(S.acmeEmail):null,ie=S&&!S.nginxDir.trim()?"This directory is required.":null,Se=S&&!S.sslDir.trim()?"This directory is required.":null,ke=b.data?.deployDir!==void 0,$e=!!S&&ke&&S.deployDir.trim()!==(b.data?.deployDir??""),Ge=b.data?.sslAutoRenew!==void 0,T=b.data?.sslAutoRenewDaysMin??Do.min,I=b.data?.sslAutoRenewDaysMax??Do.max,Q=S?Number(S.autoRenewDays):NaN,W=S&&Ge&&S.autoRenew&&(!/^\d+$/.test(S.autoRenewDays.trim())||Q<T||Q>I)?`Enter a whole number from ${T} to ${I}.`:null,je=!!(S&&b.data&&(Number(S.port)!==b.data.dashboardPort||S.nginxDir!==b.data.nginxDir||S.sslDir!==b.data.sslDir||S.acmeEmail!==b.data.acmeEmail||ke&&S.deployDir.trim()!==(b.data.deployDir??"")||Ge&&(S.autoRenew!==(b.data.sslAutoRenew??!0)||S.autoRenew&&Q!==(b.data.sslAutoRenewDays??Do.days)))),Ce=!!(_&&b.data&&(_.bind!==b.data.dashboardBindAddress||_.auth!==b.data.dashboardAuth||_.password!=="")),De=async()=>{if(!(!S||U)&&(z(!0),!(de||$||ie||Se||W))){J(!0);try{const be=await oe.settings.update({dashboardPort:Number(S.port),nginxDir:S.nginxDir.trim(),sslDir:S.sslDir.trim(),acmeEmail:S.acmeEmail.trim(),...$e?{deployDir:S.deployDir.trim()}:{},...Ge?{sslAutoRenew:S.autoRenew,...S.autoRenew?{sslAutoRenewDays:Q}:{}}:{}});M(be.needsRestart),s.success("Settings saved",be.needsRestart?"Restart the dashboard for the new port to take effect.":void 0),b.reload()}catch(be){s.error("Could not save settings",Hi(be,"The previous settings are still in force."))}finally{J(!1)}}},fe=async()=>{if(!_||!b.data||ce)return;if(ne(!0),le(null),ee(null),_.auth==="none"&&_.bind==="0.0.0.0"){le("Running without a password requires the dashboard to listen here only.");return}if(_.password){const ot=mg(_.password,u)??(_.password!==_.confirm?"The two passwords do not match.":null);if(ot){ee(ot);return}}else if(_.auth==="password"&&!b.data.hasPassword){ee("Set a password before requiring a password to sign in.");return}const be=_.password?"password":_.auth;P(!0);try{const ot={dashboardBindAddress:_.bind,dashboardAuth:be};_.password&&(ot.dashboardPassword=_.password);const Ht=await oe.settings.update(ot);M(Ht.needsRestart),R(ft=>ft&&{...ft,auth:Ht.dashboardAuth,password:"",confirm:""}),s.success("Access settings saved",Ht.needsRestart?"Restart the dashboard for the new listening address to take effect.":void 0),b.reload()}catch(ot){le(j5(ot))}finally{P(!1)}},[ye,Gt]=g.useState(""),[Zn,an]=g.useState(null),[Yt,rt]=g.useState(!1),Le=async()=>{if(!(!ye||Yt)){rt(!0),an(null);try{await oe.settings.setupPermissions(ye),Gt(""),j.setData({configured:!0}),s.success("Permissions configured","nginx and systemctl no longer prompt for a password.")}catch(be){an(Hi(be,"The sudoers file was not written."))}finally{rt(!1)}}},Ut=g.useRef(null),[jn,Kt]=g.useState(!1),[oa,Qn]=g.useState(!1),[ln,V]=g.useState(null),pe=async()=>{if(!jn){Kt(!0);try{const be=await oe.settings.backup(),ot=new Blob([JSON.stringify(be,null,2)],{type:"application/json"}),Ht=URL.createObjectURL(ot),ft=document.createElement("a");ft.href=Ht,ft.download=`easy-devops-backup-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(ft),ft.click(),ft.remove(),window.setTimeout(()=>URL.revokeObjectURL(Ht),1e3),s.success("Backup downloaded")}catch(be){s.error("Could not create the backup",Hi(be,"Nothing was downloaded."))}finally{Kt(!1)}}},Ae=async be=>{const ot=be.target.files?.[0];if(!ot)return;V(null);let Ht;try{Ht=JSON.parse(await ot.text())}catch{V({tone:"danger",title:"That file is not valid JSON",body:"Pick the .json file produced by Export backup."}),be.target.value="";return}const ft=Ht;if(!ft||typeof ft!="object"||typeof ft.config!="object"||ft.config===null){V({tone:"danger",title:"That file is not an Easy DevOps backup",body:"A backup always contains a config section and a domains list."}),be.target.value="";return}const ct=await o({title:"Restore this backup?",body:"This replaces your current configuration and domain list. Passwords and the listen address stored in the file are ignored.",confirmLabel:"Restore",tone:"danger"});if(be.target.value="",!!ct){Qn(!0);try{await oe.settings.restore(Ht);const sn=await oe.settings.get();b.setData(sn),k(Md(sn)),R(Od(sn)),z(!1),ne(!1),M(!1),j.reload(),V({tone:"success",title:"Backup restored",body:`Configuration from ${Ey(ft.exportedAt??null)} is now in force. Reload any other open dashboard tabs to pick it up.`}),s.success("Backup restored")}catch(sn){V({tone:"danger",title:"The restore failed",body:Hi(sn,"Nothing was changed.")})}finally{Qn(!1)}}},Jt=()=>{b.reload(),j.reload(),h==="general"&&E()},wt=ae&&a.jsx(we,{tone:"info",title:"Restart needed",children:"The port or listening address changed. It takes effect after the dashboard restarts."}),We=()=>b.error&&!b.data?a.jsx(Et,{error:b.error,title:"Could not read the settings",onRetry:b.reload}):!b.data||!S?a.jsxs(za,{children:[a.jsx(Fe,{className:"h-64 rounded-lg"}),a.jsx(Fe,{className:"h-40 rounded-lg"})]}):a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(cf,{className:"size-4","aria-hidden":"true"}),title:"Application configuration",description:"Where nginx lives, which port the dashboard answers on, and the address Let’s Encrypt knows you by."}),a.jsxs(Dn,{className:"space-y-5",children:[wt,a.jsxs(Sa,{children:[a.jsx(Ee,{label:"Dashboard port",type:"number",min:1,max:65535,inputMode:"numeric",value:S.port,onChange:be=>k({...S,port:be.target.value}),error:X?de:null,hint:"Takes effect after the dashboard restarts."}),a.jsx(Ee,{label:"ACME email",type:"email",value:S.acmeEmail,onChange:be=>k({...S,acmeEmail:be.target.value}),error:X?$:null,hint:"Used when ordering certificates. Usually not shown to anyone.",placeholder:"admin@example.com"}),a.jsx(Ee,{label:"Nginx directory",value:S.nginxDir,onChange:be=>k({...S,nginxDir:be.target.value}),error:X?ie:null,hint:"Where nginx.conf is located.",className:"font-mono",spellCheck:!1}),a.jsx(Ee,{label:"SSL settings directory",value:S.sslDir,onChange:be=>k({...S,sslDir:be.target.value}),error:X?Se:null,hint:"Default directory for certificates the dashboard manages.",className:"font-mono",spellCheck:!1}),ke&&a.jsx(Ee,{label:"Deployments folder",value:S.deployDir,onChange:be=>k({...S,deployDir:be.target.value}),hint:a.jsxs(a.Fragment,{children:["Where ",a.jsx("strong",{className:"font-medium",children:"new"})," deployed apps are created. Apps that already exist stay where they are — move one from its “Domain & folder” tab. Leave empty for the default",b.data.deployDirDefault?` (${b.data.deployDirDefault})`:"","."]}),placeholder:b.data.deployDirDefault,className:"font-mono",spellCheck:!1})]}),Ge&&a.jsxs("div",{className:"space-y-4 border-t border-line pt-5",children:[a.jsx(qt,{checked:S.autoRenew,onChange:be=>k({...S,autoRenew:be}),label:"Renew certificates automatically",description:a.jsx(a.Fragment,{children:"The background service renews HTTP-validated certificates before they expire, without stopping nginx. Wildcard and other DNS-validated certificates need a TXT record added by hand, so they only get a warning."})}),S.autoRenew&&a.jsx(Sa,{children:a.jsx(Ee,{label:"Renew this many days before expiry",type:"number",min:T,max:I,inputMode:"numeric",value:S.autoRenewDays,onChange:be=>k({...S,autoRenewDays:be.target.value}),error:X?W:null,hint:S.acmeEmail.trim()?"A failed attempt is retried on the next check, and you are notified either way.":"Set an ACME email above — renewal cannot run without one."})})]})]}),a.jsxs(Rd,{children:[a.jsx("span",{className:"text-2xs text-faint",children:je?"Unsaved changes":"All changes saved"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(te,{variant:"ghost",size:"sm",disabled:!je,onClick:()=>{k(Md(b.data)),z(!1)},children:"Revert"}),a.jsx(te,{variant:"primary",size:"sm",loading:U,disabled:!je,icon:a.jsx(Gd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void De(),children:"Save settings"})]})]})]}),a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx(nn,{icon:a.jsx(yy,{className:"size-4","aria-hidden":"true"}),title:a.jsxs("span",{className:"inline-flex flex-wrap items-center gap-2",children:["Background service",H&&a.jsx(ve,{tone:H.running?"ok":"warn",dot:!0,children:Lo(H)}),y?.dev&&a.jsx(ve,{tone:"warn",children:"dev data dir"})]}),description:"Runs monitoring and notifications without this dashboard open.",actions:a.jsx(bt,{to:"/processes",className:ka("secondary","sm"),children:"Open Processes"})}),a.jsx(Dn,{children:N&&!y?a.jsxs(we,{tone:"warning",title:"Could not read the service state",children:[N.message," ",a.jsx("button",{type:"button",className:"font-medium underline underline-offset-2",onClick:E,children:"Try again"})]}):y?H?a.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Status"}),a.jsx("div",{className:re("mt-0.5 text-sm font-medium",H.running?"text-ok":"text-warn"),children:Lo(H)}),H.stoppedByUser&&H.stoppedAtLabel&&a.jsxs("div",{className:"mt-0.5 text-2xs text-faint",children:["Stopped ",H.stoppedAtLabel]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Mode"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",title:H.mechanismDetail,children:H.mechanismLabel})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"Starts"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",children:H.startsAtLabel})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-2xs font-medium uppercase tracking-wider text-faint",children:"PM2 (your apps)"}),a.jsx("div",{className:"mt-0.5 text-sm font-medium text-ink",children:y.pm2.installed?y.pm2.version??"Installed":"Not installed"})]})]}):null:a.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted",children:[a.jsx(Ds,{}),"Checking the background service…"]})})]})]}),rl=()=>{if(b.error&&!b.data)return a.jsx(Et,{error:b.error,title:"Could not read the settings",onRetry:b.reload});if(!b.data||!_)return a.jsxs(za,{children:[a.jsx(Fe,{className:"h-72 rounded-lg"}),a.jsx(Fe,{className:"h-40 rounded-lg"})]});const be=_.bind!=="0.0.0.0",ot=b.data.canUseNoPassword||be,Ht=_.password?mg(_.password,u)??(_.confirm&&_.password!==_.confirm?"The two passwords do not match.":null):null,ft=F??(G?Ht:null);return a.jsxs("div",{className:"space-y-5",children:[a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Xi,{className:"size-4","aria-hidden":"true"}),title:"Access and authentication",description:"Who can reach the dashboard, and how they prove who they are."}),a.jsxs(Dn,{className:"space-y-5",children:[wt,A&&a.jsx(we,{tone:"danger",title:"Could not save access settings",children:A}),a.jsxs(Sa,{children:[a.jsxs(il,{label:"Listen on",value:_.bind,onChange:ct=>{const sn=ct.target.value;R({..._,bind:sn,auth:sn==="0.0.0.0"?"password":_.auth})},hint:_.auth==="none"?"Locked to this machine while there is no password.":"Changing this needs a dashboard restart.",children:[Kd.map(ct=>a.jsx("option",{value:ct.value,disabled:ct.value==="0.0.0.0"&&_.auth==="none",children:ct.label},ct.value)),!Kd.some(ct=>ct.value===_.bind)&&a.jsx("option",{value:_.bind,children:b5(_.bind)})]}),a.jsxs(il,{label:"Authentication",value:_.auth,onChange:ct=>{const sn=ct.target.value;R({..._,auth:sn,bind:sn==="none"?"127.0.0.1":_.bind}),ee(null)},hint:_.auth==="none"?"No login — reachable from this machine only.":!b.data.hasPassword&&!_.password?"No password set yet — set one below.":"A password is required to sign in.",children:[a.jsx("option",{value:"password",children:"Password required"}),a.jsx("option",{value:"none",disabled:!ot,children:"No password (this machine only)"})]})]}),_.auth==="none"&&a.jsx(we,{tone:"warning",title:"No login",children:"Anyone who can reach this machine can open the dashboard. Listening is fixed to 127.0.0.1 so that is only this machine, not the network."}),a.jsxs("div",{className:"max-w-md space-y-4 border-t border-line pt-4",children:[a.jsx(Ee,{label:"New password",type:"password",autoComplete:"new-password",value:_.password,onChange:ct=>{R({..._,password:ct.target.value}),ee(null)},error:ft,hint:`Leave blank to keep the current password. At least ${u} characters.`}),a.jsx(Ee,{label:"Confirm new password",type:"password",autoComplete:"new-password",value:_.confirm,onChange:ct=>{R({..._,confirm:ct.target.value}),ee(null)}})]})]}),a.jsxs(Rd,{children:[a.jsx("span",{className:"text-2xs text-faint",children:Ce?"Unsaved changes":"All changes saved"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(te,{variant:"ghost",size:"sm",disabled:!Ce,onClick:()=>{R(Od(b.data)),ne(!1),le(null),ee(null)},children:"Revert"}),a.jsx(te,{variant:"primary",size:"sm",loading:ce,disabled:!Ce,icon:a.jsx(Gd,{className:"size-3.5","aria-hidden":"true"}),onClick:()=>void fe(),children:"Save access"})]})]})]}),b.data.platform!=="win32"&&a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:re("h-0.5 w-full",j.data?.configured?"bg-ok/60":"bg-warn/60"),"aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(Ea,{className:"size-4","aria-hidden":"true"}),title:"Linux permissions",description:"Passwordless sudo for nginx and systemctl.",actions:j.data?a.jsx(ve,{tone:j.data.configured?"ok":"warn",dot:!0,children:j.data.configured?"Configured":"Required"}):void 0}),a.jsx(Dn,{children:j.error&&!j.data?a.jsx(Et,{error:j.error,title:"Could not read the permission state",onRetry:j.reload,className:"border-0"}):j.data?j.data.configured?a.jsx("p",{className:"text-sm text-muted",children:"Passwordless sudo is configured. The dashboard can reload nginx and call systemctl without stopping to ask for a password."}):a.jsxs("div",{className:"max-w-md space-y-4",children:[a.jsx("p",{className:"text-sm text-muted",children:"The dashboard needs passwordless sudo to control nginx and systemctl. Enter your sudo password once and it writes the sudoers entry for you."}),Zn&&a.jsx(we,{tone:"danger",title:"Permissions were not configured",children:Zn}),a.jsx(Ee,{label:"Sudo password",type:"password",autoComplete:"current-password",placeholder:"Enter your sudo password",value:ye,onChange:ct=>{Gt(ct.target.value),Zn&&an(null)},onKeyDown:ct=>{ct.key==="Enter"&&Le()}}),a.jsx(te,{variant:"primary",loading:Yt,disabled:!ye,onClick:()=>void Le(),children:"Set up permissions"})]}):a.jsxs("div",{className:"flex items-center gap-2 py-4 text-sm text-muted",children:[a.jsx(Ds,{}),"Checking sudoers…"]})})]})]})},Zo=()=>a.jsxs(Qe,{className:"overflow-hidden",children:[a.jsx("div",{className:"h-0.5 w-full bg-accent/50","aria-hidden":"true"}),a.jsx(nn,{icon:a.jsx(qd,{className:"size-4","aria-hidden":"true"}),title:"Backup and restore",description:"Export or restore settings and domains as JSON."}),a.jsxs(Dn,{className:"space-y-5",children:[a.jsxs("div",{className:"grid gap-5 sm:grid-cols-2",children:[a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-ink",children:"Export"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Download every setting and domain as one JSON file. Passwords are excluded from the export."})]}),a.jsx(te,{variant:"secondary",loading:jn,icon:a.jsx(qd,{className:"size-4","aria-hidden":"true"}),onClick:()=>void pe(),children:"Export backup"})]}),a.jsxs("div",{className:"space-y-3 border-t border-line pt-5 sm:border-l sm:border-t-0 sm:pl-5 sm:pt-0",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-ink",children:"Restore"}),a.jsx("p",{className:"mt-0.5 text-xs text-muted",children:"Replace the current configuration and domain list with a previously exported file. Passwords and the listen address stored in the file are ignored."})]}),a.jsx("input",{ref:Ut,type:"file",accept:".json,application/json",className:"sr-only",onChange:be=>void Ae(be)}),a.jsx(te,{variant:"secondary",loading:oa,disabled:jn,icon:a.jsx(RN,{className:"size-4","aria-hidden":"true"}),onClick:()=>Ut.current?.click(),children:"Choose backup file…"})]})]}),ln&&a.jsx(we,{tone:ln.tone,title:ln.title,children:ln.body})]}),a.jsx(Rd,{children:a.jsx("span",{className:"text-2xs text-faint",children:"Exported backups never contain the dashboard password."})})]});return a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Settings",description:"Configuration, access, Hub pairing and backups for this dashboard.",actions:h!=="hub"?a.jsx(te,{variant:"secondary",size:"sm",loading:b.loading||j.loading,icon:a.jsx(Lt,{className:"size-3.5","aria-hidden":"true"}),onClick:Jt,children:"Refresh"}):void 0}),a.jsx("div",{role:"tablist","aria-label":"Settings sections",className:"mb-5 flex flex-wrap gap-1 rounded-lg border border-line bg-raised/60 p-1",children:Lg.map(be=>a.jsx("button",{type:"button",role:"tab",id:`settings-tab-${be.id}`,"aria-selected":h===be.id,"aria-controls":`settings-panel-${be.id}`,onClick:()=>x(be.id),className:re("rounded-sm border px-3 py-1.5 text-xs font-medium transition-colors duration-[var(--ez-motion-fast)]",h===be.id?"border-line bg-surface text-ink shadow-sm":"border-transparent text-muted hover:text-ink"),children:be.label},be.id))}),a.jsxs("div",{role:"tabpanel",id:`settings-panel-${h}`,"aria-labelledby":`settings-tab-${h}`,tabIndex:-1,className:"outline-none",children:[h==="general"&&We(),h==="access"&&rl(),h==="hub"&&a.jsx(v5,{}),h==="backup"&&Zo()]})]})}function w5(){return Vn("Page not found"),a.jsxs(a.Fragment,{children:[a.jsx(ra,{title:"Page not found",description:"That address does not match a dashboard section."}),a.jsx(Qe,{children:a.jsx(On,{title:"Nothing here",description:"The link may be old, or the section may have moved.",action:a.jsxs(bt,{to:"/",className:ka("secondary","sm"),children:[a.jsx(qj,{className:"size-3.5","aria-hidden":"true"}),"Back to Overview"]})})})]})}function S5(){const{phase:s}=Xn();return s==="loading"?a.jsx(Tw,{}):s==="error"?a.jsx(Mw,{}):s==="unauthenticated"?a.jsx(Gw,{}):a.jsx(K1,{children:a.jsxs(An,{element:a.jsx(_w,{}),children:[a.jsx(An,{index:!0,element:a.jsx(Qw,{})}),a.jsx(An,{path:"domains",element:a.jsx(uS,{})}),a.jsx(An,{path:"ssl",element:a.jsx(bS,{})}),a.jsx(An,{path:"nginx",element:a.jsx(wS,{})}),a.jsx(An,{path:"notifications",element:a.jsx(_S,{})}),a.jsx(An,{path:"deployments",element:a.jsx(x5,{})}),a.jsx(An,{path:"processes",element:a.jsx(qS,{})}),a.jsx(An,{path:"logs",element:a.jsx(g5,{})}),a.jsx(An,{path:"settings",element:a.jsx(N5,{})}),a.jsx(An,{path:"*",element:a.jsx(w5,{})})]})})}function k5(){return a.jsx(Rj,{children:a.jsx(HN,{children:a.jsx(XN,{children:a.jsx(lw,{children:a.jsx(sw,{children:a.jsx(iw,{children:a.jsx(vj,{children:a.jsx(S5,{})})})})})})})})}const $y=document.getElementById("root");if(!$y)throw new Error("Missing #root element");X0.createRoot($y).render(a.jsx(g.StrictMode,{children:a.jsx(k5,{})}));
|