@openguardrails/moltguard
Version:
AI agent security plugin for OpenClaw: prompt injection detection, PII sanitization, and monitoring dashboard
174 lines • 261 kB
JavaScript
(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const p of d)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&f(m)}).observe(document,{childList:!0,subtree:!0});function o(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 f(d){if(d.ep)return;d.ep=!0;const p=o(d);fetch(d.href,p)}})();var Zi={exports:{}},Ir={},ea={exports:{}},re={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mc;function up(){if(mc)return re;mc=1;var i=Symbol.for("react.element"),u=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),m=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.iterator;function R(k){return k===null||typeof k!="object"?null:(k=_&&k[_]||k["@@iterator"],typeof k=="function"?k:null)}var P={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,D={};function L(k,A,ne){this.props=k,this.context=A,this.refs=D,this.updater=ne||P}L.prototype.isReactComponent={},L.prototype.setState=function(k,A){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,A,"setState")},L.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function T(){}T.prototype=L.prototype;function H(k,A,ne){this.props=k,this.context=A,this.refs=D,this.updater=ne||P}var F=H.prototype=new T;F.constructor=H,M(F,L.prototype),F.isPureReactComponent=!0;var ee=Array.isArray,U=Object.prototype.hasOwnProperty,Y={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ue(k,A,ne){var le,ie={},ae=null,he=null;if(A!=null)for(le in A.ref!==void 0&&(he=A.ref),A.key!==void 0&&(ae=""+A.key),A)U.call(A,le)&&!te.hasOwnProperty(le)&&(ie[le]=A[le]);var ce=arguments.length-2;if(ce===1)ie.children=ne;else if(1<ce){for(var ye=Array(ce),Ze=0;Ze<ce;Ze++)ye[Ze]=arguments[Ze+2];ie.children=ye}if(k&&k.defaultProps)for(le in ce=k.defaultProps,ce)ie[le]===void 0&&(ie[le]=ce[le]);return{$$typeof:i,type:k,key:ae,ref:he,props:ie,_owner:Y.current}}function Ne(k,A){return{$$typeof:i,type:k.type,key:A,ref:k.ref,props:k.props,_owner:k._owner}}function Ce(k){return typeof k=="object"&&k!==null&&k.$$typeof===i}function kt(k){var A={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(ne){return A[ne]})}var st=/\/+/g;function be(k,A){return typeof k=="object"&&k!==null&&k.key!=null?kt(""+k.key):A.toString(36)}function pt(k,A,ne,le,ie){var ae=typeof k;(ae==="undefined"||ae==="boolean")&&(k=null);var he=!1;if(k===null)he=!0;else switch(ae){case"string":case"number":he=!0;break;case"object":switch(k.$$typeof){case i:case u:he=!0}}if(he)return he=k,ie=ie(he),k=le===""?"."+be(he,0):le,ee(ie)?(ne="",k!=null&&(ne=k.replace(st,"$&/")+"/"),pt(ie,A,ne,"",function(Ze){return Ze})):ie!=null&&(Ce(ie)&&(ie=Ne(ie,ne+(!ie.key||he&&he.key===ie.key?"":(""+ie.key).replace(st,"$&/")+"/")+k)),A.push(ie)),1;if(he=0,le=le===""?".":le+":",ee(k))for(var ce=0;ce<k.length;ce++){ae=k[ce];var ye=le+be(ae,ce);he+=pt(ae,A,ne,ye,ie)}else if(ye=R(k),typeof ye=="function")for(k=ye.call(k),ce=0;!(ae=k.next()).done;)ae=ae.value,ye=le+be(ae,ce++),he+=pt(ae,A,ne,ye,ie);else if(ae==="object")throw A=String(k),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.");return he}function St(k,A,ne){if(k==null)return k;var le=[],ie=0;return pt(k,le,"","",function(ae){return A.call(ne,ae,ie++)}),le}function Qe(k){if(k._status===-1){var A=k._result;A=A(),A.then(function(ne){(k._status===0||k._status===-1)&&(k._status=1,k._result=ne)},function(ne){(k._status===0||k._status===-1)&&(k._status=2,k._result=ne)}),k._status===-1&&(k._status=0,k._result=A)}if(k._status===1)return k._result.default;throw k._result}var Se={current:null},B={transition:null},b={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:B,ReactCurrentOwner:Y};function Q(){throw Error("act(...) is not supported in production builds of React.")}return re.Children={map:St,forEach:function(k,A,ne){St(k,function(){A.apply(this,arguments)},ne)},count:function(k){var A=0;return St(k,function(){A++}),A},toArray:function(k){return St(k,function(A){return A})||[]},only:function(k){if(!Ce(k))throw Error("React.Children.only expected to receive a single React element child.");return k}},re.Component=L,re.Fragment=o,re.Profiler=d,re.PureComponent=H,re.StrictMode=f,re.Suspense=v,re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b,re.act=Q,re.cloneElement=function(k,A,ne){if(k==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+k+".");var le=M({},k.props),ie=k.key,ae=k.ref,he=k._owner;if(A!=null){if(A.ref!==void 0&&(ae=A.ref,he=Y.current),A.key!==void 0&&(ie=""+A.key),k.type&&k.type.defaultProps)var ce=k.type.defaultProps;for(ye in A)U.call(A,ye)&&!te.hasOwnProperty(ye)&&(le[ye]=A[ye]===void 0&&ce!==void 0?ce[ye]:A[ye])}var ye=arguments.length-2;if(ye===1)le.children=ne;else if(1<ye){ce=Array(ye);for(var Ze=0;Ze<ye;Ze++)ce[Ze]=arguments[Ze+2];le.children=ce}return{$$typeof:i,type:k.type,key:ie,ref:ae,props:le,_owner:he}},re.createContext=function(k){return k={$$typeof:m,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},k.Provider={$$typeof:p,_context:k},k.Consumer=k},re.createElement=ue,re.createFactory=function(k){var A=ue.bind(null,k);return A.type=k,A},re.createRef=function(){return{current:null}},re.forwardRef=function(k){return{$$typeof:C,render:k}},re.isValidElement=Ce,re.lazy=function(k){return{$$typeof:j,_payload:{_status:-1,_result:k},_init:Qe}},re.memo=function(k,A){return{$$typeof:y,type:k,compare:A===void 0?null:A}},re.startTransition=function(k){var A=B.transition;B.transition={};try{k()}finally{B.transition=A}},re.unstable_act=Q,re.useCallback=function(k,A){return Se.current.useCallback(k,A)},re.useContext=function(k){return Se.current.useContext(k)},re.useDebugValue=function(){},re.useDeferredValue=function(k){return Se.current.useDeferredValue(k)},re.useEffect=function(k,A){return Se.current.useEffect(k,A)},re.useId=function(){return Se.current.useId()},re.useImperativeHandle=function(k,A,ne){return Se.current.useImperativeHandle(k,A,ne)},re.useInsertionEffect=function(k,A){return Se.current.useInsertionEffect(k,A)},re.useLayoutEffect=function(k,A){return Se.current.useLayoutEffect(k,A)},re.useMemo=function(k,A){return Se.current.useMemo(k,A)},re.useReducer=function(k,A,ne){return Se.current.useReducer(k,A,ne)},re.useRef=function(k){return Se.current.useRef(k)},re.useState=function(k){return Se.current.useState(k)},re.useSyncExternalStore=function(k,A,ne){return Se.current.useSyncExternalStore(k,A,ne)},re.useTransition=function(){return Se.current.useTransition()},re.version="18.3.1",re}var vc;function fa(){return vc||(vc=1,ea.exports=up()),ea.exports}/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var gc;function cp(){if(gc)return Ir;gc=1;var i=fa(),u=Symbol.for("react.element"),o=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,d=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function m(C,v,y){var j,_={},R=null,P=null;y!==void 0&&(R=""+y),v.key!==void 0&&(R=""+v.key),v.ref!==void 0&&(P=v.ref);for(j in v)f.call(v,j)&&!p.hasOwnProperty(j)&&(_[j]=v[j]);if(C&&C.defaultProps)for(j in v=C.defaultProps,v)_[j]===void 0&&(_[j]=v[j]);return{$$typeof:u,type:C,key:R,ref:P,props:_,_owner:d.current}}return Ir.Fragment=o,Ir.jsx=m,Ir.jsxs=m,Ir}var yc;function dp(){return yc||(yc=1,Zi.exports=cp()),Zi.exports}var l=dp(),w=fa(),ql={},ta={exports:{}},qe={},na={exports:{}},ra={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var xc;function fp(){return xc||(xc=1,(function(i){function u(B,b){var Q=B.length;B.push(b);e:for(;0<Q;){var k=Q-1>>>1,A=B[k];if(0<d(A,b))B[k]=b,B[Q]=A,Q=k;else break e}}function o(B){return B.length===0?null:B[0]}function f(B){if(B.length===0)return null;var b=B[0],Q=B.pop();if(Q!==b){B[0]=Q;e:for(var k=0,A=B.length,ne=A>>>1;k<ne;){var le=2*(k+1)-1,ie=B[le],ae=le+1,he=B[ae];if(0>d(ie,Q))ae<A&&0>d(he,ie)?(B[k]=he,B[ae]=Q,k=ae):(B[k]=ie,B[le]=Q,k=le);else if(ae<A&&0>d(he,Q))B[k]=he,B[ae]=Q,k=ae;else break e}}return b}function d(B,b){var Q=B.sortIndex-b.sortIndex;return Q!==0?Q:B.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var p=performance;i.unstable_now=function(){return p.now()}}else{var m=Date,C=m.now();i.unstable_now=function(){return m.now()-C}}var v=[],y=[],j=1,_=null,R=3,P=!1,M=!1,D=!1,L=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,H=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(B){for(var b=o(y);b!==null;){if(b.callback===null)f(y);else if(b.startTime<=B)f(y),b.sortIndex=b.expirationTime,u(v,b);else break;b=o(y)}}function ee(B){if(D=!1,F(B),!M)if(o(v)!==null)M=!0,Qe(U);else{var b=o(y);b!==null&&Se(ee,b.startTime-B)}}function U(B,b){M=!1,D&&(D=!1,T(ue),ue=-1),P=!0;var Q=R;try{for(F(b),_=o(v);_!==null&&(!(_.expirationTime>b)||B&&!kt());){var k=_.callback;if(typeof k=="function"){_.callback=null,R=_.priorityLevel;var A=k(_.expirationTime<=b);b=i.unstable_now(),typeof A=="function"?_.callback=A:_===o(v)&&f(v),F(b)}else f(v);_=o(v)}if(_!==null)var ne=!0;else{var le=o(y);le!==null&&Se(ee,le.startTime-b),ne=!1}return ne}finally{_=null,R=Q,P=!1}}var Y=!1,te=null,ue=-1,Ne=5,Ce=-1;function kt(){return!(i.unstable_now()-Ce<Ne)}function st(){if(te!==null){var B=i.unstable_now();Ce=B;var b=!0;try{b=te(!0,B)}finally{b?be():(Y=!1,te=null)}}else Y=!1}var be;if(typeof H=="function")be=function(){H(st)};else if(typeof MessageChannel<"u"){var pt=new MessageChannel,St=pt.port2;pt.port1.onmessage=st,be=function(){St.postMessage(null)}}else be=function(){L(st,0)};function Qe(B){te=B,Y||(Y=!0,be())}function Se(B,b){ue=L(function(){B(i.unstable_now())},b)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(B){B.callback=null},i.unstable_continueExecution=function(){M||P||(M=!0,Qe(U))},i.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ne=0<B?Math.floor(1e3/B):5},i.unstable_getCurrentPriorityLevel=function(){return R},i.unstable_getFirstCallbackNode=function(){return o(v)},i.unstable_next=function(B){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var Q=R;R=b;try{return B()}finally{R=Q}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(B,b){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var Q=R;R=B;try{return b()}finally{R=Q}},i.unstable_scheduleCallback=function(B,b,Q){var k=i.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?k+Q:k):Q=k,B){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=Q+A,B={id:j++,callback:b,priorityLevel:B,startTime:Q,expirationTime:A,sortIndex:-1},Q>k?(B.sortIndex=Q,u(y,B),o(v)===null&&B===o(y)&&(D?(T(ue),ue=-1):D=!0,Se(ee,Q-k))):(B.sortIndex=A,u(v,B),M||P||(M=!0,Qe(U))),B},i.unstable_shouldYield=kt,i.unstable_wrapCallback=function(B){var b=R;return function(){var Q=R;R=b;try{return B.apply(this,arguments)}finally{R=Q}}}})(ra)),ra}var wc;function pp(){return wc||(wc=1,na.exports=fp()),na.exports}/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jc;function hp(){if(jc)return qe;jc=1;var i=fa(),u=pp();function o(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 f=new Set,d={};function p(e,t){m(e,t),m(e+"Capture",t)}function m(e,t){for(d[e]=t,e=0;e<t.length;e++)f.add(t[e])}var C=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),v=Object.prototype.hasOwnProperty,y=/^[: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]*$/,j={},_={};function R(e){return v.call(_,e)?!0:v.call(j,e)?!1:y.test(e)?_[e]=!0:(j[e]=!0,!1)}function P(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,t,n,r){if(t===null||typeof t>"u"||P(e,t,n,r))return!0;if(r)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 D(e,t,n,r,s,a,c){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=c}var L={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){L[e]=new D(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];L[t]=new D(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){L[e]=new D(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){L[e]=new D(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){L[e]=new D(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){L[e]=new D(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){L[e]=new D(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){L[e]=new D(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){L[e]=new D(e,5,!1,e.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function H(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(T,H);L[t]=new D(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(T,H);L[t]=new D(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(T,H);L[t]=new D(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){L[e]=new D(e,1,!1,e.toLowerCase(),null,!1,!1)}),L.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){L[e]=new D(e,1,!1,e.toLowerCase(),null,!0,!0)});function F(e,t,n,r){var s=L.hasOwnProperty(t)?L[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(M(t,n,s,r)&&(n=null),r||s===null?R(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ee=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),Y=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),Ne=Symbol.for("react.profiler"),Ce=Symbol.for("react.provider"),kt=Symbol.for("react.context"),st=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),pt=Symbol.for("react.suspense_list"),St=Symbol.for("react.memo"),Qe=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),B=Symbol.iterator;function b(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Object.assign,k;function A(e){if(k===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);k=t&&t[1]||""}return`
`+k+e}var ne=!1;function le(e,t){if(!e||ne)return"";ne=!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(E){var r=E}Reflect.construct(e,[],t)}else{try{t.call()}catch(E){r=E}e.call(t.prototype)}else{try{throw Error()}catch(E){r=E}e()}}catch(E){if(E&&r&&typeof E.stack=="string"){for(var s=E.stack.split(`
`),a=r.stack.split(`
`),c=s.length-1,h=a.length-1;1<=c&&0<=h&&s[c]!==a[h];)h--;for(;1<=c&&0<=h;c--,h--)if(s[c]!==a[h]){if(c!==1||h!==1)do if(c--,h--,0>h||s[c]!==a[h]){var g=`
`+s[c].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),g}while(1<=c&&0<=h);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?A(e):""}function ie(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return""}}function ae(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 te:return"Fragment";case Y:return"Portal";case Ne:return"Profiler";case ue:return"StrictMode";case be:return"Suspense";case pt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case kt:return(e.displayName||"Context")+".Consumer";case Ce:return(e._context.displayName||"Context")+".Provider";case st:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case St:return t=e.displayName||null,t!==null?t:ae(e.type)||"Memo";case Qe:t=e._payload,e=e._init;try{return ae(e(t))}catch{}}return null}function he(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 ae(t);case 8:return t===ue?"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 ce(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ze(e){var t=ye(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(c){r=""+c,a.call(this,c)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(c){r=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Br(e){e._valueTracker||(e._valueTracker=Ze(e))}function wa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ye(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wr(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 is(e,t){var n=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ja(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ce(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ka(e,t){t=t.checked,t!=null&&F(e,"checked",t,!1)}function as(e,t){ka(e,t);var n=ce(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?os(e,t.type,n):t.hasOwnProperty("defaultValue")&&os(e,t.type,ce(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sa(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="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 os(e,t,n){(t!=="number"||Wr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Xn=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ce(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function us(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(o(91));return Q({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _a(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(o(92));if(Xn(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ce(n)}}function Na(e,t){var n=ce(t.value),r=ce(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Ca(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ea(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 cs(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ea(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Hr,Ra=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Hr=Hr||document.createElement("div"),Hr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Hr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var bn={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},fd=["Webkit","ms","Moz","O"];Object.keys(bn).forEach(function(e){fd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bn[t]=bn[e]})});function Pa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||bn.hasOwnProperty(e)&&bn[e]?(""+t).trim():t+"px"}function La(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Pa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var pd=Q({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 ds(e,t){if(t){if(pd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(o(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(t.style!=null&&typeof t.style!="object")throw Error(o(62))}}function fs(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 ps=null;function hs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ms=null,kn=null,Sn=null;function Ta(e){if(e=wr(e)){if(typeof ms!="function")throw Error(o(280));var t=e.stateNode;t&&(t=fl(t),ms(e.stateNode,e.type,t))}}function za(e){kn?Sn?Sn.push(e):Sn=[e]:kn=e}function Ma(){if(kn){var e=kn,t=Sn;if(Sn=kn=null,Ta(e),t)for(e=0;e<t.length;e++)Ta(t[e])}}function Aa(e,t){return e(t)}function Ia(){}var vs=!1;function Oa(e,t,n){if(vs)return e(t,n);vs=!0;try{return Aa(e,t,n)}finally{vs=!1,(kn!==null||Sn!==null)&&(Ia(),Ma())}}function Zn(e,t){var n=e.stateNode;if(n===null)return null;var r=fl(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(o(231,t,typeof n));return n}var gs=!1;if(C)try{var er={};Object.defineProperty(er,"passive",{get:function(){gs=!0}}),window.addEventListener("test",er,er),window.removeEventListener("test",er,er)}catch{gs=!1}function hd(e,t,n,r,s,a,c,h,g){var E=Array.prototype.slice.call(arguments,3);try{t.apply(n,E)}catch(I){this.onError(I)}}var tr=!1,Vr=null,Qr=!1,ys=null,md={onError:function(e){tr=!0,Vr=e}};function vd(e,t,n,r,s,a,c,h,g){tr=!1,Vr=null,hd.apply(md,arguments)}function gd(e,t,n,r,s,a,c,h,g){if(vd.apply(this,arguments),tr){if(tr){var E=Vr;tr=!1,Vr=null}else throw Error(o(198));Qr||(Qr=!0,ys=E)}}function on(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 Da(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 $a(e){if(on(e)!==e)throw Error(o(188))}function yd(e){var t=e.alternate;if(!t){if(t=on(e),t===null)throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===n)return $a(s),e;if(a===r)return $a(s),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=s,r=a;else{for(var c=!1,h=s.child;h;){if(h===n){c=!0,n=s,r=a;break}if(h===r){c=!0,r=s,n=a;break}h=h.sibling}if(!c){for(h=a.child;h;){if(h===n){c=!0,n=a,r=s;break}if(h===r){c=!0,r=a,n=s;break}h=h.sibling}if(!c)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function Fa(e){return e=yd(e),e!==null?Ua(e):null}function Ua(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ua(e);if(t!==null)return t;e=e.sibling}return null}var Ba=u.unstable_scheduleCallback,Wa=u.unstable_cancelCallback,xd=u.unstable_shouldYield,wd=u.unstable_requestPaint,Ee=u.unstable_now,jd=u.unstable_getCurrentPriorityLevel,xs=u.unstable_ImmediatePriority,Ha=u.unstable_UserBlockingPriority,Kr=u.unstable_NormalPriority,kd=u.unstable_LowPriority,Va=u.unstable_IdlePriority,Gr=null,_t=null;function Sd(e){if(_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Gr,e,void 0,(e.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:Cd,_d=Math.log,Nd=Math.LN2;function Cd(e){return e>>>=0,e===0?32:31-(_d(e)/Nd|0)|0}var Yr=64,Jr=4194304;function nr(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 Xr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,a=e.pingedLanes,c=n&268435455;if(c!==0){var h=c&~s;h!==0?r=nr(h):(a&=c,a!==0&&(r=nr(a)))}else c=n&~s,c!==0?r=nr(c):a!==0&&(r=nr(a));if(r===0)return 0;if(t!==0&&t!==r&&(t&s)===0&&(s=r&-r,a=t&-t,s>=a||s===16&&(a&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ht(t),s=1<<n,r|=e[n],t&=~s;return r}function Ed(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 Rd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes;0<a;){var c=31-ht(a),h=1<<c,g=s[c];g===-1?((h&n)===0||(h&r)!==0)&&(s[c]=Ed(h,t)):g<=t&&(e.expiredLanes|=h),a&=~h}}function ws(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Qa(){var e=Yr;return Yr<<=1,(Yr&4194240)===0&&(Yr=64),e}function js(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function Pd(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 r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-ht(n),a=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~a}}function ks(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ht(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var de=0;function Ka(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ga,Ss,Ya,Ja,Xa,_s=!1,qr=[],Bt=null,Wt=null,Ht=null,lr=new Map,sr=new Map,Vt=[],Ld="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 qa(e,t){switch(e){case"focusin":case"focusout":Bt=null;break;case"dragenter":case"dragleave":Wt=null;break;case"mouseover":case"mouseout":Ht=null;break;case"pointerover":case"pointerout":lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sr.delete(t.pointerId)}}function ir(e,t,n,r,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},t!==null&&(t=wr(t),t!==null&&Ss(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Td(e,t,n,r,s){switch(t){case"focusin":return Bt=ir(Bt,e,t,n,r,s),!0;case"dragenter":return Wt=ir(Wt,e,t,n,r,s),!0;case"mouseover":return Ht=ir(Ht,e,t,n,r,s),!0;case"pointerover":var a=s.pointerId;return lr.set(a,ir(lr.get(a)||null,e,t,n,r,s)),!0;case"gotpointercapture":return a=s.pointerId,sr.set(a,ir(sr.get(a)||null,e,t,n,r,s)),!0}return!1}function ba(e){var t=un(e.target);if(t!==null){var n=on(t);if(n!==null){if(t=n.tag,t===13){if(t=Da(n),t!==null){e.blockedOn=t,Xa(e.priority,function(){Ya(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 br(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ps=r,n.target.dispatchEvent(r),ps=null}else return t=wr(n),t!==null&&Ss(t),e.blockedOn=n,!1;t.shift()}return!0}function Za(e,t,n){br(e)&&n.delete(t)}function zd(){_s=!1,Bt!==null&&br(Bt)&&(Bt=null),Wt!==null&&br(Wt)&&(Wt=null),Ht!==null&&br(Ht)&&(Ht=null),lr.forEach(Za),sr.forEach(Za)}function ar(e,t){e.blockedOn===t&&(e.blockedOn=null,_s||(_s=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,zd)))}function or(e){function t(s){return ar(s,e)}if(0<qr.length){ar(qr[0],e);for(var n=1;n<qr.length;n++){var r=qr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Bt!==null&&ar(Bt,e),Wt!==null&&ar(Wt,e),Ht!==null&&ar(Ht,e),lr.forEach(t),sr.forEach(t),n=0;n<Vt.length;n++)r=Vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Vt.length&&(n=Vt[0],n.blockedOn===null);)ba(n),n.blockedOn===null&&Vt.shift()}var _n=ee.ReactCurrentBatchConfig,Zr=!0;function Md(e,t,n,r){var s=de,a=_n.transition;_n.transition=null;try{de=1,Ns(e,t,n,r)}finally{de=s,_n.transition=a}}function Ad(e,t,n,r){var s=de,a=_n.transition;_n.transition=null;try{de=4,Ns(e,t,n,r)}finally{de=s,_n.transition=a}}function Ns(e,t,n,r){if(Zr){var s=Cs(e,t,n,r);if(s===null)Hs(e,t,r,el,n),qa(e,r);else if(Td(s,e,t,n,r))r.stopPropagation();else if(qa(e,r),t&4&&-1<Ld.indexOf(e)){for(;s!==null;){var a=wr(s);if(a!==null&&Ga(a),a=Cs(e,t,n,r),a===null&&Hs(e,t,r,el,n),a===s)break;s=a}s!==null&&r.stopPropagation()}else Hs(e,t,r,null,n)}}var el=null;function Cs(e,t,n,r){if(el=null,e=hs(r),e=un(e),e!==null)if(t=on(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Da(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 el=e,null}function eo(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(jd()){case xs:return 1;case Ha:return 4;case Kr:case kd:return 16;case Va:return 536870912;default:return 16}default:return 16}}var Qt=null,Es=null,tl=null;function to(){if(tl)return tl;var e,t=Es,n=t.length,r,s="value"in Qt?Qt.value:Qt.textContent,a=s.length;for(e=0;e<n&&t[e]===s[e];e++);var c=n-e;for(r=1;r<=c&&t[n-r]===s[a-r];r++);return tl=s.slice(e,1<r?1-r:void 0)}function nl(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 rl(){return!0}function no(){return!1}function et(e){function t(n,r,s,a,c){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=a,this.target=c,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(a):a[h]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?rl:no,this.isPropagationStopped=no,this}return Q(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=rl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=rl)},persist:function(){},isPersistent:rl}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=et(Nn),ur=Q({},Nn,{view:0,detail:0}),Id=et(ur),Ps,Ls,cr,ll=Q({},ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zs,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!==cr&&(cr&&e.type==="mousemove"?(Ps=e.screenX-cr.screenX,Ls=e.screenY-cr.screenY):Ls=Ps=0,cr=e),Ps)},movementY:function(e){return"movementY"in e?e.movementY:Ls}}),ro=et(ll),Od=Q({},ll,{dataTransfer:0}),Dd=et(Od),$d=Q({},ur,{relatedTarget:0}),Ts=et($d),Fd=Q({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0}),Ud=et(Fd),Bd=Q({},Nn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wd=et(Bd),Hd=Q({},Nn,{data:0}),lo=et(Hd),Vd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qd={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"},Kd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kd[e])?!!t[e]:!1}function zs(){return Gd}var Yd=Q({},ur,{key:function(e){if(e.key){var t=Vd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zs,charCode:function(e){return e.type==="keypress"?nl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jd=et(Yd),Xd=Q({},ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),so=et(Xd),qd=Q({},ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zs}),bd=et(qd),Zd=Q({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0}),ef=et(Zd),tf=Q({},ll,{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}),nf=et(tf),rf=[9,13,27,32],Ms=C&&"CompositionEvent"in window,dr=null;C&&"documentMode"in document&&(dr=document.documentMode);var lf=C&&"TextEvent"in window&&!dr,io=C&&(!Ms||dr&&8<dr&&11>=dr),ao=" ",oo=!1;function uo(e,t){switch(e){case"keyup":return rf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function co(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function sf(e,t){switch(e){case"compositionend":return co(t);case"keypress":return t.which!==32?null:(oo=!0,ao);case"textInput":return e=t.data,e===ao&&oo?null:e;default:return null}}function af(e,t){if(Cn)return e==="compositionend"||!Ms&&uo(e,t)?(e=to(),tl=Es=Qt=null,Cn=!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 io&&t.locale!=="ko"?null:t.data;default:return null}}var of={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 fo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!of[e.type]:t==="textarea"}function po(e,t,n,r){za(r),t=ul(t,"onChange"),0<t.length&&(n=new Rs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fr=null,pr=null;function uf(e){To(e,0)}function sl(e){var t=Tn(e);if(wa(t))return e}function cf(e,t){if(e==="change")return t}var ho=!1;if(C){var As;if(C){var Is="oninput"in document;if(!Is){var mo=document.createElement("div");mo.setAttribute("oninput","return;"),Is=typeof mo.oninput=="function"}As=Is}else As=!1;ho=As&&(!document.documentMode||9<document.documentMode)}function vo(){fr&&(fr.detachEvent("onpropertychange",go),pr=fr=null)}function go(e){if(e.propertyName==="value"&&sl(pr)){var t=[];po(t,pr,e,hs(e)),Oa(uf,t)}}function df(e,t,n){e==="focusin"?(vo(),fr=t,pr=n,fr.attachEvent("onpropertychange",go)):e==="focusout"&&vo()}function ff(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sl(pr)}function pf(e,t){if(e==="click")return sl(t)}function hf(e,t){if(e==="input"||e==="change")return sl(t)}function mf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mt=typeof Object.is=="function"?Object.is:mf;function hr(e,t){if(mt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!v.call(t,s)||!mt(e[s],t[s]))return!1}return!0}function yo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xo(e,t){var n=yo(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yo(n)}}function wo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jo(){for(var e=window,t=Wr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wr(e.document)}return t}function Os(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 vf(e){var t=jo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&wo(n.ownerDocument.documentElement,n)){if(r!==null&&Os(n)){if(t=r.start,e=r.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 s=n.textContent.length,a=Math.min(r.start,s);r=r.end===void 0?a:Math.min(r.end,s),!e.extend&&a>r&&(s=r,r=a,a=s),s=xo(n,a);var c=xo(n,r);s&&c&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==c.node||e.focusOffset!==c.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(c.node,c.offset)):(t.setEnd(c.node,c.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 gf=C&&"documentMode"in document&&11>=document.documentMode,En=null,Ds=null,mr=null,$s=!1;function ko(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$s||En==null||En!==Wr(r)||(r=En,"selectionStart"in r&&Os(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&hr(mr,r)||(mr=r,r=ul(Ds,"onSelect"),0<r.length&&(t=new Rs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=En)))}function il(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Rn={animationend:il("Animation","AnimationEnd"),animationiteration:il("Animation","AnimationIteration"),animationstart:il("Animation","AnimationStart"),transitionend:il("Transition","TransitionEnd")},Fs={},So={};C&&(So=document.createElement("div").style,"AnimationEvent"in window||(delete Rn.animationend.animation,delete Rn.animationiteration.animation,delete Rn.animationstart.animation),"TransitionEvent"in window||delete Rn.transitionend.transition);function al(e){if(Fs[e])return Fs[e];if(!Rn[e])return e;var t=Rn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in So)return Fs[e]=t[n];return e}var _o=al("animationend"),No=al("animationiteration"),Co=al("animationstart"),Eo=al("transitionend"),Ro=new Map,Po="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 Kt(e,t){Ro.set(e,t),p(t,[e])}for(var Us=0;Us<Po.length;Us++){var Bs=Po[Us],yf=Bs.toLowerCase(),xf=Bs[0].toUpperCase()+Bs.slice(1);Kt(yf,"on"+xf)}Kt(_o,"onAnimationEnd"),Kt(No,"onAnimationIteration"),Kt(Co,"onAnimationStart"),Kt("dblclick","onDoubleClick"),Kt("focusin","onFocus"),Kt("focusout","onBlur"),Kt(Eo,"onTransitionEnd"),m("onMouseEnter",["mouseout","mouseover"]),m("onMouseLeave",["mouseout","mouseover"]),m("onPointerEnter",["pointerout","pointerover"]),m("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 vr="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(" "),wf=new Set("cancel close invalid load scroll toggle".split(" ").concat(vr));function Lo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,gd(r,t,void 0,e),e.currentTarget=null}function To(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var c=r.length-1;0<=c;c--){var h=r[c],g=h.instance,E=h.currentTarget;if(h=h.listener,g!==a&&s.isPropagationStopped())break e;Lo(s,h,E),a=g}else for(c=0;c<r.length;c++){if(h=r[c],g=h.instance,E=h.currentTarget,h=h.listener,g!==a&&s.isPropagationStopped())break e;Lo(s,h,E),a=g}}}if(Qr)throw e=ys,Qr=!1,ys=null,e}function ve(e,t){var n=t[Js];n===void 0&&(n=t[Js]=new Set);var r=e+"__bubble";n.has(r)||(zo(t,e,2,!1),n.add(r))}function Ws(e,t,n){var r=0;t&&(r|=4),zo(n,e,r,t)}var ol="_reactListening"+Math.random().toString(36).slice(2);function gr(e){if(!e[ol]){e[ol]=!0,f.forEach(function(n){n!=="selectionchange"&&(wf.has(n)||Ws(n,!1,e),Ws(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ol]||(t[ol]=!0,Ws("selectionchange",!1,t))}}function zo(e,t,n,r){switch(eo(t)){case 1:var s=Md;break;case 4:s=Ad;break;default:s=Ns}n=s.bind(null,t,n,e),s=void 0,!gs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Hs(e,t,n,r,s){var a=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var c=r.tag;if(c===3||c===4){var h=r.stateNode.containerInfo;if(h===s||h.nodeType===8&&h.parentNode===s)break;if(c===4)for(c=r.return;c!==null;){var g=c.tag;if((g===3||g===4)&&(g=c.stateNode.containerInfo,g===s||g.nodeType===8&&g.parentNode===s))return;c=c.return}for(;h!==null;){if(c=un(h),c===null)return;if(g=c.tag,g===5||g===6){r=a=c;continue e}h=h.parentNode}}r=r.return}Oa(function(){var E=a,I=hs(n),O=[];e:{var z=Ro.get(e);if(z!==void 0){var W=Rs,K=e;switch(e){case"keypress":if(nl(n)===0)break e;case"keydown":case"keyup":W=Jd;break;case"focusin":K="focus",W=Ts;break;case"focusout":K="blur",W=Ts;break;case"beforeblur":case"afterblur":W=Ts;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":W=ro;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Dd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=bd;break;case _o:case No:case Co:W=Ud;break;case Eo:W=ef;break;case"scroll":W=Id;break;case"wheel":W=nf;break;case"copy":case"cut":case"paste":W=Wd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=so}var G=(t&4)!==0,Re=!G&&e==="scroll",S=G?z!==null?z+"Capture":null:z;G=[];for(var x=E,N;x!==null;){N=x;var $=N.stateNode;if(N.tag===5&&$!==null&&(N=$,S!==null&&($=Zn(x,S),$!=null&&G.push(yr(x,$,N)))),Re)break;x=x.return}0<G.length&&(z=new W(z,K,null,n,I),O.push({event:z,listeners:G}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",z&&n!==ps&&(K=n.relatedTarget||n.fromElement)&&(un(K)||K[Tt]))break e;if((W||z)&&(z=I.window===I?I:(z=I.ownerDocument)?z.defaultView||z.parentWindow:window,W?(K=n.relatedTarget||n.toElement,W=E,K=K?un(K):null,K!==null&&(Re=on(K),K!==Re||K.tag!==5&&K.tag!==6)&&(K=null)):(W=null,K=E),W!==K)){if(G=ro,$="onMouseLeave",S="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(G=so,$="onPointerLeave",S="onPointerEnter",x="pointer"),Re=W==null?z:Tn(W),N=K==null?z:Tn(K),z=new G($,x+"leave",W,n,I),z.target=Re,z.relatedTarget=N,$=null,un(I)===E&&(G=new G(S,x+"enter",K,n,I),G.target=N,G.relatedTarget=Re,$=G),Re=$,W&&K)t:{for(G=W,S=K,x=0,N=G;N;N=Pn(N))x++;for(N=0,$=S;$;$=Pn($))N++;for(;0<x-N;)G=Pn(G),x--;for(;0<N-x;)S=Pn(S),N--;for(;x--;){if(G===S||S!==null&&G===S.alternate)break t;G=Pn(G),S=Pn(S)}G=null}else G=null;W!==null&&Mo(O,z,W,G,!1),K!==null&&Re!==null&&Mo(O,Re,K,G,!0)}}e:{if(z=E?Tn(E):window,W=z.nodeName&&z.nodeName.toLowerCase(),W==="select"||W==="input"&&z.type==="file")var J=cf;else if(fo(z))if(ho)J=hf;else{J=ff;var X=df}else(W=z.nodeName)&&W.toLowerCase()==="input"&&(z.type==="checkbox"||z.type==="radio")&&(J=pf);if(J&&(J=J(e,E))){po(O,J,n,I);break e}X&&X(e,z,E),e==="focusout"&&(X=z._wrapperState)&&X.controlled&&z.type==="number"&&os(z,"number",z.value)}switch(X=E?Tn(E):window,e){case"focusin":(fo(X)||X.contentEditable==="true")&&(En=X,Ds=E,mr=null);break;case"focusout":mr=Ds=En=null;break;case"mousedown":$s=!0;break;case"contextmenu":case"mouseup":case"dragend":$s=!1,ko(O,n,I);break;case"selectionchange":if(gf)break;case"keydown":case"keyup":ko(O,n,I)}var q;if(Ms)e:{switch(e){case"compositionstart":var Z="onCompositionStart";break e;case"compositionend":Z="onCompositionEnd";break e;case"compositionupdate":Z="onCompositionUpdate";break e}Z=void 0}else Cn?uo(e,n)&&(Z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Z="onCompositionStart");Z&&(io&&n.locale!=="ko"&&(Cn||Z!=="onCompositionStart"?Z==="onCompositionEnd"&&Cn&&(q=to()):(Qt=I,Es="value"in Qt?Qt.value:Qt.textContent,Cn=!0)),X=ul(E,Z),0<X.length&&(Z=new lo(Z,e,null,n,I),O.push({event:Z,listeners:X}),q?Z.data=q:(q=co(n),q!==null&&(Z.data=q)))),(q=lf?sf(e,n):af(e,n))&&(E=ul(E,"onBeforeInput"),0<E.length&&(I=new lo("onBeforeInput","beforeinput",null,n,I),O.push({event:I,listeners:E}),I.data=q))}To(O,t)})}function yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ul(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,a=s.stateNode;s.tag===5&&a!==null&&(s=a,a=Zn(e,n),a!=null&&r.unshift(yr(e,a,s)),a=Zn(e,t),a!=null&&r.push(yr(e,a,s))),e=e.return}return r}function Pn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Mo(e,t,n,r,s){for(var a=t._reactName,c=[];n!==null&&n!==r;){var h=n,g=h.alternate,E=h.stateNode;if(g!==null&&g===r)break;h.tag===5&&E!==null&&(h=E,s?(g=Zn(n,a),g!=null&&c.unshift(yr(n,g,h))):s||(g=Zn(n,a),g!=null&&c.push(yr(n,g,h)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var jf=/\r\n?/g,kf=/\u0000|\uFFFD/g;function Ao(e){return(typeof e=="string"?e:""+e).replace(jf,`
`).replace(kf,"")}function cl(e,t,n){if(t=Ao(t),Ao(e)!==t&&n)throw Error(o(425))}function dl(){}var Vs=null,Qs=null;function Ks(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 Gs=typeof setTimeout=="function"?setTimeout:void 0,Sf=typeof clearTimeout=="function"?clearTimeout:void 0,Io=typeof Promise=="function"?Promise:void 0,_f=typeof queueMicrotask=="function"?queueMicrotask:typeof Io<"u"?function(e){return Io.resolve(null).then(e).catch(Nf)}:Gs;function Nf(e){setTimeout(function(){throw e})}function Ys(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),or(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);or(t)}function Gt(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 Oo(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 Ln=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Ln,xr="__reactProps$"+Ln,Tt="__reactContainer$"+Ln,Js="__reactEvents$"+Ln,Cf="__reactListeners$"+Ln,Ef="__reactHandles$"+Ln;function un(e){var t=e[Nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Tt]||n[Nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Oo(e);e!==null;){if(n=e[Nt])return n;e=Oo(e)}return t}e=n,n=e.parentNode}return null}function wr(e){return e=e[Nt]||e[Tt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Tn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function fl(e){return e[xr]||null}var Xs=[],zn=-1;function Yt(e){return{current:e}}function ge(e){0>zn||(e.current=Xs[zn],Xs[zn]=null,zn--)}function me(e,t){zn++,Xs[zn]=e.current,e.current=t}var Jt={},$e=Yt(Jt),Ke=Yt(!1),cn=Jt;function Mn(e,t){var n=e.type.contextTypes;if(!n)return Jt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},a;for(a in n)s[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ge(e){return e=e.childContextTypes,e!=null}function pl(){ge(Ke),ge($e)}function Do(e,t,n){if($e.current!==Jt)throw Error(o(168));me($e,t),me(Ke,n)}function $o(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(o(108,he(e)||"Unknown",s));return Q({},n,r)}function hl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Jt,cn=$e.current,me($e,e),me(Ke,Ke.current),!0}function Fo(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=$o(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,ge(Ke),ge($e),me($e,e)):ge(Ke),me(Ke,n)}var zt=null,ml=!1,qs=!1;function Uo(e){zt===null?zt=[e]:zt.push(e)}function Rf(e){ml=!0,Uo(e)}function Xt(){if(!qs&&zt!==null){qs=!0;var e=0,t=de;try{var n=zt;for(de=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zt=null,ml=!1}catch(s){throw zt!==null&&(zt=zt.slice(e+1)),Ba(xs,Xt),s}finally{de=t,qs=!1}}return null}var An=[],In=0,vl=null,gl=0,it=[],at=0,dn=null,Mt=1,At="";function fn(e,t){An[In++]=gl,An[In++]=vl,vl=e,gl=t}function Bo(e,t,n){it[at++]=Mt,it[at++]=At,it[at++]=dn,dn=e;var r=Mt;e=At;var s=32-ht(r)-1;r&=~(1<<s),n+=1;var a=32-ht(t)+s;if(30<a){var c=s-s%5;a=(r&(1<<c)-1).toString(32),r>>=c,s-=c,Mt=1<<32-ht(t)+s|n<<s|r,At=a+e}else Mt=1<<a|n<<s|r,At=e}function bs(e){e.return!==null&&(fn(e,1),Bo(e,1,0))}function Zs(e){for(;e===vl;)vl=An[--In],An[In]=null,gl=An[--In],An[In]=null;for(;e===dn;)dn=it[--at],it[at]=null,At=it[--at],it[at]=null,Mt=it[--at],it[at]=null}var tt=null,nt=null,xe=!1,vt=null;function Wo(e,t){var n=dt(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 Ho(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,tt=e,nt=Gt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tt=e,nt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dn!==null?{id:Mt,overflow:At}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tt=e,nt=null,!0):!1;default:return!1}}function ei(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ti(e){if(xe){var t=nt;if(t){var n=t;if(!Ho(e,t)){if(ei(e))throw Error(o(418));t=Gt(n.nextSibling);var r=tt;t&&Ho(e,t)?Wo(r,n):(e.flags=e.flags&-4097|2,xe=!1,tt=e)}}else{if(ei(e))throw Error(o(418));e.flags=e.flags&-4097|2,xe=!1,tt=e}}}function Vo(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tt=e}function yl(e){if(e!==tt)return!1;if(!xe)return Vo(e),xe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ks(e.type,e.memoizedProps)),t&&(t=nt)){if(ei(e))throw Qo(),Error(o(418));for(;t;)Wo(e,t),t=Gt(t.nextSibling)}if(Vo(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){nt=Gt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}nt=null}}else nt=tt?Gt(e.stateNode.nextSibling):null;return!0}function Qo(){for(var e=nt;e;)e=Gt(e.nextSibling)}function On(){nt=tt=null,xe=!1}function ni(e){vt===null?vt=[e]:vt.push(e)}var Pf=ee.ReactCurrentBatchConfig;function jr(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(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var s=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(c){var h=s.refs;c===null?delete h[a]:h[a]=c},t._stringRef=a,t)}if(typeof e!="string")throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function xl(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ko(e){var t=e._init;return t(e._payload)}function Go(e){function t(S,x){if(e){var N=S.deletions;N===null?(S.deletions=[x],S.flags|=16):N.push(x)}}function n(S,x){if(!e)return null;for(;x!==null;)t(S,x),x=x.sibling;return null}function r(S,x){for(S=new Map;x!==null;)x.key!==null?S.set(x.key,x):S.set(x.index,x),x=x.sibling;return S}function s(S,x){return S=ln(S,x),S.index=0,S.sibling=null,S}function a(S,x,N){return S.index=N,e?(N=S.alternate,N!==null?(N=N.index,N<x?(S.flags|=2,x):N):(S.flags|=2,x)):(S.flags|=1048576,x)}function c(S){return e&&S.alternate===null&&(S.flags|=2),S}function h(S,x,N,$){return x===null||x.tag!==6?(x=Gi(N,S.mode,$),x.return=S,x):(x=s(x,N),x.return=S,x)}function g(S,x,N,$){var J=N.type;return J===te?I(S,x,N.props.children,$,N.key):x!==null&&(x.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Qe&&Ko(J)===x.type)?($=s(x,N.props),$.ref=jr(S,x,N),$.return=S,$):($=Hl(N.type,N.key,N.props,null,S.mode,$),$.ref=jr(S,x,N),$.return=S,$)}function E(S,x,N,$){return x===null||x.tag!==4||x.stateNode.containerInfo!==N.containerInfo||x.stateNode.implementation!==N.implementation?(x=Yi(N,S.mode,$),x.return=S,x):(x=s(x,N.children||[]),x.return=S,x)}function I(S,x,N,$,J){return x===null||x.tag!==7?(x=wn(N,S.mode,$,J),x.return=S,x):(x=s(x,N),x.return=S,x)}function O(S,x,N){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Gi(""+x,S.mode,N),x.return=S,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case U:return N=Hl(x.type,x.key,x.props,null,S.mode,N),N.ref=jr(S,null,x),N.return=S,N;case Y:return x=Yi(x,S.mode,N),x.return=S,x;case Qe:var $=x._init;return O(S,$(x._payload),N)}if(Xn(x)||b(x))return x=wn(x,S.mode,N,null),x.return=S,x;xl(S,x)}return null}function z(S,x,N,$){var J=x!==null?x.key:null;if(typeof N=="string"&&N!==""||typeof N=="number")return J!==null?null:h(S,x,""+N,$);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case U:return N.key===J?g(S,x,N,$):null;case Y:return N.key===J?E(S,x,N,$):null;case Qe:return J=N._init,z(S,x,J(N._payload),$)}if(Xn(N)||b(N))return J!==null?null:I(S,x,N,$,null);xl(S,N)}return null}function W(S,x,N,$,J){if(typeof $=="string"&&$!==""||typeof $=="number")return S=S.get(N)||null,h(x,S,""+$,J);if(typeof $=="object"&&$!==null){switch($.$$typeof){case U:return S=S.get($.key===null?N:$.key)||null,g(x,S,$,J);case Y:return S=S.get($.key===null?N:$.key)||null,E(x,S,$,J);case Qe:var X=$._init;return W(S,x,N,X($._payload),J)}if(Xn($)||b($))return S=S.get(N)||null,I(x,S,$,J,null);xl(x,$)}return null}function K(S,x,N,$){for(var J=null,X=null,q=x,Z=x=0,Ie=null;q!==null&&Z<N.length;Z++){q.index>Z?(Ie=q,q=null):Ie=q.sibling;var oe=z(S,q,N[Z],$);if(oe===null){q===null&&(q=Ie);break}e&&q&&oe.alternate===null&&t(S,q),x=a(oe,x,Z),X===null?J=oe:X.sibling=oe,X=oe,q=Ie}if(Z===N.length)return n(S,q),xe&&fn(S,Z),J;if(q===null){for(;Z<N.length;Z++)q=O(S,N[Z],$),q!==null&&(x=a(q,x,Z),X===null?J=q:X.sibling=q,X=q);return xe&&fn(S,Z),J}for(q=r(S,q);Z<N.length;Z++)Ie=W(q,S,Z,N[Z],$),Ie!==null&&(e&&Ie.alternate!==null&&q.delete(Ie.key===null?Z:Ie.key),x=a(Ie,x,Z),X===null?J=Ie:X.sibling=Ie,X=Ie);return e&&q.forEach(function(sn){return t(S,sn)}),xe&&fn(S,Z),J}function G(S,x,N,$){var J=b(N);if(typeof J!="function")throw Error(o(150));if(N=J.call(N),N==null)throw Error(o(151));for(var X=J=null,q=x,Z=x=0,Ie=null,oe=N.next();q!==null&&!oe.done;Z++,oe=N.next()){q.index>Z?(Ie=q,q=null):Ie=q.sibling;var sn=z(S,q,oe.value,$);if(sn===null){q===null&&(q=Ie);break}e&&q&&sn.alternate===null&&t(S,q),x=a(sn,x,Z),X===null?J=sn:X.sibling=sn,X=sn,q=Ie}if(oe.done)return n(S,q),xe&&fn(S,Z),J;if(q===null){for(;!oe.done;Z++,oe=N.next())oe=O(S,oe.value,$),oe!==null&&(x=a(oe,x,Z),X===null?J=oe:X.sibling=oe,X=oe);return xe&&fn(S,Z),J}for(q=r(S,q);!oe.done;Z++,oe=N.next())oe=W(q,S,Z,oe.value,$),oe!==null&&(e&&oe.alternate!==null&&q.delete(oe.key===null?Z:oe.key),x=a(oe,x,Z),X===null?J=oe:X.sibling=oe,X=oe);return e&&q.forEach(function(op){return t(S,op)}),xe&&fn(S,Z),J}function Re(S,x,N,$){if(typeof N=="object"&&N!==null&&N.type===te&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case U:e:{for(var J=N.key,X=x;X!==null;){if(X.key===J){if(J=N.type,J===te){if(X.tag===7){n(S,X.sibling),x=s(X,N.props.children),x.return=S,S=x;break e}}else if(X.elementType===J||typeof J=="object"&&J!==null&&J.$$typeof===Qe&&Ko(J)===X.type){n(S,X.sibling),x=s(X,N.props),x.ref=jr(S,X,N),x.return=S,S=x;break e}n(S,X);break}else t(S,X);X=X.sibling}N.type===te?(x=wn(N.props.children,S.mode,$,N.key),x.return=S,S=x):($=Hl(N.type,N.key,N.props,null,S.mode,$),$.ref=jr(S,x,N),$.return=S,S=$)}return c(S);case Y:e:{for(X=N.key;x!==null;){if(x.key===X)if(x.tag===4&&x.stateNode.containerInfo===N.containerInfo&&x.stateNode.implementation===N.implementation){n(S,x.sibling),x=s(x,N.children||[]),x.return=S,S=x;break e}else{n(S,x);break}else t(S,x);x=x.sibling}x=Yi(N,S.mode,$),x.return=S,S=x}return c(S);case Qe:return X=N._init,Re(S,x,X(N._payload),$)}if(Xn(N))return K(S,x,N,$);if(b(N))return G(S,x,N,$);xl(S,N)}return typeof N=="string"&&N!==""||typeof N=="number"?(N=""+N,x!==null&&x.tag===6?(n(S,x.sibling),x=s(x,N),x.return=S,S=x):(n(S,x),x=Gi(N,S.mode,$),x.return=S,S=x),c(S)):n(S,x)}return Re}var Dn=Go(!0),Yo=Go(!1),wl=Yt(null),jl=null,$n=null,ri=null;function li(){ri=$n=jl=null}function si(e){var t=wl.current;ge(wl),e._currentValue=t}function ii(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fn(e,t){jl=e,ri=$n=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ye=!0),e.firstContext=null)}function ot(e){var t=e._currentValue;if(ri!==e)if(e={context:e,memoizedValue:t,next:null},$n===null){if(jl===null)throw Error(o(308));$n=e,jl.dependencies={lanes:0,firstContext:e}}else $n=$n.next=e;return t}var pn=null;function ai(e){pn===null?pn=[e]:pn.push(e)}function Jo(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ai(t)):(n.next=s.next,s.next=n),t.interleaved=n,It(e,r)}function It(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 qt=!1;function oi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xo(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 Ot(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(se&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,It(e,n)}return s=r.interleaved,s===null?(t.next=t,ai(r)):(t.next=s.next,s.next=t),r.interleaved=t,It(e,n)}function kl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ks(e,n)}}function qo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var c={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?s=a=c:a=a.next=c,n=n.next}while(n!==null);a===null?s=a=t:a=a.next=t}else s=a=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Sl(e,t,n,r){var s=e.updateQueue;qt=!1;var a=s.firstBaseUpdate,c=s.lastBaseUpdate,h=s.shared.pending;if(h!==null){s.shared.pending=null;var g=h,E=g.next;g.next=null,c===null?a=E:c.next=E,c=g;var I=e.alternate;I!==null&&(I=I.updateQueue,h=I.lastBaseUpdate,h!==c&&(h===null?I.firstBaseUpdate=E:h.next=E,I.lastBaseUpdate=g))}if(a!==null){var O=s.baseState;c=0,I=E=g=null,h=a;do{var z=h.lane,W=h.eventTime;if((r&z)===z){I!==null&&(I=I.next={eventTime:W,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});e:{var K=e,G=h;switch(z=t,W=n,G.tag){case 1:if(K=G.payload,typeof K=="function"){O=K.call(W,O,z);break e}O=K;break e;case 3:K.flags=K.flags&-65537|128;case 0:if(K=G.payload,z=typeof K=="function"?K.call(W,O,z):K,z==null)break e;O=Q({},O,z);break e;case 2:qt=!0}}h.callback!==null&&h.lane!==0&&(e.flags|=64,z=s.effects,z===null?s.effects=[h]:z.push(h))}else W={eventTime:W,lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},I===null?(E=I=W,g=O):I=I.next=W,c|=z;if(h=h.next,h===null){if(h=s.shared.pending,h===null)break;z=h,h=z.next,z.next=null,s.lastBaseUpdate=z,s.shared.pending=null}}while(!0);if(I===null&&(g=O),s.baseState=g,s.firstBaseUpdate=E,s.lastBaseUpdate=I,t=s.shared.interleaved,t!==null){s=t;do c|=s.lane,s=s.next;while(s!==t)}else a===null&&(s.shared.lanes=0);vn|=c,e.lanes=c,e.memoizedState=O}}function bo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(o(191,s));s.call(r)}}}var kr={},Ct=Yt(kr),Sr=Yt(kr),_r=Yt(kr);function hn(e){if(e===kr)throw Error(o(174));return e}function ui(e,t){switch(me(_r,t),me(Sr,e),me(Ct,kr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:cs(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=cs(t,e)}ge(Ct),me(Ct,t)}function Un(){ge(Ct),ge(Sr),ge(_r)}function Zo(e){hn(_r.current);var t=hn(Ct.current),n=cs(t,e.type);t!==n&&(me(Sr,e),me(Ct,n))}function ci(e){Sr.current===e&&(ge(Ct),ge(Sr))}var je=Yt(0);function _l(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 di=[];function fi(){for(var e=0;e<di.length;e++)di[e]._workInProgressVersionPrimary=null;di.length=0}var Nl=ee.ReactCurrentDispatcher,pi=ee.ReactCurrentBatchConfig,mn=0,ke=null,Te=null,Me=null,Cl=!1,Nr=!1,Cr=0,Lf=0;function Fe(){throw Error(o(321))}function hi(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mt(e[n],t[n]))return!1;return!0}function mi(e,t,n,r,s,a){if(mn=a,ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nl.current=e===null||e.memoizedState===null?Af:If,e=n(r,s),Nr){a=0;do{if(Nr=!1,Cr=0,25<=a)throw Error(o(301));a+=1,Me=Te=null,t.updateQueue=null,Nl.current=Of,e=n(r,s)}while(Nr)}if(Nl.current=Pl,t=Te!==null&&Te.next!==null,mn=0,Me=Te=ke=null,Cl=!1,t)throw Error(o(300));return e}function vi(){var e=Cr!==0;return Cr=0,e}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Me===null?ke.memoizedState=Me=e:Me=Me.next=e,Me}function ut(){if(Te===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Me===null?ke.memoizedState:Me.next;if(t!==null)Me=t,Te=e;else{if(e===null)throw Error(o(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Me===null?ke.memoizedState=Me=e:Me=Me.next=e}return Me}function Er(e,t){return typeof t=="function"?t(e):t}function gi(e){var t=ut(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=Te,s=r.baseQueue,a=n.pending;if(a!==null){if(s!==null){var c=s.next;s.next=a.next,a.next=c}r.baseQueue=s=a,n.pending=null}if(s!==null){a=s.next,r=r.baseState;var h=c=null,g=null,E=a;do{var I=E.lane;if((mn&I)===I)g!==null&&(g=g.next={lane:0,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),r=E.hasEagerState?E.eagerState:e(r,E.action);else{var O={lane:I,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null};g===null?(h=g=O,c=r):g=g.next=O,ke.lanes|=I,vn|=I}E=E.next}while(E!==null&&E!==a);g===null?c=r:g.next=h,mt(r,t.memoizedState)||(Ye=!0),t.memoizedState=r,t.baseState=c,t.baseQueue=g,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do a=s.lane,ke.lanes|=a,vn|=a,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function yi(e){var t=ut(),n=t.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,a=t.memoizedState;if(s!==null){n.pending=null;var c=s=s.next;do a=e(a,c.action),c=c.next;while(c!==s);mt(a,t.memoizedState)||(Ye=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function eu(){}function tu(e,t){var n=ke,r=ut(),s=t(),a=!mt(r.memoizedState,s);if(a&&(r.memoizedState=s,Ye=!0),r=r.queue,xi(lu.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Me!==null&&Me.memoizedState.tag&1){if(n.flags|=2048,Rr(9,ru.bind(null,n,r,s,t),void 0,null),Ae===null)throw Error(o(349));(mn&30)!==0||nu(n,t,s)}return s}function nu(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ru(e,t,n,r){t.value=n,t.getSnapshot=r,su(t)&&iu(e)}function lu(e,t,n){return n(function(){su(t)&&iu(e)})}function su(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mt(e,n)}catch{return!0}}function iu(e){var t=It(e,1);t!==null&&wt(t,e,1,-1)}function au(e){var t=Et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:e},t.queue=e,e=e.dispatch=Mf.bind(null,ke,e),[t.memoizedState,e]}function Rr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ke.updateQueue,t===null?(t={lastEffect:null,stores:null},ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ou(){return ut().memoizedState}function El(e,t,n,r){var s=Et();ke.flags|=e,s.memoizedState=Rr(1|t,n,void 0,r===void 0?null:r)}function Rl(e,t,n,r){var s=ut();r=r===void 0?null:r;var a=void 0;if(Te!==null){var c=Te.memoizedState;if(a=c.destroy,r!==null&&hi(r,c.deps)){s.memoizedState=Rr(t,n,a,r);return}}ke.flags|=e,s.memoizedState=Rr(1|t,n,a,r)}function uu(e,t){return El(8390656,8,e,t)}function xi(e,t){return Rl(2048,8,e,t)}function cu(e,t){return Rl(4,2,e,t)}function du(e,t){return Rl(4,4,e,t)}function fu(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 pu(e,t,n){return n=n!=null?n.concat([e]):null,Rl(4,4,fu.bind(null,t,e),n)}function wi(){}function hu(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function mu(e,t){var n=ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&hi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vu(e,t,n){return(mn&21)===0?(e.baseState&&(e.baseState=!1,Ye=!0),e.memoizedState=n):(mt(n,t)||(n=Qa(),ke.lanes|=n,vn|=n,e.baseState=!0),t)}function Tf(e,t){var n=de;de=n!==0&&4>n?n:4,e(!0);var r=pi.transition;pi.transition={};try{e(!1),t()}finally{de=n,pi.transition=r}}function gu(){return ut().memoizedState}function zf(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yu(e))xu(t,n);else if(n=Jo(e,t,n,r),n!==null){var s=Ve();wt(n,e,r,s),wu(n,t,r)}}function Mf(e,t,n){var r=nn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yu(e))xu(t,s);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var c=t.lastRenderedState,h=a(c,n);if(s.hasEagerState=!0,s.eagerState=h,mt(h,c)){var g=t.interleaved;g===null?(s.next=s,ai(t)):(s.next=g.next,g.next=s),t.interleaved=s;return}}catch{}finally{}n=Jo(e,t,s,r),n!==null&&(s=Ve(),wt(n,e,r,s),wu(n,t,r))}}function yu(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function xu(e,t){Nr=Cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wu(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ks(e,n)}}var Pl={readContext:ot,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},Af={readContext:ot,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:uu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,El(4194308,4,fu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return El(4194308,4,e,t)},useInsertionEffect:function(e,t){return El(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=zf.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:au,useDebugValue:wi,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=au(!1),t=e[0];return e=Tf.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,s=Et();if(xe){if(n===void 0)throw Error(o(407));n=n()}else{if(n=t(),Ae===null)throw Error(o(349));(mn&30)!==0||nu(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,uu(lu.bind(null,r,a,e),[e]),r.flags|=2048,Rr(9,ru.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Et(),t=Ae.identifierPrefix;if(xe){var n=At,r=Mt;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Cr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Lf++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},If={readContext:ot,useCallback:hu,useContext:ot,useEffect:xi,useImperativeHandle:pu,useInsertionEffect:cu,useLayoutEffect:du,useMemo:mu,useReducer:gi,useRef:ou,useState:function(){return gi(Er)},useDebugValue:wi,useDeferredValue:function(e){var t=ut();return vu(t,Te.memoizedState,e)},useTransition:function(){var e=gi(Er)[0],t=ut().memoizedState;return[e,t]},useMutableSource:eu,useSyncExternalStore:tu,useId:gu,unstable_isNewReconciler:!1},Of={readContext:ot,useCallback:hu,useContext:ot,useEffect:xi,useImperativeHandle:pu,useInsertionEffect:cu,useLayoutEffect:du,useMemo:mu,useReducer:yi,useRef:ou,useState:function(){return yi(Er)},useDebugValue:wi,useDeferredValue:function(e){var t=ut();return Te===null?t.memoizedState=e:vu(t,Te.memoizedState,e)},useTransition:function(){var e=yi(Er)[0],t=ut().memoizedState;return[e,t]},useMutableSource:eu,useSyncExternalStore:tu,useId:gu,unstable_isNewReconciler:!1};function gt(e,t){if(e&&e.defaultProps){t=Q({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ji(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Q({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ll={isMounted:function(e){return(e=e._reactInternals)?on(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ve(),s=nn(e),a=Ot(r,s);a.payload=t,n!=null&&(a.callback=n),t=bt(e,a,s),t!==null&&(wt(t,e,s,r),kl(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ve(),s=nn(e),a=Ot(r,s);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=bt(e,a,s),t!==null&&(wt(t,e,s,r),kl(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ve(),r=nn(e),s=Ot(n,r);s.tag=2,t!=null&&(s.callback=t),t=bt(e,s,r),t!==null&&(wt(t,e,r,n),kl(t,e,r))}};function ju(e,t,n,r,s,a,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,c):t.prototype&&t.prototype.isPureReactComponent?!hr(n,r)||!hr(s,a):!0}function ku(e,t,n){var r=!1,s=Jt,a=t.contextType;return typeof a=="object"&&a!==null?a=ot(a):(s=Ge(t)?cn:$e.current,r=t.contextTypes,a=(r=r!=null)?Mn(e,s):Jt),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ll,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=a),t}function Su(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ll.enqueueReplaceState(t,t.state,null)}function ki(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},oi(e);var a=t.contextType;typeof a=="object"&&a!==null?s.context=ot(a):(a=Ge(t)?cn:$e.current,s.context=Mn(e,a)),s.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(ji(e,t,a,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Ll.enqueueReplaceState(s,s.state,null),Sl(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Bn(e,t){try{var n="",r=t;do n+=ie(r),r=r.return;while(r);var s=n}catch(a){s=`
Error generating stack: `+a.message+`
`+a.stack}return{value:e,source:t,stack:s,digest:null}}function Si(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _i(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Df=typeof WeakMap=="function"?WeakMap:Map;function _u(e,t,n){n=Ot(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Dl||(Dl=!0,Fi=r),_i(e,t)},n}function Nu(e,t,n){n=Ot(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){_i(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){_i(e,t),typeof r!="function"&&(en===null?en=new Set([this]):en.add(this));var c=t.stack;this.componentDidCatch(t.value,{componentStack:c!==null?c:""})}),n}function Cu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Df;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=qf.bind(null,e,t,n),t.then(e,e))}function Eu(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 Ru(e,t,n,r,s){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=Ot(-1,1),t.tag=2,bt(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=s,e)}var $f=ee.ReactCurrentOwner,Ye=!1;function He(e,t,n,r){t.child=e===null?Yo(t,null,n,r):Dn(t,e.child,n,r)}function Pu(e,t,n,r,s){n=n.render;var a=t.ref;return Fn(t,s),r=mi(e,t,n,r,a,s),n=vi(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(xe&&n&&bs(t),t.flags|=1,He(e,t,r,s),t.child)}function Lu(e,t,n,r,s){if(e===null){var a=n.type;return typeof a=="function"&&!Ki(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Tu(e,t,a,r,s)):(e=Hl(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&s)===0){var c=a.memoizedProps;if(n=n.compare,n=n!==null?n:hr,n(c,r)&&e.ref===t.ref)return Dt(e,t,s)}return t.flags|=1,e=ln(a,r),e.ref=t.ref,e.return=t,t.child=e}function Tu(e,t,n,r,s){if(e!==null){var a=e.memoizedProps;if(hr(a,r)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=r=a,(e.lanes&s)!==0)(e.flags&131072)!==0&&(Ye=!0);else return t.lanes=e.lanes,Dt(e,t,s)}return Ni(e,t,n,r,s)}function zu(e,t,n){var r=t.pendingProps,s=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},me(Hn,rt),rt|=n;else{if((n&1073741824)===0)return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,me(Hn,rt),rt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,me(Hn,rt),rt|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,me(Hn,rt),rt|=r;return He(e,t,s,n),t.child}function Mu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ni(e,t,n,r,s){var a=Ge(n)?cn:$e.current;return a=Mn(t,a),Fn(t,s),n=mi(e,t,n,r,a,s),r=vi(),e!==null&&!Ye?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Dt(e,t,s)):(xe&&r&&bs(t),t.flags|=1,He(e,t,n,s),t.child)}function Au(e,t,n,r,s){if(Ge(n)){var a=!0;hl(t)}else a=!1;if(Fn(t,s),t.stateNode===null)zl(e,t),ku(t,n,r),ki(t,n,r,s),r=!0;else if(e===null){var c=t.stateNode,h=t.memoizedProps;c.props=h;var g=c.context,E=n.contextType;typeof E=="object"&&E!==null?E=ot(E):(E=Ge(n)?cn:$e.current,E=Mn(t,E));var I=n.getDerivedStateFromProps,O=typeof I=="function"||typeof c.getSnapshotBeforeUpdate=="function";O||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==r||g!==E)&&Su(t,c,r,E),qt=!1;var z=t.memoizedState;c.state=z,Sl(t,r,c,s),g=t.memoizedState,h!==r||z!==g||Ke.current||qt?(typeof I=="function"&&(ji(t,n,I,r),g=t.memoizedState),(h=qt||ju(t,n,h,r,z,g,E))?(O||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=g),c.props=r,c.state=g,c.context=E,r=h):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{c=t.stateNode,Xo(e,t),h=t.memoizedProps,E=t.type===t.elementType?h:gt(t.type,h),c.props=E,O=t.pendingProps,z=c.context,g=n.contextType,typeof g=="object"&&g!==null?g=ot(g):(g=Ge(n)?cn:$e.current,g=Mn(t,g));var W=n.getDerivedStateFromProps;(I=typeof W=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==O||z!==g)&&Su(t,c,r,g),qt=!1,z=t.memoizedState,c.state=z,Sl(t,r,c,s);var K=t.memoizedState;h!==O||z!==K||Ke.current||qt?(typeof W=="function"&&(ji(t,n,W,r),K=t.memoizedState),(E=qt||ju(t,n,E,r,z,K,g)||!1)?(I||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(r,K,g),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(r,K,g)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=K),c.props=r,c.state=K,c.context=g,r=E):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),r=!1)}return Ci(e,t,n,r,a,s)}function Ci(e,t,n,r,s,a){Mu(e,t);var c=(t.flags&128)!==0;if(!r&&!c)return s&&Fo(t,n,!1),Dt(e,t,a);r=t.stateNode,$f.current=t;var h=c&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&c?(t.child=Dn(t,e.child,null,a),t.child=Dn(t,null,h,a)):He(e,t,h,a),t.memoizedState=r.state,s&&Fo(t,n,!0),t.child}function Iu(e){var t=e.stateNode;t.pendingContext?Do(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(e,t.context,!1),ui(e,t.containerInfo)}function Ou(e,t,n,r,s){return On(),ni(s),t.flags|=256,He(e,t,n,r),t.child}var Ei={dehydrated:null,treeContext:null,retryLane:0};function Ri(e){return{baseLanes:e,cachePool:null,transitions:null}}function Du(e,t,n){var r=t.pendingProps,s=je.current,a=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(s&2)!==0),h?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),me(je,s&1),e===null)return ti(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):(c=r.children,e=r.fallback,a?(r=t.mode,a=t.child,c={mode:"hidden",children:c},(r&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=c):a=Vl(c,r,0,null),e=wn(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ri(n),t.memoizedState=Ei,e):Pi(t,c));if(s=e.memoizedState,s!==null&&(h=s.dehydrated,h!==null))return Ff(e,t,c,r,h,s,n);if(a){a=r.fallback,c=t.mode,s=e.child,h=s.sibling;var g={mode:"hidden",children:r.children};return(c&1)===0&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=g,t.deletions=null):(r=ln(s,g),r.subtreeFlags=s.subtreeFlags&14680064),h!==null?a=ln(h,a):(a=wn(a,c,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,c=e.child.memoizedState,c=c===null?Ri(n):{baseLanes:c.baseLanes|n,cachePool:null,transitions:c.transitions},a.memoizedState=c,a.childLanes=e.childLanes&~n,t.memoizedState=Ei,r}return a=e.child,e=a.sibling,r=ln(a,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Pi(e,t){return t=Vl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Tl(e,t,n,r){return r!==null&&ni(r),Dn(t,e.child,null,n),e=Pi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ff(e,t,n,r,s,a,c){if(n)return t.flags&256?(t.flags&=-257,r=Si(Error(o(422))),Tl(e,t,c,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,s=t.mode,r=Vl({mode:"visible",children:r.children},s,0,null),a=wn(a,s,c,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,(t.mode&1)!==0&&Dn(t,e.child,null,c),t.child.memoizedState=Ri(c),t.memoizedState=Ei,a);if((t.mode&1)===0)return Tl(e,t,c,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var h=r.dgst;return r=h,a=Error(o(419)),r=Si(a,r,void 0),Tl(e,t,c,r)}if(h=(c&e.childLanes)!==0,Ye||h){if(r=Ae,r!==null){switch(c&-c){case 4:s=2;break;case 16:s=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:s=32;break;case 536870912:s=268435456;break;default:s=0}s=(s&(r.suspendedLanes|c))!==0?0:s,s!==0&&s!==a.retryLane&&(a.retryLane=s,It(e,s),wt(r,e,s,-1))}return Qi(),r=Si(Error(o(421))),Tl(e,t,c,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=bf.bind(null,e),s._reactRetry=t,null):(e=a.treeContext,nt=Gt(s.nextSibling),tt=t,xe=!0,vt=null,e!==null&&(it[at++]=Mt,it[at++]=At,it[at++]=dn,Mt=e.id,At=e.overflow,dn=t),t=Pi(t,r.children),t.flags|=4096,t)}function $u(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ii(e.return,t,n)}function Li(e,t,n,r,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=s)}function Fu(e,t,n){var r=t.pendingProps,s=r.revealOrder,a=r.tail;if(He(e,t,r.children,n),r=je.current,(r&2)!==0)r=r&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&&$u(e,n,t);else if(e.tag===19)$u(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}r&=1}if(me(je,r),(t.mode&1)===0)t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&_l(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Li(t,!1,s,n,a);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&_l(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Li(t,!0,n,null,a);break;case"together":Li(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Dt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,n=ln(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ln(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Uf(e,t,n){switch(t.tag){case 3:Iu(t),On();break;case 5:Zo(t);break;case 1:Ge(t.type)&&hl(t);break;case 4:ui(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;me(wl,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(me(je,je.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Du(e,t,n):(me(je,je.current&1),e=Dt(e,t,n),e!==null?e.sibling:null);me(je,je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Fu(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),me(je,je.current),r)break;return null;case 22:case 23:return t.lanes=0,zu(e,t,n)}return Dt(e,t,n)}var Uu,Ti,Bu,Wu;Uu=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}},Ti=function(){},Bu=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,hn(Ct.current);var a=null;switch(n){case"input":s=is(e,s),r=is(e,r),a=[];break;case"select":s=Q({},s,{value:void 0}),r=Q({},r,{value:void 0}),a=[];break;case"textarea":s=us(e,s),r=us(e,r),a=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=dl)}ds(n,r);var c;n=null;for(E in s)if(!r.hasOwnProperty(E)&&s.hasOwnProperty(E)&&s[E]!=null)if(E==="style"){var h=s[E];for(c in h)h.hasOwnProperty(c)&&(n||(n={}),n[c]="")}else E!=="dangerouslySetInnerHTML"&&E!=="children"&&E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&E!=="autoFocus"&&(d.hasOwnProperty(E)?a||(a=[]):(a=a||[]).push(E,null));for(E in r){var g=r[E];if(h=s!=null?s[E]:void 0,r.hasOwnProperty(E)&&g!==h&&(g!=null||h!=null))if(E==="style")if(h){for(c in h)!h.hasOwnProperty(c)||g&&g.hasOwnProperty(c)||(n||(n={}),n[c]="");for(c in g)g.hasOwnProperty(c)&&h[c]!==g[c]&&(n||(n={}),n[c]=g[c])}else n||(a||(a=[]),a.push(E,n)),n=g;else E==="dangerouslySetInnerHTML"?(g=g?g.__html:void 0,h=h?h.__html:void 0,g!=null&&h!==g&&(a=a||[]).push(E,g)):E==="children"?typeof g!="string"&&typeof g!="number"||(a=a||[]).push(E,""+g):E!=="suppressContentEditableWarning"&&E!=="suppressHydrationWarning"&&(d.hasOwnProperty(E)?(g!=null&&E==="onScroll"&&ve("scroll",e),a||h===g||(a=[])):(a=a||[]).push(E,g))}n&&(a=a||[]).push("style",n);var E=a;(t.updateQueue=E)&&(t.flags|=4)}},Wu=function(e,t,n,r){n!==r&&(t.flags|=4)};function Pr(e,t){if(!xe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bf(e,t,n){var r=t.pendingProps;switch(Zs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ge(t.type)&&pl(),Ue(t),null;case 3:return r=t.stateNode,Un(),ge(Ke),ge($e),fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(yl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vt!==null&&(Wi(vt),vt=null))),Ti(e,t),Ue(t),null;case 5:ci(t);var s=hn(_r.current);if(n=t.type,e!==null&&t.stateNode!=null)Bu(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(e=hn(Ct.current),yl(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Nt]=t,r[xr]=a,e=(t.mode&1)!==0,n){case"dialog":ve("cancel",r),ve("close",r);break;case"iframe":case"object":case"embed":ve("load",r);break;case"video":case"audio":for(s=0;s<vr.length;s++)ve(vr[s],r);break;case"source":ve("error",r);break;case"img":case"image":case"link":ve("error",r),ve("load",r);break;case"details":ve("toggle",r);break;case"input":ja(r,a),ve("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},ve("invalid",r);break;case"textarea":_a(r,a),ve("invalid",r)}ds(n,a),s=null;for(var c in a)if(a.hasOwnProperty(c)){var h=a[c];c==="children"?typeof h=="string"?r.textContent!==h&&(a.suppressHydrationWarning!==!0&&cl(r.textContent,h,e),s=["children",h]):typeof h=="number"&&r.textContent!==""+h&&(a.suppressHydrationWarning!==!0&&cl(r.textContent,h,e),s=["children",""+h]):d.hasOwnProperty(c)&&h!=null&&c==="onScroll"&&ve("scroll",r)}switch(n){case"input":Br(r),Sa(r,a,!0);break;case"textarea":Br(r),Ca(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=dl)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{c=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ea(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=c.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=c.createElement(n,{is:r.is}):(e=c.createElement(n),n==="select"&&(c=e,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):e=c.createElementNS(e,n),e[Nt]=t,e[xr]=r,Uu(e,t,!1,!1),t.stateNode=e;e:{switch(c=fs(n,r),n){case"dialog":ve("cancel",e),ve("close",e),s=r;break;case"iframe":case"object":case"embed":ve("load",e),s=r;break;case"video":case"audio":for(s=0;s<vr.length;s++)ve(vr[s],e);s=r;break;case"source":ve("error",e),s=r;break;case"img":case"image":case"link":ve("error",e),ve("load",e),s=r;break;case"details":ve("toggle",e),s=r;break;case"input":ja(e,r),s=is(e,r),ve("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=Q({},r,{value:void 0}),ve("invalid",e);break;case"textarea":_a(e,r),s=us(e,r),ve("invalid",e);break;default:s=r}ds(n,s),h=s;for(a in h)if(h.hasOwnProperty(a)){var g=h[a];a==="style"?La(e,g):a==="dangerouslySetInnerHTML"?(g=g?g.__html:void 0,g!=null&&Ra(e,g)):a==="children"?typeof g=="string"?(n!=="textarea"||g!=="")&&qn(e,g):typeof g=="number"&&qn(e,""+g):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(d.hasOwnProperty(a)?g!=null&&a==="onScroll"&&ve("scroll",e):g!=null&&F(e,a,g,c))}switch(n){case"input":Br(e),Sa(e,r,!1);break;case"textarea":Br(e),Ca(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ce(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?jn(e,!!r.multiple,a,!1):r.defaultValue!=null&&jn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=dl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)Wu(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(o(166));if(n=hn(_r.current),hn(Ct.current),yl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Nt]=t,(a=r.nodeValue!==n)&&(e=tt,e!==null))switch(e.tag){case 3:cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&cl(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Nt]=t,t.stateNode=r}return Ue(t),null;case 13:if(ge(je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(xe&&nt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Qo(),On(),t.flags|=98560,a=!1;else if(a=yl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[Nt]=t}else On(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),a=!1}else vt!==null&&(Wi(vt),vt=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(je.current&1)!==0?ze===0&&(ze=3):Qi())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return Un(),Ti(e,t),e===null&&gr(t.stateNode.containerInfo),Ue(t),null;case 10:return si(t.type._context),Ue(t),null;case 17:return Ge(t.type)&&pl(),Ue(t),null;case 19:if(ge(je),a=t.memoizedState,a===null)return Ue(t),null;if(r=(t.flags&128)!==0,c=a.rendering,c===null)if(r)Pr(a,!1);else{if(ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=_l(e),c!==null){for(t.flags|=128,Pr(a,!1),r=c.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,c=a.alternate,c===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=c.childLanes,a.lanes=c.lanes,a.child=c.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=c.memoizedProps,a.memoizedState=c.memoizedState,a.updateQueue=c.updateQueue,a.type=c.type,e=c.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return me(je,je.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ee()>Vn&&(t.flags|=128,r=!0,Pr(a,!1),t.lanes=4194304)}else{if(!r)if(e=_l(c),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Pr(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!xe)return Ue(t),null}else 2*Ee()-a.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,Pr(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(n=a.last,n!==null?n.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ee(),t.sibling=null,n=je.current,me(je,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Vi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(rt&1073741824)!==0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(o(156,t.tag))}function Wf(e,t){switch(Zs(t),t.tag){case 1:return Ge(t.type)&&pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(),ge(Ke),ge($e),fi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ci(t),null;case 13:if(ge(je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));On()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(je),null;case 4:return Un(),null;case 10:return si(t.type._context),null;case 22:case 23:return Vi(),null;case 24:return null;default:return null}}var Ml=!1,Be=!1,Hf=typeof WeakSet=="function"?WeakSet:Set,V=null;function Wn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){_e(e,t,r)}else n.current=null}function zi(e,t,n){try{n()}catch(r){_e(e,t,r)}}var Hu=!1;function Vf(e,t){if(Vs=Zr,e=jo(),Os(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var c=0,h=-1,g=-1,E=0,I=0,O=e,z=null;t:for(;;){for(var W;O!==n||s!==0&&O.nodeType!==3||(h=c+s),O!==a||r!==0&&O.nodeType!==3||(g=c+r),O.nodeType===3&&(c+=O.nodeValue.length),(W=O.firstChild)!==null;)z=O,O=W;for(;;){if(O===e)break t;if(z===n&&++E===s&&(h=c),z===a&&++I===r&&(g=c),(W=O.nextSibling)!==null)break;O=z,z=O.parentNode}O=W}n=h===-1||g===-1?null:{start:h,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qs={focusedElem:e,selectionRange:n},Zr=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var K=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(K!==null){var G=K.memoizedProps,Re=K.memoizedState,S=t.stateNode,x=S.getSnapshotBeforeUpdate(t.elementType===t.type?G:gt(t.type,G),Re);S.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var N=t.stateNode.containerInfo;N.nodeType===1?N.textContent="":N.nodeType===9&&N.documentElement&&N.removeChild(N.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch($){_e(t,t.return,$)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return K=Hu,Hu=!1,K}function Lr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var a=s.destroy;s.destroy=void 0,a!==void 0&&zi(t,n,a)}s=s.next}while(s!==r)}}function Al(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 r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Mi(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 Vu(e){var t=e.alternate;t!==null&&(e.alternate=null,Vu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[xr],delete t[Js],delete t[Cf],delete t[Ef])),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 Qu(e){return e.tag===5||e.tag===3||e.tag===4}function Ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qu(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 Ai(e,t,n){var r=e.tag;if(r===5||r===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=dl));else if(r!==4&&(e=e.child,e!==null))for(Ai(e,t,n),e=e.sibling;e!==null;)Ai(e,t,n),e=e.sibling}function Ii(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ii(e,t,n),e=e.sibling;e!==null;)Ii(e,t,n),e=e.sibling}var Oe=null,yt=!1;function Zt(e,t,n){for(n=n.child;n!==null;)Gu(e,t,n),n=n.sibling}function Gu(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Gr,n)}catch{}switch(n.tag){case 5:Be||Wn(n,t);case 6:var r=Oe,s=yt;Oe=null,Zt(e,t,n),Oe=r,yt=s,Oe!==null&&(yt?(e=Oe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Oe.removeChild(n.stateNode));break;case 18:Oe!==null&&(yt?(e=Oe,n=n.stateNode,e.nodeType===8?Ys(e.parentNode,n):e.nodeType===1&&Ys(e,n),or(e)):Ys(Oe,n.stateNode));break;case 4:r=Oe,s=yt,Oe=n.stateNode.containerInfo,yt=!0,Zt(e,t,n),Oe=r,yt=s;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var a=s,c=a.destroy;a=a.tag,c!==void 0&&((a&2)!==0||(a&4)!==0)&&zi(n,t,c),s=s.next}while(s!==r)}Zt(e,t,n);break;case 1:if(!Be&&(Wn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(h){_e(n,t,h)}Zt(e,t,n);break;case 21:Zt(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,Zt(e,t,n),Be=r):Zt(e,t,n);break;default:Zt(e,t,n)}}function Yu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Hf),t.forEach(function(r){var s=Zf.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function xt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var a=e,c=t,h=c;e:for(;h!==null;){switch(h.tag){case 5:Oe=h.stateNode,yt=!1;break e;case 3:Oe=h.stateNode.containerInfo,yt=!0;break e;case 4:Oe=h.stateNode.containerInfo,yt=!0;break e}h=h.return}if(Oe===null)throw Error(o(160));Gu(a,c,s),Oe=null,yt=!1;var g=s.alternate;g!==null&&(g.return=null),s.return=null}catch(E){_e(s,t,E)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ju(t,e),t=t.sibling}function Ju(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xt(t,e),Rt(e),r&4){try{Lr(3,e,e.return),Al(3,e)}catch(G){_e(e,e.return,G)}try{Lr(5,e,e.return)}catch(G){_e(e,e.return,G)}}break;case 1:xt(t,e),Rt(e),r&512&&n!==null&&Wn(n,n.return);break;case 5:if(xt(t,e),Rt(e),r&512&&n!==null&&Wn(n,n.return),e.flags&32){var s=e.stateNode;try{qn(s,"")}catch(G){_e(e,e.return,G)}}if(r&4&&(s=e.stateNode,s!=null)){var a=e.memoizedProps,c=n!==null?n.memoizedProps:a,h=e.type,g=e.updateQueue;if(e.updateQueue=null,g!==null)try{h==="input"&&a.type==="radio"&&a.name!=null&&ka(s,a),fs(h,c);var E=fs(h,a);for(c=0;c<g.length;c+=2){var I=g[c],O=g[c+1];I==="style"?La(s,O):I==="dangerouslySetInnerHTML"?Ra(s,O):I==="children"?qn(s,O):F(s,I,O,E)}switch(h){case"input":as(s,a);break;case"textarea":Na(s,a);break;case"select":var z=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!a.multiple;var W=a.value;W!=null?jn(s,!!a.multiple,W,!1):z!==!!a.multiple&&(a.defaultValue!=null?jn(s,!!a.multiple,a.defaultValue,!0):jn(s,!!a.multiple,a.multiple?[]:"",!1))}s[xr]=a}catch(G){_e(e,e.return,G)}}break;case 6:if(xt(t,e),Rt(e),r&4){if(e.stateNode===null)throw Error(o(162));s=e.stateNode,a=e.memoizedProps;try{s.nodeValue=a}catch(G){_e(e,e.return,G)}}break;case 3:if(xt(t,e),Rt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{or(t.containerInfo)}catch(G){_e(e,e.return,G)}break;case 4:xt(t,e),Rt(e);break;case 13:xt(t,e),Rt(e),s=e.child,s.flags&8192&&(a=s.memoizedState!==null,s.stateNode.isHidden=a,!a||s.alternate!==null&&s.alternate.memoizedState!==null||($i=Ee())),r&4&&Yu(e);break;case 22:if(I=n!==null&&n.memoizedState!==null,e.mode&1?(Be=(E=Be)||I,xt(t,e),Be=E):xt(t,e),Rt(e),r&8192){if(E=e.memoizedState!==null,(e.stateNode.isHidden=E)&&!I&&(e.mode&1)!==0)for(V=e,I=e.child;I!==null;){for(O=V=I;V!==null;){switch(z=V,W=z.child,z.tag){case 0:case 11:case 14:case 15:Lr(4,z,z.return);break;case 1:Wn(z,z.return);var K=z.stateNode;if(typeof K.componentWillUnmount=="function"){r=z,n=z.return;try{t=r,K.props=t.memoizedProps,K.state=t.memoizedState,K.componentWillUnmount()}catch(G){_e(r,n,G)}}break;case 5:Wn(z,z.return);break;case 22:if(z.memoizedState!==null){bu(O);continue}}W!==null?(W.return=z,V=W):bu(O)}I=I.sibling}e:for(I=null,O=e;;){if(O.tag===5){if(I===null){I=O;try{s=O.stateNode,E?(a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(h=O.stateNode,g=O.memoizedProps.style,c=g!=null&&g.hasOwnProperty("display")?g.display:null,h.style.display=Pa("display",c))}catch(G){_e(e,e.return,G)}}}else if(O.tag===6){if(I===null)try{O.stateNode.nodeValue=E?"":O.memoizedProps}catch(G){_e(e,e.return,G)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;I===O&&(I=null),O=O.return}I===O&&(I=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:xt(t,e),Rt(e),r&4&&Yu(e);break;case 21:break;default:xt(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Qu(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(qn(s,""),r.flags&=-33);var a=Ku(e);Ii(e,a,s);break;case 3:case 4:var c=r.stateNode.containerInfo,h=Ku(e);Ai(e,h,c);break;default:throw Error(o(161))}}catch(g){_e(e,e.return,g)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qf(e,t,n){V=e,Xu(e)}function Xu(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var s=V,a=s.child;if(s.tag===22&&r){var c=s.memoizedState!==null||Ml;if(!c){var h=s.alternate,g=h!==null&&h.memoizedState!==null||Be;h=Ml;var E=Be;if(Ml=c,(Be=g)&&!E)for(V=s;V!==null;)c=V,g=c.child,c.tag===22&&c.memoizedState!==null?Zu(s):g!==null?(g.return=c,V=g):Zu(s);for(;a!==null;)V=a,Xu(a),a=a.sibling;V=s,Ml=h,Be=E}qu(e)}else(s.subtreeFlags&8772)!==0&&a!==null?(a.return=s,V=a):qu(e)}}function qu(e){for(;V!==null;){var t=V;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Be||Al(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Be)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:gt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&bo(t,a,r);break;case 3:var c=t.updateQueue;if(c!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bo(t,c,n)}break;case 5:var h=t.stateNode;if(n===null&&t.flags&4){n=h;var g=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":g.autoFocus&&n.focus();break;case"img":g.src&&(n.src=g.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var E=t.alternate;if(E!==null){var I=E.memoizedState;if(I!==null){var O=I.dehydrated;O!==null&&or(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Be||t.flags&512&&Mi(t)}catch(z){_e(t,t.return,z)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function bu(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Zu(e){for(;V!==null;){var t=V;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Al(4,t)}catch(g){_e(t,n,g)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(g){_e(t,s,g)}}var a=t.return;try{Mi(t)}catch(g){_e(t,a,g)}break;case 5:var c=t.return;try{Mi(t)}catch(g){_e(t,c,g)}}}catch(g){_e(t,t.return,g)}if(t===e){V=null;break}var h=t.sibling;if(h!==null){h.return=t.return,V=h;break}V=t.return}}var Kf=Math.ceil,Il=ee.ReactCurrentDispatcher,Oi=ee.ReactCurrentOwner,ct=ee.ReactCurrentBatchConfig,se=0,Ae=null,Pe=null,De=0,rt=0,Hn=Yt(0),ze=0,Tr=null,vn=0,Ol=0,Di=0,zr=null,Je=null,$i=0,Vn=1/0,$t=null,Dl=!1,Fi=null,en=null,$l=!1,tn=null,Fl=0,Mr=0,Ui=null,Ul=-1,Bl=0;function Ve(){return(se&6)!==0?Ee():Ul!==-1?Ul:Ul=Ee()}function nn(e){return(e.mode&1)===0?1:(se&2)!==0&&De!==0?De&-De:Pf.transition!==null?(Bl===0&&(Bl=Qa()),Bl):(e=de,e!==0||(e=window.event,e=e===void 0?16:eo(e.type)),e)}function wt(e,t,n,r){if(50<Mr)throw Mr=0,Ui=null,Error(o(185));rr(e,n,r),((se&2)===0||e!==Ae)&&(e===Ae&&((se&2)===0&&(Ol|=n),ze===4&&rn(e,De)),Xe(e,r),n===1&&se===0&&(t.mode&1)===0&&(Vn=Ee()+500,ml&&Xt()))}function Xe(e,t){var n=e.callbackNode;Rd(e,t);var r=Xr(e,e===Ae?De:0);if(r===0)n!==null&&Wa(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Wa(n),t===1)e.tag===0?Rf(tc.bind(null,e)):Uo(tc.bind(null,e)),_f(function(){(se&6)===0&&Xt()}),n=null;else{switch(Ka(r)){case 1:n=xs;break;case 4:n=Ha;break;case 16:n=Kr;break;case 536870912:n=Va;break;default:n=Kr}n=uc(n,ec.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ec(e,t){if(Ul=-1,Bl=0,(se&6)!==0)throw Error(o(327));var n=e.callbackNode;if(Qn()&&e.callbackNode!==n)return null;var r=Xr(e,e===Ae?De:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Wl(e,r);else{t=r;var s=se;se|=2;var a=rc();(Ae!==e||De!==t)&&($t=null,Vn=Ee()+500,yn(e,t));do try{Jf();break}catch(h){nc(e,h)}while(!0);li(),Il.current=a,se=s,Pe!==null?t=0:(Ae=null,De=0,t=ze)}if(t!==0){if(t===2&&(s=ws(e),s!==0&&(r=s,t=Bi(e,s))),t===1)throw n=Tr,yn(e,0),rn(e,r),Xe(e,Ee()),n;if(t===6)rn(e,r);else{if(s=e.current.alternate,(r&30)===0&&!Gf(s)&&(t=Wl(e,r),t===2&&(a=ws(e),a!==0&&(r=a,t=Bi(e,a))),t===1))throw n=Tr,yn(e,0),rn(e,r),Xe(e,Ee()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:xn(e,Je,$t);break;case 3:if(rn(e,r),(r&130023424)===r&&(t=$i+500-Ee(),10<t)){if(Xr(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ve(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Gs(xn.bind(null,e,Je,$t),t);break}xn(e,Je,$t);break;case 4:if(rn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var c=31-ht(r);a=1<<c,c=t[c],c>s&&(s=c),r&=~a}if(r=s,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Kf(r/1960))-r,10<r){e.timeoutHandle=Gs(xn.bind(null,e,Je,$t),r);break}xn(e,Je,$t);break;case 5:xn(e,Je,$t);break;default:throw Error(o(329))}}}return Xe(e,Ee()),e.callbackNode===n?ec.bind(null,e):null}function Bi(e,t){var n=zr;return e.current.memoizedState.isDehydrated&&(yn(e,t).flags|=256),e=Wl(e,t),e!==2&&(t=Je,Je=n,t!==null&&Wi(t)),e}function Wi(e){Je===null?Je=e:Je.push.apply(Je,e)}function Gf(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],a=s.getSnapshot;s=s.value;try{if(!mt(a(),s))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 rn(e,t){for(t&=~Di,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ht(t),r=1<<n;e[n]=-1,t&=~r}}function tc(e){if((se&6)!==0)throw Error(o(327));Qn();var t=Xr(e,0);if((t&1)===0)return Xe(e,Ee()),null;var n=Wl(e,t);if(e.tag!==0&&n===2){var r=ws(e);r!==0&&(t=r,n=Bi(e,r))}if(n===1)throw n=Tr,yn(e,0),rn(e,t),Xe(e,Ee()),n;if(n===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xn(e,Je,$t),Xe(e,Ee()),null}function Hi(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(Vn=Ee()+500,ml&&Xt())}}function gn(e){tn!==null&&tn.tag===0&&(se&6)===0&&Qn();var t=se;se|=1;var n=ct.transition,r=de;try{if(ct.transition=null,de=1,e)return e()}finally{de=r,ct.transition=n,se=t,(se&6)===0&&Xt()}}function Vi(){rt=Hn.current,ge(Hn)}function yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Sf(n)),Pe!==null)for(n=Pe.return;n!==null;){var r=n;switch(Zs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&pl();break;case 3:Un(),ge(Ke),ge($e),fi();break;case 5:ci(r);break;case 4:Un();break;case 13:ge(je);break;case 19:ge(je);break;case 10:si(r.type._context);break;case 22:case 23:Vi()}n=n.return}if(Ae=e,Pe=e=ln(e.current,null),De=rt=t,ze=0,Tr=null,Di=Ol=vn=0,Je=zr=null,pn!==null){for(t=0;t<pn.length;t++)if(n=pn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,a=n.pending;if(a!==null){var c=a.next;a.next=s,r.next=c}n.pending=r}pn=null}return e}function nc(e,t){do{var n=Pe;try{if(li(),Nl.current=Pl,Cl){for(var r=ke.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Cl=!1}if(mn=0,Me=Te=ke=null,Nr=!1,Cr=0,Oi.current=null,n===null||n.return===null){ze=1,Tr=t,Pe=null;break}e:{var a=e,c=n.return,h=n,g=t;if(t=De,h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){var E=g,I=h,O=I.tag;if((I.mode&1)===0&&(O===0||O===11||O===15)){var z=I.alternate;z?(I.updateQueue=z.updateQueue,I.memoizedState=z.memoizedState,I.lanes=z.lanes):(I.updateQueue=null,I.memoizedState=null)}var W=Eu(c);if(W!==null){W.flags&=-257,Ru(W,c,h,a,t),W.mode&1&&Cu(a,E,t),t=W,g=E;var K=t.updateQueue;if(K===null){var G=new Set;G.add(g),t.updateQueue=G}else K.add(g);break e}else{if((t&1)===0){Cu(a,E,t),Qi();break e}g=Error(o(426))}}else if(xe&&h.mode&1){var Re=Eu(c);if(Re!==null){(Re.flags&65536)===0&&(Re.flags|=256),Ru(Re,c,h,a,t),ni(Bn(g,h));break e}}a=g=Bn(g,h),ze!==4&&(ze=2),zr===null?zr=[a]:zr.push(a),a=c;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var S=_u(a,g,t);qo(a,S);break e;case 1:h=g;var x=a.type,N=a.stateNode;if((a.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(en===null||!en.has(N)))){a.flags|=65536,t&=-t,a.lanes|=t;var $=Nu(a,h,t);qo(a,$);break e}}a=a.return}while(a!==null)}sc(n)}catch(J){t=J,Pe===n&&n!==null&&(Pe=n=n.return);continue}break}while(!0)}function rc(){var e=Il.current;return Il.current=Pl,e===null?Pl:e}function Qi(){(ze===0||ze===3||ze===2)&&(ze=4),Ae===null||(vn&268435455)===0&&(Ol&268435455)===0||rn(Ae,De)}function Wl(e,t){var n=se;se|=2;var r=rc();(Ae!==e||De!==t)&&($t=null,yn(e,t));do try{Yf();break}catch(s){nc(e,s)}while(!0);if(li(),se=n,Il.current=r,Pe!==null)throw Error(o(261));return Ae=null,De=0,ze}function Yf(){for(;Pe!==null;)lc(Pe)}function Jf(){for(;Pe!==null&&!xd();)lc(Pe)}function lc(e){var t=oc(e.alternate,e,rt);e.memoizedProps=e.pendingProps,t===null?sc(e):Pe=t,Oi.current=null}function sc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Bf(n,t,rt),n!==null){Pe=n;return}}else{if(n=Wf(n,t),n!==null){n.flags&=32767,Pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,Pe=null;return}}if(t=t.sibling,t!==null){Pe=t;return}Pe=t=e}while(t!==null);ze===0&&(ze=5)}function xn(e,t,n){var r=de,s=ct.transition;try{ct.transition=null,de=1,Xf(e,t,n,r)}finally{ct.transition=s,de=r}return null}function Xf(e,t,n,r){do Qn();while(tn!==null);if((se&6)!==0)throw Error(o(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Pd(e,a),e===Ae&&(Pe=Ae=null,De=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||$l||($l=!0,uc(Kr,function(){return Qn(),null})),a=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||a){a=ct.transition,ct.transition=null;var c=de;de=1;var h=se;se|=4,Oi.current=null,Vf(e,n),Ju(n,e),vf(Qs),Zr=!!Vs,Qs=Vs=null,e.current=n,Qf(n),wd(),se=h,de=c,ct.transition=a}else e.current=n;if($l&&($l=!1,tn=e,Fl=s),a=e.pendingLanes,a===0&&(en=null),Sd(n.stateNode),Xe(e,Ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Dl)throw Dl=!1,e=Fi,Fi=null,e;return(Fl&1)!==0&&e.tag!==0&&Qn(),a=e.pendingLanes,(a&1)!==0?e===Ui?Mr++:(Mr=0,Ui=e):Mr=0,Xt(),null}function Qn(){if(tn!==null){var e=Ka(Fl),t=ct.transition,n=de;try{if(ct.transition=null,de=16>e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,Fl=0,(se&6)!==0)throw Error(o(331));var s=se;for(se|=4,V=e.current;V!==null;){var a=V,c=a.child;if((V.flags&16)!==0){var h=a.deletions;if(h!==null){for(var g=0;g<h.length;g++){var E=h[g];for(V=E;V!==null;){var I=V;switch(I.tag){case 0:case 11:case 15:Lr(8,I,a)}var O=I.child;if(O!==null)O.return=I,V=O;else for(;V!==null;){I=V;var z=I.sibling,W=I.return;if(Vu(I),I===E){V=null;break}if(z!==null){z.return=W,V=z;break}V=W}}}var K=a.alternate;if(K!==null){var G=K.child;if(G!==null){K.child=null;do{var Re=G.sibling;G.sibling=null,G=Re}while(G!==null)}}V=a}}if((a.subtreeFlags&2064)!==0&&c!==null)c.return=a,V=c;else e:for(;V!==null;){if(a=V,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:Lr(9,a,a.return)}var S=a.sibling;if(S!==null){S.return=a.return,V=S;break e}V=a.return}}var x=e.current;for(V=x;V!==null;){c=V;var N=c.child;if((c.subtreeFlags&2064)!==0&&N!==null)N.return=c,V=N;else e:for(c=x;V!==null;){if(h=V,(h.flags&2048)!==0)try{switch(h.tag){case 0:case 11:case 15:Al(9,h)}}catch(J){_e(h,h.return,J)}if(h===c){V=null;break e}var $=h.sibling;if($!==null){$.return=h.return,V=$;break e}V=h.return}}if(se=s,Xt(),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Gr,e)}catch{}r=!0}return r}finally{de=n,ct.transition=t}}return!1}function ic(e,t,n){t=Bn(n,t),t=_u(e,t,1),e=bt(e,t,1),t=Ve(),e!==null&&(rr(e,1,t),Xe(e,t))}function _e(e,t,n){if(e.tag===3)ic(e,e,n);else for(;t!==null;){if(t.tag===3){ic(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(en===null||!en.has(r))){e=Bn(n,e),e=Nu(t,e,1),t=bt(t,e,1),e=Ve(),t!==null&&(rr(t,1,e),Xe(t,e));break}}t=t.return}}function qf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ve(),e.pingedLanes|=e.suspendedLanes&n,Ae===e&&(De&n)===n&&(ze===4||ze===3&&(De&130023424)===De&&500>Ee()-$i?yn(e,0):Di|=n),Xe(e,t)}function ac(e,t){t===0&&((e.mode&1)===0?t=1:(t=Jr,Jr<<=1,(Jr&130023424)===0&&(Jr=4194304)));var n=Ve();e=It(e,t),e!==null&&(rr(e,t,n),Xe(e,n))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ac(e,n)}function Zf(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}r!==null&&r.delete(t),ac(e,n)}var oc;oc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ye=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ye=!1,Uf(e,t,n);Ye=(e.flags&131072)!==0}else Ye=!1,xe&&(t.flags&1048576)!==0&&Bo(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zl(e,t),e=t.pendingProps;var s=Mn(t,$e.current);Fn(t,n),s=mi(null,t,r,e,s,n);var a=vi();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(a=!0,hl(t)):a=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,oi(t),s.updater=Ll,t.stateNode=s,s._reactInternals=t,ki(t,r,e,n),t=Ci(null,t,r,!0,a,n)):(t.tag=0,xe&&a&&bs(t),He(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zl(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=tp(r),e=gt(r,e),s){case 0:t=Ni(null,t,r,e,n);break e;case 1:t=Au(null,t,r,e,n);break e;case 11:t=Pu(null,t,r,e,n);break e;case 14:t=Lu(null,t,r,gt(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Ni(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Au(e,t,r,s,n);case 3:e:{if(Iu(t),e===null)throw Error(o(387));r=t.pendingProps,a=t.memoizedState,s=a.element,Xo(e,t),Sl(t,r,null,n);var c=t.memoizedState;if(r=c.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:c.cache,pendingSuspenseBoundaries:c.pendingSuspenseBoundaries,transitions:c.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){s=Bn(Error(o(423)),t),t=Ou(e,t,r,n,s);break e}else if(r!==s){s=Bn(Error(o(424)),t),t=Ou(e,t,r,n,s);break e}else for(nt=Gt(t.stateNode.containerInfo.firstChild),tt=t,xe=!0,vt=null,n=Yo(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(On(),r===s){t=Dt(e,t,n);break e}He(e,t,r,n)}t=t.child}return t;case 5:return Zo(t),e===null&&ti(t),r=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,c=s.children,Ks(r,s)?c=null:a!==null&&Ks(r,a)&&(t.flags|=32),Mu(e,t),He(e,t,c,n),t.child;case 6:return e===null&&ti(t),null;case 13:return Du(e,t,n);case 4:return ui(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dn(t,null,r,n):He(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Pu(e,t,r,s,n);case 7:return He(e,t,t.pendingProps,n),t.child;case 8:return He(e,t,t.pendingProps.children,n),t.child;case 12:return He(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,a=t.memoizedProps,c=s.value,me(wl,r._currentValue),r._currentValue=c,a!==null)if(mt(a.value,c)){if(a.children===s.children&&!Ke.current){t=Dt(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var h=a.dependencies;if(h!==null){c=a.child;for(var g=h.firstContext;g!==null;){if(g.context===r){if(a.tag===1){g=Ot(-1,n&-n),g.tag=2;var E=a.updateQueue;if(E!==null){E=E.shared;var I=E.pending;I===null?g.next=g:(g.next=I.next,I.next=g),E.pending=g}}a.lanes|=n,g=a.alternate,g!==null&&(g.lanes|=n),ii(a.return,n,t),h.lanes|=n;break}g=g.next}}else if(a.tag===10)c=a.type===t.type?null:a.child;else if(a.tag===18){if(c=a.return,c===null)throw Error(o(341));c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),ii(c,n,t),c=a.sibling}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===t){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}He(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Fn(t,n),s=ot(s),r=r(s),t.flags|=1,He(e,t,r,n),t.child;case 14:return r=t.type,s=gt(r,t.pendingProps),s=gt(r.type,s),Lu(e,t,r,s,n);case 15:return Tu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),zl(e,t),t.tag=1,Ge(r)?(e=!0,hl(t)):e=!1,Fn(t,n),ku(t,r,s),ki(t,r,s,n),Ci(null,t,r,!0,e,n);case 19:return Fu(e,t,n);case 22:return zu(e,t,n)}throw Error(o(156,t.tag))};function uc(e,t){return Ba(e,t)}function ep(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new ep(e,t,n,r)}function Ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tp(e){if(typeof e=="function")return Ki(e)?1:0;if(e!=null){if(e=e.$$typeof,e===st)return 11;if(e===St)return 14}return 2}function ln(e,t){var n=e.alternate;return n===null?(n=dt(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 Hl(e,t,n,r,s,a){var c=2;if(r=e,typeof e=="function")Ki(e)&&(c=1);else if(typeof e=="string")c=5;else e:switch(e){case te:return wn(n.children,s,a,t);case ue:c=8,s|=8;break;case Ne:return e=dt(12,n,t,s|2),e.elementType=Ne,e.lanes=a,e;case be:return e=dt(13,n,t,s),e.elementType=be,e.lanes=a,e;case pt:return e=dt(19,n,t,s),e.elementType=pt,e.lanes=a,e;case Se:return Vl(n,s,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ce:c=10;break e;case kt:c=9;break e;case st:c=11;break e;case St:c=14;break e;case Qe:c=16,r=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return t=dt(c,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function wn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function Vl(e,t,n,r){return e=dt(22,e,r,t),e.elementType=Se,e.lanes=n,e.stateNode={isHidden:!1},e}function Gi(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Yi(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function np(e,t,n,r,s){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=js(0),this.expirationTimes=js(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=js(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Ji(e,t,n,r,s,a,c,h,g){return e=new np(e,t,n,h,g),t===1?(t=1,a===!0&&(t|=8)):t=0,a=dt(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},oi(a),e}function rp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Y,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cc(e){if(!e)return Jt;e=e._reactInternals;e:{if(on(e)!==e||e.tag!==1)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ge(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(o(171))}if(e.tag===1){var n=e.type;if(Ge(n))return $o(e,n,t)}return t}function dc(e,t,n,r,s,a,c,h,g){return e=Ji(n,r,!0,e,s,a,c,h,g),e.context=cc(null),n=e.current,r=Ve(),s=nn(n),a=Ot(r,s),a.callback=t??null,bt(n,a,s),e.current.lanes=s,rr(e,s,r),Xe(e,r),e}function Ql(e,t,n,r){var s=t.current,a=Ve(),c=nn(s);return n=cc(n),t.context===null?t.context=n:t.pendingContext=n,t=Ot(a,c),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=bt(s,t,c),e!==null&&(wt(e,s,c,a),kl(e,s,c)),c}function Kl(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 fc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xi(e,t){fc(e,t),(e=e.alternate)&&fc(e,t)}function lp(){return null}var pc=typeof reportError=="function"?reportError:function(e){console.error(e)};function qi(e){this._internalRoot=e}Gl.prototype.render=qi.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));Ql(e,t,null,null)},Gl.prototype.unmount=qi.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gn(function(){Ql(null,e,null,null)}),t[Tt]=null}};function Gl(e){this._internalRoot=e}Gl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ja();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Vt.length&&t!==0&&t<Vt[n].priority;n++);Vt.splice(n,0,e),n===0&&ba(e)}};function bi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function hc(){}function sp(e,t,n,r,s){if(s){if(typeof r=="function"){var a=r;r=function(){var E=Kl(c);a.call(E)}}var c=dc(t,r,e,0,null,!1,!1,"",hc);return e._reactRootContainer=c,e[Tt]=c.current,gr(e.nodeType===8?e.parentNode:e),gn(),c}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var h=r;r=function(){var E=Kl(g);h.call(E)}}var g=Ji(e,0,!1,null,null,!1,!1,"",hc);return e._reactRootContainer=g,e[Tt]=g.current,gr(e.nodeType===8?e.parentNode:e),gn(function(){Ql(t,g,n,r)}),g}function Jl(e,t,n,r,s){var a=n._reactRootContainer;if(a){var c=a;if(typeof s=="function"){var h=s;s=function(){var g=Kl(c);h.call(g)}}Ql(t,c,e,s)}else c=sp(n,t,e,s,r);return Kl(c)}Ga=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=nr(t.pendingLanes);n!==0&&(ks(t,n|1),Xe(t,Ee()),(se&6)===0&&(Vn=Ee()+500,Xt()))}break;case 13:gn(function(){var r=It(e,1);if(r!==null){var s=Ve();wt(r,e,1,s)}}),Xi(e,1)}},Ss=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Ve();wt(t,e,134217728,n)}Xi(e,134217728)}},Ya=function(e){if(e.tag===13){var t=nn(e),n=It(e,t);if(n!==null){var r=Ve();wt(n,e,t,r)}Xi(e,t)}},Ja=function(){return de},Xa=function(e,t){var n=de;try{return de=e,t()}finally{de=n}},ms=function(e,t,n){switch(t){case"input":if(as(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 r=n[t];if(r!==e&&r.form===e.form){var s=fl(r);if(!s)throw Error(o(90));wa(r),as(r,s)}}}break;case"textarea":Na(e,n);break;case"select":t=n.value,t!=null&&jn(e,!!n.multiple,t,!1)}},Aa=Hi,Ia=gn;var ip={usingClientEntryPoint:!1,Events:[wr,Tn,fl,za,Ma,Hi]},Ar={findFiberByHostInstance:un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},ap={bundleType:Ar.bundleType,version:Ar.version,rendererPackageName:Ar.rendererPackageName,rendererConfig:Ar.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Fa(e),e===null?null:e.stateNode},findFiberByHostInstance:Ar.findFiberByHostInstance||lp,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 Xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xl.isDisabled&&Xl.supportsFiber)try{Gr=Xl.inject(ap),_t=Xl}catch{}}return qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ip,qe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bi(t))throw Error(o(200));return rp(e,t,null,n)},qe.createRoot=function(e,t){if(!bi(e))throw Error(o(299));var n=!1,r="",s=pc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Ji(e,1,!1,null,null,n,!1,r,s),e[Tt]=t.current,gr(e.nodeType===8?e.parentNode:e),new qi(t)},qe.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(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Fa(t),e=e===null?null:e.stateNode,e},qe.flushSync=function(e){return gn(e)},qe.hydrate=function(e,t,n){if(!Yl(t))throw Error(o(200));return Jl(null,e,t,!0,n)},qe.hydrateRoot=function(e,t,n){if(!bi(e))throw Error(o(405));var r=n!=null&&n.hydratedSources||null,s=!1,a="",c=pc;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),t=dc(t,null,e,1,n??null,s,!1,a,c),e[Tt]=t.current,gr(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Gl(t)},qe.render=function(e,t,n){if(!Yl(t))throw Error(o(200));return Jl(null,e,t,!1,n)},qe.unmountComponentAtNode=function(e){if(!Yl(e))throw Error(o(40));return e._reactRootContainer?(gn(function(){Jl(null,null,e,!1,function(){e._reactRootContainer=null,e[Tt]=null})}),!0):!1},qe.unstable_batchedUpdates=Hi,qe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yl(n))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Jl(e,t,n,!1,r)},qe.version="18.3.1-next-f1338f8080-20240426",qe}var kc;function mp(){if(kc)return ta.exports;kc=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(u){console.error(u)}}return i(),ta.exports=hp(),ta.exports}var Sc;function vp(){if(Sc)return ql;Sc=1;var i=mp();return ql.createRoot=i.createRoot,ql.hydrateRoot=i.hydrateRoot,ql}var gp=vp();/**
* react-router v7.13.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/var _c="popstate";function yp(i={}){function u(f,d){let{pathname:p,search:m,hash:C}=f.location;return ca("",{pathname:p,search:m,hash:C},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function o(f,d){return typeof d=="string"?d:$r(d)}return wp(u,o,null,i)}function we(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function jt(i,u){if(!i){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function xp(){return Math.random().toString(36).substring(2,10)}function Nc(i,u){return{usr:i.state,key:i.key,idx:u}}function ca(i,u,o=null,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof u=="string"?Gn(u):u,state:o,key:u&&u.key||f||xp()}}function $r({pathname:i="/",search:u="",hash:o=""}){return u&&u!=="?"&&(i+=u.charAt(0)==="?"?u:"?"+u),o&&o!=="#"&&(i+=o.charAt(0)==="#"?o:"#"+o),i}function Gn(i){let u={};if(i){let o=i.indexOf("#");o>=0&&(u.hash=i.substring(o),i=i.substring(0,o));let f=i.indexOf("?");f>=0&&(u.search=i.substring(f),i=i.substring(0,f)),i&&(u.pathname=i)}return u}function wp(i,u,o,f={}){let{window:d=document.defaultView,v5Compat:p=!1}=f,m=d.history,C="POP",v=null,y=j();y==null&&(y=0,m.replaceState({...m.state,idx:y},""));function j(){return(m.state||{idx:null}).idx}function _(){C="POP";let L=j(),T=L==null?null:L-y;y=L,v&&v({action:C,location:D.location,delta:T})}function R(L,T){C="PUSH";let H=ca(D.location,L,T);y=j()+1;let F=Nc(H,y),ee=D.createHref(H);try{m.pushState(F,"",ee)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;d.location.assign(ee)}p&&v&&v({action:C,location:D.location,delta:1})}function P(L,T){C="REPLACE";let H=ca(D.location,L,T);y=j();let F=Nc(H,y),ee=D.createHref(H);m.replaceState(F,"",ee),p&&v&&v({action:C,location:D.location,delta:0})}function M(L){return jp(L)}let D={get action(){return C},get location(){return i(d,m)},listen(L){if(v)throw new Error("A history only accepts one active listener");return d.addEventListener(_c,_),v=L,()=>{d.removeEventListener(_c,_),v=null}},createHref(L){return u(d,L)},createURL:M,encodeLocation(L){let T=M(L);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:R,replace:P,go(L){return m.go(L)}};return D}function jp(i,u=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),we(o,"No window.location.(origin|href) available to create URL");let f=typeof i=="string"?i:$r(i);return f=f.replace(/ $/,"%20"),!u&&f.startsWith("//")&&(f=o+f),new URL(f,o)}function $c(i,u,o="/"){return kp(i,u,o,!1)}function kp(i,u,o,f){let d=typeof u=="string"?Gn(u):u,p=Ut(d.pathname||"/",o);if(p==null)return null;let m=Fc(i);Sp(m);let C=null;for(let v=0;C==null&&v<m.length;++v){let y=Ap(p);C=zp(m[v],y,f)}return C}function Fc(i,u=[],o=[],f="",d=!1){let p=(m,C,v=d,y)=>{let j={relativePath:y===void 0?m.path||"":y,caseSensitive:m.caseSensitive===!0,childrenIndex:C,route:m};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(f)&&v)return;we(j.relativePath.startsWith(f),`Absolute route path "${j.relativePath}" nested under path "${f}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(f.length)}let _=Ft([f,j.relativePath]),R=o.concat(j);m.children&&m.children.length>0&&(we(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${_}".`),Fc(m.children,u,R,_,v)),!(m.path==null&&!m.index)&&u.push({path:_,score:Lp(_,m.index),routesMeta:R})};return i.forEach((m,C)=>{var v;if(m.path===""||!((v=m.path)!=null&&v.includes("?")))p(m,C);else for(let y of Uc(m.path))p(m,C,!0,y)}),u}function Uc(i){let u=i.split("/");if(u.length===0)return[];let[o,...f]=u,d=o.endsWith("?"),p=o.replace(/\?$/,"");if(f.length===0)return d?[p,""]:[p];let m=Uc(f.join("/")),C=[];return C.push(...m.map(v=>v===""?p:[p,v].join("/"))),d&&C.push(...m),C.map(v=>i.startsWith("/")&&v===""?"/":v)}function Sp(i){i.sort((u,o)=>u.score!==o.score?o.score-u.score:Tp(u.routesMeta.map(f=>f.childrenIndex),o.routesMeta.map(f=>f.childrenIndex)))}var _p=/^:[\w-]+$/,Np=3,Cp=2,Ep=1,Rp=10,Pp=-2,Cc=i=>i==="*";function Lp(i,u){let o=i.split("/"),f=o.length;return o.some(Cc)&&(f+=Pp),u&&(f+=Cp),o.filter(d=>!Cc(d)).reduce((d,p)=>d+(_p.test(p)?Np:p===""?Ep:Rp),f)}function Tp(i,u){return i.length===u.length&&i.slice(0,-1).every((f,d)=>f===u[d])?i[i.length-1]-u[u.length-1]:0}function zp(i,u,o=!1){let{routesMeta:f}=i,d={},p="/",m=[];for(let C=0;C<f.length;++C){let v=f[C],y=C===f.length-1,j=p==="/"?u:u.slice(p.length)||"/",_=ts({path:v.relativePath,caseSensitive:v.caseSensitive,end:y},j),R=v.route;if(!_&&y&&o&&!f[f.length-1].route.index&&(_=ts({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},j)),!_)return null;Object.assign(d,_.params),m.push({params:d,pathname:Ft([p,_.pathname]),pathnameBase:$p(Ft([p,_.pathnameBase])),route:R}),_.pathnameBase!=="/"&&(p=Ft([p,_.pathnameBase]))}return m}function ts(i,u){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[o,f]=Mp(i.path,i.caseSensitive,i.end),d=u.match(o);if(!d)return null;let p=d[0],m=p.replace(/(.)\/+$/,"$1"),C=d.slice(1);return{params:f.reduce((y,{paramName:j,isOptional:_},R)=>{if(j==="*"){let M=C[R]||"";m=p.slice(0,p.length-M.length).replace(/(.)\/+$/,"$1")}const P=C[R];return _&&!P?y[j]=void 0:y[j]=(P||"").replace(/%2F/g,"/"),y},{}),pathname:p,pathnameBase:m,pattern:i}}function Mp(i,u=!1,o=!0){jt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let f=[],d="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,C,v)=>(f.push({paramName:C,isOptional:v!=null}),v?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(f.push({paramName:"*"}),d+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?d+="\\/*$":i!==""&&i!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,u?void 0:"i"),f]}function Ap(i){try{return i.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return jt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),i}}function Ut(i,u){if(u==="/")return i;if(!i.toLowerCase().startsWith(u.toLowerCase()))return null;let o=u.endsWith("/")?u.length-1:u.length,f=i.charAt(o);return f&&f!=="/"?null:i.slice(o)||"/"}var Ip=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Op(i,u="/"){let{pathname:o,search:f="",hash:d=""}=typeof i=="string"?Gn(i):i,p;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?p=Ec(o.substring(1),"/"):p=Ec(o,u)):p=u,{pathname:p,search:Fp(f),hash:Up(d)}}function Ec(i,u){let o=u.replace(/\/+$/,"").split("/");return i.split("/").forEach(d=>{d===".."?o.length>1&&o.pop():d!=="."&&o.push(d)}),o.length>1?o.join("/"):"/"}function la(i,u,o,f){return`Cannot include a '${i}' character in a manually specified \`to.${u}\` field [${JSON.stringify(f)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Dp(i){return i.filter((u,o)=>o===0||u.route.path&&u.route.path.length>0)}function pa(i){let u=Dp(i);return u.map((o,f)=>f===u.length-1?o.pathname:o.pathnameBase)}function ha(i,u,o,f=!1){let d;typeof i=="string"?d=Gn(i):(d={...i},we(!d.pathname||!d.pathname.includes("?"),la("?","pathname","search",d)),we(!d.pathname||!d.pathname.includes("#"),la("#","pathname","hash",d)),we(!d.search||!d.search.includes("#"),la("#","search","hash",d)));let p=i===""||d.pathname==="",m=p?"/":d.pathname,C;if(m==null)C=o;else{let _=u.length-1;if(!f&&m.startsWith("..")){let R=m.split("/");for(;R[0]==="..";)R.shift(),_-=1;d.pathname=R.join("/")}C=_>=0?u[_]:"/"}let v=Op(d,C),y=m&&m!=="/"&&m.endsWith("/"),j=(p||m===".")&&o.endsWith("/");return!v.pathname.endsWith("/")&&(y||j)&&(v.pathname+="/"),v}var Ft=i=>i.join("/").replace(/\/\/+/g,"/"),$p=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),Fp=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Up=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Bp=class{constructor(i,u,o,f=!1){this.status=i,this.statusText=u||"",this.internal=f,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function Wp(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Hp(i){return i.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Bc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Wc(i,u){let o=i;if(typeof o!="string"||!Ip.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let f=o,d=!1;if(Bc)try{let p=new URL(window.location.href),m=o.startsWith("//")?new URL(p.protocol+o):new URL(o),C=Ut(m.pathname,u);m.origin===p.origin&&C!=null?o=C+m.search+m.hash:d=!0}catch{jt(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:f,isExternal:d,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Hc=["POST","PUT","PATCH","DELETE"];new Set(Hc);var Vp=["GET",...Hc];new Set(Vp);var Yn=w.createContext(null);Yn.displayName="DataRouter";var rs=w.createContext(null);rs.displayName="DataRouterState";var Qp=w.createContext(!1),Vc=w.createContext({isTransitioning:!1});Vc.displayName="ViewTransition";var Kp=w.createContext(new Map);Kp.displayName="Fetchers";var Gp=w.createContext(null);Gp.displayName="Await";var lt=w.createContext(null);lt.displayName="Navigation";var Fr=w.createContext(null);Fr.displayName="Location";var ft=w.createContext({outlet:null,matches:[],isDataRoute:!1});ft.displayName="Route";var ma=w.createContext(null);ma.displayName="RouteError";var Qc="REACT_ROUTER_ERROR",Yp="REDIRECT",Jp="ROUTE_ERROR_RESPONSE";function Xp(i){if(i.startsWith(`${Qc}:${Yp}:{`))try{let u=JSON.parse(i.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function qp(i){if(i.startsWith(`${Qc}:${Jp}:{`))try{let u=JSON.parse(i.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new Bp(u.status,u.statusText,u.data)}catch{}}function bp(i,{relative:u}={}){we(Jn(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:f}=w.useContext(lt),{hash:d,pathname:p,search:m}=Ur(i,{relative:u}),C=p;return o!=="/"&&(C=p==="/"?o:Ft([o,p])),f.createHref({pathname:C,search:m,hash:d})}function Jn(){return w.useContext(Fr)!=null}function an(){return we(Jn(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Fr).location}var Kc="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Gc(i){w.useContext(lt).static||w.useLayoutEffect(i)}function Yc(){let{isDataRoute:i}=w.useContext(ft);return i?hh():Zp()}function Zp(){we(Jn(),"useNavigate() may be used only in the context of a <Router> component.");let i=w.useContext(Yn),{basename:u,navigator:o}=w.useContext(lt),{matches:f}=w.useContext(ft),{pathname:d}=an(),p=JSON.stringify(pa(f)),m=w.useRef(!1);return Gc(()=>{m.current=!0}),w.useCallback((v,y={})=>{if(jt(m.current,Kc),!m.current)return;if(typeof v=="number"){o.go(v);return}let j=ha(v,JSON.parse(p),d,y.relative==="path");i==null&&u!=="/"&&(j.pathname=j.pathname==="/"?u:Ft([u,j.pathname])),(y.replace?o.replace:o.push)(j,y.state,y)},[u,o,p,d,i])}var eh=w.createContext(null);function th(i){let u=w.useContext(ft).outlet;return w.useMemo(()=>u&&w.createElement(eh.Provider,{value:i},u),[u,i])}function nh(){let{matches:i}=w.useContext(ft),u=i[i.length-1];return u?u.params:{}}function Ur(i,{relative:u}={}){let{matches:o}=w.useContext(ft),{pathname:f}=an(),d=JSON.stringify(pa(o));return w.useMemo(()=>ha(i,JSON.parse(d),f,u==="path"),[i,d,f,u])}function rh(i,u){return Jc(i,u)}function Jc(i,u,o,f,d){var H;we(Jn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=w.useContext(lt),{matches:m}=w.useContext(ft),C=m[m.length-1],v=C?C.params:{},y=C?C.pathname:"/",j=C?C.pathnameBase:"/",_=C&&C.route;{let F=_&&_.path||"";qc(y,!_||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (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.
Please change the parent <Route path="${F}"> to <Route path="${F==="/"?"*":`${F}/*`}">.`)}let R=an(),P;if(u){let F=typeof u=="string"?Gn(u):u;we(j==="/"||((H=F.pathname)==null?void 0:H.startsWith(j)),`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 "${j}" but pathname "${F.pathname}" was given in the \`location\` prop.`),P=F}else P=R;let M=P.pathname||"/",D=M;if(j!=="/"){let F=j.replace(/^\//,"").split("/");D="/"+M.replace(/^\//,"").split("/").slice(F.length).join("/")}let L=$c(i,{pathname:D});jt(_||L!=null,`No routes matched location "${P.pathname}${P.search}${P.hash}" `),jt(L==null||L[L.length-1].route.element!==void 0||L[L.length-1].route.Component!==void 0||L[L.length-1].route.lazy!==void 0,`Matched leaf route at location "${P.pathname}${P.search}${P.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 T=oh(L&&L.map(F=>Object.assign({},F,{params:Object.assign({},v,F.params),pathname:Ft([j,p.encodeLocation?p.encodeLocation(F.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathname]),pathnameBase:F.pathnameBase==="/"?j:Ft([j,p.encodeLocation?p.encodeLocation(F.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathnameBase])})),m,o,f,d);return u&&T?w.createElement(Fr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...P},navigationType:"POP"}},T):T}function lh(){let i=ph(),u=Wp(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),o=i instanceof Error?i.stack:null,f="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:f},p={padding:"2px 4px",backgroundColor:f},m=null;return console.error("Error handled by React Router default ErrorBoundary:",i),m=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:p},"ErrorBoundary")," or"," ",w.createElement("code",{style:p},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},u),o?w.createElement("pre",{style:d},o):null,m)}var sh=w.createElement(lh,null),Xc=class extends w.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,u){return u.location!==i.location||u.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:u.error,location:u.location,revalidation:i.revalidation||u.revalidation}}componentDidCatch(i,u){this.props.onError?this.props.onError(i,u):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const o=qp(i.digest);o&&(i=o)}let u=i!==void 0?w.createElement(ft.Provider,{value:this.props.routeContext},w.createElement(ma.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?w.createElement(ih,{error:i},u):u}};Xc.contextType=Qp;var sa=new WeakMap;function ih({children:i,error:u}){let{basename:o}=w.useContext(lt);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let f=Xp(u.digest);if(f){let d=sa.get(u);if(d)throw d;let p=Wc(f.location,o);if(Bc&&!sa.get(u))if(p.isExternal||f.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:f.replace}));throw sa.set(u,m),m}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return i}function ah({routeContext:i,match:u,children:o}){let f=w.useContext(Yn);return f&&f.static&&f.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(f.staticContext._deepestRenderedBoundaryId=u.route.id),w.createElement(ft.Provider,{value:i},o)}function oh(i,u=[],o=null,f=null,d=null){if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(u.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let p=i,m=o==null?void 0:o.errors;if(m!=null){let j=p.findIndex(_=>_.route.id&&(m==null?void 0:m[_.route.id])!==void 0);we(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,j+1))}let C=!1,v=-1;if(o)for(let j=0;j<p.length;j++){let _=p[j];if((_.route.HydrateFallback||_.route.hydrateFallbackElement)&&(v=j),_.route.id){let{loaderData:R,errors:P}=o,M=_.route.loader&&!R.hasOwnProperty(_.route.id)&&(!P||P[_.route.id]===void 0);if(_.route.lazy||M){C=!0,v>=0?p=p.slice(0,v+1):p=[p[0]];break}}}let y=o&&f?(j,_)=>{var R,P;f(j,{location:o.location,params:((P=(R=o.matches)==null?void 0:R[0])==null?void 0:P.params)??{},unstable_pattern:Hp(o.matches),errorInfo:_})}:void 0;return p.reduceRight((j,_,R)=>{let P,M=!1,D=null,L=null;o&&(P=m&&_.route.id?m[_.route.id]:void 0,D=_.route.errorElement||sh,C&&(v<0&&R===0?(qc("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,L=null):v===R&&(M=!0,L=_.route.hydrateFallbackElement||null)));let T=u.concat(p.slice(0,R+1)),H=()=>{let F;return P?F=D:M?F=L:_.route.Component?F=w.createElement(_.route.Component,null):_.route.element?F=_.route.element:F=j,w.createElement(ah,{match:_,routeContext:{outlet:j,matches:T,isDataRoute:o!=null},children:F})};return o&&(_.route.ErrorBoundary||_.route.errorElement||R===0)?w.createElement(Xc,{location:o.location,revalidation:o.revalidation,component:D,error:P,children:H(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:y}):H()},null)}function va(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uh(i){let u=w.useContext(Yn);return we(u,va(i)),u}function ch(i){let u=w.useContext(rs);return we(u,va(i)),u}function dh(i){let u=w.useContext(ft);return we(u,va(i)),u}function ga(i){let u=dh(i),o=u.matches[u.matches.length-1];return we(o.route.id,`${i} can only be used on routes that contain a unique "id"`),o.route.id}function fh(){return ga("useRouteId")}function ph(){var f;let i=w.useContext(ma),u=ch("useRouteError"),o=ga("useRouteError");return i!==void 0?i:(f=u.errors)==null?void 0:f[o]}function hh(){let{router:i}=uh("useNavigate"),u=ga("useNavigate"),o=w.useRef(!1);return Gc(()=>{o.current=!0}),w.useCallback(async(d,p={})=>{jt(o.current,Kc),o.current&&(typeof d=="number"?await i.navigate(d):await i.navigate(d,{fromRouteId:u,...p}))},[i,u])}var Rc={};function qc(i,u,o){!u&&!Rc[i]&&(Rc[i]=!0,jt(!1,o))}w.memo(mh);function mh({routes:i,future:u,state:o,onError:f}){return Jc(i,void 0,o,f,u)}function Pt({to:i,replace:u,state:o,relative:f}){we(Jn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=w.useContext(lt);jt(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:p}=w.useContext(ft),{pathname:m}=an(),C=Yc(),v=ha(i,pa(p),m,f==="path"),y=JSON.stringify(v);return w.useEffect(()=>{C(JSON.parse(y),{replace:u,state:o,relative:f})},[C,y,f,u,o]),null}function vh(i){return th(i.context)}function Le(i){we(!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 gh({basename:i="/",children:u=null,location:o,navigationType:f="POP",navigator:d,static:p=!1,unstable_useTransitions:m}){we(!Jn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let C=i.replace(/^\/*/,"/"),v=w.useMemo(()=>({basename:C,navigator:d,static:p,unstable_useTransitions:m,future:{}}),[C,d,p,m]);typeof o=="string"&&(o=Gn(o));let{pathname:y="/",search:j="",hash:_="",state:R=null,key:P="default"}=o,M=w.useMemo(()=>{let D=Ut(y,C);return D==null?null:{location:{pathname:D,search:j,hash:_,state:R,key:P},navigationType:f}},[C,y,j,_,R,P,f]);return jt(M!=null,`<Router basename="${C}"> is not able to match the URL "${y}${j}${_}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:w.createElement(lt.Provider,{value:v},w.createElement(Fr.Provider,{children:u,value:M}))}function yh({children:i,location:u}){return rh(da(i),u)}function da(i,u=[]){let o=[];return w.Children.forEach(i,(f,d)=>{if(!w.isValidElement(f))return;let p=[...u,d];if(f.type===w.Fragment){o.push.apply(o,da(f.props.children,p));return}we(f.type===Le,`[${typeof f.type=="string"?f.type:f.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),we(!f.props.index||!f.props.children,"An index route cannot have child routes.");let m={id:f.props.id||p.join("-"),caseSensitive:f.props.caseSensitive,element:f.props.element,Component:f.props.Component,index:f.props.index,path:f.props.path,middleware:f.props.middleware,loader:f.props.loader,action:f.props.action,hydrateFallbackElement:f.props.hydrateFallbackElement,HydrateFallback:f.props.HydrateFallback,errorElement:f.props.errorElement,ErrorBoundary:f.props.ErrorBoundary,hasErrorBoundary:f.props.hasErrorBoundary===!0||f.props.ErrorBoundary!=null||f.props.errorElement!=null,shouldRevalidate:f.props.shouldRevalidate,handle:f.props.handle,lazy:f.props.lazy};f.props.children&&(m.children=da(f.props.children,p)),o.push(m)}),o}var Zl="get",es="application/x-www-form-urlencoded";function ls(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function xh(i){return ls(i)&&i.tagName.toLowerCase()==="button"}function wh(i){return ls(i)&&i.tagName.toLowerCase()==="form"}function jh(i){return ls(i)&&i.tagName.toLowerCase()==="input"}function kh(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Sh(i,u){return i.button===0&&(!u||u==="_self")&&!kh(i)}var bl=null;function _h(){if(bl===null)try{new FormData(document.createElement("form"),0),bl=!1}catch{bl=!0}return bl}var Nh=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ia(i){return i!=null&&!Nh.has(i)?(jt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${es}"`),null):i}function Ch(i,u){let o,f,d,p,m;if(wh(i)){let C=i.getAttribute("action");f=C?Ut(C,u):null,o=i.getAttribute("method")||Zl,d=ia(i.getAttribute("enctype"))||es,p=new FormData(i)}else if(xh(i)||jh(i)&&(i.type==="submit"||i.type==="image")){let C=i.form;if(C==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=i.getAttribute("formaction")||C.getAttribute("action");if(f=v?Ut(v,u):null,o=i.getAttribute("formmethod")||C.getAttribute("method")||Zl,d=ia(i.getAttribute("formenctype"))||ia(C.getAttribute("enctype"))||es,p=new FormData(C,i),!_h()){let{name:y,type:j,value:_}=i;if(j==="image"){let R=y?`${y}.`:"";p.append(`${R}x`,"0"),p.append(`${R}y`,"0")}else y&&p.append(y,_)}}else{if(ls(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=Zl,f=null,d=es,m=i}return p&&d==="text/plain"&&(m=p,p=void 0),{action:f,method:o.toLowerCase(),encType:d,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ya(i,u){if(i===!1||i===null||typeof i>"u")throw new Error(u)}function Eh(i,u,o,f){let d=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return o?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${f}`:d.pathname=`${d.pathname}.${f}`:d.pathname==="/"?d.pathname=`_root.${f}`:u&&Ut(d.pathname,u)==="/"?d.pathname=`${u.replace(/\/$/,"")}/_root.${f}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${f}`,d}async function Rh(i,u){if(i.id in u)return u[i.id];try{let o=await import(i.module);return u[i.id]=o,o}catch(o){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ph(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function Lh(i,u,o){let f=await Promise.all(i.map(async d=>{let p=u.routes[d.route.id];if(p){let m=await Rh(p,o);return m.links?m.links():[]}return[]}));return Ah(f.flat(1).filter(Ph).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Pc(i,u,o,f,d,p){let m=(v,y)=>o[y]?v.route.id!==o[y].route.id:!0,C=(v,y)=>{var j;return o[y].pathname!==v.pathname||((j=o[y].route.path)==null?void 0:j.endsWith("*"))&&o[y].params["*"]!==v.params["*"]};return p==="assets"?u.filter((v,y)=>m(v,y)||C(v,y)):p==="data"?u.filter((v,y)=>{var _;let j=f.routes[v.route.id];if(!j||!j.hasLoader)return!1;if(m(v,y)||C(v,y))return!0;if(v.route.shouldRevalidate){let R=v.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((_=o[0])==null?void 0:_.params)||{},nextUrl:new URL(i,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof R=="boolean")return R}return!0}):[]}function Th(i,u,{includeHydrateFallback:o}={}){return zh(i.map(f=>{let d=u.routes[f.route.id];if(!d)return[];let p=[d.module];return d.clientActionModule&&(p=p.concat(d.clientActionModule)),d.clientLoaderModule&&(p=p.concat(d.clientLoaderModule)),o&&d.hydrateFallbackModule&&(p=p.concat(d.hydrateFallbackModule)),d.imports&&(p=p.concat(d.imports)),p}).flat(1))}function zh(i){return[...new Set(i)]}function Mh(i){let u={},o=Object.keys(i).sort();for(let f of o)u[f]=i[f];return u}function Ah(i,u){let o=new Set;return new Set(u),i.reduce((f,d)=>{let p=JSON.stringify(Mh(d));return o.has(p)||(o.add(p),f.push({key:p,link:d})),f},[])}function bc(){let i=w.useContext(Yn);return ya(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function Ih(){let i=w.useContext(rs);return ya(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var xa=w.createContext(void 0);xa.displayName="FrameworkContext";function Zc(){let i=w.useContext(xa);return ya(i,"You must render this element inside a <HydratedRouter> element"),i}function Oh(i,u){let o=w.useContext(xa),[f,d]=w.useState(!1),[p,m]=w.useState(!1),{onFocus:C,onBlur:v,onMouseEnter:y,onMouseLeave:j,onTouchStart:_}=u,R=w.useRef(null);w.useEffect(()=>{if(i==="render"&&m(!0),i==="viewport"){let D=T=>{T.forEach(H=>{m(H.isIntersecting)})},L=new IntersectionObserver(D,{threshold:.5});return R.current&&L.observe(R.current),()=>{L.disconnect()}}},[i]),w.useEffect(()=>{if(f){let D=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(D)}}},[f]);let P=()=>{d(!0)},M=()=>{d(!1),m(!1)};return o?i!=="intent"?[p,R,{}]:[p,R,{onFocus:Or(C,P),onBlur:Or(v,M),onMouseEnter:Or(y,P),onMouseLeave:Or(j,M),onTouchStart:Or(_,P)}]:[!1,R,{}]}function Or(i,u){return o=>{i&&i(o),o.defaultPrevented||u(o)}}function Dh({page:i,...u}){let{router:o}=bc(),f=w.useMemo(()=>$c(o.routes,i,o.basename),[o.routes,i,o.basename]);return f?w.createElement(Fh,{page:i,matches:f,...u}):null}function $h(i){let{manifest:u,routeModules:o}=Zc(),[f,d]=w.useState([]);return w.useEffect(()=>{let p=!1;return Lh(i,u,o).then(m=>{p||d(m)}),()=>{p=!0}},[i,u,o]),f}function Fh({page:i,matches:u,...o}){let f=an(),{future:d,manifest:p,routeModules:m}=Zc(),{basename:C}=bc(),{loaderData:v,matches:y}=Ih(),j=w.useMemo(()=>Pc(i,u,y,p,f,"data"),[i,u,y,p,f]),_=w.useMemo(()=>Pc(i,u,y,p,f,"assets"),[i,u,y,p,f]),R=w.useMemo(()=>{if(i===f.pathname+f.search+f.hash)return[];let D=new Set,L=!1;if(u.forEach(H=>{var ee;let F=p.routes[H.route.id];!F||!F.hasLoader||(!j.some(U=>U.route.id===H.route.id)&&H.route.id in v&&((ee=m[H.route.id])!=null&&ee.shouldRevalidate)||F.hasClientLoader?L=!0:D.add(H.route.id))}),D.size===0)return[];let T=Eh(i,C,d.unstable_trailingSlashAwareDataRequests,"data");return L&&D.size>0&&T.searchParams.set("_routes",u.filter(H=>D.has(H.route.id)).map(H=>H.route.id).join(",")),[T.pathname+T.search]},[C,d.unstable_trailingSlashAwareDataRequests,v,f,p,j,u,i,m]),P=w.useMemo(()=>Th(_,p),[_,p]),M=$h(_);return w.createElement(w.Fragment,null,R.map(D=>w.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...o})),P.map(D=>w.createElement("link",{key:D,rel:"modulepreload",href:D,...o})),M.map(({key:D,link:L})=>w.createElement("link",{key:D,nonce:o.nonce,...L,crossOrigin:L.crossOrigin??o.crossOrigin})))}function Uh(...i){return u=>{i.forEach(o=>{typeof o=="function"?o(u):o!=null&&(o.current=u)})}}var Bh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bh&&(window.__reactRouterVersion="7.13.0")}catch{}function Wh({basename:i,children:u,unstable_useTransitions:o,window:f}){let d=w.useRef();d.current==null&&(d.current=yp({window:f,v5Compat:!0}));let p=d.current,[m,C]=w.useState({action:p.action,location:p.location}),v=w.useCallback(y=>{o===!1?C(y):w.startTransition(()=>C(y))},[o]);return w.useLayoutEffect(()=>p.listen(v),[p,v]),w.createElement(gh,{basename:i,children:u,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:o})}var ed=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lt=w.forwardRef(function({onClick:u,discover:o="render",prefetch:f="none",relative:d,reloadDocument:p,replace:m,state:C,target:v,to:y,preventScrollReset:j,viewTransition:_,unstable_defaultShouldRevalidate:R,...P},M){let{basename:D,unstable_useTransitions:L}=w.useContext(lt),T=typeof y=="string"&&ed.test(y),H=Wc(y,D);y=H.to;let F=bp(y,{relative:d}),[ee,U,Y]=Oh(f,P),te=Qh(y,{replace:m,state:C,target:v,preventScrollReset:j,relative:d,viewTransition:_,unstable_defaultShouldRevalidate:R,unstable_useTransitions:L});function ue(Ce){u&&u(Ce),Ce.defaultPrevented||te(Ce)}let Ne=w.createElement("a",{...P,...Y,href:H.absoluteURL||F,onClick:H.isExternal||p?u:ue,ref:Uh(M,U),target:v,"data-discover":!T&&o==="render"?"true":void 0});return ee&&!T?w.createElement(w.Fragment,null,Ne,w.createElement(Dh,{page:F})):Ne});Lt.displayName="Link";var td=w.forwardRef(function({"aria-current":u="page",caseSensitive:o=!1,className:f="",end:d=!1,style:p,to:m,viewTransition:C,children:v,...y},j){let _=Ur(m,{relative:y.relative}),R=an(),P=w.useContext(rs),{navigator:M,basename:D}=w.useContext(lt),L=P!=null&&Xh(_)&&C===!0,T=M.encodeLocation?M.encodeLocation(_).pathname:_.pathname,H=R.pathname,F=P&&P.navigation&&P.navigation.location?P.navigation.location.pathname:null;o||(H=H.toLowerCase(),F=F?F.toLowerCase():null,T=T.toLowerCase()),F&&D&&(F=Ut(F,D)||F);const ee=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let U=H===T||!d&&H.startsWith(T)&&H.charAt(ee)==="/",Y=F!=null&&(F===T||!d&&F.startsWith(T)&&F.charAt(T.length)==="/"),te={isActive:U,isPending:Y,isTransitioning:L},ue=U?u:void 0,Ne;typeof f=="function"?Ne=f(te):Ne=[f,U?"active":null,Y?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let Ce=typeof p=="function"?p(te):p;return w.createElement(Lt,{...y,"aria-current":ue,className:Ne,ref:j,style:Ce,to:m,viewTransition:C},typeof v=="function"?v(te):v)});td.displayName="NavLink";var Hh=w.forwardRef(({discover:i="render",fetcherKey:u,navigate:o,reloadDocument:f,replace:d,state:p,method:m=Zl,action:C,onSubmit:v,relative:y,preventScrollReset:j,viewTransition:_,unstable_defaultShouldRevalidate:R,...P},M)=>{let{unstable_useTransitions:D}=w.useContext(lt),L=Yh(),T=Jh(C,{relative:y}),H=m.toLowerCase()==="get"?"get":"post",F=typeof C=="string"&&ed.test(C),ee=U=>{if(v&&v(U),U.defaultPrevented)return;U.preventDefault();let Y=U.nativeEvent.submitter,te=(Y==null?void 0:Y.getAttribute("formmethod"))||m,ue=()=>L(Y||U.currentTarget,{fetcherKey:u,method:te,navigate:o,replace:d,state:p,relative:y,preventScrollReset:j,viewTransition:_,unstable_defaultShouldRevalidate:R});D&&o!==!1?w.startTransition(()=>ue()):ue()};return w.createElement("form",{ref:M,method:H,action:T,onSubmit:f?v:ee,...P,"data-discover":!F&&i==="render"?"true":void 0})});Hh.displayName="Form";function Vh(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nd(i){let u=w.useContext(Yn);return we(u,Vh(i)),u}function Qh(i,{target:u,replace:o,state:f,preventScrollReset:d,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:C,unstable_useTransitions:v}={}){let y=Yc(),j=an(),_=Ur(i,{relative:p});return w.useCallback(R=>{if(Sh(R,u)){R.preventDefault();let P=o!==void 0?o:$r(j)===$r(_),M=()=>y(i,{replace:P,state:f,preventScrollReset:d,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:C});v?w.startTransition(()=>M()):M()}},[j,y,_,o,f,u,i,d,p,m,C,v])}var Kh=0,Gh=()=>`__${String(++Kh)}__`;function Yh(){let{router:i}=nd("useSubmit"),{basename:u}=w.useContext(lt),o=fh(),f=i.fetch,d=i.navigate;return w.useCallback(async(p,m={})=>{let{action:C,method:v,encType:y,formData:j,body:_}=Ch(p,u);if(m.navigate===!1){let R=m.fetcherKey||Gh();await f(R,o,m.action||C,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:_,formMethod:m.method||v,formEncType:m.encType||y,flushSync:m.flushSync})}else await d(m.action||C,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:j,body:_,formMethod:m.method||v,formEncType:m.encType||y,replace:m.replace,state:m.state,fromRouteId:o,flushSync:m.flushSync,viewTransition:m.viewTransition})},[f,d,u,o])}function Jh(i,{relative:u}={}){let{basename:o}=w.useContext(lt),f=w.useContext(ft);we(f,"useFormAction must be used inside a RouteContext");let[d]=f.matches.slice(-1),p={...Ur(i||".",{relative:u})},m=an();if(i==null){p.search=m.search;let C=new URLSearchParams(p.search),v=C.getAll("index");if(v.some(j=>j==="")){C.delete("index"),v.filter(_=>_).forEach(_=>C.append("index",_));let j=C.toString();p.search=j?`?${j}`:""}}return(!i||i===".")&&d.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(p.pathname=p.pathname==="/"?o:Ft([o,p.pathname])),$r(p)}function Xh(i,{relative:u}={}){let o=w.useContext(Vc);we(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:f}=nd("useViewTransitionState"),d=Ur(i,{relative:u});if(!o.isTransitioning)return!1;let p=Ut(o.currentLocation.pathname,f)||o.currentLocation.pathname,m=Ut(o.nextLocation.pathname,f)||o.nextLocation.pathname;return ts(d.pathname,m)!=null||ts(d.pathname,p)!=null}const ns="og_session_token";function qh(){if(typeof document<"u"&&document.baseURI)try{const u=new URL(document.baseURI).pathname.match(/^(.*?)\/dashboard(?:\/|$)/);if(u&&u[1])return u[1]}catch{}return""}const Lc=qh();function rd(){if(typeof window<"u"){const u=new URLSearchParams(window.location.search).get("token");if(u)return localStorage.setItem(ns,u),u}return localStorage.getItem(ns)}function bh(i){localStorage.setItem(ns,i)}function aa(){localStorage.removeItem(ns)}const ld=w.createContext({authenticated:!1,loading:!0,name:"",logout:()=>{},checkSession:async()=>{}});function Zh({children:i}){const[u,o]=w.useState(!1),[f,d]=w.useState(!0),[p,m]=w.useState(""),C=w.useCallback(async()=>{d(!0);try{const y=rd();if(!y){o(!1),m(""),d(!1);return}const _=await(await fetch(`${Lc}/api/auth/me?token=${y}`,{credentials:"include"})).json();_.success?(o(!0),bh(y),m(_.name??"Local Dashboard")):(o(!1),m(""),aa())}catch{o(!1),m(""),aa()}finally{d(!1)}},[]);w.useEffect(()=>{C()},[C]);const v=w.useCallback(()=>{aa(),o(!1),m(""),fetch(`${Lc}/api/auth/logout`,{method:"POST",credentials:"include"}).catch(()=>{})},[]);return l.jsx(ld.Provider,{value:{authenticated:u,loading:f,name:p,logout:v,checkSession:C},children:i})}function sd(){return w.useContext(ld)}const id=w.createContext({theme:"system",resolved:"dark",setTheme:()=>{}}),Tc="og_theme";function ad(){return window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function em(i){return i==="system"?ad():i}function tm({children:i}){const[u,o]=w.useState(()=>{const p=localStorage.getItem(Tc);return p==="dark"||p==="light"||p==="system"?p:"system"}),f=em(u);w.useEffect(()=>{document.documentElement.setAttribute("data-theme",f)},[f]),w.useEffect(()=>{if(u!=="system")return;const p=window.matchMedia("(prefers-color-scheme: light)"),m=()=>{document.documentElement.setAttribute("data-theme",ad())};return p.addEventListener("change",m),()=>p.removeEventListener("change",m)},[u]);const d=w.useCallback(p=>{o(p),localStorage.setItem(Tc,p)},[]);return l.jsx(id.Provider,{value:{theme:u,resolved:f,setTheme:d},children:i})}function nm(){return w.useContext(id)}const zc=[{value:"light",label:"Light",icon:l.jsxs("svg",{className:"theme-icon",viewBox:"0 0 24 24",children:[l.jsx("circle",{cx:"12",cy:"12",r:"5"}),l.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),l.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),l.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),l.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),l.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),l.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),l.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),l.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]})},{value:"system",label:"System",icon:l.jsxs("svg",{className:"theme-icon",viewBox:"0 0 24 24",children:[l.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",ry:"2"}),l.jsx("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),l.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]})},{value:"dark",label:"Dark",icon:l.jsx("svg",{className:"theme-icon",viewBox:"0 0 24 24",children:l.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})}];function rm(){const{theme:i,setTheme:u}=nm(),o=zc.findIndex(f=>f.value===i);return l.jsx("div",{className:"theme-toggle",children:l.jsxs("div",{className:"theme-toggle__track",style:{"--theme-index":o},children:[l.jsx("div",{className:"theme-toggle__indicator"}),zc.map(f=>l.jsx("button",{className:`theme-toggle__button${i===f.value?" active":""}`,onClick:()=>u(f.value),title:f.label,"aria-label":`Switch to ${f.label} theme`,children:f.icon},f.value))]})})}const lm="/dashboard/".replace(/\/$/,"")||"";function sm(){const{logout:i}=sd();return l.jsxs("header",{className:"topbar",children:[l.jsx("div",{className:"topbar-left",children:l.jsxs(Lt,{to:"/",className:"brand",children:[l.jsx("div",{className:"brand-logo",children:l.jsx("img",{src:`${lm}/logo.svg`,alt:"OpenGuardrails"})}),l.jsx("span",{className:"brand-title",children:"OpenGuardrails"})]})}),l.jsxs("div",{className:"topbar-status",children:[l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:"statusDot ok"}),l.jsx("span",{children:"Online"})]}),l.jsx(rm,{}),l.jsx("button",{className:"btn btn--sm",onClick:i,children:"Logout"})]})]})}/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const od=(...i)=>i.filter((u,o,f)=>!!u&&u.trim()!==""&&f.indexOf(u)===o).join(" ").trim();/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const im=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const am=i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,o,f)=>f?f.toUpperCase():o.toLowerCase());/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Mc=i=>{const u=am(i);return u.charAt(0).toUpperCase()+u.slice(1)};/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var om={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"};/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const um=i=>{for(const u in i)if(u.startsWith("aria-")||u==="role"||u==="title")return!0;return!1};/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const cm=w.forwardRef(({color:i="currentColor",size:u=24,strokeWidth:o=2,absoluteStrokeWidth:f,className:d="",children:p,iconNode:m,...C},v)=>w.createElement("svg",{ref:v,...om,width:u,height:u,stroke:i,strokeWidth:f?Number(o)*24/Number(u):o,className:od("lucide",d),...!p&&!um(C)&&{"aria-hidden":"true"},...C},[...m.map(([y,j])=>w.createElement(y,j)),...Array.isArray(p)?p:[p]]));/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const We=(i,u)=>{const o=w.forwardRef(({className:f,...d},p)=>w.createElement(cm,{ref:p,iconNode:u,className:od(`lucide-${im(Mc(i))}`,`lucide-${i}`,f),...d}));return o.displayName=Mc(i),o};/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const dm=[["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"}]],fm=We("activity",dm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const pm=[["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"}]],ud=We("bot",pm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const hm=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Ac=We("circle-check-big",hm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mm=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],vm=We("clock",mm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gm=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ym=We("external-link",gm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xm=[["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M4 12v6",key:"bg1pfk"}],["path",{d:"M4 14h2",key:"1sf9f8"}],["path",{d:"M9.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v4",key:"d56i0q"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],wm=We("file-key",xm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const jm=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],km=We("house",jm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Sm=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],cd=We("key",Sm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _m=[["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"}]],Nm=We("lock",_m);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Cm=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Em=We("server",Cm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Rm=[["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"}]],Pm=We("settings",Rm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Lm=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Tm=We("shield-check",Lm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const zm=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],Mm=We("shield-off",zm);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Am=[["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"}]],Im=We("shield",Am);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Om=[["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"}]],dd=We("triangle-alert",Om);/**
* @license lucide-react v0.564.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Dm=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],$m=We("zap",Dm),Fm=[{label:"Overview",to:"/overview",icon:l.jsx(km,{size:18})},{label:"Agents",to:"/agents",icon:l.jsx(ud,{size:18})},{label:"Activity",to:"/activity",icon:l.jsx(fm,{size:18})},{label:"Security",to:"/security",icon:l.jsx(Im,{size:18})},{label:"Gateway",to:"/gateway",icon:l.jsx(Tm,{size:18})},{label:"Secrets",to:"/secrets",icon:l.jsx(cd,{size:18})},{label:"Settings",to:"/settings",icon:l.jsx(Pm,{size:18})}];function Um(){return l.jsx("nav",{className:"nav",children:l.jsx("div",{className:"nav-items",children:Fm.map(i=>l.jsxs(td,{to:i.to,className:({isActive:u})=>`nav-item${u?" active":""}`,children:[l.jsx("span",{className:"nav-item__icon",children:i.icon}),l.jsx("span",{className:"nav-item__text",children:i.label})]},i.to))})})}function Bm(){return l.jsxs("div",{className:"shell",children:[l.jsx(sm,{}),l.jsx(Um,{}),l.jsx("main",{className:"content",children:l.jsx(vh,{})})]})}const Ic="/dashboard/".replace(/\/$/,"");function Wm(){return rd()}async function fe(i,u){const o=Wm(),f={"Content-Type":"application/json",...u==null?void 0:u.headers};o&&(f.Authorization=`Bearer ${o}`);const d=i.startsWith("/")?Ic+i:Ic+"/"+i;return(await fetch(d,{...u,headers:f})).json()}const pe={verifyToken:i=>fe("/api/session/verify",{method:"POST",body:JSON.stringify({token:i})}),logout:()=>fe("/api/session/logout",{method:"POST"}),listDiscoveryAgents:()=>fe("/api/discovery/agents"),getDiscoveryAgent:i=>fe(`/api/discovery/agents/${encodeURIComponent(i)}`),scanAgents:()=>fe("/api/discovery/scan",{method:"POST"}),getAgentProfile:i=>fe(`/api/discovery/agents/${encodeURIComponent(i)}/profile`),getAgentSummary:i=>fe(`/api/discovery/agents/${encodeURIComponent(i)}/summary`),getAgentPermissions:i=>fe(`/api/observations/agents/${encodeURIComponent(i)}/permissions`),getAgentObservations:(i,u=50)=>fe(`/api/observations/agents/${encodeURIComponent(i)}/observations?limit=${u}`),getAllObservations:(i=100)=>fe(`/api/observations?limit=${i}`),getAllPermissions:()=>fe("/api/observations/permissions"),getObservationSummary:()=>fe("/api/observations/summary"),getAnomalies:()=>fe("/api/observations/anomalies"),listAgents:()=>fe("/api/agents"),getDetections:i=>{const u=new URLSearchParams;i!=null&&i.limit&&u.set("limit",String(i.limit)),i!=null&&i.unsafe&&u.set("unsafe","true");const o=u.toString();return fe(`/api/detections${o?`?${o}`:""}`)},getDetectionSummary:()=>fe("/api/detections/summary"),getSettings:()=>fe("/api/settings"),updateSettings:i=>fe("/api/settings",{method:"PUT",body:JSON.stringify(i)}),getConnectionStatus:()=>fe("/api/settings/connection-status"),getGatewayStatus:()=>fe("/api/gateway/status"),getGatewayConfig:()=>fe("/api/gateway/config"),getGatewayHealth:()=>fe("/api/gateway/health"),getGatewayActivity:i=>{const u=new URLSearchParams;i!=null&&i.limit&&u.set("limit",String(i.limit)),i!=null&&i.type&&u.set("type",i.type);const o=u.toString();return fe(`/api/gateway/activity${o?`?${o}`:""}`)},getGatewayActivityStats:()=>fe("/api/gateway/activity/stats"),getAgenticHoursToday:()=>fe("/api/agentic-hours/today"),getAgenticHoursDaily:i=>{const u=new URLSearchParams;i!=null&&i.from&&u.set("from",i.from),i!=null&&i.to&&u.set("to",i.to);const o=u.toString();return fe(`/api/agentic-hours/daily${o?`?${o}`:""}`)},getAgenticHoursByAgent:i=>{const u=new URLSearchParams;i!=null&&i.from&&u.set("from",i.from),i!=null&&i.to&&u.set("to",i.to);const o=u.toString();return fe(`/api/agentic-hours/by-agent${o?`?${o}`:""}`)}};function ss(i,u){var f;const o=new Map;for(const d of u)o.set(d.id,{name:d.name,emoji:((f=d.metadata)==null?void 0:f.emoji)||"🤖"});for(const d of i)o.set(d.id,{name:d.name,emoji:d.emoji||"🤖"});return o}const Hm={S01:"Prompt Injection",S02:"System Override",S03:"Web Attacks",S04:"MCP Tool Poisoning",S05:"Malicious Code Execution",S06:"NSFW Content",S07:"PII Exposure",S08:"Credential Leakage",S09:"Confidential Data",S10:"Off-Topic Drift"};function Vm(i){return Hm[i]||i}function Qm(i){const u=new Date(i),f=new Date().getTime()-u.getTime(),d=Math.floor(f/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const p=Math.floor(d/60);return p<24?`${p}h ago`:`${Math.floor(p/24)}d ago`}function Dr({icon:i,label:u,value:o,variant:f="default",link:d}){const p=l.jsxs("div",{className:`stat-card stat-card--${f}`,children:[l.jsx("div",{className:"stat-card__icon",children:i}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__value",children:o}),l.jsx("div",{className:"stat-card__label",children:u})]})]});return d?l.jsx(Lt,{to:d,className:"stat-card-link",children:p}):p}function Km(){const[i,u]=w.useState([]),[o,f]=w.useState([]),[d,p]=w.useState(null),[m,C]=w.useState([]),[v,y]=w.useState(null),[j,_]=w.useState(new Map),[R,P]=w.useState(!0);w.useEffect(()=>{let U=!1;return(async()=>{try{const[Y,te,ue,Ne,Ce,kt]=await Promise.all([pe.listAgents(),pe.getDetections({limit:10,unsafe:!0}),pe.getDetectionSummary(),pe.getObservationSummary(),pe.listDiscoveryAgents(),pe.getAgenticHoursToday()]);if(U)return;Y.success&&u(Y.data),te.success&&f(te.data),ue.success&&p(ue.data),Ne.success&&C(Ne.data),kt.success&&y(kt.data);const st=ss(Ce.success?Ce.data:[],Y.success?Y.data:[]);_(st)}catch{}finally{U||P(!1)}})(),()=>{U=!0}},[]);const M=U=>{if(U<1e3)return"0s";const Y=Math.floor(U/1e3);if(Y<60)return`${Y}s`;const te=Math.floor(Y/60),ue=Y%60;if(te<60)return ue>0?`${te}m ${ue}s`:`${te}m`;const Ne=Math.floor(te/60),Ce=te%60;return Ce>0?`${Ne}h ${Ce}m`:`${Ne}h`},D=i.filter(U=>U.status==="active").length,L=(v==null?void 0:v.toolCallCount)??m.reduce((U,Y)=>U+Y.totalCalls,0),T=m.reduce((U,Y)=>U+Y.blockedCalls,0),H=(d==null?void 0:d.unsafe)||0,F=U=>U.sensitivityScore>=.8?{label:"Critical",cls:"risk-critical"}:U.sensitivityScore>=.6?{label:"High",cls:"risk-high"}:U.sensitivityScore>=.4?{label:"Medium",cls:"risk-medium"}:{label:"Low",cls:"risk-low"},ee=U=>{if(!U)return"Unknown";const Y=j.get(U);return Y?`${Y.emoji} ${Y.name}`:U.slice(0,8)};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"content-header",children:l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Overview"}),l.jsx("p",{className:"page-sub",children:"Agent status and security summary"})]})}),R?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading dashboard..."})}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"stats-grid",children:[l.jsx(Dr,{icon:l.jsx(vm,{size:24}),label:"Agentic Hours",value:M((v==null?void 0:v.totalDurationMs)??0)}),l.jsx(Dr,{icon:l.jsx(ud,{size:24}),label:"Active Agents",value:D,variant:"success",link:"/agents"}),l.jsx(Dr,{icon:l.jsx($m,{size:24}),label:"Actions Today",value:L,link:"/activity"}),l.jsx(Dr,{icon:l.jsx(Mm,{size:24}),label:"Blocked Actions",value:T,variant:T>0?"warning":"default",link:"/activity"}),l.jsx(Dr,{icon:l.jsx(dd,{size:24}),label:"Security Alerts",value:H,variant:H>0?"danger":"success",link:"/security"})]}),l.jsxs("div",{className:"overview-section",children:[l.jsxs("div",{className:"overview-section__header",children:[l.jsx("h2",{className:"overview-section__title",children:"Recent Security Events"}),l.jsx(Lt,{to:"/security",className:"overview-section__link",children:"View all"})]}),o.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No security events"}),l.jsx("div",{className:"card-sub",children:"No security risks have been detected. Your agents are operating safely."})]}):l.jsx("div",{className:"events-list",children:o.slice(0,5).map(U=>{const Y=F(U);return l.jsxs("div",{className:"event-item",children:[l.jsx("div",{className:"event-item__risk",children:l.jsx("span",{className:`access-pill ${Y.cls}`,children:Y.label})}),l.jsxs("div",{className:"event-item__content",children:[l.jsx("div",{className:"event-item__agent",children:ee(U.agentId)}),l.jsx("div",{className:"event-item__categories",children:U.categories.map((te,ue)=>l.jsx("span",{className:"chip",children:Vm(te)},ue))})]}),l.jsx("div",{className:"event-item__time",children:Qm(U.createdAt)})]},U.id)})})]}),l.jsxs("div",{className:"overview-section",children:[l.jsxs("div",{className:"overview-section__header",children:[l.jsx("h2",{className:"overview-section__title",children:"Agent Activity"}),l.jsx(Lt,{to:"/agents",className:"overview-section__link",children:"View all agents"})]}),i.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No agents connected"}),l.jsx("div",{className:"card-sub",children:"Agents appear here after the MoltGuard plugin connects for the first time."})]}):l.jsx("div",{className:"activity-summary",children:i.slice(0,5).map(U=>{const Y=m.find(ue=>ue.agentId===U.id),te=U.metadata;return l.jsxs(Lt,{to:`/agents/${te.openclawId||U.id}`,className:"activity-summary__item",children:[l.jsx("div",{className:"activity-summary__avatar",children:te.emoji||"🤖"}),l.jsxs("div",{className:"activity-summary__info",children:[l.jsx("div",{className:"activity-summary__name",children:U.name}),l.jsxs("div",{className:"activity-summary__stats",children:[l.jsxs("span",{children:[(Y==null?void 0:Y.totalCalls)||0," actions"]}),l.jsx("span",{className:"activity-summary__dot"}),l.jsxs("span",{children:[(Y==null?void 0:Y.uniqueTools)||0," tools"]}),Y&&Y.blockedCalls>0&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"activity-summary__dot"}),l.jsxs("span",{className:"activity-summary__blocked",children:[Y.blockedCalls," blocked"]})]})]})]}),l.jsxs("div",{className:"activity-summary__status",children:[l.jsx("span",{className:`statusDot ${U.status==="active"?"ok":"warn"}`}),l.jsx("span",{children:U.status})]})]},U.id)})})]})]})]})}const oa=4;function Gm(){const[i,u]=w.useState([]),[o,f]=w.useState(!0),[d,p]=w.useState("");w.useEffect(()=>{pe.listAgents().then(v=>{v.success&&u(v.data),f(!1)})},[]);const m=i.filter(v=>{if(!d)return!0;const y=d.toLowerCase(),j=v.metadata;return v.name.toLowerCase().includes(y)||(v.description??"").toLowerCase().includes(y)||v.provider.toLowerCase().includes(y)||(j.model??"").toLowerCase().includes(y)||(j.creature??"").toLowerCase().includes(y)||(j.ownerName??"").toLowerCase().includes(y)||(j.skills??[]).some(_=>_.name.toLowerCase().includes(y))}),C=v=>{if(!v)return"Never";const y=new Date(v),_=new Date().getTime()-y.getTime(),R=Math.floor(_/6e4);if(R<1)return"Just now";if(R<60)return`${R}m ago`;const P=Math.floor(R/60);return P<24?`${P}h ago`:`${Math.floor(P/24)}d ago`};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"content-header",children:l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"AI Agents"}),l.jsx("p",{className:"page-sub",children:"AI agents connected to OpenGuardrails"})]})}),l.jsxs("div",{className:"filters",children:[l.jsx("div",{className:"field",style:{minWidth:260},children:l.jsx("input",{type:"text",placeholder:"Search agents, models, skills...",value:d,onChange:v=>p(v.target.value)})}),l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:"statusDot ok"}),l.jsxs("span",{children:[m.length," agent",m.length!==1?"s":""]})]})]}),o?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading agents..."})}):m.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No agents found"}),l.jsx("div",{className:"card-sub",children:d?"Try a different search term":"Agents appear here after the MoltGuard plugin connects for the first time."})]}):l.jsx("div",{className:"agents-grid",children:m.map((v,y)=>{const j=v.metadata,_=j.skills??[],R=j.model||"",M=[v.provider!=="custom"?v.provider:(j.model,""),R].filter(Boolean).join("/"),D=j.openclawId??v.id;return l.jsxs(Lt,{to:`/agents/${D}`,className:`agent-card stagger-${Math.min(y+1,6)}`,children:[l.jsxs("div",{className:"agent-card__header",children:[l.jsx("div",{className:"agent-card__avatar",children:j.emoji||"🤖"}),l.jsxs("div",{className:"agent-card__info",children:[l.jsx("div",{className:"agent-card__name",children:v.name}),j.creature&&l.jsx("div",{className:"agent-card__creature",children:j.creature})]})]}),M&&l.jsx("div",{className:"agent-card__model",children:M.includes("/")?l.jsxs(l.Fragment,{children:[l.jsx("span",{children:M.split("/")[0]}),l.jsx("span",{children:"/"}),l.jsx("span",{children:M.split("/")[1]})]}):l.jsx("span",{children:M})}),j.ownerName&&l.jsx("div",{className:"agent-card__owner",children:j.ownerName}),_.length>0&&l.jsxs("div",{className:"agent-card__skills",children:[_.slice(0,oa).map(L=>l.jsx("span",{className:"skill-pill",children:L.name},L.name)),_.length>oa&&l.jsxs("span",{className:"skill-pill overflow",children:["+",_.length-oa]})]}),l.jsxs("div",{className:"agent-card__footer",children:[l.jsx("span",{className:`statusDot ${v.status==="active"?"ok":"warn"}`,style:{display:"inline-block",marginRight:4}}),l.jsx("span",{children:v.status}),l.jsx("span",{children:C(v.lastSeenAt)})]})]},v.id)})})]})}const Ym=i=>i?new Date(i).toLocaleString():"Never";function Jm(i){const u={headline:"",coreTruths:[],boundaries:[],vibe:"",continuity:[],raw:i};if(!i)return u;let o="";for(const f of i.split(`
`)){const d=f.trim(),p=d.match(/^#{1,3}\s+(.+)/);if(p){const C=p[1].toLowerCase();C.includes("core truth")?o="truths":C.includes("boundar")?o="boundaries":C.includes("vibe")?o="vibe":C.includes("continuity")?o="continuity":o="";continue}const m=d.replace(/^[-*]\s+/,"");!m||m===d.replace(/\s/g,"")||((d.startsWith("-")||d.startsWith("*"))&&(o==="truths"?u.coreTruths.push(m):o==="boundaries"?u.boundaries.push(m):o==="continuity"&&u.continuity.push(m)),o==="vibe"&&d&&!d.startsWith("#")&&(u.vibe?u.vibe+=" "+d:u.vibe=d))}return u}function Xm(i){const u={name:"",timezone:"",context:[],raw:i};if(!i)return u;for(const o of i.split(`
`)){const f=o.trim(),d=f.match(/^[-*]?\s*\*\*name:\*\*\s*(.*)/i)||f.match(/^\*?\*?name\*?\*?:\s*(.*)/i);if(d&&!u.name){const m=d[1].replace(/^\*?\*?\s*/,"").trim();if(m){u.name=m;continue}}const p=f.match(/^[-*]?\s*\*\*timezone:\*\*\s*(.*)/i)||f.match(/^\*?\*?timezone\*?\*?:\s*(.*)/i);if(p&&!u.timezone){const m=p[1].replace(/^\*?\*?\s*/,"").trim();if(m){u.timezone=m;continue}}if(f.startsWith("-")||f.startsWith("*")){const m=f.replace(/^[-*]\s+/,"").trim();m&&!/^-+$/.test(m)&&u.context.push(m)}}return u}const qm={Communication:["discord","slack","wacli","imsg","bluebubbles","voice-call","himalaya","email"],"Media & Audio":["camsnap","gifgrep","nano-banana-pro","video-frames","openai-image-gen","image-gen","screenshot","webcam","media"],Development:["github","coding-agent","mcporter","oracle","git","npm","code"],Productivity:["apple-notes","bear-notes","notion","obsidian","things-mac","trello","todoist","calendar","reminders","notes"],Music:["spotify-player","sonoscli","blucli","music","audio"],"Smart Home":["openhue","eightctl","homekit","hue"],Security:["moltguard","healthcheck","guard","monitor"],"Web & Search":["web-search","browser","fetch","scrape","search"],"Files & Storage":["file-manager","dropbox","gdrive","icloud","files"],"AI & Models":["openai","anthropic","gemini","llm","model","ai"]};function bm(i){const u=i.toLowerCase();for(const[o,f]of Object.entries(qm))if(f.some(d=>u.includes(d)))return o;return"Other"}function Zm(i){const u={};for(const d of i){const p=bm(d.name);u[p]||(u[p]=[]),u[p].push(d)}const o={},f=Object.keys(u).sort((d,p)=>d==="Other"?1:p==="Other"?-1:d.localeCompare(p));for(const d of f)o[d]=u[d];return o}function Kn({title:i,content:u}){const[o,f]=w.useState(!1);return u?l.jsxs("div",{className:"raw-file-viewer",children:[l.jsxs("button",{className:"raw-file-viewer__header",onClick:()=>f(!o),children:[l.jsx("span",{children:i}),l.jsx("span",{className:"raw-file-viewer__chevron",children:o?"▼":"▶"})]}),o&&l.jsx("div",{className:"raw-file-viewer__content",children:l.jsx("pre",{children:u})})]}):null}function ev(){const{id:i}=nh(),[u,o]=w.useState(null),[f,d]=w.useState(!0),[p,m]=w.useState("profile"),[C,v]=w.useState([]);if(w.useEffect(()=>{if(!i)return;let M=!1;return(async()=>{try{const D=await pe.getAgentProfile(i);if(M)return;if(D.success){o(D.data);const L=D.data.registeredAgentId||i,T=await pe.getAgentPermissions(L);!M&&T.success&&v(T.data)}}catch{}finally{M||d(!1)}})(),()=>{M=!0}},[i]),f)return l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading agent profile..."})});if(!u)return l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"Agent not found"}),l.jsx("div",{className:"card-sub",children:l.jsx(Lt,{to:"/agents",children:"Back to agents"})})]});const y=Jm(u.workspaceFiles.soul),j=Xm(u.workspaceFiles.user),_=Zm(u.allSkills),R=[u.creature,u.vibe].filter(Boolean).join(" — "),P=[{key:"profile",label:"Profile"},{key:"tasks",label:"Bot Tasks"},{key:"identities",label:"Identities"},{key:"permissions",label:"Permissions"}];return l.jsxs(l.Fragment,{children:[l.jsx(Lt,{to:"/agents",className:"profile-back",children:"← Back to Agents"}),l.jsxs("div",{className:"profile-waterfall",children:[l.jsxs("div",{className:"profile-hero",children:[l.jsx("div",{className:"profile-hero__avatar",children:u.avatarUrl?l.jsx("img",{src:u.avatarUrl,alt:u.name,className:"profile-hero__avatar-img"}):u.emoji}),l.jsxs("div",{className:"profile-hero__info",children:[l.jsx("h1",{className:"profile-hero__name",children:u.name}),R&&l.jsx("div",{className:"profile-hero__creature",children:R}),u.channels.length>0&&l.jsx("div",{className:"profile-hero__channels",children:u.channels.map(M=>l.jsx("span",{className:"channel-pill",children:M},M))}),l.jsx("div",{className:"profile-hero__model",children:l.jsxs("span",{className:"mono",children:[u.provider," / ",u.model]})}),(u.ownerName||j.timezone)&&l.jsxs("div",{className:"profile-hero__owner",children:[u.ownerName&&l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"profile-hero__owner-label",children:"Owner"}),l.jsx("span",{className:"profile-hero__owner-name",children:u.ownerName})]}),j.timezone&&l.jsx("span",{className:"profile-hero__owner-tz",children:j.timezone})]})]})]}),l.jsx("div",{className:"profile-tabs",children:P.map(M=>l.jsx("button",{className:`profile-tab${p===M.key?" profile-tab--active":""}`,onClick:()=>m(M.key),children:M.label},M.key))}),p==="profile"&&l.jsx("div",{className:"profile-tab-content",children:l.jsx(tv,{profile:u,soulData:y,userData:j,skillGroups:_})}),p==="tasks"&&l.jsx(nv,{profile:u}),p==="identities"&&l.jsx(rv,{profile:u,permissions:C}),p==="permissions"&&l.jsx(lv,{permissions:C,formatDate:Ym})]})]})}function tv({profile:i,soulData:u,userData:o,skillGroups:f}){return l.jsxs("div",{className:"profile-view",children:[(u.coreTruths.length>0||u.vibe||u.boundaries.length>0)&&l.jsxs("div",{className:"profile-section persona-about",children:[l.jsx("div",{className:"profile-section__title",children:"About"}),u.vibe&&l.jsx("div",{className:"persona-headline",children:u.vibe}),u.coreTruths.length>0&&l.jsxs("div",{className:"persona-section",children:[l.jsx("div",{className:"persona-section__label",children:"Core Traits"}),l.jsx("div",{className:"persona-traits",children:u.coreTruths.map((d,p)=>l.jsx("span",{className:"persona-trait-pill",children:d},p))})]}),u.boundaries.length>0&&l.jsxs("div",{className:"persona-section",children:[l.jsx("div",{className:"persona-section__label",children:"Boundaries"}),l.jsx("ul",{className:"persona-boundaries",children:u.boundaries.map((d,p)=>l.jsx("li",{children:d},p))})]}),u.continuity.length>0&&l.jsxs("div",{className:"persona-section",children:[l.jsx("div",{className:"persona-section__label",children:"Continuity"}),l.jsx("ul",{className:"persona-boundaries",children:u.continuity.map((d,p)=>l.jsx("li",{children:d},p))})]})]}),o.raw&&l.jsxs("div",{className:"profile-section persona-about",children:[l.jsx("div",{className:"profile-section__title",children:"Owner"}),o.name&&l.jsx("div",{className:"persona-headline",children:o.name}),o.timezone&&l.jsxs("div",{className:"persona-section",children:[l.jsx("div",{className:"persona-section__label",children:"Timezone"}),l.jsx("span",{className:"pill",children:o.timezone})]}),o.context.length>0&&l.jsxs("div",{className:"persona-section",children:[l.jsx("div",{className:"persona-section__label",children:"Context"}),l.jsx("ul",{className:"persona-boundaries",children:o.context.map((d,p)=>l.jsx("li",{children:d},p))})]})]}),(i.allSkills.length>0||i.plugins.length>0||i.bundledExtensions.length>0)&&l.jsxs("div",{className:"profile-section",children:[l.jsxs("div",{className:"profile-section__title",children:["Possessed Ability",l.jsx("span",{className:"profile-section__subtitle",children:"Configured skills and plugins"})]}),i.allSkills.length>0&&l.jsxs("div",{className:"possessed-subsection",children:[l.jsxs("div",{className:"possessed-subsection__label",children:["Skills",l.jsx("span",{className:"profile-section__count",children:i.allSkills.length})]}),l.jsx("div",{className:"possessed-hierarchy-hint",children:"workspace > bundled"}),Object.entries(f).map(([d,p])=>l.jsxs("div",{className:"skill-category",children:[l.jsx("div",{className:"skill-category__label",children:d}),l.jsx("div",{className:"skill-grid",children:p.map(m=>l.jsxs("span",{className:`skill-card${m.source==="workspace"?" skill-card--workspace":""}`,"data-tip":m.description||"",children:[m.emoji&&l.jsx("span",{className:"skill-card__emoji",children:m.emoji}),l.jsx("span",{className:"skill-card__name",children:m.name}),l.jsx("span",{className:"skill-card__badge",children:m.source==="workspace"?"workspace":"bundled"})]},`${m.source}-${m.name}`))})]},d))]}),i.plugins.length>0&&l.jsxs("div",{className:"possessed-subsection",children:[l.jsxs("div",{className:"possessed-subsection__label",children:["Configured Plugins",l.jsx("span",{className:"profile-section__count",children:i.plugins.length})]}),l.jsx("div",{className:"profile-section__grid",children:i.plugins.map(d=>{const p=i.bundledExtensions.find(m=>m.name===d.name);return l.jsxs("div",{className:"list-item","data-tip":(p==null?void 0:p.description)||"",children:[l.jsx("div",{children:l.jsx("div",{className:"list-title",children:d.name})}),l.jsx("div",{className:"list-meta",children:l.jsx("span",{className:`chip ${d.enabled?"ok":"warn"}`,children:d.enabled?"Active":"Disabled"})})]},d.name)})})]}),i.bundledExtensions.length>0&&l.jsxs("div",{className:"possessed-subsection",children:[l.jsxs("div",{className:"possessed-subsection__label",children:["Bundled Extensions",l.jsx("span",{className:"profile-section__count",children:i.bundledExtensions.length})]}),l.jsx("div",{className:"skill-grid",children:i.bundledExtensions.map(d=>l.jsxs("span",{className:"skill-card","data-tip":d.description||"",children:[l.jsx("span",{className:"skill-card__name",children:d.name}),l.jsx("span",{className:"skill-card__badge",children:"bundled"})]},d.name))})]})]}),l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Raw Data Files"}),l.jsxs("div",{className:"raw-files-list",children:[l.jsx(Kn,{title:"SOUL.md",content:i.workspaceFiles.soul}),l.jsx(Kn,{title:"IDENTITY.md",content:i.workspaceFiles.identity}),l.jsx(Kn,{title:"USER.md",content:i.workspaceFiles.user}),l.jsx(Kn,{title:"AGENTS.md",content:i.workspaceFiles.agents}),l.jsx(Kn,{title:"TOOLS.md",content:i.workspaceFiles.tools}),l.jsx(Kn,{title:"HEARTBEAT.md",content:i.workspaceFiles.heartbeat})]})]})]})}function nv({profile:i}){const u=!!i.workspaceFiles.heartbeat,o=i.cronJobs.length>0;return u||o?l.jsxs("div",{className:"tasks-view",children:[u&&l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Heartbeat"}),l.jsx("div",{className:"profile-summary__content",children:i.workspaceFiles.heartbeat.replace(/^#\s*HEARTBEAT\.md\s*\n*/i,"").trim()})]}),o&&l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Scheduled Jobs"}),l.jsx("div",{className:"profile-section__list",children:i.cronJobs.map((d,p)=>{var m;return l.jsxs("div",{className:"profile-section__list-item",children:[l.jsx("span",{children:d.name||d.task||d.id||`Job ${p+1}`}),d.schedule&&l.jsx("span",{className:"mono",style:{color:"var(--muted)",fontSize:11},children:typeof d.schedule=="string"?d.schedule:d.schedule.expr||JSON.stringify(d.schedule)}),d.enabled!==void 0&&l.jsx("span",{className:`chip ${d.enabled?"ok":"warn"}`,children:d.enabled?"Active":"Disabled"}),((m=d.payload)==null?void 0:m.text)&&l.jsx("div",{style:{marginTop:4,fontSize:12,color:"var(--muted)"},children:d.payload.text})]},d.id||p)})})]})]}):l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Bot Tasks"}),l.jsx("div",{className:"profile-summary__empty",children:"No heartbeat or scheduled jobs configured."})]})}function rv({profile:i,permissions:u}){const[o,f]=w.useState(null),d=new Map;for(const v of u){const y=v.category||"unknown";let j=d.get(y);j||(j={category:y,perms:[],targets:new Set,totalCalls:0,lastSeen:v.lastSeen,accessPatterns:new Set},d.set(y,j)),j.perms.push(v),j.totalCalls+=v.callCount,v.accessPattern&&j.accessPatterns.add(v.accessPattern),v.lastSeen>j.lastSeen&&(j.lastSeen=v.lastSeen);for(const _ of v.targetsJson||[])j.targets.add(_)}const p=[...d.values()].sort((v,y)=>y.totalCalls-v.totalCalls);if(p.length===0)return l.jsx("div",{className:"identities-view",children:l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Identities"}),l.jsx("div",{className:"profile-summary__empty",children:"No identity data available. Tool call observations will appear here once the agent starts making API calls."})]})});const m=v=>({github:"GitHub",slack:"Slack",gmail:"Gmail",filesystem:"Filesystem",shell:"Shell",jira:"Jira",notion:"Notion",docker:"Docker",postgres:"PostgreSQL",redis:"Redis",aws:"AWS",exec:"Exec"})[v]||v.charAt(0).toUpperCase()+v.slice(1),C=v=>{const y=Date.now()-new Date(v).getTime(),j=Math.floor(y/6e4);if(j<1)return"Just now";if(j<60)return`${j}m ago`;const _=Math.floor(j/60);return _<24?`${_}h ago`:`${Math.floor(_/24)}d ago`};return l.jsx("div",{className:"identities-view",children:l.jsx("div",{className:"identity-grid",children:p.map(v=>{const y=o===v.category;return l.jsxs("div",{className:"identity-card",children:[l.jsxs("button",{className:"identity-card__header",onClick:()=>f(y?null:v.category),children:[l.jsxs("div",{className:"identity-card__title",children:[l.jsx("span",{className:"identity-card__name",children:m(v.category)}),l.jsx("span",{className:"identity-card__category mono",children:v.category})]}),l.jsx("span",{className:"identity-card__chevron",children:y?"▲":"▼"})]}),l.jsxs("div",{className:"identity-card__stats",children:[l.jsxs("div",{className:"identity-stat",children:[l.jsx("span",{className:"identity-stat__label",children:"Calls"}),l.jsx("span",{className:"identity-stat__value",children:v.totalCalls})]}),l.jsxs("div",{className:"identity-stat",children:[l.jsx("span",{className:"identity-stat__label",children:"Tools"}),l.jsx("span",{className:"identity-stat__value",children:v.perms.length})]}),l.jsxs("div",{className:"identity-stat",children:[l.jsx("span",{className:"identity-stat__label",children:"Targets"}),l.jsx("span",{className:"identity-stat__value",children:v.targets.size})]}),l.jsxs("div",{className:"identity-stat",children:[l.jsx("span",{className:"identity-stat__label",children:"Last seen"}),l.jsx("span",{className:"identity-stat__value",children:C(v.lastSeen)})]})]}),l.jsx("div",{className:"identity-card__pills",children:[...v.accessPatterns].map(j=>l.jsx("span",{className:`access-pill ${j}`,children:j},j))}),v.targets.size>0&&l.jsxs("div",{className:"identity-card__targets",children:[[...v.targets].slice(0,6).map(j=>l.jsx("span",{className:"chip",children:j},j)),v.targets.size>6&&l.jsxs("span",{className:"chip",style:{borderStyle:"dashed",color:"var(--muted)"},children:["+",v.targets.size-6]})]}),y&&l.jsx("div",{className:"identity-card__detail",children:l.jsxs("div",{className:"identity-detail__section",children:[l.jsx("div",{className:"identity-detail__heading",children:"Tools observed"}),l.jsx("div",{className:"identity-detail__tools",children:v.perms.map(j=>l.jsxs("div",{className:"identity-tool-row",children:[l.jsx("span",{className:"mono",children:j.toolName}),l.jsx("span",{className:`access-pill ${j.accessPattern}`,children:j.accessPattern}),l.jsxs("span",{className:"identity-tool-row__count",children:[j.callCount,"x"]})]},j.id))})]})})]},v.category)})})})}function lv({permissions:i,formatDate:u}){return i.length===0?l.jsxs("div",{className:"profile-section",children:[l.jsx("div",{className:"profile-section__title",children:"Permissions"}),l.jsx("div",{className:"profile-summary__empty",children:"No permissions observed yet."})]}):l.jsxs("div",{className:"profile-section",children:[l.jsxs("div",{className:"profile-section__title",children:["Permissions",l.jsx("span",{className:"profile-section__subtitle",children:"Proven — observed runtime tool usage"})]}),l.jsx("div",{className:"perm-table-wrap",children:l.jsxs("table",{className:"perm-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{}),l.jsx("th",{className:"perm-th",children:"Tool"}),l.jsx("th",{className:"perm-th",children:"Category"}),l.jsx("th",{className:"perm-th",children:"Access"}),l.jsx("th",{className:"perm-th",children:"Calls"}),l.jsx("th",{className:"perm-th",children:"Targets"}),l.jsx("th",{className:"perm-th",children:"Last seen"})]})}),l.jsx("tbody",{children:i.map(o=>{const f=o.callCount===1,d=o.targetsJson||[];return l.jsxs("tr",{className:"perm-row",children:[l.jsx("td",{className:"perm-td",style:{width:28},children:f&&l.jsx("span",{className:"anomaly-dot",title:"First-seen tool"})}),l.jsx("td",{className:"perm-td",children:l.jsx("span",{className:"mono",children:o.toolName})}),l.jsx("td",{className:"perm-td",children:l.jsx("span",{className:"chip",children:o.category||"unknown"})}),l.jsx("td",{className:"perm-td",children:l.jsx("span",{className:`access-pill ${o.accessPattern}`,children:o.accessPattern||"unknown"})}),l.jsx("td",{className:"perm-td perm-td--num",children:o.callCount}),l.jsx("td",{className:"perm-td",children:d.length>0?l.jsxs("span",{className:"perm-targets",children:[d.slice(0,3).map(p=>l.jsx("span",{className:"chip",children:p},p)),d.length>3&&l.jsxs("span",{className:"chip",style:{borderStyle:"dashed",color:"var(--muted)"},children:["+",d.length-3]})]}):l.jsx("span",{style:{color:"var(--muted)"},children:"—"})}),l.jsx("td",{className:"perm-td perm-td--date",children:u(o.lastSeen)})]},o.id)})})]})})]})}function sv(i){const u=new Date(i),f=new Date().getTime()-u.getTime(),d=Math.floor(f/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const p=Math.floor(d/60);return p<24?`${p}h ago`:`${Math.floor(p/24)}d ago`}function iv(i){return new Date(i).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function av(){const[i,u]=w.useState([]),[o,f]=w.useState(new Map),[d,p]=w.useState(!0),[m,C]=w.useState(""),[v,y]=w.useState("all");w.useEffect(()=>{let P=!1;return(async()=>{try{const[M,D,L]=await Promise.all([pe.getAllObservations(200),pe.listDiscoveryAgents(),pe.listAgents()]);if(P)return;const T=D.success?D.data:[],H=L.success?L.data:[];f(ss(T,H)),M.success&&u(M.data)}catch{}finally{P||p(!1)}})(),()=>{P=!0}},[]);const j=w.useMemo(()=>{let P=i;if(v==="allowed"?P=P.filter(M=>!M.blocked):v==="blocked"&&(P=P.filter(M=>M.blocked)),m){const M=m.toLowerCase();P=P.filter(D=>{var L;return D.toolName.toLowerCase().includes(M)||(D.category||"").toLowerCase().includes(M)||(((L=o.get(D.agentId))==null?void 0:L.name)||D.agentId).toLowerCase().includes(M)})}return P},[i,m,v,o]),_=i.filter(P=>P.blocked).length,R=i.filter(P=>!P.blocked).length;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Activity"}),l.jsx("p",{className:"page-sub",children:"Timeline of agent actions"})]}),l.jsxs("div",{className:"page-meta",children:[l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:"statusDot ok"}),l.jsxs("span",{children:[R," allowed"]})]}),_>0&&l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:"statusDot warn"}),l.jsxs("span",{children:[_," blocked"]})]})]})]}),l.jsxs("div",{className:"filters",children:[l.jsx("div",{className:"field",style:{minWidth:260},children:l.jsx("input",{type:"text",placeholder:"Search tools, categories, agents...",value:m,onChange:P=>C(P.target.value)})}),l.jsxs("div",{className:"filter-tabs",children:[l.jsx("button",{className:`filter-tab${v==="all"?" active":""}`,onClick:()=>y("all"),children:"All"}),l.jsx("button",{className:`filter-tab${v==="allowed"?" active":""}`,onClick:()=>y("allowed"),children:"Allowed"}),l.jsx("button",{className:`filter-tab${v==="blocked"?" active":""}`,onClick:()=>y("blocked"),children:"Blocked"})]})]}),d?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading activity..."})}):j.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No activity found"}),l.jsx("div",{className:"card-sub",children:m||v!=="all"?"Try adjusting your filters":"Agent activity will appear here once agents start making tool calls."})]}):l.jsx("div",{className:"timeline",children:j.map(P=>{const M=o.get(P.agentId);return l.jsxs("div",{className:`timeline-item${P.blocked?" timeline-item--blocked":""}`,children:[l.jsx("div",{className:"timeline-item__marker",children:l.jsx("span",{className:`timeline-dot${P.blocked?" blocked":" allowed"}`})}),l.jsxs("div",{className:"timeline-item__content",children:[l.jsxs("div",{className:"timeline-item__header",children:[l.jsx("span",{className:"timeline-item__tool mono",children:P.toolName}),l.jsx("span",{className:`timeline-item__status ${P.blocked?"blocked":"allowed"}`,children:P.blocked?"Blocked":"Allowed"})]}),l.jsxs("div",{className:"timeline-item__meta",children:[l.jsxs("span",{className:"timeline-item__agent",children:[l.jsx("span",{children:(M==null?void 0:M.emoji)||"🤖"}),l.jsx("span",{children:(M==null?void 0:M.name)||P.agentId})]}),P.category&&l.jsx("span",{className:"chip",children:P.category}),P.accessPattern&&l.jsx("span",{className:`access-pill ${P.accessPattern}`,children:P.accessPattern})]}),P.error&&l.jsx("div",{className:"timeline-item__error",children:P.error})]}),l.jsxs("div",{className:"timeline-item__time",children:[l.jsx("span",{className:"timeline-item__timestamp",children:iv(P.timestamp)}),l.jsx("span",{className:"timeline-item__relative",children:sv(P.timestamp)})]})]},P.id)})})]})}const ov={S01:"Prompt Injection",S02:"System Override",S03:"Web Attacks",S04:"MCP Tool Poisoning",S05:"Malicious Code Execution",S06:"NSFW Content",S07:"PII Exposure",S08:"Credential Leakage",S09:"Confidential Data",S10:"Off-Topic Drift"};function uv(i){return ov[i]||i}function cv(){const[i,u]=w.useState([]),[o,f]=w.useState(null),[d,p]=w.useState(new Map),[m,C]=w.useState(!0),[v,y]=w.useState("all");w.useEffect(()=>{let T=!1;return(async()=>{try{const[H,F,ee,U]=await Promise.all([pe.getDetections({limit:100,unsafe:!0}),pe.getDetectionSummary(),pe.listDiscoveryAgents(),pe.listAgents()]);if(T)return;H.success&&u(H.data),F.success&&f(F.data);const Y=ss(ee.success?ee.data:[],U.success?U.data:[]);p(Y)}catch{}finally{T||C(!1)}})(),()=>{T=!0}},[]);const j=T=>T.sensitivityScore>=.8?{label:"Critical",cls:"risk-critical"}:T.sensitivityScore>=.6?{label:"High",cls:"risk-high"}:T.sensitivityScore>=.4?{label:"Medium",cls:"risk-medium"}:{label:"Low",cls:"risk-low"},_=T=>T?new Date(T).toLocaleString():"Never",R=T=>{if(!T)return"Unknown";const H=d.get(T);return H?`${H.emoji} ${H.name}`:T.slice(0,8)},P=i.some(T=>{var H;return(H=T.findings)==null?void 0:H.some(F=>F.scanner==="quota"&&F.name==="quota_exceeded")}),M=i.filter(T=>v==="static"?T.scanType==="static":v==="dynamic"?T.scanType==="dynamic"||!T.scanType:!0),D=i.filter(T=>T.scanType==="static").length,L=i.filter(T=>T.scanType==="dynamic"||!T.scanType).length;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Security"}),l.jsx("p",{className:"page-sub",children:"Security risks detected across agents and workspace files"})]}),l.jsx("div",{className:"page-meta",children:o&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:"statusDot ok"}),l.jsxs("span",{children:[o.safe," safe"]})]}),l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:`statusDot ${o.unsafe>0?"warn":"ok"}`}),l.jsxs("span",{children:[o.unsafe," risk",o.unsafe!==1?"s":""]})]})]})})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"16px"},children:[l.jsxs("button",{onClick:()=>y("all"),className:`pill ${v==="all"?"active":""}`,style:{background:v==="all"?"var(--accent)":"var(--bg2)",color:v==="all"?"#fff":"var(--fg)",cursor:"pointer",border:"none"},children:["All (",i.length,")"]}),l.jsxs("button",{onClick:()=>y("static"),className:`pill ${v==="static"?"active":""}`,style:{background:v==="static"?"var(--accent)":"var(--bg2)",color:v==="static"?"#fff":"var(--fg)",cursor:"pointer",border:"none"},children:["Static Scans (",D,")"]}),l.jsxs("button",{onClick:()=>y("dynamic"),className:`pill ${v==="dynamic"?"active":""}`,style:{background:v==="dynamic"?"var(--accent)":"var(--bg2)",color:v==="dynamic"?"#fff":"var(--fg)",cursor:"pointer",border:"none"},children:["Runtime Detections (",L,")"]})]}),P&&l.jsxs("div",{className:"card",style:{background:"#fef3c7",borderColor:"#f59e0b",marginBottom:"16px"},children:[l.jsx("div",{className:"card-title",style:{color:"#92400e"},children:"Quota Exceeded"}),l.jsxs("div",{className:"card-sub",style:{color:"#78350f"},children:["Your detection quota has been exceeded. Some scans were skipped.",l.jsx("br",{}),l.jsx("a",{href:"https://openguardrails.com/pricing",target:"_blank",rel:"noopener noreferrer",style:{color:"#d97706",fontWeight:600},children:"Upgrade your plan to continue protection →"})]})]}),m?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading security data..."})}):M.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No risks detected"}),l.jsx("div",{className:"card-sub",children:v==="all"?"No security risks have been detected. Your agents are operating safely.":v==="static"?"No static security risks found in workspace files. Run `/og_scan` to scan your files.":"No runtime security risks detected. Your agents are operating safely."})]}):l.jsx("div",{className:"risk-table-wrap",children:l.jsxs("table",{className:"perm-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{className:"perm-th",children:"Risk"}),l.jsx("th",{className:"perm-th",children:v==="static"?"File / Agent":"Agent"}),l.jsx("th",{className:"perm-th",children:"Categories"}),l.jsx("th",{className:"perm-th",children:"Findings"}),l.jsx("th",{className:"perm-th",children:"Detected"})]})}),l.jsx("tbody",{children:M.map(T=>{var F;const H=j(T);return l.jsxs("tr",{className:"perm-row",children:[l.jsx("td",{className:"perm-td",children:l.jsx("span",{className:`access-pill ${H.cls}`,children:H.label})}),l.jsx("td",{className:"perm-td",children:T.scanType==="static"&&T.filePath?l.jsxs("div",{children:[l.jsx("div",{style:{fontWeight:500},children:T.filePath}),l.jsxs("div",{style:{fontSize:"0.85em",color:"var(--fg3)",marginTop:"2px"},children:[T.fileType?`[${T.fileType}] `:"",R(T.agentId)]})]}):l.jsx("span",{children:R(T.agentId)})}),l.jsx("td",{className:"perm-td",children:T.categories.length>0?T.categories.map((ee,U)=>l.jsx("span",{className:"chip",style:{marginRight:4},children:uv(ee)},U)):l.jsx("span",{className:"chip",children:"unknown"})}),l.jsx("td",{className:"perm-td",children:((F=T.findings)==null?void 0:F.length)>0?l.jsxs("span",{title:T.findings.map(ee=>`${ee.scanner}: ${ee.name}`).join(", "),children:[T.findings.length," finding",T.findings.length!==1?"s":""]}):l.jsx("span",{children:"-"})}),l.jsx("td",{className:"perm-td perm-td--date",children:_(T.createdAt)})]},T.id)})})]})})]})}const ua=["S07","S08","S09"],Oc={S07:"PII Exposure",S08:"Credential Leakage",S09:"Confidential Data"},dv={S07:"Personally identifiable information like names, emails, phone numbers, SSNs",S08:"API keys, passwords, tokens, SSH keys, database credentials",S09:"Internal documents, proprietary code, trade secrets"};function fv(i){const u=new Date(i),f=new Date().getTime()-u.getTime(),d=Math.floor(f/6e4);if(d<1)return"Just now";if(d<60)return`${d}m ago`;const p=Math.floor(d/60);return p<24?`${p}h ago`:`${Math.floor(p/24)}d ago`}function pv(){const[i,u]=w.useState([]),[o,f]=w.useState(new Map),[d,p]=w.useState(!0);w.useEffect(()=>{let y=!1;return(async()=>{try{const[j,_,R]=await Promise.all([pe.getDetections({limit:200}),pe.listDiscoveryAgents(),pe.listAgents()]);if(y)return;if(j.success){const M=j.data.filter(D=>D.categories.some(L=>ua.includes(L)));u(M)}const P=ss(_.success?_.data:[],R.success?R.data:[]);f(P)}catch{}finally{y||p(!1)}})(),()=>{y=!0}},[]);const m=[{type:"api_key",label:"API Keys",icon:l.jsx(cd,{size:20}),count:i.filter(y=>y.categories.includes("S08")).length,description:"API keys, tokens, and authentication secrets"},{type:"env_file",label:".env Files",icon:l.jsx(wm,{size:20}),count:i.filter(y=>{var j;return(j=y.findings)==null?void 0:j.some(_=>{var R;return(R=_.matchedText)==null?void 0:R.includes(".env")})}).length,description:"Environment configuration files"},{type:"ssh_key",label:"SSH Keys",icon:l.jsx(Nm,{size:20}),count:i.filter(y=>{var j;return(j=y.findings)==null?void 0:j.some(_=>{var R,P;return((R=_.matchedText)==null?void 0:R.includes("ssh"))||((P=_.name)==null?void 0:P.toLowerCase().includes("ssh"))})}).length,description:"SSH private and public keys"},{type:"pii",label:"PII Data",icon:l.jsx(dd,{size:20}),count:i.filter(y=>y.categories.includes("S07")).length,description:"Personal identifiable information"}],C=y=>{if(!y)return"Unknown";const j=o.get(y);return j?`${j.emoji} ${j.name}`:y.slice(0,8)},v=y=>y.sensitivityScore>=.8?{label:"Critical",cls:"risk-critical"}:y.sensitivityScore>=.6?{label:"High",cls:"risk-high"}:y.sensitivityScore>=.4?{label:"Medium",cls:"risk-medium"}:{label:"Low",cls:"risk-low"};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Secrets"}),l.jsx("p",{className:"page-sub",children:"Sensitive data protection and detection"})]}),l.jsx("div",{className:"page-meta",children:l.jsxs("div",{className:"pill",children:[l.jsx("span",{className:`statusDot ${i.length>0?"warn":"ok"}`}),l.jsxs("span",{children:[i.length," detection",i.length!==1?"s":""]})]})})]}),d?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading secrets data..."})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"secrets-grid",children:m.map(y=>l.jsxs("div",{className:"secrets-card",children:[l.jsx("div",{className:"secrets-card__icon",children:y.icon}),l.jsxs("div",{className:"secrets-card__content",children:[l.jsx("div",{className:"secrets-card__label",children:y.label}),l.jsx("div",{className:"secrets-card__description",children:y.description})]}),l.jsx("div",{className:"secrets-card__count",children:y.count>0?l.jsx("span",{className:"secrets-card__badge warn",children:y.count}):l.jsx("span",{className:"secrets-card__badge ok",children:"0"})})]},y.type))}),l.jsxs("div",{className:"secrets-section",children:[l.jsx("h2",{className:"secrets-section__title",children:"Protection Categories"}),l.jsx("div",{className:"scanner-list",children:ua.map(y=>{const j=i.filter(_=>_.categories.includes(y)).length;return l.jsxs("div",{className:"scanner-item",children:[l.jsxs("div",{className:"scanner-item__header",children:[l.jsx("span",{className:"scanner-item__id mono",children:y}),l.jsx("span",{className:"scanner-item__name",children:Oc[y]})]}),l.jsx("div",{className:"scanner-item__description",children:dv[y]}),l.jsxs("div",{className:"scanner-item__count",children:[j," detection",j!==1?"s":""]})]},y)})})]}),l.jsxs("div",{className:"secrets-section",children:[l.jsx("h2",{className:"secrets-section__title",children:"Recent Detections"}),i.length===0?l.jsxs("div",{className:"card",children:[l.jsx("div",{className:"card-title",children:"No sensitive data detected"}),l.jsx("div",{className:"card-sub",children:"No PII, credentials, or confidential data has been detected in agent activity."})]}):l.jsx("div",{className:"detections-list",children:i.slice(0,10).map(y=>{const j=v(y);return l.jsxs("div",{className:"detection-item",children:[l.jsx("div",{className:"detection-item__risk",children:l.jsx("span",{className:`access-pill ${j.cls}`,children:j.label})}),l.jsxs("div",{className:"detection-item__content",children:[l.jsx("div",{className:"detection-item__agent",children:C(y.agentId)}),l.jsx("div",{className:"detection-item__categories",children:y.categories.filter(_=>ua.includes(_)).map((_,R)=>l.jsx("span",{className:"chip",children:Oc[_]},R))}),y.findings&&y.findings.length>0&&l.jsxs("div",{className:"detection-item__findings",children:[y.findings.slice(0,2).map((_,R)=>l.jsx("span",{className:"detection-finding",children:_.name},R)),y.findings.length>2&&l.jsxs("span",{className:"detection-finding more",children:["+",y.findings.length-2," more"]})]})]}),l.jsx("div",{className:"detection-item__time",children:fv(y.createdAt)})]},y.id)})})]})]})]})}const hv="https://www.openguardrails.com/core/login",mv=[{value:"low",label:"Low",description:"Minimal protection, fewer blocks. Best for development and testing."},{value:"balanced",label:"Balanced",description:"Recommended for most use cases. Blocks obvious threats."},{value:"strict",label:"Strict",description:"Maximum protection. May require more user confirmations."}];function vv(){const[i,u]=w.useState({dailyLlmCalls:1e3,dailyActions:500,securityLevel:"balanced",scanAutoEnabled:!1,scanExclusions:"node_modules/**, .git/**, dist/**, build/**",scanRiskThreshold:"medium"}),[o,f]=w.useState("autonomous"),[d,p]=w.useState(!0),[m,C]=w.useState(!1),[v,y]=w.useState(!1);w.useEffect(()=>{let R=!1;return(async()=>{try{const[P,M]=await Promise.all([pe.getSettings(),pe.getConnectionStatus()]);if(R)return;P.success&&P.data&&u({dailyLlmCalls:parseInt(P.data.daily_llm_calls||"1000",10),dailyActions:parseInt(P.data.daily_actions||"500",10),securityLevel:P.data.security_level||"balanced",scanAutoEnabled:P.data.scan_auto_enabled==="true",scanExclusions:P.data.scan_exclusions||"node_modules/**, .git/**, dist/**, build/**",scanRiskThreshold:P.data.scan_risk_threshold||"medium"}),M.success&&M.data&&f(M.data.mode)}catch{}finally{R||p(!1)}})(),()=>{R=!0}},[]);const j=async()=>{C(!0),y(!1);try{(await pe.updateSettings({daily_llm_calls:String(i.dailyLlmCalls),daily_actions:String(i.dailyActions),security_level:i.securityLevel,scan_auto_enabled:i.scanAutoEnabled?"true":"false",scan_exclusions:i.scanExclusions,scan_risk_threshold:i.scanRiskThreshold})).success&&(y(!0),setTimeout(()=>y(!1),2e3))}catch{}finally{C(!1)}},_=R=>{u(P=>({...P,securityLevel:R}))};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"content-header",children:l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Settings"}),l.jsx("p",{className:"page-sub",children:"Configure agent protection and limits"})]})}),d?l.jsx("div",{className:"card",children:l.jsx("div",{className:"card-sub",children:"Loading settings..."})}):l.jsxs("div",{className:"settings-container",children:[l.jsxs("div",{className:"settings-section",children:[l.jsx("h2",{className:"settings-section__title",children:"Core Connection"}),l.jsxs("div",{className:"connection-status",children:[l.jsx("div",{className:"connection-status__indicator",children:o==="claimed"?l.jsx(Ac,{size:20,className:"text-success"}):l.jsx(Em,{size:20,className:"text-success"})}),l.jsxs("div",{className:"connection-status__info",children:[l.jsx("div",{className:"connection-status__label",children:o==="claimed"?"Claimed":"Autonomous Mode"}),l.jsx("div",{className:"connection-status__description",children:o==="claimed"?"Agent is linked to your account. Using account quota for detection.":"Agent is protected with free quota (500 checks/day). Claim on the platform to manage billing and view usage across devices."})]}),l.jsxs("a",{href:hv,target:"_blank",rel:"noopener noreferrer",className:`btn ${o==="autonomous"?"btn-primary":"btn-secondary"}`,style:{display:"inline-flex",alignItems:"center",gap:"6px",textDecoration:"none"},children:[o==="autonomous"?"Claim Agent":"Open Core",l.jsx(ym,{size:14})]})]})]}),l.jsxs("div",{className:"settings-section",children:[l.jsx("h2",{className:"settings-section__title",children:"Agent Budget"}),l.jsx("p",{className:"settings-section__description",children:"Set daily limits for agent activity. Agents will be warned when approaching limits."}),l.jsxs("div",{className:"settings-grid",children:[l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{className:"settings-field__label",children:"Daily LLM Calls"}),l.jsx("div",{className:"settings-field__input",children:l.jsx("input",{type:"number",value:i.dailyLlmCalls,onChange:R=>u(P=>({...P,dailyLlmCalls:parseInt(R.target.value)||0})),min:0,step:100})}),l.jsx("div",{className:"settings-field__help",children:"Maximum number of LLM API calls per day across all agents."})]}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{className:"settings-field__label",children:"Daily Actions"}),l.jsx("div",{className:"settings-field__input",children:l.jsx("input",{type:"number",value:i.dailyActions,onChange:R=>u(P=>({...P,dailyActions:parseInt(R.target.value)||0})),min:0,step:50})}),l.jsx("div",{className:"settings-field__help",children:"Maximum number of tool calls per day across all agents."})]})]})]}),l.jsxs("div",{className:"settings-section",children:[l.jsx("h2",{className:"settings-section__title",children:"Security Level"}),l.jsx("p",{className:"settings-section__description",children:"Choose how aggressively to block potentially risky actions."}),l.jsx("div",{className:"security-levels",children:mv.map(R=>l.jsxs("button",{className:`security-level${i.securityLevel===R.value?" active":""}`,onClick:()=>_(R.value),children:[l.jsxs("div",{className:"security-level__header",children:[l.jsx("span",{className:"security-level__label",children:R.label}),i.securityLevel===R.value&&l.jsx(Ac,{size:16,className:"security-level__check"})]}),l.jsx("div",{className:"security-level__description",children:R.description})]},R.value))})]}),l.jsxs("div",{className:"settings-section",children:[l.jsx("h2",{className:"settings-section__title",children:"Static Security Scanning"}),l.jsx("p",{className:"settings-section__description",children:"Configure automatic scanning of workspace files for security risks."}),l.jsxs("div",{className:"settings-grid",children:[l.jsxs("div",{className:"settings-field",children:[l.jsxs("label",{className:"settings-field__label",children:[l.jsx("input",{type:"checkbox",checked:i.scanAutoEnabled,onChange:R=>u(P=>({...P,scanAutoEnabled:R.target.checked})),style:{marginRight:"8px"}}),"Enable Auto-Scan"]}),l.jsx("div",{className:"settings-field__help",children:"Automatically scan workspace .md files when they are modified."})]}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{className:"settings-field__label",children:"Risk Threshold"}),l.jsx("div",{className:"settings-field__input",children:l.jsxs("select",{value:i.scanRiskThreshold,onChange:R=>u(P=>({...P,scanRiskThreshold:R.target.value})),style:{width:"100%",padding:"8px"},children:[l.jsx("option",{value:"low",children:"Low (Report all risks)"}),l.jsx("option",{value:"medium",children:"Medium (Report medium+ risks)"}),l.jsx("option",{value:"high",children:"High (Report high+ risks only)"}),l.jsx("option",{value:"critical",children:"Critical (Report critical only)"})]})}),l.jsx("div",{className:"settings-field__help",children:"Minimum risk level to report in dashboard."})]}),l.jsxs("div",{className:"settings-field",children:[l.jsx("label",{className:"settings-field__label",children:"Exclusion Patterns"}),l.jsx("div",{className:"settings-field__input",children:l.jsx("textarea",{value:i.scanExclusions,onChange:R=>u(P=>({...P,scanExclusions:R.target.value})),rows:3,style:{width:"100%",padding:"8px",fontFamily:"monospace",fontSize:"0.9em"},placeholder:"node_modules/**, .git/**, dist/**"})}),l.jsx("div",{className:"settings-field__help",children:"Comma-separated glob patterns to exclude from scanning."})]})]})]}),l.jsx("div",{className:"settings-actions",children:l.jsx("button",{className:"btn btn-primary",onClick:j,disabled:m,children:m?"Saving...":v?"Saved!":"Save Changes"})})]})]})}function gv(){const[i,u]=w.useState(null),[o,f]=w.useState(null),[d,p]=w.useState(null),[m,C]=w.useState([]),[v,y]=w.useState(null),[j,_]=w.useState(!0),[R,P]=w.useState(null),[M,D]=w.useState("status");return w.useEffect(()=>{let L=!1;async function T(){try{const[F,ee,U,Y,te]=await Promise.all([pe.getGatewayStatus(),pe.getGatewayConfig(),pe.getGatewayHealth(),pe.getGatewayActivity({limit:50}),pe.getGatewayActivityStats()]);if(L)return;F.success&&u(F.data),ee.success&&f(ee.data),U.success&&p(U.data),Y.success&&C(Y.data),te.success&&y(te.data)}catch(F){L||P(F instanceof Error?F.message:"Failed to load gateway data")}finally{L||_(!1)}}T();const H=setInterval(T,1e4);return()=>{L=!0,clearInterval(H)}},[]),j?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsx("h1",{className:"page-title",children:"AI Security Gateway"}),l.jsx("p",{className:"page-sub",children:"Data sanitization proxy for LLM API calls"})]}),l.jsx("div",{className:"card",children:"Loading..."})]}):R?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsx("h1",{className:"page-title",children:"AI Security Gateway"}),l.jsx("p",{className:"page-sub",children:"Data sanitization proxy for LLM API calls"})]}),l.jsxs("div",{className:"card",style:{color:"#dc2626"},children:["Error: ",R]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"content-header",children:[l.jsx("h1",{className:"page-title",children:"AI Security Gateway"}),l.jsx("p",{className:"page-sub",children:"Data sanitization proxy for LLM API calls"})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",marginBottom:"20px"},children:[l.jsx("button",{onClick:()=>D("status"),style:{padding:"8px 16px",border:"none",borderRadius:"8px",cursor:"pointer",background:M==="status"?"#3b82f6":"#f1f5f9",color:M==="status"?"white":"#64748b",fontWeight:500},children:"Status"}),l.jsxs("button",{onClick:()=>D("activity"),style:{padding:"8px 16px",border:"none",borderRadius:"8px",cursor:"pointer",background:M==="activity"?"#3b82f6":"#f1f5f9",color:M==="activity"?"white":"#64748b",fontWeight:500},children:["Activity ",m.length>0&&`(${m.length})`]})]}),M==="activity"&&l.jsxs(l.Fragment,{children:[v&&l.jsxs("div",{className:"stat-grid",children:[l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:"#dcfce7"},children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",children:l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Sanitizations (24h)"}),l.jsx("div",{className:"stat-card__value",children:v.last24Hours.sanitizeCount})]})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:"#dbeafe"},children:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#2563eb",strokeWidth:"2",children:[l.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),l.jsx("polyline",{points:"7 10 12 15 17 10"}),l.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Restorations (24h)"}),l.jsx("div",{className:"stat-card__value",children:v.last24Hours.restoreCount})]})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:"#fef3c7"},children:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#ca8a04",strokeWidth:"2",children:l.jsx("path",{d:"M13 2L3 14h9l-1 8 10-12h-9l1-8z"})})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Redactions (24h)"}),l.jsx("div",{className:"stat-card__value",children:v.last24Hours.totalRedactions})]})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:"#f3e8ff"},children:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#9333ea",strokeWidth:"2",children:[l.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),l.jsx("path",{d:"M3 9h18"}),l.jsx("path",{d:"M9 21V9"})]})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Total Redactions"}),l.jsx("div",{className:"stat-card__value",children:v.allTime.totalRedactions})]})]})]}),v&&Object.keys(v.allTime.categories).length>0&&l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Redaction Categories"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:Object.entries(v.allTime.categories).map(([L,T])=>l.jsxs("span",{style:{background:"#f1f5f9",padding:"4px 12px",borderRadius:"16px",fontSize:"0.85rem"},children:[l.jsx("strong",{children:L}),": ",T]},L))})]}),l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Recent Activity"}),m.length===0?l.jsx("p",{style:{color:"#94a3b8"},children:"No gateway activity recorded yet."}):l.jsx("div",{className:"table-container",children:l.jsxs("table",{className:"data-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Time"}),l.jsx("th",{children:"Type"}),l.jsx("th",{children:"Backend"}),l.jsx("th",{children:"Model"}),l.jsx("th",{children:"Redactions"}),l.jsx("th",{children:"Categories"})]})}),l.jsx("tbody",{children:m.map(L=>l.jsxs("tr",{children:[l.jsx("td",{style:{fontFamily:"monospace",fontSize:"0.8rem"},children:new Date(L.timestamp).toLocaleString()}),l.jsx("td",{children:l.jsx("span",{style:{background:L.type==="sanitize"?"#dcfce7":"#dbeafe",color:L.type==="sanitize"?"#166534":"#1e40af",padding:"2px 8px",borderRadius:"4px",fontSize:"0.8rem",fontWeight:500},children:L.type})}),l.jsx("td",{children:L.backend}),l.jsx("td",{style:{fontSize:"0.85rem",color:"#64748b"},children:L.model||"-"}),l.jsx("td",{children:L.redactionCount}),l.jsxs("td",{style:{fontSize:"0.8rem"},children:[Object.entries(L.categories||{}).map(([T,H])=>l.jsxs("span",{style:{marginRight:"6px"},children:[T,": ",H]},T)),Object.keys(L.categories||{}).length===0&&"-"]})]},L.id))})]})})]})]}),M==="status"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"stat-grid",children:[l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:i!=null&&i.enabled?"#dcfce7":"#fee2e2"},children:i!=null&&i.enabled?l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",children:[l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),l.jsx("path",{d:"M9 12l2 2 4-4"})]}):l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#dc2626",strokeWidth:"2",children:[l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"}),l.jsx("line",{x1:"4",y1:"4",x2:"20",y2:"20"})]})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Status"}),l.jsx("div",{className:"stat-card__value",style:{color:i!=null&&i.enabled?"#16a34a":"#dc2626"},children:i!=null&&i.enabled?"Enabled":"Disabled"})]})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:d!=null&&d.healthy?"#dcfce7":"#fee2e2"},children:d!=null&&d.healthy?l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("path",{d:"M22 4L12 14.01l-3-3"})]}):l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#dc2626",strokeWidth:"2",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),l.jsx("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Health"}),l.jsx("div",{className:"stat-card__value",children:d!=null&&d.healthy?"Healthy":(d==null?void 0:d.error)||"Unhealthy"})]})]}),l.jsxs("div",{className:"stat-card",children:[l.jsx("div",{className:"stat-card__icon",style:{background:"#dbeafe"},children:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"#2563eb",strokeWidth:"2",children:[l.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),l.jsx("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),l.jsx("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]})}),l.jsxs("div",{className:"stat-card__content",children:[l.jsx("div",{className:"stat-card__label",children:"Endpoint"}),l.jsx("div",{className:"stat-card__value",style:{fontSize:"0.9rem"},children:(i==null?void 0:i.url)||`http://127.0.0.1:${(o==null?void 0:o.port)||53669}`})]})]})]}),!(i!=null&&i.enabled)&&l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"How to Enable"}),l.jsx("p",{style:{color:"#64748b",marginBottom:"12px"},children:"Enable the AI Security Gateway to automatically sanitize sensitive data before sending to LLM providers."}),l.jsx("div",{style:{background:"#f8fafc",borderRadius:"8px",padding:"12px",fontFamily:"monospace"},children:l.jsx("code",{children:"/og_sanitize on"})}),l.jsx("p",{style:{color:"#94a3b8",fontSize:"0.85rem",marginTop:"12px"},children:"Run this command in your OpenClaw conversation to enable data sanitization."})]}),(i==null?void 0:i.enabled)&&i.agents.length>0&&l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Protected Agents"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:i.agents.map(L=>l.jsx("span",{style:{background:"#dcfce7",color:"#166534",padding:"4px 12px",borderRadius:"16px",fontSize:"0.85rem",fontWeight:500},children:L},L))})]}),(o==null?void 0:o.configured)&&Object.keys(o.backends).length>0&&l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Configured Backends"}),l.jsx("div",{className:"table-container",children:l.jsxs("table",{className:"data-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Backend"}),l.jsx("th",{children:"Base URL"}),l.jsx("th",{children:"API Key"})]})}),l.jsx("tbody",{children:Object.entries(o.backends).map(([L,T])=>l.jsxs("tr",{children:[l.jsx("td",{children:l.jsx("span",{style:{background:"#f1f5f9",padding:"2px 8px",borderRadius:"4px",fontWeight:500},children:L})}),l.jsx("td",{style:{fontFamily:"monospace",fontSize:"0.85rem"},children:T.baseUrl}),l.jsx("td",{children:T.hasApiKey?l.jsx("span",{style:{color:"#16a34a"},children:"Configured"}):l.jsx("span",{style:{color:"#dc2626"},children:"Missing"})})]},L))})]})})]}),(i==null?void 0:i.enabled)&&i.providers.length>0&&l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Protected Providers"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px"},children:i.providers.map(L=>l.jsx("span",{style:{background:"#dbeafe",color:"#1e40af",padding:"4px 12px",borderRadius:"16px",fontSize:"0.85rem",fontWeight:500},children:L},L))})]}),l.jsxs("div",{className:"card",style:{marginTop:"20px"},children:[l.jsx("h3",{style:{marginBottom:"12px",fontSize:"1rem",fontWeight:600},children:"Data Protection"}),l.jsx("p",{style:{color:"#64748b",marginBottom:"16px"},children:"The gateway automatically detects and sanitizes sensitive data before sending to LLM providers:"}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:"12px"},children:[{type:"API Keys",example:"sk-xxx... → __secret_1__"},{type:"Emails",example:"user@example.com → __email_1__"},{type:"Credit Cards",example:"4111-xxxx → __credit_card_1__"},{type:"Phone Numbers",example:"+1-555-xxx → __phone_1__"},{type:"IP Addresses",example:"192.168.x.x → __ip_1__"},{type:"Bearer Tokens",example:"Bearer xxx → __secret_1__"}].map(L=>l.jsxs("div",{style:{background:"#f8fafc",padding:"12px",borderRadius:"8px"},children:[l.jsx("div",{style:{fontWeight:500,marginBottom:"4px"},children:L.type}),l.jsx("div",{style:{fontSize:"0.8rem",fontFamily:"monospace",color:"#64748b"},children:L.example})]},L.type))})]})]})]})}function yv(){return l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#f8fafc",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"},children:l.jsxs("div",{style:{background:"white",borderRadius:"12px",padding:"40px",boxShadow:"0 1px 3px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.05)",maxWidth:"440px",textAlign:"center"},children:[l.jsx("h2",{style:{fontSize:"1.4rem",fontWeight:700,marginBottom:"12px",color:"#dc2626"},children:"No Session"}),l.jsxs("p",{style:{color:"#64748b",fontSize:"0.95rem",marginBottom:"20px",lineHeight:1.5},children:["Dashboard requires a valid session token.",l.jsx("br",{}),l.jsx("br",{}),"Run ",l.jsx("code",{style:{background:"#f1f5f9",padding:"2px 6px",borderRadius:"4px"},children:"/og_dashboard"})," to get the access URL."]})]})})}function xv({children:i}){const{authenticated:u,loading:o}=sd();return o?null:u?l.jsx(l.Fragment,{children:i}):l.jsx(yv,{})}function wv(){return l.jsx(yh,{children:l.jsxs(Le,{path:"/",element:l.jsx(xv,{children:l.jsx(Bm,{})}),children:[l.jsx(Le,{index:!0,element:l.jsx(Pt,{to:"/overview",replace:!0})}),l.jsx(Le,{path:"overview",element:l.jsx(Km,{})}),l.jsx(Le,{path:"agents",element:l.jsx(Gm,{})}),l.jsx(Le,{path:"agents/:id",element:l.jsx(ev,{})}),l.jsx(Le,{path:"activity",element:l.jsx(av,{})}),l.jsx(Le,{path:"security",element:l.jsx(cv,{})}),l.jsx(Le,{path:"gateway",element:l.jsx(gv,{})}),l.jsx(Le,{path:"secrets",element:l.jsx(pv,{})}),l.jsx(Le,{path:"settings",element:l.jsx(vv,{})}),l.jsx(Le,{path:"inventory/agents",element:l.jsx(Pt,{to:"/agents",replace:!0})}),l.jsx(Le,{path:"inventory/agents/:id",element:l.jsx(Pt,{to:"/agents/:id",replace:!0})}),l.jsx(Le,{path:"inventory/permissions",element:l.jsx(Pt,{to:"/activity",replace:!0})}),l.jsx(Le,{path:"inventory/identities",element:l.jsx(Pt,{to:"/agents",replace:!0})}),l.jsx(Le,{path:"inventory/*",element:l.jsx(Pt,{to:"/agents",replace:!0})}),l.jsx(Le,{path:"secure/risk",element:l.jsx(Pt,{to:"/security",replace:!0})}),l.jsx(Le,{path:"secure/graph",element:l.jsx(Pt,{to:"/agents",replace:!0})}),l.jsx(Le,{path:"secure/*",element:l.jsx(Pt,{to:"/security",replace:!0})}),l.jsx(Le,{path:"discovery/*",element:l.jsx(Pt,{to:"/agents",replace:!0})})]})})}const jv="og_session_token",kv=new URLSearchParams(window.location.search),Dc=kv.get("token");Dc&&localStorage.setItem(jv,Dc);gp.createRoot(document.getElementById("root")).render(l.jsx(w.StrictMode,{children:l.jsx(Wh,{basename:"/dashboard",children:l.jsx(tm,{children:l.jsx(Zh,{children:l.jsx(wv,{})})})})}));