projax 3.3.59 → 3.3.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,66 @@
1
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cf(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Mu={exports:{}},ho={},Lu={exports:{}},H={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Gr=Symbol.for("react.element"),df=Symbol.for("react.portal"),ff=Symbol.for("react.fragment"),pf=Symbol.for("react.strict_mode"),hf=Symbol.for("react.profiler"),mf=Symbol.for("react.provider"),gf=Symbol.for("react.context"),vf=Symbol.for("react.forward_ref"),yf=Symbol.for("react.suspense"),wf=Symbol.for("react.memo"),Sf=Symbol.for("react.lazy"),ma=Symbol.iterator;function xf(e){return e===null||typeof e!="object"?null:(e=ma&&e[ma]||e["@@iterator"],typeof e=="function"?e:null)}var Au={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Iu=Object.assign,Fu={};function or(e,t,n){this.props=e,this.context=t,this.refs=Fu,this.updater=n||Au}or.prototype.isReactComponent={};or.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};or.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wu(){}Wu.prototype=or.prototype;function dl(e,t,n){this.props=e,this.context=t,this.refs=Fu,this.updater=n||Au}var fl=dl.prototype=new Wu;fl.constructor=dl;Iu(fl,or.prototype);fl.isPureReactComponent=!0;var ga=Array.isArray,Uu=Object.prototype.hasOwnProperty,pl={current:null},Bu={key:!0,ref:!0,__self:!0,__source:!0};function bu(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Uu.call(t,r)&&!Bu.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Gr,type:e,key:o,ref:i,props:s,_owner:pl.current}}function kf(e,t){return{$$typeof:Gr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function hl(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gr}function jf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var va=/\/+/g;function Bo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?jf(""+e.key):t.toString(36)}function Ts(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Gr:case df:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+Bo(i,0):r,ga(s)?(n="",e!=null&&(n=e.replace(va,"$&/")+"/"),Ts(s,t,n,"",function(c){return c})):s!=null&&(hl(s)&&(s=kf(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(va,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",ga(e))for(var l=0;l<e.length;l++){o=e[l];var u=r+Bo(o,l);i+=Ts(o,t,n,u,s)}else if(u=xf(e),typeof u=="function")for(e=u.call(e),l=0;!(o=e.next()).done;)o=o.value,u=r+Bo(o,l++),i+=Ts(o,t,n,u,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function as(e,t,n){if(e==null)return e;var r=[],s=0;return Ts(e,r,"","",function(o){return t.call(n,o,s++)}),r}function Nf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var We={current:null},Ds={transition:null},Pf={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:pl};function $u(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:as,forEach:function(e,t,n){as(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return as(e,function(){t++}),t},toArray:function(e){return as(e,function(t){return t})||[]},only:function(e){if(!hl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=or;H.Fragment=ff;H.Profiler=hf;H.PureComponent=dl;H.StrictMode=pf;H.Suspense=yf;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pf;H.act=$u;H.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Iu({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=pl.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Uu.call(t,u)&&!Bu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:Gr,type:e.type,key:s,ref:o,props:r,_owner:i}};H.createContext=function(e){return e={$$typeof:gf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mf,_context:e},e.Consumer=e};H.createElement=bu;H.createFactory=function(e){var t=bu.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:vf,render:e}};H.isValidElement=hl;H.lazy=function(e){return{$$typeof:Sf,_payload:{_status:-1,_result:e},_init:Nf}};H.memo=function(e,t){return{$$typeof:wf,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};H.unstable_act=$u;H.useCallback=function(e,t){return We.current.useCallback(e,t)};H.useContext=function(e){return We.current.useContext(e)};H.useDebugValue=function(){};H.useDeferredValue=function(e){return We.current.useDeferredValue(e)};H.useEffect=function(e,t){return We.current.useEffect(e,t)};H.useId=function(){return We.current.useId()};H.useImperativeHandle=function(e,t,n){return We.current.useImperativeHandle(e,t,n)};H.useInsertionEffect=function(e,t){return We.current.useInsertionEffect(e,t)};H.useLayoutEffect=function(e,t){return We.current.useLayoutEffect(e,t)};H.useMemo=function(e,t){return We.current.useMemo(e,t)};H.useReducer=function(e,t,n){return We.current.useReducer(e,t,n)};H.useRef=function(e){return We.current.useRef(e)};H.useState=function(e){return We.current.useState(e)};H.useSyncExternalStore=function(e,t,n){return We.current.useSyncExternalStore(e,t,n)};H.useTransition=function(){return We.current.useTransition()};H.version="18.3.1";Lu.exports=H;var j=Lu.exports;const mo=Ou(j);/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Ef=j,Cf=Symbol.for("react.element"),_f=Symbol.for("react.fragment"),zf=Object.prototype.hasOwnProperty,Tf=Ef.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Df={key:!0,ref:!0,__self:!0,__source:!0};function Hu(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)zf.call(t,r)&&!Df.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Cf,type:e,key:o,ref:i,props:s,_owner:Tf.current}}ho.Fragment=_f;ho.jsx=Hu;ho.jsxs=Hu;Mu.exports=ho;var a=Mu.exports,vi={},Vu={exports:{}},et={},Xu={exports:{}},Qu={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */(function(e){function t(T,W){var A=T.length;T.push(W);e:for(;0<A;){var Y=A-1>>>1,oe=T[Y];if(0<s(oe,W))T[Y]=W,T[A]=oe,A=Y;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var W=T[0],A=T.pop();if(A!==W){T[0]=A;e:for(var Y=0,oe=T.length,Le=oe>>>1;Y<Le;){var ee=2*(Y+1)-1,nt=T[ee],D=ee+1,V=T[D];if(0>s(nt,A))D<oe&&0>s(V,nt)?(T[Y]=V,T[D]=A,Y=D):(T[Y]=nt,T[ee]=A,Y=ee);else if(D<oe&&0>s(V,A))T[Y]=V,T[D]=A,Y=D;else break e}}return W}function s(T,W){var A=T.sortIndex-W.sortIndex;return A!==0?A:T.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var u=[],c=[],h=1,m=null,g=3,w=!1,S=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=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(T){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=T)r(c),W.sortIndex=W.expirationTime,t(u,W);else break;W=n(c)}}function v(T){if(y=!1,f(T),!S)if(n(u)!==null)S=!0,K(x);else{var W=n(c);W!==null&&pe(v,W.startTime-T)}}function x(T,W){S=!1,y&&(y=!1,p(C),C=-1),w=!0;var A=g;try{for(f(W),m=n(u);m!==null&&(!(m.expirationTime>W)||T&&!b());){var Y=m.callback;if(typeof Y=="function"){m.callback=null,g=m.priorityLevel;var oe=Y(m.expirationTime<=W);W=e.unstable_now(),typeof oe=="function"?m.callback=oe:m===n(u)&&r(u),f(W)}else r(u);m=n(u)}if(m!==null)var Le=!0;else{var ee=n(c);ee!==null&&pe(v,ee.startTime-W),Le=!1}return Le}finally{m=null,g=A,w=!1}}var P=!1,N=null,C=-1,U=5,M=-1;function b(){return!(e.unstable_now()-M<U)}function X(){if(N!==null){var T=e.unstable_now();M=T;var W=!0;try{W=N(!0,T)}finally{W?Z():(P=!1,N=null)}}else P=!1}var Z;if(typeof d=="function")Z=function(){d(X)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,q=fe.port2;fe.port1.onmessage=X,Z=function(){q.postMessage(null)}}else Z=function(){_(X,0)};function K(T){N=T,P||(P=!0,Z())}function pe(T,W){C=_(function(){T(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){S||w||(S=!0,K(x))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(T){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var A=g;g=W;try{return T()}finally{g=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,W){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var A=g;g=T;try{return W()}finally{g=A}},e.unstable_scheduleCallback=function(T,W,A){var Y=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?Y+A:Y):A=Y,T){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=A+oe,T={id:h++,callback:W,priorityLevel:T,startTime:A,expirationTime:oe,sortIndex:-1},A>Y?(T.sortIndex=A,t(c,T),n(u)===null&&T===n(c)&&(y?(p(C),C=-1):y=!0,pe(v,A-Y))):(T.sortIndex=oe,t(u,T),S||w||(S=!0,K(x))),T},e.unstable_shouldYield=b,e.unstable_wrapCallback=function(T){var W=g;return function(){var A=g;g=W;try{return T.apply(this,arguments)}finally{g=A}}}})(Qu);Xu.exports=Qu;var Rf=Xu.exports;/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Of=j,qe=Rf;function E(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 Yu=new Set,Or={};function Pn(e,t){Zn(e,t),Zn(e+"Capture",t)}function Zn(e,t){for(Or[e]=t,e=0;e<t.length;e++)Yu.add(t[e])}var At=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yi=Object.prototype.hasOwnProperty,Mf=/^[: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]*$/,ya={},wa={};function Lf(e){return yi.call(wa,e)?!0:yi.call(ya,e)?!1:Mf.test(e)?wa[e]=!0:(ya[e]=!0,!1)}function Af(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 If(e,t,n,r){if(t===null||typeof t>"u"||Af(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 Ue(e,t,n,r,s,o,i){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=o,this.removeEmptyString=i}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new Ue(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){_e[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var ml=/[\-:]([a-z])/g;function gl(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(ml,gl);_e[t]=new Ue(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(ml,gl);_e[t]=new Ue(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(ml,gl);_e[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function vl(e,t,n,r){var s=_e.hasOwnProperty(t)?_e[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(If(t,n,s,r)&&(n=null),r||s===null?Lf(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 Ut=Of.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,us=Symbol.for("react.element"),On=Symbol.for("react.portal"),Mn=Symbol.for("react.fragment"),yl=Symbol.for("react.strict_mode"),wi=Symbol.for("react.profiler"),Ku=Symbol.for("react.provider"),Gu=Symbol.for("react.context"),wl=Symbol.for("react.forward_ref"),Si=Symbol.for("react.suspense"),xi=Symbol.for("react.suspense_list"),Sl=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),Ju=Symbol.for("react.offscreen"),Sa=Symbol.iterator;function ur(e){return e===null||typeof e!="object"?null:(e=Sa&&e[Sa]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Object.assign,bo;function Sr(e){if(bo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bo=t&&t[1]||""}return`
34
+ `+bo+e}var $o=!1;function Ho(e,t){if(!e||$o)return"";$o=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
35
+ `),o=r.stack.split(`
36
+ `),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var u=`
37
+ `+s[i].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=i&&0<=l);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sr(e):""}function Ff(e){switch(e.tag){case 5:return Sr(e.type);case 16:return Sr("Lazy");case 13:return Sr("Suspense");case 19:return Sr("SuspenseList");case 0:case 2:case 15:return e=Ho(e.type,!1),e;case 11:return e=Ho(e.type.render,!1),e;case 1:return e=Ho(e.type,!0),e;default:return""}}function ki(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 Mn:return"Fragment";case On:return"Portal";case wi:return"Profiler";case yl:return"StrictMode";case Si:return"Suspense";case xi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gu:return(e.displayName||"Context")+".Consumer";case Ku:return(e._context.displayName||"Context")+".Provider";case wl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Sl:return t=e.displayName||null,t!==null?t:ki(e.type)||"Memo";case Vt:t=e._payload,e=e._init;try{return ki(e(t))}catch{}}return null}function Wf(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 ki(t);case 8:return t===yl?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Zu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uf(e){var t=Zu(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cs(e){e._valueTracker||(e._valueTracker=Uf(e))}function qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Zu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $s(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 ji(e,t){var n=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=on(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 ec(e,t){t=t.checked,t!=null&&vl(e,"checked",t,!1)}function Ni(e,t){ec(e,t);var n=on(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")?Pi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Pi(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ka(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 Pi(e,t,n){(t!=="number"||$s(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xr=Array.isArray;function Xn(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=""+on(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 Ei(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(E(91));return ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ja(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(E(92));if(xr(n)){if(1<n.length)throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:on(n)}}function tc(e,t){var n=on(t.value),r=on(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 Na(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function nc(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 Ci(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?nc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ds,rc=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(ds=ds||document.createElement("div"),ds.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ds.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Bf=["Webkit","ms","Moz","O"];Object.keys(Nr).forEach(function(e){Bf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nr[t]=Nr[e]})});function sc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nr.hasOwnProperty(e)&&Nr[e]?(""+t).trim():t+"px"}function oc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var bf=ue({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 _i(e,t){if(t){if(bf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function zi(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 Ti=null;function xl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Di=null,Qn=null,Yn=null;function Pa(e){if(e=qr(e)){if(typeof Di!="function")throw Error(E(280));var t=e.stateNode;t&&(t=So(t),Di(e.stateNode,e.type,t))}}function ic(e){Qn?Yn?Yn.push(e):Yn=[e]:Qn=e}function lc(){if(Qn){var e=Qn,t=Yn;if(Yn=Qn=null,Pa(e),t)for(e=0;e<t.length;e++)Pa(t[e])}}function ac(e,t){return e(t)}function uc(){}var Vo=!1;function cc(e,t,n){if(Vo)return e(t,n);Vo=!0;try{return ac(e,t,n)}finally{Vo=!1,(Qn!==null||Yn!==null)&&(uc(),lc())}}function Lr(e,t){var n=e.stateNode;if(n===null)return null;var r=So(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(E(231,t,typeof n));return n}var Ri=!1;if(At)try{var cr={};Object.defineProperty(cr,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{Ri=!1}function $f(e,t,n,r,s,o,i,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var Pr=!1,Hs=null,Vs=!1,Oi=null,Hf={onError:function(e){Pr=!0,Hs=e}};function Vf(e,t,n,r,s,o,i,l,u){Pr=!1,Hs=null,$f.apply(Hf,arguments)}function Xf(e,t,n,r,s,o,i,l,u){if(Vf.apply(this,arguments),Pr){if(Pr){var c=Hs;Pr=!1,Hs=null}else throw Error(E(198));Vs||(Vs=!0,Oi=c)}}function En(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function dc(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 Ea(e){if(En(e)!==e)throw Error(E(188))}function Qf(e){var t=e.alternate;if(!t){if(t=En(e),t===null)throw Error(E(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return Ea(s),e;if(o===r)return Ea(s),t;o=o.sibling}throw Error(E(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i)throw Error(E(189))}}if(n.alternate!==r)throw Error(E(190))}if(n.tag!==3)throw Error(E(188));return n.stateNode.current===n?e:t}function fc(e){return e=Qf(e),e!==null?pc(e):null}function pc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=pc(e);if(t!==null)return t;e=e.sibling}return null}var hc=qe.unstable_scheduleCallback,Ca=qe.unstable_cancelCallback,Yf=qe.unstable_shouldYield,Kf=qe.unstable_requestPaint,he=qe.unstable_now,Gf=qe.unstable_getCurrentPriorityLevel,kl=qe.unstable_ImmediatePriority,mc=qe.unstable_UserBlockingPriority,Xs=qe.unstable_NormalPriority,Jf=qe.unstable_LowPriority,gc=qe.unstable_IdlePriority,go=null,Ct=null;function Zf(e){if(Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(go,e,void 0,(e.current.flags&128)===128)}catch{}}var wt=Math.clz32?Math.clz32:tp,qf=Math.log,ep=Math.LN2;function tp(e){return e>>>=0,e===0?32:31-(qf(e)/ep|0)|0}var fs=64,ps=4194304;function kr(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 Qs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~s;l!==0?r=kr(l):(o&=i,o!==0&&(r=kr(o)))}else i=n&~s,i!==0?r=kr(i):o!==0&&(r=kr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-wt(t),s=1<<n,r|=e[n],t&=~s;return r}function np(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 rp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-wt(o),l=1<<i,u=s[i];u===-1?(!(l&n)||l&r)&&(s[i]=np(l,t)):u<=t&&(e.expiredLanes|=l),o&=~l}}function Mi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vc(){var e=fs;return fs<<=1,!(fs&4194240)&&(fs=64),e}function Xo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Jr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-wt(t),e[t]=n}function sp(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-wt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function jl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-wt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var J=0;function yc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var wc,Nl,Sc,xc,kc,Li=!1,hs=[],Jt=null,Zt=null,qt=null,Ar=new Map,Ir=new Map,Qt=[],op="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 _a(e,t){switch(e){case"focusin":case"focusout":Jt=null;break;case"dragenter":case"dragleave":Zt=null;break;case"mouseover":case"mouseout":qt=null;break;case"pointerover":case"pointerout":Ar.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ir.delete(t.pointerId)}}function dr(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=qr(t),t!==null&&Nl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function ip(e,t,n,r,s){switch(t){case"focusin":return Jt=dr(Jt,e,t,n,r,s),!0;case"dragenter":return Zt=dr(Zt,e,t,n,r,s),!0;case"mouseover":return qt=dr(qt,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Ar.set(o,dr(Ar.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Ir.set(o,dr(Ir.get(o)||null,e,t,n,r,s)),!0}return!1}function jc(e){var t=mn(e.target);if(t!==null){var n=En(t);if(n!==null){if(t=n.tag,t===13){if(t=dc(n),t!==null){e.blockedOn=t,kc(e.priority,function(){Sc(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 Rs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ai(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ti=r,n.target.dispatchEvent(r),Ti=null}else return t=qr(n),t!==null&&Nl(t),e.blockedOn=n,!1;t.shift()}return!0}function za(e,t,n){Rs(e)&&n.delete(t)}function lp(){Li=!1,Jt!==null&&Rs(Jt)&&(Jt=null),Zt!==null&&Rs(Zt)&&(Zt=null),qt!==null&&Rs(qt)&&(qt=null),Ar.forEach(za),Ir.forEach(za)}function fr(e,t){e.blockedOn===t&&(e.blockedOn=null,Li||(Li=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,lp)))}function Fr(e){function t(s){return fr(s,e)}if(0<hs.length){fr(hs[0],e);for(var n=1;n<hs.length;n++){var r=hs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Jt!==null&&fr(Jt,e),Zt!==null&&fr(Zt,e),qt!==null&&fr(qt,e),Ar.forEach(t),Ir.forEach(t),n=0;n<Qt.length;n++)r=Qt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qt.length&&(n=Qt[0],n.blockedOn===null);)jc(n),n.blockedOn===null&&Qt.shift()}var Kn=Ut.ReactCurrentBatchConfig,Ys=!0;function ap(e,t,n,r){var s=J,o=Kn.transition;Kn.transition=null;try{J=1,Pl(e,t,n,r)}finally{J=s,Kn.transition=o}}function up(e,t,n,r){var s=J,o=Kn.transition;Kn.transition=null;try{J=4,Pl(e,t,n,r)}finally{J=s,Kn.transition=o}}function Pl(e,t,n,r){if(Ys){var s=Ai(e,t,n,r);if(s===null)ni(e,t,r,Ks,n),_a(e,r);else if(ip(s,e,t,n,r))r.stopPropagation();else if(_a(e,r),t&4&&-1<op.indexOf(e)){for(;s!==null;){var o=qr(s);if(o!==null&&wc(o),o=Ai(e,t,n,r),o===null&&ni(e,t,r,Ks,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else ni(e,t,r,null,n)}}var Ks=null;function Ai(e,t,n,r){if(Ks=null,e=xl(r),e=mn(e),e!==null)if(t=En(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dc(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 Ks=e,null}function Nc(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(Gf()){case kl:return 1;case mc:return 4;case Xs:case Jf:return 16;case gc:return 536870912;default:return 16}default:return 16}}var Kt=null,El=null,Os=null;function Pc(){if(Os)return Os;var e,t=El,n=t.length,r,s="value"in Kt?Kt.value:Kt.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return Os=s.slice(e,1<r?1-r:void 0)}function Ms(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 ms(){return!0}function Ta(){return!1}function tt(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ms:Ta,this.isPropagationStopped=Ta,this}return ue(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=ms)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),t}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cl=tt(ir),Zr=ue({},ir,{view:0,detail:0}),cp=tt(Zr),Qo,Yo,pr,vo=ue({},Zr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_l,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!==pr&&(pr&&e.type==="mousemove"?(Qo=e.screenX-pr.screenX,Yo=e.screenY-pr.screenY):Yo=Qo=0,pr=e),Qo)},movementY:function(e){return"movementY"in e?e.movementY:Yo}}),Da=tt(vo),dp=ue({},vo,{dataTransfer:0}),fp=tt(dp),pp=ue({},Zr,{relatedTarget:0}),Ko=tt(pp),hp=ue({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),mp=tt(hp),gp=ue({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vp=tt(gp),yp=ue({},ir,{data:0}),Ra=tt(yp),wp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sp={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"},xp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xp[e])?!!t[e]:!1}function _l(){return kp}var jp=ue({},Zr,{key:function(e){if(e.key){var t=wp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_l,charCode:function(e){return e.type==="keypress"?Ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Np=tt(jp),Pp=ue({},vo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oa=tt(Pp),Ep=ue({},Zr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_l}),Cp=tt(Ep),_p=ue({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),zp=tt(_p),Tp=ue({},vo,{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}),Dp=tt(Tp),Rp=[9,13,27,32],zl=At&&"CompositionEvent"in window,Er=null;At&&"documentMode"in document&&(Er=document.documentMode);var Op=At&&"TextEvent"in window&&!Er,Ec=At&&(!zl||Er&&8<Er&&11>=Er),Ma=" ",La=!1;function Cc(e,t){switch(e){case"keyup":return Rp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ln=!1;function Mp(e,t){switch(e){case"compositionend":return _c(t);case"keypress":return t.which!==32?null:(La=!0,Ma);case"textInput":return e=t.data,e===Ma&&La?null:e;default:return null}}function Lp(e,t){if(Ln)return e==="compositionend"||!zl&&Cc(e,t)?(e=Pc(),Os=El=Kt=null,Ln=!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 Ec&&t.locale!=="ko"?null:t.data;default:return null}}var Ap={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 Aa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ap[e.type]:t==="textarea"}function zc(e,t,n,r){ic(r),t=Gs(t,"onChange"),0<t.length&&(n=new Cl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cr=null,Wr=null;function Ip(e){Uc(e,0)}function yo(e){var t=Fn(e);if(qu(t))return e}function Fp(e,t){if(e==="change")return t}var Tc=!1;if(At){var Go;if(At){var Jo="oninput"in document;if(!Jo){var Ia=document.createElement("div");Ia.setAttribute("oninput","return;"),Jo=typeof Ia.oninput=="function"}Go=Jo}else Go=!1;Tc=Go&&(!document.documentMode||9<document.documentMode)}function Fa(){Cr&&(Cr.detachEvent("onpropertychange",Dc),Wr=Cr=null)}function Dc(e){if(e.propertyName==="value"&&yo(Wr)){var t=[];zc(t,Wr,e,xl(e)),cc(Ip,t)}}function Wp(e,t,n){e==="focusin"?(Fa(),Cr=t,Wr=n,Cr.attachEvent("onpropertychange",Dc)):e==="focusout"&&Fa()}function Up(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yo(Wr)}function Bp(e,t){if(e==="click")return yo(t)}function bp(e,t){if(e==="input"||e==="change")return yo(t)}function $p(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:$p;function Ur(e,t){if(xt(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(!yi.call(t,s)||!xt(e[s],t[s]))return!1}return!0}function Wa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ua(e,t){var n=Wa(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=Wa(n)}}function Rc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Oc(){for(var e=window,t=$s();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$s(e.document)}return t}function Tl(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 Hp(e){var t=Oc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rc(n.ownerDocument.documentElement,n)){if(r!==null&&Tl(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,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Ua(n,o);var i=Ua(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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 Vp=At&&"documentMode"in document&&11>=document.documentMode,An=null,Ii=null,_r=null,Fi=!1;function Ba(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fi||An==null||An!==$s(r)||(r=An,"selectionStart"in r&&Tl(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}),_r&&Ur(_r,r)||(_r=r,r=Gs(Ii,"onSelect"),0<r.length&&(t=new Cl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=An)))}function gs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var In={animationend:gs("Animation","AnimationEnd"),animationiteration:gs("Animation","AnimationIteration"),animationstart:gs("Animation","AnimationStart"),transitionend:gs("Transition","TransitionEnd")},Zo={},Mc={};At&&(Mc=document.createElement("div").style,"AnimationEvent"in window||(delete In.animationend.animation,delete In.animationiteration.animation,delete In.animationstart.animation),"TransitionEvent"in window||delete In.transitionend.transition);function wo(e){if(Zo[e])return Zo[e];if(!In[e])return e;var t=In[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mc)return Zo[e]=t[n];return e}var Lc=wo("animationend"),Ac=wo("animationiteration"),Ic=wo("animationstart"),Fc=wo("transitionend"),Wc=new Map,ba="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 an(e,t){Wc.set(e,t),Pn(t,[e])}for(var qo=0;qo<ba.length;qo++){var ei=ba[qo],Xp=ei.toLowerCase(),Qp=ei[0].toUpperCase()+ei.slice(1);an(Xp,"on"+Qp)}an(Lc,"onAnimationEnd");an(Ac,"onAnimationIteration");an(Ic,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(Fc,"onTransitionEnd");Zn("onMouseEnter",["mouseout","mouseover"]);Zn("onMouseLeave",["mouseout","mouseover"]);Zn("onPointerEnter",["pointerout","pointerover"]);Zn("onPointerLeave",["pointerout","pointerover"]);Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jr="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(" "),Yp=new Set("cancel close invalid load scroll toggle".split(" ").concat(jr));function $a(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Xf(r,t,void 0,e),e.currentTarget=null}function Uc(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 o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==o&&s.isPropagationStopped())break e;$a(s,l,c),o=u}else for(i=0;i<r.length;i++){if(l=r[i],u=l.instance,c=l.currentTarget,l=l.listener,u!==o&&s.isPropagationStopped())break e;$a(s,l,c),o=u}}}if(Vs)throw e=Oi,Vs=!1,Oi=null,e}function re(e,t){var n=t[$i];n===void 0&&(n=t[$i]=new Set);var r=e+"__bubble";n.has(r)||(Bc(t,e,2,!1),n.add(r))}function ti(e,t,n){var r=0;t&&(r|=4),Bc(n,e,r,t)}var vs="_reactListening"+Math.random().toString(36).slice(2);function Br(e){if(!e[vs]){e[vs]=!0,Yu.forEach(function(n){n!=="selectionchange"&&(Yp.has(n)||ti(n,!1,e),ti(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vs]||(t[vs]=!0,ti("selectionchange",!1,t))}}function Bc(e,t,n,r){switch(Nc(t)){case 1:var s=ap;break;case 4:s=up;break;default:s=Pl}n=s.bind(null,t,n,e),s=void 0,!Ri||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 ni(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var u=i.tag;if((u===3||u===4)&&(u=i.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;i=i.return}for(;l!==null;){if(i=mn(l),i===null)return;if(u=i.tag,u===5||u===6){r=o=i;continue e}l=l.parentNode}}r=r.return}cc(function(){var c=o,h=xl(n),m=[];e:{var g=Wc.get(e);if(g!==void 0){var w=Cl,S=e;switch(e){case"keypress":if(Ms(n)===0)break e;case"keydown":case"keyup":w=Np;break;case"focusin":S="focus",w=Ko;break;case"focusout":S="blur",w=Ko;break;case"beforeblur":case"afterblur":w=Ko;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=Da;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=fp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=Cp;break;case Lc:case Ac:case Ic:w=mp;break;case Fc:w=zp;break;case"scroll":w=cp;break;case"wheel":w=Dp;break;case"copy":case"cut":case"paste":w=vp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Oa}var y=(t&4)!==0,_=!y&&e==="scroll",p=y?g!==null?g+"Capture":null:g;y=[];for(var d=c,f;d!==null;){f=d;var v=f.stateNode;if(f.tag===5&&v!==null&&(f=v,p!==null&&(v=Lr(d,p),v!=null&&y.push(br(d,v,f)))),_)break;d=d.return}0<y.length&&(g=new w(g,S,null,n,h),m.push({event:g,listeners:y}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",g&&n!==Ti&&(S=n.relatedTarget||n.fromElement)&&(mn(S)||S[It]))break e;if((w||g)&&(g=h.window===h?h:(g=h.ownerDocument)?g.defaultView||g.parentWindow:window,w?(S=n.relatedTarget||n.toElement,w=c,S=S?mn(S):null,S!==null&&(_=En(S),S!==_||S.tag!==5&&S.tag!==6)&&(S=null)):(w=null,S=c),w!==S)){if(y=Da,v="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(y=Oa,v="onPointerLeave",p="onPointerEnter",d="pointer"),_=w==null?g:Fn(w),f=S==null?g:Fn(S),g=new y(v,d+"leave",w,n,h),g.target=_,g.relatedTarget=f,v=null,mn(h)===c&&(y=new y(p,d+"enter",S,n,h),y.target=f,y.relatedTarget=_,v=y),_=v,w&&S)t:{for(y=w,p=S,d=0,f=y;f;f=Tn(f))d++;for(f=0,v=p;v;v=Tn(v))f++;for(;0<d-f;)y=Tn(y),d--;for(;0<f-d;)p=Tn(p),f--;for(;d--;){if(y===p||p!==null&&y===p.alternate)break t;y=Tn(y),p=Tn(p)}y=null}else y=null;w!==null&&Ha(m,g,w,y,!1),S!==null&&_!==null&&Ha(m,_,S,y,!0)}}e:{if(g=c?Fn(c):window,w=g.nodeName&&g.nodeName.toLowerCase(),w==="select"||w==="input"&&g.type==="file")var x=Fp;else if(Aa(g))if(Tc)x=bp;else{x=Up;var P=Wp}else(w=g.nodeName)&&w.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(x=Bp);if(x&&(x=x(e,c))){zc(m,x,n,h);break e}P&&P(e,g,c),e==="focusout"&&(P=g._wrapperState)&&P.controlled&&g.type==="number"&&Pi(g,"number",g.value)}switch(P=c?Fn(c):window,e){case"focusin":(Aa(P)||P.contentEditable==="true")&&(An=P,Ii=c,_r=null);break;case"focusout":_r=Ii=An=null;break;case"mousedown":Fi=!0;break;case"contextmenu":case"mouseup":case"dragend":Fi=!1,Ba(m,n,h);break;case"selectionchange":if(Vp)break;case"keydown":case"keyup":Ba(m,n,h)}var N;if(zl)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ln?Cc(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Ec&&n.locale!=="ko"&&(Ln||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ln&&(N=Pc()):(Kt=h,El="value"in Kt?Kt.value:Kt.textContent,Ln=!0)),P=Gs(c,C),0<P.length&&(C=new Ra(C,e,null,n,h),m.push({event:C,listeners:P}),N?C.data=N:(N=_c(n),N!==null&&(C.data=N)))),(N=Op?Mp(e,n):Lp(e,n))&&(c=Gs(c,"onBeforeInput"),0<c.length&&(h=new Ra("onBeforeInput","beforeinput",null,n,h),m.push({event:h,listeners:c}),h.data=N))}Uc(m,t)})}function br(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gs(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Lr(e,n),o!=null&&r.unshift(br(e,o,s)),o=Lr(e,t),o!=null&&r.push(br(e,o,s))),e=e.return}return r}function Tn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ha(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,s?(u=Lr(n,o),u!=null&&i.unshift(br(n,u,l))):s||(u=Lr(n,o),u!=null&&i.push(br(n,u,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Kp=/\r\n?/g,Gp=/\u0000|\uFFFD/g;function Va(e){return(typeof e=="string"?e:""+e).replace(Kp,`
38
+ `).replace(Gp,"")}function ys(e,t,n){if(t=Va(t),Va(e)!==t&&n)throw Error(E(425))}function Js(){}var Wi=null,Ui=null;function Bi(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 bi=typeof setTimeout=="function"?setTimeout:void 0,Jp=typeof clearTimeout=="function"?clearTimeout:void 0,Xa=typeof Promise=="function"?Promise:void 0,Zp=typeof queueMicrotask=="function"?queueMicrotask:typeof Xa<"u"?function(e){return Xa.resolve(null).then(e).catch(qp)}:bi;function qp(e){setTimeout(function(){throw e})}function ri(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),Fr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Fr(t)}function en(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 Qa(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 lr=Math.random().toString(36).slice(2),Et="__reactFiber$"+lr,$r="__reactProps$"+lr,It="__reactContainer$"+lr,$i="__reactEvents$"+lr,eh="__reactListeners$"+lr,th="__reactHandles$"+lr;function mn(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[It]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Qa(e);e!==null;){if(n=e[Et])return n;e=Qa(e)}return t}e=n,n=e.parentNode}return null}function qr(e){return e=e[Et]||e[It],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(E(33))}function So(e){return e[$r]||null}var Hi=[],Wn=-1;function un(e){return{current:e}}function se(e){0>Wn||(e.current=Hi[Wn],Hi[Wn]=null,Wn--)}function ne(e,t){Wn++,Hi[Wn]=e.current,e.current=t}var ln={},Me=un(ln),Ve=un(!1),Sn=ln;function qn(e,t){var n=e.type.contextTypes;if(!n)return ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Xe(e){return e=e.childContextTypes,e!=null}function Zs(){se(Ve),se(Me)}function Ya(e,t,n){if(Me.current!==ln)throw Error(E(168));ne(Me,t),ne(Ve,n)}function bc(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(E(108,Wf(e)||"Unknown",s));return ue({},n,r)}function qs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Sn=Me.current,ne(Me,e),ne(Ve,Ve.current),!0}function Ka(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=bc(e,t,Sn),r.__reactInternalMemoizedMergedChildContext=e,se(Ve),se(Me),ne(Me,e)):se(Ve),ne(Ve,n)}var Rt=null,xo=!1,si=!1;function $c(e){Rt===null?Rt=[e]:Rt.push(e)}function nh(e){xo=!0,$c(e)}function cn(){if(!si&&Rt!==null){si=!0;var e=0,t=J;try{var n=Rt;for(J=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Rt=null,xo=!1}catch(s){throw Rt!==null&&(Rt=Rt.slice(e+1)),hc(kl,cn),s}finally{J=t,si=!1}}return null}var Un=[],Bn=0,eo=null,to=0,it=[],lt=0,xn=null,Ot=1,Mt="";function pn(e,t){Un[Bn++]=to,Un[Bn++]=eo,eo=e,to=t}function Hc(e,t,n){it[lt++]=Ot,it[lt++]=Mt,it[lt++]=xn,xn=e;var r=Ot;e=Mt;var s=32-wt(r)-1;r&=~(1<<s),n+=1;var o=32-wt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Ot=1<<32-wt(t)+s|n<<s|r,Mt=o+e}else Ot=1<<o|n<<s|r,Mt=e}function Dl(e){e.return!==null&&(pn(e,1),Hc(e,1,0))}function Rl(e){for(;e===eo;)eo=Un[--Bn],Un[Bn]=null,to=Un[--Bn],Un[Bn]=null;for(;e===xn;)xn=it[--lt],it[lt]=null,Mt=it[--lt],it[lt]=null,Ot=it[--lt],it[lt]=null}var Je=null,Ge=null,ie=!1,yt=null;function Vc(e,t){var n=at(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 Ga(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,Je=e,Ge=en(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Je=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=xn!==null?{id:Ot,overflow:Mt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=at(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,Ge=null,!0):!1;default:return!1}}function Vi(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xi(e){if(ie){var t=Ge;if(t){var n=t;if(!Ga(e,t)){if(Vi(e))throw Error(E(418));t=en(n.nextSibling);var r=Je;t&&Ga(e,t)?Vc(r,n):(e.flags=e.flags&-4097|2,ie=!1,Je=e)}}else{if(Vi(e))throw Error(E(418));e.flags=e.flags&-4097|2,ie=!1,Je=e}}}function Ja(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function ws(e){if(e!==Je)return!1;if(!ie)return Ja(e),ie=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Bi(e.type,e.memoizedProps)),t&&(t=Ge)){if(Vi(e))throw Xc(),Error(E(418));for(;t;)Vc(e,t),t=en(t.nextSibling)}if(Ja(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=en(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Je?en(e.stateNode.nextSibling):null;return!0}function Xc(){for(var e=Ge;e;)e=en(e.nextSibling)}function er(){Ge=Je=null,ie=!1}function Ol(e){yt===null?yt=[e]:yt.push(e)}var rh=Ut.ReactCurrentBatchConfig;function hr(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(E(309));var r=n.stateNode}if(!r)throw Error(E(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(E(284));if(!n._owner)throw Error(E(290,e))}return e}function Ss(e,t){throw e=Object.prototype.toString.call(t),Error(E(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Za(e){var t=e._init;return t(e._payload)}function Qc(e){function t(p,d){if(e){var f=p.deletions;f===null?(p.deletions=[d],p.flags|=16):f.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function s(p,d){return p=sn(p,d),p.index=0,p.sibling=null,p}function o(p,d,f){return p.index=f,e?(f=p.alternate,f!==null?(f=f.index,f<d?(p.flags|=2,d):f):(p.flags|=2,d)):(p.flags|=1048576,d)}function i(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,d,f,v){return d===null||d.tag!==6?(d=di(f,p.mode,v),d.return=p,d):(d=s(d,f),d.return=p,d)}function u(p,d,f,v){var x=f.type;return x===Mn?h(p,d,f.props.children,v,f.key):d!==null&&(d.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Vt&&Za(x)===d.type)?(v=s(d,f.props),v.ref=hr(p,d,f),v.return=p,v):(v=Bs(f.type,f.key,f.props,null,p.mode,v),v.ref=hr(p,d,f),v.return=p,v)}function c(p,d,f,v){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=fi(f,p.mode,v),d.return=p,d):(d=s(d,f.children||[]),d.return=p,d)}function h(p,d,f,v,x){return d===null||d.tag!==7?(d=wn(f,p.mode,v,x),d.return=p,d):(d=s(d,f),d.return=p,d)}function m(p,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=di(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case us:return f=Bs(d.type,d.key,d.props,null,p.mode,f),f.ref=hr(p,null,d),f.return=p,f;case On:return d=fi(d,p.mode,f),d.return=p,d;case Vt:var v=d._init;return m(p,v(d._payload),f)}if(xr(d)||ur(d))return d=wn(d,p.mode,f,null),d.return=p,d;Ss(p,d)}return null}function g(p,d,f,v){var x=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return x!==null?null:l(p,d,""+f,v);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case us:return f.key===x?u(p,d,f,v):null;case On:return f.key===x?c(p,d,f,v):null;case Vt:return x=f._init,g(p,d,x(f._payload),v)}if(xr(f)||ur(f))return x!==null?null:h(p,d,f,v,null);Ss(p,f)}return null}function w(p,d,f,v,x){if(typeof v=="string"&&v!==""||typeof v=="number")return p=p.get(f)||null,l(d,p,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case us:return p=p.get(v.key===null?f:v.key)||null,u(d,p,v,x);case On:return p=p.get(v.key===null?f:v.key)||null,c(d,p,v,x);case Vt:var P=v._init;return w(p,d,f,P(v._payload),x)}if(xr(v)||ur(v))return p=p.get(f)||null,h(d,p,v,x,null);Ss(d,v)}return null}function S(p,d,f,v){for(var x=null,P=null,N=d,C=d=0,U=null;N!==null&&C<f.length;C++){N.index>C?(U=N,N=null):U=N.sibling;var M=g(p,N,f[C],v);if(M===null){N===null&&(N=U);break}e&&N&&M.alternate===null&&t(p,N),d=o(M,d,C),P===null?x=M:P.sibling=M,P=M,N=U}if(C===f.length)return n(p,N),ie&&pn(p,C),x;if(N===null){for(;C<f.length;C++)N=m(p,f[C],v),N!==null&&(d=o(N,d,C),P===null?x=N:P.sibling=N,P=N);return ie&&pn(p,C),x}for(N=r(p,N);C<f.length;C++)U=w(N,p,C,f[C],v),U!==null&&(e&&U.alternate!==null&&N.delete(U.key===null?C:U.key),d=o(U,d,C),P===null?x=U:P.sibling=U,P=U);return e&&N.forEach(function(b){return t(p,b)}),ie&&pn(p,C),x}function y(p,d,f,v){var x=ur(f);if(typeof x!="function")throw Error(E(150));if(f=x.call(f),f==null)throw Error(E(151));for(var P=x=null,N=d,C=d=0,U=null,M=f.next();N!==null&&!M.done;C++,M=f.next()){N.index>C?(U=N,N=null):U=N.sibling;var b=g(p,N,M.value,v);if(b===null){N===null&&(N=U);break}e&&N&&b.alternate===null&&t(p,N),d=o(b,d,C),P===null?x=b:P.sibling=b,P=b,N=U}if(M.done)return n(p,N),ie&&pn(p,C),x;if(N===null){for(;!M.done;C++,M=f.next())M=m(p,M.value,v),M!==null&&(d=o(M,d,C),P===null?x=M:P.sibling=M,P=M);return ie&&pn(p,C),x}for(N=r(p,N);!M.done;C++,M=f.next())M=w(N,p,C,M.value,v),M!==null&&(e&&M.alternate!==null&&N.delete(M.key===null?C:M.key),d=o(M,d,C),P===null?x=M:P.sibling=M,P=M);return e&&N.forEach(function(X){return t(p,X)}),ie&&pn(p,C),x}function _(p,d,f,v){if(typeof f=="object"&&f!==null&&f.type===Mn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case us:e:{for(var x=f.key,P=d;P!==null;){if(P.key===x){if(x=f.type,x===Mn){if(P.tag===7){n(p,P.sibling),d=s(P,f.props.children),d.return=p,p=d;break e}}else if(P.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Vt&&Za(x)===P.type){n(p,P.sibling),d=s(P,f.props),d.ref=hr(p,P,f),d.return=p,p=d;break e}n(p,P);break}else t(p,P);P=P.sibling}f.type===Mn?(d=wn(f.props.children,p.mode,v,f.key),d.return=p,p=d):(v=Bs(f.type,f.key,f.props,null,p.mode,v),v.ref=hr(p,d,f),v.return=p,p=v)}return i(p);case On:e:{for(P=f.key;d!==null;){if(d.key===P)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(p,d.sibling),d=s(d,f.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=fi(f,p.mode,v),d.return=p,p=d}return i(p);case Vt:return P=f._init,_(p,d,P(f._payload),v)}if(xr(f))return S(p,d,f,v);if(ur(f))return y(p,d,f,v);Ss(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,d!==null&&d.tag===6?(n(p,d.sibling),d=s(d,f),d.return=p,p=d):(n(p,d),d=di(f,p.mode,v),d.return=p,p=d),i(p)):n(p,d)}return _}var tr=Qc(!0),Yc=Qc(!1),no=un(null),ro=null,bn=null,Ml=null;function Ll(){Ml=bn=ro=null}function Al(e){var t=no.current;se(no),e._currentValue=t}function Qi(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 Gn(e,t){ro=e,Ml=bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(Ml!==e)if(e={context:e,memoizedValue:t,next:null},bn===null){if(ro===null)throw Error(E(308));bn=e,ro.dependencies={lanes:0,firstContext:e}}else bn=bn.next=e;return t}var gn=null;function Il(e){gn===null?gn=[e]:gn.push(e)}function Kc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Il(t)):(n.next=s.next,s.next=n),t.interleaved=n,Ft(e,r)}function Ft(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 Xt=!1;function Fl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gc(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 Lt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function tn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Ft(e,n)}return s=r.interleaved,s===null?(t.next=t,Il(r)):(t.next=s.next,s.next=t),r.interleaved=t,Ft(e,n)}function Ls(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,jl(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,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 so(e,t,n,r){var s=e.updateQueue;Xt=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,i===null?o=c:i.next=c,i=u;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==i&&(l===null?h.firstBaseUpdate=c:l.next=c,h.lastBaseUpdate=u))}if(o!==null){var m=s.baseState;i=0,h=c=u=null,l=o;do{var g=l.lane,w=l.eventTime;if((r&g)===g){h!==null&&(h=h.next={eventTime:w,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var S=e,y=l;switch(g=t,w=n,y.tag){case 1:if(S=y.payload,typeof S=="function"){m=S.call(w,m,g);break e}m=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=y.payload,g=typeof S=="function"?S.call(w,m,g):S,g==null)break e;m=ue({},m,g);break e;case 2:Xt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,g=s.effects,g===null?s.effects=[l]:g.push(l))}else w={eventTime:w,lane:g,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(c=h=w,u=m):h=h.next=w,i|=g;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;g=l,l=g.next,g.next=null,s.lastBaseUpdate=g,s.shared.pending=null}}while(!0);if(h===null&&(u=m),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);jn|=i,e.lanes=i,e.memoizedState=m}}function eu(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(E(191,s));s.call(r)}}}var es={},_t=un(es),Hr=un(es),Vr=un(es);function vn(e){if(e===es)throw Error(E(174));return e}function Wl(e,t){switch(ne(Vr,t),ne(Hr,e),ne(_t,es),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ci(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ci(t,e)}se(_t),ne(_t,t)}function nr(){se(_t),se(Hr),se(Vr)}function Jc(e){vn(Vr.current);var t=vn(_t.current),n=Ci(t,e.type);t!==n&&(ne(Hr,e),ne(_t,n))}function Ul(e){Hr.current===e&&(se(_t),se(Hr))}var le=un(0);function oo(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)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 oi=[];function Bl(){for(var e=0;e<oi.length;e++)oi[e]._workInProgressVersionPrimary=null;oi.length=0}var As=Ut.ReactCurrentDispatcher,ii=Ut.ReactCurrentBatchConfig,kn=0,ae=null,we=null,je=null,io=!1,zr=!1,Xr=0,sh=0;function Te(){throw Error(E(321))}function bl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!xt(e[n],t[n]))return!1;return!0}function $l(e,t,n,r,s,o){if(kn=o,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,As.current=e===null||e.memoizedState===null?ah:uh,e=n(r,s),zr){o=0;do{if(zr=!1,Xr=0,25<=o)throw Error(E(301));o+=1,je=we=null,t.updateQueue=null,As.current=ch,e=n(r,s)}while(zr)}if(As.current=lo,t=we!==null&&we.next!==null,kn=0,je=we=ae=null,io=!1,t)throw Error(E(300));return e}function Hl(){var e=Xr!==0;return Xr=0,e}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?ae.memoizedState=je=e:je=je.next=e,je}function dt(){if(we===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=je===null?ae.memoizedState:je.next;if(t!==null)je=t,we=e;else{if(e===null)throw Error(E(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},je===null?ae.memoizedState=je=e:je=je.next=e}return je}function Qr(e,t){return typeof t=="function"?t(e):t}function li(e){var t=dt(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=we,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var l=i=null,u=null,c=o;do{var h=c.lane;if((kn&h)===h)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var m={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=m,i=r):u=u.next=m,ae.lanes|=h,jn|=h}c=c.next}while(c!==null&&c!==o);u===null?i=r:u.next=l,xt(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,ae.lanes|=o,jn|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ai(e){var t=dt(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);xt(o,t.memoizedState)||(He=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Zc(){}function qc(e,t){var n=ae,r=dt(),s=t(),o=!xt(r.memoizedState,s);if(o&&(r.memoizedState=s,He=!0),r=r.queue,Vl(nd.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,Yr(9,td.bind(null,n,r,s,t),void 0,null),Ne===null)throw Error(E(349));kn&30||ed(n,t,s)}return s}function ed(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function td(e,t,n,r){t.value=n,t.getSnapshot=r,rd(t)&&sd(e)}function nd(e,t,n){return n(function(){rd(t)&&sd(e)})}function rd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!xt(e,n)}catch{return!0}}function sd(e){var t=Ft(e,1);t!==null&&St(t,e,1,-1)}function tu(e){var t=Nt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e},t.queue=e,e=e.dispatch=lh.bind(null,ae,e),[t.memoizedState,e]}function Yr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ae.updateQueue,t===null?(t={lastEffect:null,stores:null},ae.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 od(){return dt().memoizedState}function Is(e,t,n,r){var s=Nt();ae.flags|=e,s.memoizedState=Yr(1|t,n,void 0,r===void 0?null:r)}function ko(e,t,n,r){var s=dt();r=r===void 0?null:r;var o=void 0;if(we!==null){var i=we.memoizedState;if(o=i.destroy,r!==null&&bl(r,i.deps)){s.memoizedState=Yr(t,n,o,r);return}}ae.flags|=e,s.memoizedState=Yr(1|t,n,o,r)}function nu(e,t){return Is(8390656,8,e,t)}function Vl(e,t){return ko(2048,8,e,t)}function id(e,t){return ko(4,2,e,t)}function ld(e,t){return ko(4,4,e,t)}function ad(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 ud(e,t,n){return n=n!=null?n.concat([e]):null,ko(4,4,ad.bind(null,t,e),n)}function Xl(){}function cd(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dd(e,t){var n=dt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&bl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fd(e,t,n){return kn&21?(xt(n,t)||(n=vc(),ae.lanes|=n,jn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=n)}function oh(e,t){var n=J;J=n!==0&&4>n?n:4,e(!0);var r=ii.transition;ii.transition={};try{e(!1),t()}finally{J=n,ii.transition=r}}function pd(){return dt().memoizedState}function ih(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hd(e))md(t,n);else if(n=Kc(e,t,n,r),n!==null){var s=Fe();St(n,e,r,s),gd(n,t,r)}}function lh(e,t,n){var r=rn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hd(e))md(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,n);if(s.hasEagerState=!0,s.eagerState=l,xt(l,i)){var u=t.interleaved;u===null?(s.next=s,Il(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Kc(e,t,s,r),n!==null&&(s=Fe(),St(n,e,r,s),gd(n,t,r))}}function hd(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function md(e,t){zr=io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var lo={readContext:ct,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},ah={readContext:ct,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:nu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Is(4194308,4,ad.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=Nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nt();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=ih.bind(null,ae,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:tu,useDebugValue:Xl,useDeferredValue:function(e){return Nt().memoizedState=e},useTransition:function(){var e=tu(!1),t=e[0];return e=oh.bind(null,e[1]),Nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ae,s=Nt();if(ie){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),Ne===null)throw Error(E(349));kn&30||ed(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,nu(nd.bind(null,r,o,e),[e]),r.flags|=2048,Yr(9,td.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Nt(),t=Ne.identifierPrefix;if(ie){var n=Mt,r=Ot;n=(r&~(1<<32-wt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=sh++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uh={readContext:ct,useCallback:cd,useContext:ct,useEffect:Vl,useImperativeHandle:ud,useInsertionEffect:id,useLayoutEffect:ld,useMemo:dd,useReducer:li,useRef:od,useState:function(){return li(Qr)},useDebugValue:Xl,useDeferredValue:function(e){var t=dt();return fd(t,we.memoizedState,e)},useTransition:function(){var e=li(Qr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:qc,useId:pd,unstable_isNewReconciler:!1},ch={readContext:ct,useCallback:cd,useContext:ct,useEffect:Vl,useImperativeHandle:ud,useInsertionEffect:id,useLayoutEffect:ld,useMemo:dd,useReducer:ai,useRef:od,useState:function(){return ai(Qr)},useDebugValue:Xl,useDeferredValue:function(e){var t=dt();return we===null?t.memoizedState=e:fd(t,we.memoizedState,e)},useTransition:function(){var e=ai(Qr)[0],t=dt().memoizedState;return[e,t]},useMutableSource:Zc,useSyncExternalStore:qc,useId:pd,unstable_isNewReconciler:!1};function gt(e,t){if(e&&e.defaultProps){t=ue({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ue({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var jo={isMounted:function(e){return(e=e._reactInternals)?En(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=rn(e),o=Lt(r,s);o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,s),t!==null&&(St(t,e,s,r),Ls(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=rn(e),o=Lt(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tn(e,o,s),t!==null&&(St(t,e,s,r),Ls(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=rn(e),s=Lt(n,r);s.tag=2,t!=null&&(s.callback=t),t=tn(e,s,r),t!==null&&(St(t,e,r,n),Ls(t,e,r))}};function ru(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ur(n,r)||!Ur(s,o):!0}function vd(e,t,n){var r=!1,s=ln,o=t.contextType;return typeof o=="object"&&o!==null?o=ct(o):(s=Xe(t)?Sn:Me.current,r=t.contextTypes,o=(r=r!=null)?qn(e,s):ln),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=jo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),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&&jo.enqueueReplaceState(t,t.state,null)}function Ki(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Fl(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=ct(o):(o=Xe(t)?Sn:Me.current,s.context=qn(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Yi(e,t,o,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&&jo.enqueueReplaceState(s,s.state,null),so(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function rr(e,t){try{var n="",r=t;do n+=Ff(r),r=r.return;while(r);var s=n}catch(o){s=`
39
+ Error generating stack: `+o.message+`
40
+ `+o.stack}return{value:e,source:t,stack:s,digest:null}}function ui(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Gi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var dh=typeof WeakMap=="function"?WeakMap:Map;function yd(e,t,n){n=Lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uo||(uo=!0,il=r),Gi(e,t)},n}function wd(e,t,n){n=Lt(-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(){Gi(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Gi(e,t),typeof r!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ou(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new dh;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=Ph.bind(null,e,t,n),t.then(e,e))}function iu(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 lu(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Lt(-1,1),t.tag=2,tn(n,t,1))),n.lanes|=1),e)}var fh=Ut.ReactCurrentOwner,He=!1;function Ie(e,t,n,r){t.child=e===null?Yc(t,null,n,r):tr(t,e.child,n,r)}function au(e,t,n,r,s){n=n.render;var o=t.ref;return Gn(t,s),r=$l(e,t,n,r,o,s),n=Hl(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wt(e,t,s)):(ie&&n&&Dl(t),t.flags|=1,Ie(e,t,r,s),t.child)}function uu(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!ea(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Sd(e,t,o,r,s)):(e=Bs(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ur,n(i,r)&&e.ref===t.ref)return Wt(e,t,s)}return t.flags|=1,e=sn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Sd(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Ur(o,r)&&e.ref===t.ref)if(He=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(He=!0);else return t.lanes=e.lanes,Wt(e,t,s)}return Ji(e,t,n,r,s)}function xd(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Hn,Ke),Ke|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ne(Hn,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ne(Hn,Ke),Ke|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ne(Hn,Ke),Ke|=r;return Ie(e,t,s,n),t.child}function kd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ji(e,t,n,r,s){var o=Xe(n)?Sn:Me.current;return o=qn(t,o),Gn(t,s),n=$l(e,t,n,r,o,s),r=Hl(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Wt(e,t,s)):(ie&&r&&Dl(t),t.flags|=1,Ie(e,t,n,s),t.child)}function cu(e,t,n,r,s){if(Xe(n)){var o=!0;qs(t)}else o=!1;if(Gn(t,s),t.stateNode===null)Fs(e,t),vd(t,n,r),Ki(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var u=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=ct(c):(c=Xe(n)?Sn:Me.current,c=qn(t,c));var h=n.getDerivedStateFromProps,m=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||u!==c)&&su(t,i,r,c),Xt=!1;var g=t.memoizedState;i.state=g,so(t,r,i,s),u=t.memoizedState,l!==r||g!==u||Ve.current||Xt?(typeof h=="function"&&(Yi(t,n,h,r),u=t.memoizedState),(l=Xt||ru(t,n,l,r,g,u,c))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=c,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Gc(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:gt(t.type,l),i.props=c,m=t.pendingProps,g=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=ct(u):(u=Xe(n)?Sn:Me.current,u=qn(t,u));var w=n.getDerivedStateFromProps;(h=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==m||g!==u)&&su(t,i,r,u),Xt=!1,g=t.memoizedState,i.state=g,so(t,r,i,s);var S=t.memoizedState;l!==m||g!==S||Ve.current||Xt?(typeof w=="function"&&(Yi(t,n,w,r),S=t.memoizedState),(c=Xt||ru(t,n,c,r,g,S,u)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,S,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,S,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),i.props=r,i.state=S,i.context=u,r=c):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return Zi(e,t,n,r,o,s)}function Zi(e,t,n,r,s,o){kd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Ka(t,n,!1),Wt(e,t,o);r=t.stateNode,fh.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=tr(t,e.child,null,o),t.child=tr(t,null,l,o)):Ie(e,t,l,o),t.memoizedState=r.state,s&&Ka(t,n,!0),t.child}function jd(e){var t=e.stateNode;t.pendingContext?Ya(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ya(e,t.context,!1),Wl(e,t.containerInfo)}function du(e,t,n,r,s){return er(),Ol(s),t.flags|=256,Ie(e,t,n,r),t.child}var qi={dehydrated:null,treeContext:null,retryLane:0};function el(e){return{baseLanes:e,cachePool:null,transitions:null}}function Nd(e,t,n){var r=t.pendingProps,s=le.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ne(le,s&1),e===null)return Xi(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Eo(i,r,0,null),e=wn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=el(n),t.memoizedState=qi,e):Ql(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return ph(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=sn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=sn(l,o):(o=wn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?el(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=qi,r}return o=e.child,e=o.sibling,r=sn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(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 Ql(e,t){return t=Eo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xs(e,t,n,r){return r!==null&&Ol(r),tr(t,e.child,null,n),e=Ql(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ph(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=ui(Error(E(422))),xs(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Eo({mode:"visible",children:r.children},s,0,null),o=wn(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&tr(t,e.child,null,i),t.child.memoizedState=el(i),t.memoizedState=qi,o);if(!(t.mode&1))return xs(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(E(419)),r=ui(o,r,void 0),xs(e,t,i,r)}if(l=(i&e.childLanes)!==0,He||l){if(r=Ne,r!==null){switch(i&-i){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|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Ft(e,s),St(r,e,s,-1))}return ql(),r=ui(Error(E(421))),xs(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Eh.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Ge=en(s.nextSibling),Je=t,ie=!0,yt=null,e!==null&&(it[lt++]=Ot,it[lt++]=Mt,it[lt++]=xn,Ot=e.id,Mt=e.overflow,xn=t),t=Ql(t,r.children),t.flags|=4096,t)}function fu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function ci(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Pd(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Ie(e,t,r.children,n),r=le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fu(e,n,t);else if(e.tag===19)fu(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(ne(le,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&oo(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ci(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&oo(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ci(t,!0,n,null,o);break;case"together":ci(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=sn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hh(e,t,n){switch(t.tag){case 3:jd(t),er();break;case 5:Jc(t);break;case 1:Xe(t.type)&&qs(t);break;case 4:Wl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ne(no,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ne(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?Nd(e,t,n):(ne(le,le.current&1),e=Wt(e,t,n),e!==null?e.sibling:null);ne(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Pd(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ne(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,xd(e,t,n)}return Wt(e,t,n)}var Ed,tl,Cd,_d;Ed=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}};tl=function(){};Cd=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,vn(_t.current);var o=null;switch(n){case"input":s=ji(e,s),r=ji(e,r),o=[];break;case"select":s=ue({},s,{value:void 0}),r=ue({},r,{value:void 0}),o=[];break;case"textarea":s=Ei(e,s),r=Ei(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Js)}_i(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Or.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var u=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(i in l)!l.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&l[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(o=o||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Or.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&re("scroll",e),o||l===u||(o=[])):(o=o||[]).push(c,u))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};_d=function(e,t,n,r){n!==r&&(t.flags|=4)};function mr(e,t){if(!ie)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 De(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 mh(e,t,n){var r=t.pendingProps;switch(Rl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(t),null;case 1:return Xe(t.type)&&Zs(),De(t),null;case 3:return r=t.stateNode,nr(),se(Ve),se(Me),Bl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ws(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yt!==null&&(ul(yt),yt=null))),tl(e,t),De(t),null;case 5:Ul(t);var s=vn(Vr.current);if(n=t.type,e!==null&&t.stateNode!=null)Cd(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return De(t),null}if(e=vn(_t.current),ws(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Et]=t,r[$r]=o,e=(t.mode&1)!==0,n){case"dialog":re("cancel",r),re("close",r);break;case"iframe":case"object":case"embed":re("load",r);break;case"video":case"audio":for(s=0;s<jr.length;s++)re(jr[s],r);break;case"source":re("error",r);break;case"img":case"image":case"link":re("error",r),re("load",r);break;case"details":re("toggle",r);break;case"input":xa(r,o),re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},re("invalid",r);break;case"textarea":ja(r,o),re("invalid",r)}_i(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?r.textContent!==l&&(o.suppressHydrationWarning!==!0&&ys(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&ys(r.textContent,l,e),s=["children",""+l]):Or.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&re("scroll",r)}switch(n){case"input":cs(r),ka(r,o,!0);break;case"textarea":cs(r),Na(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Js)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=nc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Et]=t,e[$r]=r,Ed(e,t,!1,!1),t.stateNode=e;e:{switch(i=zi(n,r),n){case"dialog":re("cancel",e),re("close",e),s=r;break;case"iframe":case"object":case"embed":re("load",e),s=r;break;case"video":case"audio":for(s=0;s<jr.length;s++)re(jr[s],e);s=r;break;case"source":re("error",e),s=r;break;case"img":case"image":case"link":re("error",e),re("load",e),s=r;break;case"details":re("toggle",e),s=r;break;case"input":xa(e,r),s=ji(e,r),re("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ue({},r,{value:void 0}),re("invalid",e);break;case"textarea":ja(e,r),s=Ei(e,r),re("invalid",e);break;default:s=r}_i(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var u=l[o];o==="style"?oc(e,u):o==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&rc(e,u)):o==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Mr(e,u):typeof u=="number"&&Mr(e,""+u):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Or.hasOwnProperty(o)?u!=null&&o==="onScroll"&&re("scroll",e):u!=null&&vl(e,o,u,i))}switch(n){case"input":cs(e),ka(e,r,!1);break;case"textarea":cs(e),Na(e);break;case"option":r.value!=null&&e.setAttribute("value",""+on(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Xn(e,!!r.multiple,o,!1):r.defaultValue!=null&&Xn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Js)}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 De(t),null;case 6:if(e&&t.stateNode!=null)_d(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(E(166));if(n=vn(Vr.current),vn(_t.current),ws(t)){if(r=t.stateNode,n=t.memoizedProps,r[Et]=t,(o=r.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:ys(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ys(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Et]=t,t.stateNode=r}return De(t),null;case 13:if(se(le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ie&&Ge!==null&&t.mode&1&&!(t.flags&128))Xc(),er(),t.flags|=98560,o=!1;else if(o=ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(E(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(E(317));o[Et]=t}else er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;De(t),o=!1}else yt!==null&&(ul(yt),yt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||le.current&1?Se===0&&(Se=3):ql())),t.updateQueue!==null&&(t.flags|=4),De(t),null);case 4:return nr(),tl(e,t),e===null&&Br(t.stateNode.containerInfo),De(t),null;case 10:return Al(t.type._context),De(t),null;case 17:return Xe(t.type)&&Zs(),De(t),null;case 19:if(se(le),o=t.memoizedState,o===null)return De(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)mr(o,!1);else{if(Se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=oo(e),i!==null){for(t.flags|=128,mr(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ne(le,le.current&1|2),t.child}e=e.sibling}o.tail!==null&&he()>sr&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=oo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ie)return De(t),null}else 2*he()-o.renderingStartTime>sr&&n!==1073741824&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=he(),t.sibling=null,n=le.current,ne(le,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return Zl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function gh(e,t){switch(Rl(t),t.tag){case 1:return Xe(t.type)&&Zs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nr(),se(Ve),se(Me),Bl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ul(t),null;case 13:if(se(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(le),null;case 4:return nr(),null;case 10:return Al(t.type._context),null;case 22:case 23:return Zl(),null;case 24:return null;default:return null}}var ks=!1,Oe=!1,vh=typeof WeakSet=="function"?WeakSet:Set,O=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ce(e,t,r)}else n.current=null}function nl(e,t,n){try{n()}catch(r){ce(e,t,r)}}var pu=!1;function yh(e,t){if(Wi=Ys,e=Oc(),Tl(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,l=-1,u=-1,c=0,h=0,m=e,g=null;t:for(;;){for(var w;m!==n||s!==0&&m.nodeType!==3||(l=i+s),m!==o||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(w=m.firstChild)!==null;)g=m,m=w;for(;;){if(m===e)break t;if(g===n&&++c===s&&(l=i),g===o&&++h===r&&(u=i),(w=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=w}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ui={focusedElem:e,selectionRange:n},Ys=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var y=S.memoizedProps,_=S.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:gt(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){ce(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return S=pu,pu=!1,S}function Tr(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 o=s.destroy;s.destroy=void 0,o!==void 0&&nl(t,n,o)}s=s.next}while(s!==r)}}function No(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 rl(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 zd(e){var t=e.alternate;t!==null&&(e.alternate=null,zd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[$r],delete t[$i],delete t[eh],delete t[th])),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 Td(e){return e.tag===5||e.tag===3||e.tag===4}function hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Td(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 sl(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=Js));else if(r!==4&&(e=e.child,e!==null))for(sl(e,t,n),e=e.sibling;e!==null;)sl(e,t,n),e=e.sibling}function ol(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(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}var Ee=null,vt=!1;function bt(e,t,n){for(n=n.child;n!==null;)Dd(e,t,n),n=n.sibling}function Dd(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(go,n)}catch{}switch(n.tag){case 5:Oe||$n(n,t);case 6:var r=Ee,s=vt;Ee=null,bt(e,t,n),Ee=r,vt=s,Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(vt?(e=Ee,n=n.stateNode,e.nodeType===8?ri(e.parentNode,n):e.nodeType===1&&ri(e,n),Fr(e)):ri(Ee,n.stateNode));break;case 4:r=Ee,s=vt,Ee=n.stateNode.containerInfo,vt=!0,bt(e,t,n),Ee=r,vt=s;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&nl(n,t,i),s=s.next}while(s!==r)}bt(e,t,n);break;case 1:if(!Oe&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ce(n,t,l)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,bt(e,t,n),Oe=r):bt(e,t,n);break;default:bt(e,t,n)}}function mu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vh),t.forEach(function(r){var s=Ch.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:Ee=l.stateNode,vt=!1;break e;case 3:Ee=l.stateNode.containerInfo,vt=!0;break e;case 4:Ee=l.stateNode.containerInfo,vt=!0;break e}l=l.return}if(Ee===null)throw Error(E(160));Dd(o,i,s),Ee=null,vt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){ce(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rd(t,e),t=t.sibling}function Rd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(pt(t,e),kt(e),r&4){try{Tr(3,e,e.return),No(3,e)}catch(y){ce(e,e.return,y)}try{Tr(5,e,e.return)}catch(y){ce(e,e.return,y)}}break;case 1:pt(t,e),kt(e),r&512&&n!==null&&$n(n,n.return);break;case 5:if(pt(t,e),kt(e),r&512&&n!==null&&$n(n,n.return),e.flags&32){var s=e.stateNode;try{Mr(s,"")}catch(y){ce(e,e.return,y)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&ec(s,o),zi(l,i);var c=zi(l,o);for(i=0;i<u.length;i+=2){var h=u[i],m=u[i+1];h==="style"?oc(s,m):h==="dangerouslySetInnerHTML"?rc(s,m):h==="children"?Mr(s,m):vl(s,h,m,c)}switch(l){case"input":Ni(s,o);break;case"textarea":tc(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var w=o.value;w!=null?Xn(s,!!o.multiple,w,!1):g!==!!o.multiple&&(o.defaultValue!=null?Xn(s,!!o.multiple,o.defaultValue,!0):Xn(s,!!o.multiple,o.multiple?[]:"",!1))}s[$r]=o}catch(y){ce(e,e.return,y)}}break;case 6:if(pt(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(E(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){ce(e,e.return,y)}}break;case 3:if(pt(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Fr(t.containerInfo)}catch(y){ce(e,e.return,y)}break;case 4:pt(t,e),kt(e);break;case 13:pt(t,e),kt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Gl=he())),r&4&&mu(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(c=Oe)||h,pt(t,e),Oe=c):pt(t,e),kt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!h&&e.mode&1)for(O=e,h=e.child;h!==null;){for(m=O=h;O!==null;){switch(g=O,w=g.child,g.tag){case 0:case 11:case 14:case 15:Tr(4,g,g.return);break;case 1:$n(g,g.return);var S=g.stateNode;if(typeof S.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(y){ce(r,n,y)}}break;case 5:$n(g,g.return);break;case 22:if(g.memoizedState!==null){vu(m);continue}}w!==null?(w.return=g,O=w):vu(m)}h=h.sibling}e:for(h=null,m=e;;){if(m.tag===5){if(h===null){h=m;try{s=m.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=m.stateNode,u=m.memoizedProps.style,i=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=sc("display",i))}catch(y){ce(e,e.return,y)}}}else if(m.tag===6){if(h===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(y){ce(e,e.return,y)}}else if((m.tag!==22&&m.tag!==23||m.memoizedState===null||m===e)&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===e)break e;for(;m.sibling===null;){if(m.return===null||m.return===e)break e;h===m&&(h=null),m=m.return}h===m&&(h=null),m.sibling.return=m.return,m=m.sibling}}break;case 19:pt(t,e),kt(e),r&4&&mu(e);break;case 21:break;default:pt(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Td(n)){var r=n;break e}n=n.return}throw Error(E(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Mr(s,""),r.flags&=-33);var o=hu(e);ol(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=hu(e);sl(e,l,i);break;default:throw Error(E(161))}}catch(u){ce(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wh(e,t,n){O=e,Od(e)}function Od(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var s=O,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||ks;if(!i){var l=s.alternate,u=l!==null&&l.memoizedState!==null||Oe;l=ks;var c=Oe;if(ks=i,(Oe=u)&&!c)for(O=s;O!==null;)i=O,u=i.child,i.tag===22&&i.memoizedState!==null?yu(s):u!==null?(u.return=i,O=u):yu(s);for(;o!==null;)O=o,Od(o),o=o.sibling;O=s,ks=l,Oe=c}gu(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,O=o):gu(e)}}function gu(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||No(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)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 o=t.updateQueue;o!==null&&eu(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}eu(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var h=c.memoizedState;if(h!==null){var m=h.dehydrated;m!==null&&Fr(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(E(163))}Oe||t.flags&512&&rl(t)}catch(g){ce(t,t.return,g)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function vu(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function yu(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{No(4,t)}catch(u){ce(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){ce(t,s,u)}}var o=t.return;try{rl(t)}catch(u){ce(t,o,u)}break;case 5:var i=t.return;try{rl(t)}catch(u){ce(t,i,u)}}}catch(u){ce(t,t.return,u)}if(t===e){O=null;break}var l=t.sibling;if(l!==null){l.return=t.return,O=l;break}O=t.return}}var Sh=Math.ceil,ao=Ut.ReactCurrentDispatcher,Yl=Ut.ReactCurrentOwner,ut=Ut.ReactCurrentBatchConfig,Q=0,Ne=null,ge=null,Ce=0,Ke=0,Hn=un(0),Se=0,Kr=null,jn=0,Po=0,Kl=0,Dr=null,$e=null,Gl=0,sr=1/0,Dt=null,uo=!1,il=null,nn=null,js=!1,Gt=null,co=0,Rr=0,ll=null,Ws=-1,Us=0;function Fe(){return Q&6?he():Ws!==-1?Ws:Ws=he()}function rn(e){return e.mode&1?Q&2&&Ce!==0?Ce&-Ce:rh.transition!==null?(Us===0&&(Us=vc()),Us):(e=J,e!==0||(e=window.event,e=e===void 0?16:Nc(e.type)),e):1}function St(e,t,n,r){if(50<Rr)throw Rr=0,ll=null,Error(E(185));Jr(e,n,r),(!(Q&2)||e!==Ne)&&(e===Ne&&(!(Q&2)&&(Po|=n),Se===4&&Yt(e,Ce)),Qe(e,r),n===1&&Q===0&&!(t.mode&1)&&(sr=he()+500,xo&&cn()))}function Qe(e,t){var n=e.callbackNode;rp(e,t);var r=Qs(e,e===Ne?Ce:0);if(r===0)n!==null&&Ca(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Ca(n),t===1)e.tag===0?nh(wu.bind(null,e)):$c(wu.bind(null,e)),Zp(function(){!(Q&6)&&cn()}),n=null;else{switch(yc(r)){case 1:n=kl;break;case 4:n=mc;break;case 16:n=Xs;break;case 536870912:n=gc;break;default:n=Xs}n=Bd(n,Md.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Md(e,t){if(Ws=-1,Us=0,Q&6)throw Error(E(327));var n=e.callbackNode;if(Jn()&&e.callbackNode!==n)return null;var r=Qs(e,e===Ne?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=fo(e,r);else{t=r;var s=Q;Q|=2;var o=Ad();(Ne!==e||Ce!==t)&&(Dt=null,sr=he()+500,yn(e,t));do try{jh();break}catch(l){Ld(e,l)}while(!0);Ll(),ao.current=o,Q=s,ge!==null?t=0:(Ne=null,Ce=0,t=Se)}if(t!==0){if(t===2&&(s=Mi(e),s!==0&&(r=s,t=al(e,s))),t===1)throw n=Kr,yn(e,0),Yt(e,r),Qe(e,he()),n;if(t===6)Yt(e,r);else{if(s=e.current.alternate,!(r&30)&&!xh(s)&&(t=fo(e,r),t===2&&(o=Mi(e),o!==0&&(r=o,t=al(e,o))),t===1))throw n=Kr,yn(e,0),Yt(e,r),Qe(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(E(345));case 2:hn(e,$e,Dt);break;case 3:if(Yt(e,r),(r&130023424)===r&&(t=Gl+500-he(),10<t)){if(Qs(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=bi(hn.bind(null,e,$e,Dt),t);break}hn(e,$e,Dt);break;case 4:if(Yt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-wt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sh(r/1960))-r,10<r){e.timeoutHandle=bi(hn.bind(null,e,$e,Dt),r);break}hn(e,$e,Dt);break;case 5:hn(e,$e,Dt);break;default:throw Error(E(329))}}}return Qe(e,he()),e.callbackNode===n?Md.bind(null,e):null}function al(e,t){var n=Dr;return e.current.memoizedState.isDehydrated&&(yn(e,t).flags|=256),e=fo(e,t),e!==2&&(t=$e,$e=n,t!==null&&ul(t)),e}function ul(e){$e===null?$e=e:$e.push.apply($e,e)}function xh(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],o=s.getSnapshot;s=s.value;try{if(!xt(o(),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 Yt(e,t){for(t&=~Kl,t&=~Po,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-wt(t),r=1<<n;e[n]=-1,t&=~r}}function wu(e){if(Q&6)throw Error(E(327));Jn();var t=Qs(e,0);if(!(t&1))return Qe(e,he()),null;var n=fo(e,t);if(e.tag!==0&&n===2){var r=Mi(e);r!==0&&(t=r,n=al(e,r))}if(n===1)throw n=Kr,yn(e,0),Yt(e,t),Qe(e,he()),n;if(n===6)throw Error(E(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,hn(e,$e,Dt),Qe(e,he()),null}function Jl(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(sr=he()+500,xo&&cn())}}function Nn(e){Gt!==null&&Gt.tag===0&&!(Q&6)&&Jn();var t=Q;Q|=1;var n=ut.transition,r=J;try{if(ut.transition=null,J=1,e)return e()}finally{J=r,ut.transition=n,Q=t,!(Q&6)&&cn()}}function Zl(){Ke=Hn.current,se(Hn)}function yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Jp(n)),ge!==null)for(n=ge.return;n!==null;){var r=n;switch(Rl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Zs();break;case 3:nr(),se(Ve),se(Me),Bl();break;case 5:Ul(r);break;case 4:nr();break;case 13:se(le);break;case 19:se(le);break;case 10:Al(r.type._context);break;case 22:case 23:Zl()}n=n.return}if(Ne=e,ge=e=sn(e.current,null),Ce=Ke=t,Se=0,Kr=null,Kl=Po=jn=0,$e=Dr=null,gn!==null){for(t=0;t<gn.length;t++)if(n=gn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}gn=null}return e}function Ld(e,t){do{var n=ge;try{if(Ll(),As.current=lo,io){for(var r=ae.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}io=!1}if(kn=0,je=we=ae=null,zr=!1,Xr=0,Yl.current=null,n===null||n.return===null){Se=1,Kr=t,ge=null;break}e:{var o=e,i=n.return,l=n,u=t;if(t=Ce,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,h=l,m=h.tag;if(!(h.mode&1)&&(m===0||m===11||m===15)){var g=h.alternate;g?(h.updateQueue=g.updateQueue,h.memoizedState=g.memoizedState,h.lanes=g.lanes):(h.updateQueue=null,h.memoizedState=null)}var w=iu(i);if(w!==null){w.flags&=-257,lu(w,i,l,o,t),w.mode&1&&ou(o,c,t),t=w,u=c;var S=t.updateQueue;if(S===null){var y=new Set;y.add(u),t.updateQueue=y}else S.add(u);break e}else{if(!(t&1)){ou(o,c,t),ql();break e}u=Error(E(426))}}else if(ie&&l.mode&1){var _=iu(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),lu(_,i,l,o,t),Ol(rr(u,l));break e}}o=u=rr(u,l),Se!==4&&(Se=2),Dr===null?Dr=[o]:Dr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=yd(o,u,t);qa(o,p);break e;case 1:l=u;var d=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(nn===null||!nn.has(f)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=wd(o,l,t);qa(o,v);break e}}o=o.return}while(o!==null)}Fd(n)}catch(x){t=x,ge===n&&n!==null&&(ge=n=n.return);continue}break}while(!0)}function Ad(){var e=ao.current;return ao.current=lo,e===null?lo:e}function ql(){(Se===0||Se===3||Se===2)&&(Se=4),Ne===null||!(jn&268435455)&&!(Po&268435455)||Yt(Ne,Ce)}function fo(e,t){var n=Q;Q|=2;var r=Ad();(Ne!==e||Ce!==t)&&(Dt=null,yn(e,t));do try{kh();break}catch(s){Ld(e,s)}while(!0);if(Ll(),Q=n,ao.current=r,ge!==null)throw Error(E(261));return Ne=null,Ce=0,Se}function kh(){for(;ge!==null;)Id(ge)}function jh(){for(;ge!==null&&!Yf();)Id(ge)}function Id(e){var t=Ud(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?Fd(e):ge=t,Yl.current=null}function Fd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=gh(n,t),n!==null){n.flags&=32767,ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Se=6,ge=null;return}}else if(n=mh(n,t,Ke),n!==null){ge=n;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Se===0&&(Se=5)}function hn(e,t,n){var r=J,s=ut.transition;try{ut.transition=null,J=1,Nh(e,t,n,r)}finally{ut.transition=s,J=r}return null}function Nh(e,t,n,r){do Jn();while(Gt!==null);if(Q&6)throw Error(E(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(E(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(sp(e,o),e===Ne&&(ge=Ne=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||js||(js=!0,Bd(Xs,function(){return Jn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=ut.transition,ut.transition=null;var i=J;J=1;var l=Q;Q|=4,Yl.current=null,yh(e,n),Rd(n,e),Hp(Ui),Ys=!!Wi,Ui=Wi=null,e.current=n,wh(n),Kf(),Q=l,J=i,ut.transition=o}else e.current=n;if(js&&(js=!1,Gt=e,co=s),o=e.pendingLanes,o===0&&(nn=null),Zf(n.stateNode),Qe(e,he()),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(uo)throw uo=!1,e=il,il=null,e;return co&1&&e.tag!==0&&Jn(),o=e.pendingLanes,o&1?e===ll?Rr++:(Rr=0,ll=e):Rr=0,cn(),null}function Jn(){if(Gt!==null){var e=yc(co),t=ut.transition,n=J;try{if(ut.transition=null,J=16>e?16:e,Gt===null)var r=!1;else{if(e=Gt,Gt=null,co=0,Q&6)throw Error(E(331));var s=Q;for(Q|=4,O=e.current;O!==null;){var o=O,i=o.child;if(O.flags&16){var l=o.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(O=c;O!==null;){var h=O;switch(h.tag){case 0:case 11:case 15:Tr(8,h,o)}var m=h.child;if(m!==null)m.return=h,O=m;else for(;O!==null;){h=O;var g=h.sibling,w=h.return;if(zd(h),h===c){O=null;break}if(g!==null){g.return=w,O=g;break}O=w}}}var S=o.alternate;if(S!==null){var y=S.child;if(y!==null){S.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}O=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,O=i;else e:for(;O!==null;){if(o=O,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Tr(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,O=p;break e}O=o.return}}var d=e.current;for(O=d;O!==null;){i=O;var f=i.child;if(i.subtreeFlags&2064&&f!==null)f.return=i,O=f;else e:for(i=d;O!==null;){if(l=O,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:No(9,l)}}catch(x){ce(l,l.return,x)}if(l===i){O=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,O=v;break e}O=l.return}}if(Q=s,cn(),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(go,e)}catch{}r=!0}return r}finally{J=n,ut.transition=t}}return!1}function Su(e,t,n){t=rr(n,t),t=yd(e,t,1),e=tn(e,t,1),t=Fe(),e!==null&&(Jr(e,1,t),Qe(e,t))}function ce(e,t,n){if(e.tag===3)Su(e,e,n);else for(;t!==null;){if(t.tag===3){Su(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(nn===null||!nn.has(r))){e=rr(n,e),e=wd(t,e,1),t=tn(t,e,1),e=Fe(),t!==null&&(Jr(t,1,e),Qe(t,e));break}}t=t.return}}function Ph(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Ne===e&&(Ce&n)===n&&(Se===4||Se===3&&(Ce&130023424)===Ce&&500>he()-Gl?yn(e,0):Kl|=n),Qe(e,t)}function Wd(e,t){t===0&&(e.mode&1?(t=ps,ps<<=1,!(ps&130023424)&&(ps=4194304)):t=1);var n=Fe();e=Ft(e,t),e!==null&&(Jr(e,t,n),Qe(e,n))}function Eh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wd(e,n)}function Ch(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(E(314))}r!==null&&r.delete(t),Wd(e,n)}var Ud;Ud=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ve.current)He=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return He=!1,hh(e,t,n);He=!!(e.flags&131072)}else He=!1,ie&&t.flags&1048576&&Hc(t,to,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fs(e,t),e=t.pendingProps;var s=qn(t,Me.current);Gn(t,n),s=$l(null,t,r,e,s,n);var o=Hl();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,Xe(r)?(o=!0,qs(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fl(t),s.updater=jo,t.stateNode=s,s._reactInternals=t,Ki(t,r,e,n),t=Zi(null,t,r,!0,o,n)):(t.tag=0,ie&&o&&Dl(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=zh(r),e=gt(r,e),s){case 0:t=Ji(null,t,r,e,n);break e;case 1:t=cu(null,t,r,e,n);break e;case 11:t=au(null,t,r,e,n);break e;case 14:t=uu(null,t,r,gt(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Ji(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),cu(e,t,r,s,n);case 3:e:{if(jd(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Gc(e,t),so(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=rr(Error(E(423)),t),t=du(e,t,r,n,s);break e}else if(r!==s){s=rr(Error(E(424)),t),t=du(e,t,r,n,s);break e}else for(Ge=en(t.stateNode.containerInfo.firstChild),Je=t,ie=!0,yt=null,n=Yc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(er(),r===s){t=Wt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Jc(t),e===null&&Xi(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Bi(r,s)?i=null:o!==null&&Bi(r,o)&&(t.flags|=32),kd(e,t),Ie(e,t,i,n),t.child;case 6:return e===null&&Xi(t),null;case 13:return Nd(e,t,n);case 4:return Wl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),au(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ne(no,r._currentValue),r._currentValue=i,o!==null)if(xt(o.value,i)){if(o.children===s.children&&!Ve.current){t=Wt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Lt(-1,n&-n),u.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Qi(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(E(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Qi(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Gn(t,n),s=ct(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=gt(r,t.pendingProps),s=gt(r.type,s),uu(e,t,r,s,n);case 15:return Sd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:gt(r,s),Fs(e,t),t.tag=1,Xe(r)?(e=!0,qs(t)):e=!1,Gn(t,n),vd(t,r,s),Ki(t,r,s,n),Zi(null,t,r,!0,e,n);case 19:return Pd(e,t,n);case 22:return xd(e,t,n)}throw Error(E(156,t.tag))};function Bd(e,t){return hc(e,t)}function _h(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 at(e,t,n,r){return new _h(e,t,n,r)}function ea(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zh(e){if(typeof e=="function")return ea(e)?1:0;if(e!=null){if(e=e.$$typeof,e===wl)return 11;if(e===Sl)return 14}return 2}function sn(e,t){var n=e.alternate;return n===null?(n=at(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 Bs(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")ea(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Mn:return wn(n.children,s,o,t);case yl:i=8,s|=8;break;case wi:return e=at(12,n,t,s|2),e.elementType=wi,e.lanes=o,e;case Si:return e=at(13,n,t,s),e.elementType=Si,e.lanes=o,e;case xi:return e=at(19,n,t,s),e.elementType=xi,e.lanes=o,e;case Ju:return Eo(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ku:i=10;break e;case Gu:i=9;break e;case wl:i=11;break e;case Sl:i=14;break e;case Vt:i=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=at(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function wn(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Eo(e,t,n,r){return e=at(22,e,r,t),e.elementType=Ju,e.lanes=n,e.stateNode={isHidden:!1},e}function di(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function fi(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Th(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=Xo(0),this.expirationTimes=Xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ta(e,t,n,r,s,o,i,l,u){return e=new Th(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=at(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fl(o),e}function Dh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:On,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function bd(e){if(!e)return ln;e=e._reactInternals;e:{if(En(e)!==e||e.tag!==1)throw Error(E(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Xe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(E(171))}if(e.tag===1){var n=e.type;if(Xe(n))return bc(e,n,t)}return t}function $d(e,t,n,r,s,o,i,l,u){return e=ta(n,r,!0,e,s,o,i,l,u),e.context=bd(null),n=e.current,r=Fe(),s=rn(n),o=Lt(r,s),o.callback=t??null,tn(n,o,s),e.current.lanes=s,Jr(e,s,r),Qe(e,r),e}function Co(e,t,n,r){var s=t.current,o=Fe(),i=rn(s);return n=bd(n),t.context===null?t.context=n:t.pendingContext=n,t=Lt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=tn(s,t,i),e!==null&&(St(e,s,i,o),Ls(e,s,i)),i}function po(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 xu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function na(e,t){xu(e,t),(e=e.alternate)&&xu(e,t)}function Rh(){return null}var Hd=typeof reportError=="function"?reportError:function(e){console.error(e)};function ra(e){this._internalRoot=e}_o.prototype.render=ra.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(E(409));Co(e,t,null,null)};_o.prototype.unmount=ra.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Nn(function(){Co(null,e,null,null)}),t[It]=null}};function _o(e){this._internalRoot=e}_o.prototype.unstable_scheduleHydration=function(e){if(e){var t=xc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qt.length&&t!==0&&t<Qt[n].priority;n++);Qt.splice(n,0,e),n===0&&jc(e)}};function sa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ku(){}function Oh(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=po(i);o.call(c)}}var i=$d(t,r,e,0,null,!1,!1,"",ku);return e._reactRootContainer=i,e[It]=i.current,Br(e.nodeType===8?e.parentNode:e),Nn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=po(u);l.call(c)}}var u=ta(e,0,!1,null,null,!1,!1,"",ku);return e._reactRootContainer=u,e[It]=u.current,Br(e.nodeType===8?e.parentNode:e),Nn(function(){Co(t,u,n,r)}),u}function To(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var u=po(i);l.call(u)}}Co(t,i,e,s)}else i=Oh(n,t,e,s,r);return po(i)}wc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=kr(t.pendingLanes);n!==0&&(jl(t,n|1),Qe(t,he()),!(Q&6)&&(sr=he()+500,cn()))}break;case 13:Nn(function(){var r=Ft(e,1);if(r!==null){var s=Fe();St(r,e,1,s)}}),na(e,1)}};Nl=function(e){if(e.tag===13){var t=Ft(e,134217728);if(t!==null){var n=Fe();St(t,e,134217728,n)}na(e,134217728)}};Sc=function(e){if(e.tag===13){var t=rn(e),n=Ft(e,t);if(n!==null){var r=Fe();St(n,e,t,r)}na(e,t)}};xc=function(){return J};kc=function(e,t){var n=J;try{return J=e,t()}finally{J=n}};Di=function(e,t,n){switch(t){case"input":if(Ni(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=So(r);if(!s)throw Error(E(90));qu(r),Ni(r,s)}}}break;case"textarea":tc(e,n);break;case"select":t=n.value,t!=null&&Xn(e,!!n.multiple,t,!1)}};ac=Jl;uc=Nn;var Mh={usingClientEntryPoint:!1,Events:[qr,Fn,So,ic,lc,Jl]},gr={findFiberByHostInstance:mn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Lh={bundleType:gr.bundleType,version:gr.version,rendererPackageName:gr.rendererPackageName,rendererConfig:gr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fc(e),e===null?null:e.stateNode},findFiberByHostInstance:gr.findFiberByHostInstance||Rh,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 Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ns.isDisabled&&Ns.supportsFiber)try{go=Ns.inject(Lh),Ct=Ns}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mh;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sa(t))throw Error(E(200));return Dh(e,t,null,n)};et.createRoot=function(e,t){if(!sa(e))throw Error(E(299));var n=!1,r="",s=Hd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ta(e,1,!1,null,null,n,!1,r,s),e[It]=t.current,Br(e.nodeType===8?e.parentNode:e),new ra(t)};et.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(E(188)):(e=Object.keys(e).join(","),Error(E(268,e)));return e=fc(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Nn(e)};et.hydrate=function(e,t,n){if(!zo(t))throw Error(E(200));return To(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!sa(e))throw Error(E(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Hd;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=$d(t,null,e,1,n??null,s,!1,o,i),e[It]=t.current,Br(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 _o(t)};et.render=function(e,t,n){if(!zo(t))throw Error(E(200));return To(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!zo(e))throw Error(E(40));return e._reactRootContainer?(Nn(function(){To(null,null,e,!1,function(){e._reactRootContainer=null,e[It]=null})}),!0):!1};et.unstable_batchedUpdates=Jl;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!zo(n))throw Error(E(200));if(e==null||e._reactInternals===void 0)throw Error(E(38));return To(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Vd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vd)}catch(e){console.error(e)}}Vd(),Vu.exports=et;var ts=Vu.exports,ju=ts;vi.createRoot=ju.createRoot,vi.hydrateRoot=ju.hydrateRoot;var Do={exports:{}},Xd={},Qd={exports:{}},Ah="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ih=Ah,Fh=Ih;function Yd(){}function Kd(){}Kd.resetWarningCache=Yd;var Wh=function(){function e(r,s,o,i,l,u){if(u!==Fh){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Kd,resetWarningCache:Yd};return n.PropTypes=n,n};Qd.exports=Wh();var Gd=Qd.exports;function Jd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Jd(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Nu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Jd(e))&&(r&&(r+=" "),r+=t);return r}const Uh=Object.freeze(Object.defineProperty({__proto__:null,clsx:Nu,default:Nu},Symbol.toStringTag,{value:"Module"})),Bh=cf(Uh);var de={},zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.dontSetMe=Xh;zt.findInArray=bh;zt.int=Vh;zt.isFunction=$h;zt.isNum=Hh;function bh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function $h(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Hh(e){return typeof e=="number"&&!isNaN(e)}function Vh(e){return parseInt(e,10)}function Xh(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}var Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.browserPrefixToKey=qd;Cn.browserPrefixToStyle=Qh;Cn.default=void 0;Cn.getPrefix=Zd;const pi=["Moz","Webkit","O","ms"];function Zd(){var e;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const n=(e=window.document)===null||e===void 0||(e=e.documentElement)===null||e===void 0?void 0:e.style;if(!n||t in n)return"";for(let r=0;r<pi.length;r++)if(qd(t,pi[r])in n)return pi[r];return""}function qd(e,t){return t?"".concat(t).concat(Yh(e)):e}function Qh(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function Yh(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]==="-"?n=!0:t+=e[r];return t}Cn.default=Zd();Object.defineProperty(de,"__esModule",{value:!0});de.addClassName=nf;de.addEvent=Jh;de.addUserSelectStyles=am;de.createCSSTransform=sm;de.createSVGTransform=om;de.getTouch=im;de.getTouchIdentifier=lm;de.getTranslation=oa;de.innerHeight=tm;de.innerWidth=nm;de.matchesSelector=tf;de.matchesSelectorAndParentsTo=Gh;de.offsetXYFromParent=rm;de.outerHeight=qh;de.outerWidth=em;de.removeClassName=rf;de.removeEvent=Zh;de.removeUserSelectStyles=um;var Ze=zt,Pu=Kh(Cn);function ef(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(ef=function(r){return r?n:t})(e)}function Kh(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=ef(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}let Ps="";function tf(e,t){return Ps||(Ps=(0,Ze.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Ze.isFunction)(e[n])})),(0,Ze.isFunction)(e[Ps])?e[Ps](t):!1}function Gh(e,t,n){let r=e;do{if(tf(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Jh(e,t,n,r){if(!e)return;const s={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,s):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n}function Zh(e,t,n,r){if(!e)return;const s={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,s):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null}function qh(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ze.int)(n.borderTopWidth),t+=(0,Ze.int)(n.borderBottomWidth),t}function em(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ze.int)(n.borderLeftWidth),t+=(0,Ze.int)(n.borderRightWidth),t}function tm(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ze.int)(n.paddingTop),t-=(0,Ze.int)(n.paddingBottom),t}function nm(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ze.int)(n.paddingLeft),t-=(0,Ze.int)(n.paddingRight),t}function rm(e,t,n){const s=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-s.left)/n,i=(e.clientY+t.scrollTop-s.top)/n;return{x:o,y:i}}function sm(e,t){const n=oa(e,t,"px");return{[(0,Pu.browserPrefixToKey)("transform",Pu.default)]:n}}function om(e,t){return oa(e,t,"")}function oa(e,t,n){let{x:r,y:s}=e,o="translate(".concat(r).concat(n,",").concat(s).concat(n,")");if(t){const i="".concat(typeof t.x=="string"?t.x:t.x+n),l="".concat(typeof t.y=="string"?t.y:t.y+n);o="translate(".concat(i,", ").concat(l,")")+o}return o}function im(e,t){return e.targetTouches&&(0,Ze.findInArray)(e.targetTouches,n=>t===n.identifier)||e.changedTouches&&(0,Ze.findInArray)(e.changedTouches,n=>t===n.identifier)}function lm(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function am(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
41
+ `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
42
+ `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&nf(e.body,"react-draggable-transparent-selection")}function um(e){if(e)try{if(e.body&&rf(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function nf(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function rf(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.canDragX=fm;Tt.canDragY=pm;Tt.createCoreData=mm;Tt.createDraggableData=gm;Tt.getBoundPosition=cm;Tt.getControlPosition=hm;Tt.snapToGrid=dm;var Ye=zt,Vn=de;function cm(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:vm(r);const s=ia(e);if(typeof r=="string"){const{ownerDocument:o}=s,i=o.defaultView;let l;if(r==="parent"?l=s.parentNode:l=o.querySelector(r),!(l instanceof i.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const u=l,c=i.getComputedStyle(s),h=i.getComputedStyle(u);r={left:-s.offsetLeft+(0,Ye.int)(h.paddingLeft)+(0,Ye.int)(c.marginLeft),top:-s.offsetTop+(0,Ye.int)(h.paddingTop)+(0,Ye.int)(c.marginTop),right:(0,Vn.innerWidth)(u)-(0,Vn.outerWidth)(s)-s.offsetLeft+(0,Ye.int)(h.paddingRight)-(0,Ye.int)(c.marginRight),bottom:(0,Vn.innerHeight)(u)-(0,Vn.outerHeight)(s)-s.offsetTop+(0,Ye.int)(h.paddingBottom)-(0,Ye.int)(c.marginBottom)}}return(0,Ye.isNum)(r.right)&&(t=Math.min(t,r.right)),(0,Ye.isNum)(r.bottom)&&(n=Math.min(n,r.bottom)),(0,Ye.isNum)(r.left)&&(t=Math.max(t,r.left)),(0,Ye.isNum)(r.top)&&(n=Math.max(n,r.top)),[t,n]}function dm(e,t,n){const r=Math.round(t/e[0])*e[0],s=Math.round(n/e[1])*e[1];return[r,s]}function fm(e){return e.props.axis==="both"||e.props.axis==="x"}function pm(e){return e.props.axis==="both"||e.props.axis==="y"}function hm(e,t,n){const r=typeof t=="number"?(0,Vn.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const s=ia(n),o=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,Vn.offsetXYFromParent)(r||e,o,n.props.scale)}function mm(e,t,n){const r=!(0,Ye.isNum)(e.lastX),s=ia(e);return r?{node:s,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:s,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function gm(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function vm(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function ia(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Ro={},Oo={};Object.defineProperty(Oo,"__esModule",{value:!0});Oo.default=ym;function ym(){}Object.defineProperty(Ro,"__esModule",{value:!0});Ro.default=void 0;var hi=Sm(j),be=la(Gd),wm=la(ts),Re=de,$t=Tt,mi=zt,vr=la(Oo);function la(e){return e&&e.__esModule?e:{default:e}}function sf(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(sf=function(r){return r?n:t})(e)}function Sm(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=sf(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var i=s?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function Ae(e,t,n){return t=xm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xm(e){var t=km(e,"string");return typeof t=="symbol"?t:String(t)}function km(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const mt={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let Ht=mt.mouse,Mo=class extends hi.Component{constructor(){super(...arguments),Ae(this,"dragging",!1),Ae(this,"lastX",NaN),Ae(this,"lastY",NaN),Ae(this,"touchIdentifier",null),Ae(this,"mounted",!1),Ae(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const n=this.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:r}=n;if(this.props.disabled||!(t.target instanceof r.defaultView.Node)||this.props.handle&&!(0,Re.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,Re.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const s=(0,Re.getTouchIdentifier)(t);this.touchIdentifier=s;const o=(0,$t.getControlPosition)(t,s,this);if(o==null)return;const{x:i,y:l}=o,u=(0,$t.createCoreData)(this,i,l);(0,vr.default)("DraggableCore: handleDragStart: %j",u),(0,vr.default)("calling",this.props.onStart),!(this.props.onStart(t,u)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Re.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=l,(0,Re.addEvent)(r,Ht.move,this.handleDrag),(0,Re.addEvent)(r,Ht.stop,this.handleDragStop))}),Ae(this,"handleDrag",t=>{const n=(0,$t.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:s}=n;if(Array.isArray(this.props.grid)){let l=r-this.lastX,u=s-this.lastY;if([l,u]=(0,$t.snapToGrid)(this.props.grid,l,u),!l&&!u)return;r=this.lastX+l,s=this.lastY+u}const o=(0,$t.createCoreData)(this,r,s);if((0,vr.default)("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const u=document.createEvent("MouseEvents");u.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(u)}return}this.lastX=r,this.lastY=s}),Ae(this,"handleDragStop",t=>{if(!this.dragging)return;const n=(0,$t.getControlPosition)(t,this.touchIdentifier,this);if(n==null)return;let{x:r,y:s}=n;if(Array.isArray(this.props.grid)){let u=r-this.lastX||0,c=s-this.lastY||0;[u,c]=(0,$t.snapToGrid)(this.props.grid,u,c),r=this.lastX+u,s=this.lastY+c}const o=(0,$t.createCoreData)(this,r,s);if(this.props.onStop(t,o)===!1||this.mounted===!1)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,Re.removeUserSelectStyles)(l.ownerDocument),(0,vr.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,vr.default)("DraggableCore: Removing handlers"),(0,Re.removeEvent)(l.ownerDocument,Ht.move,this.handleDrag),(0,Re.removeEvent)(l.ownerDocument,Ht.stop,this.handleDragStop))}),Ae(this,"onMouseDown",t=>(Ht=mt.mouse,this.handleDragStart(t))),Ae(this,"onMouseUp",t=>(Ht=mt.mouse,this.handleDragStop(t))),Ae(this,"onTouchStart",t=>(Ht=mt.touch,this.handleDragStart(t))),Ae(this,"onTouchEnd",t=>(Ht=mt.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Re.addEvent)(t,mt.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,Re.removeEvent)(n,mt.mouse.move,this.handleDrag),(0,Re.removeEvent)(n,mt.touch.move,this.handleDrag),(0,Re.removeEvent)(n,mt.mouse.stop,this.handleDragStop),(0,Re.removeEvent)(n,mt.touch.stop,this.handleDragStop),(0,Re.removeEvent)(t,mt.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Re.removeUserSelectStyles)(n)}}findDOMNode(){var t,n;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(n=this.props)===null||n===void 0||(n=n.nodeRef)===null||n===void 0?void 0:n.current:wm.default.findDOMNode(this)}render(){return hi.cloneElement(hi.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Ro.default=Mo;Ae(Mo,"displayName","DraggableCore");Ae(Mo,"propTypes",{allowAnyClick:be.default.bool,children:be.default.node.isRequired,disabled:be.default.bool,enableUserSelectHack:be.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:be.default.arrayOf(be.default.number),handle:be.default.string,cancel:be.default.string,nodeRef:be.default.object,onStart:be.default.func,onDrag:be.default.func,onStop:be.default.func,onMouseDown:be.default.func,scale:be.default.number,className:mi.dontSetMe,style:mi.dontSetMe,transform:mi.dontSetMe});Ae(Mo,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var t=g(j),n=h(Gd),r=h(ts),s=h(Bh),o=de,i=Tt,l=zt,u=h(Ro),c=h(Oo);function h(d){return d&&d.__esModule?d:{default:d}}function m(d){if(typeof WeakMap!="function")return null;var f=new WeakMap,v=new WeakMap;return(m=function(x){return x?v:f})(d)}function g(d,f){if(d&&d.__esModule)return d;if(d===null||typeof d!="object"&&typeof d!="function")return{default:d};var v=m(f);if(v&&v.has(d))return v.get(d);var x={},P=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var N in d)if(N!=="default"&&Object.prototype.hasOwnProperty.call(d,N)){var C=P?Object.getOwnPropertyDescriptor(d,N):null;C&&(C.get||C.set)?Object.defineProperty(x,N,C):x[N]=d[N]}return x.default=d,v&&v.set(d,x),x}function w(){return w=Object.assign?Object.assign.bind():function(d){for(var f=1;f<arguments.length;f++){var v=arguments[f];for(var x in v)Object.prototype.hasOwnProperty.call(v,x)&&(d[x]=v[x])}return d},w.apply(this,arguments)}function S(d,f,v){return f=y(f),f in d?Object.defineProperty(d,f,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[f]=v,d}function y(d){var f=_(d,"string");return typeof f=="symbol"?f:String(f)}function _(d,f){if(typeof d!="object"||d===null)return d;var v=d[Symbol.toPrimitive];if(v!==void 0){var x=v.call(d,f);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(d)}class p extends t.Component{static getDerivedStateFromProps(f,v){let{position:x}=f,{prevPropsPosition:P}=v;return x&&(!P||x.x!==P.x||x.y!==P.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:x,prevPropsPosition:P}),{x:x.x,y:x.y,prevPropsPosition:{...x}}):null}constructor(f){super(f),S(this,"onDragStart",(v,x)=>{if((0,c.default)("Draggable: onDragStart: %j",x),this.props.onStart(v,(0,i.createDraggableData)(this,x))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),S(this,"onDrag",(v,x)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",x);const P=(0,i.createDraggableData)(this,x),N={x:P.x,y:P.y,slackX:0,slackY:0};if(this.props.bounds){const{x:U,y:M}=N;N.x+=this.state.slackX,N.y+=this.state.slackY;const[b,X]=(0,i.getBoundPosition)(this,N.x,N.y);N.x=b,N.y=X,N.slackX=this.state.slackX+(U-N.x),N.slackY=this.state.slackY+(M-N.y),P.x=N.x,P.y=N.y,P.deltaX=N.x-this.state.x,P.deltaY=N.y-this.state.y}if(this.props.onDrag(v,P)===!1)return!1;this.setState(N)}),S(this,"onDragStop",(v,x)=>{if(!this.state.dragging||this.props.onStop(v,(0,i.createDraggableData)(this,x))===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",x);const N={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:U,y:M}=this.props.position;N.x=U,N.y=M}this.setState(N)}),this.state={dragging:!1,dragged:!1,x:f.position?f.position.x:f.defaultPosition.x,y:f.position?f.position.y:f.defaultPosition.y,prevPropsPosition:{...f.position},slackX:0,slackY:0,isElementSVG:!1},f.position&&!(f.onDrag||f.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var f,v;return(f=(v=this.props)===null||v===void 0||(v=v.nodeRef)===null||v===void 0?void 0:v.current)!==null&&f!==void 0?f:r.default.findDOMNode(this)}render(){const{axis:f,bounds:v,children:x,defaultPosition:P,defaultClassName:N,defaultClassNameDragging:C,defaultClassNameDragged:U,position:M,positionOffset:b,scale:X,...Z}=this.props;let fe={},q=null;const pe=!!!M||this.state.dragging,T=M||P,W={x:(0,i.canDragX)(this)&&pe?this.state.x:T.x,y:(0,i.canDragY)(this)&&pe?this.state.y:T.y};this.state.isElementSVG?q=(0,o.createSVGTransform)(W,b):fe=(0,o.createCSSTransform)(W,b);const A=(0,s.default)(x.props.className||"",N,{[C]:this.state.dragging,[U]:this.state.dragged});return t.createElement(u.default,w({},Z,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(x),{className:A,style:{...x.props.style,...fe},transform:q}))}}e.default=p,S(p,"displayName","Draggable"),S(p,"propTypes",{...u.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),S(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Xd);const{default:of,DraggableCore:jm}=Xd;Do.exports=of;Do.exports.default=of;Do.exports.DraggableCore=jm;var Nm=Do.exports;const Pm=Ou(Nm);var me=function(){return me=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},me.apply(this,arguments)},Eu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Cu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Es={width:"20px",height:"20px",position:"absolute",zIndex:1},Em={top:me(me({},Eu),{top:"-5px"}),right:me(me({},Cu),{left:void 0,right:"-5px"}),bottom:me(me({},Eu),{top:void 0,bottom:"-5px"}),left:me(me({},Cu),{left:"-5px"}),topRight:me(me({},Es),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:me(me({},Es),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:me(me({},Es),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:me(me({},Es),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Cm=j.memo(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,s=e.replaceStyles,o=e.className,i=j.useCallback(function(c){t(c,n)},[t,n]),l=j.useCallback(function(c){t(c,n)},[t,n]),u=j.useMemo(function(){return me(me({position:"absolute",userSelect:"none"},Em[n]),s??{})},[s,n]);return a.jsx("div",{className:o||void 0,style:u,onMouseDown:i,onTouchStart:l,children:r})}),_m=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(r[o]=s[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pt=function(){return Pt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Pt.apply(this,arguments)},zm={width:"auto",height:"auto"},Cs=function(e,t,n){return Math.max(Math.min(e,n),t)},_u=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Dn=function(e,t){return new RegExp(e,"i").test(t)},_s=function(e){return!!(e.touches&&e.touches.length)},Tm=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},zu=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(o,i,l){return Math.abs(i-e)<Math.abs(t[o]-e)?l:o},0),s=Math.abs(t[r]-e);return n===0||s<n?t[r]:e},gi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},zs=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var s=Number(e.replace("%",""))/100;return t*s}if(e.endsWith("vw")){var s=Number(e.replace("vw",""))/100;return n*s}if(e.endsWith("vh")){var s=Number(e.replace("vh",""))/100;return r*s}}return e},Dm=function(e,t,n,r,s,o,i){return r=zs(r,e.width,t,n),s=zs(s,e.height,t,n),o=zs(o,e.width,t,n),i=zs(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof s>"u"?void 0:Number(s),minWidth:typeof o>"u"?void 0:Number(o),minHeight:typeof i>"u"?void 0:Number(i)}},Rm=function(e){return Array.isArray(e)?e:[e,e]},Om=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Tu="__resizable_base__",Mm=function(e){_m(t,e);function t(n){var r,s,o,i,l=e.call(this,n)||this;return l.ratio=1,l.resizable=null,l.parentLeft=0,l.parentTop=0,l.resizableLeft=0,l.resizableRight=0,l.resizableTop=0,l.resizableBottom=0,l.targetLeft=0,l.targetTop=0,l.delta={width:0,height:0},l.appendBase=function(){if(!l.resizable||!l.window)return null;var u=l.parentNode;if(!u)return null;var c=l.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(Tu):c.className+=Tu,u.appendChild(c),c},l.removeBase=function(u){var c=l.parentNode;c&&c.removeChild(u)},l.state={isResizing:!1,width:(s=(r=l.propsSize)===null||r===void 0?void 0:r.width)!==null&&s!==void 0?s:"auto",height:(i=(o=l.propsSize)===null||o===void 0?void 0:o.height)!==null&&i!==void 0?i:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},l.onResizeStart=l.onResizeStart.bind(l),l.onMouseMove=l.onMouseMove.bind(l),l.onMouseUp=l.onMouseUp.bind(l),l}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||zm},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var s=this.resizable.offsetWidth,o=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:s,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:o,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,s=function(l){var u;if(typeof n.state[l]>"u"||n.state[l]==="auto")return"auto";if(n.propsSize&&n.propsSize[l]&&(!((u=n.propsSize[l])===null||u===void 0)&&u.toString().endsWith("%"))){if(n.state[l].toString().endsWith("%"))return n.state[l].toString();var c=n.getParentSize(),h=Number(n.state[l].toString().replace("px","")),m=h/c[l]*100;return"".concat(m,"%")}return gi(n.state[l])},o=r&&typeof r.width<"u"&&!this.state.isResizing?gi(r.width):s("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?gi(r.height):s("height");return{width:o,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,s=this.parentNode.style.flexWrap;s!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var o={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=s),this.removeBase(n),o},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var s=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof s>"u"||s==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var s=this.props.boundsByDirection,o=this.state.direction,i=s&&Dn("left",o),l=s&&Dn("top",o),u,c;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(u=i?this.resizableRight-this.parentLeft:h.offsetWidth+(this.parentLeft-this.resizableLeft),c=l?this.resizableBottom-this.parentTop:h.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(u=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(u=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return u&&Number.isFinite(u)&&(n=n&&n<u?n:u),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var s=this.props.scale||1,o=Rm(this.props.resizeRatio||1),i=o[0],l=o[1],u=this.state,c=u.direction,h=u.original,m=this.props,g=m.lockAspectRatio,w=m.lockAspectRatioExtraHeight,S=m.lockAspectRatioExtraWidth,y=h.width,_=h.height,p=w||0,d=S||0;return Dn("right",c)&&(y=h.width+(n-h.x)*i/s,g&&(_=(y-d)/this.ratio+p)),Dn("left",c)&&(y=h.width-(n-h.x)*i/s,g&&(_=(y-d)/this.ratio+p)),Dn("bottom",c)&&(_=h.height+(r-h.y)*l/s,g&&(y=(_-p)*this.ratio+d)),Dn("top",c)&&(_=h.height-(r-h.y)*l/s,g&&(y=(_-p)*this.ratio+d)),{newWidth:y,newHeight:_}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,s,o){var i=this.props,l=i.lockAspectRatio,u=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,h=typeof o.width>"u"?10:o.width,m=typeof s.width>"u"||s.width<0?n:s.width,g=typeof o.height>"u"?10:o.height,w=typeof s.height>"u"||s.height<0?r:s.height,S=u||0,y=c||0;if(l){var _=(g-S)*this.ratio+y,p=(w-S)*this.ratio+y,d=(h-y)/this.ratio+S,f=(m-y)/this.ratio+S,v=Math.max(h,_),x=Math.min(m,p),P=Math.max(g,d),N=Math.min(w,f);n=Cs(n,v,x),r=Cs(r,P,N)}else n=Cs(n,h,m),r=Cs(r,g,w);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){var n=1/(this.props.scale||1);if(this.props.bounds==="parent"){var r=this.parentNode;if(r){var s=r.getBoundingClientRect();this.parentLeft=s.left*n,this.parentTop=s.top*n}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left*n,this.targetTop=o.top*n}if(this.resizable){var i=this.resizable.getBoundingClientRect(),l=i.left,u=i.top,c=i.right,h=i.bottom;this.resizableLeft=l*n,this.resizableRight=c*n,this.resizableTop=u*n,this.resizableBottom=h*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var s=0,o=0;if(n.nativeEvent&&Tm(n.nativeEvent)?(s=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&_s(n.nativeEvent)&&(s=n.nativeEvent.touches[0].clientX,o=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var l,u=this.window.getComputedStyle(this.resizable);if(u.flexBasis!=="auto"){var c=this.parentNode;if(c){var h=this.window.getComputedStyle(c).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",l=u.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var m={original:{x:s,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Pt(Pt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:l};this.setState(m)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&_s(n))try{n.preventDefault(),n.stopPropagation()}catch{}var s=this.props,o=s.maxWidth,i=s.maxHeight,l=s.minWidth,u=s.minHeight,c=_s(n)?n.touches[0].clientX:n.clientX,h=_s(n)?n.touches[0].clientY:n.clientY,m=this.state,g=m.direction,w=m.original,S=m.width,y=m.height,_=this.getParentSize(),p=Dm(_,this.window.innerWidth,this.window.innerHeight,o,i,l,u);o=p.maxWidth,i=p.maxHeight,l=p.minWidth,u=p.minHeight;var d=this.calculateNewSizeFromDirection(c,h),f=d.newHeight,v=d.newWidth,x=this.calculateNewMaxFromBoundary(o,i);this.props.snap&&this.props.snap.x&&(v=zu(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(f=zu(f,this.props.snap.y,this.props.snapGap));var P=this.calculateNewSizeFromAspectRatio(v,f,{width:x.maxWidth,height:x.maxHeight},{width:l,height:u});if(v=P.newWidth,f=P.newHeight,this.props.grid){var N=_u(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),C=_u(f,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),U=this.props.snapGap||0,M=U===0||Math.abs(N-v)<=U?N:v,b=U===0||Math.abs(C-f)<=U?C:f;v=M,f=b}var X={width:v-w.width,height:f-w.height};if(this.delta=X,S&&typeof S=="string"){if(S.endsWith("%")){var Z=v/_.width*100;v="".concat(Z,"%")}else if(S.endsWith("vw")){var fe=v/this.window.innerWidth*100;v="".concat(fe,"vw")}else if(S.endsWith("vh")){var q=v/this.window.innerHeight*100;v="".concat(q,"vh")}}if(y&&typeof y=="string"){if(y.endsWith("%")){var Z=f/_.height*100;f="".concat(Z,"%")}else if(y.endsWith("vw")){var fe=f/this.window.innerWidth*100;f="".concat(fe,"vw")}else if(y.endsWith("vh")){var q=f/this.window.innerHeight*100;f="".concat(q,"vh")}}var K={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(f,"height")};this.flexDir==="row"?K.flexBasis=K.width:this.flexDir==="column"&&(K.flexBasis=K.height);var pe=this.state.width!==K.width,T=this.state.height!==K.height,W=this.state.flexBasis!==K.flexBasis,A=pe||T||W;A&&ts.flushSync(function(){r.setState(K)}),this.props.onResize&&A&&this.props.onResize(n,g,this.resizable,X)}},t.prototype.onMouseUp=function(n){var r,s,o=this.state,i=o.isResizing,l=o.direction;o.original,!(!i||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(n,l,this.resizable,this.delta),this.props.size&&this.setState({width:(r=this.props.size.width)!==null&&r!==void 0?r:"auto",height:(s=this.props.size.height)!==null&&s!==void 0?s:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Pt(Pt({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(n){var r,s;this.setState({width:(r=n.width)!==null&&r!==void 0?r:"auto",height:(s=n.height)!==null&&s!==void 0?s:"auto"})},t.prototype.renderResizer=function(){var n=this,r=this.props,s=r.enable,o=r.handleStyles,i=r.handleClasses,l=r.handleWrapperStyle,u=r.handleWrapperClass,c=r.handleComponent;if(!s)return null;var h=Object.keys(s).map(function(m){return s[m]!==!1?a.jsx(Cm,{direction:m,onResizeStart:n.onResizeStart,replaceStyles:o&&o[m],className:i&&i[m],children:c&&c[m]?c[m]:null},m):null});return a.jsx("div",{className:u,style:l,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,l){return Om.indexOf(l)!==-1||(i[l]=n.props[l]),i},{}),s=Pt(Pt(Pt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(s.flexBasis=this.state.flexBasis);var o=this.props.as||"div";return a.jsxs(o,Pt({style:s,className:this.props.className},r,{ref:function(i){i&&(n.resizable=i)},children:[this.state.isResizing&&a.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(j.PureComponent);/*! *****************************************************************************
43
+ Copyright (c) Microsoft Corporation. All rights reserved.
44
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
45
+ this file except in compliance with the License. You may obtain a copy of the
46
+ License at http://www.apache.org/licenses/LICENSE-2.0
47
+
48
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
49
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
50
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
51
+ MERCHANTABLITY OR NON-INFRINGEMENT.
52
+
53
+ See the Apache Version 2.0 License for specific language governing permissions
54
+ and limitations under the License.
55
+ ***************************************************************************** */var cl=function(e,t){return cl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var s in r)r.hasOwnProperty(s)&&(n[s]=r[s])},cl(e,t)};function Lm(e,t){cl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var ye=function(){return ye=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ye.apply(this,arguments)};function Am(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}var Im={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},Fm=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},Wm=function(e){Lm(t,e);function t(n){var r=e.call(this,n)||this;return r.resizingPosition={x:0,y:0},r.offsetFromParent={left:0,top:0},r.resizableElement={current:null},r.originalPosition={x:0,y:0},r.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:n.maxWidth,maxHeight:n.maxHeight},r.onResizeStart=r.onResizeStart.bind(r),r.onResize=r.onResize.bind(r),r.onResizeStop=r.onResizeStop.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrag=r.onDrag.bind(r),r.onDragStop=r.onDragStop.bind(r),r.getMaxSizesFromProps=r.getMaxSizesFromProps.bind(r),r}return t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var n=this.offsetFromParent,r=n.left,s=n.top,o=this.getDraggablePosition(),i=o.x,l=o.y;this.draggable.setState({x:i-r,y:l-s}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var n=this.draggable.state,r=n.x,s=n.y;return{x:r,y:s}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){var n=typeof this.props.maxWidth>"u"?Number.MAX_SAFE_INTEGER:this.props.maxWidth,r=typeof this.props.maxHeight>"u"?Number.MAX_SAFE_INTEGER:this.props.maxHeight;return{maxWidth:n,maxHeight:r}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(n){var r=this.props.scale;switch(this.props.bounds){case"window":return window.innerHeight/r;case"body":return document.body.offsetHeight/r;default:return n.offsetHeight}},t.prototype.getOffsetWidth=function(n){var r=this.props.scale;switch(this.props.bounds){case"window":return window.innerWidth/r;case"body":return document.body.offsetWidth/r;default:return n.offsetWidth}},t.prototype.onDragStart=function(n,r){this.props.onDragStart&&this.props.onDragStart(n,r);var s=this.getDraggablePosition();if(this.originalPosition=s,!!this.props.bounds){var o=this.getParent(),i=this.props.scale,l;if(this.props.bounds==="parent")l=o;else if(this.props.bounds==="body"){var u=o.getBoundingClientRect(),c=u.left,h=u.top,m=document.body.getBoundingClientRect(),g=-(c-o.offsetLeft*i-m.left)/i,w=-(h-o.offsetTop*i-m.top)/i,S=(document.body.offsetWidth-this.resizable.size.width*i)/i+g,y=(document.body.offsetHeight-this.resizable.size.height*i)/i+w;return this.setState({bounds:{top:w,right:S,bottom:y,left:g}})}else if(this.props.bounds==="window"){if(!this.resizable)return;var _=o.getBoundingClientRect(),p=_.left,d=_.top,f=-(p-o.offsetLeft*i)/i,v=-(d-o.offsetTop*i)/i,S=(window.innerWidth-this.resizable.size.width*i)/i+f,y=(window.innerHeight-this.resizable.size.height*i)/i+v;return this.setState({bounds:{top:v,right:S,bottom:y,left:f}})}else typeof this.props.bounds=="string"?l=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(l=this.props.bounds);if(!(!(l instanceof HTMLElement)||!(o instanceof HTMLElement))){var x=l.getBoundingClientRect(),P=x.left,N=x.top,C=o.getBoundingClientRect(),U=C.left,M=C.top,b=(P-U)/i,X=N-M;if(this.resizable){this.updateOffsetFromParent();var Z=this.offsetFromParent;this.setState({bounds:{top:X-Z.top,right:b+(l.offsetWidth-this.resizable.size.width)-Z.left/i,bottom:X+(l.offsetHeight-this.resizable.size.height)-Z.top,left:b-Z.left/i}})}}}},t.prototype.onDrag=function(n,r){if(this.props.onDrag){var s=this.offsetFromParent,o=s.left,i=s.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDrag(n,ye(ye({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDrag(n,ye(ye({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(n,ye(ye({},r),{x:this.originalPosition.x+o,y:r.y+i,deltaX:0}))}},t.prototype.onDragStop=function(n,r){if(this.props.onDragStop){var s=this.offsetFromParent,o=s.left,i=s.top;if(!this.props.dragAxis||this.props.dragAxis==="both")return this.props.onDragStop(n,ye(ye({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDragStop(n,ye(ye({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(n,ye(ye({},r),{x:this.originalPosition.x+o,y:r.y+i,deltaX:0}))}},t.prototype.onResizeStart=function(n,r,s){n.stopPropagation(),this.setState({resizing:!0});var o=this.props.scale,i=this.offsetFromParent,l=this.getDraggablePosition();if(this.resizingPosition={x:l.x+i.left,y:l.y+i.top},this.originalPosition=l,this.props.bounds){var u=this.getParent(),c=void 0;this.props.bounds==="parent"?c=u:this.props.bounds==="body"?c=document.body:this.props.bounds==="window"?c=window:typeof this.props.bounds=="string"?c=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(c=this.props.bounds);var h=this.getSelfElement();if(h instanceof Element&&(c instanceof HTMLElement||c===window)&&u instanceof HTMLElement){var m=this.getMaxSizesFromProps(),g=m.maxWidth,w=m.maxHeight,S=this.getParentSize();if(g&&typeof g=="string")if(g.endsWith("%")){var y=Number(g.replace("%",""))/100;g=S.width*y}else g.endsWith("px")&&(g=Number(g.replace("px","")));if(w&&typeof w=="string")if(w.endsWith("%")){var y=Number(w.replace("%",""))/100;w=S.height*y}else w.endsWith("px")&&(w=Number(w.replace("px","")));var _=h.getBoundingClientRect(),p=_.left,d=_.top,f=this.props.bounds==="window"?{left:0,top:0}:c.getBoundingClientRect(),v=f.left,x=f.top,P=this.getOffsetWidth(c),N=this.getOffsetHeight(c),C=r.toLowerCase().endsWith("left"),U=r.toLowerCase().endsWith("right"),M=r.startsWith("top"),b=r.startsWith("bottom");if((C||M)&&this.resizable){var X=(p-v)/o+this.resizable.size.width;this.setState({maxWidth:X>Number(g)?g:X})}if(U||this.props.lockAspectRatio&&!C&&!M){var X=P+(v-p)/o;this.setState({maxWidth:X>Number(g)?g:X})}if((M||C)&&this.resizable){var X=(d-x)/o+this.resizable.size.height;this.setState({maxHeight:X>Number(w)?w:X})}if(b||this.props.lockAspectRatio&&!M&&!C){var X=N+(x-d)/o;this.setState({maxHeight:X>Number(w)?w:X})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight});this.props.onResizeStart&&this.props.onResizeStart(n,r,s)},t.prototype.onResize=function(n,r,s,o){var i=this,l={x:this.originalPosition.x,y:this.originalPosition.y},u=-o.width,c=-o.height,h=["top","left","topLeft","bottomLeft","topRight"];h.includes(r)&&(r==="bottomLeft"?l.x+=u:(r==="topRight"||(l.x+=u),l.y+=c));var m=this.draggable.state;(l.x!==m.x||l.y!==m.y)&&ts.flushSync(function(){i.draggable.setState(l)}),this.updateOffsetFromParent();var g=this.offsetFromParent,w=this.getDraggablePosition().x+g.left,S=this.getDraggablePosition().y+g.top;this.resizingPosition={x:w,y:S},this.props.onResize&&this.props.onResize(n,r,s,o,{x:w,y:S})},t.prototype.onResizeStop=function(n,r,s,o){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),l=i.maxWidth,u=i.maxHeight;this.setState({maxWidth:l,maxHeight:u}),this.props.onResizeStop&&this.props.onResizeStop(n,r,s,o,this.resizingPosition)},t.prototype.updateSize=function(n){this.resizable&&this.resizable.updateSize({width:n.width,height:n.height})},t.prototype.updatePosition=function(n){this.draggable.setState(n)},t.prototype.updateOffsetFromParent=function(){var n=this.props.scale,r=this.getParent(),s=this.getSelfElement();if(!r||s===null)return{top:0,left:0};var o=r.getBoundingClientRect(),i=o.left,l=o.top,u=s.getBoundingClientRect(),c=this.getDraggablePosition(),h=r.scrollLeft,m=r.scrollTop;this.offsetFromParent={left:u.left-i+h-c.x*n,top:u.top-l+m-c.y*n}},t.prototype.render=function(){var n=this,r=this.props,s=r.disableDragging,o=r.style,i=r.dragHandleClassName,l=r.position,u=r.onMouseDown,c=r.onMouseUp,h=r.dragAxis,m=r.dragGrid,g=r.bounds,w=r.enableUserSelectHack,S=r.cancel,y=r.children;r.onResizeStart,r.onResize,r.onResizeStop,r.onDragStart,r.onDrag,r.onDragStop;var _=r.resizeHandleStyles,p=r.resizeHandleClasses,d=r.resizeHandleComponent,f=r.enableResizing,v=r.resizeGrid,x=r.resizeHandleWrapperClass,P=r.resizeHandleWrapperStyle,N=r.scale,C=r.allowAnyClick,U=r.dragPositionOffset,M=Am(r,["disableDragging","style","dragHandleClassName","position","onMouseDown","onMouseUp","dragAxis","dragGrid","bounds","enableUserSelectHack","cancel","children","onResizeStart","onResize","onResizeStop","onDragStart","onDrag","onDragStop","resizeHandleStyles","resizeHandleClasses","resizeHandleComponent","enableResizing","resizeGrid","resizeHandleWrapperClass","resizeHandleWrapperStyle","scale","allowAnyClick","dragPositionOffset"]),b=this.props.default?ye({},this.props.default):void 0;delete M.default;var X=s||i?{cursor:"auto"}:{cursor:"move"},Z=ye(ye(ye({},Im),X),o),fe=this.offsetFromParent,q=fe.left,K=fe.top,pe;l&&(pe={x:l.x-q,y:l.y-K});var T=this.state.resizing?void 0:pe,W=this.state.resizing?"both":h;return j.createElement(Pm,{ref:function(A){A&&(n.draggable=A)},handle:i?".".concat(i):void 0,defaultPosition:b,onMouseDown:u,onMouseUp:c,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:W,disabled:s,grid:m,bounds:g?this.state.bounds:void 0,position:T,enableUserSelectHack:w,cancel:S,scale:N,allowAnyClick:C,nodeRef:this.resizableElement,positionOffset:U},j.createElement(Mm,ye({},M,{ref:function(A){A&&(n.resizable=A,n.resizableElement.current=A.resizable)},defaultSize:b,size:this.props.size,enable:typeof f=="boolean"?Fm(f):f,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:Z,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:v,handleWrapperClass:x,handleWrapperStyle:P,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:_,handleClasses:p,handleComponent:d,scale:this.props.scale}),y))},t.defaultProps={maxWidth:Number.MAX_SAFE_INTEGER,maxHeight:Number.MAX_SAFE_INTEGER,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(j.PureComponent);function Um(e){const t=e.split("/").filter(Boolean);if(t.length===0)return e;const n=t[t.length-1];return n==="src"&&t.length>1?t[t.length-2]:n}const Bm=({projects:e,selectedProject:t,onSelectProject:n,loading:r,runningProcesses:s=[],keyboardFocusedIndex:o=-1,onKeyboardFocusChange:i,gitBranches:l})=>{if(r)return a.jsx("div",{className:"project-list-loading",children:a.jsx("p",{children:"Loading projects..."})});if(e.length===0)return a.jsxs("div",{className:"project-list-empty",children:[a.jsx("p",{children:"No projects yet"}),a.jsx("p",{className:"hint",children:"Add a project to get started"}),a.jsx("p",{className:"hint",style:{fontSize:"11px",marginTop:"0.5rem",opacity:.7},children:"Tip: Drag and drop a folder here to add it"})]});const u=mo.useRef(null);return a.jsx("div",{ref:u,className:"project-list",role:"listbox","aria-label":"Projects",tabIndex:0,onFocus:c=>{o<0&&e.length>0&&i&&i(0)},onBlur:c=>{var h;i&&!((h=u.current)!=null&&h.contains(c.relatedTarget))&&i(-1)},children:e.map((c,h)=>{const m=(t==null?void 0:t.id)===c.id,g=o===h,w=s.filter(_=>_.projectPath===c.path),S=w.length>0,y=Array.from(new Set(w.map(_=>_.port).filter(_=>_!=null))).sort((_,p)=>_-p);return a.jsxs("div",{className:`project-item ${m?"selected":""} ${S?"running":""} ${g?"keyboard-focused":""}`,onClick:()=>n(c),role:"option","aria-selected":m,tabIndex:h===0?0:-1,onFocus:_=>{_.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),i&&i(h)},ref:_=>{g&&_&&i&&_.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[a.jsx("div",{className:"project-item-header",children:a.jsxs("h3",{className:"project-name",children:[S&&a.jsx("span",{className:"running-indicator-dot",children:"●"}),c.name,l&&l.has(c.id)&&l.get(c.id)&&a.jsx("span",{className:"git-branch-badge",children:l.get(c.id)})]})}),a.jsx("p",{className:"project-path",children:c.description||Um(c.path)}),c.tags&&c.tags.length>0&&a.jsx("div",{className:"project-tags",children:c.tags.map(_=>a.jsx("span",{className:"project-tag",children:_},_))}),S&&a.jsxs("div",{className:"project-meta",children:[a.jsxs("span",{className:"running-count",children:[w.length," running"]}),y.length>0&&a.jsx("div",{className:"running-ports",children:y.map(_=>a.jsxs("span",{className:"port-badge",children:[":",_]},_))})]})]},c.id)})})},bm=({urls:e,onOpenUrl:t})=>e.length===0?null:a.jsxs("div",{className:"project-urls-section",children:[a.jsx("div",{className:"section-header",children:a.jsxs("h3",{children:["Detected URLs (",e.length,")"]})}),a.jsx("div",{className:"urls-list",children:e.map((n,r)=>a.jsxs("div",{className:"url-item",children:[a.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"url-text",onClick:s=>{s.preventDefault(),window.electronAPI.openExternal(n)},children:n}),a.jsx("button",{onClick:()=>t(n),className:"btn btn-secondary btn-small",title:"Open in configured browser",children:"Open"})]},r))})]}),$m=({project:e,workspace:t,onProjectUpdate:n,onRemoveProject:r,onOpenTerminal:s,onNavigateBack:o})=>{var aa,ua,ca;const[i,l]=j.useState(!1),[u,c]=j.useState(e.name),[h,m]=j.useState(!1),[g,w]=j.useState(e.description||""),[S,y]=j.useState(null),[_,p]=j.useState(!1),[d,f]=j.useState(null),[v,x]=j.useState([]),[P,N]=j.useState(!1),[C,U]=j.useState(new Set),[M,b]=j.useState([]),[X,Z]=j.useState(!1),[fe,q]=j.useState(!1),[K,pe]=j.useState(""),[T,W]=j.useState([]),[A,Y]=j.useState(e.tags||[]),[oe,Le]=j.useState(null),[ee,nt]=j.useState(null),[D,V]=j.useState(!1),[ve,rt]=j.useState("default"),[xe,st]=j.useState(new Map),[te,ft]=j.useState(null),[_n,dn]=j.useState(!1),[fn,ns]=j.useState(!1);j.useEffect(()=>{c(e.name),w(e.description||""),Y(e.tags||[]),rs(),Io(),F(),Bt(),ar(),ss(),Lo(),Fo();const k=setInterval(()=>{F(),ss()},5e3);return()=>clearInterval(k)},[e]);const Lo=async()=>{try{const k=await zn();if(!k)return;const I=await fetch(`${k}/projects/${e.id}/settings`);if(I.ok){const B=await I.json();rt(B.script_sort_order||"default")}}catch(k){console.error("Error loading project settings:",k)}},Ao=async k=>{try{const I=await zn();if(!I)return;(await fetch(`${I}/projects/${e.id}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({script_sort_order:k})})).ok&&rt(k)}catch(I){console.error("Error saving project settings:",I)}},zn=async()=>{const k=[38124,38125,38126,38127,38128,3001];for(const I of k)try{if((await fetch(`http://localhost:${I}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${I}/api`}catch{continue}return null},Bt=async()=>{try{const k=await zn();if(!k){W([]);return}const I=await fetch(`${k}/projects/tags`);if(!I.ok){console.error("Failed to load tags:",I.status),W([]);return}const B=await I.json();W(Array.isArray(B)?B:[])}catch(k){console.error("Error loading tags:",k),W([])}},ar=async()=>{try{const k=await window.electronAPI.getSettings();Le(k.editor)}catch(k){console.error("Error loading editor settings:",k)}},rs=async()=>{try{p(!0),f(null);const k=await window.electronAPI.getProjectScripts(e.path);y(k)}catch(k){console.error("Error loading scripts:",k),y(null),f(k instanceof Error?k.message:String(k))}finally{p(!1)}},Io=async()=>{try{N(!0);const k=await window.electronAPI.getProjectPorts(e.id);x(k)}catch(k){console.error("Error loading ports:",k),x([])}finally{N(!1)}},ss=async()=>{try{V(!0);const k=await window.electronAPI.getLatestTestResult(e.id);nt(k)}catch{nt(null)}finally{V(!1)}},Fo=async()=>{try{dn(!0);const k=await zn();if(!k)return;const I=await fetch(`${k}/projects/${e.id}/safety`);if(I.ok){const B=await I.json();ft(B)}}catch(k){console.error("Error loading safety data:",k),ft(null)}finally{dn(!1)}},os=async()=>{if(!u.trim()||u===e.name){l(!1),c(e.name);return}try{const k=await window.electronAPI.renameProject(e.id,u.trim());l(!1),n&&n(k)}catch(k){console.error("Error renaming project:",k),alert("Failed to rename project"),c(e.name)}},is=async()=>{const k=g.trim()||null;if(k===(e.description||"")){m(!1),w(e.description||"");return}try{const I=await window.electronAPI.updateProject(e.id,{description:k});m(!1),n&&n(I)}catch(I){console.error("Error updating description:",I),alert("Failed to update description"),w(e.description||"")}},z=async()=>{const k=K.trim();if(!k||A.includes(k)){pe("");return}const I=[...A,k];try{const B=await window.electronAPI.updateProject(e.id,{tags:I});Y(I),pe(""),n&&n(B),await Bt(),ar()}catch(B){console.error("Error adding tag:",B),alert("Failed to add tag")}},R=async k=>{const I=A.filter(B=>B!==k);try{const B=await window.electronAPI.updateProject(e.id,{tags:I});Y(I),n&&n(B),await Bt(),ar()}catch(B){console.error("Error removing tag:",B),alert("Failed to remove tag")}},L=T.filter(k=>!A.includes(k)&&k.toLowerCase().includes(K.toLowerCase())),F=async()=>{try{Z(!0);const I=(await window.electronAPI.getRunningProcesses()).filter(ot=>ot.projectPath===e.path);b(I);const B=new Set(I.map(ot=>ot.scriptName));U(B)}catch(k){console.error("Error loading running processes:",k)}finally{Z(!1)}},$=async(k,I=!0)=>{try{U(B=>new Set(B).add(k)),st(B=>new Map(B).set(k,Date.now())),await window.electronAPI.runScript(e.path,k,[],I),I&&setTimeout(()=>{F()},1e3)}catch(B){console.error("Error running script:",B),alert(`Failed to run script: ${B instanceof Error?B.message:String(B)}`)}finally{U(B=>{const ot=new Set(B);return ot.delete(k),ot})}},ke=async k=>{try{await window.electronAPI.stopScript(k)?await F():alert("Failed to stop script")}catch(I){console.error("Error stopping script:",I),alert(`Failed to stop script: ${I instanceof Error?I.message:String(I)}`)}},Be=async k=>{try{await window.electronAPI.openUrl(k)}catch(I){console.error("Error opening URL:",I),alert(`Failed to open URL: ${I instanceof Error?I.message:String(I)}`)}},Pe=j.useMemo(()=>{const k=new Set;for(const I of M)if(I.detectedUrls&&Array.isArray(I.detectedUrls))for(const B of I.detectedUrls)k.add(B);for(const I of v){const B=`http://localhost:${I.port}`;k.add(B)}return Array.from(k).sort()},[M,v]),Wo=j.useMemo(()=>{if(!(S!=null&&S.scripts))return[];const k=[...S.scripts];return ve==="alphabetical"?k.sort((I,B)=>I.name.localeCompare(B.name)):ve==="last-used"&&k.sort((I,B)=>{const ot=xe.get(I.name)||0;return(xe.get(B.name)||0)-ot}),k},[S==null?void 0:S.scripts,ve,xe]);return a.jsxs("div",{className:"project-details",children:[t&&o&&a.jsxs("div",{className:"breadcrumb",children:[a.jsx("button",{className:"breadcrumb-link",onClick:o,children:t.name}),a.jsx("span",{className:"breadcrumb-separator",children:"/"}),a.jsx("span",{className:"breadcrumb-current",children:e.name})]}),a.jsxs("div",{className:"project-details-header",children:[a.jsxs("div",{children:[i?a.jsx("div",{className:"project-name-edit",children:a.jsx("input",{type:"text",value:u,onChange:k=>c(k.target.value),onBlur:os,onKeyDown:k=>{k.key==="Enter"?os():k.key==="Escape"&&(l(!1),c(e.name))},className:"project-name-input",autoFocus:!0})}):a.jsx("h2",{onClick:()=>l(!0),className:"project-name-editable",title:"Click to rename",children:e.name}),h?a.jsx("div",{className:"project-description-edit",children:a.jsx("textarea",{value:g,onChange:k=>w(k.target.value),onBlur:is,onKeyDown:k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)?is():k.key==="Escape"&&(m(!1),w(e.description||""))},className:"project-description-input",placeholder:"Add a description for this project... (⌘+Enter to save, Esc to cancel)",autoFocus:!0})}):a.jsxs("div",{children:[a.jsx("p",{className:"project-description",onClick:()=>m(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),a.jsx("p",{className:"project-path",children:e.path})]})]}),a.jsxs("div",{className:"header-actions-group",children:[a.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInEditor(e.path)}catch(k){console.error("Error opening in editor:",k),alert(`Failed to open in editor: ${k instanceof Error?k.message:String(k)}`)}},className:"btn btn-secondary",title:"Open in editor",children:"Editor"}),a.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInFiles(e.path)}catch(k){console.error("Error opening directory:",k),alert(`Failed to open directory: ${k instanceof Error?k.message:String(k)}`)}},className:"btn btn-secondary",title:"Open in file manager",children:"Files"})]})]}),a.jsxs("div",{className:"project-stats",children:[a.jsxs("div",{className:"stat-card",children:[a.jsx("div",{className:"stat-value",children:v.length}),a.jsx("div",{className:"stat-label",children:"Ports"})]}),a.jsxs("div",{className:"stat-card",children:[a.jsx("div",{className:"stat-value",children:((aa=S==null?void 0:S.scripts)==null?void 0:aa.length)||0}),a.jsx("div",{className:"stat-label",children:"Scripts"})]}),a.jsxs("div",{className:`stat-card ${te?te.exposed>0?"stat-card-danger":"stat-card-safe":""}`,children:[a.jsx("div",{className:"stat-value",children:_n?"...":te?te.exposed:"-"}),a.jsx("div",{className:"stat-label",children:"Exposed"})]})]}),ee&&a.jsxs("div",{className:"test-results-section",children:[a.jsxs("div",{className:"section-header",children:[a.jsx("h3",{children:"Latest Test Results"}),a.jsx("span",{className:"test-timestamp",children:new Date(ee.timestamp*1e3).toLocaleString()})]}),a.jsxs("div",{className:"test-results-content",children:[a.jsxs("div",{className:"test-stats-grid",children:[a.jsxs("div",{className:"test-stat passed",children:[a.jsx("div",{className:"test-stat-icon",children:"✓"}),a.jsxs("div",{className:"test-stat-info",children:[a.jsx("div",{className:"test-stat-value",children:ee.passed}),a.jsx("div",{className:"test-stat-label",children:"Passed"})]})]}),a.jsxs("div",{className:"test-stat failed",children:[a.jsx("div",{className:"test-stat-icon",children:"✗"}),a.jsxs("div",{className:"test-stat-info",children:[a.jsx("div",{className:"test-stat-value",children:ee.failed}),a.jsx("div",{className:"test-stat-label",children:"Failed"})]})]}),ee.skipped>0&&a.jsxs("div",{className:"test-stat skipped",children:[a.jsx("div",{className:"test-stat-icon",children:"⊘"}),a.jsxs("div",{className:"test-stat-info",children:[a.jsx("div",{className:"test-stat-value",children:ee.skipped}),a.jsx("div",{className:"test-stat-label",children:"Skipped"})]})]}),a.jsxs("div",{className:"test-stat total",children:[a.jsx("div",{className:"test-stat-icon",children:"∑"}),a.jsxs("div",{className:"test-stat-info",children:[a.jsx("div",{className:"test-stat-value",children:ee.total}),a.jsx("div",{className:"test-stat-label",children:"Total"})]})]})]}),a.jsxs("div",{className:"test-meta",children:[ee.framework&&a.jsx("span",{className:"test-framework-badge",children:ee.framework}),ee.duration&&a.jsxs("span",{className:"test-duration",children:["⏱ ",(ee.duration/1e3).toFixed(2),"s"]}),ee.coverage&&a.jsxs("span",{className:"test-coverage",children:["📊 ",ee.coverage.toFixed(1),"% coverage"]}),a.jsxs("span",{className:"test-script-name",children:["Script: ",ee.script_name]})]})]})]}),a.jsxs("div",{className:"tags-section",children:[a.jsx("div",{className:"section-header",children:a.jsx("h3",{children:"Tags"})}),a.jsx("div",{className:"tags-content",children:a.jsxs("div",{className:"tags-list",children:[A.map(k=>a.jsxs("span",{className:"tag-item",children:[k,a.jsx("button",{onClick:()=>R(k),className:"tag-remove",title:"Remove tag",children:"×"})]},k)),fe?a.jsxs("div",{className:"tag-input-wrapper",children:[a.jsx("input",{type:"text",value:K,onChange:k=>pe(k.target.value),onKeyDown:k=>{k.key==="Enter"?z():k.key==="Escape"&&(q(!1),pe(""))},onBlur:()=>{z(),q(!1)},className:"tag-input",placeholder:"Add tag...",autoFocus:!0}),L.length>0&&K&&a.jsx("div",{className:"tag-suggestions",children:L.slice(0,5).map(k=>a.jsx("div",{className:"tag-suggestion",onMouseDown:I=>{I.preventDefault(),pe(k)},children:k},k))})]}):a.jsx("button",{onClick:()=>q(!0),className:"tag-add-btn",title:"Add tag",children:"+ Add Tag"})]})})]}),te&&a.jsxs("div",{className:"security-section",children:[a.jsxs("div",{className:"section-header",children:[a.jsx("h3",{children:"Security"}),a.jsx("button",{className:"btn btn-secondary btn-small",onClick:()=>ns(!fn),children:fn?"Collapse":"Expand"})]}),a.jsxs("div",{className:"security-summary",children:[a.jsxs("span",{className:"security-badge security-safe",children:[te.safe," safe"]}),a.jsxs("span",{className:`security-badge ${te.exposed>0?"security-exposed":"security-safe"}`,children:[te.exposed," exposed"]}),a.jsxs("span",{className:"security-badge security-missing",children:[te.missing," missing"]}),te.channels&&te.channels.length>0&&a.jsxs("span",{className:"security-channels",children:["Channels: ",te.channels.join(", ")]})]}),fn&&te.items&&te.items.length>0&&a.jsx("div",{className:"security-items",children:te.items.map((k,I)=>a.jsxs("div",{className:"security-item",children:[a.jsxs("div",{className:"security-item-header",children:[a.jsx("span",{className:`security-category security-category-${k.category}`,children:k.category}),a.jsx("span",{className:"security-pattern",children:k.pattern})]}),a.jsx("div",{className:"security-item-description",children:k.description}),a.jsx("div",{className:"security-item-files",children:k.files.map((B,ot)=>a.jsx("span",{className:"security-file",children:B},ot))})]},I))}),fn&&(!te.items||te.items.length===0)&&a.jsx("div",{className:"security-clean",children:"No exposed files detected."})]}),Pe.length>0&&a.jsx(bm,{urls:Pe,onOpenUrl:Be}),a.jsxs("div",{className:"scripts-section",children:[a.jsxs("div",{className:"section-header",children:[a.jsxs("h3",{children:["Available Scripts (",((ua=S==null?void 0:S.scripts)==null?void 0:ua.length)??0,")"]}),a.jsxs("div",{className:"section-header-right",children:[a.jsx("span",{className:"project-type-badge",children:(S==null?void 0:S.type)??"unknown"}),a.jsxs("select",{value:ve,onChange:k=>Ao(k.target.value),className:"script-sort-select",disabled:_,children:[a.jsx("option",{value:"default",children:"Default"}),a.jsx("option",{value:"alphabetical",children:"Alphabetically"}),a.jsx("option",{value:"last-used",children:"Last Used"})]})]})]}),_?a.jsx("div",{className:"loading-state",children:"Loading scripts..."}):d?a.jsxs("div",{className:"no-scripts",children:[a.jsxs("div",{style:{marginBottom:8},children:["Failed to load scripts: ",d]}),a.jsx("button",{onClick:rs,className:"btn btn-secondary btn-small",children:"Retry"})]}):(((ca=S==null?void 0:S.scripts)==null?void 0:ca.length)??0)===0?a.jsx("div",{className:"no-scripts",children:"No scripts found in this project."}):a.jsx("div",{className:"scripts-list",children:Wo.map(k=>{const I=M.filter(ze=>ze.scriptName===k.name),B=I.length>0,ot=v.filter(ze=>ze.script_name===k.name).map(ze=>ze.port),da=Array.from(new Set(ot)).sort((ze,ls)=>ze-ls);return a.jsxs("div",{className:`script-item ${B?"running":""}`,children:[a.jsxs("div",{className:"script-info",children:[a.jsxs("div",{className:"script-header",children:[a.jsx("span",{className:"script-name",children:k.name}),a.jsx("span",{className:"script-command",children:k.command}),a.jsx("span",{className:"script-runner",children:k.runner})]}),B&&a.jsx("div",{className:"script-process-info",children:I.map(ze=>{const ls=Math.floor((Date.now()-ze.startedAt)/1e3),fa=Math.floor(ls/60),pa=ls%60,uf=fa>0?`${fa}m ${pa}s`:`${pa}s`,ha=ze.detectedPorts&&ze.detectedPorts.length>0?ze.detectedPorts:da;return a.jsxs("div",{className:"process-badge",children:[a.jsx("span",{className:"process-indicator",children:"●"}),a.jsxs("span",{className:"process-pid",children:["PID: ",ze.pid]}),a.jsx("span",{className:"process-uptime",children:uf}),ha.length>0&&a.jsxs("span",{className:"process-port",children:[":",ha.join(", ")]}),a.jsx("button",{onClick:Uo=>{Uo.stopPropagation(),s&&s(ze.pid,k.name,e.name)},className:"btn btn-secondary btn-tiny",title:"View terminal output",children:a.jsx("span",{className:"terminal-icon",children:"⌘"})}),a.jsx("button",{onClick:Uo=>{Uo.stopPropagation(),ke(ze.pid)},className:"btn btn-danger btn-tiny",title:"Stop process",children:"Stop"})]},ze.pid)})})]}),a.jsx("div",{className:"script-actions",children:!B&&a.jsx("button",{onClick:()=>$(k.name,!0),className:"btn btn-secondary btn-small",title:"Run in background",children:"Run"})})]},k.name)})})]}),a.jsxs("div",{className:"jenkins-placeholder",children:[a.jsx("h3",{children:"Jenkins Integration"}),a.jsx("p",{className:"placeholder-text",children:"Jenkins integration will be available in a future update. This section will display Jenkins job statuses and build information for your projects."})]}),r&&a.jsxs("div",{className:"danger-zone",children:[a.jsx("h3",{children:"Danger Zone"}),a.jsx("p",{className:"danger-zone-text",children:"Once you delete a project, there is no going back. Please be certain."}),a.jsx("button",{onClick:async()=>{confirm(`Are you sure you want to remove "${e.name}"?
56
+
57
+ This will delete the project from PROJAX (not from your filesystem).
58
+
59
+ This action cannot be undone.`)&&await r(e.id)},className:"btn btn-danger",title:"Remove project",children:"Delete Project"})]})]})},Hm=({onAdd:e,onClose:t})=>{const[n,r]=j.useState(""),[s,o]=j.useState(!1),i=async()=>{try{const u=await window.electronAPI.selectDirectory();u&&r(u)}catch(u){console.error("Error selecting directory:",u)}},l=async u=>{if(u.preventDefault(),!n.trim()){alert("Please select a project directory");return}try{o(!0),await e(n)}catch{}finally{o(!1)}};return a.jsx("div",{className:"modal-overlay",onClick:t,children:a.jsxs("div",{className:"modal-content",onClick:u=>u.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:"Add Project"}),a.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),a.jsxs("form",{onSubmit:l,children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"project-path",children:"Project Directory"}),a.jsxs("div",{className:"path-input-group",children:[a.jsx("input",{id:"project-path",type:"text",value:n,onChange:u=>r(u.target.value),placeholder:"Select or enter project directory path",disabled:s}),a.jsx("button",{type:"button",onClick:i,disabled:s,className:"btn btn-secondary",children:"Browse"})]})]}),a.jsxs("div",{className:"modal-actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:s,className:"btn btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:s||!n.trim(),className:"btn btn-primary",children:s?"Adding...":"Add Project"})]})]})]})})},Vm=({onSearchChange:e,onSortChange:t,searchInputRef:n})=>{const[r,s]=j.useState(""),[o,i]=j.useState("all"),[l,u]=j.useState("name-asc"),[c,h]=j.useState(!1),m=j.useRef(null),g=j.useRef(null),w=n||g,S=p=>{const d=p.target.value;s(d),e(d,"all")},y=p=>{u(p),h(!1),t&&t(p)};j.useEffect(()=>{const p=d=>{m.current&&!m.current.contains(d.target)&&h(!1)};if(c)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[c]);const _=[{value:"name-asc",label:"Name (A-Z)"},{value:"name-desc",label:"Name (Z-A)"},{value:"recent",label:"Recently Scanned"},{value:"oldest",label:"Oldest First"},{value:"running",label:"Running First"}];return a.jsx("div",{className:"project-search",children:a.jsxs("div",{className:"search-input-group",ref:m,children:[a.jsxs("div",{className:"search-input-wrapper",children:[a.jsx("input",{ref:w,type:"text",placeholder:"Search projects... (⌘/)",value:r,onChange:S,className:"search-input"}),a.jsx("button",{className:"sort-icon-btn",onClick:()=>h(!c),title:"Sort options",tabIndex:0,children:a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),c&&a.jsx("div",{className:"sort-menu",children:_.map(p=>a.jsxs("div",{className:`sort-menu-item ${l===p.value?"active":""}`,onClick:()=>y(p.value),children:[p.label,l===p.value&&a.jsx("span",{className:"checkmark",children:"✓"})]},p.value))})]})})},Xm=({onClose:e})=>{const[t,n]=j.useState({editor:{type:"vscode"},browser:{type:"chrome"}}),[r,s]=j.useState(!0),[o,i]=j.useState(!1),[l,u]=j.useState(!1),[c,h]=j.useState(!1);j.useEffect(()=>{const y=_=>{_.key==="Escape"&&e()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[e]),j.useEffect(()=>{m()},[]);const m=async()=>{try{s(!0);const y=await window.electronAPI.getSettings();n({editor:{type:y.editor.type,customPath:y.editor.customPath},browser:{type:y.browser.type,customPath:y.browser.customPath}})}catch(y){console.error("Error loading settings:",y)}finally{s(!1)}},g=async()=>{try{i(!0),await window.electronAPI.saveSettings(t),e()}catch(y){console.error("Error saving settings:",y),alert(`Failed to save settings: ${y instanceof Error?y.message:String(y)}`)}finally{i(!1)}},w=y=>{n({...t,editor:{type:y,customPath:y==="custom"?t.editor.customPath:void 0}})},S=y=>{n({...t,browser:{type:y,customPath:y==="custom"?t.browser.customPath:void 0}})};return r?a.jsx("div",{className:"settings-overlay",children:a.jsx("div",{className:"settings-modal",children:a.jsx("div",{className:"loading-state",children:"Loading settings..."})})}):a.jsxs("div",{className:"settings-container",children:[a.jsxs("div",{className:"settings-header",children:[a.jsx("h2",{children:"Settings"}),a.jsx("button",{type:"button",onClick:e,className:"btn btn-secondary",children:"Close"})]}),a.jsxs("div",{className:"settings-content",children:[a.jsxs("div",{className:"settings-section",children:[a.jsx("h3",{children:"Editor"}),a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Editor Type"}),a.jsxs("select",{value:t.editor.type,onChange:y=>w(y.target.value),className:"settings-select",children:[a.jsx("option",{value:"vscode",children:"VS Code"}),a.jsx("option",{value:"cursor",children:"Cursor"}),a.jsx("option",{value:"windsurf",children:"Windsurf"}),a.jsx("option",{value:"zed",children:"Zed"}),a.jsx("option",{value:"custom",children:"Custom"})]})]}),t.editor.type==="custom"&&a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Custom Editor Path"}),a.jsx("input",{type:"text",value:t.editor.customPath||"",onChange:y=>n({...t,editor:{...t.editor,customPath:y.target.value}}),placeholder:"/path/to/editor",className:"settings-input"})]})]}),a.jsxs("div",{className:"settings-section",children:[a.jsx("h3",{children:"Browser"}),a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Browser Type"}),a.jsxs("select",{value:t.browser.type,onChange:y=>S(y.target.value),className:"settings-select",children:[a.jsx("option",{value:"chrome",children:"Chrome"}),a.jsx("option",{value:"firefox",children:"Firefox"}),a.jsx("option",{value:"safari",children:"Safari"}),a.jsx("option",{value:"edge",children:"Edge"}),a.jsx("option",{value:"custom",children:"Custom"})]})]}),t.browser.type==="custom"&&a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Custom Browser Path"}),a.jsx("input",{type:"text",value:t.browser.customPath||"",onChange:y=>n({...t,browser:{...t.browser,customPath:y.target.value}}),placeholder:"/path/to/browser",className:"settings-input"})]})]}),a.jsxs("div",{className:"settings-section",children:[a.jsx("h3",{children:"Backup & Restore"}),a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Create Backup"}),a.jsx("p",{className:"settings-description",children:"Create a backup of all PROJAX data"}),a.jsx("button",{onClick:async()=>{try{u(!0);const y=await window.electronAPI.selectDirectory();if(y){const _=await window.electronAPI.createBackup(y);alert(`Backup created successfully!
60
+ ${_.backup_path}`)}}catch(y){alert(`Failed to create backup: ${y instanceof Error?y.message:String(y)}`)}finally{u(!1)}},disabled:l,className:"btn btn-secondary",children:l?"Creating...":"Create Backup"})]}),a.jsxs("div",{className:"settings-field",children:[a.jsx("label",{children:"Restore from Backup"}),a.jsx("p",{className:"settings-description",children:"Restore PROJAX data from a backup file"}),a.jsx("button",{onClick:async()=>{if(confirm("This will overwrite your current PROJAX data. Continue?"))try{h(!0);const y=await window.electronAPI.selectFile({filters:[{name:"PROJAX Backup",extensions:["pbz"]}]});y&&(await window.electronAPI.restoreBackup(y),alert("Backup restored successfully! The app will refresh."),window.location.reload())}catch(y){alert(`Failed to restore backup: ${y instanceof Error?y.message:String(y)}`)}finally{h(!1)}},disabled:c,className:"btn btn-danger",children:c?"Restoring...":"Restore from Backup"})]})]})]}),a.jsx("div",{className:"settings-footer",children:a.jsx("button",{type:"button",onClick:g,disabled:o,className:"btn btn-primary",children:o?"Saving...":"Save Settings"})})]})},Qm=({children:e})=>a.jsxs("div",{className:"app-header",children:[a.jsx("h1",{className:"app-logo",children:"PROJAX"}),e]}),Ym=({apiPort:e})=>{const[t,n]=j.useState(!1),[r,s]=j.useState(e||null),[o,i]=j.useState("...");return j.useEffect(()=>{(async()=>{try{const m=await window.electronAPI.getAppVersion();i(m)}catch(m){console.error("Failed to get app version:",m),i("3.3.24")}})();const u=async()=>{if(r)c(r);else try{const m=[38124,38125,38126,38127,38128];for(const g of m)try{if((await fetch(`http://localhost:${g}/health`)).ok){s(g),c(g);return}}catch{}}catch(m){console.error("Failed to detect API port:",m)}},c=async m=>{try{const g=await fetch(`http://localhost:${m}/health`);n(g.ok)}catch{n(!1)}};u();const h=setInterval(()=>{r&&c(r)},5e3);return()=>clearInterval(h)},[r]),a.jsx("div",{className:"status-bar",children:a.jsxs("div",{className:"status-bar-content",children:[a.jsxs("div",{className:"status-version",children:["v",o]}),a.jsxs("div",{className:"status-right",children:[a.jsxs("div",{className:"status-indicator",children:[a.jsx("span",{className:`status-dot ${t?"connected":"disconnected"}`}),a.jsx("span",{className:"status-text",children:t?"API Connected":"API Disconnected"})]}),r&&a.jsxs("div",{className:"api-port",children:["Port: ",r]})]})]})})},Km=({pid:e,scriptName:t,projectName:n,onClose:r})=>{const[s,o]=j.useState([]),[i,l]=j.useState(!1),u=j.useRef(null),[c,h]=j.useState(!0);j.useEffect(()=>{const S=y=>{y.key==="Escape"&&r()};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[r]),j.useEffect(()=>{(async()=>{try{await window.electronAPI.watchProcessOutput(e),l(!0)}catch(p){console.error("Failed to start watching process:",p),o(d=>[...d,`Error: Failed to connect to process ${e}`])}})();const y=(p,d)=>{d.pid===e&&o(f=>[...f,d.data])},_=(p,d)=>{d.pid===e&&(o(f=>[...f,`
61
+ [Process exited with code ${d.code}]`]),l(!1))};return window.electronAPI.onProcessOutput(y),window.electronAPI.onProcessExit(_),()=>{window.electronAPI.unwatchProcessOutput(e),window.electronAPI.removeProcessOutputListener(y),window.electronAPI.removeProcessExitListener(_)}},[e]),j.useEffect(()=>{c&&u.current&&(u.current.scrollTop=u.current.scrollHeight)},[s,c]);const m=()=>{if(u.current){const{scrollTop:S,scrollHeight:y,clientHeight:_}=u.current,p=y-S-_<50;h(p)}},g=()=>{o([])},w=()=>{u.current&&(u.current.scrollTop=u.current.scrollHeight,h(!0))};return a.jsxs("div",{className:"terminal-sidebar",children:[a.jsxs("div",{className:"terminal-header",children:[a.jsxs("div",{className:"terminal-title-row",children:[a.jsxs("div",{className:"terminal-title-content",children:[a.jsx("span",{className:`terminal-status-indicator ${i?"running":"stopped"}`,children:i?"●":"○"}),a.jsxs("div",{className:"terminal-info",children:[a.jsx("span",{className:"terminal-script",children:t}),a.jsx("span",{className:"terminal-project",children:n})]})]}),a.jsxs("div",{className:"terminal-meta",children:[a.jsx("span",{className:`terminal-status-badge ${i?"running":"stopped"}`,children:i?"Running":"Stopped"}),a.jsxs("span",{className:"terminal-pid",children:["PID: ",e]})]})]}),a.jsxs("div",{className:"terminal-toolbar",children:[a.jsx("button",{onClick:g,className:"btn btn-secondary btn-tiny",title:"Clear output",children:"Clear"}),!c&&a.jsx("button",{onClick:w,className:"btn btn-secondary btn-tiny",title:"Scroll to bottom",children:"↓ Bottom"}),a.jsx("button",{onClick:r,className:"btn btn-danger btn-tiny",title:"Close terminal",children:"Close"})]})]}),a.jsx("div",{ref:u,className:"terminal-output",onScroll:m,children:s.length===0?a.jsxs("div",{className:"terminal-empty",children:[a.jsx("div",{className:"terminal-empty-icon",children:"⌘"}),a.jsx("div",{className:"terminal-empty-text",children:"Waiting for output..."}),a.jsxs("div",{className:"terminal-empty-hint",children:["Process PID ",e]})]}):s.map((S,y)=>a.jsx("div",{className:"terminal-line",children:S},y))})]})},Gm=({activeTab:e,onTabChange:t})=>a.jsxs("div",{className:"tab-bar",children:[a.jsx("button",{className:`tab-button ${e==="projects"?"active":""}`,onClick:()=>t("projects"),children:"Projects"}),a.jsx("button",{className:`tab-button ${e==="workspaces"?"active":""}`,onClick:()=>t("workspaces"),children:"Workspaces"})]});function Jm(e){const t=e.split("/").filter(Boolean);return t.length===0?e:t[t.length-1]}const Zm=({workspaces:e,selectedWorkspace:t,onSelectWorkspace:n,loading:r,keyboardFocusedIndex:s=-1,onKeyboardFocusChange:o,workspaceProjects:i})=>{if(r)return a.jsx("div",{className:"workspace-list-loading",children:a.jsx("p",{children:"Loading workspaces..."})});if(e.length===0)return a.jsxs("div",{className:"workspace-list-empty",children:[a.jsx("p",{children:"No workspaces yet"}),a.jsx("p",{className:"hint",children:"Add a workspace to get started"})]});const l=mo.useRef(null);return a.jsx("div",{ref:l,className:"workspace-list",role:"listbox","aria-label":"Workspaces",tabIndex:0,onFocus:u=>{s<0&&e.length>0&&o&&o(0)},onBlur:u=>{var c;o&&!((c=l.current)!=null&&c.contains(u.relatedTarget))&&o(-1)},children:e.map((u,c)=>{const h=(t==null?void 0:t.id)===u.id,m=s===c,g=(i==null?void 0:i.get(u.id))||0;return a.jsxs("div",{className:`workspace-item ${h?"selected":""} ${m?"keyboard-focused":""}`,onClick:()=>n(u),role:"option","aria-selected":h,tabIndex:c===0?0:-1,onFocus:w=>{w.currentTarget.scrollIntoView({block:"nearest",behavior:"smooth"}),o&&o(c)},ref:w=>{m&&w&&o&&w.scrollIntoView({block:"nearest",behavior:"smooth"})},children:[a.jsxs("div",{className:"workspace-item-header",children:[a.jsx("div",{className:"workspace-name-wrapper",children:a.jsx("h3",{className:"workspace-name",children:u.name})}),g>0&&a.jsx("span",{className:"workspace-project-count",children:g})]}),u.description&&a.jsx("p",{className:"workspace-description",children:u.description}),a.jsx("p",{className:"workspace-path",children:Jm(u.workspace_file_path)}),u.tags&&u.tags.length>0&&a.jsx("div",{className:"workspace-tags",children:u.tags.map(w=>a.jsx("span",{className:"workspace-tag",children:w},w))})]},u.id)})})},qm=({workspace:e,onWorkspaceUpdate:t,onRemoveWorkspace:n,onOpenWorkspace:r,onSelectProject:s})=>{const[o,i]=j.useState(!1),[l,u]=j.useState(""),[c,h]=j.useState(!1),[m,g]=j.useState(""),[w,S]=j.useState(!1),[y,_]=j.useState(""),[p,d]=j.useState([]),[f,v]=j.useState([]),[x,P]=j.useState([]),[N,C]=j.useState([]),[U,M]=j.useState(!1),[b,X]=j.useState(null),[Z,fe]=j.useState(!1),[q,K]=j.useState("");j.useEffect(()=>{e&&(u(e.name),g(e.description||""),v(e.tags||[]),i(!1),h(!1),T(),pe())},[e==null?void 0:e.id]);const pe=async()=>{try{const D=await fetch("http://localhost:3001/api/projects/tags");if(D.ok){const V=await D.json();d(Array.isArray(V)?V:[])}}catch(D){console.error("Error loading tags:",D)}},T=async()=>{if(e)try{M(!0);const D=[38124,38125,38126,38127,38128,3001];let V="";for(const rt of D)try{if((await fetch(`http://localhost:${rt}/health`,{signal:AbortSignal.timeout(500)})).ok){V=`http://localhost:${rt}/api`;break}}catch{continue}if(!V){M(!1);return}const ve=await fetch(`${V}/workspaces/${e.id}/projects`);if(ve.ok){const rt=await ve.json();P(rt);const xe=await window.electronAPI.getProjects(),st=rt.map(te=>{const ft=xe.find(_n=>_n.path===te.project_path);return{tracked:!!ft,project:ft,path:te.project_path}});C(st)}}catch(D){console.error("Error loading workspace projects:",D)}finally{M(!1)}};if(!e)return a.jsx("div",{className:"workspace-details-empty",children:a.jsx("p",{children:"Select a workspace to view details"})});const W=async()=>{const D=[38124,38125,38126,38127,38128,3001];for(const V of D)try{if((await fetch(`http://localhost:${V}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${V}/api`}catch{continue}return null},A=async()=>{try{const D=await W();if(!D)return;const V=await fetch(`${D}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l})});if(V.ok){const ve=await V.json();t&&t(ve),i(!1)}}catch(D){console.error("Error updating workspace name:",D)}},Y=async()=>{try{const D=await W();if(!D)return;const V=await fetch(`${D}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:m})});if(V.ok){const ve=await V.json();t&&t(ve),h(!1)}}catch(D){console.error("Error updating workspace description:",D)}},oe=()=>{const D="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let V="";for(let ve=0;ve<6;ve++)V+=D.charAt(Math.floor(Math.random()*D.length));return V},[Le]=j.useState(oe()),ee=()=>{e&&q===Le&&(n&&n(e.id),fe(!1),K(""))},nt=async D=>{try{X(D),await window.electronAPI.addProject(D),await T()}catch(V){console.error("Error adding project to PROJAX:",V),alert(`Failed to add project: ${V instanceof Error?V.message:"Unknown error"}`)}finally{X(null)}};return a.jsxs("div",{className:"workspace-details",children:[a.jsxs("div",{className:"workspace-details-header",children:[a.jsxs("div",{children:[o?a.jsx("div",{className:"workspace-name-edit",children:a.jsx("input",{type:"text",value:l,onChange:D=>u(D.target.value),onBlur:A,onKeyDown:D=>{D.key==="Enter"&&A(),D.key==="Escape"&&(u(e.name),i(!1))},autoFocus:!0,className:"workspace-name-input"})}):a.jsx("h2",{className:"workspace-name-editable",onClick:()=>i(!0),title:"Click to rename",children:e.name}),c?a.jsx("div",{className:"workspace-description-edit",children:a.jsx("textarea",{value:m,onChange:D=>g(D.target.value),onBlur:Y,onKeyDown:D=>{D.key==="Enter"&&(D.metaKey||D.ctrlKey)?Y():D.key==="Escape"&&(g(e.description||""),h(!1))},autoFocus:!0,className:"workspace-description-input",placeholder:"Add a description for this workspace... (⌘+Enter to save, Esc to cancel)"})}):a.jsxs("div",{children:[a.jsx("p",{className:"workspace-description",onClick:()=>h(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),a.jsx("p",{className:"workspace-path",children:e.workspace_file_path})]})]}),a.jsx("div",{className:"header-actions-group",children:a.jsx("button",{type:"button",onClick:()=>r&&r(e),className:"btn btn-secondary",title:"Open workspace in editor",children:"Editor"})})]}),a.jsxs("div",{className:"workspace-section",children:[a.jsxs("h3",{children:["Workspace Projects (",N.length,")"]}),U?a.jsxs("div",{className:"loading-spinner",children:[a.jsx("div",{className:"spinner"}),a.jsx("p",{children:"Loading projects..."})]}):N.length===0?a.jsx("div",{className:"empty-state",children:a.jsx("p",{children:"No projects in this workspace"})}):a.jsx("div",{className:"workspace-projects-list",children:N.map((D,V)=>{const ve=xe=>{const st=xe.split("/").filter(Boolean);if(st.length===0)return xe;const te=st[st.length-1];return te==="src"&&st.length>1?st[st.length-2]:te},rt=D.tracked&&D.project?D.project.name:D.path.split("/").filter(Boolean).pop()||D.path;return a.jsxs("div",{className:`workspace-project-tile ${D.tracked?"":"untracked"}`,onClick:()=>D.tracked&&D.project&&s&&s(D.project),children:[a.jsx("div",{className:"project-tile-header",children:a.jsxs("h3",{className:"project-tile-name",children:[!D.tracked&&a.jsx("span",{className:"untracked-badge",children:"Not in PROJAX"}),rt]})}),a.jsx("p",{className:"project-tile-path",children:D.tracked&&D.project?D.project.description||ve(D.project.path):D.path}),D.tracked&&D.project&&D.project.tags&&D.project.tags.length>0&&a.jsx("div",{className:"project-tile-tags",children:D.project.tags.map(xe=>a.jsx("span",{className:"project-tile-tag",children:xe},xe))}),!D.tracked&&a.jsx("div",{className:"project-tile-actions",children:a.jsx("button",{type:"button",className:"btn-add-project",onClick:xe=>{xe.stopPropagation(),nt(D.path)},disabled:b===D.path,children:b===D.path?"Adding...":"Add to PROJAX"})})]},D.tracked?D.project.id:V)})})]}),n&&a.jsxs("div",{className:"danger-zone",children:[a.jsx("h3",{children:"Danger Zone"}),a.jsx("p",{className:"danger-zone-text",children:"Once you delete this workspace, there is no going back. Please be certain."}),a.jsx("button",{type:"button",onClick:()=>fe(!0),className:"btn btn-danger",title:"Delete workspace",children:"Delete Workspace"})]}),Z&&a.jsx("div",{className:"modal-overlay",onClick:()=>{fe(!1),K("")},children:a.jsxs("div",{className:"modal-content",onClick:D=>D.stopPropagation(),children:[a.jsx("h3",{children:"Delete Workspace"}),a.jsxs("p",{className:"modal-warning",children:["This will permanently delete the workspace ",a.jsxs("strong",{children:['"',e.name,'"']})," from PROJAX.",a.jsx("br",{}),a.jsx("br",{}),"The workspace file will ",a.jsx("strong",{children:"not"})," be deleted from your filesystem."]}),a.jsxs("p",{className:"modal-instruction",children:["Type ",a.jsx("code",{className:"confirmation-code",children:Le})," to confirm:"]}),a.jsx("input",{type:"text",value:q,onChange:D=>K(D.target.value),placeholder:"Enter confirmation code",className:"confirmation-input",autoFocus:!0}),a.jsxs("div",{className:"modal-actions",children:[a.jsx("button",{type:"button",onClick:()=>{fe(!1),K("")},className:"btn btn-secondary",children:"Cancel"}),a.jsx("button",{type:"button",onClick:ee,className:"btn btn-danger",disabled:q!==Le,children:"Delete Workspace"})]})]})})]})},eg=({onAdd:e,onClose:t,existingProjects:n=[]})=>{const[r,s]=j.useState("import"),[o,i]=j.useState(""),[l,u]=j.useState(""),[c,h]=j.useState(""),[m,g]=j.useState([]),[w,S]=j.useState(!1),y=async()=>{try{const d=await window.electronAPI.selectFile({filters:[{name:"Workspace Files",extensions:["code-workspace"]}]});d&&i(d)}catch(d){console.error("Error selecting workspace file:",d)}},_=d=>{g(f=>f.includes(d)?f.filter(v=>v!==d):[...f,d])},p=async d=>{d.preventDefault();try{if(S(!0),r==="import"){if(!o){alert("Please select a workspace file");return}const f=[38124,38125,38126,38127,38128,3001];let v="";for(const N of f)try{if((await fetch(`http://localhost:${N}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${N}/api`;break}}catch{continue}if(!v)throw new Error("PROJAX API server not found");const x=await fetch(`${v}/workspaces/import`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace_file_path:o})});if(!x.ok){const N=x.headers.get("content-type");if(N&&N.includes("application/json")){const C=await x.json();throw new Error(C.error||"Failed to import workspace")}else{const C=await x.text();throw new Error(`Server returned ${x.status}: ${C.substring(0,100)}`)}}const P=await x.json();await e(P)}else{if(!l){alert("Please provide workspace name");return}const f=[38124,38125,38126,38127,38128,3001];let v="";for(const N of f)try{if((await fetch(`http://localhost:${N}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${N}/api`;break}}catch{continue}if(!v)throw new Error("PROJAX API server not found");const x=await fetch(`${v}/workspaces/create`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,description:c,projects:m})});if(!x.ok){const N=x.headers.get("content-type");if(N&&N.includes("application/json")){const C=await x.json();throw new Error(C.error||"Failed to create workspace")}else{const C=await x.text();throw new Error(`Server returned ${x.status}: ${C.substring(0,100)}`)}}const P=await x.json();await e(P)}}catch(f){alert(f instanceof Error?f.message:"Failed to add workspace")}finally{S(!1)}};return a.jsx("div",{className:"modal-overlay",onClick:t,children:a.jsxs("div",{className:"modal-content workspace-modal",onClick:d=>d.stopPropagation(),children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("h2",{children:"Add Workspace"}),a.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),a.jsxs("div",{className:"workspace-mode-selector",children:[a.jsx("button",{type:"button",className:`mode-button ${r==="import"?"active":""}`,onClick:()=>s("import"),children:"Import from File"}),a.jsx("button",{type:"button",className:`mode-button ${r==="create"?"active":""}`,onClick:()=>s("create"),children:"Create New"})]}),a.jsxs("form",{onSubmit:p,children:[r==="import"?a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"workspace-file",children:"Workspace File (.code-workspace)"}),a.jsxs("div",{className:"path-input-group",children:[a.jsx("input",{id:"workspace-file",type:"text",value:o,onChange:d=>i(d.target.value),placeholder:"Select workspace file",disabled:w}),a.jsx("button",{type:"button",onClick:y,disabled:w,className:"btn btn-secondary",children:"Browse"})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"workspace-name",children:"Workspace Name *"}),a.jsx("input",{id:"workspace-name",type:"text",value:l,onChange:d=>u(d.target.value),placeholder:"My Workspace",disabled:w,required:!0,className:"form-input"})]}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{htmlFor:"workspace-description",children:"Description"}),a.jsx("textarea",{id:"workspace-description",value:c,onChange:d=>h(d.target.value),placeholder:"Optional description",disabled:w,rows:3,className:"form-input"})]}),a.jsx("div",{className:"form-group",children:a.jsx("p",{className:"form-hint",style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"0.5rem"},children:"Workspace files are automatically stored in ~/.projax/workspaces/"})}),a.jsxs("div",{className:"form-group",children:[a.jsx("label",{children:"Add Projects"}),a.jsx("div",{className:"projects-selector",children:n.length===0?a.jsx("p",{className:"empty-state",children:"No projects available"}):n.map(d=>a.jsxs("label",{className:"project-checkbox",children:[a.jsx("input",{type:"checkbox",checked:m.includes(d.path),onChange:()=>_(d.path),disabled:w}),a.jsx("span",{children:d.name})]},d.id))})]})]}),a.jsxs("div",{className:"modal-actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:w,className:"btn btn-secondary",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:w,className:"btn btn-primary",children:w?"Adding...":r==="import"?"Import":"Create"})]})]})]})})},tg=({onSearchChange:e,onSortChange:t})=>{const[n,r]=j.useState(""),[s,o]=j.useState("name-asc"),[i,l]=j.useState(!1),u=j.useRef(null),c=j.useRef(null),h=w=>{const S=w.target.value;r(S),e(S)},m=w=>{o(w),l(!1),t&&t(w)};j.useEffect(()=>{const w=S=>{u.current&&!u.current.contains(S.target)&&l(!1)};if(i)return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[i]);const g=[{value:"name-asc",label:"Name (A-Z)"},{value:"name-desc",label:"Name (Z-A)"},{value:"recent",label:"Recently Created"},{value:"projects",label:"Most Projects"}];return a.jsx("div",{className:"project-search",children:a.jsxs("div",{className:"search-input-group",ref:u,children:[a.jsxs("div",{className:"search-input-wrapper",children:[a.jsx("input",{ref:c,type:"text",placeholder:"Search workspaces...",value:n,onChange:h,className:"search-input"}),a.jsx("button",{type:"button",className:"sort-icon-btn",onClick:()=>l(!i),title:"Sort options",tabIndex:0,children:a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:a.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),i&&a.jsx("div",{className:"sort-menu",children:g.map(w=>a.jsxs("div",{className:`sort-menu-item ${s===w.value?"active":""}`,onClick:()=>m(w.value),children:[w.label,s===w.value&&a.jsx("span",{className:"checkmark",children:"✓"})]},w.value))})]})})};function ng(){const[e,t]=j.useState([]),[n,r]=j.useState(null),[s,o]=j.useState(!0),[i,l]=j.useState(!1),[u,c]=j.useState(""),[h,m]=j.useState("all"),[g,w]=j.useState("name-asc"),[S,y]=j.useState(!1),[_,p]=j.useState([]),[d,f]=j.useState(-1),v=mo.useRef(null),[x,P]=j.useState(280),[N,C]=j.useState(550),[U,M]=j.useState(null),[b,X]=j.useState("projects"),[Z,fe]=j.useState([]),[q,K]=j.useState(null),[pe,T]=j.useState(!1),[W,A]=j.useState(!1),[Y,oe]=j.useState(new Map),[Le,ee]=j.useState(new Map),[nt,D]=j.useState(""),[V,ve]=j.useState("name-asc"),[rt,xe]=j.useState(!1),[st,te]=j.useState(!1);j.useEffect(()=>{r(null)},[b]),j.useEffect(()=>{ft(),dn(),_n();const z=setInterval(()=>{_n(),fn()},5e3);return()=>clearInterval(z)},[]),j.useEffect(()=>{e.length>0&&fn()},[e]);const ft=async()=>{try{o(!0);const z=await window.electronAPI.getProjects();t(z),z.length===0&&console.log('No projects found. Use "Add Project" to add one.')}catch(z){console.error("Error loading projects:",z),alert(`Error loading projects: ${z instanceof Error?z.message:String(z)}
62
+
63
+ Check the console for more details.`)}finally{o(!1)}},_n=async()=>{try{const z=await window.electronAPI.getRunningProcesses();p(z)}catch(z){console.error("Error loading running processes:",z)}},dn=async()=>{try{T(!0);const z=[38124,38125,38126,38127,38128,3001];let R="";for(const F of z)try{if((await fetch(`http://localhost:${F}/health`,{signal:AbortSignal.timeout(500)})).ok){R=`http://localhost:${F}/api`;break}}catch{continue}if(!R){T(!1);return}const L=await fetch(`${R}/workspaces`);if(L.ok){const F=L.headers.get("content-type");if(F&&F.includes("application/json")){const $=await L.json();fe($);const ke=new Map;await Promise.all($.map(async Be=>{try{const Pe=await fetch(`${R}/workspaces/${Be.id}/projects`);if(Pe.ok){const Wo=await Pe.json();ke.set(Be.id,Wo.length)}}catch(Pe){console.error(`Error loading projects for workspace ${Be.id}:`,Pe)}})),ee(ke)}else{const $=await L.text();throw console.error("API returned non-JSON response:",$.substring(0,200)),new Error("API server returned invalid response (not JSON)")}}else{const F=L.headers.get("content-type");if(F&&F.includes("application/json")){const $=await L.json();console.error("API error:",$)}else{const $=await L.text();console.error("API error (non-JSON):",$.substring(0,200))}}}catch(z){console.error("Error loading workspaces:",z)}finally{T(!1)}},fn=async()=>{try{const z=new Map,R=[38124,38125,38126,38127,38128,3001];let L="";for(const F of R)try{if((await fetch(`http://localhost:${F}/health`,{signal:AbortSignal.timeout(500)})).ok){L=`http://localhost:${F}/api`;break}}catch{continue}if(!L){for(const F of e)z.set(F.id,null);oe(z);return}for(const F of e)try{const $=await fetch(`${L}/projects/${F.id}/git-branch`);if($.ok){const ke=await $.json();z.set(F.id,ke.branch)}else z.set(F.id,null)}catch{z.set(F.id,null)}oe(z)}catch(z){console.error("Error updating git branches:",z)}},ns=async z=>{try{const R=await window.electronAPI.addProject(z);await ft(),l(!1),await window.electronAPI.scanProject(R.id),await ft()}catch(R){throw console.error("Error adding project:",R),alert(R instanceof Error?R.message:"Failed to add project"),R}},Lo=async z=>{te(!0);const R={success:0,errors:[]};for(const L of z)try{await ns(L),R.success++}catch(F){const $=F instanceof Error?F.message:"Unknown error";R.errors.push(`${L}: ${$}`)}te(!1),R.errors.length>0&&alert(`Added ${R.success} project(s). Errors:
64
+ ${R.errors.join(`
65
+ `)}`)},Ao=async z=>{if(confirm("Are you sure you want to remove this project?"))try{await window.electronAPI.removeProject(z),(n==null?void 0:n.id)===z&&r(null),await ft()}catch(R){console.error("Error removing project:",R),alert("Failed to remove project")}},zn=(z,R)=>{c(z),m(R)},Bt=j.useMemo(()=>{let z=e;if(u.trim()){const L=u.toLowerCase().trim();z=e.filter(F=>{switch(h){case"name":return F.name.toLowerCase().includes(L);case"path":return F.path.toLowerCase().includes(L);case"ports":return!1;case"running":return L==="running"||L==="not running";case"all":default:return F.name.toLowerCase().includes(L)||F.path.toLowerCase().includes(L)||F.tags&&F.tags.some($=>$.toLowerCase().includes(L))}})}const R=[...z];switch(g){case"name-asc":R.sort((L,F)=>L.name.localeCompare(F.name));break;case"name-desc":R.sort((L,F)=>F.name.localeCompare(L.name));break;case"recent":R.sort((L,F)=>(F.last_scanned||0)-(L.last_scanned||0));break;case"oldest":R.sort((L,F)=>L.created_at-F.created_at);break;case"running":R.sort((L,F)=>{const $=_.filter(Be=>Be.projectPath===L.path).length;return _.filter(Be=>Be.projectPath===F.path).length-$});break}return R},[e,u,h,g,_]),ar=j.useMemo(()=>{let z=Z;if(nt.trim()){const R=nt.toLowerCase().trim();z=Z.filter(L=>L.name.toLowerCase().includes(R)||L.description&&L.description.toLowerCase().includes(R)||L.workspace_file_path.toLowerCase().includes(R))}return z=[...z].sort((R,L)=>{switch(V){case"name-asc":return R.name.localeCompare(L.name);case"name-desc":return L.name.localeCompare(R.name);case"recent":return(L.id||0)-(R.id||0);case"projects":{const F=Le.get(R.id)||0;return(Le.get(L.id)||0)-F}default:return 0}}),z},[Z,nt,V,Le]);j.useEffect(()=>{const z=R=>{var Be;if((R.metaKey||R.ctrlKey)&&R.key===","){R.preventDefault(),y(!0);return}if((R.metaKey||R.ctrlKey)&&R.key==="/"){R.preventDefault(),(Be=v.current)==null||Be.focus();return}const L=R.target;if(L.tagName==="INPUT"||L.tagName==="TEXTAREA")return;const F=document.querySelector(".project-list"),$=F&&(F===L||F.contains(L)||L.closest(".project-item")!==null);if(!$&&(R.key==="ArrowDown"||R.key==="ArrowUp"))return;const ke=Bt;if(R.key==="ArrowDown"&&$){R.preventDefault();const Pe=d<ke.length-1?d+1:ke.length>0?0:-1;Pe>=0&&(f(Pe),r(ke[Pe]))}else if(R.key==="ArrowUp"&&$){R.preventDefault();const Pe=d>0?d-1:ke.length>0?ke.length-1:-1;Pe>=0&&(f(Pe),r(ke[Pe]))}else R.key==="Enter"&&d>=0&&d<ke.length&&$?(R.preventDefault(),r(ke[d])):R.key==="Escape"&&$&&f(-1)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[d,Bt]),j.useEffect(()=>{f(-1)},[Bt.length,u]);const rs=(z,R,L)=>{M({pid:z,scriptName:R,projectName:L})},Io=()=>{M(null)},ss=z=>{z.preventDefault(),z.stopPropagation(),z.dataTransfer.types.includes("Files")&&xe(!0)},Fo=z=>{z.preventDefault(),z.stopPropagation(),z.dataTransfer.types.includes("Files")&&(z.dataTransfer.dropEffect="copy")},os=z=>{z.preventDefault(),z.stopPropagation(),z.currentTarget.contains(z.relatedTarget)||xe(!1)},is=async z=>{if(z.preventDefault(),z.stopPropagation(),xe(!1),b!=="projects"||st)return;const R=Array.from(z.dataTransfer.files);if(R.length===0)return;const L=[];for(const F of R){const $=F;$.path&&L.push($.path)}L.length>0?await Lo(L):alert('Could not extract file paths. Please try using the "Add Project" button instead.')};return a.jsxs("div",{className:`app ${rt?"drag-over":""}`,onDragEnter:ss,onDragOver:Fo,onDragLeave:os,onDrop:is,children:[a.jsx(Qm,{children:a.jsxs("div",{className:"header-actions",children:[a.jsx("button",{type:"button",onClick:()=>y(!0),className:"btn-link",title:"Settings",children:"Settings"}),b==="projects"?a.jsx("button",{type:"button",onClick:()=>l(!0),className:"btn-link btn-link-primary",children:"+ Add Project"}):a.jsx("button",{type:"button",onClick:()=>A(!0),className:"btn-link btn-link-primary",children:"+ Add Workspace"})]})}),a.jsxs("div",{className:"app-content",children:[a.jsx(Wm,{size:{width:x,height:"100%"},minWidth:200,maxWidth:600,disableDragging:!0,enableResizing:{right:!0},onResizeStop:(z,R,L,F)=>{const $=x+F.width;P(Math.max(200,Math.min(600,$)))},style:{position:"relative",display:"flex",flexDirection:"column"},resizeHandleStyles:{right:{width:"4px",right:"-2px",cursor:"col-resize",backgroundColor:"transparent"}},children:a.jsxs("aside",{className:"sidebar",style:{width:"100%",height:"100%"},children:[a.jsx(Gm,{activeTab:b,onTabChange:X}),b==="projects"?a.jsxs(a.Fragment,{children:[a.jsx(Vm,{onSearchChange:zn,onSortChange:w,searchInputRef:v}),a.jsx(Bm,{projects:Bt,selectedProject:n,onSelectProject:r,loading:s,runningProcesses:_,keyboardFocusedIndex:d,onKeyboardFocusChange:f,gitBranches:Y})]}):a.jsxs(a.Fragment,{children:[a.jsx(tg,{onSearchChange:D,onSortChange:ve}),a.jsx(Zm,{workspaces:ar,selectedWorkspace:q,onSelectWorkspace:z=>{r(null),setTimeout(()=>{K(z)},0)},loading:pe,keyboardFocusedIndex:d,onKeyboardFocusChange:f,workspaceProjects:Le})]})]})}),a.jsx("main",{className:"main-content",children:S?a.jsx(Xm,{onClose:()=>y(!1)}):n?a.jsx($m,{project:n,workspace:b==="workspaces"?q:void 0,onProjectUpdate:z=>{r(z),ft()},onRemoveProject:Ao,onOpenTerminal:rs,onNavigateBack:b==="workspaces"&&q?()=>{r(null)}:void 0}):b==="workspaces"&&q?a.jsx(qm,{workspace:q,onWorkspaceUpdate:z=>{K(z),dn()},onRemoveWorkspace:async z=>{try{const R=[38124,38125,38126,38127,38128,3001];let L="";for(const F of R)try{if((await fetch(`http://localhost:${F}/health`,{signal:AbortSignal.timeout(500)})).ok){L=`http://localhost:${F}/api`;break}}catch{continue}L&&await fetch(`${L}/workspaces/${z}`,{method:"DELETE"}),(q==null?void 0:q.id)===z&&K(null),await dn()}catch(R){console.error("Error removing workspace:",R),alert("Failed to remove workspace")}},onOpenWorkspace:async z=>{try{await window.electronAPI.openWorkspace(z.id)}catch(R){console.error("Error opening workspace:",R),alert(`Failed to open workspace: ${R instanceof Error?R.message:"Unknown error"}`)}},onSelectProject:z=>{r(z)}}):a.jsxs("div",{className:"empty-state",children:[a.jsxs("h2",{children:["Select ",b==="projects"?"a project":"a workspace"," to view details"]}),a.jsxs("p",{children:["Choose ",b==="projects"?"a project":"a workspace"," from the sidebar to see its information."]}),b==="projects"&&a.jsx("p",{style:{fontSize:"12px",marginTop:"1rem",opacity:.7},children:"💡 Tip: You can also drag and drop folders here to add projects"})]})}),U&&a.jsxs("div",{style:{width:`${N}px`,minWidth:"350px",maxWidth:"800px",height:"100%",position:"relative",flexShrink:0,display:"flex",flexDirection:"column"},children:[a.jsx("div",{style:{position:"absolute",left:"-2px",top:0,bottom:0,width:"4px",cursor:"col-resize",zIndex:10},onMouseDown:z=>{z.preventDefault();const R=z.clientX,L=N,F=ke=>{const Be=R-ke.clientX,Pe=Math.max(350,Math.min(800,L+Be));C(Pe)},$=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",$)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",$)}}),a.jsx(Km,{pid:U.pid,scriptName:U.scriptName,projectName:U.projectName,onClose:Io})]})]}),i&&a.jsx(Hm,{onAdd:ns,onClose:()=>l(!1)}),W&&a.jsx(eg,{onAdd:async z=>{await dn(),A(!1),K(z)},onClose:()=>A(!1),existingProjects:e}),a.jsx(Ym,{})]})}const lf=[{id:1,name:"My React App",path:"/Users/dev/my-react-app",description:"A modern React application with TypeScript",tags:["react","typescript","frontend"],framework:"react",last_scanned:Date.now()-864e4,created_at:Date.now()-864e5*30},{id:2,name:"Node API Server",path:"/Users/dev/node-api",description:"RESTful API built with Express",tags:["node","express","backend","api"],framework:"node",last_scanned:Date.now()-864e3,created_at:Date.now()-864e5*60},{id:3,name:"Vue Dashboard",path:"/Users/dev/vue-dashboard",description:"Admin dashboard built with Vue 3",tags:["vue","frontend","dashboard"],framework:"vue",last_scanned:Date.now()-36e5,created_at:Date.now()-864e5*15}],af=[{id:1,name:"Frontend Projects",description:"All frontend-related projects",tags:["frontend"],created_at:Date.now()-864e5*20},{id:2,name:"Backend Services",description:"API and microservices",tags:["backend","api"],created_at:Date.now()-864e5*45}],rg=[{pid:12345,projectPath:"/Users/dev/my-react-app",projectName:"My React App",scriptName:"dev",command:"npm run dev",startedAt:Date.now()-36e5,logFile:"/tmp/projax-12345.log",detectedUrls:["http://localhost:3000"],detectedPorts:[3e3]}],sg={type:"npm",scripts:[{name:"dev",command:"vite",runner:"npm",projectType:"react"},{name:"build",command:"vite build",runner:"npm",projectType:"react"},{name:"test",command:"vitest",runner:"npm",projectType:"react"},{name:"lint",command:"eslint .",runner:"npm",projectType:"react"}]},og=[{id:1,project_id:1,port:3e3,script_name:"dev",config_source:"package.json",last_detected:Date.now()-3e5,created_at:Date.now()-864e5}],yr=[{id:1,project_id:1,file_path:"/Users/dev/my-react-app/src/App.test.tsx",framework:"vitest",status:null,last_run:null,created_at:Date.now()-864e5*5},{id:2,project_id:1,file_path:"/Users/dev/my-react-app/src/components/Button.test.tsx",framework:"vitest",status:null,last_run:null,created_at:Date.now()-864e5*5}];let jt=[...lf],wr=[...af],ht=[...rg];const bs=new Map;bs.set(1,og);const G=(e=300)=>new Promise(t=>setTimeout(t,e)),ig=()=>({getProjects:async()=>(await G(),[...jt]),addProject:async e=>{await G();const t={id:Math.max(...jt.map(n=>n.id),0)+1,name:e.split("/").pop()||"New Project",path:e,description:null,tags:[],framework:null,last_scanned:null,created_at:Date.now()};return jt.push(t),t},removeProject:async e=>{await G(),jt=jt.filter(t=>t.id!==e)},scanProject:async e=>{await G(1e3);const t=jt.find(n=>n.id===e);if(!t)throw new Error("Project not found");return{project:t,testsFound:yr.filter(n=>n.project_id===e).length,tests:yr.filter(n=>n.project_id===e)}},scanAllProjects:async()=>(await G(2e3),jt.map(e=>({project:e,testsFound:yr.filter(t=>t.project_id===e.id).length,tests:yr.filter(t=>t.project_id===e.id)}))),getTests:async e=>(await G(),yr.filter(t=>t.project_id===e)),selectDirectory:async()=>(await G(),prompt("Enter a project path (mock):")||null),minimizeWindow:async()=>{console.log("[MOCK] minimizeWindow")},maximizeWindow:async()=>{console.log("[MOCK] maximizeWindow")},closeWindow:async()=>{console.log("[MOCK] closeWindow")},renameProject:async(e,t)=>{await G();const n=jt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return n.name=t,{...n}},updateProject:async(e,t)=>{await G();const n=jt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return t.description!==void 0&&(n.description=t.description),t.tags!==void 0&&(n.tags=t.tags),{...n}},getProjectScripts:async e=>(await G(),sg),runScript:async(e,t,n,r)=>{await G(500);const s=jt.find(o=>o.path===e);if(r){const o={pid:Math.floor(Math.random()*9e4)+1e4,projectPath:e,projectName:(s==null?void 0:s.name)||"Unknown",scriptName:t,command:`npm run ${t}`,startedAt:Date.now(),logFile:`/tmp/projax-${Date.now()}.log`,detectedUrls:[],detectedPorts:[]};ht.push(o)}return{success:!0,background:r||!1}},scanProjectPorts:async e=>(await G(1e3),bs.get(e)||[]),scanAllPorts:async()=>{await G(2e3);const e={};return bs.forEach((t,n)=>{e[n]=t}),e},getProjectPorts:async e=>(await G(),bs.get(e)||[]),getRunningProcesses:async()=>(await G(),[...ht]),stopScript:async e=>(await G(),ht=ht.filter(t=>t.pid!==e),!0),stopProject:async e=>{await G();const t=ht.filter(n=>n.projectPath===e).length;return ht=ht.filter(n=>n.projectPath!==e),t},openUrl:async e=>{console.log("[MOCK] openUrl:",e),window.open(e,"_blank")},openInEditor:async e=>{console.log("[MOCK] openInEditor:",e)},openInFiles:async e=>{console.log("[MOCK] openInFiles:",e)},getSettings:async()=>(await G(),{editor:{type:"vscode"},browser:{type:"default"}}),saveSettings:async e=>{await G(),console.log("[MOCK] saveSettings:",e)},openExternal:e=>{window.open(e,"_blank")},watchProcessOutput:async e=>(console.log("[MOCK] watchProcessOutput:",e),{success:!0}),unwatchProcessOutput:async e=>(console.log("[MOCK] unwatchProcessOutput:",e),{success:!0}),onProcessOutput:e=>{setTimeout(()=>{ht.length>0&&e(null,{pid:ht[0].pid,data:`[MOCK] Process output line
66
+ `})},2e3)},onProcessExit:e=>{setTimeout(()=>{ht.length>0&&e(null,{pid:ht[0].pid,code:0})},1e4)},removeProcessOutputListener:e=>{console.log("[MOCK] removeProcessOutputListener")},removeProcessExitListener:e=>{console.log("[MOCK] removeProcessExitListener")},getAppVersion:async()=>(await G(),"3.3.38"),getLatestTestResult:async e=>(await G(),{id:1,project_id:e,passed:10,failed:2,skipped:1,duration:1234,timestamp:Date.now()}),getWorkspaces:async()=>(await G(),[...wr]),addWorkspace:async e=>{await G();const t={id:Math.max(...wr.map(n=>n.id),0)+1,...e,created_at:Date.now()};return wr.push(t),t},removeWorkspace:async e=>{await G(),wr=wr.filter(t=>t.id!==e)},createBackup:async e=>(await G(1e3),{success:!0,backup_path:e}),restoreBackup:async e=>(await G(1e3),{success:!0}),showSaveDialog:async e=>(await G(),{canceled:!1,filePath:"/tmp/backup.json"}),showOpenDialog:async e=>(await G(),{canceled:!1,filePaths:["/tmp/backup.json"]}),selectFile:async e=>(await G(),"/tmp/selected-file.json"),openWorkspace:async e=>{console.log("[MOCK] openWorkspace:",e)}});let Rn=[...af];const Du=[...lf],Ru=new Map,lg=new Map,ag=(e=200)=>new Promise(t=>setTimeout(t,e)),ug=()=>{const e=window.fetch;window.fetch=async(t,n)=>{const r=typeof t=="string"?t:t instanceof URL?t.toString():t.url;if(!r.includes("localhost:3001/api")&&!r.includes("localhost:3001/health"))return e(t,n);await ag();const o=new URL(r,"http://localhost:3001").pathname,i=(n==null?void 0:n.method)||"GET";if(console.log(`[MOCK API] ${i} ${o}`),o==="/api/workspaces"&&i==="GET")return new Response(JSON.stringify(Rn),{status:200,headers:{"Content-Type":"application/json"}});if(o==="/api/workspaces/create"&&i==="POST"){const l=JSON.parse((n==null?void 0:n.body)||"{}"),u={id:Math.max(...Rn.map(c=>c.id),0)+1,...l,created_at:Date.now()};return Rn.push(u),new Response(JSON.stringify(u),{status:201,headers:{"Content-Type":"application/json"}})}if(o==="/api/workspaces/import"&&i==="POST")return n==null||n.body,new Response(JSON.stringify({success:!0,imported:1}),{status:200,headers:{"Content-Type":"application/json"}});if(o.startsWith("/api/workspaces/")&&o.endsWith("/projects")&&i==="GET"){const l=parseInt(o.split("/")[3]),u=lg.get(l)||[],c=Du.filter(h=>u.includes(h.id));return new Response(JSON.stringify(c),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/workspaces/")&&i==="PUT"){const l=parseInt(o.split("/")[3]),u=JSON.parse((n==null?void 0:n.body)||"{}"),c=Rn.find(h=>h.id===l);return c?(Object.assign(c,u),new Response(JSON.stringify(c),{status:200,headers:{"Content-Type":"application/json"}})):new Response(JSON.stringify({error:"Not found"}),{status:404})}if(o.startsWith("/api/workspaces/")&&i==="DELETE"){const l=parseInt(o.split("/")[3]);return Rn=Rn.filter(u=>u.id!==l),new Response(JSON.stringify({success:!0}),{status:200,headers:{"Content-Type":"application/json"}})}if(o==="/api/projects/tags"&&i==="GET"){const l=new Set;return Du.forEach(u=>{(u.tags||[]).forEach(c=>l.add(c))}),new Response(JSON.stringify(Array.from(l)),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="GET"){const l=parseInt(o.split("/")[3]),u=Ru.get(l)||{script_sort_order:"default"};return new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="PUT"){const l=parseInt(o.split("/")[3]),u=JSON.parse((n==null?void 0:n.body)||"{}");return Ru.set(l,u),new Response(JSON.stringify(u),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/git-branch")&&i==="GET"){const l=parseInt(o.split("/")[3]),u=["main","develop","feature/new-feature"];return new Response(JSON.stringify({branch:u[l%u.length]}),{status:200,headers:{"Content-Type":"application/json"}})}return o==="/health"?new Response(JSON.stringify({status:"ok"}),{status:200,headers:{"Content-Type":"application/json"}}):(console.warn(`[MOCK API] Unhandled route: ${i} ${o}`),new Response(JSON.stringify({error:"Not found"}),{status:404,headers:{"Content-Type":"application/json"}}))}},cg=()=>{var r,s;if(typeof window>"u")return;const e=typeof window.electronAPI<"u",t=typeof window.process<"u",n=(r=window.process)==null?void 0:r.type;if(console.log("[MOCK SETUP] Environment check:",{hasElectronAPI:e,hasProcess:t,processType:n,electronAPIType:typeof window.electronAPI}),e){console.log("⚡ Running in Electron - using real APIs");return}e||(console.log("🔧 Setting up mocks for browser development..."),Object.defineProperty(window,"electronAPI",{value:ig(),writable:!1,configurable:!1}),console.log("✅ Mock ElectronAPI initialized"),ug(),console.log("✅ Mock fetch interceptor initialized"),console.log("✅ All mocks initialized. You can now develop in the browser!"),console.log("📦 Mock data includes:",{projects:3,workspaces:2,runningProcesses:1}),typeof((s=window.electronAPI)==null?void 0:s.getProjects)=="function"?console.log("✅ Verified: electronAPI.getProjects is available"):console.error("❌ ERROR: electronAPI.getProjects is not available!"))};cg();vi.createRoot(document.getElementById("root")).render(a.jsx(mo.StrictMode,{children:a.jsx(ng,{})}));