safeclaw 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,126 @@
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"]'))a(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const h of p.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&a(h)}).observe(document,{childList:!0,subtree:!0});function l(d){const p={};return d.integrity&&(p.integrity=d.integrity),d.referrerPolicy&&(p.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?p.credentials="include":d.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function a(d){if(d.ep)return;d.ep=!0;const p=l(d);fetch(d.href,p)}})();function yd(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ei={exports:{}},ss={},ji={exports:{}},oe={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its 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 Vc;function Yp(){if(Vc)return oe;Vc=1;var r=Symbol.for("react.element"),o=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),h=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),_=Symbol.iterator;function L(N){return N===null||typeof N!="object"?null:(N=_&&N[_]||N["@@iterator"],typeof N=="function"?N:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W=Object.assign,b={};function P(N,T,ee){this.props=N,this.context=T,this.refs=b,this.updater=ee||D}P.prototype.isReactComponent={},P.prototype.setState=function(N,T){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,T,"setState")},P.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function R(){}R.prototype=P.prototype;function B(N,T,ee){this.props=N,this.context=T,this.refs=b,this.updater=ee||D}var F=B.prototype=new R;F.constructor=B,W(F,P.prototype),F.isPureReactComponent=!0;var re=Array.isArray,ie=Object.prototype.hasOwnProperty,ce={current:null},ge={key:!0,ref:!0,__self:!0,__source:!0};function he(N,T,ee){var H,se={},ne=null,ae=null;if(T!=null)for(H in T.ref!==void 0&&(ae=T.ref),T.key!==void 0&&(ne=""+T.key),T)ie.call(T,H)&&!ge.hasOwnProperty(H)&&(se[H]=T[H]);var le=arguments.length-2;if(le===1)se.children=ee;else if(1<le){for(var de=Array(le),Oe=0;Oe<le;Oe++)de[Oe]=arguments[Oe+2];se.children=de}if(N&&N.defaultProps)for(H in le=N.defaultProps,le)se[H]===void 0&&(se[H]=le[H]);return{$$typeof:r,type:N,key:ne,ref:ae,props:se,_owner:ce.current}}function Re(N,T){return{$$typeof:r,type:N.type,key:T,ref:N.ref,props:N.props,_owner:N._owner}}function Te(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function ut(N){var T={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ee){return T[ee]})}var Je=/\/+/g;function ze(N,T){return typeof N=="object"&&N!==null&&N.key!=null?ut(""+N.key):T.toString(36)}function qe(N,T,ee,H,se){var ne=typeof N;(ne==="undefined"||ne==="boolean")&&(N=null);var ae=!1;if(N===null)ae=!0;else switch(ne){case"string":case"number":ae=!0;break;case"object":switch(N.$$typeof){case r:case o:ae=!0}}if(ae)return ae=N,se=se(ae),N=H===""?"."+ze(ae,0):H,re(se)?(ee="",N!=null&&(ee=N.replace(Je,"$&/")+"/"),qe(se,T,ee,"",function(Oe){return Oe})):se!=null&&(Te(se)&&(se=Re(se,ee+(!se.key||ae&&ae.key===se.key?"":(""+se.key).replace(Je,"$&/")+"/")+N)),T.push(se)),1;if(ae=0,H=H===""?".":H+":",re(N))for(var le=0;le<N.length;le++){ne=N[le];var de=H+ze(ne,le);ae+=qe(ne,T,ee,de,se)}else if(de=L(N),typeof de=="function")for(N=de.call(N),le=0;!(ne=N.next()).done;)ne=ne.value,de=H+ze(ne,le++),ae+=qe(ne,T,ee,de,se);else if(ne==="object")throw T=String(N),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.");return ae}function Ye(N,T,ee){if(N==null)return N;var H=[],se=0;return qe(N,H,"","",function(ne){return T.call(ee,ne,se++)}),H}function Ae(N){if(N._status===-1){var T=N._result;T=T(),T.then(function(ee){(N._status===0||N._status===-1)&&(N._status=1,N._result=ee)},function(ee){(N._status===0||N._status===-1)&&(N._status=2,N._result=ee)}),N._status===-1&&(N._status=0,N._result=T)}if(N._status===1)return N._result.default;throw N._result}var ye={current:null},$={transition:null},U={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:$,ReactCurrentOwner:ce};function z(){throw Error("act(...) is not supported in production builds of React.")}return oe.Children={map:Ye,forEach:function(N,T,ee){Ye(N,function(){T.apply(this,arguments)},ee)},count:function(N){var T=0;return Ye(N,function(){T++}),T},toArray:function(N){return Ye(N,function(T){return T})||[]},only:function(N){if(!Te(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},oe.Component=P,oe.Fragment=l,oe.Profiler=d,oe.PureComponent=B,oe.StrictMode=a,oe.Suspense=v,oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,oe.act=z,oe.cloneElement=function(N,T,ee){if(N==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+N+".");var H=W({},N.props),se=N.key,ne=N.ref,ae=N._owner;if(T!=null){if(T.ref!==void 0&&(ne=T.ref,ae=ce.current),T.key!==void 0&&(se=""+T.key),N.type&&N.type.defaultProps)var le=N.type.defaultProps;for(de in T)ie.call(T,de)&&!ge.hasOwnProperty(de)&&(H[de]=T[de]===void 0&&le!==void 0?le[de]:T[de])}var de=arguments.length-2;if(de===1)H.children=ee;else if(1<de){le=Array(de);for(var Oe=0;Oe<de;Oe++)le[Oe]=arguments[Oe+2];H.children=le}return{$$typeof:r,type:N.type,key:se,ref:ne,props:H,_owner:ae}},oe.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},N.Provider={$$typeof:p,_context:N},N.Consumer=N},oe.createElement=he,oe.createFactory=function(N){var T=he.bind(null,N);return T.type=N,T},oe.createRef=function(){return{current:null}},oe.forwardRef=function(N){return{$$typeof:g,render:N}},oe.isValidElement=Te,oe.lazy=function(N){return{$$typeof:k,_payload:{_status:-1,_result:N},_init:Ae}},oe.memo=function(N,T){return{$$typeof:S,type:N,compare:T===void 0?null:T}},oe.startTransition=function(N){var T=$.transition;$.transition={};try{N()}finally{$.transition=T}},oe.unstable_act=z,oe.useCallback=function(N,T){return ye.current.useCallback(N,T)},oe.useContext=function(N){return ye.current.useContext(N)},oe.useDebugValue=function(){},oe.useDeferredValue=function(N){return ye.current.useDeferredValue(N)},oe.useEffect=function(N,T){return ye.current.useEffect(N,T)},oe.useId=function(){return ye.current.useId()},oe.useImperativeHandle=function(N,T,ee){return ye.current.useImperativeHandle(N,T,ee)},oe.useInsertionEffect=function(N,T){return ye.current.useInsertionEffect(N,T)},oe.useLayoutEffect=function(N,T){return ye.current.useLayoutEffect(N,T)},oe.useMemo=function(N,T){return ye.current.useMemo(N,T)},oe.useReducer=function(N,T,ee){return ye.current.useReducer(N,T,ee)},oe.useRef=function(N){return ye.current.useRef(N)},oe.useState=function(N){return ye.current.useState(N)},oe.useSyncExternalStore=function(N,T,ee){return ye.current.useSyncExternalStore(N,T,ee)},oe.useTransition=function(){return ye.current.useTransition()},oe.version="18.3.1",oe}var Kc;function Yi(){return Kc||(Kc=1,ji.exports=Yp()),ji.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its 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 Qc;function Gp(){if(Qc)return ss;Qc=1;var r=Yi(),o=Symbol.for("react.element"),l=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,d=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function h(g,v,S){var k,_={},L=null,D=null;S!==void 0&&(L=""+S),v.key!==void 0&&(L=""+v.key),v.ref!==void 0&&(D=v.ref);for(k in v)a.call(v,k)&&!p.hasOwnProperty(k)&&(_[k]=v[k]);if(g&&g.defaultProps)for(k in v=g.defaultProps,v)_[k]===void 0&&(_[k]=v[k]);return{$$typeof:o,type:g,key:L,ref:D,props:_,_owner:d.current}}return ss.Fragment=l,ss.jsx=h,ss.jsxs=h,ss}var qc;function Xp(){return qc||(qc=1,Ei.exports=Gp()),Ei.exports}var u=Xp(),x=Yi();const Jp=yd(x);var No={},_i={exports:{}},st={},bi={exports:{}},Ri={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its 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 Yc;function Zp(){return Yc||(Yc=1,(function(r){function o($,U){var z=$.length;$.push(U);e:for(;0<z;){var N=z-1>>>1,T=$[N];if(0<d(T,U))$[N]=U,$[z]=T,z=N;else break e}}function l($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var U=$[0],z=$.pop();if(z!==U){$[0]=z;e:for(var N=0,T=$.length,ee=T>>>1;N<ee;){var H=2*(N+1)-1,se=$[H],ne=H+1,ae=$[ne];if(0>d(se,z))ne<T&&0>d(ae,se)?($[N]=ae,$[ne]=z,N=ne):($[N]=se,$[H]=z,N=H);else if(ne<T&&0>d(ae,z))$[N]=ae,$[ne]=z,N=ne;else break e}}return U}function d($,U){var z=$.sortIndex-U.sortIndex;return z!==0?z:$.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;r.unstable_now=function(){return p.now()}}else{var h=Date,g=h.now();r.unstable_now=function(){return h.now()-g}}var v=[],S=[],k=1,_=null,L=3,D=!1,W=!1,b=!1,P=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F($){for(var U=l(S);U!==null;){if(U.callback===null)a(S);else if(U.startTime<=$)a(S),U.sortIndex=U.expirationTime,o(v,U);else break;U=l(S)}}function re($){if(b=!1,F($),!W)if(l(v)!==null)W=!0,Ae(ie);else{var U=l(S);U!==null&&ye(re,U.startTime-$)}}function ie($,U){W=!1,b&&(b=!1,R(he),he=-1),D=!0;var z=L;try{for(F(U),_=l(v);_!==null&&(!(_.expirationTime>U)||$&&!ut());){var N=_.callback;if(typeof N=="function"){_.callback=null,L=_.priorityLevel;var T=N(_.expirationTime<=U);U=r.unstable_now(),typeof T=="function"?_.callback=T:_===l(v)&&a(v),F(U)}else a(v);_=l(v)}if(_!==null)var ee=!0;else{var H=l(S);H!==null&&ye(re,H.startTime-U),ee=!1}return ee}finally{_=null,L=z,D=!1}}var ce=!1,ge=null,he=-1,Re=5,Te=-1;function ut(){return!(r.unstable_now()-Te<Re)}function Je(){if(ge!==null){var $=r.unstable_now();Te=$;var U=!0;try{U=ge(!0,$)}finally{U?ze():(ce=!1,ge=null)}}else ce=!1}var ze;if(typeof B=="function")ze=function(){B(Je)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,Ye=qe.port2;qe.port1.onmessage=Je,ze=function(){Ye.postMessage(null)}}else ze=function(){P(Je,0)};function Ae($){ge=$,ce||(ce=!0,ze())}function ye($,U){he=P(function(){$(r.unstable_now())},U)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function($){$.callback=null},r.unstable_continueExecution=function(){W||D||(W=!0,Ae(ie))},r.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Re=0<$?Math.floor(1e3/$):5},r.unstable_getCurrentPriorityLevel=function(){return L},r.unstable_getFirstCallbackNode=function(){return l(v)},r.unstable_next=function($){switch(L){case 1:case 2:case 3:var U=3;break;default:U=L}var z=L;L=U;try{return $()}finally{L=z}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function($,U){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var z=L;L=$;try{return U()}finally{L=z}},r.unstable_scheduleCallback=function($,U,z){var N=r.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?N+z:N):z=N,$){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=z+T,$={id:k++,callback:U,priorityLevel:$,startTime:z,expirationTime:T,sortIndex:-1},z>N?($.sortIndex=z,o(S,$),l(v)===null&&$===l(S)&&(b?(R(he),he=-1):b=!0,ye(re,z-N))):($.sortIndex=T,o(v,$),W||D||(W=!0,Ae(ie))),$},r.unstable_shouldYield=ut,r.unstable_wrapCallback=function($){var U=L;return function(){var z=L;L=U;try{return $.apply(this,arguments)}finally{L=z}}}})(Ri)),Ri}var Gc;function eh(){return Gc||(Gc=1,bi.exports=Zp()),bi.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its 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 Xc;function th(){if(Xc)return st;Xc=1;var r=Yi(),o=eh();function l(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var a=new Set,d={};function p(e,t){h(e,t),h(e+"Capture",t)}function h(e,t){for(d[e]=t,e=0;e<t.length;e++)a.add(t[e])}var g=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,S=/^[: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]*$/,k={},_={};function L(e){return v.call(_,e)?!0:v.call(k,e)?!1:S.test(e)?_[e]=!0:(k[e]=!0,!1)}function D(e,t,n,s){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function W(e,t,n,s){if(t===null||typeof t>"u"||D(e,t,n,s))return!0;if(s)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function b(e,t,n,s,i,c,f){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=c,this.removeEmptyString=f}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){P[e]=new b(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];P[t]=new b(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){P[e]=new b(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){P[e]=new b(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){P[e]=new b(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){P[e]=new b(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){P[e]=new b(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){P[e]=new b(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){P[e]=new b(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function B(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(R,B);P[t]=new b(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R,B);P[t]=new b(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R,B);P[t]=new b(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){P[e]=new b(e,1,!1,e.toLowerCase(),null,!1,!1)}),P.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){P[e]=new b(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,n,s){var i=P.hasOwnProperty(t)?P[t]:null;(i!==null?i.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(W(t,n,i,s)&&(n=null),s||i===null?L(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,s=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}var re=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ie=Symbol.for("react.element"),ce=Symbol.for("react.portal"),ge=Symbol.for("react.fragment"),he=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),Te=Symbol.for("react.provider"),ut=Symbol.for("react.context"),Je=Symbol.for("react.forward_ref"),ze=Symbol.for("react.suspense"),qe=Symbol.for("react.suspense_list"),Ye=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),ye=Symbol.for("react.offscreen"),$=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=$&&e[$]||e["@@iterator"],typeof e=="function"?e:null)}var z=Object.assign,N;function T(e){if(N===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);N=t&&t[1]||""}return`
34
+ `+N+e}var ee=!1;function H(e,t){if(!e||ee)return"";ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(j){var s=j}Reflect.construct(e,[],t)}else{try{t.call()}catch(j){s=j}e.call(t.prototype)}else{try{throw Error()}catch(j){s=j}e()}}catch(j){if(j&&s&&typeof j.stack=="string"){for(var i=j.stack.split(`
35
+ `),c=s.stack.split(`
36
+ `),f=i.length-1,m=c.length-1;1<=f&&0<=m&&i[f]!==c[m];)m--;for(;1<=f&&0<=m;f--,m--)if(i[f]!==c[m]){if(f!==1||m!==1)do if(f--,m--,0>m||i[f]!==c[m]){var y=`
37
+ `+i[f].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),y}while(1<=f&&0<=m);break}}}finally{ee=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?T(e):""}function se(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=H(e.type,!1),e;case 11:return e=H(e.type.render,!1),e;case 1:return e=H(e.type,!0),e;default:return""}}function ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ge:return"Fragment";case ce:return"Portal";case Re:return"Profiler";case he:return"StrictMode";case ze:return"Suspense";case qe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ut:return(e.displayName||"Context")+".Consumer";case Te:return(e._context.displayName||"Context")+".Provider";case Je:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ye:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function ae(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(t);case 8:return t===he?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function le(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function de(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Oe(e){var t=de(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){s=""+f,c.call(this,f)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(f){s=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Z(e){e._valueTracker||(e._valueTracker=Oe(e))}function Ne(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=de(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}function Ue(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 xt(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yt(e,t){var n=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;n=le(t.value!=null?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gt(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function Dt(e,t){Gt(e,t);var n=le(t.value),s=t.type;if(n!=null)s==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bn(e,t.type,n):t.hasOwnProperty("defaultValue")&&Bn(e,t.type,le(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function mr(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Bn(e,t,n){(t!=="number"||Ue(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xt=Array.isArray;function Mt(e,t,n,s){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&&s&&(e[n].defaultSelected=!0)}else{for(n=""+le(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,s&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Fn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(l(91));return z({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function gr(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(l(92));if(Xt(n)){if(1<n.length)throw Error(l(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:le(n)}}function yr(e,t){var n=le(t.value),s=le(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),s!=null&&(e.defaultValue=""+s)}function xr(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function vr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function zn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?vr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Nn,wr=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,s,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,s,i)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Nn=Nn||document.createElement("div"),Nn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Nn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jd=["Webkit","ms","Moz","O"];Object.keys(Nr).forEach(function(e){Jd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nr[t]=Nr[e]})});function la(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nr.hasOwnProperty(e)&&Nr[e]?(""+t).trim():t+"px"}function ia(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var s=n.indexOf("--")===0,i=la(n,t[n],s);n==="float"&&(n="cssFloat"),s?e.setProperty(n,i):e[n]=i}}var Zd=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mo(e,t){if(t){if(Zd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(l(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(l(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(l(61))}if(t.style!=null&&typeof t.style!="object")throw Error(l(62))}}function Bo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Fo=null;function zo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Uo=null,Un=null,$n=null;function aa(e){if(e=Hr(e)){if(typeof Uo!="function")throw Error(l(280));var t=e.stateNode;t&&(t=Is(t),Uo(e.stateNode,e.type,t))}}function ua(e){Un?$n?$n.push(e):$n=[e]:Un=e}function ca(){if(Un){var e=Un,t=$n;if($n=Un=null,aa(e),t)for(e=0;e<t.length;e++)aa(t[e])}}function da(e,t){return e(t)}function fa(){}var $o=!1;function pa(e,t,n){if($o)return e(t,n);$o=!0;try{return da(e,t,n)}finally{$o=!1,(Un!==null||$n!==null)&&(fa(),ca())}}function kr(e,t){var n=e.stateNode;if(n===null)return null;var s=Is(n);if(s===null)return null;n=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(l(231,t,typeof n));return n}var Ho=!1;if(g)try{var Sr={};Object.defineProperty(Sr,"passive",{get:function(){Ho=!0}}),window.addEventListener("test",Sr,Sr),window.removeEventListener("test",Sr,Sr)}catch{Ho=!1}function ef(e,t,n,s,i,c,f,m,y){var j=Array.prototype.slice.call(arguments,3);try{t.apply(n,j)}catch(O){this.onError(O)}}var Cr=!1,ps=null,hs=!1,Wo=null,tf={onError:function(e){Cr=!0,ps=e}};function nf(e,t,n,s,i,c,f,m,y){Cr=!1,ps=null,ef.apply(tf,arguments)}function rf(e,t,n,s,i,c,f,m,y){if(nf.apply(this,arguments),Cr){if(Cr){var j=ps;Cr=!1,ps=null}else throw Error(l(198));hs||(hs=!0,Wo=j)}}function kn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ha(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 ma(e){if(kn(e)!==e)throw Error(l(188))}function sf(e){var t=e.alternate;if(!t){if(t=kn(e),t===null)throw Error(l(188));return t!==e?null:e}for(var n=e,s=t;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(s=i.return,s!==null){n=s;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return ma(i),e;if(c===s)return ma(i),t;c=c.sibling}throw Error(l(188))}if(n.return!==s.return)n=i,s=c;else{for(var f=!1,m=i.child;m;){if(m===n){f=!0,n=i,s=c;break}if(m===s){f=!0,s=i,n=c;break}m=m.sibling}if(!f){for(m=c.child;m;){if(m===n){f=!0,n=c,s=i;break}if(m===s){f=!0,s=c,n=i;break}m=m.sibling}if(!f)throw Error(l(189))}}if(n.alternate!==s)throw Error(l(190))}if(n.tag!==3)throw Error(l(188));return n.stateNode.current===n?e:t}function ga(e){return e=sf(e),e!==null?ya(e):null}function ya(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ya(e);if(t!==null)return t;e=e.sibling}return null}var xa=o.unstable_scheduleCallback,va=o.unstable_cancelCallback,of=o.unstable_shouldYield,lf=o.unstable_requestPaint,_e=o.unstable_now,af=o.unstable_getCurrentPriorityLevel,Vo=o.unstable_ImmediatePriority,wa=o.unstable_UserBlockingPriority,ms=o.unstable_NormalPriority,uf=o.unstable_LowPriority,Na=o.unstable_IdlePriority,gs=null,_t=null;function cf(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(gs,e,void 0,(e.current.flags&128)===128)}catch{}}var vt=Math.clz32?Math.clz32:pf,df=Math.log,ff=Math.LN2;function pf(e){return e>>>=0,e===0?32:31-(df(e)/ff|0)|0}var ys=64,xs=4194304;function Er(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vs(e,t){var n=e.pendingLanes;if(n===0)return 0;var s=0,i=e.suspendedLanes,c=e.pingedLanes,f=n&268435455;if(f!==0){var m=f&~i;m!==0?s=Er(m):(c&=f,c!==0&&(s=Er(c)))}else f=n&~i,f!==0?s=Er(f):c!==0&&(s=Er(c));if(s===0)return 0;if(t!==0&&t!==s&&(t&i)===0&&(i=s&-s,c=t&-t,i>=c||i===16&&(c&4194240)!==0))return t;if((s&4)!==0&&(s|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)n=31-vt(t),i=1<<n,s|=e[n],t&=~i;return s}function hf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mf(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes;0<c;){var f=31-vt(c),m=1<<f,y=i[f];y===-1?((m&n)===0||(m&s)!==0)&&(i[f]=hf(m,t)):y<=t&&(e.expiredLanes|=m),c&=~m}}function Ko(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ka(){var e=ys;return ys<<=1,(ys&4194240)===0&&(ys=64),e}function Qo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function gf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-vt(n),c=1<<i;t[i]=0,s[i]=-1,e[i]=-1,n&=~c}}function qo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-vt(n),i=1<<s;i&t|e[s]&t&&(e[s]|=t),n&=~i}}var me=0;function Sa(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ca,Yo,Ea,ja,_a,Go=!1,ws=[],Zt=null,en=null,tn=null,_r=new Map,br=new Map,nn=[],yf="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 submit".split(" ");function ba(e,t){switch(e){case"focusin":case"focusout":Zt=null;break;case"dragenter":case"dragleave":en=null;break;case"mouseover":case"mouseout":tn=null;break;case"pointerover":case"pointerout":_r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":br.delete(t.pointerId)}}function Rr(e,t,n,s,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Hr(t),t!==null&&Yo(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function xf(e,t,n,s,i){switch(t){case"focusin":return Zt=Rr(Zt,e,t,n,s,i),!0;case"dragenter":return en=Rr(en,e,t,n,s,i),!0;case"mouseover":return tn=Rr(tn,e,t,n,s,i),!0;case"pointerover":var c=i.pointerId;return _r.set(c,Rr(_r.get(c)||null,e,t,n,s,i)),!0;case"gotpointercapture":return c=i.pointerId,br.set(c,Rr(br.get(c)||null,e,t,n,s,i)),!0}return!1}function Ra(e){var t=Sn(e.target);if(t!==null){var n=kn(t);if(n!==null){if(t=n.tag,t===13){if(t=ha(n),t!==null){e.blockedOn=t,_a(e.priority,function(){Ea(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 Ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Fo=s,n.target.dispatchEvent(s),Fo=null}else return t=Hr(n),t!==null&&Yo(t),e.blockedOn=n,!1;t.shift()}return!0}function Ta(e,t,n){Ns(e)&&n.delete(t)}function vf(){Go=!1,Zt!==null&&Ns(Zt)&&(Zt=null),en!==null&&Ns(en)&&(en=null),tn!==null&&Ns(tn)&&(tn=null),_r.forEach(Ta),br.forEach(Ta)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Go||(Go=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,vf)))}function Pr(e){function t(i){return Tr(i,e)}if(0<ws.length){Tr(ws[0],e);for(var n=1;n<ws.length;n++){var s=ws[n];s.blockedOn===e&&(s.blockedOn=null)}}for(Zt!==null&&Tr(Zt,e),en!==null&&Tr(en,e),tn!==null&&Tr(tn,e),_r.forEach(t),br.forEach(t),n=0;n<nn.length;n++)s=nn[n],s.blockedOn===e&&(s.blockedOn=null);for(;0<nn.length&&(n=nn[0],n.blockedOn===null);)Ra(n),n.blockedOn===null&&nn.shift()}var Hn=re.ReactCurrentBatchConfig,ks=!0;function wf(e,t,n,s){var i=me,c=Hn.transition;Hn.transition=null;try{me=1,Xo(e,t,n,s)}finally{me=i,Hn.transition=c}}function Nf(e,t,n,s){var i=me,c=Hn.transition;Hn.transition=null;try{me=4,Xo(e,t,n,s)}finally{me=i,Hn.transition=c}}function Xo(e,t,n,s){if(ks){var i=Jo(e,t,n,s);if(i===null)ml(e,t,s,Ss,n),ba(e,s);else if(xf(i,e,t,n,s))s.stopPropagation();else if(ba(e,s),t&4&&-1<yf.indexOf(e)){for(;i!==null;){var c=Hr(i);if(c!==null&&Ca(c),c=Jo(e,t,n,s),c===null&&ml(e,t,s,Ss,n),c===i)break;i=c}i!==null&&s.stopPropagation()}else ml(e,t,s,null,n)}}var Ss=null;function Jo(e,t,n,s){if(Ss=null,e=zo(s),e=Sn(e),e!==null)if(t=kn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ha(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 Ss=e,null}function Pa(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(af()){case Vo:return 1;case wa:return 4;case ms:case uf:return 16;case Na:return 536870912;default:return 16}default:return 16}}var rn=null,Zo=null,Cs=null;function La(){if(Cs)return Cs;var e,t=Zo,n=t.length,s,i="value"in rn?rn.value:rn.textContent,c=i.length;for(e=0;e<n&&t[e]===i[e];e++);var f=n-e;for(s=1;s<=f&&t[n-s]===i[c-s];s++);return Cs=i.slice(e,1<s?1-s:void 0)}function Es(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 js(){return!0}function Aa(){return!1}function ot(e){function t(n,s,i,c,f){this._reactName=n,this._targetInst=i,this.type=s,this.nativeEvent=c,this.target=f,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(c):c[m]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?js:Aa,this.isPropagationStopped=Aa,this}return z(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=js)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=js)},persist:function(){},isPersistent:js}),t}var Wn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},el=ot(Wn),Lr=z({},Wn,{view:0,detail:0}),kf=ot(Lr),tl,nl,Ar,_s=z({},Lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sl,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!==Ar&&(Ar&&e.type==="mousemove"?(tl=e.screenX-Ar.screenX,nl=e.screenY-Ar.screenY):nl=tl=0,Ar=e),tl)},movementY:function(e){return"movementY"in e?e.movementY:nl}}),Oa=ot(_s),Sf=z({},_s,{dataTransfer:0}),Cf=ot(Sf),Ef=z({},Lr,{relatedTarget:0}),rl=ot(Ef),jf=z({},Wn,{animationName:0,elapsedTime:0,pseudoElement:0}),_f=ot(jf),bf=z({},Wn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rf=ot(bf),Tf=z({},Wn,{data:0}),Ia=ot(Tf),Pf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Lf={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"},Af={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Of(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Af[e])?!!t[e]:!1}function sl(){return Of}var If=z({},Lr,{key:function(e){if(e.key){var t=Pf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Lf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sl,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Df=ot(If),Mf=z({},_s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Da=ot(Mf),Bf=z({},Lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sl}),Ff=ot(Bf),zf=z({},Wn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uf=ot(zf),$f=z({},_s,{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}),Hf=ot($f),Wf=[9,13,27,32],ol=g&&"CompositionEvent"in window,Or=null;g&&"documentMode"in document&&(Or=document.documentMode);var Vf=g&&"TextEvent"in window&&!Or,Ma=g&&(!ol||Or&&8<Or&&11>=Or),Ba=" ",Fa=!1;function za(e,t){switch(e){case"keyup":return Wf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ua(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vn=!1;function Kf(e,t){switch(e){case"compositionend":return Ua(t);case"keypress":return t.which!==32?null:(Fa=!0,Ba);case"textInput":return e=t.data,e===Ba&&Fa?null:e;default:return null}}function Qf(e,t){if(Vn)return e==="compositionend"||!ol&&za(e,t)?(e=La(),Cs=Zo=rn=null,Vn=!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 Ma&&t.locale!=="ko"?null:t.data;default:return null}}var qf={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 $a(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qf[e.type]:t==="textarea"}function Ha(e,t,n,s){ua(s),t=Ls(t,"onChange"),0<t.length&&(n=new el("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var Ir=null,Dr=null;function Yf(e){iu(e,0)}function bs(e){var t=Gn(e);if(Ne(t))return e}function Gf(e,t){if(e==="change")return t}var Wa=!1;if(g){var ll;if(g){var il="oninput"in document;if(!il){var Va=document.createElement("div");Va.setAttribute("oninput","return;"),il=typeof Va.oninput=="function"}ll=il}else ll=!1;Wa=ll&&(!document.documentMode||9<document.documentMode)}function Ka(){Ir&&(Ir.detachEvent("onpropertychange",Qa),Dr=Ir=null)}function Qa(e){if(e.propertyName==="value"&&bs(Dr)){var t=[];Ha(t,Dr,e,zo(e)),pa(Yf,t)}}function Xf(e,t,n){e==="focusin"?(Ka(),Ir=t,Dr=n,Ir.attachEvent("onpropertychange",Qa)):e==="focusout"&&Ka()}function Jf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bs(Dr)}function Zf(e,t){if(e==="click")return bs(t)}function ep(e,t){if(e==="input"||e==="change")return bs(t)}function tp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:tp;function Mr(e,t){if(wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var i=n[s];if(!v.call(t,i)||!wt(e[i],t[i]))return!1}return!0}function qa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ya(e,t){var n=qa(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=qa(n)}}function Ga(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ga(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xa(){for(var e=window,t=Ue();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ue(e.document)}return t}function al(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")}function np(e){var t=Xa(),n=e.focusedElem,s=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ga(n.ownerDocument.documentElement,n)){if(s!==null&&al(n)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,c=Math.min(s.start,i);s=s.end===void 0?c:Math.min(s.end,i),!e.extend&&c>s&&(i=s,s=c,c=i),i=Ya(n,c);var f=Ya(n,s);i&&f&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==f.node||e.focusOffset!==f.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),c>s?(e.addRange(t),e.extend(f.node,f.offset)):(t.setEnd(f.node,f.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rp=g&&"documentMode"in document&&11>=document.documentMode,Kn=null,ul=null,Br=null,cl=!1;function Ja(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cl||Kn==null||Kn!==Ue(s)||(s=Kn,"selectionStart"in s&&al(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Br&&Mr(Br,s)||(Br=s,s=Ls(ul,"onSelect"),0<s.length&&(t=new el("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Kn)))}function Rs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Qn={animationend:Rs("Animation","AnimationEnd"),animationiteration:Rs("Animation","AnimationIteration"),animationstart:Rs("Animation","AnimationStart"),transitionend:Rs("Transition","TransitionEnd")},dl={},Za={};g&&(Za=document.createElement("div").style,"AnimationEvent"in window||(delete Qn.animationend.animation,delete Qn.animationiteration.animation,delete Qn.animationstart.animation),"TransitionEvent"in window||delete Qn.transitionend.transition);function Ts(e){if(dl[e])return dl[e];if(!Qn[e])return e;var t=Qn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Za)return dl[e]=t[n];return e}var eu=Ts("animationend"),tu=Ts("animationiteration"),nu=Ts("animationstart"),ru=Ts("transitionend"),su=new Map,ou="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function sn(e,t){su.set(e,t),p(t,[e])}for(var fl=0;fl<ou.length;fl++){var pl=ou[fl],sp=pl.toLowerCase(),op=pl[0].toUpperCase()+pl.slice(1);sn(sp,"on"+op)}sn(eu,"onAnimationEnd"),sn(tu,"onAnimationIteration"),sn(nu,"onAnimationStart"),sn("dblclick","onDoubleClick"),sn("focusin","onFocus"),sn("focusout","onBlur"),sn(ru,"onTransitionEnd"),h("onMouseEnter",["mouseout","mouseover"]),h("onMouseLeave",["mouseout","mouseover"]),h("onPointerEnter",["pointerout","pointerover"]),h("onPointerLeave",["pointerout","pointerover"]),p("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),p("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),p("onBeforeInput",["compositionend","keypress","textInput","paste"]),p("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),p("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fr="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(" "),lp=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fr));function lu(e,t,n){var s=e.type||"unknown-event";e.currentTarget=n,rf(s,t,void 0,e),e.currentTarget=null}function iu(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],i=s.event;s=s.listeners;e:{var c=void 0;if(t)for(var f=s.length-1;0<=f;f--){var m=s[f],y=m.instance,j=m.currentTarget;if(m=m.listener,y!==c&&i.isPropagationStopped())break e;lu(i,m,j),c=y}else for(f=0;f<s.length;f++){if(m=s[f],y=m.instance,j=m.currentTarget,m=m.listener,y!==c&&i.isPropagationStopped())break e;lu(i,m,j),c=y}}}if(hs)throw e=Wo,hs=!1,Wo=null,e}function ve(e,t){var n=t[Nl];n===void 0&&(n=t[Nl]=new Set);var s=e+"__bubble";n.has(s)||(au(t,e,2,!1),n.add(s))}function hl(e,t,n){var s=0;t&&(s|=4),au(n,e,s,t)}var Ps="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[Ps]){e[Ps]=!0,a.forEach(function(n){n!=="selectionchange"&&(lp.has(n)||hl(n,!1,e),hl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ps]||(t[Ps]=!0,hl("selectionchange",!1,t))}}function au(e,t,n,s){switch(Pa(t)){case 1:var i=wf;break;case 4:i=Nf;break;default:i=Xo}n=i.bind(null,t,n,e),i=void 0,!Ho||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),s?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 ml(e,t,n,s,i){var c=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var f=s.tag;if(f===3||f===4){var m=s.stateNode.containerInfo;if(m===i||m.nodeType===8&&m.parentNode===i)break;if(f===4)for(f=s.return;f!==null;){var y=f.tag;if((y===3||y===4)&&(y=f.stateNode.containerInfo,y===i||y.nodeType===8&&y.parentNode===i))return;f=f.return}for(;m!==null;){if(f=Sn(m),f===null)return;if(y=f.tag,y===5||y===6){s=c=f;continue e}m=m.parentNode}}s=s.return}pa(function(){var j=c,O=zo(n),I=[];e:{var A=su.get(e);if(A!==void 0){var V=el,Q=e;switch(e){case"keypress":if(Es(n)===0)break e;case"keydown":case"keyup":V=Df;break;case"focusin":Q="focus",V=rl;break;case"focusout":Q="blur",V=rl;break;case"beforeblur":case"afterblur":V=rl;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":V=Oa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Cf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=Ff;break;case eu:case tu:case nu:V=_f;break;case ru:V=Uf;break;case"scroll":V=kf;break;case"wheel":V=Hf;break;case"copy":case"cut":case"paste":V=Rf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Da}var Y=(t&4)!==0,be=!Y&&e==="scroll",C=Y?A!==null?A+"Capture":null:A;Y=[];for(var w=j,E;w!==null;){E=w;var M=E.stateNode;if(E.tag===5&&M!==null&&(E=M,C!==null&&(M=kr(w,C),M!=null&&Y.push(Ur(w,M,E)))),be)break;w=w.return}0<Y.length&&(A=new V(A,Q,null,n,O),I.push({event:A,listeners:Y}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",A&&n!==Fo&&(Q=n.relatedTarget||n.fromElement)&&(Sn(Q)||Q[Bt]))break e;if((V||A)&&(A=O.window===O?O:(A=O.ownerDocument)?A.defaultView||A.parentWindow:window,V?(Q=n.relatedTarget||n.toElement,V=j,Q=Q?Sn(Q):null,Q!==null&&(be=kn(Q),Q!==be||Q.tag!==5&&Q.tag!==6)&&(Q=null)):(V=null,Q=j),V!==Q)){if(Y=Oa,M="onMouseLeave",C="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Y=Da,M="onPointerLeave",C="onPointerEnter",w="pointer"),be=V==null?A:Gn(V),E=Q==null?A:Gn(Q),A=new Y(M,w+"leave",V,n,O),A.target=be,A.relatedTarget=E,M=null,Sn(O)===j&&(Y=new Y(C,w+"enter",Q,n,O),Y.target=E,Y.relatedTarget=be,M=Y),be=M,V&&Q)t:{for(Y=V,C=Q,w=0,E=Y;E;E=qn(E))w++;for(E=0,M=C;M;M=qn(M))E++;for(;0<w-E;)Y=qn(Y),w--;for(;0<E-w;)C=qn(C),E--;for(;w--;){if(Y===C||C!==null&&Y===C.alternate)break t;Y=qn(Y),C=qn(C)}Y=null}else Y=null;V!==null&&uu(I,A,V,Y,!1),Q!==null&&be!==null&&uu(I,be,Q,Y,!0)}}e:{if(A=j?Gn(j):window,V=A.nodeName&&A.nodeName.toLowerCase(),V==="select"||V==="input"&&A.type==="file")var G=Gf;else if($a(A))if(Wa)G=ep;else{G=Jf;var X=Xf}else(V=A.nodeName)&&V.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(G=Zf);if(G&&(G=G(e,j))){Ha(I,G,n,O);break e}X&&X(e,A,j),e==="focusout"&&(X=A._wrapperState)&&X.controlled&&A.type==="number"&&Bn(A,"number",A.value)}switch(X=j?Gn(j):window,e){case"focusin":($a(X)||X.contentEditable==="true")&&(Kn=X,ul=j,Br=null);break;case"focusout":Br=ul=Kn=null;break;case"mousedown":cl=!0;break;case"contextmenu":case"mouseup":case"dragend":cl=!1,Ja(I,n,O);break;case"selectionchange":if(rp)break;case"keydown":case"keyup":Ja(I,n,O)}var J;if(ol)e:{switch(e){case"compositionstart":var te="onCompositionStart";break e;case"compositionend":te="onCompositionEnd";break e;case"compositionupdate":te="onCompositionUpdate";break e}te=void 0}else Vn?za(e,n)&&(te="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(te="onCompositionStart");te&&(Ma&&n.locale!=="ko"&&(Vn||te!=="onCompositionStart"?te==="onCompositionEnd"&&Vn&&(J=La()):(rn=O,Zo="value"in rn?rn.value:rn.textContent,Vn=!0)),X=Ls(j,te),0<X.length&&(te=new Ia(te,e,null,n,O),I.push({event:te,listeners:X}),J?te.data=J:(J=Ua(n),J!==null&&(te.data=J)))),(J=Vf?Kf(e,n):Qf(e,n))&&(j=Ls(j,"onBeforeInput"),0<j.length&&(O=new Ia("onBeforeInput","beforeinput",null,n,O),I.push({event:O,listeners:j}),O.data=J))}iu(I,t)})}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ls(e,t){for(var n=t+"Capture",s=[];e!==null;){var i=e,c=i.stateNode;i.tag===5&&c!==null&&(i=c,c=kr(e,n),c!=null&&s.unshift(Ur(e,c,i)),c=kr(e,t),c!=null&&s.push(Ur(e,c,i))),e=e.return}return s}function qn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function uu(e,t,n,s,i){for(var c=t._reactName,f=[];n!==null&&n!==s;){var m=n,y=m.alternate,j=m.stateNode;if(y!==null&&y===s)break;m.tag===5&&j!==null&&(m=j,i?(y=kr(n,c),y!=null&&f.unshift(Ur(n,y,m))):i||(y=kr(n,c),y!=null&&f.push(Ur(n,y,m)))),n=n.return}f.length!==0&&e.push({event:t,listeners:f})}var ip=/\r\n?/g,ap=/\u0000|\uFFFD/g;function cu(e){return(typeof e=="string"?e:""+e).replace(ip,`
38
+ `).replace(ap,"")}function As(e,t,n){if(t=cu(t),cu(e)!==t&&n)throw Error(l(425))}function Os(){}var gl=null,yl=null;function xl(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vl=typeof setTimeout=="function"?setTimeout:void 0,up=typeof clearTimeout=="function"?clearTimeout:void 0,du=typeof Promise=="function"?Promise:void 0,cp=typeof queueMicrotask=="function"?queueMicrotask:typeof du<"u"?function(e){return du.resolve(null).then(e).catch(dp)}:vl;function dp(e){setTimeout(function(){throw e})}function wl(e,t){var n=t,s=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(s===0){e.removeChild(i),Pr(t);return}s--}else n!=="$"&&n!=="$?"&&n!=="$!"||s++;n=i}while(n);Pr(t)}function on(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function fu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Yn=Math.random().toString(36).slice(2),bt="__reactFiber$"+Yn,$r="__reactProps$"+Yn,Bt="__reactContainer$"+Yn,Nl="__reactEvents$"+Yn,fp="__reactListeners$"+Yn,pp="__reactHandles$"+Yn;function Sn(e){var t=e[bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bt]||n[bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=fu(e);e!==null;){if(n=e[bt])return n;e=fu(e)}return t}e=n,n=e.parentNode}return null}function Hr(e){return e=e[bt]||e[Bt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(l(33))}function Is(e){return e[$r]||null}var kl=[],Xn=-1;function ln(e){return{current:e}}function we(e){0>Xn||(e.current=kl[Xn],kl[Xn]=null,Xn--)}function xe(e,t){Xn++,kl[Xn]=e.current,e.current=t}var an={},We=ln(an),Ze=ln(!1),Cn=an;function Jn(e,t){var n=e.type.contextTypes;if(!n)return an;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var i={},c;for(c in n)i[c]=t[c];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function et(e){return e=e.childContextTypes,e!=null}function Ds(){we(Ze),we(We)}function pu(e,t,n){if(We.current!==an)throw Error(l(168));xe(We,t),xe(Ze,n)}function hu(e,t,n){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return n;s=s.getChildContext();for(var i in s)if(!(i in t))throw Error(l(108,ae(e)||"Unknown",i));return z({},n,s)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,Cn=We.current,xe(We,e),xe(Ze,Ze.current),!0}function mu(e,t,n){var s=e.stateNode;if(!s)throw Error(l(169));n?(e=hu(e,t,Cn),s.__reactInternalMemoizedMergedChildContext=e,we(Ze),we(We),xe(We,e)):we(Ze),xe(Ze,n)}var Ft=null,Bs=!1,Sl=!1;function gu(e){Ft===null?Ft=[e]:Ft.push(e)}function hp(e){Bs=!0,gu(e)}function un(){if(!Sl&&Ft!==null){Sl=!0;var e=0,t=me;try{var n=Ft;for(me=1;e<n.length;e++){var s=n[e];do s=s(!0);while(s!==null)}Ft=null,Bs=!1}catch(i){throw Ft!==null&&(Ft=Ft.slice(e+1)),xa(Vo,un),i}finally{me=t,Sl=!1}}return null}var Zn=[],er=0,Fs=null,zs=0,ct=[],dt=0,En=null,zt=1,Ut="";function jn(e,t){Zn[er++]=zs,Zn[er++]=Fs,Fs=e,zs=t}function yu(e,t,n){ct[dt++]=zt,ct[dt++]=Ut,ct[dt++]=En,En=e;var s=zt;e=Ut;var i=32-vt(s)-1;s&=~(1<<i),n+=1;var c=32-vt(t)+i;if(30<c){var f=i-i%5;c=(s&(1<<f)-1).toString(32),s>>=f,i-=f,zt=1<<32-vt(t)+i|n<<i|s,Ut=c+e}else zt=1<<c|n<<i|s,Ut=e}function Cl(e){e.return!==null&&(jn(e,1),yu(e,1,0))}function El(e){for(;e===Fs;)Fs=Zn[--er],Zn[er]=null,zs=Zn[--er],Zn[er]=null;for(;e===En;)En=ct[--dt],ct[dt]=null,Ut=ct[--dt],ct[dt]=null,zt=ct[--dt],ct[dt]=null}var lt=null,it=null,ke=!1,Nt=null;function xu(e,t){var n=mt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function vu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,lt=e,it=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,lt=e,it=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=En!==null?{id:zt,overflow:Ut}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,lt=e,it=null,!0):!1;default:return!1}}function jl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _l(e){if(ke){var t=it;if(t){var n=t;if(!vu(e,t)){if(jl(e))throw Error(l(418));t=on(n.nextSibling);var s=lt;t&&vu(e,t)?xu(s,n):(e.flags=e.flags&-4097|2,ke=!1,lt=e)}}else{if(jl(e))throw Error(l(418));e.flags=e.flags&-4097|2,ke=!1,lt=e}}}function wu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;lt=e}function Us(e){if(e!==lt)return!1;if(!ke)return wu(e),ke=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!xl(e.type,e.memoizedProps)),t&&(t=it)){if(jl(e))throw Nu(),Error(l(418));for(;t;)xu(e,t),t=on(t.nextSibling)}if(wu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){it=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}it=null}}else it=lt?on(e.stateNode.nextSibling):null;return!0}function Nu(){for(var e=it;e;)e=on(e.nextSibling)}function tr(){it=lt=null,ke=!1}function bl(e){Nt===null?Nt=[e]:Nt.push(e)}var mp=re.ReactCurrentBatchConfig;function Wr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(l(309));var s=n.stateNode}if(!s)throw Error(l(147,e));var i=s,c=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===c?t.ref:(t=function(f){var m=i.refs;f===null?delete m[c]:m[c]=f},t._stringRef=c,t)}if(typeof e!="string")throw Error(l(284));if(!n._owner)throw Error(l(290,e))}return e}function $s(e,t){throw e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ku(e){var t=e._init;return t(e._payload)}function Su(e){function t(C,w){if(e){var E=C.deletions;E===null?(C.deletions=[w],C.flags|=16):E.push(w)}}function n(C,w){if(!e)return null;for(;w!==null;)t(C,w),w=w.sibling;return null}function s(C,w){for(C=new Map;w!==null;)w.key!==null?C.set(w.key,w):C.set(w.index,w),w=w.sibling;return C}function i(C,w){return C=yn(C,w),C.index=0,C.sibling=null,C}function c(C,w,E){return C.index=E,e?(E=C.alternate,E!==null?(E=E.index,E<w?(C.flags|=2,w):E):(C.flags|=2,w)):(C.flags|=1048576,w)}function f(C){return e&&C.alternate===null&&(C.flags|=2),C}function m(C,w,E,M){return w===null||w.tag!==6?(w=vi(E,C.mode,M),w.return=C,w):(w=i(w,E),w.return=C,w)}function y(C,w,E,M){var G=E.type;return G===ge?O(C,w,E.props.children,M,E.key):w!==null&&(w.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Ae&&ku(G)===w.type)?(M=i(w,E.props),M.ref=Wr(C,w,E),M.return=C,M):(M=po(E.type,E.key,E.props,null,C.mode,M),M.ref=Wr(C,w,E),M.return=C,M)}function j(C,w,E,M){return w===null||w.tag!==4||w.stateNode.containerInfo!==E.containerInfo||w.stateNode.implementation!==E.implementation?(w=wi(E,C.mode,M),w.return=C,w):(w=i(w,E.children||[]),w.return=C,w)}function O(C,w,E,M,G){return w===null||w.tag!==7?(w=On(E,C.mode,M,G),w.return=C,w):(w=i(w,E),w.return=C,w)}function I(C,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return w=vi(""+w,C.mode,E),w.return=C,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ie:return E=po(w.type,w.key,w.props,null,C.mode,E),E.ref=Wr(C,null,w),E.return=C,E;case ce:return w=wi(w,C.mode,E),w.return=C,w;case Ae:var M=w._init;return I(C,M(w._payload),E)}if(Xt(w)||U(w))return w=On(w,C.mode,E,null),w.return=C,w;$s(C,w)}return null}function A(C,w,E,M){var G=w!==null?w.key:null;if(typeof E=="string"&&E!==""||typeof E=="number")return G!==null?null:m(C,w,""+E,M);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case ie:return E.key===G?y(C,w,E,M):null;case ce:return E.key===G?j(C,w,E,M):null;case Ae:return G=E._init,A(C,w,G(E._payload),M)}if(Xt(E)||U(E))return G!==null?null:O(C,w,E,M,null);$s(C,E)}return null}function V(C,w,E,M,G){if(typeof M=="string"&&M!==""||typeof M=="number")return C=C.get(E)||null,m(w,C,""+M,G);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case ie:return C=C.get(M.key===null?E:M.key)||null,y(w,C,M,G);case ce:return C=C.get(M.key===null?E:M.key)||null,j(w,C,M,G);case Ae:var X=M._init;return V(C,w,E,X(M._payload),G)}if(Xt(M)||U(M))return C=C.get(E)||null,O(w,C,M,G,null);$s(w,M)}return null}function Q(C,w,E,M){for(var G=null,X=null,J=w,te=w=0,Fe=null;J!==null&&te<E.length;te++){J.index>te?(Fe=J,J=null):Fe=J.sibling;var pe=A(C,J,E[te],M);if(pe===null){J===null&&(J=Fe);break}e&&J&&pe.alternate===null&&t(C,J),w=c(pe,w,te),X===null?G=pe:X.sibling=pe,X=pe,J=Fe}if(te===E.length)return n(C,J),ke&&jn(C,te),G;if(J===null){for(;te<E.length;te++)J=I(C,E[te],M),J!==null&&(w=c(J,w,te),X===null?G=J:X.sibling=J,X=J);return ke&&jn(C,te),G}for(J=s(C,J);te<E.length;te++)Fe=V(J,C,te,E[te],M),Fe!==null&&(e&&Fe.alternate!==null&&J.delete(Fe.key===null?te:Fe.key),w=c(Fe,w,te),X===null?G=Fe:X.sibling=Fe,X=Fe);return e&&J.forEach(function(xn){return t(C,xn)}),ke&&jn(C,te),G}function Y(C,w,E,M){var G=U(E);if(typeof G!="function")throw Error(l(150));if(E=G.call(E),E==null)throw Error(l(151));for(var X=G=null,J=w,te=w=0,Fe=null,pe=E.next();J!==null&&!pe.done;te++,pe=E.next()){J.index>te?(Fe=J,J=null):Fe=J.sibling;var xn=A(C,J,pe.value,M);if(xn===null){J===null&&(J=Fe);break}e&&J&&xn.alternate===null&&t(C,J),w=c(xn,w,te),X===null?G=xn:X.sibling=xn,X=xn,J=Fe}if(pe.done)return n(C,J),ke&&jn(C,te),G;if(J===null){for(;!pe.done;te++,pe=E.next())pe=I(C,pe.value,M),pe!==null&&(w=c(pe,w,te),X===null?G=pe:X.sibling=pe,X=pe);return ke&&jn(C,te),G}for(J=s(C,J);!pe.done;te++,pe=E.next())pe=V(J,C,te,pe.value,M),pe!==null&&(e&&pe.alternate!==null&&J.delete(pe.key===null?te:pe.key),w=c(pe,w,te),X===null?G=pe:X.sibling=pe,X=pe);return e&&J.forEach(function(qp){return t(C,qp)}),ke&&jn(C,te),G}function be(C,w,E,M){if(typeof E=="object"&&E!==null&&E.type===ge&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case ie:e:{for(var G=E.key,X=w;X!==null;){if(X.key===G){if(G=E.type,G===ge){if(X.tag===7){n(C,X.sibling),w=i(X,E.props.children),w.return=C,C=w;break e}}else if(X.elementType===G||typeof G=="object"&&G!==null&&G.$$typeof===Ae&&ku(G)===X.type){n(C,X.sibling),w=i(X,E.props),w.ref=Wr(C,X,E),w.return=C,C=w;break e}n(C,X);break}else t(C,X);X=X.sibling}E.type===ge?(w=On(E.props.children,C.mode,M,E.key),w.return=C,C=w):(M=po(E.type,E.key,E.props,null,C.mode,M),M.ref=Wr(C,w,E),M.return=C,C=M)}return f(C);case ce:e:{for(X=E.key;w!==null;){if(w.key===X)if(w.tag===4&&w.stateNode.containerInfo===E.containerInfo&&w.stateNode.implementation===E.implementation){n(C,w.sibling),w=i(w,E.children||[]),w.return=C,C=w;break e}else{n(C,w);break}else t(C,w);w=w.sibling}w=wi(E,C.mode,M),w.return=C,C=w}return f(C);case Ae:return X=E._init,be(C,w,X(E._payload),M)}if(Xt(E))return Q(C,w,E,M);if(U(E))return Y(C,w,E,M);$s(C,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,w!==null&&w.tag===6?(n(C,w.sibling),w=i(w,E),w.return=C,C=w):(n(C,w),w=vi(E,C.mode,M),w.return=C,C=w),f(C)):n(C,w)}return be}var nr=Su(!0),Cu=Su(!1),Hs=ln(null),Ws=null,rr=null,Rl=null;function Tl(){Rl=rr=Ws=null}function Pl(e){var t=Hs.current;we(Hs),e._currentValue=t}function Ll(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function sr(e,t){Ws=e,Rl=rr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(tt=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(Rl!==e)if(e={context:e,memoizedValue:t,next:null},rr===null){if(Ws===null)throw Error(l(308));rr=e,Ws.dependencies={lanes:0,firstContext:e}}else rr=rr.next=e;return t}var _n=null;function Al(e){_n===null?_n=[e]:_n.push(e)}function Eu(e,t,n,s){var i=t.interleaved;return i===null?(n.next=n,Al(t)):(n.next=i.next,i.next=n),t.interleaved=n,$t(e,s)}function $t(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var cn=!1;function Ol(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ju(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ht(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dn(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(fe&2)!==0){var i=s.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),s.pending=t,$t(e,n)}return i=s.interleaved,i===null?(t.next=t,Al(s)):(t.next=i.next,i.next=t),s.interleaved=t,$t(e,n)}function Vs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,qo(e,n)}}function _u(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var f={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};c===null?i=c=f:c=c.next=f,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:s.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:s.shared,effects:s.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ks(e,t,n,s){var i=e.updateQueue;cn=!1;var c=i.firstBaseUpdate,f=i.lastBaseUpdate,m=i.shared.pending;if(m!==null){i.shared.pending=null;var y=m,j=y.next;y.next=null,f===null?c=j:f.next=j,f=y;var O=e.alternate;O!==null&&(O=O.updateQueue,m=O.lastBaseUpdate,m!==f&&(m===null?O.firstBaseUpdate=j:m.next=j,O.lastBaseUpdate=y))}if(c!==null){var I=i.baseState;f=0,O=j=y=null,m=c;do{var A=m.lane,V=m.eventTime;if((s&A)===A){O!==null&&(O=O.next={eventTime:V,lane:0,tag:m.tag,payload:m.payload,callback:m.callback,next:null});e:{var Q=e,Y=m;switch(A=t,V=n,Y.tag){case 1:if(Q=Y.payload,typeof Q=="function"){I=Q.call(V,I,A);break e}I=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=Y.payload,A=typeof Q=="function"?Q.call(V,I,A):Q,A==null)break e;I=z({},I,A);break e;case 2:cn=!0}}m.callback!==null&&m.lane!==0&&(e.flags|=64,A=i.effects,A===null?i.effects=[m]:A.push(m))}else V={eventTime:V,lane:A,tag:m.tag,payload:m.payload,callback:m.callback,next:null},O===null?(j=O=V,y=I):O=O.next=V,f|=A;if(m=m.next,m===null){if(m=i.shared.pending,m===null)break;A=m,m=A.next,A.next=null,i.lastBaseUpdate=A,i.shared.pending=null}}while(!0);if(O===null&&(y=I),i.baseState=y,i.firstBaseUpdate=j,i.lastBaseUpdate=O,t=i.shared.interleaved,t!==null){i=t;do f|=i.lane,i=i.next;while(i!==t)}else c===null&&(i.shared.lanes=0);Tn|=f,e.lanes=f,e.memoizedState=I}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],i=s.callback;if(i!==null){if(s.callback=null,s=n,typeof i!="function")throw Error(l(191,i));i.call(s)}}}var Vr={},Rt=ln(Vr),Kr=ln(Vr),Qr=ln(Vr);function bn(e){if(e===Vr)throw Error(l(174));return e}function Il(e,t){switch(xe(Qr,t),xe(Kr,e),xe(Rt,Vr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:zn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=zn(t,e)}we(Rt),xe(Rt,t)}function or(){we(Rt),we(Kr),we(Qr)}function Ru(e){bn(Qr.current);var t=bn(Rt.current),n=zn(t,e.type);t!==n&&(xe(Kr,e),xe(Rt,n))}function Dl(e){Kr.current===e&&(we(Rt),we(Kr))}var Se=ln(0);function Qs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 Ml=[];function Bl(){for(var e=0;e<Ml.length;e++)Ml[e]._workInProgressVersionPrimary=null;Ml.length=0}var qs=re.ReactCurrentDispatcher,Fl=re.ReactCurrentBatchConfig,Rn=0,Ce=null,Ie=null,Me=null,Ys=!1,qr=!1,Yr=0,gp=0;function Ve(){throw Error(l(321))}function zl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Ul(e,t,n,s,i,c){if(Rn=c,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qs.current=e===null||e.memoizedState===null?wp:Np,e=n(s,i),qr){c=0;do{if(qr=!1,Yr=0,25<=c)throw Error(l(301));c+=1,Me=Ie=null,t.updateQueue=null,qs.current=kp,e=n(s,i)}while(qr)}if(qs.current=Js,t=Ie!==null&&Ie.next!==null,Rn=0,Me=Ie=Ce=null,Ys=!1,t)throw Error(l(300));return e}function $l(){var e=Yr!==0;return Yr=0,e}function Tt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?Ce.memoizedState=Me=e:Me=Me.next=e,Me}function pt(){if(Ie===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=Me===null?Ce.memoizedState:Me.next;if(t!==null)Me=t,Ie=e;else{if(e===null)throw Error(l(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},Me===null?Ce.memoizedState=Me=e:Me=Me.next=e}return Me}function Gr(e,t){return typeof t=="function"?t(e):t}function Hl(e){var t=pt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var s=Ie,i=s.baseQueue,c=n.pending;if(c!==null){if(i!==null){var f=i.next;i.next=c.next,c.next=f}s.baseQueue=i=c,n.pending=null}if(i!==null){c=i.next,s=s.baseState;var m=f=null,y=null,j=c;do{var O=j.lane;if((Rn&O)===O)y!==null&&(y=y.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),s=j.hasEagerState?j.eagerState:e(s,j.action);else{var I={lane:O,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};y===null?(m=y=I,f=s):y=y.next=I,Ce.lanes|=O,Tn|=O}j=j.next}while(j!==null&&j!==c);y===null?f=s:y.next=m,wt(s,t.memoizedState)||(tt=!0),t.memoizedState=s,t.baseState=f,t.baseQueue=y,n.lastRenderedState=s}if(e=n.interleaved,e!==null){i=e;do c=i.lane,Ce.lanes|=c,Tn|=c,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wl(e){var t=pt(),n=t.queue;if(n===null)throw Error(l(311));n.lastRenderedReducer=e;var s=n.dispatch,i=n.pending,c=t.memoizedState;if(i!==null){n.pending=null;var f=i=i.next;do c=e(c,f.action),f=f.next;while(f!==i);wt(c,t.memoizedState)||(tt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,s]}function Tu(){}function Pu(e,t){var n=Ce,s=pt(),i=t(),c=!wt(s.memoizedState,i);if(c&&(s.memoizedState=i,tt=!0),s=s.queue,Vl(Ou.bind(null,n,s,e),[e]),s.getSnapshot!==t||c||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Xr(9,Au.bind(null,n,s,i,t),void 0,null),Be===null)throw Error(l(349));(Rn&30)!==0||Lu(n,t,i)}return i}function Lu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Au(e,t,n,s){t.value=n,t.getSnapshot=s,Iu(t)&&Du(e)}function Ou(e,t,n){return n(function(){Iu(t)&&Du(e)})}function Iu(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wt(e,n)}catch{return!0}}function Du(e){var t=$t(e,1);t!==null&&Et(t,e,1,-1)}function Mu(e){var t=Tt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:e},t.queue=e,e=e.dispatch=vp.bind(null,Ce,e),[t.memoizedState,e]}function Xr(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},t=Ce.updateQueue,t===null?(t={lastEffect:null,stores:null},Ce.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e)),e}function Bu(){return pt().memoizedState}function Gs(e,t,n,s){var i=Tt();Ce.flags|=e,i.memoizedState=Xr(1|t,n,void 0,s===void 0?null:s)}function Xs(e,t,n,s){var i=pt();s=s===void 0?null:s;var c=void 0;if(Ie!==null){var f=Ie.memoizedState;if(c=f.destroy,s!==null&&zl(s,f.deps)){i.memoizedState=Xr(t,n,c,s);return}}Ce.flags|=e,i.memoizedState=Xr(1|t,n,c,s)}function Fu(e,t){return Gs(8390656,8,e,t)}function Vl(e,t){return Xs(2048,8,e,t)}function zu(e,t){return Xs(4,2,e,t)}function Uu(e,t){return Xs(4,4,e,t)}function $u(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hu(e,t,n){return n=n!=null?n.concat([e]):null,Xs(4,4,$u.bind(null,t,e),n)}function Kl(){}function Wu(e,t){var n=pt();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&zl(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Vu(e,t){var n=pt();t=t===void 0?null:t;var s=n.memoizedState;return s!==null&&t!==null&&zl(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function Ku(e,t,n){return(Rn&21)===0?(e.baseState&&(e.baseState=!1,tt=!0),e.memoizedState=n):(wt(n,t)||(n=ka(),Ce.lanes|=n,Tn|=n,e.baseState=!0),t)}function yp(e,t){var n=me;me=n!==0&&4>n?n:4,e(!0);var s=Fl.transition;Fl.transition={};try{e(!1),t()}finally{me=n,Fl.transition=s}}function Qu(){return pt().memoizedState}function xp(e,t,n){var s=mn(e);if(n={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null},qu(e))Yu(t,n);else if(n=Eu(e,t,n,s),n!==null){var i=Xe();Et(n,e,s,i),Gu(n,t,s)}}function vp(e,t,n){var s=mn(e),i={lane:s,action:n,hasEagerState:!1,eagerState:null,next:null};if(qu(e))Yu(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var f=t.lastRenderedState,m=c(f,n);if(i.hasEagerState=!0,i.eagerState=m,wt(m,f)){var y=t.interleaved;y===null?(i.next=i,Al(t)):(i.next=y.next,y.next=i),t.interleaved=i;return}}catch{}finally{}n=Eu(e,t,i,s),n!==null&&(i=Xe(),Et(n,e,s,i),Gu(n,t,s))}}function qu(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Yu(e,t){qr=Ys=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Gu(e,t,n){if((n&4194240)!==0){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,qo(e,n)}}var Js={readContext:ft,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},wp={readContext:ft,useCallback:function(e,t){return Tt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Fu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4194308,4,$u.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gs(4,2,e,t)},useMemo:function(e,t){var n=Tt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=Tt();return t=n!==void 0?n(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=xp.bind(null,Ce,e),[s.memoizedState,e]},useRef:function(e){var t=Tt();return e={current:e},t.memoizedState=e},useState:Mu,useDebugValue:Kl,useDeferredValue:function(e){return Tt().memoizedState=e},useTransition:function(){var e=Mu(!1),t=e[0];return e=yp.bind(null,e[1]),Tt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var s=Ce,i=Tt();if(ke){if(n===void 0)throw Error(l(407));n=n()}else{if(n=t(),Be===null)throw Error(l(349));(Rn&30)!==0||Lu(s,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,Fu(Ou.bind(null,s,c,e),[e]),s.flags|=2048,Xr(9,Au.bind(null,s,c,n,t),void 0,null),n},useId:function(){var e=Tt(),t=Be.identifierPrefix;if(ke){var n=Ut,s=zt;n=(s&~(1<<32-vt(s)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=gp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Np={readContext:ft,useCallback:Wu,useContext:ft,useEffect:Vl,useImperativeHandle:Hu,useInsertionEffect:zu,useLayoutEffect:Uu,useMemo:Vu,useReducer:Hl,useRef:Bu,useState:function(){return Hl(Gr)},useDebugValue:Kl,useDeferredValue:function(e){var t=pt();return Ku(t,Ie.memoizedState,e)},useTransition:function(){var e=Hl(Gr)[0],t=pt().memoizedState;return[e,t]},useMutableSource:Tu,useSyncExternalStore:Pu,useId:Qu,unstable_isNewReconciler:!1},kp={readContext:ft,useCallback:Wu,useContext:ft,useEffect:Vl,useImperativeHandle:Hu,useInsertionEffect:zu,useLayoutEffect:Uu,useMemo:Vu,useReducer:Wl,useRef:Bu,useState:function(){return Wl(Gr)},useDebugValue:Kl,useDeferredValue:function(e){var t=pt();return Ie===null?t.memoizedState=e:Ku(t,Ie.memoizedState,e)},useTransition:function(){var e=Wl(Gr)[0],t=pt().memoizedState;return[e,t]},useMutableSource:Tu,useSyncExternalStore:Pu,useId:Qu,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=z({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ql(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?kn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Xe(),i=mn(e),c=Ht(s,i);c.payload=t,n!=null&&(c.callback=n),t=dn(e,c,i),t!==null&&(Et(t,e,i,s),Vs(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Xe(),i=mn(e),c=Ht(s,i);c.tag=1,c.payload=t,n!=null&&(c.callback=n),t=dn(e,c,i),t!==null&&(Et(t,e,i,s),Vs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xe(),s=mn(e),i=Ht(n,s);i.tag=2,t!=null&&(i.callback=t),t=dn(e,i,s),t!==null&&(Et(t,e,s,n),Vs(t,e,s))}};function Xu(e,t,n,s,i,c,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,c,f):t.prototype&&t.prototype.isPureReactComponent?!Mr(n,s)||!Mr(i,c):!0}function Ju(e,t,n){var s=!1,i=an,c=t.contextType;return typeof c=="object"&&c!==null?c=ft(c):(i=et(t)?Cn:We.current,s=t.contextTypes,c=(s=s!=null)?Jn(e,i):an),t=new t(n,c),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=c),t}function Zu(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Zs.enqueueReplaceState(t,t.state,null)}function ql(e,t,n,s){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ol(e);var c=t.contextType;typeof c=="object"&&c!==null?i.context=ft(c):(c=et(t)?Cn:We.current,i.context=Jn(e,c)),i.state=e.memoizedState,c=t.getDerivedStateFromProps,typeof c=="function"&&(Ql(e,t,c,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Zs.enqueueReplaceState(i,i.state,null),Ks(e,n,i,s),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function lr(e,t){try{var n="",s=t;do n+=se(s),s=s.return;while(s);var i=n}catch(c){i=`
39
+ Error generating stack: `+c.message+`
40
+ `+c.stack}return{value:e,source:t,stack:i,digest:null}}function Yl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Gl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Sp=typeof WeakMap=="function"?WeakMap:Map;function ec(e,t,n){n=Ht(-1,n),n.tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){lo||(lo=!0,di=s),Gl(e,t)},n}function tc(e,t,n){n=Ht(-1,n),n.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var i=t.value;n.payload=function(){return s(i)},n.callback=function(){Gl(e,t)}}var c=e.stateNode;return c!==null&&typeof c.componentDidCatch=="function"&&(n.callback=function(){Gl(e,t),typeof s!="function"&&(pn===null?pn=new Set([this]):pn.add(this));var f=t.stack;this.componentDidCatch(t.value,{componentStack:f!==null?f:""})}),n}function nc(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new Sp;var i=new Set;s.set(t,i)}else i=s.get(t),i===void 0&&(i=new Set,s.set(t,i));i.has(n)||(i.add(n),e=Mp.bind(null,e,t,n),t.then(e,e))}function rc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function sc(e,t,n,s,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ht(-1,1),t.tag=2,dn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Cp=re.ReactCurrentOwner,tt=!1;function Ge(e,t,n,s){t.child=e===null?Cu(t,null,n,s):nr(t,e.child,n,s)}function oc(e,t,n,s,i){n=n.render;var c=t.ref;return sr(t,i),s=Ul(e,t,n,s,c,i),n=$l(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wt(e,t,i)):(ke&&n&&Cl(t),t.flags|=1,Ge(e,t,s,i),t.child)}function lc(e,t,n,s,i){if(e===null){var c=n.type;return typeof c=="function"&&!xi(c)&&c.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=c,ic(e,t,c,s,i)):(e=po(n.type,null,s,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,(e.lanes&i)===0){var f=c.memoizedProps;if(n=n.compare,n=n!==null?n:Mr,n(f,s)&&e.ref===t.ref)return Wt(e,t,i)}return t.flags|=1,e=yn(c,s),e.ref=t.ref,e.return=t,t.child=e}function ic(e,t,n,s,i){if(e!==null){var c=e.memoizedProps;if(Mr(c,s)&&e.ref===t.ref)if(tt=!1,t.pendingProps=s=c,(e.lanes&i)!==0)(e.flags&131072)!==0&&(tt=!0);else return t.lanes=e.lanes,Wt(e,t,i)}return Xl(e,t,n,s,i)}function ac(e,t,n){var s=t.pendingProps,i=s.children,c=e!==null?e.memoizedState:null;if(s.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xe(ar,at),at|=n;else{if((n&1073741824)===0)return e=c!==null?c.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xe(ar,at),at|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=c!==null?c.baseLanes:n,xe(ar,at),at|=s}else c!==null?(s=c.baseLanes|n,t.memoizedState=null):s=n,xe(ar,at),at|=s;return Ge(e,t,i,n),t.child}function uc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xl(e,t,n,s,i){var c=et(n)?Cn:We.current;return c=Jn(t,c),sr(t,i),n=Ul(e,t,n,s,c,i),s=$l(),e!==null&&!tt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wt(e,t,i)):(ke&&s&&Cl(t),t.flags|=1,Ge(e,t,n,i),t.child)}function cc(e,t,n,s,i){if(et(n)){var c=!0;Ms(t)}else c=!1;if(sr(t,i),t.stateNode===null)to(e,t),Ju(t,n,s),ql(t,n,s,i),s=!0;else if(e===null){var f=t.stateNode,m=t.memoizedProps;f.props=m;var y=f.context,j=n.contextType;typeof j=="object"&&j!==null?j=ft(j):(j=et(n)?Cn:We.current,j=Jn(t,j));var O=n.getDerivedStateFromProps,I=typeof O=="function"||typeof f.getSnapshotBeforeUpdate=="function";I||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(m!==s||y!==j)&&Zu(t,f,s,j),cn=!1;var A=t.memoizedState;f.state=A,Ks(t,s,f,i),y=t.memoizedState,m!==s||A!==y||Ze.current||cn?(typeof O=="function"&&(Ql(t,n,O,s),y=t.memoizedState),(m=cn||Xu(t,n,m,s,A,y,j))?(I||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=y),f.props=s,f.state=y,f.context=j,s=m):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,ju(e,t),m=t.memoizedProps,j=t.type===t.elementType?m:kt(t.type,m),f.props=j,I=t.pendingProps,A=f.context,y=n.contextType,typeof y=="object"&&y!==null?y=ft(y):(y=et(n)?Cn:We.current,y=Jn(t,y));var V=n.getDerivedStateFromProps;(O=typeof V=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(m!==I||A!==y)&&Zu(t,f,s,y),cn=!1,A=t.memoizedState,f.state=A,Ks(t,s,f,i);var Q=t.memoizedState;m!==I||A!==Q||Ze.current||cn?(typeof V=="function"&&(Ql(t,n,V,s),Q=t.memoizedState),(j=cn||Xu(t,n,j,s,A,Q,y)||!1)?(O||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,Q,y),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,Q,y)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=Q),f.props=s,f.state=Q,f.context=y,s=j):(typeof f.componentDidUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),s=!1)}return Jl(e,t,n,s,c,i)}function Jl(e,t,n,s,i,c){uc(e,t);var f=(t.flags&128)!==0;if(!s&&!f)return i&&mu(t,n,!1),Wt(e,t,c);s=t.stateNode,Cp.current=t;var m=f&&typeof n.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&f?(t.child=nr(t,e.child,null,c),t.child=nr(t,null,m,c)):Ge(e,t,m,c),t.memoizedState=s.state,i&&mu(t,n,!0),t.child}function dc(e){var t=e.stateNode;t.pendingContext?pu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&pu(e,t.context,!1),Il(e,t.containerInfo)}function fc(e,t,n,s,i){return tr(),bl(i),t.flags|=256,Ge(e,t,n,s),t.child}var Zl={dehydrated:null,treeContext:null,retryLane:0};function ei(e){return{baseLanes:e,cachePool:null,transitions:null}}function pc(e,t,n){var s=t.pendingProps,i=Se.current,c=!1,f=(t.flags&128)!==0,m;if((m=f)||(m=e!==null&&e.memoizedState===null?!1:(i&2)!==0),m?(c=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),xe(Se,i&1),e===null)return _l(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(f=s.children,e=s.fallback,c?(s=t.mode,c=t.child,f={mode:"hidden",children:f},(s&1)===0&&c!==null?(c.childLanes=0,c.pendingProps=f):c=ho(f,s,0,null),e=On(e,s,n,null),c.return=t,e.return=t,c.sibling=e,t.child=c,t.child.memoizedState=ei(n),t.memoizedState=Zl,e):ti(t,f));if(i=e.memoizedState,i!==null&&(m=i.dehydrated,m!==null))return Ep(e,t,f,s,m,i,n);if(c){c=s.fallback,f=t.mode,i=e.child,m=i.sibling;var y={mode:"hidden",children:s.children};return(f&1)===0&&t.child!==i?(s=t.child,s.childLanes=0,s.pendingProps=y,t.deletions=null):(s=yn(i,y),s.subtreeFlags=i.subtreeFlags&14680064),m!==null?c=yn(m,c):(c=On(c,f,n,null),c.flags|=2),c.return=t,s.return=t,s.sibling=c,t.child=s,s=c,c=t.child,f=e.child.memoizedState,f=f===null?ei(n):{baseLanes:f.baseLanes|n,cachePool:null,transitions:f.transitions},c.memoizedState=f,c.childLanes=e.childLanes&~n,t.memoizedState=Zl,s}return c=e.child,e=c.sibling,s=yn(c,{mode:"visible",children:s.children}),(t.mode&1)===0&&(s.lanes=n),s.return=t,s.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=s,t.memoizedState=null,s}function ti(e,t){return t=ho({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function eo(e,t,n,s){return s!==null&&bl(s),nr(t,e.child,null,n),e=ti(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ep(e,t,n,s,i,c,f){if(n)return t.flags&256?(t.flags&=-257,s=Yl(Error(l(422))),eo(e,t,f,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(c=s.fallback,i=t.mode,s=ho({mode:"visible",children:s.children},i,0,null),c=On(c,i,f,null),c.flags|=2,s.return=t,c.return=t,s.sibling=c,t.child=s,(t.mode&1)!==0&&nr(t,e.child,null,f),t.child.memoizedState=ei(f),t.memoizedState=Zl,c);if((t.mode&1)===0)return eo(e,t,f,null);if(i.data==="$!"){if(s=i.nextSibling&&i.nextSibling.dataset,s)var m=s.dgst;return s=m,c=Error(l(419)),s=Yl(c,s,void 0),eo(e,t,f,s)}if(m=(f&e.childLanes)!==0,tt||m){if(s=Be,s!==null){switch(f&-f){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(s.suspendedLanes|f))!==0?0:i,i!==0&&i!==c.retryLane&&(c.retryLane=i,$t(e,i),Et(s,e,i,-1))}return yi(),s=Yl(Error(l(421))),eo(e,t,f,s)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Bp.bind(null,e),i._reactRetry=t,null):(e=c.treeContext,it=on(i.nextSibling),lt=t,ke=!0,Nt=null,e!==null&&(ct[dt++]=zt,ct[dt++]=Ut,ct[dt++]=En,zt=e.id,Ut=e.overflow,En=t),t=ti(t,s.children),t.flags|=4096,t)}function hc(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ll(e.return,t,n)}function ni(e,t,n,s,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=s,c.tail=n,c.tailMode=i)}function mc(e,t,n){var s=t.pendingProps,i=s.revealOrder,c=s.tail;if(Ge(e,t,s.children,n),s=Se.current,(s&2)!==0)s=s&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hc(e,n,t);else if(e.tag===19)hc(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}s&=1}if(xe(Se,s),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Qs(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ni(t,!1,i,n,c);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Qs(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ni(t,!0,n,null,c);break;case"together":ni(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function to(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,n=yn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=yn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jp(e,t,n){switch(t.tag){case 3:dc(t),tr();break;case 5:Ru(t);break;case 1:et(t.type)&&Ms(t);break;case 4:Il(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,i=t.memoizedProps.value;xe(Hs,s._currentValue),s._currentValue=i;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(xe(Se,Se.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?pc(e,t,n):(xe(Se,Se.current&1),e=Wt(e,t,n),e!==null?e.sibling:null);xe(Se,Se.current&1);break;case 19:if(s=(n&t.childLanes)!==0,(e.flags&128)!==0){if(s)return mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),xe(Se,Se.current),s)break;return null;case 22:case 23:return t.lanes=0,ac(e,t,n)}return Wt(e,t,n)}var gc,ri,yc,xc;gc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},ri=function(){},yc=function(e,t,n,s){var i=e.memoizedProps;if(i!==s){e=t.stateNode,bn(Rt.current);var c=null;switch(n){case"input":i=xt(e,i),s=xt(e,s),c=[];break;case"select":i=z({},i,{value:void 0}),s=z({},s,{value:void 0}),c=[];break;case"textarea":i=Fn(e,i),s=Fn(e,s),c=[];break;default:typeof i.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=Os)}Mo(n,s);var f;n=null;for(j in i)if(!s.hasOwnProperty(j)&&i.hasOwnProperty(j)&&i[j]!=null)if(j==="style"){var m=i[j];for(f in m)m.hasOwnProperty(f)&&(n||(n={}),n[f]="")}else j!=="dangerouslySetInnerHTML"&&j!=="children"&&j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&j!=="autoFocus"&&(d.hasOwnProperty(j)?c||(c=[]):(c=c||[]).push(j,null));for(j in s){var y=s[j];if(m=i!=null?i[j]:void 0,s.hasOwnProperty(j)&&y!==m&&(y!=null||m!=null))if(j==="style")if(m){for(f in m)!m.hasOwnProperty(f)||y&&y.hasOwnProperty(f)||(n||(n={}),n[f]="");for(f in y)y.hasOwnProperty(f)&&m[f]!==y[f]&&(n||(n={}),n[f]=y[f])}else n||(c||(c=[]),c.push(j,n)),n=y;else j==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,m=m?m.__html:void 0,y!=null&&m!==y&&(c=c||[]).push(j,y)):j==="children"?typeof y!="string"&&typeof y!="number"||(c=c||[]).push(j,""+y):j!=="suppressContentEditableWarning"&&j!=="suppressHydrationWarning"&&(d.hasOwnProperty(j)?(y!=null&&j==="onScroll"&&ve("scroll",e),c||m===y||(c=[])):(c=c||[]).push(j,y))}n&&(c=c||[]).push("style",n);var j=c;(t.updateQueue=j)&&(t.flags|=4)}},xc=function(e,t,n,s){n!==s&&(t.flags|=4)};function Jr(e,t){if(!ke)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,s|=i.subtreeFlags&14680064,s|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,s|=i.subtreeFlags,s|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function _p(e,t,n){var s=t.pendingProps;switch(El(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return et(t.type)&&Ds(),Ke(t),null;case 3:return s=t.stateNode,or(),we(Ze),we(We),Bl(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Us(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nt!==null&&(hi(Nt),Nt=null))),ri(e,t),Ke(t),null;case 5:Dl(t);var i=bn(Qr.current);if(n=t.type,e!==null&&t.stateNode!=null)yc(e,t,n,s,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(l(166));return Ke(t),null}if(e=bn(Rt.current),Us(t)){s=t.stateNode,n=t.type;var c=t.memoizedProps;switch(s[bt]=t,s[$r]=c,e=(t.mode&1)!==0,n){case"dialog":ve("cancel",s),ve("close",s);break;case"iframe":case"object":case"embed":ve("load",s);break;case"video":case"audio":for(i=0;i<Fr.length;i++)ve(Fr[i],s);break;case"source":ve("error",s);break;case"img":case"image":case"link":ve("error",s),ve("load",s);break;case"details":ve("toggle",s);break;case"input":Yt(s,c),ve("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!c.multiple},ve("invalid",s);break;case"textarea":gr(s,c),ve("invalid",s)}Mo(n,c),i=null;for(var f in c)if(c.hasOwnProperty(f)){var m=c[f];f==="children"?typeof m=="string"?s.textContent!==m&&(c.suppressHydrationWarning!==!0&&As(s.textContent,m,e),i=["children",m]):typeof m=="number"&&s.textContent!==""+m&&(c.suppressHydrationWarning!==!0&&As(s.textContent,m,e),i=["children",""+m]):d.hasOwnProperty(f)&&m!=null&&f==="onScroll"&&ve("scroll",s)}switch(n){case"input":Z(s),mr(s,c,!0);break;case"textarea":Z(s),xr(s);break;case"select":case"option":break;default:typeof c.onClick=="function"&&(s.onclick=Os)}s=i,t.updateQueue=s,s!==null&&(t.flags|=4)}else{f=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=vr(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=f.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=f.createElement(n,{is:s.is}):(e=f.createElement(n),n==="select"&&(f=e,s.multiple?f.multiple=!0:s.size&&(f.size=s.size))):e=f.createElementNS(e,n),e[bt]=t,e[$r]=s,gc(e,t,!1,!1),t.stateNode=e;e:{switch(f=Bo(n,s),n){case"dialog":ve("cancel",e),ve("close",e),i=s;break;case"iframe":case"object":case"embed":ve("load",e),i=s;break;case"video":case"audio":for(i=0;i<Fr.length;i++)ve(Fr[i],e);i=s;break;case"source":ve("error",e),i=s;break;case"img":case"image":case"link":ve("error",e),ve("load",e),i=s;break;case"details":ve("toggle",e),i=s;break;case"input":Yt(e,s),i=xt(e,s),ve("invalid",e);break;case"option":i=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},i=z({},s,{value:void 0}),ve("invalid",e);break;case"textarea":gr(e,s),i=Fn(e,s),ve("invalid",e);break;default:i=s}Mo(n,i),m=i;for(c in m)if(m.hasOwnProperty(c)){var y=m[c];c==="style"?ia(e,y):c==="dangerouslySetInnerHTML"?(y=y?y.__html:void 0,y!=null&&wr(e,y)):c==="children"?typeof y=="string"?(n!=="textarea"||y!=="")&&Jt(e,y):typeof y=="number"&&Jt(e,""+y):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(d.hasOwnProperty(c)?y!=null&&c==="onScroll"&&ve("scroll",e):y!=null&&F(e,c,y,f))}switch(n){case"input":Z(e),mr(e,s,!1);break;case"textarea":Z(e),xr(e);break;case"option":s.value!=null&&e.setAttribute("value",""+le(s.value));break;case"select":e.multiple=!!s.multiple,c=s.value,c!=null?Mt(e,!!s.multiple,c,!1):s.defaultValue!=null&&Mt(e,!!s.multiple,s.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Os)}switch(n){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ke(t),null;case 6:if(e&&t.stateNode!=null)xc(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(l(166));if(n=bn(Qr.current),bn(Rt.current),Us(t)){if(s=t.stateNode,n=t.memoizedProps,s[bt]=t,(c=s.nodeValue!==n)&&(e=lt,e!==null))switch(e.tag){case 3:As(s.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&As(s.nodeValue,n,(e.mode&1)!==0)}c&&(t.flags|=4)}else s=(n.nodeType===9?n:n.ownerDocument).createTextNode(s),s[bt]=t,t.stateNode=s}return Ke(t),null;case 13:if(we(Se),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ke&&it!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Nu(),tr(),t.flags|=98560,c=!1;else if(c=Us(t),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(l(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(l(317));c[bt]=t}else tr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),c=!1}else Nt!==null&&(hi(Nt),Nt=null),c=!0;if(!c)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Se.current&1)!==0?De===0&&(De=3):yi())),t.updateQueue!==null&&(t.flags|=4),Ke(t),null);case 4:return or(),ri(e,t),e===null&&zr(t.stateNode.containerInfo),Ke(t),null;case 10:return Pl(t.type._context),Ke(t),null;case 17:return et(t.type)&&Ds(),Ke(t),null;case 19:if(we(Se),c=t.memoizedState,c===null)return Ke(t),null;if(s=(t.flags&128)!==0,f=c.rendering,f===null)if(s)Jr(c,!1);else{if(De!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Qs(e),f!==null){for(t.flags|=128,Jr(c,!1),s=f.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=n,n=t.child;n!==null;)c=n,e=s,c.flags&=14680066,f=c.alternate,f===null?(c.childLanes=0,c.lanes=e,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=f.childLanes,c.lanes=f.lanes,c.child=f.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=f.memoizedProps,c.memoizedState=f.memoizedState,c.updateQueue=f.updateQueue,c.type=f.type,e=f.dependencies,c.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xe(Se,Se.current&1|2),t.child}e=e.sibling}c.tail!==null&&_e()>ur&&(t.flags|=128,s=!0,Jr(c,!1),t.lanes=4194304)}else{if(!s)if(e=Qs(f),e!==null){if(t.flags|=128,s=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!f.alternate&&!ke)return Ke(t),null}else 2*_e()-c.renderingStartTime>ur&&n!==1073741824&&(t.flags|=128,s=!0,Jr(c,!1),t.lanes=4194304);c.isBackwards?(f.sibling=t.child,t.child=f):(n=c.last,n!==null?n.sibling=f:t.child=f,c.last=f)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=_e(),t.sibling=null,n=Se.current,xe(Se,s?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return gi(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&(t.mode&1)!==0?(at&1073741824)!==0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(l(156,t.tag))}function bp(e,t){switch(El(t),t.tag){case 1:return et(t.type)&&Ds(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return or(),we(Ze),we(We),Bl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Dl(t),null;case 13:if(we(Se),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));tr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Se),null;case 4:return or(),null;case 10:return Pl(t.type._context),null;case 22:case 23:return gi(),null;case 24:return null;default:return null}}var no=!1,Qe=!1,Rp=typeof WeakSet=="function"?WeakSet:Set,K=null;function ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(s){je(e,t,s)}else n.current=null}function si(e,t,n){try{n()}catch(s){je(e,t,s)}}var vc=!1;function Tp(e,t){if(gl=ks,e=Xa(),al(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var s=n.getSelection&&n.getSelection();if(s&&s.rangeCount!==0){n=s.anchorNode;var i=s.anchorOffset,c=s.focusNode;s=s.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var f=0,m=-1,y=-1,j=0,O=0,I=e,A=null;t:for(;;){for(var V;I!==n||i!==0&&I.nodeType!==3||(m=f+i),I!==c||s!==0&&I.nodeType!==3||(y=f+s),I.nodeType===3&&(f+=I.nodeValue.length),(V=I.firstChild)!==null;)A=I,I=V;for(;;){if(I===e)break t;if(A===n&&++j===i&&(m=f),A===c&&++O===s&&(y=f),(V=I.nextSibling)!==null)break;I=A,A=I.parentNode}I=V}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(yl={focusedElem:e,selectionRange:n},ks=!1,K=t;K!==null;)if(t=K,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,K=e;else for(;K!==null;){t=K;try{var Q=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Q!==null){var Y=Q.memoizedProps,be=Q.memoizedState,C=t.stateNode,w=C.getSnapshotBeforeUpdate(t.elementType===t.type?Y:kt(t.type,Y),be);C.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(l(163))}}catch(M){je(t,t.return,M)}if(e=t.sibling,e!==null){e.return=t.return,K=e;break}K=t.return}return Q=vc,vc=!1,Q}function Zr(e,t,n){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var i=s=s.next;do{if((i.tag&e)===e){var c=i.destroy;i.destroy=void 0,c!==void 0&&si(t,n,c)}i=i.next}while(i!==s)}}function ro(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function oi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wc(e){var t=e.alternate;t!==null&&(e.alternate=null,wc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bt],delete t[$r],delete t[Nl],delete t[fp],delete t[pp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Nc(e){return e.tag===5||e.tag===3||e.tag===4}function kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nc(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.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 li(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Os));else if(s!==4&&(e=e.child,e!==null))for(li(e,t,n),e=e.sibling;e!==null;)li(e,t,n),e=e.sibling}function ii(e,t,n){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(ii(e,t,n),e=e.sibling;e!==null;)ii(e,t,n),e=e.sibling}var $e=null,St=!1;function fn(e,t,n){for(n=n.child;n!==null;)Sc(e,t,n),n=n.sibling}function Sc(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(gs,n)}catch{}switch(n.tag){case 5:Qe||ir(n,t);case 6:var s=$e,i=St;$e=null,fn(e,t,n),$e=s,St=i,$e!==null&&(St?(e=$e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):$e.removeChild(n.stateNode));break;case 18:$e!==null&&(St?(e=$e,n=n.stateNode,e.nodeType===8?wl(e.parentNode,n):e.nodeType===1&&wl(e,n),Pr(e)):wl($e,n.stateNode));break;case 4:s=$e,i=St,$e=n.stateNode.containerInfo,St=!0,fn(e,t,n),$e=s,St=i;break;case 0:case 11:case 14:case 15:if(!Qe&&(s=n.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){i=s=s.next;do{var c=i,f=c.destroy;c=c.tag,f!==void 0&&((c&2)!==0||(c&4)!==0)&&si(n,t,f),i=i.next}while(i!==s)}fn(e,t,n);break;case 1:if(!Qe&&(ir(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=n.memoizedProps,s.state=n.memoizedState,s.componentWillUnmount()}catch(m){je(n,t,m)}fn(e,t,n);break;case 21:fn(e,t,n);break;case 22:n.mode&1?(Qe=(s=Qe)||n.memoizedState!==null,fn(e,t,n),Qe=s):fn(e,t,n);break;default:fn(e,t,n)}}function Cc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rp),t.forEach(function(s){var i=Fp.bind(null,e,s);n.has(s)||(n.add(s),s.then(i,i))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var s=0;s<n.length;s++){var i=n[s];try{var c=e,f=t,m=f;e:for(;m!==null;){switch(m.tag){case 5:$e=m.stateNode,St=!1;break e;case 3:$e=m.stateNode.containerInfo,St=!0;break e;case 4:$e=m.stateNode.containerInfo,St=!0;break e}m=m.return}if($e===null)throw Error(l(160));Sc(c,f,i),$e=null,St=!1;var y=i.alternate;y!==null&&(y.return=null),i.return=null}catch(j){je(i,t,j)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ec(t,e),t=t.sibling}function Ec(e,t){var n=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ct(t,e),Pt(e),s&4){try{Zr(3,e,e.return),ro(3,e)}catch(Y){je(e,e.return,Y)}try{Zr(5,e,e.return)}catch(Y){je(e,e.return,Y)}}break;case 1:Ct(t,e),Pt(e),s&512&&n!==null&&ir(n,n.return);break;case 5:if(Ct(t,e),Pt(e),s&512&&n!==null&&ir(n,n.return),e.flags&32){var i=e.stateNode;try{Jt(i,"")}catch(Y){je(e,e.return,Y)}}if(s&4&&(i=e.stateNode,i!=null)){var c=e.memoizedProps,f=n!==null?n.memoizedProps:c,m=e.type,y=e.updateQueue;if(e.updateQueue=null,y!==null)try{m==="input"&&c.type==="radio"&&c.name!=null&&Gt(i,c),Bo(m,f);var j=Bo(m,c);for(f=0;f<y.length;f+=2){var O=y[f],I=y[f+1];O==="style"?ia(i,I):O==="dangerouslySetInnerHTML"?wr(i,I):O==="children"?Jt(i,I):F(i,O,I,j)}switch(m){case"input":Dt(i,c);break;case"textarea":yr(i,c);break;case"select":var A=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!c.multiple;var V=c.value;V!=null?Mt(i,!!c.multiple,V,!1):A!==!!c.multiple&&(c.defaultValue!=null?Mt(i,!!c.multiple,c.defaultValue,!0):Mt(i,!!c.multiple,c.multiple?[]:"",!1))}i[$r]=c}catch(Y){je(e,e.return,Y)}}break;case 6:if(Ct(t,e),Pt(e),s&4){if(e.stateNode===null)throw Error(l(162));i=e.stateNode,c=e.memoizedProps;try{i.nodeValue=c}catch(Y){je(e,e.return,Y)}}break;case 3:if(Ct(t,e),Pt(e),s&4&&n!==null&&n.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(Y){je(e,e.return,Y)}break;case 4:Ct(t,e),Pt(e);break;case 13:Ct(t,e),Pt(e),i=e.child,i.flags&8192&&(c=i.memoizedState!==null,i.stateNode.isHidden=c,!c||i.alternate!==null&&i.alternate.memoizedState!==null||(ci=_e())),s&4&&Cc(e);break;case 22:if(O=n!==null&&n.memoizedState!==null,e.mode&1?(Qe=(j=Qe)||O,Ct(t,e),Qe=j):Ct(t,e),Pt(e),s&8192){if(j=e.memoizedState!==null,(e.stateNode.isHidden=j)&&!O&&(e.mode&1)!==0)for(K=e,O=e.child;O!==null;){for(I=K=O;K!==null;){switch(A=K,V=A.child,A.tag){case 0:case 11:case 14:case 15:Zr(4,A,A.return);break;case 1:ir(A,A.return);var Q=A.stateNode;if(typeof Q.componentWillUnmount=="function"){s=A,n=A.return;try{t=s,Q.props=t.memoizedProps,Q.state=t.memoizedState,Q.componentWillUnmount()}catch(Y){je(s,n,Y)}}break;case 5:ir(A,A.return);break;case 22:if(A.memoizedState!==null){bc(I);continue}}V!==null?(V.return=A,K=V):bc(I)}O=O.sibling}e:for(O=null,I=e;;){if(I.tag===5){if(O===null){O=I;try{i=I.stateNode,j?(c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none"):(m=I.stateNode,y=I.memoizedProps.style,f=y!=null&&y.hasOwnProperty("display")?y.display:null,m.style.display=la("display",f))}catch(Y){je(e,e.return,Y)}}}else if(I.tag===6){if(O===null)try{I.stateNode.nodeValue=j?"":I.memoizedProps}catch(Y){je(e,e.return,Y)}}else if((I.tag!==22&&I.tag!==23||I.memoizedState===null||I===e)&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===e)break e;for(;I.sibling===null;){if(I.return===null||I.return===e)break e;O===I&&(O=null),I=I.return}O===I&&(O=null),I.sibling.return=I.return,I=I.sibling}}break;case 19:Ct(t,e),Pt(e),s&4&&Cc(e);break;case 21:break;default:Ct(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Nc(n)){var s=n;break e}n=n.return}throw Error(l(160))}switch(s.tag){case 5:var i=s.stateNode;s.flags&32&&(Jt(i,""),s.flags&=-33);var c=kc(e);ii(e,c,i);break;case 3:case 4:var f=s.stateNode.containerInfo,m=kc(e);li(e,m,f);break;default:throw Error(l(161))}}catch(y){je(e,e.return,y)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pp(e,t,n){K=e,jc(e)}function jc(e,t,n){for(var s=(e.mode&1)!==0;K!==null;){var i=K,c=i.child;if(i.tag===22&&s){var f=i.memoizedState!==null||no;if(!f){var m=i.alternate,y=m!==null&&m.memoizedState!==null||Qe;m=no;var j=Qe;if(no=f,(Qe=y)&&!j)for(K=i;K!==null;)f=K,y=f.child,f.tag===22&&f.memoizedState!==null?Rc(i):y!==null?(y.return=f,K=y):Rc(i);for(;c!==null;)K=c,jc(c),c=c.sibling;K=i,no=m,Qe=j}_c(e)}else(i.subtreeFlags&8772)!==0&&c!==null?(c.return=i,K=c):_c(e)}}function _c(e){for(;K!==null;){var t=K;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Qe||ro(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!Qe)if(n===null)s.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);s.componentDidUpdate(i,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var c=t.updateQueue;c!==null&&bu(t,c,s);break;case 3:var f=t.updateQueue;if(f!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bu(t,f,n)}break;case 5:var m=t.stateNode;if(n===null&&t.flags&4){n=m;var y=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":y.autoFocus&&n.focus();break;case"img":y.src&&(n.src=y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var j=t.alternate;if(j!==null){var O=j.memoizedState;if(O!==null){var I=O.dehydrated;I!==null&&Pr(I)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(l(163))}Qe||t.flags&512&&oi(t)}catch(A){je(t,t.return,A)}}if(t===e){K=null;break}if(n=t.sibling,n!==null){n.return=t.return,K=n;break}K=t.return}}function bc(e){for(;K!==null;){var t=K;if(t===e){K=null;break}var n=t.sibling;if(n!==null){n.return=t.return,K=n;break}K=t.return}}function Rc(e){for(;K!==null;){var t=K;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ro(4,t)}catch(y){je(t,n,y)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var i=t.return;try{s.componentDidMount()}catch(y){je(t,i,y)}}var c=t.return;try{oi(t)}catch(y){je(t,c,y)}break;case 5:var f=t.return;try{oi(t)}catch(y){je(t,f,y)}}}catch(y){je(t,t.return,y)}if(t===e){K=null;break}var m=t.sibling;if(m!==null){m.return=t.return,K=m;break}K=t.return}}var Lp=Math.ceil,so=re.ReactCurrentDispatcher,ai=re.ReactCurrentOwner,ht=re.ReactCurrentBatchConfig,fe=0,Be=null,Pe=null,He=0,at=0,ar=ln(0),De=0,es=null,Tn=0,oo=0,ui=0,ts=null,nt=null,ci=0,ur=1/0,Vt=null,lo=!1,di=null,pn=null,io=!1,hn=null,ao=0,ns=0,fi=null,uo=-1,co=0;function Xe(){return(fe&6)!==0?_e():uo!==-1?uo:uo=_e()}function mn(e){return(e.mode&1)===0?1:(fe&2)!==0&&He!==0?He&-He:mp.transition!==null?(co===0&&(co=ka()),co):(e=me,e!==0||(e=window.event,e=e===void 0?16:Pa(e.type)),e)}function Et(e,t,n,s){if(50<ns)throw ns=0,fi=null,Error(l(185));jr(e,n,s),((fe&2)===0||e!==Be)&&(e===Be&&((fe&2)===0&&(oo|=n),De===4&&gn(e,He)),rt(e,s),n===1&&fe===0&&(t.mode&1)===0&&(ur=_e()+500,Bs&&un()))}function rt(e,t){var n=e.callbackNode;mf(e,t);var s=vs(e,e===Be?He:0);if(s===0)n!==null&&va(n),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(n!=null&&va(n),t===1)e.tag===0?hp(Pc.bind(null,e)):gu(Pc.bind(null,e)),cp(function(){(fe&6)===0&&un()}),n=null;else{switch(Sa(s)){case 1:n=Vo;break;case 4:n=wa;break;case 16:n=ms;break;case 536870912:n=Na;break;default:n=ms}n=Fc(n,Tc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Tc(e,t){if(uo=-1,co=0,(fe&6)!==0)throw Error(l(327));var n=e.callbackNode;if(cr()&&e.callbackNode!==n)return null;var s=vs(e,e===Be?He:0);if(s===0)return null;if((s&30)!==0||(s&e.expiredLanes)!==0||t)t=fo(e,s);else{t=s;var i=fe;fe|=2;var c=Ac();(Be!==e||He!==t)&&(Vt=null,ur=_e()+500,Ln(e,t));do try{Ip();break}catch(m){Lc(e,m)}while(!0);Tl(),so.current=c,fe=i,Pe!==null?t=0:(Be=null,He=0,t=De)}if(t!==0){if(t===2&&(i=Ko(e),i!==0&&(s=i,t=pi(e,i))),t===1)throw n=es,Ln(e,0),gn(e,s),rt(e,_e()),n;if(t===6)gn(e,s);else{if(i=e.current.alternate,(s&30)===0&&!Ap(i)&&(t=fo(e,s),t===2&&(c=Ko(e),c!==0&&(s=c,t=pi(e,c))),t===1))throw n=es,Ln(e,0),gn(e,s),rt(e,_e()),n;switch(e.finishedWork=i,e.finishedLanes=s,t){case 0:case 1:throw Error(l(345));case 2:An(e,nt,Vt);break;case 3:if(gn(e,s),(s&130023424)===s&&(t=ci+500-_e(),10<t)){if(vs(e,0)!==0)break;if(i=e.suspendedLanes,(i&s)!==s){Xe(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vl(An.bind(null,e,nt,Vt),t);break}An(e,nt,Vt);break;case 4:if(gn(e,s),(s&4194240)===s)break;for(t=e.eventTimes,i=-1;0<s;){var f=31-vt(s);c=1<<f,f=t[f],f>i&&(i=f),s&=~c}if(s=i,s=_e()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Lp(s/1960))-s,10<s){e.timeoutHandle=vl(An.bind(null,e,nt,Vt),s);break}An(e,nt,Vt);break;case 5:An(e,nt,Vt);break;default:throw Error(l(329))}}}return rt(e,_e()),e.callbackNode===n?Tc.bind(null,e):null}function pi(e,t){var n=ts;return e.current.memoizedState.isDehydrated&&(Ln(e,t).flags|=256),e=fo(e,t),e!==2&&(t=nt,nt=n,t!==null&&hi(t)),e}function hi(e){nt===null?nt=e:nt.push.apply(nt,e)}function Ap(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var s=0;s<n.length;s++){var i=n[s],c=i.getSnapshot;i=i.value;try{if(!wt(c(),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 gn(e,t){for(t&=~ui,t&=~oo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vt(t),s=1<<n;e[n]=-1,t&=~s}}function Pc(e){if((fe&6)!==0)throw Error(l(327));cr();var t=vs(e,0);if((t&1)===0)return rt(e,_e()),null;var n=fo(e,t);if(e.tag!==0&&n===2){var s=Ko(e);s!==0&&(t=s,n=pi(e,s))}if(n===1)throw n=es,Ln(e,0),gn(e,t),rt(e,_e()),n;if(n===6)throw Error(l(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,An(e,nt,Vt),rt(e,_e()),null}function mi(e,t){var n=fe;fe|=1;try{return e(t)}finally{fe=n,fe===0&&(ur=_e()+500,Bs&&un())}}function Pn(e){hn!==null&&hn.tag===0&&(fe&6)===0&&cr();var t=fe;fe|=1;var n=ht.transition,s=me;try{if(ht.transition=null,me=1,e)return e()}finally{me=s,ht.transition=n,fe=t,(fe&6)===0&&un()}}function gi(){at=ar.current,we(ar)}function Ln(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,up(n)),Pe!==null)for(n=Pe.return;n!==null;){var s=n;switch(El(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Ds();break;case 3:or(),we(Ze),we(We),Bl();break;case 5:Dl(s);break;case 4:or();break;case 13:we(Se);break;case 19:we(Se);break;case 10:Pl(s.type._context);break;case 22:case 23:gi()}n=n.return}if(Be=e,Pe=e=yn(e.current,null),He=at=t,De=0,es=null,ui=oo=Tn=0,nt=ts=null,_n!==null){for(t=0;t<_n.length;t++)if(n=_n[t],s=n.interleaved,s!==null){n.interleaved=null;var i=s.next,c=n.pending;if(c!==null){var f=c.next;c.next=i,s.next=f}n.pending=s}_n=null}return e}function Lc(e,t){do{var n=Pe;try{if(Tl(),qs.current=Js,Ys){for(var s=Ce.memoizedState;s!==null;){var i=s.queue;i!==null&&(i.pending=null),s=s.next}Ys=!1}if(Rn=0,Me=Ie=Ce=null,qr=!1,Yr=0,ai.current=null,n===null||n.return===null){De=1,es=t,Pe=null;break}e:{var c=e,f=n.return,m=n,y=t;if(t=He,m.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){var j=y,O=m,I=O.tag;if((O.mode&1)===0&&(I===0||I===11||I===15)){var A=O.alternate;A?(O.updateQueue=A.updateQueue,O.memoizedState=A.memoizedState,O.lanes=A.lanes):(O.updateQueue=null,O.memoizedState=null)}var V=rc(f);if(V!==null){V.flags&=-257,sc(V,f,m,c,t),V.mode&1&&nc(c,j,t),t=V,y=j;var Q=t.updateQueue;if(Q===null){var Y=new Set;Y.add(y),t.updateQueue=Y}else Q.add(y);break e}else{if((t&1)===0){nc(c,j,t),yi();break e}y=Error(l(426))}}else if(ke&&m.mode&1){var be=rc(f);if(be!==null){(be.flags&65536)===0&&(be.flags|=256),sc(be,f,m,c,t),bl(lr(y,m));break e}}c=y=lr(y,m),De!==4&&(De=2),ts===null?ts=[c]:ts.push(c),c=f;do{switch(c.tag){case 3:c.flags|=65536,t&=-t,c.lanes|=t;var C=ec(c,y,t);_u(c,C);break e;case 1:m=y;var w=c.type,E=c.stateNode;if((c.flags&128)===0&&(typeof w.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(pn===null||!pn.has(E)))){c.flags|=65536,t&=-t,c.lanes|=t;var M=tc(c,m,t);_u(c,M);break e}}c=c.return}while(c!==null)}Ic(n)}catch(G){t=G,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(!0)}function Ac(){var e=so.current;return so.current=Js,e===null?Js:e}function yi(){(De===0||De===3||De===2)&&(De=4),Be===null||(Tn&268435455)===0&&(oo&268435455)===0||gn(Be,He)}function fo(e,t){var n=fe;fe|=2;var s=Ac();(Be!==e||He!==t)&&(Vt=null,Ln(e,t));do try{Op();break}catch(i){Lc(e,i)}while(!0);if(Tl(),fe=n,so.current=s,Pe!==null)throw Error(l(261));return Be=null,He=0,De}function Op(){for(;Pe!==null;)Oc(Pe)}function Ip(){for(;Pe!==null&&!of();)Oc(Pe)}function Oc(e){var t=Bc(e.alternate,e,at);e.memoizedProps=e.pendingProps,t===null?Ic(e):Pe=t,ai.current=null}function Ic(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=_p(n,t,at),n!==null){Pe=n;return}}else{if(n=bp(n,t),n!==null){n.flags&=32767,Pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Pe=null;return}}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);De===0&&(De=5)}function An(e,t,n){var s=me,i=ht.transition;try{ht.transition=null,me=1,Dp(e,t,n,s)}finally{ht.transition=i,me=s}return null}function Dp(e,t,n,s){do cr();while(hn!==null);if((fe&6)!==0)throw Error(l(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(l(177));e.callbackNode=null,e.callbackPriority=0;var c=n.lanes|n.childLanes;if(gf(e,c),e===Be&&(Pe=Be=null,He=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||io||(io=!0,Fc(ms,function(){return cr(),null})),c=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||c){c=ht.transition,ht.transition=null;var f=me;me=1;var m=fe;fe|=4,ai.current=null,Tp(e,n),Ec(n,e),np(yl),ks=!!gl,yl=gl=null,e.current=n,Pp(n),lf(),fe=m,me=f,ht.transition=c}else e.current=n;if(io&&(io=!1,hn=e,ao=i),c=e.pendingLanes,c===0&&(pn=null),cf(n.stateNode),rt(e,_e()),t!==null)for(s=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],s(i.value,{componentStack:i.stack,digest:i.digest});if(lo)throw lo=!1,e=di,di=null,e;return(ao&1)!==0&&e.tag!==0&&cr(),c=e.pendingLanes,(c&1)!==0?e===fi?ns++:(ns=0,fi=e):ns=0,un(),null}function cr(){if(hn!==null){var e=Sa(ao),t=ht.transition,n=me;try{if(ht.transition=null,me=16>e?16:e,hn===null)var s=!1;else{if(e=hn,hn=null,ao=0,(fe&6)!==0)throw Error(l(331));var i=fe;for(fe|=4,K=e.current;K!==null;){var c=K,f=c.child;if((K.flags&16)!==0){var m=c.deletions;if(m!==null){for(var y=0;y<m.length;y++){var j=m[y];for(K=j;K!==null;){var O=K;switch(O.tag){case 0:case 11:case 15:Zr(8,O,c)}var I=O.child;if(I!==null)I.return=O,K=I;else for(;K!==null;){O=K;var A=O.sibling,V=O.return;if(wc(O),O===j){K=null;break}if(A!==null){A.return=V,K=A;break}K=V}}}var Q=c.alternate;if(Q!==null){var Y=Q.child;if(Y!==null){Q.child=null;do{var be=Y.sibling;Y.sibling=null,Y=be}while(Y!==null)}}K=c}}if((c.subtreeFlags&2064)!==0&&f!==null)f.return=c,K=f;else e:for(;K!==null;){if(c=K,(c.flags&2048)!==0)switch(c.tag){case 0:case 11:case 15:Zr(9,c,c.return)}var C=c.sibling;if(C!==null){C.return=c.return,K=C;break e}K=c.return}}var w=e.current;for(K=w;K!==null;){f=K;var E=f.child;if((f.subtreeFlags&2064)!==0&&E!==null)E.return=f,K=E;else e:for(f=w;K!==null;){if(m=K,(m.flags&2048)!==0)try{switch(m.tag){case 0:case 11:case 15:ro(9,m)}}catch(G){je(m,m.return,G)}if(m===f){K=null;break e}var M=m.sibling;if(M!==null){M.return=m.return,K=M;break e}K=m.return}}if(fe=i,un(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(gs,e)}catch{}s=!0}return s}finally{me=n,ht.transition=t}}return!1}function Dc(e,t,n){t=lr(n,t),t=ec(e,t,1),e=dn(e,t,1),t=Xe(),e!==null&&(jr(e,1,t),rt(e,t))}function je(e,t,n){if(e.tag===3)Dc(e,e,n);else for(;t!==null;){if(t.tag===3){Dc(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(pn===null||!pn.has(s))){e=lr(n,e),e=tc(t,e,1),t=dn(t,e,1),e=Xe(),t!==null&&(jr(t,1,e),rt(t,e));break}}t=t.return}}function Mp(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),t=Xe(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(He&n)===n&&(De===4||De===3&&(He&130023424)===He&&500>_e()-ci?Ln(e,0):ui|=n),rt(e,t)}function Mc(e,t){t===0&&((e.mode&1)===0?t=1:(t=xs,xs<<=1,(xs&130023424)===0&&(xs=4194304)));var n=Xe();e=$t(e,t),e!==null&&(jr(e,t,n),rt(e,n))}function Bp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mc(e,n)}function Fp(e,t){var n=0;switch(e.tag){case 13:var s=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(l(314))}s!==null&&s.delete(t),Mc(e,n)}var Bc;Bc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ze.current)tt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return tt=!1,jp(e,t,n);tt=(e.flags&131072)!==0}else tt=!1,ke&&(t.flags&1048576)!==0&&yu(t,zs,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;to(e,t),e=t.pendingProps;var i=Jn(t,We.current);sr(t,n),i=Ul(null,t,s,e,i,n);var c=$l();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,et(s)?(c=!0,Ms(t)):c=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ol(t),i.updater=Zs,t.stateNode=i,i._reactInternals=t,ql(t,s,e,n),t=Jl(null,t,s,!0,c,n)):(t.tag=0,ke&&c&&Cl(t),Ge(null,t,i,n),t=t.child),t;case 16:s=t.elementType;e:{switch(to(e,t),e=t.pendingProps,i=s._init,s=i(s._payload),t.type=s,i=t.tag=Up(s),e=kt(s,e),i){case 0:t=Xl(null,t,s,e,n);break e;case 1:t=cc(null,t,s,e,n);break e;case 11:t=oc(null,t,s,e,n);break e;case 14:t=lc(null,t,s,kt(s.type,e),n);break e}throw Error(l(306,s,""))}return t;case 0:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:kt(s,i),Xl(e,t,s,i,n);case 1:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:kt(s,i),cc(e,t,s,i,n);case 3:e:{if(dc(t),e===null)throw Error(l(387));s=t.pendingProps,c=t.memoizedState,i=c.element,ju(e,t),Ks(t,s,null,n);var f=t.memoizedState;if(s=f.element,c.isDehydrated)if(c={element:s,isDehydrated:!1,cache:f.cache,pendingSuspenseBoundaries:f.pendingSuspenseBoundaries,transitions:f.transitions},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){i=lr(Error(l(423)),t),t=fc(e,t,s,n,i);break e}else if(s!==i){i=lr(Error(l(424)),t),t=fc(e,t,s,n,i);break e}else for(it=on(t.stateNode.containerInfo.firstChild),lt=t,ke=!0,Nt=null,n=Cu(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tr(),s===i){t=Wt(e,t,n);break e}Ge(e,t,s,n)}t=t.child}return t;case 5:return Ru(t),e===null&&_l(t),s=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,f=i.children,xl(s,i)?f=null:c!==null&&xl(s,c)&&(t.flags|=32),uc(e,t),Ge(e,t,f,n),t.child;case 6:return e===null&&_l(t),null;case 13:return pc(e,t,n);case 4:return Il(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=nr(t,null,s,n):Ge(e,t,s,n),t.child;case 11:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:kt(s,i),oc(e,t,s,i,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(s=t.type._context,i=t.pendingProps,c=t.memoizedProps,f=i.value,xe(Hs,s._currentValue),s._currentValue=f,c!==null)if(wt(c.value,f)){if(c.children===i.children&&!Ze.current){t=Wt(e,t,n);break e}}else for(c=t.child,c!==null&&(c.return=t);c!==null;){var m=c.dependencies;if(m!==null){f=c.child;for(var y=m.firstContext;y!==null;){if(y.context===s){if(c.tag===1){y=Ht(-1,n&-n),y.tag=2;var j=c.updateQueue;if(j!==null){j=j.shared;var O=j.pending;O===null?y.next=y:(y.next=O.next,O.next=y),j.pending=y}}c.lanes|=n,y=c.alternate,y!==null&&(y.lanes|=n),Ll(c.return,n,t),m.lanes|=n;break}y=y.next}}else if(c.tag===10)f=c.type===t.type?null:c.child;else if(c.tag===18){if(f=c.return,f===null)throw Error(l(341));f.lanes|=n,m=f.alternate,m!==null&&(m.lanes|=n),Ll(f,n,t),f=c.sibling}else f=c.child;if(f!==null)f.return=c;else for(f=c;f!==null;){if(f===t){f=null;break}if(c=f.sibling,c!==null){c.return=f.return,f=c;break}f=f.return}c=f}Ge(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,s=t.pendingProps.children,sr(t,n),i=ft(i),s=s(i),t.flags|=1,Ge(e,t,s,n),t.child;case 14:return s=t.type,i=kt(s,t.pendingProps),i=kt(s.type,i),lc(e,t,s,i,n);case 15:return ic(e,t,t.type,t.pendingProps,n);case 17:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:kt(s,i),to(e,t),t.tag=1,et(s)?(e=!0,Ms(t)):e=!1,sr(t,n),Ju(t,s,i),ql(t,s,i,n),Jl(null,t,s,!0,e,n);case 19:return mc(e,t,n);case 22:return ac(e,t,n)}throw Error(l(156,t.tag))};function Fc(e,t){return xa(e,t)}function zp(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,s){return new zp(e,t,n,s)}function xi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Up(e){if(typeof e=="function")return xi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Je)return 11;if(e===Ye)return 14}return 2}function yn(e,t){var n=e.alternate;return n===null?(n=mt(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&14680064,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}function po(e,t,n,s,i,c){var f=2;if(s=e,typeof e=="function")xi(e)&&(f=1);else if(typeof e=="string")f=5;else e:switch(e){case ge:return On(n.children,i,c,t);case he:f=8,i|=8;break;case Re:return e=mt(12,n,t,i|2),e.elementType=Re,e.lanes=c,e;case ze:return e=mt(13,n,t,i),e.elementType=ze,e.lanes=c,e;case qe:return e=mt(19,n,t,i),e.elementType=qe,e.lanes=c,e;case ye:return ho(n,i,c,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Te:f=10;break e;case ut:f=9;break e;case Je:f=11;break e;case Ye:f=14;break e;case Ae:f=16,s=null;break e}throw Error(l(130,e==null?e:typeof e,""))}return t=mt(f,n,t,i),t.elementType=e,t.type=s,t.lanes=c,t}function On(e,t,n,s){return e=mt(7,e,s,t),e.lanes=n,e}function ho(e,t,n,s){return e=mt(22,e,s,t),e.elementType=ye,e.lanes=n,e.stateNode={isHidden:!1},e}function vi(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function wi(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $p(e,t,n,s,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qo(0),this.expirationTimes=Qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qo(0),this.identifierPrefix=s,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ni(e,t,n,s,i,c,f,m,y){return e=new $p(e,t,n,m,y),t===1?(t=1,c===!0&&(t|=8)):t=0,c=mt(3,null,null,t),e.current=c,c.stateNode=e,c.memoizedState={element:s,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ol(c),e}function Hp(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ce,key:s==null?null:""+s,children:e,containerInfo:t,implementation:n}}function zc(e){if(!e)return an;e=e._reactInternals;e:{if(kn(e)!==e||e.tag!==1)throw Error(l(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(et(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(l(171))}if(e.tag===1){var n=e.type;if(et(n))return hu(e,n,t)}return t}function Uc(e,t,n,s,i,c,f,m,y){return e=Ni(n,s,!0,e,i,c,f,m,y),e.context=zc(null),n=e.current,s=Xe(),i=mn(n),c=Ht(s,i),c.callback=t??null,dn(n,c,i),e.current.lanes=i,jr(e,i,s),rt(e,s),e}function mo(e,t,n,s){var i=t.current,c=Xe(),f=mn(i);return n=zc(n),t.context===null?t.context=n:t.pendingContext=n,t=Ht(c,f),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=dn(i,t,f),e!==null&&(Et(e,i,f,c),Vs(e,i,f)),f}function go(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $c(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ki(e,t){$c(e,t),(e=e.alternate)&&$c(e,t)}function Wp(){return null}var Hc=typeof reportError=="function"?reportError:function(e){console.error(e)};function Si(e){this._internalRoot=e}yo.prototype.render=Si.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));mo(e,t,null,null)},yo.prototype.unmount=Si.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pn(function(){mo(null,e,null,null)}),t[Bt]=null}};function yo(e){this._internalRoot=e}yo.prototype.unstable_scheduleHydration=function(e){if(e){var t=ja();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nn.length&&t!==0&&t<nn[n].priority;n++);nn.splice(n,0,e),n===0&&Ra(e)}};function Ci(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function xo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Wc(){}function Vp(e,t,n,s,i){if(i){if(typeof s=="function"){var c=s;s=function(){var j=go(f);c.call(j)}}var f=Uc(t,s,e,0,null,!1,!1,"",Wc);return e._reactRootContainer=f,e[Bt]=f.current,zr(e.nodeType===8?e.parentNode:e),Pn(),f}for(;i=e.lastChild;)e.removeChild(i);if(typeof s=="function"){var m=s;s=function(){var j=go(y);m.call(j)}}var y=Ni(e,0,!1,null,null,!1,!1,"",Wc);return e._reactRootContainer=y,e[Bt]=y.current,zr(e.nodeType===8?e.parentNode:e),Pn(function(){mo(t,y,n,s)}),y}function vo(e,t,n,s,i){var c=n._reactRootContainer;if(c){var f=c;if(typeof i=="function"){var m=i;i=function(){var y=go(f);m.call(y)}}mo(t,f,e,i)}else f=Vp(n,t,e,i,s);return go(f)}Ca=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Er(t.pendingLanes);n!==0&&(qo(t,n|1),rt(t,_e()),(fe&6)===0&&(ur=_e()+500,un()))}break;case 13:Pn(function(){var s=$t(e,1);if(s!==null){var i=Xe();Et(s,e,1,i)}}),ki(e,1)}},Yo=function(e){if(e.tag===13){var t=$t(e,134217728);if(t!==null){var n=Xe();Et(t,e,134217728,n)}ki(e,134217728)}},Ea=function(e){if(e.tag===13){var t=mn(e),n=$t(e,t);if(n!==null){var s=Xe();Et(n,e,t,s)}ki(e,t)}},ja=function(){return me},_a=function(e,t){var n=me;try{return me=e,t()}finally{me=n}},Uo=function(e,t,n){switch(t){case"input":if(Dt(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var i=Is(s);if(!i)throw Error(l(90));Ne(s),Dt(s,i)}}}break;case"textarea":yr(e,n);break;case"select":t=n.value,t!=null&&Mt(e,!!n.multiple,t,!1)}},da=mi,fa=Pn;var Kp={usingClientEntryPoint:!1,Events:[Hr,Gn,Is,ua,ca,mi]},rs={findFiberByHostInstance:Sn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qp={bundleType:rs.bundleType,version:rs.version,rendererPackageName:rs.rendererPackageName,rendererConfig:rs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:re.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ga(e),e===null?null:e.stateNode},findFiberByHostInstance:rs.findFiberByHostInstance||Wp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wo.isDisabled&&wo.supportsFiber)try{gs=wo.inject(Qp),_t=wo}catch{}}return st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kp,st.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ci(t))throw Error(l(200));return Hp(e,t,null,n)},st.createRoot=function(e,t){if(!Ci(e))throw Error(l(299));var n=!1,s="",i=Hc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ni(e,1,!1,null,null,n,!1,s,i),e[Bt]=t.current,zr(e.nodeType===8?e.parentNode:e),new Si(t)},st.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=ga(t),e=e===null?null:e.stateNode,e},st.flushSync=function(e){return Pn(e)},st.hydrate=function(e,t,n){if(!xo(t))throw Error(l(200));return vo(null,e,t,!0,n)},st.hydrateRoot=function(e,t,n){if(!Ci(e))throw Error(l(405));var s=n!=null&&n.hydratedSources||null,i=!1,c="",f=Hc;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),t=Uc(t,null,e,1,n??null,i,!1,c,f),e[Bt]=t.current,zr(e),s)for(e=0;e<s.length;e++)n=s[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new yo(t)},st.render=function(e,t,n){if(!xo(t))throw Error(l(200));return vo(null,e,t,!1,n)},st.unmountComponentAtNode=function(e){if(!xo(e))throw Error(l(40));return e._reactRootContainer?(Pn(function(){vo(null,null,e,!1,function(){e._reactRootContainer=null,e[Bt]=null})}),!0):!1},st.unstable_batchedUpdates=mi,st.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!xo(n))throw Error(l(200));if(e==null||e._reactInternals===void 0)throw Error(l(38));return vo(e,t,n,!1,s)},st.version="18.3.1-next-f1338f8080-20240426",st}var Jc;function nh(){if(Jc)return _i.exports;Jc=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(o){console.error(o)}}return r(),_i.exports=th(),_i.exports}var Zc;function rh(){if(Zc)return No;Zc=1;var r=nh();return No.createRoot=r.createRoot,No.hydrateRoot=r.hydrateRoot,No}var sh=rh();const oh=yd(sh);/**
41
+ * react-router v7.13.0
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */var ed="popstate";function lh(r={}){function o(a,d){let{pathname:p,search:h,hash:g}=a.location;return Fi("",{pathname:p,search:h,hash:g},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function l(a,d){return typeof d=="string"?d:us(d)}return ah(o,l,null,r)}function Ee(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function At(r,o){if(!r){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function ih(){return Math.random().toString(36).substring(2,10)}function td(r,o){return{usr:r.state,key:r.key,idx:o}}function Fi(r,o,l=null,a){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof o=="string"?fr(o):o,state:l,key:o&&o.key||a||ih()}}function us({pathname:r="/",search:o="",hash:l=""}){return o&&o!=="?"&&(r+=o.charAt(0)==="?"?o:"?"+o),l&&l!=="#"&&(r+=l.charAt(0)==="#"?l:"#"+l),r}function fr(r){let o={};if(r){let l=r.indexOf("#");l>=0&&(o.hash=r.substring(l),r=r.substring(0,l));let a=r.indexOf("?");a>=0&&(o.search=r.substring(a),r=r.substring(0,a)),r&&(o.pathname=r)}return o}function ah(r,o,l,a={}){let{window:d=document.defaultView,v5Compat:p=!1}=a,h=d.history,g="POP",v=null,S=k();S==null&&(S=0,h.replaceState({...h.state,idx:S},""));function k(){return(h.state||{idx:null}).idx}function _(){g="POP";let P=k(),R=P==null?null:P-S;S=P,v&&v({action:g,location:b.location,delta:R})}function L(P,R){g="PUSH";let B=Fi(b.location,P,R);S=k()+1;let F=td(B,S),re=b.createHref(B);try{h.pushState(F,"",re)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;d.location.assign(re)}p&&v&&v({action:g,location:b.location,delta:1})}function D(P,R){g="REPLACE";let B=Fi(b.location,P,R);S=k();let F=td(B,S),re=b.createHref(B);h.replaceState(F,"",re),p&&v&&v({action:g,location:b.location,delta:0})}function W(P){return uh(P)}let b={get action(){return g},get location(){return r(d,h)},listen(P){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(ed,_),v=P,()=>{d.removeEventListener(ed,_),v=null}},createHref(P){return o(d,P)},createURL:W,encodeLocation(P){let R=W(P);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:L,replace:D,go(P){return h.go(P)}};return b}function uh(r,o=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Ee(l,"No window.location.(origin|href) available to create URL");let a=typeof r=="string"?r:us(r);return a=a.replace(/ $/,"%20"),!o&&a.startsWith("//")&&(a=l+a),new URL(a,l)}function xd(r,o,l="/"){return ch(r,o,l,!1)}function ch(r,o,l,a){let d=typeof o=="string"?fr(o):o,p=qt(d.pathname||"/",l);if(p==null)return null;let h=vd(r);dh(h);let g=null;for(let v=0;g==null&&v<h.length;++v){let S=kh(p);g=wh(h[v],S,a)}return g}function vd(r,o=[],l=[],a="",d=!1){let p=(h,g,v=d,S)=>{let k={relativePath:S===void 0?h.path||"":S,caseSensitive:h.caseSensitive===!0,childrenIndex:g,route:h};if(k.relativePath.startsWith("/")){if(!k.relativePath.startsWith(a)&&v)return;Ee(k.relativePath.startsWith(a),`Absolute route path "${k.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),k.relativePath=k.relativePath.slice(a.length)}let _=Qt([a,k.relativePath]),L=l.concat(k);h.children&&h.children.length>0&&(Ee(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),vd(h.children,o,L,_,v)),!(h.path==null&&!h.index)&&o.push({path:_,score:xh(_,h.index),routesMeta:L})};return r.forEach((h,g)=>{var v;if(h.path===""||!((v=h.path)!=null&&v.includes("?")))p(h,g);else for(let S of wd(h.path))p(h,g,!0,S)}),o}function wd(r){let o=r.split("/");if(o.length===0)return[];let[l,...a]=o,d=l.endsWith("?"),p=l.replace(/\?$/,"");if(a.length===0)return d?[p,""]:[p];let h=wd(a.join("/")),g=[];return g.push(...h.map(v=>v===""?p:[p,v].join("/"))),d&&g.push(...h),g.map(v=>r.startsWith("/")&&v===""?"/":v)}function dh(r){r.sort((o,l)=>o.score!==l.score?l.score-o.score:vh(o.routesMeta.map(a=>a.childrenIndex),l.routesMeta.map(a=>a.childrenIndex)))}var fh=/^:[\w-]+$/,ph=3,hh=2,mh=1,gh=10,yh=-2,nd=r=>r==="*";function xh(r,o){let l=r.split("/"),a=l.length;return l.some(nd)&&(a+=yh),o&&(a+=hh),l.filter(d=>!nd(d)).reduce((d,p)=>d+(fh.test(p)?ph:p===""?mh:gh),a)}function vh(r,o){return r.length===o.length&&r.slice(0,-1).every((a,d)=>a===o[d])?r[r.length-1]-o[o.length-1]:0}function wh(r,o,l=!1){let{routesMeta:a}=r,d={},p="/",h=[];for(let g=0;g<a.length;++g){let v=a[g],S=g===a.length-1,k=p==="/"?o:o.slice(p.length)||"/",_=Lo({path:v.relativePath,caseSensitive:v.caseSensitive,end:S},k),L=v.route;if(!_&&S&&l&&!a[a.length-1].route.index&&(_=Lo({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},k)),!_)return null;Object.assign(d,_.params),h.push({params:d,pathname:Qt([p,_.pathname]),pathnameBase:jh(Qt([p,_.pathnameBase])),route:L}),_.pathnameBase!=="/"&&(p=Qt([p,_.pathnameBase]))}return h}function Lo(r,o){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[l,a]=Nh(r.path,r.caseSensitive,r.end),d=o.match(l);if(!d)return null;let p=d[0],h=p.replace(/(.)\/+$/,"$1"),g=d.slice(1);return{params:a.reduce((S,{paramName:k,isOptional:_},L)=>{if(k==="*"){let W=g[L]||"";h=p.slice(0,p.length-W.length).replace(/(.)\/+$/,"$1")}const D=g[L];return _&&!D?S[k]=void 0:S[k]=(D||"").replace(/%2F/g,"/"),S},{}),pathname:p,pathnameBase:h,pattern:r}}function Nh(r,o=!1,l=!0){At(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let a=[],d="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,g,v)=>(a.push({paramName:g,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(a.push({paramName:"*"}),d+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?d+="\\/*$":r!==""&&r!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,o?void 0:"i"),a]}function kh(r){try{return r.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return At(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),r}}function qt(r,o){if(o==="/")return r;if(!r.toLowerCase().startsWith(o.toLowerCase()))return null;let l=o.endsWith("/")?o.length-1:o.length,a=r.charAt(l);return a&&a!=="/"?null:r.slice(l)||"/"}var Sh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ch(r,o="/"){let{pathname:l,search:a="",hash:d=""}=typeof r=="string"?fr(r):r,p;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?p=rd(l.substring(1),"/"):p=rd(l,o)):p=o,{pathname:p,search:_h(a),hash:bh(d)}}function rd(r,o){let l=o.replace(/\/+$/,"").split("/");return r.split("/").forEach(d=>{d===".."?l.length>1&&l.pop():d!=="."&&l.push(d)}),l.length>1?l.join("/"):"/"}function Ti(r,o,l,a){return`Cannot include a '${r}' character in a manually specified \`to.${o}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Eh(r){return r.filter((o,l)=>l===0||o.route.path&&o.route.path.length>0)}function Nd(r){let o=Eh(r);return o.map((l,a)=>a===o.length-1?l.pathname:l.pathnameBase)}function kd(r,o,l,a=!1){let d;typeof r=="string"?d=fr(r):(d={...r},Ee(!d.pathname||!d.pathname.includes("?"),Ti("?","pathname","search",d)),Ee(!d.pathname||!d.pathname.includes("#"),Ti("#","pathname","hash",d)),Ee(!d.search||!d.search.includes("#"),Ti("#","search","hash",d)));let p=r===""||d.pathname==="",h=p?"/":d.pathname,g;if(h==null)g=l;else{let _=o.length-1;if(!a&&h.startsWith("..")){let L=h.split("/");for(;L[0]==="..";)L.shift(),_-=1;d.pathname=L.join("/")}g=_>=0?o[_]:"/"}let v=Ch(d,g),S=h&&h!=="/"&&h.endsWith("/"),k=(p||h===".")&&l.endsWith("/");return!v.pathname.endsWith("/")&&(S||k)&&(v.pathname+="/"),v}var Qt=r=>r.join("/").replace(/\/\/+/g,"/"),jh=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),_h=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,bh=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,Rh=class{constructor(r,o,l,a=!1){this.status=r,this.statusText=o||"",this.internal=a,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Th(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function Ph(r){return r.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Cd(r,o){let l=r;if(typeof l!="string"||!Sh.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let a=l,d=!1;if(Sd)try{let p=new URL(window.location.href),h=l.startsWith("//")?new URL(p.protocol+l):new URL(l),g=qt(h.pathname,o);h.origin===p.origin&&g!=null?l=g+h.search+h.hash:d=!0}catch{At(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:d,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ed=["POST","PUT","PATCH","DELETE"];new Set(Ed);var Lh=["GET",...Ed];new Set(Lh);var pr=x.createContext(null);pr.displayName="DataRouter";var Ao=x.createContext(null);Ao.displayName="DataRouterState";var Ah=x.createContext(!1),jd=x.createContext({isTransitioning:!1});jd.displayName="ViewTransition";var Oh=x.createContext(new Map);Oh.displayName="Fetchers";var Ih=x.createContext(null);Ih.displayName="Await";var yt=x.createContext(null);yt.displayName="Navigation";var cs=x.createContext(null);cs.displayName="Location";var It=x.createContext({outlet:null,matches:[],isDataRoute:!1});It.displayName="Route";var Gi=x.createContext(null);Gi.displayName="RouteError";var _d="REACT_ROUTER_ERROR",Dh="REDIRECT",Mh="ROUTE_ERROR_RESPONSE";function Bh(r){if(r.startsWith(`${_d}:${Dh}:{`))try{let o=JSON.parse(r.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 Fh(r){if(r.startsWith(`${_d}:${Mh}:{`))try{let o=JSON.parse(r.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new Rh(o.status,o.statusText,o.data)}catch{}}function zh(r,{relative:o}={}){Ee(ds(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:a}=x.useContext(yt),{hash:d,pathname:p,search:h}=fs(r,{relative:o}),g=p;return l!=="/"&&(g=p==="/"?l:Qt([l,p])),a.createHref({pathname:g,search:h,hash:d})}function ds(){return x.useContext(cs)!=null}function Dn(){return Ee(ds(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(cs).location}var bd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rd(r){x.useContext(yt).static||x.useLayoutEffect(r)}function Uh(){let{isDataRoute:r}=x.useContext(It);return r?nm():$h()}function $h(){Ee(ds(),"useNavigate() may be used only in the context of a <Router> component.");let r=x.useContext(pr),{basename:o,navigator:l}=x.useContext(yt),{matches:a}=x.useContext(It),{pathname:d}=Dn(),p=JSON.stringify(Nd(a)),h=x.useRef(!1);return Rd(()=>{h.current=!0}),x.useCallback((v,S={})=>{if(At(h.current,bd),!h.current)return;if(typeof v=="number"){l.go(v);return}let k=kd(v,JSON.parse(p),d,S.relative==="path");r==null&&o!=="/"&&(k.pathname=k.pathname==="/"?o:Qt([o,k.pathname])),(S.replace?l.replace:l.push)(k,S.state,S)},[o,l,p,d,r])}var Hh=x.createContext(null);function Wh(r){let o=x.useContext(It).outlet;return x.useMemo(()=>o&&x.createElement(Hh.Provider,{value:r},o),[o,r])}function fs(r,{relative:o}={}){let{matches:l}=x.useContext(It),{pathname:a}=Dn(),d=JSON.stringify(Nd(l));return x.useMemo(()=>kd(r,JSON.parse(d),a,o==="path"),[r,d,a,o])}function Vh(r,o){return Td(r,o)}function Td(r,o,l,a,d){var B;Ee(ds(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=x.useContext(yt),{matches:h}=x.useContext(It),g=h[h.length-1],v=g?g.params:{},S=g?g.pathname:"/",k=g?g.pathnameBase:"/",_=g&&g.route;{let F=_&&_.path||"";Ld(S,!_||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${S}" (under <Route path="${F}">) 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.
50
+
51
+ Please change the parent <Route path="${F}"> to <Route path="${F==="/"?"*":`${F}/*`}">.`)}let L=Dn(),D;if(o){let F=typeof o=="string"?fr(o):o;Ee(k==="/"||((B=F.pathname)==null?void 0:B.startsWith(k)),`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 "${k}" but pathname "${F.pathname}" was given in the \`location\` prop.`),D=F}else D=L;let W=D.pathname||"/",b=W;if(k!=="/"){let F=k.replace(/^\//,"").split("/");b="/"+W.replace(/^\//,"").split("/").slice(F.length).join("/")}let P=xd(r,{pathname:b});At(_||P!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),At(P==null||P[P.length-1].route.element!==void 0||P[P.length-1].route.Component!==void 0||P[P.length-1].route.lazy!==void 0,`Matched leaf route at location "${D.pathname}${D.search}${D.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 R=Gh(P&&P.map(F=>Object.assign({},F,{params:Object.assign({},v,F.params),pathname:Qt([k,p.encodeLocation?p.encodeLocation(F.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathname]),pathnameBase:F.pathnameBase==="/"?k:Qt([k,p.encodeLocation?p.encodeLocation(F.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathnameBase])})),h,l,a,d);return o&&R?x.createElement(cs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},R):R}function Kh(){let r=tm(),o=Th(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),l=r instanceof Error?r.stack:null,a="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:a},p={padding:"2px 4px",backgroundColor:a},h=null;return console.error("Error handled by React Router default ErrorBoundary:",r),h=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:p},"ErrorBoundary")," or"," ",x.createElement("code",{style:p},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},o),l?x.createElement("pre",{style:d},l):null,h)}var Qh=x.createElement(Kh,null),Pd=class extends x.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,o){return o.location!==r.location||o.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:o.error,location:o.location,revalidation:r.revalidation||o.revalidation}}componentDidCatch(r,o){this.props.onError?this.props.onError(r,o):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const l=Fh(r.digest);l&&(r=l)}let o=r!==void 0?x.createElement(It.Provider,{value:this.props.routeContext},x.createElement(Gi.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?x.createElement(qh,{error:r},o):o}};Pd.contextType=Ah;var Pi=new WeakMap;function qh({children:r,error:o}){let{basename:l}=x.useContext(yt);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let a=Bh(o.digest);if(a){let d=Pi.get(o);if(d)throw d;let p=Cd(a.location,l);if(Sd&&!Pi.get(o))if(p.isExternal||a.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:a.replace}));throw Pi.set(o,h),h}return x.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return r}function Yh({routeContext:r,match:o,children:l}){let a=x.useContext(pr);return a&&a.static&&a.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=o.route.id),x.createElement(It.Provider,{value:r},l)}function Gh(r,o=[],l=null,a=null,d=null){if(r==null){if(!l)return null;if(l.errors)r=l.matches;else if(o.length===0&&!l.initialized&&l.matches.length>0)r=l.matches;else return null}let p=r,h=l==null?void 0:l.errors;if(h!=null){let k=p.findIndex(_=>_.route.id&&(h==null?void 0:h[_.route.id])!==void 0);Ee(k>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),p=p.slice(0,Math.min(p.length,k+1))}let g=!1,v=-1;if(l)for(let k=0;k<p.length;k++){let _=p[k];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(v=k),_.route.id){let{loaderData:L,errors:D}=l,W=_.route.loader&&!L.hasOwnProperty(_.route.id)&&(!D||D[_.route.id]===void 0);if(_.route.lazy||W){g=!0,v>=0?p=p.slice(0,v+1):p=[p[0]];break}}}let S=l&&a?(k,_)=>{var L,D;a(k,{location:l.location,params:((D=(L=l.matches)==null?void 0:L[0])==null?void 0:D.params)??{},unstable_pattern:Ph(l.matches),errorInfo:_})}:void 0;return p.reduceRight((k,_,L)=>{let D,W=!1,b=null,P=null;l&&(D=h&&_.route.id?h[_.route.id]:void 0,b=_.route.errorElement||Qh,g&&(v<0&&L===0?(Ld("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),W=!0,P=null):v===L&&(W=!0,P=_.route.hydrateFallbackElement||null)));let R=o.concat(p.slice(0,L+1)),B=()=>{let F;return D?F=b:W?F=P:_.route.Component?F=x.createElement(_.route.Component,null):_.route.element?F=_.route.element:F=k,x.createElement(Yh,{match:_,routeContext:{outlet:k,matches:R,isDataRoute:l!=null},children:F})};return l&&(_.route.ErrorBoundary||_.route.errorElement||L===0)?x.createElement(Pd,{location:l.location,revalidation:l.revalidation,component:b,error:D,children:B(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:S}):B()},null)}function Xi(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xh(r){let o=x.useContext(pr);return Ee(o,Xi(r)),o}function Jh(r){let o=x.useContext(Ao);return Ee(o,Xi(r)),o}function Zh(r){let o=x.useContext(It);return Ee(o,Xi(r)),o}function Ji(r){let o=Zh(r),l=o.matches[o.matches.length-1];return Ee(l.route.id,`${r} can only be used on routes that contain a unique "id"`),l.route.id}function em(){return Ji("useRouteId")}function tm(){var a;let r=x.useContext(Gi),o=Jh("useRouteError"),l=Ji("useRouteError");return r!==void 0?r:(a=o.errors)==null?void 0:a[l]}function nm(){let{router:r}=Xh("useNavigate"),o=Ji("useNavigate"),l=x.useRef(!1);return Rd(()=>{l.current=!0}),x.useCallback(async(d,p={})=>{At(l.current,bd),l.current&&(typeof d=="number"?await r.navigate(d):await r.navigate(d,{fromRouteId:o,...p}))},[r,o])}var sd={};function Ld(r,o,l){!o&&!sd[r]&&(sd[r]=!0,At(!1,l))}x.memo(rm);function rm({routes:r,future:o,state:l,onError:a}){return Td(r,void 0,l,a,o)}function sm(r){return Wh(r.context)}function Kt(r){Ee(!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 om({basename:r="/",children:o=null,location:l,navigationType:a="POP",navigator:d,static:p=!1,unstable_useTransitions:h}){Ee(!ds(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=r.replace(/^\/*/,"/"),v=x.useMemo(()=>({basename:g,navigator:d,static:p,unstable_useTransitions:h,future:{}}),[g,d,p,h]);typeof l=="string"&&(l=fr(l));let{pathname:S="/",search:k="",hash:_="",state:L=null,key:D="default"}=l,W=x.useMemo(()=>{let b=qt(S,g);return b==null?null:{location:{pathname:b,search:k,hash:_,state:L,key:D},navigationType:a}},[g,S,k,_,L,D,a]);return At(W!=null,`<Router basename="${g}"> is not able to match the URL "${S}${k}${_}" because it does not start with the basename, so the <Router> won't render anything.`),W==null?null:x.createElement(yt.Provider,{value:v},x.createElement(cs.Provider,{children:o,value:W}))}function lm({children:r,location:o}){return Vh(zi(r),o)}function zi(r,o=[]){let l=[];return x.Children.forEach(r,(a,d)=>{if(!x.isValidElement(a))return;let p=[...o,d];if(a.type===x.Fragment){l.push.apply(l,zi(a.props.children,p));return}Ee(a.type===Kt,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ee(!a.props.index||!a.props.children,"An index route cannot have child routes.");let h={id:a.props.id||p.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(h.children=zi(a.props.children,p)),l.push(h)}),l}var jo="get",_o="application/x-www-form-urlencoded";function Oo(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function im(r){return Oo(r)&&r.tagName.toLowerCase()==="button"}function am(r){return Oo(r)&&r.tagName.toLowerCase()==="form"}function um(r){return Oo(r)&&r.tagName.toLowerCase()==="input"}function cm(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function dm(r,o){return r.button===0&&(!o||o==="_self")&&!cm(r)}var ko=null;function fm(){if(ko===null)try{new FormData(document.createElement("form"),0),ko=!1}catch{ko=!0}return ko}var pm=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Li(r){return r!=null&&!pm.has(r)?(At(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_o}"`),null):r}function hm(r,o){let l,a,d,p,h;if(am(r)){let g=r.getAttribute("action");a=g?qt(g,o):null,l=r.getAttribute("method")||jo,d=Li(r.getAttribute("enctype"))||_o,p=new FormData(r)}else if(im(r)||um(r)&&(r.type==="submit"||r.type==="image")){let g=r.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=r.getAttribute("formaction")||g.getAttribute("action");if(a=v?qt(v,o):null,l=r.getAttribute("formmethod")||g.getAttribute("method")||jo,d=Li(r.getAttribute("formenctype"))||Li(g.getAttribute("enctype"))||_o,p=new FormData(g,r),!fm()){let{name:S,type:k,value:_}=r;if(k==="image"){let L=S?`${S}.`:"";p.append(`${L}x`,"0"),p.append(`${L}y`,"0")}else S&&p.append(S,_)}}else{if(Oo(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=jo,a=null,d=_o,h=r}return p&&d==="text/plain"&&(h=p,p=void 0),{action:a,method:l.toLowerCase(),encType:d,formData:p,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Zi(r,o){if(r===!1||r===null||typeof r>"u")throw new Error(o)}function mm(r,o,l,a){let d=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return l?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${a}`:d.pathname=`${d.pathname}.${a}`:d.pathname==="/"?d.pathname=`_root.${a}`:o&&qt(d.pathname,o)==="/"?d.pathname=`${o.replace(/\/$/,"")}/_root.${a}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${a}`,d}async function gm(r,o){if(r.id in o)return o[r.id];try{let l=await import(r.module);return o[r.id]=l,l}catch(l){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ym(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function xm(r,o,l){let a=await Promise.all(r.map(async d=>{let p=o.routes[d.route.id];if(p){let h=await gm(p,l);return h.links?h.links():[]}return[]}));return km(a.flat(1).filter(ym).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function od(r,o,l,a,d,p){let h=(v,S)=>l[S]?v.route.id!==l[S].route.id:!0,g=(v,S)=>{var k;return l[S].pathname!==v.pathname||((k=l[S].route.path)==null?void 0:k.endsWith("*"))&&l[S].params["*"]!==v.params["*"]};return p==="assets"?o.filter((v,S)=>h(v,S)||g(v,S)):p==="data"?o.filter((v,S)=>{var _;let k=a.routes[v.route.id];if(!k||!k.hasLoader)return!1;if(h(v,S)||g(v,S))return!0;if(v.route.shouldRevalidate){let L=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((_=l[0])==null?void 0:_.params)||{},nextUrl:new URL(r,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof L=="boolean")return L}return!0}):[]}function vm(r,o,{includeHydrateFallback:l}={}){return wm(r.map(a=>{let d=o.routes[a.route.id];if(!d)return[];let p=[d.module];return d.clientActionModule&&(p=p.concat(d.clientActionModule)),d.clientLoaderModule&&(p=p.concat(d.clientLoaderModule)),l&&d.hydrateFallbackModule&&(p=p.concat(d.hydrateFallbackModule)),d.imports&&(p=p.concat(d.imports)),p}).flat(1))}function wm(r){return[...new Set(r)]}function Nm(r){let o={},l=Object.keys(r).sort();for(let a of l)o[a]=r[a];return o}function km(r,o){let l=new Set;return new Set(o),r.reduce((a,d)=>{let p=JSON.stringify(Nm(d));return l.has(p)||(l.add(p),a.push({key:p,link:d})),a},[])}function Ad(){let r=x.useContext(pr);return Zi(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function Sm(){let r=x.useContext(Ao);return Zi(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var ea=x.createContext(void 0);ea.displayName="FrameworkContext";function Od(){let r=x.useContext(ea);return Zi(r,"You must render this element inside a <HydratedRouter> element"),r}function Cm(r,o){let l=x.useContext(ea),[a,d]=x.useState(!1),[p,h]=x.useState(!1),{onFocus:g,onBlur:v,onMouseEnter:S,onMouseLeave:k,onTouchStart:_}=o,L=x.useRef(null);x.useEffect(()=>{if(r==="render"&&h(!0),r==="viewport"){let b=R=>{R.forEach(B=>{h(B.isIntersecting)})},P=new IntersectionObserver(b,{threshold:.5});return L.current&&P.observe(L.current),()=>{P.disconnect()}}},[r]),x.useEffect(()=>{if(a){let b=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(b)}}},[a]);let D=()=>{d(!0)},W=()=>{d(!1),h(!1)};return l?r!=="intent"?[p,L,{}]:[p,L,{onFocus:os(g,D),onBlur:os(v,W),onMouseEnter:os(S,D),onMouseLeave:os(k,W),onTouchStart:os(_,D)}]:[!1,L,{}]}function os(r,o){return l=>{r&&r(l),l.defaultPrevented||o(l)}}function Em({page:r,...o}){let{router:l}=Ad(),a=x.useMemo(()=>xd(l.routes,r,l.basename),[l.routes,r,l.basename]);return a?x.createElement(_m,{page:r,matches:a,...o}):null}function jm(r){let{manifest:o,routeModules:l}=Od(),[a,d]=x.useState([]);return x.useEffect(()=>{let p=!1;return xm(r,o,l).then(h=>{p||d(h)}),()=>{p=!0}},[r,o,l]),a}function _m({page:r,matches:o,...l}){let a=Dn(),{future:d,manifest:p,routeModules:h}=Od(),{basename:g}=Ad(),{loaderData:v,matches:S}=Sm(),k=x.useMemo(()=>od(r,o,S,p,a,"data"),[r,o,S,p,a]),_=x.useMemo(()=>od(r,o,S,p,a,"assets"),[r,o,S,p,a]),L=x.useMemo(()=>{if(r===a.pathname+a.search+a.hash)return[];let b=new Set,P=!1;if(o.forEach(B=>{var re;let F=p.routes[B.route.id];!F||!F.hasLoader||(!k.some(ie=>ie.route.id===B.route.id)&&B.route.id in v&&((re=h[B.route.id])!=null&&re.shouldRevalidate)||F.hasClientLoader?P=!0:b.add(B.route.id))}),b.size===0)return[];let R=mm(r,g,d.unstable_trailingSlashAwareDataRequests,"data");return P&&b.size>0&&R.searchParams.set("_routes",o.filter(B=>b.has(B.route.id)).map(B=>B.route.id).join(",")),[R.pathname+R.search]},[g,d.unstable_trailingSlashAwareDataRequests,v,a,p,k,o,r,h]),D=x.useMemo(()=>vm(_,p),[_,p]),W=jm(_);return x.createElement(x.Fragment,null,L.map(b=>x.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...l})),D.map(b=>x.createElement("link",{key:b,rel:"modulepreload",href:b,...l})),W.map(({key:b,link:P})=>x.createElement("link",{key:b,nonce:l.nonce,...P,crossOrigin:P.crossOrigin??l.crossOrigin})))}function bm(...r){return o=>{r.forEach(l=>{typeof l=="function"?l(o):l!=null&&(l.current=o)})}}var Rm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Rm&&(window.__reactRouterVersion="7.13.0")}catch{}function Tm({basename:r,children:o,unstable_useTransitions:l,window:a}){let d=x.useRef();d.current==null&&(d.current=lh({window:a,v5Compat:!0}));let p=d.current,[h,g]=x.useState({action:p.action,location:p.location}),v=x.useCallback(S=>{l===!1?g(S):x.startTransition(()=>g(S))},[l]);return x.useLayoutEffect(()=>p.listen(v),[p,v]),x.createElement(om,{basename:r,children:o,location:h.location,navigationType:h.action,navigator:p,unstable_useTransitions:l})}var Id=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dd=x.forwardRef(function({onClick:o,discover:l="render",prefetch:a="none",relative:d,reloadDocument:p,replace:h,state:g,target:v,to:S,preventScrollReset:k,viewTransition:_,unstable_defaultShouldRevalidate:L,...D},W){let{basename:b,unstable_useTransitions:P}=x.useContext(yt),R=typeof S=="string"&&Id.test(S),B=Cd(S,b);S=B.to;let F=zh(S,{relative:d}),[re,ie,ce]=Cm(a,D),ge=Am(S,{replace:h,state:g,target:v,preventScrollReset:k,relative:d,viewTransition:_,unstable_defaultShouldRevalidate:L,unstable_useTransitions:P});function he(Te){o&&o(Te),Te.defaultPrevented||ge(Te)}let Re=x.createElement("a",{...D,...ce,href:B.absoluteURL||F,onClick:B.isExternal||p?o:he,ref:bm(W,ie),target:v,"data-discover":!R&&l==="render"?"true":void 0});return re&&!R?x.createElement(x.Fragment,null,Re,x.createElement(Em,{page:F})):Re});Dd.displayName="Link";var Ui=x.forwardRef(function({"aria-current":o="page",caseSensitive:l=!1,className:a="",end:d=!1,style:p,to:h,viewTransition:g,children:v,...S},k){let _=fs(h,{relative:S.relative}),L=Dn(),D=x.useContext(Ao),{navigator:W,basename:b}=x.useContext(yt),P=D!=null&&Bm(_)&&g===!0,R=W.encodeLocation?W.encodeLocation(_).pathname:_.pathname,B=L.pathname,F=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;l||(B=B.toLowerCase(),F=F?F.toLowerCase():null,R=R.toLowerCase()),F&&b&&(F=qt(F,b)||F);const re=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let ie=B===R||!d&&B.startsWith(R)&&B.charAt(re)==="/",ce=F!=null&&(F===R||!d&&F.startsWith(R)&&F.charAt(R.length)==="/"),ge={isActive:ie,isPending:ce,isTransitioning:P},he=ie?o:void 0,Re;typeof a=="function"?Re=a(ge):Re=[a,ie?"active":null,ce?"pending":null,P?"transitioning":null].filter(Boolean).join(" ");let Te=typeof p=="function"?p(ge):p;return x.createElement(Dd,{...S,"aria-current":he,className:Re,ref:k,style:Te,to:h,viewTransition:g},typeof v=="function"?v(ge):v)});Ui.displayName="NavLink";var Pm=x.forwardRef(({discover:r="render",fetcherKey:o,navigate:l,reloadDocument:a,replace:d,state:p,method:h=jo,action:g,onSubmit:v,relative:S,preventScrollReset:k,viewTransition:_,unstable_defaultShouldRevalidate:L,...D},W)=>{let{unstable_useTransitions:b}=x.useContext(yt),P=Dm(),R=Mm(g,{relative:S}),B=h.toLowerCase()==="get"?"get":"post",F=typeof g=="string"&&Id.test(g),re=ie=>{if(v&&v(ie),ie.defaultPrevented)return;ie.preventDefault();let ce=ie.nativeEvent.submitter,ge=(ce==null?void 0:ce.getAttribute("formmethod"))||h,he=()=>P(ce||ie.currentTarget,{fetcherKey:o,method:ge,navigate:l,replace:d,state:p,relative:S,preventScrollReset:k,viewTransition:_,unstable_defaultShouldRevalidate:L});b&&l!==!1?x.startTransition(()=>he()):he()};return x.createElement("form",{ref:W,method:B,action:R,onSubmit:a?v:re,...D,"data-discover":!F&&r==="render"?"true":void 0})});Pm.displayName="Form";function Lm(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Md(r){let o=x.useContext(pr);return Ee(o,Lm(r)),o}function Am(r,{target:o,replace:l,state:a,preventScrollReset:d,relative:p,viewTransition:h,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let S=Uh(),k=Dn(),_=fs(r,{relative:p});return x.useCallback(L=>{if(dm(L,o)){L.preventDefault();let D=l!==void 0?l:us(k)===us(_),W=()=>S(r,{replace:D,state:a,preventScrollReset:d,relative:p,viewTransition:h,unstable_defaultShouldRevalidate:g});v?x.startTransition(()=>W()):W()}},[k,S,_,l,a,o,r,d,p,h,g,v])}var Om=0,Im=()=>`__${String(++Om)}__`;function Dm(){let{router:r}=Md("useSubmit"),{basename:o}=x.useContext(yt),l=em(),a=r.fetch,d=r.navigate;return x.useCallback(async(p,h={})=>{let{action:g,method:v,encType:S,formData:k,body:_}=hm(p,o);if(h.navigate===!1){let L=h.fetcherKey||Im();await a(L,l,h.action||g,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:k,body:_,formMethod:h.method||v,formEncType:h.encType||S,flushSync:h.flushSync})}else await d(h.action||g,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:k,body:_,formMethod:h.method||v,formEncType:h.encType||S,replace:h.replace,state:h.state,fromRouteId:l,flushSync:h.flushSync,viewTransition:h.viewTransition})},[a,d,o,l])}function Mm(r,{relative:o}={}){let{basename:l}=x.useContext(yt),a=x.useContext(It);Ee(a,"useFormAction must be used inside a RouteContext");let[d]=a.matches.slice(-1),p={...fs(r||".",{relative:o})},h=Dn();if(r==null){p.search=h.search;let g=new URLSearchParams(p.search),v=g.getAll("index");if(v.some(k=>k==="")){g.delete("index"),v.filter(_=>_).forEach(_=>g.append("index",_));let k=g.toString();p.search=k?`?${k}`:""}}return(!r||r===".")&&d.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(p.pathname=p.pathname==="/"?l:Qt([l,p.pathname])),us(p)}function Bm(r,{relative:o}={}){let l=x.useContext(jd);Ee(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Md("useViewTransitionState"),d=fs(r,{relative:o});if(!l.isTransitioning)return!1;let p=qt(l.currentLocation.pathname,a)||l.currentLocation.pathname,h=qt(l.nextLocation.pathname,a)||l.nextLocation.pathname;return Lo(d.pathname,h)!=null||Lo(d.pathname,p)!=null}/**
52
+ * @license lucide-react v0.563.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Bd=(...r)=>r.filter((o,l,a)=>!!o&&o.trim()!==""&&a.indexOf(o)===l).join(" ").trim();/**
57
+ * @license lucide-react v0.563.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const Fm=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
62
+ * @license lucide-react v0.563.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const zm=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,l,a)=>a?a.toUpperCase():l.toLowerCase());/**
67
+ * @license lucide-react v0.563.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const ld=r=>{const o=zm(r);return o.charAt(0).toUpperCase()+o.slice(1)};/**
72
+ * @license lucide-react v0.563.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */var Um={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"};/**
77
+ * @license lucide-react v0.563.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const $m=r=>{for(const o in r)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};/**
82
+ * @license lucide-react v0.563.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Hm=x.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:a,className:d="",children:p,iconNode:h,...g},v)=>x.createElement("svg",{ref:v,...Um,width:o,height:o,stroke:r,strokeWidth:a?Number(l)*24/Number(o):l,className:Bd("lucide",d),...!p&&!$m(g)&&{"aria-hidden":"true"},...g},[...h.map(([S,k])=>x.createElement(S,k)),...Array.isArray(p)?p:[p]]));/**
87
+ * @license lucide-react v0.563.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Mn=(r,o)=>{const l=x.forwardRef(({className:a,...d},p)=>x.createElement(Hm,{ref:p,iconNode:o,className:Bd(`lucide-${Fm(ld(r))}`,`lucide-${r}`,a),...d}));return l.displayName=ld(r),l};/**
92
+ * @license lucide-react v0.563.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Wm=[["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"}]],Vm=Mn("activity",Wm);/**
97
+ * @license lucide-react v0.563.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Km=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Qm=Mn("bot",Km);/**
102
+ * @license lucide-react v0.563.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const qm=[["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"}]],Ym=Mn("layout-dashboard",qm);/**
107
+ * @license lucide-react v0.563.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const Gm=[["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"}]],Xm=Mn("lock",Gm);/**
112
+ * @license lucide-react v0.563.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const Jm=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Zm=Mn("settings",Jm);/**
117
+ * @license lucide-react v0.563.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const e0=[["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"}]],t0=Mn("shield-alert",e0);/**
122
+ * @license lucide-react v0.563.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const n0=[["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"}]],r0=Mn("triangle-alert",n0),s0=[{to:"/",label:"Dashboard",icon:Ym},{to:"/interception",label:"Command Interception",icon:t0},{to:"/sessions",label:"Session Monitor",icon:Vm},{to:"/threats",label:"Threat Center",icon:r0},{to:"/access",label:"Access Control",icon:Xm},{to:"/openclaw",label:"OpenClaw Config",icon:Qm}];function o0(){return u.jsxs("aside",{className:"flex h-screen w-64 flex-col bg-sidebar border-r border-gray-800",children:[u.jsxs("div",{className:"flex h-14 items-center gap-3 px-6 border-b border-gray-800",children:[u.jsx("img",{src:"/safeclaw_icon.png",alt:"SafeClaw",className:"h-8 w-8 object-contain"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("span",{className:"text-xl font-bold",children:[u.jsx("span",{className:"text-white",children:"Safe"}),u.jsx("span",{className:"text-red-500",style:{textShadow:"0 0 8px rgba(239, 68, 68, 0.6), 0 0 20px rgba(239, 68, 68, 0.3)"},children:"Claw"})]}),u.jsx("span",{className:"text-xs text-gray-500",children:"v0.1.0"})]})]}),u.jsx("nav",{className:"flex-1 px-3 py-4 space-y-1",children:s0.map(r=>u.jsxs(Ui,{to:r.to,end:r.to==="/",className:({isActive:o})=>`flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors ${o?"bg-primary/10 text-primary":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[u.jsx(r.icon,{size:18}),r.label]},r.to))}),u.jsx("div",{className:"px-3 pb-4 border-t border-gray-800 pt-2",children:u.jsxs(Ui,{to:"/settings",className:({isActive:r})=>`flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors ${r?"bg-primary/10 text-primary":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"}`,children:[u.jsx(Zm,{size:18}),"Settings"]})})]})}const Ot=Object.create(null);Ot.open="0";Ot.close="1";Ot.ping="2";Ot.pong="3";Ot.message="4";Ot.upgrade="5";Ot.noop="6";const bo=Object.create(null);Object.keys(Ot).forEach(r=>{bo[Ot[r]]=r});const $i={type:"error",data:"parser error"},Fd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",zd=typeof ArrayBuffer=="function",Ud=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,ta=({type:r,data:o},l,a)=>Fd&&o instanceof Blob?l?a(o):id(o,a):zd&&(o instanceof ArrayBuffer||Ud(o))?l?a(o):id(new Blob([o]),a):a(Ot[r]+(o||"")),id=(r,o)=>{const l=new FileReader;return l.onload=function(){const a=l.result.split(",")[1];o("b"+(a||""))},l.readAsDataURL(r)};function ad(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let Ai;function l0(r,o){if(Fd&&r.data instanceof Blob)return r.data.arrayBuffer().then(ad).then(o);if(zd&&(r.data instanceof ArrayBuffer||Ud(r.data)))return o(ad(r.data));ta(r,!1,l=>{Ai||(Ai=new TextEncoder),o(Ai.encode(l))})}const ud="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",as=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<ud.length;r++)as[ud.charCodeAt(r)]=r;const i0=r=>{let o=r.length*.75,l=r.length,a,d=0,p,h,g,v;r[r.length-1]==="="&&(o--,r[r.length-2]==="="&&o--);const S=new ArrayBuffer(o),k=new Uint8Array(S);for(a=0;a<l;a+=4)p=as[r.charCodeAt(a)],h=as[r.charCodeAt(a+1)],g=as[r.charCodeAt(a+2)],v=as[r.charCodeAt(a+3)],k[d++]=p<<2|h>>4,k[d++]=(h&15)<<4|g>>2,k[d++]=(g&3)<<6|v&63;return S},a0=typeof ArrayBuffer=="function",na=(r,o)=>{if(typeof r!="string")return{type:"message",data:$d(r,o)};const l=r.charAt(0);return l==="b"?{type:"message",data:u0(r.substring(1),o)}:bo[l]?r.length>1?{type:bo[l],data:r.substring(1)}:{type:bo[l]}:$i},u0=(r,o)=>{if(a0){const l=i0(r);return $d(l,o)}else return{base64:!0,data:r}},$d=(r,o)=>{switch(o){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},Hd="",c0=(r,o)=>{const l=r.length,a=new Array(l);let d=0;r.forEach((p,h)=>{ta(p,!1,g=>{a[h]=g,++d===l&&o(a.join(Hd))})})},d0=(r,o)=>{const l=r.split(Hd),a=[];for(let d=0;d<l.length;d++){const p=na(l[d],o);if(a.push(p),p.type==="error")break}return a};function f0(){return new TransformStream({transform(r,o){l0(r,l=>{const a=l.length;let d;if(a<126)d=new Uint8Array(1),new DataView(d.buffer).setUint8(0,a);else if(a<65536){d=new Uint8Array(3);const p=new DataView(d.buffer);p.setUint8(0,126),p.setUint16(1,a)}else{d=new Uint8Array(9);const p=new DataView(d.buffer);p.setUint8(0,127),p.setBigUint64(1,BigInt(a))}r.data&&typeof r.data!="string"&&(d[0]|=128),o.enqueue(d),o.enqueue(l)})}})}let Oi;function So(r){return r.reduce((o,l)=>o+l.length,0)}function Co(r,o){if(r[0].length===o)return r.shift();const l=new Uint8Array(o);let a=0;for(let d=0;d<o;d++)l[d]=r[0][a++],a===r[0].length&&(r.shift(),a=0);return r.length&&a<r[0].length&&(r[0]=r[0].slice(a)),l}function p0(r,o){Oi||(Oi=new TextDecoder);const l=[];let a=0,d=-1,p=!1;return new TransformStream({transform(h,g){for(l.push(h);;){if(a===0){if(So(l)<1)break;const v=Co(l,1);p=(v[0]&128)===128,d=v[0]&127,d<126?a=3:d===126?a=1:a=2}else if(a===1){if(So(l)<2)break;const v=Co(l,2);d=new DataView(v.buffer,v.byteOffset,v.length).getUint16(0),a=3}else if(a===2){if(So(l)<8)break;const v=Co(l,8),S=new DataView(v.buffer,v.byteOffset,v.length),k=S.getUint32(0);if(k>Math.pow(2,21)-1){g.enqueue($i);break}d=k*Math.pow(2,32)+S.getUint32(4),a=3}else{if(So(l)<d)break;const v=Co(l,d);g.enqueue(na(p?v:Oi.decode(v),o)),a=0}if(d===0||d>r){g.enqueue($i);break}}}})}const Wd=4;function Le(r){if(r)return h0(r)}function h0(r){for(var o in Le.prototype)r[o]=Le.prototype[o];return r}Le.prototype.on=Le.prototype.addEventListener=function(r,o){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(o),this};Le.prototype.once=function(r,o){function l(){this.off(r,l),o.apply(this,arguments)}return l.fn=o,this.on(r,l),this};Le.prototype.off=Le.prototype.removeListener=Le.prototype.removeAllListeners=Le.prototype.removeEventListener=function(r,o){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+r];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var a,d=0;d<l.length;d++)if(a=l[d],a===o||a.fn===o){l.splice(d,1);break}return l.length===0&&delete this._callbacks["$"+r],this};Le.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var o=new Array(arguments.length-1),l=this._callbacks["$"+r],a=1;a<arguments.length;a++)o[a-1]=arguments[a];if(l){l=l.slice(0);for(var a=0,d=l.length;a<d;++a)l[a].apply(this,o)}return this};Le.prototype.emitReserved=Le.prototype.emit;Le.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};Le.prototype.hasListeners=function(r){return!!this.listeners(r).length};const Io=typeof Promise=="function"&&typeof Promise.resolve=="function"?o=>Promise.resolve().then(o):(o,l)=>l(o,0),gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),m0="arraybuffer";function Vd(r,...o){return o.reduce((l,a)=>(r.hasOwnProperty(a)&&(l[a]=r[a]),l),{})}const g0=gt.setTimeout,y0=gt.clearTimeout;function Do(r,o){o.useNativeTimers?(r.setTimeoutFn=g0.bind(gt),r.clearTimeoutFn=y0.bind(gt)):(r.setTimeoutFn=gt.setTimeout.bind(gt),r.clearTimeoutFn=gt.clearTimeout.bind(gt))}const x0=1.33;function v0(r){return typeof r=="string"?w0(r):Math.ceil((r.byteLength||r.size)*x0)}function w0(r){let o=0,l=0;for(let a=0,d=r.length;a<d;a++)o=r.charCodeAt(a),o<128?l+=1:o<2048?l+=2:o<55296||o>=57344?l+=3:(a++,l+=4);return l}function Kd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function N0(r){let o="";for(let l in r)r.hasOwnProperty(l)&&(o.length&&(o+="&"),o+=encodeURIComponent(l)+"="+encodeURIComponent(r[l]));return o}function k0(r){let o={},l=r.split("&");for(let a=0,d=l.length;a<d;a++){let p=l[a].split("=");o[decodeURIComponent(p[0])]=decodeURIComponent(p[1])}return o}class S0 extends Error{constructor(o,l,a){super(o),this.description=l,this.context=a,this.type="TransportError"}}class ra extends Le{constructor(o){super(),this.writable=!1,Do(this,o),this.opts=o,this.query=o.query,this.socket=o.socket,this.supportsBinary=!o.forceBase64}onError(o,l,a){return super.emitReserved("error",new S0(o,l,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(o){this.readyState==="open"&&this.write(o)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(o){const l=na(o,this.socket.binaryType);this.onPacket(l)}onPacket(o){super.emitReserved("packet",o)}onClose(o){this.readyState="closed",super.emitReserved("close",o)}pause(o){}createUri(o,l={}){return o+"://"+this._hostname()+this._port()+this.opts.path+this._query(l)}_hostname(){const o=this.opts.hostname;return o.indexOf(":")===-1?o:"["+o+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(o){const l=N0(o);return l.length?"?"+l:""}}class C0 extends ra{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(o){this.readyState="pausing";const l=()=>{this.readyState="paused",o()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||l()})),this.writable||(a++,this.once("drain",function(){--a||l()}))}else l()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(o){const l=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};d0(o,this.socket.binaryType).forEach(l),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const o=()=>{this.write([{type:"close"}])};this.readyState==="open"?o():this.once("open",o)}write(o){this.writable=!1,c0(o,l=>{this.doWrite(l,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const o=this.opts.secure?"https":"http",l=this.query||{};return this.opts.timestampRequests!==!1&&(l[this.opts.timestampParam]=Kd()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(o,l)}}let Qd=!1;try{Qd=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const E0=Qd;function j0(){}class _0 extends C0{constructor(o){if(super(o),typeof location<"u"){const l=location.protocol==="https:";let a=location.port;a||(a=l?"443":"80"),this.xd=typeof location<"u"&&o.hostname!==location.hostname||a!==o.port}}doWrite(o,l){const a=this.request({method:"POST",data:o});a.on("success",l),a.on("error",(d,p)=>{this.onError("xhr post error",d,p)})}doPoll(){const o=this.request();o.on("data",this.onData.bind(this)),o.on("error",(l,a)=>{this.onError("xhr poll error",l,a)}),this.pollXhr=o}}class Lt extends Le{constructor(o,l,a){super(),this.createRequest=o,Do(this,a),this._opts=a,this._method=a.method||"GET",this._uri=l,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var o;const l=Vd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");l.xdomain=!!this._opts.xd;const a=this._xhr=this.createRequest(l);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let d in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(d)&&a.setRequestHeader(d,this._opts.extraHeaders[d])}}catch{}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{a.setRequestHeader("Accept","*/*")}catch{}(o=this._opts.cookieJar)===null||o===void 0||o.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var d;a.readyState===3&&((d=this._opts.cookieJar)===null||d===void 0||d.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(d){this.setTimeoutFn(()=>{this._onError(d)},0);return}typeof document<"u"&&(this._index=Lt.requestsCount++,Lt.requests[this._index]=this)}_onError(o){this.emitReserved("error",o,this._xhr),this._cleanup(!0)}_cleanup(o){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=j0,o)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Lt.requests[this._index],this._xhr=null}}_onLoad(){const o=this._xhr.responseText;o!==null&&(this.emitReserved("data",o),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Lt.requestsCount=0;Lt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",cd);else if(typeof addEventListener=="function"){const r="onpagehide"in gt?"pagehide":"unload";addEventListener(r,cd,!1)}}function cd(){for(let r in Lt.requests)Lt.requests.hasOwnProperty(r)&&Lt.requests[r].abort()}const b0=(function(){const r=qd({xdomain:!1});return r&&r.responseType!==null})();class R0 extends _0{constructor(o){super(o);const l=o&&o.forceBase64;this.supportsBinary=b0&&!l}request(o={}){return Object.assign(o,{xd:this.xd},this.opts),new Lt(qd,this.uri(),o)}}function qd(r){const o=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!o||E0))return new XMLHttpRequest}catch{}if(!o)try{return new gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Yd=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class T0 extends ra{get name(){return"websocket"}doOpen(){const o=this.uri(),l=this.opts.protocols,a=Yd?{}:Vd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(o,l,a)}catch(d){return this.emitReserved("error",d)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=o=>this.onClose({description:"websocket connection closed",context:o}),this.ws.onmessage=o=>this.onData(o.data),this.ws.onerror=o=>this.onError("websocket error",o)}write(o){this.writable=!1;for(let l=0;l<o.length;l++){const a=o[l],d=l===o.length-1;ta(a,this.supportsBinary,p=>{try{this.doWrite(a,p)}catch{}d&&Io(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const o=this.opts.secure?"wss":"ws",l=this.query||{};return this.opts.timestampRequests&&(l[this.opts.timestampParam]=Kd()),this.supportsBinary||(l.b64=1),this.createUri(o,l)}}const Ii=gt.WebSocket||gt.MozWebSocket;class P0 extends T0{createSocket(o,l,a){return Yd?new Ii(o,l,a):l?new Ii(o,l):new Ii(o)}doWrite(o,l){this.ws.send(l)}}class L0 extends ra{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(o){return this.emitReserved("error",o)}this._transport.closed.then(()=>{this.onClose()}).catch(o=>{this.onError("webtransport error",o)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(o=>{const l=p0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=o.readable.pipeThrough(l).getReader(),d=f0();d.readable.pipeTo(o.writable),this._writer=d.writable.getWriter();const p=()=>{a.read().then(({done:g,value:v})=>{g||(this.onPacket(v),p())}).catch(g=>{})};p();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).then(()=>this.onOpen())})})}write(o){this.writable=!1;for(let l=0;l<o.length;l++){const a=o[l],d=l===o.length-1;this._writer.write(a).then(()=>{d&&Io(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var o;(o=this._transport)===null||o===void 0||o.close()}}const A0={websocket:P0,webtransport:L0,polling:R0},O0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,I0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Hi(r){if(r.length>8e3)throw"URI too long";const o=r,l=r.indexOf("["),a=r.indexOf("]");l!=-1&&a!=-1&&(r=r.substring(0,l)+r.substring(l,a).replace(/:/g,";")+r.substring(a,r.length));let d=O0.exec(r||""),p={},h=14;for(;h--;)p[I0[h]]=d[h]||"";return l!=-1&&a!=-1&&(p.source=o,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p.pathNames=D0(p,p.path),p.queryKey=M0(p,p.query),p}function D0(r,o){const l=/\/{2,9}/g,a=o.replace(l,"/").split("/");return(o.slice(0,1)=="/"||o.length===0)&&a.splice(0,1),o.slice(-1)=="/"&&a.splice(a.length-1,1),a}function M0(r,o){const l={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,d,p){d&&(l[d]=p)}),l}const Wi=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ro=[];Wi&&addEventListener("offline",()=>{Ro.forEach(r=>r())},!1);class wn extends Le{constructor(o,l){if(super(),this.binaryType=m0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,o&&typeof o=="object"&&(l=o,o=null),o){const a=Hi(o);l.hostname=a.host,l.secure=a.protocol==="https"||a.protocol==="wss",l.port=a.port,a.query&&(l.query=a.query)}else l.host&&(l.hostname=Hi(l.host).host);Do(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},l.transports.forEach(a=>{const d=a.prototype.name;this.transports.push(d),this._transportsByName[d]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=k0(this.opts.query)),Wi&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ro.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(o){const l=Object.assign({},this.opts.query);l.EIO=Wd,l.transport=o,this.id&&(l.sid=this.id);const a=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[o]);return new this._transportsByName[o](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const o=this.opts.rememberUpgrade&&wn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const l=this.createTransport(o);l.open(),this.setTransport(l)}setTransport(o){this.transport&&this.transport.removeAllListeners(),this.transport=o,o.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",l=>this._onClose("transport close",l))}onOpen(){this.readyState="open",wn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",o),this.emitReserved("heartbeat"),o.type){case"open":this.onHandshake(JSON.parse(o.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const l=new Error("server error");l.code=o.data,this._onError(l);break;case"message":this.emitReserved("data",o.data),this.emitReserved("message",o.data);break}}onHandshake(o){this.emitReserved("handshake",o),this.id=o.sid,this.transport.query.sid=o.sid,this._pingInterval=o.pingInterval,this._pingTimeout=o.pingTimeout,this._maxPayload=o.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const o=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+o,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},o),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const o=this._getWritablePackets();this.transport.send(o),this._prevBufferLen=o.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let a=0;a<this.writeBuffer.length;a++){const d=this.writeBuffer[a].data;if(d&&(l+=v0(d)),a>0&&l>this._maxPayload)return this.writeBuffer.slice(0,a);l+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const o=Date.now()>this._pingTimeoutTime;return o&&(this._pingTimeoutTime=0,Io(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),o}write(o,l,a){return this._sendPacket("message",o,l,a),this}send(o,l,a){return this._sendPacket("message",o,l,a),this}_sendPacket(o,l,a,d){if(typeof l=="function"&&(d=l,l=void 0),typeof a=="function"&&(d=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;const p={type:o,data:l,options:a};this.emitReserved("packetCreate",p),this.writeBuffer.push(p),d&&this.once("flush",d),this.flush()}close(){const o=()=>{this._onClose("forced close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),o()},a=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():o()}):this.upgrading?a():o()),this}_onError(o){if(wn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",o),this._onClose("transport error",o)}_onClose(o,l){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wi&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const a=Ro.indexOf(this._offlineEventListener);a!==-1&&Ro.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",o,l),this.writeBuffer=[],this._prevBufferLen=0}}}wn.protocol=Wd;class B0 extends wn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let o=0;o<this._upgrades.length;o++)this._probe(this._upgrades[o])}_probe(o){let l=this.createTransport(o),a=!1;wn.priorWebsocketSuccess=!1;const d=()=>{a||(l.send([{type:"ping",data:"probe"}]),l.once("packet",_=>{if(!a)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;wn.priorWebsocketSuccess=l.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(k(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{const L=new Error("probe error");L.transport=l.name,this.emitReserved("upgradeError",L)}}))};function p(){a||(a=!0,k(),l.close(),l=null)}const h=_=>{const L=new Error("probe error: "+_);L.transport=l.name,p(),this.emitReserved("upgradeError",L)};function g(){h("transport closed")}function v(){h("socket closed")}function S(_){l&&_.name!==l.name&&p()}const k=()=>{l.removeListener("open",d),l.removeListener("error",h),l.removeListener("close",g),this.off("close",v),this.off("upgrading",S)};l.once("open",d),l.once("error",h),l.once("close",g),this.once("close",v),this.once("upgrading",S),this._upgrades.indexOf("webtransport")!==-1&&o!=="webtransport"?this.setTimeoutFn(()=>{a||l.open()},200):l.open()}onHandshake(o){this._upgrades=this._filterUpgrades(o.upgrades),super.onHandshake(o)}_filterUpgrades(o){const l=[];for(let a=0;a<o.length;a++)~this.transports.indexOf(o[a])&&l.push(o[a]);return l}}let F0=class extends B0{constructor(o,l={}){const a=typeof o=="object"?o:l;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(d=>A0[d]).filter(d=>!!d)),super(o,a)}};function z0(r,o="",l){let a=r;l=l||typeof location<"u"&&location,r==null&&(r=l.protocol+"//"+l.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=l.protocol+r:r=l.host+r),/^(https?|wss?):\/\//.test(r)||(typeof l<"u"?r=l.protocol+"//"+r:r="https://"+r),a=Hi(r)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";const p=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+p+":"+a.port+o,a.href=a.protocol+"://"+p+(l&&l.port===a.port?"":":"+a.port),a}const U0=typeof ArrayBuffer=="function",$0=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Gd=Object.prototype.toString,H0=typeof Blob=="function"||typeof Blob<"u"&&Gd.call(Blob)==="[object BlobConstructor]",W0=typeof File=="function"||typeof File<"u"&&Gd.call(File)==="[object FileConstructor]";function sa(r){return U0&&(r instanceof ArrayBuffer||$0(r))||H0&&r instanceof Blob||W0&&r instanceof File}function To(r,o){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let l=0,a=r.length;l<a;l++)if(To(r[l]))return!0;return!1}if(sa(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return To(r.toJSON(),!0);for(const l in r)if(Object.prototype.hasOwnProperty.call(r,l)&&To(r[l]))return!0;return!1}function V0(r){const o=[],l=r.data,a=r;return a.data=Vi(l,o),a.attachments=o.length,{packet:a,buffers:o}}function Vi(r,o){if(!r)return r;if(sa(r)){const l={_placeholder:!0,num:o.length};return o.push(r),l}else if(Array.isArray(r)){const l=new Array(r.length);for(let a=0;a<r.length;a++)l[a]=Vi(r[a],o);return l}else if(typeof r=="object"&&!(r instanceof Date)){const l={};for(const a in r)Object.prototype.hasOwnProperty.call(r,a)&&(l[a]=Vi(r[a],o));return l}return r}function K0(r,o){return r.data=Ki(r.data,o),delete r.attachments,r}function Ki(r,o){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<o.length)return o[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let l=0;l<r.length;l++)r[l]=Ki(r[l],o);else if(typeof r=="object")for(const l in r)Object.prototype.hasOwnProperty.call(r,l)&&(r[l]=Ki(r[l],o));return r}const Q0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ue;(function(r){r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK"})(ue||(ue={}));class q0{constructor(o){this.replacer=o}encode(o){return(o.type===ue.EVENT||o.type===ue.ACK)&&To(o)?this.encodeAsBinary({type:o.type===ue.EVENT?ue.BINARY_EVENT:ue.BINARY_ACK,nsp:o.nsp,data:o.data,id:o.id}):[this.encodeAsString(o)]}encodeAsString(o){let l=""+o.type;return(o.type===ue.BINARY_EVENT||o.type===ue.BINARY_ACK)&&(l+=o.attachments+"-"),o.nsp&&o.nsp!=="/"&&(l+=o.nsp+","),o.id!=null&&(l+=o.id),o.data!=null&&(l+=JSON.stringify(o.data,this.replacer)),l}encodeAsBinary(o){const l=V0(o),a=this.encodeAsString(l.packet),d=l.buffers;return d.unshift(a),d}}class oa extends Le{constructor(o){super(),this.reviver=o}add(o){let l;if(typeof o=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");l=this.decodeString(o);const a=l.type===ue.BINARY_EVENT;a||l.type===ue.BINARY_ACK?(l.type=a?ue.EVENT:ue.ACK,this.reconstructor=new Y0(l),l.attachments===0&&super.emitReserved("decoded",l)):super.emitReserved("decoded",l)}else if(sa(o)||o.base64)if(this.reconstructor)l=this.reconstructor.takeBinaryData(o),l&&(this.reconstructor=null,super.emitReserved("decoded",l));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+o)}decodeString(o){let l=0;const a={type:Number(o.charAt(0))};if(ue[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===ue.BINARY_EVENT||a.type===ue.BINARY_ACK){const p=l+1;for(;o.charAt(++l)!=="-"&&l!=o.length;);const h=o.substring(p,l);if(h!=Number(h)||o.charAt(l)!=="-")throw new Error("Illegal attachments");a.attachments=Number(h)}if(o.charAt(l+1)==="/"){const p=l+1;for(;++l&&!(o.charAt(l)===","||l===o.length););a.nsp=o.substring(p,l)}else a.nsp="/";const d=o.charAt(l+1);if(d!==""&&Number(d)==d){const p=l+1;for(;++l;){const h=o.charAt(l);if(h==null||Number(h)!=h){--l;break}if(l===o.length)break}a.id=Number(o.substring(p,l+1))}if(o.charAt(++l)){const p=this.tryParse(o.substr(l));if(oa.isPayloadValid(a.type,p))a.data=p;else throw new Error("invalid payload")}return a}tryParse(o){try{return JSON.parse(o,this.reviver)}catch{return!1}}static isPayloadValid(o,l){switch(o){case ue.CONNECT:return dd(l);case ue.DISCONNECT:return l===void 0;case ue.CONNECT_ERROR:return typeof l=="string"||dd(l);case ue.EVENT:case ue.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&Q0.indexOf(l[0])===-1);case ue.ACK:case ue.BINARY_ACK:return Array.isArray(l)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Y0{constructor(o){this.packet=o,this.buffers=[],this.reconPack=o}takeBinaryData(o){if(this.buffers.push(o),this.buffers.length===this.reconPack.attachments){const l=K0(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function dd(r){return Object.prototype.toString.call(r)==="[object Object]"}const G0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:oa,Encoder:q0,get PacketType(){return ue}},Symbol.toStringTag,{value:"Module"}));function jt(r,o,l){return r.on(o,l),function(){r.off(o,l)}}const X0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Xd extends Le{constructor(o,l,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=o,this.nsp=l,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const o=this.io;this.subs=[jt(o,"open",this.onopen.bind(this)),jt(o,"packet",this.onpacket.bind(this)),jt(o,"error",this.onerror.bind(this)),jt(o,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...o){return o.unshift("message"),this.emit.apply(this,o),this}emit(o,...l){var a,d,p;if(X0.hasOwnProperty(o))throw new Error('"'+o.toString()+'" is a reserved event name');if(l.unshift(o),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(l),this;const h={type:ue.EVENT,data:l};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof l[l.length-1]=="function"){const k=this.ids++,_=l.pop();this._registerAckCallback(k,_),h.id=k}const g=(d=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||d===void 0?void 0:d.writable,v=this.connected&&!(!((p=this.io.engine)===null||p===void 0)&&p._hasPingExpired());return this.flags.volatile&&!g||(v?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this}_registerAckCallback(o,l){var a;const d=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(d===void 0){this.acks[o]=l;return}const p=this.io.setTimeoutFn(()=>{delete this.acks[o];for(let g=0;g<this.sendBuffer.length;g++)this.sendBuffer[g].id===o&&this.sendBuffer.splice(g,1);l.call(this,new Error("operation has timed out"))},d),h=(...g)=>{this.io.clearTimeoutFn(p),l.apply(this,g)};h.withError=!0,this.acks[o]=h}emitWithAck(o,...l){return new Promise((a,d)=>{const p=(h,g)=>h?d(h):a(g);p.withError=!0,l.push(p),this.emit(o,...l)})}_addToQueue(o){let l;typeof o[o.length-1]=="function"&&(l=o.pop());const a={id:this._queueSeq++,tryCount:0,pending:!1,args:o,flags:Object.assign({fromQueue:!0},this.flags)};o.push((d,...p)=>(this._queue[0],d!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),l&&l(d)):(this._queue.shift(),l&&l(null,...p)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(o=!1){if(!this.connected||this._queue.length===0)return;const l=this._queue[0];l.pending&&!o||(l.pending=!0,l.tryCount++,this.flags=l.flags,this.emit.apply(this,l.args))}packet(o){o.nsp=this.nsp,this.io._packet(o)}onopen(){typeof this.auth=="function"?this.auth(o=>{this._sendConnectPacket(o)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(o){this.packet({type:ue.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},o):o})}onerror(o){this.connected||this.emitReserved("connect_error",o)}onclose(o,l){this.connected=!1,delete this.id,this.emitReserved("disconnect",o,l),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(o=>{if(!this.sendBuffer.some(a=>String(a.id)===o)){const a=this.acks[o];delete this.acks[o],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(o){if(o.nsp===this.nsp)switch(o.type){case ue.CONNECT:o.data&&o.data.sid?this.onconnect(o.data.sid,o.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ue.EVENT:case ue.BINARY_EVENT:this.onevent(o);break;case ue.ACK:case ue.BINARY_ACK:this.onack(o);break;case ue.DISCONNECT:this.ondisconnect();break;case ue.CONNECT_ERROR:this.destroy();const a=new Error(o.data.message);a.data=o.data.data,this.emitReserved("connect_error",a);break}}onevent(o){const l=o.data||[];o.id!=null&&l.push(this.ack(o.id)),this.connected?this.emitEvent(l):this.receiveBuffer.push(Object.freeze(l))}emitEvent(o){if(this._anyListeners&&this._anyListeners.length){const l=this._anyListeners.slice();for(const a of l)a.apply(this,o)}super.emit.apply(this,o),this._pid&&o.length&&typeof o[o.length-1]=="string"&&(this._lastOffset=o[o.length-1])}ack(o){const l=this;let a=!1;return function(...d){a||(a=!0,l.packet({type:ue.ACK,id:o,data:d}))}}onack(o){const l=this.acks[o.id];typeof l=="function"&&(delete this.acks[o.id],l.withError&&o.data.unshift(null),l.apply(this,o.data))}onconnect(o,l){this.id=o,this.recovered=l&&this._pid===l,this._pid=l,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(o=>this.emitEvent(o)),this.receiveBuffer=[],this.sendBuffer.forEach(o=>{this.notifyOutgoingListeners(o),this.packet(o)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(o=>o()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ue.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(o){return this.flags.compress=o,this}get volatile(){return this.flags.volatile=!0,this}timeout(o){return this.flags.timeout=o,this}onAny(o){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(o),this}prependAny(o){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(o),this}offAny(o){if(!this._anyListeners)return this;if(o){const l=this._anyListeners;for(let a=0;a<l.length;a++)if(o===l[a])return l.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(o){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(o),this}prependAnyOutgoing(o){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(o),this}offAnyOutgoing(o){if(!this._anyOutgoingListeners)return this;if(o){const l=this._anyOutgoingListeners;for(let a=0;a<l.length;a++)if(o===l[a])return l.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(o){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const l=this._anyOutgoingListeners.slice();for(const a of l)a.apply(this,o.data)}}}function hr(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}hr.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),l=Math.floor(o*this.jitter*r);r=(Math.floor(o*10)&1)==0?r-l:r+l}return Math.min(r,this.max)|0};hr.prototype.reset=function(){this.attempts=0};hr.prototype.setMin=function(r){this.ms=r};hr.prototype.setMax=function(r){this.max=r};hr.prototype.setJitter=function(r){this.jitter=r};class Qi extends Le{constructor(o,l){var a;super(),this.nsps={},this.subs=[],o&&typeof o=="object"&&(l=o,o=void 0),l=l||{},l.path=l.path||"/socket.io",this.opts=l,Do(this,l),this.reconnection(l.reconnection!==!1),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor((a=l.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new hr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(l.timeout==null?2e4:l.timeout),this._readyState="closed",this.uri=o;const d=l.parser||G0;this.encoder=new d.Encoder,this.decoder=new d.Decoder,this._autoConnect=l.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(o){return arguments.length?(this._reconnection=!!o,o||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(o){return o===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=o,this)}reconnectionDelay(o){var l;return o===void 0?this._reconnectionDelay:(this._reconnectionDelay=o,(l=this.backoff)===null||l===void 0||l.setMin(o),this)}randomizationFactor(o){var l;return o===void 0?this._randomizationFactor:(this._randomizationFactor=o,(l=this.backoff)===null||l===void 0||l.setJitter(o),this)}reconnectionDelayMax(o){var l;return o===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=o,(l=this.backoff)===null||l===void 0||l.setMax(o),this)}timeout(o){return arguments.length?(this._timeout=o,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(o){if(~this._readyState.indexOf("open"))return this;this.engine=new F0(this.uri,this.opts);const l=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;const d=jt(l,"open",function(){a.onopen(),o&&o()}),p=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),o?o(g):this.maybeReconnectOnOpen()},h=jt(l,"error",p);if(this._timeout!==!1){const g=this._timeout,v=this.setTimeoutFn(()=>{d(),p(new Error("timeout")),l.close()},g);this.opts.autoUnref&&v.unref(),this.subs.push(()=>{this.clearTimeoutFn(v)})}return this.subs.push(d),this.subs.push(h),this}connect(o){return this.open(o)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const o=this.engine;this.subs.push(jt(o,"ping",this.onping.bind(this)),jt(o,"data",this.ondata.bind(this)),jt(o,"error",this.onerror.bind(this)),jt(o,"close",this.onclose.bind(this)),jt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(o){try{this.decoder.add(o)}catch(l){this.onclose("parse error",l)}}ondecoded(o){Io(()=>{this.emitReserved("packet",o)},this.setTimeoutFn)}onerror(o){this.emitReserved("error",o)}socket(o,l){let a=this.nsps[o];return a?this._autoConnect&&!a.active&&a.connect():(a=new Xd(this,o,l),this.nsps[o]=a),a}_destroy(o){const l=Object.keys(this.nsps);for(const a of l)if(this.nsps[a].active)return;this._close()}_packet(o){const l=this.encoder.encode(o);for(let a=0;a<l.length;a++)this.engine.write(l[a],o.options)}cleanup(){this.subs.forEach(o=>o()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(o,l){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",o,l),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const o=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const l=this.backoff.duration();this._reconnecting=!0;const a=this.setTimeoutFn(()=>{o.skipReconnect||(this.emitReserved("reconnect_attempt",o.backoff.attempts),!o.skipReconnect&&o.open(d=>{d?(o._reconnecting=!1,o.reconnect(),this.emitReserved("reconnect_error",d)):o.onreconnect()}))},l);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){const o=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",o)}}const ls={};function Po(r,o){typeof r=="object"&&(o=r,r=void 0),o=o||{};const l=z0(r,o.path||"/socket.io"),a=l.source,d=l.id,p=l.path,h=ls[d]&&p in ls[d].nsps,g=o.forceNew||o["force new connection"]||o.multiplex===!1||h;let v;return g?v=new Qi(a,o):(ls[d]||(ls[d]=new Qi(a,o)),v=ls[d]),l.query&&!o.query&&(o.query=l.queryKey),v.socket(l.path,o)}Object.assign(Po,{Manager:Qi,Socket:Xd,io:Po,connect:Po});const J0=window.location.origin,q=Po(J0,{autoConnect:!0,reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10});function Z0(){const[r,o]=x.useState(null);x.useEffect(()=>(q.emit("safeclaw:getOpenclawMonitorStatus"),q.on("safeclaw:openclawMonitorStatus",o),()=>{q.off("safeclaw:openclawMonitorStatus",o)}),[]);const l=(r==null?void 0:r.connectionStatus)==="connected"?"bg-success":(r==null?void 0:r.connectionStatus)==="connecting"?"bg-warning animate-pulse":"bg-danger",a=(r==null?void 0:r.connectionStatus)==="connected"?"Connected":(r==null?void 0:r.connectionStatus)==="connecting"?"Connecting":(r==null?void 0:r.connectionStatus)==="not_configured"?"Not Configured":"Disconnected";return u.jsx("div",{className:"flex items-center gap-4 text-sm",children:u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:`h-2 w-2 rounded-full ${l}`}),u.jsxs("span",{className:"text-gray-500 text-xs",children:["OpenClaw: ",a]})]})})}function eg(){return u.jsxs("div",{className:"flex h-screen bg-sidebar",children:[u.jsx(o0,{}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsxs("header",{className:"flex h-14 items-center border-b border-gray-800 px-6 border-t-2 border-t-primary",children:[u.jsx("h1",{className:"text-sm font-medium text-gray-300",children:"AI Agents Connected"}),u.jsx("div",{className:"ml-4",children:u.jsx(Z0,{})})]}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(sm,{})})]})]})}const fd={CRITICAL:"text-danger",HIGH:"text-warning",MEDIUM:"text-yellow-400",LOW:"text-blue-400",NONE:"text-success"},tg={CRITICAL:"bg-danger",HIGH:"bg-warning",MEDIUM:"bg-yellow-400",LOW:"bg-blue-400"};function ng(){var g,v;const[r,o]=x.useState(null),[l,a]=x.useState([]),d=x.useCallback(S=>{a(k=>k.some(_=>_.id===S.id)?k:[S,...k].slice(0,10))},[]),p=x.useCallback(S=>{o(k=>k&&{...k,execApprovalTotal:k.execApprovalTotal+1,execApprovalPending:k.execApprovalPending+1})},[]),h=x.useCallback(S=>{o(k=>k&&{...k,execApprovalPending:Math.max(0,k.execApprovalPending-1),execApprovalBlocked:S.decision==="deny"?k.execApprovalBlocked+1:k.execApprovalBlocked,execApprovalAllowed:S.decision==="allow-once"||S.decision==="allow-always"?k.execApprovalAllowed+1:k.execApprovalAllowed})},[]);return x.useEffect(()=>(q.emit("safeclaw:getStats"),q.emit("safeclaw:getOpenclawActivities",{limit:10}),q.on("safeclaw:stats",o),q.on("safeclaw:openclawActivity",d),q.on("safeclaw:execApprovalRequested",p),q.on("safeclaw:execApprovalResolved",h),()=>{q.off("safeclaw:stats",o),q.off("safeclaw:openclawActivity",d),q.off("safeclaw:execApprovalRequested",p),q.off("safeclaw:execApprovalResolved",h)}),[d,p,h]),u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Dashboard Overview"}),r?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[u.jsx(dr,{label:"Total Commands",value:r.execApprovalTotal}),u.jsx(dr,{label:"Blocked",value:r.execApprovalBlocked,color:"text-danger"}),u.jsx(dr,{label:"Allowed",value:r.execApprovalAllowed,color:"text-success"}),u.jsx(dr,{label:"Pending",value:r.execApprovalPending,color:"text-warning"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:[u.jsx(dr,{label:"Agent Activities",value:r.openclawActivities??0,color:"text-gray-100"}),u.jsx(dr,{label:"Active Agent Sessions",value:r.openclawActiveSessions??0,color:"text-gray-100"}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("p",{className:"text-sm text-gray-400",children:"Threat Detection Rate"}),u.jsxs("p",{className:"text-3xl font-bold mt-1 text-gray-100",children:[((g=r.threatDetectionRate)==null?void 0:g.activitiesWithThreats)??0,u.jsxs("span",{className:"text-lg text-gray-500",children:[" ","/ ",((v=r.threatDetectionRate)==null?void 0:v.totalActivities)??0]})]}),u.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[r.threatDetectionRate&&r.threatDetectionRate.totalActivities>0?`${Math.round(r.threatDetectionRate.activitiesWithThreats/r.threatDetectionRate.totalActivities*100)}%`:"N/A"," ","of activities triggered findings"]})]})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-4",children:"Threat Results"}),u.jsxs("div",{className:"space-y-3",children:[["CRITICAL","HIGH","MEDIUM","LOW"].map(S=>{var D,W;const k=((D=r.openclawThreatBreakdown)==null?void 0:D[S])??0,_=((W=r.resolvedThreatBreakdown)==null?void 0:W[S])??0,L=k>0?Math.round(_/k*100):0;return k===0?null:u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-1",children:[u.jsx("span",{className:`text-xs font-medium ${fd[S]}`,children:S}),u.jsxs("span",{className:"text-xs text-gray-500",children:[_," resolved out of ",k," (",L,"%)"]})]}),u.jsx("div",{className:"w-full h-1.5 bg-gray-800 rounded-full",children:u.jsx("div",{className:`h-1.5 rounded-full ${tg[S]}`,style:{width:`${L}%`}})})]},S)}),["CRITICAL","HIGH","MEDIUM","LOW"].every(S=>{var k;return(((k=r.openclawThreatBreakdown)==null?void 0:k[S])??0)===0})&&u.jsx("p",{className:"text-xs text-gray-500",children:"No threats detected yet."})]})]}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-4",children:"Recent Activity"}),l.length===0?u.jsx("p",{className:"text-sm text-gray-500",children:"No activities recorded yet. Activity will appear here as your AI agent runs."}):u.jsx("div",{className:"space-y-2 max-h-[280px] overflow-y-auto pr-2",children:l.map(S=>u.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-gray-800 last:border-0",children:[u.jsx("span",{className:`text-xs font-medium ${fd[S.threatLevel]}`,children:S.threatLevel}),u.jsx("span",{className:"text-xs text-gray-500",children:S.activityType}),u.jsx("span",{className:"text-xs text-gray-300 flex-1 truncate",children:S.detail}),u.jsx("span",{className:"text-xs text-gray-600",children:new Date(S.timestamp).toLocaleTimeString()})]},S.id))})]})]})]}):u.jsx("p",{className:"text-gray-500",children:"Loading stats..."})]})}function dr({label:r,value:o,color:l="text-white"}){return u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("p",{className:"text-sm text-gray-400",children:r}),u.jsx("p",{className:`text-3xl font-bold mt-1 ${l}`,children:o})]})}const rg={"allow-once":"text-success","allow-always":"text-blue-400",deny:"text-danger"},sg={"allow-once":"ALLOWED","allow-always":"UNRESTRICTED",deny:"BLOCKED"};function og({entry:r,onDecision:o}){const[l,a]=x.useState(()=>{const d=new Date(r.expiresAt).getTime()-Date.now();return Math.max(0,Math.ceil(d/1e3))});return x.useEffect(()=>{const d=setInterval(()=>{const p=new Date(r.expiresAt).getTime()-Date.now(),h=Math.max(0,Math.ceil(p/1e3));a(h),h<=0&&clearInterval(d)},1e3);return()=>clearInterval(d)},[r.expiresAt]),u.jsx("div",{className:"rounded-xl border border-warning/30 bg-gray-900 p-4",children:u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("code",{className:"text-sm text-gray-200 break-all",children:r.command}),u.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[u.jsx("span",{className:"text-xs text-gray-500",children:r.cwd}),u.jsxs("span",{className:`text-xs font-medium ${l<=10?"text-danger":"text-warning"}`,children:[l,"s remaining"]})]})]}),u.jsxs("div",{className:"flex gap-2 shrink-0",children:[u.jsx("button",{type:"button",onClick:()=>o(r.id,"allow-once"),className:"px-3 py-1.5 text-xs font-medium rounded-lg bg-success/10 text-success hover:bg-success/20 transition-colors",children:"Allow Once"}),u.jsx("button",{type:"button",onClick:()=>o(r.id,"allow-always"),className:"px-3 py-1.5 text-xs font-medium rounded-lg bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 transition-colors",children:"Unrestrict"}),u.jsx("button",{type:"button",onClick:()=>o(r.id,"deny"),className:"px-3 py-1.5 text-xs font-medium rounded-lg bg-danger/10 text-danger hover:bg-danger/20 transition-colors",children:"Deny"})]})]})})}function lg(){const[r,o]=x.useState([]),[l,a]=x.useState([]),[d,p]=x.useState([]),[h,g]=x.useState(""),[v,S]=x.useState(!0),k=x.useCallback(R=>{o(B=>B.some(F=>F.id===R.id)?B:[R,...B]),S(!1)},[]),_=x.useCallback(R=>{o(B=>B.filter(F=>F.id!==R.id)),a(B=>B.some(F=>F.id===R.id)?B:[R,...B])},[]),L=x.useCallback(R=>{a(R)},[]),D=x.useCallback(R=>{p(R.patterns.map(B=>B.pattern))},[]);x.useEffect(()=>{q.emit("safeclaw:getPendingApprovals"),q.emit("safeclaw:getApprovalHistory",{limit:50}),q.emit("safeclaw:getAllowlist"),q.on("safeclaw:execApprovalRequested",k),q.on("safeclaw:execApprovalResolved",_),q.on("safeclaw:approvalHistoryBatch",L),q.on("safeclaw:allowlistState",D);const R=setTimeout(()=>S(!1),1e3);return()=>{q.off("safeclaw:execApprovalRequested",k),q.off("safeclaw:execApprovalResolved",_),q.off("safeclaw:approvalHistoryBatch",L),q.off("safeclaw:allowlistState",D),clearTimeout(R)}},[k,_,L,D]),x.useEffect(()=>{const R=()=>{q.emit("safeclaw:getPendingApprovals"),q.emit("safeclaw:getAllowlist")};return q.on("connect",R),()=>{q.off("connect",R)}},[]);const W=(R,B)=>{q.emit("safeclaw:execDecision",{approvalId:R,decision:B})},b=()=>{const R=h.trim();R&&(q.emit("safeclaw:addAllowlistPattern",{pattern:R}),g(""))},P=R=>{q.emit("safeclaw:removeAllowlistPattern",{pattern:R})};return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Command Interception"}),u.jsxs("div",{className:"mb-8",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-300 mb-4",children:"Restricted Commands"}),u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Commands matching these patterns will require your approval before OpenClaw can execute them. Everything else runs automatically."}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-4",children:[u.jsxs("div",{className:"flex gap-2 mb-4",children:[u.jsx("input",{type:"text",value:h,onChange:R=>g(R.target.value),onKeyDown:R=>R.key==="Enter"&&b(),placeholder:"e.g. sudo *, rm -rf *, curl * | bash",className:"flex-1 rounded-lg bg-gray-800 border border-gray-700 px-3 py-2 text-sm text-gray-200 placeholder-gray-500 focus:outline-none focus:border-primary"}),u.jsx("button",{type:"button",onClick:b,className:"px-4 py-2 text-sm font-medium rounded-lg bg-primary/10 text-primary hover:bg-primary/20 transition-colors",children:"Add Rule"})]}),d.length===0?u.jsx("p",{className:"text-sm text-gray-500",children:"No restricted patterns. All commands will auto-execute without approval."}):u.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(R=>u.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-lg bg-gray-800 px-3 py-1.5 text-sm text-gray-300",children:[u.jsx("code",{children:R}),u.jsx("button",{type:"button",onClick:()=>P(R),className:"text-gray-500 hover:text-danger transition-colors ml-1","aria-label":`Remove pattern ${R}`,children:"×"})]},R))})]})]}),r.length>0&&u.jsxs("div",{className:"mb-8",children:[u.jsxs("h3",{className:"text-lg font-semibold text-warning mb-4",children:["Pending Approval (",r.length,")"]}),u.jsx("div",{className:"space-y-3",children:r.map(R=>u.jsx(og,{entry:R,onDecision:W},R.id))})]}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-300 mb-4",children:"Command History"}),v?u.jsx("p",{className:"text-gray-500",children:"Loading..."}):l.length===0&&r.length===0?u.jsx("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-8",children:u.jsx("p",{className:"text-gray-400",children:"No commands intercepted yet. Add restricted command patterns above, then commands matching those patterns will appear here for your approval."})}):u.jsx("div",{className:"space-y-2",children:l.map(R=>u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3 flex items-center gap-4",children:[u.jsx("span",{className:`text-xs font-medium whitespace-nowrap ${rg[R.decision??"deny"]??"text-gray-400"}`,children:R.decidedBy==="auto-deny"?"TIMED OUT":sg[R.decision??"deny"]??"UNKNOWN"}),u.jsx("code",{className:"text-sm text-gray-300 flex-1 truncate",children:R.command}),u.jsx("span",{className:"text-xs text-gray-600 whitespace-nowrap",children:R.decidedBy==="auto-deny"?"auto":"user"}),u.jsx("span",{className:"text-xs text-gray-500 whitespace-nowrap",children:R.decidedAt?new Date(R.decidedAt).toLocaleTimeString():""})]},R.id))})]})]})}function ig(r){const o=new Map;for(const a of r){const d=a.runId||`fallback-${a.id}`;o.has(d)||o.set(d,[]),o.get(d).push(a)}return Array.from(o.entries()).map(([a,d])=>{const p=d.sort((h,g)=>new Date(h.timestamp).getTime()-new Date(g.timestamp).getTime());return{primary:p[p.length-1],activities:p,runId:a}}).sort((a,d)=>new Date(d.primary.timestamp).getTime()-new Date(a.primary.timestamp).getTime())}const ag=ig;function ug(r,o){const l={},a=o.toLowerCase();return(a.includes("file")||a.includes("read")||a.includes("write")||a.includes("edit"))&&(l.path=r.path??r.file_path??r.file),(a.includes("exec")||a.includes("shell")||a.includes("bash")||a.includes("command"))&&(l.command=r.command??r.cmd),(a.includes("browser")||a.includes("browse")||a.includes("web")||a.includes("fetch")||a.includes("http"))&&(l.url=r.url??r.uri),(a.includes("message")||a.includes("send")||a.includes("whatsapp")||a.includes("sms"))&&(l.recipient=r.to??r.recipient??r.target),l}function cg(){return{toolName:"unknown",phase:"unknown",toolCallId:"",runId:"",args:{},meta:"",result:void 0,isError:!1,sensitiveFields:{}}}function qi(r){try{const o=JSON.parse(r),l=(o==null?void 0:o.payload)??{},a=l.data??{},d=a.name??"unknown",p=a.phase??"unknown",h=a.args??{},g=a.toolCallId??"",v=l.runId??"",S=a.meta??"",k=a.result,_=a.isError??!1,L=ug(h,d);return{toolName:d,phase:p,toolCallId:g,runId:v,args:h,meta:S,result:k,isError:_,sensitiveFields:L}}catch{return cg()}}const dg={CRITICAL:"text-red-400",HIGH:"text-orange-400",MEDIUM:"text-yellow-400",LOW:"text-blue-400",NONE:"text-gray-400"},fg={CRITICAL:"bg-red-500",HIGH:"bg-orange-500",MEDIUM:"bg-yellow-400",LOW:"bg-blue-500",NONE:"bg-gray-500"},pg={file_read:"R",file_write:"W",shell_command:"$",web_browse:"@",tool_call:"T",message:"M",unknown:"?"};function hg({activity:r,phases:o,expanded:l,onToggle:a}){const d=x.useMemo(()=>qi(r.rawPayload),[r.rawPayload]),p=o.length;return u.jsxs("button",{type:"button",onClick:a,className:"w-full text-left flex items-center gap-2 py-1.5 px-2 rounded hover:bg-gray-800/50 transition-colors cursor-pointer group",children:[u.jsx("span",{className:`text-gray-400 transition-transform ${l?"rotate-90":""}`,children:"▶"}),u.jsx("span",{className:`w-6 h-6 rounded flex items-center justify-center text-xs font-mono font-bold bg-gray-800 ${dg[r.threatLevel]}`,children:pg[r.activityType]}),u.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${fg[r.threatLevel]}`}),u.jsx("span",{className:"text-xs text-gray-500 shrink-0",children:"Interaction"}),u.jsxs("span",{className:"text-xs text-gray-300 flex-1 truncate font-mono flex items-center gap-1",children:[d.runId&&d.runId!==""&&u.jsxs("span",{className:"text-gray-500",children:["[",d.runId.slice(0,8),"]"]}),p>1&&u.jsxs("span",{className:"text-gray-600",children:["(",p," activities)"]}),u.jsx("span",{children:r.detail})]}),u.jsx("span",{className:"text-xs text-gray-600 shrink-0",children:new Date(r.timestamp).toLocaleTimeString()})]})}const mg={"TC-SEC":"🔑","TC-EXF":"📤","TC-INJ":"💉","TC-DES":"💥","TC-ESC":"⬆️","TC-SUP":"📦","TC-SFA":"📁","TC-SYS":"⚙️","TC-NET":"🌐","TC-MCP":"🔌"},pd={CRITICAL:"border-red-800 bg-red-900/20 text-red-400",HIGH:"border-orange-800 bg-orange-900/20 text-orange-400",MEDIUM:"border-yellow-800 bg-yellow-900/20 text-yellow-400",LOW:"border-blue-800 bg-blue-900/20 text-blue-400"};function gg(r){switch(r){case"CRITICAL":return"critical";case"HIGH":return"high";case"MEDIUM":return"medium";default:return"low"}}function yg(r){return{level:gg(r.severity),message:r.reason,color:pd[r.severity]??pd.LOW,icon:mg[r.categoryId]??"⚠️",categoryId:r.categoryId,owaspRef:r.owaspRef}}function xg(r,o){return r.threatFindings&&r.threatFindings.length>0?r.threatFindings.map(yg):jg(r,o)}const vg=/^(\/etc|\/usr\/bin|\/usr\/local\/bin|\/root|\/System|\/Library\/Launch)/,wg=/\.(env|pem|key|pass|secret|token|keychain|p12|pfx)$/i,Ng=/\.(ssh|gnupg|aws|gcloud)\//,kg=/\bsudo\b/,Sg=/(rm\s+-+[rfRF]|dd\s+(if|of)=|mkfs\.|format\s)/,Cg=/(chmod|chown|passwd|su\s|usermod|useradd)/,Eg=/(curl|wget).*\|\s*(sh|bash|zsh)/;function jg(r,o){const l=[];if(r.activityType==="file_write"){const a=o.sensitiveFields.path;a&&vg.test(a)&&l.push({level:"critical",message:"Writing to system directory",color:"border-red-800 bg-red-900/20 text-red-400",icon:"🚨"})}if(r.activityType==="shell_command"){const a=o.sensitiveFields.command;a&&(kg.test(a)&&l.push({level:"critical",message:"Elevated privileges (sudo)",color:"border-red-800 bg-red-900/20 text-red-400",icon:"⚠️"}),Sg.test(a)&&l.push({level:"critical",message:"Destructive operation (rm/dd/mkfs)",color:"border-red-800 bg-red-900/20 text-red-400",icon:"💥"}),Cg.test(a)&&l.push({level:"high",message:"Modifying permissions or users",color:"border-orange-800 bg-orange-900/20 text-orange-400",icon:"🔐"}),Eg.test(a)&&l.push({level:"high",message:"Downloading and executing script",color:"border-orange-800 bg-orange-900/20 text-orange-400",icon:"⬇️"}))}if(r.activityType==="file_read"||r.activityType==="file_write"){const a=o.sensitiveFields.path;a&&(wg.test(a)&&l.push({level:"high",message:"Accessing credentials/secrets",color:"border-orange-800 bg-orange-900/20 text-orange-400",icon:"🔑"}),Ng.test(a)&&l.push({level:"high",message:"Accessing sensitive config directory",color:"border-orange-800 bg-orange-900/20 text-orange-400",icon:"📁"}))}if(r.activityType==="web_browse"){const a=o.sensitiveFields.url;a&&/^https?:\/\/\d+\.\d+\.\d+\.\d+/.test(a)&&l.push({level:"medium",message:"Connection to IP address (not domain)",color:"border-yellow-800 bg-yellow-900/20 text-yellow-400",icon:"🌐"})}if(r.activityType==="message"&&l.push({level:"medium",message:"Sending external message",color:"border-yellow-800 bg-yellow-900/20 text-yellow-400",icon:"💬"}),r.secretsDetected&&r.secretsDetected.length>0){const a=r.secretsDetected.some(d=>["AWS_ACCESS_KEY","AWS_SECRET_KEY","OPENAI_API_KEY","GITHUB_TOKEN","GITLAB_TOKEN","PEM_PRIVATE_KEY","STRIPE_KEY","SENDGRID_KEY","TWILIO_KEY"].includes(d));l.push({level:a?"critical":"high",message:`Secrets detected: ${r.secretsDetected.join(", ")}`,color:a?"border-red-800 bg-red-900/20 text-red-400":"border-orange-800 bg-orange-900/20 text-orange-400",icon:"🔓"})}return l}function _g({activity:r,parsed:o}){const l=o.sensitiveFields.path||r.targetPath,a=l&&(/\.(env|pem|key|pass|secret|token)$/i.test(l)||/\.(ssh|gnupg|aws)\//i.test(l)||/^(\/etc|\/usr\/bin|\/root)/i.test(l)),d=o.result,p=r.contentPreview||d;return u.jsxs("div",{className:"space-y-3",children:[r.secretsDetected&&r.secretsDetected.length>0&&u.jsxs("div",{className:"p-3 bg-red-900/30 border border-red-700 rounded",children:[u.jsx("p",{className:"text-sm font-semibold text-red-300 mb-1",children:"Secrets Detected in Content"}),u.jsx("div",{className:"flex flex-wrap gap-1",children:r.secretsDetected.map((h,g)=>u.jsx("span",{className:"px-2 py-0.5 text-xs bg-red-800/50 text-red-200 rounded",children:h},g))})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Path:"}),u.jsx("code",{className:`text-sm block p-2 bg-gray-800 rounded break-all font-mono ${a?"text-red-300 border border-red-800/50":"text-green-300"}`,children:l||"unknown"})]}),p&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Content Preview:"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-300 border border-gray-700 whitespace-pre-wrap break-words",children:p})]}),r.activityType==="file_write"&&r.readContentPreview&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Original Content (before edit):"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-400 border border-gray-600 whitespace-pre-wrap break-words",children:r.readContentPreview})]}),r.activityType==="file_write"&&o.phase==="result"&&u.jsx("div",{className:`p-2 rounded text-xs border ${o.isError?"bg-red-900/20 border-red-800/50 text-red-400":"bg-green-900/20 border-green-800/50 text-green-400"}`,children:o.isError?"❌ File write failed":"✓ File written successfully"}),o.meta&&typeof o.meta=="object"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Metadata:"}),u.jsx("pre",{className:"text-xs p-2 bg-gray-800 rounded overflow-auto text-gray-400",children:JSON.stringify(o.meta,null,2)})]}),o.isError&&u.jsx("div",{className:"p-2 bg-red-900/20 border border-red-800/50 rounded",children:u.jsx("p",{className:"text-xs text-red-400 font-medium",children:"⚠️ Error occurred during operation"})})]})}function bg({activity:r,parsed:o}){const l=o.sensitiveFields.command,a=l&&(/\bsudo\b/i.test(l)||/(rm\s+-+[rfRF]|dd\s+(if|of)=|mkfs\.|format\s)/i.test(l)),d=o.result,p=o.args.cwd,h=r.contentPreview||d;return u.jsxs("div",{className:"space-y-3",children:[r.secretsDetected&&r.secretsDetected.length>0&&u.jsxs("div",{className:"p-3 bg-red-900/30 border border-red-700 rounded",children:[u.jsx("p",{className:"text-sm font-semibold text-red-300 mb-1",children:"Secrets Detected in Output"}),u.jsx("div",{className:"flex flex-wrap gap-1",children:r.secretsDetected.map((g,v)=>u.jsx("span",{className:"px-2 py-0.5 text-xs bg-red-800/50 text-red-200 rounded",children:g},v))})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Command:"}),u.jsx("code",{className:`text-sm block p-3 bg-gray-800 rounded font-mono break-all ${a?"text-red-300 border border-red-800/50":"text-gray-200"}`,children:l||"unknown"})]}),p&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Working Directory:"}),u.jsx("code",{className:"text-xs block p-2 bg-gray-800 rounded text-gray-400 font-mono",children:p})]}),h&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Output:"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-300 border border-gray-700 whitespace-pre-wrap break-words",children:h})]}),o.isError&&u.jsxs("div",{className:"p-2 bg-red-900/20 border border-red-800/50 rounded",children:[u.jsx("p",{className:"text-xs text-red-400 font-medium",children:"⚠️ Command execution failed"}),d&&u.jsx("pre",{className:"text-xs mt-2 text-red-300 whitespace-pre-wrap",children:d})]}),o.meta&&typeof o.meta=="string"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Description:"}),u.jsx("p",{className:"text-xs text-gray-400",children:o.meta})]})]})}function Rg({activity:r,parsed:o}){const l=o.sensitiveFields.url,a=o.args.action,d=o.result;return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"URL:"}),u.jsx("code",{className:"text-sm block p-2 bg-gray-800 rounded break-all text-blue-300 font-mono",children:l||"unknown"})]}),a&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Action:"}),u.jsx("span",{className:"text-xs px-2 py-1 bg-gray-800 rounded text-gray-300",children:a})]}),Object.keys(o.args).length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Arguments:"}),u.jsx("div",{className:"space-y-1",children:Object.entries(o.args).filter(([p])=>p!=="action"&&p!=="url").map(([p,h])=>u.jsxs("div",{className:"flex gap-2 text-xs",children:[u.jsxs("span",{className:"text-gray-500 font-mono",children:[p,":"]}),u.jsx("span",{className:"text-gray-300",children:String(h)})]},p))})]}),d&&o.phase==="result"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Response:"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-300 border border-gray-700 whitespace-pre-wrap break-words",children:d})]}),o.phase==="result"&&!o.isError&&u.jsx("div",{className:"p-2 bg-green-900/20 border border-green-800/50 rounded",children:u.jsx("p",{className:"text-xs text-green-400",children:"✓ Request completed successfully"})}),o.isError&&u.jsx("div",{className:"p-2 bg-red-900/20 border border-red-800/50 rounded",children:u.jsx("p",{className:"text-xs text-red-400 font-medium",children:"⚠️ Request failed"})})]})}function Tg({activity:r,parsed:o}){const l=o.sensitiveFields.recipient,a=o.args.channel,d=o.args.provider,p=o.args.action,h=o.args.message||o.args.content||(typeof o.meta=="string"?o.meta:"");return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Recipient:"}),u.jsx("p",{className:"text-sm text-gray-300 font-mono",children:l})]}),(a||d)&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Channel:"}),u.jsx("p",{className:"text-sm text-gray-300",children:a||d||"N/A"})]})]}),p&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Action:"}),u.jsx("span",{className:"text-xs px-2 py-1 bg-gray-800 rounded text-gray-300",children:p})]}),h&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Message:"}),u.jsx("div",{className:"p-3 bg-gray-800 rounded text-sm text-gray-300 border border-gray-700 max-h-96 overflow-y-auto whitespace-pre-wrap break-words",children:h})]}),o.phase==="result"&&u.jsx("div",{className:`p-2 rounded text-xs border ${o.isError?"bg-red-900/20 border-red-800/50 text-red-400":"bg-green-900/20 border-green-800/50 text-green-400"}`,children:o.isError?"❌ Message failed to send":"✓ Message delivered"}),o.meta&&typeof o.meta=="object"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Additional Info:"}),u.jsx("pre",{className:"text-xs p-2 bg-gray-800 rounded overflow-auto text-gray-400",children:JSON.stringify(o.meta,null,2)})]})]})}function Pg({activity:r,parsed:o}){const l=o.result;return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Tool:"}),u.jsx("span",{className:"text-sm px-3 py-1.5 bg-gray-800 rounded text-gray-200 font-mono",children:o.toolName})]}),Object.keys(o.args).length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Arguments:"}),u.jsx("div",{className:"space-y-1 p-2 bg-gray-800 rounded",children:Object.entries(o.args).map(([a,d])=>u.jsxs("div",{className:"flex gap-2 text-xs",children:[u.jsxs("span",{className:"text-gray-500 font-mono min-w-[100px]",children:[a,":"]}),u.jsx("span",{className:"text-gray-300 break-all",children:typeof d=="object"?JSON.stringify(d):String(d)})]},a))})]}),o.meta&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Description:"}),typeof o.meta=="string"?u.jsx("p",{className:"text-xs text-gray-400 p-2 bg-gray-800 rounded",children:o.meta}):u.jsx("pre",{className:"text-xs p-2 bg-gray-800 rounded overflow-auto text-gray-400",children:JSON.stringify(o.meta,null,2)})]}),l&&o.phase==="result"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Result:"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-300 border border-gray-700 whitespace-pre-wrap break-words",children:typeof l=="object"?JSON.stringify(l,null,2):l})]}),o.phase==="result"&&u.jsx("div",{className:`p-2 rounded text-xs border ${o.isError?"bg-red-900/20 border-red-800/50 text-red-400":"bg-green-900/20 border-green-800/50 text-green-400"}`,children:o.isError?"❌ Tool execution failed":"✓ Tool executed successfully"})]})}function Lg({activity:r,parsed:o}){return u.jsxs("div",{className:"space-y-3",children:[u.jsx("div",{className:"p-2 bg-yellow-900/20 border border-yellow-800/50 rounded",children:u.jsx("p",{className:"text-xs text-yellow-400 font-medium",children:"⚠️ Unknown activity type - displaying raw data"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Activity Type:"}),u.jsx("span",{className:"text-sm px-3 py-1.5 bg-gray-800 rounded text-gray-200",children:r.activityType})]}),o.toolName&&o.toolName!=="unknown"&&u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Tool Name:"}),u.jsx("span",{className:"text-sm px-3 py-1.5 bg-gray-800 rounded text-gray-200 font-mono",children:o.toolName})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Detail:"}),u.jsx("p",{className:"text-xs text-gray-300 p-2 bg-gray-800 rounded",children:r.detail})]}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Parsed Data:"}),u.jsx("pre",{className:"text-xs p-3 bg-gray-800 rounded max-h-96 overflow-y-auto text-gray-300 border border-gray-700",children:JSON.stringify(o,null,2)})]})]})}function Ag({activity:r,parsed:o}){switch(r.activityType){case"file_read":case"file_write":return u.jsx(_g,{activity:r,parsed:o});case"shell_command":return u.jsx(bg,{activity:r,parsed:o});case"web_browse":return u.jsx(Rg,{activity:r,parsed:o});case"message":return u.jsx(Tg,{activity:r,parsed:o});case"tool_call":return u.jsx(Pg,{activity:r,parsed:o});case"unknown":default:return u.jsx(Lg,{activity:r,parsed:o})}}function Og({phases:r}){const[o,l]=x.useState(!1),a=r[r.length-1],d=x.useMemo(()=>qi(a.rawPayload),[a.rawPayload]),p=x.useMemo(()=>xg(a,d),[a,d]);return u.jsxs("div",{className:"ml-8 mt-2 mb-3 p-3 bg-gray-900/50 border border-gray-800 rounded space-y-3",children:[p.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("p",{className:"text-xs text-gray-500 font-medium",children:["Threat Findings (",p.length,")"]}),p.map((h,g)=>u.jsxs("div",{className:`flex items-start gap-2 p-2 rounded text-xs border ${h.color}`,children:[u.jsx("span",{className:"text-base shrink-0",children:h.icon}),u.jsx("div",{className:"flex flex-col gap-0.5 min-w-0",children:u.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.categoryId&&u.jsx("span",{className:"px-1.5 py-0.5 bg-gray-800 text-gray-300 rounded font-mono text-[10px] shrink-0",children:h.categoryId}),u.jsx("span",{className:"font-medium",children:h.message}),h.owaspRef&&u.jsxs("span",{className:"px-1 py-0.5 bg-gray-700/50 text-gray-400 rounded text-[10px] shrink-0",children:["OWASP ",h.owaspRef]})]})})]},g))]}),d.runId&&u.jsxs("div",{className:"p-2 bg-gray-800 rounded",children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Interaction Run ID:"}),u.jsx("code",{className:"text-xs text-gray-400 break-all font-mono",children:d.runId})]}),r.length>1&&u.jsxs("div",{className:"border border-gray-700 rounded p-2 bg-gray-800/50",children:[u.jsxs("p",{className:"text-xs text-gray-400 mb-2 font-medium",children:["Activity Timeline (",r.length," activities)"]}),u.jsx("div",{className:"space-y-1",children:r.map((h,g)=>{const v=qi(h.rawPayload);return u.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:[u.jsxs("span",{className:"text-gray-600",children:[g+1,"."]}),u.jsx("span",{className:`px-1.5 py-0.5 rounded font-mono ${h.activityType==="file_read"?"bg-blue-900/30 text-blue-400":h.activityType==="file_write"?"bg-orange-900/30 text-orange-400":h.activityType==="shell_command"?"bg-red-900/30 text-red-400":h.activityType==="message"?"bg-purple-900/30 text-purple-400":h.activityType==="web_browse"?"bg-cyan-900/30 text-cyan-400":"bg-gray-700 text-gray-400"}`,children:h.toolName||h.activityType}),u.jsx("span",{className:"text-gray-500 truncate",title:h.detail,children:h.detail}),u.jsx("span",{className:"text-gray-600 shrink-0",children:new Date(h.timestamp).toLocaleTimeString()}),v.isError&&u.jsx("span",{className:"text-red-400 text-xs",children:"⚠ error"}),h.threatLevel!=="NONE"&&u.jsx("span",{className:`px-1 py-0.5 rounded text-[10px] font-medium shrink-0 ${h.threatLevel==="CRITICAL"?"bg-red-900/40 text-red-400":h.threatLevel==="HIGH"?"bg-orange-900/40 text-orange-400":h.threatLevel==="MEDIUM"?"bg-yellow-900/40 text-yellow-400":"bg-blue-900/40 text-blue-400"}`,children:h.threatLevel})]},h.id)})})]}),u.jsx(Ag,{activity:a,parsed:d}),d.toolCallId&&u.jsxs("div",{className:"p-2 bg-gray-800 rounded",children:[u.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Tool Call ID:"}),u.jsx("code",{className:"text-xs text-gray-400 break-all font-mono",children:d.toolCallId})]}),u.jsxs("button",{type:"button",onClick:()=>l(!o),className:"text-xs text-gray-500 hover:text-gray-400 transition-colors underline",children:[o?"Hide":"Show"," raw data"]}),o&&u.jsx("pre",{className:"text-xs bg-gray-800 p-3 rounded overflow-auto max-h-60 text-gray-300 border border-gray-700",children:JSON.stringify(JSON.parse(a.rawPayload),null,2)})]})}const Ig={CRITICAL:"text-red-400",HIGH:"text-orange-400",MEDIUM:"text-yellow-400",LOW:"text-blue-400",NONE:"text-gray-400"};function Dg(){const[r,o]=x.useState([]),[l,a]=x.useState([]),[d,p]=x.useState(null),[h,g]=x.useState(null),[v,S]=x.useState(!0);x.useEffect(()=>{q.emit("safeclaw:getOpenclawSessions"),q.emit("safeclaw:getOpenclawMonitorStatus");const D=R=>{o(B=>{const F=B.findIndex(re=>re.id===R.id);if(F>=0){const re=[...B];return re[F]=R,re}return[R,...B]}),S(!1)},W=R=>{a(B=>B.some(F=>F.id===R.id)?B:[R,...B].slice(0,200))},b=R=>{p(R),S(!1)};q.on("safeclaw:openclawSessionUpdate",D),q.on("safeclaw:openclawActivity",W),q.on("safeclaw:openclawMonitorStatus",b);const P=setTimeout(()=>S(!1),2e3);return()=>{q.off("safeclaw:openclawSessionUpdate",D),q.off("safeclaw:openclawActivity",W),q.off("safeclaw:openclawMonitorStatus",b),clearTimeout(P)}},[]),x.useEffect(()=>{h&&(a([]),q.emit("safeclaw:getOpenclawActivities",{sessionId:h,limit:100}))},[h]);const k=()=>{q.emit("safeclaw:reconnectOpenclaw")},_=(d==null?void 0:d.connectionStatus)==="connected"?"bg-success":(d==null?void 0:d.connectionStatus)==="connecting"?"bg-warning animate-pulse":"bg-danger",L=(d==null?void 0:d.connectionStatus)==="connected"?"Connected":(d==null?void 0:d.connectionStatus)==="connecting"?"Connecting...":(d==null?void 0:d.connectionStatus)==="not_configured"?"Not Configured":"Disconnected";return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Session Monitor"}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-4 mb-4 flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${_}`}),u.jsxs("span",{className:"text-sm text-gray-300",children:["OpenClaw Gateway: ",L]}),(d==null?void 0:d.gatewayPort)&&u.jsxs("span",{className:"text-xs text-gray-500",children:["(port ",d.gatewayPort,")"]})]}),(d==null?void 0:d.connectionStatus)!=="connected"&&(d==null?void 0:d.connectionStatus)!=="not_configured"&&u.jsx("button",{type:"button",onClick:k,className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-white hover:bg-primary/90 transition-colors cursor-pointer",children:"Reconnect"})]}),u.jsx(Mg,{sessions:r,activities:l,expandedSession:h,onToggleSession:D=>g(W=>W===D?null:D),loading:v})]})}function Mg({sessions:r,activities:o,expandedSession:l,onToggleSession:a,loading:d}){if(d)return u.jsx("p",{className:"text-gray-500",children:"Loading OpenClaw sessions..."});if(r.length===0)return u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6 text-center",children:[u.jsx("p",{className:"text-gray-400",children:"No OpenClaw sessions recorded yet."}),u.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"Sessions will appear here once OpenClaw agent activity is detected."})]});const p=r.filter(g=>g.status==="ACTIVE").sort((g,v)=>new Date(v.startedAt).getTime()-new Date(g.startedAt).getTime()),h=r.filter(g=>g.status==="ENDED").sort((g,v)=>new Date(v.startedAt).getTime()-new Date(g.startedAt).getTime());return u.jsxs("div",{className:"space-y-4",children:[p.length>0&&u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"Active Sessions"}),u.jsx("div",{className:"space-y-2",children:p.map(g=>u.jsx(hd,{session:g,activities:l===g.id?o:[],expanded:l===g.id,onToggle:()=>a(g.id)},g.id))})]}),h.length>0&&u.jsxs("div",{children:[u.jsx("h3",{className:"text-sm font-medium text-gray-400 mb-2",children:"Past Sessions"}),u.jsx("div",{className:"space-y-2",children:h.map(g=>u.jsx(hd,{session:g,activities:l===g.id?o:[],expanded:l===g.id,onToggle:()=>a(g.id)},g.id))})]})]})}function hd({session:r,activities:o,expanded:l,onToggle:a}){const d=r.status==="ACTIVE",p=(r.threatSummary.HIGH??0)+(r.threatSummary.CRITICAL??0),[h,g]=x.useState(null),v=x.useMemo(()=>ag(o),[o]);return u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 overflow-hidden",children:[u.jsxs("button",{type:"button",onClick:a,className:"w-full p-4 flex items-center justify-between cursor-pointer hover:bg-gray-800/50 transition-colors",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${d?"bg-success animate-pulse":"bg-gray-600"}`}),u.jsxs("div",{className:"text-left",children:[u.jsx("span",{className:"text-sm font-mono text-gray-200",children:r.id.slice(0,12)}),r.model&&u.jsx("span",{className:"ml-2 text-xs text-gray-500",children:r.model})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[p>0&&u.jsxs("span",{className:"px-2 py-0.5 text-xs font-medium rounded-full bg-red-900/40 text-red-400 border border-red-800/50",children:[p," high risk"]}),u.jsxs("span",{className:"text-xs text-gray-500",children:[r.activityCount," activities"]}),u.jsx("span",{className:"text-xs text-gray-500",children:new Date(r.startedAt).toLocaleString()}),u.jsx("span",{className:`text-gray-400 transition-transform ${l?"rotate-180":""}`,children:"v"})]})]}),l&&u.jsxs("div",{className:"border-t border-gray-800 p-4",children:[u.jsx("div",{className:"flex gap-2 mb-3",children:["CRITICAL","HIGH","MEDIUM","LOW","NONE"].map(S=>{const k=r.threatSummary[S]??0;return k===0?null:u.jsxs("span",{className:`px-2 py-0.5 text-xs rounded-full ${Ig[S]} bg-gray-800`,children:[S,": ",k]},S)})}),o.length===0?u.jsx("p",{className:"text-xs text-gray-500",children:"Loading activities..."}):u.jsx("div",{className:"space-y-0 max-h-80 overflow-y-auto",children:v.map(S=>{const k=S.runId||`fallback-${S.primary.id}`;return u.jsxs("div",{children:[u.jsx(hg,{activity:S.primary,phases:S.activities,expanded:h===k,onToggle:()=>g(h===k?null:k)}),h===k&&u.jsx(Og,{phases:S.activities})]},k)})})]})]})}const Bg={"TC-SEC":{defaultAdvice:"Rotate exposed keys/tokens immediately. Check git history for accidental commits.",dynamicAdvice:r=>r?`Detected credential: ${r}`:null},"TC-EXF":{defaultAdvice:"Block the exfiltration target URL. Review data access patterns.",dynamicAdvice:r=>r?`Exfiltration target: ${r}`:null},"TC-INJ":{defaultAdvice:"Quarantine the content source. Do not act on injected instructions.",dynamicAdvice:r=>r?`Injection source: ${r}`:null},"TC-DES":{defaultAdvice:"Prevent execution. Verify the agent's intent before allowing destructive operations.",dynamicAdvice:r=>r?`Destructive command: ${r}`:null},"TC-ESC":{defaultAdvice:"Deny privilege escalation. Review why elevated permissions were requested.",dynamicAdvice:r=>r?`Escalation via: ${r}`:null},"TC-SUP":{defaultAdvice:"Verify package integrity. Check for known vulnerabilities before installing.",dynamicAdvice:r=>r?`Package involved: ${r}`:null},"TC-SFA":{defaultAdvice:"Restrict access to sensitive files. Consider using read-only permissions.",dynamicAdvice:r=>r?`Sensitive file: ${r}`:null},"TC-SYS":{defaultAdvice:"Block system modifications. Review changes before applying.",dynamicAdvice:r=>r?`System target: ${r}`:null},"TC-NET":{defaultAdvice:"Inspect network traffic. Block suspicious connections.",dynamicAdvice:r=>r?`Network target: ${r}`:null},"TC-MCP":{defaultAdvice:"Isolate the MCP tool. Verify tool responses are not poisoned.",dynamicAdvice:r=>r?`Affected tool: ${r}`:null}};function Fg(r){const o=Bg[r.categoryId];return{defaultAdvice:o.defaultAdvice,contextAdvice:o.dynamicAdvice(r.evidence)}}const md={CRITICAL:"text-red-400",HIGH:"text-orange-400",MEDIUM:"text-yellow-400",LOW:"text-blue-400",NONE:"text-green-400"},zg={CRITICAL:"bg-red-900/20 border-red-800",HIGH:"bg-orange-900/20 border-orange-800",MEDIUM:"bg-yellow-900/20 border-yellow-800",LOW:"bg-blue-900/20 border-blue-800"},Ug={file_read:"R",file_write:"W",shell_command:"$",web_browse:"@",tool_call:"T",message:"M",unknown:"?"},$g=["ALL","CRITICAL","HIGH","MEDIUM","LOW"],Hg=["all","unresolved","resolved"],Wg={ALL:{active:"bg-gray-200 text-gray-900",inactive:"bg-gray-800 text-gray-400 hover:bg-gray-700"},CRITICAL:{active:"bg-red-500/20 text-red-400 ring-1 ring-red-500/40",inactive:"bg-gray-800 text-red-400/60 hover:bg-red-500/10"},HIGH:{active:"bg-orange-500/20 text-orange-400 ring-1 ring-orange-500/40",inactive:"bg-gray-800 text-orange-400/60 hover:bg-orange-500/10"},MEDIUM:{active:"bg-yellow-500/20 text-yellow-400 ring-1 ring-yellow-500/40",inactive:"bg-gray-800 text-yellow-400/60 hover:bg-yellow-500/10"},LOW:{active:"bg-blue-500/20 text-blue-400 ring-1 ring-blue-500/40",inactive:"bg-gray-800 text-blue-400/60 hover:bg-blue-500/10"}},Vg={all:{active:"bg-gray-200 text-gray-900",inactive:"bg-gray-800 text-gray-400 hover:bg-gray-700"},unresolved:{active:"bg-amber-500/20 text-amber-400 ring-1 ring-amber-500/40",inactive:"bg-gray-800 text-amber-400/60 hover:bg-amber-500/10"},resolved:{active:"bg-green-500/20 text-green-400 ring-1 ring-green-500/40",inactive:"bg-gray-800 text-green-400/60 hover:bg-green-500/10"}};function Kg(){const[r,o]=x.useState([]),[l,a]=x.useState("ALL"),[d,p]=x.useState("all"),[h,g]=x.useState(null),[v,S]=x.useState(!0),k=x.useCallback(async()=>{S(!0);try{const b=new URLSearchParams;l!=="ALL"&&b.set("severity",l),d!=="all"&&b.set("resolved",d==="resolved"?"true":"false"),b.set("limit","200");const P=await fetch(`/api/openclaw/threats?${b.toString()}`);if(P.ok){const R=await P.json();o(R)}}catch{}finally{S(!1)}},[l,d]);x.useEffect(()=>{k()},[k]),x.useEffect(()=>{const b=R=>{o(B=>B.map(F=>F.id===R.id?R:F))},P=R=>{R.threatLevel!=="NONE"&&o(B=>B.some(F=>F.id===R.id)?B:[R,...B])};return q.on("safeclaw:threatResolved",b),q.on("safeclaw:openclawActivity",P),()=>{q.off("safeclaw:threatResolved",b),q.off("safeclaw:openclawActivity",P)}},[]);const _=x.useMemo(()=>r.filter(b=>l==="ALL"||b.threatLevel===l).filter(b=>d==="resolved"?b.resolved:d==="unresolved"?!b.resolved:!0).sort((b,P)=>new Date(P.timestamp).getTime()-new Date(b.timestamp).getTime()),[r,l,d]),L=x.useCallback((b,P)=>{q.emit("safeclaw:resolveActivity",{activityId:b,resolved:!P})},[]),D=r.filter(b=>!b.resolved).length,W=r.filter(b=>b.resolved).length;return u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between mb-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold",children:"Threat Center"}),u.jsxs("p",{className:"text-sm text-gray-500 mt-1",children:[D," unresolved / ",r.length," total threats"]})]}),u.jsxs("div",{className:"flex items-center gap-5",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-xs text-gray-500",children:"Severity:"}),u.jsx("div",{className:"flex gap-1",children:$g.map(b=>{const P=l===b,R=Wg[b];return u.jsx("button",{onClick:()=>a(b),className:`px-2.5 py-1 text-xs font-medium rounded-lg transition-colors cursor-pointer ${P?R.active:R.inactive}`,children:b},b)})})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-xs text-gray-500",children:"Status:"}),u.jsx("div",{className:"flex gap-1",children:Hg.map(b=>{const P=d===b,R=Vg[b];return u.jsx("button",{onClick:()=>p(b),className:`px-2.5 py-1 text-xs font-medium rounded-lg transition-colors cursor-pointer ${P?R.active:R.inactive}`,children:b.charAt(0).toUpperCase()+b.slice(1)},b)})})]})]})]}),u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6",children:[u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-red-400",children:r.filter(b=>b.threatLevel==="CRITICAL").length}),u.jsx("p",{className:"text-xs text-gray-500",children:"Critical"})]}),u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-orange-400",children:r.filter(b=>b.threatLevel==="HIGH").length}),u.jsx("p",{className:"text-xs text-gray-500",children:"High"})]}),u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-yellow-400",children:r.filter(b=>b.threatLevel==="MEDIUM").length}),u.jsx("p",{className:"text-xs text-gray-500",children:"Medium"})]}),u.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-green-400",children:W}),u.jsx("p",{className:"text-xs text-gray-500",children:"Resolved"})]})]}),v?u.jsx("p",{className:"text-sm text-gray-500",children:"Loading threats..."}):_.length===0?u.jsx("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-8 text-center",children:u.jsx("p",{className:"text-gray-500",children:"No threats found matching current filters."})}):u.jsx("div",{className:"space-y-3",children:_.map(b=>u.jsx(Qg,{threat:b,expanded:h===b.id,onToggle:()=>g(P=>P===b.id?null:b.id),onToggleResolve:L},b.id))})]})}function Qg({threat:r,expanded:o,onToggle:l,onToggleResolve:a}){var d;return u.jsxs("div",{className:`rounded-xl border bg-gray-900 overflow-hidden ${r.resolved?"border-gray-800 opacity-60":"border-gray-700"}`,children:[u.jsxs("div",{className:"p-4 flex items-center gap-3 cursor-pointer hover:bg-gray-800/50 transition-colors",onClick:l,children:[u.jsx("span",{className:`text-gray-500 text-xs transition-transform ${o?"rotate-90":""}`,children:"▶"}),u.jsx("span",{className:"flex-shrink-0 w-7 h-7 rounded bg-gray-800 flex items-center justify-center text-xs font-mono text-gray-400",children:Ug[r.activityType]??"?"}),u.jsx("span",{className:`text-xs font-medium px-1.5 py-0.5 rounded ${md[r.threatLevel]}`,children:r.threatLevel}),u.jsx("div",{className:"flex gap-1",children:(d=r.threatFindings)==null?void 0:d.map((p,h)=>u.jsx("span",{className:"px-1.5 py-0.5 bg-gray-800 text-gray-400 rounded font-mono text-[10px]",children:p.categoryId},h))}),u.jsx("span",{className:"text-xs text-gray-300 flex-1 truncate",children:r.detail}),u.jsx("span",{className:"text-xs text-gray-600 flex-shrink-0",children:new Date(r.timestamp).toLocaleString()}),u.jsx("button",{onClick:p=>{p.stopPropagation(),a(r.id,r.resolved)},className:`px-3 py-1 text-xs rounded-lg font-medium transition-colors cursor-pointer flex-shrink-0 ${r.resolved?"bg-green-500/20 text-green-400 ring-1 ring-green-500/40 hover:bg-green-500/30":"bg-amber-500/20 text-amber-400 ring-1 ring-amber-500/40 hover:bg-amber-500/30"}`,children:r.resolved?"Resolved":"Unresolved"})]}),o&&u.jsxs("div",{className:"border-t border-gray-800 p-4 space-y-3",children:[r.secretsDetected&&r.secretsDetected.length>0&&u.jsxs("div",{className:"rounded border border-red-900/50 bg-red-950/20 p-3",children:[u.jsx("p",{className:"text-[10px] uppercase tracking-wider text-red-400 font-medium mb-2",children:"Identified Secrets"}),u.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:r.secretsDetected.map((p,h)=>u.jsx("span",{className:"px-2 py-0.5 bg-red-900/30 text-red-300 rounded text-xs font-mono",children:p},h))})]}),r.contentPreview&&u.jsxs("div",{className:"rounded border border-gray-700 bg-gray-800/50 p-3",children:[u.jsx("p",{className:"text-[10px] uppercase tracking-wider text-gray-500 font-medium mb-2",children:"Detected Content"}),u.jsx("pre",{className:"text-xs text-gray-300 font-mono whitespace-pre-wrap break-all max-h-40 overflow-y-auto",children:r.contentPreview})]}),r.runId&&u.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[u.jsx("span",{className:"text-gray-500",children:"Interaction ID:"}),u.jsx("code",{className:"bg-gray-800 text-gray-400 px-1.5 py-0.5 rounded font-mono",children:r.runId})]}),r.threatFindings&&r.threatFindings.length>0?r.threatFindings.map((p,h)=>{const g=Fg(p);return u.jsxs("div",{className:`p-3 rounded border ${zg[p.severity]??"bg-gray-800 border-gray-700"}`,children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[u.jsx("span",{className:"font-mono text-xs bg-gray-800 px-1.5 py-0.5 rounded text-gray-300",children:p.categoryId}),u.jsx("span",{className:"text-xs font-medium text-gray-300",children:p.categoryName}),u.jsx("span",{className:`text-xs font-medium ${md[p.severity]}`,children:p.severity}),p.owaspRef&&u.jsx("span",{className:"text-[10px] text-gray-500 bg-gray-800 px-1 rounded",children:p.owaspRef})]}),u.jsx("p",{className:"text-xs text-gray-300 mb-1",children:p.reason}),p.evidence&&u.jsxs("p",{className:"text-xs text-gray-500 mb-2",children:[u.jsx("span",{className:"text-gray-600",children:"Evidence:"})," ",u.jsx("code",{className:"bg-gray-800 px-1 rounded",children:p.evidence})]}),u.jsxs("div",{className:"bg-gray-800/50 rounded p-2.5 mt-2 border border-gray-700/50",children:[u.jsx("p",{className:"text-[10px] uppercase tracking-wider text-gray-500 font-medium mb-1",children:"Recommended Action"}),u.jsx("p",{className:"text-xs text-gray-300",children:g.defaultAdvice}),g.contextAdvice&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:g.contextAdvice})]})]},h)}):u.jsx("p",{className:"text-xs text-gray-500",children:"No detailed findings available."}),u.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500 pt-2 border-t border-gray-800",children:[u.jsxs("span",{children:["Type: ",u.jsx("span",{className:"text-gray-400",children:r.activityType})]}),r.toolName&&u.jsxs("span",{children:["Tool:"," ",u.jsx("span",{className:"text-gray-400 font-mono",children:r.toolName})]}),r.targetPath&&u.jsxs("span",{children:["Path:"," ",u.jsx("span",{className:"text-gray-400 font-mono",children:r.targetPath})]})]}),r.resolved&&r.resolvedAt&&u.jsxs("p",{className:"text-xs text-gray-600",children:["Resolved at: ",new Date(r.resolvedAt).toLocaleString()]})]})]})}const qg={filesystem:{title:"File System Access",description:"Controls read, write, edit, and apply_patch tools. Modifies the group:fs entry in OpenClaw's tool deny list."},mcp_servers:{title:"MCP Servers (Plugins)",description:"Master toggle for all OpenClaw plugins. Expand below to manage individual servers."},network:{title:"Network Access",description:"Controls web_search, web_fetch tools and the browser. Modifies group:web deny list and browser.enabled."},system_commands:{title:"System Commands",description:"Controls exec, bash, and process tools. Modifies the group:runtime entry in OpenClaw's tool deny list."}},Yg=["filesystem","mcp_servers","network","system_commands"];function Gg(){const[r,o]=x.useState(null),[l,a]=x.useState(null),[d,p]=x.useState(null),[h,g]=x.useState(!0),[v,S]=x.useState(null),[k,_]=x.useState(""),[L,D]=x.useState("rw"),[W,b]=x.useState("off"),[P,R]=x.useState([]),[B,F]=x.useState(""),[re,ie]=x.useState(!1),[ce,ge]=x.useState(""),[he,Re]=x.useState(""),[Te,ut]=x.useState("ro");x.useEffect(()=>{q.emit("safeclaw:getAccessControlState"),q.emit("safeclaw:getOpenclawConfig");const U=N=>{o(N),a(null),p(null)},z=N=>{var T,ee,H,se,ne,ae,le,de,Oe,Z,Ne,Ue,xt,Yt,Gt,Dt;N&&(S(N),_(((ee=(T=N.agents)==null?void 0:T.defaults)==null?void 0:ee.workspace)??""),D(((ne=(se=(H=N.agents)==null?void 0:H.defaults)==null?void 0:se.sandbox)==null?void 0:ne.workspaceAccess)??"rw"),b(((de=(le=(ae=N.agents)==null?void 0:ae.defaults)==null?void 0:le.sandbox)==null?void 0:de.mode)??"off"),R(((Ue=(Ne=(Z=(Oe=N.agents)==null?void 0:Oe.defaults)==null?void 0:Z.sandbox)==null?void 0:Ne.docker)==null?void 0:Ue.binds)??[]),F(((Dt=(Gt=(Yt=(xt=N.agents)==null?void 0:xt.defaults)==null?void 0:Yt.sandbox)==null?void 0:Gt.docker)==null?void 0:Dt.network)??""))};return q.on("safeclaw:accessControlState",U),q.on("safeclaw:openclawConfig",z),()=>{q.off("safeclaw:accessControlState",U),q.off("safeclaw:openclawConfig",z)}},[]);const Je=(U,z)=>{a(U),q.emit("safeclaw:toggleAccess",{category:U,enabled:!z})},ze=(U,z)=>{p(U),q.emit("safeclaw:toggleMcpServer",{serverName:U,enabled:!z})},qe=()=>{ie(!0);const U=W,z={agents:{defaults:{workspace:k||void 0,sandbox:{mode:U,workspaceAccess:L,docker:U!=="off"?{binds:P.length>0?P:void 0,network:B||void 0}:void 0}}}};q.emit("safeclaw:updateOpenclawConfig",z),setTimeout(()=>ie(!1),600)},Ye=()=>{if(!ce.trim())return;const U=he.trim()||ce.trim(),z=`${ce.trim()}:${U}:${Te}`;R(N=>[...N,z]),ge(""),Re(""),ut("ro")},Ae=U=>{R(z=>z.filter((N,T)=>T!==U))};if(!r)return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Access Control"}),u.jsx("p",{className:"text-gray-500",children:"Loading access control state..."})]});if(!r.openclawConfigAvailable)return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Access Control"}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsxs("p",{className:"text-gray-400",children:["OpenClaw config not found at"," ",u.jsx("code",{className:"text-gray-300",children:"~/.openclaw/openclaw.json"}),"."]}),u.jsx("p",{className:"text-gray-500 mt-2 text-sm",children:"Install and configure OpenClaw first, then return here to manage access controls."})]})]});const ye=new Map;for(const U of r.toggles)ye.set(U.category,U);const $=W==="all"||W==="non-main";return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Access Control"}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["Control what OpenClaw can access. Changes are written directly to"," ",u.jsx("code",{className:"text-gray-400",children:"~/.openclaw/openclaw.json"}),"."]}),u.jsx("div",{className:"space-y-4",children:Yg.map(U=>{const z=ye.get(U);if(!z)return null;const N=qg[U];if(!N)return null;const T=z.enabled,ee=l===U;return u.jsx("div",{children:u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex-1 mr-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-200",children:N.title}),!T&&u.jsx("span",{className:"px-2 py-0.5 text-xs font-medium rounded-full bg-red-900/50 text-red-400 border border-red-700/50",children:"RESTRICTED"})]}),u.jsx("p",{className:"text-sm text-gray-500 mt-1",children:N.description})]}),u.jsx("button",{type:"button",onClick:()=>Je(U,T),disabled:ee,className:`w-11 h-6 rounded-full flex items-center px-0.5 transition-colors cursor-pointer disabled:opacity-50 ${T?"bg-success":"bg-gray-700"}`,children:u.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${T?"translate-x-5":"translate-x-0"}`})})]}),U==="mcp_servers"&&r.mcpServers.length>0&&u.jsxs("div",{className:"mt-5 pt-5 border-t border-gray-800",children:[u.jsxs("button",{type:"button",onClick:()=>g(!h),className:"flex items-center gap-2 text-xs font-medium text-gray-400 uppercase tracking-wider mb-3 cursor-pointer hover:text-gray-300",children:[u.jsx("span",{className:`inline-block transition-transform ${h?"rotate-90":""}`,children:"▶"}),"Individual Servers (",r.mcpServers.length,")"]}),h&&u.jsx("div",{className:"space-y-2",children:r.mcpServers.map(H=>{const se=d===H.name,ne=!T;return u.jsxs("div",{className:`flex items-center justify-between py-2 px-3 rounded-lg border border-gray-800 ${ne?"opacity-50":"bg-gray-800/30"}`,children:[u.jsxs("div",{className:"flex-1 min-w-0 mr-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm text-gray-200 truncate",children:H.name}),!H.pluginEnabled&&u.jsx("span",{className:"px-1.5 py-0.5 text-xs rounded bg-gray-700 text-gray-400",children:"plugin disabled"}),H.toolsDenyBlocked&&u.jsx("span",{className:"px-1.5 py-0.5 text-xs rounded bg-red-900/50 text-red-400",children:"tools blocked"})]}),u.jsx("p",{className:"text-xs text-gray-600 mt-0.5",children:H.effectivelyEnabled?"Server active, tools accessible":H.toolsDenyBlocked?`Blocked via tools.deny (mcp__${H.name})`:"Plugin connection disabled"})]}),u.jsx("button",{type:"button",onClick:()=>ze(H.name,H.effectivelyEnabled),disabled:se||ne,className:`w-11 h-6 rounded-full flex items-center px-0.5 transition-colors cursor-pointer disabled:opacity-50 ${H.effectivelyEnabled?"bg-success":"bg-gray-700"}`,children:u.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${H.effectivelyEnabled?"translate-x-5":"translate-x-0"}`})})]},H.name)})})]}),U==="mcp_servers"&&r.mcpServers.length===0&&u.jsx("div",{className:"mt-5 pt-5 border-t border-gray-800",children:u.jsx("p",{className:"text-sm text-gray-500",children:"No MCP servers configured in OpenClaw."})}),U==="filesystem"&&v&&u.jsxs("div",{className:"mt-5 pt-5 border-t border-gray-800",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider mb-3",children:"Workspace Settings"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400 block mb-1",children:"Workspace Path"}),u.jsx("p",{className:"text-xs text-gray-600 mb-2",children:"The directory OpenClaw agents work in. This sets the agent's working directory, but does not restrict access to other paths unless sandbox mode is enabled."}),u.jsx("input",{type:"text",value:k,onChange:H=>_(H.target.value),placeholder:"e.g. ~/Desktop or ~/.openclaw/workspace",className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400 block mb-1",children:"Workspace Access Level"}),u.jsxs("p",{className:"text-xs text-gray-600 mb-2",children:["Controls how sandboxed agents access the workspace.",!$&&u.jsxs("span",{className:"text-yellow-500",children:[" ","Only takes effect when sandbox mode is enabled below."]})]}),u.jsxs("select",{value:L,onChange:H=>D(H.target.value),className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"rw",children:"Read-Write — full access to workspace"}),u.jsx("option",{value:"ro",children:"Read-Only — can read but not modify files"}),u.jsx("option",{value:"none",children:"None — no access to host workspace"})]})]}),u.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-800",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider mb-3",children:"Docker Sandbox"}),u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400 block mb-1",children:"Sandbox Mode"}),u.jsx("p",{className:"text-xs text-gray-600 mb-2",children:"Runs OpenClaw agents inside a Docker container. Requires Docker to be installed and running."}),u.jsxs("select",{value:W,onChange:H=>b(H.target.value),className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"off",children:"Off — no sandboxing, agent runs as your user"}),u.jsx("option",{value:"non-main",children:"Non-Main — sandbox sub-agents only"}),u.jsx("option",{value:"all",children:"All — sandbox all agents including main"})]})]})]}),!$&&u.jsx("div",{className:"rounded-lg bg-yellow-900/30 border border-yellow-700/50 px-4 py-2",children:u.jsxs("p",{className:"text-xs text-yellow-400",children:["Sandbox mode is"," ",u.jsx("strong",{children:W}),". Without Docker sandboxing, the agent runs as your user and can access any file on your system. The workspace path sets a default directory but does not enforce boundaries."]})}),$&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"rounded-lg bg-green-900/30 border border-green-700/50 px-4 py-2",children:u.jsxs("p",{className:"text-xs text-green-400",children:["Sandbox mode is"," ",u.jsx("strong",{children:W}),". The agent runs in a Docker container and can only access the workspace directory (at the level set above) plus any explicitly bound mount paths below."]})}),u.jsxs("div",{className:"mt-4 pt-4 border-t border-gray-800",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider mb-1",children:"Bind Mounts"}),u.jsx("p",{className:"text-xs text-gray-600 mb-3",children:"Host directories to mount into the Docker container. These are the only paths (besides the workspace) the agent can access."}),P.length>0&&u.jsx("div",{className:"space-y-2 mb-3",children:P.map((H,se)=>{const ne=H.split(":"),ae=ne[0]??H,le=ne[1]??ae,de=ne[2]??"rw";return u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-gray-800/50 border border-gray-700/50 px-3 py-2",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("span",{className:"text-xs text-gray-300 font-mono truncate block",children:ae}),u.jsxs("span",{className:"text-xs text-gray-600",children:["→ ",le]})]}),u.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${de==="ro"?"bg-blue-900/50 text-blue-400 border border-blue-700/50":"bg-orange-900/50 text-orange-400 border border-orange-700/50"}`,children:de}),u.jsx("button",{type:"button",onClick:()=>Ae(se),className:"text-gray-500 hover:text-red-400 transition-colors cursor-pointer text-sm",title:"Remove mount",children:"✕"})]},se)})}),u.jsxs("div",{className:"rounded-lg bg-gray-800/30 border border-gray-700/50 p-3",children:[u.jsxs("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2 items-end",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-gray-500 block mb-1",children:"Host Path"}),u.jsx("input",{type:"text",value:ce,onChange:H=>ge(H.target.value),placeholder:"/home/user/projects",className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-1.5 text-sm focus:outline-none focus:border-primary"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-gray-500 block mb-1",children:"Container Path (optional)"}),u.jsx("input",{type:"text",value:he,onChange:H=>Re(H.target.value),placeholder:"Same as host path",className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-1.5 text-sm focus:outline-none focus:border-primary"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-gray-500 block mb-1",children:"Mode"}),u.jsxs("select",{value:Te,onChange:H=>ut(H.target.value),className:"rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-1.5 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"ro",children:"ro"}),u.jsx("option",{value:"rw",children:"rw"})]})]})]}),u.jsx("div",{className:"flex justify-end mt-2",children:u.jsx("button",{type:"button",onClick:Ye,disabled:!ce.trim(),className:"rounded-lg bg-gray-700 px-3 py-1 text-xs font-medium text-gray-200 hover:bg-gray-600 transition-colors disabled:opacity-50 cursor-pointer",children:"+ Add Mount"})})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400 block mb-1",children:"Docker Network"}),u.jsx("p",{className:"text-xs text-gray-600 mb-2",children:'Controls network access inside the sandbox. Set to "none" to completely block outbound network access from the container.'}),u.jsxs("select",{value:B,onChange:H=>F(H.target.value),className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"",children:"Default — standard Docker networking"}),u.jsx("option",{value:"none",children:"None — no network access (fully isolated)"}),u.jsx("option",{value:"host",children:"Host — share host network stack"})]})]})]}),u.jsx("div",{className:"flex justify-end",children:u.jsx("button",{type:"button",onClick:qe,disabled:re,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 transition-colors disabled:opacity-50 cursor-pointer",children:re?"Saving...":"Save"})})]})]})]})},U)})})]})}const gd=["anthropic/claude-4.5-sonnet","anthropic/claude-4-opus","openai/gpt-5","openai/gpt-4.5"],Di=["anthropic/claude-haiku-4-5","anthropic/claude-haiku-3-5"];function Xg(){var Ae,ye,$,U,z,N,T,ee,H,se,ne,ae,le,de,Oe;const[r,o]=x.useState(null),[l,a]=x.useState(!1),[d,p]=x.useState(!1),[h,g]=x.useState(""),[v,S]=x.useState(""),[k,_]=x.useState(""),[L,D]=x.useState(""),[W,b]=x.useState(""),[P,R]=x.useState(""),[B,F]=x.useState("loopback"),[re,ie]=x.useState(!1),[ce,ge]=x.useState({});x.useEffect(()=>{q.emit("safeclaw:getOpenclawConfig");const Z=Ne=>{var Ue,xt,Yt,Gt,Dt,mr,Bn,Xt,Mt,Fn,gr,yr,xr,vr,zn,Nn,wr,Jt;if(!Ne){a(!0);return}o(Ne),g(((xt=(Ue=Ne.gateway)==null?void 0:Ue.trustedProxies)==null?void 0:xt.join(", "))??""),S(((Dt=(Gt=(Yt=Ne.agents)==null?void 0:Yt.defaults)==null?void 0:Gt.model)==null?void 0:Dt.primary)??""),_(((Bn=(mr=Ne.channels)==null?void 0:mr.whatsapp)==null?void 0:Bn.dmPolicy)??""),D(((Fn=(Mt=(Xt=Ne.channels)==null?void 0:Xt.whatsapp)==null?void 0:Mt.allowFrom)==null?void 0:Fn.join(", "))??""),b(String(((yr=(gr=Ne.agents)==null?void 0:gr.defaults)==null?void 0:yr.maxConcurrent)??"")),R(String(((zn=(vr=(xr=Ne.agents)==null?void 0:xr.defaults)==null?void 0:vr.subagents)==null?void 0:zn.maxConcurrent)??"")),F(((Nn=Ne.gateway)==null?void 0:Nn.bind)??"loopback"),ie(((Jt=(wr=Ne.channels)==null?void 0:wr.whatsapp)==null?void 0:Jt.selfChatMode)??!1),ge({})};return q.on("safeclaw:openclawConfig",Z),()=>{q.off("safeclaw:openclawConfig",Z)}},[]);const he=Z=>{p(!0),q.emit("safeclaw:updateOpenclawConfig",Z),setTimeout(()=>p(!1),600)},Re=()=>{const Z=h.split(",").map(Ne=>Ne.trim()).filter(Boolean);he({gateway:{trustedProxies:Z.length>0?Z:void 0}})},Te=()=>{he({agents:{defaults:{model:{primary:v}}}})},ut=()=>{he({agents:{defaults:{maxConcurrent:W?Number(W):void 0,subagents:P?{maxConcurrent:Number(P)}:void 0}}})},Je=()=>{he({gateway:{bind:B}})},ze=(Z,Ne)=>{const Ue=!Ne;ge(xt=>({...xt,[Z]:Ue})),he({plugins:{entries:{[Z]:{enabled:Ue}}}})},qe=()=>{const Z=L.split(",").map(Ne=>Ne.trim()).filter(Boolean);he({channels:{whatsapp:{dmPolicy:k,allowFrom:Z.length>0?Z:void 0,selfChatMode:re}}})};if(l)return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"OpenClaw Configuration"}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsxs("p",{className:"text-gray-400",children:["OpenClaw config not found at ",u.jsx("code",{children:"~/.openclaw/openclaw.json"}),"."]}),u.jsx("p",{className:"text-gray-500 mt-2 text-sm",children:"Install and configure OpenClaw first, then return here to manage its settings through SafeClaw."})]})]});if(!r)return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"OpenClaw Configuration"}),u.jsx("p",{className:"text-gray-500",children:"Loading OpenClaw configuration..."})]});const Ye=Di.includes(v);return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-2",children:"OpenClaw Configuration"}),u.jsxs("p",{className:"text-sm text-gray-500 mb-6",children:["Manage the settings of your OpenClaw instance directly from SafeClaw. Changes are written to ",u.jsx("code",{children:"~/.openclaw/openclaw.json"}),"."]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs(vn,{title:"Agent Model",badge:Ye?"WARN":void 0,children:[u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"The primary model used by OpenClaw agents. Weaker models are more susceptible to prompt injection."}),Ye&&u.jsx("div",{className:"rounded-lg bg-yellow-900/30 border border-yellow-700/50 px-4 py-2 mb-3",children:u.jsx("p",{className:"text-sm text-yellow-400",children:"Current model is below recommended tier. Consider upgrading to a top-tier model."})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("select",{value:v,onChange:Z=>S(Z.target.value),className:"flex-1 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("optgroup",{label:"Recommended",children:gd.map(Z=>u.jsx("option",{value:Z,children:Z},Z))}),u.jsx("optgroup",{label:"Not Recommended",children:Di.map(Z=>u.jsxs("option",{value:Z,children:[Z," (weak)"]},Z))}),!gd.includes(v)&&!Di.includes(v)&&u.jsx("option",{value:v,children:v})]}),u.jsx(is,{onClick:Te,saving:d})]})]}),u.jsxs(vn,{title:"Gateway Trusted Proxies",badge:(ye=(Ae=r.gateway)==null?void 0:Ae.trustedProxies)!=null&&ye.length?void 0:"WARN",children:[u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client checks cannot be spoofed. Comma separated IPs."}),!((U=($=r.gateway)==null?void 0:$.trustedProxies)!=null&&U.length)&&u.jsx("div",{className:"rounded-lg bg-yellow-900/30 border border-yellow-700/50 px-4 py-2 mb-3",children:u.jsx("p",{className:"text-sm text-yellow-400",children:"No trusted proxies configured. Set your proxy IPs or keep the Control UI local-only."})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{type:"text",value:h,onChange:Z=>g(Z.target.value),placeholder:"e.g. 10.0.0.1, 192.168.1.1",className:"flex-1 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary"}),u.jsx(is,{onClick:Re,saving:d})]})]}),u.jsxs(vn,{title:"Agent Concurrency",children:[u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Limit the number of concurrent agents and subagents running."}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("label",{className:"text-sm text-gray-400 w-40",children:"Max agents"}),u.jsx("input",{type:"number",value:W,onChange:Z=>b(Z.target.value),min:1,max:32,className:"w-24 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("label",{className:"text-sm text-gray-400 w-40",children:"Max subagents"}),u.jsx("input",{type:"number",value:P,onChange:Z=>R(Z.target.value),min:1,max:64,className:"w-24 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary"})]}),u.jsx("div",{className:"flex justify-end mt-2",children:u.jsx(is,{onClick:ut,saving:d})})]})]}),u.jsxs(vn,{title:"WhatsApp Channel",children:[u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Control who can message the OpenClaw agent via WhatsApp."}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("label",{className:"text-sm text-gray-400 w-40",children:"DM Policy"}),u.jsxs("select",{value:k,onChange:Z=>_(Z.target.value),className:"flex-1 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"allowlist",children:"Allowlist only"}),u.jsx("option",{value:"open",children:"Open (anyone can message)"}),u.jsx("option",{value:"disabled",children:"Disabled"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400 block mb-1",children:"Allowed phone numbers (comma separated)"}),u.jsx("input",{type:"text",value:L,onChange:Z=>D(Z.target.value),placeholder:"e.g. +491234567890, +1555123456",className:"w-full rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary"})]}),u.jsxs("div",{className:"flex items-center justify-between py-2",children:[u.jsxs("div",{children:[u.jsx("label",{className:"text-sm text-gray-400",children:"Self Chat Mode"}),u.jsx("p",{className:"text-xs text-gray-600 mt-0.5",children:"Allow the agent to receive messages from yourself"})]}),u.jsx("button",{type:"button",onClick:()=>ie(!re),className:`w-11 h-6 rounded-full flex items-center px-0.5 transition-colors cursor-pointer ${re?"bg-success":"bg-gray-700"}`,children:u.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${re?"translate-x-5":"translate-x-0"}`})})]}),u.jsx("div",{className:"flex justify-end",children:u.jsx(is,{onClick:qe,saving:d})})]})]}),u.jsxs(vn,{title:"Gateway Bind Address",badge:B!=="loopback"?"DANGER":void 0,children:[u.jsxs("p",{className:"text-sm text-gray-500 mb-3",children:["Controls which network interface the OpenClaw gateway listens on. Binding to ",u.jsx("code",{children:"0.0.0.0"})," exposes the gateway to your entire network."]}),B!=="loopback"&&u.jsx("div",{className:"rounded-lg bg-red-900/30 border border-red-700/50 px-4 py-2 mb-3",children:u.jsxs("p",{className:"text-sm text-red-400",children:["The gateway is bound to ",u.jsx("code",{children:B}),', which exposes it beyond localhost. Unless you need remote access, set this to "loopback" for security.']})}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("select",{value:B,onChange:Z=>F(Z.target.value),className:"flex-1 rounded-lg bg-gray-800 border border-gray-700 text-gray-200 px-3 py-2 text-sm focus:outline-none focus:border-primary",children:[u.jsx("option",{value:"loopback",children:"loopback (recommended)"}),u.jsx("option",{value:"0.0.0.0",children:"0.0.0.0 (all interfaces)"}),B!=="loopback"&&B!=="0.0.0.0"&&u.jsxs("option",{value:B,children:[B," (custom)"]})]}),u.jsx(is,{onClick:Je,saving:d})]})]}),u.jsx(vn,{title:"Gateway",children:u.jsxs("div",{className:"space-y-2",children:[u.jsx(In,{label:"Mode",value:((z=r.gateway)==null?void 0:z.mode)??"—"}),u.jsx(In,{label:"Port",value:String(((N=r.gateway)==null?void 0:N.port)??"—")}),u.jsx(In,{label:"Auth mode",value:((ee=(T=r.gateway)==null?void 0:T.auth)==null?void 0:ee.mode)??"—"}),u.jsx(In,{label:"Tailscale",value:((se=(H=r.gateway)==null?void 0:H.tailscale)==null?void 0:se.mode)??"off"})]})}),u.jsxs(vn,{title:"Plugins",children:[u.jsx("p",{className:"text-sm text-gray-500 mb-3",children:"Enable or disable individual OpenClaw plugins. Use Access Control for a master toggle that disables all plugins at once."}),u.jsx("div",{className:"space-y-2",children:(ne=r.plugins)!=null&&ne.entries&&Object.keys(r.plugins.entries).length>0?Object.entries(r.plugins.entries).map(([Z,Ne])=>{const Ue=ce[Z]??Ne.enabled??!1;return u.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800 last:border-0",children:[u.jsx("span",{className:"text-sm text-gray-200",children:Z}),u.jsx("button",{type:"button",onClick:()=>ze(Z,Ue),className:`w-11 h-6 rounded-full flex items-center px-0.5 transition-colors cursor-pointer ${Ue?"bg-success":"bg-gray-700"}`,children:u.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${Ue?"translate-x-5":"translate-x-0"}`})})]},Z)}):u.jsx("p",{className:"text-sm text-gray-500",children:"No plugins configured."})})]}),u.jsx(vn,{title:"Instance Info",children:u.jsxs("div",{className:"space-y-2",children:[u.jsx(In,{label:"Last version",value:((ae=r.meta)==null?void 0:ae.lastTouchedVersion)??"—"}),u.jsx(In,{label:"Last updated",value:((le=r.meta)==null?void 0:le.lastTouchedAt)??"—"}),u.jsx(In,{label:"Workspace",value:((Oe=(de=r.agents)==null?void 0:de.defaults)==null?void 0:Oe.workspace)??"—"})]})})]})]})}function vn({title:r,badge:o,children:l}){const a=o==="DANGER"?"bg-red-900/50 text-red-400 border border-red-700/50":"bg-yellow-900/50 text-yellow-400 border border-yellow-700/50";return u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-200",children:r}),o&&u.jsx("span",{className:`px-2 py-0.5 text-xs font-medium rounded-full ${a}`,children:o})]}),l]})}function is({onClick:r,saving:o}){return u.jsx("button",{type:"button",onClick:r,disabled:o,className:"rounded-lg bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 transition-colors disabled:opacity-50 cursor-pointer",children:o?"Saving...":"Save"})}function In({label:r,value:o}){return u.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800 last:border-0",children:[u.jsx("span",{className:"text-sm text-gray-400",children:r}),u.jsx("span",{className:"text-sm text-gray-200",children:o})]})}const Mi=1024,Bi=65535;function Jg(){const[r,o]=x.useState(null),[l,a]=x.useState(""),[d,p]=x.useState(null),[h,g]=x.useState(!1);x.useEffect(()=>{q.emit("safeclaw:getSettings");const D=W=>{o(W),a(String(W.port))};return q.on("safeclaw:settingsData",D),()=>{q.off("safeclaw:settingsData",D)}},[]);const v=()=>{r&&q.emit("safeclaw:updateSettings",{autoOpenBrowser:!r.autoOpenBrowser})},S=D=>{a(D),g(!1),p(null)},k=()=>{if(!r)return;const D=Number(l);if(!Number.isInteger(D)||D<Mi||D>Bi){p(`Port must be an integer between ${Mi} and ${Bi}`);return}p(null),q.emit("safeclaw:updateSettings",{port:D}),g(!0)},_=D=>{D.key==="Enter"&&k()},L=r?Number(l)!==r.port:!1;return u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Settings"}),r?u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-200 mb-4",children:"General"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800",children:[u.jsx("span",{className:"text-sm text-gray-400",children:"Port"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("input",{type:"number",min:Mi,max:Bi,value:l,onChange:D=>S(D.target.value),onKeyDown:_,className:"w-24 rounded-md border border-gray-700 bg-gray-800 px-2.5 py-1 text-sm text-gray-200 text-right focus:border-primary focus:outline-none [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"}),L&&!h&&u.jsx("button",{type:"button",onClick:k,className:"rounded-md bg-primary px-2.5 py-1 text-xs font-medium text-white hover:bg-primary/80 transition-colors cursor-pointer",children:"Save"})]})]}),d&&u.jsx("p",{className:"text-xs text-danger -mt-2",children:d}),h&&u.jsx("p",{className:"text-xs text-warning -mt-2",children:"Port updated. Restart SafeClaw for changes to take effect."}),u.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800",children:[u.jsx("span",{className:"text-sm text-gray-400",children:"Auto-open browser"}),u.jsx("button",{type:"button",onClick:v,className:`w-11 h-6 rounded-full flex items-center px-0.5 transition-colors cursor-pointer ${r.autoOpenBrowser?"bg-success":"bg-gray-700"}`,children:u.jsx("div",{className:`w-5 h-5 rounded-full bg-white transition-transform ${r.autoOpenBrowser?"translate-x-5":"translate-x-0"}`})})]}),u.jsx(Eo,{label:"Data directory",value:"~/.safeclaw/"})]})]}),u.jsxs("div",{className:"rounded-xl border border-gray-800 bg-gray-900 p-6",children:[u.jsx("h3",{className:"text-sm font-medium text-gray-200 mb-4",children:"Account"}),u.jsxs("div",{className:"space-y-3",children:[u.jsx(Eo,{label:"Plan",value:r.premium?"Premium":"Free"}),u.jsx(Eo,{label:"Version",value:r.version}),u.jsx(Eo,{label:"User ID",value:r.userId??"Not set"})]})]})]}):u.jsx("p",{className:"text-gray-500",children:"Loading settings..."})]})}function Eo({label:r,value:o}){return u.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-gray-800 last:border-0",children:[u.jsx("span",{className:"text-sm text-gray-400",children:r}),u.jsx("span",{className:"text-sm text-gray-200",children:o})]})}function Zg(){return u.jsx(Tm,{children:u.jsx(lm,{children:u.jsxs(Kt,{element:u.jsx(eg,{}),children:[u.jsx(Kt,{index:!0,element:u.jsx(ng,{})}),u.jsx(Kt,{path:"interception",element:u.jsx(lg,{})}),u.jsx(Kt,{path:"sessions",element:u.jsx(Dg,{})}),u.jsx(Kt,{path:"threats",element:u.jsx(Kg,{})}),u.jsx(Kt,{path:"access",element:u.jsx(Gg,{})}),u.jsx(Kt,{path:"openclaw",element:u.jsx(Xg,{})}),u.jsx(Kt,{path:"settings",element:u.jsx(Jg,{})})]})})})}oh.createRoot(document.getElementById("root")).render(u.jsx(Jp.StrictMode,{children:u.jsx(Zg,{})}));