diff --git a/frontend/src/components/scanInterface/ParameterCard.tsx b/frontend/src/components/scanInterface/ParameterCard.tsx index c4c1d472..ade80242 100644 --- a/frontend/src/components/scanInterface/ParameterCard.tsx +++ b/frontend/src/components/scanInterface/ParameterCard.tsx @@ -6,8 +6,12 @@ import { MenuItem, Select, TextField, + ToggleButton, + ToggleButtonGroup, } from "@mui/material"; import { useContext, useMemo } from "react"; +import { useParameter } from "../../hooks/useParameter"; +import { ParameterStoreContext } from "../../contexts/ParameterStoreContext"; import { DeviceInfoContext } from "../../contexts/DeviceInfoContext"; import { ExperimentsContext } from "../../contexts/ExperimentsContext"; import { ParameterDisplayGroupsContext } from "../../contexts/ParameterDisplayGroupsContext"; @@ -17,6 +21,7 @@ import { experimentIdToNamespace, } from "../../utils/experimentUtils"; import { + ScanInputMode, ScanParameterInfo, ScanPattern, scanPatterns, @@ -89,6 +94,7 @@ export const ParameterCard = ({ ); const deviceInfo = useContext(DeviceInfoContext); const experiments = useContext(ExperimentsContext); + const parameterStore = useContext(ParameterStoreContext); // Create a mapping from namespace to experiment display name const namespaceToDisplayName: Record = Object.fromEntries( @@ -166,6 +172,51 @@ export const ParameterCard = ({ }, [param, parameterDisplayGroups, deviceInfo]); const pattern = param.generation.pattern ?? "linear"; + const inputMode: ScanInputMode = param.generation.inputMode ?? "startStop"; + + // Live value of the currently selected parameter — used to seed "Center" when + // switching to span/center mode. + const [currentParamValue] = useParameter(param.id); + const currentNumericValue = + typeof currentParamValue === "number" ? currentParamValue : null; + + // Derived quantities for span/center mode. + const center = (param.generation.start + param.generation.stop) / 2; + const span = param.generation.stop - param.generation.start; + + const handleInputModeChange = (_: React.MouseEvent, newMode: ScanInputMode | null) => { + if (!newMode || newMode === inputMode) return; + + if (newMode === "spanCenter") { + // Seed center from the live parameter value when available, otherwise keep the + // midpoint of the existing range. + const newCenter = + currentNumericValue !== null ? currentNumericValue : center; + const newSpan = Math.abs(span) || 1; // keep existing span (>0 guard) + const newStart = newCenter - newSpan / 2; + const newStop = newCenter + newSpan / 2; + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + generation: { + ...param.generation, + inputMode: "spanCenter", + start: newStart, + stop: newStop, + }, + values: generateScanValues(newStart, newStop, param.generation.points, pattern), + }, + }); + } else { + // Switching back to start/stop: just flip the mode flag; start/stop are already correct. + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { generation: { ...param.generation, inputMode: "startStop" } }, + }); + } + }; return (
@@ -272,11 +323,37 @@ export const ParameterCard = ({ value={param.id} title={param.id} onChange={(e) => { - dispatchScanInfoStateUpdate({ - type: "UPDATE_PARAMETER", - index, - payload: { id: e.target.value }, - }); + const newParamId = e.target.value; + + if (inputMode === "spanCenter") { + // Re-centre on the new parameter's live value (if numeric); keep the span. + const rawValue = parameterStore?.get(newParamId); + const newCenter = + typeof rawValue === "number" ? rawValue : center; + const currentSpan = Math.abs(span) || 1; + const newStart = newCenter - currentSpan / 2; + const newStop = newCenter + currentSpan / 2; + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + id: newParamId, + generation: { ...param.generation, start: newStart, stop: newStop }, + values: generateScanValues( + newStart, + newStop, + param.generation.points, + pattern, + ), + }, + }); + } else { + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { id: newParamId }, + }); + } }} renderValue={(value) => { if (Object.keys(parameterOptions).length === 0) { @@ -302,76 +379,164 @@ export const ParameterCard = ({
- - dispatchScanInfoStateUpdate({ - type: "UPDATE_PARAMETER", - index, - payload: { - generation: { - ...param.generation, - start: Number(e.target.value), + onChange={handleInputModeChange} + > + + Start / Stop + + + Center / Span + + + + {inputMode === "spanCenter" ? ( + <> + { + const newCenter = Number(e.target.value); + const newStart = newCenter - span / 2; + const newStop = newCenter + span / 2; + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + generation: { ...param.generation, start: newStart, stop: newStop }, + values: generateScanValues( + newStart, + newStop, + param.generation.points, + pattern, + ), + }, + }); + }} + variant="outlined" + slotProps={{ + input: { + inputProps: { + min: parameterOptions[param.id]?.min, + max: parameterOptions[param.id]?.max, + }, }, - values: generateScanValues( - Number(e.target.value), - param.generation.stop, - param.generation.points, - pattern, - ), - }, - }) - } - variant="outlined" - slotProps={{ - input: { - inputProps: { - min: parameterOptions[param.id]?.min, - max: parameterOptions[param.id]?.max, - }, - }, - }} - /> - - dispatchScanInfoStateUpdate({ - type: "UPDATE_PARAMETER", - index, - payload: { - generation: { - ...param.generation, - stop: Number(e.target.value), + }} + /> + { + const newSpan = Math.abs(Number(e.target.value)); + const newStart = center - newSpan / 2; + const newStop = center + newSpan / 2; + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + generation: { ...param.generation, start: newStart, stop: newStop }, + values: generateScanValues( + newStart, + newStop, + param.generation.points, + pattern, + ), + }, + }); + }} + variant="outlined" + slotProps={{ + input: { inputProps: { min: 0 } }, + }} + /> + + ) : ( + <> + + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + generation: { + ...param.generation, + start: Number(e.target.value), + }, + values: generateScanValues( + Number(e.target.value), + param.generation.stop, + param.generation.points, + pattern, + ), + }, + }) + } + variant="outlined" + slotProps={{ + input: { + inputProps: { + min: parameterOptions[param.id]?.min, + max: parameterOptions[param.id]?.max, + }, }, - values: generateScanValues( - param.generation.start, - Number(e.target.value), - param.generation.points, - pattern, - ), - }, - }) - } - variant="outlined" - slotProps={{ - input: { - inputProps: { - min: parameterOptions[param.id]?.min, - max: parameterOptions[param.id]?.max, - }, - }, - }} - /> + }} + /> + + dispatchScanInfoStateUpdate({ + type: "UPDATE_PARAMETER", + index, + payload: { + generation: { + ...param.generation, + stop: Number(e.target.value), + }, + values: generateScanValues( + param.generation.start, + Number(e.target.value), + param.generation.points, + pattern, + ), + }, + }) + } + variant="outlined" + slotProps={{ + input: { + inputProps: { + min: parameterOptions[param.id]?.min, + max: parameterOptions[param.id]?.max, + }, + }, + }} + /> + + )} + {for(const f of u)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&s(h)}).observe(document,{childList:!0,subtree:!0});function r(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function s(u){if(u.ep)return;u.ep=!0;const f=r(u);fetch(u.href,f)}})();var Ic={exports:{}},fr={},Wc={exports:{}},ef={};/** + * @license React + * scheduler.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ip;function Ib(){return Ip||(Ip=1,(function(a){function l(M,K){var le=M.length;M.push(K);e:for(;0>>1,ae=M[xe];if(0>>1;xeu(fe,le))Ueu(pt,fe)?(M[xe]=pt,M[Ue]=le,xe=Ue):(M[xe]=fe,M[Te]=le,xe=Te);else if(Ueu(pt,le))M[xe]=pt,M[Ue]=le,xe=Ue;else break e}}return K}function u(M,K){var le=M.sortIndex-K.sortIndex;return le!==0?le:M.id-K.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;a.unstable_now=function(){return f.now()}}else{var h=Date,m=h.now();a.unstable_now=function(){return h.now()-m}}var p=[],g=[],b=1,S=null,E=3,w=!1,_=!1,A=!1,R=!1,V=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function J(M){for(var K=r(g);K!==null;){if(K.callback===null)s(g);else if(K.startTime<=M)s(g),K.sortIndex=K.expirationTime,l(p,K);else break;K=r(g)}}function I(M){if(A=!1,J(M),!_)if(r(p)!==null)_=!0,j||(j=!0,ne());else{var K=r(g);K!==null&&ie(I,K.startTime-M)}}var j=!1,U=-1,Q=5,ee=-1;function te(){return R?!0:!(a.unstable_now()-eeM&&te());){var xe=S.callback;if(typeof xe=="function"){S.callback=null,E=S.priorityLevel;var ae=xe(S.expirationTime<=M);if(M=a.unstable_now(),typeof ae=="function"){S.callback=ae,J(M),K=!0;break t}S===r(p)&&s(p),J(M)}else s(p);S=r(p)}if(S!==null)K=!0;else{var Ee=r(g);Ee!==null&&ie(I,Ee.startTime-M),K=!1}}break e}finally{S=null,E=le,w=!1}K=void 0}}finally{K?ne():j=!1}}}var ne;if(typeof P=="function")ne=function(){P(re)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,F=Y.port2;Y.port1.onmessage=re,ne=function(){F.postMessage(null)}}else ne=function(){V(re,0)};function ie(M,K){U=V(function(){M(a.unstable_now())},K)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(M){M.callback=null},a.unstable_forceFrameRate=function(M){0>M||125xe?(M.sortIndex=le,l(g,M),r(p)===null&&M===r(g)&&(A?(k(U),U=-1):A=!0,ie(I,le-xe))):(M.sortIndex=ae,l(p,M),_||w||(_=!0,j||(j=!0,ne()))),M},a.unstable_shouldYield=te,a.unstable_wrapCallback=function(M){var K=E;return function(){var le=E;E=K;try{return M.apply(this,arguments)}finally{E=le}}}})(ef)),ef}var Wp;function Wb(){return Wp||(Wp=1,Wc.exports=Ib()),Wc.exports}/** + * @license React + * react-dom-client.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var e0;function ex(){if(e0)return fr;e0=1;var a=Wb(),l=hb(),r=mb();function s(e){var t="https://react.dev/errors/"+e;if(1ae||(e.current=xe[ae],xe[ae]=null,ae--)}function fe(e,t){ae++,xe[ae]=e.current,e.current=t}var Ue=Ee(null),pt=Ee(null),Mt=Ee(null),hl=Ee(null);function ml(e,t){switch(fe(Mt,t),fe(pt,e),fe(Ue,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Cp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Cp(t),e=_p(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Te(Ue),fe(Ue,e)}function na(){Te(Ue),Te(pt),Te(Mt)}function ot(e){e.memoizedState!==null&&fe(hl,e);var t=Ue.current,n=_p(t,e.type);t!==n&&(fe(pt,e),fe(Ue,n))}function cn(e){pt.current===e&&(Te(Ue),Te(pt)),hl.current===e&&(Te(hl),rr._currentValue=le)}var pl=Object.prototype.hasOwnProperty,pi=a.unstable_scheduleCallback,fn=a.unstable_cancelCallback,Go=a.unstable_shouldYield,Xo=a.unstable_requestPaint,Vt=a.unstable_now,Po=a.unstable_getCurrentPriorityLevel,Yr=a.unstable_ImmediatePriority,Gr=a.unstable_UserBlockingPriority,vl=a.unstable_NormalPriority,Nn=a.unstable_LowPriority,aa=a.unstable_IdlePriority,Xr=a.log,vi=a.unstable_setDisableYieldValue,Ot=null,Je=null;function dn(e){if(typeof Xr=="function"&&vi(e),Je&&typeof Je.setStrictMode=="function")try{Je.setStrictMode(Ot,e)}catch{}}var St=Math.clz32?Math.clz32:Pr,Qo=Math.log,xn=Math.LN2;function Pr(e){return e>>>=0,e===0?32:31-(Qo(e)/xn|0)|0}var Ha=256,Va=4194304;function zn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ka(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var o=0,c=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var x=i&134217727;return x!==0?(i=x&~c,i!==0?o=zn(i):(v&=x,v!==0?o=zn(v):n||(n=x&~e,n!==0&&(o=zn(n))))):(x=i&~c,x!==0?o=zn(x):v!==0?o=zn(v):n||(n=i&~e,n!==0&&(o=zn(n)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:o}function Sn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yl(){var e=Ha;return Ha<<=1,(Ha&4194048)===0&&(Ha=256),e}function Zr(){var e=Va;return Va<<=1,(Va&62914560)===0&&(Va=4194304),e}function gl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Kr(e,t,n,i,o,c){var v=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var x=e.entanglements,C=e.expirationTimes,L=e.hiddenUpdates;for(n=v&~n;0)":-1o||C[i]!==L[o]){var G=` +`+C[i].replace(" at new "," at ");return e.displayName&&G.includes("")&&(G=G.replace("",e.displayName)),G}while(1<=i&&0<=o);break}}}finally{Fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Nt(n):""}function $r(e){switch(e.tag){case 26:case 27:case 5:return Nt(e.type);case 16:return Nt("Lazy");case 13:return Nt("Suspense");case 19:return Nt("SuspenseList");case 0:case 15:return ia(e.type,!1);case 11:return ia(e.type.render,!1);case 1:return ia(e.type,!0);case 31:return Nt("Activity");default:return""}}function Jr(e){try{var t="";do t+=$r(e),e=e.return;while(e);return t}catch(n){return` +Error generating stack: `+n.message+` +`+n.stack}}function Ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function bd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function og(e){var t=bd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(v){i=""+v,c.call(this,v)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fr(e){e._valueTracker||(e._valueTracker=og(e))}function xd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=bd(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function Ir(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}}var ug=/[\n"\\]/g;function It(e){return e.replace(ug,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zo(e,t,n,i,o,c,v,x){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),t!=null?v==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ft(t)):e.value!==""+Ft(t)&&(e.value=""+Ft(t)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),t!=null?Ko(e,v,Ft(t)):n!=null?Ko(e,v,Ft(n)):i!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Ft(x):e.removeAttribute("name")}function Sd(e,t,n,i,o,c,v,x){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;n=n!=null?""+Ft(n):"",t=t!=null?""+Ft(t):n,x||t===e.value||(e.value=t),e.defaultValue=t}i=i??o,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=x?e.checked:!!i,e.defaultChecked=!!i,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v)}function Ko(e,t,n){t==="number"&&Ir(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function xl(e,t,n,i){if(e=e.options,t){t={};for(var o=0;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wo=!1;if(Vn)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){Wo=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch{Wo=!1}var ra=null,eu=null,es=null;function Dd(){if(es)return es;var e,t=eu,n=t.length,i,o="value"in ra?ra.value:ra.textContent,c=o.length;for(e=0;e=wi),zd=" ",Ld=!1;function Ud(e,t){switch(e){case"keyup":return Bg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cl=!1;function Vg(e,t){switch(e){case"compositionend":return Bd(t);case"keypress":return t.which!==32?null:(Ld=!0,zd);case"textInput":return e=t.data,e===zd&&Ld?null:e;default:return null}}function kg(e,t){if(Cl)return e==="compositionend"||!iu&&Ud(e,t)?(e=Dd(),es=eu=ra=null,Cl=!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)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pd(n)}}function Zd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ir(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ir(e.document)}return t}function ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Kg=Vn&&"documentMode"in document&&11>=document.documentMode,_l=null,uu=null,ji=null,cu=!1;function $d(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cu||_l==null||_l!==Ir(i)||(i=_l,"selectionStart"in i&&ou(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),ji&&Ti(ji,i)||(ji=i,i=Xs(uu,"onSelect"),0>=v,o-=v,qn=1<<32-St(t)+o|n<c?c:8;var v=M.T,x={};M.T=x,$u(e,!1,t,n);try{var C=o(),L=M.S;if(L!==null&&L(x,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=a1(C,i);Yi(e,t,G,Qt(e))}else Yi(e,t,i,Qt(e))}catch(Z){Yi(e,t,{then:function(){},status:"rejected",reason:Z},Qt())}finally{K.p=c,M.T=v}}function o1(){}function Zu(e,t,n,i){if(e.tag!==5)throw Error(s(476));var o=Jh(e).queue;$h(e,o,t,le,n===null?o1:function(){return Fh(e),n(i)})}function Jh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fh(e){var t=Jh(e).next.queue;Yi(e,t,{},Qt())}function Ku(){return Tt(rr)}function Ih(){return ft().memoizedState}function Wh(){return ft().memoizedState}function u1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Qt();e=ua(n);var i=ca(t,e,n);i!==null&&(Zt(i,t,n),Ui(i,t,n)),t={cache:Cu()},e.payload=t;return}t=t.return}}function c1(e,t,n){var i=Qt();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Cs(e)?tm(t,n):(n=mu(e,t,n,i),n!==null&&(Zt(n,e,i),nm(n,t,i)))}function em(e,t,n){var i=Qt();Yi(e,t,n,i)}function Yi(e,t,n,i){var o={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cs(e))tm(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var v=t.lastRenderedState,x=c(v,n);if(o.hasEagerState=!0,o.eagerState=x,qt(x,v))return ss(e,t,o,0),Qe===null&&rs(),!1}catch{}finally{}if(n=mu(e,t,o,i),n!==null)return Zt(n,e,i),nm(n,t,i),!0}return!1}function $u(e,t,n,i){if(i={lane:2,revertLane:jc(),action:i,hasEagerState:!1,eagerState:null,next:null},Cs(e)){if(t)throw Error(s(479))}else t=mu(e,n,i,2),t!==null&&Zt(t,e,2)}function Cs(e){var t=e.alternate;return e===De||t!==null&&t===De}function tm(e,t){Ll=gs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nm(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Ga(e,n)}}var _s={readContext:Tt,use:xs,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at},am={readContext:Tt,use:xs,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:kh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ws(4194308,4,Xh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Lt();t=t===void 0?null:t;var i=e();if(tl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Lt();if(n!==void 0){var o=n(t);if(tl){dn(!0);try{n(t)}finally{dn(!1)}}}else o=t;return i.memoizedState=i.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},i.queue=e,e=e.dispatch=c1.bind(null,De,e),[i.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Gu(e);var t=e.queue,n=em.bind(null,De,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Pu,useDeferredValue:function(e,t){var n=Lt();return Qu(n,e,t)},useTransition:function(){var e=Gu(!1);return e=$h.bind(null,De,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=De,o=Lt();if(He){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Qe===null)throw Error(s(349));(ze&124)!==0||Ch(i,t,n)}o.memoizedState=n;var c={value:n,getSnapshot:t};return o.queue=c,kh(Th.bind(null,i,c,e),[e]),i.flags|=2048,Bl(9,Es(),_h.bind(null,i,c,n,t),null),n},useId:function(){var e=Lt(),t=Qe.identifierPrefix;if(He){var n=Yn,i=qn;n=(i&~(1<<32-St(i)-1)).toString(32)+n,t="«"+t+"R"+n,n=bs++,0ge?(gt=me,me=null):gt=me.sibling;var Le=B(O,me,z[ge],X);if(Le===null){me===null&&(me=gt);break}e&&me&&Le.alternate===null&&t(O,me),D=c(Le,D,ge),Re===null?se=Le:Re.sibling=Le,Re=Le,me=gt}if(ge===z.length)return n(O,me),He&&$a(O,ge),se;if(me===null){for(;gege?(gt=me,me=null):gt=me.sibling;var ja=B(O,me,Le.value,X);if(ja===null){me===null&&(me=gt);break}e&&me&&ja.alternate===null&&t(O,me),D=c(ja,D,ge),Re===null?se=ja:Re.sibling=ja,Re=ja,me=gt}if(Le.done)return n(O,me),He&&$a(O,ge),se;if(me===null){for(;!Le.done;ge++,Le=z.next())Le=Z(O,Le.value,X),Le!==null&&(D=c(Le,D,ge),Re===null?se=Le:Re.sibling=Le,Re=Le);return He&&$a(O,ge),se}for(me=i(me);!Le.done;ge++,Le=z.next())Le=H(me,O,ge,Le.value,X),Le!==null&&(e&&Le.alternate!==null&&me.delete(Le.key===null?ge:Le.key),D=c(Le,D,ge),Re===null?se=Le:Re.sibling=Le,Re=Le);return e&&me.forEach(function(db){return t(O,db)}),He&&$a(O,ge),se}function Xe(O,D,z,X){if(typeof z=="object"&&z!==null&&z.type===_&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case E:e:{for(var se=z.key;D!==null;){if(D.key===se){if(se=z.type,se===_){if(D.tag===7){n(O,D.sibling),X=o(D,z.props.children),X.return=O,O=X;break e}}else if(D.elementType===se||typeof se=="object"&&se!==null&&se.$$typeof===Q&&im(se)===D.type){n(O,D.sibling),X=o(D,z.props),Xi(X,z),X.return=O,O=X;break e}n(O,D);break}else t(O,D);D=D.sibling}z.type===_?(X=Za(z.props.children,O.mode,X,z.key),X.return=O,O=X):(X=us(z.type,z.key,z.props,null,O.mode,X),Xi(X,z),X.return=O,O=X)}return v(O);case w:e:{for(se=z.key;D!==null;){if(D.key===se)if(D.tag===4&&D.stateNode.containerInfo===z.containerInfo&&D.stateNode.implementation===z.implementation){n(O,D.sibling),X=o(D,z.children||[]),X.return=O,O=X;break e}else{n(O,D);break}else t(O,D);D=D.sibling}X=yu(z,O.mode,X),X.return=O,O=X}return v(O);case Q:return se=z._init,z=se(z._payload),Xe(O,D,z,X)}if(ie(z))return Se(O,D,z,X);if(ne(z)){if(se=ne(z),typeof se!="function")throw Error(s(150));return z=se.call(z),ye(O,D,z,X)}if(typeof z.then=="function")return Xe(O,D,Ts(z),X);if(z.$$typeof===P)return Xe(O,D,hs(O,z),X);js(O,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,D!==null&&D.tag===6?(n(O,D.sibling),X=o(D,z),X.return=O,O=X):(n(O,D),X=vu(z,O.mode,X),X.return=O,O=X),v(O)):n(O,D)}return function(O,D,z,X){try{Gi=0;var se=Xe(O,D,z,X);return Hl=null,se}catch(me){if(me===zi||me===ps)throw me;var Re=Yt(29,me,null,O.mode);return Re.lanes=X,Re.return=O,Re}finally{}}}var Vl=rm(!0),sm=rm(!1),an=Ee(null),Cn=null;function da(e){var t=e.alternate;fe(mt,mt.current&1),fe(an,e),Cn===null&&(t===null||zl.current!==null||t.memoizedState!==null)&&(Cn=e)}function om(e){if(e.tag===22){if(fe(mt,mt.current),fe(an,e),Cn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Cn=e)}}else ha()}function ha(){fe(mt,mt.current),fe(an,an.current)}function Qn(e){Te(an),Cn===e&&(Cn=null),Te(mt)}var mt=Ee(0);function Ds(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==="$?"||Vc(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Ju(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:b({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fu={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=Qt(),o=ua(i);o.payload=t,n!=null&&(o.callback=n),t=ca(e,o,i),t!==null&&(Zt(t,e,i),Ui(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=Qt(),o=ua(i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=ca(e,o,i),t!==null&&(Zt(t,e,i),Ui(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qt(),i=ua(n);i.tag=2,t!=null&&(i.callback=t),t=ca(e,i,n),t!==null&&(Zt(t,e,n),Ui(t,e,n))}};function um(e,t,n,i,o,c,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,v):t.prototype&&t.prototype.isPureReactComponent?!Ti(n,i)||!Ti(o,c):!0}function cm(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)}function nl(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=b({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}var Rs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function fm(e){Rs(e)}function dm(e){console.error(e)}function hm(e){Rs(e)}function As(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function mm(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Iu(e,t,n){return n=ua(n),n.tag=3,n.payload={element:null},n.callback=function(){As(e,t)},n}function pm(e){return e=ua(e),e.tag=3,e}function vm(e,t,n,i){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var c=i.value;e.payload=function(){return o(c)},e.callback=function(){mm(t,n,i)}}var v=n.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){mm(t,n,i),typeof o!="function"&&(ba===null?ba=new Set([this]):ba.add(this));var x=i.stack;this.componentDidCatch(i.value,{componentStack:x!==null?x:""})})}function d1(e,t,n,i,o){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Mi(t,n,o,!0),n=an.current,n!==null){switch(n.tag){case 13:return Cn===null?Ec():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=o,i===ju?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Cc(e,i,o)),!1;case 22:return n.flags|=65536,i===ju?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Cc(e,i,o)),!1}throw Error(s(435,n.tag))}return Cc(e,i,o),Ec(),!1}if(He)return t=an.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,i!==xu&&(e=Error(s(422),{cause:i}),Ai(Wt(e,n)))):(i!==xu&&(t=Error(s(423),{cause:i}),Ai(Wt(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,i=Wt(i,n),o=Iu(e.stateNode,i,o),Au(e,o),tt!==4&&(tt=2)),!1;var c=Error(s(520),{cause:i});if(c=Wt(c,n),Fi===null?Fi=[c]:Fi.push(c),tt!==4&&(tt=2),t===null)return!0;i=Wt(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=Iu(n.stateNode,i,e),Au(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(ba===null||!ba.has(c))))return n.flags|=65536,o&=-o,n.lanes|=o,o=pm(o),vm(o,e,n,i),Au(n,o),!1}n=n.return}while(n!==null);return!1}var ym=Error(s(461)),vt=!1;function Et(e,t,n,i){t.child=e===null?sm(t,null,n,i):Vl(t,e.child,n,i)}function gm(e,t,n,i,o){n=n.render;var c=t.ref;if("ref"in i){var v={};for(var x in i)x!=="ref"&&(v[x]=i[x])}else v=i;return Wa(t),i=Lu(e,t,n,v,c,o),x=Uu(),e!==null&&!vt?(Bu(e,t,o),Zn(e,t,o)):(He&&x&&gu(t),t.flags|=1,Et(e,t,i,o),t.child)}function bm(e,t,n,i,o){if(e===null){var c=n.type;return typeof c=="function"&&!pu(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,xm(e,t,c,i,o)):(e=us(n.type,null,i,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!rc(e,o)){var v=c.memoizedProps;if(n=n.compare,n=n!==null?n:Ti,n(v,i)&&e.ref===t.ref)return Zn(e,t,o)}return t.flags|=1,e=kn(c,i),e.ref=t.ref,e.return=t,t.child=e}function xm(e,t,n,i,o){if(e!==null){var c=e.memoizedProps;if(Ti(c,i)&&e.ref===t.ref)if(vt=!1,t.pendingProps=i=c,rc(e,o))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Zn(e,t,o)}return Wu(e,t,n,i,o)}function Sm(e,t,n){var i=t.pendingProps,o=i.children,c=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=c!==null?c.baseLanes|n:n,e!==null){for(o=t.child=e.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;t.childLanes=c&~i}else t.childLanes=0,t.child=null;return Em(e,t,i,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ms(t,c!==null?c.cachePool:null),c!==null?xh(t,c):Ou(),om(t);else return t.lanes=t.childLanes=536870912,Em(e,t,c!==null?c.baseLanes|n:n,n)}else c!==null?(ms(t,c.cachePool),xh(t,c),ha(),t.memoizedState=null):(e!==null&&ms(t,null),Ou(),ha());return Et(e,t,o,n),t.child}function Em(e,t,n,i){var o=Tu();return o=o===null?null:{parent:ht._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&ms(t,null),Ou(),om(t),e!==null&&Mi(e,t,i,!0),null}function Ms(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Wu(e,t,n,i,o){return Wa(t),n=Lu(e,t,n,i,void 0,o),i=Uu(),e!==null&&!vt?(Bu(e,t,o),Zn(e,t,o)):(He&&i&&gu(t),t.flags|=1,Et(e,t,n,o),t.child)}function wm(e,t,n,i,o,c){return Wa(t),t.updateQueue=null,n=Eh(t,i,n,o),Sh(e),i=Uu(),e!==null&&!vt?(Bu(e,t,c),Zn(e,t,c)):(He&&i&&gu(t),t.flags|=1,Et(e,t,n,c),t.child)}function Cm(e,t,n,i,o){if(Wa(t),t.stateNode===null){var c=Rl,v=n.contextType;typeof v=="object"&&v!==null&&(c=Tt(v)),c=new n(i,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Fu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=i,c.state=t.memoizedState,c.refs={},Du(t),v=n.contextType,c.context=typeof v=="object"&&v!==null?Tt(v):Rl,c.state=t.memoizedState,v=n.getDerivedStateFromProps,typeof v=="function"&&(Ju(t,n,v,i),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(v=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),v!==c.state&&Fu.enqueueReplaceState(c,c.state,null),Hi(t,i,c,o),Bi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){c=t.stateNode;var x=t.memoizedProps,C=nl(n,x);c.props=C;var L=c.context,G=n.contextType;v=Rl,typeof G=="object"&&G!==null&&(v=Tt(G));var Z=n.getDerivedStateFromProps;G=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,G||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x||L!==v)&&cm(t,c,i,v),oa=!1;var B=t.memoizedState;c.state=B,Hi(t,i,c,o),Bi(),L=t.memoizedState,x||B!==L||oa?(typeof Z=="function"&&(Ju(t,n,Z,i),L=t.memoizedState),(C=oa||um(t,n,C,i,B,L,v))?(G||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=L),c.props=i,c.state=L,c.context=v,i=C):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{c=t.stateNode,Ru(e,t),v=t.memoizedProps,G=nl(n,v),c.props=G,Z=t.pendingProps,B=c.context,L=n.contextType,C=Rl,typeof L=="object"&&L!==null&&(C=Tt(L)),x=n.getDerivedStateFromProps,(L=typeof x=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v!==Z||B!==C)&&cm(t,c,i,C),oa=!1,B=t.memoizedState,c.state=B,Hi(t,i,c,o),Bi();var H=t.memoizedState;v!==Z||B!==H||oa||e!==null&&e.dependencies!==null&&ds(e.dependencies)?(typeof x=="function"&&(Ju(t,n,x,i),H=t.memoizedState),(G=oa||um(t,n,G,i,B,H,C)||e!==null&&e.dependencies!==null&&ds(e.dependencies))?(L||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(i,H,C),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(i,H,C)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=H),c.props=i,c.state=H,c.context=C,i=G):(typeof c.componentDidUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),i=!1)}return c=i,Ms(e,t),i=(t.flags&128)!==0,c||i?(c=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&i?(t.child=Vl(t,e.child,null,o),t.child=Vl(t,null,n,o)):Et(e,t,n,o),t.memoizedState=c.state,e=t.child):e=Zn(e,t,o),e}function _m(e,t,n,i){return Ri(),t.flags|=256,Et(e,t,n,i),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tc(e){return{baseLanes:e,cachePool:dh()}}function nc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ln),e}function Tm(e,t,n){var i=t.pendingProps,o=!1,c=(t.flags&128)!==0,v;if((v=c)||(v=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),v&&(o=!0,t.flags&=-129),v=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(o?da(t):ha(),He){var x=et,C;if(C=x){e:{for(C=x,x=wn;C.nodeType!==8;){if(!x){x=null;break e}if(C=pn(C.nextSibling),C===null){x=null;break e}}x=C}x!==null?(t.memoizedState={dehydrated:x,treeContext:Ka!==null?{id:qn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},C=Yt(18,null,null,0),C.stateNode=x,C.return=t,t.child=C,Rt=t,et=null,C=!0):C=!1}C||Fa(t)}if(x=t.memoizedState,x!==null&&(x=x.dehydrated,x!==null))return Vc(x)?t.lanes=32:t.lanes=536870912,null;Qn(t)}return x=i.children,i=i.fallback,o?(ha(),o=t.mode,x=Os({mode:"hidden",children:x},o),i=Za(i,o,n,null),x.return=t,i.return=t,x.sibling=i,t.child=x,o=t.child,o.memoizedState=tc(n),o.childLanes=nc(e,v,n),t.memoizedState=ec,i):(da(t),ac(t,x))}if(C=e.memoizedState,C!==null&&(x=C.dehydrated,x!==null)){if(c)t.flags&256?(da(t),t.flags&=-257,t=lc(e,t,n)):t.memoizedState!==null?(ha(),t.child=e.child,t.flags|=128,t=null):(ha(),o=i.fallback,x=t.mode,i=Os({mode:"visible",children:i.children},x),o=Za(o,x,n,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,Vl(t,e.child,null,n),i=t.child,i.memoizedState=tc(n),i.childLanes=nc(e,v,n),t.memoizedState=ec,t=o);else if(da(t),Vc(x)){if(v=x.nextSibling&&x.nextSibling.dataset,v)var L=v.dgst;v=L,i=Error(s(419)),i.stack="",i.digest=v,Ai({value:i,source:null,stack:null}),t=lc(e,t,n)}else if(vt||Mi(e,t,n,!1),v=(n&e.childLanes)!==0,vt||v){if(v=Qe,v!==null&&(i=n&-n,i=(i&42)!==0?1:yi(i),i=(i&(v.suspendedLanes|n))!==0?0:i,i!==0&&i!==C.retryLane))throw C.retryLane=i,Dl(e,i),Zt(v,e,i),ym;x.data==="$?"||Ec(),t=lc(e,t,n)}else x.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,et=pn(x.nextSibling),Rt=t,He=!0,Ja=null,wn=!1,e!==null&&(tn[nn++]=qn,tn[nn++]=Yn,tn[nn++]=Ka,qn=e.id,Yn=e.overflow,Ka=t),t=ac(t,i.children),t.flags|=4096);return t}return o?(ha(),o=i.fallback,x=t.mode,C=e.child,L=C.sibling,i=kn(C,{mode:"hidden",children:i.children}),i.subtreeFlags=C.subtreeFlags&65011712,L!==null?o=kn(L,o):(o=Za(o,x,n,null),o.flags|=2),o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,x=e.child.memoizedState,x===null?x=tc(n):(C=x.cachePool,C!==null?(L=ht._currentValue,C=C.parent!==L?{parent:L,pool:L}:C):C=dh(),x={baseLanes:x.baseLanes|n,cachePool:C}),o.memoizedState=x,o.childLanes=nc(e,v,n),t.memoizedState=ec,i):(da(t),n=e.child,e=n.sibling,n=kn(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(v=t.deletions,v===null?(t.deletions=[e],t.flags|=16):v.push(e)),t.child=n,t.memoizedState=null,n)}function ac(e,t){return t=Os({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Os(e,t){return e=Yt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function lc(e,t,n){return Vl(t,e.child,null,n),e=ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jm(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Eu(e.return,t,n)}function ic(e,t,n,i,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=i,c.tail=n,c.tailMode=o)}function Dm(e,t,n){var i=t.pendingProps,o=i.revealOrder,c=i.tail;if(Et(e,t,i.children,n),i=mt.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jm(e,n,t);else if(e.tag===19)jm(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}i&=1}switch(fe(mt,i),o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Ds(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ic(t,!1,o,n,c);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Ds(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ic(t,!0,n,null,c);break;case"together":ic(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ga|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Mi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function rc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ds(e)))}function h1(e,t,n){switch(t.tag){case 3:ml(t,t.stateNode.containerInfo),sa(t,ht,e.memoizedState.cache),Ri();break;case 27:case 5:ot(t);break;case 4:ml(t,t.stateNode.containerInfo);break;case 10:sa(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Tm(e,t,n):(da(t),e=Zn(e,t,n),e!==null?e.sibling:null);da(t);break;case 19:var o=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Mi(e,t,n,!1),i=(n&t.childLanes)!==0),o){if(i)return Dm(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),fe(mt,mt.current),i)break;return null;case 22:case 23:return t.lanes=0,Sm(e,t,n);case 24:sa(t,ht,e.memoizedState.cache)}return Zn(e,t,n)}function Rm(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!rc(e,n)&&(t.flags&128)===0)return vt=!1,h1(e,t,n);vt=(e.flags&131072)!==0}else vt=!1,He&&(t.flags&1048576)!==0&&ih(t,fs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,o=i._init;if(i=o(i._payload),t.type=i,typeof i=="function")pu(i)?(e=nl(i,e),t.tag=1,t=Cm(null,t,i,e,n)):(t.tag=0,t=Wu(null,t,i,e,n));else{if(i!=null){if(o=i.$$typeof,o===J){t.tag=11,t=gm(null,t,i,e,n);break e}else if(o===U){t.tag=14,t=bm(null,t,i,e,n);break e}}throw t=F(i)||i,Error(s(306,t,""))}}return t;case 0:return Wu(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,o=nl(i,t.pendingProps),Cm(e,t,i,o,n);case 3:e:{if(ml(t,t.stateNode.containerInfo),e===null)throw Error(s(387));i=t.pendingProps;var c=t.memoizedState;o=c.element,Ru(e,t),Hi(t,i,null,n);var v=t.memoizedState;if(i=v.cache,sa(t,ht,i),i!==c.cache&&wu(t,[ht],n,!0),Bi(),i=v.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:v.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=_m(e,t,i,n);break e}else if(i!==o){o=Wt(Error(s(424)),t),Ai(o),t=_m(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=pn(e.firstChild),Rt=t,He=!0,Ja=null,wn=!0,n=sm(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),i===o){t=Zn(e,t,n);break e}Et(e,t,i,n)}t=t.child}return t;case 26:return Ms(e,t),e===null?(n=Np(t.type,null,t.pendingProps,null))?t.memoizedState=n:He||(n=t.type,e=t.pendingProps,i=Qs(Mt.current).createElement(n),i[$]=t,i[W]=e,Ct(i,n,e),Ce(i),t.stateNode=i):t.memoizedState=Np(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ot(t),e===null&&He&&(i=t.stateNode=Ap(t.type,t.pendingProps,Mt.current),Rt=t,wn=!0,o=et,Ea(t.type)?(kc=o,et=pn(i.firstChild)):et=o),Et(e,t,t.pendingProps.children,n),Ms(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((o=i=et)&&(i=q1(i,t.type,t.pendingProps,wn),i!==null?(t.stateNode=i,Rt=t,et=pn(i.firstChild),wn=!1,o=!0):o=!1),o||Fa(t)),ot(t),o=t.type,c=t.pendingProps,v=e!==null?e.memoizedProps:null,i=c.children,Uc(o,c)?i=null:v!==null&&Uc(o,v)&&(t.flags|=32),t.memoizedState!==null&&(o=Lu(e,t,i1,null,null,n),rr._currentValue=o),Ms(e,t),Et(e,t,i,n),t.child;case 6:return e===null&&He&&((e=n=et)&&(n=Y1(n,t.pendingProps,wn),n!==null?(t.stateNode=n,Rt=t,et=null,e=!0):e=!1),e||Fa(t)),null;case 13:return Tm(e,t,n);case 4:return ml(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Vl(t,null,i,n):Et(e,t,i,n),t.child;case 11:return gm(e,t,t.type,t.pendingProps,n);case 7:return Et(e,t,t.pendingProps,n),t.child;case 8:return Et(e,t,t.pendingProps.children,n),t.child;case 12:return Et(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,sa(t,t.type,i.value),Et(e,t,i.children,n),t.child;case 9:return o=t.type._context,i=t.pendingProps.children,Wa(t),o=Tt(o),i=i(o),t.flags|=1,Et(e,t,i,n),t.child;case 14:return bm(e,t,t.type,t.pendingProps,n);case 15:return xm(e,t,t.type,t.pendingProps,n);case 19:return Dm(e,t,n);case 31:return i=t.pendingProps,n=t.mode,i={mode:i.mode,children:i.children},e===null?(n=Os(i,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=kn(e.child,i),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Sm(e,t,n);case 24:return Wa(t),i=Tt(ht),e===null?(o=Tu(),o===null&&(o=Qe,c=Cu(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=n),o=c),t.memoizedState={parent:i,cache:o},Du(t),sa(t,ht,o)):((e.lanes&n)!==0&&(Ru(e,t),Hi(t,null,null,n),Bi()),o=e.memoizedState,c=t.memoizedState,o.parent!==i?(o={parent:i,cache:i},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),sa(t,ht,i)):(i=c.cache,sa(t,ht,i),i!==o.cache&&wu(t,[ht],n,!0))),Et(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function Kn(e){e.flags|=4}function Am(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hp(t)){if(t=an.current,t!==null&&((ze&4194048)===ze?Cn!==null:(ze&62914560)!==ze&&(ze&536870912)===0||t!==Cn))throw Li=ju,hh;e.flags|=8192}}function Ns(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zr():536870912,e.lanes|=t,Gl|=t)}function Pi(e,t){if(!He)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags&65011712,i|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,i|=o.subtreeFlags,i|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function m1(e,t,n){var i=t.pendingProps;switch(bu(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Xn(ht),na(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Di(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,oh())),Ie(t),null;case 26:return n=t.memoizedState,e===null?(Kn(t),n!==null?(Ie(t),Am(t,n)):(Ie(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Kn(t),Ie(t),Am(t,n)):(Ie(t),t.flags&=-16777217):(e.memoizedProps!==i&&Kn(t),Ie(t),t.flags&=-16777217),null;case 27:cn(t),n=Mt.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Kn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return Ie(t),null}e=Ue.current,Di(t)?rh(t):(e=Ap(o,i,n),t.stateNode=e,Kn(t))}return Ie(t),null;case 5:if(cn(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Kn(t);else{if(!i){if(t.stateNode===null)throw Error(s(166));return Ie(t),null}if(e=Ue.current,Di(t))rh(t);else{switch(o=Qs(Mt.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=o.createElement("div"),e.innerHTML=" - + +