meldivo 2.2.2 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,80 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CeWj4ejR.js","assets/_commonjsHelpers-CqkleIqs.js","assets/browser-CujOq0-h.js"])))=>i.map(i=>d[i]);
2
+ var bd=Object.defineProperty;var Zd=(u,l,s)=>l in u?bd(u,l,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[l]=s;var te=(u,l,s)=>Zd(u,typeof l!="symbol"?l+"":l,s);(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))f(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const E of y.addedNodes)E.tagName==="LINK"&&E.rel==="modulepreload"&&f(E)}).observe(document,{childList:!0,subtree:!0});function s(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function f(d){if(d.ep)return;d.ep=!0;const y=s(d);fetch(d.href,y)}})();var vu={exports:{}},gi={},gu={exports:{}},ke={};/**
3
+ * @license React
4
+ * react.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var bc;function eh(){if(bc)return ke;bc=1;var u=Symbol.for("react.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),f=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),E=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),I=Symbol.iterator;function z(g){return g===null||typeof g!="object"?null:(g=I&&g[I]||g["@@iterator"],typeof g=="function"?g:null)}var $={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,le={};function C(g,P,ie){this.props=g,this.context=P,this.refs=le,this.updater=ie||$}C.prototype.isReactComponent={},C.prototype.setState=function(g,P){if(typeof g!="object"&&typeof g!="function"&&g!=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,g,P,"setState")},C.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function G(){}G.prototype=C.prototype;function q(g,P,ie){this.props=g,this.context=P,this.refs=le,this.updater=ie||$}var ge=q.prototype=new G;ge.constructor=q,X(ge,C.prototype),ge.isPureReactComponent=!0;var U=Array.isArray,H=Object.prototype.hasOwnProperty,D={current:null},ne={key:!0,ref:!0,__self:!0,__source:!0};function me(g,P,ie){var ue,pe={},ye=null,ve=null;if(P!=null)for(ue in P.ref!==void 0&&(ve=P.ref),P.key!==void 0&&(ye=""+P.key),P)H.call(P,ue)&&!ne.hasOwnProperty(ue)&&(pe[ue]=P[ue]);var Ee=arguments.length-2;if(Ee===1)pe.children=ie;else if(1<Ee){for(var je=Array(Ee),st=0;st<Ee;st++)je[st]=arguments[st+2];pe.children=je}if(g&&g.defaultProps)for(ue in Ee=g.defaultProps,Ee)pe[ue]===void 0&&(pe[ue]=Ee[ue]);return{$$typeof:u,type:g,key:ye,ref:ve,props:pe,_owner:D.current}}function xe(g,P){return{$$typeof:u,type:g.type,key:P,ref:g.ref,props:g.props,_owner:g._owner}}function B(g){return typeof g=="object"&&g!==null&&g.$$typeof===u}function _e(g){var P={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(ie){return P[ie]})}var Ye=/\/+/g;function be(g,P){return typeof g=="object"&&g!==null&&g.key!=null?_e(""+g.key):P.toString(36)}function qe(g,P,ie,ue,pe){var ye=typeof g;(ye==="undefined"||ye==="boolean")&&(g=null);var ve=!1;if(g===null)ve=!0;else switch(ye){case"string":case"number":ve=!0;break;case"object":switch(g.$$typeof){case u:case l:ve=!0}}if(ve)return ve=g,pe=pe(ve),g=ue===""?"."+be(ve,0):ue,U(pe)?(ie="",g!=null&&(ie=g.replace(Ye,"$&/")+"/"),qe(pe,P,ie,"",function(st){return st})):pe!=null&&(B(pe)&&(pe=xe(pe,ie+(!pe.key||ve&&ve.key===pe.key?"":(""+pe.key).replace(Ye,"$&/")+"/")+g)),P.push(pe)),1;if(ve=0,ue=ue===""?".":ue+":",U(g))for(var Ee=0;Ee<g.length;Ee++){ye=g[Ee];var je=ue+be(ye,Ee);ve+=qe(ye,P,ie,je,pe)}else if(je=z(g),typeof je=="function")for(g=je.call(g),Ee=0;!(ye=g.next()).done;)ye=ye.value,je=ue+be(ye,Ee++),ve+=qe(ye,P,ie,je,pe);else if(ye==="object")throw P=String(g),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return ve}function $e(g,P,ie){if(g==null)return g;var ue=[],pe=0;return qe(g,ue,"","",function(ye){return P.call(ie,ye,pe++)}),ue}function Ve(g){if(g._status===-1){var P=g._result;P=P(),P.then(function(ie){(g._status===0||g._status===-1)&&(g._status=1,g._result=ie)},function(ie){(g._status===0||g._status===-1)&&(g._status=2,g._result=ie)}),g._status===-1&&(g._status=0,g._result=P)}if(g._status===1)return g._result.default;throw g._result}var Ne={current:null},V={transition:null},se={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:V,ReactCurrentOwner:D};function W(){throw Error("act(...) is not supported in production builds of React.")}return ke.Children={map:$e,forEach:function(g,P,ie){$e(g,function(){P.apply(this,arguments)},ie)},count:function(g){var P=0;return $e(g,function(){P++}),P},toArray:function(g){return $e(g,function(P){return P})||[]},only:function(g){if(!B(g))throw Error("React.Children.only expected to receive a single React element child.");return g}},ke.Component=C,ke.Fragment=s,ke.Profiler=d,ke.PureComponent=q,ke.StrictMode=f,ke.Suspense=L,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,ke.act=W,ke.cloneElement=function(g,P,ie){if(g==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var ue=X({},g.props),pe=g.key,ye=g.ref,ve=g._owner;if(P!=null){if(P.ref!==void 0&&(ye=P.ref,ve=D.current),P.key!==void 0&&(pe=""+P.key),g.type&&g.type.defaultProps)var Ee=g.type.defaultProps;for(je in P)H.call(P,je)&&!ne.hasOwnProperty(je)&&(ue[je]=P[je]===void 0&&Ee!==void 0?Ee[je]:P[je])}var je=arguments.length-2;if(je===1)ue.children=ie;else if(1<je){Ee=Array(je);for(var st=0;st<je;st++)Ee[st]=arguments[st+2];ue.children=Ee}return{$$typeof:u,type:g.type,key:pe,ref:ye,props:ue,_owner:ve}},ke.createContext=function(g){return g={$$typeof:E,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},g.Provider={$$typeof:y,_context:g},g.Consumer=g},ke.createElement=me,ke.createFactory=function(g){var P=me.bind(null,g);return P.type=g,P},ke.createRef=function(){return{current:null}},ke.forwardRef=function(g){return{$$typeof:N,render:g}},ke.isValidElement=B,ke.lazy=function(g){return{$$typeof:Q,_payload:{_status:-1,_result:g},_init:Ve}},ke.memo=function(g,P){return{$$typeof:j,type:g,compare:P===void 0?null:P}},ke.startTransition=function(g){var P=V.transition;V.transition={};try{g()}finally{V.transition=P}},ke.unstable_act=W,ke.useCallback=function(g,P){return Ne.current.useCallback(g,P)},ke.useContext=function(g){return Ne.current.useContext(g)},ke.useDebugValue=function(){},ke.useDeferredValue=function(g){return Ne.current.useDeferredValue(g)},ke.useEffect=function(g,P){return Ne.current.useEffect(g,P)},ke.useId=function(){return Ne.current.useId()},ke.useImperativeHandle=function(g,P,ie){return Ne.current.useImperativeHandle(g,P,ie)},ke.useInsertionEffect=function(g,P){return Ne.current.useInsertionEffect(g,P)},ke.useLayoutEffect=function(g,P){return Ne.current.useLayoutEffect(g,P)},ke.useMemo=function(g,P){return Ne.current.useMemo(g,P)},ke.useReducer=function(g,P,ie){return Ne.current.useReducer(g,P,ie)},ke.useRef=function(g){return Ne.current.useRef(g)},ke.useState=function(g){return Ne.current.useState(g)},ke.useSyncExternalStore=function(g,P,ie){return Ne.current.useSyncExternalStore(g,P,ie)},ke.useTransition=function(){return Ne.current.useTransition()},ke.version="18.3.1",ke}var Zc;function Iu(){return Zc||(Zc=1,gu.exports=eh()),gu.exports}/**
11
+ * @license React
12
+ * react-jsx-runtime.production.min.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var ef;function th(){if(ef)return gi;ef=1;var u=Iu(),l=Symbol.for("react.element"),s=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,d=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function E(N,L,j){var Q,I={},z=null,$=null;j!==void 0&&(z=""+j),L.key!==void 0&&(z=""+L.key),L.ref!==void 0&&($=L.ref);for(Q in L)f.call(L,Q)&&!y.hasOwnProperty(Q)&&(I[Q]=L[Q]);if(N&&N.defaultProps)for(Q in L=N.defaultProps,L)I[Q]===void 0&&(I[Q]=L[Q]);return{$$typeof:l,type:N,key:z,ref:$,props:I,_owner:d.current}}return gi.Fragment=s,gi.jsx=E,gi.jsxs=E,gi}var tf;function nh(){return tf||(tf=1,vu.exports=th()),vu.exports}var h=nh(),Ml={},yu={exports:{}},Lt={},wu={exports:{}},Su={};/**
19
+ * @license React
20
+ * scheduler.production.min.js
21
+ *
22
+ * Copyright (c) Facebook, Inc. and its affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var nf;function rh(){return nf||(nf=1,(function(u){function l(V,se){var W=V.length;V.push(se);e:for(;0<W;){var g=W-1>>>1,P=V[g];if(0<d(P,se))V[g]=se,V[W]=P,W=g;else break e}}function s(V){return V.length===0?null:V[0]}function f(V){if(V.length===0)return null;var se=V[0],W=V.pop();if(W!==se){V[0]=W;e:for(var g=0,P=V.length,ie=P>>>1;g<ie;){var ue=2*(g+1)-1,pe=V[ue],ye=ue+1,ve=V[ye];if(0>d(pe,W))ye<P&&0>d(ve,pe)?(V[g]=ve,V[ye]=W,g=ye):(V[g]=pe,V[ue]=W,g=ue);else if(ye<P&&0>d(ve,W))V[g]=ve,V[ye]=W,g=ye;else break e}}return se}function d(V,se){var W=V.sortIndex-se.sortIndex;return W!==0?W:V.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var y=performance;u.unstable_now=function(){return y.now()}}else{var E=Date,N=E.now();u.unstable_now=function(){return E.now()-N}}var L=[],j=[],Q=1,I=null,z=3,$=!1,X=!1,le=!1,C=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function ge(V){for(var se=s(j);se!==null;){if(se.callback===null)f(j);else if(se.startTime<=V)f(j),se.sortIndex=se.expirationTime,l(L,se);else break;se=s(j)}}function U(V){if(le=!1,ge(V),!X)if(s(L)!==null)X=!0,Ve(H);else{var se=s(j);se!==null&&Ne(U,se.startTime-V)}}function H(V,se){X=!1,le&&(le=!1,G(me),me=-1),$=!0;var W=z;try{for(ge(se),I=s(L);I!==null&&(!(I.expirationTime>se)||V&&!_e());){var g=I.callback;if(typeof g=="function"){I.callback=null,z=I.priorityLevel;var P=g(I.expirationTime<=se);se=u.unstable_now(),typeof P=="function"?I.callback=P:I===s(L)&&f(L),ge(se)}else f(L);I=s(L)}if(I!==null)var ie=!0;else{var ue=s(j);ue!==null&&Ne(U,ue.startTime-se),ie=!1}return ie}finally{I=null,z=W,$=!1}}var D=!1,ne=null,me=-1,xe=5,B=-1;function _e(){return!(u.unstable_now()-B<xe)}function Ye(){if(ne!==null){var V=u.unstable_now();B=V;var se=!0;try{se=ne(!0,V)}finally{se?be():(D=!1,ne=null)}}else D=!1}var be;if(typeof q=="function")be=function(){q(Ye)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,$e=qe.port2;qe.port1.onmessage=Ye,be=function(){$e.postMessage(null)}}else be=function(){C(Ye,0)};function Ve(V){ne=V,D||(D=!0,be())}function Ne(V,se){me=C(function(){V(u.unstable_now())},se)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(V){V.callback=null},u.unstable_continueExecution=function(){X||$||(X=!0,Ve(H))},u.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):xe=0<V?Math.floor(1e3/V):5},u.unstable_getCurrentPriorityLevel=function(){return z},u.unstable_getFirstCallbackNode=function(){return s(L)},u.unstable_next=function(V){switch(z){case 1:case 2:case 3:var se=3;break;default:se=z}var W=z;z=se;try{return V()}finally{z=W}},u.unstable_pauseExecution=function(){},u.unstable_requestPaint=function(){},u.unstable_runWithPriority=function(V,se){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var W=z;z=V;try{return se()}finally{z=W}},u.unstable_scheduleCallback=function(V,se,W){var g=u.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?g+W:g):W=g,V){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=W+P,V={id:Q++,callback:se,priorityLevel:V,startTime:W,expirationTime:P,sortIndex:-1},W>g?(V.sortIndex=W,l(j,V),s(L)===null&&V===s(j)&&(le?(G(me),me=-1):le=!0,Ne(U,W-g))):(V.sortIndex=P,l(L,V),X||$||(X=!0,Ve(H))),V},u.unstable_shouldYield=_e,u.unstable_wrapCallback=function(V){var se=z;return function(){var W=z;z=se;try{return V.apply(this,arguments)}finally{z=W}}}})(Su)),Su}var rf;function oh(){return rf||(rf=1,wu.exports=rh()),wu.exports}/**
27
+ * @license React
28
+ * react-dom.production.min.js
29
+ *
30
+ * Copyright (c) Facebook, Inc. and its affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var of;function ih(){if(of)return Lt;of=1;var u=Iu(),l=oh();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var f=new Set,d={};function y(e,t){E(e,t),E(e+"Capture",t)}function E(e,t){for(d[e]=t,e=0;e<t.length;e++)f.add(t[e])}var N=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),L=Object.prototype.hasOwnProperty,j=/^[: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]*$/,Q={},I={};function z(e){return L.call(I,e)?!0:L.call(Q,e)?!1:j.test(e)?I[e]=!0:(Q[e]=!0,!1)}function $(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 X(e,t,n,r){if(t===null||typeof t>"u"||$(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 le(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){C[e]=new le(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];C[t]=new le(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){C[e]=new le(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){C[e]=new le(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){C[e]=new le(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){C[e]=new le(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){C[e]=new le(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){C[e]=new le(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){C[e]=new le(e,5,!1,e.toLowerCase(),null,!1,!1)});var G=/[\-:]([a-z])/g;function q(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(G,q);C[t]=new le(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(G,q);C[t]=new le(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(G,q);C[t]=new le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){C[e]=new le(e,1,!1,e.toLowerCase(),null,!1,!1)}),C.xlinkHref=new le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){C[e]=new le(e,1,!1,e.toLowerCase(),null,!0,!0)});function ge(e,t,n,r){var o=C.hasOwnProperty(t)?C[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(X(t,n,o,r)&&(n=null),r||o===null?z(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var U=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,H=Symbol.for("react.element"),D=Symbol.for("react.portal"),ne=Symbol.for("react.fragment"),me=Symbol.for("react.strict_mode"),xe=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),_e=Symbol.for("react.context"),Ye=Symbol.for("react.forward_ref"),be=Symbol.for("react.suspense"),qe=Symbol.for("react.suspense_list"),$e=Symbol.for("react.memo"),Ve=Symbol.for("react.lazy"),Ne=Symbol.for("react.offscreen"),V=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var W=Object.assign,g;function P(e){if(g===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);g=t&&t[1]||""}return`
35
+ `+g+e}var ie=!1;function ue(e,t){if(!e||ie)return"";ie=!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(x){var r=x}Reflect.construct(e,[],t)}else{try{t.call()}catch(x){r=x}e.call(t.prototype)}else{try{throw Error()}catch(x){r=x}e()}}catch(x){if(x&&r&&typeof x.stack=="string"){for(var o=x.stack.split(`
36
+ `),i=r.stack.split(`
37
+ `),a=o.length-1,c=i.length-1;1<=a&&0<=c&&o[a]!==i[c];)c--;for(;1<=a&&0<=c;a--,c--)if(o[a]!==i[c]){if(a!==1||c!==1)do if(a--,c--,0>c||o[a]!==i[c]){var p=`
38
+ `+o[a].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),p}while(1<=a&&0<=c);break}}}finally{ie=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?P(e):""}function pe(e){switch(e.tag){case 5:return P(e.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return e=ue(e.type,!1),e;case 11:return e=ue(e.type.render,!1),e;case 1:return e=ue(e.type,!0),e;default:return""}}function ye(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 ne:return"Fragment";case D:return"Portal";case xe:return"Profiler";case me:return"StrictMode";case be:return"Suspense";case qe:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _e:return(e.displayName||"Context")+".Consumer";case B:return(e._context.displayName||"Context")+".Provider";case Ye:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $e:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case Ve:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}function ve(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 ye(t);case 8:return t===me?"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 Ee(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function je(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function st(e){var t=je(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wn(e){e._valueTracker||(e._valueTracker=st(e))}function vr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=je(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ze(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 gr(e,t){var n=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function pn(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ee(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 yr(e,t){t=t.checked,t!=null&&ge(e,"checked",t,!1)}function Hn(e,t){yr(e,t);var n=Ee(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")?_n(e,t.type,n):t.hasOwnProperty("defaultValue")&&_n(e,t.type,Ee(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function En(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 _n(e,t,n){(t!=="number"||Ze(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jt=Array.isArray;function $t(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ee(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Nt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(s(91));return W({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wr(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(s(92));if(Jt(n)){if(1<n.length)throw Error(s(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ee(n)}}function St(e,t){var n=Ee(t.value),r=Ee(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 Hr(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Kr(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 Mo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Kr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Cn,Si=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Cn=Cn||document.createElement("div"),Cn.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Cn.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function et(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Nn={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},ki=["Webkit","ms","Moz","O"];Object.keys(Nn).forEach(function(e){ki.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Nn[t]=Nn[e]})});function Qr(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Nn.hasOwnProperty(e)&&Nn[e]?(""+t).trim():t+"px"}function Fo(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Qr(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Ul=W({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 kt(e,t){if(t){if(Ul[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Lo(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 bt=null;function qr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Oo=null,Pn=null,Tn=null;function jn(e){if(e=ni(e)){if(typeof Oo!="function")throw Error(s(280));var t=e.stateNode;t&&(t=Qi(t),Oo(e.stateNode,e.type,t))}}function wr(e){Pn?Tn?Tn.push(e):Tn=[e]:Pn=e}function xi(){if(Pn){var e=Pn,t=Tn;if(Tn=Pn=null,jn(e),t)for(e=0;e<t.length;e++)jn(t[e])}}function Kn(e,t){return e(t)}function Ao(){}var Gr=!1;function Yr(e,t,n){if(Gr)return e(t,n);Gr=!0;try{return Kn(e,t,n)}finally{Gr=!1,(Pn!==null||Tn!==null)&&(Ao(),xi())}}function Qn(e,t){var n=e.stateNode;if(n===null)return null;var r=Qi(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(s(231,t,typeof n));return n}var Xr=!1;if(N)try{var xt={};Object.defineProperty(xt,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",xt,xt),window.removeEventListener("test",xt,xt)}catch{Xr=!1}function Ei(e,t,n,r,o,i,a,c,p){var x=Array.prototype.slice.call(arguments,3);try{t.apply(n,x)}catch(F){this.onError(F)}}var mn=!1,Rn=null,qn=!1,zo=null,$l={onError:function(e){mn=!0,Rn=e}};function Sr(e,t,n,r,o,i,a,c,p){mn=!1,Rn=null,Ei.apply($l,arguments)}function Jr(e,t,n,r,o,i,a,c,p){if(Sr.apply(this,arguments),mn){if(mn){var x=Rn;mn=!1,Rn=null}else throw Error(s(198));qn||(qn=!0,zo=x)}}function Vt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Do(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 Io(e){if(Vt(e)!==e)throw Error(s(188))}function _i(e){var t=e.alternate;if(!t){if(t=Vt(e),t===null)throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Io(o),e;if(i===r)return Io(o),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,c=o.child;c;){if(c===n){a=!0,n=o,r=i;break}if(c===r){a=!0,r=o,n=i;break}c=c.sibling}if(!a){for(c=i.child;c;){if(c===n){a=!0,n=i,r=o;break}if(c===r){a=!0,r=i,n=o;break}c=c.sibling}if(!a)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function Zt(e){return e=_i(e),e!==null?Ot(e):null}function Ot(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ot(e);if(t!==null)return t;e=e.sibling}return null}var Bt=l.unstable_scheduleCallback,kr=l.unstable_cancelCallback,br=l.unstable_shouldYield,en=l.unstable_requestPaint,Pe=l.unstable_now,Wt=l.unstable_getCurrentPriorityLevel,Gn=l.unstable_ImmediatePriority,tt=l.unstable_UserBlockingPriority,Mn=l.unstable_NormalPriority,Ci=l.unstable_LowPriority,ht=l.unstable_IdlePriority,Yn=null,At=null;function Vl(e){if(At&&typeof At.onCommitFiberRoot=="function")try{At.onCommitFiberRoot(Yn,e,void 0,(e.current.flags&128)===128)}catch{}}var Ie=Math.clz32?Math.clz32:Wl,Bl=Math.log,Uo=Math.LN2;function Wl(e){return e>>>=0,e===0?32:31-(Bl(e)/Uo|0)|0}var Zr=64,ut=4194304;function vn(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 tn(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var c=a&~o;c!==0?r=vn(c):(i&=a,i!==0&&(r=vn(i)))}else a=n&~o,a!==0?r=vn(a):i!==0&&(r=vn(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ie(t),o=1<<n,r|=e[n],t&=~o;return r}function xr(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 nn(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ie(i),c=1<<a,p=o[a];p===-1?((c&n)===0||(c&r)!==0)&&(o[a]=xr(c,t)):p<=t&&(e.expiredLanes|=c),i&=~c}}function $o(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Vo(){var e=Zr;return Zr<<=1,(Zr&4194240)===0&&(Zr=64),e}function Bo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Er(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ie(t),e[t]=n}function Xn(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 o=31-Ie(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function _r(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ie(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var we=0;function Ni(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Pi,Cr,Ti,ji,Ri,Wo=!1,eo=[],rn=null,gn=null,yn=null,Nr=new Map,Fn=new Map,at=[],on="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 Pr(e,t){switch(e){case"focusin":case"focusout":rn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fn.delete(t.pointerId)}}function Jn(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ni(t),t!==null&&Cr(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Hl(e,t,n,r,o){switch(t){case"focusin":return rn=Jn(rn,e,t,n,r,o),!0;case"dragenter":return gn=Jn(gn,e,t,n,r,o),!0;case"mouseover":return yn=Jn(yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Nr.set(i,Jn(Nr.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Fn.set(i,Jn(Fn.get(i)||null,e,t,n,r,o)),!0}return!1}function Ho(e){var t=Rr(e.target);if(t!==null){var n=Vt(t);if(n!==null){if(t=n.tag,t===13){if(t=Do(n),t!==null){e.blockedOn=t,Ri(e.priority,function(){Ti(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 to(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=k(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bt=r,n.target.dispatchEvent(r),bt=null}else return t=ni(n),t!==null&&Cr(t),e.blockedOn=n,!1;t.shift()}return!0}function Mi(e,t,n){to(e)&&n.delete(t)}function Kl(){Wo=!1,rn!==null&&to(rn)&&(rn=null),gn!==null&&to(gn)&&(gn=null),yn!==null&&to(yn)&&(yn=null),Nr.forEach(Mi),Fn.forEach(Mi)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,Wo||(Wo=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Kl)))}function jr(e){function t(o){return Tr(o,e)}if(0<eo.length){Tr(eo[0],e);for(var n=1;n<eo.length;n++){var r=eo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&Tr(rn,e),gn!==null&&Tr(gn,e),yn!==null&&Tr(yn,e),Nr.forEach(t),Fn.forEach(t),n=0;n<at.length;n++)r=at[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<at.length&&(n=at[0],n.blockedOn===null);)Ho(n),n.blockedOn===null&&at.shift()}var bn=U.ReactCurrentBatchConfig,Zn=!0;function no(e,t,n,r){var o=we,i=bn.transition;bn.transition=null;try{we=1,ro(e,t,n,r)}finally{we=o,bn.transition=i}}function Fi(e,t,n,r){var o=we,i=bn.transition;bn.transition=null;try{we=4,ro(e,t,n,r)}finally{we=o,bn.transition=i}}function ro(e,t,n,r){if(Zn){var o=k(e,t,n,r);if(o===null)ls(e,t,r,m,n),Pr(e,r);else if(Hl(o,e,t,n,r))r.stopPropagation();else if(Pr(e,r),t&4&&-1<on.indexOf(e)){for(;o!==null;){var i=ni(o);if(i!==null&&Pi(i),i=k(e,t,n,r),i===null&&ls(e,t,r,m,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else ls(e,t,r,null,n)}}var m=null;function k(e,t,n,r){if(m=null,e=qr(r),e=Rr(e),e!==null)if(t=Vt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Do(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 m=e,null}function T(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(Wt()){case Gn:return 1;case tt:return 4;case Mn:case Ci:return 16;case ht:return 536870912;default:return 16}default:return 16}}var R=null,J=null,K=null;function ee(){if(K)return K;var e,t=J,n=t.length,r,o="value"in R?R.value:R.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return K=o.slice(e,1<r?1-r:void 0)}function fe(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 Fe(){return!0}function Se(){return!1}function Re(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Fe:Se,this.isPropagationStopped=Se,this}return W(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=Fe)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Fe)},persist:function(){},isPersistent:Fe}),t}var pt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nt=Re(pt),Pt=W({},pt,{view:0,detail:0}),Ln=Re(Pt),On,mt,rt,er=W({},Pt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oe,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!==rt&&(rt&&e.type==="mousemove"?(On=e.screenX-rt.screenX,mt=e.screenY-rt.screenY):mt=On=0,rt=e),On)},movementY:function(e){return"movementY"in e?e.movementY:mt}}),Ko=Re(er),Li=W({},er,{dataTransfer:0}),Ql=Re(Li),ql=W({},Pt,{relatedTarget:0}),Ht=Re(ql),Gl=W({},pt,{animationName:0,elapsedTime:0,pseudoElement:0}),Qo=Re(Gl),oo=W({},pt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ct=Re(oo),Oi=W({},pt,{data:0}),io=Re(Oi),lo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yl={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"},de={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Me(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=de[e])?!!t[e]:!1}function Oe(){return Me}var He=W({},Pt,{key:function(e){if(e.key){var t=lo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fe(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yl[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oe,charCode:function(e){return e.type==="keypress"?fe(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fe(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Et=Re(He),zt=W({},er,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tr=Re(zt),Ai=W({},Pt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oe}),zi=Re(Ai),Di=W({},pt,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ii=Re(Di),Kf=W({},er,{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}),Qf=Re(Kf),qf=[9,13,27,32],Xl=N&&"CompositionEvent"in window,qo=null;N&&"documentMode"in document&&(qo=document.documentMode);var Gf=N&&"TextEvent"in window&&!qo,Hu=N&&(!Xl||qo&&8<qo&&11>=qo),Ku=" ",Qu=!1;function qu(e,t){switch(e){case"keyup":return qf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var so=!1;function Yf(e,t){switch(e){case"compositionend":return Gu(t);case"keypress":return t.which!==32?null:(Qu=!0,Ku);case"textInput":return e=t.data,e===Ku&&Qu?null:e;default:return null}}function Xf(e,t){if(so)return e==="compositionend"||!Xl&&qu(e,t)?(e=ee(),K=J=R=null,so=!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 Hu&&t.locale!=="ko"?null:t.data;default:return null}}var Jf={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 Yu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jf[e.type]:t==="textarea"}function Xu(e,t,n,r){wr(r),t=Wi(t,"onChange"),0<t.length&&(n=new nt("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Go=null,Yo=null;function bf(e){pa(e,0)}function Ui(e){var t=ho(e);if(vr(t))return e}function Zf(e,t){if(e==="change")return t}var Ju=!1;if(N){var Jl;if(N){var bl="oninput"in document;if(!bl){var bu=document.createElement("div");bu.setAttribute("oninput","return;"),bl=typeof bu.oninput=="function"}Jl=bl}else Jl=!1;Ju=Jl&&(!document.documentMode||9<document.documentMode)}function Zu(){Go&&(Go.detachEvent("onpropertychange",ea),Yo=Go=null)}function ea(e){if(e.propertyName==="value"&&Ui(Yo)){var t=[];Xu(t,Yo,e,qr(e)),Yr(bf,t)}}function ed(e,t,n){e==="focusin"?(Zu(),Go=t,Yo=n,Go.attachEvent("onpropertychange",ea)):e==="focusout"&&Zu()}function td(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ui(Yo)}function nd(e,t){if(e==="click")return Ui(t)}function rd(e,t){if(e==="input"||e==="change")return Ui(t)}function od(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:od;function Xo(e,t){if(ln(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 o=n[r];if(!L.call(t,o)||!ln(e[o],t[o]))return!1}return!0}function ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function na(e,t){var n=ta(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=ta(n)}}function ra(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ra(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oa(){for(var e=window,t=Ze();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ze(e.document)}return t}function Zl(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 id(e){var t=oa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ra(n.ownerDocument.documentElement,n)){if(r!==null&&Zl(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=na(n,i);var a=na(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 ld=N&&"documentMode"in document&&11>=document.documentMode,uo=null,es=null,Jo=null,ts=!1;function ia(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ts||uo==null||uo!==Ze(r)||(r=uo,"selectionStart"in r&&Zl(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}),Jo&&Xo(Jo,r)||(Jo=r,r=Wi(es,"onSelect"),0<r.length&&(t=new nt("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=uo)))}function $i(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ao={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionend:$i("Transition","TransitionEnd")},ns={},la={};N&&(la=document.createElement("div").style,"AnimationEvent"in window||(delete ao.animationend.animation,delete ao.animationiteration.animation,delete ao.animationstart.animation),"TransitionEvent"in window||delete ao.transitionend.transition);function Vi(e){if(ns[e])return ns[e];if(!ao[e])return e;var t=ao[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in la)return ns[e]=t[n];return e}var sa=Vi("animationend"),ua=Vi("animationiteration"),aa=Vi("animationstart"),ca=Vi("transitionend"),fa=new Map,da="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 nr(e,t){fa.set(e,t),y(t,[e])}for(var rs=0;rs<da.length;rs++){var os=da[rs],sd=os.toLowerCase(),ud=os[0].toUpperCase()+os.slice(1);nr(sd,"on"+ud)}nr(sa,"onAnimationEnd"),nr(ua,"onAnimationIteration"),nr(aa,"onAnimationStart"),nr("dblclick","onDoubleClick"),nr("focusin","onFocus"),nr("focusout","onBlur"),nr(ca,"onTransitionEnd"),E("onMouseEnter",["mouseout","mouseover"]),E("onMouseLeave",["mouseout","mouseover"]),E("onPointerEnter",["pointerout","pointerover"]),E("onPointerLeave",["pointerout","pointerover"]),y("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),y("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),y("onBeforeInput",["compositionend","keypress","textInput","paste"]),y("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),y("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),y("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bo="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(" "),ad=new Set("cancel close invalid load scroll toggle".split(" ").concat(bo));function ha(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Jr(r,t,void 0,e),e.currentTarget=null}function pa(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var c=r[a],p=c.instance,x=c.currentTarget;if(c=c.listener,p!==i&&o.isPropagationStopped())break e;ha(o,c,x),i=p}else for(a=0;a<r.length;a++){if(c=r[a],p=c.instance,x=c.currentTarget,c=c.listener,p!==i&&o.isPropagationStopped())break e;ha(o,c,x),i=p}}}if(qn)throw e=zo,qn=!1,zo=null,e}function Ae(e,t){var n=t[ds];n===void 0&&(n=t[ds]=new Set);var r=e+"__bubble";n.has(r)||(ma(t,e,2,!1),n.add(r))}function is(e,t,n){var r=0;t&&(r|=4),ma(n,e,r,t)}var Bi="_reactListening"+Math.random().toString(36).slice(2);function Zo(e){if(!e[Bi]){e[Bi]=!0,f.forEach(function(n){n!=="selectionchange"&&(ad.has(n)||is(n,!1,e),is(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bi]||(t[Bi]=!0,is("selectionchange",!1,t))}}function ma(e,t,n,r){switch(T(t)){case 1:var o=no;break;case 4:o=Fi;break;default:o=ro}n=o.bind(null,t,n,e),o=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ls(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var c=r.stateNode.containerInfo;if(c===o||c.nodeType===8&&c.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var p=a.tag;if((p===3||p===4)&&(p=a.stateNode.containerInfo,p===o||p.nodeType===8&&p.parentNode===o))return;a=a.return}for(;c!==null;){if(a=Rr(c),a===null)return;if(p=a.tag,p===5||p===6){r=i=a;continue e}c=c.parentNode}}r=r.return}Yr(function(){var x=i,F=qr(n),O=[];e:{var M=fa.get(e);if(M!==void 0){var Y=nt,Z=e;switch(e){case"keypress":if(fe(n)===0)break e;case"keydown":case"keyup":Y=Et;break;case"focusin":Z="focus",Y=Ht;break;case"focusout":Z="blur",Y=Ht;break;case"beforeblur":case"afterblur":Y=Ht;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":Y=Ko;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=Ql;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=zi;break;case sa:case ua:case aa:Y=Qo;break;case ca:Y=Ii;break;case"scroll":Y=Ln;break;case"wheel":Y=Qf;break;case"copy":case"cut":case"paste":Y=ct;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=tr}var re=(t&4)!==0,Qe=!re&&e==="scroll",w=re?M!==null?M+"Capture":null:M;re=[];for(var v=x,S;v!==null;){S=v;var A=S.stateNode;if(S.tag===5&&A!==null&&(S=A,w!==null&&(A=Qn(v,w),A!=null&&re.push(ei(v,A,S)))),Qe)break;v=v.return}0<re.length&&(M=new Y(M,Z,null,n,F),O.push({event:M,listeners:re}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",M&&n!==bt&&(Z=n.relatedTarget||n.fromElement)&&(Rr(Z)||Z[An]))break e;if((Y||M)&&(M=F.window===F?F:(M=F.ownerDocument)?M.defaultView||M.parentWindow:window,Y?(Z=n.relatedTarget||n.toElement,Y=x,Z=Z?Rr(Z):null,Z!==null&&(Qe=Vt(Z),Z!==Qe||Z.tag!==5&&Z.tag!==6)&&(Z=null)):(Y=null,Z=x),Y!==Z)){if(re=Ko,A="onMouseLeave",w="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(re=tr,A="onPointerLeave",w="onPointerEnter",v="pointer"),Qe=Y==null?M:ho(Y),S=Z==null?M:ho(Z),M=new re(A,v+"leave",Y,n,F),M.target=Qe,M.relatedTarget=S,A=null,Rr(F)===x&&(re=new re(w,v+"enter",Z,n,F),re.target=S,re.relatedTarget=Qe,A=re),Qe=A,Y&&Z)t:{for(re=Y,w=Z,v=0,S=re;S;S=co(S))v++;for(S=0,A=w;A;A=co(A))S++;for(;0<v-S;)re=co(re),v--;for(;0<S-v;)w=co(w),S--;for(;v--;){if(re===w||w!==null&&re===w.alternate)break t;re=co(re),w=co(w)}re=null}else re=null;Y!==null&&va(O,M,Y,re,!1),Z!==null&&Qe!==null&&va(O,Qe,Z,re,!0)}}e:{if(M=x?ho(x):window,Y=M.nodeName&&M.nodeName.toLowerCase(),Y==="select"||Y==="input"&&M.type==="file")var oe=Zf;else if(Yu(M))if(Ju)oe=rd;else{oe=td;var ae=ed}else(Y=M.nodeName)&&Y.toLowerCase()==="input"&&(M.type==="checkbox"||M.type==="radio")&&(oe=nd);if(oe&&(oe=oe(e,x))){Xu(O,oe,n,F);break e}ae&&ae(e,M,x),e==="focusout"&&(ae=M._wrapperState)&&ae.controlled&&M.type==="number"&&_n(M,"number",M.value)}switch(ae=x?ho(x):window,e){case"focusin":(Yu(ae)||ae.contentEditable==="true")&&(uo=ae,es=x,Jo=null);break;case"focusout":Jo=es=uo=null;break;case"mousedown":ts=!0;break;case"contextmenu":case"mouseup":case"dragend":ts=!1,ia(O,n,F);break;case"selectionchange":if(ld)break;case"keydown":case"keyup":ia(O,n,F)}var ce;if(Xl)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else so?qu(e,n)&&(he="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(he="onCompositionStart");he&&(Hu&&n.locale!=="ko"&&(so||he!=="onCompositionStart"?he==="onCompositionEnd"&&so&&(ce=ee()):(R=F,J="value"in R?R.value:R.textContent,so=!0)),ae=Wi(x,he),0<ae.length&&(he=new io(he,e,null,n,F),O.push({event:he,listeners:ae}),ce?he.data=ce:(ce=Gu(n),ce!==null&&(he.data=ce)))),(ce=Gf?Yf(e,n):Xf(e,n))&&(x=Wi(x,"onBeforeInput"),0<x.length&&(F=new io("onBeforeInput","beforeinput",null,n,F),O.push({event:F,listeners:x}),F.data=ce))}pa(O,t)})}function ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wi(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Qn(e,n),i!=null&&r.unshift(ei(e,i,o)),i=Qn(e,t),i!=null&&r.push(ei(e,i,o))),e=e.return}return r}function co(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function va(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var c=n,p=c.alternate,x=c.stateNode;if(p!==null&&p===r)break;c.tag===5&&x!==null&&(c=x,o?(p=Qn(n,i),p!=null&&a.unshift(ei(n,p,c))):o||(p=Qn(n,i),p!=null&&a.push(ei(n,p,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var cd=/\r\n?/g,fd=/\u0000|\uFFFD/g;function ga(e){return(typeof e=="string"?e:""+e).replace(cd,`
39
+ `).replace(fd,"")}function Hi(e,t,n){if(t=ga(t),ga(e)!==t&&n)throw Error(s(425))}function Ki(){}var ss=null,us=null;function as(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 cs=typeof setTimeout=="function"?setTimeout:void 0,dd=typeof clearTimeout=="function"?clearTimeout:void 0,ya=typeof Promise=="function"?Promise:void 0,hd=typeof queueMicrotask=="function"?queueMicrotask:typeof ya<"u"?function(e){return ya.resolve(null).then(e).catch(pd)}:cs;function pd(e){setTimeout(function(){throw e})}function fs(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),jr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);jr(t)}function rr(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 wa(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 fo=Math.random().toString(36).slice(2),wn="__reactFiber$"+fo,ti="__reactProps$"+fo,An="__reactContainer$"+fo,ds="__reactEvents$"+fo,md="__reactListeners$"+fo,vd="__reactHandles$"+fo;function Rr(e){var t=e[wn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[An]||n[wn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wa(e);e!==null;){if(n=e[wn])return n;e=wa(e)}return t}e=n,n=e.parentNode}return null}function ni(e){return e=e[wn]||e[An],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ho(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(s(33))}function Qi(e){return e[ti]||null}var hs=[],po=-1;function or(e){return{current:e}}function ze(e){0>po||(e.current=hs[po],hs[po]=null,po--)}function Le(e,t){po++,hs[po]=e.current,e.current=t}var ir={},vt=or(ir),Tt=or(!1),Mr=ir;function mo(e,t){var n=e.type.contextTypes;if(!n)return ir;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function jt(e){return e=e.childContextTypes,e!=null}function qi(){ze(Tt),ze(vt)}function Sa(e,t,n){if(vt.current!==ir)throw Error(s(168));Le(vt,t),Le(Tt,n)}function ka(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(s(108,ve(e)||"Unknown",o));return W({},n,r)}function Gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Mr=vt.current,Le(vt,e),Le(Tt,Tt.current),!0}function xa(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=ka(e,t,Mr),r.__reactInternalMemoizedMergedChildContext=e,ze(Tt),ze(vt),Le(vt,e)):ze(Tt),Le(Tt,n)}var zn=null,Yi=!1,ps=!1;function Ea(e){zn===null?zn=[e]:zn.push(e)}function gd(e){Yi=!0,Ea(e)}function lr(){if(!ps&&zn!==null){ps=!0;var e=0,t=we;try{var n=zn;for(we=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zn=null,Yi=!1}catch(o){throw zn!==null&&(zn=zn.slice(e+1)),Bt(Gn,lr),o}finally{we=t,ps=!1}}return null}var vo=[],go=0,Xi=null,Ji=0,Kt=[],Qt=0,Fr=null,Dn=1,In="";function Lr(e,t){vo[go++]=Ji,vo[go++]=Xi,Xi=e,Ji=t}function _a(e,t,n){Kt[Qt++]=Dn,Kt[Qt++]=In,Kt[Qt++]=Fr,Fr=e;var r=Dn;e=In;var o=32-Ie(r)-1;r&=~(1<<o),n+=1;var i=32-Ie(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Dn=1<<32-Ie(t)+o|n<<o|r,In=i+e}else Dn=1<<i|n<<o|r,In=e}function ms(e){e.return!==null&&(Lr(e,1),_a(e,1,0))}function vs(e){for(;e===Xi;)Xi=vo[--go],vo[go]=null,Ji=vo[--go],vo[go]=null;for(;e===Fr;)Fr=Kt[--Qt],Kt[Qt]=null,In=Kt[--Qt],Kt[Qt]=null,Dn=Kt[--Qt],Kt[Qt]=null}var Dt=null,It=null,Ue=!1,sn=null;function Ca(e,t){var n=Xt(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 Na(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,Dt=e,It=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dt=e,It=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Fr!==null?{id:Dn,overflow:In}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Dt=e,It=null,!0):!1;default:return!1}}function gs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ys(e){if(Ue){var t=It;if(t){var n=t;if(!Na(e,t)){if(gs(e))throw Error(s(418));t=rr(n.nextSibling);var r=Dt;t&&Na(e,t)?Ca(r,n):(e.flags=e.flags&-4097|2,Ue=!1,Dt=e)}}else{if(gs(e))throw Error(s(418));e.flags=e.flags&-4097|2,Ue=!1,Dt=e}}}function Pa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Dt=e}function bi(e){if(e!==Dt)return!1;if(!Ue)return Pa(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!as(e.type,e.memoizedProps)),t&&(t=It)){if(gs(e))throw Ta(),Error(s(418));for(;t;)Ca(e,t),t=rr(t.nextSibling)}if(Pa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){It=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}It=null}}else It=Dt?rr(e.stateNode.nextSibling):null;return!0}function Ta(){for(var e=It;e;)e=rr(e.nextSibling)}function yo(){It=Dt=null,Ue=!1}function ws(e){sn===null?sn=[e]:sn.push(e)}var yd=U.ReactCurrentBatchConfig;function ri(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(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var c=o.refs;a===null?delete c[i]:c[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function Zi(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ja(e){var t=e._init;return t(e._payload)}function Ra(e){function t(w,v){if(e){var S=w.deletions;S===null?(w.deletions=[v],w.flags|=16):S.push(v)}}function n(w,v){if(!e)return null;for(;v!==null;)t(w,v),v=v.sibling;return null}function r(w,v){for(w=new Map;v!==null;)v.key!==null?w.set(v.key,v):w.set(v.index,v),v=v.sibling;return w}function o(w,v){return w=pr(w,v),w.index=0,w.sibling=null,w}function i(w,v,S){return w.index=S,e?(S=w.alternate,S!==null?(S=S.index,S<v?(w.flags|=2,v):S):(w.flags|=2,v)):(w.flags|=1048576,v)}function a(w){return e&&w.alternate===null&&(w.flags|=2),w}function c(w,v,S,A){return v===null||v.tag!==6?(v=cu(S,w.mode,A),v.return=w,v):(v=o(v,S),v.return=w,v)}function p(w,v,S,A){var oe=S.type;return oe===ne?F(w,v,S.props.children,A,S.key):v!==null&&(v.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Ve&&ja(oe)===v.type)?(A=o(v,S.props),A.ref=ri(w,v,S),A.return=w,A):(A=El(S.type,S.key,S.props,null,w.mode,A),A.ref=ri(w,v,S),A.return=w,A)}function x(w,v,S,A){return v===null||v.tag!==4||v.stateNode.containerInfo!==S.containerInfo||v.stateNode.implementation!==S.implementation?(v=fu(S,w.mode,A),v.return=w,v):(v=o(v,S.children||[]),v.return=w,v)}function F(w,v,S,A,oe){return v===null||v.tag!==7?(v=Vr(S,w.mode,A,oe),v.return=w,v):(v=o(v,S),v.return=w,v)}function O(w,v,S){if(typeof v=="string"&&v!==""||typeof v=="number")return v=cu(""+v,w.mode,S),v.return=w,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case H:return S=El(v.type,v.key,v.props,null,w.mode,S),S.ref=ri(w,null,v),S.return=w,S;case D:return v=fu(v,w.mode,S),v.return=w,v;case Ve:var A=v._init;return O(w,A(v._payload),S)}if(Jt(v)||se(v))return v=Vr(v,w.mode,S,null),v.return=w,v;Zi(w,v)}return null}function M(w,v,S,A){var oe=v!==null?v.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return oe!==null?null:c(w,v,""+S,A);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case H:return S.key===oe?p(w,v,S,A):null;case D:return S.key===oe?x(w,v,S,A):null;case Ve:return oe=S._init,M(w,v,oe(S._payload),A)}if(Jt(S)||se(S))return oe!==null?null:F(w,v,S,A,null);Zi(w,S)}return null}function Y(w,v,S,A,oe){if(typeof A=="string"&&A!==""||typeof A=="number")return w=w.get(S)||null,c(v,w,""+A,oe);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case H:return w=w.get(A.key===null?S:A.key)||null,p(v,w,A,oe);case D:return w=w.get(A.key===null?S:A.key)||null,x(v,w,A,oe);case Ve:var ae=A._init;return Y(w,v,S,ae(A._payload),oe)}if(Jt(A)||se(A))return w=w.get(S)||null,F(v,w,A,oe,null);Zi(v,A)}return null}function Z(w,v,S,A){for(var oe=null,ae=null,ce=v,he=v=0,lt=null;ce!==null&&he<S.length;he++){ce.index>he?(lt=ce,ce=null):lt=ce.sibling;var Te=M(w,ce,S[he],A);if(Te===null){ce===null&&(ce=lt);break}e&&ce&&Te.alternate===null&&t(w,ce),v=i(Te,v,he),ae===null?oe=Te:ae.sibling=Te,ae=Te,ce=lt}if(he===S.length)return n(w,ce),Ue&&Lr(w,he),oe;if(ce===null){for(;he<S.length;he++)ce=O(w,S[he],A),ce!==null&&(v=i(ce,v,he),ae===null?oe=ce:ae.sibling=ce,ae=ce);return Ue&&Lr(w,he),oe}for(ce=r(w,ce);he<S.length;he++)lt=Y(ce,w,he,S[he],A),lt!==null&&(e&&lt.alternate!==null&&ce.delete(lt.key===null?he:lt.key),v=i(lt,v,he),ae===null?oe=lt:ae.sibling=lt,ae=lt);return e&&ce.forEach(function(mr){return t(w,mr)}),Ue&&Lr(w,he),oe}function re(w,v,S,A){var oe=se(S);if(typeof oe!="function")throw Error(s(150));if(S=oe.call(S),S==null)throw Error(s(151));for(var ae=oe=null,ce=v,he=v=0,lt=null,Te=S.next();ce!==null&&!Te.done;he++,Te=S.next()){ce.index>he?(lt=ce,ce=null):lt=ce.sibling;var mr=M(w,ce,Te.value,A);if(mr===null){ce===null&&(ce=lt);break}e&&ce&&mr.alternate===null&&t(w,ce),v=i(mr,v,he),ae===null?oe=mr:ae.sibling=mr,ae=mr,ce=lt}if(Te.done)return n(w,ce),Ue&&Lr(w,he),oe;if(ce===null){for(;!Te.done;he++,Te=S.next())Te=O(w,Te.value,A),Te!==null&&(v=i(Te,v,he),ae===null?oe=Te:ae.sibling=Te,ae=Te);return Ue&&Lr(w,he),oe}for(ce=r(w,ce);!Te.done;he++,Te=S.next())Te=Y(ce,w,he,Te.value,A),Te!==null&&(e&&Te.alternate!==null&&ce.delete(Te.key===null?he:Te.key),v=i(Te,v,he),ae===null?oe=Te:ae.sibling=Te,ae=Te);return e&&ce.forEach(function(Jd){return t(w,Jd)}),Ue&&Lr(w,he),oe}function Qe(w,v,S,A){if(typeof S=="object"&&S!==null&&S.type===ne&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case H:e:{for(var oe=S.key,ae=v;ae!==null;){if(ae.key===oe){if(oe=S.type,oe===ne){if(ae.tag===7){n(w,ae.sibling),v=o(ae,S.props.children),v.return=w,w=v;break e}}else if(ae.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===Ve&&ja(oe)===ae.type){n(w,ae.sibling),v=o(ae,S.props),v.ref=ri(w,ae,S),v.return=w,w=v;break e}n(w,ae);break}else t(w,ae);ae=ae.sibling}S.type===ne?(v=Vr(S.props.children,w.mode,A,S.key),v.return=w,w=v):(A=El(S.type,S.key,S.props,null,w.mode,A),A.ref=ri(w,v,S),A.return=w,w=A)}return a(w);case D:e:{for(ae=S.key;v!==null;){if(v.key===ae)if(v.tag===4&&v.stateNode.containerInfo===S.containerInfo&&v.stateNode.implementation===S.implementation){n(w,v.sibling),v=o(v,S.children||[]),v.return=w,w=v;break e}else{n(w,v);break}else t(w,v);v=v.sibling}v=fu(S,w.mode,A),v.return=w,w=v}return a(w);case Ve:return ae=S._init,Qe(w,v,ae(S._payload),A)}if(Jt(S))return Z(w,v,S,A);if(se(S))return re(w,v,S,A);Zi(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,v!==null&&v.tag===6?(n(w,v.sibling),v=o(v,S),v.return=w,w=v):(n(w,v),v=cu(S,w.mode,A),v.return=w,w=v),a(w)):n(w,v)}return Qe}var wo=Ra(!0),Ma=Ra(!1),el=or(null),tl=null,So=null,Ss=null;function ks(){Ss=So=tl=null}function xs(e){var t=el.current;ze(el),e._currentValue=t}function Es(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 ko(e,t){tl=e,Ss=So=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Rt=!0),e.firstContext=null)}function qt(e){var t=e._currentValue;if(Ss!==e)if(e={context:e,memoizedValue:t,next:null},So===null){if(tl===null)throw Error(s(308));So=e,tl.dependencies={lanes:0,firstContext:e}}else So=So.next=e;return t}var Or=null;function _s(e){Or===null?Or=[e]:Or.push(e)}function Fa(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,_s(t)):(n.next=o.next,o.next=n),t.interleaved=n,Un(e,r)}function Un(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 sr=!1;function Cs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function La(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 $n(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ur(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ce&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Un(e,n)}return o=r.interleaved,o===null?(t.next=t,_s(r)):(t.next=o.next,o.next=t),r.interleaved=t,Un(e,n)}function nl(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,_r(e,n)}}function Oa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,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 rl(e,t,n,r){var o=e.updateQueue;sr=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,c=o.shared.pending;if(c!==null){o.shared.pending=null;var p=c,x=p.next;p.next=null,a===null?i=x:a.next=x,a=p;var F=e.alternate;F!==null&&(F=F.updateQueue,c=F.lastBaseUpdate,c!==a&&(c===null?F.firstBaseUpdate=x:c.next=x,F.lastBaseUpdate=p))}if(i!==null){var O=o.baseState;a=0,F=x=p=null,c=i;do{var M=c.lane,Y=c.eventTime;if((r&M)===M){F!==null&&(F=F.next={eventTime:Y,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var Z=e,re=c;switch(M=t,Y=n,re.tag){case 1:if(Z=re.payload,typeof Z=="function"){O=Z.call(Y,O,M);break e}O=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=re.payload,M=typeof Z=="function"?Z.call(Y,O,M):Z,M==null)break e;O=W({},O,M);break e;case 2:sr=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,M=o.effects,M===null?o.effects=[c]:M.push(c))}else Y={eventTime:Y,lane:M,tag:c.tag,payload:c.payload,callback:c.callback,next:null},F===null?(x=F=Y,p=O):F=F.next=Y,a|=M;if(c=c.next,c===null){if(c=o.shared.pending,c===null)break;M=c,c=M.next,M.next=null,o.lastBaseUpdate=M,o.shared.pending=null}}while(!0);if(F===null&&(p=O),o.baseState=p,o.firstBaseUpdate=x,o.lastBaseUpdate=F,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Dr|=a,e.lanes=a,e.memoizedState=O}}function Aa(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(s(191,o));o.call(r)}}}var oi={},Sn=or(oi),ii=or(oi),li=or(oi);function Ar(e){if(e===oi)throw Error(s(174));return e}function Ns(e,t){switch(Le(li,t),Le(ii,e),Le(Sn,oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Mo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Mo(t,e)}ze(Sn),Le(Sn,t)}function xo(){ze(Sn),ze(ii),ze(li)}function za(e){Ar(li.current);var t=Ar(Sn.current),n=Mo(t,e.type);t!==n&&(Le(ii,e),Le(Sn,n))}function Ps(e){ii.current===e&&(ze(Sn),ze(ii))}var Be=or(0);function ol(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ts=[];function js(){for(var e=0;e<Ts.length;e++)Ts[e]._workInProgressVersionPrimary=null;Ts.length=0}var il=U.ReactCurrentDispatcher,Rs=U.ReactCurrentBatchConfig,zr=0,We=null,Xe=null,ot=null,ll=!1,si=!1,ui=0,wd=0;function gt(){throw Error(s(321))}function Ms(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ln(e[n],t[n]))return!1;return!0}function Fs(e,t,n,r,o,i){if(zr=i,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,il.current=e===null||e.memoizedState===null?Ed:_d,e=n(r,o),si){i=0;do{if(si=!1,ui=0,25<=i)throw Error(s(301));i+=1,ot=Xe=null,t.updateQueue=null,il.current=Cd,e=n(r,o)}while(si)}if(il.current=al,t=Xe!==null&&Xe.next!==null,zr=0,ot=Xe=We=null,ll=!1,t)throw Error(s(300));return e}function Ls(){var e=ui!==0;return ui=0,e}function kn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?We.memoizedState=ot=e:ot=ot.next=e,ot}function Gt(){if(Xe===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?We.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw Error(s(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?We.memoizedState=ot=e:ot=ot.next=e}return ot}function ai(e,t){return typeof t=="function"?t(e):t}function Os(e){var t=Gt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=Xe,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var c=a=null,p=null,x=i;do{var F=x.lane;if((zr&F)===F)p!==null&&(p=p.next={lane:0,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),r=x.hasEagerState?x.eagerState:e(r,x.action);else{var O={lane:F,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null};p===null?(c=p=O,a=r):p=p.next=O,We.lanes|=F,Dr|=F}x=x.next}while(x!==null&&x!==i);p===null?a=r:p.next=c,ln(r,t.memoizedState)||(Rt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=p,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,We.lanes|=i,Dr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function As(e){var t=Gt(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);ln(i,t.memoizedState)||(Rt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Da(){}function Ia(e,t){var n=We,r=Gt(),o=t(),i=!ln(r.memoizedState,o);if(i&&(r.memoizedState=o,Rt=!0),r=r.queue,zs(Va.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,ci(9,$a.bind(null,n,r,o,t),void 0,null),it===null)throw Error(s(349));(zr&30)!==0||Ua(n,t,o)}return o}function Ua(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function $a(e,t,n,r){t.value=n,t.getSnapshot=r,Ba(t)&&Wa(e)}function Va(e,t,n){return n(function(){Ba(t)&&Wa(e)})}function Ba(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ln(e,n)}catch{return!0}}function Wa(e){var t=Un(e,1);t!==null&&fn(t,e,1,-1)}function Ha(e){var t=kn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ai,lastRenderedState:e},t.queue=e,e=e.dispatch=xd.bind(null,We,e),[t.memoizedState,e]}function ci(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.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 Ka(){return Gt().memoizedState}function sl(e,t,n,r){var o=kn();We.flags|=e,o.memoizedState=ci(1|t,n,void 0,r===void 0?null:r)}function ul(e,t,n,r){var o=Gt();r=r===void 0?null:r;var i=void 0;if(Xe!==null){var a=Xe.memoizedState;if(i=a.destroy,r!==null&&Ms(r,a.deps)){o.memoizedState=ci(t,n,i,r);return}}We.flags|=e,o.memoizedState=ci(1|t,n,i,r)}function Qa(e,t){return sl(8390656,8,e,t)}function zs(e,t){return ul(2048,8,e,t)}function qa(e,t){return ul(4,2,e,t)}function Ga(e,t){return ul(4,4,e,t)}function Ya(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 Xa(e,t,n){return n=n!=null?n.concat([e]):null,ul(4,4,Ya.bind(null,t,e),n)}function Ds(){}function Ja(e,t){var n=Gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ms(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ba(e,t){var n=Gt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ms(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Za(e,t,n){return(zr&21)===0?(e.baseState&&(e.baseState=!1,Rt=!0),e.memoizedState=n):(ln(n,t)||(n=Vo(),We.lanes|=n,Dr|=n,e.baseState=!0),t)}function Sd(e,t){var n=we;we=n!==0&&4>n?n:4,e(!0);var r=Rs.transition;Rs.transition={};try{e(!1),t()}finally{we=n,Rs.transition=r}}function ec(){return Gt().memoizedState}function kd(e,t,n){var r=dr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},tc(e))nc(t,n);else if(n=Fa(e,t,n,r),n!==null){var o=Ct();fn(n,e,r,o),rc(n,t,r)}}function xd(e,t,n){var r=dr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(tc(e))nc(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,c=i(a,n);if(o.hasEagerState=!0,o.eagerState=c,ln(c,a)){var p=t.interleaved;p===null?(o.next=o,_s(t)):(o.next=p.next,p.next=o),t.interleaved=o;return}}catch{}finally{}n=Fa(e,t,o,r),n!==null&&(o=Ct(),fn(n,e,r,o),rc(n,t,r))}}function tc(e){var t=e.alternate;return e===We||t!==null&&t===We}function nc(e,t){si=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function rc(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_r(e,n)}}var al={readContext:qt,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},Ed={readContext:qt,useCallback:function(e,t){return kn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Qa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,sl(4194308,4,Ya.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sl(4194308,4,e,t)},useInsertionEffect:function(e,t){return sl(4,2,e,t)},useMemo:function(e,t){var n=kn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kn();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=kd.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=kn();return e={current:e},t.memoizedState=e},useState:Ha,useDebugValue:Ds,useDeferredValue:function(e){return kn().memoizedState=e},useTransition:function(){var e=Ha(!1),t=e[0];return e=Sd.bind(null,e[1]),kn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,o=kn();if(Ue){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),it===null)throw Error(s(349));(zr&30)!==0||Ua(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Qa(Va.bind(null,r,i,e),[e]),r.flags|=2048,ci(9,$a.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=kn(),t=it.identifierPrefix;if(Ue){var n=In,r=Dn;n=(r&~(1<<32-Ie(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ui++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=wd++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_d={readContext:qt,useCallback:Ja,useContext:qt,useEffect:zs,useImperativeHandle:Xa,useInsertionEffect:qa,useLayoutEffect:Ga,useMemo:ba,useReducer:Os,useRef:Ka,useState:function(){return Os(ai)},useDebugValue:Ds,useDeferredValue:function(e){var t=Gt();return Za(t,Xe.memoizedState,e)},useTransition:function(){var e=Os(ai)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:Da,useSyncExternalStore:Ia,useId:ec,unstable_isNewReconciler:!1},Cd={readContext:qt,useCallback:Ja,useContext:qt,useEffect:zs,useImperativeHandle:Xa,useInsertionEffect:qa,useLayoutEffect:Ga,useMemo:ba,useReducer:As,useRef:Ka,useState:function(){return As(ai)},useDebugValue:Ds,useDeferredValue:function(e){var t=Gt();return Xe===null?t.memoizedState=e:Za(t,Xe.memoizedState,e)},useTransition:function(){var e=As(ai)[0],t=Gt().memoizedState;return[e,t]},useMutableSource:Da,useSyncExternalStore:Ia,useId:ec,unstable_isNewReconciler:!1};function un(e,t){if(e&&e.defaultProps){t=W({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Is(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:W({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cl={isMounted:function(e){return(e=e._reactInternals)?Vt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ct(),o=dr(e),i=$n(r,o);i.payload=t,n!=null&&(i.callback=n),t=ur(e,i,o),t!==null&&(fn(t,e,o,r),nl(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ct(),o=dr(e),i=$n(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=ur(e,i,o),t!==null&&(fn(t,e,o,r),nl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ct(),r=dr(e),o=$n(n,r);o.tag=2,t!=null&&(o.callback=t),t=ur(e,o,r),t!==null&&(fn(t,e,r,n),nl(t,e,r))}};function oc(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Xo(n,r)||!Xo(o,i):!0}function ic(e,t,n){var r=!1,o=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=qt(i):(o=jt(t)?Mr:vt.current,r=t.contextTypes,i=(r=r!=null)?mo(e,o):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=cl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function lc(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&&cl.enqueueReplaceState(t,t.state,null)}function Us(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Cs(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=qt(i):(i=jt(t)?Mr:vt.current,o.context=mo(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Is(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&cl.enqueueReplaceState(o,o.state,null),rl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Eo(e,t){try{var n="",r=t;do n+=pe(r),r=r.return;while(r);var o=n}catch(i){o=`
40
+ Error generating stack: `+i.message+`
41
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function $s(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Nd=typeof WeakMap=="function"?WeakMap:Map;function sc(e,t,n){n=$n(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gl||(gl=!0,nu=r),Vs(e,t)},n}function uc(e,t,n){n=$n(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Vs(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Vs(e,t),typeof r!="function"&&(cr===null?cr=new Set([this]):cr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function ac(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nd;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=$d.bind(null,e,t,n),t.then(e,e))}function cc(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 fc(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$n(-1,1),t.tag=2,ur(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Pd=U.ReactCurrentOwner,Rt=!1;function _t(e,t,n,r){t.child=e===null?Ma(t,null,n,r):wo(t,e.child,n,r)}function dc(e,t,n,r,o){n=n.render;var i=t.ref;return ko(t,o),r=Fs(e,t,n,r,i,o),n=Ls(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vn(e,t,o)):(Ue&&n&&ms(t),t.flags|=1,_t(e,t,r,o),t.child)}function hc(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!au(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,pc(e,t,i,r,o)):(e=El(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xo,n(a,r)&&e.ref===t.ref)return Vn(e,t,o)}return t.flags|=1,e=pr(i,r),e.ref=t.ref,e.return=t,t.child=e}function pc(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Xo(i,r)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,Vn(e,t,o)}return Bs(e,t,n,r,o)}function mc(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(Co,Ut),Ut|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Le(Co,Ut),Ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Le(Co,Ut),Ut|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Le(Co,Ut),Ut|=r;return _t(e,t,o,n),t.child}function vc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Bs(e,t,n,r,o){var i=jt(n)?Mr:vt.current;return i=mo(t,i),ko(t,o),n=Fs(e,t,n,r,i,o),r=Ls(),e!==null&&!Rt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Vn(e,t,o)):(Ue&&r&&ms(t),t.flags|=1,_t(e,t,n,o),t.child)}function gc(e,t,n,r,o){if(jt(n)){var i=!0;Gi(t)}else i=!1;if(ko(t,o),t.stateNode===null)dl(e,t),ic(t,n,r),Us(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,c=t.memoizedProps;a.props=c;var p=a.context,x=n.contextType;typeof x=="object"&&x!==null?x=qt(x):(x=jt(n)?Mr:vt.current,x=mo(t,x));var F=n.getDerivedStateFromProps,O=typeof F=="function"||typeof a.getSnapshotBeforeUpdate=="function";O||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==r||p!==x)&&lc(t,a,r,x),sr=!1;var M=t.memoizedState;a.state=M,rl(t,r,a,o),p=t.memoizedState,c!==r||M!==p||Tt.current||sr?(typeof F=="function"&&(Is(t,n,F,r),p=t.memoizedState),(c=sr||oc(t,n,c,r,M,p,x))?(O||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=x,r=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,La(e,t),c=t.memoizedProps,x=t.type===t.elementType?c:un(t.type,c),a.props=x,O=t.pendingProps,M=a.context,p=n.contextType,typeof p=="object"&&p!==null?p=qt(p):(p=jt(n)?Mr:vt.current,p=mo(t,p));var Y=n.getDerivedStateFromProps;(F=typeof Y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(c!==O||M!==p)&&lc(t,a,r,p),sr=!1,M=t.memoizedState,a.state=M,rl(t,r,a,o);var Z=t.memoizedState;c!==O||M!==Z||Tt.current||sr?(typeof Y=="function"&&(Is(t,n,Y,r),Z=t.memoizedState),(x=sr||oc(t,n,x,r,M,Z,p)||!1)?(F||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,Z,p),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,Z,p)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=Z),a.props=r,a.state=Z,a.context=p,r=x):(typeof a.componentDidUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),r=!1)}return Ws(e,t,n,r,i,o)}function Ws(e,t,n,r,o,i){vc(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&xa(t,n,!1),Vn(e,t,i);r=t.stateNode,Pd.current=t;var c=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=wo(t,e.child,null,i),t.child=wo(t,null,c,i)):_t(e,t,c,i),t.memoizedState=r.state,o&&xa(t,n,!0),t.child}function yc(e){var t=e.stateNode;t.pendingContext?Sa(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Sa(e,t.context,!1),Ns(e,t.containerInfo)}function wc(e,t,n,r,o){return yo(),ws(o),t.flags|=256,_t(e,t,n,r),t.child}var Hs={dehydrated:null,treeContext:null,retryLane:0};function Ks(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sc(e,t,n){var r=t.pendingProps,o=Be.current,i=!1,a=(t.flags&128)!==0,c;if((c=a)||(c=e!==null&&e.memoizedState===null?!1:(o&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Le(Be,o&1),e===null)return ys(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=_l(a,r,0,null),e=Vr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ks(n),t.memoizedState=Hs,e):Qs(t,a));if(o=e.memoizedState,o!==null&&(c=o.dehydrated,c!==null))return Td(e,t,a,r,c,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,c=o.sibling;var p={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=p,t.deletions=null):(r=pr(o,p),r.subtreeFlags=o.subtreeFlags&14680064),c!==null?i=pr(c,i):(i=Vr(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Ks(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=Hs,r}return i=e.child,e=i.sibling,r=pr(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Qs(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fl(e,t,n,r){return r!==null&&ws(r),wo(t,e.child,null,n),e=Qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Td(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=$s(Error(s(422))),fl(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=_l({mode:"visible",children:r.children},o,0,null),i=Vr(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&wo(t,e.child,null,a),t.child.memoizedState=Ks(a),t.memoizedState=Hs,i);if((t.mode&1)===0)return fl(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var c=r.dgst;return r=c,i=Error(s(419)),r=$s(i,r,void 0),fl(e,t,a,r)}if(c=(a&e.childLanes)!==0,Rt||c){if(r=it,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Un(e,o),fn(r,e,o,-1))}return uu(),r=$s(Error(s(421))),fl(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Vd.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,It=rr(o.nextSibling),Dt=t,Ue=!0,sn=null,e!==null&&(Kt[Qt++]=Dn,Kt[Qt++]=In,Kt[Qt++]=Fr,Dn=e.id,In=e.overflow,Fr=t),t=Qs(t,r.children),t.flags|=4096,t)}function kc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Es(e.return,t,n)}function qs(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function xc(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(_t(e,t,r.children,n),r=Be.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kc(e,n,t);else if(e.tag===19)kc(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(Le(Be,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ol(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),qs(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ol(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}qs(t,!0,n,null,i);break;case"together":qs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function dl(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Vn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Dr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=pr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function jd(e,t,n){switch(t.tag){case 3:yc(t),yo();break;case 5:za(t);break;case 1:jt(t.type)&&Gi(t);break;case 4:Ns(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Le(el,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Le(Be,Be.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Sc(e,t,n):(Le(Be,Be.current&1),e=Vn(e,t,n),e!==null?e.sibling:null);Le(Be,Be.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return xc(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Le(Be,Be.current),r)break;return null;case 22:case 23:return t.lanes=0,mc(e,t,n)}return Vn(e,t,n)}var Ec,Gs,_c,Cc;Ec=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}},Gs=function(){},_c=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ar(Sn.current);var i=null;switch(n){case"input":o=gr(e,o),r=gr(e,r),i=[];break;case"select":o=W({},o,{value:void 0}),r=W({},r,{value:void 0}),i=[];break;case"textarea":o=Nt(e,o),r=Nt(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ki)}kt(n,r);var a;n=null;for(x in o)if(!r.hasOwnProperty(x)&&o.hasOwnProperty(x)&&o[x]!=null)if(x==="style"){var c=o[x];for(a in c)c.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else x!=="dangerouslySetInnerHTML"&&x!=="children"&&x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(d.hasOwnProperty(x)?i||(i=[]):(i=i||[]).push(x,null));for(x in r){var p=r[x];if(c=o!=null?o[x]:void 0,r.hasOwnProperty(x)&&p!==c&&(p!=null||c!=null))if(x==="style")if(c){for(a in c)!c.hasOwnProperty(a)||p&&p.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in p)p.hasOwnProperty(a)&&c[a]!==p[a]&&(n||(n={}),n[a]=p[a])}else n||(i||(i=[]),i.push(x,n)),n=p;else x==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,c=c?c.__html:void 0,p!=null&&c!==p&&(i=i||[]).push(x,p)):x==="children"?typeof p!="string"&&typeof p!="number"||(i=i||[]).push(x,""+p):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&(d.hasOwnProperty(x)?(p!=null&&x==="onScroll"&&Ae("scroll",e),i||c===p||(i=[])):(i=i||[]).push(x,p))}n&&(i=i||[]).push("style",n);var x=i;(t.updateQueue=x)&&(t.flags|=4)}},Cc=function(e,t,n,r){n!==r&&(t.flags|=4)};function fi(e,t){if(!Ue)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 yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Rd(e,t,n){var r=t.pendingProps;switch(vs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return jt(t.type)&&qi(),yt(t),null;case 3:return r=t.stateNode,xo(),ze(Tt),ze(vt),js(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(bi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sn!==null&&(iu(sn),sn=null))),Gs(e,t),yt(t),null;case 5:Ps(t);var o=Ar(li.current);if(n=t.type,e!==null&&t.stateNode!=null)_c(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(s(166));return yt(t),null}if(e=Ar(Sn.current),bi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[wn]=t,r[ti]=i,e=(t.mode&1)!==0,n){case"dialog":Ae("cancel",r),Ae("close",r);break;case"iframe":case"object":case"embed":Ae("load",r);break;case"video":case"audio":for(o=0;o<bo.length;o++)Ae(bo[o],r);break;case"source":Ae("error",r);break;case"img":case"image":case"link":Ae("error",r),Ae("load",r);break;case"details":Ae("toggle",r);break;case"input":pn(r,i),Ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ae("invalid",r);break;case"textarea":Wr(r,i),Ae("invalid",r)}kt(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var c=i[a];a==="children"?typeof c=="string"?r.textContent!==c&&(i.suppressHydrationWarning!==!0&&Hi(r.textContent,c,e),o=["children",c]):typeof c=="number"&&r.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&Hi(r.textContent,c,e),o=["children",""+c]):d.hasOwnProperty(a)&&c!=null&&a==="onScroll"&&Ae("scroll",r)}switch(n){case"input":Wn(r),En(r,i,!0);break;case"textarea":Wn(r),Hr(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ki)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Kr(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[wn]=t,e[ti]=r,Ec(e,t,!1,!1),t.stateNode=e;e:{switch(a=Lo(n,r),n){case"dialog":Ae("cancel",e),Ae("close",e),o=r;break;case"iframe":case"object":case"embed":Ae("load",e),o=r;break;case"video":case"audio":for(o=0;o<bo.length;o++)Ae(bo[o],e);o=r;break;case"source":Ae("error",e),o=r;break;case"img":case"image":case"link":Ae("error",e),Ae("load",e),o=r;break;case"details":Ae("toggle",e),o=r;break;case"input":pn(e,r),o=gr(e,r),Ae("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=W({},r,{value:void 0}),Ae("invalid",e);break;case"textarea":Wr(e,r),o=Nt(e,r),Ae("invalid",e);break;default:o=r}kt(n,o),c=o;for(i in c)if(c.hasOwnProperty(i)){var p=c[i];i==="style"?Fo(e,p):i==="dangerouslySetInnerHTML"?(p=p?p.__html:void 0,p!=null&&Si(e,p)):i==="children"?typeof p=="string"?(n!=="textarea"||p!=="")&&et(e,p):typeof p=="number"&&et(e,""+p):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(d.hasOwnProperty(i)?p!=null&&i==="onScroll"&&Ae("scroll",e):p!=null&&ge(e,i,p,a))}switch(n){case"input":Wn(e),En(e,r,!1);break;case"textarea":Wn(e),Hr(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ee(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$t(e,!!r.multiple,i,!1):r.defaultValue!=null&&$t(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ki)}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 yt(t),null;case 6:if(e&&t.stateNode!=null)Cc(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(s(166));if(n=Ar(li.current),Ar(Sn.current),bi(t)){if(r=t.stateNode,n=t.memoizedProps,r[wn]=t,(i=r.nodeValue!==n)&&(e=Dt,e!==null))switch(e.tag){case 3:Hi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Hi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[wn]=t,t.stateNode=r}return yt(t),null;case 13:if(ze(Be),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&It!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Ta(),yo(),t.flags|=98560,i=!1;else if(i=bi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(s(317));i[wn]=t}else yo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),i=!1}else sn!==null&&(iu(sn),sn=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Be.current&1)!==0?Je===0&&(Je=3):uu())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return xo(),Gs(e,t),e===null&&Zo(t.stateNode.containerInfo),yt(t),null;case 10:return xs(t.type._context),yt(t),null;case 17:return jt(t.type)&&qi(),yt(t),null;case 19:if(ze(Be),i=t.memoizedState,i===null)return yt(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)fi(i,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=ol(e),a!==null){for(t.flags|=128,fi(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Le(Be,Be.current&1|2),t.child}e=e.sibling}i.tail!==null&&Pe()>No&&(t.flags|=128,r=!0,fi(i,!1),t.lanes=4194304)}else{if(!r)if(e=ol(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),fi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ue)return yt(t),null}else 2*Pe()-i.renderingStartTime>No&&n!==1073741824&&(t.flags|=128,r=!0,fi(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Pe(),t.sibling=null,n=Be.current,Le(Be,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return su(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ut&1073741824)!==0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function Md(e,t){switch(vs(t),t.tag){case 1:return jt(t.type)&&qi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xo(),ze(Tt),ze(vt),js(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ps(t),null;case 13:if(ze(Be),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));yo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Be),null;case 4:return xo(),null;case 10:return xs(t.type._context),null;case 22:case 23:return su(),null;case 24:return null;default:return null}}var hl=!1,wt=!1,Fd=typeof WeakSet=="function"?WeakSet:Set,b=null;function _o(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ke(e,t,r)}else n.current=null}function Ys(e,t,n){try{n()}catch(r){Ke(e,t,r)}}var Nc=!1;function Ld(e,t){if(ss=Zn,e=oa(),Zl(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,c=-1,p=-1,x=0,F=0,O=e,M=null;t:for(;;){for(var Y;O!==n||o!==0&&O.nodeType!==3||(c=a+o),O!==i||r!==0&&O.nodeType!==3||(p=a+r),O.nodeType===3&&(a+=O.nodeValue.length),(Y=O.firstChild)!==null;)M=O,O=Y;for(;;){if(O===e)break t;if(M===n&&++x===o&&(c=a),M===i&&++F===r&&(p=a),(Y=O.nextSibling)!==null)break;O=M,M=O.parentNode}O=Y}n=c===-1||p===-1?null:{start:c,end:p}}else n=null}n=n||{start:0,end:0}}else n=null;for(us={focusedElem:e,selectionRange:n},Zn=!1,b=t;b!==null;)if(t=b,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,b=e;else for(;b!==null;){t=b;try{var Z=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(Z!==null){var re=Z.memoizedProps,Qe=Z.memoizedState,w=t.stateNode,v=w.getSnapshotBeforeUpdate(t.elementType===t.type?re:un(t.type,re),Qe);w.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(A){Ke(t,t.return,A)}if(e=t.sibling,e!==null){e.return=t.return,b=e;break}b=t.return}return Z=Nc,Nc=!1,Z}function di(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Ys(t,n,i)}o=o.next}while(o!==r)}}function pl(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 Xs(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 Pc(e){var t=e.alternate;t!==null&&(e.alternate=null,Pc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wn],delete t[ti],delete t[ds],delete t[md],delete t[vd])),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 Tc(e){return e.tag===5||e.tag===3||e.tag===4}function jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tc(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 Js(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=Ki));else if(r!==4&&(e=e.child,e!==null))for(Js(e,t,n),e=e.sibling;e!==null;)Js(e,t,n),e=e.sibling}function bs(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(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}var ft=null,an=!1;function ar(e,t,n){for(n=n.child;n!==null;)Rc(e,t,n),n=n.sibling}function Rc(e,t,n){if(At&&typeof At.onCommitFiberUnmount=="function")try{At.onCommitFiberUnmount(Yn,n)}catch{}switch(n.tag){case 5:wt||_o(n,t);case 6:var r=ft,o=an;ft=null,ar(e,t,n),ft=r,an=o,ft!==null&&(an?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(an?(e=ft,n=n.stateNode,e.nodeType===8?fs(e.parentNode,n):e.nodeType===1&&fs(e,n),jr(e)):fs(ft,n.stateNode));break;case 4:r=ft,o=an,ft=n.stateNode.containerInfo,an=!0,ar(e,t,n),ft=r,an=o;break;case 0:case 11:case 14:case 15:if(!wt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&Ys(n,t,a),o=o.next}while(o!==r)}ar(e,t,n);break;case 1:if(!wt&&(_o(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){Ke(n,t,c)}ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:n.mode&1?(wt=(r=wt)||n.memoizedState!==null,ar(e,t,n),wt=r):ar(e,t,n);break;default:ar(e,t,n)}}function Mc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fd),t.forEach(function(r){var o=Bd.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function cn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,c=a;e:for(;c!==null;){switch(c.tag){case 5:ft=c.stateNode,an=!1;break e;case 3:ft=c.stateNode.containerInfo,an=!0;break e;case 4:ft=c.stateNode.containerInfo,an=!0;break e}c=c.return}if(ft===null)throw Error(s(160));Rc(i,a,o),ft=null,an=!1;var p=o.alternate;p!==null&&(p.return=null),o.return=null}catch(x){Ke(o,t,x)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Fc(t,e),t=t.sibling}function Fc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(cn(t,e),xn(e),r&4){try{di(3,e,e.return),pl(3,e)}catch(re){Ke(e,e.return,re)}try{di(5,e,e.return)}catch(re){Ke(e,e.return,re)}}break;case 1:cn(t,e),xn(e),r&512&&n!==null&&_o(n,n.return);break;case 5:if(cn(t,e),xn(e),r&512&&n!==null&&_o(n,n.return),e.flags&32){var o=e.stateNode;try{et(o,"")}catch(re){Ke(e,e.return,re)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,c=e.type,p=e.updateQueue;if(e.updateQueue=null,p!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&yr(o,i),Lo(c,a);var x=Lo(c,i);for(a=0;a<p.length;a+=2){var F=p[a],O=p[a+1];F==="style"?Fo(o,O):F==="dangerouslySetInnerHTML"?Si(o,O):F==="children"?et(o,O):ge(o,F,O,x)}switch(c){case"input":Hn(o,i);break;case"textarea":St(o,i);break;case"select":var M=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var Y=i.value;Y!=null?$t(o,!!i.multiple,Y,!1):M!==!!i.multiple&&(i.defaultValue!=null?$t(o,!!i.multiple,i.defaultValue,!0):$t(o,!!i.multiple,i.multiple?[]:"",!1))}o[ti]=i}catch(re){Ke(e,e.return,re)}}break;case 6:if(cn(t,e),xn(e),r&4){if(e.stateNode===null)throw Error(s(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(re){Ke(e,e.return,re)}}break;case 3:if(cn(t,e),xn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{jr(t.containerInfo)}catch(re){Ke(e,e.return,re)}break;case 4:cn(t,e),xn(e);break;case 13:cn(t,e),xn(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(tu=Pe())),r&4&&Mc(e);break;case 22:if(F=n!==null&&n.memoizedState!==null,e.mode&1?(wt=(x=wt)||F,cn(t,e),wt=x):cn(t,e),xn(e),r&8192){if(x=e.memoizedState!==null,(e.stateNode.isHidden=x)&&!F&&(e.mode&1)!==0)for(b=e,F=e.child;F!==null;){for(O=b=F;b!==null;){switch(M=b,Y=M.child,M.tag){case 0:case 11:case 14:case 15:di(4,M,M.return);break;case 1:_o(M,M.return);var Z=M.stateNode;if(typeof Z.componentWillUnmount=="function"){r=M,n=M.return;try{t=r,Z.props=t.memoizedProps,Z.state=t.memoizedState,Z.componentWillUnmount()}catch(re){Ke(r,n,re)}}break;case 5:_o(M,M.return);break;case 22:if(M.memoizedState!==null){Ac(O);continue}}Y!==null?(Y.return=M,b=Y):Ac(O)}F=F.sibling}e:for(F=null,O=e;;){if(O.tag===5){if(F===null){F=O;try{o=O.stateNode,x?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=O.stateNode,p=O.memoizedProps.style,a=p!=null&&p.hasOwnProperty("display")?p.display:null,c.style.display=Qr("display",a))}catch(re){Ke(e,e.return,re)}}}else if(O.tag===6){if(F===null)try{O.stateNode.nodeValue=x?"":O.memoizedProps}catch(re){Ke(e,e.return,re)}}else if((O.tag!==22&&O.tag!==23||O.memoizedState===null||O===e)&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===e)break e;for(;O.sibling===null;){if(O.return===null||O.return===e)break e;F===O&&(F=null),O=O.return}F===O&&(F=null),O.sibling.return=O.return,O=O.sibling}}break;case 19:cn(t,e),xn(e),r&4&&Mc(e);break;case 21:break;default:cn(t,e),xn(e)}}function xn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Tc(n)){var r=n;break e}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(et(o,""),r.flags&=-33);var i=jc(e);bs(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,c=jc(e);Js(e,c,a);break;default:throw Error(s(161))}}catch(p){Ke(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Od(e,t,n){b=e,Lc(e)}function Lc(e,t,n){for(var r=(e.mode&1)!==0;b!==null;){var o=b,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||hl;if(!a){var c=o.alternate,p=c!==null&&c.memoizedState!==null||wt;c=hl;var x=wt;if(hl=a,(wt=p)&&!x)for(b=o;b!==null;)a=b,p=a.child,a.tag===22&&a.memoizedState!==null?zc(o):p!==null?(p.return=a,b=p):zc(o);for(;i!==null;)b=i,Lc(i),i=i.sibling;b=o,hl=c,wt=x}Oc(e)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,b=i):Oc(e)}}function Oc(e){for(;b!==null;){var t=b;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:wt||pl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!wt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:un(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Aa(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Aa(t,a,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var p=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":p.autoFocus&&n.focus();break;case"img":p.src&&(n.src=p.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var x=t.alternate;if(x!==null){var F=x.memoizedState;if(F!==null){var O=F.dehydrated;O!==null&&jr(O)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}wt||t.flags&512&&Xs(t)}catch(M){Ke(t,t.return,M)}}if(t===e){b=null;break}if(n=t.sibling,n!==null){n.return=t.return,b=n;break}b=t.return}}function Ac(e){for(;b!==null;){var t=b;if(t===e){b=null;break}var n=t.sibling;if(n!==null){n.return=t.return,b=n;break}b=t.return}}function zc(e){for(;b!==null;){var t=b;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pl(4,t)}catch(p){Ke(t,n,p)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(p){Ke(t,o,p)}}var i=t.return;try{Xs(t)}catch(p){Ke(t,i,p)}break;case 5:var a=t.return;try{Xs(t)}catch(p){Ke(t,a,p)}}}catch(p){Ke(t,t.return,p)}if(t===e){b=null;break}var c=t.sibling;if(c!==null){c.return=t.return,b=c;break}b=t.return}}var Ad=Math.ceil,ml=U.ReactCurrentDispatcher,Zs=U.ReactCurrentOwner,Yt=U.ReactCurrentBatchConfig,Ce=0,it=null,Ge=null,dt=0,Ut=0,Co=or(0),Je=0,hi=null,Dr=0,vl=0,eu=0,pi=null,Mt=null,tu=0,No=1/0,Bn=null,gl=!1,nu=null,cr=null,yl=!1,fr=null,wl=0,mi=0,ru=null,Sl=-1,kl=0;function Ct(){return(Ce&6)!==0?Pe():Sl!==-1?Sl:Sl=Pe()}function dr(e){return(e.mode&1)===0?1:(Ce&2)!==0&&dt!==0?dt&-dt:yd.transition!==null?(kl===0&&(kl=Vo()),kl):(e=we,e!==0||(e=window.event,e=e===void 0?16:T(e.type)),e)}function fn(e,t,n,r){if(50<mi)throw mi=0,ru=null,Error(s(185));Er(e,n,r),((Ce&2)===0||e!==it)&&(e===it&&((Ce&2)===0&&(vl|=n),Je===4&&hr(e,dt)),Ft(e,r),n===1&&Ce===0&&(t.mode&1)===0&&(No=Pe()+500,Yi&&lr()))}function Ft(e,t){var n=e.callbackNode;nn(e,t);var r=tn(e,e===it?dt:0);if(r===0)n!==null&&kr(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&kr(n),t===1)e.tag===0?gd(Ic.bind(null,e)):Ea(Ic.bind(null,e)),hd(function(){(Ce&6)===0&&lr()}),n=null;else{switch(Ni(r)){case 1:n=Gn;break;case 4:n=tt;break;case 16:n=Mn;break;case 536870912:n=ht;break;default:n=Mn}n=Qc(n,Dc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Dc(e,t){if(Sl=-1,kl=0,(Ce&6)!==0)throw Error(s(327));var n=e.callbackNode;if(Po()&&e.callbackNode!==n)return null;var r=tn(e,e===it?dt:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=xl(e,r);else{t=r;var o=Ce;Ce|=2;var i=$c();(it!==e||dt!==t)&&(Bn=null,No=Pe()+500,Ur(e,t));do try{Id();break}catch(c){Uc(e,c)}while(!0);ks(),ml.current=i,Ce=o,Ge!==null?t=0:(it=null,dt=0,t=Je)}if(t!==0){if(t===2&&(o=$o(e),o!==0&&(r=o,t=ou(e,o))),t===1)throw n=hi,Ur(e,0),hr(e,r),Ft(e,Pe()),n;if(t===6)hr(e,r);else{if(o=e.current.alternate,(r&30)===0&&!zd(o)&&(t=xl(e,r),t===2&&(i=$o(e),i!==0&&(r=i,t=ou(e,i))),t===1))throw n=hi,Ur(e,0),hr(e,r),Ft(e,Pe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:$r(e,Mt,Bn);break;case 3:if(hr(e,r),(r&130023424)===r&&(t=tu+500-Pe(),10<t)){if(tn(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ct(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=cs($r.bind(null,e,Mt,Bn),t);break}$r(e,Mt,Bn);break;case 4:if(hr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-Ie(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ad(r/1960))-r,10<r){e.timeoutHandle=cs($r.bind(null,e,Mt,Bn),r);break}$r(e,Mt,Bn);break;case 5:$r(e,Mt,Bn);break;default:throw Error(s(329))}}}return Ft(e,Pe()),e.callbackNode===n?Dc.bind(null,e):null}function ou(e,t){var n=pi;return e.current.memoizedState.isDehydrated&&(Ur(e,t).flags|=256),e=xl(e,t),e!==2&&(t=Mt,Mt=n,t!==null&&iu(t)),e}function iu(e){Mt===null?Mt=e:Mt.push.apply(Mt,e)}function zd(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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!ln(i(),o))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 hr(e,t){for(t&=~eu,t&=~vl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ie(t),r=1<<n;e[n]=-1,t&=~r}}function Ic(e){if((Ce&6)!==0)throw Error(s(327));Po();var t=tn(e,0);if((t&1)===0)return Ft(e,Pe()),null;var n=xl(e,t);if(e.tag!==0&&n===2){var r=$o(e);r!==0&&(t=r,n=ou(e,r))}if(n===1)throw n=hi,Ur(e,0),hr(e,t),Ft(e,Pe()),n;if(n===6)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$r(e,Mt,Bn),Ft(e,Pe()),null}function lu(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(No=Pe()+500,Yi&&lr())}}function Ir(e){fr!==null&&fr.tag===0&&(Ce&6)===0&&Po();var t=Ce;Ce|=1;var n=Yt.transition,r=we;try{if(Yt.transition=null,we=1,e)return e()}finally{we=r,Yt.transition=n,Ce=t,(Ce&6)===0&&lr()}}function su(){Ut=Co.current,ze(Co)}function Ur(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,dd(n)),Ge!==null)for(n=Ge.return;n!==null;){var r=n;switch(vs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&qi();break;case 3:xo(),ze(Tt),ze(vt),js();break;case 5:Ps(r);break;case 4:xo();break;case 13:ze(Be);break;case 19:ze(Be);break;case 10:xs(r.type._context);break;case 22:case 23:su()}n=n.return}if(it=e,Ge=e=pr(e.current,null),dt=Ut=t,Je=0,hi=null,eu=vl=Dr=0,Mt=pi=null,Or!==null){for(t=0;t<Or.length;t++)if(n=Or[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}Or=null}return e}function Uc(e,t){do{var n=Ge;try{if(ks(),il.current=al,ll){for(var r=We.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ll=!1}if(zr=0,ot=Xe=We=null,si=!1,ui=0,Zs.current=null,n===null||n.return===null){Je=1,hi=t,Ge=null;break}e:{var i=e,a=n.return,c=n,p=t;if(t=dt,c.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){var x=p,F=c,O=F.tag;if((F.mode&1)===0&&(O===0||O===11||O===15)){var M=F.alternate;M?(F.updateQueue=M.updateQueue,F.memoizedState=M.memoizedState,F.lanes=M.lanes):(F.updateQueue=null,F.memoizedState=null)}var Y=cc(a);if(Y!==null){Y.flags&=-257,fc(Y,a,c,i,t),Y.mode&1&&ac(i,x,t),t=Y,p=x;var Z=t.updateQueue;if(Z===null){var re=new Set;re.add(p),t.updateQueue=re}else Z.add(p);break e}else{if((t&1)===0){ac(i,x,t),uu();break e}p=Error(s(426))}}else if(Ue&&c.mode&1){var Qe=cc(a);if(Qe!==null){(Qe.flags&65536)===0&&(Qe.flags|=256),fc(Qe,a,c,i,t),ws(Eo(p,c));break e}}i=p=Eo(p,c),Je!==4&&(Je=2),pi===null?pi=[i]:pi.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var w=sc(i,p,t);Oa(i,w);break e;case 1:c=p;var v=i.type,S=i.stateNode;if((i.flags&128)===0&&(typeof v.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(cr===null||!cr.has(S)))){i.flags|=65536,t&=-t,i.lanes|=t;var A=uc(i,c,t);Oa(i,A);break e}}i=i.return}while(i!==null)}Bc(n)}catch(oe){t=oe,Ge===n&&n!==null&&(Ge=n=n.return);continue}break}while(!0)}function $c(){var e=ml.current;return ml.current=al,e===null?al:e}function uu(){(Je===0||Je===3||Je===2)&&(Je=4),it===null||(Dr&268435455)===0&&(vl&268435455)===0||hr(it,dt)}function xl(e,t){var n=Ce;Ce|=2;var r=$c();(it!==e||dt!==t)&&(Bn=null,Ur(e,t));do try{Dd();break}catch(o){Uc(e,o)}while(!0);if(ks(),Ce=n,ml.current=r,Ge!==null)throw Error(s(261));return it=null,dt=0,Je}function Dd(){for(;Ge!==null;)Vc(Ge)}function Id(){for(;Ge!==null&&!br();)Vc(Ge)}function Vc(e){var t=Kc(e.alternate,e,Ut);e.memoizedProps=e.pendingProps,t===null?Bc(e):Ge=t,Zs.current=null}function Bc(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Rd(n,t,Ut),n!==null){Ge=n;return}}else{if(n=Md(n,t),n!==null){n.flags&=32767,Ge=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Je=6,Ge=null;return}}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);Je===0&&(Je=5)}function $r(e,t,n){var r=we,o=Yt.transition;try{Yt.transition=null,we=1,Ud(e,t,n,r)}finally{Yt.transition=o,we=r}return null}function Ud(e,t,n,r){do Po();while(fr!==null);if((Ce&6)!==0)throw Error(s(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Xn(e,i),e===it&&(Ge=it=null,dt=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||yl||(yl=!0,Qc(Mn,function(){return Po(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Yt.transition,Yt.transition=null;var a=we;we=1;var c=Ce;Ce|=4,Zs.current=null,Ld(e,n),Fc(n,e),id(us),Zn=!!ss,us=ss=null,e.current=n,Od(n),en(),Ce=c,we=a,Yt.transition=i}else e.current=n;if(yl&&(yl=!1,fr=e,wl=o),i=e.pendingLanes,i===0&&(cr=null),Vl(n.stateNode),Ft(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(gl)throw gl=!1,e=nu,nu=null,e;return(wl&1)!==0&&e.tag!==0&&Po(),i=e.pendingLanes,(i&1)!==0?e===ru?mi++:(mi=0,ru=e):mi=0,lr(),null}function Po(){if(fr!==null){var e=Ni(wl),t=Yt.transition,n=we;try{if(Yt.transition=null,we=16>e?16:e,fr===null)var r=!1;else{if(e=fr,fr=null,wl=0,(Ce&6)!==0)throw Error(s(331));var o=Ce;for(Ce|=4,b=e.current;b!==null;){var i=b,a=i.child;if((b.flags&16)!==0){var c=i.deletions;if(c!==null){for(var p=0;p<c.length;p++){var x=c[p];for(b=x;b!==null;){var F=b;switch(F.tag){case 0:case 11:case 15:di(8,F,i)}var O=F.child;if(O!==null)O.return=F,b=O;else for(;b!==null;){F=b;var M=F.sibling,Y=F.return;if(Pc(F),F===x){b=null;break}if(M!==null){M.return=Y,b=M;break}b=Y}}}var Z=i.alternate;if(Z!==null){var re=Z.child;if(re!==null){Z.child=null;do{var Qe=re.sibling;re.sibling=null,re=Qe}while(re!==null)}}b=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,b=a;else e:for(;b!==null;){if(i=b,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:di(9,i,i.return)}var w=i.sibling;if(w!==null){w.return=i.return,b=w;break e}b=i.return}}var v=e.current;for(b=v;b!==null;){a=b;var S=a.child;if((a.subtreeFlags&2064)!==0&&S!==null)S.return=a,b=S;else e:for(a=v;b!==null;){if(c=b,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:pl(9,c)}}catch(oe){Ke(c,c.return,oe)}if(c===a){b=null;break e}var A=c.sibling;if(A!==null){A.return=c.return,b=A;break e}b=c.return}}if(Ce=o,lr(),At&&typeof At.onPostCommitFiberRoot=="function")try{At.onPostCommitFiberRoot(Yn,e)}catch{}r=!0}return r}finally{we=n,Yt.transition=t}}return!1}function Wc(e,t,n){t=Eo(n,t),t=sc(e,t,1),e=ur(e,t,1),t=Ct(),e!==null&&(Er(e,1,t),Ft(e,t))}function Ke(e,t,n){if(e.tag===3)Wc(e,e,n);else for(;t!==null;){if(t.tag===3){Wc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(cr===null||!cr.has(r))){e=Eo(n,e),e=uc(t,e,1),t=ur(t,e,1),e=Ct(),t!==null&&(Er(t,1,e),Ft(t,e));break}}t=t.return}}function $d(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ct(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(dt&n)===n&&(Je===4||Je===3&&(dt&130023424)===dt&&500>Pe()-tu?Ur(e,0):eu|=n),Ft(e,t)}function Hc(e,t){t===0&&((e.mode&1)===0?t=1:(t=ut,ut<<=1,(ut&130023424)===0&&(ut=4194304)));var n=Ct();e=Un(e,t),e!==null&&(Er(e,t,n),Ft(e,n))}function Vd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Hc(e,n)}function Bd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Hc(e,n)}var Kc;Kc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Tt.current)Rt=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Rt=!1,jd(e,t,n);Rt=(e.flags&131072)!==0}else Rt=!1,Ue&&(t.flags&1048576)!==0&&_a(t,Ji,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;dl(e,t),e=t.pendingProps;var o=mo(t,vt.current);ko(t,n),o=Fs(null,t,r,e,o,n);var i=Ls();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,jt(r)?(i=!0,Gi(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Cs(t),o.updater=cl,t.stateNode=o,o._reactInternals=t,Us(t,r,e,n),t=Ws(null,t,r,!0,i,n)):(t.tag=0,Ue&&i&&ms(t),_t(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(dl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Hd(r),e=un(r,e),o){case 0:t=Bs(null,t,r,e,n);break e;case 1:t=gc(null,t,r,e,n);break e;case 11:t=dc(null,t,r,e,n);break e;case 14:t=hc(null,t,r,un(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),Bs(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),gc(e,t,r,o,n);case 3:e:{if(yc(t),e===null)throw Error(s(387));r=t.pendingProps,i=t.memoizedState,o=i.element,La(e,t),rl(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Eo(Error(s(423)),t),t=wc(e,t,r,n,o);break e}else if(r!==o){o=Eo(Error(s(424)),t),t=wc(e,t,r,n,o);break e}else for(It=rr(t.stateNode.containerInfo.firstChild),Dt=t,Ue=!0,sn=null,n=Ma(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(yo(),r===o){t=Vn(e,t,n);break e}_t(e,t,r,n)}t=t.child}return t;case 5:return za(t),e===null&&ys(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,as(r,o)?a=null:i!==null&&as(r,i)&&(t.flags|=32),vc(e,t),_t(e,t,a,n),t.child;case 6:return e===null&&ys(t),null;case 13:return Sc(e,t,n);case 4:return Ns(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=wo(t,null,r,n):_t(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),dc(e,t,r,o,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Le(el,r._currentValue),r._currentValue=a,i!==null)if(ln(i.value,a)){if(i.children===o.children&&!Tt.current){t=Vn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){a=i.child;for(var p=c.firstContext;p!==null;){if(p.context===r){if(i.tag===1){p=$n(-1,n&-n),p.tag=2;var x=i.updateQueue;if(x!==null){x=x.shared;var F=x.pending;F===null?p.next=p:(p.next=F.next,F.next=p),x.pending=p}}i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),Es(i.return,n,t),c.lanes|=n;break}p=p.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(s(341));a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Es(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}_t(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ko(t,n),o=qt(o),r=r(o),t.flags|=1,_t(e,t,r,n),t.child;case 14:return r=t.type,o=un(r,t.pendingProps),o=un(r.type,o),hc(e,t,r,o,n);case 15:return pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:un(r,o),dl(e,t),t.tag=1,jt(r)?(e=!0,Gi(t)):e=!1,ko(t,n),ic(t,r,o),Us(t,r,o,n),Ws(null,t,r,!0,e,n);case 19:return xc(e,t,n);case 22:return mc(e,t,n)}throw Error(s(156,t.tag))};function Qc(e,t){return Bt(e,t)}function Wd(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 Xt(e,t,n,r){return new Wd(e,t,n,r)}function au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hd(e){if(typeof e=="function")return au(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ye)return 11;if(e===$e)return 14}return 2}function pr(e,t){var n=e.alternate;return n===null?(n=Xt(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 El(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")au(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ne:return Vr(n.children,o,i,t);case me:a=8,o|=8;break;case xe:return e=Xt(12,n,t,o|2),e.elementType=xe,e.lanes=i,e;case be:return e=Xt(13,n,t,o),e.elementType=be,e.lanes=i,e;case qe:return e=Xt(19,n,t,o),e.elementType=qe,e.lanes=i,e;case Ne:return _l(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:a=10;break e;case _e:a=9;break e;case Ye:a=11;break e;case $e:a=14;break e;case Ve:a=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=Xt(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Vr(e,t,n,r){return e=Xt(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=Xt(22,e,r,t),e.elementType=Ne,e.lanes=n,e.stateNode={isHidden:!1},e}function cu(e,t,n){return e=Xt(6,e,null,t),e.lanes=n,e}function fu(e,t,n){return t=Xt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kd(e,t,n,r,o){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=Bo(0),this.expirationTimes=Bo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bo(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,o,i,a,c,p){return e=new Kd(e,t,n,c,p),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Xt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cs(i),e}function Qd(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function qc(e){if(!e)return ir;e=e._reactInternals;e:{if(Vt(e)!==e||e.tag!==1)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(jt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(s(171))}if(e.tag===1){var n=e.type;if(jt(n))return ka(e,n,t)}return t}function Gc(e,t,n,r,o,i,a,c,p){return e=du(n,r,!0,e,o,i,a,c,p),e.context=qc(null),n=e.current,r=Ct(),o=dr(n),i=$n(r,o),i.callback=t??null,ur(n,i,o),e.current.lanes=o,Er(e,o,r),Ft(e,r),e}function Cl(e,t,n,r){var o=t.current,i=Ct(),a=dr(o);return n=qc(n),t.context===null?t.context=n:t.pendingContext=n,t=$n(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ur(o,t,a),e!==null&&(fn(e,o,a,i),nl(e,o,a)),a}function Nl(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 Yc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function hu(e,t){Yc(e,t),(e=e.alternate)&&Yc(e,t)}function qd(){return null}var Xc=typeof reportError=="function"?reportError:function(e){console.error(e)};function pu(e){this._internalRoot=e}Pl.prototype.render=pu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));Cl(e,t,null,null)},Pl.prototype.unmount=pu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){Cl(null,e,null,null)}),t[An]=null}};function Pl(e){this._internalRoot=e}Pl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ji();e={blockedOn:null,target:e,priority:t};for(var n=0;n<at.length&&t!==0&&t<at[n].priority;n++);at.splice(n,0,e),n===0&&Ho(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Tl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jc(){}function Gd(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var x=Nl(a);i.call(x)}}var a=Gc(t,r,e,0,null,!1,!1,"",Jc);return e._reactRootContainer=a,e[An]=a.current,Zo(e.nodeType===8?e.parentNode:e),Ir(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var c=r;r=function(){var x=Nl(p);c.call(x)}}var p=du(e,0,!1,null,null,!1,!1,"",Jc);return e._reactRootContainer=p,e[An]=p.current,Zo(e.nodeType===8?e.parentNode:e),Ir(function(){Cl(t,p,n,r)}),p}function jl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var c=o;o=function(){var p=Nl(a);c.call(p)}}Cl(t,a,e,o)}else a=Gd(n,t,e,o,r);return Nl(a)}Pi=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=vn(t.pendingLanes);n!==0&&(_r(t,n|1),Ft(t,Pe()),(Ce&6)===0&&(No=Pe()+500,lr()))}break;case 13:Ir(function(){var r=Un(e,1);if(r!==null){var o=Ct();fn(r,e,1,o)}}),hu(e,1)}},Cr=function(e){if(e.tag===13){var t=Un(e,134217728);if(t!==null){var n=Ct();fn(t,e,134217728,n)}hu(e,134217728)}},Ti=function(e){if(e.tag===13){var t=dr(e),n=Un(e,t);if(n!==null){var r=Ct();fn(n,e,t,r)}hu(e,t)}},ji=function(){return we},Ri=function(e,t){var n=we;try{return we=e,t()}finally{we=n}},Oo=function(e,t,n){switch(t){case"input":if(Hn(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 o=Qi(r);if(!o)throw Error(s(90));vr(r),Hn(r,o)}}}break;case"textarea":St(e,n);break;case"select":t=n.value,t!=null&&$t(e,!!n.multiple,t,!1)}},Kn=lu,Ao=Ir;var Yd={usingClientEntryPoint:!1,Events:[ni,ho,Qi,wr,xi,lu]},vi={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Xd={bundleType:vi.bundleType,version:vi.version,rendererPackageName:vi.rendererPackageName,rendererConfig:vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Zt(e),e===null?null:e.stateNode},findFiberByHostInstance:vi.findFiberByHostInstance||qd,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 Rl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rl.isDisabled&&Rl.supportsFiber)try{Yn=Rl.inject(Xd),At=Rl}catch{}}return Lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Yd,Lt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(s(200));return Qd(e,t,null,n)},Lt.createRoot=function(e,t){if(!mu(e))throw Error(s(299));var n=!1,r="",o=Xc;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=du(e,1,!1,null,null,n,!1,r,o),e[An]=t.current,Zo(e.nodeType===8?e.parentNode:e),new pu(t)},Lt.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(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=Zt(t),e=e===null?null:e.stateNode,e},Lt.flushSync=function(e){return Ir(e)},Lt.hydrate=function(e,t,n){if(!Tl(t))throw Error(s(200));return jl(null,e,t,!0,n)},Lt.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(s(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=Xc;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Gc(t,null,e,1,n??null,o,!1,i,a),e[An]=t.current,Zo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Pl(t)},Lt.render=function(e,t,n){if(!Tl(t))throw Error(s(200));return jl(null,e,t,!1,n)},Lt.unmountComponentAtNode=function(e){if(!Tl(e))throw Error(s(40));return e._reactRootContainer?(Ir(function(){jl(null,null,e,!1,function(){e._reactRootContainer=null,e[An]=null})}),!0):!1},Lt.unstable_batchedUpdates=lu,Lt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Tl(n))throw Error(s(200));if(e==null||e._reactInternals===void 0)throw Error(s(38));return jl(e,t,n,!1,r)},Lt.version="18.3.1-next-f1338f8080-20240426",Lt}var lf;function lh(){if(lf)return yu.exports;lf=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(l){console.error(l)}}return u(),yu.exports=ih(),yu.exports}var sf;function sh(){if(sf)return Ml;sf=1;var u=lh();return Ml.createRoot=u.createRoot,Ml.hydrateRoot=u.hydrateRoot,Ml}var uh=sh(),_=Iu();function uf(u){return[...u.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(l=>({value:l[0],start:l.index??0}))}function ku(u,l){if(!l.length||l.length>u.length)return!1;for(let s=0;s<=u.length-l.length;s++)if(l.every((f,d)=>u[s+d]===f))return!0;return!1}function ah(u,l){const s=u.trim(),f=uf(s),d=uf(l).map(({value:N})=>N),y=f.map(({value:N})=>N);if(y.join(" ")==="it seems like"&&ku(d,y))return"";if(f.length<5||d.length<5)return s;if(ku(d,y))return"";for(let N=f.length-1;N>=5;N--)if(ku(d,y.slice(0,N)))return s.slice(f[N].start).replace(/^[\s,.;:!?—-]+/u,"").trim();return s}class ch{constructor(l,s,f=()=>{},d=()=>{}){te(this,"recordings",[]);te(this,"transcripts",[]);te(this,"hearing",!1);te(this,"pumpingEpoch",null);te(this,"active",null);te(this,"epoch",0);te(this,"transcribe");te(this,"send");te(this,"report");te(this,"changed");this.transcribe=l,this.send=s,this.report=f,this.changed=d}get busy(){return this.pumpingEpoch!==null||this.recordings.length>0||this.transcripts.length>0}speechStarted(){this.hearing=!0,this.changed()}speechEnded(l){this.hearing=!1,this.recordings.push(l),this.changed(),this.pump()}speechDiscarded(){this.hearing=!1,this.changed(),this.pump()}reset(){var l;this.epoch++,(l=this.active)==null||l.abort(),this.active=null,this.recordings=[],this.transcripts=[],this.hearing=!1,this.pumpingEpoch=null,this.changed()}pump(){const l=this.epoch;this.pumpingEpoch!==l&&(this.pumpingEpoch=l,this.changed(),(async()=>{try{for(;this.recordings.length&&l===this.epoch;){const f=this.recordings.shift(),d=new AbortController;this.active=d;try{const y=(await this.transcribe(f,d.signal)).trim();l===this.epoch&&y&&this.transcripts.push(y)}catch(y){if(l===this.epoch&&!d.signal.aborted)throw y}finally{this.active===d&&(this.active=null),l===this.epoch&&this.changed()}}if(l!==this.epoch||this.hearing||this.recordings.length||!this.transcripts.length)return;const s=this.transcripts.join(" ").trim();this.transcripts=[],this.changed(),s&&await this.send(s)}catch(s){l===this.epoch&&this.report(s)}finally{this.pumpingEpoch===l&&(this.pumpingEpoch=null,this.changed(),l===this.epoch&&!this.hearing&&(this.recordings.length||this.transcripts.length)&&this.pump())}})())}}const fh=2e3;class dh{constructor(l=fh){te(this,"tail",Promise.resolve());te(this,"_active",!1);te(this,"_flushing",!1);te(this,"epoch",0);te(this,"timeoutMs");te(this,"invalid",new WeakSet);this.timeoutMs=l}get acceptsCallbacks(){return this._active||this._flushing}pause(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this._active=!1,this.enqueue(async()=>{s===this.epoch&&await this.withTimeout(l,l.pause(),"pause")})}start(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this.enqueue(async()=>{s===this.epoch&&(await this.withTimeout(l,l.start(),"start"),s===this.epoch&&(this._active=!0))})}flush(l){if(this.invalid.has(l))return Promise.reject(new Error("VAD transition is invalidated."));const s=this.epoch;return this.enqueue(async()=>{if(s===this.epoch){this._flushing=!0;try{await this.withTimeout(l,l.pause(),"pause"),await this.withTimeout(l,l.start(),"start"),s===this.epoch&&(this._active=!0)}finally{s===this.epoch&&(this._flushing=!1)}}})}beginSession(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}deactivate(){this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}isInvalid(l){return this.invalid.has(l)}enqueue(l){const s=this.tail.then(l,l);return this.tail=s.catch(()=>{}),s}withTimeout(l,s,f){return new Promise((d,y)=>{const E=globalThis.setTimeout(()=>{this.invalidate(l),y(new Error(`VAD ${f} timed out.`))},this.timeoutMs);s.then(()=>{globalThis.clearTimeout(E),d()},N=>{globalThis.clearTimeout(E),y(N)})})}invalidate(l){this.invalid.add(l),this.epoch++,this.tail=Promise.resolve(),this._active=!1,this._flushing=!1}}function hh(u,l,s,f,d,y){return u===l&&s===f&&!d&&y}const ph=10,mh=2;function vh(u){const l=u.trim().replace(/["'“”‘’«»)\]}]+$/u,"").trimEnd();return/[.?!]$/.test(l)?!/(\.\.|…)$/.test(l):!1}function gh(u){return u.split(/\s+/).filter(l=>/[\p{L}\p{N}]/u.test(l)).length}function yh(u){const{text:l,resultRevision:s,revision:f,quietFrames:d}=u;return l===void 0||s!==f||d<ph?!1:vh(l)&&gh(l)>=mh}const Dl=.45,Uu=.3,Nf=160,Pf=320,Ro=700,Tf=300,jf=2e3,Pu=100;function $u(u){if(!Number.isFinite(u))return Ro;const l=Math.round(u/Pu)*Pu;return Math.min(jf,Math.max(Tf,l))}function wh(u=Ro){return{positiveSpeechThreshold:Dl,negativeSpeechThreshold:Uu,minSpeechMs:Nf,preSpeechPadMs:Pf,redemptionMs:$u(u)}}const Sh=350,kh=20;class xh{constructor(l,s,f=()=>{}){te(this,"preRoll",[]);te(this,"current",null);te(this,"segments",new Set);te(this,"ended",new WeakMap);te(this,"request");te(this,"preview");te(this,"endpoint");te(this,"speechThreshold",Dl);this.request=l,this.preview=s,this.endpoint=f}frame(l,s){const f=s.slice(),d=this.current;if(!d){this.preRoll.push(f),this.preRoll.length>14&&this.preRoll.shift();return}d.frames.push(f),l>=this.speechThreshold?(d.revision++,d.quiet=0):d.quiet++;const y=d.confirmed&&d.overActiveTurn&&d.requested===-1&&d.confirmedAt!==null&&d.frames.length-d.confirmedAt>=kh;d.confirmed&&!d.pending&&d.requested!==d.revision&&(y||d.quiet>=6||d.frames.length-d.lastRequest>=63)&&this.speculate(d),this.checkEndpoint(d)}begin(l=!1){const s={frames:this.preRoll,revision:1,quiet:0,confirmed:!1,requested:-1,lastRequest:0,controller:new AbortController,endpointed:!1,overActiveTurn:l,confirmedAt:null};this.preRoll=[],this.current=s,this.segments.add(s),this.preview("")}confirm(){this.current&&(this.current.confirmed=!0,this.current.confirmedAt=this.current.frames.length)}end(l){this.current&&this.ended.set(l,this.current),this.current=null,this.preRoll=[]}async finish(l,s){var y;const f=this.ended.get(l);if(this.ended.delete(l),!f)return this.request(l,s);const d=()=>f.controller.abort(s.reason);s.addEventListener("abort",d,{once:!0}),s.aborted&&d();try{const E=f.pending;return E&&!await Eh(E,Sh,s)&&f.controller.abort(new DOMException("Speculative transcription timed out.","AbortError")),s.throwIfAborted(),((y=f.result)==null?void 0:y.revision)===f.revision&&f.result.text.trim()?f.result.text:await this.request(l,s)}finally{s.removeEventListener("abort",d),this.segments.delete(f)}}discard(){this.current&&(this.current.controller.abort(),this.segments.delete(this.current)),this.current=null,this.preRoll=[],this.preview("")}reset(){for(const l of this.segments)l.controller.abort();this.segments.clear(),this.ended=new WeakMap,this.discard()}samples(l){const s=new Float32Array(l.frames.reduce((d,y)=>d+y.length,0));let f=0;for(const d of l.frames)s.set(d,f),f+=d.length;return s}checkEndpoint(l){var s,f;l.endpointed||this.current!==l||!l.confirmed||yh({text:(s=l.result)==null?void 0:s.text,resultRevision:(f=l.result)==null?void 0:f.revision,revision:l.revision,quietFrames:l.quiet})&&(l.endpointed=!0,this.endpoint())}speculate(l){const s=l.revision;l.requested=s,l.lastRequest=l.frames.length,l.pending=this.request(this.samples(l),l.controller.signal).then(f=>{l.controller.signal.aborted||(l.result={revision:s,text:f},this.current===l&&(this.preview(f),this.checkEndpoint(l)))}).catch(()=>{}).finally(()=>{l.pending=void 0})}}function Eh(u,l,s){return new Promise((f,d)=>{if(s.aborted)return d(s.reason);const y=globalThis.setTimeout(L,l),E=()=>{j(),d(s.reason)},N=()=>{j(),f(!0)};function L(){j(),f(!1)}function j(){globalThis.clearTimeout(y),s.removeEventListener("abort",E)}s.addEventListener("abort",E,{once:!0}),u.then(N,N)})}const Tu=new Set(["um","uh","uhm","erm","hmm","mm","mhm","ah","oh"]),af=2,_h=1200,Ch=700;function ju(u){return[...u.toLocaleLowerCase().matchAll(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu)].map(l=>l[0])}function Nh(u){return ju(u).filter(l=>!Tu.has(l))}function Ph(u,l,s,f){let d=0;for(let y=0;y<u.length;y++)if(u[y]!==l[s+y]&&(d++,d>f))return!1;return!0}function Th(u,l){let s=null;for(let f=0;f<u.length;f++)for(let d=u.length;d>f;d--){const y=d-f;if(s&&y<=s.end-s.start)break;if(y<2||y>l.length)continue;const E=Math.floor(y/4),N=u.slice(f,d);let L=!1;for(let j=0;j<=l.length-y;j++)if(Ph(N,l,j,E)){L=!0;break}if(L){s={start:f,end:d};break}}return s}function jh(u,l){const s=ju(u);if(s.filter(y=>!Tu.has(y)).length<af)return{echo:!1,meaningful:!1};const d=ju(l);if(d.length){const y=Th(s,d);if(y&&s.filter((N,L)=>(L<y.start||L>=y.end)&&!Tu.has(N)).length<af)return{echo:!0,meaningful:!1}}return{echo:!1,meaningful:!0}}function Ru(u,l){return jh(u,l).meaningful}const Rh=["stop","wait","hold on","hang on","pause","shut up","enough"],Mh=Rh.map(u=>new RegExp(`\\b${u.replace(/ /g,"\\s+")}\\b`,"iu"));function Rf(u,l){for(const s of Mh){if(!s.test(u)||s.test(l))continue;const f=new RegExp(s.source,`${s.flags}g`),d=u.replace(f," ").replace(/\s+/gu," ").trim().replace(/^[\s,.;:!?—-]+/u,"");return{remainder:Nh(d).length?d:""}}return null}function cf(u,l){return Rf(u,l)!==null}function Fh(u){return Math.max(.2,u.trim().length/15)}const Lh=1500,Oh=300,Ah=1e4;function ff(u,l,s){const f=u.filter(d=>s-(d.startedAt+d.seconds*1e3)<Ah);return f.push({text:l,startedAt:s,seconds:Fh(l)}),f}function zh(u,l,s){const f=l-Lh,d=s+Oh;return u.filter(y=>y.startedAt+y.seconds*1e3>=f&&y.startedAt<=d).map(y=>y.text).join(" ")}const Dh=8,Ih=2.5;function Uh(u,l){return l===null?!1:u<l*Ih}class $h{constructor(l=()=>Date.now()){te(this,"mode","idle");te(this,"interruptOnConfirm",!1);te(this,"interrupted",!1);te(this,"startedAt",0);te(this,"wordPathBlockedFlag",!1);te(this,"now");this.now=l}get idle(){return this.mode==="idle"}get wordPathBlocked(){return this.wordPathBlockedFlag}blockWordPath(){(this.mode==="candidate"||this.mode==="accepted")&&(this.wordPathBlockedFlag=!0)}speechStart(l){return this.mode="candidate",this.interruptOnConfirm=l,this.interrupted=!1,this.wordPathBlockedFlag=!1,this.startedAt=this.now(),{duck:l,begin:!0,accepted:!1}}speechRealStart(){return this.mode==="candidate"?(this.mode="accepted",{keepDucked:this.interruptOnConfirm,begin:!1,accepted:!0}):{keepDucked:!1,begin:!1,accepted:this.mode==="accepted"}}shouldInterruptNow(l,s){return this.mode!=="accepted"||!this.interruptOnConfirm||this.interrupted?!1:cf(l,s)?(this.interrupted=!0,!0):this.wordPathBlockedFlag?!1:Ru(l,s)?(this.interrupted=!0,!0):!1}speechEnd(l,s,f){const d=this.mode==="accepted",y=this.wordPathBlockedFlag;return d?!this.interruptOnConfirm||this.interrupted?(this.reset(),{accepted:!0,interrupt:!1,send:!0,deferDecision:!1,wordPathBlocked:y}):f?cf(l,s)||!y&&Ru(l,s)?(this.reset(),{accepted:!0,interrupt:!0,send:!0,deferDecision:!1,wordPathBlocked:y}):(this.reset(),{accepted:!0,interrupt:!1,send:!1,deferDecision:!1,wordPathBlocked:y}):(this.reset(),{accepted:!0,interrupt:!1,send:!0,deferDecision:!0,wordPathBlocked:y}):(this.reset(),{accepted:!1,interrupt:!1,send:!1,deferDecision:!1,wordPathBlocked:y})}reset(){this.mode="idle",this.interruptOnConfirm=!1,this.interrupted=!1,this.wordPathBlockedFlag=!1,this.startedAt=0}}function xu(u,l,s,f){return async d=>{d.throwIfAborted();const y=l.createAnalyser();y.fftSize=128,y.connect(s);const E=l.createBufferSource();E.buffer=u,E.connect(y),await new Promise((N,L)=>{const j=()=>{E.onended=null;try{E.stop()}catch{}E.disconnect(),y.disconnect(),L(d.reason)};E.onended=()=>{d.removeEventListener("abort",j),E.disconnect(),y.disconnect(),N()},d.addEventListener("abort",j,{once:!0}),E.start(),f(y),d.aborted&&j()})}}const Vh=.1,Bh=.02,Wh=.5,Hh=.3,Fl=.005;function Kh(){return{nextTime:0,started:!1,underrunLead:Bh,restarted:!1}}function Qh(u,l,s){let f,d;return u.started?u.nextTime<l?(f=l+u.underrunLead,u.underrunLead=Math.min(Wh,u.underrunLead*2),d=!0):(f=u.nextTime,d=!1):(f=l+Vh,d=!0),u.started=!0,u.restarted=d,u.nextTime=f+s,f}function qh(u,l){return u.reduce((s,f)=>s+f.length,0)/l}function Gh(u,l){return u>=Hh}function Yh(u,l,s,f){return u.started&&!f&&u.nextTime<l&&s<u.underrunLead}async function Xh(u,l,s,f,d,y){const E=u.getReader(),N=[];let L=null,j=!1,Q=0,I=null;const z=()=>{const U=I;I=null,U==null||U()},$=()=>{E.cancel().catch(()=>{})};y.addEventListener("abort",$,{once:!0});const X=U=>{let H=U;L!==null&&(H=new Uint8Array(U.length+1),H[0]=L,H.set(U,1),L=null),H.length%2&&(L=H[H.length-1],H=H.subarray(0,H.length-1));const D=new DataView(H.buffer,H.byteOffset,H.byteLength),ne=new Float32Array(H.length/2);for(let me=0;me<ne.length;me++){const xe=D.getInt16(me*2,!0);ne[me]=xe<0?xe/32768:xe/32767}return ne};let le,C;const G=new Promise((U,H)=>{le=U,C=H}),q=(async()=>{try{for(;;){const{done:U,value:H}=await E.read();if(U)break;if(!(H!=null&&H.length))continue;const D=X(H);D.length&&(Q+=D.length,N.push(D),Gh(Q/l,!1)&&le(),z())}if(!Q)throw new Error("The speech server sent no audio")}finally{j=!0,y.removeEventListener("abort",$),z()}})();q.catch(U=>C(U)),q.then(()=>le(),()=>{}),await G;const ge=(async U=>{U.throwIfAborted();const H=s.createAnalyser();H.fftSize=128,H.connect(f);const D=s.createGain();D.connect(H);const ne=new Set,me=Kh();let xe=!1;try{await new Promise((B,_e)=>{const Ye=()=>{j&&!N.length&&!ne.size&&B()},be=()=>{if(U.aborted)return;const $e=s.currentTime,Ve=qh(N,l);if(N.length&&!Yh(me,$e,Ve,j)){const Ne=N.reduce((ie,ue)=>ie+ue.length,0),V=s.createBuffer(1,Ne,l),se=V.getChannelData(0);let W=0;for(const ie of N.splice(0))se.set(ie,W),W+=ie.length;const g=s.createBufferSource();g.buffer=V,g.connect(D);const P=Qh(me,$e,V.duration);me.restarted&&(D.gain.cancelScheduledValues(P),D.gain.setValueAtTime(0,P),D.gain.linearRampToValueAtTime(1,P+Fl)),g.start(P),ne.add(g),g.onended=()=>{ne.delete(g),g.disconnect(),Ye()},xe||(xe=!0,d(H))}Ye(),(!j||N.length)&&(I=be)},qe=()=>{I=null;const $e=s.currentTime;D.gain.cancelScheduledValues($e),D.gain.setValueAtTime(D.gain.value,$e),D.gain.linearRampToValueAtTime(0,$e+Fl);for(const Ve of ne){Ve.onended=null;try{Ve.stop($e+Fl)}catch{}}ne.clear(),$(),_e(U.reason)};U.addEventListener("abort",qe,{once:!0}),be()}),D.disconnect(),H.disconnect()}catch(B){throw setTimeout(()=>{try{D.disconnect()}catch{}try{H.disconnect()}catch{}},Fl*1e3+20),B}});return ge.completed=q,ge}const Jh=300;class bh{constructor(l,s,f){te(this,"run",this.fresh());te(this,"synthesize");te(this,"changed");te(this,"reportError");this.synthesize=l,this.changed=s,this.reportError=f}get busy(){const l=this.run;return l.generating||l.playing||l.text.length>0||l.audio.length>0}enqueue(l){this.run.text.push(...l),this.pump(this.run)}cancel(){const l=this.run;this.run=this.fresh(),l.text=[],l.audio=[],l.controller.abort(),this.changed()}fresh(){return{controller:new AbortController,text:[],audio:[],hasDispatchedSpeech:!1,generating:!1,playing:!1}}fail(l,s){l!==this.run||l.controller.signal.aborted||(this.cancel(),this.reportError(s))}pump(l){if(l!==this.run||l.controller.signal.aborted)return;const s=l.controller.signal;if(!l.playing&&l.audio.length){const f=l.audio.shift();l.playing=!0,(async()=>{try{await f(s)}catch(d){this.fail(l,d)}finally{l.playing=!1,l===this.run&&this.pump(l)}})()}if(!l.generating&&l.audio.length<2&&l.text.length){let f=l.text.shift();if(l.hasDispatchedSpeech)for(;l.text.length&&f.length+l.text[0].length+1<=Jh;)f+=` ${l.text.shift()}`;l.hasDispatchedSpeech=!0,l.generating=!0,(async()=>{var d;try{const y=await this.synthesize(f,s);l===this.run&&!s.aborted&&l.audio.push(y),(d=y.completed)==null||d.catch(E=>this.fail(l,E))}catch(y){this.fail(l,y)}finally{l.generating=!1,l===this.run&&this.pump(l)}})()}this.changed()}}const Zh="modulepreload",ep=function(u){return"/"+u},df={},Mf=function(l,s,f){let d=Promise.resolve();if(s&&s.length>0){let E=function(j){return Promise.all(j.map(Q=>Promise.resolve(Q).then(I=>({status:"fulfilled",value:I}),I=>({status:"rejected",reason:I}))))};document.getElementsByTagName("link");const N=document.querySelector("meta[property=csp-nonce]"),L=(N==null?void 0:N.nonce)||(N==null?void 0:N.getAttribute("nonce"));d=E(s.map(j=>{if(j=ep(j),j in df)return;df[j]=!0;const Q=j.endsWith(".css"),I=Q?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${I}`))return;const z=document.createElement("link");if(z.rel=Q?"stylesheet":Zh,Q||(z.as="script"),z.crossOrigin="",z.href=j,L&&z.setAttribute("nonce",L),document.head.appendChild(z),Q)return new Promise(($,X)=>{z.addEventListener("load",$),z.addEventListener("error",()=>X(new Error(`Unable to preload CSS for ${j}`)))})}))}function y(E){const N=new Event("vite:preloadError",{cancelable:!0});if(N.payload=E,window.dispatchEvent(N),!N.defaultPrevented)throw E}return d.then(E=>{for(const N of E||[])N.status==="rejected"&&y(N.reason);return l().catch(y)})},Mu="/voice-assets/",tp=["silero_vad_v5.onnx","vad.worklet.bundle.min.js","ort-wasm-simd-threaded.mjs","ort-wasm-simd-threaded.wasm"];let Eu=null;function Ff(){return Eu??(Eu=Mf(()=>import("./index-CeWj4ejR.js").then(u=>u.i),__vite__mapDeps([0,1])).catch(u=>{throw Eu=null,u})),Eu}let hf=!1;function np(){if(!hf){hf=!0,Ff().catch(()=>{});for(const u of tp)fetch(`${Mu}${u}`,{priority:"low"}).then(l=>l.ok?l.arrayBuffer():void 0).catch(()=>{})}}const Lf="voice-assistant.vad-redemption-ms";function Of(u){return typeof window>"u"?void 0:window.localStorage}function _u(u){var l;try{const s=(l=Of(u))==null?void 0:l.getItem(Lf);if(s==null)return Ro;const f=Number(s);return Number.isFinite(f)?$u(f):Ro}catch{return Ro}}function rp(u,l){var f;const s=$u(u);try{(f=Of(l))==null||f.setItem(Lf,String(s))}catch{}return s}const Fu=512,Lu=16e3,op=2e4,ip={frameSamples:Fu,sampleRate:Lu,positiveSpeechThreshold:Dl,negativeSpeechThreshold:Uu,minSpeechMs:Nf,redemptionMs:Ro,preSpeechPadMs:Pf,maxSpeechMs:op,noiseFloorWindowFrames:100,noiseFloorPercentile:.3,noiseFloorMarginDb:6,noiseFloorRangeDb:24,minFloorRms:.0015,submitUserSpeechOnPause:!1};function lp(u){let l=0;for(let s=0;s<u.length;s++)l+=u[s]*u[s];return Math.sqrt(l/Math.max(1,u.length))}function pf(u){return 20*Math.log10(Math.max(u,1e-8))}function sp(u){return Math.min(1,Math.max(0,u))}function up(u){const l=u.reduce((d,y)=>d+y.length,0),s=new Float32Array(l);let f=0;for(const d of u)s.set(d,f),f+=d.length;return s}class ap{constructor(l={}){te(this,"options");te(this,"msPerFrame");te(this,"minSpeechFrames",1);te(this,"redemptionFrames",1);te(this,"preSpeechPadFrames",0);te(this,"maxSpeechFrames",1);te(this,"state","silence");te(this,"ring",[]);te(this,"recorded",[]);te(this,"activeFrames",0);te(this,"silenceFrames",0);te(this,"noiseFloorSamples",[]);te(this,"active",!0);this.options={...ip,...l},this.msPerFrame=this.options.frameSamples/this.options.sampleRate*1e3,this.recalculateFrameCounts()}recalculateFrameCounts(){this.minSpeechFrames=Math.max(1,Math.ceil(this.options.minSpeechMs/this.msPerFrame)),this.redemptionFrames=Math.max(1,Math.ceil(this.options.redemptionMs/this.msPerFrame)),this.preSpeechPadFrames=Math.max(0,Math.ceil(this.options.preSpeechPadMs/this.msPerFrame)),this.maxSpeechFrames=Math.max(this.minSpeechFrames,Math.ceil(this.options.maxSpeechMs/this.msPerFrame))}setOptions(l){this.options={...this.options,...l},this.recalculateFrameCounts()}get noiseFloor(){return this.estimateNoiseFloor()}get speaking(){return this.state==="speech"}reset(){this.state="silence",this.ring=[],this.recorded=[],this.activeFrames=0,this.silenceFrames=0}resume(){this.active=!0}pause(){return this.active=!1,this.options.submitUserSpeechOnPause?this.endSegment():(this.reset(),[])}endSegment(){const l=[];return this.state==="speech"?l.push({type:"speech-end",samples:up(this.recorded)}):this.state==="maybe"&&l.push({type:"misfire"}),this.reset(),l}process(l){if(!this.active)return{probability:0,events:[]};const s=lp(l);this.state==="silence"&&this.pushNoiseFloorSample(s);const f=this.estimateNoiseFloor(),d=sp((pf(s)-pf(f)-this.options.noiseFloorMarginDb)/this.options.noiseFloorRangeDb),y=[];if(this.state==="silence")return this.pushRing(l),d>=this.options.positiveSpeechThreshold&&(this.state="maybe",this.recorded=[...this.ring],this.activeFrames=1,this.silenceFrames=0,y.push({type:"speech-start"})),{probability:d,events:y};this.recorded.push(l),d>=this.options.negativeSpeechThreshold?(this.silenceFrames=0,this.activeFrames++,this.state==="maybe"&&this.activeFrames>=this.minSpeechFrames&&(this.state="speech",y.push({type:"speech-real-start"}))):this.silenceFrames++;const N=this.recorded.length>=this.maxSpeechFrames,L=this.silenceFrames>=this.redemptionFrames;return(N||L)&&y.push(...this.endSegment()),{probability:d,events:y}}pushRing(l){this.ring.push(l),this.ring.length>this.preSpeechPadFrames&&this.ring.shift()}pushNoiseFloorSample(l){this.noiseFloorSamples.push(l),this.noiseFloorSamples.length>this.options.noiseFloorWindowFrames&&this.noiseFloorSamples.shift()}estimateNoiseFloor(){if(this.noiseFloorSamples.length===0)return this.options.minFloorRms;const l=[...this.noiseFloorSamples].sort((f,d)=>f-d),s=Math.min(l.length-1,Math.floor(l.length*this.options.noiseFloorPercentile));return Math.max(this.options.minFloorRms,l[s])}}class cp{constructor(l,s,f){te(this,"inputBuffer",[]);this.nativeSampleRate=l,this.targetSampleRate=s,this.targetFrameSize=f}process(l){const s=[];for(const f of l)for(this.inputBuffer.push(f);this.hasEnoughDataForFrame();)s.push(this.generateOutputFrame());return s}hasEnoughDataForFrame(){return this.inputBuffer.length*this.targetSampleRate/this.nativeSampleRate>=this.targetFrameSize}generateOutputFrame(){const l=new Float32Array(this.targetFrameSize);let s=0,f=0;for(;s<this.targetFrameSize;){let d=0,y=0;const E=Math.min(this.inputBuffer.length,(s+1)*this.nativeSampleRate/this.targetSampleRate);for(;f<E;){const N=this.inputBuffer[f];N!==void 0&&(d+=N,y++),f++}l[s]=y>0?d/y:0,s++}return this.inputBuffer=this.inputBuffer.slice(f),l}}const fp=`
42
+ class EnergyVadWorkletProcessor extends AudioWorkletProcessor {
43
+ constructor(options) {
44
+ super();
45
+ this.targetSampleRate = options.processorOptions.targetSampleRate;
46
+ this.targetFrameSize = options.processorOptions.targetFrameSize;
47
+ this.inputBuffer = [];
48
+ }
49
+ process(inputs) {
50
+ const channel = inputs[0] && inputs[0][0];
51
+ if (!channel) return true;
52
+ for (let i = 0; i < channel.length; i++) {
53
+ this.inputBuffer.push(channel[i]);
54
+ while ((this.inputBuffer.length * this.targetSampleRate) / sampleRate >= this.targetFrameSize) {
55
+ const frame = new Float32Array(this.targetFrameSize);
56
+ let outputIndex = 0;
57
+ let inputIndex = 0;
58
+ while (outputIndex < this.targetFrameSize) {
59
+ let sum = 0;
60
+ let count = 0;
61
+ const limit = Math.min(this.inputBuffer.length, ((outputIndex + 1) * sampleRate) / this.targetSampleRate);
62
+ while (inputIndex < limit) {
63
+ const value = this.inputBuffer[inputIndex];
64
+ if (value !== undefined) { sum += value; count++; }
65
+ inputIndex++;
66
+ }
67
+ frame[outputIndex] = count > 0 ? sum / count : 0;
68
+ outputIndex++;
69
+ }
70
+ this.inputBuffer = this.inputBuffer.slice(inputIndex);
71
+ this.port.postMessage(frame);
72
+ }
73
+ }
74
+ return true;
75
+ }
76
+ }
77
+ registerProcessor("energy-vad-worklet-processor", EnergyVadWorkletProcessor);
78
+ `;class Vu{constructor(l){te(this,"options");te(this,"processor");te(this,"initState","uninitialized");te(this,"stream",null);te(this,"sourceNode",null);te(this,"workletNode",null);te(this,"scriptNode",null);te(this,"workletModuleUrl",null);te(this,"listening",!1);te(this,"handleFrame",l=>{const s=this.processor.process(l);this.options.onFrameProcessed({isSpeech:s.probability,notSpeech:1-s.probability},l);for(const f of s.events)this.dispatch(f)});te(this,"start",async()=>{switch(this.initState){case"uninitialized":{this.initState="initializing",this.processor.resume();try{this.stream=await this.options.getStream(),await this.attachAudioGraph(),this.listening=!0,this.initState="initialized"}catch(l){throw this.initState="errored",l}return}case"initialized":{if(this.listening)return;this.processor.resume(),this.stream=this.options.resumeStream?await this.options.resumeStream(this.stream):this.stream,await this.attachAudioGraph(),this.listening=!0;return}default:return}});te(this,"pause",async()=>{if(!this.listening)return;this.listening=!1;const l=this.processor.pause();for(const s of l)this.dispatch(s);this.stream&&this.options.pauseStream&&await this.options.pauseStream(this.stream),this.detachAudioGraph()});te(this,"destroy",async()=>{this.initState!=="destroyed"&&(this.listening&&await this.pause(),this.initState="destroyed",this.workletModuleUrl&&(URL.revokeObjectURL(this.workletModuleUrl),this.workletModuleUrl=null))});te(this,"setOptions",l=>{this.processor.setOptions(l)});this.options=l,this.processor=new ap({positiveSpeechThreshold:l.positiveSpeechThreshold,negativeSpeechThreshold:l.negativeSpeechThreshold,minSpeechMs:l.minSpeechMs,preSpeechPadMs:l.preSpeechPadMs,redemptionMs:l.redemptionMs,maxSpeechMs:l.maxSpeechMs,submitUserSpeechOnPause:l.submitUserSpeechOnPause??!1})}static async new(l){return new Vu(l)}dispatch(l){switch(l.type){case"speech-start":this.options.onSpeechStart();return;case"speech-real-start":this.options.onSpeechRealStart();return;case"misfire":this.options.onVADMisfire();return;case"speech-end":this.options.onSpeechEnd(l.samples);return}}async attachAudioGraph(){const l=this.options.audioContext,s=this.stream;if(!s)throw new Error("Energy VAD has no active microphone stream.");if(this.sourceNode=new MediaStreamAudioSourceNode(l,{mediaStream:s}),this.canUseAudioWorklet(l))try{await this.attachAsWorklet(l),this.sourceNode.connect(this.workletNode);return}catch{this.workletNode=null}this.attachAsScriptProcessor(l),this.sourceNode.connect(this.scriptNode)}canUseAudioWorklet(l){return"audioWorklet"in l&&typeof AudioWorkletNode=="function"}async attachAsWorklet(l){if(!this.workletModuleUrl){const s=new Blob([fp],{type:"application/javascript"});this.workletModuleUrl=URL.createObjectURL(s)}await l.audioWorklet.addModule(this.workletModuleUrl),this.workletNode=new AudioWorkletNode(l,"energy-vad-worklet-processor",{numberOfInputs:1,numberOfOutputs:0,channelCount:1,processorOptions:{targetSampleRate:Lu,targetFrameSize:Fu}}),this.workletNode.port.onmessage=s=>{this.handleFrame(s.data)}}attachAsScriptProcessor(l){const s=new cp(l.sampleRate,Lu,Fu),d=l.createScriptProcessor(4096,1,1);let y=!1;d.onaudioprocess=E=>{if(!y){y=!0;try{const N=E.inputBuffer.getChannelData(0);E.outputBuffer.getChannelData(0).fill(0);for(const j of s.process(N))this.handleFrame(j)}finally{y=!1}}},d.connect(l.destination),this.scriptNode=d}detachAudioGraph(){var l;(l=this.sourceNode)==null||l.disconnect(),this.sourceNode=null,this.workletNode&&(this.workletNode.port.onmessage=null,this.workletNode.disconnect(),this.workletNode=null),this.scriptNode&&(this.scriptNode.onaudioprocess=null,this.scriptNode.disconnect(),this.scriptNode=null)}}const Al=["One moment.","Checking now.","Still on it.","Just a second.","Working on it."],dp=1500,hp=6e3,pp=4e3,mp=500;function vp(){return{turnActive:!1,hasSpokenThisTurn:!1,lastCueAt:null,lastCueText:null}}function gp(u){return{turnActive:!0,hasSpokenThisTurn:!1,lastCueAt:null,lastCueText:null}}function mf(u){return{...u,turnActive:!1}}function yp(u){return u.hasSpokenThisTurn?u:{...u,hasSpokenThisTurn:!0}}function wp(u,l,s){return{...u,lastCueAt:s,lastCueText:l}}function Sp(u,l,s){return!(!u.turnActive||!u.hasSpokenThisTurn||l<dp||u.lastCueAt!==null&&s-u.lastCueAt<hp)}function kp(u,l=Math.random){const s=u.lastCueText?Al.filter(d=>d!==u.lastCueText):Al,f=s.length?s:Al;return f[Math.min(f.length-1,Math.floor(l()*f.length))]}function Af(u){return u.replace(/```[\s\S]*?(?:```|$)/g," Code is shown on screen. ").replace(/!\[[^\]]*\]\([^)]*\)/g,"").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/<[^>]*>/g,"").replace(/[*_`#>|]/g,"").replace(/\s+/g," ").trim()}function xp(u,l){let s=!1,f=!1,d=0,y=!1;for(let E=0;E<u.length;E++){if(u.startsWith("```",E)){s=!s,E+=2;continue}if(s)continue;if(u[E]==="`"){f=!f;continue}if(f)continue;if(u[E]==="["&&d++,u[E]==="]"&&(d=Math.max(0,d-1),u[E+1]==="("&&(y=!0)),y){u[E]===")"&&(y=!1);continue}if(d)continue;const L=(/[.!?。!?]/.test(u[E])||l&&/[,;:,;:]/.test(u[E]))&&(/[。!?,;:]/.test(u[E])||/\s/.test(u[E+1]||"")),j=u[E]==="."&&/(?:\b(?:Mr|Mrs|Ms|Dr|Prof|St|vs|etc)|\b[A-Za-z])\.$/i.test(u.slice(0,E+1)),Q=l?48:160;if(L&&!j||u[E]===`
79
+ `||u[E]==="—"||E>=Q&&/\s/.test(u[E]))return E+1}return 0}function Ep(u,l,s){var d;let f=0;for(;f<u.length;){const y=xp(u.slice(f),s)||(l?u.length-f:0);if(!y)return 0;f+=y;const E=((d=Af(u.slice(0,f).replace(/—/g," ")).match(/[\p{L}\p{N}]+(?:['’\-][\p{L}\p{N}]+)*/gu))==null?void 0:d.length)??0,N=/[.!?。!?]["'”’)\]]*\s*$/.test(u.slice(0,f));if(E>(s&&N?1:3)||l&&f===u.length)return f}return 0}function Cu(u,l=!1,s=!1){const f=[];let d=0,y=s;for(;d<u.length;){const E=Ep(u.slice(d),l,y);if(!E)break;const N=Af(u.slice(d,d+E).replace(/—$/,"").replace(/—/g,", "));N&&(f.push(N),y=!1),d+=E}return{chunks:f,rest:l?"":u.slice(d)}}function Ll(u,l,s){return u||l||s}function _p(u){const l=new ArrayBuffer(44+u.length*2),s=new DataView(l),f=(d,y)=>[...y].forEach((E,N)=>s.setUint8(d+N,E.charCodeAt(0)));return f(0,"RIFF"),s.setUint32(4,36+u.length*2,!0),f(8,"WAVEfmt "),s.setUint32(16,16,!0),s.setUint16(20,1,!0),s.setUint16(22,1,!0),s.setUint32(24,16e3,!0),s.setUint32(28,32e3,!0),s.setUint16(32,2,!0),s.setUint16(34,16,!0),f(36,"data"),s.setUint32(40,u.length*2,!0),u.forEach((d,y)=>s.setInt16(44+y*2,Math.max(-1,Math.min(1,d))*(d<0?32768:32767),!0)),new Blob([l],{type:"audio/wav"})}function Ou(){const u=globalThis.crypto;if(u&&typeof u.randomUUID=="function")return u.randomUUID();const l=new Uint8Array(16);if(u)u.getRandomValues(l);else for(let s=0;s<l.length;s+=1)l[s]=Math.floor(Math.random()*256);return Array.from(l,s=>s.toString(16).padStart(2,"0")).join("")}const zf="meldivo.token",Cp="meldivo.token";let To;function Np(){try{window.localStorage.removeItem(Cp)}catch{}const l=new URLSearchParams(window.location.hash.replace(/^#/,"")).get("token");if(l){try{window.sessionStorage.setItem(zf,l)}catch{}To=l;try{window.history.replaceState(null,"",`${window.location.pathname}${window.location.search}`)}catch{}}}function Pp(){if(To!==void 0)return To;try{To=window.sessionStorage.getItem(zf)}catch{To=null}return To}function De(){const u=Pp();return u?{"X-Meldivo-Token":u}:{}}class dn extends Error{constructor(){super("Unauthorized"),this.name="UnauthorizedError"}}function hn(u){if(u.status===401)throw new dn;return u}const Tp="voice-assistant-microphone",Au="voice-assistant-microphone-owner",jp=15e3,Rp=5e3,Mp=5e3;function Ol(){try{const u=window.localStorage.getItem(Au);if(!u)return null;const l=JSON.parse(u);return typeof l.id!="string"||typeof l.expiresAt!="number"?null:{id:l.id,expiresAt:l.expiresAt}}catch{return null}}function Fp(){var E;const u=Ou(),l=Date.now(),s=Ol();if(s&&s.expiresAt>l)return null;const f=()=>window.localStorage.setItem(Au,JSON.stringify({id:u,expiresAt:Date.now()+jp}));try{if(f(),((E=Ol())==null?void 0:E.id)!==u)return null}catch{return{release:()=>{}}}let d=!1;const y=window.setInterval(()=>{var N;d||((N=Ol())==null?void 0:N.id)!==u||f()},Rp);return{release:()=>{var N;if(!d){d=!0,window.clearInterval(y);try{((N=Ol())==null?void 0:N.id)===u&&window.localStorage.removeItem(Au)}catch{}}}}}async function Lp(){let u,l,s;const f=new Promise((y,E)=>{l=y,s=E}),d=new Promise(y=>{u=y});return navigator.locks.request(Tp,{mode:"exclusive",ifAvailable:!0},async y=>{if(!y){l(null);return}let E=!1;l({release:()=>{E||(E=!0,u())}}),await d}).catch(s),f}async function Op(u){const l=await fetch("/api/voice/lease",{method:"POST",headers:De()});if(l.status===409)return null;if(!l.ok)throw new Error("Could not reserve the voice session.");const s=await l.json();if(typeof s.token!="string"||s.token.length<16)throw new Error("Voice session returned an invalid lease.");let f=!1;const d=()=>{f||(f=!0,window.clearInterval(y),fetch("/api/voice/lease",{method:"DELETE",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({token:s.token}),keepalive:!0}).catch(()=>{}))},y=window.setInterval(()=>{fetch("/api/voice/lease/heartbeat",{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({token:s.token})}).then(E=>{E.status===409&&(d(),u())}).catch(()=>{})},Mp);return{release:d}}async function Ap(u=()=>{}){const l=typeof navigator<"u"&&navigator.locks?await Lp():typeof window>"u"?null:Fp();if(!l)return null;try{const s=await Op(u);return s?{release:()=>{s.release(),l.release()}}:(l.release(),null)}catch(s){throw l.release(),s}}const Bu="voice-assistant.selected-voice";function Df(u){return typeof u=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(u)}function Wu(u){return typeof window>"u"?void 0:window.localStorage}function Br(u){var l;try{const s=(l=Wu(u))==null?void 0:l.getItem(Bu);return Df(s)?s:void 0}catch{return}}function zp(u,l){var s;if(!Df(u))return!1;try{return(s=Wu(l))==null||s.setItem(Bu,u),!0}catch{return!1}}function vf(u){var l;try{(l=Wu(u))==null||l.removeItem(Bu)}catch{}}function If(){return h.jsx("main",{className:"auth-screen",children:h.jsxs("p",{children:["Open the link printed by ",h.jsx("code",{children:"meldivo open"}),"."]})})}const Dp=3,gf=420,yf=140;function Ip(){const[u,l]=_.useState([]),s=_.useRef(0),f=_.useRef(new Set);_.useEffect(()=>()=>{for(const N of f.current)window.clearTimeout(N);f.current.clear()},[]);const d=_.useCallback((N,L)=>{const j=window.setTimeout(()=>{f.current.delete(j),l(Q=>Q.filter(I=>!N.includes(I.id)))},L);f.current.add(j)},[]),y=_.useCallback(N=>{const j={id:++s.current,name:N.name,summary:N.summary??`Using ${N.name}`,detail:N.detail,folder:N.folder,leaving:!1,delay:0};l(Q=>{const I=Q.filter($=>!$.leaving),z=new Set(I.slice(0,Math.max(0,I.length+1-Dp)).map($=>$.id));return z.size&&d([...z],gf),[...Q.map($=>z.has($.id)?{...$,leaving:!0,delay:0}:$),j]})},[d]),E=_.useCallback(()=>{l(N=>{const L=N.filter(j=>!j.leaving);return L.length?(d(L.map(j=>j.id),gf+yf*L.length),N.map(j=>j.leaving?j:{...j,leaving:!0,delay:yf*L.indexOf(j)})):N})},[d]);return{items:u,push:y,clear:E}}function Up({items:u}){return u.length?h.jsx("ol",{className:"tool-activity","aria-live":"polite","aria-label":"What the agent is doing",children:u.map(l=>h.jsxs("li",{className:`tool-activity__item${l.leaving?" tool-activity__item--leaving":""}`,style:{"--delay":`${l.delay}ms`},"aria-hidden":l.leaving||void 0,children:[h.jsxs("span",{className:"tool-activity__summary",children:[h.jsx("span",{className:"tool-activity__tool",children:l.name.replace(/^mcp__.*__/,"")}),l.summary]}),l.detail&&h.jsx("code",{className:"tool-activity__detail",title:l.detail,children:l.detail}),l.folder&&h.jsxs("span",{className:"tool-activity__folder",children:["in ",l.folder]})]},l.id))}):null}function jo(u){const l=/^@([A-Za-z0-9._-]{1,40})\/(.+)$/.exec(u);return l?{prefix:`@${l[1]}/`,host:l[1],inner:l[2]}:{prefix:"",host:"",inner:u}}const zu=["pi","opencode","claude"],Il={pi:"Pi",opencode:"OpenCode",claude:"Claude Code"};let wf=!1;function Sf(u){const{host:l,inner:s}=jo(u),f=l||void 0;if(s.startsWith("new:"))return{harness:s.slice(4),title:"New chat",cwd:"~",host:f};if(s==="quick")return{title:"Quick chat",cwd:"~",host:f};const d=s.indexOf(":");return d===-1?{title:s,cwd:"",host:f}:{harness:s.slice(0,d),title:s.slice(d+1),cwd:"",host:f}}function $p(u){const l=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(u);return l?`~${l[2]??""}`:u}function Vp(u){return`meldivo.conversation.${u}`}function Bp(u){const l=Vp(u);try{const s=window.sessionStorage.getItem(l);if(s)return s;const f=Ou();return window.sessionStorage.setItem(l,f),f}catch{return Ou()}}const Wp=12e3,Hp=560,Kp="This is a voice preview.",Uf="voice-assistant.onboarding-dismissed",Qp=3e3;function yi(u){const l=/^([a-z]{2})[_-](.+)$/i.exec(u),s={af:"American female",am:"American male",bf:"British female",bm:"British male",ef:"Spanish female",em:"Spanish male",ff:"French female",fm:"French male",hf:"Hindi female",hm:"Hindi male",if:"Italian female",im:"Italian male",jf:"Japanese female",jm:"Japanese male",pf:"Portuguese female",pm:"Portuguese male",zf:"Chinese female",zm:"Chinese male"};if(l){const f=s[l[1].toLowerCase()];if(f)return`${yi(l[2])} — ${f}`}return u.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[._-]+/g," ").replace(/\b\w/g,f=>f.toUpperCase())}function qp(){try{return window.localStorage.getItem(Uf)!=="true"}catch{return!0}}class Gp extends Error{constructor(){super("Another voice tab is active. Close it or stop voice there first."),this.name="VoiceOwnershipError"}}function kf(u,l){return new Promise((s,f)=>{if(l.aborted)return f(l.reason);const d=window.setTimeout(()=>{l.removeEventListener("abort",y),s()},u),y=()=>{window.clearTimeout(d),f(l.reason)};l.addEventListener("abort",y,{once:!0})})}async function Yp(u,l){if(!u.body)throw new Error("Chat response was empty.");const s=u.body.pipeThrough(new TextDecoderStream).getReader();let f="";for(;;){const{done:d,value:y}=await s.read();if(d)break;f+=y;const E=f.split(`
80
+ `);f=E.pop()??"";for(const N of E){if(!N.startsWith("data:"))continue;const L=N.slice(5).trim();if(!L)continue;let j;try{j=JSON.parse(L)}catch{continue}if(l(j),j.type==="done")return}}}function Xp({sessionKey:u,folder:l}){var ro;const[s,f]=_.useState("idle"),[d,y]=_.useState(0),[E,N]=_.useState(""),L=_.useRef(s),j=_.useRef(!0),Q=_.useRef(!1),I=_.useRef(!1),z=_.useRef(!1),$=_.useRef(!1),X=_.useRef(null),le=_.useRef(null),C=_.useRef(null),G=_.useRef(null),q=_.useRef(null),ge=_.useRef(!1),U=_.useRef(null),H=_.useRef(null),D=_.useRef(null),ne=_.useRef(new dh),me=_.useRef(0),xe=_.useRef(0),B=_.useRef(null),_e=_.useRef(null),Ye=_.useRef(0),be=_.useRef(Bp(l?`${u}|${l}`:u)),qe=_.useRef(u),$e=_.useRef(null),Ve=_.useRef(Sf(u).harness),Ne=_.useRef(0),V=_.useRef(0),se=_.useRef(null),W=_.useRef(""),g=_.useRef(""),P=_.useRef(null),ie=_.useRef(new $h),ue=_.useRef(""),pe=_.useRef(0),ye=_.useRef([]),ve=_.useRef(""),Ee=_.useRef(null),je=_.useRef(0),st=_.useRef(0),Wn=_.useRef(!1),vr=_.useRef(null),Ze=_.useRef(vp()),gr=_.useRef(new Map),pn=_.useRef(null),yr=_.useRef(null),Hn=_.useRef(null),En=_.useRef(null),_n=_.useRef(0),Jt=_.useRef({}),$t=_.useRef(),[Nt,Wr]=_.useState(null),[St,Hr]=_.useState(!1),[Kr,Mo]=_.useState([]),[Cn,Si]=_.useState(""),[et,Nn]=_.useState(()=>Br()??""),[ki,Qr]=_.useState(()=>Br()??""),[Fo,Ul]=_.useState(()=>_u()),[kt,Lo]=_.useState({ready:!0,downloading:!1}),[bt,qr]=_.useState(()=>{const m=Sf(u);return l&&jo(u).inner.startsWith("new:")?{...m,cwd:$p(l)}:m}),[Oo,Pn]=_.useState(!1),[Tn,jn]=_.useState(""),wr=Ip(),[xi,Kn]=_.useState(!1),[Ao,Gr]=_.useState(""),[Yr,Qn]=_.useState(!1),[Xr,xt]=_.useState(""),[Ei,mn]=_.useState(""),[Rn,qn]=_.useState(null),[zo,$l]=_.useState(qp),Sr=_.useRef(null),Jr=_.useRef(null),Vt=_.useRef(0),Do=_.useRef(null),Io=_.useRef(null),_i=_.useRef(null),Zt=_.useRef(null),Ot=_.useRef(null),Bt=_.useRef(null),kr=_.useRef(null),br=_.useRef(!1),en=_.useRef(!1),Pe=()=>{B.current!==null&&window.clearTimeout(B.current),B.current=null},Wt=()=>{vr.current!==null&&window.clearTimeout(vr.current),vr.current=null},Gn=()=>{var m;yr.current!==null&&window.clearInterval(yr.current),yr.current=null,(m=pn.current)==null||m.abort(),pn.current=null},tt=m=>{L.current=m,j.current&&f(m)},Mn=m=>{m&&se.current!==m||(cancelAnimationFrame(V.current),se.current=null,$.current=!1,j.current&&y(0))},Ci=(m,k)=>{cancelAnimationFrame(V.current),se.current=k,$.current=!0,tt("speaking");const T=new Float32Array(m.fftSize),R=()=>{se.current===k&&(m.getFloatTimeDomainData(T),y(Math.min(1,Math.sqrt(T.reduce((J,K)=>J+K*K,0)/T.length)*6)),V.current=requestAnimationFrame(R))};R()},ht=()=>{var m,k,T;Q.current||L.current==="error"||($.current||(m=U.current)!=null&&m.busy&&L.current==="speaking"?tt("speaking"):q.current||(k=U.current)!=null&&k.busy||(T=D.current)!=null&&T.busy?tt(ge.current?"running":"thinking"):I.current&&tt("listening"))},Yn=_.useRef(!1),At="Reading the conversation…",Vl=async()=>{const m=qe.current,{inner:k}=jo(m);if(!(Yn.current||!k.includes(":")||k.startsWith("new:"))){Yn.current=!0,jn(At);try{await fetch(`/api/sessions/${encodeURIComponent(m)}/warm`,{method:"POST",headers:De()})}catch{}finally{Yn.current=!1,j.current&&jn(T=>T===At?"":T)}}},Ie=()=>{const m=G.current,k=C.current;!m||!k||(m.gain.cancelScheduledValues(k.currentTime),m.gain.setTargetAtTime(1,k.currentTime,.015))},Bl=()=>{var m,k;return!!q.current||!!((m=U.current)!=null&&m.busy)||$.current||!!((k=D.current)!=null&&k.busy)||L.current==="hearing"},Uo=async m=>{var J,K;(J=Hn.current)==null||J.abort(),(K=En.current)==null||K.abort();const k=new AbortController;Hn.current=k,gr.current.clear();const T=Br(),R=()=>C.current===m&&!k.signal.aborted;try{await kf(pp,k.signal);for(const ee of Al)for(;R();){for(;R()&&Bl();)await kf(mp,k.signal);if(!R())return;const fe=new AbortController;En.current=fe;try{const Fe=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...De()},body:JSON.stringify({text:ee,...T?{voice:T}:{}}),signal:fe.signal});if(!R()||!Fe.ok)break;const Se=await Fe.arrayBuffer();if(!R())return;const Re=await m.decodeAudioData(Se);R()&&gr.current.set(ee,Re);break}catch{if(!fe.signal.aborted)break}finally{En.current===fe&&(En.current=null)}}}catch{}finally{Hn.current===k&&(Hn.current=null)}},Wl=async(m,k)=>{const T=C.current,R=gr.current.get(m);if(!T||!R)return;const J=Symbol("cue"),K=W.current;W.current=m,ye.current=ff(ye.current,m,performance.now());const ee=xu(R,T,G.current??T.destination,fe=>Ci(fe,J));try{await ee(k)}catch{}finally{Mn(J),W.current===m&&(W.current=K),ht()}},Zr=()=>{Gn(),yr.current=window.setInterval(()=>{var J;if(!Ze.current.turnActive){Gn();return}if($.current||(J=U.current)!=null&&J.busy||pn.current)return;const m=Date.now(),k=m-_n.current;if(!Sp(Ze.current,k,m))return;const T=kp(Ze.current);Ze.current=wp(Ze.current,T,m);const R=new AbortController;pn.current=R,Wl(T,R.signal).finally(()=>{pn.current===R&&(pn.current=null),_n.current=Date.now()})},300)},ut=m=>{if(!j.current)return;const k=++Ye.current;_e.current!==null&&window.clearTimeout(_e.current),N(m),tt("error"),_e.current=window.setTimeout(()=>{Ye.current===k&&(_e.current=null,N(""),L.current==="error"&&tt(I.current?Q.current?"muted":"listening":"idle"))},4e3)},vn=()=>{var m;(m=P.current)==null||m.release(),P.current=null},tn=()=>{var k,T;Ne.current++;const m=ge.current||!!q.current;if(ge.current=!1,(k=q.current)==null||k.abort(),q.current=null,(T=U.current)==null||T.cancel(),Mn(),Ze.current=mf(Ze.current),Gn(),m){const R=$e.current??qe.current;fetch(`/api/sessions/${encodeURIComponent(R)}/cancel`,{method:"POST",headers:De()}).catch(()=>{})}$e.current=null,!Q.current&&I.current&&tt("listening")},xr=()=>{var m;Ll(!!q.current,!!((m=U.current)!=null&&m.busy),$.current)&&tn()},nn=m=>{var J,K,ee;if(!I.current&&!z.current)return;I.current=!1,z.current=!1,en.current=!1,Kn(!1),me.current++,Pe(),ne.current.deactivate(),Q.current=!1,tn(),Ie(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",(J=H.current)==null||J.reset(),H.current=null,(K=D.current)==null||K.reset(),D.current=null,U.current=null;const k=X.current;X.current=null,k==null||k.destroy().catch(()=>{});const T=le.current;le.current=null,T==null||T.getTracks().forEach(fe=>{fe.onended=null,fe.stop()});const R=C.current;C.current=null,(ee=G.current)==null||ee.disconnect(),G.current=null,R&&R.state!=="closed"&&R.close().catch(()=>{}),vn(),ut(m)},$o=()=>{var R,J,K;if(!I.current)return;I.current=!1,en.current=!1,Kn(!1),me.current++,Pe(),ne.current.deactivate(),Q.current=!1,tn(),Ie(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",(R=H.current)==null||R.reset(),H.current=null,(J=D.current)==null||J.reset(),D.current=null,U.current=null;const m=X.current;X.current=null,m==null||m.destroy().catch(()=>{});const k=le.current;le.current=null,k==null||k.getTracks().forEach(ee=>{ee.onended=null,ee.stop()});const T=C.current;C.current=null,(K=G.current)==null||K.disconnect(),G.current=null,T&&T.state!=="closed"&&T.close().catch(()=>{}),vn(),ut("Voice session moved to another tab. Tap the shape to reconnect.")},Vo=async(m,k)=>{const T=await fetch("/api/voice/transcribe",{method:"POST",headers:{"Content-Type":"audio/wav",...De()},body:_p(m),signal:k}),R=await T.json();if(!T.ok)throw new Error(R.error??"Transcription failed.");return String(R.text??"").trim()},Bo=()=>{const m=Jt.current;if(m.reported||m.sent===void 0)return;m.reported=!0;const k=performance.now(),T=(R,J)=>R===void 0||J===void 0?void 0:Math.round(J-R);fetch("/api/voice/timing",{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({silence_wait_ms:X.current?_u():void 0,speech_end_to_send_ms:T(m.speechEnd,m.sent),send_to_first_word_ms:T(m.sent,m.firstDelta),first_word_to_sound_ms:T(m.firstDelta,k),speech_end_to_sound_ms:T(m.speechEnd,k)})}).catch(()=>{})},Er=async(m,k)=>{var Fe;const T=C.current;if(!T)throw new Error("Audio output is not ready.");const R=Symbol("playback"),J=Se=>{var Re;(Re=pn.current)==null||Re.abort(),Bo(),W.current=`${W.current} ${m.trim()}`.trim().slice(-2e3),ye.current=ff(ye.current,m,performance.now()),Ci(Se,R)},K=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/pcm, audio/wav;q=0.9",...De()},body:JSON.stringify({text:m,...$t.current?{voice:$t.current}:{}}),signal:k});if(K.headers.get("x-voice-fallback")==="configured"&&($t.current=void 0,vf()),!K.ok)throw new Error((await K.json().catch(()=>({}))).error??"Speech generation failed.");let ee;if(K.body&&((Fe=K.headers.get("content-type"))!=null&&Fe.startsWith("audio/pcm"))){const Se=Number(K.headers.get("x-sample-rate"))||24e3;ee=await Xh(K.body,Se,T,G.current??T.destination,J,k)}else{const Se=await K.arrayBuffer();k.throwIfAborted();const Re=await T.decodeAudioData(Se);k.throwIfAborted(),ee=xu(Re,T,G.current??T.destination,J)}const fe=(async Se=>{try{await ee(Se)}finally{Mn(R),ht()}});return fe.completed=ee.completed,fe},Xn=()=>{Wr(null),Hr(!1)},_r=(m,k)=>{Wr({x:m,y:k}),Hr(!1)},we=()=>{Sr.current!==null&&window.clearTimeout(Sr.current),Sr.current=null,Jr.current=null},Ni=m=>{if(Nt||St){Vt.current=Date.now()+1e3,we();return}if(m.pointerType!=="touch")return;we();const{clientX:k,clientY:T,pointerId:R}=m;Jr.current={pointerId:R,x:k,y:T},Sr.current=window.setTimeout(()=>{Sr.current=null,Jr.current=null,Vt.current=Date.now()+1e3,_r(k,T)},Hp)},Pi=m=>{const k=Jr.current;!k||k.pointerId!==m.pointerId||Math.hypot(m.clientX-k.x,m.clientY-k.y)>10&&we()},Cr=()=>{var k;(k=Ot.current)==null||k.abort(),Ot.current=null,kr.current=null;const m=Bt.current;Bt.current=null,m&&m.state!=="closed"&&m.close().catch(()=>{}),qn(null)},Ti=async()=>{if(!et||Rn)return;Cr();const m=new AbortController;Ot.current=m;const k=new AudioContext;Bt.current=k,xt(""),qn(et);try{await k.resume();const T=await fetch("/api/voice/speech",{method:"POST",headers:{"Content-Type":"application/json",Accept:"audio/wav",...De()},body:JSON.stringify({text:Kp,voice:et}),signal:m.signal});if(!T.ok)throw new Error((await T.json().catch(()=>({}))).error??"Voice preview failed.");const R=await T.arrayBuffer();m.signal.throwIfAborted();const J=await k.decodeAudioData(R);m.signal.throwIfAborted();const K=xu(J,k,k.destination,()=>{});if(Ot.current!==m)return;kr.current=K,await K(m.signal)}catch(T){!(T instanceof DOMException&&T.name==="AbortError")&&Ot.current===m&&xt(T instanceof Error?T.message:"Voice preview failed.")}finally{Ot.current===m&&(Ot.current=null),kr.current=null,Bt.current===k&&(Bt.current=null,k.state!=="closed"&&k.close().catch(()=>{})),Ot.current===null&&qn(null)}},ji=m=>{var T;(T=Zt.current)==null||T.abort();const k=new AbortController;Zt.current=k,Qn(!0),xt(""),Gr(""),fetch("/api/voice/voices",{headers:De(),signal:k.signal}).then(async R=>{const J=await R.json();if(!R.ok)throw new Error(typeof J.current=="string"?J.current:"Could not load voices.");const K=Array.isArray(J.voices)?J.voices.filter(Se=>typeof Se=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(Se)):[],ee=typeof J.current=="string"&&/^[A-Za-z0-9._-]{1,100}$/.test(J.current)?J.current:"";if(Zt.current!==k||k.signal.aborted)return;const fe=m??Br(),Fe=fe&&(!K.length||K.includes(fe))?fe:"";Mo(K),Si(ee),Qr(Fe),Nn(Fe||ee||K[0]||""),Gr(J.available===!1&&typeof J.warning=="string"?J.warning:"")}).catch(R=>{!(R instanceof DOMException&&R.name==="AbortError")&&!k.signal.aborted&&xt(R instanceof Error?R.message:"Could not load voices.")}).finally(()=>{Zt.current===k&&(Zt.current=null,Qn(!1))})},Ri=()=>{if(et){if(!zp(et)){xt("This voice could not be saved.");return}Qr(et),xt(""),mn(`${yi(et)} will be used from the next reply.`),C.current&&Uo(C.current)}},Wo=m=>{var T;const k=rp(m);Ul(k),(T=X.current)==null||T.setOptions({redemptionMs:k})},eo=()=>{vf(),Qr(""),Nn(Cn),xt(""),mn(`${Cn?yi(Cn):"The profile default"} will be used from the next reply.`),C.current&&Uo(C.current)},rn=async()=>{var k,T;if(!I.current||Q.current||en.current)return;const m=X.current;if(m){en.current=!0,Pe(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",g.current="",(k=H.current)==null||k.reset(),(T=D.current)==null||T.reset(),Ie(),m.setOptions({submitUserSpeechOnPause:!1});try{await ne.current.pause(m),(X.current!==m||!I.current||Q.current||!br.current)&&(en.current=!1)}catch(R){if(en.current=!1,X.current!==m||!I.current||Q.current)return;m.setOptions({submitUserSpeechOnPause:!0}),nn(ne.current.isInvalid(m)?"Microphone transition timed out. Tap the shape to reconnect.":R instanceof Error?R.message:"Could not pause the microphone for settings.")}}},gn=async()=>{if(!en.current)return;const m=X.current;if(en.current=!1,!(!m||!I.current||Q.current))try{await ne.current.start(m),X.current===m&&I.current&&!Q.current&&(m.setOptions({submitUserSpeechOnPause:!0}),ht())}catch(k){if(X.current!==m||!I.current||Q.current)return;m.setOptions({submitUserSpeechOnPause:!0}),nn(ne.current.isInvalid(m)?"Microphone transition timed out. Tap the shape to reconnect.":k instanceof Error?k.message:"Could not resume the microphone after settings.")}},yn=m=>{const k=Ve.current,{prefix:T}=jo(qe.current);if(k){qe.current=`${T}${k}:${m}`;return}fetch("/api/sessions",{headers:De()}).then(hn).then(async R=>{if(!R.ok)return;const K=(await R.json()).sessions.find(ee=>ee.id===m&&jo(ee.key).prefix===T);K&&(qe.current=K.key,Ve.current=K.harness,j.current&&qr({harness:K.harness,title:K.title,cwd:K.cwd,host:K.host}))}).catch(()=>{})},Nr=async m=>{var ee,fe,Fe;const k=++Ne.current;let T=!1,R=!1;const J=new AbortController;q.current=J,(ee=En.current)==null||ee.abort(),$t.current=Br(),Jt.current={speechEnd:Jt.current.speechEnd,sent:performance.now()},tt("thinking"),Ze.current=gp(Ze.current),_n.current=Date.now(),Zr();const K=()=>{T=!0,R=!1,Ze.current=yp(Ze.current),_n.current=Date.now()};try{if(!m||k!==Ne.current){ht();return}W.current="",$t.current=Br();const Se=qe.current;$e.current=Se;const Re=await fetch(`/api/sessions/${encodeURIComponent(Se)}/chat`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...De()},body:JSON.stringify({conversationId:be.current,message:m,...l&&jo(Se).inner.startsWith("new:")?{cwd:l}:{}}),signal:J.signal});if(hn(Re),!Re.ok)throw new Error((await Re.json().catch(()=>({}))).error??"Chat request failed.");let pt="";if(await Yp(Re,nt=>{var Pt,Ln,On,mt;if(k===Ne.current)switch(nt.type){case"session":yn(nt.id);return;case"status":ge.current=!0,ht(),jn(nt.message);return;case"tool":{if(ge.current=!0,ht(),jn(""),wr.push(nt),_n.current=Date.now(),pt.trim()){const rt=Cu(pt,!0,!T||R);pt=rt.rest,rt.chunks.length&&(K(),(Pt=U.current)==null||Pt.enqueue(rt.chunks))}R=!0;return}case"delta":{(Ln=Jt.current).firstDelta??(Ln.firstDelta=performance.now()),ge.current&&(ge.current=!1,ht()),wr.clear(),pt+=nt.text;const rt=Cu(pt,!1,!T||R);pt=rt.rest,rt.chunks.length&&(K(),(On=U.current)==null||On.enqueue(rt.chunks));return}case"notice":jn(nt.message),K(),(mt=U.current)==null||mt.enqueue([nt.message]);return;case"error":throw new Error(nt.message);case"done":return}}),k===Ne.current){const nt=Cu(pt,!0,!T||R);nt.chunks.length&&(K(),(fe=U.current)==null||fe.enqueue(nt.chunks))}}catch(Se){if(Se instanceof dn){j.current&&Pn(!0);return}!(Se instanceof DOMException&&Se.name==="AbortError")&&k===Ne.current&&(ut(Se instanceof Error?Se.message:"Voice conversation failed."),T||(Fe=U.current)==null||Fe.enqueue(["Sorry, I could not answer that. Please try again."]))}finally{q.current===J&&(q.current=null,$e.current=null),ge.current=!1,j.current&&(jn(""),wr.clear()),k===Ne.current&&(Ze.current=mf(Ze.current),Gn()),ht()}},Fn=async()=>{var On;if(I.current||z.current)return;z.current=!0;const m=++xe.current;let k=null,T=null,R=null,J=null,K=null,ee=null,fe=null,Fe=null;const Se=++me.current,Re=()=>{if(!j.current||me.current!==Se||xe.current!==m)throw new DOMException("Voice startup was cancelled.","AbortError")};ne.current.beginSession();const pt=performance.now(),nt={},Pt=mt=>{nt[mt]=Math.round(performance.now()-pt)};let Ln=!1;try{if(!window.isSecureContext||!((On=navigator.mediaDevices)!=null&&On.getUserMedia))throw new Error("Microphone access requires HTTPS or localhost.");N(""),Kn(!1),tt("thinking"),k=new AudioContext;const mt=k,rt=Ap($o).then(de=>Ln?(de==null||de.release(),null):(J=de,Pt("startup_lease_ms"),de)),er=navigator.mediaDevices.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(de=>Ln?(de.getTracks().forEach(Me=>Me.stop()),null):(T=de,Pt("startup_microphone_ms"),de));K=k.createGain(),K.gain.value=1,K.connect(k.destination),ee=new bh(Er,ht,de=>{Mn(),ut(de instanceof Error?de.message:"Speech playback failed.")}),fe=new xh(Vo,de=>{ue.current=de,pe.current=performance.now(),Ho(R,Se)},()=>Hl(R,Se)),Fe=new ch(async(de,Me)=>{const Oe=await((fe==null?void 0:fe.finish(de.samples,Me))??Vo(de.samples,Me)),He=de.possibleEcho?ah(Oe,de.possibleEcho):Oe,Et=de.pendingInterruptDecision;if(!Et)return He;const zt=Rf(He,Et.recentWindow);return zt?(xr(),zt.remainder):!Et.wordPathBlocked&&Ru(He,Et.recentWindow)?(xr(),He):""},Nr,de=>ut(de instanceof Error?de.message:"Voice transcription failed."),ht);const Ko=async()=>{if(!T)throw new Error("The microphone is not ready.");return T},Li={getStream:Ko,pauseStream:async()=>{},resumeStream:Ko,...wh(_u()),submitUserSpeechOnPause:!0,onSpeechStart:()=>{var He,Et,zt,tr;if(!at(R,Se))return;(He=D.current)==null||He.speechStarted();const de=Ll(!!q.current,!!((Et=U.current)!=null&&Et.busy),$.current),Me=ie.current.speechStart(de);g.current=$.current||(zt=U.current)!=null&&zt.busy?W.current:"";const Oe=performance.now();ve.current=zh(ye.current,Oe,Oe),ue.current="",pe.current=0,je.current=0,st.current=0,Wn.current=!1,Me.begin&&((tr=H.current)==null||tr.begin(de)),Jn(R,Se),Wt(),de&&(vr.current=window.setTimeout(()=>Ho(R,Se),_h))},onSpeechRealStart:()=>{var Me,Oe;if(!at(R,Se))return;ie.current.speechRealStart().accepted&&(Ie(),(Me=H.current)==null||Me.confirm(),Jn(R,Se),(Oe=En.current)==null||Oe.abort(),N(""),tt("hearing"))},onVADMisfire:()=>{var de,Me;at(R,Se)&&(Pe(),ie.current.reset(),Wt(),ue.current="",pe.current=0,g.current="",ve.current="",(de=H.current)==null||de.discard(),(Me=D.current)==null||Me.speechDiscarded(),Ie(),Q.current||ht())},onFrameProcessed:(de,Me)=>{var He;if(!at(R,Se))return;(He=H.current)==null||He.frame(de.isSpeech,Me);const Oe=Math.sqrt(Me.reduce((Et,zt)=>Et+zt*zt,0)/Me.length);if(y(Math.min(1,Oe*7)),$.current&&ie.current.idle)Ee.current=Ee.current===null?Oe:Ee.current*.9+Oe*.1;else if(!ie.current.idle&&$.current&&!Wn.current&&(je.current++,st.current+=Oe,je.current>=Dh)){Wn.current=!0;const Et=st.current/je.current;Uh(Et,Ee.current)&&ie.current.blockWordPath()}},onSpeechEnd:de=>{var zt,tr,Ai,zi,Di,Ii;if(!at(R,Se))return;Jt.current={speechEnd:performance.now()},Pe(),Wt();const Me=ue.current.trim()!==""&&performance.now()-pe.current<=Ch,Oe=ve.current,He=ie.current.speechEnd(ue.current,Oe,Me);if(ue.current="",pe.current=0,!He.accepted){g.current="",ve.current="",(zt=H.current)==null||zt.discard(),(tr=D.current)==null||tr.speechDiscarded(),Ie(),ht();return}if(Ie(),He.interrupt&&xr(),!He.send){g.current="",ve.current="",(Ai=H.current)==null||Ai.discard(),(zi=D.current)==null||zi.speechDiscarded(),ht();return}(Di=H.current)==null||Di.end(de);const Et=g.current;g.current="",ve.current="",(Ii=D.current)==null||Ii.speechEnded({samples:de,possibleEcho:Et,...He.deferDecision?{pendingInterruptDecision:{recentWindow:Oe,wordPathBlocked:He.wordPathBlocked}}:{}})}},Ql=wf?Promise.resolve(null):(async()=>{try{const{MicVAD:de}=await Ff(),Me=await de.new({model:"v5",audioContext:mt,startOnLoad:!1,baseAssetPath:Mu,onnxWASMBasePath:Mu,ortConfig:Oe=>{Oe.env.wasm.numThreads=1},...Li});return Ln?(Me.destroy().catch(()=>{}),null):(R=Me,Pt("startup_detector_ms"),Me)}catch{return wf=!0,null}})(),[ql,Ht,Gl]=await Promise.all([rt,er,Ql,mt.resume()]);if(J=ql,T=Ht,R=Gl,!J)throw new Gp;if(!Ht)throw new Error("Voice startup did not finish.");Re();let Qo=!1;R||(Qo=!0,R=await Vu.new({audioContext:k,...Li}),Pt("startup_detector_ms")),Re(),fe.speechThreshold=Qo?Uu:Dl,Kn(Qo),await ne.current.start(R),Pt("startup_listening_ms"),Re();const oo=R,ct=k;if(!oo||!ct)throw new Error("Voice startup did not finish.");P.current=J,C.current=ct,G.current=K,Uo(ct),U.current=ee,H.current=fe,D.current=Fe,le.current=Ht,X.current=oo,I.current=!0;const Oi=()=>{var de,Me,Oe;if(!(le.current!==Ht||!I.current)){I.current=!1,en.current=!1,Kn(!1),me.current++,Pe(),ne.current.deactivate(),Q.current=!1,tn(),Ie(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",U.current=null,(de=H.current)==null||de.reset(),H.current=null,(Me=D.current)==null||Me.reset(),D.current=null,X.current===oo&&(X.current=null),le.current===Ht&&(le.current=null),C.current===ct&&(C.current=null),(Oe=G.current)==null||Oe.disconnect(),G.current=null;for(const He of Ht.getTracks())He.onended=null,He.readyState==="live"&&He.stop();oo.destroy().catch(()=>{}),ct.state!=="closed"&&ct.close().catch(()=>{}),vn(),ut("Microphone disconnected. Tap the shape to reconnect.")}};for(const de of Ht.getAudioTracks())de.onended=Oi;let io=!1;const lo=()=>{if(!(C.current!==ct||!I.current)){if(ct.state==="running"||ct.state==="closed"){io=!1;return}ct.resume().catch(()=>{}).then(()=>{C.current!==ct||!I.current||ct.state==="running"||io||(io=!0,ut("The device paused audio. Tap the shape to keep talking."))})}};ct.onstatechange=lo;const Yl=window.setInterval(()=>{if(C.current!==ct||ct.state==="closed"){window.clearInterval(Yl),document.removeEventListener("visibilitychange",lo);return}lo()},2e3);if(document.addEventListener("visibilitychange",lo),!Ht.getAudioTracks().some(de=>de.readyState==="live")){Oi();return}tt("listening"),fetch("/api/voice/timing",{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify(nt)}).catch(()=>{}),br.current&&rn()}catch(mt){Ln=!0;const rt=me.current===Se&&xe.current===m;rt&&(me.current++,Pe(),ne.current.deactivate(),X.current===R&&(X.current=null),le.current===T&&(le.current=null),C.current===k&&(C.current=null),G.current===K&&(G.current=null),U.current===ee&&(U.current=null),H.current===fe&&(H.current=null),D.current===Fe&&(D.current=null)),ee==null||ee.cancel(),fe==null||fe.reset(),Fe==null||Fe.reset(),K==null||K.disconnect(),R&&await R.destroy().catch(()=>{}),T==null||T.getTracks().forEach(er=>er.stop()),k&&k.state!=="closed"&&await k.close().catch(()=>{}),P.current===J&&(P.current=null),J==null||J.release(),rt&&!(mt instanceof DOMException&&mt.name==="AbortError")&&ut(mt instanceof Error?mt.message:"Could not start the microphone.")}finally{xe.current===m&&(z.current=!1)}},at=(m,k)=>(I.current||z.current)&&!br.current&&hh(me.current,k,X.current,m,Q.current,ne.current.acceptsCallbacks),on=(m,k,T)=>m!==null&&X.current===m&&I.current&&Q.current===k&&(T===void 0||me.current===T),Pr=(m,k,T)=>on(m,k,T)&&m!==null&&!ne.current.isInvalid(m),Jn=(m,k)=>{Pe(),m&&(B.current=window.setTimeout(()=>{B.current=null,at(m,k)&&ne.current.flush(m).then(()=>{Pr(m,!1,k)}).catch(T=>{on(m,!1,k)&&(ne.current.isInvalid(m)?nn("Microphone transition timed out. Tap the shape to reconnect."):ut(T instanceof Error?T.message:"Microphone recovery failed."))})},Wp))},Hl=(m,k)=>{!m||!at(m,k)||ne.current.flush(m).catch(T=>{on(m,!1,k)&&(ne.current.isInvalid(m)?nn("Microphone transition timed out. Tap the shape to reconnect."):ut(T instanceof Error?T.message:"Microphone recovery failed."))})},Ho=(m,k)=>{at(m,k)&&ie.current.shouldInterruptNow(ue.current,ve.current)&&(Wt(),xr(),Ie())},to=async()=>{var k,T,R,J,K;if(!I.current){z.current||Fn();return}const m=C.current;if(m&&m.state!=="running"&&m.state!=="closed"&&(await m.resume().catch(()=>{}),m.state==="running")){tt(Q.current?"muted":"listening");return}if(!Q.current&&Ll(!!q.current,!!((k=U.current)!=null&&k.busy),$.current)){xr(),Ie();return}if(Q.current=!Q.current,Q.current){Pe(),tn(),Ie(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",(T=H.current)==null||T.reset(),(R=D.current)==null||R.reset(),(J=le.current)==null||J.getTracks().forEach(fe=>{fe.enabled=!1});const ee=X.current;if(!on(ee,!0))return;ee==null||ee.setOptions({submitUserSpeechOnPause:!1});try{if(ee&&await ne.current.pause(ee),!Pr(ee,!0)){on(ee,!0)&&ee&&ne.current.isInvalid(ee)&&nn("Microphone transition timed out. Tap the shape to reconnect.");return}tt("muted")}catch(fe){if(!on(ee,!0))return;ee&&ne.current.isInvalid(ee)?nn("Microphone transition timed out. Tap the shape to reconnect."):ut(fe instanceof Error?fe.message:"Could not pause the microphone.")}}else{(K=le.current)==null||K.getTracks().forEach(fe=>{fe.enabled=!0});const ee=X.current;if(!on(ee,!1))return;try{if(ee){if(await ne.current.start(ee),!Pr(ee,!1)){on(ee,!1)&&ne.current.isInvalid(ee)&&nn("Microphone transition timed out. Tap the shape to reconnect.");return}ee.setOptions({submitUserSpeechOnPause:!0})}if(!Pr(ee,!1))return;tt("listening")}catch(fe){if(!on(ee,!1))return;ee&&ne.current.isInvalid(ee)?nn("Microphone transition timed out. Tap the shape to reconnect."):ut(fe instanceof Error?fe.message:"Could not resume the microphone.")}}},Mi=()=>{if(Xn(),N(""),I.current||z.current){nn(""),window.setTimeout(()=>{!I.current&&!z.current&&Fn()},0);return}Fn()};if(_.useEffect(()=>{np(),Vl()},[u]),_.useEffect(()=>{const m=new AbortController;return fetch("/api/sessions",{headers:De(),signal:m.signal}).then(hn).then(async k=>{if(!k.ok)return;const R=(await k.json()).sessions.find(J=>J.key===u);R&&!m.signal.aborted&&(Ve.current=R.harness,qr({harness:R.harness,title:R.title,cwd:R.cwd,host:R.host}))}).catch(k=>{k instanceof dn&&!m.signal.aborted&&Pn(!0)}),()=>m.abort()},[u]),_.useEffect(()=>{let m=!1;const k=()=>{fetch("/api/health",{headers:De()}).then(async R=>{const J=await R.json().catch(()=>({}));if(m)return;const K=J.speech??{};Lo({ready:K.ready!==!1,downloading:K.downloading===!0,progress:typeof K.progress=="number"?K.progress:void 0,error:typeof K.error=="string"?K.error:void 0})}).catch(()=>{})};k();const T=window.setInterval(k,Qp);return()=>{m=!0,window.clearInterval(T)}},[]),_.useEffect(()=>{var m;if(br.current=St,St?rn():gn(),!St){Rn&&Cr(),(m=Zt.current)==null||m.abort(),Zt.current=null;return}xt(""),mn(""),ji(Br()??void 0)},[St]),_.useEffect(()=>{if(!Nt&&!St)return;const m=T=>{var J,K;const R=T.target;R instanceof Node&&((J=Do.current)!=null&&J.contains(R)||(K=Io.current)!=null&&K.contains(R))||Xn()},k=T=>{T.key==="Escape"&&(T.preventDefault(),Xn())};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",k),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",k)}},[Nt,St]),_.useEffect(()=>{St&&window.setTimeout(()=>{var m;return(m=_i.current)==null?void 0:m.focus()},0)},[St]),_.useEffect(()=>()=>{var m,k,T,R,J,K,ee,fe;j.current=!1,Ye.current++,_e.current!==null&&window.clearTimeout(_e.current),_e.current=null,I.current=!1,we(),(m=Zt.current)==null||m.abort(),(k=Ot.current)==null||k.abort(),Ot.current=null,kr.current=null,Bt.current&&Bt.current.state!=="closed"&&Bt.current.close().catch(()=>{}),Bt.current=null,me.current++,Pe(),ne.current.deactivate(),tn(),Ie(),ie.current.reset(),Wt(),ue.current="",pe.current=0,ve.current="",(T=H.current)==null||T.reset(),(R=D.current)==null||R.reset(),D.current=null,(J=X.current)==null||J.destroy(),(K=le.current)==null||K.getTracks().forEach(Fe=>{Fe.onended=null,Fe.stop()}),(ee=C.current)==null||ee.close(),(fe=G.current)==null||fe.disconnect(),G.current=null,vn()},[]),Oo)return h.jsx(If,{});const Kl=Ll(!!q.current,!!((ro=U.current)!=null&&ro.busy),$.current),Tr=I.current?s==="muted"?"Unmute microphone":Kl?"Stop reply":"Mute microphone":"Start voice conversation",jr=Nt?Math.max(12,Math.min(Nt.x,window.innerWidth-170)):0,bn=Nt?Math.max(12,Math.min(Nt.y,window.innerHeight-68)):0,Zn=ki||Cn,no=kt.ready,Fi=kt.ready?"Ready":kt.downloading?`Downloading voice models…${typeof kt.progress=="number"?` ${Math.round(kt.progress)}%`:""}`:"Offline";return h.jsxs("main",{className:"voice-page","data-state":s,style:{"--level":d},children:[h.jsxs("header",{className:"room-header",children:[h.jsx("a",{className:"room-header__back",href:"/","aria-label":"Back to hub",children:"←"}),h.jsx("img",{className:"room-header__logo",src:"/logo-192.png",alt:"",width:22,height:22}),h.jsxs("span",{className:"room-header__title",children:[bt.harness?Il[bt.harness]:"Meldivo"," · ",bt.title]}),(bt.host||bt.cwd)&&h.jsx("span",{className:"room-header__cwd",children:[bt.host,bt.cwd].filter(Boolean).join(" · ")})]}),Tn&&h.jsx("p",{className:"room-status",role:"status",children:Tn}),h.jsx(Up,{items:wr.items}),xi&&h.jsx("p",{className:"room-status voice-fallback-notice",role:"status",children:"Using basic voice detection"}),!kt.ready&&h.jsx("p",{className:"voice-health",role:"status",children:kt.error||Fi}),h.jsxs("button",{className:"voice-shape",type:"button",onClick:()=>{if(Date.now()<Vt.current){Vt.current=0;return}if(Nt||St){Xn();return}to()},onPointerDown:Ni,onPointerMove:Pi,onPointerUp:we,onPointerCancel:we,onPointerLeave:we,onLostPointerCapture:we,onContextMenu:m=>{m.preventDefault(),_r(m.clientX,m.clientY)},onKeyDown:m=>{if(m.key==="ContextMenu"||m.key==="F10"&&m.shiftKey){m.preventDefault();const k=m.currentTarget.getBoundingClientRect();_r(k.left+k.width/2,k.top+k.height/2)}},"aria-label":Tr,"aria-haspopup":"menu","aria-expanded":!!(Nt||St),children:[h.jsx("span",{className:"voice-shape__halo"}),h.jsx("span",{className:"voice-shape__ring voice-shape__ring--one"}),h.jsx("span",{className:"voice-shape__ring voice-shape__ring--two"}),h.jsx("span",{className:"voice-shape__core"})]}),Nt&&h.jsx("div",{ref:Do,className:"voice-context-menu",role:"menu","aria-label":"Voice options",style:{left:jr,top:bn},children:h.jsx("button",{type:"button",role:"menuitem",onClick:()=>{Wr(null),Hr(!0)},children:"Settings"})}),St&&h.jsxs("div",{ref:Io,className:"voice-settings",role:"dialog","aria-modal":"false","aria-labelledby":"voice-settings-title",onKeyDown:m=>{m.key==="Escape"&&(m.preventDefault(),Xn())},children:[h.jsxs("div",{className:"voice-settings__header",children:[h.jsx("h2",{id:"voice-settings-title",children:"Voice"}),h.jsx("button",{className:"voice-settings__close",type:"button",onClick:Xn,"aria-label":"Close voice settings",children:"×"})]}),h.jsxs("p",{id:"tts-provider-status",className:`voice-settings__availability voice-settings__availability--${kt.ready?"ready":kt.downloading?"checking":"offline"}`,role:"status",children:[h.jsx("span",{"aria-hidden":"true"}),Fi]}),kt.error&&h.jsx("p",{className:"voice-settings__availability-note",children:kt.error}),Ao&&h.jsx("p",{className:"voice-settings__availability-note",children:Ao}),Yr&&h.jsx("p",{className:"voice-settings__muted",children:"Loading voices…"}),!Yr&&Kr.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("label",{className:"voice-settings__label",htmlFor:"voice-choice",children:"Choose a voice"}),h.jsxs("div",{className:"voice-settings__choice",children:[h.jsx("select",{ref:_i,id:"voice-choice",value:et,onChange:m=>{Cr(),Nn(m.target.value),xt(""),mn("")},"aria-describedby":"voice-current",children:Kr.map(m=>h.jsx("option",{value:m,children:yi(m)},m))}),h.jsx("button",{className:"voice-settings__play",type:"button",onClick:()=>{Ti()},disabled:!et||!no||!!Rn,"aria-label":`Preview ${et||"voice"}`,"aria-describedby":"tts-provider-status",title:no?void 0:"Wait for voice models to be ready.",children:Rn?"…":"▶"})]}),h.jsxs("p",{id:"voice-current",className:"voice-settings__current",children:["Current: ",Zn?yi(Zn):"profile default"]}),h.jsxs("div",{className:"voice-settings__actions",children:[h.jsx("button",{type:"button",onClick:Ri,disabled:!et||!no||et===Zn,"aria-describedby":"tts-provider-status",title:no?void 0:"Wait for voice models to be ready.",children:"Use this voice"}),h.jsx("button",{type:"button",onClick:eo,disabled:!ki,children:"Restore default"})]})]}),!Yr&&!Kr.length&&h.jsx(h.Fragment,{children:h.jsx("p",{className:"voice-settings__muted",children:"No selectable voices are configured."})}),Xr&&h.jsx("p",{className:"voice-settings__error",role:"alert",children:Xr}),Ei&&h.jsx("p",{className:"voice-settings__notice",role:"status",children:Ei}),h.jsxs("label",{className:"voice-settings__label",htmlFor:"vad-redemption",children:["End-of-speech wait: ",Fo," ms"]}),h.jsx("input",{id:"vad-redemption",type:"range",min:Tf,max:jf,step:Pu,value:Fo,onChange:m=>Wo(Number(m.target.value)),"aria-describedby":"vad-redemption-hint"}),h.jsx("p",{id:"vad-redemption-hint",className:"voice-settings__muted",children:"How long to wait after you stop talking before the reply starts. Lower is snappier; higher avoids cutting off pauses."}),h.jsx("a",{className:"voice-settings__advanced-link",href:"/?settings=speech",children:"Speech engines and servers…"})]}),zo&&h.jsx("div",{className:"voice-onboarding",role:"dialog","aria-modal":"true","aria-labelledby":"voice-onboarding-title",children:h.jsxs("div",{className:"voice-onboarding__card",children:[h.jsx("h2",{id:"voice-onboarding-title",children:"Welcome"}),h.jsx("p",{children:"Tap to talk, or to stop a reply · hold or right-click for settings."}),h.jsx("button",{type:"button",onClick:()=>{try{window.localStorage.setItem(Uf,"true")}catch{}$l(!1)},children:"OK"})]})}),E&&h.jsxs("div",{className:"voice-error",role:"alert",title:E,children:[h.jsx("span",{children:E}),h.jsx("button",{className:"voice-error__reconnect",type:"button",onClick:Mi,children:"Reconnect"})]})]})}function Du(u){return{engine:u.engine,url:u.url??"",apiKey:"",hasKey:!!u.hasKey,clearKey:!1,model:u.model??"",voice:u.voice??"",models:[],voices:[],status:"idle",error:""}}function zl(u){return u.engine==="local"?{engine:"local",...u.voice?{voice:u.voice}:{}}:{engine:u.engine,url:u.url,...u.apiKey?{apiKey:u.apiKey}:{},...u.clearKey?{clearKey:!0}:{},...u.model?{model:u.model}:{},...u.voice?{voice:u.voice}:{}}}function xf(u){const l=/^([abefhijpz])([fm])_(.+)$/.exec(u),f=(l?l[3]:u.replace(/\.(wav|mp3|flac)$/i,"")).replace(/[_-]+/g," ").trim().replace(/\b\w/g,y=>y.toUpperCase());return l?`${f} (${{a:"American",b:"British",e:"Spanish",f:"French",h:"Hindi",i:"Italian",j:"Japanese",p:"Portuguese",z:"Chinese"}[l[1]]??""} ${l[2]==="f"?"female":"male"})`.replace("( ","("):f}async function Jp(u,l,s){const f=hn(await fetch(u,{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify(l),signal:s})),d=await f.json().catch(()=>({}));if(!f.ok)throw new Error(d.error??"The request failed.");return d}function Ef({kind:u,engines:l,draft:s,onChange:f}){const d=l.find(C=>C.id===s.engine),y=s.engine!=="local",[E,N]=_.useState(!1),L=_.useRef(null),j=_.useRef(null),Q=_.useRef(null),I=u==="tts"?"Text to speech":"Speech to text",z=`speech-${u}`,$=u==="tts"?s.model:"";_.useEffect(()=>{var q;if((q=Q.current)==null||q.abort(),y&&!s.url.trim()){f(ge=>({...ge,models:[],voices:[],status:"idle",error:""}));return}const C=new AbortController;Q.current=C;const G=window.setTimeout(()=>{f(U=>({...U,status:"loading",error:""}));const ge={...zl({...s,voice:""})};Jp("/api/speech/discover",{kind:u,setting:ge},C.signal).then(U=>{C.signal.aborted||f(H=>{var me;const D=U.models.some(xe=>xe.id===H.model)?H.model:U.model??((me=U.models[0])==null?void 0:me.id)??"",ne=U.voices.includes(H.voice)?H.voice:U.voice??U.voices[0]??"";return{...H,models:U.models,voices:U.voices,model:D,voice:ne,status:"ready",error:""}})}).catch(U=>{if(U instanceof dn)throw U;C.signal.aborted||f(H=>({...H,models:[],voices:[],status:"error",error:U instanceof Error?U.message:"Could not reach the server."}))})},y?600:0);return()=>{window.clearTimeout(G),C.abort()}},[u,s.engine,s.url,s.apiKey,s.clearKey,$]);const X=()=>{var G;(G=L.current)==null||G.abort();const C=j.current;j.current=null,C&&C.state!=="closed"&&C.close().catch(()=>{})};_.useEffect(()=>X,[]);const le=async()=>{if(!s.voice)return;X();const C=new AbortController;L.current=C;const G=new AudioContext;j.current=G,N(!0),f(q=>({...q,error:""}));try{const q=hn(await fetch("/api/speech/preview",{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({setting:zl(s),voice:s.voice}),signal:C.signal}));if(!q.ok)throw new Error((await q.json().catch(()=>({}))).error??"Preview failed.");await G.resume();const ge=await G.decodeAudioData(await q.arrayBuffer());if(C.signal.aborted)return;const U=G.createBufferSource();U.buffer=ge,U.connect(G.destination),U.onended=()=>{j.current===G&&(X(),N(!1))},U.start()}catch(q){if(q instanceof dn)throw q;C.signal.aborted||(X(),N(!1),f(ge=>({...ge,error:q instanceof Error?q.message:"Preview failed."})))}};return h.jsxs("section",{className:"speech-section","aria-labelledby":`${z}-title`,children:[h.jsx("h3",{id:`${z}-title`,children:I}),h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Engine"}),h.jsx("select",{value:s.engine,onChange:C=>{const G=C.target.value;f(q=>({...Du({engine:G}),url:G===q.engine?q.url:""}))},children:l.map(C=>h.jsxs("option",{value:C.id,children:[C.label,C.note?` · ${C.note}`:""]},C.id))})]}),y&&h.jsxs(h.Fragment,{children:[h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Server address"}),h.jsx("input",{type:"url",inputMode:"url",autoComplete:"off",spellCheck:!1,placeholder:(d==null?void 0:d.defaultUrl)??"http://localhost:8000",value:s.url,onChange:C=>{const G=C.target.value;f(q=>({...q,url:G}))}})]}),h.jsxs("label",{className:"speech-field",children:[h.jsxs("span",{children:["API key ",h.jsx("em",{children:"(optional)"})]}),h.jsx("input",{type:"password",autoComplete:"off",placeholder:s.hasKey&&!s.clearKey?"Saved; type to replace":"Leave empty if the server has none",value:s.apiKey,onChange:C=>{const G=C.target.value;f(q=>({...q,apiKey:G,clearKey:!1}))}})]}),s.hasKey&&!s.apiKey&&!s.clearKey&&h.jsx("button",{type:"button",className:"speech-link",onClick:()=>f(C=>({...C,clearKey:!0})),children:"Remove saved key"})]}),s.status==="loading"&&h.jsx("p",{className:"speech-status",children:"Connecting…"}),s.status==="ready"&&y&&h.jsx("p",{className:"speech-status speech-status--ok",children:"Connected"}),s.status==="error"&&h.jsx("p",{className:"speech-status speech-status--error",role:"alert",children:s.error}),y&&s.models.length>0&&((d==null?void 0:d.hasModels)||s.models.length>1)&&h.jsxs("label",{className:"speech-field",children:[h.jsx("span",{children:"Model"}),h.jsx("select",{value:s.model,onChange:C=>{const G=C.target.value;f(q=>({...q,model:G}))},children:s.models.map(C=>h.jsxs("option",{value:C.id,children:[C.id,C.installed===!1?" (downloads on first use)":""]},C.id))})]}),u==="tts"&&s.voices.length>0&&h.jsxs("div",{className:"speech-field",children:[h.jsx("label",{htmlFor:`${z}-voice`,children:"Speaker"}),h.jsxs("div",{className:"speech-voice",children:[h.jsx("select",{id:`${z}-voice`,value:s.voice,onChange:C=>{const G=C.target.value;f(q=>({...q,voice:G}))},children:s.voices.map(C=>h.jsx("option",{value:C,children:xf(C)},C))}),h.jsx("button",{type:"button",className:"speech-play",onClick:()=>{le()},disabled:!s.voice||E,"aria-label":`Play a preview of ${s.voice?xf(s.voice):"this speaker"}`,children:E?"…":"▶"})]})]}),s.error&&s.status!=="error"&&h.jsx("p",{className:"speech-status speech-status--error",role:"alert",children:s.error})]})}function bp({onClose:u}){const[l,s]=_.useState(null),[f,d]=_.useState(null),[y,E]=_.useState(null),[N,L]=_.useState(""),[j,Q]=_.useState(""),[I,z]=_.useState(!1);_.useEffect(()=>{fetch("/api/speech/settings",{headers:De()}).then(hn).then(async C=>{if(!C.ok)throw new Error("Could not load the speech settings.");const G=await C.json();s(G),d(Du(G.tts.setting)),E(Du(G.stt.setting))}).catch(C=>{if(C instanceof dn)throw C;L(C instanceof Error?C.message:"Could not load the speech settings.")})},[]);const $=C=>G=>{Q(""),C(q=>q&&G(q))},X=()=>{!f||!y||(z(!0),L(""),Q(""),fetch("/api/speech/settings",{method:"PUT",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({tts:zl(f),stt:zl(y)})}).then(hn).then(async C=>{const G=await C.json().catch(()=>({}));if(!C.ok)throw new Error(G.error??"Could not save the speech settings.");d(q=>q&&{...q,apiKey:"",clearKey:!1,hasKey:!!G.tts.setting.hasKey}),E(q=>q&&{...q,apiKey:"",clearKey:!1,hasKey:!!G.stt.setting.hasKey}),Q("Saved. Every machine and browser on this hub uses it from the next turn.")}).catch(C=>{if(C instanceof dn)throw C;L(C instanceof Error?C.message:"Could not save the speech settings.")}).finally(()=>z(!1)))},le=C=>!C||C.engine!=="local"&&!C.url.trim();return h.jsxs("div",{className:"hub-remote speech-settings",role:"dialog","aria-labelledby":"speech-settings-title",children:[h.jsxs("div",{className:"hub-remote__header",children:[h.jsx("h2",{id:"speech-settings-title",children:"Speech"}),h.jsx("button",{className:"hub-remote__close",type:"button",onClick:u,"aria-label":"Close speech settings",children:"×"})]}),h.jsx("p",{className:"hub-muted speech-intro",children:"Use the built-in on-device models, or point either direction at a speech server you run, for a bigger, more realistic, or faster model."}),!l&&!N&&h.jsx("p",{className:"hub-muted",children:"Loading…"}),l&&f&&y&&h.jsxs(h.Fragment,{children:[h.jsx(Ef,{kind:"tts",engines:l.tts.engines,draft:f,onChange:$(d)}),h.jsx(Ef,{kind:"stt",engines:l.stt.engines,draft:y,onChange:$(E)}),h.jsx("div",{className:"speech-actions",children:h.jsx("button",{type:"button",className:"hub-primary",onClick:X,disabled:I||le(f)||le(y),children:I?"Saving…":"Save"})})]}),N&&h.jsx("p",{className:"hub-error",role:"alert",children:N}),j&&h.jsx("p",{className:"speech-status speech-status--ok",role:"status",children:j})]})}const Zp=5e3,em=5e3;function wi(u){const l=/^(\/home\/[^/]+|\/Users\/[^/]+)(\/.*)?$/.exec(u);return l?l[2]?`~${l[2]}`:"~":u}function $f(u){const l=Math.max(0,Math.round((Date.now()-u)/1e3));if(l<5)return"just now";if(l<60)return`${l}s ago`;const s=Math.round(l/60);if(s<60)return`${s}m ago`;const f=Math.round(s/60);return f<24?`${f}h ago`:`${Math.round(f/24)}d ago`}function Vf(u,l){window.location.href=`/?session=${encodeURIComponent(u)}${l?`&folder=${encodeURIComponent(l)}`:""}`}function tm(u){return u.busy?{className:"hub-dot hub-dot--busy",label:"busy"}:u.open?{className:"hub-dot hub-dot--open",label:"open in terminal"}:{className:"hub-dot hub-dot--idle",label:"idle"}}function nm({onClose:u}){var z;const[l,s]=_.useState(null),[f,d]=_.useState(""),[y,E]=_.useState(!1),[N,L]=_.useState(""),j=()=>{d(""),fetch("/api/remote",{headers:De()}).then(hn).then(async $=>{if(!$.ok)throw new Error("Could not load phone access options.");s(await $.json())}).catch($=>{if($ instanceof dn)throw $;d($ instanceof Error?$.message:"Could not load phone access options.")})};_.useEffect(j,[]),_.useEffect(()=>{var le;const $=(le=l==null?void 0:l.active)==null?void 0:le.url;if(!$){L("");return}let X=!1;return Mf(()=>import("./browser-CujOq0-h.js").then(C=>C.b),__vite__mapDeps([2,1])).then(async C=>{const G=await C.toDataURL($,{margin:1,width:200});X||L(G)}).catch(()=>{X||L("")}),()=>{X=!0}},[(z=l==null?void 0:l.active)==null?void 0:z.url]);const Q=$=>{E(!0),d(""),fetch("/api/remote",{method:"POST",headers:{"Content-Type":"application/json",...De()},body:JSON.stringify({id:$})}).then(hn).then(async X=>{if(!X.ok)throw new Error((await X.json().catch(()=>({}))).error??"Could not enable phone access.");j()}).catch(X=>{if(X instanceof dn)throw X;d(X instanceof Error?X.message:"Could not enable phone access.")}).finally(()=>E(!1))},I=()=>{E(!0),d(""),fetch("/api/remote",{method:"DELETE",headers:De()}).then(hn).then($=>{if(!$.ok)throw new Error("Could not turn off phone access.");j()}).catch($=>{if($ instanceof dn)throw $;d($ instanceof Error?$.message:"Could not turn off phone access.")}).finally(()=>E(!1))};return h.jsxs("div",{className:"hub-remote",role:"dialog","aria-labelledby":"hub-remote-title",children:[h.jsxs("div",{className:"hub-remote__header",children:[h.jsx("h2",{id:"hub-remote-title",children:"Phone access"}),h.jsx("button",{className:"hub-remote__close",type:"button",onClick:u,"aria-label":"Close phone access",children:"×"})]}),!l&&!f&&h.jsx("p",{className:"hub-muted",children:"Loading…"}),f&&h.jsx("p",{className:"hub-error",role:"alert",children:f}),(l==null?void 0:l.active)&&h.jsxs("div",{className:"hub-remote__active",children:[h.jsx("p",{className:"hub-remote__url",children:l.active.url}),N&&h.jsx("img",{className:"hub-remote__qr",src:N,alt:"QR code for phone access URL"}),h.jsx("button",{type:"button",onClick:I,disabled:y,children:"Turn off"})]}),l&&!l.active&&h.jsxs(h.Fragment,{children:[h.jsx("ul",{className:"hub-remote__options",children:l.options.map($=>h.jsx("li",{children:h.jsxs("button",{type:"button",disabled:!$.ready||y,onClick:()=>Q($.id),children:[$.label,$.ready?"":" (not ready)"]})},$.id))}),!l.options.some($=>$.ready)&&l.guide&&(/^https?:\/\//.test(l.guide)?h.jsx("p",{className:"hub-muted",children:h.jsx("a",{href:l.guide,target:"_blank",rel:"noreferrer",children:"Set up phone access"})}):h.jsx("p",{className:"hub-muted",children:l.guide}))]})]})}const _f="meldivo.machine",rm=5;function om(u){return u.id?`@${u.id}/`:""}function im({host:u,sessions:l,selected:s,onSelect:f}){const d=l.filter(L=>L.open).length,y=l.some(L=>L.busy),E=l.reduce((L,j)=>Math.max(L,j.updatedAt),0),N=u.online?y?"hub-dot--busy":"hub-dot--online":"hub-dot--idle";return h.jsxs("button",{type:"button",role:"tab","aria-selected":s,className:`hub-machine${s?" hub-machine--selected":""}${u.online?"":" hub-machine--offline"}`,onClick:f,children:[h.jsxs("span",{className:"hub-machine__name",children:[h.jsx("span",{className:`hub-dot ${N}`,"aria-hidden":"true"}),u.name]}),h.jsx("span",{className:"hub-machine__meta",children:u.online?h.jsxs(h.Fragment,{children:[l.length," session",l.length===1?"":"s",d>0&&h.jsxs(h.Fragment,{children:[" · ",d," open"]})]}):"offline"}),u.online&&E>0&&h.jsxs("span",{className:"hub-machine__meta",children:["active ",$f(E)]})]})}const Nu=1440*60*1e3;function lm(u,l){const s=Date.now()-u;return l==="today"?new Date(u).toDateString()===new Date().toDateString():l==="week"?s<=7*Nu:l==="month"?s<=30*Nu:l==="older"?s>30*Nu:!0}function sm(u,l){const s=[...u];return l==="title"?s.sort((f,d)=>(f.title||"").localeCompare(d.title||"",void 0,{sensitivity:"base"})):s.sort((f,d)=>l==="oldest"?f.updatedAt-d.updatedAt:d.updatedAt-f.updatedAt),s}function um({session:u}){const l=tm(u);return h.jsx("li",{children:h.jsxs("button",{type:"button",className:"hub-session",onClick:()=>Vf(u.key),children:[h.jsx("span",{className:l.className,"aria-hidden":"true",title:l.label}),h.jsxs("span",{className:"hub-session__body",children:[h.jsx("span",{className:"hub-session__title",children:u.title||"(untitled)"}),h.jsxs("span",{className:"hub-session__meta",children:[h.jsx("span",{className:"hub-session__badge",children:Il[u.harness]}),h.jsx("span",{className:"hub-session__time",children:$f(u.updatedAt)})]}),u.open&&h.jsx("span",{className:"hub-session__hint",children:"open in a terminal · continues as a voice copy"})]})]})})}function Bf(u,l){if(l.length===0)return!0;const s=`${u.title} ${wi(u.cwd)} ${Il[u.harness]}`.toLowerCase();return l.every(f=>s.includes(f))}function Wf(u){return u.trim().toLowerCase().split(/\s+/).filter(Boolean)}function am({cwd:u,sessions:l,total:s}){const[f,d]=_.useState(""),y=Wf(f),E=l.filter(j=>Bf(j,y)),N=wi(u),L=N==="~"?"Home folder":N||"(no folder)";return h.jsxs("section",{className:"hub-folder","aria-label":L,children:[h.jsxs("h3",{className:"hub-folder__title",children:[h.jsx("span",{children:L}),h.jsx("span",{className:"hub-folder__count",children:l.length===s?s:`${l.length} of ${s}`})]}),l.length>rm&&h.jsx("input",{type:"search",className:"hub-folder__search",placeholder:`Search in ${L}`,value:f,onChange:j=>d(j.target.value),"aria-label":`Search sessions in ${L}`,autoComplete:"off"}),E.length===0?h.jsx("p",{className:"hub-muted hub-folder__none",children:"No sessions here match."}):h.jsx("ul",{className:"hub-sessions hub-folder__list",children:E.map(j=>h.jsx(um,{session:j},j.key))})]})}function cm({host:u,folders:l,agent:s,folder:f,onClose:d}){var Q,I;const y=[...u.harnesses].filter(z=>z.available).sort((z,$)=>zu.indexOf(z.id)-zu.indexOf($.id)),[E,N]=_.useState(((Q=y.find(z=>z.id===s))==null?void 0:Q.id)??((I=y[0])==null?void 0:I.id)),[L,j]=_.useState(f==="all"?"":f);return y.length===0?h.jsx("div",{className:"hub-newchat",children:h.jsxs("p",{className:"hub-muted",children:["No coding agents are installed on ",u.name,"."]})}):h.jsxs("div",{className:"hub-newchat",role:"group","aria-label":"New chat",children:[h.jsxs("div",{className:"hub-newchat__row",children:[h.jsx("span",{className:"hub-newchat__label",children:"Agent"}),h.jsx("div",{className:"hub-chips",children:y.map(z=>h.jsx("button",{type:"button",className:`hub-chip${E===z.id?" hub-chip--on":""}`,"aria-pressed":E===z.id,onClick:()=>N(z.id),children:z.label},z.id))})]}),h.jsxs("label",{className:"hub-newchat__row",children:[h.jsx("span",{className:"hub-newchat__label",children:"Folder"}),h.jsxs("select",{className:"hub-select hub-select--wide",value:L,onChange:z=>j(z.target.value),children:[h.jsx("option",{value:"",children:"Home folder"}),l.map(z=>h.jsx("option",{value:z,children:wi(z)},z))]})]}),h.jsxs("div",{className:"hub-newchat__actions",children:[h.jsx("button",{type:"button",className:"hub-more",onClick:d,children:"Cancel"}),h.jsx("button",{type:"button",className:"hub-primary",disabled:!E,onClick:()=>E&&Vf(`${om(u)}new:${E}`,L||void 0),children:"Start talking"})]})]})}function fm({host:u,sessions:l}){const[s,f]=_.useState(""),[d,y]=_.useState("all"),[E,N]=_.useState("all"),[L,j]=_.useState("any"),[Q,I]=_.useState("newest"),[z,$]=_.useState(!1),[X,le]=_.useState(!1);if(_.useEffect(()=>{f(""),y("all"),N("all"),j("any"),I("newest"),$(!1),le(!1)},[u.id]),!u.online)return h.jsxs("p",{className:"hub-empty",children:[u.name," is offline. Its sessions appear here as soon as it reconnects."]});const C=new Map;for(const B of l)C.set(B.cwd,Math.max(C.get(B.cwd)??0,B.updatedAt));const G=[...C.entries()].sort((B,_e)=>_e[1]-B[1]).map(([B])=>B),q=G.filter(B=>B&&wi(B)!=="~"),ge=zu.filter(B=>l.some(_e=>_e.harness===B)),U=Wf(s),H=sm(l.filter(B=>d!=="all"&&B.harness!==d||E!=="all"&&B.cwd!==E||z&&!B.open||!lm(B.updatedAt,L)?!1:Bf(B,U)),Q),D=l.filter(B=>B.open).length,ne=d!=="all"||E!=="all"||L!=="any"||z||U.length>0,me=[];for(const B of H){const _e=me.find(Ye=>Ye.cwd===B.cwd);_e?_e.sessions.push(B):me.push({cwd:B.cwd,sessions:[B]})}const xe=new Map;for(const B of l)xe.set(B.cwd,(xe.get(B.cwd)??0)+1);return h.jsxs("div",{className:"hub-panel",role:"tabpanel",children:[h.jsxs("div",{className:"hub-search",children:[h.jsx("input",{type:"search",className:"hub-search__input",placeholder:`Search all ${l.length} sessions`,value:s,onChange:B=>f(B.target.value),"aria-label":`Search all sessions on ${u.name}`,autoComplete:"off"}),h.jsx("button",{type:"button",className:"hub-primary","aria-expanded":X,onClick:()=>le(!X),children:X?"Close":"New chat"})]}),X&&h.jsx(cm,{host:u,folders:q,agent:d,folder:E,onClose:()=>le(!1)}),l.length>0&&h.jsxs("div",{className:"hub-filters",children:[h.jsxs("div",{className:"hub-chips",role:"group","aria-label":"Filter by agent",children:[h.jsx("button",{type:"button",className:`hub-chip${d==="all"?" hub-chip--on":""}`,"aria-pressed":d==="all",onClick:()=>y("all"),children:"All agents"}),ge.map(B=>h.jsxs("button",{type:"button",className:`hub-chip${d===B?" hub-chip--on":""}`,"aria-pressed":d===B,onClick:()=>y(d===B?"all":B),children:[Il[B]," ",h.jsx("span",{className:"hub-chip__count",children:l.filter(_e=>_e.harness===B).length})]},B)),h.jsxs("button",{type:"button",className:`hub-chip${z?" hub-chip--on":""}`,"aria-pressed":z,disabled:D===0&&!z,onClick:()=>$(!z),children:["Open now ",h.jsx("span",{className:"hub-chip__count",children:D})]})]}),h.jsxs("div",{className:"hub-selects",children:[h.jsxs("select",{className:"hub-select",value:E,onChange:B=>N(B.target.value),"aria-label":"Folder",children:[h.jsxs("option",{value:"all",children:["All folders (",G.length,")"]}),G.map(B=>h.jsx("option",{value:B,children:wi(B)||"(no folder)"},B))]}),h.jsxs("select",{className:"hub-select",value:L,onChange:B=>j(B.target.value),"aria-label":"Date",children:[h.jsx("option",{value:"any",children:"Any time"}),h.jsx("option",{value:"today",children:"Today"}),h.jsx("option",{value:"week",children:"Past 7 days"}),h.jsx("option",{value:"month",children:"Past 30 days"}),h.jsx("option",{value:"older",children:"Older than 30 days"})]}),h.jsxs("select",{className:"hub-select",value:Q,onChange:B=>I(B.target.value),"aria-label":"Sort",children:[h.jsx("option",{value:"newest",children:"Newest first"}),h.jsx("option",{value:"oldest",children:"Oldest first"}),h.jsx("option",{value:"title",children:"Title A–Z"})]})]})]}),l.length===0&&h.jsxs("p",{className:"hub-empty",children:["No sessions on ",u.name," yet. Tap New chat to start one."]}),l.length>0&&H.length===0&&h.jsxs("p",{className:"hub-empty",children:["No sessions match. ",h.jsx("button",{type:"button",className:"hub-link",onClick:()=>{f(""),y("all"),N("all"),j("any"),$(!1)},children:"Clear filters"})]}),ne&&H.length>0&&h.jsxs("p",{className:"hub-count",children:[H.length," of ",l.length," sessions"]}),h.jsx("div",{className:"hub-folders",children:me.map(B=>h.jsx(am,{cwd:B.cwd,sessions:B.sessions,total:xe.get(B.cwd)??B.sessions.length},`${u.id}|${B.cwd}`))})]})}function dm(){const[u,l]=_.useState(null),[s,f]=_.useState(""),[d,y]=_.useState(!1),[E,N]=_.useState({ready:!0,downloading:!1}),[L,j]=_.useState(!1),[Q,I]=_.useState(()=>new URLSearchParams(window.location.search).get("settings")==="speech"),[z,$]=_.useState(()=>{try{return window.localStorage.getItem(_f)}catch{return null}}),X=_.useRef(!0);if(_.useEffect(()=>(X.current=!0,()=>{X.current=!1}),[]),_.useEffect(()=>{let D=!1;const ne=()=>{fetch("/api/sessions",{headers:De()}).then(hn).then(async xe=>{if(!xe.ok)throw new Error("Could not load sessions.");const B=await xe.json();D||(l(B),f(""))}).catch(xe=>{if(!D){if(xe instanceof dn){y(!0);return}f(xe instanceof Error?xe.message:"Could not load sessions.")}})};ne();const me=window.setInterval(ne,Zp);return()=>{D=!0,window.clearInterval(me)}},[]),_.useEffect(()=>{let D=!1;const ne=()=>{fetch("/api/health",{headers:De()}).then(async xe=>{const B=await xe.json().catch(()=>({}));if(D)return;const _e=B.speech??{};N({ready:_e.ready!==!1,downloading:_e.downloading===!0,progress:typeof _e.progress=="number"?_e.progress:void 0,error:typeof _e.error=="string"?_e.error:void 0})}).catch(()=>{})};ne();const me=window.setInterval(ne,em);return()=>{D=!0,window.clearInterval(me)}},[]),d)return h.jsx(If,{});const le=(u==null?void 0:u.hosts)??(u?[{id:"",name:u.machine,online:!0,harnesses:u.harnesses}]:[]),C=(u==null?void 0:u.sessions)??[],G=D=>C.filter(ne=>(ne.host??"")===D.id),q=le.filter(D=>D.id!==""||le.length===1||D.harnesses.some(ne=>ne.available)||G(D).length>0),ge=q.find(D=>D.id===z)??q.find(D=>D.online)??q[0],U=D=>{$(D);try{window.localStorage.setItem(_f,D)}catch{}},H=E.ready?"Speech ready":E.downloading?`Downloading voice models…${typeof E.progress=="number"?` ${Math.round(E.progress)}%`:""}`:"Speech offline";return h.jsxs("main",{className:"hub-page",children:[h.jsxs("header",{className:"hub-header",children:[h.jsxs("h1",{className:"hub-title",children:[h.jsx("img",{className:"hub-logo",src:"/logo-192.png",alt:"",width:30,height:30}),q.length>1?"Meldivo":(u==null?void 0:u.machine)??"Meldivo"]}),h.jsx("p",{className:`hub-speech-status${E.ready?"":" hub-speech-status--warn"}`,role:"status",children:E.error||H}),h.jsx("button",{type:"button",className:"hub-remote-button",onClick:()=>{j(!1),I(!0)},children:"Speech"}),h.jsx("button",{type:"button",className:"hub-remote-button hub-remote-button--next",onClick:()=>{I(!1),j(!0)},children:"Phone access"})]}),s&&h.jsx("p",{className:"hub-error",role:"alert",children:s}),!u&&!s&&h.jsx("p",{className:"hub-empty",children:"Loading…"}),q.length>1&&h.jsx("nav",{className:"hub-machines",role:"tablist","aria-label":"Machines",children:q.map(D=>h.jsx(im,{host:D,sessions:G(D),selected:D===ge,onSelect:()=>U(D.id)},D.id||"local"))}),ge&&h.jsx(fm,{host:ge,sessions:G(ge)}),L&&h.jsx(nm,{onClose:()=>j(!1)}),Q&&h.jsx(bp,{onClose:()=>I(!1)})]})}Np();const Hf=new URLSearchParams(window.location.search),Cf=Hf.get("session");uh.createRoot(document.getElementById("root")).render(Cf?h.jsx(Xp,{sessionKey:Cf,folder:Hf.get("folder")??void 0}):h.jsx(dm,{}));