diff --git "a/static/assets/index-002f869b.js" "b/static/assets/index-002f869b.js" new file mode 100644--- /dev/null +++ "b/static/assets/index-002f869b.js" @@ -0,0 +1,50 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Ei=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oh={exports:{}},Qs={},ih={exports:{}},oe={};/** + * @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 oi=Symbol.for("react.element"),Yg=Symbol.for("react.portal"),Xg=Symbol.for("react.fragment"),Zg=Symbol.for("react.strict_mode"),Jg=Symbol.for("react.profiler"),e0=Symbol.for("react.provider"),t0=Symbol.for("react.context"),n0=Symbol.for("react.forward_ref"),r0=Symbol.for("react.suspense"),o0=Symbol.for("react.memo"),i0=Symbol.for("react.lazy"),Af=Symbol.iterator;function s0(e){return e===null||typeof e!="object"?null:(e=Af&&e[Af]||e["@@iterator"],typeof e=="function"?e:null)}var sh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lh=Object.assign,ah={};function Br(e,t,n){this.props=e,this.context=t,this.refs=ah,this.updater=n||sh}Br.prototype.isReactComponent={};Br.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")};Br.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uh(){}uh.prototype=Br.prototype;function Zu(e,t,n){this.props=e,this.context=t,this.refs=ah,this.updater=n||sh}var Ju=Zu.prototype=new uh;Ju.constructor=Zu;lh(Ju,Br.prototype);Ju.isPureReactComponent=!0;var Nf=Array.isArray,ch=Object.prototype.hasOwnProperty,ec={current:null},fh={key:!0,ref:!0,__self:!0,__source:!0};function dh(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)ch.call(t,r)&&!fh.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1>>1,w=O[se];if(0>>1;seo(z,H))Do(X,z)?(O[se]=X,O[D]=H,se=D):(O[se]=z,O[x]=H,se=x);else if(Do(X,H))O[se]=X,O[D]=H,se=D;else break e}}return F}function o(O,F){var H=O.sortIndex-F.sortIndex;return H!==0?H:O.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var a=[],u=[],f=1,d=null,p=3,_=!1,v=!1,g=!1,P=typeof setTimeout=="function"?setTimeout:null,h=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 m(O){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=O)r(u),F.sortIndex=F.expirationTime,t(a,F);else break;F=n(u)}}function R(O){if(g=!1,m(O),!v)if(n(a)!==null)v=!0,xe(b);else{var F=n(u);F!==null&&$e(R,F.startTime-O)}}function b(O,F){v=!1,g&&(g=!1,h(E),E=-1),_=!0;var H=p;try{for(m(F),d=n(a);d!==null&&(!(d.expirationTime>F)||O&&!Y());){var se=d.callback;if(typeof se=="function"){d.callback=null,p=d.priorityLevel;var w=se(d.expirationTime<=F);F=e.unstable_now(),typeof w=="function"?d.callback=w:d===n(a)&&r(a),m(F)}else r(a);d=n(a)}if(d!==null)var C=!0;else{var x=n(u);x!==null&&$e(R,x.startTime-F),C=!1}return C}finally{d=null,p=H,_=!1}}var k=!1,T=null,E=-1,A=5,$=-1;function Y(){return!(e.unstable_now()-$O||125se?(O.sortIndex=H,t(u,O),n(a)===null&&O===n(u)&&(g?(h(E),E=-1):g=!0,$e(R,H-se))):(O.sortIndex=w,t(a,O),v||_||(v=!0,xe(b))),O},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(O){var F=p;return function(){var H=p;p=F;try{return O.apply(this,arguments)}finally{p=H}}}})(vh);mh.exports=vh;var y0=mh.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 yh=re,pt=y0;function L(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"),$a=Object.prototype.hasOwnProperty,g0=/^[: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]*$/,$f={},Pf={};function _0(e){return $a.call(Pf,e)?!0:$a.call($f,e)?!1:g0.test(e)?Pf[e]=!0:($f[e]=!0,!1)}function S0(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 w0(e,t,n,r){if(t===null||typeof t>"u"||S0(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 et(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new et(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){We[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var nc=/[\-:]([a-z])/g;function rc(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(nc,rc);We[t]=new et(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(nc,rc);We[t]=new et(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(nc,rc);We[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function oc(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2l||o[s]!==i[l]){var a=` +`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{jl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wo(e):""}function E0(e){switch(e.tag){case 5:return wo(e.type);case 16:return wo("Lazy");case 13:return wo("Suspense");case 19:return wo("SuspenseList");case 0:case 2:case 15:return e=Wl(e.type,!1),e;case 11:return e=Wl(e.type.render,!1),e;case 1:return e=Wl(e.type,!0),e;default:return""}}function Ma(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 ur:return"Fragment";case ar:return"Portal";case Pa:return"Profiler";case ic:return"StrictMode";case Oa:return"Suspense";case Ia:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Sh:return(e.displayName||"Context")+".Consumer";case _h:return(e._context.displayName||"Context")+".Provider";case sc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lc:return t=e.displayName||null,t!==null?t:Ma(e.type)||"Memo";case fn:t=e._payload,e=e._init;try{return Ma(e(t))}catch{}}return null}function R0(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 Ma(t);case 8:return t===ic?"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 xn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T0(e){var t=Eh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ki(e){e._valueTracker||(e._valueTracker=T0(e))}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Eh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vs(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 Da(e,t){var n=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function If(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xn(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 Th(e,t){t=t.checked,t!=null&&oc(e,"checked",t,!1)}function Va(e,t){Th(e,t);var n=xn(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")?Ua(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ua(e,t.type,xn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mf(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 Ua(e,t,n){(t!=="number"||vs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Eo=Array.isArray;function wr(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=bi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Co={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},k0=["Webkit","ms","Moz","O"];Object.keys(Co).forEach(function(e){k0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Co[t]=Co[e]})});function xh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Co.hasOwnProperty(e)&&Co[e]?(""+t).trim():t+"px"}function Ah(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=xh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var b0=be({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 Fa(e,t){if(t){if(b0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function ja(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 Wa=null;function ac(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ha=null,Er=null,Rr=null;function Uf(e){if(e=li(e)){if(typeof Ha!="function")throw Error(L(280));var t=e.stateNode;t&&(t=el(t),Ha(e.stateNode,e.type,t))}}function Nh(e){Er?Rr?Rr.push(e):Rr=[e]:Er=e}function Lh(){if(Er){var e=Er,t=Rr;if(Rr=Er=null,Uf(e),t)for(e=0;e>>=0,e===0?32:31-(D0(e)/V0|0)|0}var Ci=64,xi=4194304;function Ro(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 Ss(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Ro(l):(i&=s,i!==0&&(r=Ro(i)))}else s=n&~o,s!==0?r=Ro(s):i!==0&&(r=Ro(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===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 ii(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ot(t),e[t]=n}function F0(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=Ao),qf=String.fromCharCode(32),Qf=!1;function Xh(e,t){switch(e){case"keyup":return v_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cr=!1;function g_(e,t){switch(e){case"compositionend":return Zh(t);case"keypress":return t.which!==32?null:(Qf=!0,qf);case"textInput":return e=t.data,e===qf&&Qf?null:e;default:return null}}function __(e,t){if(cr)return e==="compositionend"||!vc&&Xh(e,t)?(e=Qh(),rs=pc=yn=null,cr=!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=Jf(n)}}function nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rm(){for(var e=window,t=vs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vs(e.document)}return t}function yc(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 x_(e){var t=rm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&nm(n.ownerDocument.documentElement,n)){if(r!==null&&yc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=ed(n,i);var s=ed(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.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,fr=null,Xa=null,Lo=null,Za=!1;function td(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Za||fr==null||fr!==vs(r)||(r=fr,"selectionStart"in r&&yc(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}),Lo&&Ko(Lo,r)||(Lo=r,r=Rs(Xa,"onSelect"),0hr||(e.current=ou[hr],ou[hr]=null,hr--)}function pe(e,t){hr++,ou[hr]=e.current,e.current=t}var An={},Qe=Ln(An),ot=Ln(!1),Kn=An;function Ar(e,t){var n=e.type.contextTypes;if(!n)return An;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function it(e){return e=e.childContextTypes,e!=null}function ks(){ge(ot),ge(Qe)}function ad(e,t,n){if(Qe.current!==An)throw Error(L(168));pe(Qe,t),pe(ot,n)}function dm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(L(108,R0(e)||"Unknown",o));return be({},n,r)}function bs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||An,Kn=Qe.current,pe(Qe,e),pe(ot,ot.current),!0}function ud(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=dm(e,t,Kn),r.__reactInternalMemoizedMergedChildContext=e,ge(ot),ge(Qe),pe(Qe,e)):ge(ot),pe(ot,n)}var Yt=null,tl=!1,oa=!1;function pm(e){Yt===null?Yt=[e]:Yt.push(e)}function z_(e){tl=!0,pm(e)}function $n(){if(!oa&&Yt!==null){oa=!0;var e=0,t=ae;try{var n=Yt;for(ae=1;e>=s,o-=s,Xt=1<<32-Ot(t)+o|n<E?(A=T,T=null):A=T.sibling;var $=p(h,T,m[E],R);if($===null){T===null&&(T=A);break}e&&T&&$.alternate===null&&t(h,T),c=i($,c,E),k===null?b=$:k.sibling=$,k=$,T=A}if(E===m.length)return n(h,T),Ee&&Mn(h,E),b;if(T===null){for(;EE?(A=T,T=null):A=T.sibling;var Y=p(h,T,$.value,R);if(Y===null){T===null&&(T=A);break}e&&T&&Y.alternate===null&&t(h,T),c=i(Y,c,E),k===null?b=Y:k.sibling=Y,k=Y,T=A}if($.done)return n(h,T),Ee&&Mn(h,E),b;if(T===null){for(;!$.done;E++,$=m.next())$=d(h,$.value,R),$!==null&&(c=i($,c,E),k===null?b=$:k.sibling=$,k=$);return Ee&&Mn(h,E),b}for(T=r(h,T);!$.done;E++,$=m.next())$=_(T,h,E,$.value,R),$!==null&&(e&&$.alternate!==null&&T.delete($.key===null?E:$.key),c=i($,c,E),k===null?b=$:k.sibling=$,k=$);return e&&T.forEach(function(Q){return t(h,Q)}),Ee&&Mn(h,E),b}function P(h,c,m,R){if(typeof m=="object"&&m!==null&&m.type===ur&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ti:e:{for(var b=m.key,k=c;k!==null;){if(k.key===b){if(b=m.type,b===ur){if(k.tag===7){n(h,k.sibling),c=o(k,m.props.children),c.return=h,h=c;break e}}else if(k.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===fn&&vd(b)===k.type){n(h,k.sibling),c=o(k,m.props),c.ref=lo(h,k,m),c.return=h,h=c;break e}n(h,k);break}else t(h,k);k=k.sibling}m.type===ur?(c=Gn(m.props.children,h.mode,R,m.key),c.return=h,h=c):(R=fs(m.type,m.key,m.props,null,h.mode,R),R.ref=lo(h,c,m),R.return=h,h=R)}return s(h);case ar:e:{for(k=m.key;c!==null;){if(c.key===k)if(c.tag===4&&c.stateNode.containerInfo===m.containerInfo&&c.stateNode.implementation===m.implementation){n(h,c.sibling),c=o(c,m.children||[]),c.return=h,h=c;break e}else{n(h,c);break}else t(h,c);c=c.sibling}c=da(m,h.mode,R),c.return=h,h=c}return s(h);case fn:return k=m._init,P(h,c,k(m._payload),R)}if(Eo(m))return v(h,c,m,R);if(no(m))return g(h,c,m,R);Ii(h,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,c!==null&&c.tag===6?(n(h,c.sibling),c=o(c,m),c.return=h,h=c):(n(h,c),c=fa(m,h.mode,R),c.return=h,h=c),s(h)):n(h,c)}return P}var Lr=wm(!0),Em=wm(!1),ai={},Bt=Ln(ai),Xo=Ln(ai),Zo=Ln(ai);function jn(e){if(e===ai)throw Error(L(174));return e}function bc(e,t){switch(pe(Zo,t),pe(Xo,e),pe(Bt,ai),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ba(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ba(t,e)}ge(Bt),pe(Bt,t)}function $r(){ge(Bt),ge(Xo),ge(Zo)}function Rm(e){jn(Zo.current);var t=jn(Bt.current),n=Ba(t,e.type);t!==n&&(pe(Xo,e),pe(Bt,n))}function Cc(e){Xo.current===e&&(ge(Bt),ge(Xo))}var Te=Ln(0);function $s(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ia=[];function xc(){for(var e=0;en?n:4,e(!0);var r=sa.transition;sa.transition={};try{e(!1),t()}finally{ae=n,sa.transition=r}}function Um(){return kt().memoizedState}function W_(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zm(e))Bm(t,n);else if(n=ym(e,t,n,r),n!==null){var o=Ze();It(n,e,r,o),Fm(n,t,r)}}function H_(e,t,n){var r=bn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zm(e))Bm(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,Mt(l,s)){var a=t.interleaved;a===null?(o.next=o,Tc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=ym(e,t,o,r),n!==null&&(o=Ze(),It(n,e,r,o),Fm(n,t,r))}}function zm(e){var t=e.alternate;return e===ke||t!==null&&t===ke}function Bm(e,t){$o=Ps=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fm(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,cc(e,n)}}var Os={readContext:Tt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},G_={readContext:Tt,useCallback:function(e,t){return Vt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:gd,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ls(4194308,4,Om.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){return ls(4,2,e,t)},useMemo:function(e,t){var n=Vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vt();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=W_.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var t=Vt();return e={current:e},t.memoizedState=e},useState:yd,useDebugValue:Pc,useDeferredValue:function(e){return Vt().memoizedState=e},useTransition:function(){var e=yd(!1),t=e[0];return e=j_.bind(null,e[1]),Vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ke,o=Vt();if(Ee){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Ue===null)throw Error(L(349));Qn&30||bm(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,gd(xm.bind(null,r,i,e),[e]),r.flags|=2048,ti(9,Cm.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Vt(),t=Ue.identifierPrefix;if(Ee){var n=Zt,r=Xt;n=(r&~(1<<32-Ot(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Jo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Ut]=t,e[Yo]=r,Xm(e,t,!1,!1),t.stateNode=e;e:{switch(s=ja(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;oOr&&(t.flags|=128,r=!0,ao(i,!1),t.lanes=4194304)}else{if(!r)if(e=$s(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ao(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ee)return Ke(t),null}else 2*Ae()-i.renderingStartTime>Or&&n!==1073741824&&(t.flags|=128,r=!0,ao(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ae(),t.sibling=null,n=Te.current,pe(Te,r?n&1|2:n&1),t):(Ke(t),null);case 22:case 23:return Uc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ct&1073741824&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function e1(e,t){switch(_c(t),t.tag){case 1:return it(t.type)&&ks(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $r(),ge(ot),ge(Qe),xc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Cc(t),null;case 13:if(ge(Te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(Te),null;case 4:return $r(),null;case 10:return Rc(t.type._context),null;case 22:case 23:return Uc(),null;case 24:return null;default:return null}}var Di=!1,qe=!1,t1=typeof WeakSet=="function"?WeakSet:Set,V=null;function gr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ce(e,t,r)}else n.current=null}function vu(e,t,n){try{n()}catch(r){Ce(e,t,r)}}var Cd=!1;function n1(e,t){if(Ja=ws,e=rm(),yc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,f=0,d=e,p=null;t:for(;;){for(var _;d!==n||o!==0&&d.nodeType!==3||(l=s+o),d!==i||r!==0&&d.nodeType!==3||(a=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(_=d.firstChild)!==null;)p=d,d=_;for(;;){if(d===e)break t;if(p===n&&++u===o&&(l=s),p===i&&++f===r&&(a=s),(_=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=_}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(eu={focusedElem:e,selectionRange:n},ws=!1,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,P=v.memoizedState,h=t.stateNode,c=h.getSnapshotBeforeUpdate(t.elementType===t.type?g:At(t.type,g),P);h.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(R){Ce(t,t.return,R)}if(e=t.sibling,e!==null){e.return=t.return,V=e;break}V=t.return}return v=Cd,Cd=!1,v}function Po(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&vu(t,n,i)}o=o.next}while(o!==r)}}function ol(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 yu(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 ev(e){var t=e.alternate;t!==null&&(e.alternate=null,ev(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ut],delete t[Yo],delete t[ru],delete t[V_],delete t[U_])),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 tv(e){return e.tag===5||e.tag===3||e.tag===4}function xd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tv(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 gu(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=Ts));else if(r!==4&&(e=e.child,e!==null))for(gu(e,t,n),e=e.sibling;e!==null;)gu(e,t,n),e=e.sibling}function _u(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(_u(e,t,n),e=e.sibling;e!==null;)_u(e,t,n),e=e.sibling}var Fe=null,Nt=!1;function an(e,t,n){for(n=n.child;n!==null;)nv(e,t,n),n=n.sibling}function nv(e,t,n){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(Ys,n)}catch{}switch(n.tag){case 5:qe||gr(n,t);case 6:var r=Fe,o=Nt;Fe=null,an(e,t,n),Fe=r,Nt=o,Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Nt?(e=Fe,n=n.stateNode,e.nodeType===8?ra(e.parentNode,n):e.nodeType===1&&ra(e,n),Ho(e)):ra(Fe,n.stateNode));break;case 4:r=Fe,o=Nt,Fe=n.stateNode.containerInfo,Nt=!0,an(e,t,n),Fe=r,Nt=o;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&vu(n,t,s),o=o.next}while(o!==r)}an(e,t,n);break;case 1:if(!qe&&(gr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ce(n,t,l)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,an(e,t,n),qe=r):an(e,t,n);break;default:an(e,t,n)}}function Ad(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new t1),t.forEach(function(r){var o=f1.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=s),r&=~i}if(r=o,r=Ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*o1(r/1960))-r,10e?16:e,gn===null)var r=!1;else{if(e=gn,gn=null,Ds=0,le&6)throw Error(L(331));var o=le;for(le|=4,V=e.current;V!==null;){var i=V,s=i.child;if(V.flags&16){var l=i.deletions;if(l!==null){for(var a=0;aAe()-Dc?Hn(e,0):Mc|=n),st(e,t)}function cv(e,t){t===0&&(e.mode&1?(t=xi,xi<<=1,!(xi&130023424)&&(xi=4194304)):t=1);var n=Ze();e=rn(e,t),e!==null&&(ii(e,t,n),st(e,n))}function c1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cv(e,n)}function f1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),cv(e,n)}var fv;fv=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)rt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return rt=!1,Z_(e,t,n);rt=!!(e.flags&131072)}else rt=!1,Ee&&t.flags&1048576&&hm(t,xs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;as(e,t),e=t.pendingProps;var o=Ar(t,Qe.current);kr(t,n),o=Nc(null,t,r,e,o,n);var i=Lc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,it(r)?(i=!0,bs(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,kc(t),o.updater=nl,t.stateNode=o,o._reactInternals=t,uu(t,r,e,n),t=du(null,t,r,!0,i,n)):(t.tag=0,Ee&&i&&gc(t),Xe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(as(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=p1(r),e=At(r,e),o){case 0:t=fu(null,t,r,e,n);break e;case 1:t=Td(null,t,r,e,n);break e;case 11:t=Ed(null,t,r,e,n);break e;case 14:t=Rd(null,t,r,At(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),fu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Td(e,t,r,o,n);case 3:e:{if(qm(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,o=i.element,gm(e,t),Ls(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Pr(Error(L(423)),t),t=kd(e,t,r,n,o);break e}else if(r!==o){o=Pr(Error(L(424)),t),t=kd(e,t,r,n,o);break e}else for(ft=Rn(t.stateNode.containerInfo.firstChild),dt=t,Ee=!0,$t=null,n=Em(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nr(),r===o){t=on(e,t,n);break e}Xe(e,t,r,n)}t=t.child}return t;case 5:return Rm(t),e===null&&su(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,tu(r,o)?s=null:i!==null&&tu(r,i)&&(t.flags|=32),Km(e,t),Xe(e,t,s,n),t.child;case 6:return e===null&&su(t),null;case 13:return Qm(e,t,n);case 4:return bc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Lr(t,null,r,n):Xe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),Ed(e,t,r,o,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,pe(As,r._currentValue),r._currentValue=s,i!==null)if(Mt(i.value,s)){if(i.children===o.children&&!ot.current){t=on(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=en(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?a.next=a:(a.next=f.next,f.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),lu(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(L(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),lu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Xe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,kr(t,n),o=Tt(o),r=r(o),t.flags|=1,Xe(e,t,r,n),t.child;case 14:return r=t.type,o=At(r,t.pendingProps),o=At(r.type,o),Rd(e,t,r,o,n);case 15:return Hm(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:At(r,o),as(e,t),t.tag=1,it(r)?(e=!0,bs(t)):e=!1,kr(t,n),Sm(t,r,o),uu(t,r,o,n),du(null,t,r,!0,e,n);case 19:return Ym(e,t,n);case 22:return Gm(e,t,n)}throw Error(L(156,t.tag))};function dv(e,t){return Vh(e,t)}function d1(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 Et(e,t,n,r){return new d1(e,t,n,r)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function p1(e){if(typeof e=="function")return Bc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sc)return 11;if(e===lc)return 14}return 2}function Cn(e,t){var n=e.alternate;return n===null?(n=Et(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 fs(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Bc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ur:return Gn(n.children,o,i,t);case ic:s=8,o|=8;break;case Pa:return e=Et(12,n,t,o|2),e.elementType=Pa,e.lanes=i,e;case Oa:return e=Et(13,n,t,o),e.elementType=Oa,e.lanes=i,e;case Ia:return e=Et(19,n,t,o),e.elementType=Ia,e.lanes=i,e;case wh:return sl(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _h:s=10;break e;case Sh:s=9;break e;case sc:s=11;break e;case lc:s=14;break e;case fn:s=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=Et(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Gn(e,t,n,r){return e=Et(7,e,r,t),e.lanes=n,e}function sl(e,t,n,r){return e=Et(22,e,r,t),e.elementType=wh,e.lanes=n,e.stateNode={isHidden:!1},e}function fa(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function da(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function h1(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gl(0),this.expirationTimes=Gl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,o,i,s,l,a){return e=new h1(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Et(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},kc(i),e}function m1(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vv)}catch(e){console.error(e)}}vv(),hh.exports=ht;var yv=hh.exports;const S1=qs(yv);var Dd=yv;La.createRoot=Dd.createRoot,La.hydrateRoot=Dd.hydrateRoot;function w1(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var E1=w1,ee=E1;function R1(e){return!!e&&typeof e.then=="function"}var ye=R1;function T1(e,t){if(e!=null)return e;throw ee(t??"Got unexpected null or undefined")}var Re=T1;function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class fl{getValue(){throw ee("BaseLoadable")}toPromise(){throw ee("BaseLoadable")}valueMaybe(){throw ee("BaseLoadable")}valueOrThrow(){throw ee(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw ee("BaseLoadable")}promiseOrThrow(){throw ee(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw ee("BaseLoadable")}errorOrThrow(){throw ee(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw ee("BaseLoadable")}}class k1 extends fl{constructor(t){super(),Z(this,"state","hasValue"),Z(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return ye(n)?Zn(n):Ir(n)?n:ui(n)}catch(n){return ye(n)?Zn(n.next(()=>this.map(t))):dl(n)}}}class b1 extends fl{constructor(t){super(),Z(this,"state","hasError"),Z(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class gv extends fl{constructor(t){super(),Z(this,"state","loading"),Z(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return Zn(this.contents.then(n=>{const r=t(n);if(Ir(r)){const o=r;switch(o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":return o.contents}}return r}).catch(n=>{if(ye(n))return n.then(()=>this.map(t).contents);throw n}))}}function ui(e){return Object.freeze(new k1(e))}function dl(e){return Object.freeze(new b1(e))}function Zn(e){return Object.freeze(new gv(e))}function _v(){return Object.freeze(new gv(new Promise(()=>{})))}function C1(e){return e.every(t=>t.state==="hasValue")?ui(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?dl(Re(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Zn(Promise.all(e.map(t=>t.contents)))}function Sv(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>Ir(o)?o:ye(o)?Zn(o):ui(o)),r=C1(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,s,l)=>({...i,[s]:o[l]}),{}))}function Ir(e){return e instanceof fl}const x1={of:e=>ye(e)?Zn(e):Ir(e)?e:ui(e),error:e=>dl(e),loading:()=>_v(),all:Sv,isLoadable:Ir};var nr={loadableWithValue:ui,loadableWithError:dl,loadableWithPromise:Zn,loadableLoading:_v,loadableAll:Sv,isLoadable:Ir,RecoilLoadable:x1},A1=nr.loadableWithValue,N1=nr.loadableWithError,L1=nr.loadableWithPromise,$1=nr.loadableLoading,P1=nr.loadableAll,O1=nr.isLoadable,I1=nr.RecoilLoadable,ci=Object.freeze({__proto__:null,loadableWithValue:A1,loadableWithError:N1,loadableWithPromise:L1,loadableLoading:$1,loadableAll:P1,isLoadable:O1,RecoilLoadable:I1});const Tu={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function M1(e,t){var n,r;const o=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(o==null||o==="")return;if(!["true","false"].includes(o))throw ee(`({}).${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function D1(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function V1(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(M1("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Tu.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),D1("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Tu.RECOIL_GKS_ENABLED.add(n)})}))}V1();var Wr=Tu;function pl(e){return Wr.RECOIL_GKS_ENABLED.has(e)}pl.setPass=e=>{Wr.RECOIL_GKS_ENABLED.add(e)};pl.setFail=e=>{Wr.RECOIL_GKS_ENABLED.delete(e)};pl.clear=()=>{Wr.RECOIL_GKS_ENABLED.clear()};var de=pl;function U1(e,t,{error:n}={}){return null}var z1=U1,Gc=z1,pa,ha,ma;const B1=(pa=fe.createMutableSource)!==null&&pa!==void 0?pa:fe.unstable_createMutableSource,wv=(ha=fe.useMutableSource)!==null&&ha!==void 0?ha:fe.unstable_useMutableSource,Ev=(ma=fe.useSyncExternalStore)!==null&&ma!==void 0?ma:fe.unstable_useSyncExternalStore;function F1(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function j1(){return de("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:de("recoil_sync_external_store")&&Ev!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:de("recoil_mutable_source")&&wv!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?de("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:de("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function W1(){return!1}var fi={createMutableSource:B1,useMutableSource:wv,useSyncExternalStore:Ev,currentRendererSupportsUseSyncExternalStore:F1,reactMode:j1,isFastRefreshEnabled:W1};class Kc{constructor(t){Z(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class Rv extends Kc{}class Tv extends Kc{}function H1(e){return e instanceof Rv||e instanceof Tv}var hl={AbstractRecoilValue:Kc,RecoilState:Rv,RecoilValueReadOnly:Tv,isRecoilValue:H1},G1=hl.AbstractRecoilValue,K1=hl.RecoilState,q1=hl.RecoilValueReadOnly,Q1=hl.isRecoilValue,Mr=Object.freeze({__proto__:null,AbstractRecoilValue:G1,RecoilState:K1,RecoilValueReadOnly:q1,isRecoilValue:Q1});function Y1(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var ml=Y1;class kv{}const X1=new kv,Jn=new Map,qc=new Map;function Z1(e){return ml(e,t=>Re(qc.get(t)))}function J1(e){if(Jn.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in + production. But it is safe to ignore this warning if it occurred because of + hot module replacement.`;console.warn(t)}}function eS(e){Wr.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&J1(e.key),Jn.set(e.key,e);const t=e.set==null?new Mr.RecoilValueReadOnly(e.key):new Mr.RecoilState(e.key);return qc.set(e.key,t),t}class bv extends Error{}function tS(e){const t=Jn.get(e);if(t==null)throw new bv(`Missing definition for RecoilValue: "${e}""`);return t}function nS(e){return Jn.get(e)}const zs=new Map;function rS(e){var t;if(!de("recoil_memory_managament_2020"))return;const n=Jn.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Jn.delete(e),(r=Cv(e))===null||r===void 0||r(),zs.delete(e)}}function oS(e,t){de("recoil_memory_managament_2020")&&(t===void 0?zs.delete(e):zs.set(e,t))}function Cv(e){return zs.get(e)}var at={nodes:Jn,recoilValues:qc,registerNode:eS,getNode:tS,getNodeMaybe:nS,deleteNodeConfigIfPossible:rS,setConfigDeletionHandler:oS,getConfigDeletionHandler:Cv,recoilValuesForKeys:Z1,NodeMissingError:bv,DefaultValue:kv,DEFAULT_VALUE:X1};function iS(e,t){t()}var sS={enqueueExecution:iS};function lS(e,t){return t={exports:{}},e(t,t.exports),t.exports}var aS=lS(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},n={},r=5,o=Math.pow(2,r),i=o-1,s=o/2,l=o/4,a={},u=function(y){return function(){return y}},f=n.hash=function(S){var y=typeof S>"u"?"undefined":t(S);if(y==="number")return S;y!=="string"&&(S+="");for(var N=0,I=0,M=S.length;I>1&1431655765,y=(y&858993459)+(y>>2&858993459),y=y+(y>>4)&252645135,y+=y>>8,y+=y>>16,y&127},p=function(y,N){return N>>>y&i},_=function(y){return 1<=N;)M[q--]=M[q];return M[N]=I,M}for(var G=0,K=0,ne=new Array(U+1);G>>=1;return q[N]=I,Y(y,K+1,q)},ue=function(y,N,I,M){for(var U=new Array(N-1),q=0,G=0,K=0,ne=M.length;K1?A(y,this.hash,ne):ne[0]}var we=M();return we===a?this:(++G.value,ut(y,I,this.hash,this,U,E(y,U,q,we)))},H=function(y,N,I,M,U,q,G){var K=this.mask,ne=this.children,we=p(I,U),tt=_(we),De=v(K,tt),yt=K&tt,bt=yt?ne[De]:k,or=bt._modify(y,N,I+r,M,U,q,G);if(bt===or)return this;var wi=$e(y,this),eo=K,to=void 0;if(yt&&T(or)){if(eo&=~tt,!eo)return k;if(ne.length<=2&&Q(ne[De^1]))return ne[De^1];to=P(wi,De,ne)}else if(!yt&&!T(or)){if(ne.length>=s)return B(y,we,or,K,ne);eo|=tt,to=h(wi,De,or,ne)}else to=g(wi,De,or,ne);return wi?(this.mask=eo,this.children=to,this):$(y,eo,to)},se=function(y,N,I,M,U,q,G){var K=this.size,ne=this.children,we=p(I,U),tt=ne[we],De=(tt||k)._modify(y,N,I+r,M,U,q,G);if(tt===De)return this;var yt=$e(y,this),bt=void 0;if(T(tt)&&!T(De))++K,bt=g(yt,we,De,ne);else if(!T(tt)&&T(De)){if(--K,K<=l)return ue(y,K,we,ne);bt=g(yt,we,k,ne)}else bt=g(yt,we,De,ne);return yt?(this.size=K,this.children=bt,this):Y(y,K,bt)};k._modify=function(S,y,N,I,M,U,q){var G=I();return G===a?k:(++q.value,E(S,M,U,G))};function w(S,y,N,I,M){this._editable=S,this._edit=y,this._config=N,this._root=I,this._size=M}w.prototype.setTree=function(S,y){return this._editable?(this._root=S,this._size=y,this):S===this._root?this:new w(this._editable,this._edit,this._config,S,y)};var C=n.tryGetHash=function(S,y,N,I){for(var M=I._root,U=0,q=I._config.keyEq;;)switch(M.type){case c:return q(N,M.key)?M.value:S;case m:{if(y===M.hash)for(var G=M.children,K=0,ne=G.length;K{n.set(o,t(r,o))}),n}var Bs=hS;function mS(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function vS(e){return{nodeDeps:Bs(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Bs(e.nodeToNodeSubscriptions,t=>new Set(t))}}function va(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:i}=n,s=o.get(e);if(s&&r&&s!==r.nodeDeps.get(e))return;o.set(e,t);const l=s==null?t:Mo(t,s);for(const a of l)i.has(a)||i.set(a,new Set),Re(i.get(a)).add(e);if(s){const a=Mo(s,t);for(const u of a){if(!i.has(u))return;const f=Re(i.get(u));f.delete(e),f.size===0&&i.delete(u)}}}function yS(e,t,n,r){var o,i,s,l;const a=n.getState();r===a.currentTree.version||r===((o=a.nextTree)===null||o===void 0?void 0:o.version)||((i=a.previousTree)===null||i===void 0||i.version);const u=n.getGraph(r);if(va(e,t,u),r===((s=a.previousTree)===null||s===void 0?void 0:s.version)){const d=n.getGraph(a.currentTree.version);va(e,t,d,u)}if(r===((l=a.previousTree)===null||l===void 0?void 0:l.version)||r===a.currentTree.version){var f;const d=(f=a.nextTree)===null||f===void 0?void 0:f.version;if(d!==void 0){const p=n.getGraph(d);va(e,t,p,u)}}}var di={cloneGraph:vS,graph:mS,saveDepsToStore:yS};let gS=0;const _S=()=>gS++;let SS=0;const wS=()=>SS++;let ES=0;const RS=()=>ES++;var vl={getNextTreeStateVersion:_S,getNextStoreID:wS,getNextComponentID:RS};const{persistentMap:Vd}=dS,{graph:TS}=di,{getNextTreeStateVersion:xv}=vl;function Av(){const e=xv();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Vd(),nonvalidatedAtoms:Vd()}}function kS(){const e=Av();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,TS()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var Nv={makeEmptyTreeState:Av,makeEmptyStoreState:kS,getNextTreeStateVersion:xv};class Lv{}function bS(){return new Lv}var yl={RetentionZone:Lv,retentionZone:bS};function CS(e,t){const n=new Set(e);return n.add(t),n}function xS(e,t){const n=new Set(e);return n.delete(t),n}function AS(e,t,n){const r=new Map(e);return r.set(t,n),r}function NS(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function LS(e,t){const n=new Map(e);return n.delete(t),n}function $S(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var $v={setByAddingToSet:CS,setByDeletingFromSet:xS,mapBySettingInMap:AS,mapByUpdatingInMap:NS,mapByDeletingFromMap:LS,mapByDeletingMultipleFromMap:$S};function*PS(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var Xc=PS;function OS(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var Pv=OS;const{getNode:pi,getNodeMaybe:IS,recoilValuesForKeys:Ud}=at,{RetentionZone:zd}=yl,{setByAddingToSet:MS}=$v,DS=Object.freeze(new Set);class VS extends Error{}function US(e,t,n){if(!de("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(i){let s=r.get(i);s||r.set(i,s=new Set),s.add(t)}if(n instanceof zd)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!de("recoil_memory_managament_2020"))return;const{retention:i}=e.getState();function s(l){const a=i.nodesRetainedByZone.get(l);a==null||a.delete(t),a&&a.size===0&&i.nodesRetainedByZone.delete(l)}if(n instanceof zd)s(n);else if(Array.isArray(n))for(const l of n)s(l)}}function Zc(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=pi(n),s=US(e,n,i.retainedBy),l=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{l(),s()})}function zS(e,t,n){Zc(e,e.getState().currentTree,t,n)}function BS(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function FS(e,t,n){return Zc(e,t,n,"get"),pi(n).get(e,t)}function Ov(e,t,n){return pi(n).peek(e,t)}function jS(e,t,n){var r;const o=IS(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:MS(e.dirtyAtoms,t)}}function WS(e,t,n,r){const o=pi(n);if(o.set==null)throw new VS(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return Zc(e,t,n,"set"),i(e,t,r)}function HS(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=pi(n).nodeType;return Pv({type:i},{loadable:()=>Ov(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>i==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var s;return Ud((s=o.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,l;return{nodes:Ud(Xc(Iv(e,t,new Set([n])),a=>a!==n)),components:ml((s=(l=r.nodeToComponentSubscriptions.get(n))===null||l===void 0?void 0:l.values())!==null&&s!==void 0?s:[],([a])=>({name:a}))}}})}function Iv(e,t,n){const r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let l=o.pop();l;l=o.pop()){var s;r.add(l);const a=(s=i.nodeToNodeSubscriptions.get(l))!==null&&s!==void 0?s:DS;for(const u of a)r.has(u)||o.push(u)}return r}var Pn={getNodeLoadable:FS,peekNodeLoadable:Ov,setNodeValue:WS,initializeNode:zS,cleanUpNode:BS,setUnvalidatedAtomValue_DEPRECATED:jS,peekNodeInfo:HS,getDownstreamNodes:Iv};let Mv=null;function GS(e){Mv=e}function KS(){var e;(e=Mv)===null||e===void 0||e()}var Dv={setInvalidateMemoizedSnapshot:GS,invalidateMemoizedSnapshot:KS};const{getDownstreamNodes:qS,getNodeLoadable:Vv,setNodeValue:QS}=Pn,{getNextComponentID:YS}=vl,{getNode:XS,getNodeMaybe:Uv}=at,{DefaultValue:Jc}=at,{reactMode:ZS}=fi,{AbstractRecoilValue:JS,RecoilState:ew,RecoilValueReadOnly:tw,isRecoilValue:nw}=Mr,{invalidateMemoizedSnapshot:rw}=Dv;function ow(e,{key:t},n=e.getState().currentTree){var r,o;const i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=i.previousTree)===null||o===void 0||o.version);const s=Vv(e,n,t);return s.state==="loading"&&s.contents.catch(()=>{}),s}function iw(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof Jc?n.delete(o):n.set(o,r)}),n}function sw(e,t,{key:n},r){if(typeof r=="function"){const o=Vv(e,t,n);if(o.state==="loading"){const i=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw ee(i)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function lw(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,s=sw(e,t,o,i),l=QS(e,t,o.key,s);for(const[a,u]of l.entries())ku(t,a,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;ku(t,o,i)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:i}=n,s=Uv(o);s==null||(r=s.invalidate)===null||r===void 0||r.call(s,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else Gc(`Unknown action ${n.type}`)}function ku(e,t,n){n.state==="hasValue"&&n.contents instanceof Jc?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function zv(e,t){e.replaceState(n=>{const r=Bv(n);for(const o of t)lw(e,r,o);return Fv(e,r),rw(),r})}function gl(e,t){if(Do.length){const n=Do[Do.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else zv(e,[t])}const Do=[];function aw(){const e=new Map;return Do.push(e),()=>{for(const[t,n]of e)zv(t,n);Do.pop()}}function Bv(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function Fv(e,t){const n=qS(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=Uv(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function jv(e,t,n){gl(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function uw(e,t,n){if(n instanceof Jc)return jv(e,t,n);gl(e,{type:"setLoadable",recoilValue:t,loadable:n})}function cw(e,t){gl(e,{type:"markModified",recoilValue:t})}function fw(e,t,n){gl(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function dw(e,{key:t},n,r=null){const o=YS(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),Re(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const s=ZS();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const l=e.getState().nextTree;l&&l.dirtyAtoms.has(t)&&n(l)}return{release:()=>{const l=e.getState(),a=l.nodeToComponentSubscriptions.get(t);a===void 0||!a.has(o)||(a.delete(o),a.size===0&&l.nodeToComponentSubscriptions.delete(t))}}}function pw(e,t){var n;const{currentTree:r}=e.getState(),o=XS(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var Wt={RecoilValueReadOnly:tw,AbstractRecoilValue:JS,RecoilState:ew,getRecoilValueAsLoadable:ow,setRecoilValue:jv,setRecoilValueLoadable:uw,markRecoilValueModified:cw,setUnvalidatedRecoilValue:fw,subscribeToRecoilValue:dw,isRecoilValue:nw,applyAtomValueWrites:iw,batchStart:aw,writeLoadableToTreeState:ku,invalidateDownstreams:Fv,copyTreeState:Bv,refreshRecoilValue:pw};function hw(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var mw=hw;const{cleanUpNode:vw}=Pn,{deleteNodeConfigIfPossible:yw,getNode:Wv}=at,{RetentionZone:Hv}=yl,gw=12e4,Gv=new Set;function Kv(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const s of t)if(s instanceof Hv)for(const l of Ew(n,s))o.add(l);else o.add(s);const i=_w(e,o);for(const s of i)ww(e,r,s)}function _w(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,s=new Set;return l(t),i;function l(a){const u=new Set,f=Sw(e,r,a,i,s);for(const v of f){var d;if(Wv(v).retainedBy==="recoilRoot"){s.add(v);continue}if(((d=n.retention.referenceCounts.get(v))!==null&&d!==void 0?d:0)>0){s.add(v);continue}if(qv(v).some(P=>n.retention.referenceCounts.get(P))){s.add(v);continue}const g=o.nodeToNodeSubscriptions.get(v);if(g&&mw(g,P=>s.has(P))){s.add(v);continue}i.add(v),u.add(v)}const p=new Set;for(const v of u)for(const g of(_=o.nodeDeps.get(v))!==null&&_!==void 0?_:Gv){var _;i.has(g)||p.add(g)}p.size&&l(p)}}function Sw(e,t,n,r,o){const i=e.getGraph(t.version),s=[],l=new Set;for(;n.size>0;)a(Re(n.values().next().value));return s;function a(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(l.has(u))return;const f=i.nodeToNodeSubscriptions.get(u);if(f)for(const d of f)a(d);l.add(u),n.delete(u),s.push(u)}}function ww(e,t,n){if(!de("recoil_memory_managament_2020"))return;vw(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=qv(n);for(const a of o){var i;(i=r.retention.nodesRetainedByZone.get(a))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=r.graphsByVersion.get(t.version);if(s){const a=s.nodeDeps.get(n);if(a!==void 0){s.nodeDeps.delete(n);for(const u of a){var l;(l=s.nodeToNodeSubscriptions.get(u))===null||l===void 0||l.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}yw(n)}function Ew(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:Gv}function qv(e){const t=Wv(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof Hv?[t]:t}function Rw(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):Kv(e,new Set([t]))}function Tw(e,t,n){var r;if(!de("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?Qv(e,t):o.set(t,i)}function Qv(e,t){if(!de("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Rw(e,t)}function kw(e){if(!de("recoil_memory_managament_2020"))return;const t=e.getState();Kv(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function bw(e){return e===void 0?"recoilRoot":e}var rr={SUSPENSE_TIMEOUT_MS:gw,updateRetainCount:Tw,updateRetainCountToZero:Qv,releaseScheduledRetainablesNow:kw,retainedByOptionWithDefault:bw};const{unstable_batchedUpdates:Cw}=S1;var xw={unstable_batchedUpdates:Cw};const{unstable_batchedUpdates:Aw}=xw;var Nw={unstable_batchedUpdates:Aw};const{batchStart:Lw}=Wt,{unstable_batchedUpdates:$w}=Nw;let ef=$w||(e=>e());const Pw=e=>{ef=e},Ow=()=>ef,Iw=e=>{ef(()=>{let t=()=>{};try{t=Lw(),e()}finally{t()}})};var _l={getBatcher:Ow,setBatcher:Pw,batchUpdates:Iw};function*Mw(e){for(const t of e)for(const n of t)yield n}var Yv=Mw;const Xv=typeof Window>"u"||typeof window>"u",Dw=e=>!Xv&&(e===window||e instanceof Window),Vw=typeof navigator<"u"&&navigator.product==="ReactNative";var Sl={isSSR:Xv,isReactNative:Vw,isWindow:Dw};function Uw(e,t){let n;return(...r)=>{n||(n={});const o=t(...r);return Object.hasOwnProperty.call(n,o)||(n[o]=e(...r)),n[o]}}function zw(e,t){let n,r;return(...o)=>{const i=t(...o);return n===i||(n=i,r=e(...o)),r}}function Bw(e,t){let n,r;return[(...s)=>{const l=t(...s);return n===l||(n=l,r=e(...s)),r},()=>{n=null}]}var Fw={memoizeWithArgsHash:Uw,memoizeOneWithArgsHash:zw,memoizeOneWithArgsHashAndInvalidation:Bw};const{batchUpdates:bu}=_l,{initializeNode:jw,peekNodeInfo:Ww}=Pn,{graph:Hw}=di,{getNextStoreID:Gw}=vl,{DEFAULT_VALUE:Kw,recoilValues:Bd,recoilValuesForKeys:Fd}=at,{AbstractRecoilValue:qw,getRecoilValueAsLoadable:Qw,setRecoilValue:jd,setUnvalidatedRecoilValue:Yw}=Wt,{updateRetainCount:ds}=rr,{setInvalidateMemoizedSnapshot:Xw}=Dv,{getNextTreeStateVersion:Zw,makeEmptyStoreState:Jw}=Nv,{isSSR:eE}=Sl,{memoizeOneWithArgsHashAndInvalidation:tE}=Fw;class wl{constructor(t,n){Z(this,"_store",void 0),Z(this,"_refCount",1),Z(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),Qw(this._store,r))),Z(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Z(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const s=this._store.getState().currentTree;return Fd(s.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?Bd.values():r.isInitialized===!0?Fd(Yv([o,i])):Xc(Bd.values(),({key:s})=>!o.has(s)&&!i.has(s))}),Z(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),Ww(this._store,this._store.getState().currentTree,r))),Z(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new Cu(this,bu);return r(o),o}),Z(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new Cu(this,bu);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:Gw(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return Re(o.get(r));const i=Hw();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw ee("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)jw(this._store,r,"get"),ds(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){eE||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!de("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){de("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function Zv(e,t,n=!1){const r=e.getState(),o=n?Zw():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(ml(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function nE(e){const t=new wl(Jw());return e!=null?t.map(e):t}const[Wd,Jv]=tE((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Re(r.previousTree);return new wl(Zv(e,o),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});Xw(Jv);function rE(e,t="latest"){const n=Wd(e,t);return n.isRetained()?n:(Jv(),Wd(e,t))}class Cu extends wl{constructor(t,n){super(Zv(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Z(this,"_batch",void 0),Z(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{ds(i,r.key,1),jd(this.getStore_INTERNAL(),r,o)})}),Z(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{ds(o,r.key,1),jd(this.getStore_INTERNAL(),r,Kw)})}),Z(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();bu(()=>{for(const[i,s]of r.entries())ds(o,i,1),Yw(o,new qw(i),s)})}),this._batch=n}}var El={Snapshot:wl,MutableSnapshot:Cu,freshSnapshot:nE,cloneSnapshot:rE},oE=El.Snapshot,iE=El.MutableSnapshot,sE=El.freshSnapshot,lE=El.cloneSnapshot,Rl=Object.freeze({__proto__:null,Snapshot:oE,MutableSnapshot:iE,freshSnapshot:sE,cloneSnapshot:lE});function aE(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var uE=aE;const{useRef:cE}=fe;function fE(e){const t=cE(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var Hd=fE;const{getNextTreeStateVersion:dE,makeEmptyStoreState:ey}=Nv,{cleanUpNode:pE,getDownstreamNodes:hE,initializeNode:mE,setNodeValue:vE,setUnvalidatedAtomValue_DEPRECATED:yE}=Pn,{graph:gE}=di,{cloneGraph:_E}=di,{getNextStoreID:ty}=vl,{createMutableSource:ya,reactMode:ny}=fi,{applyAtomValueWrites:SE}=Wt,{releaseScheduledRetainablesNow:ry}=rr,{freshSnapshot:wE}=Rl,{useCallback:EE,useContext:oy,useEffect:xu,useMemo:RE,useRef:TE,useState:kE}=fe;function co(){throw ee("This component must be used inside a component.")}const iy=Object.freeze({storeID:ty(),getState:co,replaceState:co,getGraph:co,subscribeToTransactions:co,addTransactionMetadata:co});let Au=!1;function Gd(e){if(Au)throw ee("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){de("recoil_memory_managament_2020")&&de("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&ry(e);const n=t.currentTree.version,r=dE();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,_E(Re(t.graphsByVersion.get(n))))}}const sy=fe.createContext({current:iy}),Tl=()=>oy(sy),ly=fe.createContext(null);function bE(){return oy(ly)}function tf(e,t,n){const r=hE(e,n,n.dirtyAtoms);for(const o of r){const i=t.nodeToComponentSubscriptions.get(o);if(i)for(const[s,[l,a]]of i)a(n)}}function ay(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[s,l]of i)l(e);for(const[o,i]of t.transactionSubscriptions)i(e);(!ny().early||t.suspendedComponentResolvers.size>0)&&(tf(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function CE(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,ay(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):Gc("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,de("recoil_memory_managament_2020")&&n==null&&ry(e)}finally{t.commitDepth--}}function xE({setNotifyBatcherOfChange:e}){const t=Tl(),[,n]=kE([]);return e(()=>n({})),xu(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),xu(()=>{sS.enqueueExecution("Batcher",()=>{CE(t.current)})}),null}function AE(e,t){const n=ey();return t({set:(r,o)=>{const i=n.currentTree,s=vE(e,i,r.key,o),l=new Set(s.keys()),a=i.nonvalidatedAtoms.clone();for(const u of l)a.delete(u);n.currentTree={...i,dirtyAtoms:uE(i.dirtyAtoms,l),atomValues:SE(i.atomValues,s),nonvalidatedAtoms:a}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=yE(n.currentTree,i,o)})}}),n}function NE(e){const t=wE(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let Kd=0;function LE({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=_=>{const v=o.current.graphsByVersion;if(v.has(_))return Re(v.get(_));const g=gE();return v.set(_,g),g},s=(_,v)=>{if(v==null){const{transactionSubscriptions:g}=d.current.getState(),P=Kd++;return g.set(P,_),{release:()=>{g.delete(P)}}}else{const{nodeTransactionSubscriptions:g}=d.current.getState();g.has(v)||g.set(v,new Map);const P=Kd++;return Re(g.get(v)).set(P,_),{release:()=>{const h=g.get(v);h&&(h.delete(P),h.size===0&&g.delete(v))}}}},l=_=>{Gd(d.current);for(const v of Object.keys(_))Re(d.current.getState().nextTree).transactionMetadata[v]=_[v]},a=_=>{Gd(d.current);const v=Re(o.current.nextTree);let g;try{Au=!0,g=_(v)}finally{Au=!1}g!==v&&(o.current.nextTree=g,ny().early&&tf(d.current,o.current,g),Re(u.current)())},u=TE(null),f=EE(_=>{u.current=_},[u]),d=Hd(()=>n??{storeID:ty(),getState:()=>o.current,replaceState:a,getGraph:i,subscribeToTransactions:s,addTransactionMetadata:l});n!=null&&(d.current=n),o=Hd(()=>e!=null?AE(d.current,e):t!=null?NE(t):ey());const p=RE(()=>ya==null?void 0:ya(o,()=>o.current.currentTree.version),[o]);return xu(()=>{const _=d.current;for(const v of new Set(_.getState().knownAtoms))mE(_,v,"get");return()=>{for(const v of _.getState().knownAtoms)pE(_,v)}},[d]),fe.createElement(sy.Provider,{value:d},fe.createElement(ly.Provider,{value:p},fe.createElement(xE,{setNotifyBatcherOfChange:f}),r))}function $E(e){const{override:t,...n}=e,r=Tl();return t===!1&&r.current!==iy?e.children:fe.createElement(LE,n)}function PE(){return Tl().current.storeID}var ln={RecoilRoot:$E,useStoreRef:Tl,useRecoilMutableSource:bE,useRecoilStoreID:PE,notifyComponents_FOR_TESTING:tf,sendEndOfBatchNotifications_FOR_TESTING:ay};function OE(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var uy=VE;const{useStoreRef:UE}=ln,{SUSPENSE_TIMEOUT_MS:zE}=rr,{updateRetainCount:fo}=rr,{RetentionZone:BE}=yl,{useEffect:FE,useRef:jE}=fe,{isSSR:qd}=Sl;function WE(e){if(de("recoil_memory_managament_2020"))return HE(e)}function HE(e){const n=(Array.isArray(e)?e:[e]).map(s=>s instanceof BE?s:s.key),r=UE();FE(()=>{if(!de("recoil_memory_managament_2020"))return;const s=r.current;if(o.current&&!qd)window.clearTimeout(o.current),o.current=null;else for(const l of n)fo(s,l,1);return()=>{for(const l of n)fo(s,l,-1)}},[r,...n]);const o=jE(),i=uy(n);if(!qd&&(i===void 0||!IE(i,n))){const s=r.current;for(const l of n)fo(s,l,1);if(i)for(const l of i)fo(s,l,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const l of n)fo(s,l,-1)},zE)}}var nf=WE;function GE(){return""}var hi=GE;const{batchUpdates:KE}=_l,{DEFAULT_VALUE:cy}=at,{currentRendererSupportsUseSyncExternalStore:qE,reactMode:Hr,useMutableSource:QE,useSyncExternalStore:YE}=fi,{useRecoilMutableSource:XE,useStoreRef:Ht}=ln,{AbstractRecoilValue:Nu,getRecoilValueAsLoadable:mi,setRecoilValue:Fs,setUnvalidatedRecoilValue:ZE,subscribeToRecoilValue:Dr}=Wt,{useCallback:lt,useEffect:Vr,useMemo:fy,useRef:Vo,useState:rf}=fe,{setByAddingToSet:JE}=$v,{isSSR:eR}=Sl;function of(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const i=n.current.getState().suspendedComponentResolvers;i.add(o),eR&&ye(e.contents)&&e.contents.finally(()=>{i.delete(o)})}):e.state==="hasError"?e.contents:ee(`Invalid value of loadable atom "${t.key}"`)}function tR(){const e=hi(),t=Ht(),[,n]=rf([]),r=Vo(new Set);r.current=new Set;const o=Vo(new Set),i=Vo(new Map),s=lt(a=>{const u=i.current.get(a);u&&(u.release(),i.current.delete(a))},[i]),l=lt((a,u)=>{i.current.has(u)&&n([])},[]);return Vr(()=>{const a=t.current;Mo(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const f=Dr(a,new Nu(u),p=>l(p,u),e);i.current.set(u,f),a.getState().nextTree?a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{l(a.getState(),u)}):l(a.getState(),u)}),Mo(o.current,r.current).forEach(u=>{s(u)}),o.current=r.current}),Vr(()=>{const a=i.current;return Mo(r.current,new Set(a.keys())).forEach(u=>{const f=Dr(t.current,new Nu(u),d=>l(d,u),e);a.set(u,f)}),()=>a.forEach((u,f)=>s(f))},[e,t,s,l]),fy(()=>{function a(v){return g=>{Fs(t.current,v,g)}}function u(v){return()=>Fs(t.current,v,cy)}function f(v){var g;r.current.has(v.key)||(r.current=JE(r.current,v.key));const P=t.current.getState();return mi(t.current,v,Hr().early&&(g=P.nextTree)!==null&&g!==void 0?g:P.currentTree)}function d(v){const g=f(v);return of(g,v,t)}function p(v){return[d(v),a(v)]}function _(v){return[f(v),a(v)]}return{getRecoilValue:d,getRecoilValueLoadable:f,getRecoilState:p,getRecoilStateLoadable:_,getSetRecoilState:a,getResetRecoilState:u}},[r,t])}const nR={current:0};function rR(e){const t=Ht(),n=hi(),r=lt(()=>{var l;const a=t.current,u=a.getState(),f=Hr().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return{loadable:mi(a,e,f),key:e.key}},[t,e]),o=lt(l=>{let a;return()=>{var u,f;const d=l();return(u=a)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((f=a)===null||f===void 0?void 0:f.key)===d.key?a:(a=d,d)}},[]),i=fy(()=>o(r),[r,o]),s=lt(l=>{const a=t.current;return Dr(a,e,l,n).release},[t,e,n]);return YE(s,i,i).loadable}function oR(e){const t=Ht(),n=lt(()=>{var u;const f=t.current,d=f.getState(),p=Hr().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return mi(f,e,p)},[t,e]),r=lt(()=>n(),[n]),o=hi(),i=lt((u,f)=>{const d=t.current;return Dr(d,e,()=>{if(!de("recoil_suppress_rerender_in_callback"))return f();const _=n();a.current.is(_)||f(),a.current=_},o).release},[t,e,o,n]),s=XE();if(s==null)throw ee("Recoil hooks must be used in components contained within a component.");const l=QE(s,r,i),a=Vo(l);return Vr(()=>{a.current=l}),l}function Lu(e){const t=Ht(),n=hi(),r=lt(()=>{var a;const u=t.current,f=u.getState(),d=Hr().early&&(a=f.nextTree)!==null&&a!==void 0?a:f.currentTree;return mi(u,e,d)},[t,e]),o=lt(()=>({loadable:r(),key:e.key}),[r,e.key]),i=lt(a=>{const u=o();return a.loadable.is(u.loadable)&&a.key===u.key?a:u},[o]);Vr(()=>{const a=Dr(t.current,e,u=>{l(i)},n);return l(i),a.release},[n,e,t,i]);const[s,l]=rf(o);return s.key!==e.key?o().loadable:s.loadable}function iR(e){const t=Ht(),[,n]=rf([]),r=hi(),o=lt(()=>{var l;const a=t.current,u=a.getState(),f=Hr().early&&(l=u.nextTree)!==null&&l!==void 0?l:u.currentTree;return mi(a,e,f)},[t,e]),i=o(),s=Vo(i);return Vr(()=>{s.current=i}),Vr(()=>{const l=t.current,a=l.getState(),u=Dr(l,e,d=>{var p;if(!de("recoil_suppress_rerender_in_callback"))return n([]);const _=o();(p=s.current)!==null&&p!==void 0&&p.is(_)||n(_),s.current=_},r);if(a.nextTree)l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var f;if(!de("recoil_suppress_rerender_in_callback"))return n([]);const d=o();(f=s.current)!==null&&f!==void 0&&f.is(d)||n(d),s.current=d}return u.release},[r,o,e,t]),i}function sf(e){return de("recoil_memory_managament_2020")&&nf(e),{TRANSITION_SUPPORT:Lu,SYNC_EXTERNAL_STORE:qE()?rR:Lu,MUTABLE_SOURCE:oR,LEGACY:iR}[Hr().mode](e)}function dy(e){const t=Ht(),n=sf(e);return of(n,e,t)}function kl(e){const t=Ht();return lt(n=>{Fs(t.current,e,n)},[t,e])}function sR(e){const t=Ht();return lt(()=>{Fs(t.current,e,cy)},[t,e])}function lR(e){return[dy(e),kl(e)]}function aR(e){return[sf(e),kl(e)]}function uR(){const e=Ht();return(t,n={})=>{KE(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>ZE(e.current,new Nu(o),r))})}}function py(e){return de("recoil_memory_managament_2020")&&nf(e),Lu(e)}function hy(e){const t=Ht(),n=py(e);return of(n,e,t)}function cR(e){return[hy(e),kl(e)]}var fR={recoilComponentGetRecoilValueCount_FOR_TESTING:nR,useRecoilInterface:tR,useRecoilState:lR,useRecoilStateLoadable:aR,useRecoilValue:dy,useRecoilValueLoadable:sf,useResetRecoilState:sR,useSetRecoilState:kl,useSetUnvalidatedAtomValues:uR,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:py,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:hy,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:cR};function dR(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var pR=dR;function hR(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var mR=hR;function vR(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function Xd(e){const t=e.atomValues.toMap(),n=Bs(pR(t,(r,o)=>{const s=my(o).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return yR(e.nonvalidatedAtoms.toMap(),n)}function kR(e){Cl(bl(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=Xd(r),i=Xd(n),s=Bs(SR,a=>{var u,f,d,p;return{persistence_UNSTABLE:{type:(u=(f=a.persistence_UNSTABLE)===null||f===void 0?void 0:f.type)!==null&&u!==void 0?u:"none",backButton:(d=(p=a.persistence_UNSTABLE)===null||p===void 0?void 0:p.backButton)!==null&&d!==void 0?d:!1}}}),l=mR(r.dirtyAtoms,a=>o.has(a)||i.has(a));e({atomValues:o,previousAtomValues:i,atomInfo:s,modifiedAtoms:l,transactionMetadata:{...r.transactionMetadata}})},[e]))}function bR(e){Cl(bl(t=>{const n=js(t,"latest"),r=js(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function CR(){const e=lf(),[t,n]=TR(()=>js(e.current)),r=uy(t),o=Qd(),i=Qd();if(Cl(bl(l=>n(js(l)),[])),vy(()=>{const l=t.retain();if(o.current&&!Yd){var a;window.clearTimeout(o.current),o.current=null,(a=i.current)===null||a===void 0||a.call(i),i.current=null}return()=>{window.setTimeout(l,10)}},[t]),r!==t&&!Yd){if(o.current){var s;window.clearTimeout(o.current),o.current=null,(s=i.current)===null||s===void 0||s.call(i),i.current=null}i.current=t.retain(),o.current=window.setTimeout(()=>{var l;o.current=null,(l=i.current)===null||l===void 0||l.call(i),i.current=null},RR)}return t}function yy(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;gR(()=>{const s=new Set;for(const u of[o.atomValues.keys(),i.atomValues.keys()])for(const f of u){var l,a;((l=o.atomValues.get(f))===null||l===void 0?void 0:l.contents)!==((a=i.atomValues.get(f))===null||a===void 0?void 0:a.contents)&&my(f).shouldRestoreFromSnapshots&&s.add(f)}s.forEach(u=>{ER(e,new wR(u),i.atomValues.has(u)?Re(i.atomValues.get(u)):_R)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function xR(){const e=lf();return bl(t=>yy(e.current,t),[e])}var gy={useRecoilSnapshot:CR,gotoSnapshot:yy,useGotoRecoilSnapshot:xR,useRecoilTransactionObserver:bR,useTransactionObservation_DEPRECATED:kR,useTransactionSubscription_DEPRECATED:Cl};const{peekNodeInfo:AR}=Pn,{useStoreRef:NR}=ln;function LR(){const e=NR();return({key:t})=>AR(e.current,e.current.getState().currentTree,t)}var $R=LR;const{reactMode:PR}=fi,{RecoilRoot:OR,useStoreRef:IR}=ln,{useMemo:MR}=fe;function DR(){PR().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=IR().current;return MR(()=>{function t({children:n}){return fe.createElement(OR,{store_INTERNAL:e},n)}return t},[e])}var VR=DR;const{loadableWithValue:UR}=ci,{initializeNode:zR}=Pn,{DEFAULT_VALUE:BR,getNode:FR}=at,{copyTreeState:jR,getRecoilValueAsLoadable:WR,invalidateDownstreams:HR,writeLoadableToTreeState:GR}=Wt;function Zd(e){return FR(e.key).nodeType==="atom"}class KR{constructor(t,n){Z(this,"_store",void 0),Z(this,"_treeState",void 0),Z(this,"_changes",void 0),Z(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!Zd(r))throw ee("Reading selectors within atomicUpdate is not supported");const o=WR(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:ee(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Z(this,"set",(r,o)=>{if(!Zd(r))throw ee("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const i=this.get(r);this._changes.set(r.key,o(i))}else zR(this._store,r.key,"set"),this._changes.set(r.key,o)}),Z(this,"reset",r=>{this.set(r,BR)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=jR(this._treeState);for(const[n,r]of this._changes)GR(t,n,UR(r));return HR(this._store,t),t}}function qR(e){return t=>{e.replaceState(n=>{const r=new KR(e,n);return t(r),r.newTreeState_INTERNAL()})}}var QR={atomicUpdater:qR},YR=QR.atomicUpdater,_y=Object.freeze({__proto__:null,atomicUpdater:YR});function XR(e,t){if(!e)throw new Error(t)}var ZR=XR,ko=ZR;const{atomicUpdater:JR}=_y,{batchUpdates:eT}=_l,{DEFAULT_VALUE:tT}=at,{useStoreRef:nT}=ln,{refreshRecoilValue:rT,setRecoilValue:Jd}=Wt,{cloneSnapshot:oT}=Rl,{gotoSnapshot:iT}=gy,{useCallback:sT}=fe;class Sy{}const lT=new Sy;function wy(e,t,n,r){let o=lT,i;if(eT(()=>{const l="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw ee(l);const a=Pv({...r??{},set:(f,d)=>Jd(e,f,d),reset:f=>Jd(e,f,tT),refresh:f=>rT(e,f),gotoSnapshot:f=>iT(e,f),transact_UNSTABLE:f=>JR(e)(f)},{snapshot:()=>{const f=oT(e);return i=f.retain(),f}}),u=t(a);if(typeof u!="function")throw ee(l);o=u(...n)}),o instanceof Sy&&ko(!1),ye(o))o=o.finally(()=>{var l;(l=i)===null||l===void 0||l()});else{var s;(s=i)===null||s===void 0||s()}return o}function aT(e,t){const n=nT();return sT((...r)=>wy(n.current,e,r),t!=null?[...t,n]:void 0)}var Ey={recoilCallback:wy,useRecoilCallback:aT};const{useStoreRef:uT}=ln,{refreshRecoilValue:cT}=Wt,{useCallback:fT}=fe;function dT(e){const t=uT();return fT(()=>{const n=t.current;cT(n,e)},[e,t])}var pT=dT;const{atomicUpdater:hT}=_y,{useStoreRef:mT}=ln,{useMemo:vT}=fe;function yT(e,t){const n=mT();return vT(()=>(...r)=>{hT(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var gT=yT;class _T{constructor(t){Z(this,"value",void 0),this.value=t}}var ST={WrappedValue:_T},wT=ST.WrappedValue,Ry=Object.freeze({__proto__:null,WrappedValue:wT});const{isFastRefreshEnabled:ET}=fi;class ep extends Error{}class RT{constructor(t){var n,r,o;Z(this,"_name",void 0),Z(this,"_numLeafs",void 0),Z(this,"_root",void 0),Z(this,"_onHit",void 0),Z(this,"_onSet",void 0),Z(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:i=>i}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var i,s,l,a;let u,f;for(const[P,h]of t){var d,p,_;const c=this._root;if((c==null?void 0:c.type)==="leaf")throw this.invalidCacheError();const m=u;if(u=m?m.branches.get(f):c,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:P,parent:m,branches:new Map,branchKey:f},u.type!=="branch"||u.nodeKey!==P)throw this.invalidCacheError();m==null||m.branches.set(f,u),r==null||(p=r.onNodeVisit)===null||p===void 0||p.call(r,u),f=this._mapNodeValue(h),this._root=(_=this._root)!==null&&_!==void 0?_:u}const v=u?(i=u)===null||i===void 0?void 0:i.branches.get(f):this._root;if(v!=null&&(v.type!=="leaf"||v.branchKey!==f))throw this.invalidCacheError();const g={type:"leaf",value:n,parent:u,branchKey:f};(s=u)===null||s===void 0||s.branches.set(f,g),this._root=(l=this._root)!==null&&l!==void 0?l:g,this._numLeafs++,this._onSet(g),r==null||(a=r.onNodeVisit)===null||a===void 0||a.call(r,g)};try{o()}catch(i){if(i instanceof ep)this.clear(),o();else throw i}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,o=t.branchKey;for(;r;){var i;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(i=r)===null||i===void 0?void 0:i.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=ET()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw Gc(t+(this._name!=null?` - ${this._name}`:"")),new ep}}var TT={TreeCache:RT},kT=TT.TreeCache,Ty=Object.freeze({__proto__:null,TreeCache:kT});class bT{constructor(t){var n;Z(this,"_maxSize",void 0),Z(this,"_size",void 0),Z(this,"_head",void 0),Z(this,"_tail",void 0),Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const i=this.head(),s={key:t,right:i,left:null,value:n};i?i.left=s:this._tail=s,this._map.set(r,s),this._head=s,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Re(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var CT={LRUCache:bT},xT=CT.LRUCache,ky=Object.freeze({__proto__:null,LRUCache:xT});const{LRUCache:AT}=ky,{TreeCache:NT}=Ty;function LT({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new AT({maxSize:t}),o=new NT({name:e,mapNodeValue:n,onHit:i=>{r.set(i,!0)},onSet:i=>{const s=r.tail();r.set(i,!0),s&&o.size()>t&&o.delete(s.key)}});return o}var tp=LT;function xt(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw ee("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(ye(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>xt(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return xt(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,s]of e)o[typeof i=="string"?i:xt(i,t)]=s;return xt(o,t,n)}return e instanceof Set?xt(Array.from(e).sort((o,i)=>xt(o,t).localeCompare(xt(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?xt(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${xt(o,t)}:${xt(e[o],t,o)}`).join(",")}}`}function $T(e,t={allowFunctions:!1}){return xt(e,t)}var xl=$T;const{TreeCache:PT}=Ty,zi={equality:"reference",eviction:"keep-all",maxSize:1/0};function OT({equality:e=zi.equality,eviction:t=zi.eviction,maxSize:n=zi.maxSize}=zi,r){const o=IT(e);return MT(t,n,o,r)}function IT(e){switch(e){case"reference":return t=>t;case"value":return t=>xl(t)}throw ee(`Unrecognized equality policy ${e}`)}function MT(e,t,n,r){switch(e){case"keep-all":return new PT({name:r,mapNodeValue:n});case"lru":return tp({name:r,maxSize:Re(t),mapNodeValue:n});case"most-recent":return tp({name:r,maxSize:1,mapNodeValue:n})}throw ee(`Unrecognized eviction policy ${e}`)}var DT=OT;function VT(e){return()=>null}var UT={startPerfBlock:VT};const{isLoadable:zT,loadableWithError:Bi,loadableWithPromise:BT,loadableWithValue:ga}=ci,{WrappedValue:by}=Ry,{getNodeLoadable:Fi,peekNodeLoadable:FT,setNodeValue:jT}=Pn,{saveDepsToStore:WT}=di,{DEFAULT_VALUE:HT,getConfigDeletionHandler:GT,getNode:KT,registerNode:np}=at,{isRecoilValue:qT}=Mr,{markRecoilValueModified:rp}=Wt,{retainedByOptionWithDefault:QT}=rr,{recoilCallback:YT}=Ey,{startPerfBlock:XT}=UT;class Cy{}const po=new Cy,ho=[],ji=new Map,ZT=(()=>{let e=0;return()=>e++})();function xy(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,i=e.set!=null?e.set:void 0,s=new Set,l=DT(o??{equality:"reference",eviction:"keep-all"},n),a=QT(e.retainedBy_UNSTABLE),u=new Map;let f=0;function d(){return!de("recoil_memory_managament_2020")||f>0}function p(w){return w.getState().knownSelectors.add(n),f++,()=>{f--}}function _(){return GT(n)!==void 0&&!d()}function v(w,C,x,z,D){xe(C,z,D),g(w,x)}function g(w,C){ue(w,C)&&B(w),h(C,!0)}function P(w,C){ue(w,C)&&(Re($(w)).stateVersions.clear(),h(C,!1))}function h(w,C){const x=ji.get(w);if(x!=null){for(const z of x)rp(z,Re(t));C&&ji.delete(w)}}function c(w,C){let x=ji.get(C);x==null&&ji.set(C,x=new Set),x.add(w)}function m(w,C,x,z,D,X){return C.then(te=>{if(!d())throw B(w),po;const j=ga(te);return v(w,x,D,j,z),te}).catch(te=>{if(!d())throw B(w),po;if(ye(te))return R(w,te,x,z,D,X);const j=Bi(te);throw v(w,x,D,j,z),te})}function R(w,C,x,z,D,X){return C.then(te=>{if(!d())throw B(w),po;X.loadingDepKey!=null&&X.loadingDepPromise===C?x.atomValues.set(X.loadingDepKey,ga(te)):w.getState().knownSelectors.forEach(ce=>{x.atomValues.delete(ce)});const j=T(w,x);if(j&&j.state!=="loading"){if((ue(w,D)||$(w)==null)&&g(w,D),j.state==="hasValue")return j.contents;throw j.contents}if(!ue(w,D)){const ce=A(w,x);if(ce!=null)return ce.loadingLoadable.contents}const[_e,Me]=k(w,x,D);if(_e.state!=="loading"&&v(w,x,D,_e,Me),_e.state==="hasError")throw _e.contents;return _e.contents}).catch(te=>{if(te instanceof Cy)throw po;if(!d())throw B(w),po;const j=Bi(te);throw v(w,x,D,j,z),te})}function b(w,C,x,z){var D,X,te,j;if(ue(w,z)||C.version===((D=w.getState())===null||D===void 0||(X=D.currentTree)===null||X===void 0?void 0:X.version)||C.version===((te=w.getState())===null||te===void 0||(j=te.nextTree)===null||j===void 0?void 0:j.version)){var _e,Me,ce;WT(n,x,w,(_e=(Me=w.getState())===null||Me===void 0||(ce=Me.nextTree)===null||ce===void 0?void 0:ce.version)!==null&&_e!==void 0?_e:w.getState().currentTree.version)}for(const Se of x)s.add(Se)}function k(w,C,x){const z=XT(n);let D=!0,X=!0;const te=()=>{z(),X=!1};let j,_e=!1,Me;const ce={loadingDepKey:null,loadingDepPromise:null},Se=new Map;function vt({key:Ye}){const He=Fi(w,C,Ye);switch(Se.set(Ye,He),D||(b(w,C,new Set(Se.keys()),x),P(w,x)),He.state){case"hasValue":return He.contents;case"hasError":throw He.contents;case"loading":throw ce.loadingDepKey=Ye,ce.loadingDepPromise=He.contents,He.contents}throw ee("Invalid Loadable state")}const Kt=Ye=>(...He)=>{if(X)throw ee("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&ko(!1),YT(w,Ye,He,{node:t})};try{j=r({get:vt,getCallback:Kt}),j=qT(j)?vt(j):j,zT(j)&&(j.state==="hasError"&&(_e=!0),j=j.contents),ye(j)?j=m(w,j,C,Se,x,ce).finally(te):te(),j=j instanceof by?j.value:j}catch(Ye){j=Ye,ye(j)?j=R(w,j,C,Se,x,ce).finally(te):(_e=!0,te())}return _e?Me=Bi(j):ye(j)?Me=BT(j):Me=ga(j),D=!1,Q(w,x,Se),b(w,C,new Set(Se.keys()),x),[Me,Se]}function T(w,C){let x=C.atomValues.get(n);if(x!=null)return x;const z=new Set;try{x=l.get(X=>(typeof X!="string"&&ko(!1),Fi(w,C,X).contents),{onNodeVisit:X=>{X.type==="branch"&&X.nodeKey!==n&&z.add(X.nodeKey)}})}catch(X){throw ee(`Problem with cache lookup for selector "${n}": ${X.message}`)}if(x){var D;C.atomValues.set(n,x),b(w,C,z,(D=$(w))===null||D===void 0?void 0:D.executionID)}return x}function E(w,C){const x=T(w,C);if(x!=null)return B(w),x;const z=A(w,C);if(z!=null){var D;return((D=z.loadingLoadable)===null||D===void 0?void 0:D.state)==="loading"&&c(w,z.executionID),z.loadingLoadable}const X=ZT(),[te,j]=k(w,C,X);return te.state==="loading"?(Y(w,X,te,j,C),c(w,X)):(B(w),xe(C,te,j)),te}function A(w,C){const x=Yv([u.has(w)?[Re(u.get(w))]:[],ml(Xc(u,([D])=>D!==w),([,D])=>D)]);function z(D){for(const[X,te]of D)if(!Fi(w,C,X).is(te))return!0;return!1}for(const D of x){if(D.stateVersions.get(C.version)||!z(D.depValuesDiscoveredSoFarDuringAsyncWork))return D.stateVersions.set(C.version,!0),D;D.stateVersions.set(C.version,!1)}}function $(w){return u.get(w)}function Y(w,C,x,z,D){u.set(w,{depValuesDiscoveredSoFarDuringAsyncWork:z,executionID:C,loadingLoadable:x,stateVersions:new Map([[D.version,!0]])})}function Q(w,C,x){if(ue(w,C)){const z=$(w);z!=null&&(z.depValuesDiscoveredSoFarDuringAsyncWork=x)}}function B(w){u.delete(w)}function ue(w,C){var x;return C===((x=$(w))===null||x===void 0?void 0:x.executionID)}function ut(w){return Array.from(w.entries()).map(([C,x])=>[C,x.contents])}function xe(w,C,x){w.atomValues.set(n,C);try{l.set(ut(x),C)}catch(z){throw ee(`Problem with setting cache for selector "${n}": ${z.message}`)}}function $e(w){if(ho.includes(n)){const C=`Recoil selector has circular dependencies: ${ho.slice(ho.indexOf(n)).join(" → ")}`;return Bi(ee(C))}ho.push(n);try{return w()}finally{ho.pop()}}function O(w,C){const x=C.atomValues.get(n);return x??l.get(z=>{var D;return typeof z!="string"&&ko(!1),(D=FT(w,C,z))===null||D===void 0?void 0:D.contents})}function F(w,C){return $e(()=>E(w,C))}function H(w){w.atomValues.delete(n)}function se(w,C){t==null&&ko(!1);for(const z of s){var x;const D=KT(z);(x=D.clearCache)===null||x===void 0||x.call(D,w,C)}s.clear(),H(C),l.clear(),rp(w,t)}return i!=null?t=np({key:n,nodeType:"selector",peek:O,get:F,set:(C,x,z)=>{let D=!1;const X=new Map;function te({key:ce}){if(D)throw ee("Recoil: Async selector sets are not currently supported.");const Se=Fi(C,x,ce);if(Se.state==="hasValue")return Se.contents;if(Se.state==="loading"){const vt=`Getting value of asynchronous atom or selector "${ce}" in a pending state while setting selector "${n}" is not yet supported.`;throw ee(vt)}else throw Se.contents}function j(ce,Se){if(D)throw ee("Recoil: Async selector sets are not currently supported.");const vt=typeof Se=="function"?Se(te(ce)):Se;jT(C,x,ce.key,vt).forEach((Ye,He)=>X.set(He,Ye))}function _e(ce){j(ce,HT)}const Me=i({set:j,get:te,reset:_e},z);if(Me!==void 0)throw ye(Me)?ee("Recoil: Async selector sets are not currently supported."):ee("Recoil: selector set should be a void function.");return D=!0,X},init:p,invalidate:H,clearCache:se,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:a}):t=np({key:n,nodeType:"selector",peek:O,get:F,init:p,invalidate:H,clearCache:se,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:a})}xy.value=e=>new by(e);var Ur=xy;const{isLoadable:JT,loadableWithError:_a,loadableWithPromise:Sa,loadableWithValue:sr}=ci,{WrappedValue:Ay}=Ry,{peekNodeInfo:ek}=Pn,{DEFAULT_VALUE:Un,DefaultValue:pn,getConfigDeletionHandler:Ny,registerNode:tk,setConfigDeletionHandler:nk}=at,{isRecoilValue:rk}=Mr,{getRecoilValueAsLoadable:ok,markRecoilValueModified:ik,setRecoilValue:op,setRecoilValueLoadable:sk}=Wt,{retainedByOptionWithDefault:lk}=rr,mo=e=>e instanceof Ay?e.value:e;function ak(e){const{key:t,persistence_UNSTABLE:n}=e,r=lk(e.retainedBy_UNSTABLE);let o=0;function i(c){return Sa(c.then(m=>(s=sr(m),m)).catch(m=>{throw s=_a(m),m}))}let s=ye(e.default)?i(e.default):JT(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:sr(mo(e.default));s.contents;let l;const a=new Map;function u(c){return c}function f(c,m){const R=m.then(b=>{var k,T;return((T=((k=c.getState().nextTree)!==null&&k!==void 0?k:c.getState().currentTree).atomValues.get(t))===null||T===void 0?void 0:T.contents)===R&&op(c,h,b),b}).catch(b=>{var k,T;throw((T=((k=c.getState().nextTree)!==null&&k!==void 0?k:c.getState().currentTree).atomValues.get(t))===null||T===void 0?void 0:T.contents)===R&&sk(c,h,_a(b)),b});return R}function d(c,m,R){var b;o++;const k=()=>{var B;o--,(B=a.get(c))===null||B===void 0||B.forEach(ue=>ue()),a.delete(c)};if(c.getState().knownAtoms.add(t),s.state==="loading"){const B=()=>{var ue;((ue=c.getState().nextTree)!==null&&ue!==void 0?ue:c.getState().currentTree).atomValues.has(t)||ik(c,h)};s.contents.finally(B)}const T=(b=e.effects)!==null&&b!==void 0?b:e.effects_UNSTABLE;if(T!=null){let $e=function(C){if(ue&&C.key===t){const x=B;return x instanceof pn?p(c,m):ye(x)?Sa(x.then(z=>z instanceof pn?s.toPromise():z)):sr(x)}return ok(c,C)},O=function(C){return $e(C).toPromise()},F=function(C){var x;const z=ek(c,(x=c.getState().nextTree)!==null&&x!==void 0?x:c.getState().currentTree,C.key);return ue&&C.key===t&&!(B instanceof pn)?{...z,isSet:!0,loadable:$e(C)}:z};var $=$e,Y=O,Q=F;let B=Un,ue=!0,ut=!1,xe=null;const H=C=>x=>{if(ue){const z=$e(h),D=z.state==="hasValue"?z.contents:Un;B=typeof x=="function"?x(D):x,ye(B)&&(B=B.then(X=>(xe={effect:C,value:X},X)))}else{if(ye(x))throw ee("Setting atoms to async values is not implemented.");typeof x!="function"&&(xe={effect:C,value:mo(x)}),op(c,h,typeof x=="function"?z=>{const D=mo(x(z));return xe={effect:C,value:D},D}:mo(x))}},se=C=>()=>H(C)(Un),w=C=>x=>{var z;const{release:D}=c.subscribeToTransactions(X=>{var te;let{currentTree:j,previousTree:_e}=X.getState();_e||(_e=j);const Me=(te=j.atomValues.get(t))!==null&&te!==void 0?te:s;if(Me.state==="hasValue"){var ce,Se,vt,Kt;const Ye=Me.contents,He=(ce=_e.atomValues.get(t))!==null&&ce!==void 0?ce:s,Si=He.state==="hasValue"?He.contents:Un;((Se=xe)===null||Se===void 0?void 0:Se.effect)!==C||((vt=xe)===null||vt===void 0?void 0:vt.value)!==Ye?x(Ye,Si,!j.atomValues.has(t)):((Kt=xe)===null||Kt===void 0?void 0:Kt.effect)===C&&(xe=null)}},t);a.set(c,[...(z=a.get(c))!==null&&z!==void 0?z:[],D])};for(const C of T)try{const x=C({node:h,storeID:c.storeID,parentStoreID_UNSTABLE:c.parentStoreID,trigger:R,setSelf:H(C),resetSelf:se(C),onSet:w(C),getPromise:O,getLoadable:$e,getInfo_UNSTABLE:F});if(x!=null){var E;a.set(c,[...(E=a.get(c))!==null&&E!==void 0?E:[],x])}}catch(x){B=x,ut=!0}if(ue=!1,!(B instanceof pn)){var A;const C=ut?_a(B):ye(B)?Sa(f(c,B)):sr(mo(B));C.contents,m.atomValues.set(t,C),(A=c.getState().nextTree)===null||A===void 0||A.atomValues.set(t,C)}}return k}function p(c,m){var R,b;return(R=(b=m.atomValues.get(t))!==null&&b!==void 0?b:l)!==null&&R!==void 0?R:s}function _(c,m){if(m.atomValues.has(t))return Re(m.atomValues.get(t));if(m.nonvalidatedAtoms.has(t)){if(l!=null)return l;if(n==null)return s;const R=m.nonvalidatedAtoms.get(t),b=n.validator(R,Un);return l=b instanceof pn?s:sr(b),l}else return s}function v(){l=void 0}function g(c,m,R){if(m.atomValues.has(t)){const b=Re(m.atomValues.get(t));if(b.state==="hasValue"&&R===b.contents)return new Map}else if(!m.nonvalidatedAtoms.has(t)&&R instanceof pn)return new Map;return l=void 0,new Map().set(t,sr(R))}function P(){return Ny(t)!==void 0&&o<=0}const h=tk({key:t,nodeType:"atom",peek:p,get:_,set:g,init:d,invalidate:v,shouldDeleteConfigOnRelease:P,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return h}function af(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return rk(n)?uk({...t,default:n}):ak({...t,default:n})}function uk(e){const t=af({...e,default:Un,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof pn?r:Re(e.persistence_UNSTABLE).validator(r,Un)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Ur({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof pn?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return nk(n.key,Ny(e.key)),n}af.value=e=>new Ay(e);var Ly=af;let ck=class{constructor(t){var n;Z(this,"_map",void 0),Z(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}};var fk={MapCache:ck},dk=fk.MapCache,pk=Object.freeze({__proto__:null,MapCache:dk});const{LRUCache:ip}=ky,{MapCache:hk}=pk,Wi={equality:"reference",eviction:"none",maxSize:1/0};function mk({equality:e=Wi.equality,eviction:t=Wi.eviction,maxSize:n=Wi.maxSize}=Wi){const r=vk(e);return yk(t,n,r)}function vk(e){switch(e){case"reference":return t=>t;case"value":return t=>xl(t)}throw ee(`Unrecognized equality policy ${e}`)}function yk(e,t,n){switch(e){case"keep-all":return new hk({mapKey:n});case"lru":return new ip({mapKey:n,maxSize:Re(t)});case"most-recent":return new ip({mapKey:n,maxSize:1})}throw ee(`Unrecognized eviction policy ${e}`)}var $y=mk;const{setConfigDeletionHandler:gk}=at;function _k(e){var t,n;const r=$y({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i,s;const l=r.get(o);if(l!=null)return l;const{cachePolicyForParams_UNSTABLE:a,...u}=e,f="default"in e?e.default:new Promise(()=>{}),d=Ly({...u,key:`${e.key}__${(i=xl(o))!==null&&i!==void 0?i:"void"}`,default:typeof f=="function"?f(o):f,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(s=e.effects)!==null&&s!==void 0?s:e.effects_UNSTABLE});return r.set(o,d),gk(d.key,()=>{r.delete(o)}),d}}var Sk=_k;const{setConfigDeletionHandler:wk}=at;let Ek=0;function Rk(e){var t,n;const r=$y({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let s;try{s=r.get(o)}catch(p){throw ee(`Problem with cache lookup for selector ${e.key}: ${p.message}`)}if(s!=null)return s;const l=`${e.key}__selectorFamily/${(i=xl(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${Ek++}`,a=p=>e.get(o)(p),u=e.cachePolicy_UNSTABLE,f=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const p=e.set;d=Ur({key:l,get:a,set:(v,g)=>p(o)(v,g),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:f})}else d=Ur({key:l,get:a,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:f});return r.set(o,d),wk(d.key,()=>{r.delete(o)}),d}}var On=Rk;const Tk=On({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function kk(e){return Tk(e)}var bk=kk;const Ck=On({key:"__error",get:e=>()=>{throw ee(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function xk(e){return Ck(e)}var Ak=xk;function Nk(e){return e}var Lk=Nk;const{loadableWithError:Py,loadableWithPromise:Oy,loadableWithValue:Iy}=ci;function Al(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,i]of t.entries())try{n[o]=e(i)}catch(s){r[o]=s}return[n,r]}function $k(e){return e!=null&&!ye(e)}function Nl(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function $u(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function Cr(e,t,n){const r=n.map((o,i)=>o==null?Iy(t[i]):ye(o)?Oy(o):Py(o));return $u(e,r)}function Pk(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const Ok=On({key:"__waitForNone",get:e=>({get:t})=>{const n=Nl(e),[r,o]=Al(t,n);return Cr(e,r,o)},dangerouslyAllowMutability:!0}),Ik=On({key:"__waitForAny",get:e=>({get:t})=>{const n=Nl(e),[r,o]=Al(t,n);return o.some(i=>!ye(i))?Cr(e,r,o):new Promise(i=>{for(const[s,l]of o.entries())ye(l)&&l.then(a=>{r[s]=a,o[s]=void 0,i(Cr(e,r,o))}).catch(a=>{o[s]=a,i(Cr(e,r,o))})})},dangerouslyAllowMutability:!0}),Mk=On({key:"__waitForAll",get:e=>({get:t})=>{const n=Nl(e),[r,o]=Al(t,n);if(o.every(s=>s==null))return $u(e,r);const i=o.find($k);if(i!=null)throw i;return Promise.all(o).then(s=>$u(e,Pk(r,s)))},dangerouslyAllowMutability:!0}),Dk=On({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Nl(e),[r,o]=Al(t,n);return o.every(i=>!ye(i))?Cr(e,r,o):Promise.all(o.map((i,s)=>ye(i)?i.then(l=>{r[s]=l,o[s]=void 0}).catch(l=>{r[s]=void 0,o[s]=l}):null)).then(()=>Cr(e,r,o))},dangerouslyAllowMutability:!0}),Vk=On({key:"__noWait",get:e=>({get:t})=>{try{return Ur.value(Iy(t(e)))}catch(n){return Ur.value(ye(n)?Oy(n):Py(n))}},dangerouslyAllowMutability:!0});var Uk={waitForNone:Ok,waitForAny:Ik,waitForAll:Mk,waitForAllSettled:Dk,noWait:Vk};const{RecoilLoadable:zk}=ci,{DefaultValue:Bk}=at,{RecoilRoot:Fk,useRecoilStoreID:jk}=ln,{isRecoilValue:Wk}=Mr,{retentionZone:Hk}=yl,{freshSnapshot:Gk}=Rl,{useRecoilState:Kk,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:qk,useRecoilStateLoadable:Qk,useRecoilValue:Yk,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Xk,useRecoilValueLoadable:Zk,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Jk,useResetRecoilState:eb,useSetRecoilState:tb}=fR,{useGotoRecoilSnapshot:nb,useRecoilSnapshot:rb,useRecoilTransactionObserver:ob}=gy,{useRecoilCallback:ib}=Ey,{noWait:sb,waitForAll:lb,waitForAllSettled:ab,waitForAny:ub,waitForNone:cb}=Uk;var In={DefaultValue:Bk,isRecoilValue:Wk,RecoilLoadable:zk,RecoilEnv:Wr,RecoilRoot:Fk,useRecoilStoreID:jk,useRecoilBridgeAcrossReactRoots_UNSTABLE:VR,atom:Ly,selector:Ur,atomFamily:Sk,selectorFamily:On,constSelector:bk,errorSelector:Ak,readOnlySelector:Lk,noWait:sb,waitForNone:cb,waitForAny:ub,waitForAll:lb,waitForAllSettled:ab,useRecoilValue:Yk,useRecoilValueLoadable:Zk,useRecoilState:Kk,useRecoilStateLoadable:Qk,useSetRecoilState:tb,useResetRecoilState:eb,useGetRecoilValueInfo_UNSTABLE:$R,useRecoilRefresher_UNSTABLE:pT,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Jk,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Xk,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:qk,useRecoilCallback:ib,useRecoilTransaction_UNSTABLE:gT,useGotoRecoilSnapshot:nb,useRecoilSnapshot:rb,useRecoilTransactionObserver_UNSTABLE:ob,snapshot_UNSTABLE:Gk,useRetain:nf,retentionZone:Hk},fb=In.DefaultValue,db=In.RecoilRoot,ze=In.atom,My=In.selector,Jt=In.useRecoilValue,sp=In.useRecoilState,Pe=In.useSetRecoilState,ps=In.useResetRecoilState;function pb(){this.__data__=[],this.size=0}var hb=pb;function mb(e,t){return e===t||e!==e&&t!==t}var Dy=mb,vb=Dy;function yb(e,t){for(var n=e.length;n--;)if(vb(e[n][0],t))return n;return-1}var Ll=yb,gb=Ll,_b=Array.prototype,Sb=_b.splice;function wb(e){var t=this.__data__,n=gb(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Sb.call(t,n,1),--this.size,!0}var Eb=wb,Rb=Ll;function Tb(e){var t=this.__data__,n=Rb(t,e);return n<0?void 0:t[n][1]}var kb=Tb,bb=Ll;function Cb(e){return bb(this.__data__,e)>-1}var xb=Cb,Ab=Ll;function Nb(e,t){var n=this.__data__,r=Ab(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Lb=Nb,$b=hb,Pb=Eb,Ob=kb,Ib=xb,Mb=Lb;function Gr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,_=n&EA?new gA:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=$N}var Gy=PN,ON=vi,IN=Gy,MN=yi,DN="[object Arguments]",VN="[object Array]",UN="[object Boolean]",zN="[object Date]",BN="[object Error]",FN="[object Function]",jN="[object Map]",WN="[object Number]",HN="[object Object]",GN="[object RegExp]",KN="[object Set]",qN="[object String]",QN="[object WeakMap]",YN="[object ArrayBuffer]",XN="[object DataView]",ZN="[object Float32Array]",JN="[object Float64Array]",e2="[object Int8Array]",t2="[object Int16Array]",n2="[object Int32Array]",r2="[object Uint8Array]",o2="[object Uint8ClampedArray]",i2="[object Uint16Array]",s2="[object Uint32Array]",ve={};ve[ZN]=ve[JN]=ve[e2]=ve[t2]=ve[n2]=ve[r2]=ve[o2]=ve[i2]=ve[s2]=!0;ve[DN]=ve[VN]=ve[YN]=ve[UN]=ve[XN]=ve[zN]=ve[BN]=ve[FN]=ve[jN]=ve[WN]=ve[HN]=ve[GN]=ve[KN]=ve[qN]=ve[QN]=!1;function l2(e){return MN(e)&&IN(e.length)&&!!ve[ON(e)]}var a2=l2;function u2(e){return function(t){return e(t)}}var c2=u2,Gs={exports:{}};Gs.exports;(function(e,t){var n=Vy,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i&&n.process,l=function(){try{var a=o&&o.require&&o.require("util").types;return a||s&&s.binding&&s.binding("util")}catch{}}();e.exports=l})(Gs,Gs.exports);var f2=Gs.exports,d2=a2,p2=c2,gp=f2,_p=gp&&gp.isTypedArray,h2=_p?p2(_p):d2,Ky=h2,m2=hN,v2=kN,y2=ff,g2=Hy,_2=LN,S2=Ky,w2=Object.prototype,E2=w2.hasOwnProperty;function R2(e,t){var n=y2(e),r=!n&&v2(e),o=!n&&!r&&g2(e),i=!n&&!r&&!o&&S2(e),s=n||r||o||i,l=s?m2(e.length,String):[],a=l.length;for(var u in e)(t||E2.call(e,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_2(u,a)))&&l.push(u);return l}var T2=R2,k2=Object.prototype;function b2(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||k2;return e===n}var C2=b2;function x2(e,t){return function(n){return e(t(n))}}var A2=x2,N2=A2,L2=N2(Object.keys,Object),$2=L2,P2=C2,O2=$2,I2=Object.prototype,M2=I2.hasOwnProperty;function D2(e){if(!P2(e))return O2(e);var t=[];for(var n in Object(e))M2.call(e,n)&&n!="constructor"&&t.push(n);return t}var V2=D2,U2=zy,z2=Gy;function B2(e){return e!=null&&z2(e.length)&&!U2(e)}var F2=B2,j2=T2,W2=V2,H2=F2;function G2(e){return H2(e)?j2(e):W2(e)}var K2=G2,q2=nN,Q2=dN,Y2=K2;function X2(e){return q2(e,Y2,Q2)}var Z2=X2,Sp=Z2,J2=1,eL=Object.prototype,tL=eL.hasOwnProperty;function nL(e,t,n,r,o,i){var s=n&J2,l=Sp(e),a=l.length,u=Sp(t),f=u.length;if(a!=f&&!s)return!1;for(var d=a;d--;){var p=l[d];if(!(s?p in t:tL.call(t,p)))return!1}var _=i.get(e),v=i.get(t);if(_&&v)return _==t&&v==e;var g=!0;i.set(e,t),i.set(t,e);for(var P=s;++d=t||T<0||d&&E>=i}function h(){var k=Ta();if(P(k))return c(k);l=setTimeout(h,g(k))}function c(k){return l=void 0,p&&r?_(k):(r=o=void 0,s)}function m(){l!==void 0&&clearTimeout(l),u=0,r=a=o=l=void 0}function R(){return l===void 0?s:c(Ta())}function b(){var k=Ta(),T=P(k);if(r=arguments,o=this,a=k,T){if(l===void 0)return v(a);if(d)return clearTimeout(l),l=setTimeout(h,t),_(a)}return l===void 0&&(l=setTimeout(h,t)),s}return b.cancel=m,b.flush=R,b}var g$=y$;const _$=qs(g$),jt=Object.create(null);jt.open="0";jt.close="1";jt.ping="2";jt.pong="3";jt.message="4";jt.upgrade="5";jt.noop="6";const hs=Object.create(null);Object.keys(jt).forEach(e=>{hs[jt[e]]=e});const Vu={type:"error",data:"parser error"},Yy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Xy=typeof ArrayBuffer=="function",Zy=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pf=({type:e,data:t},n,r)=>Yy&&t instanceof Blob?n?r(t):Dp(t,r):Xy&&(t instanceof ArrayBuffer||Zy(t))?n?r(t):Dp(new Blob([t]),r):r(jt[e]+(t||"")),Dp=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Vp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ka;function S$(e,t){if(Yy&&e.data instanceof Blob)return e.data.arrayBuffer().then(Vp).then(t);if(Xy&&(e.data instanceof ArrayBuffer||Zy(e.data)))return t(Vp(e.data));pf(e,!1,n=>{ka||(ka=new TextEncoder),t(ka.encode(n))})}const Up="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,o=0,i,s,l,a;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r>4,f[o++]=(s&15)<<4|l>>2,f[o++]=(l&3)<<6|a&63;return u},E$=typeof ArrayBuffer=="function",hf=(e,t)=>{if(typeof e!="string")return{type:"message",data:Jy(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:R$(e.substring(1),t)}:hs[n]?e.length>1?{type:hs[n],data:e.substring(1)}:{type:hs[n]}:Vu},R$=(e,t)=>{if(E$){const n=w$(e);return Jy(n,t)}else return{base64:!0,data:e}},Jy=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},eg=String.fromCharCode(30),T$=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((i,s)=>{pf(i,!1,l=>{r[s]=l,++o===n&&t(r.join(eg))})})},k$=(e,t)=>{const n=e.split(eg),r=[];for(let o=0;o{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{o=new Uint8Array(9);const i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let ba;function Ki(e){return e.reduce((t,n)=>t+n.length,0)}function qi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;oMath.pow(2,53-32)-1){l.enqueue(Vu);break}o=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Ki(n)e){l.enqueue(Vu);break}}}})}const tg=4;function Le(e){if(e)return x$(e)}function x$(e){for(var t in Le.prototype)e[t]=Le.prototype[t];return e}Le.prototype.on=Le.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Le.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Le.prototype.off=Le.prototype.removeListener=Le.prototype.removeAllListeners=Le.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function ng(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const A$=St.setTimeout,N$=St.clearTimeout;function Ml(e,t){t.useNativeTimers?(e.setTimeoutFn=A$.bind(St),e.clearTimeoutFn=N$.bind(St)):(e.setTimeoutFn=St.setTimeout.bind(St),e.clearTimeoutFn=St.clearTimeout.bind(St))}const L$=1.33;function $$(e){return typeof e=="string"?P$(e):Math.ceil((e.byteLength||e.size)*L$)}function P$(e){let t=0,n=0;for(let r=0,o=e.length;r=57344?n+=3:(r++,n+=4);return n}function O$(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function I$(e){let t={},n=e.split("&");for(let r=0,o=n.length;r0);return t}function og(){const e=Fp(+new Date);return e!==Bp?(zp=0,Bp=e):e+"."+Fp(zp++)}for(;Qi{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};k$(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,T$(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=og()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ft(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ft extends Le{constructor(t,n){super(),Ml(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.data=n.data!==void 0?n.data:null,this.create()}create(){var t;const n=ng(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new sg(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Ft.requestsCount++,Ft.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U$,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ft.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ft.requestsCount=0;Ft.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",jp);else if(typeof addEventListener=="function"){const e="onpagehide"in St?"pagehide":"unload";addEventListener(e,jp,!1)}}function jp(){for(let e in Ft.requests)Ft.requests.hasOwnProperty(e)&&Ft.requests[e].abort()}const vf=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),Yi=St.WebSocket||St.MozWebSocket,Wp=!0,F$="arraybuffer",Hp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class j$ extends mf{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=Hp?{}:ng(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=Wp&&!Hp?n?new Yi(t,n):new Yi(t):new Yi(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const s={};try{Wp&&this.ws.send(i)}catch{}o&&vf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=og()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}check(){return!!Yi}}class W$ extends mf{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const n=C$(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=b$();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{r.read().then(({done:l,value:a})=>{l||(this.onPacket(a),i())}).catch(l=>{})};i();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let n=0;n{o&&vf(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const H$={websocket:j$,webtransport:W$,polling:B$},G$=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,K$=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function zu(e){if(e.length>2e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=G$.exec(e||""),i={},s=14;for(;s--;)i[K$[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=q$(i,i.path),i.queryKey=Q$(i,i.query),i}function q$(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q$(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}let lg=class lr extends Le{constructor(t,n={}){super(),this.binaryType=F$,this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=zu(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=zu(n.host).host),Ml(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I$(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=tg,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new H$[t](r)}open(){let t;if(this.opts.rememberUpgrade&&lr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;lr.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;lr.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){r||(r=!0,f(),n.close(),n=null)}const s=d=>{const p=new Error("probe error: "+d);p.transport=n.name,i(),this.emitReserved("upgradeError",p)};function l(){s("transport closed")}function a(){s("socket closed")}function u(d){n&&d.name!==n.name&&i()}const f=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",l),this.off("close",a),this.off("upgrading",u)};n.once("open",o),n.once("error",s),n.once("close",l),this.once("close",a),this.once("upgrading",u),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",lr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){lr.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const o=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ag=Object.prototype.toString,J$=typeof Blob=="function"||typeof Blob<"u"&&ag.call(Blob)==="[object BlobConstructor]",eP=typeof File=="function"||typeof File<"u"&&ag.call(File)==="[object FileConstructor]";function yf(e){return X$&&(e instanceof ArrayBuffer||Z$(e))||J$&&e instanceof Blob||eP&&e instanceof File}function ms(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(i),n.apply(this,[null,...s])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((s,l)=>r?s?i(s):o(l):o(s)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ie.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ie.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ie.EVENT:case ie.BINARY_EVENT:this.onevent(t);break;case ie.ACK:case ie.BINARY_ACK:this.onack(t);break;case ie.DISCONNECT:this.ondisconnect();break;case ie.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:ie.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ie.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Zr.prototype.reset=function(){this.attempts=0};Zr.prototype.setMin=function(e){this.ms=e};Zr.prototype.setMax=function(e){this.max=e};Zr.prototype.setJitter=function(e){this.jitter=e};class ju extends Le{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ml(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Zr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||lP;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new lg(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Lt(n,"open",function(){r.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=Lt(n,"error",i);if(this._timeout!==!1){const l=this._timeout,a=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(o),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Lt(t,"ping",this.onping.bind(this)),Lt(t,"data",this.ondata.bind(this)),Lt(t,"error",this.onerror.bind(this)),Lt(t,"close",this.onclose.bind(this)),Lt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){vf(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ug(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const yo={};function Uo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Y$(e,t.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=yo[o]&&i in yo[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let a;return l?a=new ju(r,t):(yo[o]||(yo[o]=new ju(r,t)),a=yo[o]),n.query&&!t.query&&(t.query=n.queryKey),a.socket(n.path,t)}Object.assign(Uo,{Manager:ju,Socket:ug,io:Uo,connect:Uo});function Wu(e){this.message=e}Wu.prototype=new Error,Wu.prototype.name="InvalidCharacterError";typeof window<"u"&&window.atob&&window.atob.bind(window);function Kp(e){this.message=e}Kp.prototype=new Error,Kp.prototype.name="InvalidTokenError";var uP={};/** + * @license React + * use-sync-external-store-shim.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 zr=re;function cP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var fP=typeof Object.is=="function"?Object.is:cP,dP=zr.useState,pP=zr.useEffect,hP=zr.useLayoutEffect,mP=zr.useDebugValue;function vP(e,t){var n=t(),r=dP({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return hP(function(){o.value=n,o.getSnapshot=t,Ca(o)&&i({inst:o})},[e,n,t]),pP(function(){return Ca(o)&&i({inst:o}),e(function(){Ca(o)&&i({inst:o})})},[e]),mP(n),n}function Ca(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fP(e,n)}catch{return!0}}function yP(e,t){return t()}var gP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?yP:vP;uP.useSyncExternalStore=zr.useSyncExternalStore!==void 0?zr.useSyncExternalStore:gP;const _n=()=>{},wt=_n(),xa=Object,Pt=e=>e===wt,zn=e=>typeof e=="function",Dl=(e,t)=>({...e,...t}),_P=e=>zn(e.then),Xi=new WeakMap;let SP=0;const ri=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(xa(e)===e&&!r&&n!=RegExp){if(o=Xi.get(e),o)return o;if(o=++SP+"~",Xi.set(e,o),n==Array){for(o="@",i=0;i{const n=vn.get(e);return[()=>!Pt(t)&&e.get(t)||Aa,r=>{if(!Pt(t)){const o=e.get(t);t in Zi||(Zi[t]=o),n[5](t,Dl(o,r),o||Aa)}},n[6],()=>!Pt(t)&&t in Zi?Zi[t]:!Pt(t)&&e.get(t)||Aa]};let Gu=!0;const EP=()=>Gu,[Ku,qu]=_f&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_n,_n],RP=()=>{const e=Hu&&document.visibilityState;return Pt(e)||e!=="hidden"},TP=e=>(Hu&&document.addEventListener("visibilitychange",e),Ku("focus",e),()=>{Hu&&document.removeEventListener("visibilitychange",e),qu("focus",e)}),kP=e=>{const t=()=>{Gu=!0,e()},n=()=>{Gu=!1};return Ku("online",t),Ku("offline",n),()=>{qu("online",t),qu("offline",n)}},bP={isOnline:EP,isVisible:RP},CP={initFocus:TP,initReconnect:kP};fe.useId;const fg=!_f||"Deno"in window,Na=typeof navigator<"u"&&navigator.connection,qp=!fg&&Na&&(["slow-2g","2g"].includes(Na.effectiveType)||Na.saveData),dg=e=>{if(zn(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?ri(e):"",[e,t]};let xP=0;const Qp=()=>++xP,AP=0,NP=1,LP=2;async function $P(...e){const[t,n,r,o]=e,i=Dl({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let s=i.populateCache;const l=i.rollbackOnError;let a=i.optimisticData;const u=p=>typeof l=="function"?l(p):l!==!1,f=i.throwOnError;if(zn(n)){const p=n,_=[],v=t.keys();for(const g of v)!/^\$(inf|sub)\$/.test(g)&&p(t.get(g)._k)&&_.push(g);return Promise.all(_.map(d))}return d(n);async function d(p){const[_]=dg(p);if(!_)return;const[v,g]=wP(t,_),[P,h,c,m]=vn.get(t),R=()=>{const B=P[_];return(zn(i.revalidate)?i.revalidate(v().data,p):i.revalidate!==!1)&&(delete c[_],delete m[_],B&&B[0])?B[0](LP).then(()=>v().data):v().data};if(e.length<3)return R();let b=r,k;const T=Qp();h[_]=[T,0];const E=!Pt(a),A=v(),$=A.data,Y=A._c,Q=Pt(Y)?$:Y;if(E&&(a=zn(a)?a(Q,$):a,g({data:a,_c:Q})),zn(b))try{b=b(Q)}catch(B){k=B}if(b&&_P(b))if(b=await b.catch(B=>{k=B}),T!==h[_][0]){if(k)throw k;return b}else k&&E&&u(k)&&(s=!0,g({data:Q,_c:wt}));if(s&&!k)if(zn(s)){const B=s(b,Q);g({data:B,error:wt,_c:wt})}else g({data:b,error:wt,_c:wt});if(h[_][1]=Qp(),Promise.resolve(R()).then(()=>{g({_c:wt})}),k){if(f)throw k;return}return b}}const Yp=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},PP=(e,t)=>{if(!vn.has(e)){const n=Dl(CP,t),r={},o=$P.bind(wt,e);let i=_n;const s={},l=(f,d)=>{const p=s[f]||[];return s[f]=p,p.push(d),()=>p.splice(p.indexOf(d),1)},a=(f,d,p)=>{e.set(f,d);const _=s[f];if(_)for(const v of _)v(d,p)},u=()=>{if(!vn.has(e)&&(vn.set(e,[r,{},{},{},o,a,l]),!fg)){const f=n.initFocus(setTimeout.bind(wt,Yp.bind(wt,r,AP))),d=n.initReconnect(setTimeout.bind(wt,Yp.bind(wt,r,NP)));i=()=>{f&&f(),d&&d(),vn.delete(e)}}};return u(),[e,o,u,i]}return[e,vn.get(e)[4]]},OP=(e,t,n,r,o)=>{const i=n.errorRetryCount,s=o.retryCount,l=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!Pt(i)&&s>i||setTimeout(r,l,o)},IP=(e,t)=>ri(e)==ri(t),[pg,MP]=PP(new Map);Dl({onLoadingSlow:_n,onSuccess:_n,onError:_n,onErrorRetry:OP,onDiscarded:_n,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:qp?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:qp?5e3:3e3,compare:IP,isPaused:()=>!1,cache:pg,mutate:MP,fallback:{}},bP);re.createContext({});const DP="$inf$",hg=_f&&window.__SWR_DEVTOOLS_USE__,VP=hg?window.__SWR_DEVTOOLS_USE__:[],UP=()=>{hg&&(window.__SWR_DEVTOOLS_REACT__=fe)},zP=e=>(t,n,r)=>e(t,n&&((...i)=>{const[s]=dg(t),[,,,l]=vn.get(pg);if(s.startsWith(DP))return n(...i);const a=l[s];return Pt(a)?n(...i):(delete l[s],a)}),r);VP.concat(zP);UP();fe.use;var BP=e=>{let t={},n=new Date,r=new Date;r.setDate(n.getDate()-1);let o=new Date;o.setDate(n.getDate()-7);let i=new Date;return i.setDate(n.getDate()-30),e.forEach(s=>{let l=new Date(s.createdAt),a=l.toDateString()===n.toDateString(),u=l.toDateString()===r.toDateString(),f=l>=o,d=l>=i,p;a?p="Today":u?p="Yesterday":f?p="Previous 7 days":d?p="Previous 30 days":p=l.toLocaleString("default",{month:"long",year:"numeric"}).split(" ").slice(0,1).join(" "),t[p]||(t[p]=[]),t[p].push(s)}),t},mg=ze({key:"ThreadIdToResume",default:void 0}),FP=ze({key:"ChatProfile",default:void 0}),Xp=ze({key:"SessionId",default:df()}),Qu=My({key:"SessionIdSelector",get:({get:e})=>e(Xp),set:({set:e},t)=>e(Xp,t instanceof fb?df():t)}),Sf=ze({key:"Session",dangerouslyAllowMutability:!0,default:void 0}),vg=ze({key:"Actions",default:[]}),wf=ze({key:"Messages",dangerouslyAllowMutability:!0,default:[]}),yg=ze({key:"TokenCount",default:0}),gg=ze({key:"Loading",default:!1}),_g=ze({key:"AskUser",default:void 0}),Ef=ze({key:"ChatSettings",default:[]}),jP=My({key:"ChatSettingsValue/Default",get:({get:e})=>e(Ef).reduce((t,n)=>(t[n.id]=n.initial,t),{})}),Sg=ze({key:"ChatSettingsValue",default:jP}),wg=ze({key:"DisplayElements",default:[]}),Eg=ze({key:"AvatarElements",default:[]}),Rg=ze({key:"TasklistElements",default:[]}),Rf=ze({key:"FirstUserMessage",default:void 0}),WP=ze({key:"AccessToken",default:void 0});ze({key:"User",default:null});ze({key:"ThreadHistory",default:{threads:void 0,currentThreadId:void 0,timeGroupedThreads:void 0,pageInfo:void 0},effects:[({setSelf:e,onSet:t})=>{t((n,r)=>{let o=n==null?void 0:n.timeGroupedThreads;n!=null&&n.threads&&!gi(n.threads,r==null?void 0:r.timeGroupedThreads)&&(o=BP(n.threads)),e({...n,timeGroupedThreads:o})})}]});var Sr=(e,t)=>_i(e,t.id)?Tf(e,t.id,t):"parentId"in t&&t.parentId?kg(e,t.parentId,t):"indent"in t&&t.indent&&t.indent>0?Tg(e,t.indent,t):[...e,t],Tg=(e,t,n,r=0)=>{let o=[...e];if(o.length===0)return[...o,n];{let i=o.length-1,s=o[i];return s.steps=s.steps||[],r+1===t?(s.steps=[...s.steps,n],o[i]={...s},o):(s.steps=Tg(s.steps,t,n,r+1),o[i]={...s},o)}},kg=(e,t,n)=>{let r=[...e];for(let o=0;o{for(let n of e)if(gi(n.id,t)||n.steps&&n.steps.length>0&&_i(n.steps,t))return!0;return!1},Tf=(e,t,n)=>{let r=[...e];for(let o=0;o{let n=[...e];for(let r=0;r{let o=[...e];for(let i=0;i{let e=Jt(WP),t=Jt(Sf),n=Jt(_g),r=Jt(Qu),o=ps(Ef),i=ps(Qu),s=ps(Sg),l=Pe(Rf),a=Pe(gg),u=Pe(wf),f=Pe(wg),d=Pe(Eg),p=Pe(Rg),_=Pe(vg),v=Pe(yg),g=Pe(mg),P=re.useCallback(()=>{t==null||t.socket.emit("clear_session"),t==null||t.socket.disconnect(),g(void 0),i(),l(void 0),u([]),f([]),d([]),p([]),_([]),v(0),o(),s()},[t]),h=re.useCallback((k,T)=>{u(E=>Sr(E,k)),t==null||t.socket.emit("ui_message",{message:k,fileReferences:T})},[t==null?void 0:t.socket]),c=re.useCallback(k=>{n&&(u(T=>Sr(T,k)),n.callback(k))},[n]),m=re.useCallback(k=>{t==null||t.socket.emit("chat_settings_change",k)},[t==null?void 0:t.socket]),R=re.useCallback(()=>{a(!1),t==null||t.socket.emit("stop")},[t==null?void 0:t.socket]),b=re.useCallback(k=>{let T=t==null?void 0:t.socket;if(!T)return;let E=new Promise((A,$)=>{T.once("action_response",Y=>{Y.status?A(Y):$(Y)})});return T.emit("action_call",k),E},[t==null?void 0:t.socket]);return{uploadFile:re.useCallback((k,T,E)=>k.uploadFile(T,E,r,e),[r,e]),callAction:b,clear:P,replyMessage:c,sendMessage:h,stopTask:R,setIdToResume:g,updateChatSettings:m}},GP=()=>{let e=Jt(wf),t=Jt(Rf);return{messages:e,firstUserMessage:t}},KP=()=>{let e=Jt(Qu),[t,n]=sp(Sf),r=ps(Sg),o=Pe(Rf),i=Pe(gg),s=Pe(wf),l=Pe(_g),a=Pe(wg),u=Pe(Eg),f=Pe(Rg),d=Pe(vg),p=Pe(Ef),_=Pe(yg),[v,g]=sp(FP),P=Jt(mg),h=re.useCallback(({client:R,userEnv:b,accessToken:k})=>{let T=Uo(R.httpEndpoint,{path:"/ws/socket.io",extraHeaders:{Authorization:k||"","X-Chainlit-Session-Id":e,"X-Chainlit-Thread-Id":P||"","user-env":JSON.stringify(b),"X-Chainlit-Chat-Profile":v||""}});n(E=>{var A,$;return(A=E==null?void 0:E.socket)==null||A.removeAllListeners(),($=E==null?void 0:E.socket)==null||$.close(),{socket:T}}),T.on("connect",()=>{T.emit("connection_successful"),n(E=>({...E,error:!1}))}),T.on("connect_error",E=>{n(A=>({...A,error:!0}))}),T.on("task_start",()=>{i(!0)}),T.on("task_end",()=>{i(!1)}),T.on("reload",()=>{T.emit("clear_session"),window.location.reload()}),T.on("resume_thread",E=>{var Y,Q;let A=[];for(let B of E.steps)A=Sr(A,B);(Y=E.metadata)!=null&&Y.chat_profile&&g((Q=E.metadata)==null?void 0:Q.chat_profile),s(A);let $=E.elements||[];u($.filter(B=>B.type==="avatar")),f($.filter(B=>B.type==="tasklist")),a($.filter(B=>["avatar","tasklist"].indexOf(B.type)===-1))}),T.on("new_message",E=>{s(A=>Sr(A,E))}),T.on("init_thread",E=>{o(E)}),T.on("update_message",E=>{s(A=>Tf(A,E.id,E))}),T.on("delete_message",E=>{s(A=>bg(A,E.id))}),T.on("stream_start",E=>{s(A=>Sr(A,E))}),T.on("stream_token",({id:E,token:A,isSequence:$})=>{s(Y=>Cg(Y,E,A,$))}),T.on("ask",({msg:E,spec:A},$)=>{l({spec:A,callback:$}),s(Y=>Sr(Y,E)),i(!1)}),T.on("ask_timeout",()=>{l(void 0),i(!1)}),T.on("clear_ask",()=>{l(void 0)}),T.on("chat_settings",E=>{p(E),r()}),T.on("element",E=>{!E.url&&E.chainlitKey&&(E.url=R.getElementUrl(E.chainlitKey,e,k)),E.type==="avatar"?u(A=>{let $=A.findIndex(Y=>Y.id===E.id);return $===-1?[...A,E]:[...A.slice(0,$),E,...A.slice($+1)]}):E.type==="tasklist"?f(A=>{let $=A.findIndex(Y=>Y.id===E.id);return $===-1?[...A,E]:[...A.slice(0,$),E,...A.slice($+1)]}):a(A=>{let $=A.findIndex(Y=>Y.id===E.id);return $===-1?[...A,E]:[...A.slice(0,$),E,...A.slice($+1)]})}),T.on("remove_element",E=>{a(A=>A.filter($=>$.id!==E.id)),f(A=>A.filter($=>$.id!==E.id)),u(A=>A.filter($=>$.id!==E.id))}),T.on("action",E=>{d(A=>[...A,E])}),T.on("remove_action",E=>{d(A=>{let $=A.findIndex(Y=>Y.id===E.id);return $===-1?A:[...A.slice(0,$),...A.slice($+1)]})}),T.on("token_usage",E=>{_(A=>A+E)})},[n,e,v]),c=re.useCallback(_$(h,200),[h]),m=re.useCallback(()=>{t!=null&&t.socket&&(t.socket.removeAllListeners(),t.socket.close())},[t]);return{connect:c,disconnect:m,chatProfile:v,idToResume:P,setChatProfile:g}},qP="token";function QP(){try{return localStorage.removeItem(qP)}catch{return}}var Zp=class extends Error{constructor(e,t){super(e),this.detail=t}toString(){return this.detail?`${this.message}: ${this.detail}`:this.message}},YP=class{constructor(e,t,n){this.httpEndpoint=e,this.on401=t,this.onError=n}buildEndpoint(e){return this.httpEndpoint.endsWith("/")?`${this.httpEndpoint.slice(0,-1)}${e}`:`${this.httpEndpoint}${e}`}checkToken(e){let t="Bearer ";return e.startsWith(t)?e:t+e}async fetch(e,t,n,r,o){try{let i={};n&&(i.Authorization=this.checkToken(n));let s;r instanceof FormData?s=r:(i["Content-Type"]="application/json",s=r?JSON.stringify(r):null);let l=await fetch(this.buildEndpoint(t),{method:e,headers:i,signal:o,body:s});if(!l.ok){let a=await l.json();throw l.status===401&&this.on401&&(QP(),this.on401()),new Zp(l.statusText,a.detail)}return l}catch(i){throw i instanceof Zp&&this.onError&&this.onError(i),console.error(i),i}}async get(e,t){return await this.fetch("GET",e,t)}async post(e,t,n,r){return await this.fetch("POST",e,n,t,r)}async put(e,t,n){return await this.fetch("PUT",e,n,t)}async patch(e,t,n){return await this.fetch("PATCH",e,n,t)}async delete(e,t,n){return await this.fetch("DELETE",e,n,t)}},XP=class extends YP{async headerAuth(){return(await this.post("/auth/header",{})).json()}async passwordAuth(e){return(await this.post("/login",e)).json()}async getGeneration(e,t={},n,r,o){var l,a;let i={userEnv:t};e.type==="CHAT"?i.chatGeneration=e:i.completionGeneration=e;let s=(a=(l=await this.post("/generation",i,r,n.signal))==null?void 0:l.body)==null?void 0:a.getReader();return new ReadableStream({start(u){function f(){s.read().then(({done:d,value:p})=>{if(d){u.close(),o&&o(d,"");return}let _=new TextDecoder("utf-8").decode(p);o&&o(d,_),u.enqueue(p),f()}).catch(d=>{u.close(),o&&o(!0,""),console.error(d)})}f()}})}async setFeedback(e,t){return(await this.put("/feedback",{feedback:e},t)).json()}async listThreads(e,t,n){return(await this.post("/project/threads",{pagination:e,filter:t},n)).json()}async deleteThread(e,t){return(await this.delete("/project/thread",{threadId:e},t)).json()}uploadFile(e,t,n,r){let o=new XMLHttpRequest,i=new Promise((s,l)=>{let a=new FormData;a.append("file",e),o.open("POST",this.buildEndpoint(`/project/file?session_id=${n}`),!0),r&&o.setRequestHeader("Authorization",this.checkToken(r)),o.upload.onprogress=function(u){if(u.lengthComputable){let f=u.loaded/u.total*100;t(f)}},o.onload=function(){if(o.status===200){let u=JSON.parse(o.responseText);s(u)}else l("Upload failed")},o.onerror=function(){l("Upload error")},o.send(a)});return{xhr:o,promise:i}}getElementUrl(e,t,n){let r="";return n&&(r=`?token=${n}`),this.buildEndpoint(`/project/file/${e}?session_id=${t}${r}`)}getLogoEndpoint(e){return this.buildEndpoint(`/logo?theme=${e}`)}getOAuthEndpoint(e){return this.buildEndpoint(`/auth/oauth/${e}`)}};function xg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;tl(i)))==null?void 0:s.classGroupId}const Jp=/^\[(.+)\]$/;function eO(e){if(Jp.test(e)){const t=Jp.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function tO(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return rO(Object.entries(e.classGroups),n).forEach(([i,s])=>{Yu(s,r,i,t)}),r}function Yu(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:eh(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(nO(o)){Yu(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Yu(s,eh(t,i),n,r)})})}function eh(e,t){let n=e;return t.split(kf).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function nO(e){return e.isThemeGetter}function rO(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[n,o]}):e}function oO(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,s){n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}}const Ng="!";function iO(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(s){const l=[];let a=0,u=0,f;for(let g=0;gu?f-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:_,maybePostfixModifierPosition:v}}}function sO(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function lO(e){return{cache:oO(e.cacheSize),splitModifiers:iO(e),...JP(e)}}const aO=/\s+/;function uO(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(aO).map(s=>{const{modifiers:l,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:f}=n(s);let d=r(f?u.substring(0,f):u),p=!!f;if(!d){if(!f)return{isTailwindClass:!1,originalClassName:s};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:s};p=!1}const _=sO(l).join(":");return{isTailwindClass:!0,modifierId:a?_+Ng:_,classGroupId:d,originalClassName:s,hasPostfixModifier:p}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:l,classGroupId:a,hasPostfixModifier:u}=s,f=l+a;return i.has(f)?!1:(i.add(f),o(a,u).forEach(d=>i.add(l+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function cO(){let e=0,t,n,r="";for(;ed(f),e());return n=lO(u),r=n.cache.get,o=n.cache.set,i=l,l(a)}function l(a){const u=r(a);if(u)return u;const f=uO(a,n);return o(a,f),f}return function(){return i(cO.apply(null,arguments))}}function he(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const $g=/^\[(?:([a-z-]+):)?(.+)\]$/i,dO=/^\d+\/\d+$/,pO=new Set(["px","full","screen"]),hO=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mO=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,vO=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,yO=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gO=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function qt(e){return Wn(e)||pO.has(e)||dO.test(e)}function un(e){return Jr(e,"length",bO)}function Wn(e){return!!e&&!Number.isNaN(Number(e))}function Ji(e){return Jr(e,"number",Wn)}function go(e){return!!e&&Number.isInteger(Number(e))}function _O(e){return e.endsWith("%")&&Wn(e.slice(0,-1))}function J(e){return $g.test(e)}function cn(e){return hO.test(e)}const SO=new Set(["length","size","percentage"]);function wO(e){return Jr(e,SO,Pg)}function EO(e){return Jr(e,"position",Pg)}const RO=new Set(["image","url"]);function TO(e){return Jr(e,RO,xO)}function kO(e){return Jr(e,"",CO)}function _o(){return!0}function Jr(e,t,n){const r=$g.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function bO(e){return mO.test(e)&&!vO.test(e)}function Pg(){return!1}function CO(e){return yO.test(e)}function xO(e){return gO.test(e)}function AO(){const e=he("colors"),t=he("spacing"),n=he("blur"),r=he("brightness"),o=he("borderColor"),i=he("borderRadius"),s=he("borderSpacing"),l=he("borderWidth"),a=he("contrast"),u=he("grayscale"),f=he("hueRotate"),d=he("invert"),p=he("gap"),_=he("gradientColorStops"),v=he("gradientColorStopPositions"),g=he("inset"),P=he("margin"),h=he("opacity"),c=he("padding"),m=he("saturate"),R=he("scale"),b=he("sepia"),k=he("skew"),T=he("space"),E=he("translate"),A=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto",J,t],Q=()=>[J,t],B=()=>["",qt,un],ue=()=>["auto",Wn,J],ut=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],xe=()=>["solid","dashed","dotted","double","none"],$e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],O=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",J],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[Wn,Ji],w=()=>[Wn,J];return{cacheSize:500,separator:":",theme:{colors:[_o],spacing:[qt,un],blur:["none","",cn,J],brightness:se(),borderColor:[e],borderRadius:["none","","full",cn,J],borderSpacing:Q(),borderWidth:B(),contrast:se(),grayscale:F(),hueRotate:w(),invert:F(),gap:Q(),gradientColorStops:[e],gradientColorStopPositions:[_O,un],inset:Y(),margin:Y(),opacity:se(),padding:Q(),saturate:se(),scale:se(),sepia:F(),skew:w(),space:Q(),translate:Q()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[cn]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ut(),J]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",go,J]}],basis:[{basis:Y()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",go,J]}],"grid-cols":[{"grid-cols":[_o]}],"col-start-end":[{col:["auto",{span:["full",go,J]},J]}],"col-start":[{"col-start":ue()}],"col-end":[{"col-end":ue()}],"grid-rows":[{"grid-rows":[_o]}],"row-start-end":[{row:["auto",{span:[go,J]},J]}],"row-start":[{"row-start":ue()}],"row-end":[{"row-end":ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[c]}],px:[{px:[c]}],py:[{py:[c]}],ps:[{ps:[c]}],pe:[{pe:[c]}],pt:[{pt:[c]}],pr:[{pr:[c]}],pb:[{pb:[c]}],pl:[{pl:[c]}],m:[{m:[P]}],mx:[{mx:[P]}],my:[{my:[P]}],ms:[{ms:[P]}],me:[{me:[P]}],mt:[{mt:[P]}],mr:[{mr:[P]}],mb:[{mb:[P]}],ml:[{ml:[P]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[cn]},cn]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",cn,un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ji]}],"font-family":[{font:[_o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",J]}],"line-clamp":[{"line-clamp":["none",Wn,Ji]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qt,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qt,un]}],"underline-offset":[{"underline-offset":["auto",qt,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ut(),EO]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wO]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},TO]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...xe(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:xe()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...xe()]}],"outline-offset":[{"outline-offset":[qt,J]}],"outline-w":[{outline:[qt,un]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[qt,un]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",cn,kO]}],"shadow-color":[{shadow:[_o]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":$e()}],"bg-blend":[{"bg-blend":$e()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",cn,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[m]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[m]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[go,J]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Q()}],"scroll-mx":[{"scroll-mx":Q()}],"scroll-my":[{"scroll-my":Q()}],"scroll-ms":[{"scroll-ms":Q()}],"scroll-me":[{"scroll-me":Q()}],"scroll-mt":[{"scroll-mt":Q()}],"scroll-mr":[{"scroll-mr":Q()}],"scroll-mb":[{"scroll-mb":Q()}],"scroll-ml":[{"scroll-ml":Q()}],"scroll-p":[{"scroll-p":Q()}],"scroll-px":[{"scroll-px":Q()}],"scroll-py":[{"scroll-py":Q()}],"scroll-ps":[{"scroll-ps":Q()}],"scroll-pe":[{"scroll-pe":Q()}],"scroll-pt":[{"scroll-pt":Q()}],"scroll-pr":[{"scroll-pr":Q()}],"scroll-pb":[{"scroll-pb":Q()}],"scroll-pl":[{"scroll-pl":Q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qt,un,Ji]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const NO=fO(AO);function Og(...e){return NO(ZP(e))}const Ig=re.forwardRef(({className:e,type:t,...n},r)=>W.jsx("input",{type:t,className:Og("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Ig.displayName="Input";function Ks(){return Ks=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>LO(n,t))}const Mg=re.forwardRef((e,t)=>{const{children:n,...r}=e,o=re.Children.toArray(n),i=o.find(OO);if(i){const s=i.props.children,l=o.map(a=>a===i?re.Children.count(s)>1?re.Children.only(null):re.isValidElement(s)?s.props.children:null:a);return re.createElement(Xu,Ks({},r,{ref:t}),re.isValidElement(s)?re.cloneElement(s,void 0,l):null)}return re.createElement(Xu,Ks({},r,{ref:t}),n)});Mg.displayName="Slot";const Xu=re.forwardRef((e,t)=>{const{children:n,...r}=e;return re.isValidElement(n)?re.cloneElement(n,{...IO(r,n.props),ref:t?$O(t,n.ref):n.ref}):re.Children.count(n)>1?re.Children.only(null):null});Xu.displayName="SlotClone";const PO=({children:e})=>re.createElement(re.Fragment,null,e);function OO(e){return re.isValidElement(e)&&e.type===PO}function IO(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{i(...l),o(...l)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Dg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="boolean"?"".concat(e):e===0?"0":e,nh=MO,DO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return nh(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],d=i==null?void 0:i[u];if(f===null)return null;const p=th(f)||th(d);return o[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,..._}=f;return Object.entries(_).every(v=>{let[g,P]=v;return Array.isArray(P)?P.includes({...i,...l}[g]):{...i,...l}[g]===P})?[...u,d,p]:u},[]);return nh(e,s,a,n==null?void 0:n.class,n==null?void 0:n.className)},VO=DO("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Vg=re.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Mg:"button";return W.jsx(s,{className:Og(VO({variant:t,size:n,className:e})),ref:i,...o})});Vg.displayName="Button";function UO(){const[e,t]=re.useState(""),{sendMessage:n}=HP(),{messages:r}=GP(),o=()=>{const s=e.trim();if(s){const l={id:df(),name:"user",type:"user_message",output:s,createdAt:new Date().toISOString()};n(l,[]),t("")}},i=s=>{const l={hour:"2-digit",minute:"2-digit"},a=new Date(s.createdAt).toLocaleTimeString(void 0,l);return W.jsxs("div",{className:"flex items-start space-x-2",children:[W.jsx("div",{className:"w-20 text-sm text-green-500",children:s.name}),W.jsxs("div",{className:"flex-1 border rounded-lg p-2",children:[W.jsx("p",{className:"text-black dark:text-white",children:s.output}),W.jsx("small",{className:"text-xs text-gray-500",children:a})]})]},s.id)};return W.jsxs("div",{className:"playground-container bg-gray-100 dark:bg-gray-900 flex flex-col",style:{borderRadius:"10px"},children:[W.jsx("div",{style:{backgroundColor:"#d00404",height:"50px"}}),W.jsx("div",{className:"flex-1 overflow-auto p-6",children:W.jsx("div",{className:"space-y-4",children:r.map(s=>i(s))})}),W.jsx("div",{className:"border-t p-4 bg-white dark:bg-gray-800",children:W.jsxs("div",{className:"flex items-center space-x-2",children:[W.jsx(Ig,{autoFocus:!0,className:"flex-1",id:"message-input",placeholder:"Type a message",value:e,onChange:s=>t(s.target.value),onKeyUp:s=>{s.key==="Enter"&&o()}}),W.jsx(Vg,{onClick:o,type:"submit",children:"Send"})]})})]})}const zO=()=>W.jsx("header",{className:"flex flex-col justify-center items-start self-stretch px-16 w-full bg-white border-b border-solid border-gray-500 sm:px-5 sm:max-w-full",children:W.jsx("img",{src:"https://cdn.builder.io/api/v1/image/assets/TEMP/c60110b7ac67e2ea9732724f30b5eaaba9c6a94aef679e23760dc88640ba1f9b?apiKey=b1f64df9aada44c6ba1728b031344f7b&",className:"ml-48 max-w-full aspect-[2.78] w-[150px] sm:ml-2.5",alt:""})}),BO=()=>W.jsxs("section",{className:"flex overflow-hidden relative flex-col justify-center items-stretch w-full font-bold text-center text-white min-h-[200px]",children:[W.jsx("img",{loading:"lazy",src:"https://cdn.builder.io/api/v1/image/assets/TEMP/90ef9e1531cfe343e66ab674d6be1a55e88e527744750fc2b64501844643db0a?apiKey=b1f64df9aada44c6ba1728b031344f7b&",className:"object-cover absolute inset-0 w-full h-full",alt:"Beauty Therapist Working"}),W.jsx("div",{className:"relative flex justify-center items-center px-16 py-12 w-full",children:W.jsxs("div",{className:"flex flex-col mt-10 mb-2",children:[W.jsx("h1",{className:"text-3xl leading-10",children:"Beauty Therapist Insurance"}),W.jsx("h2",{className:"self-center mt-2 text-lg leading-6",children:"Quote Builder"})]})})]}),FO=({status:e})=>W.jsx("div",{className:"justify-center items-center self-stretch px-2 my-auto h-6 font-bold text-right text-red-700 border-red-700 border-solid aspect-square border-[0.639px] leading-[92%] rounded-[127.778px]",role:"button",tabIndex:0,"aria-label":e==="?"?"Status unknown":`Status: ${e}`,children:e}),So=({logoUrl:e,alertText:t,status:n,amount:r,setAmount:o})=>W.jsxs("section",{className:"flex justify-between items-center px-6 py-3 ml-16 max-w-full whitespace-nowrap border-solid border-b-[0.5px] border-b-black w-[522px] md:flex-wrap md:px-5",children:[W.jsxs("div",{className:"flex gap-3 items-center pr-20 text-base",children:[W.jsx("img",{loading:"lazy",src:e,className:"w-8 h-8",alt:t}),W.jsx("div",{className:"text-black uppercase leading-[150%]",children:t}),W.jsx(FO,{status:n})]}),W.jsx("input",{type:"number",value:r,onChange:i=>o(Number(i.target.value)),className:"py-2 pl-3 pr-3 text-sm leading-6 text-right text-black bg-white rounded border-black border-solid border-[0.5px] w-full max-w-xs",style:{textAlign:"left"}})]}),Ug="https://hamza82-test.hf.space",jO={},rh=new XP(Ug);function WO(){const{connect:e}=KP(),t=Jt(Sf);re.useEffect(()=>{t!=null&&t.socket.connected||fetch(rh.buildEndpoint("/custom-auth")).then(i=>i.json()).then(i=>{e({client:rh,userEnv:jO,accessToken:`Bearer: ${i.token}`});const s=Uo(Ug);s.on("connect",()=>{console.log("WebSocket connected")}),s.on("disconnect",()=>{console.log("WebSocket disconnected")})})},[t,e]);const[n,r]=re.useState({}),o=(i,s)=>{r(l=>({...l,[i]:s}))};return W.jsxs(W.Fragment,{children:[W.jsx(zO,{}),W.jsx(BO,{}),W.jsx("div",{className:"relative",style:{marginTop:"40px"},children:W.jsxs("div",{className:"absolute left-20",children:[W.jsxs("div",{className:"flex flex-col",children:[W.jsx("header",{className:"text-2xl font-bold leading-8 text-black pl-16",children:W.jsx("h1",{children:"Your Personalised Package:"})}),W.jsx(So,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/be051a227710fa99e9efda725e8d0dc36c64fad96e941813d07d6250884eadb2?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"PUBLIC & PRODUCT LIABILITY",status:"?",amount:n.publicLiability||0,setAmount:i=>o("publicLiability",i)}),W.jsx(So,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/fb7d406f3707aefeb694b288abea645b643e28df498e96faa3a88f8ae3b4f096?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"FIRE AND ACCIDENTAL DAMAGE",status:"?",amount:n.fireDamage||0,setAmount:i=>o("fireDamage",i)}),W.jsx(So,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/af6837406a2497c1255b86413c1138e2c55b3fc5c643e05f560bafd57e9bd20b?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"GLASS",status:"?",amount:n.glass||0,setAmount:i=>o("glass",i)}),W.jsx(So,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/a7ffd8559e286d4d85db00334a22a1a956d9835240ad8d97e82af98af62a149e?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"PERSONAL EQUIPMENT",status:"?",amount:n.personalEquipment||0,setAmount:i=>o("personalEquipment",i)}),W.jsx(So,{logoUrl:"https://cdn.builder.io/api/v1/image/assets/TEMP/89dc158bec91bc71c7b35c5b9752238d239eb70b38f3256e62653dee21b33b55?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alertText:"THEFT",status:"?",amount:n.theft||0,setAmount:i=>o("theft",i)})]}),W.jsx("button",{className:"justify-center items-center px-16 py-4 mt-3 ml-16 max-w-full text-base font-bold text-center text-lime-900 whitespace-nowrap rounded border border-solid border-[color:var(--Color-Functional-Primary--Dark,#558000)] w-[522px] max-md:px-5",children:"Go to quote"}),W.jsxs("button",{className:"flex gap-2.5 justify-center px-5 py-2.5 mt-60 ml-16 text-base font-bold text-center text-lime-700 whitespace-nowrap bg-white rounded border border-solid border-[color:var(--Color-Functional-Primary--Dark,#558000)] max-md:mt-10 max-md:ml-2.5 items-center",children:[W.jsx("img",{loading:"lazy",src:"https://cdn.builder.io/api/v1/image/assets/TEMP/91c9b9f5d1f2a509afd2c46fab93912852f90f3b085e3f35ce1e33c252fedf1b?apiKey=b1f64df9aada44c6ba1728b031344f7b&",alt:"",className:"w-4 aspect-square"}),"Back to packages"]})]})}),W.jsx("div",{className:"playground-container",children:W.jsx(UO,{})})]})}La.createRoot(document.getElementById("root")).render(W.jsx(fe.StrictMode,{children:W.jsx(db,{children:W.jsx(WO,{})})}));