projax 3.3.39 → 3.3.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/database.d.ts +12 -1
- package/dist/api/database.d.ts.map +1 -1
- package/dist/api/database.js +139 -1
- package/dist/api/database.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/routes/backup.d.ts +3 -0
- package/dist/api/routes/backup.d.ts.map +1 -0
- package/dist/api/routes/backup.js +51 -0
- package/dist/api/routes/backup.js.map +1 -0
- package/dist/api/routes/index.d.ts.map +1 -1
- package/dist/api/routes/index.js +4 -0
- package/dist/api/routes/index.js.map +1 -1
- package/dist/api/routes/mcp.d.ts +3 -0
- package/dist/api/routes/mcp.d.ts.map +1 -0
- package/dist/api/routes/mcp.js +147 -0
- package/dist/api/routes/mcp.js.map +1 -0
- package/dist/api/routes/projects.d.ts.map +1 -1
- package/dist/api/routes/projects.js +20 -0
- package/dist/api/routes/projects.js.map +1 -1
- package/dist/api/routes/settings.d.ts.map +1 -1
- package/dist/api/routes/settings.js +64 -11
- package/dist/api/routes/settings.js.map +1 -1
- package/dist/api/routes/workspaces.d.ts +3 -0
- package/dist/api/routes/workspaces.d.ts.map +1 -0
- package/dist/api/routes/workspaces.js +429 -0
- package/dist/api/routes/workspaces.js.map +1 -0
- package/dist/api/types.d.ts +26 -0
- package/dist/api/types.d.ts.map +1 -1
- package/dist/core/backup-utils.d.ts +17 -0
- package/dist/core/backup-utils.js +166 -0
- package/dist/core/database.d.ts +1 -0
- package/dist/core/git-utils.d.ts +12 -0
- package/dist/core/git-utils.js +96 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +3 -0
- package/dist/core/workspace-utils.d.ts +37 -0
- package/dist/core/workspace-utils.js +152 -0
- package/dist/electron/core/backup-utils.d.ts +17 -0
- package/dist/electron/core/backup-utils.js +166 -0
- package/dist/electron/core/database.d.ts +1 -0
- package/dist/electron/core/git-utils.d.ts +12 -0
- package/dist/electron/core/git-utils.js +96 -0
- package/dist/electron/core/index.d.ts +3 -0
- package/dist/electron/core/index.js +3 -0
- package/dist/electron/core/workspace-utils.d.ts +37 -0
- package/dist/electron/core/workspace-utils.js +152 -0
- package/dist/electron/main.js +324 -9
- package/dist/electron/preload.d.ts +14 -0
- package/dist/electron/preload.js +9 -0
- package/dist/electron/renderer/assets/index-B-etDnj2.js +64 -0
- package/dist/electron/renderer/assets/index-Bx18Cyic.js +64 -0
- package/dist/electron/renderer/assets/index-C8f5yNYe.js +64 -0
- package/dist/electron/renderer/assets/index-CIZ3Wl6c.css +1 -0
- package/dist/electron/renderer/assets/index-CJbsU9y8.css +1 -0
- package/dist/electron/renderer/assets/index-CWxXs5M7.css +1 -0
- package/dist/electron/renderer/assets/index-CopVNRnR.js +64 -0
- package/dist/electron/renderer/assets/index-CtXtIMer.js +64 -0
- package/dist/electron/renderer/assets/index-DUvcepWm.js +64 -0
- package/dist/electron/renderer/assets/index-DWe2TQFv.css +1 -0
- package/dist/electron/renderer/assets/index-DZzB20Xf.css +1 -0
- package/dist/electron/renderer/assets/index-DknLdADV.js +63 -0
- package/dist/electron/renderer/assets/index-DocuD8Lk.js +64 -0
- package/dist/electron/renderer/assets/index-DyU-xfd8.css +1 -0
- package/dist/electron/renderer/assets/index-GwC-JVUy.css +1 -0
- package/dist/electron/renderer/assets/index-fehviker.js +63 -0
- package/dist/electron/renderer/index.html +2 -2
- package/dist/index.js +281 -4
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
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 ku(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zd(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 ju={exports:{}},lo={},Nu={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 Xr=Symbol.for("react.element"),qd=Symbol.for("react.portal"),ef=Symbol.for("react.fragment"),tf=Symbol.for("react.strict_mode"),nf=Symbol.for("react.profiler"),rf=Symbol.for("react.provider"),sf=Symbol.for("react.context"),of=Symbol.for("react.forward_ref"),lf=Symbol.for("react.suspense"),af=Symbol.for("react.memo"),uf=Symbol.for("react.lazy"),sa=Symbol.iterator;function cf(e){return e===null||typeof e!="object"?null:(e=sa&&e[sa]||e["@@iterator"],typeof e=="function"?e:null)}var Pu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Eu=Object.assign,Cu={};function nr(e,t,n){this.props=e,this.context=t,this.refs=Cu,this.updater=n||Pu}nr.prototype.isReactComponent={};nr.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")};nr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _u(){}_u.prototype=nr.prototype;function nl(e,t,n){this.props=e,this.context=t,this.refs=Cu,this.updater=n||Pu}var rl=nl.prototype=new _u;rl.constructor=nl;Eu(rl,nr.prototype);rl.isPureReactComponent=!0;var oa=Array.isArray,zu=Object.prototype.hasOwnProperty,sl={current:null},Tu={key:!0,ref:!0,__self:!0,__source:!0};function Ru(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)zu.call(t,r)&&!Tu.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var a=Array(l),c=0;c<l;c++)a[c]=arguments[c+2];s.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:Xr,type:e,key:o,ref:i,props:s,_owner:sl.current}}function df(e,t){return{$$typeof:Xr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ol(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xr}function ff(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ia=/\/+/g;function Do(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ff(""+e.key):t.toString(36)}function Ns(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 Xr:case qd:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+Do(i,0):r,oa(s)?(n="",e!=null&&(n=e.replace(ia,"$&/")+"/"),Ns(s,t,n,"",function(c){return c})):s!=null&&(ol(s)&&(s=df(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(ia,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",oa(e))for(var l=0;l<e.length;l++){o=e[l];var a=r+Do(o,l);i+=Ns(o,t,n,a,s)}else if(a=cf(e),typeof a=="function")for(e=a.call(e),l=0;!(o=e.next()).done;)o=o.value,a=r+Do(o,l++),i+=Ns(o,t,n,a,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 ns(e,t,n){if(e==null)return e;var r=[],s=0;return Ns(e,r,"","",function(o){return t.call(n,o,s++)}),r}function pf(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},Ps={transition:null},hf={ReactCurrentDispatcher:We,ReactCurrentBatchConfig:Ps,ReactCurrentOwner:sl};function Du(){throw Error("act(...) is not supported in production builds of React.")}H.Children={map:ns,forEach:function(e,t,n){ns(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ns(e,function(){t++}),t},toArray:function(e){return ns(e,function(t){return t})||[]},only:function(e){if(!ol(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};H.Component=nr;H.Fragment=ef;H.Profiler=nf;H.PureComponent=nl;H.StrictMode=tf;H.Suspense=lf;H.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hf;H.act=Du;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=Eu({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=sl.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)zu.call(t,a)&&!Tu.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var c=0;c<a;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:Xr,type:e.type,key:s,ref:o,props:r,_owner:i}};H.createContext=function(e){return e={$$typeof:sf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:rf,_context:e},e.Consumer=e};H.createElement=Ru;H.createFactory=function(e){var t=Ru.bind(null,e);return t.type=e,t};H.createRef=function(){return{current:null}};H.forwardRef=function(e){return{$$typeof:of,render:e}};H.isValidElement=ol;H.lazy=function(e){return{$$typeof:uf,_payload:{_status:-1,_result:e},_init:pf}};H.memo=function(e,t){return{$$typeof:af,type:e,compare:t===void 0?null:t}};H.startTransition=function(e){var t=Ps.transition;Ps.transition={};try{e()}finally{Ps.transition=t}};H.unstable_act=Du;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";Nu.exports=H;var j=Nu.exports;const ao=ku(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 mf=j,gf=Symbol.for("react.element"),vf=Symbol.for("react.fragment"),yf=Object.prototype.hasOwnProperty,wf=mf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Sf={key:!0,ref:!0,__self:!0,__source:!0};function Ou(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)yf.call(t,r)&&!Sf.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:gf,type:e,key:o,ref:i,props:s,_owner:wf.current}}lo.Fragment=vf;lo.jsx=Ou;lo.jsxs=Ou;ju.exports=lo;var u=ju.exports,ai={},Mu={exports:{}},et={},Lu={exports:{}},Au={};/**
|
|
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(z,A){var L=z.length;z.push(A);e:for(;0<L;){var G=L-1>>>1,b=z[G];if(0<s(b,A))z[G]=A,z[L]=b,L=G;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var A=z[0],L=z.pop();if(L!==A){z[0]=L;e:for(var G=0,b=z.length,Ee=b>>>1;G<Ee;){var nt=2*(G+1)-1,rt=z[nt],T=nt+1,V=z[T];if(0>s(rt,L))T<b&&0>s(V,rt)?(z[G]=V,z[T]=L,G=T):(z[G]=rt,z[nt]=L,G=nt);else if(T<b&&0>s(V,L))z[G]=V,z[T]=L,G=T;else break e}}return A}function s(z,A){var L=z.sortIndex-A.sortIndex;return L!==0?L:z.id-A.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 a=[],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(z){for(var A=n(c);A!==null;){if(A.callback===null)r(c);else if(A.startTime<=z)r(c),A.sortIndex=A.expirationTime,t(a,A);else break;A=n(c)}}function v(z){if(y=!1,f(z),!S)if(n(a)!==null)S=!0,ee(x);else{var A=n(c);A!==null&&fe(v,A.startTime-z)}}function x(z,A){S=!1,y&&(y=!1,p(E),E=-1),w=!0;var L=g;try{for(f(A),m=n(a);m!==null&&(!(m.expirationTime>A)||z&&!B());){var G=m.callback;if(typeof G=="function"){m.callback=null,g=m.priorityLevel;var b=G(m.expirationTime<=A);A=e.unstable_now(),typeof b=="function"?m.callback=b:m===n(a)&&r(a),f(A)}else r(a);m=n(a)}if(m!==null)var Ee=!0;else{var nt=n(c);nt!==null&&fe(v,nt.startTime-A),Ee=!1}return Ee}finally{m=null,g=L,w=!1}}var P=!1,k=null,E=-1,U=5,M=-1;function B(){return!(e.unstable_now()-M<U)}function X(){if(k!==null){var z=e.unstable_now();M=z;var A=!0;try{A=k(!0,z)}finally{A?q():(P=!1,k=null)}}else P=!1}var q;if(typeof d=="function")q=function(){d(X)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,K=se.port2;se.port1.onmessage=X,q=function(){K.postMessage(null)}}else q=function(){_(X,0)};function ee(z){k=z,P||(P=!0,q())}function fe(z,A){E=_(function(){z(e.unstable_now())},A)}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(z){z.callback=null},e.unstable_continueExecution=function(){S||w||(S=!0,ee(x))},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var A=3;break;default:A=g}var L=g;g=A;try{return z()}finally{g=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(z,A){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var L=g;g=z;try{return A()}finally{g=L}},e.unstable_scheduleCallback=function(z,A,L){var G=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?G+L:G):L=G,z){case 1:var b=-1;break;case 2:b=250;break;case 5:b=1073741823;break;case 4:b=1e4;break;default:b=5e3}return b=L+b,z={id:h++,callback:A,priorityLevel:z,startTime:L,expirationTime:b,sortIndex:-1},L>G?(z.sortIndex=L,t(c,z),n(a)===null&&z===n(c)&&(y?(p(E),E=-1):y=!0,fe(v,L-G))):(z.sortIndex=b,t(a,z),S||w||(S=!0,ee(x))),z},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(z){var A=g;return function(){var L=g;g=A;try{return z.apply(this,arguments)}finally{g=L}}}})(Au);Lu.exports=Au;var xf=Lu.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 kf=j,qe=xf;function C(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 Iu=new Set,zr={};function jn(e,t){Kn(e,t),Kn(e+"Capture",t)}function Kn(e,t){for(zr[e]=t,e=0;e<t.length;e++)Iu.add(t[e])}var Lt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ui=Object.prototype.hasOwnProperty,jf=/^[: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]*$/,la={},aa={};function Nf(e){return ui.call(aa,e)?!0:ui.call(la,e)?!1:jf.test(e)?aa[e]=!0:(la[e]=!0,!1)}function Pf(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 Ef(e,t,n,r){if(t===null||typeof t>"u"||Pf(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 Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[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];Pe[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[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){Pe[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var il=/[\-:]([a-z])/g;function ll(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(il,ll);Pe[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(il,ll);Pe[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(il,ll);Pe[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function al(e,t,n,r){var s=Pe.hasOwnProperty(t)?Pe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Ef(t,n,s,r)&&(n=null),r||s===null?Nf(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 Wt=kf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,rs=Symbol.for("react.element"),Tn=Symbol.for("react.portal"),Rn=Symbol.for("react.fragment"),ul=Symbol.for("react.strict_mode"),ci=Symbol.for("react.profiler"),Fu=Symbol.for("react.provider"),Wu=Symbol.for("react.context"),cl=Symbol.for("react.forward_ref"),di=Symbol.for("react.suspense"),fi=Symbol.for("react.suspense_list"),dl=Symbol.for("react.memo"),Ht=Symbol.for("react.lazy"),Uu=Symbol.for("react.offscreen"),ua=Symbol.iterator;function or(e){return e===null||typeof e!="object"?null:(e=ua&&e[ua]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Object.assign,Oo;function gr(e){if(Oo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Oo=t&&t[1]||""}return`
|
|
34
|
+
`+Oo+e}var Mo=!1;function Lo(e,t){if(!e||Mo)return"";Mo=!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 a=`
|
|
37
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=i&&0<=l);break}}}finally{Mo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gr(e):""}function Cf(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=Lo(e.type,!1),e;case 11:return e=Lo(e.type.render,!1),e;case 1:return e=Lo(e.type,!0),e;default:return""}}function pi(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 Rn:return"Fragment";case Tn:return"Portal";case ci:return"Profiler";case ul:return"StrictMode";case di:return"Suspense";case fi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wu:return(e.displayName||"Context")+".Consumer";case Fu:return(e._context.displayName||"Context")+".Provider";case cl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dl:return t=e.displayName||null,t!==null?t:pi(e.type)||"Memo";case Ht:t=e._payload,e=e._init;try{return pi(e(t))}catch{}}return null}function _f(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 pi(t);case 8:return t===ul?"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 sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zf(e){var t=Bu(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 ss(e){e._valueTracker||(e._valueTracker=zf(e))}function $u(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Bu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Is(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 hi(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ca(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=sn(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 bu(e,t){t=t.checked,t!=null&&al(e,"checked",t,!1)}function mi(e,t){bu(e,t);var n=sn(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")?gi(e,t.type,n):t.hasOwnProperty("defaultValue")&&gi(e,t.type,sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function da(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 gi(e,t,n){(t!=="number"||Is(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vr=Array.isArray;function bn(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=""+sn(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 vi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(C(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function fa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(C(92));if(vr(n)){if(1<n.length)throw Error(C(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:sn(n)}}function Hu(e,t){var n=sn(t.value),r=sn(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 pa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Vu(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 yi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Vu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var os,Xu=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(os=os||document.createElement("div"),os.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=os.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Tr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sr={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},Tf=["Webkit","ms","Moz","O"];Object.keys(Sr).forEach(function(e){Tf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sr[t]=Sr[e]})});function Qu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Sr.hasOwnProperty(e)&&Sr[e]?(""+t).trim():t+"px"}function Yu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Qu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Rf=ae({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 wi(e,t){if(t){if(Rf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function Si(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 xi=null;function fl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ki=null,Hn=null,Vn=null;function ha(e){if(e=Kr(e)){if(typeof ki!="function")throw Error(C(280));var t=e.stateNode;t&&(t=ho(t),ki(e.stateNode,e.type,t))}}function Ku(e){Hn?Vn?Vn.push(e):Vn=[e]:Hn=e}function Gu(){if(Hn){var e=Hn,t=Vn;if(Vn=Hn=null,ha(e),t)for(e=0;e<t.length;e++)ha(t[e])}}function Ju(e,t){return e(t)}function Zu(){}var Ao=!1;function qu(e,t,n){if(Ao)return e(t,n);Ao=!0;try{return Ju(e,t,n)}finally{Ao=!1,(Hn!==null||Vn!==null)&&(Zu(),Gu())}}function Rr(e,t){var n=e.stateNode;if(n===null)return null;var r=ho(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(C(231,t,typeof n));return n}var ji=!1;if(Lt)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){ji=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{ji=!1}function Df(e,t,n,r,s,o,i,l,a){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(h){this.onError(h)}}var xr=!1,Fs=null,Ws=!1,Ni=null,Of={onError:function(e){xr=!0,Fs=e}};function Mf(e,t,n,r,s,o,i,l,a){xr=!1,Fs=null,Df.apply(Of,arguments)}function Lf(e,t,n,r,s,o,i,l,a){if(Mf.apply(this,arguments),xr){if(xr){var c=Fs;xr=!1,Fs=null}else throw Error(C(198));Ws||(Ws=!0,Ni=c)}}function Nn(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 ec(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ma(e){if(Nn(e)!==e)throw Error(C(188))}function Af(e){var t=e.alternate;if(!t){if(t=Nn(e),t===null)throw Error(C(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 ma(s),e;if(o===r)return ma(s),t;o=o.sibling}throw Error(C(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(C(189))}}if(n.alternate!==r)throw Error(C(190))}if(n.tag!==3)throw Error(C(188));return n.stateNode.current===n?e:t}function tc(e){return e=Af(e),e!==null?nc(e):null}function nc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=nc(e);if(t!==null)return t;e=e.sibling}return null}var rc=qe.unstable_scheduleCallback,ga=qe.unstable_cancelCallback,If=qe.unstable_shouldYield,Ff=qe.unstable_requestPaint,de=qe.unstable_now,Wf=qe.unstable_getCurrentPriorityLevel,pl=qe.unstable_ImmediatePriority,sc=qe.unstable_UserBlockingPriority,Us=qe.unstable_NormalPriority,Uf=qe.unstable_LowPriority,oc=qe.unstable_IdlePriority,uo=null,Et=null;function Bf(e){if(Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(uo,e,void 0,(e.current.flags&128)===128)}catch{}}var vt=Math.clz32?Math.clz32:Hf,$f=Math.log,bf=Math.LN2;function Hf(e){return e>>>=0,e===0?32:31-($f(e)/bf|0)|0}var is=64,ls=4194304;function yr(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 Bs(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=yr(l):(o&=i,o!==0&&(r=yr(o)))}else i=n&~s,i!==0?r=yr(i):o!==0&&(r=yr(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-vt(t),s=1<<n,r|=e[n],t&=~s;return r}function Vf(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 Xf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-vt(o),l=1<<i,a=s[i];a===-1?(!(l&n)||l&r)&&(s[i]=Vf(l,t)):a<=t&&(e.expiredLanes|=l),o&=~l}}function Pi(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ic(){var e=is;return is<<=1,!(is&4194240)&&(is=64),e}function Io(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function Qf(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-vt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function hl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Z=0;function lc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var ac,ml,uc,cc,dc,Ei=!1,as=[],Gt=null,Jt=null,Zt=null,Dr=new Map,Or=new Map,Xt=[],Yf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function va(e,t){switch(e){case"focusin":case"focusout":Gt=null;break;case"dragenter":case"dragleave":Jt=null;break;case"mouseover":case"mouseout":Zt=null;break;case"pointerover":case"pointerout":Dr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Or.delete(t.pointerId)}}function lr(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=Kr(t),t!==null&&ml(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Kf(e,t,n,r,s){switch(t){case"focusin":return Gt=lr(Gt,e,t,n,r,s),!0;case"dragenter":return Jt=lr(Jt,e,t,n,r,s),!0;case"mouseover":return Zt=lr(Zt,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return Dr.set(o,lr(Dr.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Or.set(o,lr(Or.get(o)||null,e,t,n,r,s)),!0}return!1}function fc(e){var t=pn(e.target);if(t!==null){var n=Nn(t);if(n!==null){if(t=n.tag,t===13){if(t=ec(n),t!==null){e.blockedOn=t,dc(e.priority,function(){uc(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 Es(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ci(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);xi=r,n.target.dispatchEvent(r),xi=null}else return t=Kr(n),t!==null&&ml(t),e.blockedOn=n,!1;t.shift()}return!0}function ya(e,t,n){Es(e)&&n.delete(t)}function Gf(){Ei=!1,Gt!==null&&Es(Gt)&&(Gt=null),Jt!==null&&Es(Jt)&&(Jt=null),Zt!==null&&Es(Zt)&&(Zt=null),Dr.forEach(ya),Or.forEach(ya)}function ar(e,t){e.blockedOn===t&&(e.blockedOn=null,Ei||(Ei=!0,qe.unstable_scheduleCallback(qe.unstable_NormalPriority,Gf)))}function Mr(e){function t(s){return ar(s,e)}if(0<as.length){ar(as[0],e);for(var n=1;n<as.length;n++){var r=as[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gt!==null&&ar(Gt,e),Jt!==null&&ar(Jt,e),Zt!==null&&ar(Zt,e),Dr.forEach(t),Or.forEach(t),n=0;n<Xt.length;n++)r=Xt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xt.length&&(n=Xt[0],n.blockedOn===null);)fc(n),n.blockedOn===null&&Xt.shift()}var Xn=Wt.ReactCurrentBatchConfig,$s=!0;function Jf(e,t,n,r){var s=Z,o=Xn.transition;Xn.transition=null;try{Z=1,gl(e,t,n,r)}finally{Z=s,Xn.transition=o}}function Zf(e,t,n,r){var s=Z,o=Xn.transition;Xn.transition=null;try{Z=4,gl(e,t,n,r)}finally{Z=s,Xn.transition=o}}function gl(e,t,n,r){if($s){var s=Ci(e,t,n,r);if(s===null)Qo(e,t,r,bs,n),va(e,r);else if(Kf(s,e,t,n,r))r.stopPropagation();else if(va(e,r),t&4&&-1<Yf.indexOf(e)){for(;s!==null;){var o=Kr(s);if(o!==null&&ac(o),o=Ci(e,t,n,r),o===null&&Qo(e,t,r,bs,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Qo(e,t,r,null,n)}}var bs=null;function Ci(e,t,n,r){if(bs=null,e=fl(r),e=pn(e),e!==null)if(t=Nn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ec(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 bs=e,null}function pc(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(Wf()){case pl:return 1;case sc:return 4;case Us:case Uf:return 16;case oc:return 536870912;default:return 16}default:return 16}}var Yt=null,vl=null,Cs=null;function hc(){if(Cs)return Cs;var e,t=vl,n=t.length,r,s="value"in Yt?Yt.value:Yt.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 Cs=s.slice(e,1<r?1-r:void 0)}function _s(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 us(){return!0}function wa(){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)?us:wa,this.isPropagationStopped=wa,this}return ae(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=us)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),t}var rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yl=tt(rr),Yr=ae({},rr,{view:0,detail:0}),qf=tt(Yr),Fo,Wo,ur,co=ae({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wl,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!==ur&&(ur&&e.type==="mousemove"?(Fo=e.screenX-ur.screenX,Wo=e.screenY-ur.screenY):Wo=Fo=0,ur=e),Fo)},movementY:function(e){return"movementY"in e?e.movementY:Wo}}),Sa=tt(co),ep=ae({},co,{dataTransfer:0}),tp=tt(ep),np=ae({},Yr,{relatedTarget:0}),Uo=tt(np),rp=ae({},rr,{animationName:0,elapsedTime:0,pseudoElement:0}),sp=tt(rp),op=ae({},rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ip=tt(op),lp=ae({},rr,{data:0}),xa=tt(lp),ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},up={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"},cp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function dp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cp[e])?!!t[e]:!1}function wl(){return dp}var fp=ae({},Yr,{key:function(e){if(e.key){var t=ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_s(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?up[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wl,charCode:function(e){return e.type==="keypress"?_s(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_s(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),pp=tt(fp),hp=ae({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ka=tt(hp),mp=ae({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wl}),gp=tt(mp),vp=ae({},rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),yp=tt(vp),wp=ae({},co,{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}),Sp=tt(wp),xp=[9,13,27,32],Sl=Lt&&"CompositionEvent"in window,kr=null;Lt&&"documentMode"in document&&(kr=document.documentMode);var kp=Lt&&"TextEvent"in window&&!kr,mc=Lt&&(!Sl||kr&&8<kr&&11>=kr),ja=" ",Na=!1;function gc(e,t){switch(e){case"keyup":return xp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function jp(e,t){switch(e){case"compositionend":return vc(t);case"keypress":return t.which!==32?null:(Na=!0,ja);case"textInput":return e=t.data,e===ja&&Na?null:e;default:return null}}function Np(e,t){if(Dn)return e==="compositionend"||!Sl&&gc(e,t)?(e=hc(),Cs=vl=Yt=null,Dn=!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 mc&&t.locale!=="ko"?null:t.data;default:return null}}var Pp={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 Pa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Pp[e.type]:t==="textarea"}function yc(e,t,n,r){Ku(r),t=Hs(t,"onChange"),0<t.length&&(n=new yl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var jr=null,Lr=null;function Ep(e){zc(e,0)}function fo(e){var t=Ln(e);if($u(t))return e}function Cp(e,t){if(e==="change")return t}var wc=!1;if(Lt){var Bo;if(Lt){var $o="oninput"in document;if(!$o){var Ea=document.createElement("div");Ea.setAttribute("oninput","return;"),$o=typeof Ea.oninput=="function"}Bo=$o}else Bo=!1;wc=Bo&&(!document.documentMode||9<document.documentMode)}function Ca(){jr&&(jr.detachEvent("onpropertychange",Sc),Lr=jr=null)}function Sc(e){if(e.propertyName==="value"&&fo(Lr)){var t=[];yc(t,Lr,e,fl(e)),qu(Ep,t)}}function _p(e,t,n){e==="focusin"?(Ca(),jr=t,Lr=n,jr.attachEvent("onpropertychange",Sc)):e==="focusout"&&Ca()}function zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(Lr)}function Tp(e,t){if(e==="click")return fo(t)}function Rp(e,t){if(e==="input"||e==="change")return fo(t)}function Dp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:Dp;function Ar(e,t){if(wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!ui.call(t,s)||!wt(e[s],t[s]))return!1}return!0}function _a(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function za(e,t){var n=_a(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=_a(n)}}function xc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kc(){for(var e=window,t=Is();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Is(e.document)}return t}function xl(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 Op(e){var t=kc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&xc(n.ownerDocument.documentElement,n)){if(r!==null&&xl(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=za(n,o);var i=za(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 Mp=Lt&&"documentMode"in document&&11>=document.documentMode,On=null,_i=null,Nr=null,zi=!1;function Ta(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zi||On==null||On!==Is(r)||(r=On,"selectionStart"in r&&xl(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}),Nr&&Ar(Nr,r)||(Nr=r,r=Hs(_i,"onSelect"),0<r.length&&(t=new yl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=On)))}function cs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Mn={animationend:cs("Animation","AnimationEnd"),animationiteration:cs("Animation","AnimationIteration"),animationstart:cs("Animation","AnimationStart"),transitionend:cs("Transition","TransitionEnd")},bo={},jc={};Lt&&(jc=document.createElement("div").style,"AnimationEvent"in window||(delete Mn.animationend.animation,delete Mn.animationiteration.animation,delete Mn.animationstart.animation),"TransitionEvent"in window||delete Mn.transitionend.transition);function po(e){if(bo[e])return bo[e];if(!Mn[e])return e;var t=Mn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jc)return bo[e]=t[n];return e}var Nc=po("animationend"),Pc=po("animationiteration"),Ec=po("animationstart"),Cc=po("transitionend"),_c=new Map,Ra="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 ln(e,t){_c.set(e,t),jn(t,[e])}for(var Ho=0;Ho<Ra.length;Ho++){var Vo=Ra[Ho],Lp=Vo.toLowerCase(),Ap=Vo[0].toUpperCase()+Vo.slice(1);ln(Lp,"on"+Ap)}ln(Nc,"onAnimationEnd");ln(Pc,"onAnimationIteration");ln(Ec,"onAnimationStart");ln("dblclick","onDoubleClick");ln("focusin","onFocus");ln("focusout","onBlur");ln(Cc,"onTransitionEnd");Kn("onMouseEnter",["mouseout","mouseover"]);Kn("onMouseLeave",["mouseout","mouseover"]);Kn("onPointerEnter",["pointerout","pointerover"]);Kn("onPointerLeave",["pointerout","pointerover"]);jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));jn("onBeforeInput",["compositionend","keypress","textInput","paste"]);jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wr="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(" "),Ip=new Set("cancel close invalid load scroll toggle".split(" ").concat(wr));function Da(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Lf(r,t,void 0,e),e.currentTarget=null}function zc(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],a=l.instance,c=l.currentTarget;if(l=l.listener,a!==o&&s.isPropagationStopped())break e;Da(s,l,c),o=a}else for(i=0;i<r.length;i++){if(l=r[i],a=l.instance,c=l.currentTarget,l=l.listener,a!==o&&s.isPropagationStopped())break e;Da(s,l,c),o=a}}}if(Ws)throw e=Ni,Ws=!1,Ni=null,e}function ne(e,t){var n=t[Mi];n===void 0&&(n=t[Mi]=new Set);var r=e+"__bubble";n.has(r)||(Tc(t,e,2,!1),n.add(r))}function Xo(e,t,n){var r=0;t&&(r|=4),Tc(n,e,r,t)}var ds="_reactListening"+Math.random().toString(36).slice(2);function Ir(e){if(!e[ds]){e[ds]=!0,Iu.forEach(function(n){n!=="selectionchange"&&(Ip.has(n)||Xo(n,!1,e),Xo(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ds]||(t[ds]=!0,Xo("selectionchange",!1,t))}}function Tc(e,t,n,r){switch(pc(t)){case 1:var s=Jf;break;case 4:s=Zf;break;default:s=gl}n=s.bind(null,t,n,e),s=void 0,!ji||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 Qo(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 a=i.tag;if((a===3||a===4)&&(a=i.stateNode.containerInfo,a===s||a.nodeType===8&&a.parentNode===s))return;i=i.return}for(;l!==null;){if(i=pn(l),i===null)return;if(a=i.tag,a===5||a===6){r=o=i;continue e}l=l.parentNode}}r=r.return}qu(function(){var c=o,h=fl(n),m=[];e:{var g=_c.get(e);if(g!==void 0){var w=yl,S=e;switch(e){case"keypress":if(_s(n)===0)break e;case"keydown":case"keyup":w=pp;break;case"focusin":S="focus",w=Uo;break;case"focusout":S="blur",w=Uo;break;case"beforeblur":case"afterblur":w=Uo;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=Sa;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=tp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=gp;break;case Nc:case Pc:case Ec:w=sp;break;case Cc:w=yp;break;case"scroll":w=qf;break;case"wheel":w=Sp;break;case"copy":case"cut":case"paste":w=ip;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=ka}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=Rr(d,p),v!=null&&y.push(Fr(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!==xi&&(S=n.relatedTarget||n.fromElement)&&(pn(S)||S[At]))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?pn(S):null,S!==null&&(_=Nn(S),S!==_||S.tag!==5&&S.tag!==6)&&(S=null)):(w=null,S=c),w!==S)){if(y=Sa,v="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(y=ka,v="onPointerLeave",p="onPointerEnter",d="pointer"),_=w==null?g:Ln(w),f=S==null?g:Ln(S),g=new y(v,d+"leave",w,n,h),g.target=_,g.relatedTarget=f,v=null,pn(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=Cn(f))d++;for(f=0,v=p;v;v=Cn(v))f++;for(;0<d-f;)y=Cn(y),d--;for(;0<f-d;)p=Cn(p),f--;for(;d--;){if(y===p||p!==null&&y===p.alternate)break t;y=Cn(y),p=Cn(p)}y=null}else y=null;w!==null&&Oa(m,g,w,y,!1),S!==null&&_!==null&&Oa(m,_,S,y,!0)}}e:{if(g=c?Ln(c):window,w=g.nodeName&&g.nodeName.toLowerCase(),w==="select"||w==="input"&&g.type==="file")var x=Cp;else if(Pa(g))if(wc)x=Rp;else{x=zp;var P=_p}else(w=g.nodeName)&&w.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(x=Tp);if(x&&(x=x(e,c))){yc(m,x,n,h);break e}P&&P(e,g,c),e==="focusout"&&(P=g._wrapperState)&&P.controlled&&g.type==="number"&&gi(g,"number",g.value)}switch(P=c?Ln(c):window,e){case"focusin":(Pa(P)||P.contentEditable==="true")&&(On=P,_i=c,Nr=null);break;case"focusout":Nr=_i=On=null;break;case"mousedown":zi=!0;break;case"contextmenu":case"mouseup":case"dragend":zi=!1,Ta(m,n,h);break;case"selectionchange":if(Mp)break;case"keydown":case"keyup":Ta(m,n,h)}var k;if(Sl)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Dn?gc(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(mc&&n.locale!=="ko"&&(Dn||E!=="onCompositionStart"?E==="onCompositionEnd"&&Dn&&(k=hc()):(Yt=h,vl="value"in Yt?Yt.value:Yt.textContent,Dn=!0)),P=Hs(c,E),0<P.length&&(E=new xa(E,e,null,n,h),m.push({event:E,listeners:P}),k?E.data=k:(k=vc(n),k!==null&&(E.data=k)))),(k=kp?jp(e,n):Np(e,n))&&(c=Hs(c,"onBeforeInput"),0<c.length&&(h=new xa("onBeforeInput","beforeinput",null,n,h),m.push({event:h,listeners:c}),h.data=k))}zc(m,t)})}function Fr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hs(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Rr(e,n),o!=null&&r.unshift(Fr(e,o,s)),o=Rr(e,t),o!=null&&r.push(Fr(e,o,s))),e=e.return}return r}function Cn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Oa(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var l=n,a=l.alternate,c=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&c!==null&&(l=c,s?(a=Rr(n,o),a!=null&&i.unshift(Fr(n,a,l))):s||(a=Rr(n,o),a!=null&&i.push(Fr(n,a,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var Fp=/\r\n?/g,Wp=/\u0000|\uFFFD/g;function Ma(e){return(typeof e=="string"?e:""+e).replace(Fp,`
|
|
38
|
+
`).replace(Wp,"")}function fs(e,t,n){if(t=Ma(t),Ma(e)!==t&&n)throw Error(C(425))}function Vs(){}var Ti=null,Ri=null;function Di(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 Oi=typeof setTimeout=="function"?setTimeout:void 0,Up=typeof clearTimeout=="function"?clearTimeout:void 0,La=typeof Promise=="function"?Promise:void 0,Bp=typeof queueMicrotask=="function"?queueMicrotask:typeof La<"u"?function(e){return La.resolve(null).then(e).catch($p)}:Oi;function $p(e){setTimeout(function(){throw e})}function Yo(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),Mr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Mr(t)}function qt(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 Aa(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 sr=Math.random().toString(36).slice(2),Pt="__reactFiber$"+sr,Wr="__reactProps$"+sr,At="__reactContainer$"+sr,Mi="__reactEvents$"+sr,bp="__reactListeners$"+sr,Hp="__reactHandles$"+sr;function pn(e){var t=e[Pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[At]||n[Pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Aa(e);e!==null;){if(n=e[Pt])return n;e=Aa(e)}return t}e=n,n=e.parentNode}return null}function Kr(e){return e=e[Pt]||e[At],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ln(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(C(33))}function ho(e){return e[Wr]||null}var Li=[],An=-1;function an(e){return{current:e}}function re(e){0>An||(e.current=Li[An],Li[An]=null,An--)}function te(e,t){An++,Li[An]=e.current,e.current=t}var on={},De=an(on),Ve=an(!1),yn=on;function Gn(e,t){var n=e.type.contextTypes;if(!n)return on;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 Xs(){re(Ve),re(De)}function Ia(e,t,n){if(De.current!==on)throw Error(C(168));te(De,t),te(Ve,n)}function Rc(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(C(108,_f(e)||"Unknown",s));return ae({},n,r)}function Qs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||on,yn=De.current,te(De,e),te(Ve,Ve.current),!0}function Fa(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Rc(e,t,yn),r.__reactInternalMemoizedMergedChildContext=e,re(Ve),re(De),te(De,e)):re(Ve),te(Ve,n)}var Rt=null,mo=!1,Ko=!1;function Dc(e){Rt===null?Rt=[e]:Rt.push(e)}function Vp(e){mo=!0,Dc(e)}function un(){if(!Ko&&Rt!==null){Ko=!0;var e=0,t=Z;try{var n=Rt;for(Z=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Rt=null,mo=!1}catch(s){throw Rt!==null&&(Rt=Rt.slice(e+1)),rc(pl,un),s}finally{Z=t,Ko=!1}}return null}var In=[],Fn=0,Ys=null,Ks=0,ot=[],it=0,wn=null,Dt=1,Ot="";function dn(e,t){In[Fn++]=Ks,In[Fn++]=Ys,Ys=e,Ks=t}function Oc(e,t,n){ot[it++]=Dt,ot[it++]=Ot,ot[it++]=wn,wn=e;var r=Dt;e=Ot;var s=32-vt(r)-1;r&=~(1<<s),n+=1;var o=32-vt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,Dt=1<<32-vt(t)+s|n<<s|r,Ot=o+e}else Dt=1<<o|n<<s|r,Ot=e}function kl(e){e.return!==null&&(dn(e,1),Oc(e,1,0))}function jl(e){for(;e===Ys;)Ys=In[--Fn],In[Fn]=null,Ks=In[--Fn],In[Fn]=null;for(;e===wn;)wn=ot[--it],ot[it]=null,Ot=ot[--it],ot[it]=null,Dt=ot[--it],ot[it]=null}var Je=null,Ge=null,oe=!1,gt=null;function Mc(e,t){var n=lt(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 Wa(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=qt(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=wn!==null?{id:Dt,overflow:Ot}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=lt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Je=e,Ge=null,!0):!1;default:return!1}}function Ai(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ii(e){if(oe){var t=Ge;if(t){var n=t;if(!Wa(e,t)){if(Ai(e))throw Error(C(418));t=qt(n.nextSibling);var r=Je;t&&Wa(e,t)?Mc(r,n):(e.flags=e.flags&-4097|2,oe=!1,Je=e)}}else{if(Ai(e))throw Error(C(418));e.flags=e.flags&-4097|2,oe=!1,Je=e}}}function Ua(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Je=e}function ps(e){if(e!==Je)return!1;if(!oe)return Ua(e),oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Di(e.type,e.memoizedProps)),t&&(t=Ge)){if(Ai(e))throw Lc(),Error(C(418));for(;t;)Mc(e,t),t=qt(t.nextSibling)}if(Ua(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(C(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=qt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Je?qt(e.stateNode.nextSibling):null;return!0}function Lc(){for(var e=Ge;e;)e=qt(e.nextSibling)}function Jn(){Ge=Je=null,oe=!1}function Nl(e){gt===null?gt=[e]:gt.push(e)}var Xp=Wt.ReactCurrentBatchConfig;function cr(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(C(309));var r=n.stateNode}if(!r)throw Error(C(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(C(284));if(!n._owner)throw Error(C(290,e))}return e}function hs(e,t){throw e=Object.prototype.toString.call(t),Error(C(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ba(e){var t=e._init;return t(e._payload)}function Ac(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=rn(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=ni(f,p.mode,v),d.return=p,d):(d=s(d,f),d.return=p,d)}function a(p,d,f,v){var x=f.type;return x===Rn?h(p,d,f.props.children,v,f.key):d!==null&&(d.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Ht&&Ba(x)===d.type)?(v=s(d,f.props),v.ref=cr(p,d,f),v.return=p,v):(v=Ls(f.type,f.key,f.props,null,p.mode,v),v.ref=cr(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=ri(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=vn(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=ni(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case rs:return f=Ls(d.type,d.key,d.props,null,p.mode,f),f.ref=cr(p,null,d),f.return=p,f;case Tn:return d=ri(d,p.mode,f),d.return=p,d;case Ht:var v=d._init;return m(p,v(d._payload),f)}if(vr(d)||or(d))return d=vn(d,p.mode,f,null),d.return=p,d;hs(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 rs:return f.key===x?a(p,d,f,v):null;case Tn:return f.key===x?c(p,d,f,v):null;case Ht:return x=f._init,g(p,d,x(f._payload),v)}if(vr(f)||or(f))return x!==null?null:h(p,d,f,v,null);hs(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 rs:return p=p.get(v.key===null?f:v.key)||null,a(d,p,v,x);case Tn:return p=p.get(v.key===null?f:v.key)||null,c(d,p,v,x);case Ht:var P=v._init;return w(p,d,f,P(v._payload),x)}if(vr(v)||or(v))return p=p.get(f)||null,h(d,p,v,x,null);hs(d,v)}return null}function S(p,d,f,v){for(var x=null,P=null,k=d,E=d=0,U=null;k!==null&&E<f.length;E++){k.index>E?(U=k,k=null):U=k.sibling;var M=g(p,k,f[E],v);if(M===null){k===null&&(k=U);break}e&&k&&M.alternate===null&&t(p,k),d=o(M,d,E),P===null?x=M:P.sibling=M,P=M,k=U}if(E===f.length)return n(p,k),oe&&dn(p,E),x;if(k===null){for(;E<f.length;E++)k=m(p,f[E],v),k!==null&&(d=o(k,d,E),P===null?x=k:P.sibling=k,P=k);return oe&&dn(p,E),x}for(k=r(p,k);E<f.length;E++)U=w(k,p,E,f[E],v),U!==null&&(e&&U.alternate!==null&&k.delete(U.key===null?E:U.key),d=o(U,d,E),P===null?x=U:P.sibling=U,P=U);return e&&k.forEach(function(B){return t(p,B)}),oe&&dn(p,E),x}function y(p,d,f,v){var x=or(f);if(typeof x!="function")throw Error(C(150));if(f=x.call(f),f==null)throw Error(C(151));for(var P=x=null,k=d,E=d=0,U=null,M=f.next();k!==null&&!M.done;E++,M=f.next()){k.index>E?(U=k,k=null):U=k.sibling;var B=g(p,k,M.value,v);if(B===null){k===null&&(k=U);break}e&&k&&B.alternate===null&&t(p,k),d=o(B,d,E),P===null?x=B:P.sibling=B,P=B,k=U}if(M.done)return n(p,k),oe&&dn(p,E),x;if(k===null){for(;!M.done;E++,M=f.next())M=m(p,M.value,v),M!==null&&(d=o(M,d,E),P===null?x=M:P.sibling=M,P=M);return oe&&dn(p,E),x}for(k=r(p,k);!M.done;E++,M=f.next())M=w(k,p,E,M.value,v),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?E:M.key),d=o(M,d,E),P===null?x=M:P.sibling=M,P=M);return e&&k.forEach(function(X){return t(p,X)}),oe&&dn(p,E),x}function _(p,d,f,v){if(typeof f=="object"&&f!==null&&f.type===Rn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case rs:e:{for(var x=f.key,P=d;P!==null;){if(P.key===x){if(x=f.type,x===Rn){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===Ht&&Ba(x)===P.type){n(p,P.sibling),d=s(P,f.props),d.ref=cr(p,P,f),d.return=p,p=d;break e}n(p,P);break}else t(p,P);P=P.sibling}f.type===Rn?(d=vn(f.props.children,p.mode,v,f.key),d.return=p,p=d):(v=Ls(f.type,f.key,f.props,null,p.mode,v),v.ref=cr(p,d,f),v.return=p,p=v)}return i(p);case Tn: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=ri(f,p.mode,v),d.return=p,p=d}return i(p);case Ht:return P=f._init,_(p,d,P(f._payload),v)}if(vr(f))return S(p,d,f,v);if(or(f))return y(p,d,f,v);hs(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=ni(f,p.mode,v),d.return=p,p=d),i(p)):n(p,d)}return _}var Zn=Ac(!0),Ic=Ac(!1),Gs=an(null),Js=null,Wn=null,Pl=null;function El(){Pl=Wn=Js=null}function Cl(e){var t=Gs.current;re(Gs),e._currentValue=t}function Fi(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 Qn(e,t){Js=e,Pl=Wn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(He=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(Pl!==e)if(e={context:e,memoizedValue:t,next:null},Wn===null){if(Js===null)throw Error(C(308));Wn=e,Js.dependencies={lanes:0,firstContext:e}}else Wn=Wn.next=e;return t}var hn=null;function _l(e){hn===null?hn=[e]:hn.push(e)}function Fc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,_l(t)):(n.next=s.next,s.next=n),t.interleaved=n,It(e,r)}function It(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Vt=!1;function zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wc(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 Mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(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,It(e,n)}return s=r.interleaved,s===null?(t.next=t,_l(r)):(t.next=s.next,s.next=t),r.interleaved=t,It(e,n)}function zs(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,hl(e,n)}}function $a(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 Zs(e,t,n,r){var s=e.updateQueue;Vt=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var a=l,c=a.next;a.next=null,i===null?o=c:i.next=c,i=a;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==i&&(l===null?h.firstBaseUpdate=c:l.next=c,h.lastBaseUpdate=a))}if(o!==null){var m=s.baseState;i=0,h=c=a=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=ae({},m,g);break e;case 2:Vt=!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,a=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&&(a=m),s.baseState=a,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);xn|=i,e.lanes=i,e.memoizedState=m}}function ba(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(C(191,s));s.call(r)}}}var Gr={},Ct=an(Gr),Ur=an(Gr),Br=an(Gr);function mn(e){if(e===Gr)throw Error(C(174));return e}function Tl(e,t){switch(te(Br,t),te(Ur,e),te(Ct,Gr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yi(t,e)}re(Ct),te(Ct,t)}function qn(){re(Ct),re(Ur),re(Br)}function Uc(e){mn(Br.current);var t=mn(Ct.current),n=yi(t,e.type);t!==n&&(te(Ur,e),te(Ct,n))}function Rl(e){Ur.current===e&&(re(Ct),re(Ur))}var ie=an(0);function qs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Go=[];function Dl(){for(var e=0;e<Go.length;e++)Go[e]._workInProgressVersionPrimary=null;Go.length=0}var Ts=Wt.ReactCurrentDispatcher,Jo=Wt.ReactCurrentBatchConfig,Sn=0,le=null,ge=null,Se=null,eo=!1,Pr=!1,$r=0,Qp=0;function _e(){throw Error(C(321))}function Ol(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Ml(e,t,n,r,s,o){if(Sn=o,le=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ts.current=e===null||e.memoizedState===null?Jp:Zp,e=n(r,s),Pr){o=0;do{if(Pr=!1,$r=0,25<=o)throw Error(C(301));o+=1,Se=ge=null,t.updateQueue=null,Ts.current=qp,e=n(r,s)}while(Pr)}if(Ts.current=to,t=ge!==null&&ge.next!==null,Sn=0,Se=ge=le=null,eo=!1,t)throw Error(C(300));return e}function Ll(){var e=$r!==0;return $r=0,e}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?le.memoizedState=Se=e:Se=Se.next=e,Se}function ct(){if(ge===null){var e=le.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Se===null?le.memoizedState:Se.next;if(t!==null)Se=t,ge=e;else{if(e===null)throw Error(C(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Se===null?le.memoizedState=Se=e:Se=Se.next=e}return Se}function br(e,t){return typeof t=="function"?t(e):t}function Zo(e){var t=ct(),n=t.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=e;var r=ge,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,a=null,c=o;do{var h=c.lane;if((Sn&h)===h)a!==null&&(a=a.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};a===null?(l=a=m,i=r):a=a.next=m,le.lanes|=h,xn|=h}c=c.next}while(c!==null&&c!==o);a===null?i=r:a.next=l,wt(r,t.memoizedState)||(He=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,le.lanes|=o,xn|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function qo(e){var t=ct(),n=t.queue;if(n===null)throw Error(C(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);wt(o,t.memoizedState)||(He=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Bc(){}function $c(e,t){var n=le,r=ct(),s=t(),o=!wt(r.memoizedState,s);if(o&&(r.memoizedState=s,He=!0),r=r.queue,Al(Vc.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,Hr(9,Hc.bind(null,n,r,s,t),void 0,null),xe===null)throw Error(C(349));Sn&30||bc(n,t,s)}return s}function bc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Hc(e,t,n,r){t.value=n,t.getSnapshot=r,Xc(t)&&Qc(e)}function Vc(e,t,n){return n(function(){Xc(t)&&Qc(e)})}function Xc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wt(e,n)}catch{return!0}}function Qc(e){var t=It(e,1);t!==null&&yt(t,e,1,-1)}function Ha(e){var t=jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:br,lastRenderedState:e},t.queue=e,e=e.dispatch=Gp.bind(null,le,e),[t.memoizedState,e]}function Hr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=le.updateQueue,t===null?(t={lastEffect:null,stores:null},le.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 Yc(){return ct().memoizedState}function Rs(e,t,n,r){var s=jt();le.flags|=e,s.memoizedState=Hr(1|t,n,void 0,r===void 0?null:r)}function go(e,t,n,r){var s=ct();r=r===void 0?null:r;var o=void 0;if(ge!==null){var i=ge.memoizedState;if(o=i.destroy,r!==null&&Ol(r,i.deps)){s.memoizedState=Hr(t,n,o,r);return}}le.flags|=e,s.memoizedState=Hr(1|t,n,o,r)}function Va(e,t){return Rs(8390656,8,e,t)}function Al(e,t){return go(2048,8,e,t)}function Kc(e,t){return go(4,2,e,t)}function Gc(e,t){return go(4,4,e,t)}function Jc(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 Zc(e,t,n){return n=n!=null?n.concat([e]):null,go(4,4,Jc.bind(null,t,e),n)}function Il(){}function qc(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ol(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ed(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ol(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function td(e,t,n){return Sn&21?(wt(n,t)||(n=ic(),le.lanes|=n,xn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,He=!0),e.memoizedState=n)}function Yp(e,t){var n=Z;Z=n!==0&&4>n?n:4,e(!0);var r=Jo.transition;Jo.transition={};try{e(!1),t()}finally{Z=n,Jo.transition=r}}function nd(){return ct().memoizedState}function Kp(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rd(e))sd(t,n);else if(n=Fc(e,t,n,r),n!==null){var s=Fe();yt(n,e,r,s),od(n,t,r)}}function Gp(e,t,n){var r=nn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rd(e))sd(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,wt(l,i)){var a=t.interleaved;a===null?(s.next=s,_l(t)):(s.next=a.next,a.next=s),t.interleaved=s;return}}catch{}finally{}n=Fc(e,t,s,r),n!==null&&(s=Fe(),yt(n,e,r,s),od(n,t,r))}}function rd(e){var t=e.alternate;return e===le||t!==null&&t===le}function sd(e,t){Pr=eo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function od(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hl(e,n)}}var to={readContext:ut,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Jp={readContext:ut,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Va,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Rs(4194308,4,Jc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Rs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Rs(4,2,e,t)},useMemo:function(e,t){var n=jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jt();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=Kp.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:Ha,useDebugValue:Il,useDeferredValue:function(e){return jt().memoizedState=e},useTransition:function(){var e=Ha(!1),t=e[0];return e=Yp.bind(null,e[1]),jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,s=jt();if(oe){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),xe===null)throw Error(C(349));Sn&30||bc(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,Va(Vc.bind(null,r,o,e),[e]),r.flags|=2048,Hr(9,Hc.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=jt(),t=xe.identifierPrefix;if(oe){var n=Ot,r=Dt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$r++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Qp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Zp={readContext:ut,useCallback:qc,useContext:ut,useEffect:Al,useImperativeHandle:Zc,useInsertionEffect:Kc,useLayoutEffect:Gc,useMemo:ed,useReducer:Zo,useRef:Yc,useState:function(){return Zo(br)},useDebugValue:Il,useDeferredValue:function(e){var t=ct();return td(t,ge.memoizedState,e)},useTransition:function(){var e=Zo(br)[0],t=ct().memoizedState;return[e,t]},useMutableSource:Bc,useSyncExternalStore:$c,useId:nd,unstable_isNewReconciler:!1},qp={readContext:ut,useCallback:qc,useContext:ut,useEffect:Al,useImperativeHandle:Zc,useInsertionEffect:Kc,useLayoutEffect:Gc,useMemo:ed,useReducer:qo,useRef:Yc,useState:function(){return qo(br)},useDebugValue:Il,useDeferredValue:function(e){var t=ct();return ge===null?t.memoizedState=e:td(t,ge.memoizedState,e)},useTransition:function(){var e=qo(br)[0],t=ct().memoizedState;return[e,t]},useMutableSource:Bc,useSyncExternalStore:$c,useId:nd,unstable_isNewReconciler:!1};function ht(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Wi(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vo={isMounted:function(e){return(e=e._reactInternals)?Nn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=nn(e),o=Mt(r,s);o.payload=t,n!=null&&(o.callback=n),t=en(e,o,s),t!==null&&(yt(t,e,s,r),zs(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=nn(e),o=Mt(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=en(e,o,s),t!==null&&(yt(t,e,s,r),zs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=nn(e),s=Mt(n,r);s.tag=2,t!=null&&(s.callback=t),t=en(e,s,r),t!==null&&(yt(t,e,r,n),zs(t,e,r))}};function Xa(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?!Ar(n,r)||!Ar(s,o):!0}function id(e,t,n){var r=!1,s=on,o=t.contextType;return typeof o=="object"&&o!==null?o=ut(o):(s=Xe(t)?yn:De.current,r=t.contextTypes,o=(r=r!=null)?Gn(e,s):on),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=vo,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Qa(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&&vo.enqueueReplaceState(t,t.state,null)}function Ui(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},zl(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=ut(o):(o=Xe(t)?yn:De.current,s.context=Gn(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Wi(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&&vo.enqueueReplaceState(s,s.state,null),Zs(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function er(e,t){try{var n="",r=t;do n+=Cf(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 ei(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bi(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var eh=typeof WeakMap=="function"?WeakMap:Map;function ld(e,t,n){n=Mt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ro||(ro=!0,Ji=r),Bi(e,t)},n}function ad(e,t,n){n=Mt(-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(){Bi(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Bi(e,t),typeof r!="function"&&(tn===null?tn=new Set([this]):tn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function Ya(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new eh;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=hh.bind(null,e,t,n),t.then(e,e))}function Ka(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 Ga(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=Mt(-1,1),t.tag=2,en(n,t,1))),n.lanes|=1),e)}var th=Wt.ReactCurrentOwner,He=!1;function Ie(e,t,n,r){t.child=e===null?Ic(t,null,n,r):Zn(t,e.child,n,r)}function Ja(e,t,n,r,s){n=n.render;var o=t.ref;return Qn(t,s),r=Ml(e,t,n,r,o,s),n=Ll(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ft(e,t,s)):(oe&&n&&kl(t),t.flags|=1,Ie(e,t,r,s),t.child)}function Za(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!Vl(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,ud(e,t,o,r,s)):(e=Ls(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:Ar,n(i,r)&&e.ref===t.ref)return Ft(e,t,s)}return t.flags|=1,e=rn(o,r),e.ref=t.ref,e.return=t,t.child=e}function ud(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(Ar(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,Ft(e,t,s)}return $i(e,t,n,r,s)}function cd(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},te(Bn,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,te(Bn,Ke),Ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,te(Bn,Ke),Ke|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,te(Bn,Ke),Ke|=r;return Ie(e,t,s,n),t.child}function dd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $i(e,t,n,r,s){var o=Xe(n)?yn:De.current;return o=Gn(t,o),Qn(t,s),n=Ml(e,t,n,r,o,s),r=Ll(),e!==null&&!He?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Ft(e,t,s)):(oe&&r&&kl(t),t.flags|=1,Ie(e,t,n,s),t.child)}function qa(e,t,n,r,s){if(Xe(n)){var o=!0;Qs(t)}else o=!1;if(Qn(t,s),t.stateNode===null)Ds(e,t),id(t,n,r),Ui(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var a=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=ut(c):(c=Xe(n)?yn:De.current,c=Gn(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||a!==c)&&Qa(t,i,r,c),Vt=!1;var g=t.memoizedState;i.state=g,Zs(t,r,i,s),a=t.memoizedState,l!==r||g!==a||Ve.current||Vt?(typeof h=="function"&&(Wi(t,n,h,r),a=t.memoizedState),(l=Vt||Xa(t,n,l,r,g,a,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=a),i.props=r,i.state=a,i.context=c,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Wc(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:ht(t.type,l),i.props=c,m=t.pendingProps,g=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=ut(a):(a=Xe(n)?yn:De.current,a=Gn(t,a));var w=n.getDerivedStateFromProps;(h=typeof w=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==m||g!==a)&&Qa(t,i,r,a),Vt=!1,g=t.memoizedState,i.state=g,Zs(t,r,i,s);var S=t.memoizedState;l!==m||g!==S||Ve.current||Vt?(typeof w=="function"&&(Wi(t,n,w,r),S=t.memoizedState),(c=Vt||Xa(t,n,c,r,g,S,a)||!1)?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,S,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,S,a)),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=a,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 bi(e,t,n,r,o,s)}function bi(e,t,n,r,s,o){dd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&Fa(t,n,!1),Ft(e,t,o);r=t.stateNode,th.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Zn(t,e.child,null,o),t.child=Zn(t,null,l,o)):Ie(e,t,l,o),t.memoizedState=r.state,s&&Fa(t,n,!0),t.child}function fd(e){var t=e.stateNode;t.pendingContext?Ia(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ia(e,t.context,!1),Tl(e,t.containerInfo)}function eu(e,t,n,r,s){return Jn(),Nl(s),t.flags|=256,Ie(e,t,n,r),t.child}var Hi={dehydrated:null,treeContext:null,retryLane:0};function Vi(e){return{baseLanes:e,cachePool:null,transitions:null}}function pd(e,t,n){var r=t.pendingProps,s=ie.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),te(ie,s&1),e===null)return Ii(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=So(i,r,0,null),e=vn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Vi(n),t.memoizedState=Hi,e):Fl(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return nh(e,t,i,r,l,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,l=s.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=rn(s,a),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=rn(l,o):(o=vn(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?Vi(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Hi,r}return o=e.child,e=o.sibling,r=rn(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 Fl(e,t){return t=So({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ms(e,t,n,r){return r!==null&&Nl(r),Zn(t,e.child,null,n),e=Fl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function nh(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=ei(Error(C(422))),ms(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=So({mode:"visible",children:r.children},s,0,null),o=vn(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Zn(t,e.child,null,i),t.child.memoizedState=Vi(i),t.memoizedState=Hi,o);if(!(t.mode&1))return ms(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,o=Error(C(419)),r=ei(o,r,void 0),ms(e,t,i,r)}if(l=(i&e.childLanes)!==0,He||l){if(r=xe,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,It(e,s),yt(r,e,s,-1))}return Hl(),r=ei(Error(C(421))),ms(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=mh.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,Ge=qt(s.nextSibling),Je=t,oe=!0,gt=null,e!==null&&(ot[it++]=Dt,ot[it++]=Ot,ot[it++]=wn,Dt=e.id,Ot=e.overflow,wn=t),t=Fl(t,r.children),t.flags|=4096,t)}function tu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Fi(e.return,t,n)}function ti(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 hd(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Ie(e,t,r.children,n),r=ie.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&&tu(e,n,t);else if(e.tag===19)tu(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(te(ie,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&&qs(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ti(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&&qs(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ti(t,!0,n,null,o);break;case"together":ti(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ds(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ft(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(C(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rh(e,t,n){switch(t.tag){case 3:fd(t),Jn();break;case 5:Uc(t);break;case 1:Xe(t.type)&&Qs(t);break;case 4:Tl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;te(Gs,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(te(ie,ie.current&1),t.flags|=128,null):n&t.child.childLanes?pd(e,t,n):(te(ie,ie.current&1),e=Ft(e,t,n),e!==null?e.sibling:null);te(ie,ie.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return hd(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),te(ie,ie.current),r)break;return null;case 22:case 23:return t.lanes=0,cd(e,t,n)}return Ft(e,t,n)}var md,Xi,gd,vd;md=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}};Xi=function(){};gd=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,mn(Ct.current);var o=null;switch(n){case"input":s=hi(e,s),r=hi(e,r),o=[];break;case"select":s=ae({},s,{value:void 0}),r=ae({},r,{value:void 0}),o=[];break;case"textarea":s=vi(e,s),r=vi(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vs)}wi(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"&&(zr.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var a=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&a!==l&&(a!=null||l!=null))if(c==="style")if(l){for(i in l)!l.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&l[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(o||(o=[]),o.push(c,n)),n=a;else c==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(o=o||[]).push(c,a)):c==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(c,""+a):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(zr.hasOwnProperty(c)?(a!=null&&c==="onScroll"&&ne("scroll",e),o||l===a||(o=[])):(o=o||[]).push(c,a))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};vd=function(e,t,n,r){n!==r&&(t.flags|=4)};function dr(e,t){if(!oe)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 ze(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 sh(e,t,n){var r=t.pendingProps;switch(jl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return Xe(t.type)&&Xs(),ze(t),null;case 3:return r=t.stateNode,qn(),re(Ve),re(De),Dl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ps(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,gt!==null&&(el(gt),gt=null))),Xi(e,t),ze(t),null;case 5:Rl(t);var s=mn(Br.current);if(n=t.type,e!==null&&t.stateNode!=null)gd(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(C(166));return ze(t),null}if(e=mn(Ct.current),ps(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Pt]=t,r[Wr]=o,e=(t.mode&1)!==0,n){case"dialog":ne("cancel",r),ne("close",r);break;case"iframe":case"object":case"embed":ne("load",r);break;case"video":case"audio":for(s=0;s<wr.length;s++)ne(wr[s],r);break;case"source":ne("error",r);break;case"img":case"image":case"link":ne("error",r),ne("load",r);break;case"details":ne("toggle",r);break;case"input":ca(r,o),ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},ne("invalid",r);break;case"textarea":fa(r,o),ne("invalid",r)}wi(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&&fs(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&fs(r.textContent,l,e),s=["children",""+l]):zr.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&ne("scroll",r)}switch(n){case"input":ss(r),da(r,o,!0);break;case"textarea":ss(r),pa(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Vs)}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=Vu(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[Pt]=t,e[Wr]=r,md(e,t,!1,!1),t.stateNode=e;e:{switch(i=Si(n,r),n){case"dialog":ne("cancel",e),ne("close",e),s=r;break;case"iframe":case"object":case"embed":ne("load",e),s=r;break;case"video":case"audio":for(s=0;s<wr.length;s++)ne(wr[s],e);s=r;break;case"source":ne("error",e),s=r;break;case"img":case"image":case"link":ne("error",e),ne("load",e),s=r;break;case"details":ne("toggle",e),s=r;break;case"input":ca(e,r),s=hi(e,r),ne("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ae({},r,{value:void 0}),ne("invalid",e);break;case"textarea":fa(e,r),s=vi(e,r),ne("invalid",e);break;default:s=r}wi(n,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var a=l[o];o==="style"?Yu(e,a):o==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&Xu(e,a)):o==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Tr(e,a):typeof a=="number"&&Tr(e,""+a):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(zr.hasOwnProperty(o)?a!=null&&o==="onScroll"&&ne("scroll",e):a!=null&&al(e,o,a,i))}switch(n){case"input":ss(e),da(e,r,!1);break;case"textarea":ss(e),pa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+sn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?bn(e,!!r.multiple,o,!1):r.defaultValue!=null&&bn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Vs)}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 ze(t),null;case 6:if(e&&t.stateNode!=null)vd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(C(166));if(n=mn(Br.current),mn(Ct.current),ps(t)){if(r=t.stateNode,n=t.memoizedProps,r[Pt]=t,(o=r.nodeValue!==n)&&(e=Je,e!==null))switch(e.tag){case 3:fs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&fs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Pt]=t,t.stateNode=r}return ze(t),null;case 13:if(re(ie),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(oe&&Ge!==null&&t.mode&1&&!(t.flags&128))Lc(),Jn(),t.flags|=98560,o=!1;else if(o=ps(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(C(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(C(317));o[Pt]=t}else Jn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ze(t),o=!1}else gt!==null&&(el(gt),gt=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||ie.current&1?ve===0&&(ve=3):Hl())),t.updateQueue!==null&&(t.flags|=4),ze(t),null);case 4:return qn(),Xi(e,t),e===null&&Ir(t.stateNode.containerInfo),ze(t),null;case 10:return Cl(t.type._context),ze(t),null;case 17:return Xe(t.type)&&Xs(),ze(t),null;case 19:if(re(ie),o=t.memoizedState,o===null)return ze(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)dr(o,!1);else{if(ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=qs(e),i!==null){for(t.flags|=128,dr(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 te(ie,ie.current&1|2),t.child}e=e.sibling}o.tail!==null&&de()>tr&&(t.flags|=128,r=!0,dr(o,!1),t.lanes=4194304)}else{if(!r)if(e=qs(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),dr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!oe)return ze(t),null}else 2*de()-o.renderingStartTime>tr&&n!==1073741824&&(t.flags|=128,r=!0,dr(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=de(),t.sibling=null,n=ie.current,te(ie,r?n&1|2:n&1),t):(ze(t),null);case 22:case 23:return bl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ke&1073741824&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function oh(e,t){switch(jl(t),t.tag){case 1:return Xe(t.type)&&Xs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return qn(),re(Ve),re(De),Dl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Rl(t),null;case 13:if(re(ie),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));Jn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(ie),null;case 4:return qn(),null;case 10:return Cl(t.type._context),null;case 22:case 23:return bl(),null;case 24:return null;default:return null}}var gs=!1,Re=!1,ih=typeof WeakSet=="function"?WeakSet:Set,O=null;function Un(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ue(e,t,r)}else n.current=null}function Qi(e,t,n){try{n()}catch(r){ue(e,t,r)}}var nu=!1;function lh(e,t){if(Ti=$s,e=kc(),xl(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,a=-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||(a=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&&(a=i),(w=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=w}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ri={focusedElem:e,selectionRange:n},$s=!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:ht(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(C(163))}}catch(v){ue(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return S=nu,nu=!1,S}function Er(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&&Qi(t,n,o)}s=s.next}while(s!==r)}}function yo(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 Yi(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 yd(e){var t=e.alternate;t!==null&&(e.alternate=null,yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Pt],delete t[Wr],delete t[Mi],delete t[bp],delete t[Hp])),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 wd(e){return e.tag===5||e.tag===3||e.tag===4}function ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wd(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 Ki(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=Vs));else if(r!==4&&(e=e.child,e!==null))for(Ki(e,t,n),e=e.sibling;e!==null;)Ki(e,t,n),e=e.sibling}function Gi(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(Gi(e,t,n),e=e.sibling;e!==null;)Gi(e,t,n),e=e.sibling}var je=null,mt=!1;function Bt(e,t,n){for(n=n.child;n!==null;)Sd(e,t,n),n=n.sibling}function Sd(e,t,n){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(uo,n)}catch{}switch(n.tag){case 5:Re||Un(n,t);case 6:var r=je,s=mt;je=null,Bt(e,t,n),je=r,mt=s,je!==null&&(mt?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(mt?(e=je,n=n.stateNode,e.nodeType===8?Yo(e.parentNode,n):e.nodeType===1&&Yo(e,n),Mr(e)):Yo(je,n.stateNode));break;case 4:r=je,s=mt,je=n.stateNode.containerInfo,mt=!0,Bt(e,t,n),je=r,mt=s;break;case 0:case 11:case 14:case 15:if(!Re&&(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)&&Qi(n,t,i),s=s.next}while(s!==r)}Bt(e,t,n);break;case 1:if(!Re&&(Un(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ue(n,t,l)}Bt(e,t,n);break;case 21:Bt(e,t,n);break;case 22:n.mode&1?(Re=(r=Re)||n.memoizedState!==null,Bt(e,t,n),Re=r):Bt(e,t,n);break;default:Bt(e,t,n)}}function su(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ih),t.forEach(function(r){var s=gh.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function dt(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:je=l.stateNode,mt=!1;break e;case 3:je=l.stateNode.containerInfo,mt=!0;break e;case 4:je=l.stateNode.containerInfo,mt=!0;break e}l=l.return}if(je===null)throw Error(C(160));Sd(o,i,s),je=null,mt=!1;var a=s.alternate;a!==null&&(a.return=null),s.return=null}catch(c){ue(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)xd(t,e),t=t.sibling}function xd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dt(t,e),xt(e),r&4){try{Er(3,e,e.return),yo(3,e)}catch(y){ue(e,e.return,y)}try{Er(5,e,e.return)}catch(y){ue(e,e.return,y)}}break;case 1:dt(t,e),xt(e),r&512&&n!==null&&Un(n,n.return);break;case 5:if(dt(t,e),xt(e),r&512&&n!==null&&Un(n,n.return),e.flags&32){var s=e.stateNode;try{Tr(s,"")}catch(y){ue(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,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&bu(s,o),Si(l,i);var c=Si(l,o);for(i=0;i<a.length;i+=2){var h=a[i],m=a[i+1];h==="style"?Yu(s,m):h==="dangerouslySetInnerHTML"?Xu(s,m):h==="children"?Tr(s,m):al(s,h,m,c)}switch(l){case"input":mi(s,o);break;case"textarea":Hu(s,o);break;case"select":var g=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var w=o.value;w!=null?bn(s,!!o.multiple,w,!1):g!==!!o.multiple&&(o.defaultValue!=null?bn(s,!!o.multiple,o.defaultValue,!0):bn(s,!!o.multiple,o.multiple?[]:"",!1))}s[Wr]=o}catch(y){ue(e,e.return,y)}}break;case 6:if(dt(t,e),xt(e),r&4){if(e.stateNode===null)throw Error(C(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){ue(e,e.return,y)}}break;case 3:if(dt(t,e),xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Mr(t.containerInfo)}catch(y){ue(e,e.return,y)}break;case 4:dt(t,e),xt(e);break;case 13:dt(t,e),xt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Bl=de())),r&4&&su(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Re=(c=Re)||h,dt(t,e),Re=c):dt(t,e),xt(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:Er(4,g,g.return);break;case 1:Un(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){ue(r,n,y)}}break;case 5:Un(g,g.return);break;case 22:if(g.memoizedState!==null){iu(m);continue}}w!==null?(w.return=g,O=w):iu(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,a=m.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=Qu("display",i))}catch(y){ue(e,e.return,y)}}}else if(m.tag===6){if(h===null)try{m.stateNode.nodeValue=c?"":m.memoizedProps}catch(y){ue(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:dt(t,e),xt(e),r&4&&su(e);break;case 21:break;default:dt(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(wd(n)){var r=n;break e}n=n.return}throw Error(C(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Tr(s,""),r.flags&=-33);var o=ru(e);Gi(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,l=ru(e);Ki(e,l,i);break;default:throw Error(C(161))}}catch(a){ue(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ah(e,t,n){O=e,kd(e)}function kd(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||gs;if(!i){var l=s.alternate,a=l!==null&&l.memoizedState!==null||Re;l=gs;var c=Re;if(gs=i,(Re=a)&&!c)for(O=s;O!==null;)i=O,a=i.child,i.tag===22&&i.memoizedState!==null?lu(s):a!==null?(a.return=i,O=a):lu(s);for(;o!==null;)O=o,kd(o),o=o.sibling;O=s,gs=l,Re=c}ou(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,O=o):ou(e)}}function ou(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:Re||yo(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Re)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ht(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&ba(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}ba(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.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&&Mr(m)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}Re||t.flags&512&&Yi(t)}catch(g){ue(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 iu(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 lu(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{yo(4,t)}catch(a){ue(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(a){ue(t,s,a)}}var o=t.return;try{Yi(t)}catch(a){ue(t,o,a)}break;case 5:var i=t.return;try{Yi(t)}catch(a){ue(t,i,a)}}}catch(a){ue(t,t.return,a)}if(t===e){O=null;break}var l=t.sibling;if(l!==null){l.return=t.return,O=l;break}O=t.return}}var uh=Math.ceil,no=Wt.ReactCurrentDispatcher,Wl=Wt.ReactCurrentOwner,at=Wt.ReactCurrentBatchConfig,Q=0,xe=null,he=null,Ne=0,Ke=0,Bn=an(0),ve=0,Vr=null,xn=0,wo=0,Ul=0,Cr=null,be=null,Bl=0,tr=1/0,Tt=null,ro=!1,Ji=null,tn=null,vs=!1,Kt=null,so=0,_r=0,Zi=null,Os=-1,Ms=0;function Fe(){return Q&6?de():Os!==-1?Os:Os=de()}function nn(e){return e.mode&1?Q&2&&Ne!==0?Ne&-Ne:Xp.transition!==null?(Ms===0&&(Ms=ic()),Ms):(e=Z,e!==0||(e=window.event,e=e===void 0?16:pc(e.type)),e):1}function yt(e,t,n,r){if(50<_r)throw _r=0,Zi=null,Error(C(185));Qr(e,n,r),(!(Q&2)||e!==xe)&&(e===xe&&(!(Q&2)&&(wo|=n),ve===4&&Qt(e,Ne)),Qe(e,r),n===1&&Q===0&&!(t.mode&1)&&(tr=de()+500,mo&&un()))}function Qe(e,t){var n=e.callbackNode;Xf(e,t);var r=Bs(e,e===xe?Ne:0);if(r===0)n!==null&&ga(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ga(n),t===1)e.tag===0?Vp(au.bind(null,e)):Dc(au.bind(null,e)),Bp(function(){!(Q&6)&&un()}),n=null;else{switch(lc(r)){case 1:n=pl;break;case 4:n=sc;break;case 16:n=Us;break;case 536870912:n=oc;break;default:n=Us}n=Td(n,jd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function jd(e,t){if(Os=-1,Ms=0,Q&6)throw Error(C(327));var n=e.callbackNode;if(Yn()&&e.callbackNode!==n)return null;var r=Bs(e,e===xe?Ne:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=oo(e,r);else{t=r;var s=Q;Q|=2;var o=Pd();(xe!==e||Ne!==t)&&(Tt=null,tr=de()+500,gn(e,t));do try{fh();break}catch(l){Nd(e,l)}while(!0);El(),no.current=o,Q=s,he!==null?t=0:(xe=null,Ne=0,t=ve)}if(t!==0){if(t===2&&(s=Pi(e),s!==0&&(r=s,t=qi(e,s))),t===1)throw n=Vr,gn(e,0),Qt(e,r),Qe(e,de()),n;if(t===6)Qt(e,r);else{if(s=e.current.alternate,!(r&30)&&!ch(s)&&(t=oo(e,r),t===2&&(o=Pi(e),o!==0&&(r=o,t=qi(e,o))),t===1))throw n=Vr,gn(e,0),Qt(e,r),Qe(e,de()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(C(345));case 2:fn(e,be,Tt);break;case 3:if(Qt(e,r),(r&130023424)===r&&(t=Bl+500-de(),10<t)){if(Bs(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Oi(fn.bind(null,e,be,Tt),t);break}fn(e,be,Tt);break;case 4:if(Qt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-vt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=de()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*uh(r/1960))-r,10<r){e.timeoutHandle=Oi(fn.bind(null,e,be,Tt),r);break}fn(e,be,Tt);break;case 5:fn(e,be,Tt);break;default:throw Error(C(329))}}}return Qe(e,de()),e.callbackNode===n?jd.bind(null,e):null}function qi(e,t){var n=Cr;return e.current.memoizedState.isDehydrated&&(gn(e,t).flags|=256),e=oo(e,t),e!==2&&(t=be,be=n,t!==null&&el(t)),e}function el(e){be===null?be=e:be.push.apply(be,e)}function ch(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(!wt(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 Qt(e,t){for(t&=~Ul,t&=~wo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vt(t),r=1<<n;e[n]=-1,t&=~r}}function au(e){if(Q&6)throw Error(C(327));Yn();var t=Bs(e,0);if(!(t&1))return Qe(e,de()),null;var n=oo(e,t);if(e.tag!==0&&n===2){var r=Pi(e);r!==0&&(t=r,n=qi(e,r))}if(n===1)throw n=Vr,gn(e,0),Qt(e,t),Qe(e,de()),n;if(n===6)throw Error(C(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fn(e,be,Tt),Qe(e,de()),null}function $l(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(tr=de()+500,mo&&un())}}function kn(e){Kt!==null&&Kt.tag===0&&!(Q&6)&&Yn();var t=Q;Q|=1;var n=at.transition,r=Z;try{if(at.transition=null,Z=1,e)return e()}finally{Z=r,at.transition=n,Q=t,!(Q&6)&&un()}}function bl(){Ke=Bn.current,re(Bn)}function gn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Up(n)),he!==null)for(n=he.return;n!==null;){var r=n;switch(jl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xs();break;case 3:qn(),re(Ve),re(De),Dl();break;case 5:Rl(r);break;case 4:qn();break;case 13:re(ie);break;case 19:re(ie);break;case 10:Cl(r.type._context);break;case 22:case 23:bl()}n=n.return}if(xe=e,he=e=rn(e.current,null),Ne=Ke=t,ve=0,Vr=null,Ul=wo=xn=0,be=Cr=null,hn!==null){for(t=0;t<hn.length;t++)if(n=hn[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}hn=null}return e}function Nd(e,t){do{var n=he;try{if(El(),Ts.current=to,eo){for(var r=le.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eo=!1}if(Sn=0,Se=ge=le=null,Pr=!1,$r=0,Wl.current=null,n===null||n.return===null){ve=1,Vr=t,he=null;break}e:{var o=e,i=n.return,l=n,a=t;if(t=Ne,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var c=a,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=Ka(i);if(w!==null){w.flags&=-257,Ga(w,i,l,o,t),w.mode&1&&Ya(o,c,t),t=w,a=c;var S=t.updateQueue;if(S===null){var y=new Set;y.add(a),t.updateQueue=y}else S.add(a);break e}else{if(!(t&1)){Ya(o,c,t),Hl();break e}a=Error(C(426))}}else if(oe&&l.mode&1){var _=Ka(i);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Ga(_,i,l,o,t),Nl(er(a,l));break e}}o=a=er(a,l),ve!==4&&(ve=2),Cr===null?Cr=[o]:Cr.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=ld(o,a,t);$a(o,p);break e;case 1:l=a;var d=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(tn===null||!tn.has(f)))){o.flags|=65536,t&=-t,o.lanes|=t;var v=ad(o,l,t);$a(o,v);break e}}o=o.return}while(o!==null)}Cd(n)}catch(x){t=x,he===n&&n!==null&&(he=n=n.return);continue}break}while(!0)}function Pd(){var e=no.current;return no.current=to,e===null?to:e}function Hl(){(ve===0||ve===3||ve===2)&&(ve=4),xe===null||!(xn&268435455)&&!(wo&268435455)||Qt(xe,Ne)}function oo(e,t){var n=Q;Q|=2;var r=Pd();(xe!==e||Ne!==t)&&(Tt=null,gn(e,t));do try{dh();break}catch(s){Nd(e,s)}while(!0);if(El(),Q=n,no.current=r,he!==null)throw Error(C(261));return xe=null,Ne=0,ve}function dh(){for(;he!==null;)Ed(he)}function fh(){for(;he!==null&&!If();)Ed(he)}function Ed(e){var t=zd(e.alternate,e,Ke);e.memoizedProps=e.pendingProps,t===null?Cd(e):he=t,Wl.current=null}function Cd(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=oh(n,t),n!==null){n.flags&=32767,he=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ve=6,he=null;return}}else if(n=sh(n,t,Ke),n!==null){he=n;return}if(t=t.sibling,t!==null){he=t;return}he=t=e}while(t!==null);ve===0&&(ve=5)}function fn(e,t,n){var r=Z,s=at.transition;try{at.transition=null,Z=1,ph(e,t,n,r)}finally{at.transition=s,Z=r}return null}function ph(e,t,n,r){do Yn();while(Kt!==null);if(Q&6)throw Error(C(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(C(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Qf(e,o),e===xe&&(he=xe=null,Ne=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||vs||(vs=!0,Td(Us,function(){return Yn(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=at.transition,at.transition=null;var i=Z;Z=1;var l=Q;Q|=4,Wl.current=null,lh(e,n),xd(n,e),Op(Ri),$s=!!Ti,Ri=Ti=null,e.current=n,ah(n),Ff(),Q=l,Z=i,at.transition=o}else e.current=n;if(vs&&(vs=!1,Kt=e,so=s),o=e.pendingLanes,o===0&&(tn=null),Bf(n.stateNode),Qe(e,de()),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(ro)throw ro=!1,e=Ji,Ji=null,e;return so&1&&e.tag!==0&&Yn(),o=e.pendingLanes,o&1?e===Zi?_r++:(_r=0,Zi=e):_r=0,un(),null}function Yn(){if(Kt!==null){var e=lc(so),t=at.transition,n=Z;try{if(at.transition=null,Z=16>e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,so=0,Q&6)throw Error(C(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 a=0;a<l.length;a++){var c=l[a];for(O=c;O!==null;){var h=O;switch(h.tag){case 0:case 11:case 15:Er(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(yd(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:Er(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:yo(9,l)}}catch(x){ue(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,un(),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(uo,e)}catch{}r=!0}return r}finally{Z=n,at.transition=t}}return!1}function uu(e,t,n){t=er(n,t),t=ld(e,t,1),e=en(e,t,1),t=Fe(),e!==null&&(Qr(e,1,t),Qe(e,t))}function ue(e,t,n){if(e.tag===3)uu(e,e,n);else for(;t!==null;){if(t.tag===3){uu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tn===null||!tn.has(r))){e=er(n,e),e=ad(t,e,1),t=en(t,e,1),e=Fe(),t!==null&&(Qr(t,1,e),Qe(t,e));break}}t=t.return}}function hh(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,xe===e&&(Ne&n)===n&&(ve===4||ve===3&&(Ne&130023424)===Ne&&500>de()-Bl?gn(e,0):Ul|=n),Qe(e,t)}function _d(e,t){t===0&&(e.mode&1?(t=ls,ls<<=1,!(ls&130023424)&&(ls=4194304)):t=1);var n=Fe();e=It(e,t),e!==null&&(Qr(e,t,n),Qe(e,n))}function mh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_d(e,n)}function gh(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(C(314))}r!==null&&r.delete(t),_d(e,n)}var zd;zd=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,rh(e,t,n);He=!!(e.flags&131072)}else He=!1,oe&&t.flags&1048576&&Oc(t,Ks,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ds(e,t),e=t.pendingProps;var s=Gn(t,De.current);Qn(t,n),s=Ml(null,t,r,e,s,n);var o=Ll();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,zl(t),s.updater=vo,t.stateNode=s,s._reactInternals=t,Ui(t,r,e,n),t=bi(null,t,r,!0,o,n)):(t.tag=0,oe&&o&&kl(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ds(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=yh(r),e=ht(r,e),s){case 0:t=$i(null,t,r,e,n);break e;case 1:t=qa(null,t,r,e,n);break e;case 11:t=Ja(null,t,r,e,n);break e;case 14:t=Za(null,t,r,ht(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),$i(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),qa(e,t,r,s,n);case 3:e:{if(fd(t),e===null)throw Error(C(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Wc(e,t),Zs(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=er(Error(C(423)),t),t=eu(e,t,r,n,s);break e}else if(r!==s){s=er(Error(C(424)),t),t=eu(e,t,r,n,s);break e}else for(Ge=qt(t.stateNode.containerInfo.firstChild),Je=t,oe=!0,gt=null,n=Ic(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Jn(),r===s){t=Ft(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Uc(t),e===null&&Ii(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Di(r,s)?i=null:o!==null&&Di(r,o)&&(t.flags|=32),dd(e,t),Ie(e,t,i,n),t.child;case 6:return e===null&&Ii(t),null;case 13:return pd(e,t,n);case 4:return Tl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Zn(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:ht(r,s),Ja(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,te(Gs,r._currentValue),r._currentValue=i,o!==null)if(wt(o.value,i)){if(o.children===s.children&&!Ve.current){t=Ft(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 a=l.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Mt(-1,n&-n),a.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var h=c.pending;h===null?a.next=a:(a.next=h.next,h.next=a),c.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Fi(o.return,n,t),l.lanes|=n;break}a=a.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(C(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Fi(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,Qn(t,n),s=ut(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ht(r,t.pendingProps),s=ht(r.type,s),Za(e,t,r,s,n);case 15:return ud(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),Ds(e,t),t.tag=1,Xe(r)?(e=!0,Qs(t)):e=!1,Qn(t,n),id(t,r,s),Ui(t,r,s,n),bi(null,t,r,!0,e,n);case 19:return hd(e,t,n);case 22:return cd(e,t,n)}throw Error(C(156,t.tag))};function Td(e,t){return rc(e,t)}function vh(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 lt(e,t,n,r){return new vh(e,t,n,r)}function Vl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function yh(e){if(typeof e=="function")return Vl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===cl)return 11;if(e===dl)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=lt(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 Ls(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")Vl(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rn:return vn(n.children,s,o,t);case ul:i=8,s|=8;break;case ci:return e=lt(12,n,t,s|2),e.elementType=ci,e.lanes=o,e;case di:return e=lt(13,n,t,s),e.elementType=di,e.lanes=o,e;case fi:return e=lt(19,n,t,s),e.elementType=fi,e.lanes=o,e;case Uu:return So(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fu:i=10;break e;case Wu:i=9;break e;case cl:i=11;break e;case dl:i=14;break e;case Ht:i=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=lt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function vn(e,t,n,r){return e=lt(7,e,r,t),e.lanes=n,e}function So(e,t,n,r){return e=lt(22,e,r,t),e.elementType=Uu,e.lanes=n,e.stateNode={isHidden:!1},e}function ni(e,t,n){return e=lt(6,e,null,t),e.lanes=n,e}function ri(e,t,n){return t=lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wh(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=Io(0),this.expirationTimes=Io(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Io(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xl(e,t,n,r,s,o,i,l,a){return e=new wh(e,t,n,l,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=lt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zl(o),e}function Sh(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Tn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Rd(e){if(!e)return on;e=e._reactInternals;e:{if(Nn(e)!==e||e.tag!==1)throw Error(C(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(C(171))}if(e.tag===1){var n=e.type;if(Xe(n))return Rc(e,n,t)}return t}function Dd(e,t,n,r,s,o,i,l,a){return e=Xl(n,r,!0,e,s,o,i,l,a),e.context=Rd(null),n=e.current,r=Fe(),s=nn(n),o=Mt(r,s),o.callback=t??null,en(n,o,s),e.current.lanes=s,Qr(e,s,r),Qe(e,r),e}function xo(e,t,n,r){var s=t.current,o=Fe(),i=nn(s);return n=Rd(n),t.context===null?t.context=n:t.pendingContext=n,t=Mt(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=en(s,t,i),e!==null&&(yt(e,s,i,o),zs(e,s,i)),i}function io(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 cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ql(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function xh(){return null}var Od=typeof reportError=="function"?reportError:function(e){console.error(e)};function Yl(e){this._internalRoot=e}ko.prototype.render=Yl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(C(409));xo(e,t,null,null)};ko.prototype.unmount=Yl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kn(function(){xo(null,e,null,null)}),t[At]=null}};function ko(e){this._internalRoot=e}ko.prototype.unstable_scheduleHydration=function(e){if(e){var t=cc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xt.length&&t!==0&&t<Xt[n].priority;n++);Xt.splice(n,0,e),n===0&&fc(e)}};function Kl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function du(){}function kh(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=io(i);o.call(c)}}var i=Dd(t,r,e,0,null,!1,!1,"",du);return e._reactRootContainer=i,e[At]=i.current,Ir(e.nodeType===8?e.parentNode:e),kn(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=io(a);l.call(c)}}var a=Xl(e,0,!1,null,null,!1,!1,"",du);return e._reactRootContainer=a,e[At]=a.current,Ir(e.nodeType===8?e.parentNode:e),kn(function(){xo(t,a,n,r)}),a}function No(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var a=io(i);l.call(a)}}xo(t,i,e,s)}else i=kh(n,t,e,s,r);return io(i)}ac=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=yr(t.pendingLanes);n!==0&&(hl(t,n|1),Qe(t,de()),!(Q&6)&&(tr=de()+500,un()))}break;case 13:kn(function(){var r=It(e,1);if(r!==null){var s=Fe();yt(r,e,1,s)}}),Ql(e,1)}};ml=function(e){if(e.tag===13){var t=It(e,134217728);if(t!==null){var n=Fe();yt(t,e,134217728,n)}Ql(e,134217728)}};uc=function(e){if(e.tag===13){var t=nn(e),n=It(e,t);if(n!==null){var r=Fe();yt(n,e,t,r)}Ql(e,t)}};cc=function(){return Z};dc=function(e,t){var n=Z;try{return Z=e,t()}finally{Z=n}};ki=function(e,t,n){switch(t){case"input":if(mi(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=ho(r);if(!s)throw Error(C(90));$u(r),mi(r,s)}}}break;case"textarea":Hu(e,n);break;case"select":t=n.value,t!=null&&bn(e,!!n.multiple,t,!1)}};Ju=$l;Zu=kn;var jh={usingClientEntryPoint:!1,Events:[Kr,Ln,ho,Ku,Gu,$l]},fr={findFiberByHostInstance:pn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Nh={bundleType:fr.bundleType,version:fr.version,rendererPackageName:fr.rendererPackageName,rendererConfig:fr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tc(e),e===null?null:e.stateNode},findFiberByHostInstance:fr.findFiberByHostInstance||xh,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 ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ys.isDisabled&&ys.supportsFiber)try{uo=ys.inject(Nh),Et=ys}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jh;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Kl(t))throw Error(C(200));return Sh(e,t,null,n)};et.createRoot=function(e,t){if(!Kl(e))throw Error(C(299));var n=!1,r="",s=Od;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Xl(e,1,!1,null,null,n,!1,r,s),e[At]=t.current,Ir(e.nodeType===8?e.parentNode:e),new Yl(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(C(188)):(e=Object.keys(e).join(","),Error(C(268,e)));return e=tc(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return kn(e)};et.hydrate=function(e,t,n){if(!jo(t))throw Error(C(200));return No(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!Kl(e))throw Error(C(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Od;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Dd(t,null,e,1,n??null,s,!1,o,i),e[At]=t.current,Ir(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 ko(t)};et.render=function(e,t,n){if(!jo(t))throw Error(C(200));return No(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!jo(e))throw Error(C(40));return e._reactRootContainer?(kn(function(){No(null,null,e,!1,function(){e._reactRootContainer=null,e[At]=null})}),!0):!1};et.unstable_batchedUpdates=$l;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!jo(n))throw Error(C(200));if(e==null||e._reactInternals===void 0)throw Error(C(38));return No(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Md(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Md)}catch(e){console.error(e)}}Md(),Mu.exports=et;var Jr=Mu.exports,fu=Jr;ai.createRoot=fu.createRoot,ai.hydrateRoot=fu.hydrateRoot;var Po={exports:{}},Ld={},Ad={exports:{}},Ph="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Eh=Ph,Ch=Eh;function Id(){}function Fd(){}Fd.resetWarningCache=Id;var _h=function(){function e(r,s,o,i,l,a){if(a!==Ch){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:Fd,resetWarningCache:Id};return n.PropTypes=n,n};Ad.exports=_h();var Wd=Ad.exports;function Ud(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=Ud(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function pu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Ud(e))&&(r&&(r+=" "),r+=t);return r}const zh=Object.freeze(Object.defineProperty({__proto__:null,clsx:pu,default:pu},Symbol.toStringTag,{value:"Module"})),Th=Zd(zh);var ce={},_t={};Object.defineProperty(_t,"__esModule",{value:!0});_t.dontSetMe=Lh;_t.findInArray=Rh;_t.int=Mh;_t.isFunction=Dh;_t.isNum=Oh;function Rh(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function Dh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function Oh(e){return typeof e=="number"&&!isNaN(e)}function Mh(e){return parseInt(e,10)}function Lh(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 Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.browserPrefixToKey=$d;Pn.browserPrefixToStyle=Ah;Pn.default=void 0;Pn.getPrefix=Bd;const si=["Moz","Webkit","O","ms"];function Bd(){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<si.length;r++)if($d(t,si[r])in n)return si[r];return""}function $d(e,t){return t?"".concat(t).concat(Ih(e)):e}function Ah(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e}function Ih(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}Pn.default=Bd();Object.defineProperty(ce,"__esModule",{value:!0});ce.addClassName=Vd;ce.addEvent=Uh;ce.addUserSelectStyles=Jh;ce.createCSSTransform=Qh;ce.createSVGTransform=Yh;ce.getTouch=Kh;ce.getTouchIdentifier=Gh;ce.getTranslation=Gl;ce.innerHeight=Hh;ce.innerWidth=Vh;ce.matchesSelector=Hd;ce.matchesSelectorAndParentsTo=Wh;ce.offsetXYFromParent=Xh;ce.outerHeight=$h;ce.outerWidth=bh;ce.removeClassName=Xd;ce.removeEvent=Bh;ce.removeUserSelectStyles=Zh;var Ze=_t,hu=Fh(Pn);function bd(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(bd=function(r){return r?n:t})(e)}function Fh(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=bd(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 ws="";function Hd(e,t){return ws||(ws=(0,Ze.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,Ze.isFunction)(e[n])})),(0,Ze.isFunction)(e[ws])?e[ws](t):!1}function Wh(e,t,n){let r=e;do{if(Hd(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function Uh(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 Bh(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 $h(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 bh(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 Hh(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 Vh(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 Xh(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 Qh(e,t){const n=Gl(e,t,"px");return{[(0,hu.browserPrefixToKey)("transform",hu.default)]:n}}function Yh(e,t){return Gl(e,t,"")}function Gl(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 Kh(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 Gh(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Jh(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&&Vd(e.body,"react-draggable-transparent-selection")}function Zh(e){if(e)try{if(e.body&&Xd(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 Vd(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Xd(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var zt={};Object.defineProperty(zt,"__esModule",{value:!0});zt.canDragX=tm;zt.canDragY=nm;zt.createCoreData=sm;zt.createDraggableData=om;zt.getBoundPosition=qh;zt.getControlPosition=rm;zt.snapToGrid=em;var Ye=_t,$n=ce;function qh(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r=="string"?r:im(r);const s=Jl(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 a=l,c=i.getComputedStyle(s),h=i.getComputedStyle(a);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,$n.innerWidth)(a)-(0,$n.outerWidth)(s)-s.offsetLeft+(0,Ye.int)(h.paddingRight)-(0,Ye.int)(c.marginRight),bottom:(0,$n.innerHeight)(a)-(0,$n.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 em(e,t,n){const r=Math.round(t/e[0])*e[0],s=Math.round(n/e[1])*e[1];return[r,s]}function tm(e){return e.props.axis==="both"||e.props.axis==="x"}function nm(e){return e.props.axis==="both"||e.props.axis==="y"}function rm(e,t,n){const r=typeof t=="number"?(0,$n.getTouch)(e,t):null;if(typeof t=="number"&&!r)return null;const s=Jl(n),o=n.props.offsetParent||s.offsetParent||s.ownerDocument.body;return(0,$n.offsetXYFromParent)(r||e,o,n.props.scale)}function sm(e,t,n){const r=!(0,Ye.isNum)(e.lastX),s=Jl(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 om(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 im(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Jl(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var Eo={},Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.default=lm;function lm(){}Object.defineProperty(Eo,"__esModule",{value:!0});Eo.default=void 0;var oi=um(j),$e=Zl(Wd),am=Zl(Jr),Te=ce,$t=zt,ii=_t,pr=Zl(Co);function Zl(e){return e&&e.__esModule?e:{default:e}}function Qd(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Qd=function(r){return r?n:t})(e)}function um(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Qd(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=cm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cm(e){var t=dm(e,"string");return typeof t=="symbol"?t:String(t)}function dm(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 pt={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let bt=pt.mouse,_o=class extends oi.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,Te.matchesSelectorAndParentsTo)(t.target,this.props.handle,n)||this.props.cancel&&(0,Te.matchesSelectorAndParentsTo)(t.target,this.props.cancel,n))return;t.type==="touchstart"&&t.preventDefault();const s=(0,Te.getTouchIdentifier)(t);this.touchIdentifier=s;const o=(0,$t.getControlPosition)(t,s,this);if(o==null)return;const{x:i,y:l}=o,a=(0,$t.createCoreData)(this,i,l);(0,pr.default)("DraggableCore: handleDragStart: %j",a),(0,pr.default)("calling",this.props.onStart),!(this.props.onStart(t,a)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Te.addUserSelectStyles)(r),this.dragging=!0,this.lastX=i,this.lastY=l,(0,Te.addEvent)(r,bt.move,this.handleDrag),(0,Te.addEvent)(r,bt.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,a=s-this.lastY;if([l,a]=(0,$t.snapToGrid)(this.props.grid,l,a),!l&&!a)return;r=this.lastX+l,s=this.lastY+a}const o=(0,$t.createCoreData)(this,r,s);if((0,pr.default)("DraggableCore: handleDrag: %j",o),this.props.onDrag(t,o)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const a=document.createEvent("MouseEvents");a.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(a)}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 a=r-this.lastX||0,c=s-this.lastY||0;[a,c]=(0,$t.snapToGrid)(this.props.grid,a,c),r=this.lastX+a,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,Te.removeUserSelectStyles)(l.ownerDocument),(0,pr.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,pr.default)("DraggableCore: Removing handlers"),(0,Te.removeEvent)(l.ownerDocument,bt.move,this.handleDrag),(0,Te.removeEvent)(l.ownerDocument,bt.stop,this.handleDragStop))}),Ae(this,"onMouseDown",t=>(bt=pt.mouse,this.handleDragStart(t))),Ae(this,"onMouseUp",t=>(bt=pt.mouse,this.handleDragStop(t))),Ae(this,"onTouchStart",t=>(bt=pt.touch,this.handleDragStart(t))),Ae(this,"onTouchEnd",t=>(bt=pt.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Te.addEvent)(t,pt.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:n}=t;(0,Te.removeEvent)(n,pt.mouse.move,this.handleDrag),(0,Te.removeEvent)(n,pt.touch.move,this.handleDrag),(0,Te.removeEvent)(n,pt.mouse.stop,this.handleDragStop),(0,Te.removeEvent)(n,pt.touch.stop,this.handleDragStop),(0,Te.removeEvent)(t,pt.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Te.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:am.default.findDOMNode(this)}render(){return oi.cloneElement(oi.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Eo.default=_o;Ae(_o,"displayName","DraggableCore");Ae(_o,"propTypes",{allowAnyClick:$e.default.bool,children:$e.default.node.isRequired,disabled:$e.default.bool,enableUserSelectHack:$e.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:$e.default.arrayOf($e.default.number),handle:$e.default.string,cancel:$e.default.string,nodeRef:$e.default.object,onStart:$e.default.func,onDrag:$e.default.func,onStop:$e.default.func,onMouseDown:$e.default.func,scale:$e.default.number,className:ii.dontSetMe,style:ii.dontSetMe,transform:ii.dontSetMe});Ae(_o,"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 a.default}}),e.default=void 0;var t=g(j),n=h(Wd),r=h(Jr),s=h(Th),o=ce,i=zt,l=_t,a=h(Eo),c=h(Co);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 k in d)if(k!=="default"&&Object.prototype.hasOwnProperty.call(d,k)){var E=P?Object.getOwnPropertyDescriptor(d,k):null;E&&(E.get||E.set)?Object.defineProperty(x,k,E):x[k]=d[k]}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),k={x:P.x,y:P.y,slackX:0,slackY:0};if(this.props.bounds){const{x:U,y:M}=k;k.x+=this.state.slackX,k.y+=this.state.slackY;const[B,X]=(0,i.getBoundPosition)(this,k.x,k.y);k.x=B,k.y=X,k.slackX=this.state.slackX+(U-k.x),k.slackY=this.state.slackY+(M-k.y),P.x=k.x,P.y=k.y,P.deltaX=k.x-this.state.x,P.deltaY=k.y-this.state.y}if(this.props.onDrag(v,P)===!1)return!1;this.setState(k)}),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 k={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:U,y:M}=this.props.position;k.x=U,k.y=M}this.setState(k)}),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:k,defaultClassNameDragging:E,defaultClassNameDragged:U,position:M,positionOffset:B,scale:X,...q}=this.props;let se={},K=null;const fe=!!!M||this.state.dragging,z=M||P,A={x:(0,i.canDragX)(this)&&fe?this.state.x:z.x,y:(0,i.canDragY)(this)&&fe?this.state.y:z.y};this.state.isElementSVG?K=(0,o.createSVGTransform)(A,B):se=(0,o.createCSSTransform)(A,B);const L=(0,s.default)(x.props.className||"",k,{[E]:this.state.dragging,[U]:this.state.dragged});return t.createElement(a.default,w({},q,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(x),{className:L,style:{...x.props.style,...se},transform:K}))}}e.default=p,S(p,"displayName","Draggable"),S(p,"propTypes",{...a.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",{...a.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(Ld);const{default:Yd,DraggableCore:fm}=Ld;Po.exports=Yd;Po.exports.default=Yd;Po.exports.DraggableCore=fm;var pm=Po.exports;const hm=ku(pm);var pe=function(){return pe=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},pe.apply(this,arguments)},mu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},gu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Ss={width:"20px",height:"20px",position:"absolute",zIndex:1},mm={top:pe(pe({},mu),{top:"-5px"}),right:pe(pe({},gu),{left:void 0,right:"-5px"}),bottom:pe(pe({},mu),{top:void 0,bottom:"-5px"}),left:pe(pe({},gu),{left:"-5px"}),topRight:pe(pe({},Ss),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:pe(pe({},Ss),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:pe(pe({},Ss),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:pe(pe({},Ss),{left:"-10px",top:"-10px",cursor:"nw-resize"})},gm=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]),a=j.useMemo(function(){return pe(pe({position:"absolute",userSelect:"none"},mm[n]),s??{})},[s,n]);return u.jsx("div",{className:o||void 0,style:a,onMouseDown:i,onTouchStart:l,children:r})}),vm=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)}}(),Nt=function(){return Nt=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},Nt.apply(this,arguments)},ym={width:"auto",height:"auto"},xs=function(e,t,n){return Math.max(Math.min(e,n),t)},vu=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},_n=function(e,t){return new RegExp(e,"i").test(t)},ks=function(e){return!!(e.touches&&e.touches.length)},wm=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},yu=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},li=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")},js=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},Sm=function(e,t,n,r,s,o,i){return r=js(r,e.width,t,n),s=js(s,e.height,t,n),o=js(o,e.width,t,n),i=js(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)}},xm=function(e){return Array.isArray(e)?e:[e,e]},km=["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"],wu="__resizable_base__",jm=function(e){vm(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 a=l.parentNode;if(!a)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(wu):c.className+=wu,a.appendChild(c),c},l.removeBase=function(a){var c=l.parentNode;c&&c.removeChild(a)},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||ym},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 a;if(typeof n.state[l]>"u"||n.state[l]==="auto")return"auto";if(n.propsSize&&n.propsSize[l]&&(!((a=n.propsSize[l])===null||a===void 0)&&a.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 li(n.state[l])},o=r&&typeof r.width<"u"&&!this.state.isResizing?li(r.width):s("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?li(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&&_n("left",o),l=s&&_n("top",o),a,c;if(this.props.bounds==="parent"){var h=this.parentNode;h&&(a=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&&(a=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(a=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 a&&Number.isFinite(a)&&(n=n&&n<a?n:a),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=xm(this.props.resizeRatio||1),i=o[0],l=o[1],a=this.state,c=a.direction,h=a.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 _n("right",c)&&(y=h.width+(n-h.x)*i/s,g&&(_=(y-d)/this.ratio+p)),_n("left",c)&&(y=h.width-(n-h.x)*i/s,g&&(_=(y-d)/this.ratio+p)),_n("bottom",c)&&(_=h.height+(r-h.y)*l/s,g&&(y=(_-p)*this.ratio+d)),_n("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,a=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=a||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),k=Math.min(w,f);n=xs(n,v,x),r=xs(r,P,k)}else n=xs(n,h,m),r=xs(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,a=i.top,c=i.right,h=i.bottom;this.resizableLeft=l*n,this.resizableRight=c*n,this.resizableTop=a*n,this.resizableBottom=h*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var s=0,o=0;if(n.nativeEvent&&wm(n.nativeEvent)?(s=n.nativeEvent.clientX,o=n.nativeEvent.clientY):n.nativeEvent&&ks(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,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!=="auto"){var c=this.parentNode;if(c){var h=this.window.getComputedStyle(c).flexDirection;this.flexDir=h.startsWith("row")?"row":"column",l=a.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var m={original:{x:s,y:o,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Nt(Nt({},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&&ks(n))try{n.preventDefault(),n.stopPropagation()}catch{}var s=this.props,o=s.maxWidth,i=s.maxHeight,l=s.minWidth,a=s.minHeight,c=ks(n)?n.touches[0].clientX:n.clientX,h=ks(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=Sm(_,this.window.innerWidth,this.window.innerHeight,o,i,l,a);o=p.maxWidth,i=p.maxHeight,l=p.minWidth,a=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=yu(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(f=yu(f,this.props.snap.y,this.props.snapGap));var P=this.calculateNewSizeFromAspectRatio(v,f,{width:x.maxWidth,height:x.maxHeight},{width:l,height:a});if(v=P.newWidth,f=P.newHeight,this.props.grid){var k=vu(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),E=vu(f,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),U=this.props.snapGap||0,M=U===0||Math.abs(k-v)<=U?k:v,B=U===0||Math.abs(E-f)<=U?E: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 q=v/_.width*100;v="".concat(q,"%")}else if(S.endsWith("vw")){var se=v/this.window.innerWidth*100;v="".concat(se,"vw")}else if(S.endsWith("vh")){var K=v/this.window.innerHeight*100;v="".concat(K,"vh")}}if(y&&typeof y=="string"){if(y.endsWith("%")){var q=f/_.height*100;f="".concat(q,"%")}else if(y.endsWith("vw")){var se=f/this.window.innerWidth*100;f="".concat(se,"vw")}else if(y.endsWith("vh")){var K=f/this.window.innerHeight*100;f="".concat(K,"vh")}}var ee={width:this.createSizeForCssProperty(v,"width"),height:this.createSizeForCssProperty(f,"height")};this.flexDir==="row"?ee.flexBasis=ee.width:this.flexDir==="column"&&(ee.flexBasis=ee.height);var fe=this.state.width!==ee.width,z=this.state.height!==ee.height,A=this.state.flexBasis!==ee.flexBasis,L=fe||z||A;L&&Jr.flushSync(function(){r.setState(ee)}),this.props.onResize&&L&&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:Nt(Nt({},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,a=r.handleWrapperClass,c=r.handleComponent;if(!s)return null;var h=Object.keys(s).map(function(m){return s[m]!==!1?u.jsx(gm,{direction:m,onResizeStart:n.onResizeStart,replaceStyles:o&&o[m],className:i&&i[m],children:c&&c[m]?c[m]:null},m):null});return u.jsx("div",{className:a,style:l,children:h})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,l){return km.indexOf(l)!==-1||(i[l]=n.props[l]),i},{}),s=Nt(Nt(Nt({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 u.jsxs(o,Nt({style:s,className:this.props.className},r,{ref:function(i){i&&(n.resizable=i)},children:[this.state.isResizing&&u.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 tl=function(e,t){return tl=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])},tl(e,t)};function Nm(e,t){tl(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var me=function(){return me=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},me.apply(this,arguments)};function Pm(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 Em={width:"auto",height:"auto",display:"inline-block",position:"absolute",top:0,left:0},Cm=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},_m=function(e){Nm(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 a=o.getBoundingClientRect(),c=a.left,h=a.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,k=x.top,E=o.getBoundingClientRect(),U=E.left,M=E.top,B=(P-U)/i,X=k-M;if(this.resizable){this.updateOffsetFromParent();var q=this.offsetFromParent;this.setState({bounds:{top:X-q.top,right:B+(l.offsetWidth-this.resizable.size.width)-q.left/i,bottom:X+(l.offsetHeight-this.resizable.size.height)-q.top,left:B-q.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,me(me({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDrag(n,me(me({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDrag(n,me(me({},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,me(me({},r),{x:r.x+o,y:r.y+i}));if(this.props.dragAxis==="x")return this.props.onDragStop(n,me(me({},r),{x:r.x+o,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis==="y")return this.props.onDragStop(n,me(me({},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 a=this.getParent(),c=void 0;this.props.bounds==="parent"?c=a: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)&&a 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),k=this.getOffsetHeight(c),E=r.toLowerCase().endsWith("left"),U=r.toLowerCase().endsWith("right"),M=r.startsWith("top"),B=r.startsWith("bottom");if((E||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&&!E&&!M){var X=P+(v-p)/o;this.setState({maxWidth:X>Number(g)?g:X})}if((M||E)&&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&&!E){var X=k+(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},a=-o.width,c=-o.height,h=["top","left","topLeft","bottomLeft","topRight"];h.includes(r)&&(r==="bottomLeft"?l.x+=a:(r==="topRight"||(l.x+=a),l.y+=c));var m=this.draggable.state;(l.x!==m.x||l.y!==m.y)&&Jr.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,a=i.maxHeight;this.setState({maxWidth:l,maxHeight:a}),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,a=s.getBoundingClientRect(),c=this.getDraggablePosition(),h=r.scrollLeft,m=r.scrollTop;this.offsetFromParent={left:a.left-i+h-c.x*n,top:a.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,a=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,k=r.scale,E=r.allowAnyClick,U=r.dragPositionOffset,M=Pm(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?me({},this.props.default):void 0;delete M.default;var X=s||i?{cursor:"auto"}:{cursor:"move"},q=me(me(me({},Em),X),o),se=this.offsetFromParent,K=se.left,ee=se.top,fe;l&&(fe={x:l.x-K,y:l.y-ee});var z=this.state.resizing?void 0:fe,A=this.state.resizing?"both":h;return j.createElement(hm,{ref:function(L){L&&(n.draggable=L)},handle:i?".".concat(i):void 0,defaultPosition:B,onMouseDown:a,onMouseUp:c,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:A,disabled:s,grid:m,bounds:g?this.state.bounds:void 0,position:z,enableUserSelectHack:w,cancel:S,scale:k,allowAnyClick:E,nodeRef:this.resizableElement,positionOffset:U},j.createElement(jm,me({},M,{ref:function(L){L&&(n.resizable=L,n.resizableElement.current=L.resizable)},defaultSize:B,size:this.props.size,enable:typeof f=="boolean"?Cm(f):f,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:q,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 zm(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 Tm=({projects:e,selectedProject:t,onSelectProject:n,loading:r,runningProcesses:s=[],keyboardFocusedIndex:o=-1,onKeyboardFocusChange:i,gitBranches:l})=>{if(r)return u.jsx("div",{className:"project-list-loading",children:u.jsx("p",{children:"Loading projects..."})});if(e.length===0)return u.jsxs("div",{className:"project-list-empty",children:[u.jsx("p",{children:"No projects yet"}),u.jsx("p",{className:"hint",children:"Add a project to get started"})]});const a=ao.useRef(null);return u.jsx("div",{ref:a,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=a.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 u.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:[u.jsx("div",{className:"project-item-header",children:u.jsxs("h3",{className:"project-name",children:[S&&u.jsx("span",{className:"running-indicator-dot",children:"●"}),c.name,l&&l.has(c.id)&&l.get(c.id)&&u.jsx("span",{className:"git-branch-badge",children:l.get(c.id)})]})}),u.jsx("p",{className:"project-path",children:c.description||zm(c.path)}),c.tags&&c.tags.length>0&&u.jsx("div",{className:"project-tags",children:c.tags.map(_=>u.jsx("span",{className:"project-tag",children:_},_))}),S&&u.jsxs("div",{className:"project-meta",children:[u.jsxs("span",{className:"running-count",children:[w.length," running"]}),y.length>0&&u.jsx("div",{className:"running-ports",children:y.map(_=>u.jsxs("span",{className:"port-badge",children:[":",_]},_))})]})]},c.id)})})},Rm=({urls:e,onOpenUrl:t})=>e.length===0?null:u.jsxs("div",{className:"project-urls-section",children:[u.jsx("div",{className:"section-header",children:u.jsxs("h3",{children:["Detected URLs (",e.length,")"]})}),u.jsx("div",{className:"urls-list",children:e.map((n,r)=>u.jsxs("div",{className:"url-item",children:[u.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"url-text",onClick:s=>{s.preventDefault(),window.electronAPI.openExternal(n)},children:n}),u.jsx("button",{onClick:()=>t(n),className:"btn btn-secondary btn-small",title:"Open in configured browser",children:"Open"})]},r))})]}),Dm=({project:e,workspace:t,onProjectUpdate:n,onRemoveProject:r,onOpenTerminal:s,onNavigateBack:o})=>{var ql;const[i,l]=j.useState(!1),[a,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([]),[v,x]=j.useState(!1),[P,k]=j.useState(new Set),[E,U]=j.useState([]),[M,B]=j.useState(!1),[X,q]=j.useState(!1),[se,K]=j.useState(""),[ee,fe]=j.useState([]),[z,A]=j.useState(e.tags||[]),[L,G]=j.useState(null),[b,Ee]=j.useState(null),[nt,rt]=j.useState(!1),[T,V]=j.useState("default"),[ye,Oe]=j.useState(new Map);j.useEffect(()=>{c(e.name),w(e.description||""),A(e.tags||[]),zo(),En(),W(),Ut(),cn(),Zr(),Me();const N=setInterval(()=>{W(),Zr()},5e3);return()=>clearInterval(N)},[e]);const Me=async()=>{try{const N=await st();if(!N)return;const F=await fetch(`${N}/projects/${e.id}/settings`);if(F.ok){const $=await F.json();V($.script_sort_order||"default")}}catch(N){console.error("Error loading project settings:",N)}},Le=async N=>{try{const F=await st();if(!F)return;(await fetch(`${F}/projects/${e.id}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({script_sort_order:N})})).ok&&V(N)}catch(F){console.error("Error saving project settings:",F)}},st=async()=>{const N=[38124,38125,38126,38127,38128,3001];for(const F of N)try{if((await fetch(`http://localhost:${F}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${F}/api`}catch{continue}return null},Ut=async()=>{try{const N=await st();if(!N){fe([]);return}const F=await fetch(`${N}/projects/tags`);if(!F.ok){console.error("Failed to load tags:",F.status),fe([]);return}const $=await F.json();fe(Array.isArray($)?$:[])}catch(N){console.error("Error loading tags:",N),fe([])}},cn=async()=>{try{const N=await window.electronAPI.getSettings();G(N.editor)}catch(N){console.error("Error loading editor settings:",N)}},zo=async()=>{try{p(!0);const N=await window.electronAPI.getProjectScripts(e.path);y(N)}catch(N){console.error("Error loading scripts:",N),y(null)}finally{p(!1)}},En=async()=>{try{x(!0);const N=await window.electronAPI.getProjectPorts(e.id);f(N)}catch(N){console.error("Error loading ports:",N),f([])}finally{x(!1)}},Zr=async()=>{try{rt(!0);const N=await window.electronAPI.getLatestTestResult(e.id);Ee(N)}catch{Ee(null)}finally{rt(!1)}},qr=async()=>{if(!a.trim()||a===e.name){l(!1),c(e.name);return}try{const N=await window.electronAPI.renameProject(e.id,a.trim());l(!1),n&&n(N)}catch(N){console.error("Error renaming project:",N),alert("Failed to rename project"),c(e.name)}},es=async()=>{const N=g.trim()||null;if(N===(e.description||"")){m(!1),w(e.description||"");return}try{const F=await window.electronAPI.updateProject(e.id,{description:N});m(!1),n&&n(F)}catch(F){console.error("Error updating description:",F),alert("Failed to update description"),w(e.description||"")}},R=async()=>{const N=se.trim();if(!N||z.includes(N)){K("");return}const F=[...z,N];try{const $=await window.electronAPI.updateProject(e.id,{tags:F});A(F),K(""),n&&n($),await Ut(),cn()}catch($){console.error("Error adding tag:",$),alert("Failed to add tag")}},D=async N=>{const F=z.filter($=>$!==N);try{const $=await window.electronAPI.updateProject(e.id,{tags:F});A(F),n&&n($),await Ut(),cn()}catch($){console.error("Error removing tag:",$),alert("Failed to remove tag")}},I=ee.filter(N=>!z.includes(N)&&N.toLowerCase().includes(se.toLowerCase())),W=async()=>{try{B(!0);const F=(await window.electronAPI.getRunningProcesses()).filter(St=>St.projectPath===e.path);U(F);const $=new Set(F.map(St=>St.scriptName));k($)}catch(N){console.error("Error loading running processes:",N)}finally{B(!1)}},Y=async(N,F=!0)=>{try{k($=>new Set($).add(N)),Oe($=>new Map($).set(N,Date.now())),await window.electronAPI.runScript(e.path,N,[],F),F&&setTimeout(()=>{W()},1e3)}catch($){console.error("Error running script:",$),alert(`Failed to run script: ${$ instanceof Error?$.message:String($)}`)}finally{k($=>{const St=new Set($);return St.delete(N),St})}},we=async N=>{try{await window.electronAPI.stopScript(N)?await W():alert("Failed to stop script")}catch(F){console.error("Error stopping script:",F),alert(`Failed to stop script: ${F instanceof Error?F.message:String(F)}`)}},Be=async N=>{try{await window.electronAPI.openUrl(N)}catch(F){console.error("Error opening URL:",F),alert(`Failed to open URL: ${F instanceof Error?F.message:String(F)}`)}},ke=j.useMemo(()=>{const N=new Set;for(const F of E)if(F.detectedUrls&&Array.isArray(F.detectedUrls))for(const $ of F.detectedUrls)N.add($);for(const F of d){const $=`http://localhost:${F.port}`;N.add($)}return Array.from(N).sort()},[E,d]),To=j.useMemo(()=>{if(!(S!=null&&S.scripts))return[];const N=[...S.scripts];return T==="alphabetical"?N.sort((F,$)=>F.name.localeCompare($.name)):T==="last-used"&&N.sort((F,$)=>{const St=ye.get(F.name)||0;return(ye.get($.name)||0)-St}),N},[S==null?void 0:S.scripts,T,ye]);return e.last_scanned&&new Date(e.last_scanned*1e3).toLocaleString(),u.jsxs("div",{className:"project-details",children:[t&&o&&u.jsxs("div",{className:"breadcrumb",children:[u.jsx("button",{className:"breadcrumb-link",onClick:o,children:t.name}),u.jsx("span",{className:"breadcrumb-separator",children:"/"}),u.jsx("span",{className:"breadcrumb-current",children:e.name})]}),u.jsxs("div",{className:"project-details-header",children:[u.jsxs("div",{children:[i?u.jsx("div",{className:"project-name-edit",children:u.jsx("input",{type:"text",value:a,onChange:N=>c(N.target.value),onBlur:qr,onKeyDown:N=>{N.key==="Enter"?qr():N.key==="Escape"&&(l(!1),c(e.name))},className:"project-name-input",autoFocus:!0})}):u.jsx("h2",{onClick:()=>l(!0),className:"project-name-editable",title:"Click to rename",children:e.name}),h?u.jsx("div",{className:"project-description-edit",children:u.jsx("textarea",{value:g,onChange:N=>w(N.target.value),onBlur:es,onKeyDown:N=>{N.key==="Enter"&&(N.metaKey||N.ctrlKey)?es():N.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})}):u.jsxs("div",{children:[u.jsx("p",{className:"project-description",onClick:()=>m(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),u.jsx("p",{className:"project-path",children:e.path})]})]}),u.jsxs("div",{className:"header-actions-group",children:[u.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInEditor(e.path)}catch(N){console.error("Error opening in editor:",N),alert(`Failed to open in editor: ${N instanceof Error?N.message:String(N)}`)}},className:"btn btn-secondary",title:"Open in editor",children:"Editor"}),u.jsx("button",{onClick:async()=>{try{await window.electronAPI.openInFiles(e.path)}catch(N){console.error("Error opening directory:",N),alert(`Failed to open directory: ${N instanceof Error?N.message:String(N)}`)}},className:"btn btn-secondary",title:"Open in file manager",children:"Files"})]})]}),u.jsxs("div",{className:"project-stats",children:[u.jsxs("div",{className:"stat-card",children:[u.jsx("div",{className:"stat-value",children:d.length}),u.jsx("div",{className:"stat-label",children:"Ports"})]}),u.jsxs("div",{className:"stat-card",children:[u.jsx("div",{className:"stat-value",children:((ql=S==null?void 0:S.scripts)==null?void 0:ql.length)||0}),u.jsx("div",{className:"stat-label",children:"Scripts"})]})]}),b&&u.jsxs("div",{className:"test-results-section",children:[u.jsxs("div",{className:"section-header",children:[u.jsx("h3",{children:"Latest Test Results"}),u.jsx("span",{className:"test-timestamp",children:new Date(b.timestamp*1e3).toLocaleString()})]}),u.jsxs("div",{className:"test-results-content",children:[u.jsxs("div",{className:"test-stats-grid",children:[u.jsxs("div",{className:"test-stat passed",children:[u.jsx("div",{className:"test-stat-icon",children:"✓"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:b.passed}),u.jsx("div",{className:"test-stat-label",children:"Passed"})]})]}),u.jsxs("div",{className:"test-stat failed",children:[u.jsx("div",{className:"test-stat-icon",children:"✗"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:b.failed}),u.jsx("div",{className:"test-stat-label",children:"Failed"})]})]}),b.skipped>0&&u.jsxs("div",{className:"test-stat skipped",children:[u.jsx("div",{className:"test-stat-icon",children:"⊘"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:b.skipped}),u.jsx("div",{className:"test-stat-label",children:"Skipped"})]})]}),u.jsxs("div",{className:"test-stat total",children:[u.jsx("div",{className:"test-stat-icon",children:"∑"}),u.jsxs("div",{className:"test-stat-info",children:[u.jsx("div",{className:"test-stat-value",children:b.total}),u.jsx("div",{className:"test-stat-label",children:"Total"})]})]})]}),u.jsxs("div",{className:"test-meta",children:[b.framework&&u.jsx("span",{className:"test-framework-badge",children:b.framework}),b.duration&&u.jsxs("span",{className:"test-duration",children:["⏱ ",(b.duration/1e3).toFixed(2),"s"]}),b.coverage&&u.jsxs("span",{className:"test-coverage",children:["📊 ",b.coverage.toFixed(1),"% coverage"]}),u.jsxs("span",{className:"test-script-name",children:["Script: ",b.script_name]})]})]})]}),u.jsxs("div",{className:"tags-section",children:[u.jsx("div",{className:"section-header",children:u.jsx("h3",{children:"Tags"})}),u.jsx("div",{className:"tags-content",children:u.jsxs("div",{className:"tags-list",children:[z.map(N=>u.jsxs("span",{className:"tag-item",children:[N,u.jsx("button",{onClick:()=>D(N),className:"tag-remove",title:"Remove tag",children:"×"})]},N)),X?u.jsxs("div",{className:"tag-input-wrapper",children:[u.jsx("input",{type:"text",value:se,onChange:N=>K(N.target.value),onKeyDown:N=>{N.key==="Enter"?R():N.key==="Escape"&&(q(!1),K(""))},onBlur:()=>{R(),q(!1)},className:"tag-input",placeholder:"Add tag...",autoFocus:!0}),I.length>0&&se&&u.jsx("div",{className:"tag-suggestions",children:I.slice(0,5).map(N=>u.jsx("div",{className:"tag-suggestion",onMouseDown:F=>{F.preventDefault(),K(N)},children:N},N))})]}):u.jsx("button",{onClick:()=>q(!0),className:"tag-add-btn",title:"Add tag",children:"+ Add Tag"})]})})]}),ke.length>0&&u.jsx(Rm,{urls:ke,onOpenUrl:Be}),S&&u.jsxs("div",{className:"scripts-section",children:[u.jsxs("div",{className:"section-header",children:[u.jsxs("h3",{children:["Available Scripts (",S.scripts.length,")"]}),u.jsxs("div",{className:"section-header-right",children:[u.jsx("span",{className:"project-type-badge",children:S.type}),u.jsxs("select",{value:T,onChange:N=>Le(N.target.value),className:"script-sort-select",children:[u.jsx("option",{value:"default",children:"Default"}),u.jsx("option",{value:"alphabetical",children:"Alphabetically"}),u.jsx("option",{value:"last-used",children:"Last Used"})]})]})]}),_?u.jsx("div",{className:"loading-state",children:"Loading scripts..."}):S.scripts.length===0?u.jsx("div",{className:"no-scripts",children:"No scripts found in this project."}):u.jsx("div",{className:"scripts-list",children:To.map(N=>{const F=E.filter(Ce=>Ce.scriptName===N.name),$=F.length>0,St=d.filter(Ce=>Ce.script_name===N.name).map(Ce=>Ce.port),ea=Array.from(new Set(St)).sort((Ce,ts)=>Ce-ts);return u.jsxs("div",{className:`script-item ${$?"running":""}`,children:[u.jsxs("div",{className:"script-info",children:[u.jsxs("div",{className:"script-header",children:[u.jsx("span",{className:"script-name",children:N.name}),u.jsx("span",{className:"script-command",children:N.command}),u.jsx("span",{className:"script-runner",children:N.runner})]}),$&&u.jsx("div",{className:"script-process-info",children:F.map(Ce=>{const ts=Math.floor((Date.now()-Ce.startedAt)/1e3),ta=Math.floor(ts/60),na=ts%60,Jd=ta>0?`${ta}m ${na}s`:`${na}s`,ra=Ce.detectedPorts&&Ce.detectedPorts.length>0?Ce.detectedPorts:ea;return u.jsxs("div",{className:"process-badge",children:[u.jsx("span",{className:"process-indicator",children:"●"}),u.jsxs("span",{className:"process-pid",children:["PID: ",Ce.pid]}),u.jsx("span",{className:"process-uptime",children:Jd}),ra.length>0&&u.jsxs("span",{className:"process-port",children:[":",ra.join(", ")]}),u.jsx("button",{onClick:Ro=>{Ro.stopPropagation(),s&&s(Ce.pid,N.name,e.name)},className:"btn btn-secondary btn-tiny",title:"View terminal output",children:u.jsx("span",{className:"terminal-icon",children:"⌘"})}),u.jsx("button",{onClick:Ro=>{Ro.stopPropagation(),we(Ce.pid)},className:"btn btn-danger btn-tiny",title:"Stop process",children:"Stop"})]},Ce.pid)})})]}),u.jsx("div",{className:"script-actions",children:!$&&u.jsx("button",{onClick:()=>Y(N.name,!0),className:"btn btn-secondary btn-small",title:"Run in background",children:"Run"})})]},N.name)})})]}),u.jsxs("div",{className:"jenkins-placeholder",children:[u.jsx("h3",{children:"Jenkins Integration"}),u.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&&u.jsxs("div",{className:"danger-zone",children:[u.jsx("h3",{children:"Danger Zone"}),u.jsx("p",{className:"danger-zone-text",children:"Once you delete a project, there is no going back. Please be certain."}),u.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"})]})]})},Om=({onAdd:e,onClose:t})=>{const[n,r]=j.useState(""),[s,o]=j.useState(!1),i=async()=>{try{const a=await window.electronAPI.selectDirectory();a&&r(a)}catch(a){console.error("Error selecting directory:",a)}},l=async a=>{if(a.preventDefault(),!n.trim()){alert("Please select a project directory");return}try{o(!0),await e(n)}catch{}finally{o(!1)}};return u.jsx("div",{className:"modal-overlay",onClick:t,children:u.jsxs("div",{className:"modal-content",onClick:a=>a.stopPropagation(),children:[u.jsxs("div",{className:"modal-header",children:[u.jsx("h2",{children:"Add Project"}),u.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),u.jsxs("form",{onSubmit:l,children:[u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"project-path",children:"Project Directory"}),u.jsxs("div",{className:"path-input-group",children:[u.jsx("input",{id:"project-path",type:"text",value:n,onChange:a=>r(a.target.value),placeholder:"Select or enter project directory path",disabled:s}),u.jsx("button",{type:"button",onClick:i,disabled:s,className:"btn btn-secondary",children:"Browse"})]})]}),u.jsxs("div",{className:"modal-actions",children:[u.jsx("button",{type:"button",onClick:t,disabled:s,className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:s||!n.trim(),className:"btn btn-primary",children:s?"Adding...":"Add Project"})]})]})]})})},Mm=({onSearchChange:e,onSortChange:t,searchInputRef:n})=>{const[r,s]=j.useState(""),[o,i]=j.useState("all"),[l,a]=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=>{a(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 u.jsx("div",{className:"project-search",children:u.jsxs("div",{className:"search-input-group",ref:m,children:[u.jsxs("div",{className:"search-input-wrapper",children:[u.jsx("input",{ref:w,type:"text",placeholder:"Search projects... (⌘/)",value:r,onChange:S,className:"search-input"}),u.jsx("button",{className:"sort-icon-btn",onClick:()=>h(!c),title:"Sort options",tabIndex:0,children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:u.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),c&&u.jsx("div",{className:"sort-menu",children:_.map(p=>u.jsxs("div",{className:`sort-menu-item ${l===p.value?"active":""}`,onClick:()=>y(p.value),children:[p.label,l===p.value&&u.jsx("span",{className:"checkmark",children:"✓"})]},p.value))})]})})},Lm=({onClose:e})=>{const[t,n]=j.useState({editor:{type:"vscode"},browser:{type:"chrome"}}),[r,s]=j.useState(!0),[o,i]=j.useState(!1),[l,a]=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(y)}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?u.jsx("div",{className:"settings-overlay",children:u.jsx("div",{className:"settings-modal",children:u.jsx("div",{className:"loading-state",children:"Loading settings..."})})}):u.jsxs("div",{className:"settings-container",children:[u.jsxs("div",{className:"settings-header",children:[u.jsx("h2",{children:"Settings"}),u.jsx("button",{type:"button",onClick:e,className:"btn btn-secondary",children:"Close"})]}),u.jsxs("div",{className:"settings-content",children:[u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Editor"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Editor Type"}),u.jsxs("select",{value:t.editor.type,onChange:y=>w(y.target.value),className:"settings-select",children:[u.jsx("option",{value:"vscode",children:"VS Code"}),u.jsx("option",{value:"cursor",children:"Cursor"}),u.jsx("option",{value:"windsurf",children:"Windsurf"}),u.jsx("option",{value:"zed",children:"Zed"}),u.jsx("option",{value:"custom",children:"Custom"})]})]}),t.editor.type==="custom"&&u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Custom Editor Path"}),u.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"})]})]}),u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Browser"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Browser Type"}),u.jsxs("select",{value:t.browser.type,onChange:y=>S(y.target.value),className:"settings-select",children:[u.jsx("option",{value:"chrome",children:"Chrome"}),u.jsx("option",{value:"firefox",children:"Firefox"}),u.jsx("option",{value:"safari",children:"Safari"}),u.jsx("option",{value:"edge",children:"Edge"}),u.jsx("option",{value:"custom",children:"Custom"})]})]}),t.browser.type==="custom"&&u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Custom Browser Path"}),u.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"})]})]}),u.jsxs("div",{className:"settings-section",children:[u.jsx("h3",{children:"Backup & Restore"}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Create Backup"}),u.jsx("p",{className:"settings-description",children:"Create a backup of all PROJAX data"}),u.jsx("button",{onClick:async()=>{try{a(!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{a(!1)}},disabled:l,className:"btn btn-secondary",children:l?"Creating...":"Create Backup"})]}),u.jsxs("div",{className:"settings-field",children:[u.jsx("label",{children:"Restore from Backup"}),u.jsx("p",{className:"settings-description",children:"Restore PROJAX data from a backup file"}),u.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"})]})]})]}),u.jsx("div",{className:"settings-footer",children:u.jsx("button",{type:"button",onClick:g,disabled:o,className:"btn btn-primary",children:o?"Saving...":"Save Settings"})})]})},Am=({children:e})=>u.jsxs("div",{className:"app-header",children:[u.jsx("h1",{className:"app-logo",children:"PROJAX"}),e]}),Im=({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 a=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)}};a();const h=setInterval(()=>{r&&c(r)},5e3);return()=>clearInterval(h)},[r]),u.jsx("div",{className:"status-bar",children:u.jsxs("div",{className:"status-bar-content",children:[u.jsxs("div",{className:"status-version",children:["v",o]}),u.jsxs("div",{className:"status-right",children:[u.jsxs("div",{className:"status-indicator",children:[u.jsx("span",{className:`status-dot ${t?"connected":"disconnected"}`}),u.jsx("span",{className:"status-text",children:t?"API Connected":"API Disconnected"})]}),r&&u.jsxs("div",{className:"api-port",children:["Port: ",r]})]})]})})},Fm=({pid:e,scriptName:t,projectName:n,onClose:r})=>{const[s,o]=j.useState([]),[i,l]=j.useState(!1),a=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&&a.current&&(a.current.scrollTop=a.current.scrollHeight)},[s,c]);const m=()=>{if(a.current){const{scrollTop:S,scrollHeight:y,clientHeight:_}=a.current,p=y-S-_<50;h(p)}},g=()=>{o([])},w=()=>{a.current&&(a.current.scrollTop=a.current.scrollHeight,h(!0))};return u.jsxs("div",{className:"terminal-sidebar",children:[u.jsxs("div",{className:"terminal-header",children:[u.jsxs("div",{className:"terminal-title-row",children:[u.jsxs("div",{className:"terminal-title-content",children:[u.jsx("span",{className:`terminal-status-indicator ${i?"running":"stopped"}`,children:i?"●":"○"}),u.jsxs("div",{className:"terminal-info",children:[u.jsx("span",{className:"terminal-script",children:t}),u.jsx("span",{className:"terminal-project",children:n})]})]}),u.jsxs("div",{className:"terminal-meta",children:[u.jsx("span",{className:`terminal-status-badge ${i?"running":"stopped"}`,children:i?"Running":"Stopped"}),u.jsxs("span",{className:"terminal-pid",children:["PID: ",e]})]})]}),u.jsxs("div",{className:"terminal-toolbar",children:[u.jsx("button",{onClick:g,className:"btn btn-secondary btn-tiny",title:"Clear output",children:"Clear"}),!c&&u.jsx("button",{onClick:w,className:"btn btn-secondary btn-tiny",title:"Scroll to bottom",children:"↓ Bottom"}),u.jsx("button",{onClick:r,className:"btn btn-danger btn-tiny",title:"Close terminal",children:"Close"})]})]}),u.jsx("div",{ref:a,className:"terminal-output",onScroll:m,children:s.length===0?u.jsxs("div",{className:"terminal-empty",children:[u.jsx("div",{className:"terminal-empty-icon",children:"⌘"}),u.jsx("div",{className:"terminal-empty-text",children:"Waiting for output..."}),u.jsxs("div",{className:"terminal-empty-hint",children:["Process PID ",e]})]}):s.map((S,y)=>u.jsx("div",{className:"terminal-line",children:S},y))})]})},Wm=({activeTab:e,onTabChange:t})=>u.jsxs("div",{className:"tab-bar",children:[u.jsx("button",{className:`tab-button ${e==="projects"?"active":""}`,onClick:()=>t("projects"),children:"Projects"}),u.jsx("button",{className:`tab-button ${e==="workspaces"?"active":""}`,onClick:()=>t("workspaces"),children:"Workspaces"})]});function Um(e){const t=e.split("/").filter(Boolean);return t.length===0?e:t[t.length-1]}const Bm=({workspaces:e,selectedWorkspace:t,onSelectWorkspace:n,loading:r,keyboardFocusedIndex:s=-1,onKeyboardFocusChange:o,workspaceProjects:i})=>{if(r)return u.jsx("div",{className:"workspace-list-loading",children:u.jsx("p",{children:"Loading workspaces..."})});if(e.length===0)return u.jsxs("div",{className:"workspace-list-empty",children:[u.jsx("p",{children:"No workspaces yet"}),u.jsx("p",{className:"hint",children:"Add a workspace to get started"})]});const l=ao.useRef(null);return u.jsx("div",{ref:l,className:"workspace-list",role:"listbox","aria-label":"Workspaces",tabIndex:0,onFocus:a=>{s<0&&e.length>0&&o&&o(0)},onBlur:a=>{var c;o&&!((c=l.current)!=null&&c.contains(a.relatedTarget))&&o(-1)},children:e.map((a,c)=>{const h=(t==null?void 0:t.id)===a.id,m=s===c,g=(i==null?void 0:i.get(a.id))||0;return u.jsxs("div",{className:`workspace-item ${h?"selected":""} ${m?"keyboard-focused":""}`,onClick:()=>n(a),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:[u.jsxs("div",{className:"workspace-item-header",children:[u.jsx("div",{className:"workspace-name-wrapper",children:u.jsx("h3",{className:"workspace-name",children:a.name})}),g>0&&u.jsx("span",{className:"workspace-project-count",children:g})]}),a.description&&u.jsx("p",{className:"workspace-description",children:a.description}),u.jsx("p",{className:"workspace-path",children:Um(a.workspace_file_path)}),a.tags&&a.tags.length>0&&u.jsx("div",{className:"workspace-tags",children:a.tags.map(w=>u.jsx("span",{className:"workspace-tag",children:w},w))})]},a.id)})})},$m=({workspace:e,onWorkspaceUpdate:t,onRemoveWorkspace:n,onOpenWorkspace:r,onSelectProject:s})=>{const[o,i]=j.useState(!1),[l,a]=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([]),[k,E]=j.useState([]),[U,M]=j.useState(!1),[B,X]=j.useState(null),[q,se]=j.useState(!1),[K,ee]=j.useState("");j.useEffect(()=>{e&&(a(e.name),g(e.description||""),v(e.tags||[]),i(!1),h(!1),z(),fe())},[e==null?void 0:e.id]);const fe=async()=>{try{const T=await fetch("http://localhost:3001/api/projects/tags");if(T.ok){const V=await T.json();d(Array.isArray(V)?V:[])}}catch(T){console.error("Error loading tags:",T)}},z=async()=>{if(e)try{M(!0);const T=[38124,38125,38126,38127,38128,3001];let V="";for(const Oe of T)try{if((await fetch(`http://localhost:${Oe}/health`,{signal:AbortSignal.timeout(500)})).ok){V=`http://localhost:${Oe}/api`;break}}catch{continue}if(!V){M(!1);return}const ye=await fetch(`${V}/workspaces/${e.id}/projects`);if(ye.ok){const Oe=await ye.json();P(Oe);const Me=await window.electronAPI.getProjects(),Le=Oe.map(st=>{const Ut=Me.find(cn=>cn.path===st.project_path);return{tracked:!!Ut,project:Ut,path:st.project_path}});E(Le)}}catch(T){console.error("Error loading workspace projects:",T)}finally{M(!1)}};if(!e)return u.jsx("div",{className:"workspace-details-empty",children:u.jsx("p",{children:"Select a workspace to view details"})});const A=async()=>{const T=[38124,38125,38126,38127,38128,3001];for(const V of T)try{if((await fetch(`http://localhost:${V}/health`,{signal:AbortSignal.timeout(500)})).ok)return`http://localhost:${V}/api`}catch{continue}return null},L=async()=>{try{const T=await A();if(!T)return;const V=await fetch(`${T}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l})});if(V.ok){const ye=await V.json();t&&t(ye),i(!1)}}catch(T){console.error("Error updating workspace name:",T)}},G=async()=>{try{const T=await A();if(!T)return;const V=await fetch(`${T}/workspaces/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:m})});if(V.ok){const ye=await V.json();t&&t(ye),h(!1)}}catch(T){console.error("Error updating workspace description:",T)}},b=()=>{const T="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";let V="";for(let ye=0;ye<6;ye++)V+=T.charAt(Math.floor(Math.random()*T.length));return V},[Ee]=j.useState(b()),nt=()=>{e&&K===Ee&&(n&&n(e.id),se(!1),ee(""))},rt=async T=>{try{X(T);const V=await window.electronAPI.addProject(T);await z()}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 u.jsxs("div",{className:"workspace-details",children:[u.jsxs("div",{className:"workspace-details-header",children:[u.jsxs("div",{children:[o?u.jsx("div",{className:"workspace-name-edit",children:u.jsx("input",{type:"text",value:l,onChange:T=>a(T.target.value),onBlur:L,onKeyDown:T=>{T.key==="Enter"&&L(),T.key==="Escape"&&(a(e.name),i(!1))},autoFocus:!0,className:"workspace-name-input"})}):u.jsx("h2",{className:"workspace-name-editable",onClick:()=>i(!0),title:"Click to rename",children:e.name}),c?u.jsx("div",{className:"workspace-description-edit",children:u.jsx("textarea",{value:m,onChange:T=>g(T.target.value),onBlur:G,onKeyDown:T=>{T.key==="Enter"&&(T.metaKey||T.ctrlKey)?G():T.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)"})}):u.jsxs("div",{children:[u.jsx("p",{className:"workspace-description",onClick:()=>h(!0),title:"Click to edit description",children:e.description||"Click to add a description..."}),u.jsx("p",{className:"workspace-path",children:e.workspace_file_path})]})]}),u.jsx("div",{className:"header-actions-group",children:u.jsx("button",{type:"button",onClick:()=>r&&r(e),className:"btn btn-secondary",title:"Open workspace in editor",children:"Editor"})})]}),u.jsxs("div",{className:"workspace-section",children:[u.jsxs("h3",{children:["Workspace Projects (",k.length,")"]}),U?u.jsxs("div",{className:"loading-spinner",children:[u.jsx("div",{className:"spinner"}),u.jsx("p",{children:"Loading projects..."})]}):k.length===0?u.jsx("div",{className:"empty-state",children:u.jsx("p",{children:"No projects in this workspace"})}):u.jsx("div",{className:"workspace-projects-list",children:k.map((T,V)=>{const ye=Me=>{const Le=Me.split("/").filter(Boolean);if(Le.length===0)return Me;const st=Le[Le.length-1];return st==="src"&&Le.length>1?Le[Le.length-2]:st},Oe=T.tracked&&T.project?T.project.name:T.path.split("/").filter(Boolean).pop()||T.path;return u.jsxs("div",{className:`workspace-project-tile ${T.tracked?"":"untracked"}`,onClick:()=>T.tracked&&T.project&&s&&s(T.project),children:[u.jsx("div",{className:"project-tile-header",children:u.jsxs("h3",{className:"project-tile-name",children:[!T.tracked&&u.jsx("span",{className:"untracked-badge",children:"Not in PROJAX"}),Oe]})}),u.jsx("p",{className:"project-tile-path",children:T.tracked&&T.project?T.project.description||ye(T.project.path):T.path}),T.tracked&&T.project&&T.project.tags&&T.project.tags.length>0&&u.jsx("div",{className:"project-tile-tags",children:T.project.tags.map(Me=>u.jsx("span",{className:"project-tile-tag",children:Me},Me))}),!T.tracked&&u.jsx("div",{className:"project-tile-actions",children:u.jsx("button",{type:"button",className:"btn-add-project",onClick:Me=>{Me.stopPropagation(),rt(T.path)},disabled:B===T.path,children:B===T.path?"Adding...":"Add to PROJAX"})})]},T.tracked?T.project.id:V)})})]}),n&&u.jsxs("div",{className:"danger-zone",children:[u.jsx("h3",{children:"Danger Zone"}),u.jsx("p",{className:"danger-zone-text",children:"Once you delete this workspace, there is no going back. Please be certain."}),u.jsx("button",{type:"button",onClick:()=>se(!0),className:"btn btn-danger",title:"Delete workspace",children:"Delete Workspace"})]}),q&&u.jsx("div",{className:"modal-overlay",onClick:()=>{se(!1),ee("")},children:u.jsxs("div",{className:"modal-content",onClick:T=>T.stopPropagation(),children:[u.jsx("h3",{children:"Delete Workspace"}),u.jsxs("p",{className:"modal-warning",children:["This will permanently delete the workspace ",u.jsxs("strong",{children:['"',e.name,'"']})," from PROJAX.",u.jsx("br",{}),u.jsx("br",{}),"The workspace file will ",u.jsx("strong",{children:"not"})," be deleted from your filesystem."]}),u.jsxs("p",{className:"modal-instruction",children:["Type ",u.jsx("code",{className:"confirmation-code",children:Ee})," to confirm:"]}),u.jsx("input",{type:"text",value:K,onChange:T=>ee(T.target.value),placeholder:"Enter confirmation code",className:"confirmation-input",autoFocus:!0}),u.jsxs("div",{className:"modal-actions",children:[u.jsx("button",{type:"button",onClick:()=>{se(!1),ee("")},className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{type:"button",onClick:nt,className:"btn btn-danger",disabled:K!==Ee,children:"Delete Workspace"})]})]})})]})},bm=({onAdd:e,onClose:t,existingProjects:n=[]})=>{const[r,s]=j.useState("import"),[o,i]=j.useState(""),[l,a]=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 k of f)try{if((await fetch(`http://localhost:${k}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${k}/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 k=x.headers.get("content-type");if(k&&k.includes("application/json")){const E=await x.json();throw new Error(E.error||"Failed to import workspace")}else{const E=await x.text();throw new Error(`Server returned ${x.status}: ${E.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 k of f)try{if((await fetch(`http://localhost:${k}/health`,{signal:AbortSignal.timeout(500)})).ok){v=`http://localhost:${k}/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 k=x.headers.get("content-type");if(k&&k.includes("application/json")){const E=await x.json();throw new Error(E.error||"Failed to create workspace")}else{const E=await x.text();throw new Error(`Server returned ${x.status}: ${E.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 u.jsx("div",{className:"modal-overlay",onClick:t,children:u.jsxs("div",{className:"modal-content workspace-modal",onClick:d=>d.stopPropagation(),children:[u.jsxs("div",{className:"modal-header",children:[u.jsx("h2",{children:"Add Workspace"}),u.jsx("button",{className:"modal-close",onClick:t,children:"×"})]}),u.jsxs("div",{className:"workspace-mode-selector",children:[u.jsx("button",{type:"button",className:`mode-button ${r==="import"?"active":""}`,onClick:()=>s("import"),children:"Import from File"}),u.jsx("button",{type:"button",className:`mode-button ${r==="create"?"active":""}`,onClick:()=>s("create"),children:"Create New"})]}),u.jsxs("form",{onSubmit:p,children:[r==="import"?u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-file",children:"Workspace File (.code-workspace)"}),u.jsxs("div",{className:"path-input-group",children:[u.jsx("input",{id:"workspace-file",type:"text",value:o,onChange:d=>i(d.target.value),placeholder:"Select workspace file",disabled:w}),u.jsx("button",{type:"button",onClick:y,disabled:w,className:"btn btn-secondary",children:"Browse"})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-name",children:"Workspace Name *"}),u.jsx("input",{id:"workspace-name",type:"text",value:l,onChange:d=>a(d.target.value),placeholder:"My Workspace",disabled:w,required:!0})]}),u.jsxs("div",{className:"form-group",children:[u.jsx("label",{htmlFor:"workspace-description",children:"Description"}),u.jsx("textarea",{id:"workspace-description",value:c,onChange:d=>h(d.target.value),placeholder:"Optional description",disabled:w,rows:3})]}),u.jsx("div",{className:"form-group",children:u.jsx("p",{className:"form-hint",style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"0.5rem"},children:"Workspace files are automatically stored in ~/.projax/workspaces/"})}),u.jsxs("div",{className:"form-group",children:[u.jsx("label",{children:"Add Projects"}),u.jsx("div",{className:"projects-selector",children:n.length===0?u.jsx("p",{className:"empty-state",children:"No projects available"}):n.map(d=>u.jsxs("label",{className:"project-checkbox",children:[u.jsx("input",{type:"checkbox",checked:m.includes(d.path),onChange:()=>_(d.path),disabled:w}),u.jsx("span",{children:d.name})]},d.id))})]})]}),u.jsxs("div",{className:"modal-actions",children:[u.jsx("button",{type:"button",onClick:t,disabled:w,className:"btn btn-secondary",children:"Cancel"}),u.jsx("button",{type:"submit",disabled:w,className:"btn btn-primary",children:w?"Adding...":r==="import"?"Import":"Create"})]})]})]})})},Hm=({onSearchChange:e,onSortChange:t})=>{const[n,r]=j.useState(""),[s,o]=j.useState("name-asc"),[i,l]=j.useState(!1),a=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=>{a.current&&!a.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 u.jsx("div",{className:"project-search",children:u.jsxs("div",{className:"search-input-group",ref:a,children:[u.jsxs("div",{className:"search-input-wrapper",children:[u.jsx("input",{ref:c,type:"text",placeholder:"Search workspaces...",value:n,onChange:h,className:"search-input"}),u.jsx("button",{type:"button",className:"sort-icon-btn",onClick:()=>l(!i),title:"Sort options",tabIndex:0,children:u.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",children:u.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),i&&u.jsx("div",{className:"sort-menu",children:g.map(w=>u.jsxs("div",{className:`sort-menu-item ${s===w.value?"active":""}`,onClick:()=>m(w.value),children:[w.label,s===w.value&&u.jsx("span",{className:"checkmark",children:"✓"})]},w.value))})]})})};function Vm(){const[e,t]=j.useState([]),[n,r]=j.useState(null),[s,o]=j.useState(!0),[i,l]=j.useState(!1),[a,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=ao.useRef(null),[x,P]=j.useState(280),[k,E]=j.useState(550),[U,M]=j.useState(null),[B,X]=j.useState("projects"),[q,se]=j.useState([]),[K,ee]=j.useState(null),[fe,z]=j.useState(!1),[A,L]=j.useState(!1),[G,b]=j.useState(new Map),[Ee,nt]=j.useState(new Map),[rt,T]=j.useState(""),[V,ye]=j.useState("name-asc");j.useEffect(()=>{r(null)},[B]),j.useEffect(()=>{Oe(),Le(),Me();const R=setInterval(()=>{Me(),st()},5e3);return()=>clearInterval(R)},[]),j.useEffect(()=>{e.length>0&&st()},[e]);const Oe=async()=>{try{o(!0);const R=await window.electronAPI.getProjects();t(R),R.length===0&&console.log('No projects found. Use "Add Project" to add one.')}catch(R){console.error("Error loading projects:",R),alert(`Error loading projects: ${R instanceof Error?R.message:String(R)}
|
|
62
|
+
|
|
63
|
+
Check the console for more details.`)}finally{o(!1)}},Me=async()=>{try{const R=await window.electronAPI.getRunningProcesses();p(R)}catch(R){console.error("Error loading running processes:",R)}},Le=async()=>{try{z(!0);const R=[38124,38125,38126,38127,38128,3001];let D="";for(const W of R)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){D=`http://localhost:${W}/api`;break}}catch{continue}if(!D){z(!1);return}const I=await fetch(`${D}/workspaces`);if(I.ok){const W=I.headers.get("content-type");if(W&&W.includes("application/json")){const Y=await I.json();se(Y);const we=new Map;await Promise.all(Y.map(async Be=>{try{const ke=await fetch(`${D}/workspaces/${Be.id}/projects`);if(ke.ok){const To=await ke.json();we.set(Be.id,To.length)}}catch(ke){console.error(`Error loading projects for workspace ${Be.id}:`,ke)}})),nt(we)}else{const Y=await I.text();throw console.error("API returned non-JSON response:",Y.substring(0,200)),new Error("API server returned invalid response (not JSON)")}}else{const W=I.headers.get("content-type");if(W&&W.includes("application/json")){const Y=await I.json();console.error("API error:",Y)}else{const Y=await I.text();console.error("API error (non-JSON):",Y.substring(0,200))}}}catch(R){console.error("Error loading workspaces:",R)}finally{z(!1)}},st=async()=>{try{const R=new Map,D=[38124,38125,38126,38127,38128,3001];let I="";for(const W of D)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){I=`http://localhost:${W}/api`;break}}catch{continue}if(!I){for(const W of e)R.set(W.id,null);b(R);return}for(const W of e)try{const Y=await fetch(`${I}/projects/${W.id}/git-branch`);if(Y.ok){const we=await Y.json();R.set(W.id,we.branch)}else R.set(W.id,null)}catch{R.set(W.id,null)}b(R)}catch(R){console.error("Error updating git branches:",R)}},Ut=async R=>{try{const D=await window.electronAPI.addProject(R);await Oe(),l(!1),await window.electronAPI.scanProject(D.id),await Oe()}catch(D){console.error("Error adding project:",D),alert(D instanceof Error?D.message:"Failed to add project")}},cn=async R=>{if(confirm("Are you sure you want to remove this project?"))try{await window.electronAPI.removeProject(R),(n==null?void 0:n.id)===R&&r(null),await Oe()}catch(D){console.error("Error removing project:",D),alert("Failed to remove project")}},zo=(R,D)=>{c(R),m(D)},En=j.useMemo(()=>{let R=e;if(a.trim()){const I=a.toLowerCase().trim();R=e.filter(W=>{switch(h){case"name":return W.name.toLowerCase().includes(I);case"path":return W.path.toLowerCase().includes(I);case"ports":return!1;case"running":return I==="running"||I==="not running";case"all":default:return W.name.toLowerCase().includes(I)||W.path.toLowerCase().includes(I)||W.tags&&W.tags.some(Y=>Y.toLowerCase().includes(I))}})}const D=[...R];switch(g){case"name-asc":D.sort((I,W)=>I.name.localeCompare(W.name));break;case"name-desc":D.sort((I,W)=>W.name.localeCompare(I.name));break;case"recent":D.sort((I,W)=>(W.last_scanned||0)-(I.last_scanned||0));break;case"oldest":D.sort((I,W)=>I.created_at-W.created_at);break;case"running":D.sort((I,W)=>{const Y=_.filter(Be=>Be.projectPath===I.path).length;return _.filter(Be=>Be.projectPath===W.path).length-Y});break}return D},[e,a,h,g,_]),Zr=j.useMemo(()=>{let R=q;if(rt.trim()){const D=rt.toLowerCase().trim();R=q.filter(I=>I.name.toLowerCase().includes(D)||I.description&&I.description.toLowerCase().includes(D)||I.workspace_file_path.toLowerCase().includes(D))}return R=[...R].sort((D,I)=>{switch(V){case"name-asc":return D.name.localeCompare(I.name);case"name-desc":return I.name.localeCompare(D.name);case"recent":return(I.id||0)-(D.id||0);case"projects":const W=Ee.get(D.id)||0;return(Ee.get(I.id)||0)-W;default:return 0}}),R},[q,rt,V,Ee]);j.useEffect(()=>{const R=D=>{var Be;if((D.metaKey||D.ctrlKey)&&D.key===","){D.preventDefault(),y(!0);return}if((D.metaKey||D.ctrlKey)&&D.key==="/"){D.preventDefault(),(Be=v.current)==null||Be.focus();return}const I=D.target;if(I.tagName==="INPUT"||I.tagName==="TEXTAREA")return;const W=document.querySelector(".project-list"),Y=W&&(W===I||W.contains(I)||I.closest(".project-item")!==null);if(!Y&&(D.key==="ArrowDown"||D.key==="ArrowUp"))return;const we=En;if(D.key==="ArrowDown"&&Y){D.preventDefault();const ke=d<we.length-1?d+1:we.length>0?0:-1;ke>=0&&(f(ke),r(we[ke]))}else if(D.key==="ArrowUp"&&Y){D.preventDefault();const ke=d>0?d-1:we.length>0?we.length-1:-1;ke>=0&&(f(ke),r(we[ke]))}else D.key==="Enter"&&d>=0&&d<we.length&&Y?(D.preventDefault(),r(we[d])):D.key==="Escape"&&Y&&f(-1)};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[d,En]),j.useEffect(()=>{f(-1)},[En.length,a]);const qr=(R,D,I)=>{M({pid:R,scriptName:D,projectName:I})},es=()=>{M(null)};return u.jsxs("div",{className:"app",children:[u.jsx(Am,{children:u.jsxs("div",{className:"header-actions",children:[u.jsx("button",{type:"button",onClick:()=>y(!0),className:"btn-link",title:"Settings",children:"Settings"}),B==="projects"?u.jsx("button",{type:"button",onClick:()=>l(!0),className:"btn-link btn-link-primary",children:"+ Add Project"}):u.jsx("button",{type:"button",onClick:()=>L(!0),className:"btn-link btn-link-primary",children:"+ Add Workspace"})]})}),u.jsxs("div",{className:"app-content",children:[u.jsx(_m,{size:{width:x,height:"100%"},minWidth:200,maxWidth:600,disableDragging:!0,enableResizing:{right:!0},onResizeStop:(R,D,I,W)=>{const Y=x+W.width;P(Math.max(200,Math.min(600,Y)))},style:{position:"relative",display:"flex",flexDirection:"column"},resizeHandleStyles:{right:{width:"4px",right:"-2px",cursor:"col-resize",backgroundColor:"transparent"}},children:u.jsxs("aside",{className:"sidebar",style:{width:"100%",height:"100%"},children:[u.jsx(Wm,{activeTab:B,onTabChange:X}),B==="projects"?u.jsxs(u.Fragment,{children:[u.jsx(Mm,{onSearchChange:zo,onSortChange:w,searchInputRef:v}),u.jsx(Tm,{projects:En,selectedProject:n,onSelectProject:r,loading:s,runningProcesses:_,keyboardFocusedIndex:d,onKeyboardFocusChange:f,gitBranches:G})]}):u.jsxs(u.Fragment,{children:[u.jsx(Hm,{onSearchChange:T,onSortChange:ye}),u.jsx(Bm,{workspaces:Zr,selectedWorkspace:K,onSelectWorkspace:R=>{r(null),setTimeout(()=>{ee(R)},0)},loading:fe,keyboardFocusedIndex:d,onKeyboardFocusChange:f,workspaceProjects:Ee})]})]})}),u.jsx("main",{className:"main-content",children:S?u.jsx(Lm,{onClose:()=>y(!1)}):n?u.jsx(Dm,{project:n,workspace:B==="workspaces"?K:void 0,onProjectUpdate:R=>{r(R),Oe()},onRemoveProject:cn,onOpenTerminal:qr,onNavigateBack:B==="workspaces"&&K?()=>{r(null)}:void 0}):B==="workspaces"&&K?u.jsx($m,{workspace:K,onWorkspaceUpdate:R=>{ee(R),Le()},onRemoveWorkspace:async R=>{try{const D=[38124,38125,38126,38127,38128,3001];let I="";for(const W of D)try{if((await fetch(`http://localhost:${W}/health`,{signal:AbortSignal.timeout(500)})).ok){I=`http://localhost:${W}/api`;break}}catch{continue}I&&await fetch(`${I}/workspaces/${R}`,{method:"DELETE"}),(K==null?void 0:K.id)===R&&ee(null),await Le()}catch(D){console.error("Error removing workspace:",D),alert("Failed to remove workspace")}},onOpenWorkspace:async R=>{try{await window.electronAPI.openWorkspace(R.id)}catch(D){console.error("Error opening workspace:",D),alert(`Failed to open workspace: ${D instanceof Error?D.message:"Unknown error"}`)}},onSelectProject:R=>{r(R)}}):u.jsxs("div",{className:"empty-state",children:[u.jsxs("h2",{children:["Select ",B==="projects"?"a project":"a workspace"," to view details"]}),u.jsxs("p",{children:["Choose ",B==="projects"?"a project":"a workspace"," from the sidebar to see its information."]})]})}),U&&u.jsxs("div",{style:{width:`${k}px`,minWidth:"350px",maxWidth:"800px",height:"100%",position:"relative",flexShrink:0,display:"flex",flexDirection:"column"},children:[u.jsx("div",{style:{position:"absolute",left:"-2px",top:0,bottom:0,width:"4px",cursor:"col-resize",zIndex:10},onMouseDown:R=>{R.preventDefault();const D=R.clientX,I=k,W=we=>{const Be=D-we.clientX,ke=Math.max(350,Math.min(800,I+Be));E(ke)},Y=()=>{document.removeEventListener("mousemove",W),document.removeEventListener("mouseup",Y)};document.addEventListener("mousemove",W),document.addEventListener("mouseup",Y)}}),u.jsx(Fm,{pid:U.pid,scriptName:U.scriptName,projectName:U.projectName,onClose:es})]})]}),i&&u.jsx(Om,{onAdd:Ut,onClose:()=>l(!1)}),A&&u.jsx(bm,{onAdd:async R=>{await Le(),L(!1),ee(R)},onClose:()=>L(!1),existingProjects:e}),u.jsx(Im,{})]})}const Kd=[{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}],Gd=[{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}],Xm=[{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]}],Qm={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"}]},Ym=[{id:1,project_id:1,port:3e3,script_name:"dev",config_source:"package.json",last_detected:Date.now()-3e5,created_at:Date.now()-864e5}],hr=[{id:1,project_id:1,file_path:"/Users/dev/my-react-app/src/App.test.tsx",framework:"vitest",status:null,last_run:null},{id:2,project_id:1,file_path:"/Users/dev/my-react-app/src/components/Button.test.tsx",framework:"vitest",status:null,last_run:null}];let kt=[...Kd],mr=[...Gd],ft=[...Xm],As=new Map;As.set(1,Ym);const J=(e=300)=>new Promise(t=>setTimeout(t,e)),Km=()=>({getProjects:async()=>(await J(),[...kt]),addProject:async e=>{await J();const t={id:Math.max(...kt.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 kt.push(t),t},removeProject:async e=>{await J(),kt=kt.filter(t=>t.id!==e)},scanProject:async e=>{await J(1e3);const t=kt.find(n=>n.id===e);if(!t)throw new Error("Project not found");return{project:t,testsFound:hr.filter(n=>n.project_id===e).length,tests:hr.filter(n=>n.project_id===e)}},scanAllProjects:async()=>(await J(2e3),kt.map(e=>({project:e,testsFound:hr.filter(t=>t.project_id===e.id).length,tests:hr.filter(t=>t.project_id===e.id)}))),getTests:async e=>(await J(),hr.filter(t=>t.project_id===e)),selectDirectory:async()=>(await J(),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 J();const n=kt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return n.name=t,{...n}},updateProject:async(e,t)=>{await J();const n=kt.find(r=>r.id===e);if(!n)throw new Error("Project not found");return t.description!==void 0&&(n.description=t.description),{...n}},getProjectScripts:async e=>(await J(),Qm),runScript:async(e,t,n,r)=>{await J(500);const s=kt.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:[]};ft.push(o)}return{success:!0,background:r||!1}},scanProjectPorts:async e=>(await J(1e3),As.get(e)||[]),scanAllPorts:async()=>{await J(2e3);const e={};return As.forEach((t,n)=>{e[n]=t}),e},getProjectPorts:async e=>(await J(),As.get(e)||[]),getRunningProcesses:async()=>(await J(),[...ft]),stopScript:async e=>(await J(),ft=ft.filter(t=>t.pid!==e),!0),stopProject:async e=>{await J();const t=ft.filter(n=>n.projectPath===e).length;return ft=ft.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 J(),{editor:{type:"vscode"},browser:{type:"default"}}),saveSettings:async e=>{await J(),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(()=>{ft.length>0&&e(null,{pid:ft[0].pid,data:`[MOCK] Process output line
|
|
64
|
+
`})},2e3)},onProcessExit:e=>{setTimeout(()=>{ft.length>0&&e(null,{pid:ft[0].pid,code:0})},1e4)},removeProcessOutputListener:e=>{console.log("[MOCK] removeProcessOutputListener")},removeProcessExitListener:e=>{console.log("[MOCK] removeProcessExitListener")},getAppVersion:async()=>(await J(),"3.3.38"),getLatestTestResult:async e=>(await J(),{id:1,project_id:e,passed:10,failed:2,skipped:1,duration:1234,timestamp:Date.now()}),getWorkspaces:async()=>(await J(),[...mr]),addWorkspace:async e=>{await J();const t={id:Math.max(...mr.map(n=>n.id),0)+1,...e,created_at:Date.now()};return mr.push(t),t},removeWorkspace:async e=>{await J(),mr=mr.filter(t=>t.id!==e)},createBackup:async e=>(await J(1e3),{success:!0,backup_path:e}),restoreBackup:async e=>(await J(1e3),{success:!0}),showSaveDialog:async e=>(await J(),{canceled:!1,filePath:"/tmp/backup.json"}),showOpenDialog:async e=>(await J(),{canceled:!1,filePaths:["/tmp/backup.json"]}),selectFile:async e=>(await J(),"/tmp/selected-file.json")});let zn=[...Gd],Su=[...Kd],xu=new Map,Gm=new Map;const Jm=(e=200)=>new Promise(t=>setTimeout(t,e)),Zm=()=>{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 Jm();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(zn),{status:200,headers:{"Content-Type":"application/json"}});if(o==="/api/workspaces/create"&&i==="POST"){const l=JSON.parse((n==null?void 0:n.body)||"{}"),a={id:Math.max(...zn.map(c=>c.id),0)+1,...l,created_at:Date.now()};return zn.push(a),new Response(JSON.stringify(a),{status:201,headers:{"Content-Type":"application/json"}})}if(o==="/api/workspaces/import"&&i==="POST")return JSON.parse((n==null?void 0: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]),a=Gm.get(l)||[],c=Su.filter(h=>a.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]),a=JSON.parse((n==null?void 0:n.body)||"{}"),c=zn.find(h=>h.id===l);return c?(Object.assign(c,a),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 zn=zn.filter(a=>a.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 Su.forEach(a=>{(a.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]),a=xu.get(l)||{script_sort_order:"default"};return new Response(JSON.stringify(a),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/settings")&&i==="PUT"){const l=parseInt(o.split("/")[3]),a=JSON.parse((n==null?void 0:n.body)||"{}");return xu.set(l,a),new Response(JSON.stringify(a),{status:200,headers:{"Content-Type":"application/json"}})}if(o.startsWith("/api/projects/")&&o.endsWith("/git-branch")&&i==="GET"){const l=parseInt(o.split("/")[3]),a=["main","develop","feature/new-feature"];return new Response(JSON.stringify({branch:a[l%a.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"}}))}},qm=()=>{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:Km(),writable:!1,configurable:!1}),console.log("✅ Mock ElectronAPI initialized"),Zm(),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!"))};qm();ai.createRoot(document.getElementById("root")).render(u.jsx(ao.StrictMode,{children:u.jsx(Vm,{})}));
|