diff --git "a/dist/assets/index-L6yZN20c.js" "b/dist/assets/index-L6yZN20c.js" new file mode 100644--- /dev/null +++ "b/dist/assets/index-L6yZN20c.js" @@ -0,0 +1,85 @@ +var Ms=e=>{throw TypeError(e)};var Gi=(e,t,n)=>t.has(e)||Ms("Cannot "+n);var S=(e,t,n)=>(Gi(e,t,"read from private field"),n?n.call(e):t.get(e)),A=(e,t,n)=>t.has(e)?Ms("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),L=(e,t,n,r)=>(Gi(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(Gi(e,t,"access private method"),n);var fl=(e,t,n,r)=>({set _(l){L(e,t,l,n)},get _(){return S(e,t,r)}});function hp(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function mp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kc={exports:{}},Ei={},Cc={exports:{}},j={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var rl=Symbol.for("react.element"),yp=Symbol.for("react.portal"),vp=Symbol.for("react.fragment"),gp=Symbol.for("react.strict_mode"),wp=Symbol.for("react.profiler"),Sp=Symbol.for("react.provider"),Ep=Symbol.for("react.context"),kp=Symbol.for("react.forward_ref"),Cp=Symbol.for("react.suspense"),_p=Symbol.for("react.memo"),xp=Symbol.for("react.lazy"),zs=Symbol.iterator;function Pp(e){return e===null||typeof e!="object"?null:(e=zs&&e[zs]||e["@@iterator"],typeof e=="function"?e:null)}var _c={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xc=Object.assign,Pc={};function ar(e,t,n){this.props=e,this.context=t,this.refs=Pc,this.updater=n||_c}ar.prototype.isReactComponent={};ar.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ar.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rc(){}Rc.prototype=ar.prototype;function Tu(e,t,n){this.props=e,this.context=t,this.refs=Pc,this.updater=n||_c}var Mu=Tu.prototype=new Rc;Mu.constructor=Tu;xc(Mu,ar.prototype);Mu.isPureReactComponent=!0;var Ls=Array.isArray,Oc=Object.prototype.hasOwnProperty,zu={current:null},Nc={key:!0,ref:!0,__self:!0,__source:!0};function Tc(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Oc.call(t,r)&&!Nc.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,ee=R[B];if(0>>1;Bl(Ki,z))enl(cl,Ki)?(R[B]=cl,R[en]=z,B=en):(R[B]=Ki,R[bt]=z,B=bt);else if(enl(cl,z))R[B]=cl,R[en]=z,B=en;else break e}}return T}function l(R,T){var z=R.sortIndex-T.sortIndex;return z!==0?z:R.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],a=[],p=1,f=null,m=3,w=!1,y=!1,g=!1,E=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(R){for(var T=n(a);T!==null;){if(T.callback===null)r(a);else if(T.startTime<=R)r(a),T.sortIndex=T.expirationTime,t(s,T);else break;T=n(a)}}function v(R){if(g=!1,h(R),!y)if(n(s)!==null)y=!0,_n(k);else{var T=n(a);T!==null&&Pe(v,T.startTime-R)}}function k(R,T){y=!1,g&&(g=!1,d(_),_=-1),w=!0;var z=m;try{for(h(T),f=n(s);f!==null&&(!(f.expirationTime>T)||R&&!pe());){var B=f.callback;if(typeof B=="function"){f.callback=null,m=f.priorityLevel;var ee=B(f.expirationTime<=T);T=e.unstable_now(),typeof ee=="function"?f.callback=ee:f===n(s)&&r(s),h(T)}else r(s);f=n(s)}if(f!==null)var al=!0;else{var bt=n(a);bt!==null&&Pe(v,bt.startTime-T),al=!1}return al}finally{f=null,m=z,w=!1}}var x=!1,P=null,_=-1,M=5,D=-1;function pe(){return!(e.unstable_now()-DR||125B?(R.sortIndex=z,t(a,R),n(s)===null&&R===n(a)&&(g?(d(_),_=-1):g=!0,Pe(v,z-B))):(R.sortIndex=ee,t(s,R),y||w||(y=!0,_n(k))),R},e.unstable_shouldYield=pe,e.unstable_wrapCallback=function(R){var T=m;return function(){var z=m;m=T;try{return R.apply(this,arguments)}finally{m=z}}}})(Fc);Dc.exports=Fc;var Ap=Dc.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Up=O,Te=Ap;function C(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),No=Object.prototype.hasOwnProperty,$p=/^[: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]*$/,Fs={},js={};function Bp(e){return No.call(js,e)?!0:No.call(Fs,e)?!1:$p.test(e)?js[e]=!0:(Fs[e]=!0,!1)}function Qp(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 Hp(e,t,n,r){if(t===null||typeof t>"u"||Qp(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 we(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new we(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){oe[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var Du=/[\-:]([a-z])/g;function Fu(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(Du,Fu);oe[t]=new we(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(Du,Fu);oe[t]=new we(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(Du,Fu);oe[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function ju(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[t]:null;(l!==null?l.type!==0:r||!(2u||l[o]!==i[u]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Yi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sr(e):""}function Vp(e){switch(e.tag){case 5:return Sr(e.type);case 16:return Sr("Lazy");case 13:return Sr("Suspense");case 19:return Sr("SuspenseList");case 0:case 2:case 15:return e=Zi(e.type,!1),e;case 11:return e=Zi(e.type.render,!1),e;case 1:return e=Zi(e.type,!0),e;default:return""}}function Lo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rn:return"Fragment";case Pn:return"Portal";case To:return"Profiler";case Iu:return"StrictMode";case Mo:return"Suspense";case zo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ac:return(e.displayName||"Context")+".Consumer";case Ic:return(e._context.displayName||"Context")+".Provider";case Au:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Uu:return t=e.displayName||null,t!==null?t:Lo(e.type)||"Memo";case Pt:t=e._payload,e=e._init;try{return Lo(e(t))}catch{}}return null}function Wp(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 Lo(t);case 8:return t===Iu?"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 Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $c(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kp(e){var t=$c(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){e._valueTracker||(e._valueTracker=Kp(e))}function Bc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$c(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hl(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 Do(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function As(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(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 Qc(e,t){t=t.checked,t!=null&&ju(e,"checked",t,!1)}function Fo(e,t){Qc(e,t);var n=Kt(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")?jo(e,t.type,n):t.hasOwnProperty("defaultValue")&&jo(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Us(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 jo(e,t,n){(t!=="number"||Hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Er=Array.isArray;function Un(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=ml.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xr={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},Gp=["Webkit","ms","Moz","O"];Object.keys(xr).forEach(function(e){Gp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xr[t]=xr[e]})});function Kc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xr.hasOwnProperty(e)&&xr[e]?(""+t).trim():t+"px"}function Gc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Kc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var qp=G({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 Uo(e,t){if(t){if(qp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(C(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(C(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(C(61))}if(t.style!=null&&typeof t.style!="object")throw Error(C(62))}}function $o(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 Bo=null;function $u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qo=null,$n=null,Bn=null;function Qs(e){if(e=ol(e)){if(typeof Qo!="function")throw Error(C(280));var t=e.stateNode;t&&(t=Pi(t),Qo(e.stateNode,e.type,t))}}function qc(e){$n?Bn?Bn.push(e):Bn=[e]:$n=e}function Xc(){if($n){var e=$n,t=Bn;if(Bn=$n=null,Qs(e),t)for(e=0;e>>=0,e===0?32:31-(ih(e)/oh|0)|0}var yl=64,vl=4194304;function kr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=kr(u):(i&=o,i!==0&&(r=kr(i)))}else o=n&~l,o!==0?r=kr(o):i!==0&&(r=kr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ll(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ye(t),e[t]=n}function ch(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=Rr),Zs=" ",Js=!1;function yf(e,t){switch(e){case"keyup":return Ah.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var On=!1;function $h(e,t){switch(e){case"compositionend":return vf(t);case"keypress":return t.which!==32?null:(Js=!0,Zs);case"textInput":return e=t.data,e===Zs&&Js?null:e;default:return null}}function Bh(e,t){if(On)return e==="compositionend"||!qu&&yf(e,t)?(e=hf(),Dl=Wu=Ft=null,On=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=na(n)}}function Ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kf(){for(var e=window,t=Hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hl(e.document)}return t}function Xu(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 Yh(e){var t=kf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ef(n.ownerDocument.documentElement,n)){if(r!==null&&Xu(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 l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=ra(n,i);var o=ra(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.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=document.documentMode,Nn=null,qo=null,Nr=null,Xo=!1;function la(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xo||Nn==null||Nn!==Hl(r)||(r=Nn,"selectionStart"in r&&Xu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Br(Nr,r)||(Nr=r,r=Yl(qo,"onSelect"),0zn||(e.current=tu[zn],tu[zn]=null,zn--)}function $(e,t){zn++,tu[zn]=e.current,e.current=t}var Gt={},de=Yt(Gt),ke=Yt(!1),mn=Gt;function nr(e,t){var n=e.type.contextTypes;if(!n)return Gt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ce(e){return e=e.childContextTypes,e!=null}function Jl(){H(ke),H(de)}function fa(e,t,n){if(de.current!==Gt)throw Error(C(168));$(de,t),$(ke,n)}function Mf(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(C(108,Wp(e)||"Unknown",l));return G({},n,r)}function bl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gt,mn=de.current,$(de,e),$(ke,ke.current),!0}function da(e,t,n){var r=e.stateNode;if(!r)throw Error(C(169));n?(e=Mf(e,t,mn),r.__reactInternalMemoizedMergedChildContext=e,H(ke),H(de),$(de,e)):H(ke),$(ke,n)}var ft=null,Ri=!1,fo=!1;function zf(e){ft===null?ft=[e]:ft.push(e)}function sm(e){Ri=!0,zf(e)}function Zt(){if(!fo&&ft!==null){fo=!0;var e=0,t=U;try{var n=ft;for(U=1;e>=o,l-=o,pt=1<<32-Ye(t)+l|n<_?(M=P,P=null):M=P.sibling;var D=m(d,P,h[_],v);if(D===null){P===null&&(P=M);break}e&&P&&D.alternate===null&&t(d,P),c=i(D,c,_),x===null?k=D:x.sibling=D,x=D,P=M}if(_===h.length)return n(d,P),V&&tn(d,_),k;if(P===null){for(;__?(M=P,P=null):M=P.sibling;var pe=m(d,P,D.value,v);if(pe===null){P===null&&(P=M);break}e&&P&&pe.alternate===null&&t(d,P),c=i(pe,c,_),x===null?k=pe:x.sibling=pe,x=pe,P=M}if(D.done)return n(d,P),V&&tn(d,_),k;if(P===null){for(;!D.done;_++,D=h.next())D=f(d,D.value,v),D!==null&&(c=i(D,c,_),x===null?k=D:x.sibling=D,x=D);return V&&tn(d,_),k}for(P=r(d,P);!D.done;_++,D=h.next())D=w(P,d,_,D.value,v),D!==null&&(e&&D.alternate!==null&&P.delete(D.key===null?_:D.key),c=i(D,c,_),x===null?k=D:x.sibling=D,x=D);return e&&P.forEach(function(be){return t(d,be)}),V&&tn(d,_),k}function E(d,c,h,v){if(typeof h=="object"&&h!==null&&h.type===Rn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case pl:e:{for(var k=h.key,x=c;x!==null;){if(x.key===k){if(k=h.type,k===Rn){if(x.tag===7){n(d,x.sibling),c=l(x,h.props.children),c.return=d,d=c;break e}}else if(x.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Pt&&ma(k)===x.type){n(d,x.sibling),c=l(x,h.props),c.ref=vr(d,x,h),c.return=d,d=c;break e}n(d,x);break}else t(d,x);x=x.sibling}h.type===Rn?(c=hn(h.props.children,d.mode,v,h.key),c.return=d,d=c):(v=Ql(h.type,h.key,h.props,null,d.mode,v),v.ref=vr(d,c,h),v.return=d,d=v)}return o(d);case Pn:e:{for(x=h.key;c!==null;){if(c.key===x)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(d,c.sibling),c=l(c,h.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=So(h,d.mode,v),c.return=d,d=c}return o(d);case Pt:return x=h._init,E(d,c,x(h._payload),v)}if(Er(h))return y(d,c,h,v);if(dr(h))return g(d,c,h,v);_l(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(d,c.sibling),c=l(c,h),c.return=d,d=c):(n(d,c),c=wo(h,d.mode,v),c.return=d,d=c),o(d)):n(d,c)}return E}var lr=jf(!0),If=jf(!1),ni=Yt(null),ri=null,Fn=null,bu=null;function es(){bu=Fn=ri=null}function ts(e){var t=ni.current;H(ni),e._currentValue=t}function lu(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 Hn(e,t){ri=e,bu=Fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ee=!0),e.firstContext=null)}function $e(e){var t=e._currentValue;if(bu!==e)if(e={context:e,memoizedValue:t,next:null},Fn===null){if(ri===null)throw Error(C(308));Fn=e,ri.dependencies={lanes:0,firstContext:e}}else Fn=Fn.next=e;return t}var on=null;function ns(e){on===null?on=[e]:on.push(e)}function Af(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,ns(t)):(n.next=l.next,l.next=n),t.interleaved=n,wt(e,r)}function wt(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 Rt=!1;function rs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Uf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,I&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,wt(e,n)}return l=r.interleaved,l===null?(t.next=t,ns(r)):(t.next=l.next,l.next=t),r.interleaved=t,wt(e,n)}function jl(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,Qu(e,n)}}function ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,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 li(e,t,n,r){var l=e.updateQueue;Rt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,a=s.next;s.next=null,o===null?i=a:o.next=a,o=s;var p=e.alternate;p!==null&&(p=p.updateQueue,u=p.lastBaseUpdate,u!==o&&(u===null?p.firstBaseUpdate=a:u.next=a,p.lastBaseUpdate=s))}if(i!==null){var f=l.baseState;o=0,p=a=s=null,u=i;do{var m=u.lane,w=u.eventTime;if((r&m)===m){p!==null&&(p=p.next={eventTime:w,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var y=e,g=u;switch(m=t,w=n,g.tag){case 1:if(y=g.payload,typeof y=="function"){f=y.call(w,f,m);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,m=typeof y=="function"?y.call(w,f,m):y,m==null)break e;f=G({},f,m);break e;case 2:Rt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[u]:m.push(u))}else w={eventTime:w,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},p===null?(a=p=w,s=f):p=p.next=w,o|=m;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;m=u,u=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(p===null&&(s=f),l.baseState=s,l.firstBaseUpdate=a,l.lastBaseUpdate=p,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);gn|=o,e.lanes=o,e.memoizedState=f}}function va(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ho.transition;ho.transition={};try{e(!1),t()}finally{U=n,ho.transition=r}}function nd(){return Be().memoizedState}function dm(e,t,n){var r=Vt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rd(e))ld(t,n);else if(n=Af(e,t,n,r),n!==null){var l=ve();Ze(n,e,r,l),id(n,t,r)}}function pm(e,t,n){var r=Vt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rd(e))ld(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,Je(u,o)){var s=t.interleaved;s===null?(l.next=l,ns(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Af(e,t,l,r),n!==null&&(l=ve(),Ze(n,e,r,l),id(n,t,r))}}function rd(e){var t=e.alternate;return e===K||t!==null&&t===K}function ld(e,t){Tr=oi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function id(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Qu(e,n)}}var ui={readContext:$e,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useInsertionEffect:se,useLayoutEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useMutableSource:se,useSyncExternalStore:se,useId:se,unstable_isNewReconciler:!1},hm={readContext:$e,useCallback:function(e,t){return tt().memoizedState=[e,t===void 0?null:t],e},useContext:$e,useEffect:wa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Al(4194308,4,Zf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Al(4194308,4,e,t)},useInsertionEffect:function(e,t){return Al(4,2,e,t)},useMemo:function(e,t){var n=tt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=tt();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=dm.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=tt();return e={current:e},t.memoizedState=e},useState:ga,useDebugValue:fs,useDeferredValue:function(e){return tt().memoizedState=e},useTransition:function(){var e=ga(!1),t=e[0];return e=fm.bind(null,e[1]),tt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=tt();if(V){if(n===void 0)throw Error(C(407));n=n()}else{if(n=t(),ne===null)throw Error(C(349));vn&30||Hf(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,wa(Wf.bind(null,r,i,e),[e]),r.flags|=2048,Xr(9,Vf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=tt(),t=ne.identifierPrefix;if(V){var n=ht,r=pt;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Gr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[it]=t,e[Vr]=r,md(e,t,!1,!1),t.stateNode=e;e:{switch(o=$o(n,r),n){case"dialog":Q("cancel",e),Q("close",e),l=r;break;case"iframe":case"object":case"embed":Q("load",e),l=r;break;case"video":case"audio":for(l=0;lur&&(t.flags|=128,r=!0,gr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ii(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!V)return ae(t),null}else 2*Y()-i.renderingStartTime>ur&&n!==1073741824&&(t.flags|=128,r=!0,gr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Y(),t.sibling=null,n=W.current,$(W,r?n&1|2:n&1),t):(ae(t),null);case 22:case 23:return vs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Re&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(t),null;case 24:return null;case 25:return null}throw Error(C(156,t.tag))}function km(e,t){switch(Zu(t),t.tag){case 1:return Ce(t.type)&&Jl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ir(),H(ke),H(de),os(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return is(t),null;case 13:if(H(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(C(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(W),null;case 4:return ir(),null;case 10:return ts(t.type._context),null;case 22:case 23:return vs(),null;case 24:return null;default:return null}}var Pl=!1,fe=!1,Cm=typeof WeakSet=="function"?WeakSet:Set,N=null;function jn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function pu(e,t,n){try{n()}catch(r){X(e,t,r)}}var Ta=!1;function _m(e,t){if(Yo=ql,e=kf(),Xu(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 l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,a=0,p=0,f=e,m=null;t:for(;;){for(var w;f!==n||l!==0&&f.nodeType!==3||(u=o+l),f!==i||r!==0&&f.nodeType!==3||(s=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(w=f.firstChild)!==null;)m=f,f=w;for(;;){if(f===e)break t;if(m===n&&++a===l&&(u=o),m===i&&++p===r&&(s=o),(w=f.nextSibling)!==null)break;f=m,m=f.parentNode}f=w}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zo={focusedElem:e,selectionRange:n},ql=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,E=y.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?g:He(t.type,g),E);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(v){X(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return y=Ta,Ta=!1,y}function Mr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&pu(t,n,i)}l=l.next}while(l!==r)}}function Ti(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 hu(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 gd(e){var t=e.alternate;t!==null&&(e.alternate=null,gd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[it],delete t[Vr],delete t[eu],delete t[om],delete t[um])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wd(e){return e.tag===5||e.tag===3||e.tag===4}function Ma(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mu(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=Zl));else if(r!==4&&(e=e.child,e!==null))for(mu(e,t,n),e=e.sibling;e!==null;)mu(e,t,n),e=e.sibling}function yu(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(yu(e,t,n),e=e.sibling;e!==null;)yu(e,t,n),e=e.sibling}var le=null,Ge=!1;function _t(e,t,n){for(n=n.child;n!==null;)Sd(e,t,n),n=n.sibling}function Sd(e,t,n){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(ki,n)}catch{}switch(n.tag){case 5:fe||jn(n,t);case 6:var r=le,l=Ge;le=null,_t(e,t,n),le=r,Ge=l,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?co(e.parentNode,n):e.nodeType===1&&co(e,n),Ur(e)):co(le,n.stateNode));break;case 4:r=le,l=Ge,le=n.stateNode.containerInfo,Ge=!0,_t(e,t,n),le=r,Ge=l;break;case 0:case 11:case 14:case 15:if(!fe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&pu(n,t,o),l=l.next}while(l!==r)}_t(e,t,n);break;case 1:if(!fe&&(jn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){X(n,t,u)}_t(e,t,n);break;case 21:_t(e,t,n);break;case 22:n.mode&1?(fe=(r=fe)||n.memoizedState!==null,_t(e,t,n),fe=r):_t(e,t,n);break;default:_t(e,t,n)}}function za(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cm),t.forEach(function(r){var l=Lm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Qe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=Y()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Pm(r/1960))-r,10e?16:e,jt===null)var r=!1;else{if(e=jt,jt=null,ci=0,I&6)throw Error(C(331));var l=I;for(I|=4,N=e.current;N!==null;){var i=N,o=i.child;if(N.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sY()-ms?pn(e,0):hs|=n),_e(e,t)}function Od(e,t){t===0&&(e.mode&1?(t=vl,vl<<=1,!(vl&130023424)&&(vl=4194304)):t=1);var n=ve();e=wt(e,t),e!==null&&(ll(e,t,n),_e(e,n))}function zm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Od(e,n)}function Lm(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(C(314))}r!==null&&r.delete(t),Od(e,n)}var Nd;Nd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ke.current)Ee=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ee=!1,Sm(e,t,n);Ee=!!(e.flags&131072)}else Ee=!1,V&&t.flags&1048576&&Lf(t,ti,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ul(e,t),e=t.pendingProps;var l=nr(t,de.current);Hn(t,n),l=ss(null,t,r,e,l,n);var i=as();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ce(r)?(i=!0,bl(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,rs(t),l.updater=Ni,t.stateNode=l,l._reactInternals=t,ou(t,r,e,n),t=au(null,t,r,!0,i,n)):(t.tag=0,V&&i&&Yu(t),me(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ul(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Fm(r),e=He(r,e),l){case 0:t=su(null,t,r,e,n);break e;case 1:t=Ra(null,t,r,e,n);break e;case 11:t=xa(null,t,r,e,n);break e;case 14:t=Pa(null,t,r,He(r.type,e),n);break e}throw Error(C(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:He(r,l),su(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:He(r,l),Ra(e,t,r,l,n);case 3:e:{if(dd(t),e===null)throw Error(C(387));r=t.pendingProps,i=t.memoizedState,l=i.element,Uf(e,t),li(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=or(Error(C(423)),t),t=Oa(e,t,r,n,l);break e}else if(r!==l){l=or(Error(C(424)),t),t=Oa(e,t,r,n,l);break e}else for(Oe=Bt(t.stateNode.containerInfo.firstChild),Ne=t,V=!0,qe=null,n=If(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rr(),r===l){t=St(e,t,n);break e}me(e,t,r,n)}t=t.child}return t;case 5:return $f(t),e===null&&ru(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Jo(r,l)?o=null:i!==null&&Jo(r,i)&&(t.flags|=32),fd(e,t),me(e,t,o,n),t.child;case 6:return e===null&&ru(t),null;case 13:return pd(e,t,n);case 4:return ls(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=lr(t,null,r,n):me(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:He(r,l),xa(e,t,r,l,n);case 7:return me(e,t,t.pendingProps,n),t.child;case 8:return me(e,t,t.pendingProps.children,n),t.child;case 12:return me(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,$(ni,r._currentValue),r._currentValue=o,i!==null)if(Je(i.value,o)){if(i.children===l.children&&!ke.current){t=St(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=mt(-1,n&-n),s.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var p=a.pending;p===null?s.next=s:(s.next=p.next,p.next=s),a.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),lu(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(C(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),lu(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}me(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Hn(t,n),l=$e(l),r=r(l),t.flags|=1,me(e,t,r,n),t.child;case 14:return r=t.type,l=He(r,t.pendingProps),l=He(r.type,l),Pa(e,t,r,l,n);case 15:return ad(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:He(r,l),Ul(e,t),t.tag=1,Ce(r)?(e=!0,bl(t)):e=!1,Hn(t,n),od(t,r,l),ou(t,r,l,n),au(null,t,r,!0,e,n);case 19:return hd(e,t,n);case 22:return cd(e,t,n)}throw Error(C(156,t.tag))};function Td(e,t){return nf(e,t)}function Dm(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 Ae(e,t,n,r){return new Dm(e,t,n,r)}function ws(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fm(e){if(typeof e=="function")return ws(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Au)return 11;if(e===Uu)return 14}return 2}function Wt(e,t){var n=e.alternate;return n===null?(n=Ae(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 Ql(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")ws(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Rn:return hn(n.children,l,i,t);case Iu:o=8,l|=8;break;case To:return e=Ae(12,n,t,l|2),e.elementType=To,e.lanes=i,e;case Mo:return e=Ae(13,n,t,l),e.elementType=Mo,e.lanes=i,e;case zo:return e=Ae(19,n,t,l),e.elementType=zo,e.lanes=i,e;case Uc:return zi(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ic:o=10;break e;case Ac:o=9;break e;case Au:o=11;break e;case Uu:o=14;break e;case Pt:o=16,r=null;break e}throw Error(C(130,e==null?e:typeof e,""))}return t=Ae(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function hn(e,t,n,r){return e=Ae(7,e,r,t),e.lanes=n,e}function zi(e,t,n,r){return e=Ae(22,e,r,t),e.elementType=Uc,e.lanes=n,e.stateNode={isHidden:!1},e}function wo(e,t,n){return e=Ae(6,e,null,t),e.lanes=n,e}function So(e,t,n){return t=Ae(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jm(e,t,n,r,l){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=bi(0),this.expirationTimes=bi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bi(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ss(e,t,n,r,l,i,o,u,s){return e=new jm(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ae(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rs(i),e}function Im(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Dd)}catch(e){console.error(e)}}Dd(),Lc.exports=Le;var Qm=Lc.exports,$a=Qm;Oo.createRoot=$a.createRoot,Oo.hydrateRoot=$a.hydrateRoot;/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function pi(){return pi=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Fd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Vm(){return Math.random().toString(36).substr(2,8)}function Qa(e,t){return{usr:e.state,key:e.key,idx:t}}function Eu(e,t,n,r){return n===void 0&&(n=null),pi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ii(t):t,{state:n,key:t&&t.key||r||Vm()})}function jd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ii(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Wm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,u=It.Pop,s=null,a=p();a==null&&(a=0,o.replaceState(pi({},o.state,{idx:a}),""));function p(){return(o.state||{idx:null}).idx}function f(){u=It.Pop;let E=p(),d=E==null?null:E-a;a=E,s&&s({action:u,location:g.location,delta:d})}function m(E,d){u=It.Push;let c=Eu(g.location,E,d);a=p()+1;let h=Qa(c,a),v=g.createHref(c);try{o.pushState(h,"",v)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;l.location.assign(v)}i&&s&&s({action:u,location:g.location,delta:1})}function w(E,d){u=It.Replace;let c=Eu(g.location,E,d);a=p();let h=Qa(c,a),v=g.createHref(c);o.replaceState(h,"",v),i&&s&&s({action:u,location:g.location,delta:0})}function y(E){let d=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof E=="string"?E:jd(E);return c=c.replace(/ $/,"%20"),xe(d,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,d)}let g={get action(){return u},get location(){return e(l,o)},listen(E){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(Ba,f),s=E,()=>{l.removeEventListener(Ba,f),s=null}},createHref(E){return t(l,E)},createURL:y,encodeLocation(E){let d=y(E);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:m,replace:w,go(E){return o.go(E)}};return g}var Ha;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ha||(Ha={}));function Km(e,t,n){return n===void 0&&(n="/"),Gm(e,t,n)}function Gm(e,t,n,r){let l=typeof t=="string"?Ii(t):t,i=Ud(l.pathname||"/",n);if(i==null)return null;let o=Id(e);qm(o);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(xe(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let a=Wn([r,s.relativePath]),p=n.concat(s);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),Id(i.children,t,p,a)),!(i.path==null&&!i.index)&&t.push({path:a,score:ty(a,i.index),routesMeta:p})};return e.forEach((i,o)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,o);else for(let s of Ad(i.path))l(i,o,s)}),t}function Ad(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=Ad(r.join("/")),u=[];return u.push(...o.map(s=>s===""?i:[i,s].join("/"))),l&&u.push(...o),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function qm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ny(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Xm=/^:[\w-]+$/,Ym=3,Zm=2,Jm=1,bm=10,ey=-2,Va=e=>e==="*";function ty(e,t){let n=e.split("/"),r=n.length;return n.some(Va)&&(r+=ey),t&&(r+=Zm),n.filter(l=>!Va(l)).reduce((l,i)=>l+(Xm.test(i)?Ym:i===""?Jm:bm),r)}function ny(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function ry(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let u=0;u{let{paramName:m,isOptional:w}=p;if(m==="*"){let g=u[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=u[f];return w&&!y?a[m]=void 0:a[m]=(y||"").replace(/%2F/g,"/"),a},{}),pathname:i,pathnameBase:o,pattern:e}}function iy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Fd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function oy(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Fd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Ud(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Wn=e=>e.join("/").replace(/\/\/+/g,"/"),uy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/");function sy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $d=["post","put","patch","delete"];new Set($d);const ay=["get",...$d];new Set(ay);/** + * React Router v6.30.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},d,{params:Object.assign({},s,d.params),pathname:Wn([a,l.encodeLocation?l.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?a:Wn([a,l.encodeLocation?l.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),o,n,r);return t&&E?O.createElement(Ai.Provider,{value:{location:hi({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:It.Pop}},E):E}function my(){let e=Cy(),t=sy(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:l},n):null,null)}const yy=O.createElement(my,null);class vy extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?O.createElement(Ui.Provider,{value:this.props.routeContext},O.createElement(Qd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gy(e){let{routeContext:t,match:n,children:r}=e,l=O.useContext(cy);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),O.createElement(Ui.Provider,{value:t},r)}function wy(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let p=o.findIndex(f=>f.route.id&&(u==null?void 0:u[f.route.id])!==void 0);p>=0||xe(!1),o=o.slice(0,Math.min(o.length,p+1))}let s=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((p,f,m)=>{let w,y=!1,g=null,E=null;n&&(w=u&&f.route.id?u[f.route.id]:void 0,g=f.route.errorElement||yy,s&&(a<0&&m===0?(_y("route-fallback"),y=!0,E=null):a===m&&(y=!0,E=f.route.hydrateFallbackElement||null)));let d=t.concat(o.slice(0,m+1)),c=()=>{let h;return w?h=g:y?h=E:f.route.Component?h=O.createElement(f.route.Component,null):f.route.element?h=f.route.element:h=p,O.createElement(gy,{match:f,routeContext:{outlet:p,matches:d,isDataRoute:n!=null},children:h})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?O.createElement(vy,{location:n.location,revalidation:n.revalidation,component:g,error:w,children:c(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):c()},null)}var Hd=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hd||{});function Sy(e){let t=O.useContext(fy);return t||xe(!1),t}function Ey(e){let t=O.useContext(Ui);return t||xe(!1),t}function ky(e){let t=Ey(),n=t.matches[t.matches.length-1];return n.route.id||xe(!1),n.route.id}function Cy(){var e;let t=O.useContext(Qd),n=Sy(Hd.UseRouteError),r=ky();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const Wa={};function _y(e,t,n){Wa[e]||(Wa[e]=!0)}function xy(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Vd(e){xe(!1)}function Py(e){let{basename:t="/",children:n=null,location:r,navigationType:l=It.Pop,navigator:i,static:o=!1,future:u}=e;_s()&&xe(!1);let s=t.replace(/^\/*/,"/"),a=O.useMemo(()=>({basename:s,navigator:i,static:o,future:hi({v7_relativeSplatPath:!1},u)}),[s,u,i,o]);typeof r=="string"&&(r=Ii(r));let{pathname:p="/",search:f="",hash:m="",state:w=null,key:y="default"}=r,g=O.useMemo(()=>{let E=Ud(p,s);return E==null?null:{location:{pathname:E,search:f,hash:m,state:w,key:y},navigationType:l}},[s,p,f,m,w,y,l]);return g==null?null:O.createElement(Bd.Provider,{value:a},O.createElement(Ai.Provider,{children:n,value:g}))}function Ry(e){let{children:t,location:n}=e;return py(ku(t),n)}new Promise(()=>{});function ku(e,t){t===void 0&&(t=[]);let n=[];return O.Children.forEach(e,(r,l)=>{if(!O.isValidElement(r))return;let i=[...t,l];if(r.type===O.Fragment){n.push.apply(n,ku(r.props.children,i));return}r.type!==Vd&&xe(!1),!r.props.index||!r.props.children||xe(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=ku(r.props.children,i)),n.push(o)}),n}/** + * React Router DOM v6.30.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */const Oy="6";try{window.__reactRouterVersion=Oy}catch{}const Ny="startTransition",Ka=Mp[Ny];function Ty(e){let{basename:t,children:n,future:r,window:l}=e,i=O.useRef();i.current==null&&(i.current=Hm({window:l,v5Compat:!0}));let o=i.current,[u,s]=O.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},p=O.useCallback(f=>{a&&Ka?Ka(()=>s(f)):s(f)},[s,a]);return O.useLayoutEffect(()=>o.listen(p),[o,p]),O.useEffect(()=>xy(r),[r]),O.createElement(Py,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}var Ga;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ga||(Ga={}));var qa;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qa||(qa={}));var Wd={exports:{}},Kd={};/** + * @license React + * use-sync-external-store-with-selector.production.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var sl=O;function My(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zy=typeof Object.is=="function"?Object.is:My,Ly=sl.useSyncExternalStore,Dy=sl.useRef,Fy=sl.useEffect,jy=sl.useMemo,Iy=sl.useDebugValue;Kd.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=Dy(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=jy(function(){function s(w){if(!a){if(a=!0,p=w,w=r(w),l!==void 0&&o.hasValue){var y=o.value;if(l(y,w))return f=y}return f=w}if(y=f,zy(p,w))return y;var g=r(w);return l!==void 0&&l(y,g)?(p=w,y):(p=w,f=g)}var a=!1,p,f,m=n===void 0?null:n;return[function(){return s(t())},m===null?void 0:function(){return s(m())}]},[t,n,r,l]);var u=Ly(e,i[0],i[1]);return Fy(function(){o.hasValue=!0,o.value=u},[u]),Iy(u),u};Wd.exports=Kd;var Ay=Wd.exports;function Uy(e){e()}function $y(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Uy(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const l=t={callback:n,next:null,prev:t};return l.prev?l.prev.next=l:e=l,function(){!r||e===null||(r=!1,l.next?l.next.prev=l.prev:t=l.prev,l.prev?l.prev.next=l.next:e=l.next)}}}}var Xa={notify(){},get:()=>[]};function By(e,t){let n,r=Xa,l=0,i=!1;function o(g){p();const E=r.subscribe(g);let d=!1;return()=>{d||(d=!0,E(),f())}}function u(){r.notify()}function s(){y.onStateChange&&y.onStateChange()}function a(){return i}function p(){l++,n||(n=e.subscribe(s),r=$y())}function f(){l--,n&&l===0&&(n(),n=void 0,r.clear(),r=Xa)}function m(){i||(i=!0,p())}function w(){i&&(i=!1,f())}const y={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:a,trySubscribe:m,tryUnsubscribe:w,getListeners:()=>r};return y}var Qy=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Hy=Qy(),Vy=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Wy=Vy(),Ky=()=>Hy||Wy?O.useLayoutEffect:O.useEffect,Gy=Ky(),Eo=Symbol.for("react-redux-context"),ko=typeof globalThis<"u"?globalThis:{};function qy(){if(!O.createContext)return{};const e=ko[Eo]??(ko[Eo]=new Map);let t=e.get(O.createContext);return t||(t=O.createContext(null),e.set(O.createContext,t)),t}var qt=qy();function Xy(e){const{children:t,context:n,serverState:r,store:l}=e,i=O.useMemo(()=>{const s=By(l);return{store:l,subscription:s,getServerState:r?()=>r:void 0}},[l,r]),o=O.useMemo(()=>l.getState(),[l]);Gy(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==l.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]);const u=n||qt;return O.createElement(u.Provider,{value:i},t)}var Yy=Xy;function xs(e=qt){return function(){return O.useContext(e)}}var Gd=xs();function qd(e=qt){const t=e===qt?Gd:xs(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Zy=qd();function Jy(e=qt){const t=e===qt?Zy:qd(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var by=Jy(),ev=(e,t)=>e===t;function tv(e=qt){const t=e===qt?Gd:xs(e),n=(r,l={})=>{const{equalityFn:i=ev}=typeof l=="function"?{equalityFn:l}:l,o=t(),{store:u,subscription:s,getServerState:a}=o;O.useRef(!0);const p=O.useCallback({[r.name](m){return r(m)}}[r.name],[r]),f=Ay.useSyncExternalStoreWithSelector(s.addNestedSub,u.getState,a||u.getState,p,i);return O.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var nv=tv();const rv=({content:e})=>{const[t,n]=O.useState(!1),r=e.split(` +`).map((l,i)=>F.jsxs(An.Fragment,{children:[l,in(!t),children:t?"Скрыть результаты поиска":"Показать результаты поиска"}),t&&F.jsx("div",{className:"spoiler-content",children:r})]})},Ya=({role:e,content:t,isLoading:n})=>{const r=l=>{const i=[];let o=0;const u=/(.*?)<\/search-results>/gs;let s;for(;(s=u.exec(l))!==null;){const p=l.slice(o,s.index);if(p){const m=p.split(` +`).map((w,y)=>F.jsxs(An.Fragment,{children:[w,yF.jsxs(An.Fragment,{children:[f,m0?i:l.split(` +`).map((p,f)=>F.jsxs(An.Fragment,{children:[p,f{const r=l=>{l.key==="Enter"&&l.ctrlKey&&(l.preventDefault(),t.trim()&&e(t))};return F.jsx("div",{className:"input-wrapper",children:F.jsx("textarea",{value:t,onChange:l=>n(l.target.value),onKeyDown:r,placeholder:"Введите сообщение... (Ctrl+Enter для отправки)"})})};function re(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var iv=typeof Symbol=="function"&&Symbol.observable||"@@observable",Za=iv,Co=()=>Math.random().toString(36).substring(7).split("").join("."),ov={INIT:`@@redux/INIT${Co()}`,REPLACE:`@@redux/REPLACE${Co()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Co()}`},mi=ov;function Ps(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Xd(e,t,n){if(typeof e!="function")throw new Error(re(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(re(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(re(1));return n(Xd)(e,t)}let r=e,l=t,i=new Map,o=i,u=0,s=!1;function a(){o===i&&(o=new Map,i.forEach((E,d)=>{o.set(d,E)}))}function p(){if(s)throw new Error(re(3));return l}function f(E){if(typeof E!="function")throw new Error(re(4));if(s)throw new Error(re(5));let d=!0;a();const c=u++;return o.set(c,E),function(){if(d){if(s)throw new Error(re(6));d=!1,a(),o.delete(c),i=null}}}function m(E){if(!Ps(E))throw new Error(re(7));if(typeof E.type>"u")throw new Error(re(8));if(typeof E.type!="string")throw new Error(re(17));if(s)throw new Error(re(9));try{s=!0,l=r(l,E)}finally{s=!1}return(i=o).forEach(c=>{c()}),E}function w(E){if(typeof E!="function")throw new Error(re(10));r=E,m({type:mi.REPLACE})}function y(){const E=f;return{subscribe(d){if(typeof d!="object"||d===null)throw new Error(re(11));function c(){const v=d;v.next&&v.next(p())}return c(),{unsubscribe:E(c)}},[Za](){return this}}}return m({type:mi.INIT}),{dispatch:m,subscribe:f,getState:p,replaceReducer:w,[Za]:y}}function uv(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:mi.INIT})>"u")throw new Error(re(12));if(typeof n(void 0,{type:mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(re(13))})}function sv(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw u&&u.type,new Error(re(14));a[f]=y,s=s||y!==w}return s=s||r.length!==Object.keys(o).length,s?a:o}}function yi(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function av(...e){return t=>(n,r)=>{const l=t(n,r);let i=()=>{throw new Error(re(15))};const o={getState:l.getState,dispatch:(s,...a)=>i(s,...a)},u=e.map(s=>s(o));return i=yi(...u)(l.dispatch),{...l,dispatch:i}}}function cv(e){return Ps(e)&&"type"in e&&typeof e.type=="string"}var Yd=Symbol.for("immer-nothing"),Ja=Symbol.for("immer-draftable"),Me=Symbol.for("immer-state");function Xe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var sr=Object.getPrototypeOf;function Sn(e){return!!e&&!!e[Me]}function Et(e){var t;return e?Zd(e)||Array.isArray(e)||!!e[Ja]||!!((t=e.constructor)!=null&&t[Ja])||Bi(e)||Qi(e):!1}var fv=Object.prototype.constructor.toString();function Zd(e){if(!e||typeof e!="object")return!1;const t=sr(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===fv}function vi(e,t){$i(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function $i(e){const t=e[Me];return t?t.type_:Array.isArray(e)?1:Bi(e)?2:Qi(e)?3:0}function Cu(e,t){return $i(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jd(e,t,n){const r=$i(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function dv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Bi(e){return e instanceof Map}function Qi(e){return e instanceof Set}function rn(e){return e.copy_||e.base_}function _u(e,t){if(Bi(e))return new Map(e);if(Qi(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Zd(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Me];let l=Reflect.ownKeys(r);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=pv),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Rs(r,!0))),e}function pv(){Xe(2)}function Hi(e){return Object.isFrozen(e)}var hv={};function En(e){const t=hv[e];return t||Xe(0,e),t}var Zr;function bd(){return Zr}function mv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ba(e,t){t&&(En("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function xu(e){Pu(e),e.drafts_.forEach(yv),e.drafts_=null}function Pu(e){e===Zr&&(Zr=e.parent_)}function ec(e){return Zr=mv(Zr,e)}function yv(e){const t=e[Me];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tc(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Me].modified_&&(xu(t),Xe(4)),Et(e)&&(e=gi(t,e),t.parent_||wi(t,e)),t.patches_&&En("Patches").generateReplacementPatches_(n[Me].base_,e,t.patches_,t.inversePatches_)):e=gi(t,n,[]),xu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Yd?e:void 0}function gi(e,t,n){if(Hi(t))return t;const r=t[Me];if(!r)return vi(t,(l,i)=>nc(e,r,t,l,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return wi(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const l=r.copy_;let i=l,o=!1;r.type_===3&&(i=new Set(l),l.clear(),o=!0),vi(i,(u,s)=>nc(e,r,l,u,s,n,o)),wi(e,l,!1),n&&e.patches_&&En("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nc(e,t,n,r,l,i,o){if(Sn(l)){const u=i&&t&&t.type_!==3&&!Cu(t.assigned_,r)?i.concat(r):void 0,s=gi(e,l,u);if(Jd(n,r,s),Sn(s))e.canAutoFreeze_=!1;else return}else o&&n.add(l);if(Et(l)&&!Hi(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;gi(e,l),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&wi(e,l)}}function wi(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rs(t,n)}function vv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bd(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let l=r,i=Os;n&&(l=[r],i=Jr);const{revoke:o,proxy:u}=Proxy.revocable(l,i);return r.draft_=u,r.revoke_=o,u}var Os={get(e,t){if(t===Me)return e;const n=rn(e);if(!Cu(n,t))return gv(e,n,t);const r=n[t];return e.finalized_||!Et(r)?r:r===_o(e.base_,t)?(xo(e),e.copy_[t]=Ou(r,e)):r},has(e,t){return t in rn(e)},ownKeys(e){return Reflect.ownKeys(rn(e))},set(e,t,n){const r=ep(rn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const l=_o(rn(e),t),i=l==null?void 0:l[Me];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(dv(n,l)&&(n!==void 0||Cu(e.base_,t)))return!0;xo(e),Ru(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _o(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xo(e),Ru(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=rn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Xe(11)},getPrototypeOf(e){return sr(e.base_)},setPrototypeOf(){Xe(12)}},Jr={};vi(Os,(e,t)=>{Jr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Jr.deleteProperty=function(e,t){return Jr.set.call(this,e,t,void 0)};Jr.set=function(e,t,n){return Os.set.call(this,e[0],t,n,e[0])};function _o(e,t){const n=e[Me];return(n?rn(n):e)[t]}function gv(e,t,n){var l;const r=ep(t,n);return r?"value"in r?r.value:(l=r.get)==null?void 0:l.call(e.draft_):void 0}function ep(e,t){if(!(t in e))return;let n=sr(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=sr(n)}}function Ru(e){e.modified_||(e.modified_=!0,e.parent_&&Ru(e.parent_))}function xo(e){e.copy_||(e.copy_=_u(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var wv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(s=i,...a){return o.produce(s,p=>n.call(this,p,...a))}}typeof n!="function"&&Xe(6),r!==void 0&&typeof r!="function"&&Xe(7);let l;if(Et(t)){const i=ec(this),o=Ou(t,void 0);let u=!0;try{l=n(o),u=!1}finally{u?xu(i):Pu(i)}return ba(i,r),tc(l,i)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===Yd&&(l=void 0),this.autoFreeze_&&Rs(l,!0),r){const i=[],o=[];En("Patches").generateReplacementPatches_(t,l,i,o),r(i,o)}return l}else Xe(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...u)=>this.produceWithPatches(o,s=>t(s,...u));let r,l;return[this.produce(t,n,(o,u)=>{r=o,l=u}),r,l]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Et(e)||Xe(8),Sn(e)&&(e=Sv(e));const t=ec(this),n=Ou(e,void 0);return n[Me].isManual_=!0,Pu(t),n}finishDraft(e,t){const n=e&&e[Me];(!n||!n.isManual_)&&Xe(9);const{scope_:r}=n;return ba(r,t),tc(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));const r=En("Patches").applyPatches_;return Sn(e)?r(e,t):this.produce(e,l=>r(l,t))}};function Ou(e,t){const n=Bi(e)?En("MapSet").proxyMap_(e,t):Qi(e)?En("MapSet").proxySet_(e,t):vv(e,t);return(t?t.scope_:bd()).drafts_.push(n),n}function Sv(e){return Sn(e)||Xe(10,e),tp(e)}function tp(e){if(!Et(e)||Hi(e))return e;const t=e[Me];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=_u(e,t.scope_.immer_.useStrictShallowCopy_)}else n=_u(e,!0);return vi(n,(r,l)=>{Jd(n,r,tp(l))}),t&&(t.finalized_=!1),n}var ze=new wv,np=ze.produce;ze.produceWithPatches.bind(ze);ze.setAutoFreeze.bind(ze);ze.setUseStrictShallowCopy.bind(ze);ze.applyPatches.bind(ze);ze.createDraft.bind(ze);ze.finishDraft.bind(ze);function rp(e){return({dispatch:n,getState:r})=>l=>i=>typeof i=="function"?i(n,r,e):l(i)}var Ev=rp(),kv=rp,Cv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?yi:yi.apply(null,arguments)};function rc(e,t){function n(...r){if(t){let l=t(...r);if(!l)throw new Error(yt(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>cv(r)&&r.type===e,n}var lp=class _r extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_r.prototype)}static get[Symbol.species](){return _r}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _r(...t[0].concat(this)):new _r(...t.concat(this))}};function lc(e){return Et(e)?np(e,()=>{}):e}function ic(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function _v(e){return typeof e=="boolean"}var xv=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:l=!0,actionCreatorCheck:i=!0}=t??{};let o=new lp;return n&&(_v(n)?o.push(Ev):o.push(kv(n.extraArgument))),o},Pv="RTK_autoBatch",oc=e=>t=>{setTimeout(t,e)},Rv=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let l=!0,i=!1,o=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:oc(10):e.type==="callback"?e.queueNotification:oc(e.timeout),a=()=>{o=!1,i&&(i=!1,u.forEach(p=>p()))};return Object.assign({},r,{subscribe(p){const f=()=>l&&p(),m=r.subscribe(f);return u.add(p),()=>{m(),u.delete(p)}},dispatch(p){var f;try{return l=!((f=p==null?void 0:p.meta)!=null&&f[Pv]),i=!l,i&&(o||(o=!0,s(a))),r.dispatch(p)}finally{l=!0}}})},Ov=e=>function(n){const{autoBatch:r=!0}=n??{};let l=new lp(e);return r&&l.push(Rv(typeof r=="object"?r:void 0)),l};function Nv(e){const t=xv(),{reducer:n=void 0,middleware:r,devTools:l=!0,preloadedState:i=void 0,enhancers:o=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(Ps(n))u=sv(n);else throw new Error(yt(1));let s;typeof r=="function"?s=r(t):s=t();let a=yi;l&&(a=Cv({trace:!1,...typeof l=="object"&&l}));const p=av(...s),f=Ov(p);let m=typeof o=="function"?o(f):f();const w=a(...m);return Xd(u,i,w)}function ip(e){const t={},n=[];let r;const l={addCase(i,o){const u=typeof i=="string"?i:i.type;if(!u)throw new Error(yt(28));if(u in t)throw new Error(yt(29));return t[u]=o,l},addMatcher(i,o){return n.push({matcher:i,reducer:o}),l},addDefaultCase(i){return r=i,l}};return e(l),[t,n,r]}function Tv(e){return typeof e=="function"}function Mv(e,t){let[n,r,l]=ip(t),i;if(Tv(e))i=()=>lc(e());else{const u=lc(e);i=()=>u}function o(u=i(),s){let a=[n[s.type],...r.filter(({matcher:p})=>p(s)).map(({reducer:p})=>p)];return a.filter(p=>!!p).length===0&&(a=[l]),a.reduce((p,f)=>{if(f)if(Sn(p)){const w=f(p,s);return w===void 0?p:w}else{if(Et(p))return np(p,m=>f(m,s));{const m=f(p,s);if(m===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return p},u)}return o.getInitialState=i,o}var zv=Symbol.for("rtk-slice-createasyncthunk");function Lv(e,t){return`${e}/${t}`}function Dv({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[zv];return function(l){const{name:i,reducerPath:o=i}=l;if(!i)throw new Error(yt(11));const u=(typeof l.reducers=="function"?l.reducers(Iv()):l.reducers)||{},s=Object.keys(u),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(h,v){const k=typeof h=="string"?h:h.type;if(!k)throw new Error(yt(12));if(k in a.sliceCaseReducersByType)throw new Error(yt(13));return a.sliceCaseReducersByType[k]=v,p},addMatcher(h,v){return a.sliceMatchers.push({matcher:h,reducer:v}),p},exposeAction(h,v){return a.actionCreators[h]=v,p},exposeCaseReducer(h,v){return a.sliceCaseReducersByName[h]=v,p}};s.forEach(h=>{const v=u[h],k={reducerName:h,type:Lv(i,h),createNotation:typeof l.reducers=="function"};Uv(v)?Bv(k,v,p,t):Av(k,v,p)});function f(){const[h={},v=[],k=void 0]=typeof l.extraReducers=="function"?ip(l.extraReducers):[l.extraReducers],x={...h,...a.sliceCaseReducersByType};return Mv(l.initialState,P=>{for(let _ in x)P.addCase(_,x[_]);for(let _ of a.sliceMatchers)P.addMatcher(_.matcher,_.reducer);for(let _ of v)P.addMatcher(_.matcher,_.reducer);k&&P.addDefaultCase(k)})}const m=h=>h,w=new Map;let y;function g(h,v){return y||(y=f()),y(h,v)}function E(){return y||(y=f()),y.getInitialState()}function d(h,v=!1){function k(P){let _=P[h];return typeof _>"u"&&v&&(_=E()),_}function x(P=m){const _=ic(w,v,()=>new WeakMap);return ic(_,P,()=>{const M={};for(const[D,pe]of Object.entries(l.selectors??{}))M[D]=Fv(pe,P,E,v);return M})}return{reducerPath:h,getSelectors:x,get selectors(){return x(k)},selectSlice:k}}const c={name:i,reducer:g,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:E,...d(o),injectInto(h,{reducerPath:v,...k}={}){const x=v??o;return h.inject({reducerPath:x,reducer:g},k),{...c,...d(x,!0)}}};return c}}function Fv(e,t,n,r){function l(i,...o){let u=t(i);return typeof u>"u"&&r&&(u=n()),e(u,...o)}return l.unwrapped=e,l}var jv=Dv();function Iv(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Av({type:e,reducerName:t,createNotation:n},r,l){let i,o;if("reducer"in r){if(n&&!$v(r))throw new Error(yt(17));i=r.reducer,o=r.prepare}else i=r;l.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?rc(e,o):rc(e))}function Uv(e){return e._reducerDefinitionType==="asyncThunk"}function $v(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Bv({type:e,reducerName:t},n,r,l){if(!l)throw new Error(yt(18));const{payloadCreator:i,fulfilled:o,pending:u,rejected:s,settled:a,options:p}=n,f=l(e,i,p);r.exposeAction(t,f),o&&r.addCase(f.fulfilled,o),u&&r.addCase(f.pending,u),s&&r.addCase(f.rejected,s),a&&r.addMatcher(f.settled,a),r.exposeCaseReducer(t,{fulfilled:o||Nl,pending:u||Nl,rejected:s||Nl,settled:a||Nl})}function Nl(){}function yt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Qv=()=>{const e=localStorage.getItem("chatHistory");if(e)try{return JSON.parse(e)}catch(t){return console.error("Failed to parse chat history from localStorage:",t),[]}return[]},Hv={history:Qv()},op=jv({name:"chat",initialState:Hv,reducers:{addMessage:(e,t)=>{e.history.push(t.payload),localStorage.setItem("chatHistory",JSON.stringify(e.history))},clearHistory:e=>{e.history=[],localStorage.setItem("chatHistory",JSON.stringify([]))},setHistory:(e,t)=>{e.history=t.payload,localStorage.setItem("chatHistory",JSON.stringify(e.history))}}}),{addMessage:Vv,clearHistory:Wv,setHistory:Po}=op.actions,Kv=op.reducer,Gv=()=>{const[e,t]=O.useState(""),[n,r]=O.useState(null),[l,i]=O.useState(!1),[o,u]=O.useState(!1),s=nv(y=>y.chat.history),a=by(),p=O.useRef(null),f=()=>{const y=document.querySelector(".messages");if(y){const g=y.getBoundingClientRect(),E=window.innerHeight;return g.bottom<=E+10}return!0},m=()=>{p.current&&(p.current.abort(),i(!1),console.log("Generation stopped by user"))},w=async y=>{var d;if(!y.trim()||l)return;const g={role:"user",content:y,searchResults:[]};a(Vv(g)),t(""),i(!0),u(!1),console.log("Start request - isLoading:",l,"hasAssistantStarted:",o);const E="https://muryshev-generic-chatbot-backend.hf.space/llm/chat/stream";try{const c=new AbortController;p.current=c;const h=setTimeout(()=>{c.abort(),r("Сервер временно недоступен")},5e3),v=await fetch(E,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({history:[...s,g]}),signal:c.signal});if(clearTimeout(h),!v.ok)throw new Error(`HTTP error! status: ${v.status}`);const k=(d=v.body)==null?void 0:d.getReader();if(!k)throw new Error("Response body is not readable");const x=new TextDecoder;let P="",_="",M=[...s,g];for(;;){const{done:D,value:pe}=await k.read();if(D)break;P+=x.decode(pe,{stream:!0});const be=P.split(` + +`);for(let st=0;stT===M.length-1&&R.role==="user"?{...R,content:R.content+Pe.data}:R),a(Po(M)),console.log("After search_results - isLoading:",l,"hasAssistantStarted:",o);else if(Pe.event==="token"){o||(u(!0),console.log("Before first token - isLoading:",l,"hasAssistantStarted:",o)),_+=Pe.data;const R=M.findLastIndex(z=>z.role==="user"),T=M.findIndex((z,B)=>z.role==="assistant"&&B>R);T>=0?M=M.map((z,B)=>B===T?{...z,content:_}:z):M=[...M,{role:"assistant",content:_,searchResults:[]}],a(Po(M))}}catch(Pe){console.error("Failed to parse SSE data:",Pe),r("Ошибка обработки данных от сервера")}}}P=be[be.length-1];const Ct=document.querySelector(".messages");if(Ct){const st=Ct.querySelectorAll("div"),Jt=st[st.length-1];Jt&&f()&&setTimeout(()=>{Jt.scrollIntoView({behavior:"smooth",block:"start"}),console.log("Autoscroll triggered, isAtBottom:",f())},0)}}}catch(c){console.error("Stream error:",c),i(!1),console.log("Catch - isLoading:",l,"hasAssistantStarted:",o),c instanceof DOMException&&c.name==="AbortError"&&!p.current?r("Сервер временно недоступен"):c instanceof DOMException&&c.name==="AbortError"||r("Произошла ошибка при запросе")}finally{p.current=null}};return O.useEffect(()=>{if(console.log("State update - isLoading:",l,"hasAssistantStarted:",o),n){const y=setTimeout(()=>r(null),5e3);return()=>clearTimeout(y)}},[l,o,n]),F.jsxs("div",{className:"chat",children:[n&&F.jsx("div",{className:"error-toast",children:n}),F.jsxs("div",{className:"messages",children:[s.map((y,g)=>F.jsx("div",{children:F.jsx(Ya,{role:y.role,content:y.content})},g)),l&&!o&&F.jsx("div",{children:F.jsx(Ya,{role:"assistant",content:"",isLoading:!0})})]}),F.jsxs("div",{className:"input-area",children:[F.jsx(lv,{onSend:w,text:e,setText:t}),F.jsxs("div",{className:"buttons",children:[l?F.jsx("button",{className:"stop-button",onClick:m,children:"Остановить"}):F.jsx("button",{className:"send-button",onClick:()=>w(e),children:"Отправить"}),F.jsx("a",{href:"#",className:"clear-link",onClick:y=>{y.preventDefault(),a(Wv())},children:"Очистить"})]})]})]})},qv=Nv({reducer:{chat:Kv}}),Xv=()=>F.jsx(Yy,{store:qv,children:F.jsx(Gv,{})});var Vi=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wi=typeof window>"u"||"Deno"in globalThis;function Ve(){}function Yv(e,t){return typeof e=="function"?e(t):e}function Zv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function uc(e,t){return typeof e=="function"?e(t):e}function bv(e,t){return typeof e=="function"?e(t):e}function sc(e,t){const{type:n="all",exact:r,fetchStatus:l,predicate:i,queryKey:o,stale:u}=e;if(o){if(r){if(t.queryHash!==Ns(o,t.options))return!1}else if(!el(t.queryKey,o))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||l&&l!==t.state.fetchStatus||i&&!i(t))}function ac(e,t){const{exact:n,status:r,predicate:l,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(br(t.options.mutationKey)!==br(i))return!1}else if(!el(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function Ns(e,t){return((t==null?void 0:t.queryKeyHashFn)||br)(e)}function br(e){return JSON.stringify(e,(t,n)=>Nu(n)?Object.keys(n).sort().reduce((r,l)=>(r[l]=n[l],r),{}):n)}function el(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!el(e[n],t[n])):!1}function up(e,t){if(e===t)return e;const n=cc(e)&&cc(t);if(n||Nu(e)&&Nu(t)){const r=n?e:Object.keys(e),l=r.length,i=n?t:Object.keys(t),o=i.length,u=n?[]:{};let s=0;for(let a=0;a{setTimeout(t,e)})}function tg(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?up(e,t):t}function ng(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function rg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ts=Symbol();function sp(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ts?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var sn,Tt,Kn,hc,lg=(hc=class extends Vi{constructor(){super();A(this,sn);A(this,Tt);A(this,Kn);L(this,Kn,t=>{if(!Wi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){S(this,Tt)||this.setEventListener(S(this,Kn))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Tt))==null||t.call(this),L(this,Tt,void 0))}setEventListener(t){var n;L(this,Kn,t),(n=S(this,Tt))==null||n.call(this),L(this,Tt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){S(this,sn)!==t&&(L(this,sn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof S(this,sn)=="boolean"?S(this,sn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},sn=new WeakMap,Tt=new WeakMap,Kn=new WeakMap,hc),ap=new lg,Gn,Mt,qn,mc,ig=(mc=class extends Vi{constructor(){super();A(this,Gn,!0);A(this,Mt);A(this,qn);L(this,qn,t=>{if(!Wi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,Mt)||this.setEventListener(S(this,qn))}onUnsubscribe(){var t;this.hasListeners()||((t=S(this,Mt))==null||t.call(this),L(this,Mt,void 0))}setEventListener(t){var n;L(this,qn,t),(n=S(this,Mt))==null||n.call(this),L(this,Mt,t(this.setOnline.bind(this)))}setOnline(t){S(this,Gn)!==t&&(L(this,Gn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return S(this,Gn)}},Gn=new WeakMap,Mt=new WeakMap,qn=new WeakMap,mc),Si=new ig;function og(){let e,t;const n=new Promise((l,i)=>{e=l,t=i});n.status="pending",n.catch(()=>{});function r(l){Object.assign(n,l),delete n.resolve,delete n.reject}return n.resolve=l=>{r({status:"fulfilled",value:l}),e(l)},n.reject=l=>{r({status:"rejected",reason:l}),t(l)},n}function ug(e){return Math.min(1e3*2**e,3e4)}function cp(e){return(e??"online")==="online"?Si.isOnline():!0}var fp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Ro(e){return e instanceof fp}function dp(e){let t=!1,n=0,r=!1,l;const i=og(),o=g=>{var E;r||(m(new fp(g)),(E=e.abort)==null||E.call(e))},u=()=>{t=!0},s=()=>{t=!1},a=()=>ap.isFocused()&&(e.networkMode==="always"||Si.isOnline())&&e.canRun(),p=()=>cp(e.networkMode)&&e.canRun(),f=g=>{var E;r||(r=!0,(E=e.onSuccess)==null||E.call(e,g),l==null||l(),i.resolve(g))},m=g=>{var E;r||(r=!0,(E=e.onError)==null||E.call(e,g),l==null||l(),i.reject(g))},w=()=>new Promise(g=>{var E;l=d=>{(r||a())&&g(d)},(E=e.onPause)==null||E.call(e)}).then(()=>{var g;l=void 0,r||(g=e.onContinue)==null||g.call(e)}),y=()=>{if(r)return;let g;const E=n===0?e.initialPromise:void 0;try{g=E??e.fn()}catch(d){g=Promise.reject(d)}Promise.resolve(g).then(f).catch(d=>{var x;if(r)return;const c=e.retry??(Wi?0:3),h=e.retryDelay??ug,v=typeof h=="function"?h(n,d):h,k=c===!0||typeof c=="number"&&na()?void 0:w()).then(()=>{t?m(d):y()})})};return{promise:i,cancel:o,continue:()=>(l==null||l(),i),cancelRetry:u,continueRetry:s,canStart:p,start:()=>(p()?y():w().then(y),i)}}function sg(){let e=[],t=0,n=u=>{u()},r=u=>{u()},l=u=>setTimeout(u,0);const i=u=>{t?e.push(u):l(()=>{n(u)})},o=()=>{const u=e;e=[],u.length&&l(()=>{r(()=>{u.forEach(s=>{n(s)})})})};return{batch:u=>{let s;t++;try{s=u()}finally{t--,t||o()}return s},batchCalls:u=>(...s)=>{i(()=>{u(...s)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{l=u}}}var ye=sg(),an,yc,pp=(yc=class{constructor(){A(this,an)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Zv(this.gcTime)&&L(this,an,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wi?1/0:5*60*1e3))}clearGcTimeout(){S(this,an)&&(clearTimeout(S(this,an)),L(this,an,void 0))}},an=new WeakMap,yc),Xn,Yn,Fe,cn,ce,tl,fn,We,at,vc,ag=(vc=class extends pp{constructor(t){super();A(this,We);A(this,Xn);A(this,Yn);A(this,Fe);A(this,cn);A(this,ce);A(this,tl);A(this,fn);L(this,fn,!1),L(this,tl,t.defaultOptions),this.setOptions(t.options),this.observers=[],L(this,cn,t.client),L(this,Fe,S(this,cn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,L(this,Xn,fg(this.options)),this.state=t.state??S(this,Xn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=S(this,ce))==null?void 0:t.promise}setOptions(t){this.options={...S(this,tl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,Fe).remove(this)}setData(t,n){const r=tg(this.state.data,t,this.options);return ue(this,We,at).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ue(this,We,at).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,l;const n=(r=S(this,ce))==null?void 0:r.promise;return(l=S(this,ce))==null||l.cancel(t),n?n.then(Ve).catch(Ve):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(S(this,Xn))}isActive(){return this.observers.some(t=>bv(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ts||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Jv(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ce))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=S(this,ce))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),S(this,Fe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(S(this,ce)&&(S(this,fn)?S(this,ce).cancel({revert:!0}):S(this,ce).cancelRetry()),this.scheduleGc()),S(this,Fe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ue(this,We,at).call(this,{type:"invalidate"})}fetch(t,n){var s,a,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(S(this,ce))return S(this,ce).continueRetry(),S(this,ce).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,l=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(L(this,fn,!0),r.signal)})},i=()=>{const f=sp(this.options,n),m={client:S(this,cn),queryKey:this.queryKey,meta:this.meta};return l(m),L(this,fn,!1),this.options.persister?this.options.persister(f,m,this):f(m)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:S(this,cn),state:this.state,fetchFn:i};l(o),(s=this.options.behavior)==null||s.onFetch(o,this),L(this,Yn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((a=o.fetchOptions)==null?void 0:a.meta))&&ue(this,We,at).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const u=f=>{var m,w,y,g;Ro(f)&&f.silent||ue(this,We,at).call(this,{type:"error",error:f}),Ro(f)||((w=(m=S(this,Fe).config).onError)==null||w.call(m,f,this),(g=(y=S(this,Fe).config).onSettled)==null||g.call(y,this.state.data,f,this)),this.scheduleGc()};return L(this,ce,dp({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var m,w,y,g;if(f===void 0){u(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(E){u(E);return}(w=(m=S(this,Fe).config).onSuccess)==null||w.call(m,f,this),(g=(y=S(this,Fe).config).onSettled)==null||g.call(y,f,this.state.error,this),this.scheduleGc()},onError:u,onFail:(f,m)=>{ue(this,We,at).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{ue(this,We,at).call(this,{type:"pause"})},onContinue:()=>{ue(this,We,at).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),S(this,ce).start()}},Xn=new WeakMap,Yn=new WeakMap,Fe=new WeakMap,cn=new WeakMap,ce=new WeakMap,tl=new WeakMap,fn=new WeakMap,We=new WeakSet,at=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...cg(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const l=t.error;return Ro(l)&&l.revert&&S(this,Yn)?{...S(this,Yn),fetchStatus:"idle"}:{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ye.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),S(this,Fe).notify({query:this,type:"updated",action:t})})},vc);function cg(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:cp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fg(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nt,gc,dg=(gc=class extends Vi{constructor(t={}){super();A(this,nt);this.config=t,L(this,nt,new Map)}build(t,n,r){const l=n.queryKey,i=n.queryHash??Ns(l,n);let o=this.get(i);return o||(o=new ag({client:t,queryKey:l,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(o)),o}add(t){S(this,nt).has(t.queryHash)||(S(this,nt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=S(this,nt).get(t.queryHash);n&&(t.destroy(),n===t&&S(this,nt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return S(this,nt).get(t)}getAll(){return[...S(this,nt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>sc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>sc(t,r)):n}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nt=new WeakMap,gc),rt,he,dn,lt,xt,wc,pg=(wc=class extends pp{constructor(t){super();A(this,lt);A(this,rt);A(this,he);A(this,dn);this.mutationId=t.mutationId,L(this,he,t.mutationCache),L(this,rt,[]),this.state=t.state||hg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){S(this,rt).includes(t)||(S(this,rt).push(t),this.clearGcTimeout(),S(this,he).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){L(this,rt,S(this,rt).filter(n=>n!==t)),this.scheduleGc(),S(this,he).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){S(this,rt).length||(this.state.status==="pending"?this.scheduleGc():S(this,he).remove(this))}continue(){var t;return((t=S(this,dn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,i,o,u,s,a,p,f,m,w,y,g,E,d,c,h,v,k,x,P;L(this,dn,dp({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,M)=>{ue(this,lt,xt).call(this,{type:"failed",failureCount:_,error:M})},onPause:()=>{ue(this,lt,xt).call(this,{type:"pause"})},onContinue:()=>{ue(this,lt,xt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,he).canRun(this)}));const n=this.state.status==="pending",r=!S(this,dn).canStart();try{if(!n){ue(this,lt,xt).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(l=S(this,he).config).onMutate)==null?void 0:i.call(l,t,this));const M=await((u=(o=this.options).onMutate)==null?void 0:u.call(o,t));M!==this.state.context&&ue(this,lt,xt).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const _=await S(this,dn).start();return await((a=(s=S(this,he).config).onSuccess)==null?void 0:a.call(s,_,t,this.state.context,this)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,_,t,this.state.context)),await((w=(m=S(this,he).config).onSettled)==null?void 0:w.call(m,_,null,this.state.variables,this.state.context,this)),await((g=(y=this.options).onSettled)==null?void 0:g.call(y,_,null,t,this.state.context)),ue(this,lt,xt).call(this,{type:"success",data:_}),_}catch(_){try{throw await((d=(E=S(this,he).config).onError)==null?void 0:d.call(E,_,t,this.state.context,this)),await((h=(c=this.options).onError)==null?void 0:h.call(c,_,t,this.state.context)),await((k=(v=S(this,he).config).onSettled)==null?void 0:k.call(v,void 0,_,this.state.variables,this.state.context,this)),await((P=(x=this.options).onSettled)==null?void 0:P.call(x,void 0,_,t,this.state.context)),_}finally{ue(this,lt,xt).call(this,{type:"error",error:_})}}finally{S(this,he).runNext(this)}}},rt=new WeakMap,he=new WeakMap,dn=new WeakMap,lt=new WeakSet,xt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ye.batch(()=>{S(this,rt).forEach(r=>{r.onMutationUpdate(t)}),S(this,he).notify({mutation:this,type:"updated",action:t})})},wc);function hg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var dt,Ke,nl,Sc,mg=(Sc=class extends Vi{constructor(t={}){super();A(this,dt);A(this,Ke);A(this,nl);this.config=t,L(this,dt,new Set),L(this,Ke,new Map),L(this,nl,0)}build(t,n,r){const l=new pg({mutationCache:this,mutationId:++fl(this,nl)._,options:t.defaultMutationOptions(n),state:r});return this.add(l),l}add(t){S(this,dt).add(t);const n=Tl(t);if(typeof n=="string"){const r=S(this,Ke).get(n);r?r.push(t):S(this,Ke).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(S(this,dt).delete(t)){const n=Tl(t);if(typeof n=="string"){const r=S(this,Ke).get(n);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&S(this,Ke).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Tl(t);if(typeof n=="string"){const r=S(this,Ke).get(n),l=r==null?void 0:r.find(i=>i.state.status==="pending");return!l||l===t}else return!0}runNext(t){var r;const n=Tl(t);if(typeof n=="string"){const l=(r=S(this,Ke).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ye.batch(()=>{S(this,dt).forEach(t=>{this.notify({type:"removed",mutation:t})}),S(this,dt).clear(),S(this,Ke).clear()})}getAll(){return Array.from(S(this,dt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>ac(n,r))}findAll(t={}){return this.getAll().filter(n=>ac(t,n))}notify(t){ye.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ye.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ve))))}},dt=new WeakMap,Ke=new WeakMap,nl=new WeakMap,Sc);function Tl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function dc(e){return{onFetch:(t,n)=>{var p,f,m,w,y;const r=t.options,l=(m=(f=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,i=((w=t.state.data)==null?void 0:w.pages)||[],o=((y=t.state.data)==null?void 0:y.pageParams)||[];let u={pages:[],pageParams:[]},s=0;const a=async()=>{let g=!1;const E=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},d=sp(t.options,t.fetchOptions),c=async(h,v,k)=>{if(g)return Promise.reject();if(v==null&&h.pages.length)return Promise.resolve(h);const x={client:t.client,queryKey:t.queryKey,pageParam:v,direction:k?"backward":"forward",meta:t.options.meta};E(x);const P=await d(x),{maxPages:_}=t.options,M=k?rg:ng;return{pages:M(h.pages,P,_),pageParams:M(h.pageParams,v,_)}};if(l&&i.length){const h=l==="backward",v=h?yg:pc,k={pages:i,pageParams:o},x=v(r,k);u=await c(k,x,h)}else{const h=e??i.length;do{const v=s===0?o[0]??r.initialPageParam:pc(r,u);if(s>0&&v==null)break;u=await c(u,v),s++}while(s{var g,E;return(E=(g=t.options).persister)==null?void 0:E.call(g,a,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=a}}}function pc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function yg(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var q,zt,Lt,Zn,Jn,Dt,bn,er,Ec,vg=(Ec=class{constructor(e={}){A(this,q);A(this,zt);A(this,Lt);A(this,Zn);A(this,Jn);A(this,Dt);A(this,bn);A(this,er);L(this,q,e.queryCache||new dg),L(this,zt,e.mutationCache||new mg),L(this,Lt,e.defaultOptions||{}),L(this,Zn,new Map),L(this,Jn,new Map),L(this,Dt,0)}mount(){fl(this,Dt)._++,S(this,Dt)===1&&(L(this,bn,ap.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,q).onFocus())})),L(this,er,Si.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,q).onOnline())})))}unmount(){var e,t;fl(this,Dt)._--,S(this,Dt)===0&&((e=S(this,bn))==null||e.call(this),L(this,bn,void 0),(t=S(this,er))==null||t.call(this),L(this,er,void 0))}isFetching(e){return S(this,q).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,zt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,q).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=S(this,q).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(uc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return S(this,q).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),l=S(this,q).get(r.queryHash),i=l==null?void 0:l.state.data,o=Yv(t,i);if(o!==void 0)return S(this,q).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ye.batch(()=>S(this,q).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=S(this,q).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=S(this,q);ye.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=S(this,q);return ye.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ye.batch(()=>S(this,q).findAll(e).map(l=>l.cancel(n)));return Promise.all(r).then(Ve).catch(Ve)}invalidateQueries(e,t={}){return ye.batch(()=>(S(this,q).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ye.batch(()=>S(this,q).findAll(e).filter(l=>!l.isDisabled()).map(l=>{let i=l.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ve)),l.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ve)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=S(this,q).build(this,t);return n.isStaleByTime(uc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ve).catch(Ve)}fetchInfiniteQuery(e){return e.behavior=dc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ve).catch(Ve)}ensureInfiniteQueryData(e){return e.behavior=dc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Si.isOnline()?S(this,zt).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,q)}getMutationCache(){return S(this,zt)}getDefaultOptions(){return S(this,Lt)}setDefaultOptions(e){L(this,Lt,e)}setQueryDefaults(e,t){S(this,Zn).set(br(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...S(this,Zn).values()],n={};return t.forEach(r=>{el(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){S(this,Jn).set(br(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...S(this,Jn).values()],n={};return t.forEach(r=>{el(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...S(this,Lt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ns(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ts&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,Lt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,q).clear(),S(this,zt).clear()}},q=new WeakMap,zt=new WeakMap,Lt=new WeakMap,Zn=new WeakMap,Jn=new WeakMap,Dt=new WeakMap,bn=new WeakMap,er=new WeakMap,Ec),gg=O.createContext(void 0),wg=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),F.jsx(gg.Provider,{value:e,children:t}));const Sg=new vg;Oo.createRoot(document.getElementById("root")).render(F.jsx(An.StrictMode,{children:F.jsx(wg,{client:Sg,children:F.jsx(Ty,{children:F.jsx(Ry,{children:F.jsx(Vd,{path:"/",element:F.jsx(Xv,{})})})})})}));